Alsa-devel
Threads by month
- ----- 2025 -----
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- 20 participants
- 51112 discussions

[alsa-devel] [RESEND PATCH v11 5/6] ASoC: amd: Handle ACP3x I2S-SP Interrupts.
by Ravulapati Vishnu vardhan rao 21 Nov '19
by Ravulapati Vishnu vardhan rao 21 Nov '19
21 Nov '19
Enabled support for I2S-SP interrupt handling.
Previous to this implementation, driver supports only interrupts
on BT instance.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index fc16432..e0bac1f 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -177,6 +177,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->play_stream);
play_flag = 1;
}
+ if ((val & BIT(I2S_TX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_play_stream) {
+ rv_writel(BIT(I2S_TX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_play_stream);
+ play_flag = 1;
+ }
if ((val & BIT(BT_RX_THRESHOLD)) && rv_i2s_data->capture_stream) {
rv_writel(BIT(BT_RX_THRESHOLD), rv_i2s_data->acp3x_base +
@@ -184,6 +191,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->capture_stream);
cap_flag = 1;
}
+ if ((val & BIT(I2S_RX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_capture_stream) {
+ rv_writel(BIT(I2S_RX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_capture_stream);
+ cap_flag = 1;
+ }
if (play_flag | cap_flag)
return IRQ_HANDLED;
--
2.7.4
1
0

[alsa-devel] [RESEND PATCH v11 4/6] ASoC: amd: add ACP3x TDM mode support
by Ravulapati Vishnu vardhan rao 21 Nov '19
by Ravulapati Vishnu vardhan rao 21 Nov '19
21 Nov '19
ACP3x I2S (CPU DAI) can act in normal I2S and TDM modes. Added support
for TDM mode. Desired mode can be selected from ASoC machine driver.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 24 ++++++++++++++++++++----
sound/soc/amd/raven/acp3x.h | 1 +
2 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index 246eac4..9a6f0269 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -70,11 +70,27 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai,
frm_len = FRM_LEN | (slots << 15) | (slot_len << 18);
if (adata->substream_type == SNDRV_PCM_STREAM_PLAYBACK) {
- reg_val = mmACP_BTTDM_ITER;
- frmt_val = mmACP_BTTDM_TXFRMT;
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ frmt_reg = mmACP_BTTDM_TXFRMT;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ frmt_reg = mmACP_I2STDM_TXFRMT;
+ }
} else {
- reg_val = mmACP_BTTDM_IRER;
- frmt_val = mmACP_BTTDM_RXFRMT;
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ frmt_reg = mmACP_BTTDM_RXFRMT;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ frmt_reg = mmACP_I2STDM_RXFRMT;
+ }
}
val = rv_readl(adata->acp3x_base + reg_val);
rv_writel(val | 0x2, adata->acp3x_base + reg_val);
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index a82d2c5..bf0a683 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -75,6 +75,7 @@ struct acp3x_platform_info {
struct i2s_dev_data {
bool tdm_mode;
unsigned int i2s_irq;
+ u16 i2s_instance;
u32 tdm_fmt;
u32 substream_type;
void __iomem *acp3x_base;
--
2.7.4
1
0

21 Nov '19
From: Nilkanth Ahirrao <anilkanth(a)jp.adit-jv.com>
The current driver only sets 0x76543210 and 0x67452301 for DALIGN.
This doesn’t work well for TDM split and ex-split mode for all SSIU.
This patch programs the DALIGN registers based on the SSIU number.
Cc: Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx(a)renesas.com>
Cc: Jiada Wang <jiada_wang(a)mentor.com>
Cc: Andrew Gabbasov <andrew_gabbasov(a)mentor.com>
Fixes: a914e44693d41b ("ASoC: rsnd: more clear rsnd_get_dalign() for DALIGN")
Signed-off-by: Nilkanth Ahirrao <anilkanth(a)jp.adit-jv.com>
[erosca: Adjust Fixes: tag, reformat patch description]
Signed-off-by: Eugeniu Rosca <erosca(a)de.adit-jv.com>
---
sound/soc/sh/rcar/core.c | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index e9596c2096cd..ae05ed08a2b3 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -376,6 +376,16 @@ u32 rsnd_get_adinr_bit(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
*/
u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
{
+ static const u32 dalign_values[8][2] = {
+ {0x76543210, 0x67452301},
+ {0x00000032, 0x00000023},
+ {0x00007654, 0x00006745},
+ {0x00000076, 0x00000067},
+ {0xfedcba98, 0xefcdab89},
+ {0x000000ba, 0x000000ab},
+ {0x0000fedc, 0x0000efcd},
+ {0x000000fe, 0x000000ef},
+ };
struct rsnd_mod *ssiu = rsnd_io_to_mod_ssiu(io);
struct rsnd_mod *target;
struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
@@ -413,11 +423,18 @@ u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
/* Non target mod or non 16bit needs normal DALIGN */
if ((snd_pcm_format_width(runtime->format) != 16) ||
- (mod != target))
- return 0x76543210;
+ (mod != target)) {
+ if (mod == ssiu)
+ return dalign_values[rsnd_mod_id_sub(mod)][0];
+ else
+ return 0x76543210;
/* Target mod needs inverted DALIGN when 16bit */
- else
- return 0x67452301;
+ } else {
+ if (mod == ssiu)
+ return dalign_values[rsnd_mod_id_sub(mod)][1];
+ else
+ return 0x67452301;
+ }
}
u32 rsnd_get_busif_shift(struct rsnd_dai_stream *io, struct rsnd_mod *mod)
--
2.24.0
2
3

[alsa-devel] [PATCH] ALSA: hda/realtek - Enable the headset-mic on a Xiaomi's laptop
by Hui Wang 21 Nov '19
by Hui Wang 21 Nov '19
21 Nov '19
The headset on this machine is not defined, after applying the quirk
ALC256_FIXUP_ASUS_HEADSET_MIC, the headset-mic works well
BugLink: https://bugs.launchpad.net/bugs/1846148
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang(a)canonical.com>
---
sound/pci/hda/patch_realtek.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 4ebe104cb592..bd0c767981b1 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -7248,6 +7248,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
+ SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
#if 0
--
2.17.1
2
1

[alsa-devel] [PATCH 1/2] ALSA: hda/realtek - Move some alc256 pintbls to fallback table
by Hui Wang 21 Nov '19
by Hui Wang 21 Nov '19
21 Nov '19
We have a new Dell machine which needs to apply the quirk
ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, try to use the fallback table
to fix it this time. And we could remove all pintbls of alc256
for applying DELL1_MIC_NO_PRESENCE on Dell machines.
Signed-off-by: Hui Wang <hui.wang(a)canonical.com>
---
sound/pci/hda/patch_realtek.c | 35 +++--------------------------------
1 file changed, 3 insertions(+), 32 deletions(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 80f66ba85f87..4c83ed4b0d5c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -7608,38 +7608,6 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
{0x1b, 0x01011020},
{0x21, 0x02211010}),
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
- {0x12, 0x90a60130},
- {0x14, 0x90170110},
- {0x1b, 0x01011020},
- {0x21, 0x0221101f}),
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
- {0x12, 0x90a60160},
- {0x14, 0x90170120},
- {0x21, 0x02211030}),
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
- {0x12, 0x90a60170},
- {0x14, 0x90170120},
- {0x21, 0x02211030}),
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell Inspiron 5468", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
- {0x12, 0x90a60180},
- {0x14, 0x90170120},
- {0x21, 0x02211030}),
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
- {0x12, 0xb7a60130},
- {0x14, 0x90170110},
- {0x21, 0x02211020}),
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
- {0x12, 0x90a60130},
- {0x14, 0x90170110},
- {0x14, 0x01011020},
- {0x21, 0x0221101f}),
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
- ALC256_STANDARD_PINS),
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
- {0x14, 0x90170110},
- {0x1b, 0x01011020},
- {0x21, 0x0221101f}),
SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC,
{0x14, 0x90170110},
{0x1b, 0x90a70130},
@@ -7852,6 +7820,9 @@ static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = {
SND_HDA_PIN_QUIRK(0x10ec0289, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE,
{0x19, 0x40000000},
{0x1b, 0x40000000}),
+ SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
+ {0x19, 0x40000000},
+ {0x1a, 0x40000000}),
{}
};
--
2.17.1
2
3

[alsa-devel] [PATCH 0/2] ASoC: max98090: make sure SHDN is 0 when changing sensitive registers
by Tzung-Bi Shih 21 Nov '19
by Tzung-Bi Shih 21 Nov '19
21 Nov '19
This series is a follow up fix for the question:
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-October/157364.h…
This series should apply after the series:
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-November/158850.…
(in terms of line numbers).
Tzung-Bi Shih (2):
ASoC: core: add SND_SOC_BYTES_E
ASoC: max98090: save and restore SHDN when changing sensitive
registers
include/sound/soc.h | 6 +
sound/soc/codecs/max98090.c | 433 ++++++++++++++++++++++++++----------
sound/soc/codecs/max98090.h | 3 +-
3 files changed, 318 insertions(+), 124 deletions(-)
--
2.24.0.432.g9d3f5f5b63-goog
2
5
Hello,
How should simple-card work when we define a DT node like this:
sof-audio-cs42888 {
compatible = "simple-scu-audio-card";
simple-audio-card,dai-link {
format = "i2s";
cpu {
sound-dai = <&dummy>;
};
codec {
sound-dai = <&cs42888>;
};
plat {
sound-dai = <&dsp>;
};
};
Is there any example with platform?
2
1

[alsa-devel] [PATCHv2] aplay: Limit VUMeter progress bar to 100 for negative as well
by Rosen Penev 20 Nov '19
by Rosen Penev 20 Nov '19
20 Nov '19
While the progress bar cannot be negative, GCC concludes that it can be
and assumes tmp can be written past the end. Fixes this GCC warning:
aplay.c:1747:18: warning: '%02d' directive writing between 2 and 11 bytes
into a region of size 4 [-Wformat-overflow=]
1747 | sprintf(tmp, "%02d%%", maxperc[c]);
Signed-off-by: Rosen Penev <rosenp(a)gmail.com>
---
v2: Reworded
aplay/aplay.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/aplay/aplay.c b/aplay/aplay.c
index 78adee2..1a887e4 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -54,6 +54,8 @@
#include "formats.h"
#include "version.h"
+#define ABS(a) (a) < 0 ? -(a) : (a)
+
#ifdef SND_CHMAP_API_VERSION
#define CONFIG_SUPPORT_CHMAP 1
#endif
@@ -1741,7 +1743,7 @@ static void print_vu_meter_stereo(int *perc, int *maxperc)
line[bar_length + 6 + 1 + p] = '+';
else
line[bar_length - p - 1] = '+';
- if (maxperc[c] > 99)
+ if (ABS(maxperc[c]) > 99)
sprintf(tmp, "MAX");
else
sprintf(tmp, "%02d%%", maxperc[c]);
--
2.23.0
2
1
Hi all,
I would like to discuss the way we use DMI information for the board
identification in ASoC for the user space (long card name). It's a bit
redundant information, because DMI is already exposed through
/sys/class/dmi/id/ to the user space nowadays.
My idea is to add 'DMI:sysfs' ctl info component string for the appropriate
ASoC driver to detect the existence of this dmi interface. Then I can add the
sysfs support to the ucm2 conditions.
But it's really a quick idea. I'd like to have comments.
Thank you,
Jaroslav
--
Jaroslav Kysela <perex(a)perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
2
3

Re: [alsa-devel] [PATCH 4/4] aplay: Limit VUMeter progress bar to 100 for negative as well
by Rosen Penev 20 Nov '19
by Rosen Penev 20 Nov '19
20 Nov '19
On Wed, Nov 20, 2019 at 10:34 AM Takashi Iwai <tiwai(a)suse.de> wrote:
>
> On Wed, 20 Nov 2019 18:55:43 +0100,
> Rosen Penev wrote:
> >
> > On Tue, Nov 19, 2019 at 10:48 PM Takashi Iwai <tiwai(a)suse.de> wrote:
> > >
> > > On Wed, 20 Nov 2019 07:36:19 +0100,
> > > Rosen Penev wrote:
> > > >
> > > > On Tue, Nov 19, 2019 at 10:26 PM Takashi Iwai <tiwai(a)suse.de> wrote:
> > > > >
> > > > > On Wed, 20 Nov 2019 05:28:56 +0100,
> > > > > Rosen Penev wrote:
> > > > > >
> > > > > > If the progress bar somehow becomes negative, it ends up overwritting
> > > > > > tmp. Fixes this GCC warning:
> > > > > >
> > > > > > aplay.c:1747:18: warning: '%02d' directive writing between 2 and 11 bytes
> > > > > > into a region of size 4 [-Wformat-overflow=]
> > > > > > 1747 | sprintf(tmp, "%02d%%", maxperc[c]);
> > > > >
> > > > > This is false-positive. The value passed there is guaranteed to be a
> > > > > positive integer at the calculation time.
> > > > Sure. But best to silence GCC. It probably optimizes better this way.
> > >
> > > I guess this adds more code in binary. Comparing with 99U would work?
> > I tried that. Here are some results:
> >
> > 134348 for this patch
> > 134832 if changed to U. Also tried casting lhs to unnsigned int, same size.
> > 135125 originally
> >
> > I understand this is an exercise in micro-optimization, but still.
> >
> > Sizes are in bytes. It's the size of a compressed OpenWrt archive.
>
> Thanks for the analysis. It's surprising, though, the original code
> became bigger.
I've learned not to question the compiler. If it complains, it means
it generates suboptimal code.
>
> The cast of lhs is basically superfluous since C performs the cast
> implicitly at comparison, BTW.
>
> In anyway, the number tells. Could you respin this patch?
I can resend. Not sure what you really want.
> Meanwhile I'll apply the rest patches.
>
>
> thanks,
>
> Takashi
1
0

[alsa-devel] [PATCHv2] aplay: Limit VUMeter progress bar to 100 for negative as well
by Rosen Penev 20 Nov '19
by Rosen Penev 20 Nov '19
20 Nov '19
While the progress bar cannot be negative, GCC concludes that it can be
and assumes tmp can be written past the end. Fixes this GCC warning:
aplay.c:1747:18: warning: '%02d' directive writing between 2 and 11 bytes
into a region of size 4 [-Wformat-overflow=]
1747 | sprintf(tmp, "%02d%%", maxperc[c]);
Signed-off-by: Rosen Penev <rosenp(a)gmail.com>
---
v2: Reworded
aplay/aplay.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/aplay/aplay.c b/aplay/aplay.c
index 78adee2..1a887e4 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -54,6 +54,8 @@
#include "formats.h"
#include "version.h"
+#define ABS(a) (a) < 0 ? -(a) : (a)
+
#ifdef SND_CHMAP_API_VERSION
#define CONFIG_SUPPORT_CHMAP 1
#endif
@@ -1741,7 +1743,7 @@ static void print_vu_meter_stereo(int *perc, int *maxperc)
line[bar_length + 6 + 1 + p] = '+';
else
line[bar_length - p - 1] = '+';
- if (maxperc[c] > 99)
+ if (ABS(maxperc[c]) > 99)
sprintf(tmp, "MAX");
else
sprintf(tmp, "%02d%%", maxperc[c]);
--
2.23.0
1
0

20 Nov '19
It also reduces compiled size slightly.
aplay.c: In function 'capture':
aplay.c:3055:34: error: '-01' directive output may be truncated writing 3
bytes into a region of size between 1 and 4097 [-Werror=format-truncation=
]
3055 | snprintf(namebuf, namelen, "%s-01", buf);
| ^~~
aplay.c:3055:4: note: 'snprintf' output between 4 and 4100 bytes into a
destination of size 4097
3055 | snprintf(namebuf, namelen, "%s-01", buf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aplay.c:3053:34: error: '-01.' directive output may be truncated writing 4
bytes into a region of size between 1 and 4097 [-Werror=format-truncation=
]
3053 | snprintf(namebuf, namelen, "%s-01.%s", buf, s);
| ^~~~
aplay.c:3053:4: note: 'snprintf' output 5 or more bytes (assuming 4101)
into a destination of size 4097
3053 | snprintf(namebuf, namelen, "%s-01.%s", buf, s);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aplay.c:3065:34: error: '%02i' directive output may be truncated writing
between 2 and 10 bytes into a region of size between 0 and 4096 [-Werror=
format-truncation=]
3065 | snprintf(namebuf, namelen, "%s-%02i", buf, filecount);
| ^~~~
aplay.c:3065:30: note: directive argument in the range [1, 2147483647]
3065 | snprintf(namebuf, namelen, "%s-%02i", buf, filecount);
| ^~~~~~~~~
aplay.c:3065:3: note: 'snprintf' output between 4 and 4108 bytes into a
destination of size 4097
3065 | snprintf(namebuf, namelen, "%s-%02i", buf, filecount);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aplay.c:3063:34: error: '%02i' directive output may be truncated writing
between 2 and 10 bytes into a region of size between 0 and 4096 [-Werror=
format-truncation=]
3063 | snprintf(namebuf, namelen, "%s-%02i.%s", buf, filecount, s);
| ^~~~
aplay.c:3063:30: note: directive argument in the range [1, 2147483647]
3063 | snprintf(namebuf, namelen, "%s-%02i.%s", buf, filecount, s);
| ^~~~~~~~~~~~
aplay.c:3063:3: note: 'snprintf' output 5 or more bytes (assuming 4109)
into a destination of size 4097
3063 | snprintf(namebuf, namelen, "%s-%02i.%s", buf, filecount, s);
Signed-off-by: Rosen Penev <rosenp(a)gmail.com>
---
aplay/aplay.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/aplay/aplay.c b/aplay/aplay.c
index 9c5a11b..1a887e4 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -3017,7 +3017,7 @@ static int new_capture_file(char *name, char *namebuf, size_t namelen,
int filecount)
{
char *s;
- char buf[PATH_MAX+1];
+ char buf[PATH_MAX-10];
time_t t;
struct tm *tmp;
@@ -3124,7 +3124,7 @@ static void capture(char *orig_name)
int tostdout=0; /* boolean which describes output stream */
int filecount=0; /* number of files written */
char *name = orig_name; /* current filename */
- char namebuf[PATH_MAX+1];
+ char namebuf[PATH_MAX+2];
off64_t count, rest; /* number of bytes to capture */
struct stat statbuf;
--
2.23.0
1
0

[alsa-devel] [PATCH v3 1/2] ASoC: Intel - use control components to describe card config
by Jaroslav Kysela 20 Nov '19
by Jaroslav Kysela 20 Nov '19
20 Nov '19
Use the control interface (field 'components' in the info structure)
to pass the I/O configuration details. The goal is to replace
the card long name with this.
Signed-off-by: Jaroslav Kysela <perex(a)perex.cz>
Cc: Pierre-Louis Bossart <pierre-louis.bossart(a)linux.intel.com>
Cc: Mark Brown <broonie(a)kernel.org>
---
sound/soc/intel/boards/bytcht_es8316.c | 10 +++++++++-
sound/soc/intel/boards/bytcr_rt5640.c | 6 ++++++
sound/soc/intel/boards/bytcr_rt5651.c | 18 +++++++++++-------
3 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c
index 46612331f5ea..4090550f0fe1 100644
--- a/sound/soc/intel/boards/bytcht_es8316.c
+++ b/sound/soc/intel/boards/bytcht_es8316.c
@@ -361,6 +361,7 @@ static struct snd_soc_dai_link byt_cht_es8316_dais[] = {
/* SoC card */
static char codec_name[SND_ACPI_I2C_ID_LEN];
static char long_name[50]; /* = "bytcht-es8316-*-spk-*-mic" */
+static char components_string[32]; /* = "cfg-spk:* cfg-mic:* */
static int byt_cht_es8316_suspend(struct snd_soc_card *card)
{
@@ -572,17 +573,24 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
}
}
- /* register the soc card */
+ snprintf(components_string, sizeof(components_string),
+ "cfg-spk:%s cfg-mic:%s",
+ (quirk & BYT_CHT_ES8316_MONO_SPEAKER) ? "1" : "2",
+ mic_name[BYT_CHT_ES8316_MAP(quirk)]);
+ byt_cht_es8316_card.components = components_string;
snprintf(long_name, sizeof(long_name), "bytcht-es8316-%s-spk-%s-mic",
(quirk & BYT_CHT_ES8316_MONO_SPEAKER) ? "mono" : "stereo",
mic_name[BYT_CHT_ES8316_MAP(quirk)]);
byt_cht_es8316_card.long_name = long_name;
+
+ /* register the soc card */
snd_soc_card_set_drvdata(&byt_cht_es8316_card, priv);
ret = devm_snd_soc_register_card(dev, &byt_cht_es8316_card);
if (ret) {
gpiod_put(priv->speaker_en_gpio);
dev_err(dev, "snd_soc_register_card failed: %d\n", ret);
+
return ret;
}
platform_set_drvdata(pdev, &byt_cht_es8316_card);
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 9c1aa4ec9cba..0170d31e691a 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -1081,6 +1081,7 @@ static char byt_rt5640_codec_name[SND_ACPI_I2C_ID_LEN];
static char byt_rt5640_codec_aif_name[12]; /* = "rt5640-aif[1|2]" */
static char byt_rt5640_cpu_dai_name[10]; /* = "ssp[0|2]-port" */
static char byt_rt5640_long_name[40]; /* = "bytcr-rt5640-*-spk-*-mic" */
+static char byt_rt5640_components[32]; /* = "cfg-spk:* cfg-mic:*" */
static int byt_rt5640_suspend(struct snd_soc_card *card)
{
@@ -1303,6 +1304,11 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
}
}
+ snprintf(byt_rt5640_components, sizeof(byt_rt5640_components),
+ "cfg-spk:%s cfg-mic:%s",
+ (byt_rt5640_quirk & BYT_RT5640_MONO_SPEAKER) ? "1" : "2",
+ map_name[BYT_RT5640_MAP(byt_rt5640_quirk)]);
+ byt_rt5640_card.components = byt_rt5640_components;
snprintf(byt_rt5640_long_name, sizeof(byt_rt5640_long_name),
"bytcr-rt5640-%s-spk-%s-mic",
(byt_rt5640_quirk & BYT_RT5640_MONO_SPEAKER) ?
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 4606f6f582d6..80a5674ddb1b 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -798,6 +798,7 @@ static char byt_rt5651_codec_name[SND_ACPI_I2C_ID_LEN];
static char byt_rt5651_codec_aif_name[12]; /* = "rt5651-aif[1|2]" */
static char byt_rt5651_cpu_dai_name[10]; /* = "ssp[0|2]-port" */
static char byt_rt5651_long_name[50]; /* = "bytcr-rt5651-*-spk-*-mic[-swapped-hp]" */
+static char byt_rt5651_components[50]; /* = "cfg-spk:* cfg-mic:*" */
static int byt_rt5651_suspend(struct snd_soc_card *card)
{
@@ -876,7 +877,6 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
const char *platform_name;
struct acpi_device *adev;
struct device *codec_dev;
- const char *hp_swapped;
bool is_bytcr = false;
int ret_val = 0;
int dai_index = 0;
@@ -1080,16 +1080,20 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
}
}
- if (byt_rt5651_quirk & BYT_RT5651_HP_LR_SWAPPED)
- hp_swapped = "-hp-swapped";
- else
- hp_swapped = "";
-
+ snprintf(byt_rt5651_components, sizeof(byt_rt5651_components),
+ "cfg-spk:%s cfg-mic:%s%s",
+ (byt_rt5651_quirk & BYT_RT5651_MONO_SPEAKER) ? "1" : "2",
+ mic_name[BYT_RT5651_MAP(byt_rt5651_quirk)],
+ (byt_rt5651_quirk & BYT_RT5651_HP_LR_SWAPPED) ?
+ " cfg-hp:lrswap" : "");
+ byt_rt5651_card.components = byt_rt5651_components;
snprintf(byt_rt5651_long_name, sizeof(byt_rt5651_long_name),
"bytcr-rt5651-%s-spk-%s-mic%s",
(byt_rt5651_quirk & BYT_RT5651_MONO_SPEAKER) ?
"mono" : "stereo",
- mic_name[BYT_RT5651_MAP(byt_rt5651_quirk)], hp_swapped);
+ mic_name[BYT_RT5651_MAP(byt_rt5651_quirk)],
+ (byt_rt5651_quirk & BYT_RT5651_HP_LR_SWAPPED) ?
+ "-hp-swapped" : "");
byt_rt5651_card.long_name = byt_rt5651_long_name;
/* override plaform name, if required */
--
2.20.1
1
2

[alsa-devel] [PATCH v4 1/2] ASoC: Intel - use control components to describe card config
by Jaroslav Kysela 20 Nov '19
by Jaroslav Kysela 20 Nov '19
20 Nov '19
Use the control interface (field 'components' in the info structure)
to pass the I/O configuration details. The goal is to replace
the card long name with this.
Signed-off-by: Jaroslav Kysela <perex(a)perex.cz>
Cc: Pierre-Louis Bossart <pierre-louis.bossart(a)linux.intel.com>
Cc: Mark Brown <broonie(a)kernel.org>
---
sound/soc/intel/boards/bytcht_es8316.c | 10 +++++++++-
sound/soc/intel/boards/bytcr_rt5640.c | 6 ++++++
sound/soc/intel/boards/bytcr_rt5651.c | 18 +++++++++++-------
3 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c
index 46612331f5ea..4090550f0fe1 100644
--- a/sound/soc/intel/boards/bytcht_es8316.c
+++ b/sound/soc/intel/boards/bytcht_es8316.c
@@ -361,6 +361,7 @@ static struct snd_soc_dai_link byt_cht_es8316_dais[] = {
/* SoC card */
static char codec_name[SND_ACPI_I2C_ID_LEN];
static char long_name[50]; /* = "bytcht-es8316-*-spk-*-mic" */
+static char components_string[32]; /* = "cfg-spk:* cfg-mic:* */
static int byt_cht_es8316_suspend(struct snd_soc_card *card)
{
@@ -572,17 +573,24 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
}
}
- /* register the soc card */
+ snprintf(components_string, sizeof(components_string),
+ "cfg-spk:%s cfg-mic:%s",
+ (quirk & BYT_CHT_ES8316_MONO_SPEAKER) ? "1" : "2",
+ mic_name[BYT_CHT_ES8316_MAP(quirk)]);
+ byt_cht_es8316_card.components = components_string;
snprintf(long_name, sizeof(long_name), "bytcht-es8316-%s-spk-%s-mic",
(quirk & BYT_CHT_ES8316_MONO_SPEAKER) ? "mono" : "stereo",
mic_name[BYT_CHT_ES8316_MAP(quirk)]);
byt_cht_es8316_card.long_name = long_name;
+
+ /* register the soc card */
snd_soc_card_set_drvdata(&byt_cht_es8316_card, priv);
ret = devm_snd_soc_register_card(dev, &byt_cht_es8316_card);
if (ret) {
gpiod_put(priv->speaker_en_gpio);
dev_err(dev, "snd_soc_register_card failed: %d\n", ret);
+
return ret;
}
platform_set_drvdata(pdev, &byt_cht_es8316_card);
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 9c1aa4ec9cba..0170d31e691a 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -1081,6 +1081,7 @@ static char byt_rt5640_codec_name[SND_ACPI_I2C_ID_LEN];
static char byt_rt5640_codec_aif_name[12]; /* = "rt5640-aif[1|2]" */
static char byt_rt5640_cpu_dai_name[10]; /* = "ssp[0|2]-port" */
static char byt_rt5640_long_name[40]; /* = "bytcr-rt5640-*-spk-*-mic" */
+static char byt_rt5640_components[32]; /* = "cfg-spk:* cfg-mic:*" */
static int byt_rt5640_suspend(struct snd_soc_card *card)
{
@@ -1303,6 +1304,11 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
}
}
+ snprintf(byt_rt5640_components, sizeof(byt_rt5640_components),
+ "cfg-spk:%s cfg-mic:%s",
+ (byt_rt5640_quirk & BYT_RT5640_MONO_SPEAKER) ? "1" : "2",
+ map_name[BYT_RT5640_MAP(byt_rt5640_quirk)]);
+ byt_rt5640_card.components = byt_rt5640_components;
snprintf(byt_rt5640_long_name, sizeof(byt_rt5640_long_name),
"bytcr-rt5640-%s-spk-%s-mic",
(byt_rt5640_quirk & BYT_RT5640_MONO_SPEAKER) ?
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 4606f6f582d6..80a5674ddb1b 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -798,6 +798,7 @@ static char byt_rt5651_codec_name[SND_ACPI_I2C_ID_LEN];
static char byt_rt5651_codec_aif_name[12]; /* = "rt5651-aif[1|2]" */
static char byt_rt5651_cpu_dai_name[10]; /* = "ssp[0|2]-port" */
static char byt_rt5651_long_name[50]; /* = "bytcr-rt5651-*-spk-*-mic[-swapped-hp]" */
+static char byt_rt5651_components[50]; /* = "cfg-spk:* cfg-mic:*" */
static int byt_rt5651_suspend(struct snd_soc_card *card)
{
@@ -876,7 +877,6 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
const char *platform_name;
struct acpi_device *adev;
struct device *codec_dev;
- const char *hp_swapped;
bool is_bytcr = false;
int ret_val = 0;
int dai_index = 0;
@@ -1080,16 +1080,20 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
}
}
- if (byt_rt5651_quirk & BYT_RT5651_HP_LR_SWAPPED)
- hp_swapped = "-hp-swapped";
- else
- hp_swapped = "";
-
+ snprintf(byt_rt5651_components, sizeof(byt_rt5651_components),
+ "cfg-spk:%s cfg-mic:%s%s",
+ (byt_rt5651_quirk & BYT_RT5651_MONO_SPEAKER) ? "1" : "2",
+ mic_name[BYT_RT5651_MAP(byt_rt5651_quirk)],
+ (byt_rt5651_quirk & BYT_RT5651_HP_LR_SWAPPED) ?
+ " cfg-hp:lrswap" : "");
+ byt_rt5651_card.components = byt_rt5651_components;
snprintf(byt_rt5651_long_name, sizeof(byt_rt5651_long_name),
"bytcr-rt5651-%s-spk-%s-mic%s",
(byt_rt5651_quirk & BYT_RT5651_MONO_SPEAKER) ?
"mono" : "stereo",
- mic_name[BYT_RT5651_MAP(byt_rt5651_quirk)], hp_swapped);
+ mic_name[BYT_RT5651_MAP(byt_rt5651_quirk)],
+ (byt_rt5651_quirk & BYT_RT5651_HP_LR_SWAPPED) ?
+ "-hp-swapped" : "");
byt_rt5651_card.long_name = byt_rt5651_long_name;
/* override plaform name, if required */
--
2.20.1
1
1

Re: [alsa-devel] [PATCH v4 6/7] ALSA: aloop: Support selection of snd_timer instead of jiffies
by Andrew Gabbasov 20 Nov '19
by Andrew Gabbasov 20 Nov '19
20 Nov '19
Hello Takashi,
> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de]
> Sent: Wednesday, November 20, 2019 6:59 PM
> To: Gabbasov, Andrew
> Cc: alsa-devel(a)alsa-project.org; linux-kernel(a)vger.kernel.org; Jaroslav
> Kysela; Takashi Iwai; Timo Wischer
> Subject: Re: [PATCH v4 6/7] ALSA: aloop: Support selection of snd_timer
> instead of jiffies
>
> On Wed, 20 Nov 2019 16:39:00 +0100,
> Andrew Gabbasov wrote:
> >
> > Hello Takashi,
> >
> > > -----Original Message-----
> > > From: Takashi Iwai [mailto:tiwai@suse.de]
> > > Sent: Wednesday, November 20, 2019 6:32 PM
> > > To: Gabbasov, Andrew
> > > Cc: alsa-devel(a)alsa-project.org; linux-kernel(a)vger.kernel.org;
Jaroslav
> > > Kysela; Takashi Iwai; Timo Wischer
> > > Subject: Re: [PATCH v4 6/7] ALSA: aloop: Support selection of
snd_timer
> > > instead of jiffies
> > >
> > > On Wed, 20 Nov 2019 16:21:36 +0100,
> > > Andrew Gabbasov wrote:
> > > >
> > > > Hello Takashi,
> > > >
> > > > > -----Original Message-----
> > > > > From: Takashi Iwai [mailto:tiwai@suse.de]
> > > > > Sent: Wednesday, November 20, 2019 5:34 PM
> > > > > To: Gabbasov, Andrew
> > > > > Cc: alsa-devel(a)alsa-project.org; linux-kernel(a)vger.kernel.org;
> > Jaroslav
> > > > > Kysela; Takashi Iwai; Timo Wischer
> > > > > Subject: Re: [PATCH v4 6/7] ALSA: aloop: Support selection of
> > snd_timer
> > > > > instead of jiffies
> > > > >
> > > > > On Wed, 20 Nov 2019 12:58:55 +0100,
> > > > > Andrew Gabbasov wrote:
> > > > > > +/* call in loopback->cable_lock */
> > > > > > +static int loopback_snd_timer_open(struct loopback_pcm *dpcm)
> > > > > > +{
> > > > > > + int err = 0;
> > > > > > + struct snd_timer_id tid = {
> > > > > > + .dev_class = SNDRV_TIMER_CLASS_PCM,
> > > > > > + .dev_sclass = SNDRV_TIMER_SCLASS_APPLICATION,
> > > > > > + };
> > > > > > + struct snd_timer_instance *timeri;
> > > > > > + struct loopback_cable *cable = dpcm->cable;
> > > > > > +
> > > > > > + spin_lock_irq(&cable->lock);
> > > > > > +
> > > > > > + /* check if timer was already opened. It is only opened once
> > > > > > + * per playback and capture subdevice (aka cable).
> > > > > > + */
> > > > > > + if (cable->snd_timer.instance)
> > > > > > + goto unlock;
> > > > > > +
> > > > > > + err = loopback_parse_timer_id(dpcm->loopback->timer_source,
> > > &tid);
> > > > > > + if (err < 0) {
> > > > > > + pcm_err(dpcm->substream->pcm,
> > > > > > + "Parsing timer source \'%s\' failed with
> > %d",
> > > > > > + dpcm->loopback->timer_source, err);
> > > > > > + goto unlock;
> > > > > > + }
> > > > > > +
> > > > > > + cable->snd_timer.stream = dpcm->substream->stream;
> > > > > > + cable->snd_timer.id = tid;
> > > > > > +
> > > > > > + timeri = snd_timer_instance_new(dpcm->loopback->card->id);
> > > > > > + if (!timeri) {
> > > > > > + err = -ENOMEM;
> > > > > > + goto unlock;
> > > > > > + }
> > > > > > + /* The callback has to be called from another tasklet. If
> > > > > > + * SNDRV_TIMER_IFLG_FAST is specified it will be called from
> > > the
> > > > > > + * snd_pcm_period_elapsed() call of the selected sound card.
> > > > > > + * snd_pcm_period_elapsed() helds
> > > snd_pcm_stream_lock_irqsave().
> > > > > > + * Due to our callback loopback_snd_timer_function() also
> > > calls
> > > > > > + * snd_pcm_period_elapsed() which calls
> > > > > snd_pcm_stream_lock_irqsave().
> > > > > > + * This would end up in a dead lock.
> > > > > > + */
> > > > > > + timeri->flags |= SNDRV_TIMER_IFLG_AUTO;
> > > > > > + timeri->callback = loopback_snd_timer_function;
> > > > > > + timeri->callback_data = (void *)cable;
> > > > > > + timeri->ccallback = loopback_snd_timer_event;
> > > > > > +
> > > > > > + /* snd_timer_close() and snd_timer_open() should not be
> > called
> > > with
> > > > > > + * locked spinlock because both functions can block on a
> > > mutex. The
> > > > > > + * mutex loopback->cable_lock is kept locked. Therefore
> > > > > snd_timer_open()
> > > > > > + * cannot be called a second time by the other device of the
> > > same
> > > > > cable.
> > > > > > + * Therefore the following issue cannot happen:
> > > > > > + * [proc1] Call loopback_timer_open() ->
> > > > > > + * Unlock cable->lock for snd_timer_close/open()
> > call
> > > > > > + * [proc2] Call loopback_timer_open() -> snd_timer_open(),
> > > > > > + * snd_timer_start()
> > > > > > + * [proc1] Call snd_timer_open() and overwrite running timer
> > > > > > + * instance
> > > > > > + */
> > > > > > + spin_unlock_irq(&cable->lock);
> > > > > > + err = snd_timer_open(timeri, &cable->snd_timer.id, current-
> > > >pid);
> > > > > > + if (err < 0) {
> > > > > > + pcm_err(dpcm->substream->pcm,
> > > > > > + "snd_timer_open (%d,%d,%d) failed with %d",
> > > > > > + cable->snd_timer.id.card,
> > > > > > + cable->snd_timer.id.device,
> > > > > > + cable->snd_timer.id.subdevice,
> > > > > > + err);
> > > > > > + snd_timer_instance_free(timeri);
> > > > > > + return err;
> > > > > > + }
> > > > > > + spin_lock_irq(&cable->lock);
> > > > > > +
> > > > > > + cable->snd_timer.instance = timeri;
> > > > > > +
> > > > > > + /* initialise a tasklet used for draining */
> > > > > > + tasklet_init(&cable->snd_timer.event_tasklet,
> > > > > > + loopback_snd_timer_tasklet, (unsigned
> > > long)timeri);
> > > > >
> > > > > This has to be set before snd_timer_open(). The callback might be
> > > > > called immediately after snd_timer_open().
> > > >
> > > > This tasklet is used/scheduled only in ccallback (not regular tick
> > > > callback),
> > > > and only for SNDRV_TIMER_EVENT_MSTOP event. Can this event really
> happen
> > > > immediately after snd_timer_open()?
> > >
> > > Why not? The master timer can be stopped at any time, even between
> > > these two lines.
> > >
> > > Beware that there are fuzzer programs that can trigger such racy
> > > things, and you're adding the code to the target that is actively
> > > slapped by them :)
> >
> > OK, got it.
> > I'll move this initialization to before snd_timer_open() in the next
> > update together with the fixes for the other issues you will find
> > in this version.
>
> I have no other issues, so you can just resubmit only that patch,
> too.
I'm not sure how to correctly format resubmitting of a single patch from
a patch set, so I'm submitting the next version v5 of the whole patch set:
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-November/158939.h
tml
Thanks!
Best regards,
Andrew
1
0
Fixes warning on musl:
warning redirecting incorrect #include <sys/poll.h> to <poll.h>
Signed-off-by: Rosen Penev <rosenp(a)gmail.com>
---
amidi/amidi.c | 2 +-
amixer/amixer.c | 2 +-
aplay/aplay.c | 2 +-
seq/aplaymidi/arecordmidi.c | 2 +-
seq/aseqdump/aseqdump.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/amidi/amidi.c b/amidi/amidi.c
index b6e05e1..c6268e4 100644
--- a/amidi/amidi.c
+++ b/amidi/amidi.c
@@ -31,7 +31,7 @@
#include <signal.h>
#include <sys/timerfd.h>
#include <sys/types.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
diff --git a/amixer/amixer.c b/amixer/amixer.c
index ad9c482..f7f31f0 100644
--- a/amixer/amixer.c
+++ b/amixer/amixer.c
@@ -28,7 +28,7 @@
#include <errno.h>
#include <assert.h>
#include <alsa/asoundlib.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <stdint.h>
#include "amixer.h"
#include "../alsamixer/volume_mapping.h"
diff --git a/aplay/aplay.c b/aplay/aplay.c
index 274bbce..5241068 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -44,7 +44,7 @@
#include <assert.h>
#include <termios.h>
#include <signal.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/uio.h>
#include <sys/time.h>
#include <sys/stat.h>
diff --git a/seq/aplaymidi/arecordmidi.c b/seq/aplaymidi/arecordmidi.c
index f3db65e..604cd0d 100644
--- a/seq/aplaymidi/arecordmidi.c
+++ b/seq/aplaymidi/arecordmidi.c
@@ -27,7 +27,7 @@
#include <string.h>
#include <signal.h>
#include <getopt.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <alsa/asoundlib.h>
#include "aconfig.h"
#include "version.h"
diff --git a/seq/aseqdump/aseqdump.c b/seq/aseqdump/aseqdump.c
index 7904540..578e06f 100644
--- a/seq/aseqdump/aseqdump.c
+++ b/seq/aseqdump/aseqdump.c
@@ -25,7 +25,7 @@
#include <string.h>
#include <signal.h>
#include <getopt.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <alsa/asoundlib.h>
#include "aconfig.h"
#include "version.h"
--
2.23.0
2
7

20 Nov '19
This ASCII string can carry additional information about
soundcard components or configuration. Add the possibility
to set this string via the ASoC card.
Signed-off-by: Jaroslav Kysela <perex(a)perex.cz>
Cc: Mark Brown <broonie(a)kernel.org>
---
include/sound/soc.h | 1 +
sound/soc/soc-core.c | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index e0855dc08d30..bd943b5d7d45 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -982,6 +982,7 @@ struct snd_soc_card {
const char *name;
const char *long_name;
const char *driver_name;
+ const char *components;
char dmi_longname[80];
char topology_shortname[32];
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 55014e7ae0d8..b4683d4588ee 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2121,6 +2121,19 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
soc_setup_card_name(card->snd_card->driver,
card->driver_name, card->name, 1);
+ if (card->components) {
+ /* the current implementation of snd_component_add() accepts */
+ /* multiple components in the string separated by space, */
+ /* but the string collision (identical string) check might */
+ /* not work correctly */
+ ret = snd_component_add(card->snd_card, card->components);
+ if (ret < 0) {
+ dev_err(card->dev, "ASoC: %s snd_component_add() failed: %d\n",
+ card->name, ret);
+ goto probe_end;
+ }
+ }
+
if (card->late_probe) {
ret = card->late_probe(card);
if (ret < 0) {
--
2.20.1
2
5

[alsa-devel] [PATCH v5 0/7] ALSA: aloop: Support sound timer as clock source instead of jiffies
by Andrew Gabbasov 20 Nov '19
by Andrew Gabbasov 20 Nov '19
20 Nov '19
This patch set is an updated version of patches by Timo Wischer:
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-March/146871.html
This patch set is required for forwarding audio data between a HW sound
card and an aloop device without the usage of an asynchronous sample rate
converter.
Most of sound and timers related code is kept the same as in previous set.
The code, related to snd_pcm_link() functionality and its using for
timer source setting, is removed (as rejected earlier). The changes in this
update are mainly related to the parameters handling and some cleanup.
The timer source can be initially selected by "timer_source" kernel module
parameter. It is supposed to have the following format:
[<pref>:](<card name>|<card idx>)[{.,}<dev idx>[{.,}<subdev idx>]]
For example: "hw:I82801AAICH.1.0", or "1.1", or just "I82801AAICH".
(Prefix is ignored, just allowed here to be able to use the strings,
the user got used to).
Although the parsing function recognizes both '.' and ',' as a separator,
module parameters handling routines use ',' to separate parameters for
different module instances (array elements), so we have to use '.'
to separate device and subdevice numbers from the card name or number
in module parameters.
Empty string indicates using jiffies as a timer source.
Besides "static" selection of timer source at module load time,
it is possible to dynamically change it via sound "info" interface
(using "/proc/asound/<card>/timer_source" file in read-write mode.
The contents of this file is used as a timer source string for
a particular loopback card, e.g. "hw:0,0,0" (and here ',' can be used
as a separator).
The timer source string value can be changed at any time, but it is
latched by PCM substream open callback "loopback_open()" (the first
one for a particular cable). At this point it is actually used,
that is the string is parsed, and the timer is looked up and opened.
This seems to be a good trade-off between flexibility of updates and
synchronizations or racing complexity.
The timer source is set for a loopback card (the same as initial setting
by module parameter), but every cable uses the value, current at the moment
of opening. Theoretically, it's possible to set the timer source for each
cable independently (via separate files), but it would be inconsistent
with the initial setting via module parameters on a per-card basis.
v2:
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-November/157961.…
v3:
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-November/158312.…
- Change sound card lookup to use snd_card_ref() and avoid direct access
to sound cards array
- Squash commits on returning error codes for timer start and stop
- Some locking related fixes
- Some code cleanup
v4:
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-November/158896.…
- Change to use updated API for snd_timer_open() (separate timer instance)
- Change to use snd_timer_close() returning void
- Some code cleanup
v5:
- Change to initialize timer event tasklet before calling snd_timer_open()
Andrew Gabbasov (1):
ALSA: aloop: Support runtime change of snd_timer via info interface
Timo Wischer (6):
ALSA: aloop: Describe units of variables
ALSA: aloop: Support return of error code for timer start and stop
ALSA: aloop: Use callback functions for timer specific implementations
ALSA: aloop: Rename all jiffies timer specific functions
ALSA: aloop: Move CABLE_VALID_BOTH to the top of file
ALSA: aloop: Support selection of snd_timer instead of jiffies
sound/drivers/aloop.c | 663 +++++++++++++++++++++++++++++++++++++++---
1 file changed, 628 insertions(+), 35 deletions(-)
--
2.21.0
1
7

[alsa-devel] [PATCH 1/2] ASoC: improve the DMI long card code in asoc-core
by Jaroslav Kysela 20 Nov '19
by Jaroslav Kysela 20 Nov '19
20 Nov '19
Add append_dmi_string() function and make the code more readable.
Signed-off-by: Jaroslav Kysela <perex(a)perex.cz>
Cc: Mark Brown <broonie(a)kernel.org>
---
sound/soc/soc-core.c | 66 +++++++++++++++++---------------------------
1 file changed, 25 insertions(+), 41 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index b4683d4588ee..1d1baf78818c 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1755,6 +1755,23 @@ static int is_dmi_valid(const char *field)
return 1;
}
+/*
+ *
+ */
+static void append_dmi_string(struct snd_soc_card *card, const char *str)
+{
+ char *dst = card->dmi_longname;
+ size_t dst_len = sizeof(card->dmi_longname);
+ size_t len;
+
+ len = strlen(dst);
+ snprintf(dst + len, dst_len - len, "-%s", str);
+
+ len++; /* skip the separator "-" */
+ if (len < dst_len)
+ cleanup_dmi_name(dst + len);
+}
+
/**
* snd_soc_set_dmi_name() - Register DMI names to card
* @card: The card to register DMI names
@@ -1789,61 +1806,36 @@ static int is_dmi_valid(const char *field)
int snd_soc_set_dmi_name(struct snd_soc_card *card, const char *flavour)
{
const char *vendor, *product, *product_version, *board;
- size_t longname_buf_size = sizeof(card->snd_card->longname);
- size_t len;
if (card->long_name)
return 0; /* long name already set by driver or from DMI */
- /* make up dmi long name as: vendor.product.version.board */
+ /* make up dmi long name as: vendor-product-version-board */
vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
if (!vendor || !is_dmi_valid(vendor)) {
dev_warn(card->dev, "ASoC: no DMI vendor name!\n");
return 0;
}
- snprintf(card->dmi_longname, sizeof(card->snd_card->longname),
- "%s", vendor);
+ snprintf(card->dmi_longname, sizeof(card->dmi_longname), "%s", vendor);
cleanup_dmi_name(card->dmi_longname);
product = dmi_get_system_info(DMI_PRODUCT_NAME);
if (product && is_dmi_valid(product)) {
- len = strlen(card->dmi_longname);
- snprintf(card->dmi_longname + len,
- longname_buf_size - len,
- "-%s", product);
-
- len++; /* skip the separator "-" */
- if (len < longname_buf_size)
- cleanup_dmi_name(card->dmi_longname + len);
+ append_dmi_string(card, product);
/*
* some vendors like Lenovo may only put a self-explanatory
* name in the product version field
*/
product_version = dmi_get_system_info(DMI_PRODUCT_VERSION);
- if (product_version && is_dmi_valid(product_version)) {
- len = strlen(card->dmi_longname);
- snprintf(card->dmi_longname + len,
- longname_buf_size - len,
- "-%s", product_version);
-
- len++;
- if (len < longname_buf_size)
- cleanup_dmi_name(card->dmi_longname + len);
- }
+ if (product_version && is_dmi_valid(product_version))
+ append_dmi_string(card, product_version);
}
board = dmi_get_system_info(DMI_BOARD_NAME);
if (board && is_dmi_valid(board)) {
- len = strlen(card->dmi_longname);
- snprintf(card->dmi_longname + len,
- longname_buf_size - len,
- "-%s", board);
-
- len++;
- if (len < longname_buf_size)
- cleanup_dmi_name(card->dmi_longname + len);
+ append_dmi_string(card, board);
} else if (!product) {
/* fall back to using legacy name */
dev_warn(card->dev, "ASoC: no DMI board/product name!\n");
@@ -1851,16 +1843,8 @@ int snd_soc_set_dmi_name(struct snd_soc_card *card, const char *flavour)
}
/* Add flavour to dmi long name */
- if (flavour) {
- len = strlen(card->dmi_longname);
- snprintf(card->dmi_longname + len,
- longname_buf_size - len,
- "-%s", flavour);
-
- len++;
- if (len < longname_buf_size)
- cleanup_dmi_name(card->dmi_longname + len);
- }
+ if (flavour)
+ append_dmi_string(card, flavour);
/* set the card long name */
card->long_name = card->dmi_longname;
--
2.20.1
2
3

[alsa-devel] [PATCH] ASoC: Intel: bytcr_rt5640: Update quirk for Acer Switch 10 SW5-012 2-in-1
by Hans de Goede 20 Nov '19
by Hans de Goede 20 Nov '19
20 Nov '19
When the Acer Switch 10 SW5-012 quirk was added we did not have
jack-detection support yet; and the builtin microphone selection of
the original quirk is wrong too.
Fix the microphone-input quirk and add jack-detection info so that the
internal-microphone and headphone/set jack on the Switch 10 work properly.
Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
---
sound/soc/intel/boards/bytcr_rt5640.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 9c1aa4ec9cba..dd2b5ad08659 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -405,10 +405,12 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW5-012"),
},
- .driver_data = (void *)(BYT_RT5640_IN1_MAP |
- BYT_RT5640_MCLK_EN |
- BYT_RT5640_SSP0_AIF1),
-
+ .driver_data = (void *)(BYT_RT5640_DMIC1_MAP |
+ BYT_RT5640_JD_SRC_JD2_IN4N |
+ BYT_RT5640_OVCD_TH_2000UA |
+ BYT_RT5640_OVCD_SF_0P75 |
+ BYT_RT5640_SSP0_AIF1 |
+ BYT_RT5640_MCLK_EN),
},
{
.matches = {
--
2.23.0
4
3

20 Nov '19
This ASCII string can carry additional information about
soundcard components or configuration. Add the possibility
to set this string via the ASoC card.
Signed-off-by: Jaroslav Kysela <perex(a)perex.cz>
Cc: Mark Brown <broonie(a)kernel.org>
---
include/sound/soc.h | 1 +
sound/soc/soc-core.c | 13 +++++++++++++
2 files changed, 14 insertions(+)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index e0855dc08d30..bd943b5d7d45 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -982,6 +982,7 @@ struct snd_soc_card {
const char *name;
const char *long_name;
const char *driver_name;
+ const char *components;
char dmi_longname[80];
char topology_shortname[32];
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 55014e7ae0d8..b4683d4588ee 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2121,6 +2121,19 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
soc_setup_card_name(card->snd_card->driver,
card->driver_name, card->name, 1);
+ if (card->components) {
+ /* the current implementation of snd_component_add() accepts */
+ /* multiple components in the string separated by space, */
+ /* but the string collision (identical string) check might */
+ /* not work correctly */
+ ret = snd_component_add(card->snd_card, card->components);
+ if (ret < 0) {
+ dev_err(card->dev, "ASoC: %s snd_component_add() failed: %d\n",
+ card->name, ret);
+ goto probe_end;
+ }
+ }
+
if (card->late_probe) {
ret = card->late_probe(card);
if (ret < 0) {
--
2.20.1
4
10

[alsa-devel] [PATCH 0/2] ASoC: pcm3168a: Update the reset GPIO handling
by Peter Ujfalusi 20 Nov '19
by Peter Ujfalusi 20 Nov '19
20 Nov '19
Hi,
Switch the rst-gpios to generic reset-gpios as suggested by Rob.
Based on other threads around GPIOs, revise the GPIO active vs assert/deassert
configuration: The RST pin is a reset pin and it is active low.
Regards,
Peter
---
Peter Ujfalusi (2):
ASoC: dt-bindings: pcm3168a: Update the optional RST gpio for clarity
ASoC: pcm3168a: Update the RST gpio handling to align with
documentation
.../devicetree/bindings/sound/ti,pcm3168a.txt | 9 +++++----
sound/soc/codecs/pcm3168a.c | 20 ++++++++++++++-----
2 files changed, 20 insertions(+), 9 deletions(-)
--
Peter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
2
4

[alsa-devel] [PATCH] Revert "ASoC: soc-pcm: check symmetry after hw_params"
by Shengjiu Wang 20 Nov '19
by Shengjiu Wang 20 Nov '19
20 Nov '19
This reverts commit 957ce0c6b8a1f26559864507ae0bfcba29d924ad.
That commit cause soc_pcm_params_symmetry can't take effect.
cpu_dai->rate, cpu_dai->channels and cpu_dai->sample_bits
are updated in the middle of soc_pcm_hw_params, so move
soc_pcm_params_symmetry to the end of soc_pcm_hw_params is
not a good solution, for judgement of symmetry in the function
is always true.
FIXME:
According to the comments of that commit, I think the case
described in the commit should disable symmetric_rates
in Back-End, rather than changing the position of
soc_pcm_params_symmetry.
Signed-off-by: Shengjiu Wang <shengjiu.wang(a)nxp.com>
---
sound/soc/soc-pcm.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 8655df6a6089..b7800c95327a 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -861,6 +861,11 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
int i, ret = 0;
mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
+
+ ret = soc_pcm_params_symmetry(substream, params);
+ if (ret)
+ goto out;
+
if (rtd->dai_link->ops->hw_params) {
ret = rtd->dai_link->ops->hw_params(substream, params);
if (ret < 0) {
@@ -940,9 +945,6 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
}
component = NULL;
- ret = soc_pcm_params_symmetry(substream, params);
- if (ret)
- goto component_err;
out:
mutex_unlock(&rtd->card->pcm_mutex);
return ret;
--
2.21.0
2
1
Adjust indentation from spaces to tab (+optional two spaces) as in
coding style with command like:
$ sed -e 's/^ /\t/' -i */Kconfig
Signed-off-by: Krzysztof Kozlowski <krzk(a)kernel.org>
---
sound/soc/intel/boards/Kconfig | 24 ++++++++++++------------
sound/soc/sof/intel/Kconfig | 10 +++++-----
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
index 2702aefee775..ef20316e83d1 100644
--- a/sound/soc/intel/boards/Kconfig
+++ b/sound/soc/intel/boards/Kconfig
@@ -441,18 +441,18 @@ config SND_SOC_INTEL_CML_LP_DA7219_MAX98357A_MACH
If unsure select "N".
config SND_SOC_INTEL_SOF_CML_RT1011_RT5682_MACH
- tristate "CML with RT1011 and RT5682 in I2S Mode"
- depends on I2C && ACPI
- depends on MFD_INTEL_LPSS || COMPILE_TEST
- select SND_SOC_RT1011
- select SND_SOC_RT5682
- select SND_SOC_DMIC
- select SND_SOC_HDAC_HDMI
- help
- This adds support for ASoC machine driver for SOF platform with
- RT1011 + RT5682 I2S codec.
- Say Y if you have such a device.
- If unsure select "N".
+ tristate "CML with RT1011 and RT5682 in I2S Mode"
+ depends on I2C && ACPI
+ depends on MFD_INTEL_LPSS || COMPILE_TEST
+ select SND_SOC_RT1011
+ select SND_SOC_RT5682
+ select SND_SOC_DMIC
+ select SND_SOC_HDAC_HDMI
+ help
+ This adds support for ASoC machine driver for SOF platform with
+ RT1011 + RT5682 I2S codec.
+ Say Y if you have such a device.
+ If unsure select "N".
endif ## SND_SOC_SOF_COMETLAKE_LP && SND_SOC_SOF_HDA_LINK
diff --git a/sound/soc/sof/intel/Kconfig b/sound/soc/sof/intel/Kconfig
index b27fd3fdf335..cc09bb606f7d 100644
--- a/sound/soc/sof/intel/Kconfig
+++ b/sound/soc/sof/intel/Kconfig
@@ -264,16 +264,16 @@ config SND_SOC_SOF_ELKHARTLAKE
config SND_SOC_SOF_JASPERLAKE_SUPPORT
bool "SOF support for JasperLake"
help
- This adds support for Sound Open Firmware for Intel(R) platforms
- using the JasperLake processors.
- Say Y if you have such a device.
- If unsure select "N".
+ This adds support for Sound Open Firmware for Intel(R) platforms
+ using the JasperLake processors.
+ Say Y if you have such a device.
+ If unsure select "N".
config SND_SOC_SOF_JASPERLAKE
tristate
select SND_SOC_SOF_HDA_COMMON
help
- This option is not user-selectable but automagically handled by
+ This option is not user-selectable but automagically handled by
'select' statements at a higher level
config SND_SOC_SOF_HDA_COMMON
--
2.17.1
4
3

[alsa-devel] cp: upmix: code formatting and cleanup, generalize format
by GitHub pull_request - opened 20 Nov '19
by GitHub pull_request - opened 20 Nov '19
20 Nov '19
alsa-project/alsa-plugins pull request #2 was opened from bku-sue:
The main purpose of this change is to be able to change the format to e.g. S32 instead of S16 by changing only two lines on the top of the source. So a new symbol `UPMIX_PCM_FORMAT` is added to hide the actual format, and a special type `upmix_sample_t` marks the sample type, instead of fixed `short`.
I fixed the `average_copy` function as well, which was actually expecting the `nchns` parameter to be 2, otherwise its local arrays would be overindexed.
The rest is just better naming for `i` as it denotes the channel index in every case, and applying consistent whitespace.
The behavior of the plugin remains identical though.
Request URL : https://github.com/alsa-project/alsa-plugins/pull/2
Patch URL : https://github.com/alsa-project/alsa-plugins/pull/2.patch
Repository URL: https://github.com/alsa-project/alsa-plugins
1
0

Re: [alsa-devel] [PATCH v4 6/7] ALSA: aloop: Support selection of snd_timer instead of jiffies
by Andrew Gabbasov 20 Nov '19
by Andrew Gabbasov 20 Nov '19
20 Nov '19
Hello Takashi,
> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de]
> Sent: Wednesday, November 20, 2019 6:32 PM
> To: Gabbasov, Andrew
> Cc: alsa-devel(a)alsa-project.org; linux-kernel(a)vger.kernel.org; Jaroslav
> Kysela; Takashi Iwai; Timo Wischer
> Subject: Re: [PATCH v4 6/7] ALSA: aloop: Support selection of snd_timer
> instead of jiffies
>
> On Wed, 20 Nov 2019 16:21:36 +0100,
> Andrew Gabbasov wrote:
> >
> > Hello Takashi,
> >
> > > -----Original Message-----
> > > From: Takashi Iwai [mailto:tiwai@suse.de]
> > > Sent: Wednesday, November 20, 2019 5:34 PM
> > > To: Gabbasov, Andrew
> > > Cc: alsa-devel(a)alsa-project.org; linux-kernel(a)vger.kernel.org;
Jaroslav
> > > Kysela; Takashi Iwai; Timo Wischer
> > > Subject: Re: [PATCH v4 6/7] ALSA: aloop: Support selection of
snd_timer
> > > instead of jiffies
> > >
> > > On Wed, 20 Nov 2019 12:58:55 +0100,
> > > Andrew Gabbasov wrote:
> > > > +/* call in loopback->cable_lock */
> > > > +static int loopback_snd_timer_open(struct loopback_pcm *dpcm)
> > > > +{
> > > > + int err = 0;
> > > > + struct snd_timer_id tid = {
> > > > + .dev_class = SNDRV_TIMER_CLASS_PCM,
> > > > + .dev_sclass = SNDRV_TIMER_SCLASS_APPLICATION,
> > > > + };
> > > > + struct snd_timer_instance *timeri;
> > > > + struct loopback_cable *cable = dpcm->cable;
> > > > +
> > > > + spin_lock_irq(&cable->lock);
> > > > +
> > > > + /* check if timer was already opened. It is only opened once
> > > > + * per playback and capture subdevice (aka cable).
> > > > + */
> > > > + if (cable->snd_timer.instance)
> > > > + goto unlock;
> > > > +
> > > > + err = loopback_parse_timer_id(dpcm->loopback->timer_source,
> &tid);
> > > > + if (err < 0) {
> > > > + pcm_err(dpcm->substream->pcm,
> > > > + "Parsing timer source \'%s\' failed with
%d",
> > > > + dpcm->loopback->timer_source, err);
> > > > + goto unlock;
> > > > + }
> > > > +
> > > > + cable->snd_timer.stream = dpcm->substream->stream;
> > > > + cable->snd_timer.id = tid;
> > > > +
> > > > + timeri = snd_timer_instance_new(dpcm->loopback->card->id);
> > > > + if (!timeri) {
> > > > + err = -ENOMEM;
> > > > + goto unlock;
> > > > + }
> > > > + /* The callback has to be called from another tasklet. If
> > > > + * SNDRV_TIMER_IFLG_FAST is specified it will be called from
> the
> > > > + * snd_pcm_period_elapsed() call of the selected sound card.
> > > > + * snd_pcm_period_elapsed() helds
> snd_pcm_stream_lock_irqsave().
> > > > + * Due to our callback loopback_snd_timer_function() also
> calls
> > > > + * snd_pcm_period_elapsed() which calls
> > > snd_pcm_stream_lock_irqsave().
> > > > + * This would end up in a dead lock.
> > > > + */
> > > > + timeri->flags |= SNDRV_TIMER_IFLG_AUTO;
> > > > + timeri->callback = loopback_snd_timer_function;
> > > > + timeri->callback_data = (void *)cable;
> > > > + timeri->ccallback = loopback_snd_timer_event;
> > > > +
> > > > + /* snd_timer_close() and snd_timer_open() should not be
called
> with
> > > > + * locked spinlock because both functions can block on a
> mutex. The
> > > > + * mutex loopback->cable_lock is kept locked. Therefore
> > > snd_timer_open()
> > > > + * cannot be called a second time by the other device of the
> same
> > > cable.
> > > > + * Therefore the following issue cannot happen:
> > > > + * [proc1] Call loopback_timer_open() ->
> > > > + * Unlock cable->lock for snd_timer_close/open()
call
> > > > + * [proc2] Call loopback_timer_open() -> snd_timer_open(),
> > > > + * snd_timer_start()
> > > > + * [proc1] Call snd_timer_open() and overwrite running timer
> > > > + * instance
> > > > + */
> > > > + spin_unlock_irq(&cable->lock);
> > > > + err = snd_timer_open(timeri, &cable->snd_timer.id, current-
> >pid);
> > > > + if (err < 0) {
> > > > + pcm_err(dpcm->substream->pcm,
> > > > + "snd_timer_open (%d,%d,%d) failed with %d",
> > > > + cable->snd_timer.id.card,
> > > > + cable->snd_timer.id.device,
> > > > + cable->snd_timer.id.subdevice,
> > > > + err);
> > > > + snd_timer_instance_free(timeri);
> > > > + return err;
> > > > + }
> > > > + spin_lock_irq(&cable->lock);
> > > > +
> > > > + cable->snd_timer.instance = timeri;
> > > > +
> > > > + /* initialise a tasklet used for draining */
> > > > + tasklet_init(&cable->snd_timer.event_tasklet,
> > > > + loopback_snd_timer_tasklet, (unsigned
> long)timeri);
> > >
> > > This has to be set before snd_timer_open(). The callback might be
> > > called immediately after snd_timer_open().
> >
> > This tasklet is used/scheduled only in ccallback (not regular tick
> > callback),
> > and only for SNDRV_TIMER_EVENT_MSTOP event. Can this event really happen
> > immediately after snd_timer_open()?
>
> Why not? The master timer can be stopped at any time, even between
> these two lines.
>
> Beware that there are fuzzer programs that can trigger such racy
> things, and you're adding the code to the target that is actively
> slapped by them :)
OK, got it.
I'll move this initialization to before snd_timer_open() in the next
update together with the fixes for the other issues you will find
in this version.
Thanks!
Best regards,
Andrew
1
0

Re: [alsa-devel] [PATCH v4 6/7] ALSA: aloop: Support selection of snd_timer instead of jiffies
by Andrew Gabbasov 20 Nov '19
by Andrew Gabbasov 20 Nov '19
20 Nov '19
Hello Takashi,
> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de]
> Sent: Wednesday, November 20, 2019 5:34 PM
> To: Gabbasov, Andrew
> Cc: alsa-devel(a)alsa-project.org; linux-kernel(a)vger.kernel.org; Jaroslav
> Kysela; Takashi Iwai; Timo Wischer
> Subject: Re: [PATCH v4 6/7] ALSA: aloop: Support selection of snd_timer
> instead of jiffies
>
> On Wed, 20 Nov 2019 12:58:55 +0100,
> Andrew Gabbasov wrote:
> > +/* call in loopback->cable_lock */
> > +static int loopback_snd_timer_open(struct loopback_pcm *dpcm)
> > +{
> > + int err = 0;
> > + struct snd_timer_id tid = {
> > + .dev_class = SNDRV_TIMER_CLASS_PCM,
> > + .dev_sclass = SNDRV_TIMER_SCLASS_APPLICATION,
> > + };
> > + struct snd_timer_instance *timeri;
> > + struct loopback_cable *cable = dpcm->cable;
> > +
> > + spin_lock_irq(&cable->lock);
> > +
> > + /* check if timer was already opened. It is only opened once
> > + * per playback and capture subdevice (aka cable).
> > + */
> > + if (cable->snd_timer.instance)
> > + goto unlock;
> > +
> > + err = loopback_parse_timer_id(dpcm->loopback->timer_source, &tid);
> > + if (err < 0) {
> > + pcm_err(dpcm->substream->pcm,
> > + "Parsing timer source \'%s\' failed with %d",
> > + dpcm->loopback->timer_source, err);
> > + goto unlock;
> > + }
> > +
> > + cable->snd_timer.stream = dpcm->substream->stream;
> > + cable->snd_timer.id = tid;
> > +
> > + timeri = snd_timer_instance_new(dpcm->loopback->card->id);
> > + if (!timeri) {
> > + err = -ENOMEM;
> > + goto unlock;
> > + }
> > + /* The callback has to be called from another tasklet. If
> > + * SNDRV_TIMER_IFLG_FAST is specified it will be called from the
> > + * snd_pcm_period_elapsed() call of the selected sound card.
> > + * snd_pcm_period_elapsed() helds snd_pcm_stream_lock_irqsave().
> > + * Due to our callback loopback_snd_timer_function() also calls
> > + * snd_pcm_period_elapsed() which calls
> snd_pcm_stream_lock_irqsave().
> > + * This would end up in a dead lock.
> > + */
> > + timeri->flags |= SNDRV_TIMER_IFLG_AUTO;
> > + timeri->callback = loopback_snd_timer_function;
> > + timeri->callback_data = (void *)cable;
> > + timeri->ccallback = loopback_snd_timer_event;
> > +
> > + /* snd_timer_close() and snd_timer_open() should not be called with
> > + * locked spinlock because both functions can block on a mutex. The
> > + * mutex loopback->cable_lock is kept locked. Therefore
> snd_timer_open()
> > + * cannot be called a second time by the other device of the same
> cable.
> > + * Therefore the following issue cannot happen:
> > + * [proc1] Call loopback_timer_open() ->
> > + * Unlock cable->lock for snd_timer_close/open() call
> > + * [proc2] Call loopback_timer_open() -> snd_timer_open(),
> > + * snd_timer_start()
> > + * [proc1] Call snd_timer_open() and overwrite running timer
> > + * instance
> > + */
> > + spin_unlock_irq(&cable->lock);
> > + err = snd_timer_open(timeri, &cable->snd_timer.id, current->pid);
> > + if (err < 0) {
> > + pcm_err(dpcm->substream->pcm,
> > + "snd_timer_open (%d,%d,%d) failed with %d",
> > + cable->snd_timer.id.card,
> > + cable->snd_timer.id.device,
> > + cable->snd_timer.id.subdevice,
> > + err);
> > + snd_timer_instance_free(timeri);
> > + return err;
> > + }
> > + spin_lock_irq(&cable->lock);
> > +
> > + cable->snd_timer.instance = timeri;
> > +
> > + /* initialise a tasklet used for draining */
> > + tasklet_init(&cable->snd_timer.event_tasklet,
> > + loopback_snd_timer_tasklet, (unsigned long)timeri);
>
> This has to be set before snd_timer_open(). The callback might be
> called immediately after snd_timer_open().
This tasklet is used/scheduled only in ccallback (not regular tick
callback),
and only for SNDRV_TIMER_EVENT_MSTOP event. Can this event really happen
immediately after snd_timer_open()?
Thanks!
Best regards,
Andrew
1
0

[alsa-devel] [PATCH v8 2/6] ASoC: amd: Refactoring of DAI from DMA driver
by Ravulapati Vishnu vardhan rao 20 Nov '19
by Ravulapati Vishnu vardhan rao 20 Nov '19
20 Nov '19
Asoc: PCM DMA driver should only have dma ops.
So Removed all DAI related functionality.Refactoring
the PCM DMA diver code.Added new file containing only DAI ops.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/Makefile | 2 +
sound/soc/amd/raven/acp3x-i2s.c | 266 +++++++++++++++++++++++++++++++
sound/soc/amd/raven/acp3x-pcm-dma.c | 305 +++++++-----------------------------
sound/soc/amd/raven/acp3x.h | 42 +++++
4 files changed, 369 insertions(+), 246 deletions(-)
create mode 100644 sound/soc/amd/raven/acp3x-i2s.c
diff --git a/sound/soc/amd/raven/Makefile b/sound/soc/amd/raven/Makefile
index 108d1ac..62c22b6 100644
--- a/sound/soc/amd/raven/Makefile
+++ b/sound/soc/amd/raven/Makefile
@@ -2,5 +2,7 @@
# Raven Ridge platform Support
snd-pci-acp3x-objs := pci-acp3x.o
snd-acp3x-pcm-dma-objs := acp3x-pcm-dma.o
+snd-acp3x-i2s-objs := acp3x-i2s.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-pci-acp3x.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-pcm-dma.o
+obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-i2s.o
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
new file mode 100644
index 0000000..390d07a
--- /dev/null
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -0,0 +1,266 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// AMD ALSA SoC PCM Driver
+//
+//Copyright 2016 Advanced Micro Devices, Inc.
+
+#include <linux/platform_device.h>
+#include <linux/module.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/pm_runtime.h>
+#include <sound/pcm.h>
+#include <sound/pcm_params.h>
+#include <sound/soc.h>
+#include <sound/soc-dai.h>
+#include <linux/dma-mapping.h>
+
+#include "acp3x.h"
+
+#define DRV_NAME "acp3x-i2s"
+
+static int acp3x_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
+{
+ struct i2s_dev_data *adata;
+
+ adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
+
+ case SND_SOC_DAIFMT_I2S:
+ adata->tdm_mode = false;
+ break;
+ case SND_SOC_DAIFMT_DSP_A:
+ adata->tdm_mode = true;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
+ u32 rx_mask, int slots, int slot_width)
+{
+ struct i2s_dev_data *adata;
+ u32 val;
+ u16 slot_len;
+
+ adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ /* These values are as per Hardware Spec */
+
+ switch (slot_width) {
+ case SLOT_WIDTH_8:
+ slot_len = 8;
+ break;
+ case SLOT_WIDTH_16:
+ slot_len = 16;
+ break;
+ case SLOT_WIDTH_24:
+ slot_len = 24;
+ break;
+ case SLOT_WIDTH_32:
+ slot_len = 0;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_IRER);
+
+ val = FRM_LEN | (slots << 15) | (slot_len << 18);
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+
+ adata->tdm_fmt = val;
+ return 0;
+}
+
+static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ struct snd_soc_dai *dai)
+{
+ struct i2s_stream_instance *rtd;
+ u32 val;
+ u32 reg_val;
+
+ rtd = substream->runtime->private_data;
+
+ switch (params_format(params)) {
+ case SNDRV_PCM_FORMAT_U8:
+ case SNDRV_PCM_FORMAT_S8:
+ rtd->xfer_resolution = 0x0;
+ break;
+ case SNDRV_PCM_FORMAT_S16_LE:
+ rtd->xfer_resolution = 0x02;
+ break;
+ case SNDRV_PCM_FORMAT_S24_LE:
+ rtd->xfer_resolution = 0x04;
+ break;
+ case SNDRV_PCM_FORMAT_S32_LE:
+ rtd->xfer_resolution = 0x05;
+ break;
+ default:
+ return -EINVAL;
+ }
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ reg_val = mmACP_BTTDM_ITER;
+ else
+ reg_val = mmACP_BTTDM_IRER;
+
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ return 0;
+}
+
+static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
+ int cmd, struct snd_soc_dai *dai)
+{
+ struct i2s_stream_instance *rtd;
+ u32 val, period_bytes;
+ int ret, reg_val;
+
+ rtd = substream->runtime->private_data;
+ period_bytes = frames_to_bytes(substream->runtime,
+ substream->runtime->period_size);
+ switch (cmd) {
+ case SNDRV_PCM_TRIGGER_START:
+ case SNDRV_PCM_TRIGGER_RESUME:
+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+ rtd->bytescount = acp_get_byte_count(rtd,
+ substream->stream);
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ reg_val = mmACP_BTTDM_ITER;
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_TX_INTR_WATERMARK_SIZE);
+ } else {
+ reg_val = mmACP_BTTDM_IRER;
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_RX_INTR_WATERMARK_SIZE);
+ }
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ case SNDRV_PCM_TRIGGER_STOP:
+ case SNDRV_PCM_TRIGGER_SUSPEND:
+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ reg_val = mmACP_BTTDM_ITER;
+ else
+ reg_val = mmACP_BTTDM_IRER;
+
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ default:
+ ret = -EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
+static struct snd_soc_dai_ops acp3x_i2s_dai_ops = {
+ .hw_params = acp3x_i2s_hwparams,
+ .trigger = acp3x_i2s_trigger,
+ .set_fmt = acp3x_i2s_set_fmt,
+ .set_tdm_slot = acp3x_i2s_set_tdm_slot,
+};
+
+static const struct snd_soc_component_driver acp3x_dai_component = {
+ .name = "acp3x-i2s",
+};
+
+static struct snd_soc_dai_driver acp3x_i2s_dai = {
+ .playback = {
+ .rates = SNDRV_PCM_RATE_8000_96000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 8,
+
+ .rate_min = 8000,
+ .rate_max = 96000,
+ },
+ .capture = {
+ .rates = SNDRV_PCM_RATE_8000_48000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 2,
+ .rate_min = 8000,
+ .rate_max = 48000,
+ },
+ .ops = &acp3x_i2s_dai_ops,
+};
+
+
+static int acp3x_dai_probe(struct platform_device *pdev)
+{
+ struct resource *res;
+ struct i2s_dev_data *adata;
+ int status;
+
+ adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data),
+ GFP_KERNEL);
+ if (!adata)
+ return -ENOMEM;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
+ return -ENOMEM;
+ }
+
+ adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
+ resource_size(res));
+ if (IS_ERR(adata->acp3x_base))
+ return PTR_ERR(adata->acp3x_base);
+
+ adata->i2s_irq = res->start;
+ dev_set_drvdata(&pdev->dev, adata);
+ status = devm_snd_soc_register_component(&pdev->dev,
+ &acp3x_dai_component, &acp3x_i2s_dai, 1);
+ if (status) {
+ dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ return -ENODEV;
+ }
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 5000);
+ pm_runtime_use_autosuspend(&pdev->dev);
+ pm_runtime_enable(&pdev->dev);
+ return 0;
+}
+
+static int acp3x_dai_remove(struct platform_device *pdev)
+{
+ pm_runtime_disable(&pdev->dev);
+ return 0;
+}
+static struct platform_driver acp3x_dai_driver = {
+ .probe = acp3x_dai_probe,
+ .remove = acp3x_dai_remove,
+ .driver = {
+ .name = "acp3x_i2s_playcap",
+ },
+};
+
+module_platform_driver(acp3x_dai_driver);
+
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
+MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:" DRV_NAME);
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 60709e3..0202737 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -18,24 +18,6 @@
#define DRV_NAME "acp3x-i2s-audio"
-struct i2s_dev_data {
- bool tdm_mode;
- unsigned int i2s_irq;
- u32 tdm_fmt;
- void __iomem *acp3x_base;
- struct snd_pcm_substream *play_stream;
- struct snd_pcm_substream *capture_stream;
-};
-
-struct i2s_stream_instance {
- u16 num_pages;
- u16 channels;
- u32 xfer_resolution;
- u64 bytescount;
- dma_addr_t dma_addr;
- void __iomem *acp3x_base;
-};
-
static const struct snd_pcm_hardware acp3x_pcm_hardware_playback = {
.info = SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -178,10 +160,11 @@ static int acp3x_deinit(void __iomem *acp3x_base)
static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
{
+ struct i2s_dev_data *rv_i2s_data;
u16 play_flag, cap_flag;
u32 val;
- struct i2s_dev_data *rv_i2s_data = dev_id;
+ rv_i2s_data = dev_id;
if (!rv_i2s_data)
return IRQ_NONE;
@@ -278,11 +261,18 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
static int acp3x_dma_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- int ret = 0;
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
- struct i2s_stream_instance *i2s_data = kzalloc(sizeof(struct i2s_stream_instance),
- GFP_KERNEL);
+ struct snd_pcm_runtime *runtime;
+ struct snd_soc_pcm_runtime *prtd;
+ struct i2s_dev_data *adata;
+ struct i2s_stream_instance *i2s_data;
+ int ret;
+
+ runtime = substream->runtime;
+ prtd = substream->private_data;
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
+ adata = dev_get_drvdata(component->dev);
+ i2s_data = kzalloc(sizeof(struct i2s_stream_instance),
+ GFP_KERNEL);
if (!i2s_data)
return -EINVAL;
@@ -312,33 +302,18 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return 0;
}
-static u64 acp_get_byte_count(struct i2s_stream_instance *rtd, int direction)
-{
- u64 byte_count;
-
- if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
- } else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
- }
- return byte_count;
-}
static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
+ struct snd_pcm_runtime *runtime;
+ struct i2s_stream_instance *rtd;
int status;
u64 size;
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct i2s_stream_instance *rtd = runtime->private_data;
+ runtime = substream->runtime;
+ rtd = substream->private_data;
if (!rtd)
return -EINVAL;
@@ -362,12 +337,12 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- u32 pos = 0;
- u32 buffersize = 0;
- u64 bytescount = 0;
- struct i2s_stream_instance *rtd =
- substream->runtime->private_data;
+ struct i2s_stream_instance *rtd;
+ u32 pos;
+ u32 buffersize;
+ u64 bytescount;
+ rtd = substream->runtime->private_data;
buffersize = frames_to_bytes(substream->runtime,
substream->runtime->buffer_size);
bytescount = acp_get_byte_count(rtd, substream->stream);
@@ -380,7 +355,10 @@ static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
static int acp3x_dma_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd)
{
- struct device *parent = component->dev->parent;
+ struct device *parent;
+
+ component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+ parent = component->dev->parent;
snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_DEV,
parent, MIN_BUFFER, MAX_BUFFER);
return 0;
@@ -402,8 +380,12 @@ static int acp3x_dma_mmap(struct snd_soc_component *component,
static int acp3x_dma_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
- struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
+ struct snd_soc_pcm_runtime *prtd;
+ struct i2s_dev_data *adata;
+
+ prtd = substream->private_data;
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
+ adata = dev_get_drvdata(component->dev);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
adata->play_stream = NULL;
@@ -415,186 +397,9 @@ static int acp3x_dma_close(struct snd_soc_component *component,
*/
if (!adata->play_stream && !adata->capture_stream)
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
- kfree(rtd);
- return 0;
-}
-
-static int acp3x_dai_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
-{
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
- case SND_SOC_DAIFMT_I2S:
- adata->tdm_mode = false;
- break;
- case SND_SOC_DAIFMT_DSP_A:
- adata->tdm_mode = true;
- break;
- default:
- return -EINVAL;
- }
-
- return 0;
-}
-
-static int acp3x_dai_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
- u32 rx_mask, int slots, int slot_width)
-{
- u32 val = 0;
- u16 slot_len;
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (slot_width) {
- case SLOT_WIDTH_8:
- slot_len = 8;
- break;
- case SLOT_WIDTH_16:
- slot_len = 16;
- break;
- case SLOT_WIDTH_24:
- slot_len = 24;
- break;
- case SLOT_WIDTH_32:
- slot_len = 0;
- break;
- default:
- return -EINVAL;
- }
-
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
-
- val = (FRM_LEN | (slots << 15) | (slot_len << 18));
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
-
- adata->tdm_fmt = val;
return 0;
}
-static int acp3x_dai_i2s_hwparams(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *params,
- struct snd_soc_dai *dai)
-{
- u32 val = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
-
- switch (params_format(params)) {
- case SNDRV_PCM_FORMAT_U8:
- case SNDRV_PCM_FORMAT_S8:
- rtd->xfer_resolution = 0x0;
- break;
- case SNDRV_PCM_FORMAT_S16_LE:
- rtd->xfer_resolution = 0x02;
- break;
- case SNDRV_PCM_FORMAT_S24_LE:
- rtd->xfer_resolution = 0x04;
- break;
- case SNDRV_PCM_FORMAT_S32_LE:
- rtd->xfer_resolution = 0x05;
- break;
- default:
- return -EINVAL;
- }
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | (rtd->xfer_resolution << 3);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- else
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
-
- return 0;
-}
-
-static int acp3x_dai_i2s_trigger(struct snd_pcm_substream *substream,
- int cmd, struct snd_soc_dai *dai)
-{
- int ret = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
- u32 val, period_bytes;
-
- period_bytes = frames_to_bytes(substream->runtime,
- substream->runtime->period_size);
- switch (cmd) {
- case SNDRV_PCM_TRIGGER_START:
- case SNDRV_PCM_TRIGGER_RESUME:
- case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
- rtd->bytescount = acp_get_byte_count(rtd, substream->stream);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_TX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_RX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- case SNDRV_PCM_TRIGGER_STOP:
- case SNDRV_PCM_TRIGGER_SUSPEND:
- case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- default:
- ret = -EINVAL;
- break;
- }
-
- return ret;
-}
-
-static struct snd_soc_dai_ops acp3x_dai_i2s_ops = {
- .hw_params = acp3x_dai_i2s_hwparams,
- .trigger = acp3x_dai_i2s_trigger,
- .set_fmt = acp3x_dai_i2s_set_fmt,
- .set_tdm_slot = acp3x_dai_set_tdm_slot,
-};
-
-static struct snd_soc_dai_driver acp3x_i2s_dai_driver = {
- .playback = {
- .rates = SNDRV_PCM_RATE_8000_96000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 8,
-
- .rate_min = 8000,
- .rate_max = 96000,
- },
- .capture = {
- .rates = SNDRV_PCM_RATE_8000_48000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 2,
- .rate_min = 8000,
- .rate_max = 48000,
- },
- .ops = &acp3x_dai_i2s_ops,
-};
-
static const struct snd_soc_component_driver acp3x_i2s_component = {
.name = DRV_NAME,
.open = acp3x_dma_open,
@@ -609,10 +414,10 @@ static const struct snd_soc_component_driver acp3x_i2s_component = {
static int acp3x_audio_probe(struct platform_device *pdev)
{
- int status;
struct resource *res;
struct i2s_dev_data *adata;
unsigned int irqflags;
+ int status, ret;
if (!pdev->dev.platform_data) {
dev_err(&pdev->dev, "platform_data not retrieved\n");
@@ -622,7 +427,7 @@ static int acp3x_audio_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
- dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
+ dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
return -ENODEV;
}
@@ -632,60 +437,64 @@ static int acp3x_audio_probe(struct platform_device *pdev)
adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
+ if (!adata->acp3x_base)
+ return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res) {
dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
- return -ENODEV;
+ return -ENOMEM;
}
adata->i2s_irq = res->start;
- adata->play_stream = NULL;
- adata->capture_stream = NULL;
dev_set_drvdata(&pdev->dev, adata);
/* Initialize ACP */
status = acp3x_init(adata->acp3x_base);
if (status)
return -ENODEV;
+
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
- &acp3x_i2s_dai_driver, 1);
+ NULL, 0);
if (status) {
- dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ dev_err(&pdev->dev, "Fail to register acp i2s component\n");
+ ret = -ENODEV;
goto dev_err;
}
status = devm_request_irq(&pdev->dev, adata->i2s_irq, i2s_irq_handler,
irqflags, "ACP3x_I2S_IRQ", adata);
if (status) {
dev_err(&pdev->dev, "ACP3x I2S IRQ request failed\n");
+ ret = -ENODEV;
goto dev_err;
}
- pm_runtime_set_autosuspend_delay(&pdev->dev, 10000);
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 5000);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_enable(&pdev->dev);
return 0;
+
dev_err:
status = acp3x_deinit(adata->acp3x_base);
if (status)
dev_err(&pdev->dev, "ACP de-init failed\n");
else
- dev_info(&pdev->dev, "ACP de-initialized\n");
- /*ignore device status and return driver probe error*/
- return -ENODEV;
+ dev_dbg(&pdev->dev, "ACP de-initialized\n");
+ return ret;
}
static int acp3x_audio_remove(struct platform_device *pdev)
{
+ struct i2s_dev_data *adata;
int ret;
- struct i2s_dev_data *adata = dev_get_drvdata(&pdev->dev);
+ adata = dev_get_drvdata(&pdev->dev);
ret = acp3x_deinit(adata->acp3x_base);
if (ret)
dev_err(&pdev->dev, "ACP de-init failed\n");
else
- dev_info(&pdev->dev, "ACP de-initialized\n");
+ dev_dbg(&pdev->dev, "ACP de-initialized\n");
pm_runtime_disable(&pdev->dev);
return 0;
@@ -693,10 +502,11 @@ static int acp3x_audio_remove(struct platform_device *pdev)
static int acp3x_resume(struct device *dev)
{
+ struct i2s_dev_data *adata;
int status;
u32 val;
- struct i2s_dev_data *adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_init(adata->acp3x_base);
if (status)
return -ENODEV;
@@ -738,14 +548,15 @@ static int acp3x_resume(struct device *dev)
static int acp3x_pcm_runtime_suspend(struct device *dev)
{
+ struct i2s_dev_data *adata;
int status;
- struct i2s_dev_data *adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_deinit(adata->acp3x_base);
if (status)
dev_err(dev, "ACP de-init failed\n");
else
- dev_info(dev, "ACP de-initialized\n");
+ dev_dbg(dev, "ACP de-initialized\n");
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
@@ -754,8 +565,9 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
static int acp3x_pcm_runtime_resume(struct device *dev)
{
+ struct i2s_dev_data *adata;
int status;
- struct i2s_dev_data *adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_init(adata->acp3x_base);
if (status)
@@ -774,13 +586,14 @@ static struct platform_driver acp3x_dma_driver = {
.probe = acp3x_audio_probe,
.remove = acp3x_audio_remove,
.driver = {
- .name = "acp3x_rv_i2s",
+ .name = "acp3x_rv_i2s_dma",
.pm = &acp3x_pm_ops,
},
};
module_platform_driver(acp3x_dma_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_AUTHOR("Vijendar.Mukunda(a)amd.com");
MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 2f15fe1..72c1a23 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -51,6 +51,29 @@
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+struct acp3x_platform_info {
+ u16 play_i2s_instance;
+ u16 cap_i2s_instance;
+ u16 capture_channel;
+};
+
+struct i2s_dev_data {
+ bool tdm_mode;
+ unsigned int i2s_irq;
+ u32 tdm_fmt;
+ void __iomem *acp3x_base;
+ struct snd_pcm_substream *play_stream;
+ struct snd_pcm_substream *capture_stream;
+};
+
+struct i2s_stream_instance {
+ u16 num_pages;
+ u16 channels;
+ u32 xfer_resolution;
+ u64 bytescount;
+ dma_addr_t dma_addr;
+ void __iomem *acp3x_base;
+};
static inline u32 rv_readl(void __iomem *base_addr)
{
@@ -61,3 +84,22 @@ static inline void rv_writel(u32 val, void __iomem *base_addr)
{
writel(val, base_addr - ACP3x_PHY_BASE_ADDRESS);
}
+
+static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
+ int direction)
+{
+ u64 byte_count;
+
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ } else {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ }
+ return byte_count;
+}
--
2.7.4
3
3

[alsa-devel] [PATCH v3 0/7] ALSA: aloop: Support sound timer as clock source instead of jiffies
by Andrew Gabbasov 20 Nov '19
by Andrew Gabbasov 20 Nov '19
20 Nov '19
This patch set is an updated version of patches by Timo Wischer:
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-March/146871.html
This patch set is required for forwarding audio data between a HW sound
card and an aloop device without the usage of an asynchronous sample rate
converter.
Most of sound and timers related code is kept the same as in previous set.
The code, related to snd_pcm_link() functionality and its using for
timer source setting, is removed (as rejected earlier). The changes in this
update are mainly related to the parameters handling and some cleanup.
The timer source can be initially selected by "timer_source" kernel module
parameter. It is supposed to have the following format:
[<pref>:](<card name>|<card idx>)[{.,}<dev idx>[{.,}<subdev idx>]]
For example: "hw:I82801AAICH.1.0", or "1.1", or just "I82801AAICH".
(Prefix is ignored, just allowed here to be able to use the strings,
the user got used to).
Although the parsing function recognizes both '.' and ',' as a separator,
module parameters handling routines use ',' to separate parameters for
different module instances (array elements), so we have to use '.'
to separate device and subdevice numbers from the card name or number
in module parameters.
Empty string indicates using jiffies as a timer source.
Besides "static" selection of timer source at module load time,
it is possible to dynamically change it via sound "info" interface
(using "/proc/asound/<card>/timer_source" file in read-write mode.
The contents of this file is used as a timer source string for
a particular loopback card, e.g. "hw:0,0,0" (and here ',' can be used
as a separator).
The timer source string value can be changed at any time, but it is
latched by PCM substream open callback "loopback_open()" (the first
one for a particular cable). At this point it is actually used,
that is the string is parsed, and the timer is looked up and opened.
This seems to be a good trade-off between flexibility of updates and
synchronizations or racing complexity.
The timer source is set for a loopback card (the same as initial setting
by module parameter), but every cable uses the value, current at the moment
of opening. Theoretically, it's possible to set the timer source for each
cable independently (via separate files), but it would be inconsistent
with the initial setting via module parameters on a per-card basis.
v2:
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-November/157961.…
v3:
- Change sound card lookup to use snd_card_ref() and avoid direct access
to sound cards array
- Squash commits on returning error codes for timer start and stop
- Some locking related fixes
- Some code cleanup
Andrew Gabbasov (1):
ALSA: aloop: Support runtime change of snd_timer via info interface
Timo Wischer (6):
ALSA: aloop: Describe units of variables
ALSA: aloop: Support return of error code for timer start and stop
ALSA: aloop: Use callback functions for timer specific implementations
ALSA: aloop: Rename all jiffies timer specific functions
ALSA: aloop: Move CABLE_VALID_BOTH to the top of file
ALSA: aloop: Support selection of snd_timer instead of jiffies
sound/drivers/aloop.c | 672 +++++++++++++++++++++++++++++++++++++++---
1 file changed, 637 insertions(+), 35 deletions(-)
--
2.21.0
2
9

[alsa-devel] [PATCH v4 0/7] ALSA: aloop: Support sound timer as clock source instead of jiffies
by Andrew Gabbasov 20 Nov '19
by Andrew Gabbasov 20 Nov '19
20 Nov '19
This patch set is an updated version of patches by Timo Wischer:
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-March/146871.html
This patch set is required for forwarding audio data between a HW sound
card and an aloop device without the usage of an asynchronous sample rate
converter.
Most of sound and timers related code is kept the same as in previous set.
The code, related to snd_pcm_link() functionality and its using for
timer source setting, is removed (as rejected earlier). The changes in this
update are mainly related to the parameters handling and some cleanup.
The timer source can be initially selected by "timer_source" kernel module
parameter. It is supposed to have the following format:
[<pref>:](<card name>|<card idx>)[{.,}<dev idx>[{.,}<subdev idx>]]
For example: "hw:I82801AAICH.1.0", or "1.1", or just "I82801AAICH".
(Prefix is ignored, just allowed here to be able to use the strings,
the user got used to).
Although the parsing function recognizes both '.' and ',' as a separator,
module parameters handling routines use ',' to separate parameters for
different module instances (array elements), so we have to use '.'
to separate device and subdevice numbers from the card name or number
in module parameters.
Empty string indicates using jiffies as a timer source.
Besides "static" selection of timer source at module load time,
it is possible to dynamically change it via sound "info" interface
(using "/proc/asound/<card>/timer_source" file in read-write mode.
The contents of this file is used as a timer source string for
a particular loopback card, e.g. "hw:0,0,0" (and here ',' can be used
as a separator).
The timer source string value can be changed at any time, but it is
latched by PCM substream open callback "loopback_open()" (the first
one for a particular cable). At this point it is actually used,
that is the string is parsed, and the timer is looked up and opened.
This seems to be a good trade-off between flexibility of updates and
synchronizations or racing complexity.
The timer source is set for a loopback card (the same as initial setting
by module parameter), but every cable uses the value, current at the moment
of opening. Theoretically, it's possible to set the timer source for each
cable independently (via separate files), but it would be inconsistent
with the initial setting via module parameters on a per-card basis.
v2:
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-November/157961.…
v3:
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-November/158312.…
- Change sound card lookup to use snd_card_ref() and avoid direct access
to sound cards array
- Squash commits on returning error codes for timer start and stop
- Some locking related fixes
- Some code cleanup
v4:
- Change to use updated API for snd_timer_open() (separate timer instance)
- Change to use snd_timer_close() returning void
- Some code cleanup
Andrew Gabbasov (1):
ALSA: aloop: Support runtime change of snd_timer via info interface
Timo Wischer (6):
ALSA: aloop: Describe units of variables
ALSA: aloop: Support return of error code for timer start and stop
ALSA: aloop: Use callback functions for timer specific implementations
ALSA: aloop: Rename all jiffies timer specific functions
ALSA: aloop: Move CABLE_VALID_BOTH to the top of file
ALSA: aloop: Support selection of snd_timer instead of jiffies
sound/drivers/aloop.c | 663 +++++++++++++++++++++++++++++++++++++++---
1 file changed, 628 insertions(+), 35 deletions(-)
--
2.21.0
1
7

[alsa-devel] [PATCH] ALSA: hda - Add mute led support for HP ProBook 645 G4
by Kai-Heng Feng 20 Nov '19
by Kai-Heng Feng 20 Nov '19
20 Nov '19
Mic mute led does not work on HP ProBook 645 G4.
We can use CXT_FIXUP_MUTE_LED_GPIO fixup to support it.
Signed-off-by: Kai-Heng Feng <kai.heng.feng(a)canonical.com>
---
sound/pci/hda/patch_conexant.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 968d3caab6ac..90aa0f400a57 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -910,6 +910,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
SND_PCI_QUIRK(0x103c, 0x837f, "HP ProBook 470 G5", CXT_FIXUP_MUTE_LED_GPIO),
SND_PCI_QUIRK(0x103c, 0x8299, "HP 800 G3 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x103c, 0x829a, "HP 800 G3 DM", CXT_FIXUP_HP_MIC_NO_PRESENCE),
+ SND_PCI_QUIRK(0x103c, 0x8402, "HP ProBook 645 G4", CXT_FIXUP_MUTE_LED_GPIO),
SND_PCI_QUIRK(0x103c, 0x8455, "HP Z2 G4", CXT_FIXUP_HP_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x103c, 0x8456, "HP Z2 G4 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x103c, 0x8457, "HP Z2 G4 mini", CXT_FIXUP_HP_MIC_NO_PRESENCE),
--
2.17.1
2
1

19 Nov '19
The Scarlett 6i6 has no padding on rear inputs 3/4 but a gainstage.
This patch introduces this functionality as to be seen in the mac
or windows scarlett control.
The correct address could already be found in the dump info,
but was never used.
Cheers ... Jens
Signed-off-by: Jens Verwiebe <info(a)jensverwiebe.de>
diff --git a/sound/usb/mixer_scarlett.c b/sound/usb/mixer_scarlett.c
index 7438e7c..f3bdac3 100644
--- a/sound/usb/mixer_scarlett.c
+++ b/sound/usb/mixer_scarlett.c
@@ -152,6 +152,7 @@ enum {
SCARLETT_OUTPUTS,
SCARLETT_SWITCH_IMPEDANCE,
SCARLETT_SWITCH_PAD,
+ SCARLETT_SWITCH_GAIN,
};
enum {
@@ -202,6 +203,15 @@ struct scarlett_device_info {
}
};
+static const struct scarlett_mixer_elem_enum_info opt_gain = {
+ .start = 0,
+ .len = 2,
+ .offsets = {},
+ .names = (char const * const []){
+ "Lo", "Hi"
+ }
+};
+
static const struct scarlett_mixer_elem_enum_info opt_impedance = {
.start = 0,
.len = 2,
@@ -664,8 +674,8 @@ static int add_output_ctls(struct
usb_mixer_interface *mixer,
{ .num = 1, .type = SCARLETT_SWITCH_PAD, .name = NULL},
{ .num = 2, .type = SCARLETT_SWITCH_IMPEDANCE, .name = NULL},
{ .num = 2, .type = SCARLETT_SWITCH_PAD, .name = NULL},
- { .num = 3, .type = SCARLETT_SWITCH_PAD, .name = NULL},
- { .num = 4, .type = SCARLETT_SWITCH_PAD, .name = NULL},
+ { .num = 3, .type = SCARLETT_SWITCH_GAIN, .name = NULL},
+ { .num = 4, .type = SCARLETT_SWITCH_GAIN, .name = NULL},
},
.matrix_mux_init = {
@@ -895,6 +905,15 @@ static int scarlett_controls_create_generic(struct
usb_mixer_interface *mixer,
if (err < 0)
return err;
break;
+ case SCARLETT_SWITCH_GAIN:
+ sprintf(mx, "Input %d Gain Switch", ctl->num);
+ err = add_new_ctl(mixer, &usb_scarlett_ctl_enum,
+ scarlett_ctl_enum_resume, 0x01,
+ 0x08, ctl->num, USB_MIXER_S16, 1, mx,
+ &opt_gain, &elem);
+ if (err < 0)
+ return err;
+ break;
}
}
--
Jens Verwiebe
Allerskehre 44 - 22309 Hamburg
Tel.: +49 40 68 78 50
mobile: +49 172 400 49 07
mailto: info(a)jensverwiebe.de
web: http://www.jensverwiebe.de
2
7

[alsa-devel] [RESEND PATCH v9 6/6] ASoC: amd: Added ACP3x system resume and runtime pm
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
When system wide suspend happens, ACP will be powered off
and when system resumes,for audio usecase to continue,all
the runtime configuration data needs to be programmed again.
Added resume pm call back to ACP pm ops and also added runtime
PM operations for ACP3x PCM platform device.
Device will enter into D3 state when there is no activity
on audio I2S lines.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 144 +--------------------------
sound/soc/amd/raven/acp3x.h | 7 ++
sound/soc/amd/raven/pci-acp3x.c | 188 +++++++++++++++++++++++++++++++++++-
3 files changed, 195 insertions(+), 144 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 819ec3a..cae1a0f 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -58,106 +58,6 @@ static const struct snd_pcm_hardware acp3x_pcm_hardware_capture = {
.periods_max = CAPTURE_MAX_NUM_PERIODS,
};
-static int acp3x_power_on(void __iomem *acp3x_base, bool on)
-{
- u16 val, mask;
- u32 timeout;
-
- if (on == true) {
- val = 1;
- mask = ACP3x_POWER_ON;
- } else {
- val = 0;
- mask = ACP3x_POWER_OFF;
- }
-
- rv_writel(val, acp3x_base + mmACP_PGFSM_CONTROL);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
- if ((val & ACP3x_POWER_OFF_IN_PROGRESS) == mask)
- break;
- if (timeout > 100) {
- pr_err("ACP3x power state change failure\n");
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_reset(void __iomem *acp3x_base)
-{
- u32 val, timeout;
-
- rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
- timeout > 100) {
- if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
-
- rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if (!val || timeout > 100) {
- if (!val)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_init(void __iomem *acp3x_base)
-{
- int ret;
-
- /* power on */
- ret = acp3x_power_on(acp3x_base, true);
- if (ret) {
- pr_err("ACP3x power on failed\n");
- return ret;
- }
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- return 0;
-}
-
-static int acp3x_deinit(void __iomem *acp3x_base)
-{
- int ret;
-
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- /* power off */
- ret = acp3x_power_on(acp3x_base, false);
- if (ret) {
- pr_err("ACP3x power off failed\n");
- return ret;
- }
- return 0;
-}
-
static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
{
struct i2s_dev_data *rv_i2s_data;
@@ -535,53 +435,28 @@ static int acp3x_audio_probe(struct platform_device *pdev)
adata->i2s_irq = res->start;
dev_set_drvdata(&pdev->dev, adata);
- /* Initialize ACP */
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
-
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
NULL, 0);
if (status) {
dev_err(&pdev->dev, "Fail to register acp i2s component\n");
- ret = -ENODEV;
- goto dev_err;
+ return -ENODEV;
}
status = devm_request_irq(&pdev->dev, adata->i2s_irq, i2s_irq_handler,
irqflags, "ACP3x_I2S_IRQ", adata);
if (status) {
dev_err(&pdev->dev, "ACP3x I2S IRQ request failed\n");
- ret = -ENODEV;
- goto dev_err;
+ return -ENODEV;
}
pm_runtime_set_autosuspend_delay(&pdev->dev, 5000);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_enable(&pdev->dev);
return 0;
-
-dev_err:
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_dbg(&pdev->dev, "ACP de-initialized\n");
- return ret;
}
static int acp3x_audio_remove(struct platform_device *pdev)
{
- struct i2s_dev_data *adata;
- int ret;
-
- adata = dev_get_drvdata(&pdev->dev);
- ret = acp3x_deinit(adata->acp3x_base);
- if (ret)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_dbg(&pdev->dev, "ACP de-initialized\n");
-
pm_runtime_disable(&pdev->dev);
return 0;
}
@@ -589,13 +464,9 @@ static int acp3x_audio_remove(struct platform_device *pdev)
static int acp3x_resume(struct device *dev)
{
struct i2s_dev_data *adata;
- int status;
u32 val;
adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
if (adata->play_stream && adata->play_stream->runtime) {
struct i2s_stream_instance *rtd =
@@ -642,14 +513,8 @@ static int acp3x_resume(struct device *dev)
static int acp3x_pcm_runtime_suspend(struct device *dev)
{
struct i2s_dev_data *adata;
- int status;
adata = dev_get_drvdata(dev);
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(dev, "ACP de-init failed\n");
- else
- dev_dbg(dev, "ACP de-initialized\n");
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
@@ -659,12 +524,9 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
static int acp3x_pcm_runtime_resume(struct device *dev)
{
struct i2s_dev_data *adata;
- int status;
adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
+
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 01b283a..cf16ceb 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -65,6 +65,13 @@
#define SLOT_WIDTH_16 0x10
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+#define ACP_PGFSM_CNTL_POWER_ON_MASK 0x01
+#define ACP_PGFSM_CNTL_POWER_OFF_MASK 0x00
+#define ACP_PGFSM_STATUS_MASK 0x03
+#define ACP_POWERED_ON 0x00
+#define ACP_POWER_ON_IN_PROGRESS 0x01
+#define ACP_POWERED_OFF 0x02
+#define ACP_POWER_OFF_IN_PROGRESS 0x03
struct acp3x_platform_info {
u16 play_i2s_instance;
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index 94f5f21..defbc44 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -9,6 +9,9 @@
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
+#include <linux/pm_runtime.h>
+#include <linux/delay.h>
+#include <sound/pcm.h>
#include "acp3x.h"
@@ -19,6 +22,125 @@ struct acp3x_dev_data {
struct platform_device *pdev[ACP3x_DEVS];
};
+static int acp3x_power_on(void __iomem *acp3x_base)
+{
+ u32 val;
+ u32 timeout;
+
+ timeout = 0;
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+
+ if (val == 0)
+ return val;
+
+ if (!((val & ACP_PGFSM_STATUS_MASK) ==
+ ACP_POWER_ON_IN_PROGRESS))
+ rv_writel(ACP_PGFSM_CNTL_POWER_ON_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ while (++timeout) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if (!val)
+ break;
+ udelay(1);
+ if (timeout > 500) {
+ pr_err("ACP is Not Powered ON\n");
+ return -ETIMEDOUT;
+ }
+ }
+ return 0;
+}
+
+static int acp3x_power_off(void __iomem *acp3x_base)
+{
+ u32 val;
+ u32 timeout, ret;
+
+ timeout = 0;
+ rv_writel(ACP_PGFSM_CNTL_POWER_OFF_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ while (++timeout) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if ((val & ACP_PGFSM_STATUS_MASK) == ACP_POWERED_OFF) {
+ ret = 0;
+ break;
+ }
+ udelay(1);
+ if (timeout > 500) {
+ pr_err("ACP is Not Powered OFF\n");
+ ret = -ETIMEDOUT;
+ break;
+ }
+ }
+ return ret;
+}
+
+static int acp3x_reset(void __iomem *acp3x_base)
+{
+ u32 val, timeout;
+
+ rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
+ timeout > 100) {
+ if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
+ break;
+ return -ENODEV;
+ }
+ cpu_relax();
+ }
+ rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if (!val)
+ break;
+ if (timeout > 100)
+ return -ENODEV;
+ cpu_relax();
+ }
+ return 0;
+}
+
+static int acp3x_init(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* power on */
+ ret = acp3x_power_on(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power on failed\n");
+ return ret;
+ }
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ return 0;
+}
+
+static int acp3x_deinit(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ /* power off */
+ ret = acp3x_power_off(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power off failed\n");
+ return ret;
+ }
+ return 0;
+}
+
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
@@ -64,6 +186,9 @@ static int snd_acp3x_probe(struct pci_dev *pci,
}
pci_set_master(pci);
pci_set_drvdata(pci, adata);
+ ret = acp3x_init(adata->acp3x_base);
+ if (ret)
+ goto disable_msi;
val = rv_readl(adata->acp3x_base + mmACP_I2S_PIN_CONFIG);
switch (val) {
@@ -73,7 +198,7 @@ static int snd_acp3x_probe(struct pci_dev *pci,
GFP_KERNEL);
if (!adata->res) {
ret = -ENOMEM;
- goto disable_msi;
+ goto de_init;
}
adata->res[0].name = "acp3x_i2s_iomem";
@@ -134,12 +259,23 @@ static int snd_acp3x_probe(struct pci_dev *pci,
ret = -ENODEV;
goto disable_msi;
}
+ pm_runtime_set_autosuspend_delay(&pci->dev, 5000);
+ pm_runtime_use_autosuspend(&pci->dev);
+ pm_runtime_set_active(&pci->dev);
+ pm_runtime_put_noidle(&pci->dev);
+ pm_runtime_enable(&pci->dev);
return 0;
unregister_devs:
if (val == I2S_MODE)
for (i = 0 ; i < ACP3x_DEVS ; i++)
platform_device_unregister(adata->pdev[i]);
+de_init:
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_dbg(&pci->dev, "ACP de-initialized\n");
disable_msi:
pci_disable_msi(pci);
release_regions:
@@ -150,15 +286,58 @@ static int snd_acp3x_probe(struct pci_dev *pci,
return ret;
}
+static int snd_acp3x_suspend(struct device *dev)
+{
+ int status;
+ struct acp3x_dev_data *adata;
+
+ adata = dev_get_drvdata(dev);
+ status = acp3x_deinit(adata->acp3x_base);
+ if (status)
+ dev_err(dev, "ACP de-init failed\n");
+ else
+ dev_dbg(dev, "ACP de-initialized\n");
+
+ return 0;
+}
+
+static int snd_acp3x_resume(struct device *dev)
+{
+ int status;
+ struct acp3x_dev_data *adata;
+
+ adata = dev_get_drvdata(dev);
+ status = acp3x_init(adata->acp3x_base);
+ if (status) {
+ dev_err(dev, "ACP init failed\n");
+ return status;
+ }
+ return 0;
+}
+
+static const struct dev_pm_ops acp3x_pm = {
+ .runtime_suspend = snd_acp3x_suspend,
+ .runtime_resume = snd_acp3x_resume,
+ .resume = snd_acp3x_resume,
+};
+
static void snd_acp3x_remove(struct pci_dev *pci)
{
- struct acp3x_dev_data *adata = pci_get_drvdata(pci);
- int i;
+ struct acp3x_dev_data *adata;
+ int i, ret;
+ adata = pci_get_drvdata(pci);
if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
for (i = 0 ; i < ACP3x_DEVS ; i++)
platform_device_unregister(adata->pdev[i]);
}
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_dbg(&pci->dev, "ACP de-initialized\n");
+ pm_runtime_disable(&pci->dev);
+ pm_runtime_get_noresume(&pci->dev);
pci_disable_msi(pci);
pci_release_regions(pci);
pci_disable_device(pci);
@@ -177,6 +356,9 @@ static struct pci_driver acp3x_driver = {
.id_table = snd_acp3x_ids,
.probe = snd_acp3x_probe,
.remove = snd_acp3x_remove,
+ .driver = {
+ .pm = &acp3x_pm,
+ }
};
module_pci_driver(acp3x_driver);
--
2.7.4
4
6

[alsa-devel] [PATCH v10 6/6] ASoC: amd: Added ACP3x system resume and runtime pm
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
When system wide suspend happens, ACP will be powered off
and when system resumes,for audio usecase to continue,all
the runtime configuration data needs to be programmed again.
Added resume pm call back to ACP pm ops and also added runtime
PM operations for ACP3x PCM platform device.
Device will enter into D3 state when there is no activity
on audio I2S lines.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 144 +-----------------------------
sound/soc/amd/raven/acp3x.h | 7 ++
sound/soc/amd/raven/pci-acp3x.c | 173 ++++++++++++++++++++++++++++++++++--
3 files changed, 177 insertions(+), 147 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 819ec3a..cae1a0f 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -58,106 +58,6 @@ static const struct snd_pcm_hardware acp3x_pcm_hardware_capture = {
.periods_max = CAPTURE_MAX_NUM_PERIODS,
};
-static int acp3x_power_on(void __iomem *acp3x_base, bool on)
-{
- u16 val, mask;
- u32 timeout;
-
- if (on == true) {
- val = 1;
- mask = ACP3x_POWER_ON;
- } else {
- val = 0;
- mask = ACP3x_POWER_OFF;
- }
-
- rv_writel(val, acp3x_base + mmACP_PGFSM_CONTROL);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
- if ((val & ACP3x_POWER_OFF_IN_PROGRESS) == mask)
- break;
- if (timeout > 100) {
- pr_err("ACP3x power state change failure\n");
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_reset(void __iomem *acp3x_base)
-{
- u32 val, timeout;
-
- rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
- timeout > 100) {
- if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
-
- rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if (!val || timeout > 100) {
- if (!val)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_init(void __iomem *acp3x_base)
-{
- int ret;
-
- /* power on */
- ret = acp3x_power_on(acp3x_base, true);
- if (ret) {
- pr_err("ACP3x power on failed\n");
- return ret;
- }
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- return 0;
-}
-
-static int acp3x_deinit(void __iomem *acp3x_base)
-{
- int ret;
-
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- /* power off */
- ret = acp3x_power_on(acp3x_base, false);
- if (ret) {
- pr_err("ACP3x power off failed\n");
- return ret;
- }
- return 0;
-}
-
static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
{
struct i2s_dev_data *rv_i2s_data;
@@ -535,53 +435,28 @@ static int acp3x_audio_probe(struct platform_device *pdev)
adata->i2s_irq = res->start;
dev_set_drvdata(&pdev->dev, adata);
- /* Initialize ACP */
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
-
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
NULL, 0);
if (status) {
dev_err(&pdev->dev, "Fail to register acp i2s component\n");
- ret = -ENODEV;
- goto dev_err;
+ return -ENODEV;
}
status = devm_request_irq(&pdev->dev, adata->i2s_irq, i2s_irq_handler,
irqflags, "ACP3x_I2S_IRQ", adata);
if (status) {
dev_err(&pdev->dev, "ACP3x I2S IRQ request failed\n");
- ret = -ENODEV;
- goto dev_err;
+ return -ENODEV;
}
pm_runtime_set_autosuspend_delay(&pdev->dev, 5000);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_enable(&pdev->dev);
return 0;
-
-dev_err:
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_dbg(&pdev->dev, "ACP de-initialized\n");
- return ret;
}
static int acp3x_audio_remove(struct platform_device *pdev)
{
- struct i2s_dev_data *adata;
- int ret;
-
- adata = dev_get_drvdata(&pdev->dev);
- ret = acp3x_deinit(adata->acp3x_base);
- if (ret)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_dbg(&pdev->dev, "ACP de-initialized\n");
-
pm_runtime_disable(&pdev->dev);
return 0;
}
@@ -589,13 +464,9 @@ static int acp3x_audio_remove(struct platform_device *pdev)
static int acp3x_resume(struct device *dev)
{
struct i2s_dev_data *adata;
- int status;
u32 val;
adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
if (adata->play_stream && adata->play_stream->runtime) {
struct i2s_stream_instance *rtd =
@@ -642,14 +513,8 @@ static int acp3x_resume(struct device *dev)
static int acp3x_pcm_runtime_suspend(struct device *dev)
{
struct i2s_dev_data *adata;
- int status;
adata = dev_get_drvdata(dev);
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(dev, "ACP de-init failed\n");
- else
- dev_dbg(dev, "ACP de-initialized\n");
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
@@ -659,12 +524,9 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
static int acp3x_pcm_runtime_resume(struct device *dev)
{
struct i2s_dev_data *adata;
- int status;
adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
+
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 01b283a..cf16ceb 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -65,6 +65,13 @@
#define SLOT_WIDTH_16 0x10
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+#define ACP_PGFSM_CNTL_POWER_ON_MASK 0x01
+#define ACP_PGFSM_CNTL_POWER_OFF_MASK 0x00
+#define ACP_PGFSM_STATUS_MASK 0x03
+#define ACP_POWERED_ON 0x00
+#define ACP_POWER_ON_IN_PROGRESS 0x01
+#define ACP_POWERED_OFF 0x02
+#define ACP_POWER_OFF_IN_PROGRESS 0x03
struct acp3x_platform_info {
u16 play_i2s_instance;
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index 94f5f21..d46a6d6 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -9,6 +9,9 @@
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
+#include <linux/pm_runtime.h>
+#include <linux/delay.h>
+#include <sound/pcm.h>
#include "acp3x.h"
@@ -19,6 +22,109 @@ struct acp3x_dev_data {
struct platform_device *pdev[ACP3x_DEVS];
};
+static int acp3x_power_on(void __iomem *acp3x_base)
+{
+ u32 val;
+ int timeout;
+
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+
+ if (val == 0)
+ return val;
+
+ if (!((val & ACP_PGFSM_STATUS_MASK) ==
+ ACP_POWER_ON_IN_PROGRESS))
+ rv_writel(ACP_PGFSM_CNTL_POWER_ON_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ timeout = 0;
+ while (++timeout < 500) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if (!val)
+ return 0;
+ udelay(1);
+ }
+ return -ETIMEDOUT;
+}
+
+static int acp3x_power_off(void __iomem *acp3x_base)
+{
+ u32 val;
+ int timeout;
+
+ rv_writel(ACP_PGFSM_CNTL_POWER_OFF_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ timeout = 0;
+ while (++timeout < 500) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if ((val & ACP_PGFSM_STATUS_MASK) == ACP_POWERED_OFF)
+ return 0;
+ udelay(1);
+ }
+ return -ETIMEDOUT;
+}
+
+static int acp3x_reset(void __iomem *acp3x_base)
+{
+ u32 val;
+ int timeout;
+
+ rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout < 500) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
+ return 0;
+ cpu_relax();
+ }
+ rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout < 500) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if (!val)
+ return 0;
+ cpu_relax();
+ }
+ return -ETIMEDOUT;
+}
+
+static int acp3x_init(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* power on */
+ ret = acp3x_power_on(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power on failed\n");
+ return ret;
+ }
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ return 0;
+}
+
+static int acp3x_deinit(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ /* power off */
+ ret = acp3x_power_off(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power off failed\n");
+ return ret;
+ }
+ return 0;
+}
+
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
@@ -64,6 +170,9 @@ static int snd_acp3x_probe(struct pci_dev *pci,
}
pci_set_master(pci);
pci_set_drvdata(pci, adata);
+ ret = acp3x_init(adata->acp3x_base);
+ if (ret)
+ goto disable_msi;
val = rv_readl(adata->acp3x_base + mmACP_I2S_PIN_CONFIG);
switch (val) {
@@ -73,7 +182,7 @@ static int snd_acp3x_probe(struct pci_dev *pci,
GFP_KERNEL);
if (!adata->res) {
ret = -ENOMEM;
- goto disable_msi;
+ goto de_init;
}
adata->res[0].name = "acp3x_i2s_iomem";
@@ -118,7 +227,7 @@ static int snd_acp3x_probe(struct pci_dev *pci,
pdevinfo[2].parent = &pci->dev;
pdevinfo[2].num_res = 1;
pdevinfo[2].res = &adata->res[2];
- for (i = 0; i < ACP3x_DEVS ; i++) {
+ for (i = 0; i < ACP3x_DEVS; i++) {
adata->pdev[i] =
platform_device_register_full(&pdevinfo[i]);
if (IS_ERR(adata->pdev[i])) {
@@ -134,12 +243,20 @@ static int snd_acp3x_probe(struct pci_dev *pci,
ret = -ENODEV;
goto disable_msi;
}
+ pm_runtime_set_autosuspend_delay(&pci->dev, 5000);
+ pm_runtime_use_autosuspend(&pci->dev);
+ pm_runtime_set_active(&pci->dev);
+ pm_runtime_put_noidle(&pci->dev);
+ pm_runtime_enable(&pci->dev);
return 0;
unregister_devs:
if (val == I2S_MODE)
- for (i = 0 ; i < ACP3x_DEVS ; i++)
+ for (i = 0; i < ACP3x_DEVS; i++)
platform_device_unregister(adata->pdev[i]);
+de_init:
+ if (acp3x_deinit(adata->acp3x_base))
+ dev_err(&pci->dev, "ACP de-init failed\n");
disable_msi:
pci_disable_msi(pci);
release_regions:
@@ -150,15 +267,56 @@ static int snd_acp3x_probe(struct pci_dev *pci,
return ret;
}
+static int snd_acp3x_suspend(struct device *dev)
+{
+ int ret;
+ struct acp3x_dev_data *adata;
+
+ adata = dev_get_drvdata(dev);
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(dev, "ACP de-init failed\n");
+ else
+ dev_dbg(dev, "ACP de-initialized\n");
+
+ return 0;
+}
+
+static int snd_acp3x_resume(struct device *dev)
+{
+ int ret;
+ struct acp3x_dev_data *adata;
+
+ adata = dev_get_drvdata(dev);
+ ret = acp3x_init(adata->acp3x_base);
+ if (ret) {
+ dev_err(dev, "ACP init failed\n");
+ return ret;
+ }
+ return 0;
+}
+
+static const struct dev_pm_ops acp3x_pm = {
+ .runtime_suspend = snd_acp3x_suspend,
+ .runtime_resume = snd_acp3x_resume,
+ .resume = snd_acp3x_resume,
+};
+
static void snd_acp3x_remove(struct pci_dev *pci)
{
- struct acp3x_dev_data *adata = pci_get_drvdata(pci);
- int i;
+ struct acp3x_dev_data *adata;
+ int i, ret;
+ adata = pci_get_drvdata(pci);
if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
- for (i = 0 ; i < ACP3x_DEVS ; i++)
+ for (i = 0; i < ACP3x_DEVS; i++)
platform_device_unregister(adata->pdev[i]);
}
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ pm_runtime_disable(&pci->dev);
+ pm_runtime_get_noresume(&pci->dev);
pci_disable_msi(pci);
pci_release_regions(pci);
pci_disable_device(pci);
@@ -177,6 +335,9 @@ static struct pci_driver acp3x_driver = {
.id_table = snd_acp3x_ids,
.probe = snd_acp3x_probe,
.remove = snd_acp3x_remove,
+ .driver = {
+ .pm = &acp3x_pm,
+ }
};
module_pci_driver(acp3x_driver);
--
2.7.4
2
1

[alsa-devel] [PATCH v10 1/6] ASoC: amd:Create multiple I2S platform device endpoint
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
Creates Platform Device endpoints for multiple
I2S instances: SP and BT endpoints device.
Pass PCI resources like MMIO, irq to the platform devices.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x.h | 5 +++
sound/soc/amd/raven/pci-acp3x.c | 95 +++++++++++++++++++++++++++--------------
2 files changed, 68 insertions(+), 32 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 4f2cadd..2f15fe1 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,10 +7,15 @@
#include "chip_offset_byte.h"
+#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
#define ACP3x_REG_START 0x1240000
#define ACP3x_REG_END 0x1250200
+#define ACP3x_I2STDM_REG_START 0x1242400
+#define ACP3x_I2STDM_REG_END 0x1242410
+#define ACP3x_BT_TDM_REG_START 0x1242800
+#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index facec24..94f5f21 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -16,17 +16,17 @@ struct acp3x_dev_data {
void __iomem *acp3x_base;
bool acp3x_audio_mode;
struct resource *res;
- struct platform_device *pdev;
+ struct platform_device *pdev[ACP3x_DEVS];
};
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
- int ret;
- u32 addr, val;
struct acp3x_dev_data *adata;
- struct platform_device_info pdevinfo;
+ struct platform_device_info pdevinfo[ACP3x_DEVS];
unsigned int irqflags;
+ int ret, i;
+ u32 addr, val;
if (pci_enable_device(pci)) {
dev_err(&pci->dev, "pci_enable_device failed\n");
@@ -56,10 +56,11 @@ static int snd_acp3x_probe(struct pci_dev *pci,
irqflags = 0;
addr = pci_resource_start(pci, 0);
- adata->acp3x_base = ioremap(addr, pci_resource_len(pci, 0));
+ adata->acp3x_base = devm_ioremap(&pci->dev, addr,
+ pci_resource_len(pci, 0));
if (!adata->acp3x_base) {
ret = -ENOMEM;
- goto release_regions;
+ goto disable_msi;
}
pci_set_master(pci);
pci_set_drvdata(pci, adata);
@@ -68,11 +69,11 @@ static int snd_acp3x_probe(struct pci_dev *pci,
switch (val) {
case I2S_MODE:
adata->res = devm_kzalloc(&pci->dev,
- sizeof(struct resource) * 2,
+ sizeof(struct resource) * 4,
GFP_KERNEL);
if (!adata->res) {
ret = -ENOMEM;
- goto unmap_mmio;
+ goto disable_msi;
}
adata->res[0].name = "acp3x_i2s_iomem";
@@ -80,40 +81,67 @@ static int snd_acp3x_probe(struct pci_dev *pci,
adata->res[0].start = addr;
adata->res[0].end = addr + (ACP3x_REG_END - ACP3x_REG_START);
- adata->res[1].name = "acp3x_i2s_irq";
- adata->res[1].flags = IORESOURCE_IRQ;
- adata->res[1].start = pci->irq;
- adata->res[1].end = pci->irq;
+ adata->res[1].name = "acp3x_i2s_sp";
+ adata->res[1].flags = IORESOURCE_MEM;
+ adata->res[1].start = addr + ACP3x_I2STDM_REG_START;
+ adata->res[1].end = addr + ACP3x_I2STDM_REG_END;
+
+ adata->res[2].name = "acp3x_i2s_bt";
+ adata->res[2].flags = IORESOURCE_MEM;
+ adata->res[2].start = addr + ACP3x_BT_TDM_REG_START;
+ adata->res[2].end = addr + ACP3x_BT_TDM_REG_END;
+
+ adata->res[3].name = "acp3x_i2s_irq";
+ adata->res[3].flags = IORESOURCE_IRQ;
+ adata->res[3].start = pci->irq;
+ adata->res[3].end = adata->res[3].start;
adata->acp3x_audio_mode = ACP3x_I2S_MODE;
memset(&pdevinfo, 0, sizeof(pdevinfo));
- pdevinfo.name = "acp3x_rv_i2s";
- pdevinfo.id = 0;
- pdevinfo.parent = &pci->dev;
- pdevinfo.num_res = 2;
- pdevinfo.res = adata->res;
- pdevinfo.data = &irqflags;
- pdevinfo.size_data = sizeof(irqflags);
-
- adata->pdev = platform_device_register_full(&pdevinfo);
- if (IS_ERR(adata->pdev)) {
- dev_err(&pci->dev, "cannot register %s device\n",
- pdevinfo.name);
- ret = PTR_ERR(adata->pdev);
- goto unmap_mmio;
+ pdevinfo[0].name = "acp3x_rv_i2s_dma";
+ pdevinfo[0].id = 0;
+ pdevinfo[0].parent = &pci->dev;
+ pdevinfo[0].num_res = 4;
+ pdevinfo[0].res = &adata->res[0];
+ pdevinfo[0].data = &irqflags;
+ pdevinfo[0].size_data = sizeof(irqflags);
+
+ pdevinfo[1].name = "acp3x_i2s_playcap";
+ pdevinfo[1].id = 0;
+ pdevinfo[1].parent = &pci->dev;
+ pdevinfo[1].num_res = 1;
+ pdevinfo[1].res = &adata->res[1];
+
+ pdevinfo[2].name = "acp3x_i2s_playcap";
+ pdevinfo[2].id = 1;
+ pdevinfo[2].parent = &pci->dev;
+ pdevinfo[2].num_res = 1;
+ pdevinfo[2].res = &adata->res[2];
+ for (i = 0; i < ACP3x_DEVS ; i++) {
+ adata->pdev[i] =
+ platform_device_register_full(&pdevinfo[i]);
+ if (IS_ERR(adata->pdev[i])) {
+ dev_err(&pci->dev, "cannot register %s device\n",
+ pdevinfo[i].name);
+ ret = PTR_ERR(adata->pdev[i]);
+ goto unregister_devs;
+ }
}
break;
default:
dev_err(&pci->dev, "Invalid ACP audio mode : %d\n", val);
ret = -ENODEV;
- goto unmap_mmio;
+ goto disable_msi;
}
return 0;
-unmap_mmio:
+unregister_devs:
+ if (val == I2S_MODE)
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+disable_msi:
pci_disable_msi(pci);
- iounmap(adata->acp3x_base);
release_regions:
pci_release_regions(pci);
disable_pci:
@@ -125,10 +153,12 @@ static int snd_acp3x_probe(struct pci_dev *pci,
static void snd_acp3x_remove(struct pci_dev *pci)
{
struct acp3x_dev_data *adata = pci_get_drvdata(pci);
+ int i;
- platform_device_unregister(adata->pdev);
- iounmap(adata->acp3x_base);
-
+ if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+ }
pci_disable_msi(pci);
pci_release_regions(pci);
pci_disable_device(pci);
@@ -151,6 +181,7 @@ static struct pci_driver acp3x_driver = {
module_pci_driver(acp3x_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_DESCRIPTION("AMD ACP3x PCI driver");
MODULE_LICENSE("GPL v2");
--
2.7.4
2
1

[alsa-devel] [PATCH v10 5/6] ASoC: amd: Handle ACP3x I2S-SP Interrupts.
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
Enabled support for I2S-SP interrupt handling.
Previous to this implementation, driver supports only interrupts
on BT instance.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 4fd3fc8..819ec3a 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -177,6 +177,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->play_stream);
play_flag = 1;
}
+ if ((val & BIT(I2S_TX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_play_stream) {
+ rv_writel(BIT(I2S_TX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_play_stream);
+ play_flag = 1;
+ }
if ((val & BIT(BT_RX_THRESHOLD)) && rv_i2s_data->capture_stream) {
rv_writel(BIT(BT_RX_THRESHOLD), rv_i2s_data->acp3x_base +
@@ -184,6 +191,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->capture_stream);
cap_flag = 1;
}
+ if ((val & BIT(I2S_RX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_capture_stream) {
+ rv_writel(BIT(I2S_RX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_capture_stream);
+ cap_flag = 1;
+ }
if (play_flag | cap_flag)
return IRQ_HANDLED;
--
2.7.4
1
0

[alsa-devel] [PATCH v10 4/6] ASoC: amd: add ACP3x TDM mode support
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
ACP3x I2S (CPU DAI) can act in normal I2S and TDM modes. Added support
for TDM mode. Desired mode can be selected from ASoC machine driver.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 42 +++++++++++++++++++++++++++++++----------
sound/soc/amd/raven/acp3x.h | 2 ++
2 files changed, 34 insertions(+), 10 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index b039dac..d7aa345 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -44,8 +44,8 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
u32 rx_mask, int slots, int slot_width)
{
struct i2s_dev_data *adata;
- u32 val;
u16 slot_len;
+ u32 val, flen, reg_val, frmt_reg;
adata = snd_soc_dai_get_drvdata(cpu_dai);
@@ -68,16 +68,38 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
return -EINVAL;
}
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_IRER);
-
- val = FRM_LEN | (slots << 15) | (slot_len << 18);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+ /* Enable I2S / BT channels TDM and respective
+ * I2S/BT`s TX/RX Formats frame lengths.
+ */
+ flen = FRM_LEN | (slots << 15) | (slot_len << 18);
- adata->tdm_fmt = val;
+ if (adata->substream_type == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ frmt_reg = mmACP_BTTDM_TXFRMT;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ frmt_reg = mmACP_I2STDM_TXFRMT;
+ }
+ } else {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ frmt_reg = mmACP_BTTDM_RXFRMT;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ frmt_reg = mmACP_I2STDM_RXFRMT;
+ }
+ }
+ val = rv_readl(adata->acp3x_base + reg_val);
+ rv_writel(val | 0x2, adata->acp3x_base + reg_val);
+ rv_writel(flen, adata->acp3x_base + frmt_reg);
+ adata->tdm_fmt = flen;
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index c071477..01b283a 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -76,6 +76,8 @@ struct i2s_dev_data {
bool tdm_mode;
unsigned int i2s_irq;
u32 tdm_fmt;
+ u16 i2s_instance;
+ u32 substream_type;
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
--
2.7.4
1
0

[alsa-devel] [PATCH v10 3/6] ASoC: amd: Enabling I2S instance in DMA and DAI
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
This patch adds I2S SP support in ACP PCM DMA and DAI.
Added I2S support in DMA and DAI probe,its hw_params handling
its open and close functionalities.
This enable to open and close on the SP instance for
playback and capture.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 119 ++++++++++++++++++----
sound/soc/amd/raven/acp3x-pcm-dma.c | 193 +++++++++++++++++++++++++-----------
sound/soc/amd/raven/acp3x.h | 74 +++++++++++---
3 files changed, 294 insertions(+), 92 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index 390d07a..b039dac 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -86,10 +86,22 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct i2s_stream_instance *rtd;
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
u32 val;
u32 reg_val;
+ prtd = substream->private_data;
rtd = substream->runtime->private_data;
+ card = prtd->card;
+ pinfo = snd_soc_card_get_drvdata(card);
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_U8:
@@ -108,11 +120,25 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
default:
return -EINVAL;
}
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- reg_val = mmACP_BTTDM_ITER;
- else
- reg_val = mmACP_BTTDM_IRER;
-
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ }
+ }
val = rv_readl(rtd->acp3x_base + reg_val);
val = val | (rtd->xfer_resolution << 3);
rv_writel(val, rtd->acp3x_base + reg_val);
@@ -123,10 +149,21 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{
struct i2s_stream_instance *rtd;
- u32 val, period_bytes;
- int ret, reg_val;
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
+ u32 ret, val, period_bytes, reg_val, ier_val, water_val;
+ prtd = substream->private_data;
rtd = substream->runtime->private_data;
+ card = prtd->card;
+ pinfo = snd_soc_card_get_drvdata(card);
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
period_bytes = frames_to_bytes(substream->runtime,
substream->runtime->period_size);
switch (cmd) {
@@ -136,31 +173,75 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
rtd->bytescount = acp_get_byte_count(rtd,
substream->stream);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- reg_val = mmACP_BTTDM_ITER;
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_TX_INTR_WATERMARK_SIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ water_val =
+ mmACP_BT_TX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_BTTDM_ITER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ water_val =
+ mmACP_I2S_TX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_I2STDM_ITER;
+ ier_val = mmACP_I2STDM_IER;
+ }
} else {
- reg_val = mmACP_BTTDM_IRER;
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_RX_INTR_WATERMARK_SIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ water_val =
+ mmACP_BT_RX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_BTTDM_IRER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ water_val =
+ mmACP_I2S_RX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_I2STDM_IRER;
+ ier_val = mmACP_I2STDM_IER;
+ }
}
+ rv_writel(period_bytes, rtd->acp3x_base + water_val);
val = rv_readl(rtd->acp3x_base + reg_val);
val = val | BIT(0);
rv_writel(val, rtd->acp3x_base + reg_val);
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
+ rv_writel(1, rtd->acp3x_base + ier_val);
+ ret = 0;
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- reg_val = mmACP_BTTDM_ITER;
- else
- reg_val = mmACP_BTTDM_IRER;
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ ier_val = mmACP_I2STDM_IER;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ ier_val = mmACP_I2STDM_IER;
+ }
+ }
val = rv_readl(rtd->acp3x_base + reg_val);
val = val & ~BIT(0);
rv_writel(val, rtd->acp3x_base + reg_val);
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
+ rv_writel(0, rtd->acp3x_base + ier_val);
+ ret = 0;
break;
default:
ret = -EINVAL;
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 0202737..4fd3fc8 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -194,20 +194,36 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
{
u16 page_idx;
- u32 low, high, val, acp_fifo_addr;
- dma_addr_t addr = rtd->dma_addr;
+ uint64_t low, high, val, acp_fifo_addr;
+ uint64_t reg_ringbuf_size, reg_dma_size, reg_fifo_size, reg_fifo_addr;
+ dma_addr_t addr;
- /* 8 scratch registers used to map one 64 bit address */
- if (direction == SNDRV_PCM_STREAM_PLAYBACK)
- val = 0;
- else
- val = rtd->num_pages * 8;
+ addr = rtd->dma_addr;
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_PB_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_PB_PTE_OFFSET;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_CP_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_CP_PTE_OFFSET;
+ }
+ }
/* Group Enable */
rv_writel(ACP_SRAM_PTE_OFFSET | BIT(31), rtd->acp3x_base +
- mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
+ mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
rv_writel(PAGE_SIZE_4K_ENABLE, rtd->acp3x_base +
- mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
+ mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
for (page_idx = 0; page_idx < rtd->num_pages; page_idx++) {
/* Load the low address of page int ACP SRAM through SRBM */
@@ -224,38 +240,61 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
}
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_TX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET + (rtd->num_pages * 8)
- + PLAYBACK_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_TX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_TX_FIFOSIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_ringbuf_size = mmACP_BT_TX_RINGBUFSIZE;
+ reg_dma_size = mmACP_BT_TX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_PB_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_BT_TX_FIFOADDR;
+ reg_fifo_size = mmACP_BT_TX_FIFOSIZE;
+ rv_writel(I2S_BT_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_TX_RINGBUFADDR);
+ break;
+
+ case I2S_SP_INSTANCE:
+ default:
+ reg_ringbuf_size = mmACP_I2S_TX_RINGBUFSIZE;
+ reg_dma_size = mmACP_I2S_TX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_PB_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_I2S_TX_FIFOADDR;
+ reg_fifo_size = mmACP_I2S_TX_FIFOSIZE;
+ rv_writel(I2S_SP_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_TX_RINGBUFADDR);
+ }
} else {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START + MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_RX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
- (rtd->num_pages * 8) + CAPTURE_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_RX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_RX_FIFOSIZE);
- }
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_ringbuf_size = mmACP_BT_RX_RINGBUFSIZE;
+ reg_dma_size = mmACP_BT_RX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_CAPT_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_BT_RX_FIFOADDR;
+ reg_fifo_size = mmACP_BT_RX_FIFOSIZE;
+ rv_writel(I2S_BT_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_RX_RINGBUFADDR);
+ break;
- /* Enable watermark/period interrupt to host */
- rv_writel(BIT(BT_TX_THRESHOLD) | BIT(BT_RX_THRESHOLD),
- rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
+ case I2S_SP_INSTANCE:
+ default:
+ reg_ringbuf_size = mmACP_I2S_RX_RINGBUFSIZE;
+ reg_dma_size = mmACP_I2S_RX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_CAPT_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_I2S_RX_FIFOADDR;
+ reg_fifo_size = mmACP_I2S_RX_FIFOSIZE;
+ rv_writel(I2S_SP_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_RX_RINGBUFADDR);
+ }
+ }
+ rv_writel(MAX_BUFFER, rtd->acp3x_base + reg_ringbuf_size);
+ rv_writel(DMA_SIZE, rtd->acp3x_base + reg_dma_size);
+ rv_writel(acp_fifo_addr, rtd->acp3x_base + reg_fifo_addr);
+ rv_writel(FIFO_SIZE, rtd->acp3x_base + reg_fifo_size);
+ rv_writel(BIT(I2S_RX_THRESHOLD) | BIT(BT_RX_THRESHOLD)
+ | BIT(I2S_TX_THRESHOLD) | BIT(BT_TX_THRESHOLD),
+ rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
}
static int acp3x_dma_open(struct snd_soc_component *component,
@@ -289,17 +328,21 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return ret;
}
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = substream;
- else
+ adata->i2ssp_play_stream = substream;
+ } else {
adata->capture_stream = substream;
+ adata->i2ssp_capture_stream = substream;
+ }
i2s_data->acp3x_base = adata->acp3x_base;
runtime->private_data = i2s_data;
- return 0;
+ return ret;
}
@@ -307,16 +350,28 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
- struct snd_pcm_runtime *runtime;
struct i2s_stream_instance *rtd;
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
int status;
u64 size;
- runtime = substream->runtime;
- rtd = substream->private_data;
+ prtd = substream->private_data;
+ card = prtd->card;
+ pinfo = snd_soc_card_get_drvdata(card);
+ rtd = substream->runtime->private_data;
if (!rtd)
return -EINVAL;
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ } else
+ pr_err("pinfo failed\n");
+
size = params_buffer_bytes(params);
status = snd_pcm_lib_malloc_pages(substream, size);
if (status < 0)
@@ -337,12 +392,25 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
struct i2s_stream_instance *rtd;
u32 pos;
u32 buffersize;
u64 bytescount;
+ prtd = substream->private_data;
+ card = prtd->card;
rtd = substream->runtime->private_data;
+ pinfo = snd_soc_card_get_drvdata(card);
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
+
buffersize = frames_to_bytes(substream->runtime,
substream->runtime->buffer_size);
bytescount = acp_get_byte_count(rtd, substream->stream);
@@ -387,15 +455,19 @@ static int acp3x_dma_close(struct snd_soc_component *component,
component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
adata = dev_get_drvdata(component->dev);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = NULL;
- else
+ adata->i2ssp_play_stream = NULL;
+ } else {
adata->capture_stream = NULL;
+ adata->i2ssp_capture_stream = NULL;
+ }
/* Disable ACP irq, when the current stream is being closed and
* another stream is also not active.
*/
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ !adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
}
@@ -516,13 +588,16 @@ static int acp3x_resume(struct device *dev)
adata->play_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_PLAYBACK);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_ITER);
+ rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_TXFRMT);
+ mmACP_BTTDM_TXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_ITER);
+ mmACP_BTTDM_ITER);
}
}
@@ -531,13 +606,17 @@ static int acp3x_resume(struct device *dev)
adata->capture_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_CAPTURE);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_IRER);
+ rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
+
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_RXFRMT);
+ mmACP_BTTDM_RXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_IRER);
+ mmACP_BTTDM_IRER);
}
}
@@ -550,8 +629,8 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
{
struct i2s_dev_data *adata;
int status;
- adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_deinit(adata->acp3x_base);
if (status)
dev_err(dev, "ACP de-init failed\n");
@@ -567,8 +646,8 @@ static int acp3x_pcm_runtime_resume(struct device *dev)
{
struct i2s_dev_data *adata;
int status;
- adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_init(adata->acp3x_base);
if (status)
return -ENODEV;
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 72c1a23..c071477 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,6 +7,9 @@
#include "chip_offset_byte.h"
+#define I2S_SP_INSTANCE 0x01
+#define I2S_BT_INSTANCE 0x02
+
#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
@@ -17,8 +20,11 @@
#define ACP3x_BT_TDM_REG_START 0x1242800
#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
+#define I2S_RX_THRESHOLD 27
+#define I2S_TX_THRESHOLD 28
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
+#define ACP_ERR_INTR_MASK 29
#define ACP3x_POWER_ON 0x00
#define ACP3x_POWER_ON_IN_PROGRESS 0x01
#define ACP3x_POWER_OFF 0x02
@@ -26,19 +32,28 @@
#define ACP3x_SOFT_RESET__SoftResetAudDone_MASK 0x00010001
#define ACP_SRAM_PTE_OFFSET 0x02050000
+#define ACP_SRAM_SP_PB_PTE_OFFSET 0x0
+#define ACP_SRAM_SP_CP_PTE_OFFSET 0x100
+#define ACP_SRAM_BT_PB_PTE_OFFSET 0x200
+#define ACP_SRAM_BT_CP_PTE_OFFSET 0x300
#define PAGE_SIZE_4K_ENABLE 0x2
-#define MEM_WINDOW_START 0x4000000
-#define PLAYBACK_FIFO_ADDR_OFFSET 0x400
-#define CAPTURE_FIFO_ADDR_OFFSET 0x500
+#define I2S_SP_TX_MEM_WINDOW_START 0x4000000
+#define I2S_SP_RX_MEM_WINDOW_START 0x4020000
+#define I2S_BT_TX_MEM_WINDOW_START 0x4040000
+#define I2S_BT_RX_MEM_WINDOW_START 0x4060000
+#define SP_PB_FIFO_ADDR_OFFSET 0x500
+#define SP_CAPT_FIFO_ADDR_OFFSET 0x700
+#define BT_PB_FIFO_ADDR_OFFSET 0x900
+#define BT_CAPT_FIFO_ADDR_OFFSET 0xB00
#define PLAYBACK_MIN_NUM_PERIODS 2
#define PLAYBACK_MAX_NUM_PERIODS 8
-#define PLAYBACK_MAX_PERIOD_SIZE 16384
-#define PLAYBACK_MIN_PERIOD_SIZE 4096
+#define PLAYBACK_MAX_PERIOD_SIZE 8192
+#define PLAYBACK_MIN_PERIOD_SIZE 1024
#define CAPTURE_MIN_NUM_PERIODS 2
#define CAPTURE_MAX_NUM_PERIODS 8
-#define CAPTURE_MAX_PERIOD_SIZE 16384
-#define CAPTURE_MIN_PERIOD_SIZE 4096
+#define CAPTURE_MAX_PERIOD_SIZE 8192
+#define CAPTURE_MIN_PERIOD_SIZE 1024
#define MAX_BUFFER (PLAYBACK_MAX_PERIOD_SIZE * PLAYBACK_MAX_NUM_PERIODS)
#define MIN_BUFFER MAX_BUFFER
@@ -64,14 +79,20 @@ struct i2s_dev_data {
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
+ struct snd_pcm_substream *i2ssp_play_stream;
+ struct snd_pcm_substream *i2ssp_capture_stream;
};
struct i2s_stream_instance {
u16 num_pages;
+ u16 i2s_instance;
+ u16 capture_channel;
+ u16 direction;
u16 channels;
u32 xfer_resolution;
- u64 bytescount;
+ u32 val;
dma_addr_t dma_addr;
+ u64 bytescount;
void __iomem *acp3x_base;
};
@@ -91,15 +112,36 @@ static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
u64 byte_count;
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_LOW);
+ }
+
} else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_LOW);
+ }
}
return byte_count;
}
--
2.7.4
1
0

[alsa-devel] [PATCH v10 2/6] ASoC: amd: Refactoring of DAI from DMA driver
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
ASoC: PCM DMA driver should only have dma ops.
So Removed all DAI related functionality.Refactoring
the PCM DMA diver code.Added new file containing only DAI ops
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/Makefile | 2 +
sound/soc/amd/raven/acp3x-i2s.c | 266 +++++++++++++++++++++++++++++++
sound/soc/amd/raven/acp3x-pcm-dma.c | 305 +++++++-----------------------------
sound/soc/amd/raven/acp3x.h | 42 +++++
4 files changed, 369 insertions(+), 246 deletions(-)
create mode 100644 sound/soc/amd/raven/acp3x-i2s.c
diff --git a/sound/soc/amd/raven/Makefile b/sound/soc/amd/raven/Makefile
index 108d1ac..62c22b6 100644
--- a/sound/soc/amd/raven/Makefile
+++ b/sound/soc/amd/raven/Makefile
@@ -2,5 +2,7 @@
# Raven Ridge platform Support
snd-pci-acp3x-objs := pci-acp3x.o
snd-acp3x-pcm-dma-objs := acp3x-pcm-dma.o
+snd-acp3x-i2s-objs := acp3x-i2s.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-pci-acp3x.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-pcm-dma.o
+obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-i2s.o
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
new file mode 100644
index 0000000..390d07a
--- /dev/null
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -0,0 +1,266 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// AMD ALSA SoC PCM Driver
+//
+//Copyright 2016 Advanced Micro Devices, Inc.
+
+#include <linux/platform_device.h>
+#include <linux/module.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/pm_runtime.h>
+#include <sound/pcm.h>
+#include <sound/pcm_params.h>
+#include <sound/soc.h>
+#include <sound/soc-dai.h>
+#include <linux/dma-mapping.h>
+
+#include "acp3x.h"
+
+#define DRV_NAME "acp3x-i2s"
+
+static int acp3x_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
+{
+ struct i2s_dev_data *adata;
+
+ adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
+
+ case SND_SOC_DAIFMT_I2S:
+ adata->tdm_mode = false;
+ break;
+ case SND_SOC_DAIFMT_DSP_A:
+ adata->tdm_mode = true;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
+ u32 rx_mask, int slots, int slot_width)
+{
+ struct i2s_dev_data *adata;
+ u32 val;
+ u16 slot_len;
+
+ adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ /* These values are as per Hardware Spec */
+
+ switch (slot_width) {
+ case SLOT_WIDTH_8:
+ slot_len = 8;
+ break;
+ case SLOT_WIDTH_16:
+ slot_len = 16;
+ break;
+ case SLOT_WIDTH_24:
+ slot_len = 24;
+ break;
+ case SLOT_WIDTH_32:
+ slot_len = 0;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_IRER);
+
+ val = FRM_LEN | (slots << 15) | (slot_len << 18);
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+
+ adata->tdm_fmt = val;
+ return 0;
+}
+
+static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ struct snd_soc_dai *dai)
+{
+ struct i2s_stream_instance *rtd;
+ u32 val;
+ u32 reg_val;
+
+ rtd = substream->runtime->private_data;
+
+ switch (params_format(params)) {
+ case SNDRV_PCM_FORMAT_U8:
+ case SNDRV_PCM_FORMAT_S8:
+ rtd->xfer_resolution = 0x0;
+ break;
+ case SNDRV_PCM_FORMAT_S16_LE:
+ rtd->xfer_resolution = 0x02;
+ break;
+ case SNDRV_PCM_FORMAT_S24_LE:
+ rtd->xfer_resolution = 0x04;
+ break;
+ case SNDRV_PCM_FORMAT_S32_LE:
+ rtd->xfer_resolution = 0x05;
+ break;
+ default:
+ return -EINVAL;
+ }
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ reg_val = mmACP_BTTDM_ITER;
+ else
+ reg_val = mmACP_BTTDM_IRER;
+
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ return 0;
+}
+
+static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
+ int cmd, struct snd_soc_dai *dai)
+{
+ struct i2s_stream_instance *rtd;
+ u32 val, period_bytes;
+ int ret, reg_val;
+
+ rtd = substream->runtime->private_data;
+ period_bytes = frames_to_bytes(substream->runtime,
+ substream->runtime->period_size);
+ switch (cmd) {
+ case SNDRV_PCM_TRIGGER_START:
+ case SNDRV_PCM_TRIGGER_RESUME:
+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+ rtd->bytescount = acp_get_byte_count(rtd,
+ substream->stream);
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ reg_val = mmACP_BTTDM_ITER;
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_TX_INTR_WATERMARK_SIZE);
+ } else {
+ reg_val = mmACP_BTTDM_IRER;
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_RX_INTR_WATERMARK_SIZE);
+ }
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ case SNDRV_PCM_TRIGGER_STOP:
+ case SNDRV_PCM_TRIGGER_SUSPEND:
+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ reg_val = mmACP_BTTDM_ITER;
+ else
+ reg_val = mmACP_BTTDM_IRER;
+
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ default:
+ ret = -EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
+static struct snd_soc_dai_ops acp3x_i2s_dai_ops = {
+ .hw_params = acp3x_i2s_hwparams,
+ .trigger = acp3x_i2s_trigger,
+ .set_fmt = acp3x_i2s_set_fmt,
+ .set_tdm_slot = acp3x_i2s_set_tdm_slot,
+};
+
+static const struct snd_soc_component_driver acp3x_dai_component = {
+ .name = "acp3x-i2s",
+};
+
+static struct snd_soc_dai_driver acp3x_i2s_dai = {
+ .playback = {
+ .rates = SNDRV_PCM_RATE_8000_96000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 8,
+
+ .rate_min = 8000,
+ .rate_max = 96000,
+ },
+ .capture = {
+ .rates = SNDRV_PCM_RATE_8000_48000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 2,
+ .rate_min = 8000,
+ .rate_max = 48000,
+ },
+ .ops = &acp3x_i2s_dai_ops,
+};
+
+
+static int acp3x_dai_probe(struct platform_device *pdev)
+{
+ struct resource *res;
+ struct i2s_dev_data *adata;
+ int status;
+
+ adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data),
+ GFP_KERNEL);
+ if (!adata)
+ return -ENOMEM;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
+ return -ENOMEM;
+ }
+
+ adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
+ resource_size(res));
+ if (IS_ERR(adata->acp3x_base))
+ return PTR_ERR(adata->acp3x_base);
+
+ adata->i2s_irq = res->start;
+ dev_set_drvdata(&pdev->dev, adata);
+ status = devm_snd_soc_register_component(&pdev->dev,
+ &acp3x_dai_component, &acp3x_i2s_dai, 1);
+ if (status) {
+ dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ return -ENODEV;
+ }
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 5000);
+ pm_runtime_use_autosuspend(&pdev->dev);
+ pm_runtime_enable(&pdev->dev);
+ return 0;
+}
+
+static int acp3x_dai_remove(struct platform_device *pdev)
+{
+ pm_runtime_disable(&pdev->dev);
+ return 0;
+}
+static struct platform_driver acp3x_dai_driver = {
+ .probe = acp3x_dai_probe,
+ .remove = acp3x_dai_remove,
+ .driver = {
+ .name = "acp3x_i2s_playcap",
+ },
+};
+
+module_platform_driver(acp3x_dai_driver);
+
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
+MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:" DRV_NAME);
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 60709e3..0202737 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -18,24 +18,6 @@
#define DRV_NAME "acp3x-i2s-audio"
-struct i2s_dev_data {
- bool tdm_mode;
- unsigned int i2s_irq;
- u32 tdm_fmt;
- void __iomem *acp3x_base;
- struct snd_pcm_substream *play_stream;
- struct snd_pcm_substream *capture_stream;
-};
-
-struct i2s_stream_instance {
- u16 num_pages;
- u16 channels;
- u32 xfer_resolution;
- u64 bytescount;
- dma_addr_t dma_addr;
- void __iomem *acp3x_base;
-};
-
static const struct snd_pcm_hardware acp3x_pcm_hardware_playback = {
.info = SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -178,10 +160,11 @@ static int acp3x_deinit(void __iomem *acp3x_base)
static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
{
+ struct i2s_dev_data *rv_i2s_data;
u16 play_flag, cap_flag;
u32 val;
- struct i2s_dev_data *rv_i2s_data = dev_id;
+ rv_i2s_data = dev_id;
if (!rv_i2s_data)
return IRQ_NONE;
@@ -278,11 +261,18 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
static int acp3x_dma_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- int ret = 0;
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
- struct i2s_stream_instance *i2s_data = kzalloc(sizeof(struct i2s_stream_instance),
- GFP_KERNEL);
+ struct snd_pcm_runtime *runtime;
+ struct snd_soc_pcm_runtime *prtd;
+ struct i2s_dev_data *adata;
+ struct i2s_stream_instance *i2s_data;
+ int ret;
+
+ runtime = substream->runtime;
+ prtd = substream->private_data;
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
+ adata = dev_get_drvdata(component->dev);
+ i2s_data = kzalloc(sizeof(struct i2s_stream_instance),
+ GFP_KERNEL);
if (!i2s_data)
return -EINVAL;
@@ -312,33 +302,18 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return 0;
}
-static u64 acp_get_byte_count(struct i2s_stream_instance *rtd, int direction)
-{
- u64 byte_count;
-
- if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
- } else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
- }
- return byte_count;
-}
static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
+ struct snd_pcm_runtime *runtime;
+ struct i2s_stream_instance *rtd;
int status;
u64 size;
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct i2s_stream_instance *rtd = runtime->private_data;
+ runtime = substream->runtime;
+ rtd = substream->private_data;
if (!rtd)
return -EINVAL;
@@ -362,12 +337,12 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- u32 pos = 0;
- u32 buffersize = 0;
- u64 bytescount = 0;
- struct i2s_stream_instance *rtd =
- substream->runtime->private_data;
+ struct i2s_stream_instance *rtd;
+ u32 pos;
+ u32 buffersize;
+ u64 bytescount;
+ rtd = substream->runtime->private_data;
buffersize = frames_to_bytes(substream->runtime,
substream->runtime->buffer_size);
bytescount = acp_get_byte_count(rtd, substream->stream);
@@ -380,7 +355,10 @@ static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
static int acp3x_dma_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd)
{
- struct device *parent = component->dev->parent;
+ struct device *parent;
+
+ component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+ parent = component->dev->parent;
snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_DEV,
parent, MIN_BUFFER, MAX_BUFFER);
return 0;
@@ -402,8 +380,12 @@ static int acp3x_dma_mmap(struct snd_soc_component *component,
static int acp3x_dma_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
- struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
+ struct snd_soc_pcm_runtime *prtd;
+ struct i2s_dev_data *adata;
+
+ prtd = substream->private_data;
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
+ adata = dev_get_drvdata(component->dev);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
adata->play_stream = NULL;
@@ -415,186 +397,9 @@ static int acp3x_dma_close(struct snd_soc_component *component,
*/
if (!adata->play_stream && !adata->capture_stream)
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
- kfree(rtd);
- return 0;
-}
-
-static int acp3x_dai_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
-{
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
- case SND_SOC_DAIFMT_I2S:
- adata->tdm_mode = false;
- break;
- case SND_SOC_DAIFMT_DSP_A:
- adata->tdm_mode = true;
- break;
- default:
- return -EINVAL;
- }
-
- return 0;
-}
-
-static int acp3x_dai_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
- u32 rx_mask, int slots, int slot_width)
-{
- u32 val = 0;
- u16 slot_len;
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (slot_width) {
- case SLOT_WIDTH_8:
- slot_len = 8;
- break;
- case SLOT_WIDTH_16:
- slot_len = 16;
- break;
- case SLOT_WIDTH_24:
- slot_len = 24;
- break;
- case SLOT_WIDTH_32:
- slot_len = 0;
- break;
- default:
- return -EINVAL;
- }
-
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
-
- val = (FRM_LEN | (slots << 15) | (slot_len << 18));
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
-
- adata->tdm_fmt = val;
return 0;
}
-static int acp3x_dai_i2s_hwparams(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *params,
- struct snd_soc_dai *dai)
-{
- u32 val = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
-
- switch (params_format(params)) {
- case SNDRV_PCM_FORMAT_U8:
- case SNDRV_PCM_FORMAT_S8:
- rtd->xfer_resolution = 0x0;
- break;
- case SNDRV_PCM_FORMAT_S16_LE:
- rtd->xfer_resolution = 0x02;
- break;
- case SNDRV_PCM_FORMAT_S24_LE:
- rtd->xfer_resolution = 0x04;
- break;
- case SNDRV_PCM_FORMAT_S32_LE:
- rtd->xfer_resolution = 0x05;
- break;
- default:
- return -EINVAL;
- }
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | (rtd->xfer_resolution << 3);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- else
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
-
- return 0;
-}
-
-static int acp3x_dai_i2s_trigger(struct snd_pcm_substream *substream,
- int cmd, struct snd_soc_dai *dai)
-{
- int ret = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
- u32 val, period_bytes;
-
- period_bytes = frames_to_bytes(substream->runtime,
- substream->runtime->period_size);
- switch (cmd) {
- case SNDRV_PCM_TRIGGER_START:
- case SNDRV_PCM_TRIGGER_RESUME:
- case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
- rtd->bytescount = acp_get_byte_count(rtd, substream->stream);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_TX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_RX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- case SNDRV_PCM_TRIGGER_STOP:
- case SNDRV_PCM_TRIGGER_SUSPEND:
- case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- default:
- ret = -EINVAL;
- break;
- }
-
- return ret;
-}
-
-static struct snd_soc_dai_ops acp3x_dai_i2s_ops = {
- .hw_params = acp3x_dai_i2s_hwparams,
- .trigger = acp3x_dai_i2s_trigger,
- .set_fmt = acp3x_dai_i2s_set_fmt,
- .set_tdm_slot = acp3x_dai_set_tdm_slot,
-};
-
-static struct snd_soc_dai_driver acp3x_i2s_dai_driver = {
- .playback = {
- .rates = SNDRV_PCM_RATE_8000_96000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 8,
-
- .rate_min = 8000,
- .rate_max = 96000,
- },
- .capture = {
- .rates = SNDRV_PCM_RATE_8000_48000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 2,
- .rate_min = 8000,
- .rate_max = 48000,
- },
- .ops = &acp3x_dai_i2s_ops,
-};
-
static const struct snd_soc_component_driver acp3x_i2s_component = {
.name = DRV_NAME,
.open = acp3x_dma_open,
@@ -609,10 +414,10 @@ static const struct snd_soc_component_driver acp3x_i2s_component = {
static int acp3x_audio_probe(struct platform_device *pdev)
{
- int status;
struct resource *res;
struct i2s_dev_data *adata;
unsigned int irqflags;
+ int status, ret;
if (!pdev->dev.platform_data) {
dev_err(&pdev->dev, "platform_data not retrieved\n");
@@ -622,7 +427,7 @@ static int acp3x_audio_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
- dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
+ dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
return -ENODEV;
}
@@ -632,60 +437,64 @@ static int acp3x_audio_probe(struct platform_device *pdev)
adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
+ if (!adata->acp3x_base)
+ return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res) {
dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
- return -ENODEV;
+ return -ENOMEM;
}
adata->i2s_irq = res->start;
- adata->play_stream = NULL;
- adata->capture_stream = NULL;
dev_set_drvdata(&pdev->dev, adata);
/* Initialize ACP */
status = acp3x_init(adata->acp3x_base);
if (status)
return -ENODEV;
+
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
- &acp3x_i2s_dai_driver, 1);
+ NULL, 0);
if (status) {
- dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ dev_err(&pdev->dev, "Fail to register acp i2s component\n");
+ ret = -ENODEV;
goto dev_err;
}
status = devm_request_irq(&pdev->dev, adata->i2s_irq, i2s_irq_handler,
irqflags, "ACP3x_I2S_IRQ", adata);
if (status) {
dev_err(&pdev->dev, "ACP3x I2S IRQ request failed\n");
+ ret = -ENODEV;
goto dev_err;
}
- pm_runtime_set_autosuspend_delay(&pdev->dev, 10000);
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 5000);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_enable(&pdev->dev);
return 0;
+
dev_err:
status = acp3x_deinit(adata->acp3x_base);
if (status)
dev_err(&pdev->dev, "ACP de-init failed\n");
else
- dev_info(&pdev->dev, "ACP de-initialized\n");
- /*ignore device status and return driver probe error*/
- return -ENODEV;
+ dev_dbg(&pdev->dev, "ACP de-initialized\n");
+ return ret;
}
static int acp3x_audio_remove(struct platform_device *pdev)
{
+ struct i2s_dev_data *adata;
int ret;
- struct i2s_dev_data *adata = dev_get_drvdata(&pdev->dev);
+ adata = dev_get_drvdata(&pdev->dev);
ret = acp3x_deinit(adata->acp3x_base);
if (ret)
dev_err(&pdev->dev, "ACP de-init failed\n");
else
- dev_info(&pdev->dev, "ACP de-initialized\n");
+ dev_dbg(&pdev->dev, "ACP de-initialized\n");
pm_runtime_disable(&pdev->dev);
return 0;
@@ -693,10 +502,11 @@ static int acp3x_audio_remove(struct platform_device *pdev)
static int acp3x_resume(struct device *dev)
{
+ struct i2s_dev_data *adata;
int status;
u32 val;
- struct i2s_dev_data *adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_init(adata->acp3x_base);
if (status)
return -ENODEV;
@@ -738,14 +548,15 @@ static int acp3x_resume(struct device *dev)
static int acp3x_pcm_runtime_suspend(struct device *dev)
{
+ struct i2s_dev_data *adata;
int status;
- struct i2s_dev_data *adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_deinit(adata->acp3x_base);
if (status)
dev_err(dev, "ACP de-init failed\n");
else
- dev_info(dev, "ACP de-initialized\n");
+ dev_dbg(dev, "ACP de-initialized\n");
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
@@ -754,8 +565,9 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
static int acp3x_pcm_runtime_resume(struct device *dev)
{
+ struct i2s_dev_data *adata;
int status;
- struct i2s_dev_data *adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_init(adata->acp3x_base);
if (status)
@@ -774,13 +586,14 @@ static struct platform_driver acp3x_dma_driver = {
.probe = acp3x_audio_probe,
.remove = acp3x_audio_remove,
.driver = {
- .name = "acp3x_rv_i2s",
+ .name = "acp3x_rv_i2s_dma",
.pm = &acp3x_pm_ops,
},
};
module_platform_driver(acp3x_dma_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_AUTHOR("Vijendar.Mukunda(a)amd.com");
MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 2f15fe1..72c1a23 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -51,6 +51,29 @@
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+struct acp3x_platform_info {
+ u16 play_i2s_instance;
+ u16 cap_i2s_instance;
+ u16 capture_channel;
+};
+
+struct i2s_dev_data {
+ bool tdm_mode;
+ unsigned int i2s_irq;
+ u32 tdm_fmt;
+ void __iomem *acp3x_base;
+ struct snd_pcm_substream *play_stream;
+ struct snd_pcm_substream *capture_stream;
+};
+
+struct i2s_stream_instance {
+ u16 num_pages;
+ u16 channels;
+ u32 xfer_resolution;
+ u64 bytescount;
+ dma_addr_t dma_addr;
+ void __iomem *acp3x_base;
+};
static inline u32 rv_readl(void __iomem *base_addr)
{
@@ -61,3 +84,22 @@ static inline void rv_writel(u32 val, void __iomem *base_addr)
{
writel(val, base_addr - ACP3x_PHY_BASE_ADDRESS);
}
+
+static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
+ int direction)
+{
+ u64 byte_count;
+
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ } else {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ }
+ return byte_count;
+}
--
2.7.4
1
0

[alsa-devel] [RESEND PATCH v9 5/6] ASoC: amd: Handle ACP3x I2S-SP Interrupts.
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
Enabled support for I2S-SP interrupt handling.
Previous to this implementation, driver supports only interrupts
on BT instance.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 4fd3fc8..819ec3a 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -177,6 +177,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->play_stream);
play_flag = 1;
}
+ if ((val & BIT(I2S_TX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_play_stream) {
+ rv_writel(BIT(I2S_TX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_play_stream);
+ play_flag = 1;
+ }
if ((val & BIT(BT_RX_THRESHOLD)) && rv_i2s_data->capture_stream) {
rv_writel(BIT(BT_RX_THRESHOLD), rv_i2s_data->acp3x_base +
@@ -184,6 +191,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->capture_stream);
cap_flag = 1;
}
+ if ((val & BIT(I2S_RX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_capture_stream) {
+ rv_writel(BIT(I2S_RX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_capture_stream);
+ cap_flag = 1;
+ }
if (play_flag | cap_flag)
return IRQ_HANDLED;
--
2.7.4
1
0

[alsa-devel] [RESEND PATCH v9 4/6] ASoC: amd: add ACP3x TDM mode support
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
ACP3x I2S (CPU DAI) can act in normal I2S and TDM modes. Added support
for TDM mode. Desired mode can be selected from ASoC machine driver.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 42 +++++++++++++++++++++++++++++++----------
sound/soc/amd/raven/acp3x.h | 2 ++
2 files changed, 34 insertions(+), 10 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index b039dac..d7aa345 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -44,8 +44,8 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
u32 rx_mask, int slots, int slot_width)
{
struct i2s_dev_data *adata;
- u32 val;
u16 slot_len;
+ u32 val, flen, reg_val, frmt_reg;
adata = snd_soc_dai_get_drvdata(cpu_dai);
@@ -68,16 +68,38 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
return -EINVAL;
}
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_IRER);
-
- val = FRM_LEN | (slots << 15) | (slot_len << 18);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+ /* Enable I2S / BT channels TDM and respective
+ * I2S/BT`s TX/RX Formats frame lengths.
+ */
+ flen = FRM_LEN | (slots << 15) | (slot_len << 18);
- adata->tdm_fmt = val;
+ if (adata->substream_type == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ frmt_reg = mmACP_BTTDM_TXFRMT;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ frmt_reg = mmACP_I2STDM_TXFRMT;
+ }
+ } else {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ frmt_reg = mmACP_BTTDM_RXFRMT;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ frmt_reg = mmACP_I2STDM_RXFRMT;
+ }
+ }
+ val = rv_readl(adata->acp3x_base + reg_val);
+ rv_writel(val | 0x2, adata->acp3x_base + reg_val);
+ rv_writel(flen, adata->acp3x_base + frmt_reg);
+ adata->tdm_fmt = flen;
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index c071477..01b283a 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -76,6 +76,8 @@ struct i2s_dev_data {
bool tdm_mode;
unsigned int i2s_irq;
u32 tdm_fmt;
+ u16 i2s_instance;
+ u32 substream_type;
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
--
2.7.4
1
0

[alsa-devel] [RESEND PATCH v9 3/6] ASoC: amd: Enabling I2S instance in DMA and DAI
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
This patch adds I2S SP support in ACP PCM DMA and DAI.
Added I2S support in DMA and DAI probe,its hw_params handling
its open and close functionalities.
This enable to open and close on the SP instance for
playback and capture.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 119 ++++++++++++++++++----
sound/soc/amd/raven/acp3x-pcm-dma.c | 193 +++++++++++++++++++++++++-----------
sound/soc/amd/raven/acp3x.h | 74 +++++++++++---
3 files changed, 294 insertions(+), 92 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index 390d07a..b039dac 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -86,10 +86,22 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct i2s_stream_instance *rtd;
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
u32 val;
u32 reg_val;
+ prtd = substream->private_data;
rtd = substream->runtime->private_data;
+ card = prtd->card;
+ pinfo = snd_soc_card_get_drvdata(card);
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_U8:
@@ -108,11 +120,25 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
default:
return -EINVAL;
}
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- reg_val = mmACP_BTTDM_ITER;
- else
- reg_val = mmACP_BTTDM_IRER;
-
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ }
+ }
val = rv_readl(rtd->acp3x_base + reg_val);
val = val | (rtd->xfer_resolution << 3);
rv_writel(val, rtd->acp3x_base + reg_val);
@@ -123,10 +149,21 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{
struct i2s_stream_instance *rtd;
- u32 val, period_bytes;
- int ret, reg_val;
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
+ u32 ret, val, period_bytes, reg_val, ier_val, water_val;
+ prtd = substream->private_data;
rtd = substream->runtime->private_data;
+ card = prtd->card;
+ pinfo = snd_soc_card_get_drvdata(card);
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
period_bytes = frames_to_bytes(substream->runtime,
substream->runtime->period_size);
switch (cmd) {
@@ -136,31 +173,75 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
rtd->bytescount = acp_get_byte_count(rtd,
substream->stream);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- reg_val = mmACP_BTTDM_ITER;
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_TX_INTR_WATERMARK_SIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ water_val =
+ mmACP_BT_TX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_BTTDM_ITER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ water_val =
+ mmACP_I2S_TX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_I2STDM_ITER;
+ ier_val = mmACP_I2STDM_IER;
+ }
} else {
- reg_val = mmACP_BTTDM_IRER;
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_RX_INTR_WATERMARK_SIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ water_val =
+ mmACP_BT_RX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_BTTDM_IRER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ water_val =
+ mmACP_I2S_RX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_I2STDM_IRER;
+ ier_val = mmACP_I2STDM_IER;
+ }
}
+ rv_writel(period_bytes, rtd->acp3x_base + water_val);
val = rv_readl(rtd->acp3x_base + reg_val);
val = val | BIT(0);
rv_writel(val, rtd->acp3x_base + reg_val);
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
+ rv_writel(1, rtd->acp3x_base + ier_val);
+ ret = 0;
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- reg_val = mmACP_BTTDM_ITER;
- else
- reg_val = mmACP_BTTDM_IRER;
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ ier_val = mmACP_I2STDM_IER;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ ier_val = mmACP_I2STDM_IER;
+ }
+ }
val = rv_readl(rtd->acp3x_base + reg_val);
val = val & ~BIT(0);
rv_writel(val, rtd->acp3x_base + reg_val);
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
+ rv_writel(0, rtd->acp3x_base + ier_val);
+ ret = 0;
break;
default:
ret = -EINVAL;
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 0202737..4fd3fc8 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -194,20 +194,36 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
{
u16 page_idx;
- u32 low, high, val, acp_fifo_addr;
- dma_addr_t addr = rtd->dma_addr;
+ uint64_t low, high, val, acp_fifo_addr;
+ uint64_t reg_ringbuf_size, reg_dma_size, reg_fifo_size, reg_fifo_addr;
+ dma_addr_t addr;
- /* 8 scratch registers used to map one 64 bit address */
- if (direction == SNDRV_PCM_STREAM_PLAYBACK)
- val = 0;
- else
- val = rtd->num_pages * 8;
+ addr = rtd->dma_addr;
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_PB_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_PB_PTE_OFFSET;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_CP_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_CP_PTE_OFFSET;
+ }
+ }
/* Group Enable */
rv_writel(ACP_SRAM_PTE_OFFSET | BIT(31), rtd->acp3x_base +
- mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
+ mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
rv_writel(PAGE_SIZE_4K_ENABLE, rtd->acp3x_base +
- mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
+ mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
for (page_idx = 0; page_idx < rtd->num_pages; page_idx++) {
/* Load the low address of page int ACP SRAM through SRBM */
@@ -224,38 +240,61 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
}
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_TX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET + (rtd->num_pages * 8)
- + PLAYBACK_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_TX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_TX_FIFOSIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_ringbuf_size = mmACP_BT_TX_RINGBUFSIZE;
+ reg_dma_size = mmACP_BT_TX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_PB_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_BT_TX_FIFOADDR;
+ reg_fifo_size = mmACP_BT_TX_FIFOSIZE;
+ rv_writel(I2S_BT_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_TX_RINGBUFADDR);
+ break;
+
+ case I2S_SP_INSTANCE:
+ default:
+ reg_ringbuf_size = mmACP_I2S_TX_RINGBUFSIZE;
+ reg_dma_size = mmACP_I2S_TX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_PB_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_I2S_TX_FIFOADDR;
+ reg_fifo_size = mmACP_I2S_TX_FIFOSIZE;
+ rv_writel(I2S_SP_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_TX_RINGBUFADDR);
+ }
} else {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START + MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_RX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
- (rtd->num_pages * 8) + CAPTURE_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_RX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_RX_FIFOSIZE);
- }
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_ringbuf_size = mmACP_BT_RX_RINGBUFSIZE;
+ reg_dma_size = mmACP_BT_RX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_CAPT_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_BT_RX_FIFOADDR;
+ reg_fifo_size = mmACP_BT_RX_FIFOSIZE;
+ rv_writel(I2S_BT_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_RX_RINGBUFADDR);
+ break;
- /* Enable watermark/period interrupt to host */
- rv_writel(BIT(BT_TX_THRESHOLD) | BIT(BT_RX_THRESHOLD),
- rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
+ case I2S_SP_INSTANCE:
+ default:
+ reg_ringbuf_size = mmACP_I2S_RX_RINGBUFSIZE;
+ reg_dma_size = mmACP_I2S_RX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_CAPT_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_I2S_RX_FIFOADDR;
+ reg_fifo_size = mmACP_I2S_RX_FIFOSIZE;
+ rv_writel(I2S_SP_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_RX_RINGBUFADDR);
+ }
+ }
+ rv_writel(MAX_BUFFER, rtd->acp3x_base + reg_ringbuf_size);
+ rv_writel(DMA_SIZE, rtd->acp3x_base + reg_dma_size);
+ rv_writel(acp_fifo_addr, rtd->acp3x_base + reg_fifo_addr);
+ rv_writel(FIFO_SIZE, rtd->acp3x_base + reg_fifo_size);
+ rv_writel(BIT(I2S_RX_THRESHOLD) | BIT(BT_RX_THRESHOLD)
+ | BIT(I2S_TX_THRESHOLD) | BIT(BT_TX_THRESHOLD),
+ rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
}
static int acp3x_dma_open(struct snd_soc_component *component,
@@ -289,17 +328,21 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return ret;
}
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = substream;
- else
+ adata->i2ssp_play_stream = substream;
+ } else {
adata->capture_stream = substream;
+ adata->i2ssp_capture_stream = substream;
+ }
i2s_data->acp3x_base = adata->acp3x_base;
runtime->private_data = i2s_data;
- return 0;
+ return ret;
}
@@ -307,16 +350,28 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
- struct snd_pcm_runtime *runtime;
struct i2s_stream_instance *rtd;
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
int status;
u64 size;
- runtime = substream->runtime;
- rtd = substream->private_data;
+ prtd = substream->private_data;
+ card = prtd->card;
+ pinfo = snd_soc_card_get_drvdata(card);
+ rtd = substream->runtime->private_data;
if (!rtd)
return -EINVAL;
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ } else
+ pr_err("pinfo failed\n");
+
size = params_buffer_bytes(params);
status = snd_pcm_lib_malloc_pages(substream, size);
if (status < 0)
@@ -337,12 +392,25 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
struct i2s_stream_instance *rtd;
u32 pos;
u32 buffersize;
u64 bytescount;
+ prtd = substream->private_data;
+ card = prtd->card;
rtd = substream->runtime->private_data;
+ pinfo = snd_soc_card_get_drvdata(card);
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
+
buffersize = frames_to_bytes(substream->runtime,
substream->runtime->buffer_size);
bytescount = acp_get_byte_count(rtd, substream->stream);
@@ -387,15 +455,19 @@ static int acp3x_dma_close(struct snd_soc_component *component,
component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
adata = dev_get_drvdata(component->dev);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = NULL;
- else
+ adata->i2ssp_play_stream = NULL;
+ } else {
adata->capture_stream = NULL;
+ adata->i2ssp_capture_stream = NULL;
+ }
/* Disable ACP irq, when the current stream is being closed and
* another stream is also not active.
*/
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ !adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
}
@@ -516,13 +588,16 @@ static int acp3x_resume(struct device *dev)
adata->play_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_PLAYBACK);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_ITER);
+ rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_TXFRMT);
+ mmACP_BTTDM_TXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_ITER);
+ mmACP_BTTDM_ITER);
}
}
@@ -531,13 +606,17 @@ static int acp3x_resume(struct device *dev)
adata->capture_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_CAPTURE);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_IRER);
+ rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
+
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_RXFRMT);
+ mmACP_BTTDM_RXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_IRER);
+ mmACP_BTTDM_IRER);
}
}
@@ -550,8 +629,8 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
{
struct i2s_dev_data *adata;
int status;
- adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_deinit(adata->acp3x_base);
if (status)
dev_err(dev, "ACP de-init failed\n");
@@ -567,8 +646,8 @@ static int acp3x_pcm_runtime_resume(struct device *dev)
{
struct i2s_dev_data *adata;
int status;
- adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_init(adata->acp3x_base);
if (status)
return -ENODEV;
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 72c1a23..c071477 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,6 +7,9 @@
#include "chip_offset_byte.h"
+#define I2S_SP_INSTANCE 0x01
+#define I2S_BT_INSTANCE 0x02
+
#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
@@ -17,8 +20,11 @@
#define ACP3x_BT_TDM_REG_START 0x1242800
#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
+#define I2S_RX_THRESHOLD 27
+#define I2S_TX_THRESHOLD 28
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
+#define ACP_ERR_INTR_MASK 29
#define ACP3x_POWER_ON 0x00
#define ACP3x_POWER_ON_IN_PROGRESS 0x01
#define ACP3x_POWER_OFF 0x02
@@ -26,19 +32,28 @@
#define ACP3x_SOFT_RESET__SoftResetAudDone_MASK 0x00010001
#define ACP_SRAM_PTE_OFFSET 0x02050000
+#define ACP_SRAM_SP_PB_PTE_OFFSET 0x0
+#define ACP_SRAM_SP_CP_PTE_OFFSET 0x100
+#define ACP_SRAM_BT_PB_PTE_OFFSET 0x200
+#define ACP_SRAM_BT_CP_PTE_OFFSET 0x300
#define PAGE_SIZE_4K_ENABLE 0x2
-#define MEM_WINDOW_START 0x4000000
-#define PLAYBACK_FIFO_ADDR_OFFSET 0x400
-#define CAPTURE_FIFO_ADDR_OFFSET 0x500
+#define I2S_SP_TX_MEM_WINDOW_START 0x4000000
+#define I2S_SP_RX_MEM_WINDOW_START 0x4020000
+#define I2S_BT_TX_MEM_WINDOW_START 0x4040000
+#define I2S_BT_RX_MEM_WINDOW_START 0x4060000
+#define SP_PB_FIFO_ADDR_OFFSET 0x500
+#define SP_CAPT_FIFO_ADDR_OFFSET 0x700
+#define BT_PB_FIFO_ADDR_OFFSET 0x900
+#define BT_CAPT_FIFO_ADDR_OFFSET 0xB00
#define PLAYBACK_MIN_NUM_PERIODS 2
#define PLAYBACK_MAX_NUM_PERIODS 8
-#define PLAYBACK_MAX_PERIOD_SIZE 16384
-#define PLAYBACK_MIN_PERIOD_SIZE 4096
+#define PLAYBACK_MAX_PERIOD_SIZE 8192
+#define PLAYBACK_MIN_PERIOD_SIZE 1024
#define CAPTURE_MIN_NUM_PERIODS 2
#define CAPTURE_MAX_NUM_PERIODS 8
-#define CAPTURE_MAX_PERIOD_SIZE 16384
-#define CAPTURE_MIN_PERIOD_SIZE 4096
+#define CAPTURE_MAX_PERIOD_SIZE 8192
+#define CAPTURE_MIN_PERIOD_SIZE 1024
#define MAX_BUFFER (PLAYBACK_MAX_PERIOD_SIZE * PLAYBACK_MAX_NUM_PERIODS)
#define MIN_BUFFER MAX_BUFFER
@@ -64,14 +79,20 @@ struct i2s_dev_data {
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
+ struct snd_pcm_substream *i2ssp_play_stream;
+ struct snd_pcm_substream *i2ssp_capture_stream;
};
struct i2s_stream_instance {
u16 num_pages;
+ u16 i2s_instance;
+ u16 capture_channel;
+ u16 direction;
u16 channels;
u32 xfer_resolution;
- u64 bytescount;
+ u32 val;
dma_addr_t dma_addr;
+ u64 bytescount;
void __iomem *acp3x_base;
};
@@ -91,15 +112,36 @@ static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
u64 byte_count;
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_LOW);
+ }
+
} else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_LOW);
+ }
}
return byte_count;
}
--
2.7.4
1
0

[alsa-devel] [RESEND PATCH v9 2/6] ASoC: amd: Refactoring of DAI from DMA driver
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
ASoC: PCM DMA driver should only have dma ops.
So Removed all DAI related functionality.Refactoring
the PCM DMA diver code.Added new file containing only DAI ops
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/Makefile | 2 +
sound/soc/amd/raven/acp3x-i2s.c | 266 +++++++++++++++++++++++++++++++
sound/soc/amd/raven/acp3x-pcm-dma.c | 305 +++++++-----------------------------
sound/soc/amd/raven/acp3x.h | 42 +++++
4 files changed, 369 insertions(+), 246 deletions(-)
create mode 100644 sound/soc/amd/raven/acp3x-i2s.c
diff --git a/sound/soc/amd/raven/Makefile b/sound/soc/amd/raven/Makefile
index 108d1ac..62c22b6 100644
--- a/sound/soc/amd/raven/Makefile
+++ b/sound/soc/amd/raven/Makefile
@@ -2,5 +2,7 @@
# Raven Ridge platform Support
snd-pci-acp3x-objs := pci-acp3x.o
snd-acp3x-pcm-dma-objs := acp3x-pcm-dma.o
+snd-acp3x-i2s-objs := acp3x-i2s.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-pci-acp3x.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-pcm-dma.o
+obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-i2s.o
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
new file mode 100644
index 0000000..390d07a
--- /dev/null
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -0,0 +1,266 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// AMD ALSA SoC PCM Driver
+//
+//Copyright 2016 Advanced Micro Devices, Inc.
+
+#include <linux/platform_device.h>
+#include <linux/module.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/pm_runtime.h>
+#include <sound/pcm.h>
+#include <sound/pcm_params.h>
+#include <sound/soc.h>
+#include <sound/soc-dai.h>
+#include <linux/dma-mapping.h>
+
+#include "acp3x.h"
+
+#define DRV_NAME "acp3x-i2s"
+
+static int acp3x_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
+{
+ struct i2s_dev_data *adata;
+
+ adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
+
+ case SND_SOC_DAIFMT_I2S:
+ adata->tdm_mode = false;
+ break;
+ case SND_SOC_DAIFMT_DSP_A:
+ adata->tdm_mode = true;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
+ u32 rx_mask, int slots, int slot_width)
+{
+ struct i2s_dev_data *adata;
+ u32 val;
+ u16 slot_len;
+
+ adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ /* These values are as per Hardware Spec */
+
+ switch (slot_width) {
+ case SLOT_WIDTH_8:
+ slot_len = 8;
+ break;
+ case SLOT_WIDTH_16:
+ slot_len = 16;
+ break;
+ case SLOT_WIDTH_24:
+ slot_len = 24;
+ break;
+ case SLOT_WIDTH_32:
+ slot_len = 0;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_IRER);
+
+ val = FRM_LEN | (slots << 15) | (slot_len << 18);
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+
+ adata->tdm_fmt = val;
+ return 0;
+}
+
+static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ struct snd_soc_dai *dai)
+{
+ struct i2s_stream_instance *rtd;
+ u32 val;
+ u32 reg_val;
+
+ rtd = substream->runtime->private_data;
+
+ switch (params_format(params)) {
+ case SNDRV_PCM_FORMAT_U8:
+ case SNDRV_PCM_FORMAT_S8:
+ rtd->xfer_resolution = 0x0;
+ break;
+ case SNDRV_PCM_FORMAT_S16_LE:
+ rtd->xfer_resolution = 0x02;
+ break;
+ case SNDRV_PCM_FORMAT_S24_LE:
+ rtd->xfer_resolution = 0x04;
+ break;
+ case SNDRV_PCM_FORMAT_S32_LE:
+ rtd->xfer_resolution = 0x05;
+ break;
+ default:
+ return -EINVAL;
+ }
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ reg_val = mmACP_BTTDM_ITER;
+ else
+ reg_val = mmACP_BTTDM_IRER;
+
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ return 0;
+}
+
+static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
+ int cmd, struct snd_soc_dai *dai)
+{
+ struct i2s_stream_instance *rtd;
+ u32 val, period_bytes;
+ int ret, reg_val;
+
+ rtd = substream->runtime->private_data;
+ period_bytes = frames_to_bytes(substream->runtime,
+ substream->runtime->period_size);
+ switch (cmd) {
+ case SNDRV_PCM_TRIGGER_START:
+ case SNDRV_PCM_TRIGGER_RESUME:
+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+ rtd->bytescount = acp_get_byte_count(rtd,
+ substream->stream);
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ reg_val = mmACP_BTTDM_ITER;
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_TX_INTR_WATERMARK_SIZE);
+ } else {
+ reg_val = mmACP_BTTDM_IRER;
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_RX_INTR_WATERMARK_SIZE);
+ }
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ case SNDRV_PCM_TRIGGER_STOP:
+ case SNDRV_PCM_TRIGGER_SUSPEND:
+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ reg_val = mmACP_BTTDM_ITER;
+ else
+ reg_val = mmACP_BTTDM_IRER;
+
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ default:
+ ret = -EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
+static struct snd_soc_dai_ops acp3x_i2s_dai_ops = {
+ .hw_params = acp3x_i2s_hwparams,
+ .trigger = acp3x_i2s_trigger,
+ .set_fmt = acp3x_i2s_set_fmt,
+ .set_tdm_slot = acp3x_i2s_set_tdm_slot,
+};
+
+static const struct snd_soc_component_driver acp3x_dai_component = {
+ .name = "acp3x-i2s",
+};
+
+static struct snd_soc_dai_driver acp3x_i2s_dai = {
+ .playback = {
+ .rates = SNDRV_PCM_RATE_8000_96000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 8,
+
+ .rate_min = 8000,
+ .rate_max = 96000,
+ },
+ .capture = {
+ .rates = SNDRV_PCM_RATE_8000_48000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 2,
+ .rate_min = 8000,
+ .rate_max = 48000,
+ },
+ .ops = &acp3x_i2s_dai_ops,
+};
+
+
+static int acp3x_dai_probe(struct platform_device *pdev)
+{
+ struct resource *res;
+ struct i2s_dev_data *adata;
+ int status;
+
+ adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data),
+ GFP_KERNEL);
+ if (!adata)
+ return -ENOMEM;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
+ return -ENOMEM;
+ }
+
+ adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
+ resource_size(res));
+ if (IS_ERR(adata->acp3x_base))
+ return PTR_ERR(adata->acp3x_base);
+
+ adata->i2s_irq = res->start;
+ dev_set_drvdata(&pdev->dev, adata);
+ status = devm_snd_soc_register_component(&pdev->dev,
+ &acp3x_dai_component, &acp3x_i2s_dai, 1);
+ if (status) {
+ dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ return -ENODEV;
+ }
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 5000);
+ pm_runtime_use_autosuspend(&pdev->dev);
+ pm_runtime_enable(&pdev->dev);
+ return 0;
+}
+
+static int acp3x_dai_remove(struct platform_device *pdev)
+{
+ pm_runtime_disable(&pdev->dev);
+ return 0;
+}
+static struct platform_driver acp3x_dai_driver = {
+ .probe = acp3x_dai_probe,
+ .remove = acp3x_dai_remove,
+ .driver = {
+ .name = "acp3x_i2s_playcap",
+ },
+};
+
+module_platform_driver(acp3x_dai_driver);
+
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
+MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:" DRV_NAME);
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 60709e3..0202737 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -18,24 +18,6 @@
#define DRV_NAME "acp3x-i2s-audio"
-struct i2s_dev_data {
- bool tdm_mode;
- unsigned int i2s_irq;
- u32 tdm_fmt;
- void __iomem *acp3x_base;
- struct snd_pcm_substream *play_stream;
- struct snd_pcm_substream *capture_stream;
-};
-
-struct i2s_stream_instance {
- u16 num_pages;
- u16 channels;
- u32 xfer_resolution;
- u64 bytescount;
- dma_addr_t dma_addr;
- void __iomem *acp3x_base;
-};
-
static const struct snd_pcm_hardware acp3x_pcm_hardware_playback = {
.info = SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -178,10 +160,11 @@ static int acp3x_deinit(void __iomem *acp3x_base)
static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
{
+ struct i2s_dev_data *rv_i2s_data;
u16 play_flag, cap_flag;
u32 val;
- struct i2s_dev_data *rv_i2s_data = dev_id;
+ rv_i2s_data = dev_id;
if (!rv_i2s_data)
return IRQ_NONE;
@@ -278,11 +261,18 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
static int acp3x_dma_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- int ret = 0;
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
- struct i2s_stream_instance *i2s_data = kzalloc(sizeof(struct i2s_stream_instance),
- GFP_KERNEL);
+ struct snd_pcm_runtime *runtime;
+ struct snd_soc_pcm_runtime *prtd;
+ struct i2s_dev_data *adata;
+ struct i2s_stream_instance *i2s_data;
+ int ret;
+
+ runtime = substream->runtime;
+ prtd = substream->private_data;
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
+ adata = dev_get_drvdata(component->dev);
+ i2s_data = kzalloc(sizeof(struct i2s_stream_instance),
+ GFP_KERNEL);
if (!i2s_data)
return -EINVAL;
@@ -312,33 +302,18 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return 0;
}
-static u64 acp_get_byte_count(struct i2s_stream_instance *rtd, int direction)
-{
- u64 byte_count;
-
- if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
- } else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
- }
- return byte_count;
-}
static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
+ struct snd_pcm_runtime *runtime;
+ struct i2s_stream_instance *rtd;
int status;
u64 size;
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct i2s_stream_instance *rtd = runtime->private_data;
+ runtime = substream->runtime;
+ rtd = substream->private_data;
if (!rtd)
return -EINVAL;
@@ -362,12 +337,12 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- u32 pos = 0;
- u32 buffersize = 0;
- u64 bytescount = 0;
- struct i2s_stream_instance *rtd =
- substream->runtime->private_data;
+ struct i2s_stream_instance *rtd;
+ u32 pos;
+ u32 buffersize;
+ u64 bytescount;
+ rtd = substream->runtime->private_data;
buffersize = frames_to_bytes(substream->runtime,
substream->runtime->buffer_size);
bytescount = acp_get_byte_count(rtd, substream->stream);
@@ -380,7 +355,10 @@ static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
static int acp3x_dma_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd)
{
- struct device *parent = component->dev->parent;
+ struct device *parent;
+
+ component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+ parent = component->dev->parent;
snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_DEV,
parent, MIN_BUFFER, MAX_BUFFER);
return 0;
@@ -402,8 +380,12 @@ static int acp3x_dma_mmap(struct snd_soc_component *component,
static int acp3x_dma_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
- struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
+ struct snd_soc_pcm_runtime *prtd;
+ struct i2s_dev_data *adata;
+
+ prtd = substream->private_data;
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
+ adata = dev_get_drvdata(component->dev);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
adata->play_stream = NULL;
@@ -415,186 +397,9 @@ static int acp3x_dma_close(struct snd_soc_component *component,
*/
if (!adata->play_stream && !adata->capture_stream)
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
- kfree(rtd);
- return 0;
-}
-
-static int acp3x_dai_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
-{
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
- case SND_SOC_DAIFMT_I2S:
- adata->tdm_mode = false;
- break;
- case SND_SOC_DAIFMT_DSP_A:
- adata->tdm_mode = true;
- break;
- default:
- return -EINVAL;
- }
-
- return 0;
-}
-
-static int acp3x_dai_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
- u32 rx_mask, int slots, int slot_width)
-{
- u32 val = 0;
- u16 slot_len;
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (slot_width) {
- case SLOT_WIDTH_8:
- slot_len = 8;
- break;
- case SLOT_WIDTH_16:
- slot_len = 16;
- break;
- case SLOT_WIDTH_24:
- slot_len = 24;
- break;
- case SLOT_WIDTH_32:
- slot_len = 0;
- break;
- default:
- return -EINVAL;
- }
-
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
-
- val = (FRM_LEN | (slots << 15) | (slot_len << 18));
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
-
- adata->tdm_fmt = val;
return 0;
}
-static int acp3x_dai_i2s_hwparams(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *params,
- struct snd_soc_dai *dai)
-{
- u32 val = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
-
- switch (params_format(params)) {
- case SNDRV_PCM_FORMAT_U8:
- case SNDRV_PCM_FORMAT_S8:
- rtd->xfer_resolution = 0x0;
- break;
- case SNDRV_PCM_FORMAT_S16_LE:
- rtd->xfer_resolution = 0x02;
- break;
- case SNDRV_PCM_FORMAT_S24_LE:
- rtd->xfer_resolution = 0x04;
- break;
- case SNDRV_PCM_FORMAT_S32_LE:
- rtd->xfer_resolution = 0x05;
- break;
- default:
- return -EINVAL;
- }
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | (rtd->xfer_resolution << 3);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- else
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
-
- return 0;
-}
-
-static int acp3x_dai_i2s_trigger(struct snd_pcm_substream *substream,
- int cmd, struct snd_soc_dai *dai)
-{
- int ret = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
- u32 val, period_bytes;
-
- period_bytes = frames_to_bytes(substream->runtime,
- substream->runtime->period_size);
- switch (cmd) {
- case SNDRV_PCM_TRIGGER_START:
- case SNDRV_PCM_TRIGGER_RESUME:
- case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
- rtd->bytescount = acp_get_byte_count(rtd, substream->stream);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_TX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_RX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- case SNDRV_PCM_TRIGGER_STOP:
- case SNDRV_PCM_TRIGGER_SUSPEND:
- case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- default:
- ret = -EINVAL;
- break;
- }
-
- return ret;
-}
-
-static struct snd_soc_dai_ops acp3x_dai_i2s_ops = {
- .hw_params = acp3x_dai_i2s_hwparams,
- .trigger = acp3x_dai_i2s_trigger,
- .set_fmt = acp3x_dai_i2s_set_fmt,
- .set_tdm_slot = acp3x_dai_set_tdm_slot,
-};
-
-static struct snd_soc_dai_driver acp3x_i2s_dai_driver = {
- .playback = {
- .rates = SNDRV_PCM_RATE_8000_96000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 8,
-
- .rate_min = 8000,
- .rate_max = 96000,
- },
- .capture = {
- .rates = SNDRV_PCM_RATE_8000_48000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 2,
- .rate_min = 8000,
- .rate_max = 48000,
- },
- .ops = &acp3x_dai_i2s_ops,
-};
-
static const struct snd_soc_component_driver acp3x_i2s_component = {
.name = DRV_NAME,
.open = acp3x_dma_open,
@@ -609,10 +414,10 @@ static const struct snd_soc_component_driver acp3x_i2s_component = {
static int acp3x_audio_probe(struct platform_device *pdev)
{
- int status;
struct resource *res;
struct i2s_dev_data *adata;
unsigned int irqflags;
+ int status, ret;
if (!pdev->dev.platform_data) {
dev_err(&pdev->dev, "platform_data not retrieved\n");
@@ -622,7 +427,7 @@ static int acp3x_audio_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
- dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
+ dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
return -ENODEV;
}
@@ -632,60 +437,64 @@ static int acp3x_audio_probe(struct platform_device *pdev)
adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
+ if (!adata->acp3x_base)
+ return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res) {
dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
- return -ENODEV;
+ return -ENOMEM;
}
adata->i2s_irq = res->start;
- adata->play_stream = NULL;
- adata->capture_stream = NULL;
dev_set_drvdata(&pdev->dev, adata);
/* Initialize ACP */
status = acp3x_init(adata->acp3x_base);
if (status)
return -ENODEV;
+
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
- &acp3x_i2s_dai_driver, 1);
+ NULL, 0);
if (status) {
- dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ dev_err(&pdev->dev, "Fail to register acp i2s component\n");
+ ret = -ENODEV;
goto dev_err;
}
status = devm_request_irq(&pdev->dev, adata->i2s_irq, i2s_irq_handler,
irqflags, "ACP3x_I2S_IRQ", adata);
if (status) {
dev_err(&pdev->dev, "ACP3x I2S IRQ request failed\n");
+ ret = -ENODEV;
goto dev_err;
}
- pm_runtime_set_autosuspend_delay(&pdev->dev, 10000);
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 5000);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_enable(&pdev->dev);
return 0;
+
dev_err:
status = acp3x_deinit(adata->acp3x_base);
if (status)
dev_err(&pdev->dev, "ACP de-init failed\n");
else
- dev_info(&pdev->dev, "ACP de-initialized\n");
- /*ignore device status and return driver probe error*/
- return -ENODEV;
+ dev_dbg(&pdev->dev, "ACP de-initialized\n");
+ return ret;
}
static int acp3x_audio_remove(struct platform_device *pdev)
{
+ struct i2s_dev_data *adata;
int ret;
- struct i2s_dev_data *adata = dev_get_drvdata(&pdev->dev);
+ adata = dev_get_drvdata(&pdev->dev);
ret = acp3x_deinit(adata->acp3x_base);
if (ret)
dev_err(&pdev->dev, "ACP de-init failed\n");
else
- dev_info(&pdev->dev, "ACP de-initialized\n");
+ dev_dbg(&pdev->dev, "ACP de-initialized\n");
pm_runtime_disable(&pdev->dev);
return 0;
@@ -693,10 +502,11 @@ static int acp3x_audio_remove(struct platform_device *pdev)
static int acp3x_resume(struct device *dev)
{
+ struct i2s_dev_data *adata;
int status;
u32 val;
- struct i2s_dev_data *adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_init(adata->acp3x_base);
if (status)
return -ENODEV;
@@ -738,14 +548,15 @@ static int acp3x_resume(struct device *dev)
static int acp3x_pcm_runtime_suspend(struct device *dev)
{
+ struct i2s_dev_data *adata;
int status;
- struct i2s_dev_data *adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_deinit(adata->acp3x_base);
if (status)
dev_err(dev, "ACP de-init failed\n");
else
- dev_info(dev, "ACP de-initialized\n");
+ dev_dbg(dev, "ACP de-initialized\n");
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
@@ -754,8 +565,9 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
static int acp3x_pcm_runtime_resume(struct device *dev)
{
+ struct i2s_dev_data *adata;
int status;
- struct i2s_dev_data *adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_init(adata->acp3x_base);
if (status)
@@ -774,13 +586,14 @@ static struct platform_driver acp3x_dma_driver = {
.probe = acp3x_audio_probe,
.remove = acp3x_audio_remove,
.driver = {
- .name = "acp3x_rv_i2s",
+ .name = "acp3x_rv_i2s_dma",
.pm = &acp3x_pm_ops,
},
};
module_platform_driver(acp3x_dma_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_AUTHOR("Vijendar.Mukunda(a)amd.com");
MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 2f15fe1..72c1a23 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -51,6 +51,29 @@
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+struct acp3x_platform_info {
+ u16 play_i2s_instance;
+ u16 cap_i2s_instance;
+ u16 capture_channel;
+};
+
+struct i2s_dev_data {
+ bool tdm_mode;
+ unsigned int i2s_irq;
+ u32 tdm_fmt;
+ void __iomem *acp3x_base;
+ struct snd_pcm_substream *play_stream;
+ struct snd_pcm_substream *capture_stream;
+};
+
+struct i2s_stream_instance {
+ u16 num_pages;
+ u16 channels;
+ u32 xfer_resolution;
+ u64 bytescount;
+ dma_addr_t dma_addr;
+ void __iomem *acp3x_base;
+};
static inline u32 rv_readl(void __iomem *base_addr)
{
@@ -61,3 +84,22 @@ static inline void rv_writel(u32 val, void __iomem *base_addr)
{
writel(val, base_addr - ACP3x_PHY_BASE_ADDRESS);
}
+
+static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
+ int direction)
+{
+ u64 byte_count;
+
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ } else {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ }
+ return byte_count;
+}
--
2.7.4
1
0

[alsa-devel] [PATCH v9 1/6] ASoC: amd:Create multiple I2S platform device endpoint
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
Creates Platform Device endpoints for multiple
I2S instances: SP and BT endpoints device.
Pass PCI resources like MMIO, irq to the platform devices.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x.h | 5 +++
sound/soc/amd/raven/pci-acp3x.c | 95 +++++++++++++++++++++++++++--------------
2 files changed, 68 insertions(+), 32 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 4f2cadd..2f15fe1 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,10 +7,15 @@
#include "chip_offset_byte.h"
+#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
#define ACP3x_REG_START 0x1240000
#define ACP3x_REG_END 0x1250200
+#define ACP3x_I2STDM_REG_START 0x1242400
+#define ACP3x_I2STDM_REG_END 0x1242410
+#define ACP3x_BT_TDM_REG_START 0x1242800
+#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index facec24..94f5f21 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -16,17 +16,17 @@ struct acp3x_dev_data {
void __iomem *acp3x_base;
bool acp3x_audio_mode;
struct resource *res;
- struct platform_device *pdev;
+ struct platform_device *pdev[ACP3x_DEVS];
};
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
- int ret;
- u32 addr, val;
struct acp3x_dev_data *adata;
- struct platform_device_info pdevinfo;
+ struct platform_device_info pdevinfo[ACP3x_DEVS];
unsigned int irqflags;
+ int ret, i;
+ u32 addr, val;
if (pci_enable_device(pci)) {
dev_err(&pci->dev, "pci_enable_device failed\n");
@@ -56,10 +56,11 @@ static int snd_acp3x_probe(struct pci_dev *pci,
irqflags = 0;
addr = pci_resource_start(pci, 0);
- adata->acp3x_base = ioremap(addr, pci_resource_len(pci, 0));
+ adata->acp3x_base = devm_ioremap(&pci->dev, addr,
+ pci_resource_len(pci, 0));
if (!adata->acp3x_base) {
ret = -ENOMEM;
- goto release_regions;
+ goto disable_msi;
}
pci_set_master(pci);
pci_set_drvdata(pci, adata);
@@ -68,11 +69,11 @@ static int snd_acp3x_probe(struct pci_dev *pci,
switch (val) {
case I2S_MODE:
adata->res = devm_kzalloc(&pci->dev,
- sizeof(struct resource) * 2,
+ sizeof(struct resource) * 4,
GFP_KERNEL);
if (!adata->res) {
ret = -ENOMEM;
- goto unmap_mmio;
+ goto disable_msi;
}
adata->res[0].name = "acp3x_i2s_iomem";
@@ -80,40 +81,67 @@ static int snd_acp3x_probe(struct pci_dev *pci,
adata->res[0].start = addr;
adata->res[0].end = addr + (ACP3x_REG_END - ACP3x_REG_START);
- adata->res[1].name = "acp3x_i2s_irq";
- adata->res[1].flags = IORESOURCE_IRQ;
- adata->res[1].start = pci->irq;
- adata->res[1].end = pci->irq;
+ adata->res[1].name = "acp3x_i2s_sp";
+ adata->res[1].flags = IORESOURCE_MEM;
+ adata->res[1].start = addr + ACP3x_I2STDM_REG_START;
+ adata->res[1].end = addr + ACP3x_I2STDM_REG_END;
+
+ adata->res[2].name = "acp3x_i2s_bt";
+ adata->res[2].flags = IORESOURCE_MEM;
+ adata->res[2].start = addr + ACP3x_BT_TDM_REG_START;
+ adata->res[2].end = addr + ACP3x_BT_TDM_REG_END;
+
+ adata->res[3].name = "acp3x_i2s_irq";
+ adata->res[3].flags = IORESOURCE_IRQ;
+ adata->res[3].start = pci->irq;
+ adata->res[3].end = adata->res[3].start;
adata->acp3x_audio_mode = ACP3x_I2S_MODE;
memset(&pdevinfo, 0, sizeof(pdevinfo));
- pdevinfo.name = "acp3x_rv_i2s";
- pdevinfo.id = 0;
- pdevinfo.parent = &pci->dev;
- pdevinfo.num_res = 2;
- pdevinfo.res = adata->res;
- pdevinfo.data = &irqflags;
- pdevinfo.size_data = sizeof(irqflags);
-
- adata->pdev = platform_device_register_full(&pdevinfo);
- if (IS_ERR(adata->pdev)) {
- dev_err(&pci->dev, "cannot register %s device\n",
- pdevinfo.name);
- ret = PTR_ERR(adata->pdev);
- goto unmap_mmio;
+ pdevinfo[0].name = "acp3x_rv_i2s_dma";
+ pdevinfo[0].id = 0;
+ pdevinfo[0].parent = &pci->dev;
+ pdevinfo[0].num_res = 4;
+ pdevinfo[0].res = &adata->res[0];
+ pdevinfo[0].data = &irqflags;
+ pdevinfo[0].size_data = sizeof(irqflags);
+
+ pdevinfo[1].name = "acp3x_i2s_playcap";
+ pdevinfo[1].id = 0;
+ pdevinfo[1].parent = &pci->dev;
+ pdevinfo[1].num_res = 1;
+ pdevinfo[1].res = &adata->res[1];
+
+ pdevinfo[2].name = "acp3x_i2s_playcap";
+ pdevinfo[2].id = 1;
+ pdevinfo[2].parent = &pci->dev;
+ pdevinfo[2].num_res = 1;
+ pdevinfo[2].res = &adata->res[2];
+ for (i = 0; i < ACP3x_DEVS ; i++) {
+ adata->pdev[i] =
+ platform_device_register_full(&pdevinfo[i]);
+ if (IS_ERR(adata->pdev[i])) {
+ dev_err(&pci->dev, "cannot register %s device\n",
+ pdevinfo[i].name);
+ ret = PTR_ERR(adata->pdev[i]);
+ goto unregister_devs;
+ }
}
break;
default:
dev_err(&pci->dev, "Invalid ACP audio mode : %d\n", val);
ret = -ENODEV;
- goto unmap_mmio;
+ goto disable_msi;
}
return 0;
-unmap_mmio:
+unregister_devs:
+ if (val == I2S_MODE)
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+disable_msi:
pci_disable_msi(pci);
- iounmap(adata->acp3x_base);
release_regions:
pci_release_regions(pci);
disable_pci:
@@ -125,10 +153,12 @@ static int snd_acp3x_probe(struct pci_dev *pci,
static void snd_acp3x_remove(struct pci_dev *pci)
{
struct acp3x_dev_data *adata = pci_get_drvdata(pci);
+ int i;
- platform_device_unregister(adata->pdev);
- iounmap(adata->acp3x_base);
-
+ if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+ }
pci_disable_msi(pci);
pci_release_regions(pci);
pci_disable_device(pci);
@@ -151,6 +181,7 @@ static struct pci_driver acp3x_driver = {
module_pci_driver(acp3x_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_DESCRIPTION("AMD ACP3x PCI driver");
MODULE_LICENSE("GPL v2");
--
2.7.4
1
0

[alsa-devel] [PATCH v8 1/6] ASoC: amd:Create multiple I2S platform device endpoint
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
Creates Platform Device endpoints for multiple
I2S instances: SP and BT endpoints device.
Pass PCI resources like MMIO, irq to the platform devices.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x.h | 5 +++
sound/soc/amd/raven/pci-acp3x.c | 95 +++++++++++++++++++++++++++--------------
2 files changed, 68 insertions(+), 32 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 4f2cadd..2f15fe1 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,10 +7,15 @@
#include "chip_offset_byte.h"
+#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
#define ACP3x_REG_START 0x1240000
#define ACP3x_REG_END 0x1250200
+#define ACP3x_I2STDM_REG_START 0x1242400
+#define ACP3x_I2STDM_REG_END 0x1242410
+#define ACP3x_BT_TDM_REG_START 0x1242800
+#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index facec24..be2670f 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -16,17 +16,17 @@ struct acp3x_dev_data {
void __iomem *acp3x_base;
bool acp3x_audio_mode;
struct resource *res;
- struct platform_device *pdev;
+ struct platform_device *pdev[ACP3x_DEVS];
};
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
- int ret;
- u32 addr, val;
struct acp3x_dev_data *adata;
- struct platform_device_info pdevinfo;
+ struct platform_device_info pdevinfo[ACP3x_DEVS];
unsigned int irqflags;
+ int ret, val, i;
+ u32 addr;
if (pci_enable_device(pci)) {
dev_err(&pci->dev, "pci_enable_device failed\n");
@@ -43,7 +43,7 @@ static int snd_acp3x_probe(struct pci_dev *pci,
GFP_KERNEL);
if (!adata) {
ret = -ENOMEM;
- goto release_regions;
+ goto adata_free;
}
/* check for msi interrupt support */
@@ -56,7 +56,8 @@ static int snd_acp3x_probe(struct pci_dev *pci,
irqflags = 0;
addr = pci_resource_start(pci, 0);
- adata->acp3x_base = ioremap(addr, pci_resource_len(pci, 0));
+ adata->acp3x_base = devm_ioremap(&pci->dev, addr,
+ pci_resource_len(pci, 0));
if (!adata->acp3x_base) {
ret = -ENOMEM;
goto release_regions;
@@ -68,11 +69,11 @@ static int snd_acp3x_probe(struct pci_dev *pci,
switch (val) {
case I2S_MODE:
adata->res = devm_kzalloc(&pci->dev,
- sizeof(struct resource) * 2,
+ sizeof(struct resource) * 4,
GFP_KERNEL);
if (!adata->res) {
ret = -ENOMEM;
- goto unmap_mmio;
+ goto release_regions;
}
adata->res[0].name = "acp3x_i2s_iomem";
@@ -80,41 +81,68 @@ static int snd_acp3x_probe(struct pci_dev *pci,
adata->res[0].start = addr;
adata->res[0].end = addr + (ACP3x_REG_END - ACP3x_REG_START);
- adata->res[1].name = "acp3x_i2s_irq";
- adata->res[1].flags = IORESOURCE_IRQ;
- adata->res[1].start = pci->irq;
- adata->res[1].end = pci->irq;
+ adata->res[1].name = "acp3x_i2s_sp";
+ adata->res[1].flags = IORESOURCE_MEM;
+ adata->res[1].start = addr + ACP3x_I2STDM_REG_START;
+ adata->res[1].end = addr + ACP3x_I2STDM_REG_END;
+
+ adata->res[2].name = "acp3x_i2s_bt";
+ adata->res[2].flags = IORESOURCE_MEM;
+ adata->res[2].start = addr + ACP3x_BT_TDM_REG_START;
+ adata->res[2].end = addr + ACP3x_BT_TDM_REG_END;
+
+ adata->res[3].name = "acp3x_i2s_irq";
+ adata->res[3].flags = IORESOURCE_IRQ;
+ adata->res[3].start = pci->irq;
+ adata->res[3].end = adata->res[3].start;
adata->acp3x_audio_mode = ACP3x_I2S_MODE;
memset(&pdevinfo, 0, sizeof(pdevinfo));
- pdevinfo.name = "acp3x_rv_i2s";
- pdevinfo.id = 0;
- pdevinfo.parent = &pci->dev;
- pdevinfo.num_res = 2;
- pdevinfo.res = adata->res;
- pdevinfo.data = &irqflags;
- pdevinfo.size_data = sizeof(irqflags);
-
- adata->pdev = platform_device_register_full(&pdevinfo);
- if (IS_ERR(adata->pdev)) {
- dev_err(&pci->dev, "cannot register %s device\n",
- pdevinfo.name);
- ret = PTR_ERR(adata->pdev);
- goto unmap_mmio;
+ pdevinfo[0].name = "acp3x_rv_i2s_dma";
+ pdevinfo[0].id = 0;
+ pdevinfo[0].parent = &pci->dev;
+ pdevinfo[0].num_res = 4;
+ pdevinfo[0].res = &adata->res[0];
+ pdevinfo[0].data = &irqflags;
+ pdevinfo[0].size_data = sizeof(irqflags);
+
+ pdevinfo[1].name = "acp3x_i2s_playcap";
+ pdevinfo[1].id = 0;
+ pdevinfo[1].parent = &pci->dev;
+ pdevinfo[1].num_res = 1;
+ pdevinfo[1].res = &adata->res[1];
+
+ pdevinfo[2].name = "acp3x_i2s_playcap";
+ pdevinfo[2].id = 1;
+ pdevinfo[2].parent = &pci->dev;
+ pdevinfo[2].num_res = 1;
+ pdevinfo[2].res = &adata->res[2];
+ for (i = 0; i < ACP3x_DEVS ; i++) {
+ adata->pdev[i] =
+ platform_device_register_full(&pdevinfo[i]);
+ if (IS_ERR(adata->pdev[i])) {
+ dev_err(&pci->dev, "cannot register %s device\n",
+ pdevinfo[i].name);
+ ret = PTR_ERR(adata->pdev[i]);
+ goto unmap_mmio;
+ }
}
break;
default:
dev_err(&pci->dev, "Invalid ACP audio mode : %d\n", val);
ret = -ENODEV;
- goto unmap_mmio;
+ goto release_regions;
}
return 0;
unmap_mmio:
- pci_disable_msi(pci);
- iounmap(adata->acp3x_base);
+ if (val == I2S_MODE)
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
release_regions:
+ pci_disable_msi(pci);
+adata_free:
pci_release_regions(pci);
disable_pci:
pci_disable_device(pci);
@@ -125,10 +153,12 @@ static int snd_acp3x_probe(struct pci_dev *pci,
static void snd_acp3x_remove(struct pci_dev *pci)
{
struct acp3x_dev_data *adata = pci_get_drvdata(pci);
+ int i;
- platform_device_unregister(adata->pdev);
- iounmap(adata->acp3x_base);
-
+ if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+ }
pci_disable_msi(pci);
pci_release_regions(pci);
pci_disable_device(pci);
@@ -151,6 +181,7 @@ static struct pci_driver acp3x_driver = {
module_pci_driver(acp3x_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_DESCRIPTION("AMD ACP3x PCI driver");
MODULE_LICENSE("GPL v2");
--
2.7.4
2
1
alsa-project/tinycompress pull request #2 was opened from vinodkoul:
This adds the header file for FLAC and also adds the .pc file for the library so that users can discover details about the library
Request URL : https://github.com/alsa-project/tinycompress/pull/2
Patch URL : https://github.com/alsa-project/tinycompress/pull/2.patch
Repository URL: https://github.com/alsa-project/tinycompress
1
0

[alsa-devel] [PATCH v8 6/6] ASoC: amd: Added ACP3x system resume and runtime pm
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
When system wide suspend happens, ACP will be powered off
and when system resumes,for audio usecase to continue,all
the runtime configuration data needs to be programmed again.
Added resume pm call back to ACP pm ops and also added runtime
PM operations for ACP3x PCM platform device.
Device will enter into D3 state when there is no activity
on audio I2S lines.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 144 +--------------------------
sound/soc/amd/raven/acp3x.h | 7 ++
sound/soc/amd/raven/pci-acp3x.c | 188 +++++++++++++++++++++++++++++++++++-
3 files changed, 195 insertions(+), 144 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 819ec3a..cae1a0f 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -58,106 +58,6 @@ static const struct snd_pcm_hardware acp3x_pcm_hardware_capture = {
.periods_max = CAPTURE_MAX_NUM_PERIODS,
};
-static int acp3x_power_on(void __iomem *acp3x_base, bool on)
-{
- u16 val, mask;
- u32 timeout;
-
- if (on == true) {
- val = 1;
- mask = ACP3x_POWER_ON;
- } else {
- val = 0;
- mask = ACP3x_POWER_OFF;
- }
-
- rv_writel(val, acp3x_base + mmACP_PGFSM_CONTROL);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
- if ((val & ACP3x_POWER_OFF_IN_PROGRESS) == mask)
- break;
- if (timeout > 100) {
- pr_err("ACP3x power state change failure\n");
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_reset(void __iomem *acp3x_base)
-{
- u32 val, timeout;
-
- rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
- timeout > 100) {
- if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
-
- rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if (!val || timeout > 100) {
- if (!val)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_init(void __iomem *acp3x_base)
-{
- int ret;
-
- /* power on */
- ret = acp3x_power_on(acp3x_base, true);
- if (ret) {
- pr_err("ACP3x power on failed\n");
- return ret;
- }
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- return 0;
-}
-
-static int acp3x_deinit(void __iomem *acp3x_base)
-{
- int ret;
-
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- /* power off */
- ret = acp3x_power_on(acp3x_base, false);
- if (ret) {
- pr_err("ACP3x power off failed\n");
- return ret;
- }
- return 0;
-}
-
static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
{
struct i2s_dev_data *rv_i2s_data;
@@ -535,53 +435,28 @@ static int acp3x_audio_probe(struct platform_device *pdev)
adata->i2s_irq = res->start;
dev_set_drvdata(&pdev->dev, adata);
- /* Initialize ACP */
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
-
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
NULL, 0);
if (status) {
dev_err(&pdev->dev, "Fail to register acp i2s component\n");
- ret = -ENODEV;
- goto dev_err;
+ return -ENODEV;
}
status = devm_request_irq(&pdev->dev, adata->i2s_irq, i2s_irq_handler,
irqflags, "ACP3x_I2S_IRQ", adata);
if (status) {
dev_err(&pdev->dev, "ACP3x I2S IRQ request failed\n");
- ret = -ENODEV;
- goto dev_err;
+ return -ENODEV;
}
pm_runtime_set_autosuspend_delay(&pdev->dev, 5000);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_enable(&pdev->dev);
return 0;
-
-dev_err:
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_dbg(&pdev->dev, "ACP de-initialized\n");
- return ret;
}
static int acp3x_audio_remove(struct platform_device *pdev)
{
- struct i2s_dev_data *adata;
- int ret;
-
- adata = dev_get_drvdata(&pdev->dev);
- ret = acp3x_deinit(adata->acp3x_base);
- if (ret)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_dbg(&pdev->dev, "ACP de-initialized\n");
-
pm_runtime_disable(&pdev->dev);
return 0;
}
@@ -589,13 +464,9 @@ static int acp3x_audio_remove(struct platform_device *pdev)
static int acp3x_resume(struct device *dev)
{
struct i2s_dev_data *adata;
- int status;
u32 val;
adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
if (adata->play_stream && adata->play_stream->runtime) {
struct i2s_stream_instance *rtd =
@@ -642,14 +513,8 @@ static int acp3x_resume(struct device *dev)
static int acp3x_pcm_runtime_suspend(struct device *dev)
{
struct i2s_dev_data *adata;
- int status;
adata = dev_get_drvdata(dev);
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(dev, "ACP de-init failed\n");
- else
- dev_dbg(dev, "ACP de-initialized\n");
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
@@ -659,12 +524,9 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
static int acp3x_pcm_runtime_resume(struct device *dev)
{
struct i2s_dev_data *adata;
- int status;
adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
+
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 01b283a..cf16ceb 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -65,6 +65,13 @@
#define SLOT_WIDTH_16 0x10
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+#define ACP_PGFSM_CNTL_POWER_ON_MASK 0x01
+#define ACP_PGFSM_CNTL_POWER_OFF_MASK 0x00
+#define ACP_PGFSM_STATUS_MASK 0x03
+#define ACP_POWERED_ON 0x00
+#define ACP_POWER_ON_IN_PROGRESS 0x01
+#define ACP_POWERED_OFF 0x02
+#define ACP_POWER_OFF_IN_PROGRESS 0x03
struct acp3x_platform_info {
u16 play_i2s_instance;
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index be2670f..e5dda9b 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -9,6 +9,9 @@
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
+#include <linux/pm_runtime.h>
+#include <linux/delay.h>
+#include <sound/pcm.h>
#include "acp3x.h"
@@ -19,6 +22,125 @@ struct acp3x_dev_data {
struct platform_device *pdev[ACP3x_DEVS];
};
+static int acp3x_power_on(void __iomem *acp3x_base)
+{
+ u32 val;
+ u32 timeout;
+
+ timeout = 0;
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+
+ if (val == 0)
+ return val;
+
+ if (!((val & ACP_PGFSM_STATUS_MASK) ==
+ ACP_POWER_ON_IN_PROGRESS))
+ rv_writel(ACP_PGFSM_CNTL_POWER_ON_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ while (++timeout) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if (!val)
+ break;
+ udelay(1);
+ if (timeout > 500) {
+ pr_err("ACP is Not Powered ON\n");
+ return -ETIMEDOUT;
+ }
+ }
+ return 0;
+}
+
+static int acp3x_power_off(void __iomem *acp3x_base)
+{
+ u32 val;
+ u32 timeout, ret;
+
+ timeout = 0;
+ rv_writel(ACP_PGFSM_CNTL_POWER_OFF_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ while (++timeout) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if ((val & ACP_PGFSM_STATUS_MASK) == ACP_POWERED_OFF) {
+ ret = 0;
+ break;
+ }
+ udelay(1);
+ if (timeout > 500) {
+ pr_err("ACP is Not Powered OFF\n");
+ ret = -ETIMEDOUT;
+ break;
+ }
+ }
+ return ret;
+}
+
+static int acp3x_reset(void __iomem *acp3x_base)
+{
+ u32 val, timeout;
+
+ rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
+ timeout > 100) {
+ if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
+ break;
+ return -ENODEV;
+ }
+ cpu_relax();
+ }
+ rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if (!val)
+ break;
+ if (timeout > 100)
+ return -ENODEV;
+ cpu_relax();
+ }
+ return 0;
+}
+
+static int acp3x_init(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* power on */
+ ret = acp3x_power_on(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power on failed\n");
+ return ret;
+ }
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ return 0;
+}
+
+static int acp3x_deinit(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ /* power off */
+ ret = acp3x_power_off(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power off failed\n");
+ return ret;
+ }
+ return 0;
+}
+
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
@@ -64,6 +186,9 @@ static int snd_acp3x_probe(struct pci_dev *pci,
}
pci_set_master(pci);
pci_set_drvdata(pci, adata);
+ ret = acp3x_init(adata->acp3x_base);
+ if (ret)
+ goto release_regions;
val = rv_readl(adata->acp3x_base + mmACP_I2S_PIN_CONFIG);
switch (val) {
@@ -73,7 +198,7 @@ static int snd_acp3x_probe(struct pci_dev *pci,
GFP_KERNEL);
if (!adata->res) {
ret = -ENOMEM;
- goto release_regions;
+ goto release_resource;
}
adata->res[0].name = "acp3x_i2s_iomem";
@@ -134,12 +259,23 @@ static int snd_acp3x_probe(struct pci_dev *pci,
ret = -ENODEV;
goto release_regions;
}
+ pm_runtime_set_autosuspend_delay(&pci->dev, 5000);
+ pm_runtime_use_autosuspend(&pci->dev);
+ pm_runtime_set_active(&pci->dev);
+ pm_runtime_put_noidle(&pci->dev);
+ pm_runtime_enable(&pci->dev);
return 0;
unmap_mmio:
if (val == I2S_MODE)
for (i = 0 ; i < ACP3x_DEVS ; i++)
platform_device_unregister(adata->pdev[i]);
+release_resource:
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_dbg(&pci->dev, "ACP de-initialized\n");
release_regions:
pci_disable_msi(pci);
adata_free:
@@ -150,15 +286,58 @@ static int snd_acp3x_probe(struct pci_dev *pci,
return ret;
}
+static int snd_acp3x_suspend(struct device *dev)
+{
+ int status;
+ struct acp3x_dev_data *adata;
+
+ adata = dev_get_drvdata(dev);
+ status = acp3x_deinit(adata->acp3x_base);
+ if (status)
+ dev_err(dev, "ACP de-init failed\n");
+ else
+ dev_dbg(dev, "ACP de-initialized\n");
+
+ return 0;
+}
+
+static int snd_acp3x_resume(struct device *dev)
+{
+ int status;
+ struct acp3x_dev_data *adata;
+
+ adata = dev_get_drvdata(dev);
+ status = acp3x_init(adata->acp3x_base);
+ if (status) {
+ dev_err(dev, "ACP init failed\n");
+ return status;
+ }
+ return 0;
+}
+
+static const struct dev_pm_ops acp3x_pm = {
+ .runtime_suspend = snd_acp3x_suspend,
+ .runtime_resume = snd_acp3x_resume,
+ .resume = snd_acp3x_resume,
+};
+
static void snd_acp3x_remove(struct pci_dev *pci)
{
- struct acp3x_dev_data *adata = pci_get_drvdata(pci);
- int i;
+ struct acp3x_dev_data *adata;
+ int i, ret;
+ adata = pci_get_drvdata(pci);
if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
for (i = 0 ; i < ACP3x_DEVS ; i++)
platform_device_unregister(adata->pdev[i]);
}
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_dbg(&pci->dev, "ACP de-initialized\n");
+ pm_runtime_disable(&pci->dev);
+ pm_runtime_get_noresume(&pci->dev);
pci_disable_msi(pci);
pci_release_regions(pci);
pci_disable_device(pci);
@@ -177,6 +356,9 @@ static struct pci_driver acp3x_driver = {
.id_table = snd_acp3x_ids,
.probe = snd_acp3x_probe,
.remove = snd_acp3x_remove,
+ .driver = {
+ .pm = &acp3x_pm,
+ }
};
module_pci_driver(acp3x_driver);
--
2.7.4
1
0

[alsa-devel] [PATCH v8 5/6] ASoC: amd: Handle ACP3x I2S-SP Interrupts.
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
Enabled support for I2S-SP interrupt handling.
Previous to this implementation, driver supports only interrupts
on BT instance.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 4fd3fc8..819ec3a 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -177,6 +177,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->play_stream);
play_flag = 1;
}
+ if ((val & BIT(I2S_TX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_play_stream) {
+ rv_writel(BIT(I2S_TX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_play_stream);
+ play_flag = 1;
+ }
if ((val & BIT(BT_RX_THRESHOLD)) && rv_i2s_data->capture_stream) {
rv_writel(BIT(BT_RX_THRESHOLD), rv_i2s_data->acp3x_base +
@@ -184,6 +191,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->capture_stream);
cap_flag = 1;
}
+ if ((val & BIT(I2S_RX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_capture_stream) {
+ rv_writel(BIT(I2S_RX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_capture_stream);
+ cap_flag = 1;
+ }
if (play_flag | cap_flag)
return IRQ_HANDLED;
--
2.7.4
1
0

[alsa-devel] [PATCH v8 4/6] ASoC: amd: add ACP3x TDM mode support
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
ACP3x I2S (CPU DAI) can act in normal I2S and TDM modes. Added support
for TDM mode. Desired mode can be selected from ASoC machine driver.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 42 +++++++++++++++++++++++++++++++----------
sound/soc/amd/raven/acp3x.h | 2 ++
2 files changed, 34 insertions(+), 10 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index b039dac..d7aa345 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -44,8 +44,8 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
u32 rx_mask, int slots, int slot_width)
{
struct i2s_dev_data *adata;
- u32 val;
u16 slot_len;
+ u32 val, flen, reg_val, frmt_reg;
adata = snd_soc_dai_get_drvdata(cpu_dai);
@@ -68,16 +68,38 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
return -EINVAL;
}
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_IRER);
-
- val = FRM_LEN | (slots << 15) | (slot_len << 18);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+ /* Enable I2S / BT channels TDM and respective
+ * I2S/BT`s TX/RX Formats frame lengths.
+ */
+ flen = FRM_LEN | (slots << 15) | (slot_len << 18);
- adata->tdm_fmt = val;
+ if (adata->substream_type == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ frmt_reg = mmACP_BTTDM_TXFRMT;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ frmt_reg = mmACP_I2STDM_TXFRMT;
+ }
+ } else {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ frmt_reg = mmACP_BTTDM_RXFRMT;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ frmt_reg = mmACP_I2STDM_RXFRMT;
+ }
+ }
+ val = rv_readl(adata->acp3x_base + reg_val);
+ rv_writel(val | 0x2, adata->acp3x_base + reg_val);
+ rv_writel(flen, adata->acp3x_base + frmt_reg);
+ adata->tdm_fmt = flen;
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index c071477..01b283a 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -76,6 +76,8 @@ struct i2s_dev_data {
bool tdm_mode;
unsigned int i2s_irq;
u32 tdm_fmt;
+ u16 i2s_instance;
+ u32 substream_type;
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
--
2.7.4
1
0

[alsa-devel] [PATCH v8 3/6] ASoC: amd: Enabling I2S instance in DMA and DAI
by Ravulapati Vishnu vardhan rao 19 Nov '19
by Ravulapati Vishnu vardhan rao 19 Nov '19
19 Nov '19
This patch adds I2S SP support in ACP PCM DMA and DAI.
Added I2S support in DMA and DAI probe,its hw_params handling
its open and close functionalities.
This enable to open and close on the SP instance for
playback and capture.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 119 ++++++++++++++++++----
sound/soc/amd/raven/acp3x-pcm-dma.c | 193 +++++++++++++++++++++++++-----------
sound/soc/amd/raven/acp3x.h | 74 +++++++++++---
3 files changed, 294 insertions(+), 92 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index 390d07a..b039dac 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -86,10 +86,22 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct i2s_stream_instance *rtd;
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
u32 val;
u32 reg_val;
+ prtd = substream->private_data;
rtd = substream->runtime->private_data;
+ card = prtd->card;
+ pinfo = snd_soc_card_get_drvdata(card);
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_U8:
@@ -108,11 +120,25 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
default:
return -EINVAL;
}
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- reg_val = mmACP_BTTDM_ITER;
- else
- reg_val = mmACP_BTTDM_IRER;
-
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ }
+ }
val = rv_readl(rtd->acp3x_base + reg_val);
val = val | (rtd->xfer_resolution << 3);
rv_writel(val, rtd->acp3x_base + reg_val);
@@ -123,10 +149,21 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{
struct i2s_stream_instance *rtd;
- u32 val, period_bytes;
- int ret, reg_val;
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
+ u32 ret, val, period_bytes, reg_val, ier_val, water_val;
+ prtd = substream->private_data;
rtd = substream->runtime->private_data;
+ card = prtd->card;
+ pinfo = snd_soc_card_get_drvdata(card);
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
period_bytes = frames_to_bytes(substream->runtime,
substream->runtime->period_size);
switch (cmd) {
@@ -136,31 +173,75 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
rtd->bytescount = acp_get_byte_count(rtd,
substream->stream);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- reg_val = mmACP_BTTDM_ITER;
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_TX_INTR_WATERMARK_SIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ water_val =
+ mmACP_BT_TX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_BTTDM_ITER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ water_val =
+ mmACP_I2S_TX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_I2STDM_ITER;
+ ier_val = mmACP_I2STDM_IER;
+ }
} else {
- reg_val = mmACP_BTTDM_IRER;
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_RX_INTR_WATERMARK_SIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ water_val =
+ mmACP_BT_RX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_BTTDM_IRER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ water_val =
+ mmACP_I2S_RX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_I2STDM_IRER;
+ ier_val = mmACP_I2STDM_IER;
+ }
}
+ rv_writel(period_bytes, rtd->acp3x_base + water_val);
val = rv_readl(rtd->acp3x_base + reg_val);
val = val | BIT(0);
rv_writel(val, rtd->acp3x_base + reg_val);
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
+ rv_writel(1, rtd->acp3x_base + ier_val);
+ ret = 0;
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- reg_val = mmACP_BTTDM_ITER;
- else
- reg_val = mmACP_BTTDM_IRER;
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ ier_val = mmACP_I2STDM_IER;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ ier_val = mmACP_I2STDM_IER;
+ }
+ }
val = rv_readl(rtd->acp3x_base + reg_val);
val = val & ~BIT(0);
rv_writel(val, rtd->acp3x_base + reg_val);
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
+ rv_writel(0, rtd->acp3x_base + ier_val);
+ ret = 0;
break;
default:
ret = -EINVAL;
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 0202737..4fd3fc8 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -194,20 +194,36 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
{
u16 page_idx;
- u32 low, high, val, acp_fifo_addr;
- dma_addr_t addr = rtd->dma_addr;
+ uint64_t low, high, val, acp_fifo_addr;
+ uint64_t reg_ringbuf_size, reg_dma_size, reg_fifo_size, reg_fifo_addr;
+ dma_addr_t addr;
- /* 8 scratch registers used to map one 64 bit address */
- if (direction == SNDRV_PCM_STREAM_PLAYBACK)
- val = 0;
- else
- val = rtd->num_pages * 8;
+ addr = rtd->dma_addr;
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_PB_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_PB_PTE_OFFSET;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_CP_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_CP_PTE_OFFSET;
+ }
+ }
/* Group Enable */
rv_writel(ACP_SRAM_PTE_OFFSET | BIT(31), rtd->acp3x_base +
- mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
+ mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
rv_writel(PAGE_SIZE_4K_ENABLE, rtd->acp3x_base +
- mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
+ mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
for (page_idx = 0; page_idx < rtd->num_pages; page_idx++) {
/* Load the low address of page int ACP SRAM through SRBM */
@@ -224,38 +240,61 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
}
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_TX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET + (rtd->num_pages * 8)
- + PLAYBACK_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_TX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_TX_FIFOSIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_ringbuf_size = mmACP_BT_TX_RINGBUFSIZE;
+ reg_dma_size = mmACP_BT_TX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_PB_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_BT_TX_FIFOADDR;
+ reg_fifo_size = mmACP_BT_TX_FIFOSIZE;
+ rv_writel(I2S_BT_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_TX_RINGBUFADDR);
+ break;
+
+ case I2S_SP_INSTANCE:
+ default:
+ reg_ringbuf_size = mmACP_I2S_TX_RINGBUFSIZE;
+ reg_dma_size = mmACP_I2S_TX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_PB_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_I2S_TX_FIFOADDR;
+ reg_fifo_size = mmACP_I2S_TX_FIFOSIZE;
+ rv_writel(I2S_SP_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_TX_RINGBUFADDR);
+ }
} else {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START + MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_RX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
- (rtd->num_pages * 8) + CAPTURE_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_RX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_RX_FIFOSIZE);
- }
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_ringbuf_size = mmACP_BT_RX_RINGBUFSIZE;
+ reg_dma_size = mmACP_BT_RX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_CAPT_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_BT_RX_FIFOADDR;
+ reg_fifo_size = mmACP_BT_RX_FIFOSIZE;
+ rv_writel(I2S_BT_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_RX_RINGBUFADDR);
+ break;
- /* Enable watermark/period interrupt to host */
- rv_writel(BIT(BT_TX_THRESHOLD) | BIT(BT_RX_THRESHOLD),
- rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
+ case I2S_SP_INSTANCE:
+ default:
+ reg_ringbuf_size = mmACP_I2S_RX_RINGBUFSIZE;
+ reg_dma_size = mmACP_I2S_RX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_CAPT_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_I2S_RX_FIFOADDR;
+ reg_fifo_size = mmACP_I2S_RX_FIFOSIZE;
+ rv_writel(I2S_SP_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_RX_RINGBUFADDR);
+ }
+ }
+ rv_writel(MAX_BUFFER, rtd->acp3x_base + reg_ringbuf_size);
+ rv_writel(DMA_SIZE, rtd->acp3x_base + reg_dma_size);
+ rv_writel(acp_fifo_addr, rtd->acp3x_base + reg_fifo_addr);
+ rv_writel(FIFO_SIZE, rtd->acp3x_base + reg_fifo_size);
+ rv_writel(BIT(I2S_RX_THRESHOLD) | BIT(BT_RX_THRESHOLD)
+ | BIT(I2S_TX_THRESHOLD) | BIT(BT_TX_THRESHOLD),
+ rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
}
static int acp3x_dma_open(struct snd_soc_component *component,
@@ -289,17 +328,21 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return ret;
}
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = substream;
- else
+ adata->i2ssp_play_stream = substream;
+ } else {
adata->capture_stream = substream;
+ adata->i2ssp_capture_stream = substream;
+ }
i2s_data->acp3x_base = adata->acp3x_base;
runtime->private_data = i2s_data;
- return 0;
+ return ret;
}
@@ -307,16 +350,28 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
- struct snd_pcm_runtime *runtime;
struct i2s_stream_instance *rtd;
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
int status;
u64 size;
- runtime = substream->runtime;
- rtd = substream->private_data;
+ prtd = substream->private_data;
+ card = prtd->card;
+ pinfo = snd_soc_card_get_drvdata(card);
+ rtd = substream->runtime->private_data;
if (!rtd)
return -EINVAL;
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ } else
+ pr_err("pinfo failed\n");
+
size = params_buffer_bytes(params);
status = snd_pcm_lib_malloc_pages(substream, size);
if (status < 0)
@@ -337,12 +392,25 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
struct i2s_stream_instance *rtd;
u32 pos;
u32 buffersize;
u64 bytescount;
+ prtd = substream->private_data;
+ card = prtd->card;
rtd = substream->runtime->private_data;
+ pinfo = snd_soc_card_get_drvdata(card);
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
+
buffersize = frames_to_bytes(substream->runtime,
substream->runtime->buffer_size);
bytescount = acp_get_byte_count(rtd, substream->stream);
@@ -387,15 +455,19 @@ static int acp3x_dma_close(struct snd_soc_component *component,
component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
adata = dev_get_drvdata(component->dev);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = NULL;
- else
+ adata->i2ssp_play_stream = NULL;
+ } else {
adata->capture_stream = NULL;
+ adata->i2ssp_capture_stream = NULL;
+ }
/* Disable ACP irq, when the current stream is being closed and
* another stream is also not active.
*/
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ !adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
}
@@ -516,13 +588,16 @@ static int acp3x_resume(struct device *dev)
adata->play_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_PLAYBACK);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_ITER);
+ rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_TXFRMT);
+ mmACP_BTTDM_TXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_ITER);
+ mmACP_BTTDM_ITER);
}
}
@@ -531,13 +606,17 @@ static int acp3x_resume(struct device *dev)
adata->capture_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_CAPTURE);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_IRER);
+ rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
+
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_RXFRMT);
+ mmACP_BTTDM_RXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_IRER);
+ mmACP_BTTDM_IRER);
}
}
@@ -550,8 +629,8 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
{
struct i2s_dev_data *adata;
int status;
- adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_deinit(adata->acp3x_base);
if (status)
dev_err(dev, "ACP de-init failed\n");
@@ -567,8 +646,8 @@ static int acp3x_pcm_runtime_resume(struct device *dev)
{
struct i2s_dev_data *adata;
int status;
- adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_init(adata->acp3x_base);
if (status)
return -ENODEV;
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 72c1a23..c071477 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,6 +7,9 @@
#include "chip_offset_byte.h"
+#define I2S_SP_INSTANCE 0x01
+#define I2S_BT_INSTANCE 0x02
+
#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
@@ -17,8 +20,11 @@
#define ACP3x_BT_TDM_REG_START 0x1242800
#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
+#define I2S_RX_THRESHOLD 27
+#define I2S_TX_THRESHOLD 28
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
+#define ACP_ERR_INTR_MASK 29
#define ACP3x_POWER_ON 0x00
#define ACP3x_POWER_ON_IN_PROGRESS 0x01
#define ACP3x_POWER_OFF 0x02
@@ -26,19 +32,28 @@
#define ACP3x_SOFT_RESET__SoftResetAudDone_MASK 0x00010001
#define ACP_SRAM_PTE_OFFSET 0x02050000
+#define ACP_SRAM_SP_PB_PTE_OFFSET 0x0
+#define ACP_SRAM_SP_CP_PTE_OFFSET 0x100
+#define ACP_SRAM_BT_PB_PTE_OFFSET 0x200
+#define ACP_SRAM_BT_CP_PTE_OFFSET 0x300
#define PAGE_SIZE_4K_ENABLE 0x2
-#define MEM_WINDOW_START 0x4000000
-#define PLAYBACK_FIFO_ADDR_OFFSET 0x400
-#define CAPTURE_FIFO_ADDR_OFFSET 0x500
+#define I2S_SP_TX_MEM_WINDOW_START 0x4000000
+#define I2S_SP_RX_MEM_WINDOW_START 0x4020000
+#define I2S_BT_TX_MEM_WINDOW_START 0x4040000
+#define I2S_BT_RX_MEM_WINDOW_START 0x4060000
+#define SP_PB_FIFO_ADDR_OFFSET 0x500
+#define SP_CAPT_FIFO_ADDR_OFFSET 0x700
+#define BT_PB_FIFO_ADDR_OFFSET 0x900
+#define BT_CAPT_FIFO_ADDR_OFFSET 0xB00
#define PLAYBACK_MIN_NUM_PERIODS 2
#define PLAYBACK_MAX_NUM_PERIODS 8
-#define PLAYBACK_MAX_PERIOD_SIZE 16384
-#define PLAYBACK_MIN_PERIOD_SIZE 4096
+#define PLAYBACK_MAX_PERIOD_SIZE 8192
+#define PLAYBACK_MIN_PERIOD_SIZE 1024
#define CAPTURE_MIN_NUM_PERIODS 2
#define CAPTURE_MAX_NUM_PERIODS 8
-#define CAPTURE_MAX_PERIOD_SIZE 16384
-#define CAPTURE_MIN_PERIOD_SIZE 4096
+#define CAPTURE_MAX_PERIOD_SIZE 8192
+#define CAPTURE_MIN_PERIOD_SIZE 1024
#define MAX_BUFFER (PLAYBACK_MAX_PERIOD_SIZE * PLAYBACK_MAX_NUM_PERIODS)
#define MIN_BUFFER MAX_BUFFER
@@ -64,14 +79,20 @@ struct i2s_dev_data {
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
+ struct snd_pcm_substream *i2ssp_play_stream;
+ struct snd_pcm_substream *i2ssp_capture_stream;
};
struct i2s_stream_instance {
u16 num_pages;
+ u16 i2s_instance;
+ u16 capture_channel;
+ u16 direction;
u16 channels;
u32 xfer_resolution;
- u64 bytescount;
+ u32 val;
dma_addr_t dma_addr;
+ u64 bytescount;
void __iomem *acp3x_base;
};
@@ -91,15 +112,36 @@ static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
u64 byte_count;
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_LOW);
+ }
+
} else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_LOW);
+ }
}
return byte_count;
}
--
2.7.4
1
0

[alsa-devel] [PATCH 01/01] Add VID to support native DSD reproduction on FiiO devices.
by Emilio Moretti 19 Nov '19
by Emilio Moretti 19 Nov '19
19 Nov '19
Add VID to support native DSD reproduction on FiiO devices.
Signed-off-by: Emilio Moretti <emilio.moretti(a)gmail.com>
---
sound/usb/quirks.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 349e1e52996d..f5fc65aef628 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1658,6 +1658,7 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
case 0x25ce: /* Mytek devices */
case 0x278b: /* Rotel? */
case 0x292b: /* Gustard/Ess based devices */
+ case 0x2972: /* FiiO devices */
case 0x2ab6: /* T+A devices */
case 0x3842: /* EVGA */
case 0xc502: /* HiBy devices */
--
2.20.1
1
0

[alsa-devel] [PATCH v2 0/5] ALSA: hda - Add DP-MST support for NVIDIA codecs
by Nikhil Mahale 19 Nov '19
by Nikhil Mahale 19 Nov '19
19 Nov '19
Today, DisplayPort multi-stream transport (DP-MST) audio is not
supported on codec drivers which don't use the audio component
(acomp) binding.
The commit ade49db337a9 (ALSA: hda/hdmi - Allow audio component for
AMD/ATI and Nvidia HDMI) added the DRM audio component binding for
the NVIDIA codec drivers, but the traditional HD-audio unsolicited
event code path is still in use by the proprietary NVIDIA graphics
driver.
This patch set adds DP-MST audio support for non-acomp codec drivers
which use the traditional HD-audio unsolicited event code path. This
patch set adds DP-MST support for NVIDIA codecs.
The patch set has been tested for HDMI/DP-SST/DP-MST(4 dp-mst audio
streams) configurations on NVIDIA Kepler and Maxwell GPUs, using
both the nouveau driver and the proprietary NVIDIA graphics driver.
Nikhil Mahale (5):
ALSA: hda - Rename snd_hda_pin_sense to snd_hda_jack_pin_sense
ALSA: hda - Add DP-MST jack support
ALSA: hda - Add DP-MST conn list support
ALSA: hda - Add DP-MST support for non-acomp codecs
ALSA: hda - Add DP-MST support for NVIDIA codecs
sound/pci/hda/hda_codec.c | 5 +-
sound/pci/hda/hda_jack.c | 143 +++++++++++++++++--------
sound/pci/hda/hda_jack.h | 107 +++++++++++++++++--
sound/pci/hda/patch_hdmi.c | 256 +++++++++++++++++++++++++++++++--------------
4 files changed, 378 insertions(+), 133 deletions(-)
--
2.16.4
2
10

[alsa-devel] [PATCH v1 0/5] ALSA: hda - Add DP-MST support for NVIDIA codecs
by Nikhil Mahale 19 Nov '19
by Nikhil Mahale 19 Nov '19
19 Nov '19
Today, DisplayPort multi-stream transport (DP-MST) audio is not
supported on codec drivers which don't use the audio component
(acomp) binding.
The commit ade49db337a9 (ALSA: hda/hdmi - Allow audio component for
AMD/ATI and Nvidia HDMI) added the DRM audio component binding for
the NVIDIA codec drivers, but the traditional HD-audio unsolicited
event code path is still in use by the proprietary NVIDIA graphics
driver.
This patch set adds DP-MST audio support for non-acomp codec drivers
which use the traditional HD-audio unsolicited event code path. This
patch set adds DP-MST support for NVIDIA codecs.
The patch set has been tested for HDMI/DP-SST/DP-MST(4 dp-mst audio
streams) configurations on NVIDIA Kepler and Maxwell GPUs, using
both the nouveau driver and the proprietary NVIDIA graphics driver.
Nikhil Mahale (5):
ALSA: hda - Rename snd_hda_pin_sense to snd_hda_jack_pin_sense
ALSA: hda - Add DP-MST jack support
ALSA: hda - Add DP-MST conn list support
ALSA: hda - Add DP-MST support for non-acomp codecs
ALSA: hda - Add DP-MST support for NVIDIA codecs
sound/pci/hda/hda_codec.c | 5 +-
sound/pci/hda/hda_generic.c | 16 +--
sound/pci/hda/hda_jack.c | 111 ++++++++++++------
sound/pci/hda/hda_jack.h | 26 +++--
sound/pci/hda/patch_ca0132.c | 24 ++--
sound/pci/hda/patch_cirrus.c | 4 +-
sound/pci/hda/patch_conexant.c | 2 +-
sound/pci/hda/patch_hdmi.c | 255 +++++++++++++++++++++++++++++------------
sound/pci/hda/patch_realtek.c | 46 ++++----
sound/pci/hda/patch_sigmatel.c | 12 +-
10 files changed, 333 insertions(+), 168 deletions(-)
--
2.16.4
3
20

19 Nov '19
The current design of sending codec parameters assumes that decoders
will have parsers so they can parse the encoded stream for parameters
and configure the decoder.
But this assumption may not be universally true and we know some DSPs
which do not contain the parsers so additional parameters are required
to be passed.
So add these parameters starting with FLAC decoder. The size of
snd_codec_options is still 120 bytes after this change (due to this
being a union)
I think we should also bump the (minor) version if this proposal is
acceptable so the userspace can check and populate flac specific structure.
Along, with the core header change, patches are added to support FLAC
in Qualcomm drivers. This was tested on 96boards db845c
Srinivas Kandagatla (1):
ASoC: qcom: q6asm: add support to flac config
Vinod Koul (2):
ALSA: compress: add flac decoder params
ASoC: qcom: q6asm-dai: add support to flac decoder
include/uapi/sound/compress_params.h | 10 +++++
sound/soc/qcom/qdsp6/q6asm-dai.c | 35 +++++++++++++++++-
sound/soc/qcom/qdsp6/q6asm.c | 55 ++++++++++++++++++++++++++++
sound/soc/qcom/qdsp6/q6asm.h | 15 ++++++++
4 files changed, 114 insertions(+), 1 deletion(-)
--
2.23.0
4
10

18 Nov '19
Hi,
when the codec RST input is connected to a GPIO it needs to be pulled high in
order to take the pcm3168a out from reset and to make it respond to register
accesses via i2c.
I have a board where one GPIO line is connected to two pcm3168a codec so runtime
handling of the RST gpio is not possible (one codec would place the other codec
to reset as well).
The only possible solution is to request the gpio with
GPIOD_FLAGS_BIT_NONEXCLUSIVE flag, ask it to be high initially and never touch
it again.
If the optinal GPIO is not described then issue the reset as the driver did.
Regards,
Peter
---
Peter Ujfalusi (2):
bindings: sound: pcm3168a: Document optional RST gpio
ASoC: pcm3168a: Add support for optional RST gpio handling
.../devicetree/bindings/sound/ti,pcm3168a.txt | 7 ++++
sound/soc/codecs/pcm3168a.c | 38 +++++++++++++++++--
2 files changed, 41 insertions(+), 4 deletions(-)
--
Peter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
3
8

18 Nov '19
The patch
ASoC: SOF: Intel: Fix build break
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 302ee055af0201e61be7670f957c1622d6ce176e Mon Sep 17 00:00:00 2001
From: Mark Brown <broonie(a)kernel.org>
Date: Mon, 18 Nov 2019 15:52:47 +0000
Subject: [PATCH] ASoC: SOF: Intel: Fix build break
Commit 130d3e9077 (Fix CFL and CML FW nocodec binary names.) broke the
build in some configurations as it depends on changes in the development
branch, revert it.
Reported-by: Stephen Rothwell <sfr(a)canb.auug.org.au>
Signed-off-by: Mark Brown <broonie(a)kernel.org>
---
sound/soc/sof/sof-pci-dev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c
index 2ef927371b23..d66412a77873 100644
--- a/sound/soc/sof/sof-pci-dev.c
+++ b/sound/soc/sof/sof-pci-dev.c
@@ -113,7 +113,7 @@ static const struct sof_dev_desc cnl_desc = {
#if IS_ENABLED(CONFIG_SND_SOC_SOF_COFFEELAKE)
static const struct sof_dev_desc cfl_desc = {
- .machines = snd_soc_acpi_intel_cfl_machines,
+ .machines = snd_soc_acpi_intel_cnl_machines,
.resindex_lpe_base = 0,
.resindex_pcicfg_base = -1,
.resindex_imr_base = -1,
@@ -122,7 +122,7 @@ static const struct sof_dev_desc cfl_desc = {
.chip_info = &cnl_chip_info,
.default_fw_path = "intel/sof",
.default_tplg_path = "intel/sof-tplg",
- .nocodec_fw_filename = "sof-cfl.ri",
+ .nocodec_fw_filename = "sof-cnl.ri",
.nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
.ops = &sof_cnl_ops,
.arch_ops = &sof_xtensa_arch_ops
@@ -133,7 +133,7 @@ static const struct sof_dev_desc cfl_desc = {
IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_H)
static const struct sof_dev_desc cml_desc = {
- .machines = snd_soc_acpi_intel_cml_machines,
+ .machines = snd_soc_acpi_intel_cnl_machines,
.resindex_lpe_base = 0,
.resindex_pcicfg_base = -1,
.resindex_imr_base = -1,
@@ -142,7 +142,7 @@ static const struct sof_dev_desc cml_desc = {
.chip_info = &cnl_chip_info,
.default_fw_path = "intel/sof",
.default_tplg_path = "intel/sof-tplg",
- .nocodec_fw_filename = "sof-cml.ri",
+ .nocodec_fw_filename = "sof-cnl.ri",
.nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
.ops = &sof_cnl_ops,
.arch_ops = &sof_xtensa_arch_ops
--
2.20.1
1
0

[alsa-devel] [PATCH 0/3] ASoC: Intel/SOF: split CFL, CNL, CML firmware names
by Pierre-Louis Bossart 18 Nov '19
by Pierre-Louis Bossart 18 Nov '19
18 Nov '19
The manifests used for the three machines can be different, so let's
move to use different firmware names. When the files can be shared
between platforms, we will use a symlink in /lib/firmware.
This change may break early platforms who relies on custom
kernels/firmware, but this will be the format supported moving
forward for all SOF firmware releases. One platform - one name.
Liam Girdwood (1):
ASoC: SOF: Intel: Fix CFL and CML FW nocodec binary names.
Pierre-Louis Bossart (2):
ASoC: Intel: acpi-match: split CNL tables in three
ASoC: SOF: Intel: hda: use fallback for firmware name
include/sound/soc-acpi-intel-match.h | 2 +
sound/soc/intel/common/Makefile | 3 +-
.../intel/common/soc-acpi-intel-cfl-match.c | 18 ++++++
.../intel/common/soc-acpi-intel-cml-match.c | 56 +++++++++++++++++++
.../intel/common/soc-acpi-intel-cnl-match.c | 38 -------------
sound/soc/sof/intel/hda.c | 11 +++-
sound/soc/sof/sof-pci-dev.c | 8 +--
7 files changed, 91 insertions(+), 45 deletions(-)
create mode 100644 sound/soc/intel/common/soc-acpi-intel-cfl-match.c
create mode 100644 sound/soc/intel/common/soc-acpi-intel-cml-match.c
--
2.20.1
2
7

[alsa-devel] [PATCH] ASoC: tlv320aic31xx: configure output common-mode voltage
by Lucas Stach 18 Nov '19
by Lucas Stach 18 Nov '19
18 Nov '19
The tlv320aic31xx devices allow to adjust the output common-mode voltage
for best analog performance. The datasheet states that the common mode
voltage should be set to be <= AVDD/2.
This changes allows to configure the output common-mode voltage via a DT
property. If the property is absent the voltage is automatically chosen
as the highest voltage below/equal to AVDD/2.
Signed-off-by: Lucas Stach <l.stach(a)pengutronix.de>
---
.../bindings/sound/tlv320aic31xx.txt | 5 +++
sound/soc/codecs/tlv320aic31xx.c | 45 +++++++++++++++++++
sound/soc/codecs/tlv320aic31xx.h | 8 ++++
3 files changed, 58 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt b/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
index 5b3c33bb99e5..e372303697dc 100644
--- a/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
+++ b/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
@@ -29,6 +29,11 @@ Optional properties:
3 or MICBIAS_AVDD - MICBIAS output is connected to AVDD
If this node is not mentioned or if the value is unknown, then
micbias is set to 2.0V.
+- ai31xx-ocmv - output common-mode voltage setting
+ 0 - 1.35V,
+ 1 - 1.5V,
+ 2 - 1.65V,
+ 3 - 1.8V
Deprecated properties:
diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index df627a08def9..f6f19fdc72f5 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -171,6 +171,7 @@ struct aic31xx_priv {
int rate_div_line;
bool master_dapm_route_applied;
int irq;
+ u8 ocmv; /* output common-mode voltage */
};
struct aic31xx_rate_divs {
@@ -1312,6 +1313,11 @@ static int aic31xx_codec_probe(struct snd_soc_component *component)
if (ret)
return ret;
+ /* set output common-mode voltage */
+ snd_soc_component_update_bits(component, AIC31XX_HPDRIVER,
+ AIC31XX_HPD_OCMV_MASK,
+ aic31xx->ocmv << AIC31XX_HPD_OCMV_SHIFT);
+
return 0;
}
@@ -1501,6 +1507,43 @@ static irqreturn_t aic31xx_irq(int irq, void *data)
return IRQ_NONE;
}
+static void aic31xx_configure_ocmv(struct aic31xx_priv *priv)
+{
+ struct device *dev = priv->dev;
+ int dvdd, avdd;
+ u32 value;
+
+ if (dev->fwnode &&
+ fwnode_property_read_u32(dev->fwnode, "ai31xx-ocmv", &value)) {
+ /* OCMV setting is forced by DT */
+ if (value <= 3) {
+ priv->ocmv = value;
+ return;
+ }
+ }
+
+ avdd = regulator_get_voltage(priv->supplies[3].consumer);
+ dvdd = regulator_get_voltage(priv->supplies[5].consumer);
+
+ if (avdd > 3600000 || dvdd > 1950000) {
+ dev_warn(dev,
+ "Too high supply voltage(s) AVDD: %d, DVDD: %d\n",
+ avdd, dvdd);
+ } else if (avdd == 3600000 && dvdd == 1950000) {
+ priv->ocmv = AIC31XX_HPD_OCMV_1_8V;
+ } else if (avdd >= 3300000 && dvdd >= 1800000) {
+ priv->ocmv = AIC31XX_HPD_OCMV_1_65V;
+ } else if (avdd >= 3000000 && dvdd >= 1650000) {
+ priv->ocmv = AIC31XX_HPD_OCMV_1_5V;
+ } else if (avdd >= 2700000 && dvdd >= 1525000) {
+ priv->ocmv = AIC31XX_HPD_OCMV_1_35V;
+ } else {
+ dev_warn(dev,
+ "Invalid supply voltage(s) AVDD: %d, DVDD: %d\n",
+ avdd, dvdd);
+ }
+}
+
static int aic31xx_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
@@ -1570,6 +1613,8 @@ static int aic31xx_i2c_probe(struct i2c_client *i2c,
return ret;
}
+ aic31xx_configure_ocmv(aic31xx);
+
if (aic31xx->irq > 0) {
regmap_update_bits(aic31xx->regmap, AIC31XX_GPIO1,
AIC31XX_GPIO1_FUNC_MASK,
diff --git a/sound/soc/codecs/tlv320aic31xx.h b/sound/soc/codecs/tlv320aic31xx.h
index cb024955c978..83a8c7604cc3 100644
--- a/sound/soc/codecs/tlv320aic31xx.h
+++ b/sound/soc/codecs/tlv320aic31xx.h
@@ -232,6 +232,14 @@ struct aic31xx_pdata {
#define AIC31XX_HSD_HP 0x01
#define AIC31XX_HSD_HS 0x03
+/* AIC31XX_HPDRIVER */
+#define AIC31XX_HPD_OCMV_MASK GENMASK(4, 3)
+#define AIC31XX_HPD_OCMV_SHIFT 3
+#define AIC31XX_HPD_OCMV_1_35V 0x0
+#define AIC31XX_HPD_OCMV_1_5V 0x1
+#define AIC31XX_HPD_OCMV_1_65V 0x2
+#define AIC31XX_HPD_OCMV_1_8V 0x3
+
/* AIC31XX_MICBIAS */
#define AIC31XX_MICBIAS_MASK GENMASK(1, 0)
#define AIC31XX_MICBIAS_SHIFT 0
--
2.20.1
2
1

18 Nov '19
Changes since v1:
Updated commit message
Handle controls without subname
Call snd_ctl_notify() in wm_adsp_write_ctl()
3
4

[alsa-devel] [PATCH v7 1/6] ASoC: amd:Create multiple I2S platform device endpoint
by Ravulapati Vishnu vardhan rao 18 Nov '19
by Ravulapati Vishnu vardhan rao 18 Nov '19
18 Nov '19
Creates Platform Device endpoints for multiple
I2S instances: SP and BT endpoints device.
Pass PCI resources like MMIO, irq to the platform devices.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x.h | 5 ++
sound/soc/amd/raven/pci-acp3x.c | 102 ++++++++++++++++++++++++++++------------
2 files changed, 76 insertions(+), 31 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 4f2cadd..2f15fe1 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,10 +7,15 @@
#include "chip_offset_byte.h"
+#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
#define ACP3x_REG_START 0x1240000
#define ACP3x_REG_END 0x1250200
+#define ACP3x_I2STDM_REG_START 0x1242400
+#define ACP3x_I2STDM_REG_END 0x1242410
+#define ACP3x_BT_TDM_REG_START 0x1242800
+#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index facec24..174adbc 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -16,17 +16,17 @@ struct acp3x_dev_data {
void __iomem *acp3x_base;
bool acp3x_audio_mode;
struct resource *res;
- struct platform_device *pdev;
+ struct platform_device *pdev[ACP3x_DEVS];
};
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
- int ret;
- u32 addr, val;
struct acp3x_dev_data *adata;
- struct platform_device_info pdevinfo;
+ struct platform_device_info pdevinfo[ACP3x_DEVS];
unsigned int irqflags;
+ int ret, val, i;
+ u32 addr;
if (pci_enable_device(pci)) {
dev_err(&pci->dev, "pci_enable_device failed\n");
@@ -40,10 +40,10 @@ static int snd_acp3x_probe(struct pci_dev *pci,
}
adata = devm_kzalloc(&pci->dev, sizeof(struct acp3x_dev_data),
- GFP_KERNEL);
+ GFP_KERNEL);
if (!adata) {
ret = -ENOMEM;
- goto release_regions;
+ goto adata_free;
}
/* check for msi interrupt support */
@@ -56,7 +56,8 @@ static int snd_acp3x_probe(struct pci_dev *pci,
irqflags = 0;
addr = pci_resource_start(pci, 0);
- adata->acp3x_base = ioremap(addr, pci_resource_len(pci, 0));
+ adata->acp3x_base = devm_ioremap(&pci->dev, addr,
+ pci_resource_len(pci, 0));
if (!adata->acp3x_base) {
ret = -ENOMEM;
goto release_regions;
@@ -68,11 +69,11 @@ static int snd_acp3x_probe(struct pci_dev *pci,
switch (val) {
case I2S_MODE:
adata->res = devm_kzalloc(&pci->dev,
- sizeof(struct resource) * 2,
+ sizeof(struct resource) * 4,
GFP_KERNEL);
if (!adata->res) {
ret = -ENOMEM;
- goto unmap_mmio;
+ goto release_regions;
}
adata->res[0].name = "acp3x_i2s_iomem";
@@ -80,28 +81,52 @@ static int snd_acp3x_probe(struct pci_dev *pci,
adata->res[0].start = addr;
adata->res[0].end = addr + (ACP3x_REG_END - ACP3x_REG_START);
- adata->res[1].name = "acp3x_i2s_irq";
- adata->res[1].flags = IORESOURCE_IRQ;
- adata->res[1].start = pci->irq;
- adata->res[1].end = pci->irq;
+ adata->res[1].name = "acp3x_i2s_sp";
+ adata->res[1].flags = IORESOURCE_MEM;
+ adata->res[1].start = addr + ACP3x_I2STDM_REG_START;
+ adata->res[1].end = addr + ACP3x_I2STDM_REG_END;
+
+ adata->res[2].name = "acp3x_i2s_bt";
+ adata->res[2].flags = IORESOURCE_MEM;
+ adata->res[2].start = addr + ACP3x_BT_TDM_REG_START;
+ adata->res[2].end = addr + ACP3x_BT_TDM_REG_END;
+
+ adata->res[3].name = "acp3x_i2s_irq";
+ adata->res[3].flags = IORESOURCE_IRQ;
+ adata->res[3].start = pci->irq;
+ adata->res[3].end = adata->res[3].start;
adata->acp3x_audio_mode = ACP3x_I2S_MODE;
memset(&pdevinfo, 0, sizeof(pdevinfo));
- pdevinfo.name = "acp3x_rv_i2s";
- pdevinfo.id = 0;
- pdevinfo.parent = &pci->dev;
- pdevinfo.num_res = 2;
- pdevinfo.res = adata->res;
- pdevinfo.data = &irqflags;
- pdevinfo.size_data = sizeof(irqflags);
-
- adata->pdev = platform_device_register_full(&pdevinfo);
- if (IS_ERR(adata->pdev)) {
- dev_err(&pci->dev, "cannot register %s device\n",
- pdevinfo.name);
- ret = PTR_ERR(adata->pdev);
- goto unmap_mmio;
+ pdevinfo[0].name = "acp3x_rv_i2s_dma";
+ pdevinfo[0].id = 0;
+ pdevinfo[0].parent = &pci->dev;
+ pdevinfo[0].num_res = 4;
+ pdevinfo[0].res = &adata->res[0];
+ pdevinfo[0].data = &irqflags;
+ pdevinfo[0].size_data = sizeof(irqflags);
+
+ pdevinfo[1].name = "acp3x_i2s_playcap";
+ pdevinfo[1].id = 0;
+ pdevinfo[1].parent = &pci->dev;
+ pdevinfo[1].num_res = 1;
+ pdevinfo[1].res = &adata->res[1];
+
+ pdevinfo[2].name = "acp3x_i2s_playcap";
+ pdevinfo[2].id = 1;
+ pdevinfo[2].parent = &pci->dev;
+ pdevinfo[2].num_res = 1;
+ pdevinfo[2].res = &adata->res[2];
+ for (i = 0; i < ACP3x_DEVS ; i++) {
+ adata->pdev[i] =
+ platform_device_register_full(&pdevinfo[i]);
+ if (IS_ERR(adata->pdev[i])) {
+ dev_err(&pci->dev, "cannot register %s device\n",
+ pdevinfo[i].name);
+ ret = PTR_ERR(adata->pdev[i]);
+ goto unmap_mmio;
+ }
}
break;
default:
@@ -112,10 +137,22 @@ static int snd_acp3x_probe(struct pci_dev *pci,
return 0;
unmap_mmio:
+ if (val == I2S_MODE)
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+ devm_kfree(&pci->dev, adata->res);
+ devm_kfree(&pci->dev, adata);
pci_disable_msi(pci);
- iounmap(adata->acp3x_base);
+ pci_release_regions(pci);
+ pci_disable_device(pci);
release_regions:
+ devm_kfree(&pci->dev, adata);
+ pci_disable_msi(pci);
pci_release_regions(pci);
+ pci_disable_device(pci);
+adata_free:
+ pci_release_regions(pci);
+ pci_disable_device(pci);
disable_pci:
pci_disable_device(pci);
@@ -125,10 +162,12 @@ static int snd_acp3x_probe(struct pci_dev *pci,
static void snd_acp3x_remove(struct pci_dev *pci)
{
struct acp3x_dev_data *adata = pci_get_drvdata(pci);
+ int i;
- platform_device_unregister(adata->pdev);
- iounmap(adata->acp3x_base);
-
+ if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+ }
pci_disable_msi(pci);
pci_release_regions(pci);
pci_disable_device(pci);
@@ -151,6 +190,7 @@ static struct pci_driver acp3x_driver = {
module_pci_driver(acp3x_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_DESCRIPTION("AMD ACP3x PCI driver");
MODULE_LICENSE("GPL v2");
--
2.7.4
3
2

[alsa-devel] [asoc:for-5.4 438/441] sound/soc/sof/sof-pci-dev.c:136:15: error: 'snd_soc_acpi_intel_cml_machines' undeclared here (not in a function); did you mean 'snd_soc_acpi_intel_cnl_machines'?
by kbuild test robot 18 Nov '19
by kbuild test robot 18 Nov '19
18 Nov '19
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
head: fe23be2d85b05f561431d75acddec726ea807d2a
commit: 130d3e90777fe974e4b8fa100cec8faf19cac998 [438/441] ASoC: SOF: Intel: Fix CFL and CML FW nocodec binary names.
config: i386-randconfig-c002-20191117 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout 130d3e90777fe974e4b8fa100cec8faf19cac998
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> sound/soc/sof/sof-pci-dev.c:136:15: error: 'snd_soc_acpi_intel_cml_machines' undeclared here (not in a function); did you mean 'snd_soc_acpi_intel_cnl_machines'?
.machines = snd_soc_acpi_intel_cml_machines,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
snd_soc_acpi_intel_cnl_machines
vim +136 sound/soc/sof/sof-pci-dev.c
131
132 #if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_LP) || \
133 IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_H)
134
135 static const struct sof_dev_desc cml_desc = {
> 136 .machines = snd_soc_acpi_intel_cml_machines,
137 .resindex_lpe_base = 0,
138 .resindex_pcicfg_base = -1,
139 .resindex_imr_base = -1,
140 .irqindex_host_ipc = -1,
141 .resindex_dma_base = -1,
142 .chip_info = &cnl_chip_info,
143 .default_fw_path = "intel/sof",
144 .default_tplg_path = "intel/sof-tplg",
145 .nocodec_fw_filename = "sof-cml.ri",
146 .nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
147 .ops = &sof_cnl_ops,
148 .arch_ops = &sof_xtensa_arch_ops
149 };
150 #endif
151
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
3
2

18 Nov '19
Hi Mark
These are v3 of soc-core cleanup step4.
These are based on mark/for-5.5 branch.
These had been tested on Intel CI, and had no issue.
And are reviewed by Pierre-Louis, Ranjani.
Kuninori Morimoto (19):
ASoC: soc-core: move soc_init_dai_link()
ASoC: soc-core: tidyup soc_init_dai_link()
ASoC: soc-core: typo fix at soc_dai_link_sanity_check()
ASoC: soc-core: remove duplicated soc_is_dai_link_bound()
ASoC: soc-core: call soc_bind_dai_link() under snd_soc_add_dai_link()
ASoC: soc-core: add soc_unbind_dai_link()
ASoC: soc-core: move snd_soc_lookup_component()
ASoC: soc-core: tidyup snd_soc_lookup_component()
ASoC: soc-core: add snd_soc_del_component_unlocked()
ASoC: soc-core: remove snd_soc_component_add/del()
ASoC: soc-core: use snd_soc_lookup_component() at snd_soc_unregister_component()
ASoC: soc-core: move snd_soc_register_dai()
ASoC: soc-core: move snd_soc_unregister_dais()
ASoC: soc-core: add snd_soc_unregister_dai()
ASoC: soc-core: have legacy_dai_naming at snd_soc_register_dai()
ASoC: soc-core: don't call snd_soc_dapm_new_dai_widgets() at snd_soc_register_dai()
ASoC: soc-core: call snd_soc_register_dai() from snd_soc_register_dais()
ASoC: soc-core: remove topology specific operation
ASoC: soc.h: dobj is used only when SND_SOC_TOPOLOGY
include/sound/soc.h | 15 +-
sound/soc/soc-core.c | 526 ++++++++++++++++++++---------------------------
sound/soc/soc-topology.c | 17 +-
3 files changed, 255 insertions(+), 303 deletions(-)
--
2.7.4
6
59

[alsa-devel] [PATCH] ALSA: usb-audio: Fix incorrect NULL check in create_yamaha_midi_quirk()
by Takashi Iwai 18 Nov '19
by Takashi Iwai 18 Nov '19
18 Nov '19
The commit 60849562a5db ("ALSA: usb-audio: Fix possible NULL
dereference at create_yamaha_midi_quirk()") added NULL checks in
create_yamaha_midi_quirk(), but there was an overlook. The code
allows one of either injd or outjd is NULL, but the second if check
made returning -ENODEV if any of them is NULL. Fix it in a proper
form.
Fixes: 60849562a5db ("ALSA: usb-audio: Fix possible NULL dereference at create_yamaha_midi_quirk()")
Reported-by: Pavel Machek <pavel(a)denx.de>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
---
sound/usb/quirks.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 0bbe1201a6ac..349e1e52996d 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -248,8 +248,8 @@ static int create_yamaha_midi_quirk(struct snd_usb_audio *chip,
NULL, USB_MS_MIDI_OUT_JACK);
if (!injd && !outjd)
return -ENODEV;
- if (!(injd && snd_usb_validate_midi_desc(injd)) ||
- !(outjd && snd_usb_validate_midi_desc(outjd)))
+ if ((injd && !snd_usb_validate_midi_desc(injd)) ||
+ (outjd && !snd_usb_validate_midi_desc(outjd)))
return -ENODEV;
if (injd && (injd->bLength < 5 ||
(injd->bJackType != USB_MS_EMBEDDED &&
--
2.16.4
2
1

[alsa-devel] [PATCH v7 6/6] ASoC: amd: Added ACP3x system resume and runtime pm
by Ravulapati Vishnu vardhan rao 18 Nov '19
by Ravulapati Vishnu vardhan rao 18 Nov '19
18 Nov '19
When system wide suspend happens, ACP will be powered off
and when system resumes,for audio usecase to continue,all
the runtime configuration data needs to be programmed again.
Added resume pm call back to ACP pm ops and also added runtime
PM operations for ACP3x PCM platform device.
Device will enter into D3 state when there is no activity
on audio I2S lines.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 143 +--------------------------
sound/soc/amd/raven/acp3x.h | 7 ++
sound/soc/amd/raven/pci-acp3x.c | 189 +++++++++++++++++++++++++++++++++++-
3 files changed, 196 insertions(+), 143 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 3de2e25..4d577fc 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -58,106 +58,6 @@ static const struct snd_pcm_hardware acp3x_pcm_hardware_capture = {
.periods_max = CAPTURE_MAX_NUM_PERIODS,
};
-static int acp3x_power_on(void __iomem *acp3x_base, bool on)
-{
- u16 val, mask;
- u32 timeout;
-
- if (on == true) {
- val = 1;
- mask = ACP3x_POWER_ON;
- } else {
- val = 0;
- mask = ACP3x_POWER_OFF;
- }
-
- rv_writel(val, acp3x_base + mmACP_PGFSM_CONTROL);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
- if ((val & ACP3x_POWER_OFF_IN_PROGRESS) == mask)
- break;
- if (timeout > 100) {
- pr_err("ACP3x power state change failure\n");
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_reset(void __iomem *acp3x_base)
-{
- u32 val, timeout;
-
- rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
- timeout > 100) {
- if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
-
- rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if (!val || timeout > 100) {
- if (!val)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_init(void __iomem *acp3x_base)
-{
- int ret;
-
- /* power on */
- ret = acp3x_power_on(acp3x_base, true);
- if (ret) {
- pr_err("ACP3x power on failed\n");
- return ret;
- }
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- return 0;
-}
-
-static int acp3x_deinit(void __iomem *acp3x_base)
-{
- int ret;
-
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- /* power off */
- ret = acp3x_power_on(acp3x_base, false);
- if (ret) {
- pr_err("ACP3x power off failed\n");
- return ret;
- }
- return 0;
-}
-
static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
{
struct i2s_dev_data *rv_i2s_data;
@@ -536,26 +436,20 @@ static int acp3x_audio_probe(struct platform_device *pdev)
adata->i2s_irq = res->start;
dev_set_drvdata(&pdev->dev, adata);
- /* Initialize ACP */
- status = acp3x_init(adata->acp3x_base);
- if (status) {
- ret = -ENODEV;
- goto base_err;
- }
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
NULL, 0);
if (status) {
dev_err(&pdev->dev, "Fail to register acp i2s component\n");
ret = -ENODEV;
- goto dev_err;
+ goto base_err;
}
status = devm_request_irq(&pdev->dev, adata->i2s_irq, i2s_irq_handler,
irqflags, "ACP3x_I2S_IRQ", adata);
if (status) {
dev_err(&pdev->dev, "ACP3x I2S IRQ request failed\n");
ret = -ENODEV;
- goto dev_err;
+ goto base_err;
}
pm_runtime_set_autosuspend_delay(&pdev->dev, 5000);
@@ -563,14 +457,6 @@ static int acp3x_audio_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
return 0;
-dev_err:
- devm_kfree(&pdev->dev, adata);
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_dbg(&pdev->dev, "ACP de-initialized\n");
- return ret;
base_err:
devm_kfree(&pdev->dev, adata);
return ret;
@@ -578,16 +464,6 @@ static int acp3x_audio_probe(struct platform_device *pdev)
static int acp3x_audio_remove(struct platform_device *pdev)
{
- struct i2s_dev_data *adata;
- int ret;
-
- adata = dev_get_drvdata(&pdev->dev);
- ret = acp3x_deinit(adata->acp3x_base);
- if (ret)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_dbg(&pdev->dev, "ACP de-initialized\n");
-
pm_runtime_disable(&pdev->dev);
return 0;
}
@@ -595,13 +471,9 @@ static int acp3x_audio_remove(struct platform_device *pdev)
static int acp3x_resume(struct device *dev)
{
struct i2s_dev_data *adata;
- int status;
u32 val;
adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
if (adata->play_stream && adata->play_stream->runtime) {
struct i2s_stream_instance *rtd =
@@ -648,14 +520,8 @@ static int acp3x_resume(struct device *dev)
static int acp3x_pcm_runtime_suspend(struct device *dev)
{
struct i2s_dev_data *adata;
- int status;
adata = dev_get_drvdata(dev);
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(dev, "ACP de-init failed\n");
- else
- dev_dbg(dev, "ACP de-initialized\n");
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
@@ -665,12 +531,9 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
static int acp3x_pcm_runtime_resume(struct device *dev)
{
struct i2s_dev_data *adata;
- int status;
adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
+
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 01b283a..cf16ceb 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -65,6 +65,13 @@
#define SLOT_WIDTH_16 0x10
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+#define ACP_PGFSM_CNTL_POWER_ON_MASK 0x01
+#define ACP_PGFSM_CNTL_POWER_OFF_MASK 0x00
+#define ACP_PGFSM_STATUS_MASK 0x03
+#define ACP_POWERED_ON 0x00
+#define ACP_POWER_ON_IN_PROGRESS 0x01
+#define ACP_POWERED_OFF 0x02
+#define ACP_POWER_OFF_IN_PROGRESS 0x03
struct acp3x_platform_info {
u16 play_i2s_instance;
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index 174adbc..6d79e8d 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -9,6 +9,9 @@
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
+#include <linux/pm_runtime.h>
+#include <linux/delay.h>
+#include <sound/pcm.h>
#include "acp3x.h"
@@ -19,6 +22,120 @@ struct acp3x_dev_data {
struct platform_device *pdev[ACP3x_DEVS];
};
+static int acp3x_power_on(void __iomem *acp3x_base)
+{
+ u32 val;
+ u32 timeout;
+
+ timeout = 0;
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+
+ if (val == 0)
+ return val;
+
+ if (!((val & ACP_PGFSM_STATUS_MASK) ==
+ ACP_POWER_ON_IN_PROGRESS))
+ rv_writel(ACP_PGFSM_CNTL_POWER_ON_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ while (++timeout) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if (!val)
+ break;
+ udelay(1);
+ if (timeout > 500) {
+ pr_err("ACP is Not Powered ON\n");
+ return -ETIMEDOUT;
+ }
+ }
+ return 0;
+}
+static int acp3x_power_off(void __iomem *acp3x_base)
+{
+ u32 val;
+ u32 timeout, ret;
+
+ timeout = 0;
+ rv_writel(ACP_PGFSM_CNTL_POWER_OFF_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ while (++timeout) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if ((val & ACP_PGFSM_STATUS_MASK) == ACP_POWERED_OFF) {
+ ret = 0;
+ break;
+ }
+ udelay(1);
+ if (timeout > 500) {
+ pr_err("ACP is Not Powered OFF\n");
+ ret = -ETIMEDOUT;
+ break;
+ }
+ }
+ return ret;
+}
+static int acp3x_reset(void __iomem *acp3x_base)
+{
+ u32 val, timeout;
+
+ rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
+ timeout > 100) {
+ if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
+ break;
+ return -ENODEV;
+ }
+ cpu_relax();
+ }
+ rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if (!val)
+ break;
+ if (timeout > 100)
+ return -ENODEV;
+ cpu_relax();
+ }
+ return 0;
+}
+static int acp3x_init(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* power on */
+ ret = acp3x_power_on(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power on failed\n");
+ return ret;
+ }
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ return 0;
+}
+static int acp3x_deinit(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ /* power off */
+ ret = acp3x_power_off(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power off failed\n");
+ return ret;
+ }
+ return 0;
+}
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
@@ -64,6 +181,9 @@ static int snd_acp3x_probe(struct pci_dev *pci,
}
pci_set_master(pci);
pci_set_drvdata(pci, adata);
+ ret = acp3x_init(adata->acp3x_base);
+ if (ret)
+ goto release_regions;
val = rv_readl(adata->acp3x_base + mmACP_I2S_PIN_CONFIG);
switch (val) {
@@ -73,7 +193,7 @@ static int snd_acp3x_probe(struct pci_dev *pci,
GFP_KERNEL);
if (!adata->res) {
ret = -ENOMEM;
- goto release_regions;
+ goto release_resource;
}
adata->res[0].name = "acp3x_i2s_iomem";
@@ -134,9 +254,19 @@ static int snd_acp3x_probe(struct pci_dev *pci,
ret = -ENODEV;
goto unmap_mmio;
}
+ pm_runtime_set_autosuspend_delay(&pci->dev, 5000);
+ pm_runtime_use_autosuspend(&pci->dev);
+ pm_runtime_set_active(&pci->dev);
+ pm_runtime_put_noidle(&pci->dev);
+ pm_runtime_enable(&pci->dev);
return 0;
unmap_mmio:
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_dbg(&pci->dev, "ACP de-initialized\n");
if (val == I2S_MODE)
for (i = 0 ; i < ACP3x_DEVS ; i++)
platform_device_unregister(adata->pdev[i]);
@@ -145,6 +275,17 @@ static int snd_acp3x_probe(struct pci_dev *pci,
pci_disable_msi(pci);
pci_release_regions(pci);
pci_disable_device(pci);
+release_resource:
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_dbg(&pci->dev, "ACP de-initialized\n");
+ devm_kfree(&pci->dev, adata->res);
+ devm_kfree(&pci->dev, adata);
+ pci_disable_msi(pci);
+ pci_release_regions(pci);
+ pci_disable_device(pci);
release_regions:
devm_kfree(&pci->dev, adata);
pci_disable_msi(pci);
@@ -158,16 +299,55 @@ static int snd_acp3x_probe(struct pci_dev *pci,
return ret;
}
+static int snd_acp3x_suspend(struct device *dev)
+{
+ int status;
+ struct acp3x_dev_data *adata;
+ adata = dev_get_drvdata(dev);
+ status = acp3x_deinit(adata->acp3x_base);
+ if (status)
+ dev_err(dev, "ACP de-init failed\n");
+ else
+ dev_dbg(dev, "ACP de-initialized\n");
+
+ return 0;
+}
+static int snd_acp3x_resume(struct device *dev)
+{
+ int status;
+ struct acp3x_dev_data *adata;
+
+ adata = dev_get_drvdata(dev);
+ status = acp3x_init(adata->acp3x_base);
+ if (status) {
+ dev_err(dev, "ACP init failed\n");
+ return status;
+ }
+ return 0;
+}
+static const struct dev_pm_ops acp3x_pm = {
+ .runtime_suspend = snd_acp3x_suspend,
+ .runtime_resume = snd_acp3x_resume,
+ .resume = snd_acp3x_resume,
+};
static void snd_acp3x_remove(struct pci_dev *pci)
{
- struct acp3x_dev_data *adata = pci_get_drvdata(pci);
- int i;
+ struct acp3x_dev_data *adata;
+ int i, ret;
+ adata = pci_get_drvdata(pci);
if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
for (i = 0 ; i < ACP3x_DEVS ; i++)
platform_device_unregister(adata->pdev[i]);
}
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_dbg(&pci->dev, "ACP de-initialized\n");
+ pm_runtime_disable(&pci->dev);
+ pm_runtime_get_noresume(&pci->dev);
pci_disable_msi(pci);
pci_release_regions(pci);
pci_disable_device(pci);
@@ -186,6 +366,9 @@ static struct pci_driver acp3x_driver = {
.id_table = snd_acp3x_ids,
.probe = snd_acp3x_probe,
.remove = snd_acp3x_remove,
+ .driver = {
+ .pm = &acp3x_pm,
+ }
};
module_pci_driver(acp3x_driver);
--
2.7.4
1
0

[alsa-devel] [PATCH v7 5/6] ASoC: amd: Handle ACP3x I2S-SP Interrupts.
by Ravulapati Vishnu vardhan rao 18 Nov '19
by Ravulapati Vishnu vardhan rao 18 Nov '19
18 Nov '19
Enabled support for I2S-SP interrupt handling.
Previous to this implementation, driver supports only interrupts
on BT instance.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 1b8b10a..3de2e25 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -177,6 +177,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->play_stream);
play_flag = 1;
}
+ if ((val & BIT(I2S_TX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_play_stream) {
+ rv_writel(BIT(I2S_TX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_play_stream);
+ play_flag = 1;
+ }
if ((val & BIT(BT_RX_THRESHOLD)) && rv_i2s_data->capture_stream) {
rv_writel(BIT(BT_RX_THRESHOLD), rv_i2s_data->acp3x_base +
@@ -184,6 +191,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->capture_stream);
cap_flag = 1;
}
+ if ((val & BIT(I2S_RX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_capture_stream) {
+ rv_writel(BIT(I2S_RX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_capture_stream);
+ cap_flag = 1;
+ }
if (play_flag | cap_flag)
return IRQ_HANDLED;
--
2.7.4
1
0

[alsa-devel] [PATCH v7 4/6] ASoC: amd: add ACP3x TDM mode support
by Ravulapati Vishnu vardhan rao 18 Nov '19
by Ravulapati Vishnu vardhan rao 18 Nov '19
18 Nov '19
ACP3x I2S (CPU DAI) can act in normal I2S and TDM modes. Added support
for TDM mode. Desired mode can be selected from ASoC machine driver.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 42 +++++++++++++++++++++++++++++++----------
sound/soc/amd/raven/acp3x.h | 2 ++
2 files changed, 34 insertions(+), 10 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index e97e602..23e4b01 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -44,8 +44,8 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
u32 rx_mask, int slots, int slot_width)
{
struct i2s_dev_data *adata;
- u32 val;
u16 slot_len;
+ u32 val, flen, reg_val, frmt_reg;
adata = snd_soc_dai_get_drvdata(cpu_dai);
@@ -68,16 +68,38 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
return -EINVAL;
}
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_IRER);
-
- val = FRM_LEN | (slots << 15) | (slot_len << 18);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+ /* Enable I2S / BT channels TDM and respective
+ * I2S/BT`s TX/RX Formats frame lengths.
+ */
+ flen = FRM_LEN | (slots << 15) | (slot_len << 18);
- adata->tdm_fmt = val;
+ if (adata->substream_type == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ frmt_reg = mmACP_BTTDM_TXFRMT;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ frmt_reg = mmACP_I2STDM_TXFRMT;
+ }
+ } else {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ frmt_reg = mmACP_BTTDM_RXFRMT;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ frmt_reg = mmACP_I2STDM_RXFRMT;
+ }
+ }
+ val = rv_readl(adata->acp3x_base + reg_val);
+ rv_writel(val | 0x2, adata->acp3x_base + reg_val);
+ rv_writel(flen, adata->acp3x_base + frmt_reg);
+ adata->tdm_fmt = flen;
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index c071477..01b283a 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -76,6 +76,8 @@ struct i2s_dev_data {
bool tdm_mode;
unsigned int i2s_irq;
u32 tdm_fmt;
+ u16 i2s_instance;
+ u32 substream_type;
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
--
2.7.4
1
0

[alsa-devel] [PATCH v7 3/6] ASoC: amd: Enabling I2S instance in DMA and DAI
by Ravulapati Vishnu vardhan rao 18 Nov '19
by Ravulapati Vishnu vardhan rao 18 Nov '19
18 Nov '19
This patch adds I2S SP support in ACP PCM DMA and DAI.
Added I2S support in DMA and DAI probe,its hw_params handling
its open and close functionalities.
This enable to open and close on the SP instance for
playback and capture.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 119 ++++++++++++++++++----
sound/soc/amd/raven/acp3x-pcm-dma.c | 193 +++++++++++++++++++++++++-----------
sound/soc/amd/raven/acp3x.h | 74 +++++++++++---
3 files changed, 294 insertions(+), 92 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index 602920f..e97e602 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -86,10 +86,22 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct i2s_stream_instance *rtd;
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
u32 val;
u32 reg_val;
+ prtd = substream->private_data;
rtd = substream->runtime->private_data;
+ card = prtd->card;
+ pinfo = snd_soc_card_get_drvdata(card);
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_U8:
@@ -108,11 +120,25 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
default:
return -EINVAL;
}
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- reg_val = mmACP_BTTDM_ITER;
- else
- reg_val = mmACP_BTTDM_IRER;
-
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ }
+ }
val = rv_readl(rtd->acp3x_base + reg_val);
val = val | (rtd->xfer_resolution << 3);
rv_writel(val, rtd->acp3x_base + reg_val);
@@ -123,10 +149,21 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{
struct i2s_stream_instance *rtd;
- u32 val, period_bytes;
- int ret, reg_val;
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
+ u32 ret, val, period_bytes, reg_val, ier_val, water_val;
+ prtd = substream->private_data;
rtd = substream->runtime->private_data;
+ card = prtd->card;
+ pinfo = snd_soc_card_get_drvdata(card);
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
period_bytes = frames_to_bytes(substream->runtime,
substream->runtime->period_size);
switch (cmd) {
@@ -136,31 +173,75 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
rtd->bytescount = acp_get_byte_count(rtd,
substream->stream);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- reg_val = mmACP_BTTDM_ITER;
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_TX_INTR_WATERMARK_SIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ water_val =
+ mmACP_BT_TX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_BTTDM_ITER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ water_val =
+ mmACP_I2S_TX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_I2STDM_ITER;
+ ier_val = mmACP_I2STDM_IER;
+ }
} else {
- reg_val = mmACP_BTTDM_IRER;
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_RX_INTR_WATERMARK_SIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ water_val =
+ mmACP_BT_RX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_BTTDM_IRER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ water_val =
+ mmACP_I2S_RX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_I2STDM_IRER;
+ ier_val = mmACP_I2STDM_IER;
+ }
}
+ rv_writel(period_bytes, rtd->acp3x_base + water_val);
val = rv_readl(rtd->acp3x_base + reg_val);
val = val | BIT(0);
rv_writel(val, rtd->acp3x_base + reg_val);
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
+ rv_writel(1, rtd->acp3x_base + ier_val);
+ ret = 0;
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- reg_val = mmACP_BTTDM_ITER;
- else
- reg_val = mmACP_BTTDM_IRER;
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ ier_val = mmACP_I2STDM_IER;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ ier_val = mmACP_I2STDM_IER;
+ }
+ }
val = rv_readl(rtd->acp3x_base + reg_val);
val = val & ~BIT(0);
rv_writel(val, rtd->acp3x_base + reg_val);
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
+ rv_writel(0, rtd->acp3x_base + ier_val);
+ ret = 0;
break;
default:
ret = -EINVAL;
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index d5f8e24..1b8b10a 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -194,20 +194,36 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
{
u16 page_idx;
- u32 low, high, val, acp_fifo_addr;
- dma_addr_t addr = rtd->dma_addr;
+ uint64_t low, high, val, acp_fifo_addr;
+ uint64_t reg_ringbuf_size, reg_dma_size, reg_fifo_size, reg_fifo_addr;
+ dma_addr_t addr;
- /* 8 scratch registers used to map one 64 bit address */
- if (direction == SNDRV_PCM_STREAM_PLAYBACK)
- val = 0;
- else
- val = rtd->num_pages * 8;
+ addr = rtd->dma_addr;
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_PB_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_PB_PTE_OFFSET;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_CP_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_CP_PTE_OFFSET;
+ }
+ }
/* Group Enable */
rv_writel(ACP_SRAM_PTE_OFFSET | BIT(31), rtd->acp3x_base +
- mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
+ mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
rv_writel(PAGE_SIZE_4K_ENABLE, rtd->acp3x_base +
- mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
+ mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
for (page_idx = 0; page_idx < rtd->num_pages; page_idx++) {
/* Load the low address of page int ACP SRAM through SRBM */
@@ -224,38 +240,61 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
}
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_TX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET + (rtd->num_pages * 8)
- + PLAYBACK_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_TX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_TX_FIFOSIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_ringbuf_size = mmACP_BT_TX_RINGBUFSIZE;
+ reg_dma_size = mmACP_BT_TX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_PB_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_BT_TX_FIFOADDR;
+ reg_fifo_size = mmACP_BT_TX_FIFOSIZE;
+ rv_writel(I2S_BT_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_TX_RINGBUFADDR);
+ break;
+
+ case I2S_SP_INSTANCE:
+ default:
+ reg_ringbuf_size = mmACP_I2S_TX_RINGBUFSIZE;
+ reg_dma_size = mmACP_I2S_TX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_PB_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_I2S_TX_FIFOADDR;
+ reg_fifo_size = mmACP_I2S_TX_FIFOSIZE;
+ rv_writel(I2S_SP_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_TX_RINGBUFADDR);
+ }
} else {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START + MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_RX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
- (rtd->num_pages * 8) + CAPTURE_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_RX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_RX_FIFOSIZE);
- }
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_ringbuf_size = mmACP_BT_RX_RINGBUFSIZE;
+ reg_dma_size = mmACP_BT_RX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_CAPT_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_BT_RX_FIFOADDR;
+ reg_fifo_size = mmACP_BT_RX_FIFOSIZE;
+ rv_writel(I2S_BT_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_RX_RINGBUFADDR);
+ break;
- /* Enable watermark/period interrupt to host */
- rv_writel(BIT(BT_TX_THRESHOLD) | BIT(BT_RX_THRESHOLD),
- rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
+ case I2S_SP_INSTANCE:
+ default:
+ reg_ringbuf_size = mmACP_I2S_RX_RINGBUFSIZE;
+ reg_dma_size = mmACP_I2S_RX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_CAPT_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_I2S_RX_FIFOADDR;
+ reg_fifo_size = mmACP_I2S_RX_FIFOSIZE;
+ rv_writel(I2S_SP_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_RX_RINGBUFADDR);
+ }
+ }
+ rv_writel(MAX_BUFFER, rtd->acp3x_base + reg_ringbuf_size);
+ rv_writel(DMA_SIZE, rtd->acp3x_base + reg_dma_size);
+ rv_writel(acp_fifo_addr, rtd->acp3x_base + reg_fifo_addr);
+ rv_writel(FIFO_SIZE, rtd->acp3x_base + reg_fifo_size);
+ rv_writel(BIT(I2S_RX_THRESHOLD) | BIT(BT_RX_THRESHOLD)
+ | BIT(I2S_TX_THRESHOLD) | BIT(BT_TX_THRESHOLD),
+ rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
}
static int acp3x_dma_open(struct snd_soc_component *component,
@@ -289,17 +328,21 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return ret;
}
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = substream;
- else
+ adata->i2ssp_play_stream = substream;
+ } else {
adata->capture_stream = substream;
+ adata->i2ssp_capture_stream = substream;
+ }
i2s_data->acp3x_base = adata->acp3x_base;
runtime->private_data = i2s_data;
- return 0;
+ return ret;
}
@@ -307,16 +350,28 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
- struct snd_pcm_runtime *runtime;
struct i2s_stream_instance *rtd;
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
int status;
u64 size;
- runtime = substream->runtime;
- rtd = substream->private_data;
+ prtd = substream->private_data;
+ card = prtd->card;
+ pinfo = snd_soc_card_get_drvdata(card);
+ rtd = substream->runtime->private_data;
if (!rtd)
return -EINVAL;
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ } else
+ pr_err("pinfo failed\n");
+
size = params_buffer_bytes(params);
status = snd_pcm_lib_malloc_pages(substream, size);
if (status < 0)
@@ -337,12 +392,25 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
struct i2s_stream_instance *rtd;
u32 pos;
u32 buffersize;
u64 bytescount;
+ prtd = substream->private_data;
+ card = prtd->card;
rtd = substream->runtime->private_data;
+ pinfo = snd_soc_card_get_drvdata(card);
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
+
buffersize = frames_to_bytes(substream->runtime,
substream->runtime->buffer_size);
bytescount = acp_get_byte_count(rtd, substream->stream);
@@ -387,15 +455,19 @@ static int acp3x_dma_close(struct snd_soc_component *component,
component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
adata = dev_get_drvdata(component->dev);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = NULL;
- else
+ adata->i2ssp_play_stream = NULL;
+ } else {
adata->capture_stream = NULL;
+ adata->i2ssp_capture_stream = NULL;
+ }
/* Disable ACP irq, when the current stream is being closed and
* another stream is also not active.
*/
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ !adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
}
@@ -522,13 +594,16 @@ static int acp3x_resume(struct device *dev)
adata->play_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_PLAYBACK);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_ITER);
+ rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_TXFRMT);
+ mmACP_BTTDM_TXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_ITER);
+ mmACP_BTTDM_ITER);
}
}
@@ -537,13 +612,17 @@ static int acp3x_resume(struct device *dev)
adata->capture_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_CAPTURE);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_IRER);
+ rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
+
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_RXFRMT);
+ mmACP_BTTDM_RXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_IRER);
+ mmACP_BTTDM_IRER);
}
}
@@ -556,8 +635,8 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
{
struct i2s_dev_data *adata;
int status;
- adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_deinit(adata->acp3x_base);
if (status)
dev_err(dev, "ACP de-init failed\n");
@@ -573,8 +652,8 @@ static int acp3x_pcm_runtime_resume(struct device *dev)
{
struct i2s_dev_data *adata;
int status;
- adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_init(adata->acp3x_base);
if (status)
return -ENODEV;
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 72c1a23..c071477 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,6 +7,9 @@
#include "chip_offset_byte.h"
+#define I2S_SP_INSTANCE 0x01
+#define I2S_BT_INSTANCE 0x02
+
#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
@@ -17,8 +20,11 @@
#define ACP3x_BT_TDM_REG_START 0x1242800
#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
+#define I2S_RX_THRESHOLD 27
+#define I2S_TX_THRESHOLD 28
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
+#define ACP_ERR_INTR_MASK 29
#define ACP3x_POWER_ON 0x00
#define ACP3x_POWER_ON_IN_PROGRESS 0x01
#define ACP3x_POWER_OFF 0x02
@@ -26,19 +32,28 @@
#define ACP3x_SOFT_RESET__SoftResetAudDone_MASK 0x00010001
#define ACP_SRAM_PTE_OFFSET 0x02050000
+#define ACP_SRAM_SP_PB_PTE_OFFSET 0x0
+#define ACP_SRAM_SP_CP_PTE_OFFSET 0x100
+#define ACP_SRAM_BT_PB_PTE_OFFSET 0x200
+#define ACP_SRAM_BT_CP_PTE_OFFSET 0x300
#define PAGE_SIZE_4K_ENABLE 0x2
-#define MEM_WINDOW_START 0x4000000
-#define PLAYBACK_FIFO_ADDR_OFFSET 0x400
-#define CAPTURE_FIFO_ADDR_OFFSET 0x500
+#define I2S_SP_TX_MEM_WINDOW_START 0x4000000
+#define I2S_SP_RX_MEM_WINDOW_START 0x4020000
+#define I2S_BT_TX_MEM_WINDOW_START 0x4040000
+#define I2S_BT_RX_MEM_WINDOW_START 0x4060000
+#define SP_PB_FIFO_ADDR_OFFSET 0x500
+#define SP_CAPT_FIFO_ADDR_OFFSET 0x700
+#define BT_PB_FIFO_ADDR_OFFSET 0x900
+#define BT_CAPT_FIFO_ADDR_OFFSET 0xB00
#define PLAYBACK_MIN_NUM_PERIODS 2
#define PLAYBACK_MAX_NUM_PERIODS 8
-#define PLAYBACK_MAX_PERIOD_SIZE 16384
-#define PLAYBACK_MIN_PERIOD_SIZE 4096
+#define PLAYBACK_MAX_PERIOD_SIZE 8192
+#define PLAYBACK_MIN_PERIOD_SIZE 1024
#define CAPTURE_MIN_NUM_PERIODS 2
#define CAPTURE_MAX_NUM_PERIODS 8
-#define CAPTURE_MAX_PERIOD_SIZE 16384
-#define CAPTURE_MIN_PERIOD_SIZE 4096
+#define CAPTURE_MAX_PERIOD_SIZE 8192
+#define CAPTURE_MIN_PERIOD_SIZE 1024
#define MAX_BUFFER (PLAYBACK_MAX_PERIOD_SIZE * PLAYBACK_MAX_NUM_PERIODS)
#define MIN_BUFFER MAX_BUFFER
@@ -64,14 +79,20 @@ struct i2s_dev_data {
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
+ struct snd_pcm_substream *i2ssp_play_stream;
+ struct snd_pcm_substream *i2ssp_capture_stream;
};
struct i2s_stream_instance {
u16 num_pages;
+ u16 i2s_instance;
+ u16 capture_channel;
+ u16 direction;
u16 channels;
u32 xfer_resolution;
- u64 bytescount;
+ u32 val;
dma_addr_t dma_addr;
+ u64 bytescount;
void __iomem *acp3x_base;
};
@@ -91,15 +112,36 @@ static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
u64 byte_count;
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_LOW);
+ }
+
} else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_LOW);
+ }
}
return byte_count;
}
--
2.7.4
1
0

[alsa-devel] [PATCH v7 2/6] ASoC: amd: Refactoring of DAI from DMA driver
by Ravulapati Vishnu vardhan rao 18 Nov '19
by Ravulapati Vishnu vardhan rao 18 Nov '19
18 Nov '19
Asoc: PCM DMA driver should only have dma ops.
So Removed all DAI related functionality.Refactoring
the PCM DMA diver code.Added new file containing only DAI ops.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/Makefile | 2 +
sound/soc/amd/raven/acp3x-i2s.c | 272 ++++++++++++++++++++++++++++++
sound/soc/amd/raven/acp3x-pcm-dma.c | 319 ++++++++----------------------------
sound/soc/amd/raven/acp3x.h | 42 +++++
4 files changed, 385 insertions(+), 250 deletions(-)
create mode 100644 sound/soc/amd/raven/acp3x-i2s.c
diff --git a/sound/soc/amd/raven/Makefile b/sound/soc/amd/raven/Makefile
index 108d1ac..62c22b6 100644
--- a/sound/soc/amd/raven/Makefile
+++ b/sound/soc/amd/raven/Makefile
@@ -2,5 +2,7 @@
# Raven Ridge platform Support
snd-pci-acp3x-objs := pci-acp3x.o
snd-acp3x-pcm-dma-objs := acp3x-pcm-dma.o
+snd-acp3x-i2s-objs := acp3x-i2s.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-pci-acp3x.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-pcm-dma.o
+obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-i2s.o
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
new file mode 100644
index 0000000..602920f
--- /dev/null
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -0,0 +1,272 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// AMD ALSA SoC PCM Driver
+//
+//Copyright 2016 Advanced Micro Devices, Inc.
+
+#include <linux/platform_device.h>
+#include <linux/module.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/pm_runtime.h>
+#include <sound/pcm.h>
+#include <sound/pcm_params.h>
+#include <sound/soc.h>
+#include <sound/soc-dai.h>
+#include <linux/dma-mapping.h>
+
+#include "acp3x.h"
+
+#define DRV_NAME "acp3x-i2s"
+
+static int acp3x_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
+{
+ struct i2s_dev_data *adata;
+
+ adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
+
+ case SND_SOC_DAIFMT_I2S:
+ adata->tdm_mode = false;
+ break;
+ case SND_SOC_DAIFMT_DSP_A:
+ adata->tdm_mode = true;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
+ u32 rx_mask, int slots, int slot_width)
+{
+ struct i2s_dev_data *adata;
+ u32 val;
+ u16 slot_len;
+
+ adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ /* These values are as per Hardware Spec */
+
+ switch (slot_width) {
+ case SLOT_WIDTH_8:
+ slot_len = 8;
+ break;
+ case SLOT_WIDTH_16:
+ slot_len = 16;
+ break;
+ case SLOT_WIDTH_24:
+ slot_len = 24;
+ break;
+ case SLOT_WIDTH_32:
+ slot_len = 0;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_IRER);
+
+ val = FRM_LEN | (slots << 15) | (slot_len << 18);
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+
+ adata->tdm_fmt = val;
+ return 0;
+}
+
+static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ struct snd_soc_dai *dai)
+{
+ struct i2s_stream_instance *rtd;
+ u32 val;
+ u32 reg_val;
+
+ rtd = substream->runtime->private_data;
+
+ switch (params_format(params)) {
+ case SNDRV_PCM_FORMAT_U8:
+ case SNDRV_PCM_FORMAT_S8:
+ rtd->xfer_resolution = 0x0;
+ break;
+ case SNDRV_PCM_FORMAT_S16_LE:
+ rtd->xfer_resolution = 0x02;
+ break;
+ case SNDRV_PCM_FORMAT_S24_LE:
+ rtd->xfer_resolution = 0x04;
+ break;
+ case SNDRV_PCM_FORMAT_S32_LE:
+ rtd->xfer_resolution = 0x05;
+ break;
+ default:
+ return -EINVAL;
+ }
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ reg_val = mmACP_BTTDM_ITER;
+ else
+ reg_val = mmACP_BTTDM_IRER;
+
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ return 0;
+}
+
+static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
+ int cmd, struct snd_soc_dai *dai)
+{
+ struct i2s_stream_instance *rtd;
+ u32 val, period_bytes;
+ int ret, reg_val;
+
+ rtd = substream->runtime->private_data;
+ period_bytes = frames_to_bytes(substream->runtime,
+ substream->runtime->period_size);
+ switch (cmd) {
+ case SNDRV_PCM_TRIGGER_START:
+ case SNDRV_PCM_TRIGGER_RESUME:
+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+ rtd->bytescount = acp_get_byte_count(rtd,
+ substream->stream);
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ reg_val = mmACP_BTTDM_ITER;
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_TX_INTR_WATERMARK_SIZE);
+ } else {
+ reg_val = mmACP_BTTDM_IRER;
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_RX_INTR_WATERMARK_SIZE);
+ }
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ case SNDRV_PCM_TRIGGER_STOP:
+ case SNDRV_PCM_TRIGGER_SUSPEND:
+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ reg_val = mmACP_BTTDM_ITER;
+ else
+ reg_val = mmACP_BTTDM_IRER;
+
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ default:
+ ret = -EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
+static struct snd_soc_dai_ops acp3x_i2s_dai_ops = {
+ .hw_params = acp3x_i2s_hwparams,
+ .trigger = acp3x_i2s_trigger,
+ .set_fmt = acp3x_i2s_set_fmt,
+ .set_tdm_slot = acp3x_i2s_set_tdm_slot,
+};
+
+static const struct snd_soc_component_driver acp3x_dai_component = {
+ .name = "acp3x-i2s",
+};
+
+static struct snd_soc_dai_driver acp3x_i2s_dai = {
+ .playback = {
+ .rates = SNDRV_PCM_RATE_8000_96000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 8,
+
+ .rate_min = 8000,
+ .rate_max = 96000,
+ },
+ .capture = {
+ .rates = SNDRV_PCM_RATE_8000_48000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 2,
+ .rate_min = 8000,
+ .rate_max = 48000,
+ },
+ .ops = &acp3x_i2s_dai_ops,
+};
+
+
+static int acp3x_dai_probe(struct platform_device *pdev)
+{
+ struct resource *res;
+ struct i2s_dev_data *adata;
+ int status, ret;
+
+ adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data),
+ GFP_KERNEL);
+ if (!adata)
+ return -ENOMEM;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
+ ret = -ENOMEM;
+ goto dev_err;
+ }
+
+ adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
+ resource_size(res));
+ if (IS_ERR(adata->acp3x_base))
+ return PTR_ERR(adata->acp3x_base);
+
+ adata->i2s_irq = res->start;
+ dev_set_drvdata(&pdev->dev, adata);
+ status = devm_snd_soc_register_component(&pdev->dev,
+ &acp3x_dai_component,
+ &acp3x_i2s_dai, 1);
+ if (status) {
+ dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ ret = -ENODEV;
+ goto dev_err;
+ }
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 5000);
+ pm_runtime_use_autosuspend(&pdev->dev);
+ pm_runtime_enable(&pdev->dev);
+ return 0;
+dev_err:
+ devm_kfree(&pdev->dev, adata);
+ return ret;
+}
+
+static int acp3x_dai_remove(struct platform_device *pdev)
+{
+ pm_runtime_disable(&pdev->dev);
+ return 0;
+}
+static struct platform_driver acp3x_dai_driver = {
+ .probe = acp3x_dai_probe,
+ .remove = acp3x_dai_remove,
+ .driver = {
+ .name = "acp3x_i2s_playcap",
+ },
+};
+
+module_platform_driver(acp3x_dai_driver);
+
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
+MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:" DRV_NAME);
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 60709e3..d5f8e24 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -18,24 +18,6 @@
#define DRV_NAME "acp3x-i2s-audio"
-struct i2s_dev_data {
- bool tdm_mode;
- unsigned int i2s_irq;
- u32 tdm_fmt;
- void __iomem *acp3x_base;
- struct snd_pcm_substream *play_stream;
- struct snd_pcm_substream *capture_stream;
-};
-
-struct i2s_stream_instance {
- u16 num_pages;
- u16 channels;
- u32 xfer_resolution;
- u64 bytescount;
- dma_addr_t dma_addr;
- void __iomem *acp3x_base;
-};
-
static const struct snd_pcm_hardware acp3x_pcm_hardware_playback = {
.info = SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -178,10 +160,11 @@ static int acp3x_deinit(void __iomem *acp3x_base)
static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
{
+ struct i2s_dev_data *rv_i2s_data;
u16 play_flag, cap_flag;
u32 val;
- struct i2s_dev_data *rv_i2s_data = dev_id;
+ rv_i2s_data = dev_id;
if (!rv_i2s_data)
return IRQ_NONE;
@@ -278,11 +261,18 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
static int acp3x_dma_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- int ret = 0;
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
- struct i2s_stream_instance *i2s_data = kzalloc(sizeof(struct i2s_stream_instance),
- GFP_KERNEL);
+ struct snd_pcm_runtime *runtime;
+ struct snd_soc_pcm_runtime *prtd;
+ struct i2s_dev_data *adata;
+ struct i2s_stream_instance *i2s_data;
+ int ret;
+
+ runtime = substream->runtime;
+ prtd = substream->private_data;
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
+ adata = dev_get_drvdata(component->dev);
+ i2s_data = kzalloc(sizeof(struct i2s_stream_instance),
+ GFP_KERNEL);
if (!i2s_data)
return -EINVAL;
@@ -312,33 +302,18 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return 0;
}
-static u64 acp_get_byte_count(struct i2s_stream_instance *rtd, int direction)
-{
- u64 byte_count;
-
- if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
- } else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
- }
- return byte_count;
-}
static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
+ struct snd_pcm_runtime *runtime;
+ struct i2s_stream_instance *rtd;
int status;
u64 size;
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct i2s_stream_instance *rtd = runtime->private_data;
+ runtime = substream->runtime;
+ rtd = substream->private_data;
if (!rtd)
return -EINVAL;
@@ -362,12 +337,12 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- u32 pos = 0;
- u32 buffersize = 0;
- u64 bytescount = 0;
- struct i2s_stream_instance *rtd =
- substream->runtime->private_data;
+ struct i2s_stream_instance *rtd;
+ u32 pos;
+ u32 buffersize;
+ u64 bytescount;
+ rtd = substream->runtime->private_data;
buffersize = frames_to_bytes(substream->runtime,
substream->runtime->buffer_size);
bytescount = acp_get_byte_count(rtd, substream->stream);
@@ -380,7 +355,10 @@ static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
static int acp3x_dma_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd)
{
- struct device *parent = component->dev->parent;
+ struct device *parent;
+
+ component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+ parent = component->dev->parent;
snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_DEV,
parent, MIN_BUFFER, MAX_BUFFER);
return 0;
@@ -402,8 +380,12 @@ static int acp3x_dma_mmap(struct snd_soc_component *component,
static int acp3x_dma_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
- struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
+ struct snd_soc_pcm_runtime *prtd;
+ struct i2s_dev_data *adata;
+
+ prtd = substream->private_data;
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
+ adata = dev_get_drvdata(component->dev);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
adata->play_stream = NULL;
@@ -415,186 +397,9 @@ static int acp3x_dma_close(struct snd_soc_component *component,
*/
if (!adata->play_stream && !adata->capture_stream)
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
- kfree(rtd);
- return 0;
-}
-
-static int acp3x_dai_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
-{
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
- case SND_SOC_DAIFMT_I2S:
- adata->tdm_mode = false;
- break;
- case SND_SOC_DAIFMT_DSP_A:
- adata->tdm_mode = true;
- break;
- default:
- return -EINVAL;
- }
-
- return 0;
-}
-
-static int acp3x_dai_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
- u32 rx_mask, int slots, int slot_width)
-{
- u32 val = 0;
- u16 slot_len;
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (slot_width) {
- case SLOT_WIDTH_8:
- slot_len = 8;
- break;
- case SLOT_WIDTH_16:
- slot_len = 16;
- break;
- case SLOT_WIDTH_24:
- slot_len = 24;
- break;
- case SLOT_WIDTH_32:
- slot_len = 0;
- break;
- default:
- return -EINVAL;
- }
-
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
-
- val = (FRM_LEN | (slots << 15) | (slot_len << 18));
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
-
- adata->tdm_fmt = val;
- return 0;
-}
-
-static int acp3x_dai_i2s_hwparams(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *params,
- struct snd_soc_dai *dai)
-{
- u32 val = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
-
- switch (params_format(params)) {
- case SNDRV_PCM_FORMAT_U8:
- case SNDRV_PCM_FORMAT_S8:
- rtd->xfer_resolution = 0x0;
- break;
- case SNDRV_PCM_FORMAT_S16_LE:
- rtd->xfer_resolution = 0x02;
- break;
- case SNDRV_PCM_FORMAT_S24_LE:
- rtd->xfer_resolution = 0x04;
- break;
- case SNDRV_PCM_FORMAT_S32_LE:
- rtd->xfer_resolution = 0x05;
- break;
- default:
- return -EINVAL;
- }
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | (rtd->xfer_resolution << 3);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- else
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
-
return 0;
}
-static int acp3x_dai_i2s_trigger(struct snd_pcm_substream *substream,
- int cmd, struct snd_soc_dai *dai)
-{
- int ret = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
- u32 val, period_bytes;
-
- period_bytes = frames_to_bytes(substream->runtime,
- substream->runtime->period_size);
- switch (cmd) {
- case SNDRV_PCM_TRIGGER_START:
- case SNDRV_PCM_TRIGGER_RESUME:
- case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
- rtd->bytescount = acp_get_byte_count(rtd, substream->stream);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_TX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_RX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- case SNDRV_PCM_TRIGGER_STOP:
- case SNDRV_PCM_TRIGGER_SUSPEND:
- case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- default:
- ret = -EINVAL;
- break;
- }
-
- return ret;
-}
-
-static struct snd_soc_dai_ops acp3x_dai_i2s_ops = {
- .hw_params = acp3x_dai_i2s_hwparams,
- .trigger = acp3x_dai_i2s_trigger,
- .set_fmt = acp3x_dai_i2s_set_fmt,
- .set_tdm_slot = acp3x_dai_set_tdm_slot,
-};
-
-static struct snd_soc_dai_driver acp3x_i2s_dai_driver = {
- .playback = {
- .rates = SNDRV_PCM_RATE_8000_96000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 8,
-
- .rate_min = 8000,
- .rate_max = 96000,
- },
- .capture = {
- .rates = SNDRV_PCM_RATE_8000_48000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 2,
- .rate_min = 8000,
- .rate_max = 48000,
- },
- .ops = &acp3x_dai_i2s_ops,
-};
-
static const struct snd_soc_component_driver acp3x_i2s_component = {
.name = DRV_NAME,
.open = acp3x_dma_open,
@@ -609,10 +414,10 @@ static const struct snd_soc_component_driver acp3x_i2s_component = {
static int acp3x_audio_probe(struct platform_device *pdev)
{
- int status;
struct resource *res;
struct i2s_dev_data *adata;
unsigned int irqflags;
+ int status, ret;
if (!pdev->dev.platform_data) {
dev_err(&pdev->dev, "platform_data not retrieved\n");
@@ -622,70 +427,80 @@ static int acp3x_audio_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
- dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
+ dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
return -ENODEV;
}
adata = devm_kzalloc(&pdev->dev, sizeof(*adata), GFP_KERNEL);
if (!adata)
return -ENOMEM;
-
adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
-
+ if (!adata->acp3x_base) {
+ ret = -ENOMEM;
+ goto base_err;
+ }
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res) {
dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
- return -ENODEV;
+ ret = -ENOMEM;
+ goto base_err;
}
adata->i2s_irq = res->start;
- adata->play_stream = NULL;
- adata->capture_stream = NULL;
dev_set_drvdata(&pdev->dev, adata);
/* Initialize ACP */
status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
+ if (status) {
+ ret = -ENODEV;
+ goto base_err;
+ }
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
- &acp3x_i2s_dai_driver, 1);
+ NULL, 0);
if (status) {
- dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ dev_err(&pdev->dev, "Fail to register acp i2s component\n");
+ ret = -ENODEV;
goto dev_err;
}
status = devm_request_irq(&pdev->dev, adata->i2s_irq, i2s_irq_handler,
irqflags, "ACP3x_I2S_IRQ", adata);
if (status) {
dev_err(&pdev->dev, "ACP3x I2S IRQ request failed\n");
+ ret = -ENODEV;
goto dev_err;
}
- pm_runtime_set_autosuspend_delay(&pdev->dev, 10000);
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 5000);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_enable(&pdev->dev);
return 0;
+
dev_err:
+ devm_kfree(&pdev->dev, adata);
status = acp3x_deinit(adata->acp3x_base);
if (status)
dev_err(&pdev->dev, "ACP de-init failed\n");
else
- dev_info(&pdev->dev, "ACP de-initialized\n");
- /*ignore device status and return driver probe error*/
- return -ENODEV;
+ dev_dbg(&pdev->dev, "ACP de-initialized\n");
+ return ret;
+base_err:
+ devm_kfree(&pdev->dev, adata);
+ return ret;
}
static int acp3x_audio_remove(struct platform_device *pdev)
{
+ struct i2s_dev_data *adata;
int ret;
- struct i2s_dev_data *adata = dev_get_drvdata(&pdev->dev);
+ adata = dev_get_drvdata(&pdev->dev);
ret = acp3x_deinit(adata->acp3x_base);
if (ret)
dev_err(&pdev->dev, "ACP de-init failed\n");
else
- dev_info(&pdev->dev, "ACP de-initialized\n");
+ dev_dbg(&pdev->dev, "ACP de-initialized\n");
pm_runtime_disable(&pdev->dev);
return 0;
@@ -693,10 +508,11 @@ static int acp3x_audio_remove(struct platform_device *pdev)
static int acp3x_resume(struct device *dev)
{
+ struct i2s_dev_data *adata;
int status;
u32 val;
- struct i2s_dev_data *adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_init(adata->acp3x_base);
if (status)
return -ENODEV;
@@ -738,14 +554,15 @@ static int acp3x_resume(struct device *dev)
static int acp3x_pcm_runtime_suspend(struct device *dev)
{
+ struct i2s_dev_data *adata;
int status;
- struct i2s_dev_data *adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_deinit(adata->acp3x_base);
if (status)
dev_err(dev, "ACP de-init failed\n");
else
- dev_info(dev, "ACP de-initialized\n");
+ dev_dbg(dev, "ACP de-initialized\n");
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
@@ -754,8 +571,9 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
static int acp3x_pcm_runtime_resume(struct device *dev)
{
+ struct i2s_dev_data *adata;
int status;
- struct i2s_dev_data *adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_init(adata->acp3x_base);
if (status)
@@ -774,13 +592,14 @@ static struct platform_driver acp3x_dma_driver = {
.probe = acp3x_audio_probe,
.remove = acp3x_audio_remove,
.driver = {
- .name = "acp3x_rv_i2s",
+ .name = "acp3x_rv_i2s_dma",
.pm = &acp3x_pm_ops,
},
};
module_platform_driver(acp3x_dma_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_AUTHOR("Vijendar.Mukunda(a)amd.com");
MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 2f15fe1..72c1a23 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -51,6 +51,29 @@
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+struct acp3x_platform_info {
+ u16 play_i2s_instance;
+ u16 cap_i2s_instance;
+ u16 capture_channel;
+};
+
+struct i2s_dev_data {
+ bool tdm_mode;
+ unsigned int i2s_irq;
+ u32 tdm_fmt;
+ void __iomem *acp3x_base;
+ struct snd_pcm_substream *play_stream;
+ struct snd_pcm_substream *capture_stream;
+};
+
+struct i2s_stream_instance {
+ u16 num_pages;
+ u16 channels;
+ u32 xfer_resolution;
+ u64 bytescount;
+ dma_addr_t dma_addr;
+ void __iomem *acp3x_base;
+};
static inline u32 rv_readl(void __iomem *base_addr)
{
@@ -61,3 +84,22 @@ static inline void rv_writel(u32 val, void __iomem *base_addr)
{
writel(val, base_addr - ACP3x_PHY_BASE_ADDRESS);
}
+
+static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
+ int direction)
+{
+ u64 byte_count;
+
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ } else {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ }
+ return byte_count;
+}
--
2.7.4
1
0

Re: [alsa-devel] [PATCH v5 1/6] ASoC: amd:Create multiple I2S platform device Endpoint (fwd)
by Julia Lawall 18 Nov '19
by Julia Lawall 18 Nov '19
18 Nov '19
On line 70, adata->res is allocated with a devm function, so it shouldn't
be passed to kfree later; that will lead to a double free.
julia
---------- Forwarded message ----------
Date: Sun, 17 Nov 2019 11:44:07 +0800
From: kbuild test robot <lkp(a)intel.com>
To: kbuild(a)lists.01.org
Cc: Julia Lawall <julia.lawall(a)lip6.fr>
Subject: Re: [PATCH v5 1/6] ASoC: amd:Create multiple I2S platform device
Endpoint
In-Reply-To: <1573629249-13272-2-git-send-email-Vishnuvardhanrao.Ravulapati(a)amd.com>
References: <1573629249-13272-2-git-send-email-Vishnuvardhanrao.Ravulapati(a)amd.com>
Hi Ravulapati,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[cannot apply to v5.4-rc7 next-20191115]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Ravulapati-Vishnu-vardhan-rao/ASoC…
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
>> sound/soc/amd/raven/pci-acp3x.c:142:1-6: WARNING: invalid free of devm_ allocated data
# https://github.com/0day-ci/linux/commit/79701559637a30a0708febfd5119ad05128…
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 79701559637a30a0708febfd5119ad05128b2ba5
vim +142 sound/soc/amd/raven/pci-acp3x.c
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 21
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 22 static int snd_acp3x_probe(struct pci_dev *pci,
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 23 const struct pci_device_id *pci_id)
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 24 {
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 25 int ret;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 26 u32 addr, val, i;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 27 struct acp3x_dev_data *adata;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 28 struct platform_device_info pdevinfo[ACP3x_DEVS];
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 29 unsigned int irqflags;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 30
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 31 if (pci_enable_device(pci)) {
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 32 dev_err(&pci->dev, "pci_enable_device failed\n");
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 33 return -ENODEV;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 34 }
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 35
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 36 ret = pci_request_regions(pci, "AMD ACP3x audio");
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 37 if (ret < 0) {
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 38 dev_err(&pci->dev, "pci_request_regions failed\n");
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 39 goto disable_pci;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 40 }
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 41
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 42 adata = devm_kzalloc(&pci->dev, sizeof(struct acp3x_dev_data),
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 43 GFP_KERNEL);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 44 if (!adata) {
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 45 ret = -ENOMEM;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 46 goto release_regions;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 47 }
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 48
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 49 /* check for msi interrupt support */
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 50 ret = pci_enable_msi(pci);
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 51 if (ret)
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 52 /* msi is not enabled */
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 53 irqflags = IRQF_SHARED;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 54 else
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 55 /* msi is enabled */
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 56 irqflags = 0;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 57
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 58 addr = pci_resource_start(pci, 0);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 59 adata->acp3x_base = ioremap(addr, pci_resource_len(pci, 0));
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 60 if (!adata->acp3x_base) {
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 61 ret = -ENOMEM;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 62 goto release_regions;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 63 }
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 64 pci_set_master(pci);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 65 pci_set_drvdata(pci, adata);
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 66
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 67 val = rv_readl(adata->acp3x_base + mmACP_I2S_PIN_CONFIG);
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 68 switch (val) {
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 69 case I2S_MODE:
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 70 adata->res = devm_kzalloc(&pci->dev,
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 71 sizeof(struct resource) * 4,
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 72 GFP_KERNEL);
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 73 if (!adata->res) {
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 74 ret = -ENOMEM;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 75 goto unmap_mmio;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 76 }
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 77
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 78 adata->res[0].name = "acp3x_i2s_iomem";
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 79 adata->res[0].flags = IORESOURCE_MEM;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 80 adata->res[0].start = addr;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 81 adata->res[0].end = addr + (ACP3x_REG_END - ACP3x_REG_START);
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 82
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 83 adata->res[1].name = "acp3x_i2s_sp";
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 84 adata->res[1].flags = IORESOURCE_MEM;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 85 adata->res[1].start = addr + ACP3x_I2STDM_REG_START;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 86 adata->res[1].end = addr + ACP3x_I2STDM_REG_END;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 87
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 88 adata->res[2].name = "acp3x_i2s_bt";
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 89 adata->res[2].flags = IORESOURCE_MEM;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 90 adata->res[2].start = addr + ACP3x_BT_TDM_REG_START;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 91 adata->res[2].end = addr + ACP3x_BT_TDM_REG_END;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 92
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 93 adata->res[3].name = "acp3x_i2s_irq";
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 94 adata->res[3].flags = IORESOURCE_IRQ;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 95 adata->res[3].start = pci->irq;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 96 adata->res[3].end = adata->res[3].start;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 97
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 98 adata->acp3x_audio_mode = ACP3x_I2S_MODE;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 99
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 100 memset(&pdevinfo, 0, sizeof(pdevinfo));
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 101 pdevinfo[0].name = "acp3x_rv_i2s_dma";
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 102 pdevinfo[0].id = 0;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 103 pdevinfo[0].parent = &pci->dev;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 104 pdevinfo[0].num_res = 4;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 105 pdevinfo[0].res = &adata->res[0];
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 106 pdevinfo[0].data = &irqflags;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 107 pdevinfo[0].size_data = sizeof(irqflags);
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 108
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 109 pdevinfo[1].name = "acp3x_i2s_playcap";
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 110 pdevinfo[1].id = 0;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 111 pdevinfo[1].parent = &pci->dev;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 112 pdevinfo[1].num_res = 1;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 113 pdevinfo[1].res = &adata->res[1];
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 114
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 115 pdevinfo[2].name = "acp3x_i2s_playcap";
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 116 pdevinfo[2].id = 1;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 117 pdevinfo[2].parent = &pci->dev;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 118 pdevinfo[2].num_res = 1;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 119 pdevinfo[2].res = &adata->res[2];
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 120 for (i = 0; i < ACP3x_DEVS ; i++) {
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 121 adata->pdev[i] =
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 122 platform_device_register_full(&pdevinfo[i]);
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 123 if (IS_ERR(adata->pdev[i])) {
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 124 dev_err(&pci->dev, "cannot register %s device\n",
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 125 pdevinfo[i].name);
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 126 ret = PTR_ERR(adata->pdev[i]);
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 127 goto unmap_mmio;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 128 }
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 129 }
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 130 break;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 131 default:
00347e4ea8ca4c Colin Ian King 2018-11-16 132 dev_err(&pci->dev, "Invalid ACP audio mode : %d\n", val);
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 133 ret = -ENODEV;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 134 goto unmap_mmio;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 135 }
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 136 return 0;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 137
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 138 unmap_mmio:
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 139 pci_disable_msi(pci);
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 140 for (i = 0 ; i < ACP3x_DEVS ; i++)
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 141 platform_device_unregister(adata->pdev[i]);
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 @142 kfree(adata->res);
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 143 iounmap(adata->acp3x_base);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 144 release_regions:
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 145 pci_release_regions(pci);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 146 disable_pci:
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 147 pci_disable_device(pci);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 148
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 149 return ret;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 150 }
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 151
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
3
2

Re: [alsa-devel] [RESEND PATCH v5 6/6] ASoC: amd: Added ACP3x system resume and runtime pm (fwd)
by Julia Lawall 18 Nov '19
by Julia Lawall 18 Nov '19
18 Nov '19
Line 179 needs to cleanup everything that needed to be cleaned up in the
previous error handling code (line 173) as well as adding an iounmap. But
maybe you could have used a devm function to avoid the need for the
iounmap.
Also functions should have blank lines between them. That is why this
report contains lots of function definitions, and not just the one with
the problem.
julia
---------- Forwarded message ----------
Date: Sun, 17 Nov 2019 13:55:47 +0800
From: kbuild test robot <lkp(a)intel.com>
To: kbuild(a)lists.01.org
Cc: Julia Lawall <julia.lawall(a)lip6.fr>
Subject: Re: [RESEND PATCH v5 6/6] ASoC: amd: Added ACP3x system resume and
runtime pm
CC: kbuild-all(a)lists.01.org
In-Reply-To: <1573629249-13272-7-git-send-email-Vishnuvardhanrao.Ravulapati(a)amd.com>
References: <1573629249-13272-7-git-send-email-Vishnuvardhanrao.Ravulapati(a)amd.com>
CC:
Hi Ravulapati,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[cannot apply to v5.4-rc7 next-20191115]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Ravulapati-Vishnu-vardhan-rao/ASoC…
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
>> sound/soc/amd/raven/pci-acp3x.c:179:2-8: ERROR: missing iounmap; ioremap on line 170 and execution via conditional on line 178
# https://github.com/0day-ci/linux/commit/bfd341330019202bd0a17caa808937c88d5…
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout bfd341330019202bd0a17caa808937c88d536e58
vim +179 sound/soc/amd/raven/pci-acp3x.c
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 24
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 25 static int acp3x_power_on(void __iomem *acp3x_base)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 26 {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 27 u32 val;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 28 u32 timeout = 0;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 29 int ret = 0;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 30
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 31 val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 32
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 33 if (val == 0)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 34 return val;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 35
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 36 if (!((val & ACP_PGFSM_STATUS_MASK) ==
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 37 ACP_POWER_ON_IN_PROGRESS))
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 38 rv_writel(ACP_PGFSM_CNTL_POWER_ON_MASK,
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 39 acp3x_base + mmACP_PGFSM_CONTROL);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 40 while (++timeout < DELAY) {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 41 val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 42 if (!val)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 43 break;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 44 udelay(1);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 45 if (timeout > 500) {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 46 pr_err("ACP is Not Powered ON\n");
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 47 return -ETIMEDOUT;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 48 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 49 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 50 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 51 static int acp3x_power_off(void __iomem *acp3x_base)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 52 {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 53 u32 val;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 54 u32 timeout = 0;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 55
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 56 rv_writel(ACP_PGFSM_CNTL_POWER_OFF_MASK,
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 57 acp3x_base + mmACP_PGFSM_CONTROL);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 58 while (++timeout < DELAY) {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 59 val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 60 if ((val & ACP_PGFSM_STATUS_MASK) == ACP_POWERED_OFF)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 61 return 0;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 62 udelay(1);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 63 if (timeout > 500) {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 64 pr_err("ACP is Not Powered OFF\n");
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 65 return -ETIMEDOUT;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 66 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 67 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 68 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 69 static int acp3x_reset(void __iomem *acp3x_base)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 70 {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 71 u32 val, timeout;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 72
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 73 rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 74 timeout = 0;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 75 while (++timeout < DELAY) {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 76 val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 77 if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 78 timeout > 100) {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 79 if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 80 break;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 81 return -ENODEV;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 82 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 83 cpu_relax();
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 84 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 85 rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 86 timeout = 0;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 87 while (++timeout < DELAY) {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 88 val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 89 if (!val)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 90 break;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 91 if (timeout > 100)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 92 return -ENODEV;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 93 cpu_relax();
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 94 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 95 return 0;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 96 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 97 static int acp3x_init(void __iomem *acp3x_base)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 98 {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 99 int ret;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 100
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 101 /* power on */
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 102 ret = acp3x_power_on(acp3x_base);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 103 if (ret) {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 104 pr_err("ACP3x power on failed\n");
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 105 return ret;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 106 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 107 /* Reset */
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 108 ret = acp3x_reset(acp3x_base);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 109 if (ret) {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 110 pr_err("ACP3x reset failed\n");
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 111 return ret;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 112 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 113 return 0;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 114 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 115 static int acp3x_deinit(void __iomem *acp3x_base)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 116 {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 117 int ret;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 118
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 119 /* Reset */
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 120 ret = acp3x_reset(acp3x_base);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 121 if (ret) {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 122 pr_err("ACP3x reset failed\n");
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 123 return ret;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 124 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 125 /* power off */
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 126 ret = acp3x_power_off(acp3x_base);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 127 if (ret) {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 128 pr_err("ACP3x power off failed\n");
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 129 return ret;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 130 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 131 return 0;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 132 }
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 133 static int snd_acp3x_probe(struct pci_dev *pci,
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 134 const struct pci_device_id *pci_id)
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 135 {
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 136 int ret;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 137 u32 addr, val, i;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 138 struct acp3x_dev_data *adata;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 139 struct platform_device_info pdevinfo[ACP3x_DEVS];
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 140 unsigned int irqflags;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 141
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 142 if (pci_enable_device(pci)) {
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 143 dev_err(&pci->dev, "pci_enable_device failed\n");
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 144 return -ENODEV;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 145 }
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 146
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 147 ret = pci_request_regions(pci, "AMD ACP3x audio");
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 148 if (ret < 0) {
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 149 dev_err(&pci->dev, "pci_request_regions failed\n");
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 150 goto disable_pci;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 151 }
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 152
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 153 adata = devm_kzalloc(&pci->dev, sizeof(struct acp3x_dev_data),
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 154 GFP_KERNEL);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 155 if (!adata) {
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 156 ret = -ENOMEM;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 157 goto release_regions;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 158 }
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 159
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 160 /* check for msi interrupt support */
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 161 ret = pci_enable_msi(pci);
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 162 if (ret)
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 163 /* msi is not enabled */
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 164 irqflags = IRQF_SHARED;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 165 else
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 166 /* msi is enabled */
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 167 irqflags = 0;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 168
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 169 addr = pci_resource_start(pci, 0);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 @170 adata->acp3x_base = ioremap(addr, pci_resource_len(pci, 0));
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 171 if (!adata->acp3x_base) {
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 172 ret = -ENOMEM;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 173 goto release_regions;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 174 }
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 175 pci_set_master(pci);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 176 pci_set_drvdata(pci, adata);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 177 ret = acp3x_init(adata->acp3x_base);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 @178 if (ret)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 @179 return -ENODEV;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 180
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 181
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 182 val = rv_readl(adata->acp3x_base + mmACP_I2S_PIN_CONFIG);
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 183 switch (val) {
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 184 case I2S_MODE:
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 185 adata->res = devm_kzalloc(&pci->dev,
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 186 sizeof(struct resource) * 4,
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 187 GFP_KERNEL);
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 188 if (!adata->res) {
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 189 ret = -ENOMEM;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 190 goto unmap_mmio;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 191 }
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 192
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 193 adata->res[0].name = "acp3x_i2s_iomem";
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 194 adata->res[0].flags = IORESOURCE_MEM;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 195 adata->res[0].start = addr;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 196 adata->res[0].end = addr + (ACP3x_REG_END - ACP3x_REG_START);
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 197
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 198 adata->res[1].name = "acp3x_i2s_sp";
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 199 adata->res[1].flags = IORESOURCE_MEM;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 200 adata->res[1].start = addr + ACP3x_I2STDM_REG_START;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 201 adata->res[1].end = addr + ACP3x_I2STDM_REG_END;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 202
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 203 adata->res[2].name = "acp3x_i2s_bt";
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 204 adata->res[2].flags = IORESOURCE_MEM;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 205 adata->res[2].start = addr + ACP3x_BT_TDM_REG_START;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 206 adata->res[2].end = addr + ACP3x_BT_TDM_REG_END;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 207
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 208 adata->res[3].name = "acp3x_i2s_irq";
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 209 adata->res[3].flags = IORESOURCE_IRQ;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 210 adata->res[3].start = pci->irq;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 211 adata->res[3].end = adata->res[3].start;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 212
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 213 adata->acp3x_audio_mode = ACP3x_I2S_MODE;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 214
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 215 memset(&pdevinfo, 0, sizeof(pdevinfo));
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 216 pdevinfo[0].name = "acp3x_rv_i2s_dma";
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 217 pdevinfo[0].id = 0;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 218 pdevinfo[0].parent = &pci->dev;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 219 pdevinfo[0].num_res = 4;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 220 pdevinfo[0].res = &adata->res[0];
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 221 pdevinfo[0].data = &irqflags;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 222 pdevinfo[0].size_data = sizeof(irqflags);
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 223
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 224 pdevinfo[1].name = "acp3x_i2s_playcap";
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 225 pdevinfo[1].id = 0;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 226 pdevinfo[1].parent = &pci->dev;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 227 pdevinfo[1].num_res = 1;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 228 pdevinfo[1].res = &adata->res[1];
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 229
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 230 pdevinfo[2].name = "acp3x_i2s_playcap";
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 231 pdevinfo[2].id = 1;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 232 pdevinfo[2].parent = &pci->dev;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 233 pdevinfo[2].num_res = 1;
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 234 pdevinfo[2].res = &adata->res[2];
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 235 for (i = 0; i < ACP3x_DEVS ; i++) {
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 236 adata->pdev[i] =
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 237 platform_device_register_full(&pdevinfo[i]);
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 238 if (IS_ERR(adata->pdev[i])) {
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 239 dev_err(&pci->dev, "cannot register %s device\n",
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 240 pdevinfo[i].name);
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 241 ret = PTR_ERR(adata->pdev[i]);
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 242 goto unmap_mmio;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 243 }
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 244 }
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 245 break;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 246 default:
00347e4ea8ca4c Colin Ian King 2018-11-16 247 dev_err(&pci->dev, "Invalid ACP audio mode : %d\n", val);
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 248 ret = -ENODEV;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 249 goto unmap_mmio;
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 250 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 251 pm_runtime_set_autosuspend_delay(&pci->dev, 10000);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 252 pm_runtime_use_autosuspend(&pci->dev);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 253 pm_runtime_set_active(&pci->dev);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 254 pm_runtime_put_noidle(&pci->dev);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 255 pm_runtime_enable(&pci->dev);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 256 return 0;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 257
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 258 unmap_mmio:
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 259 ret = acp3x_deinit(adata->acp3x_base);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 260 if (ret)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 261 dev_err(&pci->dev, "ACP de-init failed\n");
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 262 else
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 263 dev_info(&pci->dev, "ACP de-initialized\n");
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 264 pci_disable_msi(pci);
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 265 for (i = 0 ; i < ACP3x_DEVS ; i++)
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 266 platform_device_unregister(adata->pdev[i]);
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 267 kfree(adata->res);
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 268 iounmap(adata->acp3x_base);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 269 release_regions:
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 270 pci_release_regions(pci);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 271 disable_pci:
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 272 pci_disable_device(pci);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 273
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 274 return ret;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 275 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 276 static int snd_acp3x_suspend(struct device *dev)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 277 {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 278 int status;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 279 struct acp3x_dev_data *adata = dev_get_drvdata(dev);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 280
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 281 status = acp3x_deinit(adata->acp3x_base);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 282 if (status)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 283 dev_err(dev, "ACP de-init failed\n");
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 284 else
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 285 dev_info(dev, "ACP de-initialized\n");
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 286
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 287 return 0;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 288 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 289 static int snd_acp3x_resume(struct device *dev)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 290 {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 291 int status;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 292 struct acp3x_dev_data *adata = dev_get_drvdata(dev);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 293
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 294 status = acp3x_init(adata->acp3x_base);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 295 if (status) {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 296 dev_err(dev, "ACP init failed\n");
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 297 return status;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 298 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 299 return 0;
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 300 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 301 static const struct dev_pm_ops acp3x_pm = {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 302 .runtime_suspend = snd_acp3x_suspend,
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 303 .runtime_resume = snd_acp3x_resume,
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 304 .resume = snd_acp3x_resume,
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 305 };
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 306 static void snd_acp3x_remove(struct pci_dev *pci)
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 307 {
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 308 int i, ret;
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 309 struct acp3x_dev_data *adata = pci_get_drvdata(pci);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 310
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 311 if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 312 for (i = 0 ; i < ACP3x_DEVS ; i++)
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 313 platform_device_unregister(adata->pdev[i]);
79701559637a30 Ravulapati Vishnu vardhan rao 2019-11-13 314 }
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 315 ret = acp3x_deinit(adata->acp3x_base);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 316 if (ret)
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 317 dev_err(&pci->dev, "ACP de-init failed\n");
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 318 else
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 319 dev_info(&pci->dev, "ACP de-initialized\n");
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 320 iounmap(adata->acp3x_base);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 321 pm_runtime_disable(&pci->dev);
bfd34133001920 Ravulapati Vishnu vardhan rao 2019-11-13 322 pm_runtime_get_noresume(&pci->dev);
7894a7e7ea3de6 Vijendar Mukunda 2018-11-12 323 pci_disable_msi(pci);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 324 pci_release_regions(pci);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 325 pci_disable_device(pci);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 326 }
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 327 static const struct pci_device_id snd_acp3x_ids[] = {
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 328 { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x15e2),
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 329 .class = PCI_CLASS_MULTIMEDIA_OTHER << 8,
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 330 .class_mask = 0xffffff },
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 331 { 0, },
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 332 };
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 333 MODULE_DEVICE_TABLE(pci, snd_acp3x_ids);
e30d9128def6ca Maruthi Srinivas Bayyavarapu 2018-11-12 334
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
3
2

[alsa-devel] [PATCH] ASoC: rt5682: fix the charge pump capacitor discharges
by shumingf@realtek.com 18 Nov '19
by shumingf@realtek.com 18 Nov '19
18 Nov '19
From: Shuming Fan <shumingf(a)realtek.com>
Due to switching the HV to LV mode while stopping playback,
the charge pump capacitor will be discharged to the source of the pump circuit.
Therefore, this patch removed the event control.
Signed-off-by: Shuming Fan <shumingf(a)realtek.com>
---
sound/soc/codecs/rt5682.c | 27 +++------------------------
1 file changed, 3 insertions(+), 24 deletions(-)
diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c
index 0d8e9866c01a..b1713fffa3eb 100644
--- a/sound/soc/codecs/rt5682.c
+++ b/sound/soc/codecs/rt5682.c
@@ -1464,28 +1464,6 @@ static const struct snd_kcontrol_new hpor_switch =
SOC_DAPM_SINGLE_AUTODISABLE("Switch", RT5682_HP_CTRL_1,
RT5682_R_MUTE_SFT, 1, 1);
-static int rt5682_charge_pump_event(struct snd_soc_dapm_widget *w,
- struct snd_kcontrol *kcontrol, int event)
-{
- struct snd_soc_component *component =
- snd_soc_dapm_to_component(w->dapm);
-
- switch (event) {
- case SND_SOC_DAPM_PRE_PMU:
- snd_soc_component_update_bits(component,
- RT5682_HP_CHARGE_PUMP_1, RT5682_PM_HP_MASK, RT5682_PM_HP_HV);
- break;
- case SND_SOC_DAPM_POST_PMD:
- snd_soc_component_update_bits(component,
- RT5682_HP_CHARGE_PUMP_1, RT5682_PM_HP_MASK, RT5682_PM_HP_LV);
- break;
- default:
- return 0;
- }
-
- return 0;
-}
-
static int rt5682_hp_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
@@ -1769,8 +1747,7 @@ static const struct snd_soc_dapm_widget rt5682_dapm_widgets[] = {
SND_SOC_DAPM_SUPPLY("HP Amp R", RT5682_PWR_ANLG_1,
RT5682_PWR_HA_R_BIT, 0, NULL, 0),
SND_SOC_DAPM_SUPPLY_S("Charge Pump", 1, RT5682_DEPOP_1,
- RT5682_PUMP_EN_SFT, 0, rt5682_charge_pump_event,
- SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
+ RT5682_PUMP_EN_SFT, 0, NULL, 0),
SND_SOC_DAPM_SUPPLY_S("Capless", 2, RT5682_DEPOP_1,
RT5682_CAPLESS_EN_SFT, 0, NULL, 0),
@@ -2670,6 +2647,8 @@ static int rt5682_i2c_probe(struct i2c_client *i2c,
RT5682_HPA_CP_BIAS_CTRL_MASK, RT5682_HPA_CP_BIAS_3UA);
regmap_update_bits(rt5682->regmap, RT5682_CHARGE_PUMP_1,
RT5682_CP_CLK_HP_MASK, RT5682_CP_CLK_HP_300KHZ);
+ regmap_update_bits(rt5682->regmap, RT5682_HP_CHARGE_PUMP_1,
+ RT5682_PM_HP_MASK, RT5682_PM_HP_HV);
INIT_DELAYED_WORK(&rt5682->jack_detect_work,
rt5682_jack_detect_handler);
--
2.24.0
2
1

[alsa-devel] [linux-next:master 10267/11220] sound/soc/codecs/rt5677.c:5246:6: sparse: sparse: symbol 'rt5677_check_hotword' was not declared. Should it be static?
by kbuild test robot 18 Nov '19
by kbuild test robot 18 Nov '19
18 Nov '19
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 4e8f108c3af2d6922a64df9f3d3d488c74f6009d
commit: 21c00e5df4397870ee835c974bf50570f9d24253 [10267/11220] ASoC: rt5677: Enable jack detect while DSP is running
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-31-gfd3528a-dirty
git checkout 21c00e5df4397870ee835c974bf50570f9d24253
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
sound/soc/codecs/rt5677.c:4700:17: sparse: sparse: dubious: x | !y
>> sound/soc/codecs/rt5677.c:5246:6: sparse: sparse: symbol 'rt5677_check_hotword' was not declared. Should it be static?
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
3
3

[alsa-devel] [PATCH] ASoC: wm2200: add missed operations in remove and probe failure
by Chuhong Yuan 18 Nov '19
by Chuhong Yuan 18 Nov '19
18 Nov '19
This driver misses calls to pm_runtime_disable and regulator_bulk_disable
in remove and a call to free_irq in probe failure.
Add the calls to fix it.
Signed-off-by: Chuhong Yuan <hslester96(a)gmail.com>
---
sound/soc/codecs/wm2200.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c
index cf64e109c658..7b087d94141b 100644
--- a/sound/soc/codecs/wm2200.c
+++ b/sound/soc/codecs/wm2200.c
@@ -2410,6 +2410,8 @@ static int wm2200_i2c_probe(struct i2c_client *i2c,
err_pm_runtime:
pm_runtime_disable(&i2c->dev);
+ if (i2c->irq)
+ free_irq(i2c->irq, wm2200);
err_reset:
if (wm2200->pdata.reset)
gpio_set_value_cansleep(wm2200->pdata.reset, 0);
@@ -2426,12 +2428,15 @@ static int wm2200_i2c_remove(struct i2c_client *i2c)
{
struct wm2200_priv *wm2200 = i2c_get_clientdata(i2c);
+ pm_runtime_disable(&i2c->dev);
if (i2c->irq)
free_irq(i2c->irq, wm2200);
if (wm2200->pdata.reset)
gpio_set_value_cansleep(wm2200->pdata.reset, 0);
if (wm2200->pdata.ldo_ena)
gpio_set_value_cansleep(wm2200->pdata.ldo_ena, 0);
+ regulator_bulk_disable(ARRAY_SIZE(wm2200->core_supplies),
+ wm2200->core_supplies);
return 0;
}
--
2.24.0
3
2

18 Nov '19
The driver forgets to call pm_runtime_disable in remove and
probe failure.
Add the calls to fix it.
Signed-off-by: Chuhong Yuan <hslester96(a)gmail.com>
---
sound/soc/codecs/wm5100.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index 4af0e519e623..91cc63c5a51f 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -2617,6 +2617,7 @@ static int wm5100_i2c_probe(struct i2c_client *i2c,
return ret;
err_reset:
+ pm_runtime_disable(&i2c->dev);
if (i2c->irq)
free_irq(i2c->irq, wm5100);
wm5100_free_gpio(i2c);
@@ -2640,6 +2641,7 @@ static int wm5100_i2c_remove(struct i2c_client *i2c)
{
struct wm5100_priv *wm5100 = i2c_get_clientdata(i2c);
+ pm_runtime_disable(&i2c->dev);
if (i2c->irq)
free_irq(i2c->irq, wm5100);
wm5100_free_gpio(i2c);
--
2.24.0
3
2

[alsa-devel] compression format of alsa-ucm-conf and alsa-topology-conf tarballs
by Lars Wendler 18 Nov '19
by Lars Wendler 18 Nov '19
18 Nov '19
Hello lists,
some shell output says more than any explanation:
lars@abudhabi:~/temp/alsa> wget -q
https://www.alsa-project.org/files/pub/lib/alsa-topology-conf-1.2.1.tar.bz2
lars@abudhabi:~/temp/alsa> wget -q
https://www.alsa-project.org/files/pub/lib/alsa-ucm-conf-1.2.1.tar.bz2
lars@abudhabi:~/temp/alsa> tar -xjf alsa-topology-conf-1.2.1.tar.bz2
bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2 tar: Error is not recoverable: exiting now
lars@abudhabi:~/temp/alsa(2)> tar -xjf alsa-ucm-conf-1.2.1.tar.bz2
bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2
tar: Error is not recoverable: exiting now
lars@abudhabi:~/temp/alsa(2)> file alsa-topology-conf-1.2.1.tar.bz2
alsa-topology-conf-1.2.1.tar.bz2: XZ compressed data
lars@abudhabi:~/temp/alsa> file alsa-ucm-conf-1.2.1.tar.bz2
alsa-ucm-conf-1.2.1.tar.bz2: XZ compressed data
lars@abudhabi:~/temp/alsa>
Please rename the tarballs if possible.
Please CC me on replies. I'm not subscribed.
Kind regards
Lars
--
Lars Wendler
Gentoo package maintainer
GPG: 21CC CF02 4586 0A07 ED93 9F68 498F E765 960E 9B39
3
3

[alsa-devel] [PATCH] ALSA: hda/hdmi - add a parameter to let users decide if checking the eld_valid
by Hui Wang 18 Nov '19
by Hui Wang 18 Nov '19
18 Nov '19
With the commit 7f641e26a6df ("ALSA: hda/hdmi - Consider eld_valid
when reporting jack event"), the driver checks eld_valid before
reporting Jack state, this fixes the 4 HDMI/DP audio devices issue.
But recently some users complained that the hdmi audio on their
machines couldn't work anymore with this commit. On their machines,
the monitor_present is 1 while the eld_valid is 0 when plugging a
monitor, and the hdmi audio could work even the eld_valid is 0.
To make the hdmi audio work again on those machines, adding a module
parameter, if usrs want to skip the checking eld_valid, they
could set checking_eld_valid=0 when loading the module. And this
parameter only applies to sense_via_verbs, for those getting eld via
component, no need to apply this parameter since it is impossible
that present is 1 while eld_valid is 0.
BugLink: https://bugs.launchpad.net/bugs/1834771
Fixes: 7f641e26a6df ("ALSA: hda/hdmi - Consider eld_valid when reporting jack event")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang(a)canonical.com>
---
sound/pci/hda/patch_hdmi.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index be8a977fc684..d70fca4f4411 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -37,6 +37,11 @@ static bool static_hdmi_pcm;
module_param(static_hdmi_pcm, bool, 0644);
MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info");
+static bool checking_eld_valid = true;
+module_param(checking_eld_valid, bool, 0644);
+MODULE_PARM_DESC(checking_eld_valid, "Checking eld_valid before reporting Jack "
+ "state (default = 1, using verbs only)");
+
#define is_haswell(codec) ((codec)->core.vendor_id == 0x80862807)
#define is_broadwell(codec) ((codec)->core.vendor_id == 0x80862808)
#define is_skylake(codec) ((codec)->core.vendor_id == 0x80862809)
@@ -1557,8 +1562,9 @@ static bool hdmi_present_sense_via_verbs(struct hdmi_spec_per_pin *per_pin,
jack = snd_hda_jack_tbl_get(codec, pin_nid);
if (jack) {
jack->block_report = !ret;
- jack->pin_sense = (eld->monitor_present && eld->eld_valid) ?
- AC_PINSENSE_PRESENCE : 0;
+ if (checking_eld_valid)
+ jack->pin_sense = (eld->monitor_present && eld->eld_valid) ?
+ AC_PINSENSE_PRESENCE : 0;
}
mutex_unlock(&per_pin->lock);
return ret;
--
2.17.1
2
6

18 Nov '19
The driver forgets to call pm_runtime_disable in probe failure
and remove.
Add the missed calls to fix it.
Signed-off-by: Chuhong Yuan <hslester96(a)gmail.com>
---
sound/soc/fsl/fsl_audmix.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c
index c7e4e9757dce..57cad4365e56 100644
--- a/sound/soc/fsl/fsl_audmix.c
+++ b/sound/soc/fsl/fsl_audmix.c
@@ -499,15 +499,20 @@ static int fsl_audmix_probe(struct platform_device *pdev)
ARRAY_SIZE(fsl_audmix_dai));
if (ret) {
dev_err(dev, "failed to register ASoC DAI\n");
- return ret;
+ goto err_disable_pm;
}
priv->pdev = platform_device_register_data(dev, mdrv, 0, NULL, 0);
if (IS_ERR(priv->pdev)) {
ret = PTR_ERR(priv->pdev);
dev_err(dev, "failed to register platform %s: %d\n", mdrv, ret);
+ goto err_disable_pm;
}
+ return 0;
+
+err_disable_pm:
+ pm_runtime_disable(dev);
return ret;
}
@@ -515,6 +520,8 @@ static int fsl_audmix_remove(struct platform_device *pdev)
{
struct fsl_audmix *priv = dev_get_drvdata(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
+
if (priv->pdev)
platform_device_unregister(priv->pdev);
--
2.24.0
1
0

Re: [alsa-devel] [RESEND PATCH v5 2/6] ASoC: amd: Refactoring of DAI from DMA driver (fwd)
by Julia Lawall 17 Nov '19
by Julia Lawall 17 Nov '19
17 Nov '19
This code needs some work. You can't just kfree every pointer. YOu have
to consider how the pointer was initialized.
julia
---------- Forwarded message ----------
Date: Sun, 17 Nov 2019 12:48:14 +0800
From: kbuild test robot <lkp(a)intel.com>
To: kbuild(a)lists.01.org
Cc: Julia Lawall <julia.lawall(a)lip6.fr>
Subject: Re: [alsa-devel] [RESEND PATCH v5 2/6] ASoC: amd: Refactoring of DAI
from DMA driver
CC: kbuild-all(a)lists.01.org
In-Reply-To: <1573629249-13272-3-git-send-email-Vishnuvardhanrao.Ravulapati(a)amd.com>
References: <1573629249-13272-3-git-send-email-Vishnuvardhanrao.Ravulapati(a)amd.com>
CC:
Hi Ravulapati,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[cannot apply to v5.4-rc7 next-20191115]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Ravulapati-Vishnu-vardhan-rao/ASoC…
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
>> sound/soc/amd/raven/acp3x-i2s.c:245:1-6: WARNING: invalid free of devm_ allocated data
sound/soc/amd/raven/acp3x-i2s.c:248:1-6: WARNING: invalid free of devm_ allocated data
sound/soc/amd/raven/acp3x-i2s.c:249:1-6: WARNING: invalid free of devm_ allocated data
# https://github.com/0day-ci/linux/commit/74480eceed0f95f0b8d383d0882b918a335…
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 74480eceed0f95f0b8d383d0882b918a335ce0d4
vim +245 sound/soc/amd/raven/acp3x-i2s.c
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 207
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 208
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 209 static int acp3x_dai_probe(struct platform_device *pdev)
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 210 {
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 211 int status;
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 212 struct resource *res;
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 213 struct i2s_dev_data *adata;
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 214
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 215 adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data),
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 216 GFP_KERNEL);
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 217 if (!adata)
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 218 return -ENOMEM;
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 219
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 220 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 221 if (!res) {
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 222 dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 223 goto err;
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 224 }
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 225
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 226 adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 227 resource_size(res));
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 228 if (IS_ERR(adata->acp3x_base))
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 229 return PTR_ERR(adata->acp3x_base);
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 230
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 231 adata->i2s_irq = res->start;
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 232 dev_set_drvdata(&pdev->dev, adata);
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 233 status = devm_snd_soc_register_component(&pdev->dev,
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 234 &acp3x_dai_component,
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 235 &acp3x_i2s_dai, 1);
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 236 if (status) {
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 237 dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 238 goto dev_err;
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 239 }
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 240 pm_runtime_set_autosuspend_delay(&pdev->dev, 10000);
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 241 pm_runtime_use_autosuspend(&pdev->dev);
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 242 pm_runtime_enable(&pdev->dev);
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 243 return 0;
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 244 err:
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 @245 kfree(adata);
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 246 return -ENOMEM;
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 247 dev_err:
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 248 kfree(adata->acp3x_base);
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 249 kfree(adata);
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 250 kfree(res);
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 251 return -ENODEV;
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 252 }
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13 253
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
1
0

[alsa-devel] [asoc:for-5.4 438/441] sound/soc/sof/sof-pci-dev.c:116:15: error: 'snd_soc_acpi_intel_cfl_machines' undeclared here (not in a function); did you mean 'snd_soc_acpi_intel_cnl_machines'?
by kbuild test robot 17 Nov '19
by kbuild test robot 17 Nov '19
17 Nov '19
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4
head: fe23be2d85b05f561431d75acddec726ea807d2a
commit: 130d3e90777fe974e4b8fa100cec8faf19cac998 [438/441] ASoC: SOF: Intel: Fix CFL and CML FW nocodec binary names.
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout 130d3e90777fe974e4b8fa100cec8faf19cac998
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> sound/soc/sof/sof-pci-dev.c:116:15: error: 'snd_soc_acpi_intel_cfl_machines' undeclared here (not in a function); did you mean 'snd_soc_acpi_intel_cnl_machines'?
.machines = snd_soc_acpi_intel_cfl_machines,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
snd_soc_acpi_intel_cnl_machines
>> sound/soc/sof/sof-pci-dev.c:136:15: error: 'snd_soc_acpi_intel_cml_machines' undeclared here (not in a function); did you mean 'snd_soc_acpi_intel_cfl_machines'?
.machines = snd_soc_acpi_intel_cml_machines,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
snd_soc_acpi_intel_cfl_machines
vim +116 sound/soc/sof/sof-pci-dev.c
113
114 #if IS_ENABLED(CONFIG_SND_SOC_SOF_COFFEELAKE)
115 static const struct sof_dev_desc cfl_desc = {
> 116 .machines = snd_soc_acpi_intel_cfl_machines,
117 .resindex_lpe_base = 0,
118 .resindex_pcicfg_base = -1,
119 .resindex_imr_base = -1,
120 .irqindex_host_ipc = -1,
121 .resindex_dma_base = -1,
122 .chip_info = &cnl_chip_info,
123 .default_fw_path = "intel/sof",
124 .default_tplg_path = "intel/sof-tplg",
125 .nocodec_fw_filename = "sof-cfl.ri",
126 .nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
127 .ops = &sof_cnl_ops,
128 .arch_ops = &sof_xtensa_arch_ops
129 };
130 #endif
131
132 #if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_LP) || \
133 IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_H)
134
135 static const struct sof_dev_desc cml_desc = {
> 136 .machines = snd_soc_acpi_intel_cml_machines,
137 .resindex_lpe_base = 0,
138 .resindex_pcicfg_base = -1,
139 .resindex_imr_base = -1,
140 .irqindex_host_ipc = -1,
141 .resindex_dma_base = -1,
142 .chip_info = &cnl_chip_info,
143 .default_fw_path = "intel/sof",
144 .default_tplg_path = "intel/sof-tplg",
145 .nocodec_fw_filename = "sof-cml.ri",
146 .nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
147 .ops = &sof_cnl_ops,
148 .arch_ops = &sof_xtensa_arch_ops
149 };
150 #endif
151
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
1
0
Dear ALSA,
In my ~/.asoundrc, I have lines like this:
pcm.mic { type pulse; device "mic" }
pcm.monitor { type pulse; device "monitor"; }
pcm.music { type pulse; device "music"; }
to make it easier for ALSA-aware programs to input and output via PulseAudio, e.g.:
ecasound -i alsa,mic -o alsa,monitor -etd:...
However, I would like to simplify this and not have to update ~/.asoundrc every time I create a new PulseAudio device. Since ALSA has the ability for PCMs to take a parameter, I thought this might work with the "pulse" PCM and the PulseAudio device name. But I get an "error: Invalid argument" when trying to pass the device name as an argument to the "pulse" PCM:
$ ecasound -o alsa,pulse:music -i some.wav
...
ALSA lib conf.c:5014:(snd_config_expand) Unknown parameters music
ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM pulse:music
ERROR: Connecting chainsetup failed: "Enabling chainsetup: AUDIOIO-ALSA:
... Unable to open ALSA-device for playback; error: Invalid argument"
Is there some magic with macros that I can use to accomplish this syntax, or can we add the ability for the "pulse" PCM to take a parameter naming the device?
Thanks,
Frederick
4
15

Re: [alsa-devel] [PATCH 0/2] ALSA: pcm: Fix race condition in runtime access
by Chih-Yang Hsia 15 Nov '19
by Chih-Yang Hsia 15 Nov '19
15 Nov '19
On Fri, Nov 15, 2019 at 11:49 PM Takashi Iwai <tiwai(a)suse.de> wrote:
>
> On Fri, 15 Nov 2019 16:35:19 +0100,
> Chih-Yang Hsia wrote:
> >
> > On Fri, Nov 15, 2019 at 1:00 AM Takashi Iwai <tiwai(a)suse.de> wrote:
> > >
> > > On Thu, 14 Nov 2019 17:37:54 +0100,
> > > Chih-Yang Hsia wrote:
> > > >
> > > > On Thu, Nov 14, 2019 at 10:20 PM Takashi Iwai <tiwai(a)suse.de> wrote:
> > > > >
> > > > > On Thu, 14 Nov 2019 15:16:04 +0100,
> > > > > Chih-Yang Hsia wrote:
> > > > > >
> > > > > > On Wed, Nov 13, 2019 at 7:36 PM Takashi Iwai <tiwai(a)suse.de> wrote:
> > > > > > >
> > > > > > > On Wed, 13 Nov 2019 10:47:51 +0100,
> > > > > > > Takashi Iwai wrote:
> > > > > > > >
> > > > > > > > On Wed, 13 Nov 2019 08:24:41 +0100,
> > > > > > > > Chih-Yang Hsia wrote:
> > > > > > > > >
> > > > > > > > > On Wed, Nov 13, 2019 at 2:16 AM Takashi Iwai <tiwai(a)suse.de> wrote:
> > > > > > > > > >
> > > > > > > > > > On Tue, 12 Nov 2019 18:17:13 +0100,
> > > > > > > > > > paulhsia wrote:
> > > > > > > > > > >
> > > > > > > > > > > Since
> > > > > > > > > > > - snd_pcm_detach_substream sets runtime to null without stream lock and
> > > > > > > > > > > - snd_pcm_period_elapsed checks the nullity of the runtime outside of
> > > > > > > > > > > stream lock.
> > > > > > > > > > >
> > > > > > > > > > > This will trigger null memory access in snd_pcm_running() call in
> > > > > > > > > > > snd_pcm_period_elapsed.
> > > > > > > > > >
> > > > > > > > > > Well, if a stream is detached, it means that the stream must have been
> > > > > > > > > > already closed; i.e. it's already a clear bug in the driver that
> > > > > > > > > > snd_pcm_period_elapsed() is called against such a stream.
> > > > > > > > > >
> > > > > > > > > > Or am I missing other possible case?
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > thanks,
> > > > > > > > > >
> > > > > > > > > > Takashi
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > In multithreaded environment, it is possible to have to access both
> > > > > > > > > `interrupt_handler` (from irq) and `substream close` (from
> > > > > > > > > snd_pcm_release) at the same time.
> > > > > > > > > Therefore, in driver implementation, if "substream close function" and
> > > > > > > > > the "code section where snd_pcm_period_elapsed() in" do not hold the
> > > > > > > > > same lock, then the following things can happen:
> > > > > > > > >
> > > > > > > > > 1. interrupt_handler -> goes into snd_pcm_period_elapsed with a valid
> > > > > > > > > sustream pointer
> > > > > > > > > 2. snd_pcm_release_substream: call close without blocking
> > > > > > > > > 3. snd_pcm_release_substream: call snd_pcm_detache_substream and set
> > > > > > > > > substream->runtime to NULL
> > > > > > > > > 4. interrupt_handler -> call snd_pcm_runtime() and crash while
> > > > > > > > > accessing fields in `substream->runtime`
> > > > > > > > >
> > > > > > > > > e.g. In intel8x0.c driver for ac97 device,
> > > > > > > > > In driver intel8x0.c, `snd_pcm_period_elapsed` is called after
> > > > > > > > > checking `ichdev->substream` in `snd_intel8x0_update`.
> > > > > > > > > And if a `snd_pcm_release` call from alsa-lib and pass through close()
> > > > > > > > > and run to snd_pcm_detach_substream() in another thread, it's possible
> > > > > > > > > to trigger a crash.
> > > > > > > > > I can reproduce the issue within a multithread VM easily.
> > > > > > > > >
> > > > > > > > > My patches are trying to provide a basic protection for this situation
> > > > > > > > > (and internal pcm lock between detach and elapsed), since
> > > > > > > > > - the usage of `snd_pcm_period_elapsed` does not warn callers about
> > > > > > > > > the possible race if the driver does not force the order for `calling
> > > > > > > > > snd_pcm_period_elapsed` and `close` by lock and
> > > > > > > > > - lots of drivers already have this hidden issue and I can't fix them
> > > > > > > > > one by one (You can check the "snd_pcm_period_elapsed usage" and the
> > > > > > > > > "close implementation" within all the drivers). The most common
> > > > > > > > > mistake is that
> > > > > > > > > - Checking if the substream is null and call into snd_pcm_period_elapsed
> > > > > > > > > - But `close` can happen anytime, pass without block and
> > > > > > > > > snd_pcm_detach_substream will be trigger right after it
> > > > > > > >
> > > > > > > > Thanks, point taken. While this argument is valid and it's good to
> > > > > > > > harden the PCM core side, the concurrent calls are basically a bug,
> > > > > > > > and we'd need another fix in anyway. Also, the patch 2 makes little
> > > > > > > > sense; there can't be multiple close calls racing with each other. So
> > > > > > > > I'll go for taking your fix but only the first patch.
> > > > > > > >
> > > > > > > > Back to this race: the surfaced issue is, as you pointed out, the race
> > > > > > > > between snd_pcm_period_elapsed() vs close call. However, the
> > > > > > > > fundamental problem is the pending action after the PCM trigger-stop
> > > > > > > > call. Since the PCM trigger doesn't block nor wait until the hardware
> > > > > > > > actually stops the things, the driver may go to the other step even
> > > > > > > > after this "supposed-to-be-stopped" point. In your case, it goes up
> > > > > > > > to close, and crashes. If we had a sync-stop operation, the interrupt
> > > > > > > > handler should have finished before moving to the close stage, hence
> > > > > > > > such a race could be avoided.
> > > > > > > >
> > > > > > > > It's been a long known problem, and some drivers have the own
> > > > > > > > implementation for stop-sync. I think it's time to investigate and
> > > > > > > > start implementing the fundamental solution.
> > > > > > >
> > > > > > > BTW, what we need essentially for intel8x0 is to just call
> > > > > > > synchronize_irq() before closing, at best in hw_free procedure:
> > > > > > >
> > > > > > > --- a/sound/pci/intel8x0.c
> > > > > > > +++ b/sound/pci/intel8x0.c
> > > > > > > @@ -923,8 +923,10 @@ static int snd_intel8x0_hw_params(struct snd_pcm_substream *substream,
> > > > > > >
> > > > > > > static int snd_intel8x0_hw_free(struct snd_pcm_substream *substream)
> > > > > > > {
> > > > > > > + struct intel8x0 *chip = snd_pcm_substream_chip(substream);
> > > > > > > struct ichdev *ichdev = get_ichdev(substream);
> > > > > > >
> > > > > > > + synchronize_irq(chip->irq);
> > > > > > > if (ichdev->pcm_open_flag) {
> > > > > > > snd_ac97_pcm_close(ichdev->pcm);
> > > > > > > ichdev->pcm_open_flag = 0;
> > > > > > >
> > > > > > >
> > > > > > > The same would be needed also at the beginning of the prepare, as the
> > > > > > > application may restart the stream without release.
> > > > > > >
> > > > > > > My idea is to add sync_stop PCM ops and call it from PCM core at
> > > > > > > snd_pcm_prepare() and snd_pcm_hw_free().
> > > > > > >
> > > > > > Will adding synchronize_irq() in snd_pcm_hw_free there fix the race issue?
> > > > > > Is it possible to have sequence like the following steps ?
> > > > > > - [Thread 1] snd_pcm_hw_free: just pass synchronize_irq()
> > > > > > - [Thread 2] another interrupt come -> snd_intel8x0_update() -> goes
> > > > > > into the lock region of snd_pcm_period_elapsed() and passes the
> > > > > > PCM_RUNTIME_CHECK (right before snd_pcm_running())
> > > > >
> > > > > This shouldn't happen because at the point snd_pcm_hw_free() the
> > > > > stream has been already in the SETUP state, i.e. with trigger PCM
> > > > > callback, the hardware has been programmed not to generate the PCM
> > > > > stream IRQ.
> > > > >
> > > > Thanks for pointing that out.
> > > > snd_pcm_drop() will be called right before accessing `opts->hw_free`
> > > > and device dma will be stopped by SNDRV_PCM_TRIGGER_STOP.
> > > > And snd_pcm_prepare() will be called when the device is not running.
> > > > So synchronize_irq() should be enough for both of them.
> > > >
> > > > I have a patch like this now in intel8x0:
> > > >
> > > > diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
> > > > index 6ff94d8ad86e..728588937673 100644
> > > > --- a/sound/pci/intel8x0.c
> > > > +++ b/sound/pci/intel8x0.c
> > > > @@ -923,8 +923,10 @@ static int snd_intel8x0_hw_params(struct
> > > > snd_pcm_substream *substream,
> > > >
> > > > static int snd_intel8x0_hw_free(struct snd_pcm_substream *substream)
> > > > {
> > > > + struct intel8x0 *chip = snd_pcm_substream_chip(substream);
> > > > struct ichdev *ichdev = get_ichdev(substream);
> > > >
> > > > + synchronize_irq(chip->irq);
> > > > if (ichdev->pcm_open_flag) {
> > > > snd_ac97_pcm_close(ichdev->pcm);
> > > > ichdev->pcm_open_flag = 0;
> > > > @@ -993,6 +995,7 @@ static int snd_intel8x0_pcm_prepare(struct
> > > > snd_pcm_substream *substream)
> > > > struct snd_pcm_runtime *runtime = substream->runtime;
> > > > struct ichdev *ichdev = get_ichdev(substream);
> > > >
> > > > + synchronize_irq(chip->irq);
> > > > ichdev->physbuf = runtime->dma_addr;
> > > > ichdev->size = snd_pcm_lib_buffer_bytes(substream);
> > > > ichdev->fragsize = snd_pcm_lib_period_bytes(substream);
> > > >
> > > > If that looks good to you, I can upload the patch to pw as well.
> > > > Then we can upstream the intel8x0 patch and the first change I made in
> > > > this series (the elapse one).
> > > > Does that sound good to you?
> > >
> > > I already have a patch set that adds the irq-sync commonly, as this
> > > problem is seen on various drivers as you already pointed.
> > >
> > > Below two patches add the support in PCM core side, and the rest need in
> > > intel8x0.c is something like:
> > >
> > > --- a/sound/pci/intel8x0.c
> > > +++ b/sound/pci/intel8x0.c
> > > @@ -3092,6 +3092,7 @@ static int snd_intel8x0_create(struct snd_card *card,
> > > return -EBUSY;
> > > }
> > > chip->irq = pci->irq;
> > > + card->sync_irq = chip->irq;
> > >
> > Will this assignment or removement cause possible race if the driver
> > is careless?
>
> Not really, it just influences on the possible synchronize_irq() call,
> and the call itself can't be so racy. So it's basically safe to set
> and clear at any time.
Got it. I'm not that familiar with that function.
>
> > Maybe providing some helper functions or teaching driver writers when
> > is the right time to change or remove the sync_irq will help.
>
> The assumption is to set this whenever an irq handler is requested or
> freed. I don't mind introducing an API function
> (e.g. snd_card_set_sync_irq(card, irq)), but OTOH I don't see much
> benefit by that, either. This is no mandatory thing, you can
> implement in the driver side in different ways, too...
>
Thanks for your clarification. I think both ways would be fine.
Let me wait for your patches and add the fix for intel8x0 based on it later?
CC me anytime when you're ready.
Thanks!
Paul
>
> thanks,
>
> Takashi
>
> >
> > Best,
> > Paul
> >
> > > if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
> > > snd_intel8x0_free(chip);
> > >
> > >
> > > (The intel8x0 does re-acquire IRQ, so it'll need a bit more lines, but
> > > you get the idea.)
> > >
> > > My plan is to merge the whole changes after 5.5-rc1, destined for
> > > 5.6.
> > >
> > >
> > > thanks,
> > >
> > > Takashi
> > >
> >
2
1
This patch set enables BACO (Bus Active Chip Off) for
power savings on VI+ asics. Similar to PowerXpress
and Hybrid Graphics (PX/HG) laptops, we can disable GPUs
at runtime when they are not in use if they support
BACO. The runtime pm code in amdgpu was originally
developed for PX/HG laptops, so it was pretty entangled
with the vga_switcheroo and ACPI code. Since the GPU
contains an audio codec for HDMI/DP, there is some
interaction with the hda driver. I am by no means an
expert on alsa, so any advice on those patches is much
appreciated. I had to enable runtime pm on the hda
device to allow the GPU to enter runtime pm because
they are linked.
The full tree can be found here:
https://cgit.freedesktop.org/~agd5f/linux/log/?h=baco
TODO:
- Turn off runtime pm when KFD user queues are active
I've tested these pretty extensively on the asics I
have access to. All seems to work properly. HDMI
audio works fine with runtime pm both with and without
the GPU BACO stuff.
I'd like to land the the audio patches and the first 15 GPU
patches. I don't plan to enable this by default
(last patch in the GPU set) until the KFD changes are
in place to properly handle runtime pm, however it can
be enabled via module parameter (runpm=1).
v2:
- Split whitespace changes from baco callback addition
- Fix pci ref counting in px/hg handling in hda driver
- Handle CONFIG_ACPI properly
- Split adding new hda pci ids from adding runpm flag
v3:
- Don't enable BACO on Navi chips yet
Alex Deucher (20):
drm/amdgpu: add asic callback for BACO support
drm/amdgpu: add supports_baco callback for soc15 asics. (v2)
drm/amdgpu: add supports_baco callback for SI asics.
drm/amdgpu: add supports_baco callback for CIK asics.
drm/amdgpu: add supports_baco callback for VI asics.
drm/amdgpu: add supports_baco callback for NV asics.
drm/amdgpu: add a amdgpu_device_supports_baco helper
drm/amdgpu: rename amdgpu_device_is_px to amdgpu_device_supports_boco
(v2)
drm/amdgpu: add additional boco checks to runtime suspend/resume (v2)
drm/amdgpu: split swSMU baco_reset into enter and exit
drm/amdgpu: add helpers for baco entry and exit
drm/amdgpu: add baco support to runtime suspend/resume
drm/amdgpu: start to disentangle boco from runtime pm
drm/amdgpu: disentangle runtime pm and vga_switcheroo
drm/amdgpu: enable runtime pm on BACO capable boards if runpm=1
drm/amdgpu/runpm: enable runpm on baco capable VI+ asics (v2)
ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD
ALSA: hda/hdmi - Add new pci ids for AMD GPU display audio
ALSA: hda/hdmi - enable runtime pm for newer AMD display audio
ALSA: hda/hdmi - enable automatic runtime pm for AMD HDMI codecs by
default
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 11 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 106 ++++++++++++++++--
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 63 ++++++-----
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 21 +++-
drivers/gpu/drm/amd/amdgpu/cik.c | 18 +++
drivers/gpu/drm/amd/amdgpu/nv.c | 18 ++-
drivers/gpu/drm/amd/amdgpu/si.c | 6 +
drivers/gpu/drm/amd/amdgpu/soc15.c | 34 +++++-
drivers/gpu/drm/amd/amdgpu/vi.c | 22 ++++
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 20 +++-
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 3 +-
.../gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 6 +-
drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 3 +-
drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 3 +-
drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 9 +-
drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 3 +-
sound/pci/hda/hda_intel.c | 80 ++++++++++++-
sound/pci/hda/patch_hdmi.c | 1 +
18 files changed, 366 insertions(+), 61 deletions(-)
--
2.23.0
1
20

15 Nov '19
Since
- snd_pcm_detach_substream sets runtime to null without stream lock and
- snd_pcm_period_elapsed checks the nullity of the runtime outside of
stream lock.
This will trigger null memory access in snd_pcm_running() call in
snd_pcm_period_elapsed.
paulhsia (2):
ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed()
ALSA: pcm: Use stream lock in snd_pcm_detach_substream()
sound/core/pcm.c | 8 +++++++-
sound/core/pcm_lib.c | 8 ++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
--
2.24.0.rc1.363.gb1bccd3e3d-goog
3
11

15 Nov '19
This is a series I worked on with Baolin in 2017 and 2018, but we
never quite managed to finish up the last pieces. During the
ALSA developer meetup at ELC-E 2018 in Edinburgh, a decision was
made to go with this approach for keeping best compatibility
with existing source code, and then I failed to follow up by
resending the patches.
Now I have patches for all remaining time_t uses in the kernel,
so it's absolutely time to revisit them. I have done more
review of the patches myself and found a couple of minor issues
that I have fixed up, otherwise the series is still the same as
before.
Conceptually, the idea of these patches is:
- 64-bit applications should see no changes at all, neither
compile-time nor run-time.
- 32-bit code compiled with a 64-bit time_t currently
does not work with ALSA, and requires kernel changes and/or
sound/asound.h changes
- Most 32-bit code using these interfaces will work correctly
on a modified kernel, with or without the uapi header changes.
- 32-bit code using SNDRV_TIMER_IOCTL_TREAD requires the
updated header file for 64-bit time_t support
- 32-bit i386 user space with 64-bit time_t is broken for
SNDRV_PCM_IOCTL_STATUS, SNDRV_RAWMIDI_IOCTL_STATUS and
SNDRV_PCM_IOCTL_SYNC_PTR because of i386 alignment. This is also
addressed by the updated uapi header.
- PCM mmap is currently supported on native x86 kernels
(both 32-bit and 64-bit) but not for compat mode. This series breaks
the 32-bit native mmap support for 32-bit time_t, but instead allows
it for 64-bit time_t on both native and compat kernels. This seems to
be the best trade-off, as mmap support is optional already, and most
32-bit code runs in compat mode anyway.
- I've tried to avoid breaking compilation of 32-bit code
as much as possible. Anything that does break however is likely code
that is already broken on 64-bit time_t and needs source changes to
fix them.
I would like to propose merging this into the alsa tree after
the v5.5 merge window for inclusion into v5.6, to allow a good
amount of testing, in particular for the header changes that
may cause problems for user space applications.
A git branch with the same contents is available for testing at [1].
Please review and test!
Arnd
[1] https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git y2038-alsa
[2] https://lore.kernel.org/lkml/CAK8P3a2Os66+iwQYf97qh05W2JP8rmWao8zmKoHiXqVHv…
Changes since v5 (Arnd):
- Rebased to linux-5.4-rc4
- Updated to completely remove timespec and time_t references from alsa
- found and fixed a few bugs
Changes since v4 (Baolin):
- Add patch 5 to change trigger_tstamp member of struct snd_pcm_runtime.
- Add patch 8 to change internal timespec.
- Add more explanation in commit message.
- Use ktime_get_real_ts64() in patch 6.
- Split common code out into a separate function in patch 6.
- Fix tu->tread bug in patch 6 and remove #if __BITS_PER_LONG == 64 macro.
Changes since v3:
- Move struct snd_pcm_status32 to pcm.h file.
- Modify comments and commit message.
- Add new patch2 ~ patch6.
Changes since v2:
- Renamed all structures to make clear.
- Remove CONFIG_X86_X32 macro and introduced new compat_snd_pcm_status64_x86_32.
Changes since v1:
- Add one macro for struct snd_pcm_status_32 which only active in 32bits kernel.
- Convert pcm_compat.c to use struct snd_pcm_status_64.
- Convert pcm_native.c to use struct snd_pcm_status_64.
---
Arnd Bergmann (2):
ALSA: move snd_pcm_ioctl_sync_ptr_compat into pcm_native.c
ALSA: add new 32-bit layout for snd_pcm_mmap_status/control
Baolin Wang (6):
ALSA: Replace timespec with timespec64
ALSA: Avoid using timespec for struct snd_timer_status
ALSA: Avoid using timespec for struct snd_ctl_elem_value
ALSA: Avoid using timespec for struct snd_pcm_status
ALSA: Avoid using timespec for struct snd_rawmidi_status
ALSA: Avoid using timespec for struct snd_timer_tread
include/sound/pcm.h | 74 ++++++--
include/sound/timer.h | 4 +-
include/uapi/sound/asound.h | 132 ++++++++++++--
sound/core/pcm.c | 12 +-
sound/core/pcm_compat.c | 282 ++++++++----------------------
sound/core/pcm_lib.c | 38 ++--
sound/core/pcm_native.c | 226 +++++++++++++++++++++---
sound/core/rawmidi.c | 132 +++++++++++---
sound/core/rawmidi_compat.c | 87 +++------
sound/core/timer.c | 229 ++++++++++++++++++------
sound/core/timer_compat.c | 62 +------
sound/pci/hda/hda_controller.c | 10 +-
sound/soc/intel/skylake/skl-pcm.c | 4 +-
13 files changed, 804 insertions(+), 488 deletions(-)
--
2.20.0
2
25

15 Nov '19
Hey,
here's a small set of HDA patches touching Intel specific
code. First is an important bugfix to TGL platforms
and latter are cleanups for code that is no longer needed.
Kai Vehmanen (3):
ALSA: hda: hdmi - fix port numbering for ICL and TGL platforms
ALSA: hda: hdmi - remove redundant code comments
ALSA: hda - remove forced polling workaround for CFL and CNL
sound/pci/hda/hda_intel.c | 6 ------
sound/pci/hda/patch_hdmi.c | 17 +++++++----------
2 files changed, 7 insertions(+), 16 deletions(-)
--
2.17.1
2
4

[alsa-devel] [PATCH v6 1/6] ASoC: amd:Create multiple I2S platform device endpoint
by Ravulapati Vishnu vardhan rao 15 Nov '19
by Ravulapati Vishnu vardhan rao 15 Nov '19
15 Nov '19
Creates Platform Device endpoints for multiple
I2S instances: SP and BT endpoints device.
Pass PCI resources like MMIO, irq to the platform devices.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x.h | 5 +++
sound/soc/amd/raven/pci-acp3x.c | 96 +++++++++++++++++++++++++++++------------
2 files changed, 73 insertions(+), 28 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 4f2cadd..2f15fe1 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,10 +7,15 @@
#include "chip_offset_byte.h"
+#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
#define ACP3x_REG_START 0x1240000
#define ACP3x_REG_END 0x1250200
+#define ACP3x_I2STDM_REG_START 0x1242400
+#define ACP3x_I2STDM_REG_END 0x1242410
+#define ACP3x_BT_TDM_REG_START 0x1242800
+#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index facec24..4c4601d 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -16,17 +16,17 @@ struct acp3x_dev_data {
void __iomem *acp3x_base;
bool acp3x_audio_mode;
struct resource *res;
- struct platform_device *pdev;
+ struct platform_device *pdev[ACP3x_DEVS];
};
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
- int ret;
- u32 addr, val;
struct acp3x_dev_data *adata;
- struct platform_device_info pdevinfo;
+ struct platform_device_info pdevinfo[ACP3x_DEVS];
unsigned int irqflags;
+ int ret;
+ u32 addr, val, i;
if (pci_enable_device(pci)) {
dev_err(&pci->dev, "pci_enable_device failed\n");
@@ -43,7 +43,7 @@ static int snd_acp3x_probe(struct pci_dev *pci,
GFP_KERNEL);
if (!adata) {
ret = -ENOMEM;
- goto release_regions;
+ goto adata_free;
}
/* check for msi interrupt support */
@@ -68,11 +68,11 @@ static int snd_acp3x_probe(struct pci_dev *pci,
switch (val) {
case I2S_MODE:
adata->res = devm_kzalloc(&pci->dev,
- sizeof(struct resource) * 2,
+ sizeof(struct resource) * 4,
GFP_KERNEL);
if (!adata->res) {
ret = -ENOMEM;
- goto unmap_mmio;
+ goto release_regions;
}
adata->res[0].name = "acp3x_i2s_iomem";
@@ -80,28 +80,52 @@ static int snd_acp3x_probe(struct pci_dev *pci,
adata->res[0].start = addr;
adata->res[0].end = addr + (ACP3x_REG_END - ACP3x_REG_START);
- adata->res[1].name = "acp3x_i2s_irq";
- adata->res[1].flags = IORESOURCE_IRQ;
- adata->res[1].start = pci->irq;
- adata->res[1].end = pci->irq;
+ adata->res[1].name = "acp3x_i2s_sp";
+ adata->res[1].flags = IORESOURCE_MEM;
+ adata->res[1].start = addr + ACP3x_I2STDM_REG_START;
+ adata->res[1].end = addr + ACP3x_I2STDM_REG_END;
+
+ adata->res[2].name = "acp3x_i2s_bt";
+ adata->res[2].flags = IORESOURCE_MEM;
+ adata->res[2].start = addr + ACP3x_BT_TDM_REG_START;
+ adata->res[2].end = addr + ACP3x_BT_TDM_REG_END;
+
+ adata->res[3].name = "acp3x_i2s_irq";
+ adata->res[3].flags = IORESOURCE_IRQ;
+ adata->res[3].start = pci->irq;
+ adata->res[3].end = adata->res[3].start;
adata->acp3x_audio_mode = ACP3x_I2S_MODE;
memset(&pdevinfo, 0, sizeof(pdevinfo));
- pdevinfo.name = "acp3x_rv_i2s";
- pdevinfo.id = 0;
- pdevinfo.parent = &pci->dev;
- pdevinfo.num_res = 2;
- pdevinfo.res = adata->res;
- pdevinfo.data = &irqflags;
- pdevinfo.size_data = sizeof(irqflags);
-
- adata->pdev = platform_device_register_full(&pdevinfo);
- if (IS_ERR(adata->pdev)) {
- dev_err(&pci->dev, "cannot register %s device\n",
- pdevinfo.name);
- ret = PTR_ERR(adata->pdev);
- goto unmap_mmio;
+ pdevinfo[0].name = "acp3x_rv_i2s_dma";
+ pdevinfo[0].id = 0;
+ pdevinfo[0].parent = &pci->dev;
+ pdevinfo[0].num_res = 4;
+ pdevinfo[0].res = &adata->res[0];
+ pdevinfo[0].data = &irqflags;
+ pdevinfo[0].size_data = sizeof(irqflags);
+
+ pdevinfo[1].name = "acp3x_i2s_playcap";
+ pdevinfo[1].id = 0;
+ pdevinfo[1].parent = &pci->dev;
+ pdevinfo[1].num_res = 1;
+ pdevinfo[1].res = &adata->res[1];
+
+ pdevinfo[2].name = "acp3x_i2s_playcap";
+ pdevinfo[2].id = 1;
+ pdevinfo[2].parent = &pci->dev;
+ pdevinfo[2].num_res = 1;
+ pdevinfo[2].res = &adata->res[2];
+ for (i = 0; i < ACP3x_DEVS ; i++) {
+ adata->pdev[i] =
+ platform_device_register_full(&pdevinfo[i]);
+ if (IS_ERR(adata->pdev[i])) {
+ dev_err(&pci->dev, "cannot register %s device\n",
+ pdevinfo[i].name);
+ ret = PTR_ERR(adata->pdev[i]);
+ goto unmap_mmio;
+ }
}
break;
default:
@@ -112,10 +136,22 @@ static int snd_acp3x_probe(struct pci_dev *pci,
return 0;
unmap_mmio:
- pci_disable_msi(pci);
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
iounmap(adata->acp3x_base);
+ kfree(adata->res);
+ kfree(adata);
+ pci_disable_msi(pci);
+ pci_release_regions(pci);
+ pci_disable_device(pci);
release_regions:
+ kfree(adata);
+ pci_disable_msi(pci);
+ pci_release_regions(pci);
+ pci_disable_device(pci);
+adata_free:
pci_release_regions(pci);
+ pci_disable_device(pci);
disable_pci:
pci_disable_device(pci);
@@ -125,10 +161,13 @@ static int snd_acp3x_probe(struct pci_dev *pci,
static void snd_acp3x_remove(struct pci_dev *pci)
{
struct acp3x_dev_data *adata = pci_get_drvdata(pci);
+ int i;
- platform_device_unregister(adata->pdev);
+ if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+ }
iounmap(adata->acp3x_base);
-
pci_disable_msi(pci);
pci_release_regions(pci);
pci_disable_device(pci);
@@ -151,6 +190,7 @@ static struct pci_driver acp3x_driver = {
module_pci_driver(acp3x_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_DESCRIPTION("AMD ACP3x PCI driver");
MODULE_LICENSE("GPL v2");
--
2.7.4
2
1

15 Nov '19
From: Colin Ian King <colin.king(a)canonical.com>
There is a block that is indented too deeply, remove
the extraneous tabs.
Signed-off-by: Colin Ian King <colin.king(a)canonical.com>
---
sound/soc/codecs/tas2770.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c
index ad76f22fcfac..54c8135fe43c 100644
--- a/sound/soc/codecs/tas2770.c
+++ b/sound/soc/codecs/tas2770.c
@@ -761,12 +761,12 @@ static int tas2770_i2c_probe(struct i2c_client *client,
tas2770->reset_gpio = devm_gpiod_get_optional(tas2770->dev,
"reset-gpio",
GPIOD_OUT_HIGH);
- if (IS_ERR(tas2770->reset_gpio)) {
- if (PTR_ERR(tas2770->reset_gpio) == -EPROBE_DEFER) {
- tas2770->reset_gpio = NULL;
- return -EPROBE_DEFER;
- }
+ if (IS_ERR(tas2770->reset_gpio)) {
+ if (PTR_ERR(tas2770->reset_gpio) == -EPROBE_DEFER) {
+ tas2770->reset_gpio = NULL;
+ return -EPROBE_DEFER;
}
+ }
tas2770->channel_size = 0;
tas2770->slot_width = 0;
--
2.20.1
3
2
The current code assumes that the power is turned off in
SND_SOC_BIAS_OFF. If there are no actual regulator the codec isn't
turned off and the registers are not reset to their default values but
the regcache is still marked as dirty. Thus a value might not be written
to the hardware if it is set to the default value. Do a software reset
before turning off the power to make sure the registers are always reset
to their default states.
Signed-off-by: Michael Walle <michael(a)walle.cc>
---
sound/soc/codecs/wm8904.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
index 2a7d23a5daa8..7d7ea15d73e0 100644
--- a/sound/soc/codecs/wm8904.c
+++ b/sound/soc/codecs/wm8904.c
@@ -1933,6 +1933,7 @@ static int wm8904_set_bias_level(struct snd_soc_component *component,
snd_soc_component_update_bits(component, WM8904_BIAS_CONTROL_0,
WM8904_BIAS_ENA, 0);
+ snd_soc_component_write(component, WM8904_SW_RESET_AND_ID, 0);
regcache_cache_only(wm8904->regmap, true);
regcache_mark_dirty(wm8904->regmap);
--
2.20.1
3
2

[alsa-devel] [PATCH v2] ASoC: rt5645: Fixed typo for buddy jack support.
by Jacob Rasmussen 15 Nov '19
by Jacob Rasmussen 15 Nov '19
15 Nov '19
Had a typo in e7cfd867fd98 that resulted in buddy jack support not being
fixed.
Fixes: e7cfd867fd98 ("ASoC: rt5645: Fixed buddy jack support.")
Signed-off-by: Jacob Rasmussen <jacobraz(a)google.com>
Reviewed-by: Ross Zwisler <zwisler(a)google.com>
Cc: <jacobraz(a)google.com>
CC: stable(a)vger.kernel.org
---
sound/soc/codecs/rt5645.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 902ac98a3fbe..19662ee330d6 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3271,7 +3271,7 @@ static void rt5645_jack_detect_work(struct work_struct *work)
report, SND_JACK_MICROPHONE);
return;
case 4:
- val = snd_soc_component_read32(rt5645->component, RT5645_A_JD_CTRL1) & 0x002;
+ val = snd_soc_component_read32(rt5645->component, RT5645_A_JD_CTRL1) & 0x0020;
break;
default: /* read rt5645 jd1_1 status */
val = snd_soc_component_read32(rt5645->component, RT5645_INT_IRQ_ST) & 0x1000;
--
2.21.0
2
1

15 Nov '19
Hi Mark
I got report from you that some patch couldn't apply against current code.
I'm checking posted patches and accepted patches, and it seems not yet
accepted was previous series's [9/9].
1) is same as [9/9], and I checked that it can apply to your for-5.5 branch.
Jon Hunter reported that my below patch created bug.
2) and 3) are fixup patch for it.
bfce78a559655c5c4512a898a7e5d3a796fbb473
("ASoC: soc-core: tidyup soc_init_dai_link()")
Kuninori Morimoto (3):
1) ASoC: soc-core: call snd_soc_dapm_shutdown() at soc_cleanup_card_resources()
2) ASoC: soc-core: move snd_soc_unbind_card() next to snd_soc_bind_card()
3) ASoC: soc-core: care card_probed at soc_cleanup_card_resources()
sound/soc/soc-core.c | 46 ++++++++++++++++++++++++++--------------------
1 file changed, 26 insertions(+), 20 deletions(-)
--
2.7.4
2
6

[alsa-devel] [PATCH 0/2] ASoC: Use dma_request_chan() directly for channel request
by Peter Ujfalusi 15 Nov '19
by Peter Ujfalusi 15 Nov '19
15 Nov '19
Hi,
I'm going through the tree to remove dma_request_slave_channel_reason() as it
is just:
#define dma_request_slave_channel_reason(dev, name) \
dma_request_chan(dev, name)
Regards,
Peter
---
Peter Ujfalusi (2):
ASoC: dmaengine: Use dma_request_chan() directly for channel request
ASoC: ti: davinci-mcasp: Use dma_request_chan() directly for channel
request
sound/soc/soc-generic-dmaengine-pcm.c | 2 +-
sound/soc/ti/davinci-mcasp.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
Peter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
2
4

[alsa-devel] [PATCH v6 6/6] ASoC: amd: Added ACP3x system resume and runtime pm
by Ravulapati Vishnu vardhan rao 15 Nov '19
by Ravulapati Vishnu vardhan rao 15 Nov '19
15 Nov '19
When system wide suspend happens, ACP will be powered off
and when system resumes,for audio usecase to continue,all
the runtime configuration data needs to be programmed again.
Added resume pm call back to ACP pm ops and also added runtime
PM operations for ACP3x PCM platform device.
Device will enter into D3 state when there is no activity
on audio I2S lines.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 136 +------------------------
sound/soc/amd/raven/acp3x.h | 7 ++
sound/soc/amd/raven/pci-acp3x.c | 195 +++++++++++++++++++++++++++++++++++-
3 files changed, 200 insertions(+), 138 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 51ff1c0..49279911 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -58,106 +58,6 @@ static const struct snd_pcm_hardware acp3x_pcm_hardware_capture = {
.periods_max = CAPTURE_MAX_NUM_PERIODS,
};
-static int acp3x_power_on(void __iomem *acp3x_base, bool on)
-{
- u16 val, mask;
- u32 timeout;
-
- if (on == true) {
- val = 1;
- mask = ACP3x_POWER_ON;
- } else {
- val = 0;
- mask = ACP3x_POWER_OFF;
- }
-
- rv_writel(val, acp3x_base + mmACP_PGFSM_CONTROL);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
- if ((val & ACP3x_POWER_OFF_IN_PROGRESS) == mask)
- break;
- if (timeout > 100) {
- pr_err("ACP3x power state change failure\n");
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_reset(void __iomem *acp3x_base)
-{
- u32 val, timeout;
-
- rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
- timeout > 100) {
- if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
-
- rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if (!val || timeout > 100) {
- if (!val)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_init(void __iomem *acp3x_base)
-{
- int ret;
-
- /* power on */
- ret = acp3x_power_on(acp3x_base, true);
- if (ret) {
- pr_err("ACP3x power on failed\n");
- return ret;
- }
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- return 0;
-}
-
-static int acp3x_deinit(void __iomem *acp3x_base)
-{
- int ret;
-
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- /* power off */
- ret = acp3x_power_on(acp3x_base, false);
- if (ret) {
- pr_err("ACP3x power off failed\n");
- return ret;
- }
- return 0;
-}
-
static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
{
struct i2s_dev_data *rv_i2s_data;
@@ -536,12 +436,6 @@ static int acp3x_audio_probe(struct platform_device *pdev)
adata->i2s_irq = res->start;
dev_set_drvdata(&pdev->dev, adata);
- /* Initialize ACP */
- status = acp3x_init(adata->acp3x_base);
- if (status) {
- ret = -ENODEV;
- goto io_irq;
- }
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
NULL, 0);
@@ -566,11 +460,6 @@ static int acp3x_audio_probe(struct platform_device *pdev)
dev_err:
iounmap(adata->acp3x_base);
kfree(adata);
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_info(&pdev->dev, "ACP de-initialized\n");
return ret;
io_irq:
iounmap(adata->acp3x_base);
@@ -583,16 +472,6 @@ static int acp3x_audio_probe(struct platform_device *pdev)
static int acp3x_audio_remove(struct platform_device *pdev)
{
- struct i2s_dev_data *adata;
- int ret;
-
- adata = dev_get_drvdata(&pdev->dev);
- ret = acp3x_deinit(adata->acp3x_base);
- if (ret)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_info(&pdev->dev, "ACP de-initialized\n");
-
pm_runtime_disable(&pdev->dev);
return 0;
}
@@ -600,13 +479,9 @@ static int acp3x_audio_remove(struct platform_device *pdev)
static int acp3x_resume(struct device *dev)
{
struct i2s_dev_data *adata;
- int status;
u32 val;
adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
if (adata->play_stream && adata->play_stream->runtime) {
struct i2s_stream_instance *rtd =
@@ -653,14 +528,8 @@ static int acp3x_resume(struct device *dev)
static int acp3x_pcm_runtime_suspend(struct device *dev)
{
struct i2s_dev_data *adata;
- int status;
adata = dev_get_drvdata(dev);
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(dev, "ACP de-init failed\n");
- else
- dev_info(dev, "ACP de-initialized\n");
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
@@ -670,12 +539,9 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
static int acp3x_pcm_runtime_resume(struct device *dev)
{
struct i2s_dev_data *adata;
- int status;
adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
+
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 01b283a..cf16ceb 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -65,6 +65,13 @@
#define SLOT_WIDTH_16 0x10
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+#define ACP_PGFSM_CNTL_POWER_ON_MASK 0x01
+#define ACP_PGFSM_CNTL_POWER_OFF_MASK 0x00
+#define ACP_PGFSM_STATUS_MASK 0x03
+#define ACP_POWERED_ON 0x00
+#define ACP_POWER_ON_IN_PROGRESS 0x01
+#define ACP_POWERED_OFF 0x02
+#define ACP_POWER_OFF_IN_PROGRESS 0x03
struct acp3x_platform_info {
u16 play_i2s_instance;
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index 4c4601d..d1dc7ba 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -9,6 +9,9 @@
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
+#include <linux/pm_runtime.h>
+#include <linux/delay.h>
+#include <sound/pcm.h>
#include "acp3x.h"
@@ -19,6 +22,120 @@ struct acp3x_dev_data {
struct platform_device *pdev[ACP3x_DEVS];
};
+static int acp3x_power_on(void __iomem *acp3x_base)
+{
+ u32 val;
+ u32 timeout;
+
+ timeout = 0;
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+
+ if (val == 0)
+ return val;
+
+ if (!((val & ACP_PGFSM_STATUS_MASK) ==
+ ACP_POWER_ON_IN_PROGRESS))
+ rv_writel(ACP_PGFSM_CNTL_POWER_ON_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ while (++timeout) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if (!val)
+ break;
+ udelay(1);
+ if (timeout > 500) {
+ pr_err("ACP is Not Powered ON\n");
+ return -ETIMEDOUT;
+ }
+ }
+ return 0;
+}
+static int acp3x_power_off(void __iomem *acp3x_base)
+{
+ u32 val;
+ u32 timeout, ret;
+
+ timeout = 0;
+ rv_writel(ACP_PGFSM_CNTL_POWER_OFF_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ while (++timeout) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if ((val & ACP_PGFSM_STATUS_MASK) == ACP_POWERED_OFF) {
+ ret = 0;
+ break;
+ }
+ udelay(1);
+ if (timeout > 500) {
+ pr_err("ACP is Not Powered OFF\n");
+ ret = -ETIMEDOUT;
+ break;
+ }
+ }
+ return ret;
+}
+static int acp3x_reset(void __iomem *acp3x_base)
+{
+ u32 val, timeout;
+
+ rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
+ timeout > 100) {
+ if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
+ break;
+ return -ENODEV;
+ }
+ cpu_relax();
+ }
+ rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if (!val)
+ break;
+ if (timeout > 100)
+ return -ENODEV;
+ cpu_relax();
+ }
+ return 0;
+}
+static int acp3x_init(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* power on */
+ ret = acp3x_power_on(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power on failed\n");
+ return ret;
+ }
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ return 0;
+}
+static int acp3x_deinit(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ /* power off */
+ ret = acp3x_power_off(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power off failed\n");
+ return ret;
+ }
+ return 0;
+}
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
@@ -63,6 +180,9 @@ static int snd_acp3x_probe(struct pci_dev *pci,
}
pci_set_master(pci);
pci_set_drvdata(pci, adata);
+ ret = acp3x_init(adata->acp3x_base);
+ if (ret)
+ goto release_init;
val = rv_readl(adata->acp3x_base + mmACP_I2S_PIN_CONFIG);
switch (val) {
@@ -72,7 +192,7 @@ static int snd_acp3x_probe(struct pci_dev *pci,
GFP_KERNEL);
if (!adata->res) {
ret = -ENOMEM;
- goto release_regions;
+ goto release_resource;
}
adata->res[0].name = "acp3x_i2s_iomem";
@@ -133,9 +253,19 @@ static int snd_acp3x_probe(struct pci_dev *pci,
ret = -ENODEV;
goto unmap_mmio;
}
+ pm_runtime_set_autosuspend_delay(&pci->dev, 5000);
+ pm_runtime_use_autosuspend(&pci->dev);
+ pm_runtime_set_active(&pci->dev);
+ pm_runtime_put_noidle(&pci->dev);
+ pm_runtime_enable(&pci->dev);
return 0;
unmap_mmio:
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_dbg(&pci->dev, "ACP de-initialized\n");
for (i = 0 ; i < ACP3x_DEVS ; i++)
platform_device_unregister(adata->pdev[i]);
iounmap(adata->acp3x_base);
@@ -144,6 +274,23 @@ static int snd_acp3x_probe(struct pci_dev *pci,
pci_disable_msi(pci);
pci_release_regions(pci);
pci_disable_device(pci);
+release_resource:
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_dbg(&pci->dev, "ACP de-initialized\n");
+ iounmap(adata->acp3x_base);
+ kfree(adata);
+ pci_disable_msi(pci);
+ pci_release_regions(pci);
+ pci_disable_device(pci);
+release_init:
+ iounmap(adata->acp3x_base);
+ kfree(adata);
+ pci_disable_msi(pci);
+ pci_release_regions(pci);
+ pci_disable_device(pci);
release_regions:
kfree(adata);
pci_disable_msi(pci);
@@ -157,17 +304,56 @@ static int snd_acp3x_probe(struct pci_dev *pci,
return ret;
}
+static int snd_acp3x_suspend(struct device *dev)
+{
+ int status;
+ struct acp3x_dev_data *adata;
+
+ adata = dev_get_drvdata(dev);
+ status = acp3x_deinit(adata->acp3x_base);
+ if (status)
+ dev_err(dev, "ACP de-init failed\n");
+ else
+ dev_dbg(dev, "ACP de-initialized\n");
+
+ return 0;
+}
+static int snd_acp3x_resume(struct device *dev)
+{
+ int status;
+ struct acp3x_dev_data *adata;
+ adata = dev_get_drvdata(dev);
+ status = acp3x_init(adata->acp3x_base);
+ if (status) {
+ dev_err(dev, "ACP init failed\n");
+ return status;
+ }
+ return 0;
+}
+static const struct dev_pm_ops acp3x_pm = {
+ .runtime_suspend = snd_acp3x_suspend,
+ .runtime_resume = snd_acp3x_resume,
+ .resume = snd_acp3x_resume,
+};
static void snd_acp3x_remove(struct pci_dev *pci)
{
- struct acp3x_dev_data *adata = pci_get_drvdata(pci);
- int i;
+ struct acp3x_dev_data *adata;
+ int i, ret;
+ adata = pci_get_drvdata(pci);
if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
for (i = 0 ; i < ACP3x_DEVS ; i++)
platform_device_unregister(adata->pdev[i]);
}
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_dbg(&pci->dev, "ACP de-initialized\n");
iounmap(adata->acp3x_base);
+ pm_runtime_disable(&pci->dev);
+ pm_runtime_get_noresume(&pci->dev);
pci_disable_msi(pci);
pci_release_regions(pci);
pci_disable_device(pci);
@@ -186,6 +372,9 @@ static struct pci_driver acp3x_driver = {
.id_table = snd_acp3x_ids,
.probe = snd_acp3x_probe,
.remove = snd_acp3x_remove,
+ .driver = {
+ .pm = &acp3x_pm,
+ }
};
module_pci_driver(acp3x_driver);
--
2.7.4
1
0

[alsa-devel] [PATCH v6 5/6] ASoC: amd: Handle ACP3x I2S-SP Interrupts.
by Ravulapati Vishnu vardhan rao 15 Nov '19
by Ravulapati Vishnu vardhan rao 15 Nov '19
15 Nov '19
Enabled support for I2S-SP interrupt handling.
Previous to this implementation, driver supports only interrupts
on BT instance.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index e2051d1..51ff1c0 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -177,6 +177,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->play_stream);
play_flag = 1;
}
+ if ((val & BIT(I2S_TX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_play_stream) {
+ rv_writel(BIT(I2S_TX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_play_stream);
+ play_flag = 1;
+ }
if ((val & BIT(BT_RX_THRESHOLD)) && rv_i2s_data->capture_stream) {
rv_writel(BIT(BT_RX_THRESHOLD), rv_i2s_data->acp3x_base +
@@ -184,6 +191,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->capture_stream);
cap_flag = 1;
}
+ if ((val & BIT(I2S_RX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_capture_stream) {
+ rv_writel(BIT(I2S_RX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_capture_stream);
+ cap_flag = 1;
+ }
if (play_flag | cap_flag)
return IRQ_HANDLED;
--
2.7.4
1
0

[alsa-devel] [PATCH v6 4/6] ASoC: amd: add ACP3x TDM mode support
by Ravulapati Vishnu vardhan rao 15 Nov '19
by Ravulapati Vishnu vardhan rao 15 Nov '19
15 Nov '19
ACP3x I2S (CPU DAI) can act in normal I2S and TDM modes. Added support
for TDM mode. Desired mode can be selected from ASoC machine driver.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 42 +++++++++++++++++++++++++++++++----------
sound/soc/amd/raven/acp3x.h | 2 ++
2 files changed, 34 insertions(+), 10 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index 247b9f5..5cb4ef7 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -43,8 +43,8 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
u32 rx_mask, int slots, int slot_width)
{
struct i2s_dev_data *adata;
- u32 val;
u16 slot_len;
+ u32 val, flen, reg_val, frmt_reg;
adata = snd_soc_dai_get_drvdata(cpu_dai);
@@ -67,16 +67,38 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
return -EINVAL;
}
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_IRER);
-
- val = FRM_LEN | (slots << 15) | (slot_len << 18);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+ /* Enable I2S / BT channels TDM and respective
+ * I2S/BT`s TX/RX Formats frame lengths.
+ */
+ flen = FRM_LEN | (slots << 15) | (slot_len << 18);
- adata->tdm_fmt = val;
+ if (adata->substream_type == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ frmt_reg = mmACP_BTTDM_TXFRMT;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ frmt_reg = mmACP_I2STDM_TXFRMT;
+ }
+ } else {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ frmt_reg = mmACP_BTTDM_RXFRMT;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ frmt_reg = mmACP_I2STDM_RXFRMT;
+ }
+ }
+ val = rv_readl(adata->acp3x_base + reg_val);
+ rv_writel(val | 0x2, adata->acp3x_base + reg_val);
+ rv_writel(flen, adata->acp3x_base + frmt_reg);
+ adata->tdm_fmt = flen;
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index c071477..01b283a 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -76,6 +76,8 @@ struct i2s_dev_data {
bool tdm_mode;
unsigned int i2s_irq;
u32 tdm_fmt;
+ u16 i2s_instance;
+ u32 substream_type;
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
--
2.7.4
1
0

[alsa-devel] [PATCH v6 3/6] ASoC: amd: Enabling I2S instance in DMA and DAI
by Ravulapati Vishnu vardhan rao 15 Nov '19
by Ravulapati Vishnu vardhan rao 15 Nov '19
15 Nov '19
This patch adds I2S SP support in ACP PCM DMA and DAI.
Added I2S support in DMA and DAI probe,its hw_params handling
its open and close functionalities.
This enable to open and close on the SP instance for
playback and capture.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 119 ++++++++++++++++++----
sound/soc/amd/raven/acp3x-pcm-dma.c | 193 +++++++++++++++++++++++++-----------
sound/soc/amd/raven/acp3x.h | 74 +++++++++++---
3 files changed, 294 insertions(+), 92 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index df62c17..247b9f5 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -85,10 +85,22 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct i2s_stream_instance *rtd;
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
u32 val;
u32 reg_val;
+ prtd = substream->private_data;
rtd = substream->runtime->private_data;
+ card = prtd->card;
+ pinfo = snd_soc_card_get_drvdata(card);
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_U8:
@@ -107,11 +119,25 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
default:
return -EINVAL;
}
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- reg_val = mmACP_BTTDM_ITER;
- else
- reg_val = mmACP_BTTDM_IRER;
-
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ }
+ }
val = rv_readl(rtd->acp3x_base + reg_val);
val = val | (rtd->xfer_resolution << 3);
rv_writel(val, rtd->acp3x_base + reg_val);
@@ -122,10 +148,21 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{
struct i2s_stream_instance *rtd;
- u32 val, period_bytes;
- int ret, reg_val;
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
+ u32 ret, val, period_bytes, reg_val, ier_val, water_val;
+ prtd = substream->private_data;
rtd = substream->runtime->private_data;
+ card = prtd->card;
+ pinfo = snd_soc_card_get_drvdata(card);
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
period_bytes = frames_to_bytes(substream->runtime,
substream->runtime->period_size);
switch (cmd) {
@@ -135,31 +172,75 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
rtd->bytescount = acp_get_byte_count(rtd,
substream->stream);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- reg_val = mmACP_BTTDM_ITER;
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_TX_INTR_WATERMARK_SIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ water_val =
+ mmACP_BT_TX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_BTTDM_ITER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ water_val =
+ mmACP_I2S_TX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_I2STDM_ITER;
+ ier_val = mmACP_I2STDM_IER;
+ }
} else {
- reg_val = mmACP_BTTDM_IRER;
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_RX_INTR_WATERMARK_SIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ water_val =
+ mmACP_BT_RX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_BTTDM_IRER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ water_val =
+ mmACP_I2S_RX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_I2STDM_IRER;
+ ier_val = mmACP_I2STDM_IER;
+ }
}
+ rv_writel(period_bytes, rtd->acp3x_base + water_val);
val = rv_readl(rtd->acp3x_base + reg_val);
val = val | BIT(0);
rv_writel(val, rtd->acp3x_base + reg_val);
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
+ rv_writel(1, rtd->acp3x_base + ier_val);
+ ret = 0;
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- reg_val = mmACP_BTTDM_ITER;
- else
- reg_val = mmACP_BTTDM_IRER;
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ ier_val = mmACP_I2STDM_IER;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ ier_val = mmACP_I2STDM_IER;
+ }
+ }
val = rv_readl(rtd->acp3x_base + reg_val);
val = val & ~BIT(0);
rv_writel(val, rtd->acp3x_base + reg_val);
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
+ rv_writel(0, rtd->acp3x_base + ier_val);
+ ret = 0;
break;
default:
ret = -EINVAL;
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index ffd7cd1..e2051d1 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -194,20 +194,36 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
{
u16 page_idx;
- u32 low, high, val, acp_fifo_addr;
- dma_addr_t addr = rtd->dma_addr;
+ uint64_t low, high, val, acp_fifo_addr;
+ uint64_t reg_ringbuf_size, reg_dma_size, reg_fifo_size, reg_fifo_addr;
+ dma_addr_t addr;
- /* 8 scratch registers used to map one 64 bit address */
- if (direction == SNDRV_PCM_STREAM_PLAYBACK)
- val = 0;
- else
- val = rtd->num_pages * 8;
+ addr = rtd->dma_addr;
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_PB_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_PB_PTE_OFFSET;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_CP_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_CP_PTE_OFFSET;
+ }
+ }
/* Group Enable */
rv_writel(ACP_SRAM_PTE_OFFSET | BIT(31), rtd->acp3x_base +
- mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
+ mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
rv_writel(PAGE_SIZE_4K_ENABLE, rtd->acp3x_base +
- mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
+ mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
for (page_idx = 0; page_idx < rtd->num_pages; page_idx++) {
/* Load the low address of page int ACP SRAM through SRBM */
@@ -224,38 +240,61 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
}
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_TX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET + (rtd->num_pages * 8)
- + PLAYBACK_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_TX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_TX_FIFOSIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_ringbuf_size = mmACP_BT_TX_RINGBUFSIZE;
+ reg_dma_size = mmACP_BT_TX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_PB_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_BT_TX_FIFOADDR;
+ reg_fifo_size = mmACP_BT_TX_FIFOSIZE;
+ rv_writel(I2S_BT_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_TX_RINGBUFADDR);
+ break;
+
+ case I2S_SP_INSTANCE:
+ default:
+ reg_ringbuf_size = mmACP_I2S_TX_RINGBUFSIZE;
+ reg_dma_size = mmACP_I2S_TX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_PB_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_I2S_TX_FIFOADDR;
+ reg_fifo_size = mmACP_I2S_TX_FIFOSIZE;
+ rv_writel(I2S_SP_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_TX_RINGBUFADDR);
+ }
} else {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START + MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_RX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
- (rtd->num_pages * 8) + CAPTURE_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_RX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_RX_FIFOSIZE);
- }
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_ringbuf_size = mmACP_BT_RX_RINGBUFSIZE;
+ reg_dma_size = mmACP_BT_RX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_CAPT_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_BT_RX_FIFOADDR;
+ reg_fifo_size = mmACP_BT_RX_FIFOSIZE;
+ rv_writel(I2S_BT_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_RX_RINGBUFADDR);
+ break;
- /* Enable watermark/period interrupt to host */
- rv_writel(BIT(BT_TX_THRESHOLD) | BIT(BT_RX_THRESHOLD),
- rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
+ case I2S_SP_INSTANCE:
+ default:
+ reg_ringbuf_size = mmACP_I2S_RX_RINGBUFSIZE;
+ reg_dma_size = mmACP_I2S_RX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_CAPT_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_I2S_RX_FIFOADDR;
+ reg_fifo_size = mmACP_I2S_RX_FIFOSIZE;
+ rv_writel(I2S_SP_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_RX_RINGBUFADDR);
+ }
+ }
+ rv_writel(MAX_BUFFER, rtd->acp3x_base + reg_ringbuf_size);
+ rv_writel(DMA_SIZE, rtd->acp3x_base + reg_dma_size);
+ rv_writel(acp_fifo_addr, rtd->acp3x_base + reg_fifo_addr);
+ rv_writel(FIFO_SIZE, rtd->acp3x_base + reg_fifo_size);
+ rv_writel(BIT(I2S_RX_THRESHOLD) | BIT(BT_RX_THRESHOLD)
+ | BIT(I2S_TX_THRESHOLD) | BIT(BT_TX_THRESHOLD),
+ rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
}
static int acp3x_dma_open(struct snd_soc_component *component,
@@ -289,17 +328,21 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return ret;
}
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = substream;
- else
+ adata->i2ssp_play_stream = substream;
+ } else {
adata->capture_stream = substream;
+ adata->i2ssp_capture_stream = substream;
+ }
i2s_data->acp3x_base = adata->acp3x_base;
runtime->private_data = i2s_data;
- return 0;
+ return ret;
}
@@ -307,16 +350,28 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
- struct snd_pcm_runtime *runtime;
struct i2s_stream_instance *rtd;
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
int status;
u64 size;
- runtime = substream->runtime;
- rtd = substream->private_data;
+ prtd = substream->private_data;
+ card = prtd->card;
+ pinfo = snd_soc_card_get_drvdata(card);
+ rtd = substream->runtime->private_data;
if (!rtd)
return -EINVAL;
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ } else
+ pr_err("pinfo failed\n");
+
size = params_buffer_bytes(params);
status = snd_pcm_lib_malloc_pages(substream, size);
if (status < 0)
@@ -337,12 +392,25 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
+ struct snd_soc_pcm_runtime *prtd;
+ struct snd_soc_card *card;
+ struct acp3x_platform_info *pinfo;
struct i2s_stream_instance *rtd;
u32 pos;
u32 buffersize;
u64 bytescount;
+ prtd = substream->private_data;
+ card = prtd->card;
rtd = substream->runtime->private_data;
+ pinfo = snd_soc_card_get_drvdata(card);
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
+
buffersize = frames_to_bytes(substream->runtime,
substream->runtime->buffer_size);
bytescount = acp_get_byte_count(rtd, substream->stream);
@@ -387,15 +455,19 @@ static int acp3x_dma_close(struct snd_soc_component *component,
component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
adata = dev_get_drvdata(component->dev);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = NULL;
- else
+ adata->i2ssp_play_stream = NULL;
+ } else {
adata->capture_stream = NULL;
+ adata->i2ssp_capture_stream = NULL;
+ }
/* Disable ACP irq, when the current stream is being closed and
* another stream is also not active.
*/
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ !adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
}
@@ -527,13 +599,16 @@ static int acp3x_resume(struct device *dev)
adata->play_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_PLAYBACK);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_ITER);
+ rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_TXFRMT);
+ mmACP_BTTDM_TXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_ITER);
+ mmACP_BTTDM_ITER);
}
}
@@ -542,13 +617,17 @@ static int acp3x_resume(struct device *dev)
adata->capture_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_CAPTURE);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_IRER);
+ rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
+
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_RXFRMT);
+ mmACP_BTTDM_RXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_IRER);
+ mmACP_BTTDM_IRER);
}
}
@@ -561,8 +640,8 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
{
struct i2s_dev_data *adata;
int status;
- adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_deinit(adata->acp3x_base);
if (status)
dev_err(dev, "ACP de-init failed\n");
@@ -578,8 +657,8 @@ static int acp3x_pcm_runtime_resume(struct device *dev)
{
struct i2s_dev_data *adata;
int status;
- adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_init(adata->acp3x_base);
if (status)
return -ENODEV;
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 72c1a23..c071477 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,6 +7,9 @@
#include "chip_offset_byte.h"
+#define I2S_SP_INSTANCE 0x01
+#define I2S_BT_INSTANCE 0x02
+
#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
@@ -17,8 +20,11 @@
#define ACP3x_BT_TDM_REG_START 0x1242800
#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
+#define I2S_RX_THRESHOLD 27
+#define I2S_TX_THRESHOLD 28
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
+#define ACP_ERR_INTR_MASK 29
#define ACP3x_POWER_ON 0x00
#define ACP3x_POWER_ON_IN_PROGRESS 0x01
#define ACP3x_POWER_OFF 0x02
@@ -26,19 +32,28 @@
#define ACP3x_SOFT_RESET__SoftResetAudDone_MASK 0x00010001
#define ACP_SRAM_PTE_OFFSET 0x02050000
+#define ACP_SRAM_SP_PB_PTE_OFFSET 0x0
+#define ACP_SRAM_SP_CP_PTE_OFFSET 0x100
+#define ACP_SRAM_BT_PB_PTE_OFFSET 0x200
+#define ACP_SRAM_BT_CP_PTE_OFFSET 0x300
#define PAGE_SIZE_4K_ENABLE 0x2
-#define MEM_WINDOW_START 0x4000000
-#define PLAYBACK_FIFO_ADDR_OFFSET 0x400
-#define CAPTURE_FIFO_ADDR_OFFSET 0x500
+#define I2S_SP_TX_MEM_WINDOW_START 0x4000000
+#define I2S_SP_RX_MEM_WINDOW_START 0x4020000
+#define I2S_BT_TX_MEM_WINDOW_START 0x4040000
+#define I2S_BT_RX_MEM_WINDOW_START 0x4060000
+#define SP_PB_FIFO_ADDR_OFFSET 0x500
+#define SP_CAPT_FIFO_ADDR_OFFSET 0x700
+#define BT_PB_FIFO_ADDR_OFFSET 0x900
+#define BT_CAPT_FIFO_ADDR_OFFSET 0xB00
#define PLAYBACK_MIN_NUM_PERIODS 2
#define PLAYBACK_MAX_NUM_PERIODS 8
-#define PLAYBACK_MAX_PERIOD_SIZE 16384
-#define PLAYBACK_MIN_PERIOD_SIZE 4096
+#define PLAYBACK_MAX_PERIOD_SIZE 8192
+#define PLAYBACK_MIN_PERIOD_SIZE 1024
#define CAPTURE_MIN_NUM_PERIODS 2
#define CAPTURE_MAX_NUM_PERIODS 8
-#define CAPTURE_MAX_PERIOD_SIZE 16384
-#define CAPTURE_MIN_PERIOD_SIZE 4096
+#define CAPTURE_MAX_PERIOD_SIZE 8192
+#define CAPTURE_MIN_PERIOD_SIZE 1024
#define MAX_BUFFER (PLAYBACK_MAX_PERIOD_SIZE * PLAYBACK_MAX_NUM_PERIODS)
#define MIN_BUFFER MAX_BUFFER
@@ -64,14 +79,20 @@ struct i2s_dev_data {
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
+ struct snd_pcm_substream *i2ssp_play_stream;
+ struct snd_pcm_substream *i2ssp_capture_stream;
};
struct i2s_stream_instance {
u16 num_pages;
+ u16 i2s_instance;
+ u16 capture_channel;
+ u16 direction;
u16 channels;
u32 xfer_resolution;
- u64 bytescount;
+ u32 val;
dma_addr_t dma_addr;
+ u64 bytescount;
void __iomem *acp3x_base;
};
@@ -91,15 +112,36 @@ static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
u64 byte_count;
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_LOW);
+ }
+
} else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_LOW);
+ }
}
return byte_count;
}
--
2.7.4
1
0

[alsa-devel] [PATCH v6 2/6] ASoC: amd: Refactoring of DAI from DMA driver
by Ravulapati Vishnu vardhan rao 15 Nov '19
by Ravulapati Vishnu vardhan rao 15 Nov '19
15 Nov '19
Asoc: PCM DMA driver should only have dma ops.
So Removed all DAI related functionality.Refactoring
the PCM DMA driver code.Added new file containing only DAI ops.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/Makefile | 2 +
sound/soc/amd/raven/acp3x-i2s.c | 275 +++++++++++++++++++++++++++++++
sound/soc/amd/raven/acp3x-pcm-dma.c | 318 ++++++++----------------------------
sound/soc/amd/raven/acp3x.h | 42 +++++
4 files changed, 390 insertions(+), 247 deletions(-)
create mode 100644 sound/soc/amd/raven/acp3x-i2s.c
diff --git a/sound/soc/amd/raven/Makefile b/sound/soc/amd/raven/Makefile
index 108d1ac..62c22b6 100644
--- a/sound/soc/amd/raven/Makefile
+++ b/sound/soc/amd/raven/Makefile
@@ -2,5 +2,7 @@
# Raven Ridge platform Support
snd-pci-acp3x-objs := pci-acp3x.o
snd-acp3x-pcm-dma-objs := acp3x-pcm-dma.o
+snd-acp3x-i2s-objs := acp3x-i2s.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-pci-acp3x.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-pcm-dma.o
+obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-i2s.o
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
new file mode 100644
index 0000000..df62c17
--- /dev/null
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -0,0 +1,275 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// AMD ALSA SoC PCM Driver
+//
+//Copyright 2016 Advanced Micro Devices, Inc.
+
+#include <linux/platform_device.h>
+#include <linux/module.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/pm_runtime.h>
+#include <sound/pcm.h>
+#include <sound/pcm_params.h>
+#include <sound/soc.h>
+#include <sound/soc-dai.h>
+#include <linux/dma-mapping.h>
+
+#include "acp3x.h"
+
+#define DRV_NAME "acp3x-i2s"
+
+static int acp3x_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
+{
+ struct i2s_dev_data *adata;
+
+ adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
+ case SND_SOC_DAIFMT_I2S:
+ adata->tdm_mode = false;
+ break;
+ case SND_SOC_DAIFMT_DSP_A:
+ adata->tdm_mode = true;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
+ u32 rx_mask, int slots, int slot_width)
+{
+ struct i2s_dev_data *adata;
+ u32 val;
+ u16 slot_len;
+
+ adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ /* These values are as per Hardware Spec */
+
+ switch (slot_width) {
+ case SLOT_WIDTH_8:
+ slot_len = 8;
+ break;
+ case SLOT_WIDTH_16:
+ slot_len = 16;
+ break;
+ case SLOT_WIDTH_24:
+ slot_len = 24;
+ break;
+ case SLOT_WIDTH_32:
+ slot_len = 0;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel(val | 0x2, adata->acp3x_base + mmACP_BTTDM_IRER);
+
+ val = FRM_LEN | (slots << 15) | (slot_len << 18);
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+
+ adata->tdm_fmt = val;
+ return 0;
+}
+
+static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ struct snd_soc_dai *dai)
+{
+ struct i2s_stream_instance *rtd;
+ u32 val;
+ u32 reg_val;
+
+ rtd = substream->runtime->private_data;
+
+ switch (params_format(params)) {
+ case SNDRV_PCM_FORMAT_U8:
+ case SNDRV_PCM_FORMAT_S8:
+ rtd->xfer_resolution = 0x0;
+ break;
+ case SNDRV_PCM_FORMAT_S16_LE:
+ rtd->xfer_resolution = 0x02;
+ break;
+ case SNDRV_PCM_FORMAT_S24_LE:
+ rtd->xfer_resolution = 0x04;
+ break;
+ case SNDRV_PCM_FORMAT_S32_LE:
+ rtd->xfer_resolution = 0x05;
+ break;
+ default:
+ return -EINVAL;
+ }
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ reg_val = mmACP_BTTDM_ITER;
+ else
+ reg_val = mmACP_BTTDM_IRER;
+
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ return 0;
+}
+
+static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
+ int cmd, struct snd_soc_dai *dai)
+{
+ struct i2s_stream_instance *rtd;
+ u32 val, period_bytes;
+ int ret, reg_val;
+
+ rtd = substream->runtime->private_data;
+ period_bytes = frames_to_bytes(substream->runtime,
+ substream->runtime->period_size);
+ switch (cmd) {
+ case SNDRV_PCM_TRIGGER_START:
+ case SNDRV_PCM_TRIGGER_RESUME:
+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+ rtd->bytescount = acp_get_byte_count(rtd,
+ substream->stream);
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ reg_val = mmACP_BTTDM_ITER;
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_TX_INTR_WATERMARK_SIZE);
+ } else {
+ reg_val = mmACP_BTTDM_IRER;
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_RX_INTR_WATERMARK_SIZE);
+ }
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ case SNDRV_PCM_TRIGGER_STOP:
+ case SNDRV_PCM_TRIGGER_SUSPEND:
+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ reg_val = mmACP_BTTDM_ITER;
+ else
+ reg_val = mmACP_BTTDM_IRER;
+
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ default:
+ ret = -EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
+static struct snd_soc_dai_ops acp3x_i2s_dai_ops = {
+ .hw_params = acp3x_i2s_hwparams,
+ .trigger = acp3x_i2s_trigger,
+ .set_fmt = acp3x_i2s_set_fmt,
+ .set_tdm_slot = acp3x_i2s_set_tdm_slot,
+};
+
+static const struct snd_soc_component_driver acp3x_dai_component = {
+ .name = "acp3x-i2s",
+};
+
+static struct snd_soc_dai_driver acp3x_i2s_dai = {
+ .playback = {
+ .rates = SNDRV_PCM_RATE_8000_96000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 8,
+
+ .rate_min = 8000,
+ .rate_max = 96000,
+ },
+ .capture = {
+ .rates = SNDRV_PCM_RATE_8000_48000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 2,
+ .rate_min = 8000,
+ .rate_max = 48000,
+ },
+ .ops = &acp3x_i2s_dai_ops,
+};
+
+
+static int acp3x_dai_probe(struct platform_device *pdev)
+{
+ struct resource *res;
+ struct i2s_dev_data *adata;
+ int status, ret;
+
+ adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data),
+ GFP_KERNEL);
+ if (!adata)
+ return -ENOMEM;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
+ ret = -ENOMEM;
+ goto err;
+ }
+
+ adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
+ resource_size(res));
+ if (IS_ERR(adata->acp3x_base))
+ return PTR_ERR(adata->acp3x_base);
+
+ adata->i2s_irq = res->start;
+ dev_set_drvdata(&pdev->dev, adata);
+ status = devm_snd_soc_register_component(&pdev->dev,
+ &acp3x_dai_component,
+ &acp3x_i2s_dai, 1);
+ if (status) {
+ dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ ret = -ENODEV;
+ goto dev_err;
+ }
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 5000);
+ pm_runtime_use_autosuspend(&pdev->dev);
+ pm_runtime_enable(&pdev->dev);
+ return 0;
+dev_err:
+ iounmap(adata->acp3x_base);
+ kfree(adata);
+ return ret;
+err:
+ kfree(adata);
+ return ret;
+}
+
+static int acp3x_dai_remove(struct platform_device *pdev)
+{
+ pm_runtime_disable(&pdev->dev);
+ return 0;
+}
+static struct platform_driver acp3x_dai_driver = {
+ .probe = acp3x_dai_probe,
+ .remove = acp3x_dai_remove,
+ .driver = {
+ .name = "acp3x_i2s_playcap",
+ },
+};
+
+module_platform_driver(acp3x_dai_driver);
+
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
+MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:" DRV_NAME);
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 60709e3..ffd7cd1 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -18,24 +18,6 @@
#define DRV_NAME "acp3x-i2s-audio"
-struct i2s_dev_data {
- bool tdm_mode;
- unsigned int i2s_irq;
- u32 tdm_fmt;
- void __iomem *acp3x_base;
- struct snd_pcm_substream *play_stream;
- struct snd_pcm_substream *capture_stream;
-};
-
-struct i2s_stream_instance {
- u16 num_pages;
- u16 channels;
- u32 xfer_resolution;
- u64 bytescount;
- dma_addr_t dma_addr;
- void __iomem *acp3x_base;
-};
-
static const struct snd_pcm_hardware acp3x_pcm_hardware_playback = {
.info = SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -178,10 +160,11 @@ static int acp3x_deinit(void __iomem *acp3x_base)
static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
{
+ struct i2s_dev_data *rv_i2s_data;
u16 play_flag, cap_flag;
u32 val;
- struct i2s_dev_data *rv_i2s_data = dev_id;
+ rv_i2s_data = dev_id;
if (!rv_i2s_data)
return IRQ_NONE;
@@ -278,11 +261,18 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
static int acp3x_dma_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- int ret = 0;
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
- struct i2s_stream_instance *i2s_data = kzalloc(sizeof(struct i2s_stream_instance),
- GFP_KERNEL);
+ struct snd_pcm_runtime *runtime;
+ struct snd_soc_pcm_runtime *prtd;
+ struct i2s_dev_data *adata;
+ struct i2s_stream_instance *i2s_data;
+ int ret;
+
+ runtime = substream->runtime;
+ prtd = substream->private_data;
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
+ adata = dev_get_drvdata(component->dev);
+ i2s_data = kzalloc(sizeof(struct i2s_stream_instance),
+ GFP_KERNEL);
if (!i2s_data)
return -EINVAL;
@@ -312,33 +302,18 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return 0;
}
-static u64 acp_get_byte_count(struct i2s_stream_instance *rtd, int direction)
-{
- u64 byte_count;
-
- if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
- } else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
- }
- return byte_count;
-}
static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
+ struct snd_pcm_runtime *runtime;
+ struct i2s_stream_instance *rtd;
int status;
u64 size;
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct i2s_stream_instance *rtd = runtime->private_data;
+ runtime = substream->runtime;
+ rtd = substream->private_data;
if (!rtd)
return -EINVAL;
@@ -362,12 +337,12 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- u32 pos = 0;
- u32 buffersize = 0;
- u64 bytescount = 0;
- struct i2s_stream_instance *rtd =
- substream->runtime->private_data;
+ struct i2s_stream_instance *rtd;
+ u32 pos;
+ u32 buffersize;
+ u64 bytescount;
+ rtd = substream->runtime->private_data;
buffersize = frames_to_bytes(substream->runtime,
substream->runtime->buffer_size);
bytescount = acp_get_byte_count(rtd, substream->stream);
@@ -380,7 +355,10 @@ static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
static int acp3x_dma_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd)
{
- struct device *parent = component->dev->parent;
+ struct device *parent;
+
+ component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+ parent = component->dev->parent;
snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_DEV,
parent, MIN_BUFFER, MAX_BUFFER);
return 0;
@@ -402,8 +380,12 @@ static int acp3x_dma_mmap(struct snd_soc_component *component,
static int acp3x_dma_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
- struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
+ struct snd_soc_pcm_runtime *prtd;
+ struct i2s_dev_data *adata;
+
+ prtd = substream->private_data;
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
+ adata = dev_get_drvdata(component->dev);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
adata->play_stream = NULL;
@@ -415,186 +397,9 @@ static int acp3x_dma_close(struct snd_soc_component *component,
*/
if (!adata->play_stream && !adata->capture_stream)
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
- kfree(rtd);
return 0;
}
-static int acp3x_dai_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
-{
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
- case SND_SOC_DAIFMT_I2S:
- adata->tdm_mode = false;
- break;
- case SND_SOC_DAIFMT_DSP_A:
- adata->tdm_mode = true;
- break;
- default:
- return -EINVAL;
- }
-
- return 0;
-}
-
-static int acp3x_dai_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
- u32 rx_mask, int slots, int slot_width)
-{
- u32 val = 0;
- u16 slot_len;
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (slot_width) {
- case SLOT_WIDTH_8:
- slot_len = 8;
- break;
- case SLOT_WIDTH_16:
- slot_len = 16;
- break;
- case SLOT_WIDTH_24:
- slot_len = 24;
- break;
- case SLOT_WIDTH_32:
- slot_len = 0;
- break;
- default:
- return -EINVAL;
- }
-
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
-
- val = (FRM_LEN | (slots << 15) | (slot_len << 18));
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
-
- adata->tdm_fmt = val;
- return 0;
-}
-
-static int acp3x_dai_i2s_hwparams(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *params,
- struct snd_soc_dai *dai)
-{
- u32 val = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
-
- switch (params_format(params)) {
- case SNDRV_PCM_FORMAT_U8:
- case SNDRV_PCM_FORMAT_S8:
- rtd->xfer_resolution = 0x0;
- break;
- case SNDRV_PCM_FORMAT_S16_LE:
- rtd->xfer_resolution = 0x02;
- break;
- case SNDRV_PCM_FORMAT_S24_LE:
- rtd->xfer_resolution = 0x04;
- break;
- case SNDRV_PCM_FORMAT_S32_LE:
- rtd->xfer_resolution = 0x05;
- break;
- default:
- return -EINVAL;
- }
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | (rtd->xfer_resolution << 3);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- else
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
-
- return 0;
-}
-
-static int acp3x_dai_i2s_trigger(struct snd_pcm_substream *substream,
- int cmd, struct snd_soc_dai *dai)
-{
- int ret = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
- u32 val, period_bytes;
-
- period_bytes = frames_to_bytes(substream->runtime,
- substream->runtime->period_size);
- switch (cmd) {
- case SNDRV_PCM_TRIGGER_START:
- case SNDRV_PCM_TRIGGER_RESUME:
- case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
- rtd->bytescount = acp_get_byte_count(rtd, substream->stream);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_TX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_RX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- case SNDRV_PCM_TRIGGER_STOP:
- case SNDRV_PCM_TRIGGER_SUSPEND:
- case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- default:
- ret = -EINVAL;
- break;
- }
-
- return ret;
-}
-
-static struct snd_soc_dai_ops acp3x_dai_i2s_ops = {
- .hw_params = acp3x_dai_i2s_hwparams,
- .trigger = acp3x_dai_i2s_trigger,
- .set_fmt = acp3x_dai_i2s_set_fmt,
- .set_tdm_slot = acp3x_dai_set_tdm_slot,
-};
-
-static struct snd_soc_dai_driver acp3x_i2s_dai_driver = {
- .playback = {
- .rates = SNDRV_PCM_RATE_8000_96000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 8,
-
- .rate_min = 8000,
- .rate_max = 96000,
- },
- .capture = {
- .rates = SNDRV_PCM_RATE_8000_48000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 2,
- .rate_min = 8000,
- .rate_max = 48000,
- },
- .ops = &acp3x_dai_i2s_ops,
-};
-
static const struct snd_soc_component_driver acp3x_i2s_component = {
.name = DRV_NAME,
.open = acp3x_dma_open,
@@ -609,10 +414,10 @@ static const struct snd_soc_component_driver acp3x_i2s_component = {
static int acp3x_audio_probe(struct platform_device *pdev)
{
- int status;
struct resource *res;
struct i2s_dev_data *adata;
unsigned int irqflags;
+ int status, ret;
if (!pdev->dev.platform_data) {
dev_err(&pdev->dev, "platform_data not retrieved\n");
@@ -622,65 +427,80 @@ static int acp3x_audio_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
- dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
+ dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
return -ENODEV;
}
adata = devm_kzalloc(&pdev->dev, sizeof(*adata), GFP_KERNEL);
if (!adata)
return -ENOMEM;
-
adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
-
+ if (!adata->acp3x_base) {
+ ret = -ENOMEM;
+ goto base_err;
+ }
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res) {
dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
- return -ENODEV;
+ ret = -ENOMEM;
+ goto io_irq;
}
adata->i2s_irq = res->start;
- adata->play_stream = NULL;
- adata->capture_stream = NULL;
dev_set_drvdata(&pdev->dev, adata);
/* Initialize ACP */
status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
+ if (status) {
+ ret = -ENODEV;
+ goto io_irq;
+ }
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
- &acp3x_i2s_dai_driver, 1);
+ NULL, 0);
if (status) {
- dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ dev_err(&pdev->dev, "Fail to register acp i2s component\n");
+ ret = -ENODEV;
goto dev_err;
}
status = devm_request_irq(&pdev->dev, adata->i2s_irq, i2s_irq_handler,
irqflags, "ACP3x_I2S_IRQ", adata);
if (status) {
dev_err(&pdev->dev, "ACP3x I2S IRQ request failed\n");
+ ret = -ENODEV;
goto dev_err;
}
- pm_runtime_set_autosuspend_delay(&pdev->dev, 10000);
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 5000);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_enable(&pdev->dev);
return 0;
+
dev_err:
+ iounmap(adata->acp3x_base);
+ kfree(adata);
status = acp3x_deinit(adata->acp3x_base);
if (status)
dev_err(&pdev->dev, "ACP de-init failed\n");
else
dev_info(&pdev->dev, "ACP de-initialized\n");
- /*ignore device status and return driver probe error*/
- return -ENODEV;
+ return ret;
+io_irq:
+ iounmap(adata->acp3x_base);
+ kfree(adata);
+ return ret;
+base_err:
+ kfree(adata);
+ return ret;
}
static int acp3x_audio_remove(struct platform_device *pdev)
{
+ struct i2s_dev_data *adata;
int ret;
- struct i2s_dev_data *adata = dev_get_drvdata(&pdev->dev);
+ adata = dev_get_drvdata(&pdev->dev);
ret = acp3x_deinit(adata->acp3x_base);
if (ret)
dev_err(&pdev->dev, "ACP de-init failed\n");
@@ -693,10 +513,11 @@ static int acp3x_audio_remove(struct platform_device *pdev)
static int acp3x_resume(struct device *dev)
{
+ struct i2s_dev_data *adata;
int status;
u32 val;
- struct i2s_dev_data *adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_init(adata->acp3x_base);
if (status)
return -ENODEV;
@@ -738,8 +559,9 @@ static int acp3x_resume(struct device *dev)
static int acp3x_pcm_runtime_suspend(struct device *dev)
{
+ struct i2s_dev_data *adata;
int status;
- struct i2s_dev_data *adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_deinit(adata->acp3x_base);
if (status)
@@ -754,8 +576,9 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
static int acp3x_pcm_runtime_resume(struct device *dev)
{
+ struct i2s_dev_data *adata;
int status;
- struct i2s_dev_data *adata = dev_get_drvdata(dev);
+ adata = dev_get_drvdata(dev);
status = acp3x_init(adata->acp3x_base);
if (status)
@@ -774,13 +597,14 @@ static struct platform_driver acp3x_dma_driver = {
.probe = acp3x_audio_probe,
.remove = acp3x_audio_remove,
.driver = {
- .name = "acp3x_rv_i2s",
+ .name = "acp3x_rv_i2s_dma",
.pm = &acp3x_pm_ops,
},
};
module_platform_driver(acp3x_dma_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_AUTHOR("Vijendar.Mukunda(a)amd.com");
MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 2f15fe1..72c1a23 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -51,6 +51,29 @@
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+struct acp3x_platform_info {
+ u16 play_i2s_instance;
+ u16 cap_i2s_instance;
+ u16 capture_channel;
+};
+
+struct i2s_dev_data {
+ bool tdm_mode;
+ unsigned int i2s_irq;
+ u32 tdm_fmt;
+ void __iomem *acp3x_base;
+ struct snd_pcm_substream *play_stream;
+ struct snd_pcm_substream *capture_stream;
+};
+
+struct i2s_stream_instance {
+ u16 num_pages;
+ u16 channels;
+ u32 xfer_resolution;
+ u64 bytescount;
+ dma_addr_t dma_addr;
+ void __iomem *acp3x_base;
+};
static inline u32 rv_readl(void __iomem *base_addr)
{
@@ -61,3 +84,22 @@ static inline void rv_writel(u32 val, void __iomem *base_addr)
{
writel(val, base_addr - ACP3x_PHY_BASE_ADDRESS);
}
+
+static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
+ int direction)
+{
+ u64 byte_count;
+
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ } else {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ }
+ return byte_count;
+}
--
2.7.4
1
0

[alsa-devel] [PATCH v2 0/2] ASoC: mediatek: common: refine mtk_afe_fe_hw_params
by Eason Yen 15 Nov '19
by Eason Yen 15 Nov '19
15 Nov '19
This patch is to add more helpers to control mtk_memif dma_address/format/pbuf_size
And refine hw_params and hw_prepare by these helpers.
*** BLURB HERE ***
v2 changes:
split patch v1 to two seprated patches for different purpose.
v1 changes:
1. patchwork list:
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-November/158394.…
Eason Yen (2):
ASoC: mediatek: common: add some helpers to control mtk_memif
ASoC: mediatek: common: refine hw_params and hw_prepare
sound/soc/mediatek/common/mtk-afe-fe-dai.c | 359 +++++++++++++++++++++++------
sound/soc/mediatek/common/mtk-afe-fe-dai.h | 16 ++
sound/soc/mediatek/common/mtk-base-afe.h | 28 ++-
3 files changed, 336 insertions(+), 67 deletions(-)
--
1.9.1
1
0

15 Nov '19
This patch is to refine mtk_afe_fe_hw_params by the following
export functions:
- mtk_memif_set_enable
- mtk_memif_set_disable
- mtk_memif_set_addr
- mtk_memif_set_channel
- mtk_memif_set_rate
- mtk_memif_set_rate_substream
- mtk_memif_set_format
- mtk_memif_set_pbuf_size
By the way, extend mtk_base_memif_data and mtk_base_afe_memif struct
to support mtk new platform(mt6779)
2
4

[alsa-devel] [PATCH V3 1/2] ASoC: dt-bindings: fsl_asrc: add compatible string for imx8qm
by Shengjiu Wang 15 Nov '19
by Shengjiu Wang 15 Nov '19
15 Nov '19
Add compatible string "fsl,imx8qm-asrc" for imx8qm platform.
There are two asrc modules in imx8qm, the clock mapping is
different for each other, so add new property "fsl,asrc-clk-map"
to distinguish them.
Signed-off-by: Shengjiu Wang <shengjiu.wang(a)nxp.com>
---
changes in v2
-none
changes in v3
-use only one compatible string "fsl,imx8qm-asrc",
-add new property "fsl,asrc-clk-map".
Documentation/devicetree/bindings/sound/fsl,asrc.txt | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/sound/fsl,asrc.txt b/Documentation/devicetree/bindings/sound/fsl,asrc.txt
index 1d4d9f938689..02edab7cf3e0 100644
--- a/Documentation/devicetree/bindings/sound/fsl,asrc.txt
+++ b/Documentation/devicetree/bindings/sound/fsl,asrc.txt
@@ -8,7 +8,8 @@ three substreams within totally 10 channels.
Required properties:
- - compatible : Contains "fsl,imx35-asrc" or "fsl,imx53-asrc".
+ - compatible : Contains "fsl,imx35-asrc", "fsl,imx53-asrc",
+ "fsl,imx8qm-asrc".
- reg : Offset and length of the register set for the device.
@@ -35,6 +36,13 @@ Required properties:
- fsl,asrc-width : Defines a mutual sample width used by DPCM Back Ends.
+ - fsl,asrc-clk-map : Defines clock map used in driver. which is required
+ by imx8qm/imx8qxp platform
+ <0> - select the map for asrc0 in imx8qm
+ <1> - select the map for asrc1 in imx8qm
+ <2> - select the map for asrc0 in imx8qxp
+ <3> - select the map for asrc1 in imx8qxp
+
Optional properties:
- big-endian : If this property is absent, the little endian mode
--
2.21.0
4
4

14 Nov '19
On Thu, Nov 14, 2019 at 03:43:32PM -0700, Jacob Rasmussen wrote:
> On Thu, Nov 14, 2019 at 2:43 PM Ross Zwisler <zwisler(a)google.com> wrote:
> > On Thu, Nov 14, 2019 at 12:08:44PM -0700, Jacob Rasmussen wrote:
> > > Had a typo in e7cfd867fd98 that resulted in buddy jack support not being
> > > fixed.
> > > Fixes: e7cfd867fd98 ("ASoC: rt5645: Fixed buddy jack support.")
> > > Cc: <zwisler(a)google.com>
> > > Cc: <jacobraz(a)google.com>
> > > CC: stable(a)vger.kernel.org
> > Need to add your signed-off-by. With that added you can add:
> > Reviewed-by: Ross Zwisler <zwisler(a)google.com>
> Signed-off-by: Jacob Rasmussen <jacobraz(a)google.com>
I'd be more comfortable with this if you could repost with the signoff
and the patch in one mail.
1
0

14 Nov '19
Had a typo in e7cfd867fd98 that resulted in buddy jack support not being
fixed.
Fixes: e7cfd867fd98 ("ASoC: rt5645: Fixed buddy jack support.")
Cc: <zwisler(a)google.com>
Cc: <jacobraz(a)google.com>
CC: stable(a)vger.kernel.org
---
sound/soc/codecs/rt5645.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 902ac98a3fbe..19662ee330d6 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3271,7 +3271,7 @@ static void rt5645_jack_detect_work(struct work_struct *work)
report, SND_JACK_MICROPHONE);
return;
case 4:
- val = snd_soc_component_read32(rt5645->component, RT5645_A_JD_CTRL1) & 0x002;
+ val = snd_soc_component_read32(rt5645->component, RT5645_A_JD_CTRL1) & 0x0020;
break;
default: /* read rt5645 jd1_1 status */
val = snd_soc_component_read32(rt5645->component, RT5645_INT_IRQ_ST) & 0x1000;
--
2.24.0.432.g9d3f5f5b63-goog
2
1

[alsa-devel] [PATCH v3 00/22] soundwire: code hardening and suspend-resume support
by Pierre-Louis Bossart 14 Nov '19
by Pierre-Louis Bossart 14 Nov '19
14 Nov '19
this patchset applies on top of "[PATCH v3 00/15] soundwire: intel:
implement new ASoC interfaces".
It implements a series of improvements for:
a) interrupt handling on Intel platforms in MSI mode
b) race conditions on codec probe and enumeration
c) suspend-resume issues (clock-stop mode not supported for now)
d) underflow handling
e) updates to the stream state machine which did not support valid
ALSA transitions.
These patches were tested extensively on 4 different platforms and are
viewed as required for any sort of SoundWire-based product. While
tested extensively on Intel platforms only, they should also benefit
Qualcomm platforms who haven't yet enabled power management.
Changes since v2: (no feedback received since November 6)
Added idle scheduling to deal with pm_runtime issues when devices are
exposed in the DSDT, but are not populated on the board. A quirk is
introduced to deal with potential cases where the devices might be
powered at a later time, in which case it's legit to leave the bus
active.
Fixed .prepare callback to handle both underflow and resume cases. The
previous version was incorrect in the first case and did not follow
recommended programming sequence
Fixed an additional race condition leading to a timeout when the codec
device was suspended while the master remained active.
Fixed a couple of warnings reported by static analysis
Removed non-essential pr_err() traces in stream.c, left others when
useful
Changed subject of patches dealing with race conditions to make sure
reviewers can link with the interface changes.
Changes since v1: (no feedback received since October 23)
added support for initialization_complete, integration with Realtek
codecs exposed an additional race condition between the resume
operation and restoration of settings in separate thread triggered by
Slave status change.
No other functional change
Bard Liao (3):
soundwire: intel/cadence: fix timeouts in MSI mode
soundwire: stream: only prepare stream when it is configured.
soundwire: intel: reinitialize IP+DSP in .prepare(), but only when
resuming
Pierre-Louis Bossart (19):
soundwire: bus: fix race condition with probe_complete signaling
soundwire: bus: add PM/no-PM versions of read/write functions
soundwire: bus: write Slave Device Number without runtime_pm
soundwire: intel: add helpers for link power down and shim wake
soundwire: intel: Add basic power management support
soundwire: intel: add pm_runtime support
soundwire: intel: reset pm_runtime status during system resume
soundwire: bus: add helper to reset Slave status to UNATTACHED
soundwire: intel: call helper to reset Slave states on resume
soundwire: bus: check first if Slaves become UNATTACHED
soundwire: bus: fix race condition with enumeration_complete signaling
soundwire: bus: fix race condition with initialization_complete
signaling
soundwire: bus: fix race condition by tracking UNATTACHED transition
soundwire: intel: disable pm_runtime when removing a master
soundwire: bus: disable pm_runtime in sdw_slave_delete
soundwire: stream: remove redundant pr_err traces
soundwire: stream: update state machine and add state checks
soundwire: stream: do not update parameters during DISABLED-PREPARED
transition
soundwire: intel: pm_runtime idle scheduling
Documentation/driver-api/soundwire/stream.rst | 63 ++-
drivers/soundwire/bus.c | 169 +++++++-
drivers/soundwire/bus.h | 9 +
drivers/soundwire/bus_type.c | 5 +
drivers/soundwire/cadence_master.c | 17 +-
drivers/soundwire/cadence_master.h | 8 +
drivers/soundwire/intel.c | 400 ++++++++++++++++--
drivers/soundwire/intel.h | 2 +
drivers/soundwire/intel_init.c | 45 +-
drivers/soundwire/slave.c | 4 +
drivers/soundwire/stream.c | 71 +++-
include/linux/soundwire/sdw.h | 1 +
include/linux/soundwire/sdw_intel.h | 4 +
13 files changed, 714 insertions(+), 84 deletions(-)
--
2.20.1
1
22

[alsa-devel] [PATCH v3 00/15] soundwire: intel: implement new ASoC interfaces
by Pierre-Louis Bossart 14 Nov '19
by Pierre-Louis Bossart 14 Nov '19
14 Nov '19
This patchset applies on top of the series "[PATCH v3 0/6] soundwire:
update ASoC interfaces"
The changes are essentially a removal of the platform devices and the
implementation of the new interfaces required to scan the ACPI tables,
probe the links and start them.
The missing prepare, trigger and setup ASoC callbacks are also
implemented. The hw_params and free callbacks use the new interfaces
as well.
While there are quite a few lines of code changed, this is mostly
about interface changes. The next series will contain more functional
changes and deal with race conditions on probe, enumeration and
suspend/resume issues.
Changes since v2:
moved uevent handling to slave_type (Vinod)
Changes since v1:
fix typo (Vinod)
removed uevent open for Master (Vinod)
clarified commit messages (Cezary)
no functionality change
Bard Liao (1):
soundwire: add device driver to sdw_md_driver
Pierre-Louis Bossart (11):
soundwire: renames to prepare support for master drivers/devices
soundwire: rename dev_to_sdw_dev macro
soundwire: rename drv_to_sdw_slave_driver macro
soundwire: bus_type: rename sdw_drv_ to sdw_slave_drv
soundwire: intel: rename res field as link_res
soundwire: add support for sdw_slave_type
soundwire: slave: move uevent handling to slave
soundwire: add initial definitions for sdw_master_device
soundwire: intel: remove platform devices and provide new interface
soundwire: intel: free all resources on hw_free()
soundwire: intel_init: add implementation of sdw_intel_enable_irq()
Rander Wang (3):
soundwire: intel: add prepare support in sdw dai driver
soundwire: intel: add trigger support in sdw dai driver
soundwire: intel: add sdw_stream_setup helper for .startup callback
drivers/base/regmap/regmap-sdw.c | 4 +-
drivers/soundwire/Makefile | 2 +-
drivers/soundwire/bus.c | 2 +-
drivers/soundwire/bus.h | 2 +
drivers/soundwire/bus_type.c | 63 +++---
drivers/soundwire/intel.c | 280 ++++++++++++++++++++++-----
drivers/soundwire/intel.h | 8 +-
drivers/soundwire/intel_init.c | 300 ++++++++++++++++++++++-------
drivers/soundwire/master.c | 64 ++++++
drivers/soundwire/slave.c | 10 +-
include/linux/soundwire/sdw.h | 39 +++-
include/linux/soundwire/sdw_type.h | 34 +++-
12 files changed, 646 insertions(+), 162 deletions(-)
create mode 100644 drivers/soundwire/master.c
--
2.20.1
1
15

14 Nov '19
We need new fields in existing structures to
a) deal with race conditions on codec probe/enumeration
b) allow for multi-step ACPI scan/probe/startup on Intel plaforms
These structures will be used by the SOF driver as well as codec
drivers.
To avoid conflicts between ASoC and Soundwire trees, these 6 patches
are provided out-of-order, before the functionality enabled in these
header files is added in follow-up patch series which can be applied
separately in the ASoC and Soundwire trees. As discussed earlier,
Vinod would need to provide an immutable tag for Mark Brown, and the
integration on the ASoC side of SOF changes and new codecs drivers can
proceed in parallel with SoundWire core changes.
Note that the SOF changes are not provided as a v3 today due to
conflicts with other in-flight SOF cleanups to facilitate support for
Device Tree devices. Those changes don't impact the interface
definition suggested here but the machine driver detection for
SoundWire. The changes should be ready in next week.
The mapping between the patches in this series and follow-up ones
shouldn't give anyone a migraine:
soundwire: sdw_slave: add probe_complete structure and new fields
soundwire: bus: fix race condition with probe_complete signaling
soundwire: sdw_slave: add enumeration_complete structure
soundwire: bus: fix race condition with enumeration_complete signaling
soundwire: sdw_slave: add initialization_complete definition
soundwire: bus: fix race condition with initialization_complete signaling
soundwire: sdw_slave: track unattach_request to handle all init sequences
soundwire: bus: fix race condition by tracking UNATTACHED transition
Changes since v2:
Added new field to deal with a race condition leading to a timeout
when the codec goes through a pm_runtime suspend/resume transition
while the Master remains active.
Clarified commit messages with detailed explanations what those race
conditions are and why the changes were introduced.
Reordered fields for Intel routines
Added kernel-doc definitions for structures
Modified the patch subjects to make the mapping between interface definition
and implementation straightforward.
Changes since v1 (no feedback received since October 23)
additional initialization_complete utility to help codec drivers with
their resume operation, waiting for the enumeration to complete is not
always enough.
Pierre-Louis Bossart (5):
soundwire: sdw_slave: add probe_complete structure and new fields
soundwire: sdw_slave: add enumeration_complete structure
soundwire: sdw_slave: add initialization_complete definition
soundwire: sdw_slave: track unattach_request to handle all init
sequences
soundwire: intel: update interfaces between ASoC and SoundWire
Rander Wang (1):
soundwire: intel: update stream callbacks for hwparams/free stream
operations
drivers/soundwire/intel.c | 20 +++--
drivers/soundwire/intel.h | 13 ++--
drivers/soundwire/intel_init.c | 31 ++------
include/linux/soundwire/sdw.h | 19 +++++
include/linux/soundwire/sdw_intel.h | 109 +++++++++++++++++++++++++---
5 files changed, 149 insertions(+), 43 deletions(-)
--
2.20.1
1
6

[alsa-devel] [PATCH 1/2] ALSA: usb-audio: Fix incorrect size check for processing/extension units
by Takashi Iwai 14 Nov '19
by Takashi Iwai 14 Nov '19
14 Nov '19
The recently introduced unit descriptor validation had some bug for
processing and extension units, it counts a bControlSize byte twice so
it expected a bigger size than it should have been. This seems
resulting in a probe error on a few devices.
Fix the calculation for proper checks of PU and EU.
Fixes: 57f8770620e9 ("ALSA: usb-audio: More validations of descriptor units")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
---
sound/usb/validate.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/usb/validate.c b/sound/usb/validate.c
index a5e584b60dcd..389e8657434a 100644
--- a/sound/usb/validate.c
+++ b/sound/usb/validate.c
@@ -81,9 +81,9 @@ static bool validate_processing_unit(const void *p,
switch (v->protocol) {
case UAC_VERSION_1:
default:
- /* bNrChannels, wChannelConfig, iChannelNames, bControlSize */
- len += 1 + 2 + 1 + 1;
- if (d->bLength < len) /* bControlSize */
+ /* bNrChannels, wChannelConfig, iChannelNames */
+ len += 1 + 2 + 1;
+ if (d->bLength < len + 1) /* bControlSize */
return false;
m = hdr[len];
len += 1 + m + 1; /* bControlSize, bmControls, iProcessing */
--
2.16.4
1
1

14 Nov '19
We need new fields in existing structures to
a) deal with race conditions on codec probe/enumeration
b) allow for multi-step ACPI scan/probe/startup on Intel plaforms
To avoid conflicts between ASoC and Soundwire trees, these 4 patches
are provided out-of-order, before the functionality enabled in these
header files is added in follow-up patch series which can be applied
separately in the ASoC and Soundwire trees (of course after Vinod and
Mark sync-up so that these patches are present in both trees).
Pierre-Louis Bossart (3):
soundwire: sdw_slave: add new fields to track probe status
soundwire: add enumeration_complete structure
soundwire: intel: update interfaces between ASoC and SoundWire
Rander Wang (1):
soundwire: intel: update stream callbacks for hwparams/free stream
operations
drivers/soundwire/intel.c | 20 ++++--
drivers/soundwire/intel.h | 13 ++--
drivers/soundwire/intel_init.c | 31 +++------
include/linux/soundwire/sdw.h | 7 ++
include/linux/soundwire/sdw_intel.h | 103 +++++++++++++++++++++++++---
5 files changed, 131 insertions(+), 43 deletions(-)
--
2.20.1
3
15

[alsa-devel] [PATCH] ALSA: hda/hdmi - Clean up Intel platform-specific fixup checks
by Takashi Iwai 14 Nov '19
by Takashi Iwai 14 Nov '19
14 Nov '19
Introduce a new flag in hdmi_spec to indicate the Intel platform-
specific fixups so that we can get rid of the lengthy codec ID
checks. The flag is set in intel_hsw_common_init() commonly.
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
---
sound/pci/hda/patch_hdmi.c | 27 +++++----------------------
1 file changed, 5 insertions(+), 22 deletions(-)
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 78bd2e3722c7..d05529a429a5 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -37,25 +37,6 @@ static bool static_hdmi_pcm;
module_param(static_hdmi_pcm, bool, 0644);
MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info");
-#define is_haswell(codec) ((codec)->core.vendor_id == 0x80862807)
-#define is_broadwell(codec) ((codec)->core.vendor_id == 0x80862808)
-#define is_skylake(codec) ((codec)->core.vendor_id == 0x80862809)
-#define is_broxton(codec) ((codec)->core.vendor_id == 0x8086280a)
-#define is_kabylake(codec) ((codec)->core.vendor_id == 0x8086280b)
-#define is_geminilake(codec) (((codec)->core.vendor_id == 0x8086280d) || \
- ((codec)->core.vendor_id == 0x80862800))
-#define is_cannonlake(codec) ((codec)->core.vendor_id == 0x8086280c)
-#define is_icelake(codec) ((codec)->core.vendor_id == 0x8086280f)
-#define is_tigerlake(codec) ((codec)->core.vendor_id == 0x80862812)
-#define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec) \
- || is_skylake(codec) || is_broxton(codec) \
- || is_kabylake(codec) || is_geminilake(codec) \
- || is_cannonlake(codec) || is_icelake(codec) \
- || is_tigerlake(codec))
-#define is_valleyview(codec) ((codec)->core.vendor_id == 0x80862882)
-#define is_cherryview(codec) ((codec)->core.vendor_id == 0x80862883)
-#define is_valleyview_plus(codec) (is_valleyview(codec) || is_cherryview(codec))
-
struct hdmi_spec_per_cvt {
hda_nid_t cvt_nid;
int assigned;
@@ -162,6 +143,7 @@ struct hdmi_spec {
bool dyn_pin_out;
bool dyn_pcm_assign;
+ bool intel_hsw_fixup; /* apply Intel platform-specific fixups */
/*
* Non-generic VIA/NVIDIA specific
*/
@@ -925,7 +907,7 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t cvt_nid,
return err;
}
- if (is_haswell_plus(codec)) {
+ if (spec->intel_hsw_fixup) {
/*
* on recent platforms IEC Coding Type is required for HBR
@@ -1709,7 +1691,7 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid)
* To simplify the implementation, malloc all
* the virtual pins in the initialization statically
*/
- if (is_haswell_plus(codec)) {
+ if (spec->intel_hsw_fixup) {
/*
* On Intel platforms, device entries number is
* changed dynamically. If there is a DP MST
@@ -1758,7 +1740,7 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid)
per_pin->dev_id = i;
per_pin->non_pcm = false;
snd_hda_set_dev_select(codec, pin_nid, i);
- if (is_haswell_plus(codec))
+ if (spec->intel_hsw_fixup)
intel_haswell_fixup_connect_list(codec, pin_nid);
err = hdmi_read_pin_conn(codec, pin_idx);
if (err < 0)
@@ -2816,6 +2798,7 @@ static int intel_hsw_common_init(struct hda_codec *codec, hda_nid_t vendor_nid,
spec->vendor_nid = vendor_nid;
spec->port_map = port_map;
spec->port_num = port_num;
+ spec->intel_hsw_fixup = true;
intel_haswell_enable_all_pins(codec, true);
intel_haswell_fixup_enable_dp12(codec);
--
2.16.4
2
2

[alsa-devel] [PATCH] ASoC: Jack: Fix NULL pointer dereference in snd_soc_jack_report
by Pawel Harlozinski 13 Nov '19
by Pawel Harlozinski 13 Nov '19
13 Nov '19
Check for existance of jack before tracing.
NULL pointer dereference has been reported by KASAN while unloading
machine driver (snd_soc_cnl_rt274).
Signed-off-by: Pawel Harlozinski <pawel.harlozinski(a)linux.intel.com>
---
sound/soc/soc-jack.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index a71d2340eb05..b5748dcd490f 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -82,10 +82,9 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
unsigned int sync = 0;
int enable;
- trace_snd_soc_jack_report(jack, mask, status);
-
if (!jack)
return;
+ trace_snd_soc_jack_report(jack, mask, status);
dapm = &jack->card->dapm;
--
2.17.1
3
5

[alsa-devel] [RESEND PATCH v5 6/6] ASoC: amd: Added ACP3x system resume and runtime pm
by Ravulapati Vishnu vardhan rao 13 Nov '19
by Ravulapati Vishnu vardhan rao 13 Nov '19
13 Nov '19
When system wide suspend happens, ACP will be powered off
and when system resumes,for audio usecase to continue,all
the runtime configuration data needs to be programmed again.
Added resume pm call back to ACP pm ops and also added runtime
PM operations for ACP3x PCM platform device.
Device will enter into D3 state when there is no activity
on audio I2S lines.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 135 -----------------------------
sound/soc/amd/raven/acp3x.h | 8 ++
sound/soc/amd/raven/pci-acp3x.c | 168 +++++++++++++++++++++++++++++++++++-
3 files changed, 173 insertions(+), 138 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 8a8b135..00713eb 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -58,106 +58,6 @@ static const struct snd_pcm_hardware acp3x_pcm_hardware_capture = {
.periods_max = CAPTURE_MAX_NUM_PERIODS,
};
-static int acp3x_power_on(void __iomem *acp3x_base, bool on)
-{
- u16 val, mask;
- u32 timeout;
-
- if (on == true) {
- val = 1;
- mask = ACP3x_POWER_ON;
- } else {
- val = 0;
- mask = ACP3x_POWER_OFF;
- }
-
- rv_writel(val, acp3x_base + mmACP_PGFSM_CONTROL);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
- if ((val & ACP3x_POWER_OFF_IN_PROGRESS) == mask)
- break;
- if (timeout > 100) {
- pr_err("ACP3x power state change failure\n");
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_reset(void __iomem *acp3x_base)
-{
- u32 val, timeout;
-
- rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
- timeout > 100) {
- if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
-
- rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if (!val || timeout > 100) {
- if (!val)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_init(void __iomem *acp3x_base)
-{
- int ret;
-
- /* power on */
- ret = acp3x_power_on(acp3x_base, true);
- if (ret) {
- pr_err("ACP3x power on failed\n");
- return ret;
- }
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- return 0;
-}
-
-static int acp3x_deinit(void __iomem *acp3x_base)
-{
- int ret;
-
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- /* power off */
- ret = acp3x_power_on(acp3x_base, false);
- if (ret) {
- pr_err("ACP3x power off failed\n");
- return ret;
- }
- return 0;
-}
-
static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
{
u16 play_flag, cap_flag;
@@ -520,10 +420,6 @@ static int acp3x_audio_probe(struct platform_device *pdev)
adata->i2s_irq = res->start;
dev_set_drvdata(&pdev->dev, adata);
- /* Initialize ACP */
- status = acp3x_init(adata->acp3x_base);
- if (status)
- goto io_irq;
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
NULL, 0);
@@ -560,40 +456,20 @@ static int acp3x_audio_probe(struct platform_device *pdev)
kfree(res);
kfree(adata->acp3x_base);
kfree(adata);
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_info(&pdev->dev, "ACP de-initialized\n");
- /*ignore device status and return driver probe error*/
return -ENODEV;
}
static int acp3x_audio_remove(struct platform_device *pdev)
{
- int ret;
- struct i2s_dev_data *adata = dev_get_drvdata(&pdev->dev);
-
- ret = acp3x_deinit(adata->acp3x_base);
- if (ret)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_info(&pdev->dev, "ACP de-initialized\n");
-
pm_runtime_disable(&pdev->dev);
return 0;
}
static int acp3x_resume(struct device *dev)
{
- int status;
u32 val;
struct i2s_dev_data *adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
-
if (adata->play_stream && adata->play_stream->runtime) {
struct i2s_stream_instance *rtd =
adata->play_stream->runtime->private_data;
@@ -638,15 +514,8 @@ static int acp3x_resume(struct device *dev)
static int acp3x_pcm_runtime_suspend(struct device *dev)
{
- int status;
struct i2s_dev_data *adata = dev_get_drvdata(dev);
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(dev, "ACP de-init failed\n");
- else
- dev_info(dev, "ACP de-initialized\n");
-
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
@@ -654,12 +523,8 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
static int acp3x_pcm_runtime_resume(struct device *dev)
{
- int status;
struct i2s_dev_data *adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 01b283a..c40f960 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,6 +7,7 @@
#include "chip_offset_byte.h"
+#define DELAY 600
#define I2S_SP_INSTANCE 0x01
#define I2S_BT_INSTANCE 0x02
@@ -65,6 +66,13 @@
#define SLOT_WIDTH_16 0x10
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+#define ACP_PGFSM_CNTL_POWER_ON_MASK 0x01
+#define ACP_PGFSM_CNTL_POWER_OFF_MASK 0x00
+#define ACP_PGFSM_STATUS_MASK 0x03
+#define ACP_POWERED_ON 0x00
+#define ACP_POWER_ON_IN_PROGRESS 0x01
+#define ACP_POWERED_OFF 0x02
+#define ACP_POWER_OFF_IN_PROGRESS 0x03
struct acp3x_platform_info {
u16 play_i2s_instance;
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index 91ebee9..2d2c7ba 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -9,6 +9,9 @@
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
+#include <linux/pm_runtime.h>
+#include <linux/delay.h>
+#include <sound/pcm.h>
#include "acp3x.h"
@@ -19,6 +22,114 @@ struct acp3x_dev_data {
struct platform_device *pdev[ACP3x_DEVS];
};
+static int acp3x_power_on(void __iomem *acp3x_base)
+{
+ u32 val;
+ u32 timeout = 0;
+ int ret = 0;
+
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+
+ if (val == 0)
+ return val;
+
+ if (!((val & ACP_PGFSM_STATUS_MASK) ==
+ ACP_POWER_ON_IN_PROGRESS))
+ rv_writel(ACP_PGFSM_CNTL_POWER_ON_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ while (++timeout < DELAY) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if (!val)
+ break;
+ udelay(1);
+ if (timeout > 500) {
+ pr_err("ACP is Not Powered ON\n");
+ return -ETIMEDOUT;
+ }
+ }
+}
+static int acp3x_power_off(void __iomem *acp3x_base)
+{
+ u32 val;
+ u32 timeout = 0;
+
+ rv_writel(ACP_PGFSM_CNTL_POWER_OFF_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ while (++timeout < DELAY) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if ((val & ACP_PGFSM_STATUS_MASK) == ACP_POWERED_OFF)
+ return 0;
+ udelay(1);
+ if (timeout > 500) {
+ pr_err("ACP is Not Powered OFF\n");
+ return -ETIMEDOUT;
+ }
+ }
+}
+static int acp3x_reset(void __iomem *acp3x_base)
+{
+ u32 val, timeout;
+
+ rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout < DELAY) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
+ timeout > 100) {
+ if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
+ break;
+ return -ENODEV;
+ }
+ cpu_relax();
+ }
+ rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout < DELAY) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if (!val)
+ break;
+ if (timeout > 100)
+ return -ENODEV;
+ cpu_relax();
+ }
+ return 0;
+}
+static int acp3x_init(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* power on */
+ ret = acp3x_power_on(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power on failed\n");
+ return ret;
+ }
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ return 0;
+}
+static int acp3x_deinit(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ /* power off */
+ ret = acp3x_power_off(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power off failed\n");
+ return ret;
+ }
+ return 0;
+}
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
@@ -63,6 +174,10 @@ static int snd_acp3x_probe(struct pci_dev *pci,
}
pci_set_master(pci);
pci_set_drvdata(pci, adata);
+ ret = acp3x_init(adata->acp3x_base);
+ if (ret)
+ return -ENODEV;
+
val = rv_readl(adata->acp3x_base + mmACP_I2S_PIN_CONFIG);
switch (val) {
@@ -133,9 +248,19 @@ static int snd_acp3x_probe(struct pci_dev *pci,
ret = -ENODEV;
goto unmap_mmio;
}
+ pm_runtime_set_autosuspend_delay(&pci->dev, 10000);
+ pm_runtime_use_autosuspend(&pci->dev);
+ pm_runtime_set_active(&pci->dev);
+ pm_runtime_put_noidle(&pci->dev);
+ pm_runtime_enable(&pci->dev);
return 0;
unmap_mmio:
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_info(&pci->dev, "ACP de-initialized\n");
pci_disable_msi(pci);
for (i = 0 ; i < ACP3x_DEVS ; i++)
platform_device_unregister(adata->pdev[i]);
@@ -148,23 +273,57 @@ static int snd_acp3x_probe(struct pci_dev *pci,
return ret;
}
+static int snd_acp3x_suspend(struct device *dev)
+{
+ int status;
+ struct acp3x_dev_data *adata = dev_get_drvdata(dev);
+
+ status = acp3x_deinit(adata->acp3x_base);
+ if (status)
+ dev_err(dev, "ACP de-init failed\n");
+ else
+ dev_info(dev, "ACP de-initialized\n");
+ return 0;
+}
+static int snd_acp3x_resume(struct device *dev)
+{
+ int status;
+ struct acp3x_dev_data *adata = dev_get_drvdata(dev);
+
+ status = acp3x_init(adata->acp3x_base);
+ if (status) {
+ dev_err(dev, "ACP init failed\n");
+ return status;
+ }
+ return 0;
+}
+static const struct dev_pm_ops acp3x_pm = {
+ .runtime_suspend = snd_acp3x_suspend,
+ .runtime_resume = snd_acp3x_resume,
+ .resume = snd_acp3x_resume,
+};
static void snd_acp3x_remove(struct pci_dev *pci)
{
- int i;
+ int i, ret;
struct acp3x_dev_data *adata = pci_get_drvdata(pci);
if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
for (i = 0 ; i < ACP3x_DEVS ; i++)
platform_device_unregister(adata->pdev[i]);
}
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_info(&pci->dev, "ACP de-initialized\n");
iounmap(adata->acp3x_base);
-
+ pm_runtime_disable(&pci->dev);
+ pm_runtime_get_noresume(&pci->dev);
pci_disable_msi(pci);
pci_release_regions(pci);
pci_disable_device(pci);
}
-
static const struct pci_device_id snd_acp3x_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x15e2),
.class = PCI_CLASS_MULTIMEDIA_OTHER << 8,
@@ -178,6 +337,9 @@ static struct pci_driver acp3x_driver = {
.id_table = snd_acp3x_ids,
.probe = snd_acp3x_probe,
.remove = snd_acp3x_remove,
+ .driver = {
+ .pm = &acp3x_pm,
+ }
};
module_pci_driver(acp3x_driver);
--
2.7.4
3
2

[alsa-devel] [RESEND PATCH v5 5/6] ASoC: amd: handle ACP3x i2s-sp interrupt.
by Ravulapati Vishnu vardhan rao 13 Nov '19
by Ravulapati Vishnu vardhan rao 13 Nov '19
13 Nov '19
Enabled support for handling i2s-sp interrupt.
previous to this,Driver support only BT instance and
interrupt on i2s-sp were not handled.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 6e70fa8..8a8b135 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -176,6 +176,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->play_stream);
play_flag = 1;
}
+ if ((val & BIT(I2S_TX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_play_stream) {
+ rv_writel(BIT(I2S_TX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_play_stream);
+ play_flag = 1;
+ }
if ((val & BIT(BT_RX_THRESHOLD)) && rv_i2s_data->capture_stream) {
rv_writel(BIT(BT_RX_THRESHOLD), rv_i2s_data->acp3x_base +
@@ -183,6 +190,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->capture_stream);
cap_flag = 1;
}
+ if ((val & BIT(I2S_RX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_capture_stream) {
+ rv_writel(BIT(I2S_RX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_capture_stream);
+ cap_flag = 1;
+ }
if (play_flag | cap_flag)
return IRQ_HANDLED;
--
2.7.4
2
1

[alsa-devel] [RESEND PATCH v5 3/6] ASoC: amd: Enabling I2S instance in DMA and DAI
by Ravulapati Vishnu vardhan rao 13 Nov '19
by Ravulapati Vishnu vardhan rao 13 Nov '19
13 Nov '19
This patch adds I2S SP support in ACP PCM DMA and DAI.
Added I2S support in DMA and DAI probe,its hw_params handling
its open and close functionalities.
This enable to open and close on the SP instance for
playback and capture.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 129 +++++++++++++++++++------
sound/soc/amd/raven/acp3x-pcm-dma.c | 186 +++++++++++++++++++++++++-----------
sound/soc/amd/raven/acp3x.h | 74 ++++++++++----
3 files changed, 289 insertions(+), 100 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index 0f27abc..bd0ec68 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -83,9 +83,20 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{
- u32 val = 0;
+ u32 val;
+ u32 reg_val;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+ struct snd_soc_card *card = prtd->card;
+ struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card);
struct i2s_stream_instance *rtd = substream->runtime->private_data;
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
+
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_U8:
case SNDRV_PCM_FORMAT_S8:
@@ -104,24 +115,46 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
return -EINVAL;
}
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | (rtd->xfer_resolution << 3);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ }
} else {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val | (rtd->xfer_resolution << 3);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ }
}
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + reg_val);
return 0;
}
static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{
- int ret = 0;
+ int ret;
struct i2s_stream_instance *rtd = substream->runtime->private_data;
- u32 val, period_bytes;
-
+ u32 val, period_bytes, reg_val, ier_val, water_val;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+ struct snd_soc_card *card = prtd->card;
+ struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card);
+
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
period_bytes = frames_to_bytes(substream->runtime,
substream->runtime->period_size);
switch (cmd) {
@@ -131,33 +164,73 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
rtd->bytescount = acp_get_byte_count(rtd,
substream->stream);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_TX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ water_val =
+ mmACP_BT_TX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_BTTDM_ITER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ water_val =
+ mmACP_I2S_TX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_I2STDM_ITER;
+ ier_val = mmACP_I2STDM_IER;
+ }
} else {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_RX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ water_val =
+ mmACP_BT_RX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_BTTDM_IRER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ water_val =
+ mmACP_I2S_RX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_I2STDM_IRER;
+ ier_val = mmACP_I2STDM_IER;
+ }
}
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
+ rv_writel(period_bytes, rtd->acp3x_base + water_val);
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ rv_writel(1, rtd->acp3x_base + ier_val);
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ ier_val = mmACP_I2STDM_IER;
+ }
+
} else {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ ier_val = mmACP_I2STDM_IER;
+ }
}
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ rv_writel(0, rtd->acp3x_base + ier_val);
break;
default:
ret = -EINVAL;
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 8db2812..6e70fa8 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -193,20 +193,36 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
{
u16 page_idx;
- u32 low, high, val, acp_fifo_addr;
- dma_addr_t addr = rtd->dma_addr;
+ uint64_t low, high, val, acp_fifo_addr;
+ uint64_t reg_ringbuf_size, reg_dma_size, reg_fifo_size, reg_fifo_addr;
+ dma_addr_t addr;
- /* 8 scratch registers used to map one 64 bit address */
- if (direction == SNDRV_PCM_STREAM_PLAYBACK)
- val = 0;
- else
- val = rtd->num_pages * 8;
+ addr = rtd->dma_addr;
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_PB_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_PB_PTE_OFFSET;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_CP_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_CP_PTE_OFFSET;
+ }
+ }
/* Group Enable */
rv_writel(ACP_SRAM_PTE_OFFSET | BIT(31), rtd->acp3x_base +
- mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
+ mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
rv_writel(PAGE_SIZE_4K_ENABLE, rtd->acp3x_base +
- mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
+ mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
for (page_idx = 0; page_idx < rtd->num_pages; page_idx++) {
/* Load the low address of page int ACP SRAM through SRBM */
@@ -223,38 +239,61 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
}
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_TX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET + (rtd->num_pages * 8)
- + PLAYBACK_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_TX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_TX_FIFOSIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_ringbuf_size = mmACP_BT_TX_RINGBUFSIZE;
+ reg_dma_size = mmACP_BT_TX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_PB_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_BT_TX_FIFOADDR;
+ reg_fifo_size = mmACP_BT_TX_FIFOSIZE;
+ rv_writel(I2S_BT_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_TX_RINGBUFADDR);
+ break;
+
+ case I2S_SP_INSTANCE:
+ default:
+ reg_ringbuf_size = mmACP_I2S_TX_RINGBUFSIZE;
+ reg_dma_size = mmACP_I2S_TX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_PB_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_I2S_TX_FIFOADDR;
+ reg_fifo_size = mmACP_I2S_TX_FIFOSIZE;
+ rv_writel(I2S_SP_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_TX_RINGBUFADDR);
+ }
} else {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START + MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_RX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
- (rtd->num_pages * 8) + CAPTURE_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_RX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_RX_FIFOSIZE);
- }
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_ringbuf_size = mmACP_BT_RX_RINGBUFSIZE;
+ reg_dma_size = mmACP_BT_RX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_CAPT_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_BT_RX_FIFOADDR;
+ reg_fifo_size = mmACP_BT_RX_FIFOSIZE;
+ rv_writel(I2S_BT_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_RX_RINGBUFADDR);
+ break;
- /* Enable watermark/period interrupt to host */
- rv_writel(BIT(BT_TX_THRESHOLD) | BIT(BT_RX_THRESHOLD),
- rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
+ case I2S_SP_INSTANCE:
+ default:
+ reg_ringbuf_size = mmACP_I2S_RX_RINGBUFSIZE;
+ reg_dma_size = mmACP_I2S_RX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_CAPT_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_I2S_RX_FIFOADDR;
+ reg_fifo_size = mmACP_I2S_RX_FIFOSIZE;
+ rv_writel(I2S_SP_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_RX_RINGBUFADDR);
+ }
+ }
+ rv_writel(MAX_BUFFER, rtd->acp3x_base + reg_ringbuf_size);
+ rv_writel(DMA_SIZE, rtd->acp3x_base + reg_dma_size);
+ rv_writel(acp_fifo_addr, rtd->acp3x_base + reg_fifo_addr);
+ rv_writel(FIFO_SIZE, rtd->acp3x_base + reg_fifo_size);
+ rv_writel(BIT(I2S_RX_THRESHOLD) | BIT(BT_RX_THRESHOLD)
+ | BIT(I2S_TX_THRESHOLD) | BIT(BT_TX_THRESHOLD),
+ rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
}
static int acp3x_dma_open(struct snd_soc_component *component,
@@ -284,13 +323,17 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return ret;
}
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = substream;
- else
+ adata->i2ssp_play_stream = substream;
+ } else {
adata->capture_stream = substream;
+ adata->i2ssp_capture_stream = substream;
+ }
i2s_data->acp3x_base = adata->acp3x_base;
runtime->private_data = i2s_data;
@@ -303,13 +346,24 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_hw_params *params)
{
int status;
- u64 size;
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct i2s_stream_instance *rtd = runtime->private_data;
+ uint64_t size;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+ struct snd_soc_card *card = prtd->card;
+ struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card);
+ struct i2s_stream_instance *rtd = substream->runtime->private_data;
if (!rtd)
return -EINVAL;
+
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ } else
+ pr_err("pinfo failed\n");
+
size = params_buffer_bytes(params);
status = snd_pcm_lib_malloc_pages(substream, size);
if (status < 0)
@@ -333,8 +387,17 @@ static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
u32 pos = 0;
u32 buffersize = 0;
u64 bytescount = 0;
- struct i2s_stream_instance *rtd =
- substream->runtime->private_data;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+ struct snd_soc_card *card = prtd->card;
+ struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card);
+ struct i2s_stream_instance *rtd = substream->runtime->private_data;
+
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
buffersize = frames_to_bytes(substream->runtime,
substream->runtime->buffer_size);
@@ -376,15 +439,19 @@ static int acp3x_dma_close(struct snd_soc_component *component,
component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = NULL;
- else
+ adata->i2ssp_play_stream = NULL;
+ } else {
adata->capture_stream = NULL;
+ adata->i2ssp_capture_stream = NULL;
+ }
/* Disable ACP irq, when the current stream is being closed and
* another stream is also not active.
*/
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ !adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
kfree(rtd);
return 0;
@@ -518,13 +585,16 @@ static int acp3x_resume(struct device *dev)
adata->play_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_PLAYBACK);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_ITER);
+ rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_TXFRMT);
+ mmACP_BTTDM_TXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_ITER);
+ mmACP_BTTDM_ITER);
}
}
@@ -533,13 +603,17 @@ static int acp3x_resume(struct device *dev)
adata->capture_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_CAPTURE);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_IRER);
+ rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
+
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_RXFRMT);
+ mmACP_BTTDM_RXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_IRER);
+ mmACP_BTTDM_IRER);
}
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 72c1a23..c071477 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,6 +7,9 @@
#include "chip_offset_byte.h"
+#define I2S_SP_INSTANCE 0x01
+#define I2S_BT_INSTANCE 0x02
+
#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
@@ -17,8 +20,11 @@
#define ACP3x_BT_TDM_REG_START 0x1242800
#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
+#define I2S_RX_THRESHOLD 27
+#define I2S_TX_THRESHOLD 28
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
+#define ACP_ERR_INTR_MASK 29
#define ACP3x_POWER_ON 0x00
#define ACP3x_POWER_ON_IN_PROGRESS 0x01
#define ACP3x_POWER_OFF 0x02
@@ -26,19 +32,28 @@
#define ACP3x_SOFT_RESET__SoftResetAudDone_MASK 0x00010001
#define ACP_SRAM_PTE_OFFSET 0x02050000
+#define ACP_SRAM_SP_PB_PTE_OFFSET 0x0
+#define ACP_SRAM_SP_CP_PTE_OFFSET 0x100
+#define ACP_SRAM_BT_PB_PTE_OFFSET 0x200
+#define ACP_SRAM_BT_CP_PTE_OFFSET 0x300
#define PAGE_SIZE_4K_ENABLE 0x2
-#define MEM_WINDOW_START 0x4000000
-#define PLAYBACK_FIFO_ADDR_OFFSET 0x400
-#define CAPTURE_FIFO_ADDR_OFFSET 0x500
+#define I2S_SP_TX_MEM_WINDOW_START 0x4000000
+#define I2S_SP_RX_MEM_WINDOW_START 0x4020000
+#define I2S_BT_TX_MEM_WINDOW_START 0x4040000
+#define I2S_BT_RX_MEM_WINDOW_START 0x4060000
+#define SP_PB_FIFO_ADDR_OFFSET 0x500
+#define SP_CAPT_FIFO_ADDR_OFFSET 0x700
+#define BT_PB_FIFO_ADDR_OFFSET 0x900
+#define BT_CAPT_FIFO_ADDR_OFFSET 0xB00
#define PLAYBACK_MIN_NUM_PERIODS 2
#define PLAYBACK_MAX_NUM_PERIODS 8
-#define PLAYBACK_MAX_PERIOD_SIZE 16384
-#define PLAYBACK_MIN_PERIOD_SIZE 4096
+#define PLAYBACK_MAX_PERIOD_SIZE 8192
+#define PLAYBACK_MIN_PERIOD_SIZE 1024
#define CAPTURE_MIN_NUM_PERIODS 2
#define CAPTURE_MAX_NUM_PERIODS 8
-#define CAPTURE_MAX_PERIOD_SIZE 16384
-#define CAPTURE_MIN_PERIOD_SIZE 4096
+#define CAPTURE_MAX_PERIOD_SIZE 8192
+#define CAPTURE_MIN_PERIOD_SIZE 1024
#define MAX_BUFFER (PLAYBACK_MAX_PERIOD_SIZE * PLAYBACK_MAX_NUM_PERIODS)
#define MIN_BUFFER MAX_BUFFER
@@ -64,14 +79,20 @@ struct i2s_dev_data {
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
+ struct snd_pcm_substream *i2ssp_play_stream;
+ struct snd_pcm_substream *i2ssp_capture_stream;
};
struct i2s_stream_instance {
u16 num_pages;
+ u16 i2s_instance;
+ u16 capture_channel;
+ u16 direction;
u16 channels;
u32 xfer_resolution;
- u64 bytescount;
+ u32 val;
dma_addr_t dma_addr;
+ u64 bytescount;
void __iomem *acp3x_base;
};
@@ -91,15 +112,36 @@ static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
u64 byte_count;
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_LOW);
+ }
+
} else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_LOW);
+ }
}
return byte_count;
}
--
2.7.4
2
1

[alsa-devel] [RESEND PATCH v5 2/6] ASoC: amd: Refactoring of DAI from DMA driver
by Ravulapati Vishnu vardhan rao 13 Nov '19
by Ravulapati Vishnu vardhan rao 13 Nov '19
13 Nov '19
Asoc: PCM DMA driver should only have dma ops.
So Removed all DAI related functionality.Refactoring
the PCM DMA diver code.Added new file containing only DAI ops.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/Makefile | 2 +
sound/soc/amd/raven/acp3x-i2s.c | 272 ++++++++++++++++++++++++++++++++++++
sound/soc/amd/raven/acp3x-pcm-dma.c | 251 +++++----------------------------
sound/soc/amd/raven/acp3x.h | 42 ++++++
4 files changed, 348 insertions(+), 219 deletions(-)
create mode 100644 sound/soc/amd/raven/acp3x-i2s.c
diff --git a/sound/soc/amd/raven/Makefile b/sound/soc/amd/raven/Makefile
index 108d1ac..8eef292 100644
--- a/sound/soc/amd/raven/Makefile
+++ b/sound/soc/amd/raven/Makefile
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: GPL-2.0+
# Raven Ridge platform Support
snd-pci-acp3x-objs := pci-acp3x.o
+snd-acp3x-i2s-objs := acp3x-i2s.o
snd-acp3x-pcm-dma-objs := acp3x-pcm-dma.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-pci-acp3x.o
+obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-i2s.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-pcm-dma.o
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
new file mode 100644
index 0000000..0f27abc
--- /dev/null
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -0,0 +1,272 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// AMD ALSA SoC PCM Driver
+//
+//Copyright 2016 Advanced Micro Devices, Inc.
+
+#include <linux/platform_device.h>
+#include <linux/module.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/pm_runtime.h>
+#include <sound/pcm.h>
+#include <sound/pcm_params.h>
+#include <sound/soc.h>
+#include <sound/soc-dai.h>
+#include <linux/dma-mapping.h>
+
+#include "acp3x.h"
+
+#define DRV_NAME "acp3x-i2s"
+
+static int acp3x_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
+{
+
+ struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
+
+ case SND_SOC_DAIFMT_I2S:
+ adata->tdm_mode = false;
+ break;
+ case SND_SOC_DAIFMT_DSP_A:
+ adata->tdm_mode = true;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
+ u32 rx_mask, int slots, int slot_width)
+{
+ u32 val;
+ u16 slot_len;
+
+ struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ /* These values are as per Hardware Spec */
+
+ switch (slot_width) {
+ case SLOT_WIDTH_8:
+ slot_len = 8;
+ break;
+ case SLOT_WIDTH_16:
+ slot_len = 16;
+ break;
+ case SLOT_WIDTH_24:
+ slot_len = 24;
+ break;
+ case SLOT_WIDTH_32:
+ slot_len = 0;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
+
+ val = (FRM_LEN | (slots << 15) | (slot_len << 18));
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+
+ adata->tdm_fmt = val;
+ return 0;
+}
+
+static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ struct snd_soc_dai *dai)
+{
+ u32 val = 0;
+ struct i2s_stream_instance *rtd = substream->runtime->private_data;
+
+ switch (params_format(params)) {
+ case SNDRV_PCM_FORMAT_U8:
+ case SNDRV_PCM_FORMAT_S8:
+ rtd->xfer_resolution = 0x0;
+ break;
+ case SNDRV_PCM_FORMAT_S16_LE:
+ rtd->xfer_resolution = 0x02;
+ break;
+ case SNDRV_PCM_FORMAT_S24_LE:
+ rtd->xfer_resolution = 0x04;
+ break;
+ case SNDRV_PCM_FORMAT_S32_LE:
+ rtd->xfer_resolution = 0x05;
+ break;
+ default:
+ return -EINVAL;
+ }
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ } else {
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ }
+ return 0;
+}
+
+static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
+ int cmd, struct snd_soc_dai *dai)
+{
+ int ret = 0;
+ struct i2s_stream_instance *rtd = substream->runtime->private_data;
+ u32 val, period_bytes;
+
+ period_bytes = frames_to_bytes(substream->runtime,
+ substream->runtime->period_size);
+ switch (cmd) {
+ case SNDRV_PCM_TRIGGER_START:
+ case SNDRV_PCM_TRIGGER_RESUME:
+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+ rtd->bytescount = acp_get_byte_count(rtd,
+ substream->stream);
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_TX_INTR_WATERMARK_SIZE);
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ } else {
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_RX_INTR_WATERMARK_SIZE);
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ }
+ rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ case SNDRV_PCM_TRIGGER_STOP:
+ case SNDRV_PCM_TRIGGER_SUSPEND:
+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ } else {
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ }
+ rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ default:
+ ret = -EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
+static struct snd_soc_dai_ops acp3x_i2s_dai_ops = {
+ .hw_params = acp3x_i2s_hwparams,
+ .trigger = acp3x_i2s_trigger,
+ .set_fmt = acp3x_i2s_set_fmt,
+ .set_tdm_slot = acp3x_i2s_set_tdm_slot,
+};
+
+static const struct snd_soc_component_driver acp3x_dai_component = {
+ .name = "acp3x-i2s",
+};
+
+static struct snd_soc_dai_driver acp3x_i2s_dai = {
+ .playback = {
+ .rates = SNDRV_PCM_RATE_8000_96000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 8,
+
+ .rate_min = 8000,
+ .rate_max = 96000,
+ },
+ .capture = {
+ .rates = SNDRV_PCM_RATE_8000_48000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 2,
+ .rate_min = 8000,
+ .rate_max = 48000,
+ },
+ .ops = &acp3x_i2s_dai_ops,
+};
+
+
+static int acp3x_dai_probe(struct platform_device *pdev)
+{
+ int status;
+ struct resource *res;
+ struct i2s_dev_data *adata;
+
+ adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data),
+ GFP_KERNEL);
+ if (!adata)
+ return -ENOMEM;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
+ goto err;
+ }
+
+ adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
+ resource_size(res));
+ if (IS_ERR(adata->acp3x_base))
+ return PTR_ERR(adata->acp3x_base);
+
+ adata->i2s_irq = res->start;
+ dev_set_drvdata(&pdev->dev, adata);
+ status = devm_snd_soc_register_component(&pdev->dev,
+ &acp3x_dai_component,
+ &acp3x_i2s_dai, 1);
+ if (status) {
+ dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ goto dev_err;
+ }
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 10000);
+ pm_runtime_use_autosuspend(&pdev->dev);
+ pm_runtime_enable(&pdev->dev);
+ return 0;
+err:
+ kfree(adata);
+ return -ENOMEM;
+dev_err:
+ kfree(adata->acp3x_base);
+ kfree(adata);
+ kfree(res);
+ return -ENODEV;
+}
+
+static int acp3x_dai_remove(struct platform_device *pdev)
+{
+ pm_runtime_disable(&pdev->dev);
+ return 0;
+}
+static struct platform_driver acp3x_dai_driver = {
+ .probe = acp3x_dai_probe,
+ .remove = acp3x_dai_remove,
+ .driver = {
+ .name = "acp3x_i2s_playcap",
+ },
+};
+
+module_platform_driver(acp3x_dai_driver);
+
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
+MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:" DRV_NAME);
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 60709e3..8db2812 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -18,24 +18,6 @@
#define DRV_NAME "acp3x-i2s-audio"
-struct i2s_dev_data {
- bool tdm_mode;
- unsigned int i2s_irq;
- u32 tdm_fmt;
- void __iomem *acp3x_base;
- struct snd_pcm_substream *play_stream;
- struct snd_pcm_substream *capture_stream;
-};
-
-struct i2s_stream_instance {
- u16 num_pages;
- u16 channels;
- u32 xfer_resolution;
- u64 bytescount;
- dma_addr_t dma_addr;
- void __iomem *acp3x_base;
-};
-
static const struct snd_pcm_hardware acp3x_pcm_hardware_playback = {
.info = SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -280,6 +262,9 @@ static int acp3x_dma_open(struct snd_soc_component *component,
{
int ret = 0;
struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
struct i2s_stream_instance *i2s_data = kzalloc(sizeof(struct i2s_stream_instance),
GFP_KERNEL);
@@ -312,23 +297,6 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return 0;
}
-static u64 acp_get_byte_count(struct i2s_stream_instance *rtd, int direction)
-{
- u64 byte_count;
-
- if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
- } else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
- }
- return byte_count;
-}
static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
@@ -380,6 +348,7 @@ static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
static int acp3x_dma_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd)
{
+ component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
struct device *parent = component->dev->parent;
snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_DEV,
parent, MIN_BUFFER, MAX_BUFFER);
@@ -402,7 +371,9 @@ static int acp3x_dma_mmap(struct snd_soc_component *component,
static int acp3x_dma_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
struct i2s_stream_instance *rtd = substream->runtime->private_data;
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
@@ -419,182 +390,6 @@ static int acp3x_dma_close(struct snd_soc_component *component,
return 0;
}
-static int acp3x_dai_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
-{
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
- case SND_SOC_DAIFMT_I2S:
- adata->tdm_mode = false;
- break;
- case SND_SOC_DAIFMT_DSP_A:
- adata->tdm_mode = true;
- break;
- default:
- return -EINVAL;
- }
-
- return 0;
-}
-
-static int acp3x_dai_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
- u32 rx_mask, int slots, int slot_width)
-{
- u32 val = 0;
- u16 slot_len;
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (slot_width) {
- case SLOT_WIDTH_8:
- slot_len = 8;
- break;
- case SLOT_WIDTH_16:
- slot_len = 16;
- break;
- case SLOT_WIDTH_24:
- slot_len = 24;
- break;
- case SLOT_WIDTH_32:
- slot_len = 0;
- break;
- default:
- return -EINVAL;
- }
-
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
-
- val = (FRM_LEN | (slots << 15) | (slot_len << 18));
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
-
- adata->tdm_fmt = val;
- return 0;
-}
-
-static int acp3x_dai_i2s_hwparams(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *params,
- struct snd_soc_dai *dai)
-{
- u32 val = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
-
- switch (params_format(params)) {
- case SNDRV_PCM_FORMAT_U8:
- case SNDRV_PCM_FORMAT_S8:
- rtd->xfer_resolution = 0x0;
- break;
- case SNDRV_PCM_FORMAT_S16_LE:
- rtd->xfer_resolution = 0x02;
- break;
- case SNDRV_PCM_FORMAT_S24_LE:
- rtd->xfer_resolution = 0x04;
- break;
- case SNDRV_PCM_FORMAT_S32_LE:
- rtd->xfer_resolution = 0x05;
- break;
- default:
- return -EINVAL;
- }
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | (rtd->xfer_resolution << 3);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- else
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
-
- return 0;
-}
-
-static int acp3x_dai_i2s_trigger(struct snd_pcm_substream *substream,
- int cmd, struct snd_soc_dai *dai)
-{
- int ret = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
- u32 val, period_bytes;
-
- period_bytes = frames_to_bytes(substream->runtime,
- substream->runtime->period_size);
- switch (cmd) {
- case SNDRV_PCM_TRIGGER_START:
- case SNDRV_PCM_TRIGGER_RESUME:
- case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
- rtd->bytescount = acp_get_byte_count(rtd, substream->stream);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_TX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_RX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- case SNDRV_PCM_TRIGGER_STOP:
- case SNDRV_PCM_TRIGGER_SUSPEND:
- case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- default:
- ret = -EINVAL;
- break;
- }
-
- return ret;
-}
-
-static struct snd_soc_dai_ops acp3x_dai_i2s_ops = {
- .hw_params = acp3x_dai_i2s_hwparams,
- .trigger = acp3x_dai_i2s_trigger,
- .set_fmt = acp3x_dai_i2s_set_fmt,
- .set_tdm_slot = acp3x_dai_set_tdm_slot,
-};
-
-static struct snd_soc_dai_driver acp3x_i2s_dai_driver = {
- .playback = {
- .rates = SNDRV_PCM_RATE_8000_96000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 8,
-
- .rate_min = 8000,
- .rate_max = 96000,
- },
- .capture = {
- .rates = SNDRV_PCM_RATE_8000_48000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 2,
- .rate_min = 8000,
- .rate_max = 48000,
- },
- .ops = &acp3x_dai_i2s_ops,
-};
-
static const struct snd_soc_component_driver acp3x_i2s_component = {
.name = DRV_NAME,
.open = acp3x_dma_open,
@@ -628,31 +423,31 @@ static int acp3x_audio_probe(struct platform_device *pdev)
adata = devm_kzalloc(&pdev->dev, sizeof(*adata), GFP_KERNEL);
if (!adata)
- return -ENOMEM;
+ goto err;
adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
+ if (!adata->acp3x_base)
+ goto base_err;
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res) {
dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
- return -ENODEV;
+ goto io_irq;
}
adata->i2s_irq = res->start;
- adata->play_stream = NULL;
- adata->capture_stream = NULL;
dev_set_drvdata(&pdev->dev, adata);
/* Initialize ACP */
status = acp3x_init(adata->acp3x_base);
if (status)
- return -ENODEV;
+ goto io_irq;
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
- &acp3x_i2s_dai_driver, 1);
+ NULL, 0);
if (status) {
- dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ dev_err(&pdev->dev, "Fail to register acp i2s component\n");
goto dev_err;
}
status = devm_request_irq(&pdev->dev, adata->i2s_irq, i2s_irq_handler,
@@ -666,7 +461,24 @@ static int acp3x_audio_probe(struct platform_device *pdev)
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_enable(&pdev->dev);
return 0;
+
+err:
+ kfree(res);
+ return -ENOMEM;
+base_err:
+ kfree(res);
+ kfree(adata);
+ return -ENOMEM;
+io_irq:
+ kfree(res);
+ kfree(adata->acp3x_base);
+ kfree(adata);
+ return -ENOMEM;
+
dev_err:
+ kfree(res);
+ kfree(adata->acp3x_base);
+ kfree(adata);
status = acp3x_deinit(adata->acp3x_base);
if (status)
dev_err(&pdev->dev, "ACP de-init failed\n");
@@ -774,13 +586,14 @@ static struct platform_driver acp3x_dma_driver = {
.probe = acp3x_audio_probe,
.remove = acp3x_audio_remove,
.driver = {
- .name = "acp3x_rv_i2s",
+ .name = "acp3x_rv_i2s_dma",
.pm = &acp3x_pm_ops,
},
};
module_platform_driver(acp3x_dma_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_AUTHOR("Vijendar.Mukunda(a)amd.com");
MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 2f15fe1..72c1a23 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -51,6 +51,29 @@
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+struct acp3x_platform_info {
+ u16 play_i2s_instance;
+ u16 cap_i2s_instance;
+ u16 capture_channel;
+};
+
+struct i2s_dev_data {
+ bool tdm_mode;
+ unsigned int i2s_irq;
+ u32 tdm_fmt;
+ void __iomem *acp3x_base;
+ struct snd_pcm_substream *play_stream;
+ struct snd_pcm_substream *capture_stream;
+};
+
+struct i2s_stream_instance {
+ u16 num_pages;
+ u16 channels;
+ u32 xfer_resolution;
+ u64 bytescount;
+ dma_addr_t dma_addr;
+ void __iomem *acp3x_base;
+};
static inline u32 rv_readl(void __iomem *base_addr)
{
@@ -61,3 +84,22 @@ static inline void rv_writel(u32 val, void __iomem *base_addr)
{
writel(val, base_addr - ACP3x_PHY_BASE_ADDRESS);
}
+
+static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
+ int direction)
+{
+ u64 byte_count;
+
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ } else {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ }
+ return byte_count;
+}
--
2.7.4
3
2

[alsa-devel] [PATCH v5 1/6] ASoC: amd:Create multiple I2S platform device Endpoint
by Ravulapati Vishnu vardhan rao 13 Nov '19
by Ravulapati Vishnu vardhan rao 13 Nov '19
13 Nov '19
Creates Platform Device endpoints for multiple
I2S instances: SP and BT endpoints device.
Pass PCI resources like MMIO, irq to the platform devices.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x.h | 5 +++
sound/soc/amd/raven/pci-acp3x.c | 78 +++++++++++++++++++++++++++++------------
2 files changed, 60 insertions(+), 23 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 4f2cadd..2f15fe1 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,10 +7,15 @@
#include "chip_offset_byte.h"
+#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
#define ACP3x_REG_START 0x1240000
#define ACP3x_REG_END 0x1250200
+#define ACP3x_I2STDM_REG_START 0x1242400
+#define ACP3x_I2STDM_REG_END 0x1242410
+#define ACP3x_BT_TDM_REG_START 0x1242800
+#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index facec24..91ebee9 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -16,16 +16,16 @@ struct acp3x_dev_data {
void __iomem *acp3x_base;
bool acp3x_audio_mode;
struct resource *res;
- struct platform_device *pdev;
+ struct platform_device *pdev[ACP3x_DEVS];
};
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
int ret;
- u32 addr, val;
+ u32 addr, val, i;
struct acp3x_dev_data *adata;
- struct platform_device_info pdevinfo;
+ struct platform_device_info pdevinfo[ACP3x_DEVS];
unsigned int irqflags;
if (pci_enable_device(pci)) {
@@ -68,7 +68,7 @@ static int snd_acp3x_probe(struct pci_dev *pci,
switch (val) {
case I2S_MODE:
adata->res = devm_kzalloc(&pci->dev,
- sizeof(struct resource) * 2,
+ sizeof(struct resource) * 4,
GFP_KERNEL);
if (!adata->res) {
ret = -ENOMEM;
@@ -80,28 +80,52 @@ static int snd_acp3x_probe(struct pci_dev *pci,
adata->res[0].start = addr;
adata->res[0].end = addr + (ACP3x_REG_END - ACP3x_REG_START);
- adata->res[1].name = "acp3x_i2s_irq";
- adata->res[1].flags = IORESOURCE_IRQ;
- adata->res[1].start = pci->irq;
- adata->res[1].end = pci->irq;
+ adata->res[1].name = "acp3x_i2s_sp";
+ adata->res[1].flags = IORESOURCE_MEM;
+ adata->res[1].start = addr + ACP3x_I2STDM_REG_START;
+ adata->res[1].end = addr + ACP3x_I2STDM_REG_END;
+
+ adata->res[2].name = "acp3x_i2s_bt";
+ adata->res[2].flags = IORESOURCE_MEM;
+ adata->res[2].start = addr + ACP3x_BT_TDM_REG_START;
+ adata->res[2].end = addr + ACP3x_BT_TDM_REG_END;
+
+ adata->res[3].name = "acp3x_i2s_irq";
+ adata->res[3].flags = IORESOURCE_IRQ;
+ adata->res[3].start = pci->irq;
+ adata->res[3].end = adata->res[3].start;
adata->acp3x_audio_mode = ACP3x_I2S_MODE;
memset(&pdevinfo, 0, sizeof(pdevinfo));
- pdevinfo.name = "acp3x_rv_i2s";
- pdevinfo.id = 0;
- pdevinfo.parent = &pci->dev;
- pdevinfo.num_res = 2;
- pdevinfo.res = adata->res;
- pdevinfo.data = &irqflags;
- pdevinfo.size_data = sizeof(irqflags);
-
- adata->pdev = platform_device_register_full(&pdevinfo);
- if (IS_ERR(adata->pdev)) {
- dev_err(&pci->dev, "cannot register %s device\n",
- pdevinfo.name);
- ret = PTR_ERR(adata->pdev);
- goto unmap_mmio;
+ pdevinfo[0].name = "acp3x_rv_i2s_dma";
+ pdevinfo[0].id = 0;
+ pdevinfo[0].parent = &pci->dev;
+ pdevinfo[0].num_res = 4;
+ pdevinfo[0].res = &adata->res[0];
+ pdevinfo[0].data = &irqflags;
+ pdevinfo[0].size_data = sizeof(irqflags);
+
+ pdevinfo[1].name = "acp3x_i2s_playcap";
+ pdevinfo[1].id = 0;
+ pdevinfo[1].parent = &pci->dev;
+ pdevinfo[1].num_res = 1;
+ pdevinfo[1].res = &adata->res[1];
+
+ pdevinfo[2].name = "acp3x_i2s_playcap";
+ pdevinfo[2].id = 1;
+ pdevinfo[2].parent = &pci->dev;
+ pdevinfo[2].num_res = 1;
+ pdevinfo[2].res = &adata->res[2];
+ for (i = 0; i < ACP3x_DEVS ; i++) {
+ adata->pdev[i] =
+ platform_device_register_full(&pdevinfo[i]);
+ if (IS_ERR(adata->pdev[i])) {
+ dev_err(&pci->dev, "cannot register %s device\n",
+ pdevinfo[i].name);
+ ret = PTR_ERR(adata->pdev[i]);
+ goto unmap_mmio;
+ }
}
break;
default:
@@ -113,6 +137,9 @@ static int snd_acp3x_probe(struct pci_dev *pci,
unmap_mmio:
pci_disable_msi(pci);
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+ kfree(adata->res);
iounmap(adata->acp3x_base);
release_regions:
pci_release_regions(pci);
@@ -124,9 +151,13 @@ static int snd_acp3x_probe(struct pci_dev *pci,
static void snd_acp3x_remove(struct pci_dev *pci)
{
+ int i;
struct acp3x_dev_data *adata = pci_get_drvdata(pci);
- platform_device_unregister(adata->pdev);
+ if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+ }
iounmap(adata->acp3x_base);
pci_disable_msi(pci);
@@ -151,6 +182,7 @@ static struct pci_driver acp3x_driver = {
module_pci_driver(acp3x_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_DESCRIPTION("AMD ACP3x PCI driver");
MODULE_LICENSE("GPL v2");
--
2.7.4
2
1

[alsa-devel] [PATCHv1 0/5] ASoC: da7213: support for usage with simple-card
by Sebastian Reichel 13 Nov '19
by Sebastian Reichel 13 Nov '19
13 Nov '19
Hi,
This extends the da7213 driver to be used with simple-audio-card in
combination with a fixed clock. Here is a snippet of the downstream
board's DT, that is supposed to be supported by this patchset.
---------------------------------------------------------------------
/ {
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&dailink_master>;
simple-audio-card,frame-master = <&dailink_master>;
simple-audio-card,widgets = "Speaker", "Ext Spk";
simple-audio-card,audio-routing = "Ext Spk", "LINE";
simple-audio-card,cpu {
sound-dai = <&ssi1>;
};
dailink_master: simple-audio-card,codec {
sound-dai = <&codec>;
};
};
clk_ext_audio_codec: clock-codec {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <12288000>;
};
};
&i2c1 {
codec: audio-codec@1a {
compatible = "dlg,da7212";
reg = <0x1a>;
#sound-dai-cells = <0>;
VDDA-supply = <®_2v5_audio>;
VDDSP-supply = <®_5v0_audio>;
VDDMIC-supply = <®_3v3_audio>;
VDDIO-supply = <®_3v3_audio>;
clocks = <&clk_ext_audio_codec>;
clock-names = "mclk";
};
};
---------------------------------------------------------------------
-- Sebastian
Sebastian Reichel (5):
ASoC: da7213: Add regulator support
ASoC: Add DA7213 audio codec as selectable option
ASoC: da7213: move set_sysclk to codec level
ASoC: da7213: move set_pll to codec level
ASoC: da7213: add default clock handling
.../devicetree/bindings/sound/da7213.txt | 4 +
sound/soc/codecs/Kconfig | 3 +-
sound/soc/codecs/da7213.c | 128 ++++++++++++++++--
sound/soc/codecs/da7213.h | 3 +
4 files changed, 125 insertions(+), 13 deletions(-)
--
2.24.0.rc1
3
12

[alsa-devel] [RESEND PATCH v5 4/6] ASoC: amd: add ACP3x TDM mode support
by Ravulapati Vishnu vardhan rao 13 Nov '19
by Ravulapati Vishnu vardhan rao 13 Nov '19
13 Nov '19
ACP3x I2S (CPU DAI) can act in normal I2S and TDM modes. Added support
for TDM mode. Desired mode can be selected from ASoC machine driver.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 51 +++++++++++++++++++++++++++++++++--------
sound/soc/amd/raven/acp3x.h | 2 ++
2 files changed, 43 insertions(+), 10 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index bd0ec68..f6b306d 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -43,7 +43,7 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
u32 rx_mask, int slots, int slot_width)
{
u32 val;
- u16 slot_len;
+ u16 slot_len, flen;
struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
@@ -66,16 +66,47 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
return -EINVAL;
}
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
+ /* Enable I2S / BT channels TDM and respective
+ * I2S/BT`s TX/RX Formats frame lengths.
+ */
+ flen = (FRM_LEN | (slots << 15) | (slot_len << 18));
- val = (FRM_LEN | (slots << 15) | (slot_len << 18));
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
-
- adata->tdm_fmt = val;
+ if (adata->substream_type == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel((val | 0x2),
+ adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel(flen,
+ adata->acp3x_base + mmACP_BTTDM_TXFRMT);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = rv_readl(adata->acp3x_base + mmACP_I2STDM_ITER);
+ rv_writel((val | 0x2),
+ adata->acp3x_base + mmACP_I2STDM_ITER);
+ rv_writel(flen,
+ adata->acp3x_base + mmACP_I2STDM_TXFRMT);
+ }
+ } else {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel((val | 0x2),
+ adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel(flen,
+ adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = rv_readl(adata->acp3x_base + mmACP_I2STDM_IRER);
+ rv_writel((val | 0x2),
+ adata->acp3x_base + mmACP_I2STDM_IRER);
+ rv_writel(flen,
+ adata->acp3x_base + mmACP_I2STDM_RXFRMT);
+ }
+ }
+ adata->tdm_fmt = flen;
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index c071477..01b283a 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -76,6 +76,8 @@ struct i2s_dev_data {
bool tdm_mode;
unsigned int i2s_irq;
u32 tdm_fmt;
+ u16 i2s_instance;
+ u32 substream_type;
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
--
2.7.4
1
0

13 Nov '19
While output urb's snd_complete_urb() is executing, calling
prepare_outbound_urb() may cause endpoint stopped before
prepare_outbound_urb() returns and result in next urb submitted
to stopped endpoint. usb-audio driver cannot re-use it afterwards as
the urb is still hold by usb stack.
This change checks EP_FLAG_RUNNING flag after prepare_outbound_urb() again
to let snd_complete_urb() know the endpoint already stopped and does not
submit next urb.
We observed two scenario have this issue:
1. While executing snd_complete_urb() to complete an output urb, calling
prepare_outbound_urb() let deactive_urbs() get called to unlink all
active urbs.
[ 268.097066] [<ffffffc000af7638>] deactivate_urbs+0xd4/0x108
[ 268.102633] [<ffffffc000af87fc>] snd_usb_endpoint_stop+0x30/0x58
[ 268.108636] [<ffffffc000b0272c>] snd_usb_substream_playback_trigger+0xa4/0xf4
[ 268.115765] [<ffffffc000acdbd0>] snd_pcm_do_stop+0x4c/0x58
[ 268.121245] [<ffffffc000acda24>] snd_pcm_action_single+0x40/0x88
[ 268.127245] [<ffffffc000ace984>] snd_pcm_action+0x30/0xf0
[ 268.132632] [<ffffffc000acea68>] snd_pcm_stop+0x24/0x2c
[ 268.137851] [<ffffffc000ad5e14>] xrun+0x60/0x6c
[ 268.142374] [<ffffffc000ad7a98>] snd_pcm_update_state+0xa8/0x10c
[ 268.148374] [<ffffffc000ad7e24>] snd_pcm_update_hw_ptr0+0x328/0x344
[ 268.154635] [<ffffffc000ad7ed8>] snd_pcm_period_elapsed+0x98/0xb0
[ 268.160723] [<ffffffc000b02510>] prepare_playback_urb+0x46c/0x488
[ 268.166810] [<ffffffc000af7d60>] prepare_outbound_urb+0x60/0x1d4
[ 268.172805] [<ffffffc000af8d60>] snd_complete_urb+0x244/0x264
[ 268.178548] [<ffffffc00081fb38>] __usb_hcd_giveback_urb+0x94/0x104
[ 268.184721] [<ffffffc00081fbe4>] usb_hcd_giveback_urb+0x3c/0x114
[ 268.190724] [<ffffffc00084d4b4>] handle_tx_event+0x1304/0x1434
[ 268.196552] [<ffffffc00084dbc0>] xhci_handle_event+0x5dc/0x788
[ 268.202378] [<ffffffc00084dee4>] xhci_irq+0x178/0x280
2. Userspace application stops playback from sound subsystem with below
call stack:
[ 28.506477] CPU: 5 PID: 1274 Comm: AudioOut_25 Not tainted 4.4.38-tegra #31
[ 28.513430] Hardware name: quill (DT)
[ 28.517085] Call trace:
[ 28.519531] [<ffffffc000089a84>] dump_backtrace+0x0/0xf8
[ 28.524837] [<ffffffc000089c44>] show_stack+0x14/0x1c
[ 28.529885] [<ffffffc000401c54>] dump_stack+0xac/0xe0
[ 28.534931] [<ffffffc000b35f94>] deactivate_urbs+0x148/0x180
[ 28.540578] [<ffffffc000b37160>] snd_usb_endpoint_stop+0x30/0x58
[ 28.546571] [<ffffffc000b410d8>] snd_usb_substream_playback_trigger+0xa4/0xf4
[ 28.553699] [<ffffffc000b0c160>] snd_pcm_do_stop+0x4c/0x58
[ 28.559179] [<ffffffc000b0bfb4>] snd_pcm_action_single+0x40/0x88
[ 28.565178] [<ffffffc000b0cf14>] snd_pcm_action+0x30/0xf0
[ 28.570568] [<ffffffc000b0fbc8>] snd_pcm_drop+0xac/0x140
[ 28.575873] [<ffffffc000b0fc84>] snd_pcm_release_substream+0x28/0xb0
[ 28.582212] [<ffffffc000b0fd48>] snd_pcm_release+0x3c/0x98
[ 28.587686] [<ffffffc0001e3210>] __fput+0xe0/0x1ac
[ 28.592469] [<ffffffc0001e3334>] ____fput+0xc/0x14
[ 28.597253] [<ffffffc0000c2904>] task_work_run+0xa0/0xc0
[ 28.602558] [<ffffffc0000897bc>] do_notify_resume+0x48/0x60
[ 28.608123] [<ffffffc000084ee8>] work_pending+0x1c/0x20
In the call path, snd_pcm_stream spinlock has been acquired in
snd_pcm_drop(). If an output urb is completed between the spinlock
acquired and deactivate_urbs() clears EP_FLAG_RUNNING for the endpoint,
its executing of snd_complete_urb() will be blocked for acquiring
snd_pcm_stream spinlock in snd_pcm_period_elapsed() until the lock is
released in snd_pcm_drop(). When snd_complete_urb() continues, all jobs
for deactivate_urbs() are finished.
Signed-off-by: Henry Lin <henryl(a)nvidia.com>
---
sound/usb/endpoint.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index a2ab8e8d3a93..4a9a2f6ef5a4 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -388,6 +388,9 @@ static void snd_complete_urb(struct urb *urb)
}
prepare_outbound_urb(ep, ctx);
+ /* can be stopped during prepare callback */
+ if (unlikely(!test_bit(EP_FLAG_RUNNING, &ep->flags)))
+ goto exit_clear;
} else {
retire_inbound_urb(ep, ctx);
/* can be stopped during retire callback */
--
2.17.1
2
6
Hi Mark
These are soc-core cleanup step5.
My apology that it is randomly cleanupping.
Kuninori Morimoto (9):
ASoC: soc-core: remove soc_is_dai_link_bound()
ASoC: soc-core: merge snd_soc_register_dai() and soc_add_dai()
ASoC: soc-core: merge snd_soc_unregister_dai() and soc_del_dai()
ASoC: soc-core: merge snd_soc_add_dai_link() and soc_bind_dai_link()
ASoC: soc-core: merge snd_soc_remove_dai_link() and soc_unbind_dai_link()
ASoC: soc-core: merge soc_remove_component() and soc_cleanup_component()
ASoC: soc-core: merge snd_soc_bind_card() and snd_soc_instantiate_card()
ASoC: soc-core: tidyup soc_probe_aux_devices()
ASoC: soc-core: call snd_soc_dapm_shutdown() at soc_cleanup_card_resources()
sound/soc/soc-core.c | 281 ++++++++++++++++++++-------------------------------
1 file changed, 107 insertions(+), 174 deletions(-)
--
2.7.4
3
24

[alsa-devel] [PATCH] dt-bindings: vendor-prefixes: Add 'fsi[ab]' to the list of non-vendor prefixes
by Rob Herring 12 Nov '19
by Rob Herring 12 Nov '19
12 Nov '19
'fsia' and 'fsib' property prefixes were added as schema in commit
2f52475bac7e ("ASoC: fsi: switch to yaml base Documentation").
Unfortunately to do checks on actual vendor prefixes, we have to track
the handful of prefixes which are not vendors like 'fsia' and 'fsib'.
Fixes: 2f52475bac7e ASoC: fsi: switch to yaml base Documentation
Cc: Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
Cc: Mark Brown <broonie(a)kernel.org>
Signed-off-by: Rob Herring <robh(a)kernel.org>
---
Seems to be an old binding, but there aren't any upstream dts files
using these properties. If there's not backwards compatibility concerns,
another option would be to rename these properties.
Mark, probably should go via your tree as that is where the error is
introduced.
Rob
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 967e78c5ec0a..67b89db54aa2 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -16,7 +16,7 @@ properties: {}
patternProperties:
# Prefixes which are not vendors, but followed the pattern
# DO NOT ADD NEW PROPERTIES TO THIS LIST
- "^(at25|devbus|dmacap|dsa|exynos|gpio-fan|gpio|gpmc|hdmi|i2c-gpio),.*": true
+ "^(at25|devbus|dmacap|dsa|exynos|fsi[ab]|gpio-fan|gpio|gpmc|hdmi|i2c-gpio),.*": true
"^(keypad|m25p|max8952|max8997|max8998|mpmc),.*": true
"^(pinctrl-single|#pinctrl-single|PowerPC),.*": true
"^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*": true
--
2.20.1
2
2

[alsa-devel] [PATCH] ASoC: rt5682: cancel jack_detect_work if hs_jack is set to null
by Pierre-Louis Bossart 12 Nov '19
by Pierre-Louis Bossart 12 Nov '19
12 Nov '19
From: Bard liao <yung-chuan.liao(a)linux.intel.com>
jack_detect_work will be triggered by rt5682_irq. We should cancel
it if hs_jack is set to null.
Signed-off-by: Bard liao <yung-chuan.liao(a)linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart(a)linux.intel.com>
---
sound/soc/codecs/rt5682.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c
index 35dcec135c8a..0d8e9866c01a 100644
--- a/sound/soc/codecs/rt5682.c
+++ b/sound/soc/codecs/rt5682.c
@@ -1003,6 +1003,7 @@ static int rt5682_set_jack_detect(struct snd_soc_component *component,
RT5682_JD1_EN_MASK, RT5682_JD1_DIS);
regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL,
RT5682_POW_JDH | RT5682_POW_JDL, 0);
+ cancel_delayed_work_sync(&rt5682->jack_detect_work);
return 0;
}
--
2.20.1
2
1

[alsa-devel] [PATCH 0/4] ASoC: SOF: Intel: only use D0i3 if needed
by Pierre-Louis Bossart 12 Nov '19
by Pierre-Louis Bossart 12 Nov '19
12 Nov '19
The earlier patches for D0i3/S0ix support went one bridge too far, and
forced the use of D0i3 even when it was not needed, which also had the
side effect of breaking some of our s2idle suspend/resume stress
tests.
Add documentation on supported transitions and only use D0i3 if
necessary.
Keyon Jie (4):
ASoC: SOF: PM: add state machine to comments
ASoC: SOF: PM: add check before setting d0_substate
ASoC: SOF: add helper to check if we should enter d0i3 suspend
ASoC: SOF: PM: only suspend to D0I3 when needed
sound/soc/sof/core.c | 13 +++++++++++++
sound/soc/sof/pm.c | 39 +++++++++++++++++++++++++++++++++++++--
sound/soc/sof/sof-priv.h | 2 ++
3 files changed, 52 insertions(+), 2 deletions(-)
--
2.20.1
2
8

[alsa-devel] [PATCH] ASoC: SOF: topology: free kcontrol memory on error
by Pierre-Louis Bossart 12 Nov '19
by Pierre-Louis Bossart 12 Nov '19
12 Nov '19
From: Dragos Tarcatu <dragos_tarcatu(a)mentor.com>
The volume and bytes kcontrols are currently not freeing their
memory on initialization failures. When an error occurs, all the
widgets loaded so far are unloaded via sof_widget_unload().
But this only happens for the widgets that got successfully loaded.
Fix that by kfree()-ing the allocated memory on load error.
Fixes: 311ce4fe7637d ("ASoC: SOF: Add support for loading topologies")
Reviewed-by: Paul Olaru <paul.olaru(a)nxp.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan(a)linux.intel.com>
Signed-off-by: Dragos Tarcatu <dragos_tarcatu(a)mentor.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart(a)linux.intel.com>
---
sound/soc/sof/topology.c | 67 +++++++++++++++++++++++++++++-----------
1 file changed, 49 insertions(+), 18 deletions(-)
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index 6096731e89ce..d82ab981e840 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -942,18 +942,22 @@ static int sof_control_load_volume(struct snd_soc_component *scomp,
struct sof_ipc_ctrl_data *cdata;
int tlv[TLV_ITEMS];
unsigned int i;
- int ret;
+ int ret = 0;
/* validate topology data */
- if (le32_to_cpu(mc->num_channels) > SND_SOC_TPLG_MAX_CHAN)
- return -EINVAL;
+ if (le32_to_cpu(mc->num_channels) > SND_SOC_TPLG_MAX_CHAN) {
+ ret = -EINVAL;
+ goto out;
+ }
/* init the volume get/put data */
scontrol->size = struct_size(scontrol->control_data, chanv,
le32_to_cpu(mc->num_channels));
scontrol->control_data = kzalloc(scontrol->size, GFP_KERNEL);
- if (!scontrol->control_data)
- return -ENOMEM;
+ if (!scontrol->control_data) {
+ ret = -ENOMEM;
+ goto out;
+ }
scontrol->comp_id = sdev->next_comp_id;
scontrol->min_volume_step = le32_to_cpu(mc->min);
@@ -963,7 +967,7 @@ static int sof_control_load_volume(struct snd_soc_component *scomp,
/* set cmd for mixer control */
if (le32_to_cpu(mc->max) == 1) {
scontrol->cmd = SOF_CTRL_CMD_SWITCH;
- goto out;
+ goto skip;
}
scontrol->cmd = SOF_CTRL_CMD_VOLUME;
@@ -971,14 +975,15 @@ static int sof_control_load_volume(struct snd_soc_component *scomp,
/* extract tlv data */
if (get_tlv_data(kc->tlv.p, tlv) < 0) {
dev_err(sdev->dev, "error: invalid TLV data\n");
- return -EINVAL;
+ ret = -EINVAL;
+ goto out_free;
}
/* set up volume table */
ret = set_up_volume_table(scontrol, tlv, le32_to_cpu(mc->max) + 1);
if (ret < 0) {
dev_err(sdev->dev, "error: setting up volume table\n");
- return ret;
+ goto out_free;
}
/* set default volume values to 0dB in control */
@@ -988,7 +993,7 @@ static int sof_control_load_volume(struct snd_soc_component *scomp,
cdata->chanv[i].value = VOL_ZERO_DB;
}
-out:
+skip:
/* set up possible led control from mixer private data */
ret = sof_parse_tokens(scomp, &scontrol->led_ctl, led_tokens,
ARRAY_SIZE(led_tokens), mc->priv.array,
@@ -996,13 +1001,21 @@ static int sof_control_load_volume(struct snd_soc_component *scomp,
if (ret != 0) {
dev_err(sdev->dev, "error: parse led tokens failed %d\n",
le32_to_cpu(mc->priv.size));
- return ret;
+ goto out_free_table;
}
dev_dbg(sdev->dev, "tplg: load kcontrol index %d chans %d\n",
scontrol->comp_id, scontrol->num_channels);
- return 0;
+ return ret;
+
+out_free_table:
+ if (le32_to_cpu(mc->max) > 1)
+ kfree(scontrol->volume_table);
+out_free:
+ kfree(scontrol->control_data);
+out:
+ return ret;
}
static int sof_control_load_enum(struct snd_soc_component *scomp,
@@ -1047,6 +1060,7 @@ static int sof_control_load_bytes(struct snd_soc_component *scomp,
container_of(hdr, struct snd_soc_tplg_bytes_control, hdr);
struct soc_bytes_ext *sbe = (struct soc_bytes_ext *)kc->private_value;
int max_size = sbe->max;
+ int ret = 0;
/* init the get/put bytes data */
scontrol->size = sizeof(struct sof_ipc_ctrl_data) +
@@ -1055,13 +1069,16 @@ static int sof_control_load_bytes(struct snd_soc_component *scomp,
if (scontrol->size > max_size) {
dev_err(sdev->dev, "err: bytes data size %d exceeds max %d.\n",
scontrol->size, max_size);
- return -EINVAL;
+ ret = -EINVAL;
+ goto out;
}
scontrol->control_data = kzalloc(max_size, GFP_KERNEL);
cdata = scontrol->control_data;
- if (!scontrol->control_data)
- return -ENOMEM;
+ if (!scontrol->control_data) {
+ ret = -ENOMEM;
+ goto out;
+ }
scontrol->comp_id = sdev->next_comp_id;
scontrol->cmd = SOF_CTRL_CMD_BINARY;
@@ -1076,23 +1093,32 @@ static int sof_control_load_bytes(struct snd_soc_component *scomp,
if (cdata->data->magic != SOF_ABI_MAGIC) {
dev_err(sdev->dev, "error: Wrong ABI magic 0x%08x.\n",
cdata->data->magic);
- return -EINVAL;
+ ret = -EINVAL;
+ goto out_free;
}
if (SOF_ABI_VERSION_INCOMPATIBLE(SOF_ABI_VERSION,
cdata->data->abi)) {
dev_err(sdev->dev,
"error: Incompatible ABI version 0x%08x.\n",
cdata->data->abi);
- return -EINVAL;
+ ret = -EINVAL;
+ goto out_free;
}
if (cdata->data->size + sizeof(const struct sof_abi_hdr) !=
le32_to_cpu(control->priv.size)) {
dev_err(sdev->dev,
"error: Conflict in bytes vs. priv size.\n");
- return -EINVAL;
+ ret = -EINVAL;
+ goto out_free;
}
}
- return 0;
+
+ return ret;
+
+out_free:
+ kfree(scontrol->control_data);
+out:
+ return ret;
}
/* external kcontrol init - used for any driver specific init */
@@ -1150,6 +1176,11 @@ static int sof_control_load(struct snd_soc_component *scomp, int index,
return 0;
}
+ if (ret < 0) {
+ kfree(scontrol);
+ return ret;
+ }
+
dobj->private = scontrol;
list_add(&scontrol->list, &sdev->kcontrol_list);
return ret;
--
2.20.1
2
1

12 Nov '19
Greetings,
I had the need to run alsa-info.sh --stdout from 1.1.9 on our embedded device.
There were multiple things I noticed:
-it requires /bin/bash, but seems to run ok with just /bin/sh. We don't have
bash.
-it requires pgrep, which we don't have, but replacing all calls with pidof
seems to work well enough
-it requires whereis, and does not use that
-at least in stdout mode the absence of lspci should not be a fatal error
Greetings
Eike
--
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055
emlix - smart embedded open source
2
1

[alsa-devel] [PATCH] ALSA: au88x0: Fix incorrect device pointer for preallocation
by Takashi Iwai 12 Nov '19
by Takashi Iwai 12 Nov '19
12 Nov '19
The code change in commit 6974f8ad4494 ("ALSA: pci: Avoid non-standard
macro usage") contained an incorrect conversion, which left the
invalid pointer passed to the allocator for au88x0 driver. Fix it.
Fixes: 6974f8ad4494 ("ALSA: pci: Avoid non-standard macro usage")
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
---
sound/pci/au88x0/au88x0_pcm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/au88x0/au88x0_pcm.c b/sound/pci/au88x0/au88x0_pcm.c
index 1012e8da29e7..a2dcf43beedf 100644
--- a/sound/pci/au88x0/au88x0_pcm.c
+++ b/sound/pci/au88x0/au88x0_pcm.c
@@ -637,7 +637,7 @@ static int snd_vortex_new_pcm(vortex_t *chip, int idx, int nr)
/* pre-allocation of Scatter-Gather buffers */
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
- &chip->pci_dev,
+ &chip->pci_dev->dev,
0x10000, 0x10000);
switch (VORTEX_PCM_TYPE(pcm)) {
--
2.16.4
1
0
Hello,
syzbot found the following crash on:
HEAD commit: 6980b7f6 Add linux-next specific files for 20191111
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=101679e6e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=2af7db1972ec750e
dashboard link: https://syzkaller.appspot.com/bug?extid=4476917c053f60112c99
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=108fbfece00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1055d5aae00000
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+4476917c053f60112c99(a)syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in __list_add_valid+0x9a/0xa0 lib/list_debug.c:26
Read of size 8 at addr ffff88809fccee78 by task syz-executor075/8825
CPU: 0 PID: 8825 Comm: syz-executor075 Not tainted 5.4.0-rc6-next-20191111
#0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x197/0x210 lib/dump_stack.c:118
print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374
__kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506
kasan_report+0x12/0x20 mm/kasan/common.c:634
__asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132
__list_add_valid+0x9a/0xa0 lib/list_debug.c:26
__list_add include/linux/list.h:60 [inline]
list_add_tail include/linux/list.h:93 [inline]
snd_timer_open+0x245/0x1150 sound/core/timer.c:268
snd_timer_user_tselect sound/core/timer.c:1738 [inline]
__snd_timer_user_ioctl.isra.0+0x7ed/0x2070 sound/core/timer.c:2008
snd_timer_user_ioctl+0x7a/0xa7 sound/core/timer.c:2038
vfs_ioctl fs/ioctl.c:47 [inline]
file_ioctl fs/ioctl.c:545 [inline]
do_vfs_ioctl+0x977/0x14e0 fs/ioctl.c:732
ksys_ioctl+0xab/0xd0 fs/ioctl.c:749
__do_sys_ioctl fs/ioctl.c:756 [inline]
__se_sys_ioctl fs/ioctl.c:754 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:754
do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x444f39
Code: e8 fc ab 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff
ff 0f 83 bb cd fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffd1d1e3c98 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444f39
RDX: 0000000020029fcc RSI: 0000000040345410 RDI: 0000000000000003
RBP: 00000000000102a7 R08: 0000000000000004 R09: 00000000004002e0
R10: 000000000000000f R11: 0000000000000246 R12: 0000000000402180
R13: 0000000000402210 R14: 0000000000000000 R15: 0000000000000000
Allocated by task 8824:
save_stack+0x23/0x90 mm/kasan/common.c:69
set_track mm/kasan/common.c:77 [inline]
__kasan_kmalloc mm/kasan/common.c:510 [inline]
__kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:483
kasan_kmalloc+0x9/0x10 mm/kasan/common.c:524
kmem_cache_alloc_trace+0x158/0x790 mm/slab.c:3551
kmalloc include/linux/slab.h:556 [inline]
kzalloc include/linux/slab.h:670 [inline]
snd_timer_instance_new+0x4a/0x300 sound/core/timer.c:96
snd_timer_user_tselect sound/core/timer.c:1725 [inline]
__snd_timer_user_ioctl.isra.0+0x665/0x2070 sound/core/timer.c:2008
snd_timer_user_ioctl+0x7a/0xa7 sound/core/timer.c:2038
vfs_ioctl fs/ioctl.c:47 [inline]
file_ioctl fs/ioctl.c:545 [inline]
do_vfs_ioctl+0x977/0x14e0 fs/ioctl.c:732
ksys_ioctl+0xab/0xd0 fs/ioctl.c:749
__do_sys_ioctl fs/ioctl.c:756 [inline]
__se_sys_ioctl fs/ioctl.c:754 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:754
do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 8824:
save_stack+0x23/0x90 mm/kasan/common.c:69
set_track mm/kasan/common.c:77 [inline]
kasan_set_free_info mm/kasan/common.c:332 [inline]
__kasan_slab_free+0x102/0x150 mm/kasan/common.c:471
kasan_slab_free+0xe/0x10 mm/kasan/common.c:480
__cache_free mm/slab.c:3426 [inline]
kfree+0x10a/0x2c0 mm/slab.c:3757
snd_timer_instance_free sound/core/timer.c:120 [inline]
snd_timer_instance_free+0x7c/0xa0 sound/core/timer.c:114
snd_timer_user_tselect sound/core/timer.c:1740 [inline]
__snd_timer_user_ioctl.isra.0+0x160d/0x2070 sound/core/timer.c:2008
snd_timer_user_ioctl+0x7a/0xa7 sound/core/timer.c:2038
vfs_ioctl fs/ioctl.c:47 [inline]
file_ioctl fs/ioctl.c:545 [inline]
do_vfs_ioctl+0x977/0x14e0 fs/ioctl.c:732
ksys_ioctl+0xab/0xd0 fs/ioctl.c:749
__do_sys_ioctl fs/ioctl.c:756 [inline]
__se_sys_ioctl fs/ioctl.c:754 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:754
do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
The buggy address belongs to the object at ffff88809fccee00
which belongs to the cache kmalloc-256 of size 256
The buggy address is located 120 bytes inside of
256-byte region [ffff88809fccee00, ffff88809fccef00)
The buggy address belongs to the page:
page:ffffea00027f3380 refcount:1 mapcount:0 mapping:ffff8880aa4008c0
index:0x0
flags: 0x1fffc0000000200(slab)
raw: 01fffc0000000200 ffffea00027f2e08 ffff8880aa401648 ffff8880aa4008c0
raw: 0000000000000000 ffff88809fcce000 0000000100000008 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff88809fcced00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88809fcced80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
> ffff88809fccee00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88809fccee80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88809fccef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller(a)googlegroups.com.
syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches
1
1

11 Nov '19
The headphone jack on buddy was broken with the following commit:
commit 6b5da66322c5 ("ASoC: rt5645: read jd1_1 status for jd
detection").
This changes the jd_mode for buddy to 4 so buddy can read from the same
register that was used in the working version of this driver without
affecting any other devices that might use this, since no other device uses
jd_mode = 4. To test this I plugged and uplugged the headphone jack, verifying
audio works.
Signed-off-by: Jacob Rasmussen <jacobraz(a)google.com>
---
sound/soc/codecs/rt5645.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index a15e4ecd2a24..046f339a9f00 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3270,6 +3270,9 @@ static void rt5645_jack_detect_work(struct work_struct *work)
snd_soc_jack_report(rt5645->mic_jack,
report, SND_JACK_MICROPHONE);
return;
+ case 4:
+ val = snd_soc_component_read32(rt5645->component, RT5645_A_JD_CTRL1) & 0x002;
+ break;
default: /* read rt5645 jd1_1 status */
val = snd_soc_component_read32(rt5645->component, RT5645_INT_IRQ_ST) & 0x1000;
break;
@@ -3603,7 +3606,7 @@ static const struct rt5645_platform_data intel_braswell_platform_data = {
static const struct rt5645_platform_data buddy_platform_data = {
.dmic1_data_pin = RT5645_DMIC_DATA_GPIO5,
.dmic2_data_pin = RT5645_DMIC_DATA_IN2P,
- .jd_mode = 3,
+ .jd_mode = 4,
.level_trigger_irq = true,
};
@@ -4012,6 +4015,7 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
RT5645_JD1_MODE_1);
break;
case 3:
+ case 4:
regmap_update_bits(rt5645->regmap, RT5645_A_JD_CTRL1,
RT5645_JD1_MODE_MASK,
RT5645_JD1_MODE_2);
--
2.24.0.432.g9d3f5f5b63-goog
3
3

[alsa-devel] Applied "ASoC: rt5645: Fixed buddy jack support." to the asoc tree
by Mark Brown 11 Nov '19
by Mark Brown 11 Nov '19
11 Nov '19
The patch
ASoC: rt5645: Fixed buddy jack support.
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From e7cfd867fd9842f346688f28412eb83dec342900 Mon Sep 17 00:00:00 2001
From: Jacob Rasmussen <jacobraz(a)chromium.org>
Date: Mon, 11 Nov 2019 11:59:57 -0700
Subject: [PATCH] ASoC: rt5645: Fixed buddy jack support.
The headphone jack on buddy was broken with the following commit:
commit 6b5da66322c5 ("ASoC: rt5645: read jd1_1 status for jd
detection").
This changes the jd_mode for buddy to 4 so buddy can read from the same
register that was used in the working version of this driver without
affecting any other devices that might use this, since no other device uses
jd_mode = 4. To test this I plugged and uplugged the headphone jack, verifying
audio works.
Signed-off-by: Jacob Rasmussen <jacobraz(a)google.com>
Reviewed-by: Ross Zwisler <zwisler(a)google.com>
Link: https://lore.kernel.org/r/20191111185957.217244-1-jacobraz@google.com
Signed-off-by: Mark Brown <broonie(a)kernel.org>
Cc: stable(a)vger.kernel.org
---
sound/soc/codecs/rt5645.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 1c06b3b9218c..902ac98a3fbe 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3270,6 +3270,9 @@ static void rt5645_jack_detect_work(struct work_struct *work)
snd_soc_jack_report(rt5645->mic_jack,
report, SND_JACK_MICROPHONE);
return;
+ case 4:
+ val = snd_soc_component_read32(rt5645->component, RT5645_A_JD_CTRL1) & 0x002;
+ break;
default: /* read rt5645 jd1_1 status */
val = snd_soc_component_read32(rt5645->component, RT5645_INT_IRQ_ST) & 0x1000;
break;
@@ -3603,7 +3606,7 @@ static const struct rt5645_platform_data intel_braswell_platform_data = {
static const struct rt5645_platform_data buddy_platform_data = {
.dmic1_data_pin = RT5645_DMIC_DATA_GPIO5,
.dmic2_data_pin = RT5645_DMIC_DATA_IN2P,
- .jd_mode = 3,
+ .jd_mode = 4,
.level_trigger_irq = true,
};
@@ -3999,6 +4002,7 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
RT5645_JD1_MODE_1);
break;
case 3:
+ case 4:
regmap_update_bits(rt5645->regmap, RT5645_A_JD_CTRL1,
RT5645_JD1_MODE_MASK,
RT5645_JD1_MODE_2);
--
2.20.1
1
0

11 Nov '19
A silly mistake was made while applying the fix for potential races in
commit 6a34367e52ca ("ALSA: timer: Fix possible race at assigning a
timer instance"): when a slave PCM is opened and succeeds, it doesn't
return but proceeds to the master timer open code instead. Plug the
hole and beautify a bit.
Fixes: 6a34367e52ca ("ALSA: timer: Fix possible race at assigning a timer instance")
Reported-by: syzbot+4476917c053f60112c99(a)syzkaller.appspotmail.com
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
---
sound/core/timer.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 9091030f4a89..24fed5c78273 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -268,8 +268,7 @@ int snd_timer_open(struct snd_timer_instance *timeri,
list_add_tail(&timeri->open_list, &snd_timer_slave_list);
num_slaves++;
err = snd_timer_check_slave(timeri);
- if (err < 0)
- goto close;
+ goto list_added;
}
/* open a master instance */
@@ -324,7 +323,7 @@ int snd_timer_open(struct snd_timer_instance *timeri,
list_add_tail(&timeri->open_list, &timer->open_list_head);
timer->num_instances++;
err = snd_timer_check_master(timeri);
- close:
+list_added:
if (err < 0)
snd_timer_close_locked(timeri, &card_dev_to_put);
--
2.16.4
1
0

[alsa-devel] [RESEND PATCH v4 1/6] ASoC: amd:Create multiple I2S platform device Endpoint
by Ravulapati Vishnu vardhan rao 11 Nov '19
by Ravulapati Vishnu vardhan rao 11 Nov '19
11 Nov '19
Creates Platform Device endpoints for multiple
I2S instances: SP and BT endpoints device.
Pass PCI resources like MMIO, irq to the platform devices.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x.h | 5 +++
sound/soc/amd/raven/pci-acp3x.c | 78 +++++++++++++++++++++++++++++------------
2 files changed, 60 insertions(+), 23 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 4f2cadd..2f15fe1 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,10 +7,15 @@
#include "chip_offset_byte.h"
+#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
#define ACP3x_REG_START 0x1240000
#define ACP3x_REG_END 0x1250200
+#define ACP3x_I2STDM_REG_START 0x1242400
+#define ACP3x_I2STDM_REG_END 0x1242410
+#define ACP3x_BT_TDM_REG_START 0x1242800
+#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index facec24..fe37160c 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -16,16 +16,16 @@ struct acp3x_dev_data {
void __iomem *acp3x_base;
bool acp3x_audio_mode;
struct resource *res;
- struct platform_device *pdev;
+ struct platform_device *pdev[ACP3x_DEVS];
};
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
int ret;
- u32 addr, val;
+ u32 addr, val, i;
struct acp3x_dev_data *adata;
- struct platform_device_info pdevinfo;
+ struct platform_device_info pdevinfo[ACP3x_DEVS];
unsigned int irqflags;
if (pci_enable_device(pci)) {
@@ -68,7 +68,7 @@ static int snd_acp3x_probe(struct pci_dev *pci,
switch (val) {
case I2S_MODE:
adata->res = devm_kzalloc(&pci->dev,
- sizeof(struct resource) * 2,
+ sizeof(struct resource) * 4,
GFP_KERNEL);
if (!adata->res) {
ret = -ENOMEM;
@@ -80,28 +80,52 @@ static int snd_acp3x_probe(struct pci_dev *pci,
adata->res[0].start = addr;
adata->res[0].end = addr + (ACP3x_REG_END - ACP3x_REG_START);
- adata->res[1].name = "acp3x_i2s_irq";
- adata->res[1].flags = IORESOURCE_IRQ;
- adata->res[1].start = pci->irq;
- adata->res[1].end = pci->irq;
+ adata->res[1].name = "acp3x_i2s_sp";
+ adata->res[1].flags = IORESOURCE_MEM;
+ adata->res[1].start = addr + ACP3x_I2STDM_REG_START;
+ adata->res[1].end = addr + ACP3x_I2STDM_REG_END;
+
+ adata->res[2].name = "acp3x_i2s_bt";
+ adata->res[2].flags = IORESOURCE_MEM;
+ adata->res[2].start = addr + ACP3x_BT_TDM_REG_START;
+ adata->res[2].end = addr + ACP3x_BT_TDM_REG_END;
+
+ adata->res[3].name = "acp3x_i2s_irq";
+ adata->res[3].flags = IORESOURCE_IRQ;
+ adata->res[3].start = pci->irq;
+ adata->res[3].end = adata->res[3].start;
adata->acp3x_audio_mode = ACP3x_I2S_MODE;
memset(&pdevinfo, 0, sizeof(pdevinfo));
- pdevinfo.name = "acp3x_rv_i2s";
- pdevinfo.id = 0;
- pdevinfo.parent = &pci->dev;
- pdevinfo.num_res = 2;
- pdevinfo.res = adata->res;
- pdevinfo.data = &irqflags;
- pdevinfo.size_data = sizeof(irqflags);
-
- adata->pdev = platform_device_register_full(&pdevinfo);
- if (IS_ERR(adata->pdev)) {
- dev_err(&pci->dev, "cannot register %s device\n",
- pdevinfo.name);
- ret = PTR_ERR(adata->pdev);
- goto unmap_mmio;
+ pdevinfo[0].name = "acp3x_rv_i2s_dma";
+ pdevinfo[0].id = 0;
+ pdevinfo[0].parent = &pci->dev;
+ pdevinfo[0].num_res = 4;
+ pdevinfo[0].res = &adata->res[0];
+ pdevinfo[0].data = &irqflags;
+ pdevinfo[0].size_data = sizeof(irqflags);
+
+ pdevinfo[1].name = "acp3x_i2s_playcap";
+ pdevinfo[1].id = 0;
+ pdevinfo[1].parent = &pci->dev;
+ pdevinfo[1].num_res = 1;
+ pdevinfo[1].res = &adata->res[1];
+
+ pdevinfo[2].name = "acp3x_i2s_playcap";
+ pdevinfo[2].id = 1;
+ pdevinfo[2].parent = &pci->dev;
+ pdevinfo[2].num_res = 1;
+ pdevinfo[2].res = &adata->res[2];
+ for (i = 0; i < ACP3x_DEVS ; i++) {
+ adata->pdev[i] =
+ platform_device_register_full(&pdevinfo[i]);
+ IS_ERR(adata->pdev[i]) {
+ dev_err(&pci->dev, "cannot register %s device\n",
+ pdevinfo[i].name);
+ ret = -ENODEV;
+ goto unmap_mmio;
+ }
}
break;
default:
@@ -113,6 +137,9 @@ static int snd_acp3x_probe(struct pci_dev *pci,
unmap_mmio:
pci_disable_msi(pci);
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+ kfree(adata->res);
iounmap(adata->acp3x_base);
release_regions:
pci_release_regions(pci);
@@ -124,9 +151,13 @@ static int snd_acp3x_probe(struct pci_dev *pci,
static void snd_acp3x_remove(struct pci_dev *pci)
{
+ int i;
struct acp3x_dev_data *adata = pci_get_drvdata(pci);
- platform_device_unregister(adata->pdev);
+ if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+ }
iounmap(adata->acp3x_base);
pci_disable_msi(pci);
@@ -151,6 +182,7 @@ static struct pci_driver acp3x_driver = {
module_pci_driver(acp3x_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_DESCRIPTION("AMD ACP3x PCI driver");
MODULE_LICENSE("GPL v2");
--
2.7.4
4
3

11 Nov '19
Hello,
syzbot found the following crash on:
HEAD commit: 6980b7f6 Add linux-next specific files for 20191111
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=1658f9fce00000
kernel config: https://syzkaller.appspot.com/x/.config?x=2af7db1972ec750e
dashboard link: https://syzkaller.appspot.com/bug?extid=5ab7470f121c0165470f
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
Unfortunately, I don't have any reproducer for this crash yet.
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+5ab7470f121c0165470f(a)syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in __list_add_valid+0x9a/0xa0 lib/list_debug.c:26
Read of size 8 at addr ffff888095ac8078 by task syz-executor.0/4457
CPU: 1 PID: 4457 Comm: syz-executor.0 Not tainted 5.4.0-rc6-next-20191111 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x197/0x210 lib/dump_stack.c:118
print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374
__kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506
kasan_report+0x12/0x20 mm/kasan/common.c:634
__asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132
__list_add_valid+0x9a/0xa0 lib/list_debug.c:26
__list_add include/linux/list.h:60 [inline]
list_add_tail include/linux/list.h:93 [inline]
list_move_tail include/linux/list.h:214 [inline]
check_matching_master_slave.part.0+0x116/0x550 sound/core/timer.c:179
check_matching_master_slave sound/core/timer.c:177 [inline]
snd_timer_check_slave sound/core/timer.c:207 [inline]
snd_timer_open+0x466/0x1150 sound/core/timer.c:270
snd_timer_user_tselect sound/core/timer.c:1738 [inline]
__snd_timer_user_ioctl.isra.0+0x7ed/0x2070 sound/core/timer.c:2008
snd_timer_user_ioctl+0x7a/0xa7 sound/core/timer.c:2038
vfs_ioctl fs/ioctl.c:47 [inline]
file_ioctl fs/ioctl.c:545 [inline]
do_vfs_ioctl+0x977/0x14e0 fs/ioctl.c:732
ksys_ioctl+0xab/0xd0 fs/ioctl.c:749
__do_sys_ioctl fs/ioctl.c:756 [inline]
__se_sys_ioctl fs/ioctl.c:754 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:754
do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45a219
Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff
ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f41e77d2c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a219
RDX: 0000000020029fcc RSI: 0000000040345410 RDI: 0000000000000003
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f41e77d36d4
R13: 00000000004cf428 R14: 00000000004d9760 R15: 00000000ffffffff
Allocated by task 4339:
save_stack+0x23/0x90 mm/kasan/common.c:69
set_track mm/kasan/common.c:77 [inline]
__kasan_kmalloc mm/kasan/common.c:510 [inline]
__kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:483
kasan_kmalloc+0x9/0x10 mm/kasan/common.c:524
kmem_cache_alloc_trace+0x158/0x790 mm/slab.c:3551
kmalloc include/linux/slab.h:556 [inline]
kzalloc include/linux/slab.h:670 [inline]
snd_timer_instance_new+0x4a/0x300 sound/core/timer.c:96
snd_timer_user_tselect sound/core/timer.c:1725 [inline]
__snd_timer_user_ioctl.isra.0+0x665/0x2070 sound/core/timer.c:2008
snd_timer_user_ioctl+0x7a/0xa7 sound/core/timer.c:2038
vfs_ioctl fs/ioctl.c:47 [inline]
file_ioctl fs/ioctl.c:545 [inline]
do_vfs_ioctl+0x977/0x14e0 fs/ioctl.c:732
ksys_ioctl+0xab/0xd0 fs/ioctl.c:749
__do_sys_ioctl fs/ioctl.c:756 [inline]
__se_sys_ioctl fs/ioctl.c:754 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:754
do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 4339:
save_stack+0x23/0x90 mm/kasan/common.c:69
set_track mm/kasan/common.c:77 [inline]
kasan_set_free_info mm/kasan/common.c:332 [inline]
__kasan_slab_free+0x102/0x150 mm/kasan/common.c:471
kasan_slab_free+0xe/0x10 mm/kasan/common.c:480
__cache_free mm/slab.c:3426 [inline]
kfree+0x10a/0x2c0 mm/slab.c:3757
snd_timer_instance_free sound/core/timer.c:120 [inline]
snd_timer_instance_free+0x7c/0xa0 sound/core/timer.c:114
snd_timer_user_tselect sound/core/timer.c:1740 [inline]
__snd_timer_user_ioctl.isra.0+0x160d/0x2070 sound/core/timer.c:2008
snd_timer_user_ioctl+0x7a/0xa7 sound/core/timer.c:2038
vfs_ioctl fs/ioctl.c:47 [inline]
file_ioctl fs/ioctl.c:545 [inline]
do_vfs_ioctl+0x977/0x14e0 fs/ioctl.c:732
ksys_ioctl+0xab/0xd0 fs/ioctl.c:749
__do_sys_ioctl fs/ioctl.c:756 [inline]
__se_sys_ioctl fs/ioctl.c:754 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:754
do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
The buggy address belongs to the object at ffff888095ac8000
which belongs to the cache kmalloc-256 of size 256
The buggy address is located 120 bytes inside of
256-byte region [ffff888095ac8000, ffff888095ac8100)
The buggy address belongs to the page:
page:ffffea000256b200 refcount:1 mapcount:0 mapping:ffff8880aa4008c0
index:0xffff888095ac8c00
flags: 0x1fffc0000000200(slab)
raw: 01fffc0000000200 ffffea0001815608 ffffea0001eb9308 ffff8880aa4008c0
raw: ffff888095ac8c00 ffff888095ac8000 0000000100000005 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff888095ac7f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888095ac7f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> ffff888095ac8000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888095ac8080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888095ac8100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller(a)googlegroups.com.
syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
1
0
Hello,
syzbot found the following crash on:
HEAD commit: 6980b7f6 Add linux-next specific files for 20191111
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=149fae72e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=2af7db1972ec750e
dashboard link: https://syzkaller.appspot.com/bug?extid=7a0ab45b9c1dc81c9e6b
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
Unfortunately, I don't have any reproducer for this crash yet.
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+7a0ab45b9c1dc81c9e6b(a)syzkaller.appspotmail.com
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 26749 Comm: syz-executor.4 Not tainted 5.4.0-rc6-next-20191111
#0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:snd_timer_check_master sound/core/timer.c:228 [inline]
RIP: 0010:snd_timer_open+0x943/0x1150 sound/core/timer.c:326
Code: 48 89 85 58 ff ff ff 4c 89 f0 48 c1 e8 03 4c 01 e8 48 89 85 50 ff ff
ff eb 36 e8 38 1e ee fb 48 8d 7b 78 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00
0f 85 f4 05 00 00 48 8b 43 78 49 89 dc 48 83 e8 78
RSP: 0018:ffff888057d978f8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffffffffffffff88 RCX: ffffc9000e7ad000
RDX: 0000000000007655 RSI: ffffffff85855cd8 RDI: 0000000000000000
RBP: ffff888057d979c0 R08: ffff8880a180c240 R09: ffff8880a1b0f008
R10: ffffed1014361e08 R11: ffff8880a1b0f047 R12: ffff8880a8f40000
R13: dffffc0000000000 R14: ffff888097688600 R15: ffffffff00000002
FS: 00007f1c13a0a700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000075c000 CR3: 000000009f897000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
snd_seq_timer_open+0x27f/0x590 sound/core/seq/seq_timer.c:281
queue_use+0xf1/0x270 sound/core/seq/seq_queue.c:489
snd_seq_queue_alloc+0x2c5/0x4d0 sound/core/seq/seq_queue.c:176
snd_seq_ioctl_create_queue+0xb0/0x330 sound/core/seq/seq_clientmgr.c:1548
snd_seq_ioctl+0x21e/0x3e0 sound/core/seq/seq_clientmgr.c:2157
vfs_ioctl fs/ioctl.c:47 [inline]
file_ioctl fs/ioctl.c:545 [inline]
do_vfs_ioctl+0x977/0x14e0 fs/ioctl.c:732
ksys_ioctl+0xab/0xd0 fs/ioctl.c:749
__do_sys_ioctl fs/ioctl.c:756 [inline]
__se_sys_ioctl fs/ioctl.c:754 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:754
do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45a219
Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff
ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f1c13a09c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a219
RDX: 00000000200001c0 RSI: 00000000c08c5332 RDI: 0000000000000004
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f1c13a0a6d4
R13: 00000000004ceed0 R14: 00000000004d93d0 R15: 00000000ffffffff
Modules linked in:
---[ end trace fd34b5665372895c ]---
RIP: 0010:snd_timer_check_master sound/core/timer.c:228 [inline]
RIP: 0010:snd_timer_open+0x943/0x1150 sound/core/timer.c:326
Code: 48 89 85 58 ff ff ff 4c 89 f0 48 c1 e8 03 4c 01 e8 48 89 85 50 ff ff
ff eb 36 e8 38 1e ee fb 48 8d 7b 78 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00
0f 85 f4 05 00 00 48 8b 43 78 49 89 dc 48 83 e8 78
RSP: 0018:ffff888057d978f8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffffffffffffff88 RCX: ffffc9000e7ad000
RDX: 0000000000007655 RSI: ffffffff85855cd8 RDI: 0000000000000000
RBP: ffff888057d979c0 R08: ffff8880a180c240 R09: ffff8880a1b0f008
R10: ffffed1014361e08 R11: ffff8880a1b0f047 R12: ffff8880a8f40000
R13: dffffc0000000000 R14: ffff888097688600 R15: ffffffff00000002
FS: 00007f1c13a0a700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f750abec110 CR3: 000000009f897000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller(a)googlegroups.com.
syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
1
0
Hello,
syzbot found the following crash on:
HEAD commit: 6980b7f6 Add linux-next specific files for 20191111
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=16a82b9ae00000
kernel config: https://syzkaller.appspot.com/x/.config?x=2af7db1972ec750e
dashboard link: https://syzkaller.appspot.com/bug?extid=4a89123a06517944d4c1
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
Unfortunately, I don't have any reproducer for this crash yet.
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+4a89123a06517944d4c1(a)syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in snd_timer_close_locked+0xb5f/0xbd0
sound/core/timer.c:380
Read of size 8 at addr ffff8880a906be78 by task syz-executor.4/9580
CPU: 1 PID: 9580 Comm: syz-executor.4 Not tainted 5.4.0-rc6-next-20191111 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x197/0x210 lib/dump_stack.c:118
print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374
__kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506
kasan_report+0x12/0x20 mm/kasan/common.c:634
__asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132
snd_timer_close_locked+0xb5f/0xbd0 sound/core/timer.c:380
snd_timer_close+0x88/0xf0 sound/core/timer.c:418
snd_seq_timer_close+0x91/0xe0 sound/core/seq/seq_timer.c:318
queue_delete+0x52/0xb0 sound/core/seq/seq_queue.c:134
snd_seq_queue_delete+0x4e/0x70 sound/core/seq/seq_queue.c:196
snd_seq_ioctl_delete_queue+0x6a/0x90 sound/core/seq/seq_clientmgr.c:1570
snd_seq_kernel_client_ctl+0xf8/0x140 sound/core/seq/seq_clientmgr.c:2353
delete_seq_queue.part.0+0xb6/0x120 sound/core/seq/oss/seq_oss_init.c:376
delete_seq_queue sound/core/seq/oss/seq_oss_init.c:372 [inline]
snd_seq_oss_release+0x116/0x150 sound/core/seq/oss/seq_oss_init.c:421
odev_release+0x54/0x80 sound/core/seq/oss/seq_oss.c:140
__fput+0x2ff/0x890 fs/file_table.c:280
____fput+0x16/0x20 fs/file_table.c:313
task_work_run+0x145/0x1c0 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:188 [inline]
exit_to_usermode_loop+0x316/0x380 arch/x86/entry/common.c:163
prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline]
syscall_return_slowpath arch/x86/entry/common.c:274 [inline]
do_syscall_64+0x65f/0x760 arch/x86/entry/common.c:300
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x413db1
Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 04 1b 00 00 c3 48
83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48
89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01
RSP: 002b:00007fffcff8b860 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 0000000000413db1
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 0000000000000001 R08: 00000000ca6eb3e2 R09: 00000000ca6eb3e6
R10: 00007fffcff8b940 R11: 0000000000000293 R12: 000000000075bf20
R13: 00000000000361f0 R14: 00000000007607e0 R15: 000000000075bf2c
Allocated by task 9581:
save_stack+0x23/0x90 mm/kasan/common.c:69
set_track mm/kasan/common.c:77 [inline]
__kasan_kmalloc mm/kasan/common.c:510 [inline]
__kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:483
kasan_kmalloc+0x9/0x10 mm/kasan/common.c:524
kmem_cache_alloc_trace+0x158/0x790 mm/slab.c:3551
kmalloc include/linux/slab.h:556 [inline]
kzalloc include/linux/slab.h:670 [inline]
snd_timer_instance_new+0x4a/0x300 sound/core/timer.c:96
snd_timer_user_tselect sound/core/timer.c:1725 [inline]
__snd_timer_user_ioctl.isra.0+0x665/0x2070 sound/core/timer.c:2008
snd_timer_user_ioctl+0x7a/0xa7 sound/core/timer.c:2038
vfs_ioctl fs/ioctl.c:47 [inline]
file_ioctl fs/ioctl.c:545 [inline]
do_vfs_ioctl+0x977/0x14e0 fs/ioctl.c:732
ksys_ioctl+0xab/0xd0 fs/ioctl.c:749
__do_sys_ioctl fs/ioctl.c:756 [inline]
__se_sys_ioctl fs/ioctl.c:754 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:754
do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 9581:
save_stack+0x23/0x90 mm/kasan/common.c:69
set_track mm/kasan/common.c:77 [inline]
kasan_set_free_info mm/kasan/common.c:332 [inline]
__kasan_slab_free+0x102/0x150 mm/kasan/common.c:471
kasan_slab_free+0xe/0x10 mm/kasan/common.c:480
__cache_free mm/slab.c:3426 [inline]
kfree+0x10a/0x2c0 mm/slab.c:3757
snd_timer_instance_free sound/core/timer.c:120 [inline]
snd_timer_instance_free+0x7c/0xa0 sound/core/timer.c:114
snd_timer_user_tselect sound/core/timer.c:1740 [inline]
__snd_timer_user_ioctl.isra.0+0x160d/0x2070 sound/core/timer.c:2008
snd_timer_user_ioctl+0x7a/0xa7 sound/core/timer.c:2038
vfs_ioctl fs/ioctl.c:47 [inline]
file_ioctl fs/ioctl.c:545 [inline]
do_vfs_ioctl+0x977/0x14e0 fs/ioctl.c:732
ksys_ioctl+0xab/0xd0 fs/ioctl.c:749
__do_sys_ioctl fs/ioctl.c:756 [inline]
__se_sys_ioctl fs/ioctl.c:754 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:754
do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
The buggy address belongs to the object at ffff8880a906be00
which belongs to the cache kmalloc-256 of size 256
The buggy address is located 120 bytes inside of
256-byte region [ffff8880a906be00, ffff8880a906bf00)
The buggy address belongs to the page:
page:ffffea0002a41ac0 refcount:1 mapcount:0 mapping:ffff8880aa4008c0
index:0x0
flags: 0x1fffc0000000200(slab)
raw: 01fffc0000000200 ffffea00025db908 ffff8880aa401648 ffff8880aa4008c0
raw: 0000000000000000 ffff8880a906b000 0000000100000008 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8880a906bd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880a906bd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
> ffff8880a906be00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880a906be80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880a906bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller(a)googlegroups.com.
syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
1
0

[alsa-devel] [PATCH v2] ASoC: wm8904: configure sysclk/FLL automatically
by Michael Walle 11 Nov '19
by Michael Walle 11 Nov '19
11 Nov '19
This adds a new mode WM8904_CLK_AUTO which automatically enables the FLL
if a frequency different than the MCLK is set.
These additions make the codec work with the simple-card driver in
general and especially in systems where the MCLK doesn't match the
required clock.
Signed-off-by: Michael Walle <michael(a)walle.cc>
---
changes since v1:
- replaced second clk_get_rate() with mclk_freq
Please note that the v1 patch might still be pending for moderator
approval.
sound/soc/codecs/wm8904.c | 72 ++++++++++++++++++++++++---------------
sound/soc/codecs/wm8904.h | 1 +
2 files changed, 45 insertions(+), 28 deletions(-)
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
index bcb3c9d5abf0..2a7d23a5daa8 100644
--- a/sound/soc/codecs/wm8904.c
+++ b/sound/soc/codecs/wm8904.c
@@ -1410,34 +1410,6 @@ static int wm8904_hw_params(struct snd_pcm_substream *substream,
return 0;
}
-
-static int wm8904_set_sysclk(struct snd_soc_dai *dai, int clk_id,
- unsigned int freq, int dir)
-{
- struct snd_soc_component *component = dai->component;
- struct wm8904_priv *priv = snd_soc_component_get_drvdata(component);
-
- switch (clk_id) {
- case WM8904_CLK_MCLK:
- priv->sysclk_src = clk_id;
- priv->mclk_rate = freq;
- break;
-
- case WM8904_CLK_FLL:
- priv->sysclk_src = clk_id;
- break;
-
- default:
- return -EINVAL;
- }
-
- dev_dbg(dai->dev, "Clock source is %d at %uHz\n", clk_id, freq);
-
- wm8904_configure_clocking(component);
-
- return 0;
-}
-
static int wm8904_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{
struct snd_soc_component *component = dai->component;
@@ -1824,6 +1796,50 @@ static int wm8904_set_fll(struct snd_soc_dai *dai, int fll_id, int source,
return 0;
}
+static int wm8904_set_sysclk(struct snd_soc_dai *dai, int clk_id,
+ unsigned int freq, int dir)
+{
+ struct snd_soc_component *component = dai->component;
+ struct wm8904_priv *priv = snd_soc_component_get_drvdata(component);
+ unsigned long mclk_freq;
+ int ret;
+
+ switch (clk_id) {
+ case WM8904_CLK_AUTO:
+ mclk_freq = clk_get_rate(priv->mclk);
+ /* enable FLL if a different sysclk is desired */
+ if (mclk_freq != freq) {
+ priv->sysclk_src = WM8904_CLK_FLL;
+ ret = wm8904_set_fll(dai, WM8904_FLL_MCLK,
+ WM8904_FLL_MCLK,
+ mclk_freq, freq);
+ if (ret)
+ return ret;
+ break;
+ }
+ clk_id = WM8904_CLK_MCLK;
+ /* fallthrough */
+
+ case WM8904_CLK_MCLK:
+ priv->sysclk_src = clk_id;
+ priv->mclk_rate = freq;
+ break;
+
+ case WM8904_CLK_FLL:
+ priv->sysclk_src = clk_id;
+ break;
+
+ default:
+ return -EINVAL;
+ }
+
+ dev_dbg(dai->dev, "Clock source is %d at %uHz\n", clk_id, freq);
+
+ wm8904_configure_clocking(component);
+
+ return 0;
+}
+
static int wm8904_digital_mute(struct snd_soc_dai *codec_dai, int mute)
{
struct snd_soc_component *component = codec_dai->component;
diff --git a/sound/soc/codecs/wm8904.h b/sound/soc/codecs/wm8904.h
index c1bca52f9927..de6340446b1f 100644
--- a/sound/soc/codecs/wm8904.h
+++ b/sound/soc/codecs/wm8904.h
@@ -10,6 +10,7 @@
#ifndef _WM8904_H
#define _WM8904_H
+#define WM8904_CLK_AUTO 0
#define WM8904_CLK_MCLK 1
#define WM8904_CLK_FLL 2
--
2.20.1
2
1

[alsa-devel] [PATCH v2] ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint
by Yu-Hsuan Hsu 11 Nov '19
by Yu-Hsuan Hsu 11 Nov '19
11 Nov '19
On KBL platform, the microphone is attached to external codec(rt5514)
instead of PCH. However, TDM slot between PCH and codec is 16 bits only.
In order to avoid setting wrong format, we should add a constraint to
force to use 16 bits format forever.
Signed-off-by: Yu-Hsuan Hsu <yuhsuan(a)chromium.org>
---
I have updated the commit message. Please see whether it is clear
enough. Thanks.
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
index 74dda8784f1a01..67b276a65a8d2d 100644
--- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
@@ -400,6 +400,9 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
dmic_constraints);
+ runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE;
+ snd_pcm_hw_constraint_msbits(runtime, 0, 16, 16);
+
return snd_pcm_hw_constraint_list(substream->runtime, 0,
SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
}
--
2.23.0.351.gc4317032e6-goog
2
2

[alsa-devel] [PATCH v4 6/6] ASoC: amd: Added ACP3x system resume and runtime pm
by Ravulapati Vishnu vardhan rao 11 Nov '19
by Ravulapati Vishnu vardhan rao 11 Nov '19
11 Nov '19
When system wide suspend happens, ACP will be powered off
and when system resumes,for audio usecase to continue,all
the runtime configuration data needs to be programmed again.
Added resume pm call back to ACP pm ops and also added runtime
PM operations for ACP3x PCM platform device.
Device will enter into D3 state when there is no activity
on audio I2S lines.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 135 -----------------------------
sound/soc/amd/raven/acp3x.h | 8 ++
sound/soc/amd/raven/pci-acp3x.c | 168 +++++++++++++++++++++++++++++++++++-
3 files changed, 173 insertions(+), 138 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 8a8b135..00713eb 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -58,106 +58,6 @@ static const struct snd_pcm_hardware acp3x_pcm_hardware_capture = {
.periods_max = CAPTURE_MAX_NUM_PERIODS,
};
-static int acp3x_power_on(void __iomem *acp3x_base, bool on)
-{
- u16 val, mask;
- u32 timeout;
-
- if (on == true) {
- val = 1;
- mask = ACP3x_POWER_ON;
- } else {
- val = 0;
- mask = ACP3x_POWER_OFF;
- }
-
- rv_writel(val, acp3x_base + mmACP_PGFSM_CONTROL);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
- if ((val & ACP3x_POWER_OFF_IN_PROGRESS) == mask)
- break;
- if (timeout > 100) {
- pr_err("ACP3x power state change failure\n");
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_reset(void __iomem *acp3x_base)
-{
- u32 val, timeout;
-
- rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
- timeout > 100) {
- if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
-
- rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if (!val || timeout > 100) {
- if (!val)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_init(void __iomem *acp3x_base)
-{
- int ret;
-
- /* power on */
- ret = acp3x_power_on(acp3x_base, true);
- if (ret) {
- pr_err("ACP3x power on failed\n");
- return ret;
- }
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- return 0;
-}
-
-static int acp3x_deinit(void __iomem *acp3x_base)
-{
- int ret;
-
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- /* power off */
- ret = acp3x_power_on(acp3x_base, false);
- if (ret) {
- pr_err("ACP3x power off failed\n");
- return ret;
- }
- return 0;
-}
-
static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
{
u16 play_flag, cap_flag;
@@ -520,10 +420,6 @@ static int acp3x_audio_probe(struct platform_device *pdev)
adata->i2s_irq = res->start;
dev_set_drvdata(&pdev->dev, adata);
- /* Initialize ACP */
- status = acp3x_init(adata->acp3x_base);
- if (status)
- goto io_irq;
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
NULL, 0);
@@ -560,40 +456,20 @@ static int acp3x_audio_probe(struct platform_device *pdev)
kfree(res);
kfree(adata->acp3x_base);
kfree(adata);
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_info(&pdev->dev, "ACP de-initialized\n");
- /*ignore device status and return driver probe error*/
return -ENODEV;
}
static int acp3x_audio_remove(struct platform_device *pdev)
{
- int ret;
- struct i2s_dev_data *adata = dev_get_drvdata(&pdev->dev);
-
- ret = acp3x_deinit(adata->acp3x_base);
- if (ret)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_info(&pdev->dev, "ACP de-initialized\n");
-
pm_runtime_disable(&pdev->dev);
return 0;
}
static int acp3x_resume(struct device *dev)
{
- int status;
u32 val;
struct i2s_dev_data *adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
-
if (adata->play_stream && adata->play_stream->runtime) {
struct i2s_stream_instance *rtd =
adata->play_stream->runtime->private_data;
@@ -638,15 +514,8 @@ static int acp3x_resume(struct device *dev)
static int acp3x_pcm_runtime_suspend(struct device *dev)
{
- int status;
struct i2s_dev_data *adata = dev_get_drvdata(dev);
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(dev, "ACP de-init failed\n");
- else
- dev_info(dev, "ACP de-initialized\n");
-
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
@@ -654,12 +523,8 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
static int acp3x_pcm_runtime_resume(struct device *dev)
{
- int status;
struct i2s_dev_data *adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 01b283a..c40f960 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,6 +7,7 @@
#include "chip_offset_byte.h"
+#define DELAY 600
#define I2S_SP_INSTANCE 0x01
#define I2S_BT_INSTANCE 0x02
@@ -65,6 +66,13 @@
#define SLOT_WIDTH_16 0x10
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+#define ACP_PGFSM_CNTL_POWER_ON_MASK 0x01
+#define ACP_PGFSM_CNTL_POWER_OFF_MASK 0x00
+#define ACP_PGFSM_STATUS_MASK 0x03
+#define ACP_POWERED_ON 0x00
+#define ACP_POWER_ON_IN_PROGRESS 0x01
+#define ACP_POWERED_OFF 0x02
+#define ACP_POWER_OFF_IN_PROGRESS 0x03
struct acp3x_platform_info {
u16 play_i2s_instance;
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index fe37160c..6b48baa 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -9,6 +9,9 @@
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
+#include <linux/pm_runtime.h>
+#include <linux/delay.h>
+#include <sound/pcm.h>
#include "acp3x.h"
@@ -19,6 +22,114 @@ struct acp3x_dev_data {
struct platform_device *pdev[ACP3x_DEVS];
};
+static int acp3x_power_on(void __iomem *acp3x_base)
+{
+ u32 val;
+ u32 timeout = 0;
+ int ret = 0;
+
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+
+ if (val == 0)
+ return val;
+
+ if (!((val & ACP_PGFSM_STATUS_MASK) ==
+ ACP_POWER_ON_IN_PROGRESS))
+ rv_writel(ACP_PGFSM_CNTL_POWER_ON_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ while (++timeout < DELAY) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if (!val)
+ break;
+ udelay(1);
+ if (timeout > 500) {
+ pr_err("ACP is Not Powered ON\n");
+ return -ETIMEDOUT;
+ }
+ }
+}
+static int acp3x_power_off(void __iomem *acp3x_base)
+{
+ u32 val;
+ u32 timeout = 0;
+
+ rv_writel(ACP_PGFSM_CNTL_POWER_OFF_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ while (++timeout < DELAY) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if ((val & ACP_PGFSM_STATUS_MASK) == ACP_POWERED_OFF)
+ return 0;
+ udelay(1);
+ if (timeout > 500) {
+ pr_err("ACP is Not Powered OFF\n");
+ return -ETIMEDOUT;
+ }
+ }
+}
+static int acp3x_reset(void __iomem *acp3x_base)
+{
+ u32 val, timeout;
+
+ rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout < DELAY) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
+ timeout > 100) {
+ if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
+ break;
+ return -ENODEV;
+ }
+ cpu_relax();
+ }
+ rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout < DELAY) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if (!val)
+ break;
+ if (timeout > 100)
+ return -ENODEV;
+ cpu_relax();
+ }
+ return 0;
+}
+static int acp3x_init(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* power on */
+ ret = acp3x_power_on(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power on failed\n");
+ return ret;
+ }
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ return 0;
+}
+static int acp3x_deinit(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ /* power off */
+ ret = acp3x_power_off(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power off failed\n");
+ return ret;
+ }
+ return 0;
+}
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
@@ -63,6 +174,10 @@ static int snd_acp3x_probe(struct pci_dev *pci,
}
pci_set_master(pci);
pci_set_drvdata(pci, adata);
+ ret = acp3x_init(adata->acp3x_base);
+ if (ret)
+ return -ENODEV;
+
val = rv_readl(adata->acp3x_base + mmACP_I2S_PIN_CONFIG);
switch (val) {
@@ -133,9 +248,19 @@ static int snd_acp3x_probe(struct pci_dev *pci,
ret = -ENODEV;
goto unmap_mmio;
}
+ pm_runtime_set_autosuspend_delay(&pci->dev, 10000);
+ pm_runtime_use_autosuspend(&pci->dev);
+ pm_runtime_set_active(&pci->dev);
+ pm_runtime_put_noidle(&pci->dev);
+ pm_runtime_enable(&pci->dev);
return 0;
unmap_mmio:
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_info(&pci->dev, "ACP de-initialized\n");
pci_disable_msi(pci);
for (i = 0 ; i < ACP3x_DEVS ; i++)
platform_device_unregister(adata->pdev[i]);
@@ -148,23 +273,57 @@ static int snd_acp3x_probe(struct pci_dev *pci,
return ret;
}
+static int snd_acp3x_suspend(struct device *dev)
+{
+ int status;
+ struct acp3x_dev_data *adata = dev_get_drvdata(dev);
+
+ status = acp3x_deinit(adata->acp3x_base);
+ if (status)
+ dev_err(dev, "ACP de-init failed\n");
+ else
+ dev_info(dev, "ACP de-initialized\n");
+ return 0;
+}
+static int snd_acp3x_resume(struct device *dev)
+{
+ int status;
+ struct acp3x_dev_data *adata = dev_get_drvdata(dev);
+
+ status = acp3x_init(adata->acp3x_base);
+ if (status) {
+ dev_err(dev, "ACP init failed\n");
+ return status;
+ }
+ return 0;
+}
+static const struct dev_pm_ops acp3x_pm = {
+ .runtime_suspend = snd_acp3x_suspend,
+ .runtime_resume = snd_acp3x_resume,
+ .resume = snd_acp3x_resume,
+};
static void snd_acp3x_remove(struct pci_dev *pci)
{
- int i;
+ int i, ret;
struct acp3x_dev_data *adata = pci_get_drvdata(pci);
if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
for (i = 0 ; i < ACP3x_DEVS ; i++)
platform_device_unregister(adata->pdev[i]);
}
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_info(&pci->dev, "ACP de-initialized\n");
iounmap(adata->acp3x_base);
-
+ pm_runtime_disable(&pci->dev);
+ pm_runtime_get_noresume(&pci->dev);
pci_disable_msi(pci);
pci_release_regions(pci);
pci_disable_device(pci);
}
-
static const struct pci_device_id snd_acp3x_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x15e2),
.class = PCI_CLASS_MULTIMEDIA_OTHER << 8,
@@ -178,6 +337,9 @@ static struct pci_driver acp3x_driver = {
.id_table = snd_acp3x_ids,
.probe = snd_acp3x_probe,
.remove = snd_acp3x_remove,
+ .driver = {
+ .pm = &acp3x_pm,
+ }
};
module_pci_driver(acp3x_driver);
--
2.7.4
1
0

[alsa-devel] [PATCH v4 5/6] ASoC: amd: handle ACP3x i2s-sp interrupt.
by Ravulapati Vishnu vardhan rao 11 Nov '19
by Ravulapati Vishnu vardhan rao 11 Nov '19
11 Nov '19
Enabled support for handling i2s-sp interrupt.
previous to this,Driver support only BT instance and
interrupt on i2s-sp were not handled.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 6e70fa8..8a8b135 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -176,6 +176,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->play_stream);
play_flag = 1;
}
+ if ((val & BIT(I2S_TX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_play_stream) {
+ rv_writel(BIT(I2S_TX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_play_stream);
+ play_flag = 1;
+ }
if ((val & BIT(BT_RX_THRESHOLD)) && rv_i2s_data->capture_stream) {
rv_writel(BIT(BT_RX_THRESHOLD), rv_i2s_data->acp3x_base +
@@ -183,6 +190,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->capture_stream);
cap_flag = 1;
}
+ if ((val & BIT(I2S_RX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_capture_stream) {
+ rv_writel(BIT(I2S_RX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_capture_stream);
+ cap_flag = 1;
+ }
if (play_flag | cap_flag)
return IRQ_HANDLED;
--
2.7.4
1
0

[alsa-devel] [RESEND PATCH v4 4/6] ASoC: amd: add ACP3x TDM mode support
by Ravulapati Vishnu vardhan rao 11 Nov '19
by Ravulapati Vishnu vardhan rao 11 Nov '19
11 Nov '19
ACP3x I2S (CPU DAI) can act in normal I2S and TDM modes. Added support
for TDM mode. Desired mode can be selected from ASoC machine driver.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 51 +++++++++++++++++++++++++++++++++--------
sound/soc/amd/raven/acp3x.h | 2 ++
2 files changed, 43 insertions(+), 10 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index bd0ec68..f6b306d 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -43,7 +43,7 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
u32 rx_mask, int slots, int slot_width)
{
u32 val;
- u16 slot_len;
+ u16 slot_len, flen;
struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
@@ -66,16 +66,47 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
return -EINVAL;
}
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
+ /* Enable I2S / BT channels TDM and respective
+ * I2S/BT`s TX/RX Formats frame lengths.
+ */
+ flen = (FRM_LEN | (slots << 15) | (slot_len << 18));
- val = (FRM_LEN | (slots << 15) | (slot_len << 18));
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
-
- adata->tdm_fmt = val;
+ if (adata->substream_type == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel((val | 0x2),
+ adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel(flen,
+ adata->acp3x_base + mmACP_BTTDM_TXFRMT);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = rv_readl(adata->acp3x_base + mmACP_I2STDM_ITER);
+ rv_writel((val | 0x2),
+ adata->acp3x_base + mmACP_I2STDM_ITER);
+ rv_writel(flen,
+ adata->acp3x_base + mmACP_I2STDM_TXFRMT);
+ }
+ } else {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel((val | 0x2),
+ adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel(flen,
+ adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = rv_readl(adata->acp3x_base + mmACP_I2STDM_IRER);
+ rv_writel((val | 0x2),
+ adata->acp3x_base + mmACP_I2STDM_IRER);
+ rv_writel(flen,
+ adata->acp3x_base + mmACP_I2STDM_RXFRMT);
+ }
+ }
+ adata->tdm_fmt = flen;
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index c071477..01b283a 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -76,6 +76,8 @@ struct i2s_dev_data {
bool tdm_mode;
unsigned int i2s_irq;
u32 tdm_fmt;
+ u16 i2s_instance;
+ u32 substream_type;
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
--
2.7.4
1
0

[alsa-devel] [PATCH v4 3/6] ASoC: amd: Enabling I2S instance in DMA and DAI
by Ravulapati Vishnu vardhan rao 11 Nov '19
by Ravulapati Vishnu vardhan rao 11 Nov '19
11 Nov '19
This patch adds I2S SP support in ACP PCM DMA and DAI.
Added I2S support in DMA and DAI probe,its hw_params handling
its open and close functionalities.
This enable to open and close on the SP instance for
playback and capture.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 129 +++++++++++++++++++------
sound/soc/amd/raven/acp3x-pcm-dma.c | 186 +++++++++++++++++++++++++-----------
sound/soc/amd/raven/acp3x.h | 74 ++++++++++----
3 files changed, 289 insertions(+), 100 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index 0f27abc..bd0ec68 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -83,9 +83,20 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{
- u32 val = 0;
+ u32 val;
+ u32 reg_val;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+ struct snd_soc_card *card = prtd->card;
+ struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card);
struct i2s_stream_instance *rtd = substream->runtime->private_data;
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
+
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_U8:
case SNDRV_PCM_FORMAT_S8:
@@ -104,24 +115,46 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
return -EINVAL;
}
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | (rtd->xfer_resolution << 3);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ }
} else {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val | (rtd->xfer_resolution << 3);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ }
}
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + reg_val);
return 0;
}
static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{
- int ret = 0;
+ int ret;
struct i2s_stream_instance *rtd = substream->runtime->private_data;
- u32 val, period_bytes;
-
+ u32 val, period_bytes, reg_val, ier_val, water_val;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+ struct snd_soc_card *card = prtd->card;
+ struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card);
+
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
period_bytes = frames_to_bytes(substream->runtime,
substream->runtime->period_size);
switch (cmd) {
@@ -131,33 +164,73 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
rtd->bytescount = acp_get_byte_count(rtd,
substream->stream);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_TX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ water_val =
+ mmACP_BT_TX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_BTTDM_ITER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ water_val =
+ mmACP_I2S_TX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_I2STDM_ITER;
+ ier_val = mmACP_I2STDM_IER;
+ }
} else {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_RX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ water_val =
+ mmACP_BT_RX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_BTTDM_IRER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ water_val =
+ mmACP_I2S_RX_INTR_WATERMARK_SIZE;
+ reg_val = mmACP_I2STDM_IRER;
+ ier_val = mmACP_I2STDM_IER;
+ }
}
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
+ rv_writel(period_bytes, rtd->acp3x_base + water_val);
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ rv_writel(1, rtd->acp3x_base + ier_val);
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_ITER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_ITER;
+ ier_val = mmACP_I2STDM_IER;
+ }
+
} else {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_val = mmACP_BTTDM_IRER;
+ ier_val = mmACP_BTTDM_IER;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ reg_val = mmACP_I2STDM_IRER;
+ ier_val = mmACP_I2STDM_IER;
+ }
}
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
+ val = rv_readl(rtd->acp3x_base + reg_val);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base + reg_val);
+ rv_writel(0, rtd->acp3x_base + ier_val);
break;
default:
ret = -EINVAL;
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 8db2812..6e70fa8 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -193,20 +193,36 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
{
u16 page_idx;
- u32 low, high, val, acp_fifo_addr;
- dma_addr_t addr = rtd->dma_addr;
+ uint64_t low, high, val, acp_fifo_addr;
+ uint64_t reg_ringbuf_size, reg_dma_size, reg_fifo_size, reg_fifo_addr;
+ dma_addr_t addr;
- /* 8 scratch registers used to map one 64 bit address */
- if (direction == SNDRV_PCM_STREAM_PLAYBACK)
- val = 0;
- else
- val = rtd->num_pages * 8;
+ addr = rtd->dma_addr;
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_PB_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_PB_PTE_OFFSET;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_CP_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_CP_PTE_OFFSET;
+ }
+ }
/* Group Enable */
rv_writel(ACP_SRAM_PTE_OFFSET | BIT(31), rtd->acp3x_base +
- mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
+ mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
rv_writel(PAGE_SIZE_4K_ENABLE, rtd->acp3x_base +
- mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
+ mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
for (page_idx = 0; page_idx < rtd->num_pages; page_idx++) {
/* Load the low address of page int ACP SRAM through SRBM */
@@ -223,38 +239,61 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
}
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_TX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET + (rtd->num_pages * 8)
- + PLAYBACK_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_TX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_TX_FIFOSIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_ringbuf_size = mmACP_BT_TX_RINGBUFSIZE;
+ reg_dma_size = mmACP_BT_TX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_PB_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_BT_TX_FIFOADDR;
+ reg_fifo_size = mmACP_BT_TX_FIFOSIZE;
+ rv_writel(I2S_BT_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_TX_RINGBUFADDR);
+ break;
+
+ case I2S_SP_INSTANCE:
+ default:
+ reg_ringbuf_size = mmACP_I2S_TX_RINGBUFSIZE;
+ reg_dma_size = mmACP_I2S_TX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_PB_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_I2S_TX_FIFOADDR;
+ reg_fifo_size = mmACP_I2S_TX_FIFOSIZE;
+ rv_writel(I2S_SP_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_TX_RINGBUFADDR);
+ }
} else {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START + MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_RX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
- (rtd->num_pages * 8) + CAPTURE_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_RX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_RX_FIFOSIZE);
- }
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ reg_ringbuf_size = mmACP_BT_RX_RINGBUFSIZE;
+ reg_dma_size = mmACP_BT_RX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_CAPT_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_BT_RX_FIFOADDR;
+ reg_fifo_size = mmACP_BT_RX_FIFOSIZE;
+ rv_writel(I2S_BT_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_RX_RINGBUFADDR);
+ break;
- /* Enable watermark/period interrupt to host */
- rv_writel(BIT(BT_TX_THRESHOLD) | BIT(BT_RX_THRESHOLD),
- rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
+ case I2S_SP_INSTANCE:
+ default:
+ reg_ringbuf_size = mmACP_I2S_RX_RINGBUFSIZE;
+ reg_dma_size = mmACP_I2S_RX_DMA_SIZE;
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_CAPT_FIFO_ADDR_OFFSET;
+ reg_fifo_addr = mmACP_I2S_RX_FIFOADDR;
+ reg_fifo_size = mmACP_I2S_RX_FIFOSIZE;
+ rv_writel(I2S_SP_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_RX_RINGBUFADDR);
+ }
+ }
+ rv_writel(MAX_BUFFER, rtd->acp3x_base + reg_ringbuf_size);
+ rv_writel(DMA_SIZE, rtd->acp3x_base + reg_dma_size);
+ rv_writel(acp_fifo_addr, rtd->acp3x_base + reg_fifo_addr);
+ rv_writel(FIFO_SIZE, rtd->acp3x_base + reg_fifo_size);
+ rv_writel(BIT(I2S_RX_THRESHOLD) | BIT(BT_RX_THRESHOLD)
+ | BIT(I2S_TX_THRESHOLD) | BIT(BT_TX_THRESHOLD),
+ rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
}
static int acp3x_dma_open(struct snd_soc_component *component,
@@ -284,13 +323,17 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return ret;
}
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = substream;
- else
+ adata->i2ssp_play_stream = substream;
+ } else {
adata->capture_stream = substream;
+ adata->i2ssp_capture_stream = substream;
+ }
i2s_data->acp3x_base = adata->acp3x_base;
runtime->private_data = i2s_data;
@@ -303,13 +346,24 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_hw_params *params)
{
int status;
- u64 size;
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct i2s_stream_instance *rtd = runtime->private_data;
+ uint64_t size;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+ struct snd_soc_card *card = prtd->card;
+ struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card);
+ struct i2s_stream_instance *rtd = substream->runtime->private_data;
if (!rtd)
return -EINVAL;
+
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ } else
+ pr_err("pinfo failed\n");
+
size = params_buffer_bytes(params);
status = snd_pcm_lib_malloc_pages(substream, size);
if (status < 0)
@@ -333,8 +387,17 @@ static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
u32 pos = 0;
u32 buffersize = 0;
u64 bytescount = 0;
- struct i2s_stream_instance *rtd =
- substream->runtime->private_data;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+ struct snd_soc_card *card = prtd->card;
+ struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card);
+ struct i2s_stream_instance *rtd = substream->runtime->private_data;
+
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
buffersize = frames_to_bytes(substream->runtime,
substream->runtime->buffer_size);
@@ -376,15 +439,19 @@ static int acp3x_dma_close(struct snd_soc_component *component,
component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = NULL;
- else
+ adata->i2ssp_play_stream = NULL;
+ } else {
adata->capture_stream = NULL;
+ adata->i2ssp_capture_stream = NULL;
+ }
/* Disable ACP irq, when the current stream is being closed and
* another stream is also not active.
*/
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ !adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
kfree(rtd);
return 0;
@@ -518,13 +585,16 @@ static int acp3x_resume(struct device *dev)
adata->play_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_PLAYBACK);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_ITER);
+ rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_TXFRMT);
+ mmACP_BTTDM_TXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_ITER);
+ mmACP_BTTDM_ITER);
}
}
@@ -533,13 +603,17 @@ static int acp3x_resume(struct device *dev)
adata->capture_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_CAPTURE);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_IRER);
+ rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
+
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_RXFRMT);
+ mmACP_BTTDM_RXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_IRER);
+ mmACP_BTTDM_IRER);
}
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 72c1a23..c071477 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,6 +7,9 @@
#include "chip_offset_byte.h"
+#define I2S_SP_INSTANCE 0x01
+#define I2S_BT_INSTANCE 0x02
+
#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
@@ -17,8 +20,11 @@
#define ACP3x_BT_TDM_REG_START 0x1242800
#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
+#define I2S_RX_THRESHOLD 27
+#define I2S_TX_THRESHOLD 28
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
+#define ACP_ERR_INTR_MASK 29
#define ACP3x_POWER_ON 0x00
#define ACP3x_POWER_ON_IN_PROGRESS 0x01
#define ACP3x_POWER_OFF 0x02
@@ -26,19 +32,28 @@
#define ACP3x_SOFT_RESET__SoftResetAudDone_MASK 0x00010001
#define ACP_SRAM_PTE_OFFSET 0x02050000
+#define ACP_SRAM_SP_PB_PTE_OFFSET 0x0
+#define ACP_SRAM_SP_CP_PTE_OFFSET 0x100
+#define ACP_SRAM_BT_PB_PTE_OFFSET 0x200
+#define ACP_SRAM_BT_CP_PTE_OFFSET 0x300
#define PAGE_SIZE_4K_ENABLE 0x2
-#define MEM_WINDOW_START 0x4000000
-#define PLAYBACK_FIFO_ADDR_OFFSET 0x400
-#define CAPTURE_FIFO_ADDR_OFFSET 0x500
+#define I2S_SP_TX_MEM_WINDOW_START 0x4000000
+#define I2S_SP_RX_MEM_WINDOW_START 0x4020000
+#define I2S_BT_TX_MEM_WINDOW_START 0x4040000
+#define I2S_BT_RX_MEM_WINDOW_START 0x4060000
+#define SP_PB_FIFO_ADDR_OFFSET 0x500
+#define SP_CAPT_FIFO_ADDR_OFFSET 0x700
+#define BT_PB_FIFO_ADDR_OFFSET 0x900
+#define BT_CAPT_FIFO_ADDR_OFFSET 0xB00
#define PLAYBACK_MIN_NUM_PERIODS 2
#define PLAYBACK_MAX_NUM_PERIODS 8
-#define PLAYBACK_MAX_PERIOD_SIZE 16384
-#define PLAYBACK_MIN_PERIOD_SIZE 4096
+#define PLAYBACK_MAX_PERIOD_SIZE 8192
+#define PLAYBACK_MIN_PERIOD_SIZE 1024
#define CAPTURE_MIN_NUM_PERIODS 2
#define CAPTURE_MAX_NUM_PERIODS 8
-#define CAPTURE_MAX_PERIOD_SIZE 16384
-#define CAPTURE_MIN_PERIOD_SIZE 4096
+#define CAPTURE_MAX_PERIOD_SIZE 8192
+#define CAPTURE_MIN_PERIOD_SIZE 1024
#define MAX_BUFFER (PLAYBACK_MAX_PERIOD_SIZE * PLAYBACK_MAX_NUM_PERIODS)
#define MIN_BUFFER MAX_BUFFER
@@ -64,14 +79,20 @@ struct i2s_dev_data {
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
+ struct snd_pcm_substream *i2ssp_play_stream;
+ struct snd_pcm_substream *i2ssp_capture_stream;
};
struct i2s_stream_instance {
u16 num_pages;
+ u16 i2s_instance;
+ u16 capture_channel;
+ u16 direction;
u16 channels;
u32 xfer_resolution;
- u64 bytescount;
+ u32 val;
dma_addr_t dma_addr;
+ u64 bytescount;
void __iomem *acp3x_base;
};
@@ -91,15 +112,36 @@ static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
u64 byte_count;
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_LOW);
+ }
+
} else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_LOW);
+ }
}
return byte_count;
}
--
2.7.4
1
0

[alsa-devel] [PATCH v4 2/6] ASoC: amd: Refactoring of DAI from DMA driver
by Ravulapati Vishnu vardhan rao 11 Nov '19
by Ravulapati Vishnu vardhan rao 11 Nov '19
11 Nov '19
Asoc: PCM DMA driver should only have dma ops.
So Removed all DAI related functionality.Refactoring
the PCM DMA diver code.Added new file containing only DAI ops.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/Makefile | 2 +
sound/soc/amd/raven/acp3x-i2s.c | 272 ++++++++++++++++++++++++++++++++++++
sound/soc/amd/raven/acp3x-pcm-dma.c | 251 +++++----------------------------
sound/soc/amd/raven/acp3x.h | 42 ++++++
4 files changed, 348 insertions(+), 219 deletions(-)
create mode 100644 sound/soc/amd/raven/acp3x-i2s.c
diff --git a/sound/soc/amd/raven/Makefile b/sound/soc/amd/raven/Makefile
index 108d1ac..8eef292 100644
--- a/sound/soc/amd/raven/Makefile
+++ b/sound/soc/amd/raven/Makefile
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: GPL-2.0+
# Raven Ridge platform Support
snd-pci-acp3x-objs := pci-acp3x.o
+snd-acp3x-i2s-objs := acp3x-i2s.o
snd-acp3x-pcm-dma-objs := acp3x-pcm-dma.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-pci-acp3x.o
+obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-i2s.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-pcm-dma.o
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
new file mode 100644
index 0000000..0f27abc
--- /dev/null
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -0,0 +1,272 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// AMD ALSA SoC PCM Driver
+//
+//Copyright 2016 Advanced Micro Devices, Inc.
+
+#include <linux/platform_device.h>
+#include <linux/module.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/pm_runtime.h>
+#include <sound/pcm.h>
+#include <sound/pcm_params.h>
+#include <sound/soc.h>
+#include <sound/soc-dai.h>
+#include <linux/dma-mapping.h>
+
+#include "acp3x.h"
+
+#define DRV_NAME "acp3x-i2s"
+
+static int acp3x_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
+{
+
+ struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
+
+ case SND_SOC_DAIFMT_I2S:
+ adata->tdm_mode = false;
+ break;
+ case SND_SOC_DAIFMT_DSP_A:
+ adata->tdm_mode = true;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
+ u32 rx_mask, int slots, int slot_width)
+{
+ u32 val;
+ u16 slot_len;
+
+ struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ /* These values are as per Hardware Spec */
+
+ switch (slot_width) {
+ case SLOT_WIDTH_8:
+ slot_len = 8;
+ break;
+ case SLOT_WIDTH_16:
+ slot_len = 16;
+ break;
+ case SLOT_WIDTH_24:
+ slot_len = 24;
+ break;
+ case SLOT_WIDTH_32:
+ slot_len = 0;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
+
+ val = (FRM_LEN | (slots << 15) | (slot_len << 18));
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+
+ adata->tdm_fmt = val;
+ return 0;
+}
+
+static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ struct snd_soc_dai *dai)
+{
+ u32 val = 0;
+ struct i2s_stream_instance *rtd = substream->runtime->private_data;
+
+ switch (params_format(params)) {
+ case SNDRV_PCM_FORMAT_U8:
+ case SNDRV_PCM_FORMAT_S8:
+ rtd->xfer_resolution = 0x0;
+ break;
+ case SNDRV_PCM_FORMAT_S16_LE:
+ rtd->xfer_resolution = 0x02;
+ break;
+ case SNDRV_PCM_FORMAT_S24_LE:
+ rtd->xfer_resolution = 0x04;
+ break;
+ case SNDRV_PCM_FORMAT_S32_LE:
+ rtd->xfer_resolution = 0x05;
+ break;
+ default:
+ return -EINVAL;
+ }
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ } else {
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ }
+ return 0;
+}
+
+static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
+ int cmd, struct snd_soc_dai *dai)
+{
+ int ret = 0;
+ struct i2s_stream_instance *rtd = substream->runtime->private_data;
+ u32 val, period_bytes;
+
+ period_bytes = frames_to_bytes(substream->runtime,
+ substream->runtime->period_size);
+ switch (cmd) {
+ case SNDRV_PCM_TRIGGER_START:
+ case SNDRV_PCM_TRIGGER_RESUME:
+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+ rtd->bytescount = acp_get_byte_count(rtd,
+ substream->stream);
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_TX_INTR_WATERMARK_SIZE);
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ } else {
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_RX_INTR_WATERMARK_SIZE);
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ }
+ rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ case SNDRV_PCM_TRIGGER_STOP:
+ case SNDRV_PCM_TRIGGER_SUSPEND:
+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ } else {
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ }
+ rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ default:
+ ret = -EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
+static struct snd_soc_dai_ops acp3x_i2s_dai_ops = {
+ .hw_params = acp3x_i2s_hwparams,
+ .trigger = acp3x_i2s_trigger,
+ .set_fmt = acp3x_i2s_set_fmt,
+ .set_tdm_slot = acp3x_i2s_set_tdm_slot,
+};
+
+static const struct snd_soc_component_driver acp3x_dai_component = {
+ .name = "acp3x-i2s",
+};
+
+static struct snd_soc_dai_driver acp3x_i2s_dai = {
+ .playback = {
+ .rates = SNDRV_PCM_RATE_8000_96000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 8,
+
+ .rate_min = 8000,
+ .rate_max = 96000,
+ },
+ .capture = {
+ .rates = SNDRV_PCM_RATE_8000_48000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 2,
+ .rate_min = 8000,
+ .rate_max = 48000,
+ },
+ .ops = &acp3x_i2s_dai_ops,
+};
+
+
+static int acp3x_dai_probe(struct platform_device *pdev)
+{
+ int status;
+ struct resource *res;
+ struct i2s_dev_data *adata;
+
+ adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data),
+ GFP_KERNEL);
+ if (!adata)
+ return -ENOMEM;
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
+ goto err;
+ }
+
+ adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
+ resource_size(res));
+ if (IS_ERR(adata->acp3x_base))
+ return PTR_ERR(adata->acp3x_base);
+
+ adata->i2s_irq = res->start;
+ dev_set_drvdata(&pdev->dev, adata);
+ status = devm_snd_soc_register_component(&pdev->dev,
+ &acp3x_dai_component,
+ &acp3x_i2s_dai, 1);
+ if (status) {
+ dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ goto dev_err;
+ }
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 10000);
+ pm_runtime_use_autosuspend(&pdev->dev);
+ pm_runtime_enable(&pdev->dev);
+ return 0;
+err:
+ kfree(adata);
+ return -ENOMEM;
+dev_err:
+ kfree(adata->acp3x_base);
+ kfree(adata);
+ kfree(res);
+ return -ENODEV;
+}
+
+static int acp3x_dai_remove(struct platform_device *pdev)
+{
+ pm_runtime_disable(&pdev->dev);
+ return 0;
+}
+static struct platform_driver acp3x_dai_driver = {
+ .probe = acp3x_dai_probe,
+ .remove = acp3x_dai_remove,
+ .driver = {
+ .name = "acp3x_i2s_playcap",
+ },
+};
+
+module_platform_driver(acp3x_dai_driver);
+
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
+MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:" DRV_NAME);
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 60709e3..8db2812 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -18,24 +18,6 @@
#define DRV_NAME "acp3x-i2s-audio"
-struct i2s_dev_data {
- bool tdm_mode;
- unsigned int i2s_irq;
- u32 tdm_fmt;
- void __iomem *acp3x_base;
- struct snd_pcm_substream *play_stream;
- struct snd_pcm_substream *capture_stream;
-};
-
-struct i2s_stream_instance {
- u16 num_pages;
- u16 channels;
- u32 xfer_resolution;
- u64 bytescount;
- dma_addr_t dma_addr;
- void __iomem *acp3x_base;
-};
-
static const struct snd_pcm_hardware acp3x_pcm_hardware_playback = {
.info = SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -280,6 +262,9 @@ static int acp3x_dma_open(struct snd_soc_component *component,
{
int ret = 0;
struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
struct i2s_stream_instance *i2s_data = kzalloc(sizeof(struct i2s_stream_instance),
GFP_KERNEL);
@@ -312,23 +297,6 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return 0;
}
-static u64 acp_get_byte_count(struct i2s_stream_instance *rtd, int direction)
-{
- u64 byte_count;
-
- if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
- } else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
- }
- return byte_count;
-}
static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
@@ -380,6 +348,7 @@ static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
static int acp3x_dma_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd)
{
+ component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
struct device *parent = component->dev->parent;
snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_DEV,
parent, MIN_BUFFER, MAX_BUFFER);
@@ -402,7 +371,9 @@ static int acp3x_dma_mmap(struct snd_soc_component *component,
static int acp3x_dma_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
struct i2s_stream_instance *rtd = substream->runtime->private_data;
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
@@ -419,182 +390,6 @@ static int acp3x_dma_close(struct snd_soc_component *component,
return 0;
}
-static int acp3x_dai_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
-{
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
- case SND_SOC_DAIFMT_I2S:
- adata->tdm_mode = false;
- break;
- case SND_SOC_DAIFMT_DSP_A:
- adata->tdm_mode = true;
- break;
- default:
- return -EINVAL;
- }
-
- return 0;
-}
-
-static int acp3x_dai_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
- u32 rx_mask, int slots, int slot_width)
-{
- u32 val = 0;
- u16 slot_len;
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (slot_width) {
- case SLOT_WIDTH_8:
- slot_len = 8;
- break;
- case SLOT_WIDTH_16:
- slot_len = 16;
- break;
- case SLOT_WIDTH_24:
- slot_len = 24;
- break;
- case SLOT_WIDTH_32:
- slot_len = 0;
- break;
- default:
- return -EINVAL;
- }
-
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
-
- val = (FRM_LEN | (slots << 15) | (slot_len << 18));
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
-
- adata->tdm_fmt = val;
- return 0;
-}
-
-static int acp3x_dai_i2s_hwparams(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *params,
- struct snd_soc_dai *dai)
-{
- u32 val = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
-
- switch (params_format(params)) {
- case SNDRV_PCM_FORMAT_U8:
- case SNDRV_PCM_FORMAT_S8:
- rtd->xfer_resolution = 0x0;
- break;
- case SNDRV_PCM_FORMAT_S16_LE:
- rtd->xfer_resolution = 0x02;
- break;
- case SNDRV_PCM_FORMAT_S24_LE:
- rtd->xfer_resolution = 0x04;
- break;
- case SNDRV_PCM_FORMAT_S32_LE:
- rtd->xfer_resolution = 0x05;
- break;
- default:
- return -EINVAL;
- }
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | (rtd->xfer_resolution << 3);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- else
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
-
- return 0;
-}
-
-static int acp3x_dai_i2s_trigger(struct snd_pcm_substream *substream,
- int cmd, struct snd_soc_dai *dai)
-{
- int ret = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
- u32 val, period_bytes;
-
- period_bytes = frames_to_bytes(substream->runtime,
- substream->runtime->period_size);
- switch (cmd) {
- case SNDRV_PCM_TRIGGER_START:
- case SNDRV_PCM_TRIGGER_RESUME:
- case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
- rtd->bytescount = acp_get_byte_count(rtd, substream->stream);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_TX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_RX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- case SNDRV_PCM_TRIGGER_STOP:
- case SNDRV_PCM_TRIGGER_SUSPEND:
- case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- default:
- ret = -EINVAL;
- break;
- }
-
- return ret;
-}
-
-static struct snd_soc_dai_ops acp3x_dai_i2s_ops = {
- .hw_params = acp3x_dai_i2s_hwparams,
- .trigger = acp3x_dai_i2s_trigger,
- .set_fmt = acp3x_dai_i2s_set_fmt,
- .set_tdm_slot = acp3x_dai_set_tdm_slot,
-};
-
-static struct snd_soc_dai_driver acp3x_i2s_dai_driver = {
- .playback = {
- .rates = SNDRV_PCM_RATE_8000_96000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 8,
-
- .rate_min = 8000,
- .rate_max = 96000,
- },
- .capture = {
- .rates = SNDRV_PCM_RATE_8000_48000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 2,
- .rate_min = 8000,
- .rate_max = 48000,
- },
- .ops = &acp3x_dai_i2s_ops,
-};
-
static const struct snd_soc_component_driver acp3x_i2s_component = {
.name = DRV_NAME,
.open = acp3x_dma_open,
@@ -628,31 +423,31 @@ static int acp3x_audio_probe(struct platform_device *pdev)
adata = devm_kzalloc(&pdev->dev, sizeof(*adata), GFP_KERNEL);
if (!adata)
- return -ENOMEM;
+ goto err;
adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
+ if (!adata->acp3x_base)
+ goto base_err;
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res) {
dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
- return -ENODEV;
+ goto io_irq;
}
adata->i2s_irq = res->start;
- adata->play_stream = NULL;
- adata->capture_stream = NULL;
dev_set_drvdata(&pdev->dev, adata);
/* Initialize ACP */
status = acp3x_init(adata->acp3x_base);
if (status)
- return -ENODEV;
+ goto io_irq;
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
- &acp3x_i2s_dai_driver, 1);
+ NULL, 0);
if (status) {
- dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ dev_err(&pdev->dev, "Fail to register acp i2s component\n");
goto dev_err;
}
status = devm_request_irq(&pdev->dev, adata->i2s_irq, i2s_irq_handler,
@@ -666,7 +461,24 @@ static int acp3x_audio_probe(struct platform_device *pdev)
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_enable(&pdev->dev);
return 0;
+
+err:
+ kfree(res);
+ return -ENOMEM;
+base_err:
+ kfree(res);
+ kfree(adata);
+ return -ENOMEM;
+io_irq:
+ kfree(res);
+ kfree(adata->acp3x_base);
+ kfree(adata);
+ return -ENOMEM;
+
dev_err:
+ kfree(res);
+ kfree(adata->acp3x_base);
+ kfree(adata);
status = acp3x_deinit(adata->acp3x_base);
if (status)
dev_err(&pdev->dev, "ACP de-init failed\n");
@@ -774,13 +586,14 @@ static struct platform_driver acp3x_dma_driver = {
.probe = acp3x_audio_probe,
.remove = acp3x_audio_remove,
.driver = {
- .name = "acp3x_rv_i2s",
+ .name = "acp3x_rv_i2s_dma",
.pm = &acp3x_pm_ops,
},
};
module_platform_driver(acp3x_dma_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_AUTHOR("Vijendar.Mukunda(a)amd.com");
MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 2f15fe1..72c1a23 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -51,6 +51,29 @@
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+struct acp3x_platform_info {
+ u16 play_i2s_instance;
+ u16 cap_i2s_instance;
+ u16 capture_channel;
+};
+
+struct i2s_dev_data {
+ bool tdm_mode;
+ unsigned int i2s_irq;
+ u32 tdm_fmt;
+ void __iomem *acp3x_base;
+ struct snd_pcm_substream *play_stream;
+ struct snd_pcm_substream *capture_stream;
+};
+
+struct i2s_stream_instance {
+ u16 num_pages;
+ u16 channels;
+ u32 xfer_resolution;
+ u64 bytescount;
+ dma_addr_t dma_addr;
+ void __iomem *acp3x_base;
+};
static inline u32 rv_readl(void __iomem *base_addr)
{
@@ -61,3 +84,22 @@ static inline void rv_writel(u32 val, void __iomem *base_addr)
{
writel(val, base_addr - ACP3x_PHY_BASE_ADDRESS);
}
+
+static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
+ int direction)
+{
+ u64 byte_count;
+
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ } else {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ }
+ return byte_count;
+}
--
2.7.4
1
0

11 Nov '19
Apply same logic to pin setup as on previous platforms. Fixes
errors in HDMI/DP playback.
Tested with both snd-hda-intel and SOF drivers.
Signed-off-by: Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
---
sound/pci/hda/patch_hdmi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index bda4c2b1bfcc..d883719b1546 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -46,10 +46,12 @@ MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info");
((codec)->core.vendor_id == 0x80862800))
#define is_cannonlake(codec) ((codec)->core.vendor_id == 0x8086280c)
#define is_icelake(codec) ((codec)->core.vendor_id == 0x8086280f)
+#define is_tigerlake(codec) ((codec)->core.vendor_id == 0x80862812)
#define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec) \
|| is_skylake(codec) || is_broxton(codec) \
|| is_kabylake(codec) || is_geminilake(codec) \
- || is_cannonlake(codec) || is_icelake(codec))
+ || is_cannonlake(codec) || is_icelake(codec) \
+ || is_tigerlake(codec))
#define is_valleyview(codec) ((codec)->core.vendor_id == 0x80862882)
#define is_cherryview(codec) ((codec)->core.vendor_id == 0x80862883)
#define is_valleyview_plus(codec) (is_valleyview(codec) || is_cherryview(codec))
--
2.17.1
2
3

[alsa-devel] [PATCH v3 00/11] ASoC: Add support to WCD9340/WCD9341 codec
by Srinivas Kandagatla 11 Nov '19
by Srinivas Kandagatla 11 Nov '19
11 Nov '19
This patchset adds support to Qualcomm WCD9340/WCD9341 Codec which
is a standalone Hi-Fi audio codec IC.
This codec supports both I2S/I2C and SLIMbus audio interfaces.
On slimbus interface it supports two data lanes; 16 Tx ports
and 8 Rx ports. It has Five DACs and seven dedicated interpolators,
Multibutton headset control (MBHC), Active noise cancellation,
Sidetone paths, MAD (mic activity detection) and codec processing engine.
It supports Class-H differential earpiece out and stereo single
ended headphones out.
This codec also has integrated SoundWire controller.
Patchset for this is already sent for review at
https://patchwork.kernel.org/cover/11185769/
This patchset has been tested on SDM845 based DragonBoard DB845c and
Lenovo Yoga C630 laptop with WSA881x smart speaker amplifiers via
soundwire and 4 DMICs.
Pin Controller patch does not have any link dependency, it can go by its own.
Most of the code in this driver is rework of Qualcomm downstream drivers
used in Andriod. Credits to Banajit Goswami and Patrick Lai's Team.
If anyone is interested to try, here are working set of patches on top of rc3.
https://git.linaro.org/people/srinivas.kandagatla/linux.git/log/?h=audio/v5…
alsa ucm files:
https://git.linaro.org/people/srinivas.kandagatla/alsa-lib.git/log/?h=DB845c
Thanks,
srini
Changes since v2:
- Updated mfd driver as suggested by Lee.
- Updated bindings as suggested by Rob.
- Addressed various comments by Cezary Rojewski
- Cleaned up code a bit.
Srinivas Kandagatla (10):
ASoC: dt-bindings: add dt bindings for WCD9340/WCD9341 audio codec
mfd: wcd934x: add support to wcd9340/wcd9341 codec
ASoC: wcd934x: add support to wcd9340/wcd9341 codec
ASoC: wcd934x: add basic controls
ASoC: wcd934x: add playback dapm widgets
ASoC: wcd934x: add capture dapm widgets
ASoC: wcd934x: add audio routings
dt-bindings: pinctrl: qcom-wcd934x: Add bindings for gpio
ASoC: qcom: dt-bindings: Add compatible for DB845c and Lenovo Yoga
ASoC: qcom: sdm845: add support to DB845c and Lenovo Yoga
Yeleswarapu Nagaradhesh (1):
pinctrl: qcom-wcd934x: Add support to wcd934x pinctrl driver.
.../pinctrl/qcom,wcd934x-pinctrl.yaml | 52 +
.../devicetree/bindings/sound/qcom,sdm845.txt | 5 +-
.../bindings/sound/qcom,wcd934x.yaml | 162 +
drivers/mfd/Kconfig | 12 +
drivers/mfd/Makefile | 1 +
drivers/mfd/wcd934x.c | 306 +
drivers/pinctrl/qcom/Kconfig | 7 +
drivers/pinctrl/qcom/Makefile | 1 +
drivers/pinctrl/qcom/pinctrl-wcd934x-gpio.c | 365 ++
include/linux/mfd/wcd934x/registers.h | 529 ++
include/linux/mfd/wcd934x/wcd934x.h | 31 +
sound/soc/codecs/Kconfig | 10 +
sound/soc/codecs/Makefile | 2 +
sound/soc/codecs/wcd934x.c | 5084 +++++++++++++++++
sound/soc/qcom/sdm845.c | 86 +-
15 files changed, 6651 insertions(+), 2 deletions(-)
create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,wcd934x-pinctrl.yaml
create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml
create mode 100644 drivers/mfd/wcd934x.c
create mode 100644 drivers/pinctrl/qcom/pinctrl-wcd934x-gpio.c
create mode 100644 include/linux/mfd/wcd934x/registers.h
create mode 100644 include/linux/mfd/wcd934x/wcd934x.h
create mode 100644 sound/soc/codecs/wcd934x.c
--
2.21.0
5
24

11 Nov '19
Hi
>
> Hi Shengjiu,
>
> Comments inline.
>
> On Wed, Nov 6, 2019 at 9:30 AM Shengjiu Wang <shengjiu.wang(a)nxp.com>
> wrote:
> >
> > Audmix support two substream, When two substream start to run, the
> > trigger function may be called by two substream in same time, that the
> > priv->tdms may be updated wrongly.
> >
> > The expected priv->tdms is 0x3, but sometimes the result is 0x2, or
> > 0x1.
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang(a)nxp.com>
> > ---
> > sound/soc/fsl/fsl_audmix.c | 6 ++++++ sound/soc/fsl/fsl_audmix.h | 1
> > +
> > 2 files changed, 7 insertions(+)
> >
> > diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c
> > index c7e4e9757dce..a1db1bce330f 100644
> > --- a/sound/soc/fsl/fsl_audmix.c
> > +++ b/sound/soc/fsl/fsl_audmix.c
> > @@ -286,6 +286,7 @@ static int fsl_audmix_dai_trigger(struct
> snd_pcm_substream *substream, int cmd,
> > struct snd_soc_dai *dai) {
> > struct fsl_audmix *priv = snd_soc_dai_get_drvdata(dai);
> > + unsigned long lock_flags;
> >
> > /* Capture stream shall not be handled */
> > if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
> > @@ -295,12 +296,16 @@ static int fsl_audmix_dai_trigger(struct
> snd_pcm_substream *substream, int cmd,
> > case SNDRV_PCM_TRIGGER_START:
> > case SNDRV_PCM_TRIGGER_RESUME:
> > case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
> > + spin_lock_irqsave(&priv->lock, lock_flags);
>
> Why do we need to disable interrupts here? I assume that lock is only
> used in process context.
>
It is in atomic context, so I think it is ok to disable interrupt.
Best regards
Wang shengjiu
2
1

11 Nov '19
Audmix support two substream, When two substream start
to run, the trigger function may be called by two substream
in same time, that the priv->tdms may be updated wrongly.
The expected priv->tdms is 0x3, but sometimes the
result is 0x2, or 0x1.
Fixes: be1df61cf06e ("ASoC: fsl: Add Audio Mixer CPU DAI driver")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Shengjiu Wang <shengjiu.wang(a)nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka(a)gmail.com>
---
Change in v2
-add Fixes, Cc stable, and Acked-by.
sound/soc/fsl/fsl_audmix.c | 6 ++++++
sound/soc/fsl/fsl_audmix.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c
index c7e4e9757dce..a1db1bce330f 100644
--- a/sound/soc/fsl/fsl_audmix.c
+++ b/sound/soc/fsl/fsl_audmix.c
@@ -286,6 +286,7 @@ static int fsl_audmix_dai_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai)
{
struct fsl_audmix *priv = snd_soc_dai_get_drvdata(dai);
+ unsigned long lock_flags;
/* Capture stream shall not be handled */
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
@@ -295,12 +296,16 @@ static int fsl_audmix_dai_trigger(struct snd_pcm_substream *substream, int cmd,
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+ spin_lock_irqsave(&priv->lock, lock_flags);
priv->tdms |= BIT(dai->driver->id);
+ spin_unlock_irqrestore(&priv->lock, lock_flags);
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+ spin_lock_irqsave(&priv->lock, lock_flags);
priv->tdms &= ~BIT(dai->driver->id);
+ spin_unlock_irqrestore(&priv->lock, lock_flags);
break;
default:
return -EINVAL;
@@ -491,6 +496,7 @@ static int fsl_audmix_probe(struct platform_device *pdev)
return PTR_ERR(priv->ipg_clk);
}
+ spin_lock_init(&priv->lock);
platform_set_drvdata(pdev, priv);
pm_runtime_enable(dev);
diff --git a/sound/soc/fsl/fsl_audmix.h b/sound/soc/fsl/fsl_audmix.h
index 7812ffec45c5..479f05695d53 100644
--- a/sound/soc/fsl/fsl_audmix.h
+++ b/sound/soc/fsl/fsl_audmix.h
@@ -96,6 +96,7 @@ struct fsl_audmix {
struct platform_device *pdev;
struct regmap *regmap;
struct clk *ipg_clk;
+ spinlock_t lock; /* Protect tdms */
u8 tdms;
};
--
2.21.0
2
1

[alsa-devel] [PATCH v2 0/8] ALSA: aloop: Support sound timer as clock source instead of jiffies
by Andrew Gabbasov 11 Nov '19
by Andrew Gabbasov 11 Nov '19
11 Nov '19
This patch set is an updated version of patches by Timo Wischer:
https://mailman.alsa-project.org/pipermail/alsa-devel/2019-March/146871.html
This patch set is required for forwarding audio data between a HW sound
card and an aloop device without the usage of an asynchronous sample rate
converter.
Most of sound and timers related code is kept the same as in previous set.
The code, related to snd_pcm_link() functionality and its using for
timer source setting, is removed (as rejected earlier). The changes in this
update are mainly related to the parameters handling and some cleanup.
The timer source can be initially selected by "timer_source" kernel module
parameter. It is supposed to have the following format:
[<pref>:](<card name>|<card idx>)[{.,}<dev idx>[{.,}<subdev idx>]]
For example: "hw:I82801AAICH.1.0", or "1.1", or just "I82801AAICH".
(Prefix is ignored, just allowed here to be able to use the strings,
the user got used to).
Although the parsing function recognizes both '.' and ',' as a separator,
module parameters handling routines use ',' to separate parameters for
different module instances (array elements), so we have to use '.'
to separate device and subdevice numbers from the card name or number
in module parameters.
Empty string indicates using jiffies as a timer source.
Besides "static" selection of timer source at module load time,
it is possible to dynamically change it via sound "info" interface
(using "/proc/asound/<card>/timer_source" file in read-write mode.
The contents of this file is used as a timer source string for
a particular loopback card, e.g. "hw:0,0,0" (and here ',' can be used
as a separator).
The timer source string value can be changed at any time, but it is
latched by PCM substream open callback "loopback_open()" (the first
one for a particular cable). At this point it is actually used,
that is the string is parsed, and the timer is looked up and opened.
This seems to be a good trade-off between flexibility of updates and
synchronizations or racing complexity.
The timer source is set for a loopback card (the same as initial setting
by module parameter), but every cable uses the value, current at the moment
of opening. Theoretically, it's possible to set the timer source for each
cable independently (via separate files), but it would be inconsistent
with the initial setting via module parameters on a per-card basis.
Andrew Gabbasov (1):
ALSA: aloop: Support runtime change of snd_timer via info interface
Timo Wischer (7):
ALSA: aloop: Describe units of variables
ALSA: aloop: loopback_timer_start: Support return of error code
ALSA: aloop: loopback_timer_stop: Support return of error code
ALSA: aloop: Use callback functions for timer specific implementations
ALSA: aloop: Rename all jiffies timer specific functions
ALSA: aloop: Move CABLE_VALID_BOTH to the top of file
ALSA: aloop: Support selection of snd_timer instead of jiffies
sound/drivers/aloop.c | 656 +++++++++++++++++++++++++++++++++++++++---
1 file changed, 621 insertions(+), 35 deletions(-)
--
2.21.0
4
19
Add HD Audio Device PCI ID for the Intel Cometlake-S platform
Signed-off-by: Chiou, Cooper <cooper.chiou(a)intel.com>
---
sound/pci/hda/hda_intel.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index cf53fbd872ee..c52419376c74 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2396,6 +2396,9 @@ static const struct pci_device_id azx_ids[] = {
/* CometLake-H */
{ PCI_DEVICE(0x8086, 0x06C8),
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
+ /* CometLake-S */
+ { PCI_DEVICE(0x8086, 0xa3f0),
+ .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
/* Icelake */
{ PCI_DEVICE(0x8086, 0x34c8),
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
--
2.17.1
2
1

Re: [alsa-devel] [PATCH V2 1/2] ASoC: dt-bindings: fsl_asrc: add compatible string for imx8qm
by S.j. Wang 11 Nov '19
by S.j. Wang 11 Nov '19
11 Nov '19
Hi Rob, Nicolin
>
> Hi Rob
> >
> > On Wed, Oct 30, 2019 at 07:41:26PM +0800, Shengjiu Wang wrote:
> > > In order to support the two asrc modules in imx8qm, we need to add
> > > compatible string "fsl,imx8qm-asrc0" and "fsl,imx8qm-asrc1"
> >
> > Are the blocks different in some way?
> >
> > If not, why do you need to distinguish them?
> >
> The internal clock mapping is different for each module.
>
> Or we can use one compatible string, but need add another property
> "fsl,asrc-clk-map" to distinguish the different clock map.
>
> The change is in below.
>
> Which one do you think is better?
>
> Required properties:
>
> - - compatible : Contains "fsl,imx35-asrc" or "fsl,imx53-asrc".
> + - compatible : Contains "fsl,imx35-asrc", "fsl,imx53-asrc",
> + "fsl,imx8qm-asrc".
>
> - reg : Offset and length of the register set for the device.
>
> @@ -35,6 +36,11 @@ Required properties:
>
> - fsl,asrc-width : Defines a mutual sample width used by DPCM Back
> Ends.
>
> + - fsl,asrc-clk-map : Defines clock map used in driver. which is required
> + by imx8qm
> + <0> - select the map for asrc0
> + <1> - select the map for asrc1
> +
> Optional properties:
>
I will do a update for this change in v3.
Best regards
Wang shengjiu
1
0
Hello,
syzbot found the following crash on:
HEAD commit: d86c1556 kmsan: add printk_test()
git tree: https://github.com/google/kmsan.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=16c4ef54e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=c07a3d4f8a59e198
dashboard link: https://syzkaller.appspot.com/bug?extid=8f2612936028bfd28f28
compiler: clang version 9.0.0 (/home/glider/llvm/clang
80fee25776c2fb61e74c1ecb1a523375c2500b69)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11b96c4ce00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11a51ca8e00000
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+8f2612936028bfd28f28(a)syzkaller.appspotmail.com
usb 1-1: New USB device found, idVendor=1d6b, idProduct=0101, bcdDevice=
0.40
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: syz
usb 1-1: Manufacturer: syz
usb 1-1: SerialNumber: syz
=====================================================
BUG: KMSAN: uninit-value in get_term_name+0x1b7/0xad0 sound/usb/mixer.c:652
CPU: 1 PID: 30 Comm: kworker/1:1 Not tainted 5.4.0-rc3+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: usb_hub_wq hub_event
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x191/0x1f0 lib/dump_stack.c:113
kmsan_report+0x128/0x220 mm/kmsan/kmsan_report.c:108
__msan_warning+0x73/0xe0 mm/kmsan/kmsan_instr.c:245
get_term_name+0x1b7/0xad0 sound/usb/mixer.c:652
__build_feature_ctl+0x11f1/0x29e0 sound/usb/mixer.c:1628
build_feature_ctl sound/usb/mixer.c:1709 [inline]
parse_audio_feature_unit sound/usb/mixer.c:1921 [inline]
parse_audio_unit+0x2308/0x7490 sound/usb/mixer.c:2753
snd_usb_mixer_controls sound/usb/mixer.c:3095 [inline]
snd_usb_create_mixer+0x1d7c/0x4070 sound/usb/mixer.c:3445
usb_audio_probe+0x286b/0x3eb0 sound/usb/card.c:653
usb_probe_interface+0xd19/0x1310 drivers/usb/core/driver.c:361
really_probe+0xd91/0x1f90 drivers/base/dd.c:552
driver_probe_device+0x1ba/0x510 drivers/base/dd.c:721
__device_attach_driver+0x5b8/0x790 drivers/base/dd.c:828
bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:430
__device_attach+0x489/0x750 drivers/base/dd.c:894
device_initial_probe+0x4a/0x60 drivers/base/dd.c:941
bus_probe_device+0x131/0x390 drivers/base/bus.c:490
device_add+0x25b5/0x2df0 drivers/base/core.c:2201
usb_set_configuration+0x309f/0x3710 drivers/usb/core/message.c:2027
generic_probe+0xe7/0x280 drivers/usb/core/generic.c:210
usb_probe_device+0x146/0x200 drivers/usb/core/driver.c:266
really_probe+0xd91/0x1f90 drivers/base/dd.c:552
driver_probe_device+0x1ba/0x510 drivers/base/dd.c:721
__device_attach_driver+0x5b8/0x790 drivers/base/dd.c:828
bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:430
__device_attach+0x489/0x750 drivers/base/dd.c:894
device_initial_probe+0x4a/0x60 drivers/base/dd.c:941
bus_probe_device+0x131/0x390 drivers/base/bus.c:490
device_add+0x25b5/0x2df0 drivers/base/core.c:2201
usb_new_device+0x23e5/0x2fb0 drivers/usb/core/hub.c:2536
hub_port_connect drivers/usb/core/hub.c:5098 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5213 [inline]
port_event drivers/usb/core/hub.c:5359 [inline]
hub_event+0x581d/0x72f0 drivers/usb/core/hub.c:5441
process_one_work+0x1572/0x1ef0 kernel/workqueue.c:2269
worker_thread+0x111b/0x2460 kernel/workqueue.c:2415
kthread+0x4b5/0x4f0 kernel/kthread.c:256
ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355
Uninit was stored to memory at:
kmsan_save_stack_with_flags mm/kmsan/kmsan.c:151 [inline]
kmsan_internal_chain_origin+0xbd/0x180 mm/kmsan/kmsan.c:319
__msan_chain_origin+0x6b/0xd0 mm/kmsan/kmsan_instr.c:179
parse_term_proc_unit+0x73d/0x7e0 sound/usb/mixer.c:896
__check_input_term+0x13ef/0x2360 sound/usb/mixer.c:989
check_input_term sound/usb/mixer.c:1008 [inline]
parse_audio_feature_unit sound/usb/mixer.c:1875 [inline]
parse_audio_unit+0x1478/0x7490 sound/usb/mixer.c:2753
snd_usb_mixer_controls sound/usb/mixer.c:3095 [inline]
snd_usb_create_mixer+0x1d7c/0x4070 sound/usb/mixer.c:3445
usb_audio_probe+0x286b/0x3eb0 sound/usb/card.c:653
usb_probe_interface+0xd19/0x1310 drivers/usb/core/driver.c:361
really_probe+0xd91/0x1f90 drivers/base/dd.c:552
driver_probe_device+0x1ba/0x510 drivers/base/dd.c:721
__device_attach_driver+0x5b8/0x790 drivers/base/dd.c:828
bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:430
__device_attach+0x489/0x750 drivers/base/dd.c:894
device_initial_probe+0x4a/0x60 drivers/base/dd.c:941
bus_probe_device+0x131/0x390 drivers/base/bus.c:490
device_add+0x25b5/0x2df0 drivers/base/core.c:2201
usb_set_configuration+0x309f/0x3710 drivers/usb/core/message.c:2027
generic_probe+0xe7/0x280 drivers/usb/core/generic.c:210
usb_probe_device+0x146/0x200 drivers/usb/core/driver.c:266
really_probe+0xd91/0x1f90 drivers/base/dd.c:552
driver_probe_device+0x1ba/0x510 drivers/base/dd.c:721
__device_attach_driver+0x5b8/0x790 drivers/base/dd.c:828
bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:430
__device_attach+0x489/0x750 drivers/base/dd.c:894
device_initial_probe+0x4a/0x60 drivers/base/dd.c:941
bus_probe_device+0x131/0x390 drivers/base/bus.c:490
device_add+0x25b5/0x2df0 drivers/base/core.c:2201
usb_new_device+0x23e5/0x2fb0 drivers/usb/core/hub.c:2536
hub_port_connect drivers/usb/core/hub.c:5098 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5213 [inline]
port_event drivers/usb/core/hub.c:5359 [inline]
hub_event+0x581d/0x72f0 drivers/usb/core/hub.c:5441
process_one_work+0x1572/0x1ef0 kernel/workqueue.c:2269
worker_thread+0x111b/0x2460 kernel/workqueue.c:2415
kthread+0x4b5/0x4f0 kernel/kthread.c:256
ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355
Uninit was created at:
kmsan_save_stack_with_flags mm/kmsan/kmsan.c:151 [inline]
kmsan_internal_poison_shadow+0x60/0x120 mm/kmsan/kmsan.c:134
kmsan_slab_alloc+0xaa/0x120 mm/kmsan/kmsan_hooks.c:88
slab_alloc_node mm/slub.c:2792 [inline]
slab_alloc mm/slub.c:2801 [inline]
__kmalloc+0x28e/0x430 mm/slub.c:3832
kmalloc include/linux/slab.h:561 [inline]
usb_get_configuration+0x50d/0x76a0 drivers/usb/core/config.c:857
usb_enumerate_device drivers/usb/core/hub.c:2369 [inline]
usb_new_device+0x224/0x2fb0 drivers/usb/core/hub.c:2505
hub_port_connect drivers/usb/core/hub.c:5098 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5213 [inline]
port_event drivers/usb/core/hub.c:5359 [inline]
hub_event+0x581d/0x72f0 drivers/usb/core/hub.c:5441
process_one_work+0x1572/0x1ef0 kernel/workqueue.c:2269
worker_thread+0x111b/0x2460 kernel/workqueue.c:2415
kthread+0x4b5/0x4f0 kernel/kthread.c:256
ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355
=====================================================
---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller(a)googlegroups.com.
syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches
5
7

[alsa-devel] [PATCH] ASoC: simple-card: switch to yaml base Documentation
by Kuninori Morimoto 11 Nov '19
by Kuninori Morimoto 11 Nov '19
11 Nov '19
From: Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
This patch switches from .txt base to .yaml base Document.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
---
.../devicetree/bindings/sound/simple-card.txt | 351 ---------------
.../devicetree/bindings/sound/simple-card.yaml | 472 +++++++++++++++++++++
2 files changed, 472 insertions(+), 351 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sound/simple-card.txt
create mode 100644 Documentation/devicetree/bindings/sound/simple-card.yaml
diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
deleted file mode 100644
index 79954cd6..0000000
--- a/Documentation/devicetree/bindings/sound/simple-card.txt
+++ /dev/null
@@ -1,351 +0,0 @@
-Simple-Card:
-
-Simple-Card specifies audio DAI connections of SoC <-> codec.
-
-Required properties:
-
-- compatible : "simple-audio-card"
-
-Optional properties:
-
-- simple-audio-card,name : User specified audio sound card name, one string
- property.
-- simple-audio-card,widgets : Please refer to widgets.txt.
-- simple-audio-card,routing : A list of the connections between audio components.
- Each entry is a pair of strings, the first being the
- connection's sink, the second being the connection's
- source.
-- simple-audio-card,mclk-fs : Multiplication factor between stream rate and codec
- mclk. When defined, mclk-fs property defined in
- dai-link sub nodes are ignored.
-- simple-audio-card,hp-det-gpio : Reference to GPIO that signals when
- headphones are attached.
-- simple-audio-card,mic-det-gpio : Reference to GPIO that signals when
- a microphone is attached.
-- simple-audio-card,aux-devs : List of phandles pointing to auxiliary devices, such
- as amplifiers, to be added to the sound card.
-- simple-audio-card,pin-switches : List of strings containing the widget names for
- which pin switches must be created.
-
-Optional subnodes:
-
-- simple-audio-card,dai-link : Container for dai-link level
- properties and the CPU and CODEC
- sub-nodes. This container may be
- omitted when the card has only one
- DAI link. See the examples and the
- section below.
-
-Dai-link subnode properties and subnodes:
-
-If dai-link subnode is omitted and the subnode properties are directly
-under "sound"-node the subnode property and subnode names have to be
-prefixed with "simple-audio-card,"-prefix.
-
-Required dai-link subnodes:
-
-- cpu : CPU sub-node
-- codec : CODEC sub-node
-
-Optional dai-link subnode properties:
-
-- format : CPU/CODEC common audio format.
- "i2s", "right_j", "left_j" , "dsp_a"
- "dsp_b", "ac97", "pdm", "msb", "lsb"
-- frame-master : Indicates dai-link frame master.
- phandle to a cpu or codec subnode.
-- bitclock-master : Indicates dai-link bit clock master.
- phandle to a cpu or codec subnode.
-- bitclock-inversion : bool property. Add this if the
- dai-link uses bit clock inversion.
-- frame-inversion : bool property. Add this if the
- dai-link uses frame clock inversion.
-- mclk-fs : Multiplication factor between stream
- rate and codec mclk, applied only for
- the dai-link.
-
-For backward compatibility the frame-master and bitclock-master
-properties can be used as booleans in codec subnode to indicate if the
-codec is the dai-link frame or bit clock master. In this case there
-should be no dai-link node, the same properties should not be present
-at sound-node level, and the bitclock-inversion and frame-inversion
-properties should also be placed in the codec node if needed.
-
-Required CPU/CODEC subnodes properties:
-
-- sound-dai : phandle and port of CPU/CODEC
-
-Optional CPU/CODEC subnodes properties:
-
-- dai-tdm-slot-num : Please refer to tdm-slot.txt.
-- dai-tdm-slot-width : Please refer to tdm-slot.txt.
-- clocks / system-clock-frequency : specify subnode's clock if needed.
- it can be specified via "clocks" if system has
- clock node (= common clock), or "system-clock-frequency"
- (if system doens't support common clock)
- If a clock is specified, it is
- enabled with clk_prepare_enable()
- in dai startup() and disabled with
- clk_disable_unprepare() in dai
- shutdown().
- If a clock is specified and a
- multiplication factor is given with
- mclk-fs, the clock will be set to the
- calculated mclk frequency when the
- stream starts.
-- system-clock-direction-out : specifies clock direction as 'out' on
- initialization. It is useful for some aCPUs with
- fixed clocks.
-
--------------------------------------------
-Example 1 - single DAI link:
--------------------------------------------
-
-sound {
- compatible = "simple-audio-card";
- simple-audio-card,name = "VF610-Tower-Sound-Card";
- simple-audio-card,format = "left_j";
- simple-audio-card,bitclock-master = <&dailink0_master>;
- simple-audio-card,frame-master = <&dailink0_master>;
- simple-audio-card,widgets =
- "Microphone", "Microphone Jack",
- "Headphone", "Headphone Jack",
- "Speaker", "External Speaker";
- simple-audio-card,routing =
- "MIC_IN", "Microphone Jack",
- "Headphone Jack", "HP_OUT",
- "External Speaker", "LINE_OUT";
-
- simple-audio-card,cpu {
- sound-dai = <&sh_fsi2 0>;
- };
-
- dailink0_master: simple-audio-card,codec {
- sound-dai = <&ak4648>;
- clocks = <&osc>;
- };
-};
-
-&i2c0 {
- ak4648: ak4648@12 {
- #sound-dai-cells = <0>;
- compatible = "asahi-kasei,ak4648";
- reg = <0x12>;
- };
-};
-
-sh_fsi2: sh_fsi2@ec230000 {
- #sound-dai-cells = <1>;
- compatible = "renesas,sh_fsi2";
- reg = <0xec230000 0x400>;
- interrupt-parent = <&gic>;
- interrupts = <0 146 0x4>;
-};
-
--------------------------------------------
-Example 2 - many DAI links:
--------------------------------------------
-
-sound {
- compatible = "simple-audio-card";
- simple-audio-card,name = "Cubox Audio";
-
- simple-audio-card,dai-link@0 { /* I2S - HDMI */
- reg = <0>;
- format = "i2s";
- cpu {
- sound-dai = <&audio1 0>;
- };
- codec {
- sound-dai = <&tda998x 0>;
- };
- };
-
- simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
- reg = <1>;
- cpu {
- sound-dai = <&audio1 1>;
- };
- codec {
- sound-dai = <&tda998x 1>;
- };
- };
-
- simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
- reg = <2>;
- cpu {
- sound-dai = <&audio1 1>;
- };
- codec {
- sound-dai = <&spdif_codec>;
- };
- };
-};
-
--------------------------------------------
-Example 3 - route audio from IMX6 SSI2 through TLV320DAC3100 codec
-through TPA6130A2 amplifier to headphones:
--------------------------------------------
-
-&i2c0 {
- codec: tlv320dac3100@18 {
- compatible = "ti,tlv320dac3100";
- ...
- }
-
- amp: tpa6130a2@60 {
- compatible = "ti,tpa6130a2";
- ...
- }
-}
-
-sound {
- compatible = "simple-audio-card";
- ...
- simple-audio-card,widgets =
- "Headphone", "Headphone Jack";
- simple-audio-card,routing =
- "Headphone Jack", "HPLEFT",
- "Headphone Jack", "HPRIGHT",
- "LEFTIN", "HPL",
- "RIGHTIN", "HPR";
- simple-audio-card,aux-devs = <&>;
- simple-audio-card,cpu {
- sound-dai = <&ssi2>;
- };
- simple-audio-card,codec {
- sound-dai = <&codec>;
- clocks = ...
- };
-};
-
--------------------------------------------
-Example 4. Sampling Rate Conversion
--------------------------------------------
-
-sound {
- compatible = "simple-audio-card";
-
- simple-audio-card,name = "rsnd-ak4643";
- simple-audio-card,format = "left_j";
- simple-audio-card,bitclock-master = <&sndcodec>;
- simple-audio-card,frame-master = <&sndcodec>;
-
- simple-audio-card,convert-rate = <48000>;
-
- simple-audio-card,prefix = "ak4642";
- simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
- "DAI0 Capture", "ak4642 Capture";
-
- sndcpu: simple-audio-card,cpu {
- sound-dai = <&rcar_sound>;
- };
-
- sndcodec: simple-audio-card,codec {
- sound-dai = <&ak4643>;
- system-clock-frequency = <11289600>;
- };
-};
-
--------------------------------------------
-Example 5. 2 CPU 1 Codec (Mixing)
--------------------------------------------
-sound {
- compatible = "simple-audio-card";
-
- simple-audio-card,name = "rsnd-ak4643";
- simple-audio-card,format = "left_j";
- simple-audio-card,bitclock-master = <&dpcmcpu>;
- simple-audio-card,frame-master = <&dpcmcpu>;
-
- simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
- "ak4642 Playback", "DAI1 Playback";
-
- dpcmcpu: cpu@0 {
- sound-dai = <&rcar_sound 0>;
- };
-
- cpu@1 {
- sound-dai = <&rcar_sound 1>;
- };
-
- codec {
- prefix = "ak4642";
- sound-dai = <&ak4643>;
- clocks = <&audio_clock>;
- };
-};
-
--------------------------------------------
-Example 6 - many DAI links with DPCM:
--------------------------------------------
-
-CPU0 ------ ak4613
-CPU1 ------ PCM3168A-p /* DPCM 1ch/2ch */
-CPU2 --/ /* DPCM 3ch/4ch */
-CPU3 --/ /* DPCM 5ch/6ch */
-CPU4 --/ /* DPCM 7ch/8ch */
-CPU5 ------ PCM3168A-c
-
-sound {
- compatible = "simple-audio-card";
-
- simple-audio-card,routing =
- "pcm3168a Playback", "DAI1 Playback",
- "pcm3168a Playback", "DAI2 Playback",
- "pcm3168a Playback", "DAI3 Playback",
- "pcm3168a Playback", "DAI4 Playback";
-
- simple-audio-card,dai-link@0 {
- format = "left_j";
- bitclock-master = <&sndcpu0>;
- frame-master = <&sndcpu0>;
-
- sndcpu0: cpu {
- sound-dai = <&rcar_sound 0>;
- };
- codec {
- sound-dai = <&ak4613>;
- };
- };
- simple-audio-card,dai-link@1 {
- format = "i2s";
- bitclock-master = <&sndcpu1>;
- frame-master = <&sndcpu1>;
-
- convert-channels = <8>; /* TDM Split */
-
- sndcpu1: cpu@0 {
- sound-dai = <&rcar_sound 1>;
- };
- cpu@1 {
- sound-dai = <&rcar_sound 2>;
- };
- cpu@2 {
- sound-dai = <&rcar_sound 3>;
- };
- cpu@3 {
- sound-dai = <&rcar_sound 4>;
- };
- codec {
- mclk-fs = <512>;
- prefix = "pcm3168a";
- dai-tdm-slot-num = <8>;
- sound-dai = <&pcm3168a 0>;
- };
- };
- simple-audio-card,dai-link@2 {
- format = "i2s";
- bitclock-master = <&sndcpu2>;
- frame-master = <&sndcpu2>;
-
- sndcpu2: cpu {
- sound-dai = <&rcar_sound 5>;
- };
- codec {
- mclk-fs = <512>;
- prefix = "pcm3168a";
- sound-dai = <&pcm3168a 1>;
- };
- };
-};
diff --git a/Documentation/devicetree/bindings/sound/simple-card.yaml b/Documentation/devicetree/bindings/sound/simple-card.yaml
new file mode 100644
index 0000000..ac3975f
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/simple-card.yaml
@@ -0,0 +1,472 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/simple-card.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Simple Audio Card Driver Device Tree Bindings
+
+maintainers:
+ - Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
+
+definitions:
+
+ frame-master:
+ description: Indicates dai-link frame master.
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+
+ bitclock-master:
+ description: Indicates dai-link bit clock master
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+
+ frame-inversion:
+ description: dai-link uses frame clock inversion
+ $ref: /schemas/types.yaml#/definitions/flag
+
+ bitclock-inversion:
+ description: dai-link uses bit clock inversion
+ $ref: /schemas/types.yaml#/definitions/flag
+
+ mclk-fs:
+ description: |
+ Multiplication factor between stream rate and codec mclk.
+ When defined, mclk-fs property defined in dai-link sub nodes are ignored.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ hp-det-gpio:
+ description: |
+ Reference to GPIO that signals when headphones are attached.
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ aux-devs:
+ description: |
+ List of phandles pointing to auxiliary devices, such
+ as amplifiers, to be added to the sound card.
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+
+ mic-det-gpio:
+ description: |
+ Reference to GPIO that signals when a microphone is attached.
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ convert-rate:
+ description: CPU to Codec rate convert.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ convert-channels:
+ description: CPU to Codec rate channels.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ prefix:
+ description: "device name prefix"
+ $ref: /schemas/types.yaml#/definitions/string
+
+ pin-switches:
+ description: the widget names for which pin switches must be created.
+ $ref: /schemas/types.yaml#/definitions/string-array
+
+ format:
+ description: audio format.
+ oneOf:
+ - items:
+ enum:
+ - i2s
+ - right_j
+ - left_j
+ - dsp_a
+ - dsp_b
+ - ac97
+ - pdm
+ - msb
+ - lsb
+
+ dai:
+ type: object
+ properties:
+ sound-dai:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+
+ # common properties
+ mclk-fs:
+ $ref: "#/definitions/mclk-fs"
+ prefix:
+ $ref: "#/definitions/prefix"
+ frame-inversion:
+ $ref: "#/definitions/frame-inversion"
+ bitclock-inversion:
+ $ref: "#/definitions/bitclock-inversion"
+ frame-master:
+ $ref: /schemas/types.yaml#/definitions/flag
+ bitclock-master:
+ $ref: /schemas/types.yaml#/definitions/flag
+
+ dai-tdm-slot-num:
+ description: see tdm-slot.txt.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ dai-tdm-slot-width:
+ description: see tdm-slot.txt.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ clocks:
+ description: |
+ If a clock is specified and a multiplication factor is given with
+ mclk-fs, the clock will be set to the calculated mclk frequency
+ when the stream starts.
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ system-clock-frequency:
+ description: |
+ If a clock is specified and a multiplication factor is given with
+ mclk-fs, the clock will be set to the calculated mclk frequency
+ when the stream starts.
+ $ref: /schemas/types.yaml#/definitions/uint32
+ system-clock-direction-out:
+ description: |
+ specifies clock direction as 'out' on initialization.
+ It is useful for some aCPUs with fixed clocks.
+ $ref: /schemas/types.yaml#/definitions/flag
+ required:
+ - sound-dai
+
+properties:
+ compatible:
+ contains:
+ enum:
+ - simple-audio-card
+ - simple-scu-audio-card
+
+ "#address-cells": true
+ "#size-cells": true
+
+ simple-audio-card,name:
+ description: User specified audio sound card name.
+ $ref: /schemas/types.yaml#/definitions/string
+
+ simple-audio-card,widgets:
+ description: User specified audio sound card name.
+ $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+
+ simple-audio-card,routing:
+ description: |
+ A list of the connections between audio components.
+ Each entry is a pair of strings, the first being the
+ connection's sink, the second being the connection's source.
+ $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+
+patternProperties:
+ "^simple-audio-card,cpu.*":
+ description: CPU node
+ $ref: "#/definitions/dai"
+ "^simple-audio-card,codec.*":
+ description: CPU node
+ $ref: "#/definitions/dai"
+
+ # common properties
+ "^simple-audio-card,frame-master$":
+ $ref: "#/definitions/frame-master"
+ "^simple-audio-card,bitclock-master$":
+ $ref: "#/definitions/bitclock-master"
+ "^simple-audio-card,frame-inversion$":
+ $ref: "#/definitions/frame-inversion"
+ "^simple-audio-card,bitclock-inversion$":
+ $ref: "#/definitions/bitclock-inversion"
+ "^simple-audio-card,format$":
+ $ref: "#/definitions/format"
+ "^simple-audio-card,mclk-fs$":
+ $ref: "#/definitions/mclk-fs"
+ "^simple-audio-card,hp-det-gpio$":
+ $ref: "#/definitions/hp-det-gpio"
+ "^simple-audio-card,mic-det-gpio$":
+ $ref: "#/definitions/mic-det-gpio"
+ "^simple-audio-card,aux-devs$":
+ $ref: "#/definitions/aux-devs"
+ "^simple-audio-card,convert-rate$":
+ $ref: "#/definitions/convert-rate"
+ "^simple-audio-card,convert-channels$":
+ $ref: "#/definitions/convert-channels"
+ "^simple-audio-card,prefix$":
+ $ref: "#/definitions/prefix"
+ "^simple-audio-card,pin-switches$":
+ $ref: "#/definitions/pin-switches"
+
+ "^simple-audio-card,dai-link":
+ description: |
+ Container for dai-link level properties and the CPU and CODEC sub-nodes.
+ This container may be omitted when the card has only one DAI link.
+ type: object
+ properties:
+ reg:
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ # common properties
+ frame-master:
+ $ref: "#/definitions/frame-master"
+ bitclock-master:
+ $ref: "#/definitions/bitclock-master"
+ frame-inversion:
+ $ref: "#/definitions/frame-inversion"
+ bitclock-inversion:
+ $ref: "#/definitions/bitclock-inversion"
+ format:
+ $ref: "#/definitions/format"
+ mclk-fs:
+ $ref: "#/definitions/mclk-fs"
+ hp-det-gpio:
+ $ref: "#/definitions/hp-det-gpio"
+ mic-det-gpio:
+ $ref: "#/definitions/mic-det-gpio"
+ aux-devs:
+ $ref: "#/definitions/aux-devs"
+ convert-rate:
+ $ref: "#/definitions/convert-rate"
+ convert-channels:
+ $ref: "#/definitions/convert-channels"
+ prefix:
+ $ref: "#/definitions/prefix"
+ pin-switches:
+ $ref: "#/definitions/pin-switches"
+
+ patternProperties:
+ "^cpu.*":
+ $ref: "#/definitions/dai"
+ "^codec.*":
+ $ref: "#/definitions/dai"
+ additionalProperties: false
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+#--------------------
+# single DAI link
+#--------------------
+ - |
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "VF610-Tower-Sound-Card";
+ simple-audio-card,format = "left_j";
+ simple-audio-card,bitclock-master = <&dailink0_master>;
+ simple-audio-card,frame-master = <&dailink0_master>;
+ simple-audio-card,widgets =
+ "Microphone", "Microphone Jack",
+ "Headphone", "Headphone Jack",
+ "Speaker", "External Speaker";
+ simple-audio-card,routing =
+ "MIC_IN", "Microphone Jack",
+ "Headphone Jack", "HP_OUT",
+ "External Speaker", "LINE_OUT";
+
+ simple-audio-card,cpu {
+ sound-dai = <&sh_fsi2 0>;
+ };
+
+ dailink0_master: simple-audio-card,codec {
+ sound-dai = <&ak4648>;
+ clocks = <&osc>;
+ };
+ };
+
+#--------------------
+# Multi DAI links
+#--------------------
+ - |
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "Cubox Audio";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ simple-audio-card,dai-link@0 { /* I2S - HDMI */
+ reg = <0>;
+ format = "i2s";
+ cpu {
+ sound-dai = <&audio0>;
+ };
+ codec {
+ sound-dai = <&tda998x0>;
+ };
+ };
+
+ simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
+ reg = <1>;
+ cpu {
+ sound-dai = <&audio1>;
+ };
+ codec {
+ sound-dai = <&tda998x1>;
+ };
+ };
+
+ simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
+ reg = <2>;
+ cpu {
+ sound-dai = <&audio2>;
+ };
+ codec {
+ sound-dai = <&spdif_codec>;
+ };
+ };
+ };
+
+#--------------------
+# route audio from IMX6 SSI2 through TLV320DAC3100 codec
+# through TPA6130A2 amplifier to headphones:
+#--------------------
+ - |
+ sound {
+ compatible = "simple-audio-card";
+
+ simple-audio-card,widgets =
+ "Headphone", "Headphone Jack";
+ simple-audio-card,routing =
+ "Headphone Jack", "HPLEFT",
+ "Headphone Jack", "HPRIGHT",
+ "LEFTIN", "HPL",
+ "RIGHTIN", "HPR";
+ simple-audio-card,aux-devs = <&>;
+ simple-audio-card,cpu {
+ sound-dai = <&ssi2>;
+ };
+ simple-audio-card,codec {
+ sound-dai = <&codec>;
+ clocks = <&clocks>;
+ };
+ };
+
+#--------------------
+# Sampling Rate Conversion
+#--------------------
+ - |
+ sound {
+ compatible = "simple-audio-card";
+
+ simple-audio-card,name = "rsnd-ak4643";
+ simple-audio-card,format = "left_j";
+ simple-audio-card,bitclock-master = <&sndcodec>;
+ simple-audio-card,frame-master = <&sndcodec>;
+
+ simple-audio-card,convert-rate = <48000>;
+
+ simple-audio-card,prefix = "ak4642";
+ simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
+ "DAI0 Capture", "ak4642 Capture";
+
+ sndcpu: simple-audio-card,cpu {
+ sound-dai = <&rcar_sound>;
+ };
+
+ sndcodec: simple-audio-card,codec {
+ sound-dai = <&ak4643>;
+ system-clock-frequency = <11289600>;
+ };
+ };
+
+#--------------------
+# 2 CPU 1 Codec (Mixing)
+#--------------------
+ - |
+ sound {
+ compatible = "simple-audio-card";
+
+ simple-audio-card,name = "rsnd-ak4643";
+ simple-audio-card,format = "left_j";
+ simple-audio-card,bitclock-master = <&dpcmcpu>;
+ simple-audio-card,frame-master = <&dpcmcpu>;
+
+ simple-audio-card,convert-rate = <48000>;
+ simple-audio-card,convert-channels = <2>;
+
+ simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
+ "ak4642 Playback", "DAI1 Playback";
+
+ dpcmcpu: simple-audio-card,cpu@0 {
+ sound-dai = <&rcar_sound 0>;
+ };
+
+ simple-audio-card,cpu@1 {
+ sound-dai = <&rcar_sound 1>;
+ };
+
+ simple-audio-card,codec {
+ prefix = "ak4642";
+ sound-dai = <&ak4643>;
+ clocks = <&audio_clock>;
+ };
+ };
+
+#--------------------
+# Multi DAI links with DPCM:
+#
+# CPU0 ------ ak4613
+# CPU1 ------ PCM3168A-p /* DPCM 1ch/2ch */
+# CPU2 --/ /* DPCM 3ch/4ch */
+# CPU3 --/ /* DPCM 5ch/6ch */
+# CPU4 --/ /* DPCM 7ch/8ch */
+# CPU5 ------ PCM3168A-c
+#--------------------
+ - |
+ sound {
+ compatible = "simple-audio-card";
+
+ simple-audio-card,routing =
+ "pcm3168a Playback", "DAI1 Playback",
+ "pcm3168a Playback", "DAI2 Playback",
+ "pcm3168a Playback", "DAI3 Playback",
+ "pcm3168a Playback", "DAI4 Playback";
+
+ simple-audio-card,dai-link@0 {
+ format = "left_j";
+ bitclock-master = <&sndcpu0>;
+ frame-master = <&sndcpu0>;
+
+ sndcpu0: cpu {
+ sound-dai = <&rcar_sound 0>;
+ };
+ codec {
+ sound-dai = <&ak4613>;
+ };
+ };
+
+ simple-audio-card,dai-link@1 {
+ format = "i2s";
+ bitclock-master = <&sndcpu1>;
+ frame-master = <&sndcpu1>;
+
+ convert-channels = <8>; /* TDM Split */
+
+ sndcpu1: cpu@0 {
+ sound-dai = <&rcar_sound 1>;
+ };
+ cpu@1 {
+ sound-dai = <&rcar_sound 2>;
+ };
+ cpu@2 {
+ sound-dai = <&rcar_sound 3>;
+ };
+ cpu@3 {
+ sound-dai = <&rcar_sound 4>;
+ };
+ codec {
+ mclk-fs = <512>;
+ prefix = "pcm3168a";
+ dai-tdm-slot-num = <8>;
+ sound-dai = <&pcm3168a 0>;
+ };
+ };
+
+ simple-audio-card,dai-link@2 {
+ format = "i2s";
+ bitclock-master = <&sndcpu2>;
+ frame-master = <&sndcpu2>;
+
+ sndcpu2: cpu {
+ sound-dai = <&rcar_sound 5>;
+ };
+ codec {
+ mclk-fs = <512>;
+ prefix = "pcm3168a";
+ sound-dai = <&pcm3168a 1>;
+ };
+ };
+ };
--
2.7.4
1
0

[alsa-devel] [PATCH] ASoC: renesas, rsnd: switch to yaml base Documentation
by Kuninori Morimoto 11 Nov '19
by Kuninori Morimoto 11 Nov '19
11 Nov '19
From: Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
This patch switches from .txt base to .yaml base Document.
It is still keeping detail explanations at .txt
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
---
.../devicetree/bindings/sound/renesas,rsnd.txt | 518 --------------------
.../devicetree/bindings/sound/renesas,rsnd.yaml | 527 +++++++++++++++++++++
2 files changed, 527 insertions(+), 518 deletions(-)
create mode 100644 Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
index 797fd03..b731f16 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
@@ -253,521 +253,3 @@ This is example of TDM 6ch.
Driver can automatically switches TDM <-> stereo mode in this case.
see "Example: simple sound card for TDM"
-
-=============================================
-Required properties:
-=============================================
-
-- compatible : "renesas,rcar_sound-<soctype>", fallbacks
- "renesas,rcar_sound-gen1" if generation1, and
- "renesas,rcar_sound-gen2" if generation2 (or RZ/G1)
- "renesas,rcar_sound-gen3" if generation3 (or RZ/G2)
- Examples with soctypes are:
- - "renesas,rcar_sound-r8a7743" (RZ/G1M)
- - "renesas,rcar_sound-r8a7744" (RZ/G1N)
- - "renesas,rcar_sound-r8a7745" (RZ/G1E)
- - "renesas,rcar_sound-r8a77470" (RZ/G1C)
- - "renesas,rcar_sound-r8a774a1" (RZ/G2M)
- - "renesas,rcar_sound-r8a774b1" (RZ/G2N)
- - "renesas,rcar_sound-r8a774c0" (RZ/G2E)
- - "renesas,rcar_sound-r8a7778" (R-Car M1A)
- - "renesas,rcar_sound-r8a7779" (R-Car H1)
- - "renesas,rcar_sound-r8a7790" (R-Car H2)
- - "renesas,rcar_sound-r8a7791" (R-Car M2-W)
- - "renesas,rcar_sound-r8a7793" (R-Car M2-N)
- - "renesas,rcar_sound-r8a7794" (R-Car E2)
- - "renesas,rcar_sound-r8a7795" (R-Car H3)
- - "renesas,rcar_sound-r8a7796" (R-Car M3-W)
- - "renesas,rcar_sound-r8a77965" (R-Car M3-N)
- - "renesas,rcar_sound-r8a77990" (R-Car E3)
- - "renesas,rcar_sound-r8a77995" (R-Car D3)
-- reg : Should contain the register physical address.
- required register is
- SRU/ADG/SSI if generation1
- SRU/ADG/SSIU/SSI/AUDIO-DMAC-periperi if generation2/generation3
- Select extended AUDIO-DMAC-periperi address if SoC has it,
- otherwise select normal AUDIO-DMAC-periperi address.
-- reg-names : Should contain the register names.
- scu/adg/ssi if generation1
- scu/adg/ssiu/ssi/audmapp if generation2/generation3
-- rcar_sound,ssi : Should contain SSI feature.
- The number of SSI subnode should be same as HW.
- see below for detail.
-- rcar_sound,ssiu : Should contain SSIU feature.
- The number of SSIU subnode should be same as HW.
- see below for detail.
-- rcar_sound,src : Should contain SRC feature.
- The number of SRC subnode should be same as HW.
- see below for detail.
-- rcar_sound,ctu : Should contain CTU feature.
- The number of CTU subnode should be same as HW.
- see below for detail.
-- rcar_sound,mix : Should contain MIX feature.
- The number of MIX subnode should be same as HW.
- see below for detail.
-- rcar_sound,dvc : Should contain DVC feature.
- The number of DVC subnode should be same as HW.
- see below for detail.
-- rcar_sound,dai : DAI contents.
- The number of DAI subnode should be same as HW.
- see below for detail.
-- #sound-dai-cells : it must be 0 if your system is using single DAI
- it must be 1 if your system is using multi DAI
-- clocks : References to SSI/SRC/MIX/CTU/DVC/AUDIO_CLK clocks.
-- clock-names : List of necessary clock names.
- "ssi-all", "ssi.X", "src.X", "mix.X", "ctu.X",
- "dvc.X", "clk_a", "clk_b", "clk_c", "clk_i"
-
-Optional properties:
-- #clock-cells : it must be 0 if your system has audio_clkout
- it must be 1 if your system has audio_clkout0/1/2/3
-- clock-frequency : for all audio_clkout0/1/2/3
-- clkout-lr-asynchronous : boolean property. it indicates that audio_clkoutn
- is asynchronizes with lr-clock.
-- resets : References to SSI resets.
-- reset-names : List of valid reset names.
- "ssi-all", "ssi.X"
-
-SSI subnode properties:
-- interrupts : Should contain SSI interrupt for PIO transfer
-- shared-pin : if shared clock pin
-- pio-transfer : use PIO transfer mode
-- no-busif : BUSIF is not ussed when [mem -> SSI] via DMA case
-- dma : Should contain Audio DMAC entry
-- dma-names : SSI case "rx" (=playback), "tx" (=capture)
- Deprecated: see SSIU subnode properties
- SSIU case "rxu" (=playback), "txu" (=capture)
-
-SSIU subnode properties:
-- dma : Should contain Audio DMAC entry
-- dma-names : "rx" (=playback), "tx" (=capture)
-
-SRC subnode properties:
-- dma : Should contain Audio DMAC entry
-- dma-names : "rx" (=playback), "tx" (=capture)
-
-DVC subnode properties:
-- dma : Should contain Audio DMAC entry
-- dma-names : "tx" (=playback/capture)
-
-DAI subnode properties:
-- playback : list of playback modules
-- capture : list of capture modules
-
-
-=============================================
-Example:
-=============================================
-
-rcar_sound: sound@ec500000 {
- #sound-dai-cells = <1>;
- compatible = "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-gen2";
- reg = <0 0xec500000 0 0x1000>, /* SCU */
- <0 0xec5a0000 0 0x100>, /* ADG */
- <0 0xec540000 0 0x1000>, /* SSIU */
- <0 0xec541000 0 0x1280>, /* SSI */
- <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/
- reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
-
- clocks = <&mstp10_clks R8A7790_CLK_SSI_ALL>,
- <&mstp10_clks R8A7790_CLK_SSI9>, <&mstp10_clks R8A7790_CLK_SSI8>,
- <&mstp10_clks R8A7790_CLK_SSI7>, <&mstp10_clks R8A7790_CLK_SSI6>,
- <&mstp10_clks R8A7790_CLK_SSI5>, <&mstp10_clks R8A7790_CLK_SSI4>,
- <&mstp10_clks R8A7790_CLK_SSI3>, <&mstp10_clks R8A7790_CLK_SSI2>,
- <&mstp10_clks R8A7790_CLK_SSI1>, <&mstp10_clks R8A7790_CLK_SSI0>,
- <&mstp10_clks R8A7790_CLK_SCU_SRC9>, <&mstp10_clks R8A7790_CLK_SCU_SRC8>,
- <&mstp10_clks R8A7790_CLK_SCU_SRC7>, <&mstp10_clks R8A7790_CLK_SCU_SRC6>,
- <&mstp10_clks R8A7790_CLK_SCU_SRC5>, <&mstp10_clks R8A7790_CLK_SCU_SRC4>,
- <&mstp10_clks R8A7790_CLK_SCU_SRC3>, <&mstp10_clks R8A7790_CLK_SCU_SRC2>,
- <&mstp10_clks R8A7790_CLK_SCU_SRC1>, <&mstp10_clks R8A7790_CLK_SCU_SRC0>,
- <&mstp10_clks R8A7790_CLK_SCU_DVC0>, <&mstp10_clks R8A7790_CLK_SCU_DVC1>,
- <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&m2_clk>;
- clock-names = "ssi-all",
- "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
- "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
- "src.9", "src.8", "src.7", "src.6", "src.5",
- "src.4", "src.3", "src.2", "src.1", "src.0",
- "dvc.0", "dvc.1",
- "clk_a", "clk_b", "clk_c", "clk_i";
-
- rcar_sound,dvc {
- dvc0: dvc-0 {
- dmas = <&audma0 0xbc>;
- dma-names = "tx";
- };
- dvc1: dvc-1 {
- dmas = <&audma0 0xbe>;
- dma-names = "tx";
- };
- };
-
- rcar_sound,mix {
- mix0: mix-0 { };
- mix1: mix-1 { };
- };
-
- rcar_sound,ctu {
- ctu00: ctu-0 { };
- ctu01: ctu-1 { };
- ctu02: ctu-2 { };
- ctu03: ctu-3 { };
- ctu10: ctu-4 { };
- ctu11: ctu-5 { };
- ctu12: ctu-6 { };
- ctu13: ctu-7 { };
- };
-
- rcar_sound,src {
- src0: src-0 {
- interrupts = <0 352 IRQ_TYPE_LEVEL_HIGH>;
- dmas = <&audma0 0x85>, <&audma1 0x9a>;
- dma-names = "rx", "tx";
- };
- src1: src-1 {
- interrupts = <0 353 IRQ_TYPE_LEVEL_HIGH>;
- dmas = <&audma0 0x87>, <&audma1 0x9c>;
- dma-names = "rx", "tx";
- };
- src2: src-2 {
- interrupts = <0 354 IRQ_TYPE_LEVEL_HIGH>;
- dmas = <&audma0 0x89>, <&audma1 0x9e>;
- dma-names = "rx", "tx";
- };
- src3: src-3 {
- interrupts = <0 355 IRQ_TYPE_LEVEL_HIGH>;
- dmas = <&audma0 0x8b>, <&audma1 0xa0>;
- dma-names = "rx", "tx";
- };
- src4: src-4 {
- interrupts = <0 356 IRQ_TYPE_LEVEL_HIGH>;
- dmas = <&audma0 0x8d>, <&audma1 0xb0>;
- dma-names = "rx", "tx";
- };
- src5: src-5 {
- interrupts = <0 357 IRQ_TYPE_LEVEL_HIGH>;
- dmas = <&audma0 0x8f>, <&audma1 0xb2>;
- dma-names = "rx", "tx";
- };
- src6: src-6 {
- interrupts = <0 358 IRQ_TYPE_LEVEL_HIGH>;
- dmas = <&audma0 0x91>, <&audma1 0xb4>;
- dma-names = "rx", "tx";
- };
- src7: src-7 {
- interrupts = <0 359 IRQ_TYPE_LEVEL_HIGH>;
- dmas = <&audma0 0x93>, <&audma1 0xb6>;
- dma-names = "rx", "tx";
- };
- src8: src-8 {
- interrupts = <0 360 IRQ_TYPE_LEVEL_HIGH>;
- dmas = <&audma0 0x95>, <&audma1 0xb8>;
- dma-names = "rx", "tx";
- };
- src9: src-9 {
- interrupts = <0 361 IRQ_TYPE_LEVEL_HIGH>;
- dmas = <&audma0 0x97>, <&audma1 0xba>;
- dma-names = "rx", "tx";
- };
- };
-
- rcar_sound,ssiu {
- ssiu00: ssiu-0 {
- dmas = <&audma0 0x15>, <&audma1 0x16>;
- dma-names = "rx", "tx";
- };
- ssiu01: ssiu-1 {
- dmas = <&audma0 0x35>, <&audma1 0x36>;
- dma-names = "rx", "tx";
- };
-
- ...
-
- ssiu95: ssiu-49 {
- dmas = <&audma0 0xA5>, <&audma1 0xA6>;
- dma-names = "rx", "tx";
- };
- ssiu96: ssiu-50 {
- dmas = <&audma0 0xA7>, <&audma1 0xA8>;
- dma-names = "rx", "tx";
- };
- ssiu97: ssiu-51 {
- dmas = <&audma0 0xA9>, <&audma1 0xAA>;
- dma-names = "rx", "tx";
- };
- };
-
- rcar_sound,ssi {
- ssi0: ssi-0 {
- interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>;
- dmas = <&audma0 0x01>, <&audma1 0x02>;
- dma-names = "rx", "tx";
- };
- ssi1: ssi-1 {
- interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>;
- dmas = <&audma0 0x03>, <&audma1 0x04>;
- dma-names = "rx", "tx";
- };
-
- ...
-
- ssi8: ssi-8 {
- interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>;
- dmas = <&audma0 0x11>, <&audma1 0x12>;
- dma-names = "rx", "tx";
- };
- ssi9: ssi-9 {
- interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>;
- dmas = <&audma0 0x13>, <&audma1 0x14>;
- dma-names = "rx", "tx";
- };
- };
-
- rcar_sound,dai {
- dai0 {
- playback = <&ssi5 &src5>;
- capture = <&ssi6>;
- };
- dai1 {
- playback = <&ssi3>;
- };
- dai2 {
- capture = <&ssi4>;
- };
- dai3 {
- playback = <&ssi7>;
- };
- dai4 {
- capture = <&ssi8>;
- };
- };
-};
-
-=============================================
-Example: simple sound card
-=============================================
-
- rsnd_ak4643: sound {
- compatible = "simple-audio-card";
-
- simple-audio-card,format = "left_j";
- simple-audio-card,bitclock-master = <&sndcodec>;
- simple-audio-card,frame-master = <&sndcodec>;
-
- sndcpu: simple-audio-card,cpu {
- sound-dai = <&rcar_sound>;
- };
-
- sndcodec: simple-audio-card,codec {
- sound-dai = <&ak4643>;
- clocks = <&audio_clock>;
- };
- };
-
-&rcar_sound {
- pinctrl-0 = <&sound_pins &sound_clk_pins>;
- pinctrl-names = "default";
-
- /* Single DAI */
- #sound-dai-cells = <0>;
-
-
- rcar_sound,dai {
- dai0 {
- playback = <&ssi0 &src2 &dvc0>;
- capture = <&ssi1 &src3 &dvc1>;
- };
- };
-};
-
-&ssi1 {
- shared-pin;
-};
-
-=============================================
-Example: simple sound card for Asynchronous mode
-=============================================
-
-sound {
- compatible = "simple-scu-audio-card";
- ...
- /*
- * SRC Asynchronous mode setting
- * Playback:
- * All input data will be converted to 48kHz
- * Capture:
- * Inputed 48kHz data will be converted to
- * system specified Hz
- */
- simple-audio-card,convert-rate = <48000>;
- ...
- simple-audio-card,cpu {
- sound-dai = <&rcar_sound>;
- };
- simple-audio-card,codec {
- ...
- };
-};
-
-=============================================
-Example: simple sound card for channel convert
-=============================================
-
-sound {
- compatible = "simple-scu-audio-card";
- ...
- /*
- * CTU setting
- * All input data will be converted to 2ch
- * as output data
- */
- simple-audio-card,convert-channels = <2>;
- ...
- simple-audio-card,cpu {
- sound-dai = <&rcar_sound>;
- };
- simple-audio-card,codec {
- ...
- };
-};
-
-=============================================
-Example: simple sound card for MIXer
-=============================================
-
-sound {
- compatible = "simple-scu-audio-card";
- ...
- simple-audio-card,cpu@0 {
- sound-dai = <&rcar_sound 0>;
- };
- simple-audio-card,cpu@1 {
- sound-dai = <&rcar_sound 1>;
- };
- simple-audio-card,codec {
- ...
- };
-};
-
-&rcar_sound {
- ...
- rcar_sound,dai {
- dai0 {
- playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>;
- };
- dai1 {
- playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>;
- };
- };
-};
-
-=============================================
-Example: simple sound card for TDM
-=============================================
-
-rsnd_tdm: sound {
- compatible = "simple-audio-card";
-
- simple-audio-card,format = "left_j";
- simple-audio-card,bitclock-master = <&sndcodec>;
- simple-audio-card,frame-master = <&sndcodec>;
-
- sndcpu: simple-audio-card,cpu {
- sound-dai = <&rcar_sound>;
- dai-tdm-slot-num = <6>;
- };
-
- sndcodec: simple-audio-card,codec {
- sound-dai = <&xxx>;
- };
-};
-
-=============================================
-Example: simple sound card for TDM Split
-=============================================
-
-sound_card: sound {
- compatible = "audio-graph-scu-card";
- prefix = "xxxx";
- routing = "xxxx Playback", "DAI0 Playback",
- "xxxx Playback", "DAI1 Playback",
- "xxxx Playback", "DAI2 Playback",
- "xxxx Playback", "DAI3 Playback";
- convert-channels = <8>; /* TDM Split */
-
- dais = <&rsnd_port0 /* playback ch1/ch2 */
- &rsnd_port1 /* playback ch3/ch4 */
- &rsnd_port2 /* playback ch5/ch6 */
- &rsnd_port3 /* playback ch7/ch8 */
- >;
-};
-
-audio-codec {
- ...
- port {
- codec_0: endpoint@1 {
- remote-endpoint = <&rsnd_ep0>;
- };
- codec_1: endpoint@2 {
- remote-endpoint = <&rsnd_ep1>;
- };
- codec_2: endpoint@3 {
- remote-endpoint = <&rsnd_ep2>;
- };
- codec_3: endpoint@4 {
- remote-endpoint = <&rsnd_ep3>;
- };
- };
-};
-
-&rcar_sound {
- ...
- ports {
- rsnd_port0: port@0 {
- rsnd_ep0: endpoint {
- remote-endpoint = <&codec_0>;
- ...
- playback = <&ssiu30 &ssi3>;
- };
- };
- rsnd_port1: port@1 {
- rsnd_ep1: endpoint {
- remote-endpoint = <&codec_1>;
- ...
- playback = <&ssiu31 &ssi3>;
- };
- };
- rsnd_port2: port@2 {
- rsnd_ep2: endpoint {
- remote-endpoint = <&codec_2>;
- ...
- playback = <&ssiu32 &ssi3>;
- };
- };
- rsnd_port3: port@3 {
- rsnd_ep3: endpoint {
- remote-endpoint = <&codec_3>;
- ...
- playback = <&ssiu33 &ssi3>;
- };
- };
- };
-};
-
-=============================================
-Example: simple sound card for Multi channel
-=============================================
-
-&rcar_sound {
- pinctrl-0 = <&sound_pins &sound_clk_pins>;
- pinctrl-names = "default";
-
- /* Single DAI */
- #sound-dai-cells = <0>;
-
-
- rcar_sound,dai {
- dai0 {
- playback = <&ssi0 &ssi1 &ssi2 &src0 &dvc0>;
- };
- };
-};
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
new file mode 100644
index 0000000..5fb036c
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -0,0 +1,527 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/renesas,rsnd.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas R-Car Sound Driver Device Tree Bindings
+
+maintainers:
+ - Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
+
+properties:
+ $nodename:
+ pattern: "^sound@.*"
+
+ compatible:
+ oneOf:
+ # for Gen1 SoC
+ - items:
+ - enum:
+ - renesas,rcar_sound-r8a7778 # R-Car M1A
+ - renesas,rcar_sound-r8a7779 # R-Car H1
+ - enum:
+ - renesas,rcar_sound-gen1
+ # for Gen2 SoC
+ - items:
+ - enum:
+ - renesas,rcar_sound-r8a7743 # RZ/G1M
+ - renesas,rcar_sound-r8a7744 # RZ/G1N
+ - renesas,rcar_sound-r8a7745 # RZ/G1E
+ - renesas,rcar_sound-r8a77470 # RZ/G1C
+ - renesas,rcar_sound-r8a7790 # R-Car H2
+ - renesas,rcar_sound-r8a7791 # R-Car M2-W
+ - renesas,rcar_sound-r8a7793 # R-Car M2-N
+ - renesas,rcar_sound-r8a7794 # R-Car E2
+ - enum:
+ - renesas,rcar_sound-gen2
+ # for Gen3 SoC
+ - items:
+ - enum:
+ - renesas,rcar_sound-r8a774a1 # RZ/G2M
+ - renesas,rcar_sound-r8a774b1 # RZ/G2N
+ - renesas,rcar_sound-r8a774c0 # RZ/G2E
+ - renesas,rcar_sound-r8a7795 # R-Car H3
+ - renesas,rcar_sound-r8a7796 # R-Car M3-W
+ - renesas,rcar_sound-r8a77965 # R-Car M3-N
+ - renesas,rcar_sound-r8a77990 # R-Car E3
+ - renesas,rcar_sound-r8a77995 # R-Car D3
+ - enum:
+ - renesas,rcar_sound-gen3
+ # for Generic
+ - items:
+ - enum:
+ - renesas,rcar_sound-gen1
+ - renesas,rcar_sound-gen2
+ - renesas,rcar_sound-gen3
+
+ reg:
+ minItems: 3 # Gen1
+ maxItems: 5 # Gen2/Gen3
+
+ reg-names:
+ description: |
+ Should contain the register names.
+ scu/adg/ssi if generation1
+ scu/adg/ssiu/ssi/audmapp if generation2/generation3
+ minItems: 3 # Gen1
+ maxItems: 5 # Gen2/Gen3
+ allOf:
+ - items:
+ enum:
+ - scu
+ - adg
+ - ssiu
+ - ssi
+ - audmapp
+
+ "#sound-dai-cells":
+ description: |
+ it must be 0 if your system is using single DAI
+ it must be 1 if your system is using multi DAIs
+ enum: [0, 1]
+
+ "#clock-cells":
+ description: |
+ it must be 0 if your system has audio_clkout
+ it must be 1 if your system has audio_clkout0/1/2/3
+ enum: [0, 1]
+
+ clock-frequency:
+ description: for audio_clkout0/1/2/3
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+
+ clkout-lr-asynchronous:
+ description: audio_clkoutn is asynchronizes with lr-clock.
+ $ref: /schemas/types.yaml#/definitions/flag
+
+ power-domains: true
+
+ resets:
+ description: References to SSI resets
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+
+ reset-names:
+ description: List of valid reset names.
+ allOf:
+ - items:
+ enum:
+ - ssi-all
+ - ssi.9
+ - ssi.8
+ - ssi.7
+ - ssi.6
+ - ssi.5
+ - ssi.4
+ - ssi.3
+ - ssi.2
+ - ssi.1
+ - ssi.0
+
+ clocks:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ description: References to SSI/SRC/MIX/CTU/DVC/AUDIO_CLK clocks.
+
+ clock-names:
+ description: List of necessary clock names.
+ allOf:
+ - items:
+ enum:
+ - ssi-all
+ - ssi.9
+ - ssi.8
+ - ssi.7
+ - ssi.6
+ - ssi.5
+ - ssi.4
+ - ssi.3
+ - ssi.2
+ - ssi.1
+ - ssi.0
+ - src.9
+ - src.8
+ - src.7
+ - src.6
+ - src.5
+ - src.4
+ - src.3
+ - src.2
+ - src.1
+ - src.0
+ - mix.1
+ - mix.0
+ - ctu.1
+ - ctu.0
+ - dvc.1
+ - dvc.0
+ - clk_a
+ - clk_b
+ - clk_c
+ - clk_i
+
+ # For OF-graph
+ port:
+ description: OF-Graph subnode
+ type: object
+ properties:
+ reg:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ endpoint:
+ type: object
+ properties:
+ remote-endpoint:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ dai-format:
+ $ref: "simple-card.yaml#/definitions/format"
+ playback:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ capture:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ required:
+ - remote-endpoint
+
+ # For multi OF-graph
+ ports:
+ description: multi OF-Graph subnode
+ type: object
+ patternProperties:
+ "port.*":
+ $ref: "#properties/port"
+
+patternProperties:
+ "^rcar_sound,dvc$":
+ description: DVC subnode.
+ type: object
+ patternProperties:
+ "dvc.*":
+ type: object
+ properties:
+ dmas:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ dma-names:
+ const: "tx"
+ required:
+ - dmas
+ - dma-names
+ additionalProperties: false
+
+ "^rcar_sound,mix$":
+ description: MIX subnode.
+ type: object
+ patternProperties:
+ "mix.*":
+ type: object
+ additionalProperties: false
+
+ "^rcar_sound,ctu$":
+ description: CTU subnode.
+ type: object
+ patternProperties:
+ "ctu.*":
+ type: object
+ additionalProperties: false
+
+ "^rcar_sound,src$":
+ description: SRC subnode.
+ type: object
+ patternProperties:
+ "src.*":
+ type: object
+ properties:
+ interrupts:
+ maxItems: 1
+ dmas:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ dma-names:
+ allOf:
+ - items:
+ enum:
+ - tx
+ - rx
+ if:
+ properties:
+ status:
+ const: "ok"
+ then:
+ required:
+ - interrupts
+ - dmas
+ - dma-names
+ additionalProperties: false
+
+ "^rcar_sound,ssiu$":
+ description: SSIU subnode.
+ type: object
+ patternProperties:
+ "ssiu.*":
+ type: object
+ properties:
+ dmas:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ dma-names:
+ allOf:
+ - items:
+ enum:
+ - tx
+ - rx
+ required:
+ - dmas
+ - dma-names
+ additionalProperties: false
+
+ "^rcar_sound,ssi$":
+ description: SSI subnode.
+ type: object
+ patternProperties:
+ "ssi.*":
+ type: object
+ properties:
+ interrupts:
+ maxItems: 1
+ dmas:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ dma-names:
+ allOf:
+ - items:
+ enum:
+ - tx
+ - rx
+ - txu # if no ssiu node
+ - rxu # if no ssiu node
+
+ shared-pin:
+ description: shared clock pin
+ $ref: /schemas/types.yaml#/definitions/flag
+ pio-transfer:
+ description: PIO transfer mode
+ $ref: /schemas/types.yaml#/definitions/flag
+ no-busif:
+ description: BUSIF is not used when [mem -> SSI] via DMA case
+ $ref: /schemas/types.yaml#/definitions/flag
+ required:
+ - interrupts
+ - dmas
+ - dma-names
+ additionalProperties: false
+
+ # For DAI base
+ "^rcar_sound,dai$":
+ description: DAI subnode.
+ type: object
+ patternProperties:
+ "dai.*":
+ type: object
+ properties:
+ playback:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ capture:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ anyOf:
+ - required:
+ - playback
+ - required:
+ - capture
+ additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - clocks
+ - clock-names
+ - "#sound-dai-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ rcar_sound: sound@ec500000 {
+ #sound-dai-cells = <1>;
+ compatible = "renesas,rcar_sound-r8a7790", "renesas,rcar_sound-gen2";
+ reg = <0 0xec500000 0 0x1000>, /* SCU */
+ <0 0xec5a0000 0 0x100>, /* ADG */
+ <0 0xec540000 0 0x1000>, /* SSIU */
+ <0 0xec541000 0 0x1280>, /* SSI */
+ <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/
+ reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
+
+ clocks = <&mstp10_clks 1005>, /* SSI-ALL */
+ <&mstp10_clks 1006>, <&mstp10_clks 1007>, /* SSI9, SSI8 */
+ <&mstp10_clks 1008>, <&mstp10_clks 1009>, /* SSI7, SSI6 */
+ <&mstp10_clks 1010>, <&mstp10_clks 1011>, /* SSI5, SSI4 */
+ <&mstp10_clks 1012>, <&mstp10_clks 1013>, /* SSI3, SSI2 */
+ <&mstp10_clks 1014>, <&mstp10_clks 1015>, /* SSI1, SSI0 */
+ <&mstp10_clks 1022>, <&mstp10_clks 1023>, /* SRC9, SRC8 */
+ <&mstp10_clks 1024>, <&mstp10_clks 1025>, /* SRC7, SRC6 */
+ <&mstp10_clks 1026>, <&mstp10_clks 1027>, /* SRC5, SRC4 */
+ <&mstp10_clks 1028>, <&mstp10_clks 1029>, /* SRC3, SRC2 */
+ <&mstp10_clks 1030>, <&mstp10_clks 1031>, /* SRC1, SRC0 */
+ <&mstp10_clks 1020>, <&mstp10_clks 1021>, /* DVC0, DVC1 */
+ <&mstp10_clks 1020>, <&mstp10_clks 1021>, /* CLKA, CLKB */
+ <&mstp10_clks 1019>, <&mstp10_clks 1018>; /* CLKC, CLKI */
+
+ clock-names = "ssi-all",
+ "ssi.9", "ssi.8",
+ "ssi.7", "ssi.6",
+ "ssi.5", "ssi.4",
+ "ssi.3", "ssi.2",
+ "ssi.1", "ssi.0",
+ "src.9", "src.8",
+ "src.7", "src.6",
+ "src.5", "src.4",
+ "src.3", "src.2",
+ "src.1", "src.0",
+ "dvc.0", "dvc.1",
+ "clk_a", "clk_b",
+ "clk_c", "clk_i";
+
+ rcar_sound,dvc {
+ dvc0: dvc-0 {
+ dmas = <&audma0 0xbc>;
+ dma-names = "tx";
+ };
+ dvc1: dvc-1 {
+ dmas = <&audma0 0xbe>;
+ dma-names = "tx";
+ };
+ };
+
+
+ rcar_sound,mix {
+ mix0: mix-0 { };
+ mix1: mix-1 { };
+ };
+
+ rcar_sound,ctu {
+ ctu00: ctu-0 { };
+ ctu01: ctu-1 { };
+ ctu02: ctu-2 { };
+ ctu03: ctu-3 { };
+ ctu10: ctu-4 { };
+ ctu11: ctu-5 { };
+ ctu12: ctu-6 { };
+ ctu13: ctu-7 { };
+ };
+
+ rcar_sound,src {
+ src0: src-0 {
+ status = "disabled";
+ };
+ src1: src-1 {
+ interrupts = <0 353 0>;
+ dmas = <&audma0 0x87>, <&audma1 0x9c>;
+ dma-names = "rx", "tx";
+ };
+ /* skip after src-2 */
+ };
+
+ rcar_sound,ssiu {
+ ssiu00: ssiu-0 {
+ dmas = <&audma0 0x15>, <&audma1 0x16>;
+ dma-names = "rx", "tx";
+ };
+ ssiu01: ssiu-1 {
+ dmas = <&audma0 0x35>, <&audma1 0x36>;
+ dma-names = "rx", "tx";
+ };
+ /* skip after ssiu-2 */
+ };
+
+ rcar_sound,ssi {
+ ssi0: ssi-0 {
+ interrupts = <0 370 1>;
+ dmas = <&audma0 0x01>, <&audma1 0x02>;
+ dma-names = "rx", "tx";
+ };
+ ssi1: ssi-1 {
+ interrupts = <0 371 1>;
+ dmas = <&audma0 0x03>, <&audma1 0x04>;
+ dma-names = "rx", "tx";
+ };
+ /* skip other ssi-2 */
+ };
+
+ /* DAI base */
+ rcar_sound,dai {
+ dai0 {
+ playback = <&ssi5 &src5>;
+ capture = <&ssi6>;
+ };
+ dai1 {
+ playback = <&ssi3>;
+ };
+ dai2 {
+ capture = <&ssi4>;
+ };
+ dai3 {
+ playback = <&ssi7>;
+ };
+ dai4 {
+ capture = <&ssi8>;
+ };
+ };
+
+ /* OF-Graph */
+ port {
+ rsnd_endpoint: endpoint {
+ remote-endpoint = <&codec_endpoint>;
+
+ dai-format = "left_j";
+ bitclock-master = <&rsnd_endpoint0>;
+ frame-master = <&rsnd_endpoint0>;
+
+ playback = <&ssi0 &src0 &dvc0>;
+ capture = <&ssi1 &src1 &dvc1>;
+ };
+ };
+
+ /* Multi OF-Graph */
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ rsnd_port0: port@0 {
+ reg = <0>;
+ rsnd_endpoint0: endpoint {
+ remote-endpoint = <&codec_endpoint1>;
+
+ dai-format = "left_j";
+ bitclock-master = <&rsnd_endpoint0>;
+ frame-master = <&rsnd_endpoint0>;
+
+ playback = <&ssi0 &src0 &dvc0>;
+ capture = <&ssi1 &src1 &dvc1>;
+ };
+ };
+ rsnd_port1: port@1 {
+ reg = <1>;
+ rsnd_endpoint1: endpoint {
+ remote-endpoint = <&codec_endpoint2>;
+
+ dai-format = "i2s";
+ playback = <&ssi0 &src0 &dvc0>;
+ capture = <&ssi1 &src1 &dvc1>;
+ };
+ };
+ };
+ };
+
+
+ codec {
+ ports {
+ port@0 {
+ codec_endpoint: endpoint {
+ remote-endpoint = <&rsnd_endpoint>;
+ };
+ };
+ port@1 {
+ codec_endpoint1: endpoint {
+ remote-endpoint = <&rsnd_endpoint0>;
+ };
+ };
+ port@2 {
+ codec_endpoint2: endpoint {
+ remote-endpoint = <&rsnd_endpoint1>;
+ };
+ };
+ };
+ };
--
2.7.4
1
0

11 Nov '19
Audmix support two substream, When two substream start
to run, the trigger function may be called by two substream
in same time, that the priv->tdms may be updated wrongly.
The expected priv->tdms is 0x3, but sometimes the
result is 0x2, or 0x1.
Signed-off-by: Shengjiu Wang <shengjiu.wang(a)nxp.com>
---
sound/soc/fsl/fsl_audmix.c | 6 ++++++
sound/soc/fsl/fsl_audmix.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c
index c7e4e9757dce..a1db1bce330f 100644
--- a/sound/soc/fsl/fsl_audmix.c
+++ b/sound/soc/fsl/fsl_audmix.c
@@ -286,6 +286,7 @@ static int fsl_audmix_dai_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai)
{
struct fsl_audmix *priv = snd_soc_dai_get_drvdata(dai);
+ unsigned long lock_flags;
/* Capture stream shall not be handled */
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
@@ -295,12 +296,16 @@ static int fsl_audmix_dai_trigger(struct snd_pcm_substream *substream, int cmd,
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+ spin_lock_irqsave(&priv->lock, lock_flags);
priv->tdms |= BIT(dai->driver->id);
+ spin_unlock_irqrestore(&priv->lock, lock_flags);
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+ spin_lock_irqsave(&priv->lock, lock_flags);
priv->tdms &= ~BIT(dai->driver->id);
+ spin_unlock_irqrestore(&priv->lock, lock_flags);
break;
default:
return -EINVAL;
@@ -491,6 +496,7 @@ static int fsl_audmix_probe(struct platform_device *pdev)
return PTR_ERR(priv->ipg_clk);
}
+ spin_lock_init(&priv->lock);
platform_set_drvdata(pdev, priv);
pm_runtime_enable(dev);
diff --git a/sound/soc/fsl/fsl_audmix.h b/sound/soc/fsl/fsl_audmix.h
index 7812ffec45c5..479f05695d53 100644
--- a/sound/soc/fsl/fsl_audmix.h
+++ b/sound/soc/fsl/fsl_audmix.h
@@ -96,6 +96,7 @@ struct fsl_audmix {
struct platform_device *pdev;
struct regmap *regmap;
struct clk *ipg_clk;
+ spinlock_t lock; /* Protect tdms */
u8 tdms;
};
--
2.21.0
4
3

11 Nov '19
Hi,
As in previous years we're going to have an audio miniconference so we can
get together and talk through issues, especially design decisions, face to
face. This year's event will be held on October 31st in Lyon, France,
the day after ELC-E. This will be held at the Lyon Convention Center (the
ELC-E venue) and will be free of charge to attend, generously
sponsored by Intel.
The plan is to gather at 9am and start once enough people are there and
ready. I look forward to seeing you all tomorrow!
The agenda is looking pretty full now, what we've got so far is:
- Introductions (me)
- Use case management enhancements (Curtis)
- DSP framework integration (Liam)
- SOF integration with ACPI and DT (Daniel)
- SOF support for non-modular drivers (Daniel)
- Gapless compressed playback (Patrick)
- Soundwire status (Liam?)
- Multi-CPU support
- Mixing with HDA/I2S in a single system
- PCM issues (Patrick)
- PCM device volume control
- Attaching timestamps to buffers
- kcontrol issues (Takashi)
- Standardization
- Confirmance testing
- Virtualization (Liam)
- User experiences (Jerome)
- Unified graph (Patrick)
- Componentisation status/plans (Me)
Thanks again to Intel for supporting this event.
Thanks,
Mark
2
2
Add HD Audio Device PCI ID for the Intel Cometlake-S platform
Signed-off-by: Chiou, Cooper <cooper.chiou(a)intel.com>
---
sound/pci/hda/hda_intel.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index cf53fbd872ee..c52419376c74 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2396,6 +2396,9 @@ static const struct pci_device_id azx_ids[] = {
/* CometLake-H */
{ PCI_DEVICE(0x8086, 0x06C8),
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
+ /* CometLake-S */
+ { PCI_DEVICE(0x8086, 0xa3f0),
+ .driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
/* Icelake */
{ PCI_DEVICE(0x8086, 0x34c8),
.driver_data = AZX_DRIVER_SKL | AZX_DCAPS_INTEL_SKYLAKE},
--
2.17.1
1
0

[alsa-devel] [PATCH RFC] ALSA: usb-audio: Fix Scarlett 6i6 Gen 2 port data
by Geoffrey D. Bennett 10 Nov '19
by Geoffrey D. Bennett 10 Nov '19
10 Nov '19
The s6i6_gen2_info.ports[] array had the Mixer and PCM port type
entries in the wrong place. Use designators to explicitly specify the
array elements being set.
Signed-off-by: Geoffrey D. Bennett <g(a)b4.vu>
Reported-by: (TBA, have asked for permission)
Tested-by: Alex Fellows <alex.fellows(a)gmail.com>
Fixes: 9e4d5c1be21f ("ALSA: usb-audio: Scarlett Gen 2 mixer interface")
---
sound/usb/mixer_scarlett_gen2.c | 36 ++++++++++++++++-----------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/sound/usb/mixer_scarlett_gen2.c b/sound/usb/mixer_scarlett_gen2.c
index 7d460b1f1735..94b903d95afa 100644
--- a/sound/usb/mixer_scarlett_gen2.c
+++ b/sound/usb/mixer_scarlett_gen2.c
@@ -261,34 +261,34 @@ static const struct scarlett2_device_info s6i6_gen2_info = {
},
.ports = {
- {
+ [SCARLETT2_PORT_TYPE_NONE] = {
.id = 0x000,
.num = { 1, 0, 8, 8, 8 },
.src_descr = "Off",
.src_num_offset = 0,
},
- {
+ [SCARLETT2_PORT_TYPE_ANALOGUE] = {
.id = 0x080,
.num = { 4, 4, 4, 4, 4 },
.src_descr = "Analogue %d",
.src_num_offset = 1,
.dst_descr = "Analogue Output %02d Playback"
},
- {
+ [SCARLETT2_PORT_TYPE_SPDIF] = {
.id = 0x180,
.num = { 2, 2, 2, 2, 2 },
.src_descr = "S/PDIF %d",
.src_num_offset = 1,
.dst_descr = "S/PDIF Output %d Playback"
},
- {
+ [SCARLETT2_PORT_TYPE_MIX] = {
.id = 0x300,
.num = { 10, 18, 18, 18, 18 },
.src_descr = "Mix %c",
.src_num_offset = 65,
.dst_descr = "Mixer Input %02d Capture"
},
- {
+ [SCARLETT2_PORT_TYPE_PCM] = {
.id = 0x600,
.num = { 6, 6, 6, 6, 6 },
.src_descr = "PCM %d",
@@ -317,44 +317,44 @@ static const struct scarlett2_device_info s18i8_gen2_info = {
},
.ports = {
- {
+ [SCARLETT2_PORT_TYPE_NONE] = {
.id = 0x000,
.num = { 1, 0, 8, 8, 4 },
.src_descr = "Off",
.src_num_offset = 0,
},
- {
+ [SCARLETT2_PORT_TYPE_ANALOGUE] = {
.id = 0x080,
.num = { 8, 6, 6, 6, 6 },
.src_descr = "Analogue %d",
.src_num_offset = 1,
.dst_descr = "Analogue Output %02d Playback"
},
- {
+ [SCARLETT2_PORT_TYPE_SPDIF] = {
+ .id = 0x180,
/* S/PDIF outputs aren't available at 192KHz
* but are included in the USB mux I/O
* assignment message anyway
*/
- .id = 0x180,
.num = { 2, 2, 2, 2, 2 },
.src_descr = "S/PDIF %d",
.src_num_offset = 1,
.dst_descr = "S/PDIF Output %d Playback"
},
- {
+ [SCARLETT2_PORT_TYPE_ADAT] = {
.id = 0x200,
.num = { 8, 0, 0, 0, 0 },
.src_descr = "ADAT %d",
.src_num_offset = 1,
},
- {
+ [SCARLETT2_PORT_TYPE_MIX] = {
.id = 0x300,
.num = { 10, 18, 18, 18, 18 },
.src_descr = "Mix %c",
.src_num_offset = 65,
.dst_descr = "Mixer Input %02d Capture"
},
- {
+ [SCARLETT2_PORT_TYPE_PCM] = {
.id = 0x600,
.num = { 20, 18, 18, 14, 10 },
.src_descr = "PCM %d",
@@ -387,20 +387,20 @@ static const struct scarlett2_device_info s18i20_gen2_info = {
},
.ports = {
- {
+ [SCARLETT2_PORT_TYPE_NONE] = {
.id = 0x000,
.num = { 1, 0, 8, 8, 6 },
.src_descr = "Off",
.src_num_offset = 0,
},
- {
+ [SCARLETT2_PORT_TYPE_ANALOGUE] = {
.id = 0x080,
.num = { 8, 10, 10, 10, 10 },
.src_descr = "Analogue %d",
.src_num_offset = 1,
.dst_descr = "Analogue Output %02d Playback"
},
- {
+ [SCARLETT2_PORT_TYPE_SPDIF] = {
/* S/PDIF outputs aren't available at 192KHz
* but are included in the USB mux I/O
* assignment message anyway
@@ -411,21 +411,21 @@ static const struct scarlett2_device_info s18i20_gen2_info = {
.src_num_offset = 1,
.dst_descr = "S/PDIF Output %d Playback"
},
- {
+ [SCARLETT2_PORT_TYPE_ADAT] = {
.id = 0x200,
.num = { 8, 8, 8, 4, 0 },
.src_descr = "ADAT %d",
.src_num_offset = 1,
.dst_descr = "ADAT Output %d Playback"
},
- {
+ [SCARLETT2_PORT_TYPE_MIX] = {
.id = 0x300,
.num = { 10, 18, 18, 18, 18 },
.src_descr = "Mix %c",
.src_num_offset = 65,
.dst_descr = "Mixer Input %02d Capture"
},
- {
+ [SCARLETT2_PORT_TYPE_PCM] = {
.id = 0x600,
.num = { 20, 18, 18, 14, 10 },
.src_descr = "PCM %d",
--
2.20.1
1
0

[alsa-devel] [PATCH] ALSA: usb-audio: Fix missing error check at mixer resolution test
by Takashi Iwai 09 Nov '19
by Takashi Iwai 09 Nov '19
09 Nov '19
A check of the return value from get_cur_mix_raw() is missing at the
resolution test code in get_min_max_with_quirks(), which may leave the
variable untouched, leading to a random uninitialized value, as
detected by syzkaller fuzzer.
Add the missing return error check for fixing that.
Reported-and-tested-by: syzbot+abe1ab7afc62c6bb6377(a)syzkaller.appspotmail.com
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
---
sound/usb/mixer.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 3fd1d1749edf..45eee5cc312e 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1229,7 +1229,8 @@ static int get_min_max_with_quirks(struct usb_mixer_elem_info *cval,
if (cval->min + cval->res < cval->max) {
int last_valid_res = cval->res;
int saved, test, check;
- get_cur_mix_raw(cval, minchn, &saved);
+ if (get_cur_mix_raw(cval, minchn, &saved) < 0)
+ goto no_res_check;
for (;;) {
test = saved;
if (test < cval->max)
@@ -1249,6 +1250,7 @@ static int get_min_max_with_quirks(struct usb_mixer_elem_info *cval,
snd_usb_set_cur_mix_value(cval, minchn, 0, saved);
}
+no_res_check:
cval->initialized = 1;
}
--
2.16.4
1
0
Hi Greg,
Here is the soundwire updates for v5.5-rc1. I may send another pull
request with more changes which are under review next week. This time we
have few core changes and bunch of changes to Intel drivers.
The following changes since commit 54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c:
Linux 5.4-rc1 (2019-09-30 10:35:40 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire.git tags/soundwire-5.5-rc1
for you to fetch changes up to 2e8c4ad1f04413a4a67ef10746a7566007d2ed55:
soundwire: ignore uniqueID when irrelevant (2019-11-09 16:46:56 +0530)
----------------------------------------------------------------
soundwire updates for v5.5-rc1
This round we have bunch of core and Intel driver updates spearheaded
by Pierre
Details
- Update unique id checks in core and ACPI helpers
- Improvements to to Intel driver and cadence lib
----------------------------------------------------------------
Bard Liao (2):
soundwire: intel: remove playback/capture stream_name
soundwire: cadence_master: improve PDI allocation
Pierre-Louis Bossart (14):
soundwire: intel: add missing headers for cross-compilation
soundwire: intel: remove X86 dependency
soundwire: remove DAI_ID_RANGE definitions
soundwire: cadence/intel: simplify PDI/port mapping
soundwire: intel: don't filter out PDI0/1
soundwire: intel/cadence: fix startup sequence
soundwire: cadence_master: add hw_reset capability in debugfs
soundwire: intel: add helper for initialization
soundwire: intel/cadence: add flag for interrupt enable
soundwire: cadence_master: make clock stop exit configurable on init
soundwire: intel: fix PDI/stream mapping for Bulk
soundwire: remove bitfield for unique_id, use u8
soundwire: slave: add helper to extract slave ID
soundwire: ignore uniqueID when irrelevant
Vinod Koul (1):
soundwire: intel: use correct header for io calls
drivers/soundwire/Kconfig | 2 +-
drivers/soundwire/bus.c | 7 +-
drivers/soundwire/cadence_master.c | 292 +++++++++++++++++--------------------
drivers/soundwire/cadence_master.h | 39 ++---
drivers/soundwire/intel.c | 201 ++++++++-----------------
drivers/soundwire/intel_init.c | 1 +
drivers/soundwire/slave.c | 98 ++++++++++---
include/linux/soundwire/sdw.h | 7 +-
8 files changed, 295 insertions(+), 352 deletions(-)
Thanks
--
~Vinod
2
1

[alsa-devel] [PATCH 0/3] soundwire: use UniqueID only when relevant
by Pierre-Louis Bossart 09 Nov '19
by Pierre-Louis Bossart 09 Nov '19
09 Nov '19
The hardware UniqueID, typically enabled with pin-strapping, is
required during enumeration to avoid conflicts between devices of the
same type.
When there are no devices of the same type, using the UniqueID is
overkill and results in a lot of probe errors due to mismatches
between ACPI tables and hardware capabilities. For example it's not
uncommon for BIOS vendors to copy/paste the same settings between
platforms but the hardware pin-strapping is different. This is
perfectly legit and permitted by MIPI specs.
With this patchset, the UniqueID is only used when multiple devices of
the same type are detected. The loop to detect multiple identical
devices is not super efficient but with typically fewer than 4 devices
per link there's no real incentive to be smarter.
This change is only implemented for ACPI platforms, for DeviceTree
there is no change.
Pierre-Louis Bossart (3):
soundwire: remove bitfield for unique_id, use u8
soundwire: slave: add helper to extract slave ID
soundwire: ignore uniqueID when irrelevant
drivers/soundwire/bus.c | 7 +--
drivers/soundwire/slave.c | 98 +++++++++++++++++++++++++++--------
include/linux/soundwire/sdw.h | 4 +-
3 files changed, 84 insertions(+), 25 deletions(-)
--
2.20.1
2
9

[alsa-devel] [PATCH] soundwire: intel: fix PDI/stream mapping for Bulk
by Pierre-Louis Bossart 09 Nov '19
by Pierre-Louis Bossart 09 Nov '19
09 Nov '19
The previous formula is incorrect for PDI0/1, the mapping is not
linear but has a discontinuity between PDI1 and PDI2.
This change has no effect on PCM PDIs (same mapping).
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart(a)linux.intel.com>
---
drivers/soundwire/intel.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index b403ccc832b6..c984261fcc33 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
@@ -480,7 +480,10 @@ intel_pdi_shim_configure(struct sdw_intel *sdw, struct sdw_cdns_pdi *pdi)
unsigned int link_id = sdw->instance;
int pdi_conf = 0;
- pdi->intel_alh_id = (link_id * 16) + pdi->num + 5;
+ /* the Bulk and PCM streams are not contiguous */
+ pdi->intel_alh_id = (link_id * 16) + pdi->num + 3;
+ if (pdi->num >= 2)
+ pdi->intel_alh_id += 2;
/*
* Program stream parameters to stream SHIM register
@@ -509,7 +512,10 @@ intel_pdi_alh_configure(struct sdw_intel *sdw, struct sdw_cdns_pdi *pdi)
unsigned int link_id = sdw->instance;
unsigned int conf;
- pdi->intel_alh_id = (link_id * 16) + pdi->num + 5;
+ /* the Bulk and PCM streams are not contiguous */
+ pdi->intel_alh_id = (link_id * 16) + pdi->num + 3;
+ if (pdi->num >= 2)
+ pdi->intel_alh_id += 2;
/* Program Stream config ALH register */
conf = intel_readl(alh, SDW_ALH_STRMZCFG(pdi->intel_alh_id));
--
2.20.1
2
3
We are trying to get a piece of Google hardware which uses the rt5645
driver working correctly with newer kernels (currently one based on
the latest v4.14 stable), and noticed that the following commit:
commit 6b5da66322c5 ("ASoC: rt5645: read jd1_1 status for jd detection")
broke jack support for our device. Basically with that patch we never
correctly see a jack insertion event, and audio is never routed to the
headphones.
With just that one patch reverted, things work correctly on our
system. The revert applies cleanly to linus/master.
Here is the series where that patch was originally upstreamed:
https://www.spinics.net/lists/alsa-devel/msg64331.html
If we reverted that patch upstream, would it break other devices (the
"GDP Win" device?) that use the rt5645 driver? If so, how would you
recommend proceeding?
Does anyone have one of the "GDP Win" devices so we can test that and
our device and make sure whatever solution we end up coming up with
works for everyone?
Thanks,
- Ross
5
5
Hi,
this is a patch series for ASoC to clean up ALSA memory allocation API
usages. It's based on my recent API changes found on for-next branch
for 5.5 merge, so please give ACK if it's OK, so that I can merge them
into my sound git tree.
Basically three things:
* Drop superfluous snd_pcm_sgbuf_ops_page usages
* Drop snd_dma_continuous_data() macro usage for the normal continuous
page allocation
* Convert PCM vmalloc buffer allocation with the preallocation API
Takashi
===
Takashi Iwai (8):
ASoC: Remove superfluous snd_dma_continuous_data()
ASoC: rt5514-spi: Convert to the common vmalloc memalloc
ASoC: intel: Drop superfluous snd_pcm_sgbuf_ops_page
ASoC: intel: Avoid non-standard macro usage
ASoC: SOF: Drop superfluous snd_pcm_sgbuf_ops_page
ASoC: rt5677-spi: Convert to the common vmalloc memalloc
ASoC: cros_ec_codec: Convert to the common vmalloc memalloc
ALSA: pcm: Unexport snd_pcm_sgbuf_ops_page
include/sound/pcm.h | 8 --------
sound/core/pcm_local.h | 5 +++++
sound/core/pcm_memory.c | 3 +--
sound/soc/au1x/dma.c | 2 +-
sound/soc/codecs/cros_ec_codec.c | 16 ++++++++--------
sound/soc/codecs/rt5514-spi.c | 21 +++++++++++----------
sound/soc/codecs/rt5677-spi.c | 17 ++++++++---------
sound/soc/dwc/dwc-pcm.c | 2 +-
sound/soc/intel/haswell/sst-haswell-pcm.c | 12 ------------
sound/soc/intel/skylake/skl-pcm.c | 14 +-------------
sound/soc/sh/dma-sh7760.c | 2 +-
sound/soc/sof/pcm.c | 12 ------------
12 files changed, 37 insertions(+), 77 deletions(-)
--
2.16.4
3
10

[alsa-devel] [PATCH 00/11] ASoC: SOF/Intel: Kconfig improvements/fixes
by Pierre-Louis Bossart 08 Nov '19
by Pierre-Louis Bossart 08 Nov '19
08 Nov '19
We have a number of distros who unfortunately selected the wrong
options for SOF. The first patches in this series enforce mutual
exclusions, add explicit developer options and add help text to make
sure SOF or SOF debug options are not selected by mistake.
Patch 5..6 are a follow-up on a report from Arnd Bergman.
Patches 7..11 fix mistakes with dependencies in the board
Kconfig. This should not have any impact for distros but help
developers trying to build a minimal config.
Pierre-Louis Bossart (11):
ASoC: SOF: Intel: Baytrail: clarify mutual exclusion with Atom/SST
driver
ASoC: SOF: Intel: Broadwell: clarify mutual exclusion with legacy
driver
ASoC: Intel: add mutual exclusion between SOF and legacy Baytrail
driver
ASoC: SOF: Kconfig: add EXPERT dependency for developer options,
clarify help
ASoC: SOF: imx: fix reverse CONFIG_SND_SOC_SOF_OF dependency
ASoC: SOF: Intel: use def_tristate, avoid using select
ASoC: Intel: Skylake: mark HDAudio codec support as deprecated.
ASoC: Intel: boards: remove select SND_HDA_DSP_LOADER
ASoC: Intel: boards: fix configs for bxt-da7219-max98057a
ASoC: Intel: boards: Geminilake is only supported by SOF
ASoC: Intel: boards: sof_rt5682: use dependency on SOF_HDA_LINK
sound/soc/intel/Kconfig | 17 +++++++++++----
sound/soc/intel/boards/Kconfig | 37 ++++++++++++++++++++++++---------
sound/soc/intel/boards/Makefile | 2 +-
sound/soc/sof/Kconfig | 27 ++++++++++++++----------
sound/soc/sof/imx/Kconfig | 8 +++++--
sound/soc/sof/intel/Kconfig | 24 +++++++++++++++++----
6 files changed, 83 insertions(+), 32 deletions(-)
--
2.20.1
4
26

08 Nov '19
This adds a new mode WM8904_CLK_AUTO which automatically enables the FLL
if a frequency different than the MCLK is set.
These additions make the codec work with the simple-card driver in
general and especially in systems where the MCLK doesn't match the
requested clock.
Signed-off-by: Michael Walle <michael(a)walle.cc>
---
Unfortunately, I had to move wm8904_sys_sysclk() below wm8904_set_fll(). So
that makes this patch a bit ugly. The added part is the WM8904_CLK_AUTO
branch.
sound/soc/codecs/wm8904.c | 72 ++++++++++++++++++++++++---------------
sound/soc/codecs/wm8904.h | 1 +
2 files changed, 45 insertions(+), 28 deletions(-)
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
index bcb3c9d5abf0..2dd7addfd1a8 100644
--- a/sound/soc/codecs/wm8904.c
+++ b/sound/soc/codecs/wm8904.c
@@ -1410,34 +1410,6 @@ static int wm8904_hw_params(struct snd_pcm_substream *substream,
return 0;
}
-
-static int wm8904_set_sysclk(struct snd_soc_dai *dai, int clk_id,
- unsigned int freq, int dir)
-{
- struct snd_soc_component *component = dai->component;
- struct wm8904_priv *priv = snd_soc_component_get_drvdata(component);
-
- switch (clk_id) {
- case WM8904_CLK_MCLK:
- priv->sysclk_src = clk_id;
- priv->mclk_rate = freq;
- break;
-
- case WM8904_CLK_FLL:
- priv->sysclk_src = clk_id;
- break;
-
- default:
- return -EINVAL;
- }
-
- dev_dbg(dai->dev, "Clock source is %d at %uHz\n", clk_id, freq);
-
- wm8904_configure_clocking(component);
-
- return 0;
-}
-
static int wm8904_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{
struct snd_soc_component *component = dai->component;
@@ -1824,6 +1796,50 @@ static int wm8904_set_fll(struct snd_soc_dai *dai, int fll_id, int source,
return 0;
}
+static int wm8904_set_sysclk(struct snd_soc_dai *dai, int clk_id,
+ unsigned int freq, int dir)
+{
+ struct snd_soc_component *component = dai->component;
+ struct wm8904_priv *priv = snd_soc_component_get_drvdata(component);
+ unsigned long mclk_freq;
+ int ret;
+
+ switch (clk_id) {
+ case WM8904_CLK_AUTO:
+ mclk_freq = clk_get_rate(priv->mclk);
+ /* enable FLL if a different sysclk is desired */
+ if (mclk_freq != freq) {
+ priv->sysclk_src = WM8904_CLK_FLL;
+ ret = wm8904_set_fll(dai, WM8904_FLL_MCLK,
+ WM8904_FLL_MCLK,
+ clk_get_rate(priv->mclk), freq);
+ if (ret)
+ return ret;
+ break;
+ }
+ clk_id = WM8904_CLK_MCLK;
+ /* fallthrough */
+
+ case WM8904_CLK_MCLK:
+ priv->sysclk_src = clk_id;
+ priv->mclk_rate = freq;
+ break;
+
+ case WM8904_CLK_FLL:
+ priv->sysclk_src = clk_id;
+ break;
+
+ default:
+ return -EINVAL;
+ }
+
+ dev_dbg(dai->dev, "Clock source is %d at %uHz\n", clk_id, freq);
+
+ wm8904_configure_clocking(component);
+
+ return 0;
+}
+
static int wm8904_digital_mute(struct snd_soc_dai *codec_dai, int mute)
{
struct snd_soc_component *component = codec_dai->component;
diff --git a/sound/soc/codecs/wm8904.h b/sound/soc/codecs/wm8904.h
index c1bca52f9927..de6340446b1f 100644
--- a/sound/soc/codecs/wm8904.h
+++ b/sound/soc/codecs/wm8904.h
@@ -10,6 +10,7 @@
#ifndef _WM8904_H
#define _WM8904_H
+#define WM8904_CLK_AUTO 0
#define WM8904_CLK_MCLK 1
#define WM8904_CLK_FLL 2
--
2.20.1
2
2
Hello,
syzbot found the following crash on:
HEAD commit: c2453450 kmsan: kcov: prettify the code unpoisoning area->..
git tree: https://github.com/google/kmsan.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=119f1173600000
kernel config: https://syzkaller.appspot.com/x/.config?x=3684f3c73f43899a
dashboard link: https://syzkaller.appspot.com/bug?extid=abe1ab7afc62c6bb6377
compiler: clang version 9.0.0 (/home/glider/llvm/clang
80fee25776c2fb61e74c1ecb1a523375c2500b69)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16255fe7600000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15e73290e00000
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+abe1ab7afc62c6bb6377(a)syzkaller.appspotmail.com
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: syz
usb 1-1: Manufacturer: syz
usb 1-1: SerialNumber: syz
usb 1-1: 0:2 : does not exist
=====================================================
BUG: KMSAN: uninit-value in get_min_max_with_quirks+0xd6f/0x2ea0
sound/usb/mixer.c:1239
CPU: 0 PID: 2859 Comm: kworker/0:2 Not tainted 5.4.0-rc3+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: usb_hub_wq hub_event
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x191/0x1f0 lib/dump_stack.c:113
kmsan_report+0x14a/0x2f0 mm/kmsan/kmsan_report.c:109
__msan_warning+0x73/0xf0 mm/kmsan/kmsan_instr.c:245
get_min_max_with_quirks+0xd6f/0x2ea0 sound/usb/mixer.c:1239
__build_feature_ctl+0x12b9/0x29e0 sound/usb/mixer.c:1665
build_feature_ctl sound/usb/mixer.c:1709 [inline]
parse_audio_feature_unit sound/usb/mixer.c:1918 [inline]
parse_audio_unit+0x218c/0x7490 sound/usb/mixer.c:2753
snd_usb_mixer_controls sound/usb/mixer.c:3095 [inline]
snd_usb_create_mixer+0x1d7c/0x4070 sound/usb/mixer.c:3445
usb_audio_probe+0x286b/0x3eb0 sound/usb/card.c:653
usb_probe_interface+0xd19/0x1310 drivers/usb/core/driver.c:361
really_probe+0xd91/0x1f90 drivers/base/dd.c:552
driver_probe_device+0x1ba/0x510 drivers/base/dd.c:721
__device_attach_driver+0x5b8/0x790 drivers/base/dd.c:828
bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:430
__device_attach+0x489/0x750 drivers/base/dd.c:894
device_initial_probe+0x4a/0x60 drivers/base/dd.c:941
bus_probe_device+0x131/0x390 drivers/base/bus.c:490
device_add+0x25b5/0x2df0 drivers/base/core.c:2201
usb_set_configuration+0x309f/0x3710 drivers/usb/core/message.c:2027
generic_probe+0xe7/0x280 drivers/usb/core/generic.c:210
usb_probe_device+0x146/0x200 drivers/usb/core/driver.c:266
really_probe+0xd91/0x1f90 drivers/base/dd.c:552
driver_probe_device+0x1ba/0x510 drivers/base/dd.c:721
__device_attach_driver+0x5b8/0x790 drivers/base/dd.c:828
bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:430
__device_attach+0x489/0x750 drivers/base/dd.c:894
device_initial_probe+0x4a/0x60 drivers/base/dd.c:941
bus_probe_device+0x131/0x390 drivers/base/bus.c:490
device_add+0x25b5/0x2df0 drivers/base/core.c:2201
usb_new_device+0x23e5/0x2fb0 drivers/usb/core/hub.c:2536
hub_port_connect drivers/usb/core/hub.c:5098 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5213 [inline]
port_event drivers/usb/core/hub.c:5359 [inline]
hub_event+0x581d/0x72f0 drivers/usb/core/hub.c:5441
process_one_work+0x1572/0x1ef0 kernel/workqueue.c:2269
worker_thread+0x111b/0x2460 kernel/workqueue.c:2415
kthread+0x4b5/0x4f0 kernel/kthread.c:256
ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355
Local variable description: ----saved@get_min_max_with_quirks
Variable was created at:
get_min_max_with_quirks+0xa8b/0x2ea0 sound/usb/mixer.c:1231
get_min_max_with_quirks+0xa8b/0x2ea0 sound/usb/mixer.c:1231
=====================================================
---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller(a)googlegroups.com.
syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches
1
0

[alsa-devel] [PATCH] ALSA: pcm: Yet another missing check of non-cached buffer type
by Takashi Iwai 08 Nov '19
by Takashi Iwai 08 Nov '19
08 Nov '19
For non-x86 architectures, SNDRV_DMA_TYPE_DEV_UC should be treated
equivalent with SNDRV_DMA_TYPE_DEV, where the default mmap handler
still checks only about SNDRV_DMA_TYPE_DEV. Make the check more
proper.
Note that all existing users of *_UC buffer types are x86-only, so
this doesn't fix any bug, but just for consistency.
Fixes: 42e748a0b325 ("ALSA: memalloc: Add non-cached buffer type")
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
---
sound/core/pcm_native.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 998c63192ae4..0c27009dc3df 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -3416,7 +3416,8 @@ int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream,
#endif /* CONFIG_GENERIC_ALLOCATOR */
#ifndef CONFIG_X86 /* for avoiding warnings arch/x86/mm/pat.c */
if (IS_ENABLED(CONFIG_HAS_DMA) && !substream->ops->page &&
- substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV)
+ (substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV ||
+ substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV_UC))
return dma_mmap_coherent(substream->dma_buffer.dev.dev,
area,
substream->runtime->dma_area,
--
2.16.4
1
0

08 Nov '19
Now that all users have been converted, we can drop snd_dma_pci_data()
macro definition.
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
---
include/sound/memalloc.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h
index 6ada3b8ede4e..3b47832b1c1f 100644
--- a/include/sound/memalloc.h
+++ b/include/sound/memalloc.h
@@ -21,7 +21,6 @@ struct snd_dma_device {
struct device *dev; /* generic device */
};
-#define snd_dma_pci_data(pci) (&(pci)->dev)
#define snd_dma_continuous_data(x) ((struct device *)(__force unsigned long)(x))
--
2.16.4
1
0

[alsa-devel] [PATCH 00/14] soundwire: intel: implement new ASoC interfaces
by Pierre-Louis Bossart 08 Nov '19
by Pierre-Louis Bossart 08 Nov '19
08 Nov '19
this patchset applies on top of the series "[PATCH 0/4] soundwire:
update ASoC interfaces" and previously submitted cleanups "[PATCH v3
0/5] soundwire: intel/cadence: better initialization"
The changes are essentially a removal of the platform devices and the
implementation of the new interfaces required to scan the ACPI tables,
probe the links and start them.
The missing prepare, trigger and setup ASoC callbacks are also
implemented. The hw_params and free callbacks use the new interfaces
as well.
While there are quite a few lines of code changed, this is mostly
about interface changes. The next series will contain more functional
changes and deal with race conditions on probe, enumeration and
suspend/resume issues.
Bard Liao (1):
soundwire: add device driver to sdw_md_driver
Pierre-Louis Bossart (10):
soundwire: renames to prepare support for master drivers/devices
soundwire: rename dev_to_sdw_dev macro
soundwire: rename drv_to_sdw_slave_driver macro
soundwire: bus_type: rename sdw_drv_ to sdw_slave_drv
soundwire: intel: rename res field as link_res
soundwire: add support for sdw_slave_type
soundwire: add initial definitions for sdw_master_device
soundwire: intel: remove platform devices and provide new interface
soundwire: intel: free all resources on hw_free()
soundwire: intel_init: add implementation of sdw_intel_enable_irq()
Rander Wang (3):
soundwire: intel: add prepare support in sdw dai driver
soundwire: intel: add trigger support in sdw dai driver
soundwire: intel: add sdw_stream_setup helper for .startup callback
drivers/base/regmap/regmap-sdw.c | 4 +-
drivers/soundwire/Makefile | 2 +-
drivers/soundwire/bus.c | 2 +-
drivers/soundwire/bus_type.c | 60 +++---
drivers/soundwire/intel.c | 280 ++++++++++++++++++++++-----
drivers/soundwire/intel.h | 8 +-
drivers/soundwire/intel_init.c | 300 ++++++++++++++++++++++-------
drivers/soundwire/master.c | 64 ++++++
drivers/soundwire/slave.c | 9 +-
include/linux/soundwire/sdw.h | 39 +++-
include/linux/soundwire/sdw_type.h | 34 +++-
11 files changed, 642 insertions(+), 160 deletions(-)
create mode 100644 drivers/soundwire/master.c
--
2.20.1
3
32
The following changes since commit 95a32c98055f664f9b3f34c41e153d4dcedd0eff:
ASoC: SOF: control: return true when kcontrol values change (2019-10-18 18:09:22 +0100)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git tags/asoc-v5.5
for you to fetch changes up to 2acdcabb8a4089476208a822050dd47a6557290d:
ASoC: SOF: topology: Fix bytes control size checks (2019-11-06 18:17:54 +0000)
----------------------------------------------------------------
ASoC: Updates for v5.5
Some big changes in the core but more about cleanps and refactorings
than new features, plus a collection of new drivers and lots of small
fixes and improvements to existing ones.
- Lots more cleanups from Morimoto-san. Now that everything is a
component this is mostly about refactorings to clarify and simplify
the core, a combination of things that are no longer required due to
refactorings and spotting similarities.
- Many fixes to the Sound Open Firmware code.
- Wake on voice support for Chromebooks.
- SPI support for RT5677.
- New drivers for Analog Devices ADAU7118, Intel Cannonlake systems
with RT1011 and RT5682, Texas Instruments TAS2562 and TAS2770.
----------------------------------------------------------------
Akshu Agrawal (1):
ASoC: rt5650: Add Kahlee platform specfic changes
Ben Dooks (1):
ASoC: tegra: disable rx_fifo after disable stream
Ben Dooks (Codethink) (1):
ASoC: wm8958: use <asm/unaligned.h> to simplify code
Ben Zhang (1):
ASoC: rt5677: Add a PCM device for streaming hotword via SPI
Biju Das (1):
ASoC: rsnd: Document r8a774b1 bindings
Brent Lu (1):
ASoC: eve: implement set_bias_level function for rt5514
Charles Keepax (1):
ASoC: madera: Add support for using MCLK3
Cheng-Yi Chiang (5):
ASoC: rockchip: rockchip_max98090: Enable SHDN to fix headset detection
drm: bridge: dw-hdmi: Report connector status using callback
ASoC: rockchip-max98090: Support usage with and without HDMI
ASoC: rockchip_max98090: Optionally support HDMI use case
ASoC: rockchip_max98090: Add HDMI jack support
Chuhong Yuan (1):
ASoC: tlv320aic32x4: add a check for devm_clk_get
Colin Ian King (6):
ASoC: amd: acp3x: clean up indentation issue
ASoC: rt5663: clean up indentation issues
ASoC: wcd9335: clean up indentation issue
ASoC: stm32: sai: clean up indentation issue
ASoC: rt1011: fix spelling mistake "temperture" -> "temperature"
ASoC: rt5677: Add missing null check for failed allocation of rt5677_dsp
Curtis Malainey (1):
ASoC: rt5677-spi: fix sparse warnings
Dan Carpenter (1):
ASoC: fsl_mqs: Fix error handling in probe
Dan Murphy (5):
ASoC: tas2770: Remove unneeded read of the TDM_CFG3 register
ASoc: tas2770: Remove unused defines and variables
ASoC: tas2770: Fix snd_soc_update_bits error handling
ASoc: Add Texas Instruments TAS2562 amplifier binding
ASoC: tas2562: Introduce the TAS2562 amplifier
Daniel Baluta (4):
ASoC: core: Clarify usage of ignore_machine
ASoC: simple_card_utils.h: Add missing include
ASoC: SOF: imx: Describe ESAI parameters to be sent to DSP
ASoC: SOF: imx: Read ESAI parameters and send them to DSP
Dragos Tarcatu (2):
ASoC: SOF: topology: Fix bytes control size checks
ASoC: SOF: topology: Fix bytes control size checks
Edward Cragg (2):
ASoC: tegra: Allow 24bit and 32bit samples
ASoC: tegra: add a TDM configuration callback
Frank Shi (2):
dt-bindings: ASoC: Add tas2770 smart PA dt bindings
tas2770: add tas2770 smart PA kernel driver
Geert Uytterhoeven (2):
ASoC: Spelling s/configr/configur/
ASoC: pxa: poodle: Spelling s/enpoints/endpoints/, s/connetion/connection/
Jaroslav Kysela (2):
ASoC: intel - fix the card names
ASoC: SOF - remove the dead code (skylake/kabylake)
Jaska Uimonen (3):
ASoC: SOF: enable dual control for pga
AsoC: SOF: refactor control load code
ASoC: SOF: acpi led support for switch controls
Jerome Brunet (1):
ASoC: hdmi-codec: drop mutex locking again
Jiada Wang (2):
ASoC: rsnd: dma: set bus width to data width for monaural data
ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address
Jiaxin Yu (2):
dt-bindings: medaitek: mt8183: add property "resets" && "reset-names"
ASoC: mt8183: fix audio playback slowly after playback during bootup
Kai Vehmanen (12):
ASoC: SOF: enable sync_write in hdac_bus
Revert "ASoC: SOF: Force polling mode on CFL and CNL"
ALSA: hda/hdmi - implement mst_no_extra_pcms flag
ASoC: hdac_hda: add support for HDMI/DP as a HDA codec
ASoC: Intel: skl-hda-dsp-generic: use snd-hda-codec-hdmi
ASoC: Intel: skl-hda-dsp-generic: fix include guard name
ASoC: SOF: Intel: add support for snd-hda-codec-hdmi
ASoC: Intel: bxt-da7219-max98357a: common hdmi codec support
ASoC: Intel: glk_rt5682_max98357a: common hdmi codec support
ASoC: intel: sof_rt5682: common hdmi codec support
ASoC: Intel: bxt_rt298: common hdmi codec support
ASoC: hdac_hda: fix race in device removal
Keyon Jie (27):
ASoC: SOF: Intel: hda-stream: fix the CONFIG_ prefix missing
ASoC: SOF: add a field to store the current D0 substate of DSP
ASoC: SOF: reset default d0_substate at probe() and resume()
ASoC: SOF: add set_power_state() to dsp_ops for power state update
ASoC: SOF: Intel: hda-dsp: Add helper for setting DSP D0ix substate
ASoC: SOF: Intel: CNL: add set_power_state() ops
ASoC: SOF: Intel: APL: add set_power_state() ops
ASoC: SOF: add flag to snd_sof_pcm_stream for D0i3 compatible stream
ASoC: SOF: token: add tokens for PCM compatible with D0i3 substate
ASoC: SOF: topology: parse and store d0i3_compatible flag
ASoC: SOF: Intel: hda-dsp: align the comments for D0I3C update
ASoC: SOF: Intel: HDA: use macro for register polling retry count
ASoC: SOF: PM: rename sof_send_pm_ipc to sof_send_pm_ctx_ipc
ASoC: SOF: ipc: introduce message for DSP power gating
ASoC: SOF: Intel: hda-ipc: Don't read mailbox for PM_GATE reply
ASoC: SOF: Intel: HDA: add cAVS specific compact IPC header file
ASoC: SOF: configure D0ix IPC flags in set_power_state
ASoC: SOF: PM: add helpers for setting D0 substate for ADSP
ASoC: SOF: Intel: CNL: add support for sending compact IPC
ASoC: SOF: add a flag to indicate the system suspend target
ASoC: SOF: add a flag suspend_ignored for sof stream
ASoC: SOF: PM: implement prepare/complete callbacks
ASoC: SOF: ignore suspend/resume for D0ix compatible streams
ASoC: SOF: Intel: hda-dsp: implement suspend/resume for S0ix<->S0 transition
ASoC: SOF: return -ENOTSUPP if D0I3 is not supported
ASoC: SOF: PM: Add support for DSP D0i3 state when entering S0ix
ASoC: SOF: pci: Add prepare/complete PM callbacks
Kuninori Morimoto (91):
ASoC: soc-component.h: remove GPL explanation from header
ASoC: soc-core: move soc_free_pcm_runtime()
ASoC: soc-core: merge soc_add_pcm_runtime() into soc_new_pcm_runtime()
ASoC: soc-core: call list_del(&rtd->list) at soc_free_pcm_runtime()
ASoC: soc-core: create rtd->codec_dais first
ASoC: soc-core: merge soc_new_pcm_runtime() and soc_rtd_init()
ASoC: soc-core: merge soc_free_pcm_runtime() and soc_rtd_free()
ASoC: soc-core: tidyup soc_new_pcm_runtime() alloc order
ASoC: soc-core: remove snd_soc_rtdcom_del_all()
ASoC: soc-core: use devm_kzalloc() for rtd
ASoC: soc-core: remove soc_remove_dai_links()
ASoC: soc-core: add soc_setup_card_name()
ASoC: soc-core: use devm_xxx for component related resource
ASoC: soc-core: setup card->rtd_num at snd_soc_instantiate_card()
ASoC: soc-ops: use snd_soc_card_get_kcontrol() at snd_soc_limit_volume()
ASoC: soc-core: merge snd_pcm_ops member to component driver
ASoC: soc-core: add new pcm_construct/pcm_destruct
ASoC: soc-core: add snd_soc_pcm_lib_ioctl()
ASoC: intel: sst-haswell-pcm: remove snd_pcm_ops
ASoC: intel: skl-pcm: remove snd_pcm_ops
ASoC: intel: sst-mfld-platform-pcm: remove snd_pcm_ops
ASoC: intel: sst-baytrail-pcm: remove snd_pcm_ops
ASoC: amd: acp3x-pcm-dma: remove snd_pcm_ops
ASoC: amd: acp-pcm-dma: remove snd_pcm_ops
ASoC: atmel: atmel-pcm-pdc: remove snd_pcm_ops
ASoC: au1x: dbdma2: remove snd_pcm_ops
ASoC: au1x: dma: remove snd_pcm_ops
ASoC: xtensa: xtfpga-i2s: remove snd_pcm_ops
ASoC: xilinx: xlnx_formatter_pcm: remove snd_pcm_ops
ASoC: uniphier: aio-dma: remove snd_pcm_ops
ASoC: txx9: txx9aclc: remove snd_pcm_ops
ASoC: stm: stm32_adfsdm: remove snd_pcm_ops
ASoC: sprd: sprd-pcm-dma: remove snd_pcm_ops
ASoC: sof: pcm: remove snd_pcm_ops
ASoC: sh: rsnd: remove snd_pcm_ops
ASoC: sh: fsi: remove snd_pcm_ops
ASoC: sh: dma-sh7760: remove snd_pcm_ops
ASoC: sh: siu_pcm: remove snd_pcm_ops
ASoC: samsung: idma: remove snd_pcm_ops
ASoC: qcom: lpass-platform: remove snd_pcm_ops
ASoC: qcom: q6routing: remove snd_pcm_ops
ASoC: qcom: q6asm-dai: remove snd_pcm_ops
ASoC: pxa: mmp-pcm: remove snd_pcm_ops
ASoC: pxa: remove snd_pcm_ops
ASoC: meson: remove snd_pcm_ops
ASoC: mediatek: mtk-btcvsd: remove snd_pcm_ops
ASoC: mediatek: remove snd_pcm_ops
ASoC: kirkwood: kirkwood-dma: remove snd_pcm_ops
ASoC: dwc: dwc-pcm: remove snd_pcm_ops
ASoC: rt5514-spi: remove snd_pcm_ops
ASoC: bcm: cygnus-pcm: remove snd_pcm_ops
ASoC: fsl: imx-pcm-fiq: remove snd_pcm_ops
ASoC: fsl: fsl_dma: remove snd_pcm_ops
ASoC: fsl: mpc5200_dma: remove snd_pcm_ops
ASoC: fsl: fsl_asrc_dma: remove snd_pcm_ops
ASoC: fsl: fsl_dma: don't use snd_soc_rtdcom_lookup()
ASoC: soc-generic-dmaengine-pcm: remove snd_pcm_ops
ASoC: soc-utils: remove snd_pcm_ops
ASoC: soc-component: remove snd_pcm_ops from component driver
ASoC: simple-card: fixup simple_dai_link_of_dpcm() comment
ASoC: sof: include types.h at header.h
ASoC: audio-graph: fixup graph_dai_link_of_dpcm() comment
ASoC: soc-pcm: fixup dpcm_prune_paths() loop continue
ASoC: soc-core: remove for_each_rtdcom_safe()
ASoC: soc-core: snd_soc_unbind_card() cleanup
ASoC: soc-core: add for_each_rtd_components() and replace
ASoC: rsnd: add missing of_node_put()
ASoC: soc-dpcm: tidyup for_each_dpcm_xx() macro
ASoC: rsnd: core.c: add WARN_ON() on rsnd_channel_normalization()
ASoC: rt5677-spi: fixup compile warning
ASoC: soc-core: remove unneeded snd_soc_tplg_component_remove()
ASoC: soc-core: move soc_init_dai_link()
ASoC: soc-core: tidyup soc_init_dai_link()
ASoC: soc-core: typo fix at soc_dai_link_sanity_check()
ASoC: soc-core: remove duplicated soc_is_dai_link_bound()
ASoC: soc-core: call soc_bind_dai_link() under snd_soc_add_dai_link()
ASoC: soc-core: add soc_unbind_dai_link()
ASoC: soc-core: move snd_soc_lookup_component()
ASoC: soc-core: tidyup snd_soc_lookup_component()
ASoC: soc-core: add snd_soc_del_component_unlocked()
ASoC: soc-core: remove snd_soc_component_add/del()
ASoC: soc-core: use snd_soc_lookup_component() at snd_soc_unregister_component()
ASoC: soc-core: move snd_soc_register_dai()
ASoC: soc-core: move snd_soc_unregister_dais()
ASoC: soc-core: add snd_soc_unregister_dai()
ASoC: soc-core: have legacy_dai_naming at snd_soc_register_dai()
ASoC: soc-core: don't call snd_soc_dapm_new_dai_widgets() at snd_soc_register_dai()
ASoC: soc-core: call snd_soc_register_dai() from snd_soc_register_dais()
ASoC: soc-core: remove topology specific operation
ASoC: soc.h: dobj is used only when SND_SOC_TOPOLOGY
ASoC: soc-core: fixup dead-lock at snd_soc_unregister_component()
Lars-Peter Clausen (2):
ASoC: adau1761: Add PGA Slew time control
ASoC: adau1761: Add ALC controls
Liam Girdwood (2):
ASoC: SOF: ipc: retain DSP context after FW exception.
ASoC: SOF: Intel: Add context data to any IPC timeout.
Maciej Falkowski (3):
dt-bindings: sound: Convert Samsung Exynos Odroid XU3/XU4 audio complex to dt-schema
dt-bindings: sound: Convert Samsung I2S controller to dt-schema
ASoC: samsung: i2s: Document clocks macros
Mao Wenan (1):
ASoC: mediatek: Check SND_SOC_CROS_EC_CODEC dependency
Marcin Rajwa (2):
ASoC: SOF: ipc: introduce no_stream_position in sof_ipc_stream_params struct
ASoC: SOF: Intel: hda: fix reset of host_period_bytes
Mark Brown (2):
Merge branch 'asoc-5.4' into asoc-5.5
Merge branch 'for-5.4' of https://git.kernel.org/.../broonie/sound into asoc-5.5
Markus Elfring (1):
ASoC: xlnx: Use devm_platform_ioremap_resource() in xlnx_formatter_pcm_probe()
Maxime Ripard (3):
ASoC: dt-bindings: Convert Allwinner A23 analog codec to a schema
ASoC: dt-bindings: Convert Allwinner A10 codec to a schema
ASoC: adau7118: Fix example warning
Michael Ellerman (1):
ASoC: fsl: fsl_dma: fix build failure
Naveen M (1):
ASoC: Intel: eve: Enable mclk and ssp sclk early
Naveen Manohar (2):
ASoC: Intel: Add acpi match for rt1011 based m/c driver
ASoC: Intel: boards: Add CML m/c using RT1011 and RT5682
Navid Emamdoost (2):
ASoC: SOF: Fix memory leak in sof_dfsentry_write
ASoC: SOF: ipc: Fix memory leak in sof_set_get_large_ctrl_data
Nuno Sá (4):
ASOC: Add ADAU7118 8 Channel PDM-to-I2S/TDM Converter driver
dt-bindings: asoc: Add ADAU7118 documentation
dt-bindings: asoc: adau7118: Cleanup
ASOC: adau7118: Change regulators id
Olivier Moysan (2):
ASoC: stm32: spdifrx: retry synchronization in sync state
ASoC: stm32: sai: add restriction on mmap support
Pan Xiuli (2):
ASoC: Intel: common: add ACPI matching tables for JSL
ASoC: SOF: Intel: initial support to JasperLake.
Peter Ujfalusi (4):
ASoC: soc-pcm: Use different sequence for start/stop trigger
ASoC: pcm3168a: Use fixup instead of constraint for channels and formats
ASoC: pcm3168a: Fix serial mode dependent format support
ASoC: ti: sdma-pcm: Add back the flags parameter for non standard dma names
Pierre-Louis Bossart (25):
ASoC: SOF: trace: move to opt-in with Kconfig and module parameter
ASoC: soc-acpi: add link_mask field
ASoC: SOF: support alternate list of machines
ASoC: SOF: acpi: add debug module param
ASoC: SOF: pci: add debug module param
ASoC: SOF: Intel: byt: fix operator precedence warnings
ASoC: SOF: Intel: bdw: fix operator precedence warnings
ASoC: SOF: topology: remove always-true redundant test
ASoC: SOF: topology: check errors when parsing LED tokens
ASoC: SOF: Intel: hda-loader: improve error handling
ASoC: SOF: Intel: hda: add dev_err() traces for snd_sof_dsp_read_poll_timeout()
ASoC: SOF: define INFO_ flags in dsp_ops
ASoC: SOF: Intel: only support INFO_BATCH for legacy platforms
ASoC: SOF: Intel: Baytrail: clarify mutual exclusion with Atom/SST driver
ASoC: SOF: Intel: Broadwell: clarify mutual exclusion with legacy driver
ASoC: Intel: add mutual exclusion between SOF and legacy Baytrail driver
ASoC: SOF: Kconfig: add EXPERT dependency for developer options, clarify help
ASoC: SOF: imx: fix reverse CONFIG_SND_SOC_SOF_OF dependency
ASoC: SOF: Intel: use def_tristate, avoid using select
ASoC: Intel: Skylake: mark HDAudio codec support as deprecated.
ASoC: Intel: boards: remove select SND_HDA_DSP_LOADER
ASoC: Intel: boards: fix configs for bxt-da7219-max98057a
ASoC: Intel: boards: Geminilake is only supported by SOF
ASoC: Intel: boards: sof_rt5682: use dependency on SOF_HDA_LINK
ASoC: soc-core: fix RIP warning on card removal
Ranjani Sridharan (4):
ASoC: SOF: core: check for mandatory fw_ready op during SOF probe
ASoC: SOF: Intel: hda: Simplify the hda_dsp_wait_d0i3c_done() function
ASoC: pcm: update FE/BE trigger order based on the command
ASoC: SOF: topology: set trigger order for FE DAI link
Rikard Falkeborn (1):
ASoC: tas2562: Fix misuse of GENMASK macro
Russell King (3):
ASoC: kirkwood: fix external clock probe defer
ASoC: kirkwood: fix IRQ error handling
ASoC: kirkwood: fix device remove ordering
Sam McNally (1):
ASoC: Intel: cht_bsw_rt5645: Add quirk for boards using pmc_plt_clk_0
Shengjiu Wang (8):
ASoC: fsl_mqs: add DT binding documentation
ASoC: fsl_mqs: Add MQS component driver
ASoC: fsl_asrc: Use in(out)put_format instead of in(out)put_word_width
ASoC: fsl_asrc: update supported sample format
ASoC: pcm_dmaengine: Extract snd_dmaengine_pcm_refine_runtime_hwparams
ASoC: fsl_asrc: Fix error with S24_3LE format bitstream in i.MX8
ASoC: fsl_asrc: refine the setting of internal clock divider
ASoC: fsl_esai: Add spin lock to protect reset, stop and start
Shuming Fan (10):
ASoC: rt1011: set tx/rx slots from tx/rx_mask in TDM case
ASoC: dt-bindings: rt1011: add r0 and temperature device property
ASoC: rt1011: Read and apply r0 and temperature device property
ASoC: rt5682: improve the sensitivity of push button
ASoC: dt-bindings: rt5682: add button delay device property
ASoC: rt1011: remove redundant code in kcontrol
ASoC: rt1011: improve the rt1011_set_dai_fmt() function
ASoC: rt1011: remove unnecessary tabs using spaces instead
ASoC: rt1011: add the range check for temperature_calib from device property
ASoC: rt1011: some minor changes to improve readability
Stephan Gerhold (2):
ASoC: msm8916-wcd-analog: Fix RX1 selection in RDAC2 MUX
ASoC: msm8916-wcd-analog: Add earpiece
Stephen Boyd (2):
ASoC: jz4740: Use of_device_get_match_data()
ASoC: jz4740: Remove unused match variable
Sylwester Nawrocki (6):
ASoC: wm8994: Add support for setting MCLK clock rate
ASoC: wm8994: Add support for MCLKn clock gating
ASoC: dt-bindings: Document "samsung, arndale-wm1811" compatible
ASoC: samsung: arndale: Simplify DAI link initialization
ASoC: samsung: arndale: Add support for WM1811 CODEC
ASoC: samsung: Rename Arndale card driver
Tzung-Bi Shih (11):
ASoC: dt-bindings: mt8183: add missing update
platform/chrome: cros_ec: remove unused EC feature
ASoC: cros_ec_codec: refactor I2S RX
ASoC: cros_ec_codec: extract DMIC EC command from I2S RX
platform/chrome: cros_ec: add common commands for EC codec
ASoC: cros_ec_codec: read max DMIC gain from EC codec
ASoC: dt-bindings: cros_ec_codec: add SHM bindings
ASoC: cros_ec_codec: support WoV
ASoC: mediatek: mt6358: support WoV
ASoC: dt-bindings: mt8183: add ec-codec
ASoC: mediatek: mt8183: support WoV
Xiaojun Sang (1):
ASoC: compress: fix unsigned integer overflow check
Yong Zhi (1):
ASoC: max98373: replace gpio_request with devm_gpio_request
YueHaibing (6):
ASoc: tas2770: Fix build error without GPIOLIB
ASoC: fsl_mqs: remove set but not used variable 'bclk'
ASoC: adau7118: Fix Kconfig warning without CONFIG_I2C
ASoC: fsl_mqs: Move static keyword to the front of declarations
ASoC: SOF: Fix randbuild error
ASoC: sunxi: sun4i-codec: remove unneeded semicolon
kbuild test robot (1):
tas2770: fix platform_no_drv_owner.cocci warnings
zhong jiang (1):
ASoC: ux500: Remove redundant variable "status"
.clang-format | 17 +-
.gitignore | 6 +-
.mailmap | 29 +-
CREDITS | 2 +-
Documentation/ABI/stable/sysfs-bus-w1 | 2 +-
Documentation/ABI/stable/sysfs-driver-w1_ds28e04 | 4 +-
Documentation/ABI/stable/sysfs-driver-w1_ds28ea00 | 2 +-
Documentation/ABI/testing/debugfs-hisi-zip | 50 +
Documentation/ABI/testing/debugfs-moxtet | 23 +
Documentation/ABI/testing/dev-kmsg | 15 +-
Documentation/ABI/testing/ima_policy | 6 +-
.../ABI/testing/sysfs-bus-iio-dfsdm-adc-stm32 | 2 +-
.../ABI/testing/sysfs-bus-iio-timer-stm32 | 23 -
.../ABI/testing/sysfs-bus-intel_th-devices-msc | 3 +-
Documentation/ABI/testing/sysfs-bus-moxtet-devices | 17 +
Documentation/ABI/testing/sysfs-class-backlight | 26 +
.../{sysfs-class-mic.txt => sysfs-class-mic} | 0
Documentation/ABI/testing/sysfs-class-remoteproc | 10 +
Documentation/ABI/testing/sysfs-class-wakeup | 76 +
Documentation/ABI/testing/sysfs-class-watchdog | 34 +
.../testing/sysfs-devices-platform-stratix10-rsu | 128 +
Documentation/ABI/testing/sysfs-devices-power | 9 +
Documentation/ABI/testing/sysfs-devices-soc | 7 +
Documentation/ABI/testing/sysfs-devices-system-cpu | 10 +
Documentation/ABI/testing/sysfs-driver-habanalabs | 14 +-
Documentation/ABI/testing/sysfs-firmware-efi | 8 +
.../ABI/testing/sysfs-firmware-turris-mox-rwtm | 37 +
Documentation/ABI/testing/sysfs-fs-f2fs | 7 +
Documentation/ABI/testing/sysfs-kernel-btf | 17 +
Documentation/ABI/testing/sysfs-kernel-slab | 13 +-
Documentation/ABI/testing/sysfs-platform-dfl-fme | 85 +
Documentation/ABI/testing/sysfs-platform-dfl-port | 85 +
Documentation/ABI/testing/sysfs-power | 106 +
Documentation/DMA-API.txt | 19 +-
Documentation/PCI/index.rst | 2 +-
Documentation/PCI/pci-error-recovery.rst | 6 +-
.../PCI/{picebus-howto.rst => pciebus-howto.rst} | 0
.../RCU/Design/Requirements/Requirements.html | 73 +-
Documentation/RCU/rculist_nulls.txt | 2 +-
Documentation/RCU/stallwarn.txt | 6 +
Documentation/acpi/dsd/leds.txt | 99 -
.../admin-guide/auxdisplay/cfag12864b.rst | 98 +
Documentation/admin-guide/auxdisplay/index.rst | 16 +
Documentation/admin-guide/auxdisplay/ks0108.rst | 50 +
.../admin-guide/cgroup-v1/blkio-controller.rst | 6 -
Documentation/admin-guide/cgroup-v1/memory.rst | 4 +-
Documentation/admin-guide/cgroup-v2.rst | 131 +
Documentation/admin-guide/cifs/authors.rst | 69 +
Documentation/admin-guide/cifs/changes.rst | 8 +
Documentation/admin-guide/cifs/index.rst | 21 +
Documentation/admin-guide/cifs/introduction.rst | 53 +
Documentation/admin-guide/cifs/todo.rst | 133 +
Documentation/admin-guide/cifs/usage.rst | 869 +
.../cifs/winucase_convert.pl | 0
Documentation/admin-guide/conf.py | 10 -
.../admin-guide/device-mapper/dm-clone.rst | 333 +
Documentation/admin-guide/device-mapper/verity.rst | 7 +
Documentation/admin-guide/devices.txt | 11 +-
Documentation/admin-guide/hw-vuln/spectre.rst | 88 +-
Documentation/admin-guide/index.rst | 5 +
Documentation/admin-guide/jfs.rst | 66 +
Documentation/admin-guide/kernel-parameters.txt | 103 +-
.../admin-guide/kernel-per-CPU-kthreads.rst | 8 +-
.../admin-guide/laptops/thinkpad-acpi.rst | 23 +
Documentation/admin-guide/mm/transhuge.rst | 2 +-
Documentation/admin-guide/perf/imx-ddr.rst | 52 +
Documentation/admin-guide/sysctl/net.rst | 29 +-
Documentation/admin-guide/sysrq.rst | 20 +-
Documentation/admin-guide/ufs.rst | 68 +
Documentation/admin-guide/wimax/i2400m.rst | 283 +
Documentation/admin-guide/wimax/index.rst | 19 +
Documentation/admin-guide/wimax/wimax.rst | 89 +
Documentation/admin-guide/xfs.rst | 5 +-
Documentation/arm/sa1100/adsbitsy.rst | 51 -
Documentation/arm/sa1100/assabet.rst | 2 +-
Documentation/arm/sa1100/brutus.rst | 69 -
Documentation/arm/sa1100/freebird.rst | 25 -
Documentation/arm/sa1100/graphicsclient.rst | 102 -
Documentation/arm/sa1100/graphicsmaster.rst | 60 -
Documentation/arm/sa1100/huw_webpanel.rst | 21 -
Documentation/arm/sa1100/index.rst | 12 -
Documentation/arm/sa1100/itsy.rst | 47 -
Documentation/arm/sa1100/nanoengine.rst | 11 -
Documentation/arm/sa1100/pangolin.rst | 29 -
Documentation/arm/sa1100/pleb.rst | 13 -
Documentation/arm/sa1100/tifon.rst | 7 -
Documentation/arm/sa1100/yopy.rst | 5 -
Documentation/arm/samsung-s3c24xx/index.rst | 2 +-
Documentation/arm/sh-mobile/.gitignore | 1 -
Documentation/arm64/index.rst | 1 +
Documentation/arm64/kasan-offsets.sh | 27 +
Documentation/arm64/memory.rst | 123 +-
Documentation/arm64/silicon-errata.rst | 2 +
Documentation/arm64/tagged-address-abi.rst | 156 +
Documentation/arm64/tagged-pointers.rst | 21 +-
Documentation/auxdisplay/cfag12864b | 105 -
Documentation/auxdisplay/ks0108 | 55 -
Documentation/block/null_blk.rst | 33 +-
Documentation/block/switching-sched.rst | 4 -
Documentation/bpf/prog_flow_dissector.rst | 18 +
Documentation/conf.py | 30 +-
Documentation/core-api/conf.py | 10 -
Documentation/core-api/index.rst | 3 +-
Documentation/core-api/kernel-api.rst | 3 +
Documentation/core-api/packing.rst | 166 +
Documentation/core-api/printk-formats.rst | 16 +-
Documentation/cpu-freq/core.txt | 16 +-
Documentation/crypto/conf.py | 10 -
Documentation/crypto/crypto_engine.rst | 1 +
Documentation/dev-tools/conf.py | 10 -
Documentation/devicetree/bindings/Makefile | 4 +-
Documentation/devicetree/bindings/arm/actions.txt | 56 -
Documentation/devicetree/bindings/arm/actions.yaml | 38 +
Documentation/devicetree/bindings/arm/amlogic.yaml | 21 +-
.../arm/amlogic/amlogic,meson-gx-ao-secure.txt | 28 -
.../arm/amlogic/amlogic,meson-gx-ao-secure.yaml | 52 +
Documentation/devicetree/bindings/arm/arm,scmi.txt | 17 +
Documentation/devicetree/bindings/arm/arm-boards | 2 +-
Documentation/devicetree/bindings/arm/cpus.yaml | 3 +
.../devicetree/bindings/arm/freescale/fsl,scu.txt | 4 +-
Documentation/devicetree/bindings/arm/fsl.yaml | 26 +
.../devicetree/bindings/arm/idle-states.txt | 34 +-
Documentation/devicetree/bindings/arm/l2c2x0.yaml | 4 +
.../arm/marvell/ap806-system-controller.txt | 42 +-
.../bindings/arm/marvell/armada-37xx.txt | 8 +
.../arm/marvell/cp110-system-controller.txt | 4 +-
.../devicetree/bindings/arm/mediatek.yaml | 4 +
.../bindings/arm/mediatek/mediatek,apmixedsys.txt | 1 +
.../bindings/arm/mediatek/mediatek,audsys.txt | 1 +
.../bindings/arm/mediatek/mediatek,camsys.txt | 1 +
.../bindings/arm/mediatek/mediatek,imgsys.txt | 1 +
.../bindings/arm/mediatek/mediatek,infracfg.txt | 1 +
.../bindings/arm/mediatek/mediatek,ipesys.txt | 22 +
.../bindings/arm/mediatek/mediatek,mfgcfg.txt | 1 +
.../bindings/arm/mediatek/mediatek,mmsys.txt | 1 +
.../bindings/arm/mediatek/mediatek,pericfg.txt | 1 +
.../bindings/arm/mediatek/mediatek,sgmiisys.txt | 2 -
.../bindings/arm/mediatek/mediatek,topckgen.txt | 1 +
.../bindings/arm/mediatek/mediatek,vdecsys.txt | 1 +
.../bindings/arm/mediatek/mediatek,vencsys.txt | 1 +
Documentation/devicetree/bindings/arm/qcom.yaml | 8 +
Documentation/devicetree/bindings/arm/realtek.txt | 22 -
Documentation/devicetree/bindings/arm/realtek.yaml | 23 +
Documentation/devicetree/bindings/arm/renesas.yaml | 2 +-
.../devicetree/bindings/arm/rockchip.yaml | 45 +-
.../bindings/arm/socionext/milbeaut.yaml | 2 +-
Documentation/devicetree/bindings/arm/sunxi.yaml | 16 +
.../devicetree/bindings/arm/ti/ti,davinci.yaml | 2 +-
Documentation/devicetree/bindings/arm/topology.txt | 475 -
.../devicetree/bindings/ata/ahci-platform.txt | 2 +-
.../bindings/bus/allwinner,sun50i-a64-de2.yaml | 85 +
Documentation/devicetree/bindings/bus/imx-weim.txt | 4 +
Documentation/devicetree/bindings/bus/moxtet.txt | 46 +
.../devicetree/bindings/bus/qcom,ebi2.txt | 2 +-
.../devicetree/bindings/bus/sun50i-de2-bus.txt | 40 -
.../bindings/clock/allwinner,sun4i-a10-ccu.yaml | 3 +-
.../bindings/clock/amlogic,axg-audio-clkc.txt | 1 +
.../bindings/clock/amlogic,gxbb-clkc.txt | 1 +
.../bindings/clock/brcm,bcm2835-cprman.txt | 4 +-
.../devicetree/bindings/clock/imx8mn-clock.yaml | 112 +
.../devicetree/bindings/clock/qcom,gcc.txt | 21 +
.../devicetree/bindings/clock/qcom,rpmh-clk.txt | 7 +-
.../{emev2-clock.txt => renesas,emev2-smu.txt} | 0
.../bindings/clock/rockchip,rk3308-cru.txt | 60 +
.../devicetree/bindings/clock/ti,cdce925.txt | 4 +
.../bindings/connector/usb-connector.txt | 14 +
.../devicetree/bindings/cpu/cpu-topology.txt | 553 +
.../crypto/allwinner,sun4i-a10-crypto.yaml | 79 +
.../devicetree/bindings/crypto/sun4i-ss.txt | 23 -
.../bindings/display/amlogic,meson-dw-hdmi.txt | 119 -
.../bindings/display/amlogic,meson-dw-hdmi.yaml | 150 +
.../bindings/display/amlogic,meson-vpu.txt | 121 -
.../bindings/display/amlogic,meson-vpu.yaml | 137 +
.../devicetree/bindings/display/arm,pl11x.txt | 9 +-
.../devicetree/bindings/display/bridge/sii902x.txt | 5 +-
.../bindings/display/connector/hdmi-connector.txt | 1 +
.../display/panel/ampire,am-480272h3tmqw-t01h.txt | 26 -
.../display/panel/ampire,am-480272h3tmqw-t01h.yaml | 42 +
.../display/panel/arm,versatile-tft-panel.txt | 2 +-
.../display/panel/armadeus,st0700-adapt.txt | 9 -
.../display/panel/armadeus,st0700-adapt.yaml | 33 +
.../display/panel/bananapi,s070wv20-ct16.txt | 12 -
.../display/panel/bananapi,s070wv20-ct16.yaml | 31 +
.../bindings/display/panel/boe,himax8279d.txt | 24 +
.../bindings/display/panel/dlc,dlc0700yzg-1.txt | 13 -
.../bindings/display/panel/dlc,dlc0700yzg-1.yaml | 31 +
.../bindings/display/panel/edt,et-series.txt | 2 +-
.../bindings/display/panel/giantplus,gpm940b0.txt | 12 +
.../bindings/display/panel/innolux,ee101ia-01d.txt | 7 -
.../display/panel/innolux,ee101ia-01d.yaml | 31 +
.../display/panel/kingdisplay,kd035g6-54nt.txt | 42 +
.../devicetree/bindings/display/panel/lvds.yaml | 107 +
.../display/panel/mitsubishi,aa104xd12.txt | 47 -
.../display/panel/mitsubishi,aa104xd12.yaml | 75 +
.../display/panel/mitsubishi,aa121td01.txt | 47 -
.../display/panel/mitsubishi,aa121td01.yaml | 74 +
.../bindings/display/panel/nec,nl8048hl11.yaml | 62 +
.../display/panel/ortustech,com37h3m05dtc.txt | 12 +
.../display/panel/ortustech,com37h3m99dtc.txt | 12 +
.../bindings/display/panel/panel-common.txt | 101 -
.../bindings/display/panel/panel-common.yaml | 149 +
.../bindings/display/panel/panel-lvds.txt | 121 -
.../devicetree/bindings/display/panel/panel.txt | 4 -
.../bindings/display/panel/pda,91-00156-a0.txt | 14 -
.../bindings/display/panel/pda,91-00156-a0.yaml | 31 +
.../panel/raspberrypi,7inch-touchscreen.txt | 49 -
.../panel/raspberrypi,7inch-touchscreen.yaml | 71 +
.../bindings/display/panel/raydium,rm67191.txt | 41 +
.../display/panel/rocktech,jh057n00900.txt | 5 +
.../bindings/display/panel/sgd,gktw70sdae4se.txt | 41 -
.../bindings/display/panel/sgd,gktw70sdae4se.yaml | 68 +
.../bindings/display/panel/sharp,ld-d5116z01b.txt | 26 +
.../bindings/display/panel/sharp,lq070y3dg3b.txt | 12 +
.../bindings/display/panel/sharp,ls020b1dd01d.txt | 12 +
.../bindings/display/panel/simple-panel.txt | 29 +-
.../display/panel/tfc,s9700rtwv43tr-01b.txt | 15 -
.../display/panel/tfc,s9700rtwv43tr-01b.yaml | 33 +
.../bindings/display/panel/ti,nspire.yaml | 36 +
.../bindings/display/panel/tpo,tpg110.txt | 70 -
.../bindings/display/panel/tpo,tpg110.yaml | 101 +
.../display/rockchip/dw_mipi_dsi_rockchip.txt | 23 +-
.../bindings/display/rockchip/rockchip-lvds.txt | 11 -
.../devicetree/bindings/display/ssd1307fb.txt | 10 +
.../bindings/dma/allwinner,sun4i-a10-dma.yaml | 55 +
.../bindings/dma/allwinner,sun50i-a64-dma.yaml | 88 +
.../bindings/dma/allwinner,sun6i-a31-dma.yaml | 62 +
.../devicetree/bindings/dma/dma-common.yaml | 45 +
.../devicetree/bindings/dma/dma-controller.yaml | 35 +
.../devicetree/bindings/dma/dma-router.yaml | 50 +
Documentation/devicetree/bindings/dma/dma.txt | 114 +-
.../dma/{nbpfaxi.txt => renesas,nbpfaxi.txt} | 0
.../bindings/dma/{shdma.txt => renesas,shdma.txt} | 0
.../devicetree/bindings/dma/sun4i-dma.txt | 45 -
.../devicetree/bindings/dma/sun6i-dma.txt | 81 -
Documentation/devicetree/bindings/eeprom/at25.txt | 1 +
.../devicetree/bindings/example-schema.yaml | 2 +-
.../devicetree/bindings/extcon/extcon-arizona.txt | 2 +-
.../devicetree/bindings/extcon/extcon-fsa9480.txt | 4 +-
.../bindings/firmware/cznic,turris-mox-rwtm.txt | 19 +
.../intel,ixp4xx-network-processing-engine.yaml | 2 +-
.../devicetree/bindings/firmware/qcom,scm.txt | 4 +-
.../bindings/fpga/altera-fpga2sdram-bridge.txt | 5 +-
.../bindings/fpga/altera-freeze-bridge.txt | 5 +-
.../bindings/fpga/altera-hps2fpga-bridge.txt | 5 +-
.../devicetree/bindings/fpga/fpga-bridge.txt | 13 +
.../bindings/fpga/xilinx-pr-decoupler.txt | 8 +-
.../devicetree/bindings/gpio/gpio-aspeed.txt | 7 +-
.../devicetree/bindings/gpio/gpio-davinci.txt | 1 +
.../devicetree/bindings/gpio/gpio-moxtet.txt | 18 +
.../devicetree/bindings/gpio/gpio-mpc8xxx.txt | 16 +-
.../devicetree/bindings/gpio/sgpio-aspeed.txt | 45 +
.../devicetree/bindings/gpu/arm,mali-bifrost.txt | 92 -
.../devicetree/bindings/gpu/arm,mali-bifrost.yaml | 116 +
.../devicetree/bindings/gpu/arm,mali-midgard.txt | 119 -
.../devicetree/bindings/gpu/arm,mali-midgard.yaml | 168 +
.../devicetree/bindings/gpu/arm,mali-utgard.txt | 124 -
.../devicetree/bindings/gpu/arm,mali-utgard.yaml | 168 +
Documentation/devicetree/bindings/hwmon/as370.txt | 11 +
.../devicetree/bindings/hwmon/ibm,cffps1.txt | 8 +-
Documentation/devicetree/bindings/hwmon/lm75.txt | 1 +
.../devicetree/bindings/i2c/brcm,bcm2835-i2c.txt | 4 +-
.../devicetree/bindings/i2c/i2c-mux-gpmux.txt | 2 +-
.../bindings/i2c/marvell,mv64xxx-i2c.yaml | 3 +
.../bindings/i2c/{i2c-rcar.txt => renesas,i2c.txt} | 0
.../i2c/{i2c-emev2.txt => renesas,iic-emev2.txt} | 0
.../i2c/{i2c-sh_mobile.txt => renesas,iic.txt} | 0
.../i2c/{i2c-riic.txt => renesas,riic.txt} | 0
.../devicetree/bindings/iio/accel/adi,adxl345.yaml | 2 +-
.../devicetree/bindings/iio/accel/adi,adxl372.yaml | 2 +-
.../devicetree/bindings/iio/adc/adi,ad7192.yaml | 121 +
.../devicetree/bindings/iio/adc/adi,ad7606.txt | 66 -
.../devicetree/bindings/iio/adc/adi,ad7606.yaml | 138 +
.../bindings/{hwmon => iio/adc}/ads1015.txt | 0
.../bindings/iio/adc/allwinner,sun8i-a33-ths.yaml | 43 +
.../devicetree/bindings/iio/adc/st,stm32-adc.txt | 6 +
.../bindings/iio/chemical/plantower,pms7003.txt | 26 -
.../bindings/iio/chemical/plantower,pms7003.yaml | 51 +
.../devicetree/bindings/iio/imu/adi,adis16460.yaml | 53 +
.../devicetree/bindings/iio/imu/st_lsm6dsx.txt | 3 +
.../devicetree/bindings/iio/light/noa1305.yaml | 44 +
.../light/{isl29501.txt => renesas,isl29501.txt} | 0
.../devicetree/bindings/iio/light/stk33xx.yaml | 49 +
.../devicetree/bindings/iio/mount-matrix.txt | 203 +
.../bindings/iio/potentiometer/max5432.yaml | 44 +
.../input/allwinner,sun4i-a10-lradc-keys.yaml | 95 +
.../devicetree/bindings/input/sun4i-lradc-keys.txt | 65 -
.../bindings/input/touchscreen/ads7846.txt | 29 +-
.../bindings/input/touchscreen/bu21013.txt | 27 +-
.../bindings/interconnect/qcom,qcs404.txt | 45 +
.../allwinner,sun4i-a10-ic.yaml | 47 +
.../interrupt-controller/allwinner,sun4i-ic.txt | 20 -
.../allwinner,sun7i-a20-sc-nmi.yaml | 70 +
.../interrupt-controller/allwinner,sunxi-nmi.txt | 29 -
.../interrupt-controller/amazon,al-fic.txt | 16 +-
.../amlogic,meson-gpio-intc.txt | 1 +
.../bindings/interrupt-controller/arm,gic-v3.yaml | 6 +-
.../intel,ixp4xx-interrupt.yaml | 2 +-
.../bindings/interrupt-controller/interrupts.txt | 8 +-
.../interrupt-controller/mediatek,sysirq.txt | 1 +
.../interrupt-controller/snps,archs-idu-intc.txt | 30 +-
.../devicetree/bindings/iommu/mediatek,iommu.txt | 30 +-
.../devicetree/bindings/leds/ams,as3645a.txt | 22 +-
Documentation/devicetree/bindings/leds/common.txt | 62 +-
.../devicetree/bindings/leds/leds-aat1290.txt | 12 +-
.../devicetree/bindings/leds/leds-an30259a.txt | 22 +-
.../devicetree/bindings/leds/leds-cr0014114.txt | 26 +-
.../devicetree/bindings/leds/leds-gpio.txt | 23 +-
.../devicetree/bindings/leds/leds-lm3532.txt | 4 +
.../devicetree/bindings/leds/leds-lm3601x.txt | 10 +-
.../devicetree/bindings/leds/leds-lm3692x.txt | 9 +-
.../devicetree/bindings/leds/leds-lp8860.txt | 9 +-
.../devicetree/bindings/leds/leds-lt3593.txt | 11 +-
.../devicetree/bindings/leds/leds-sc27xx-bltc.txt | 10 +-
.../bindings/mailbox/amlogic,meson-gxbb-mhu.yaml | 52 +
.../devicetree/bindings/mailbox/meson-mhu.txt | 34 -
.../devicetree/bindings/mailbox/mtk-gce.txt | 23 +-
.../bindings/mailbox/qcom,apcs-kpss-global.txt | 3 +
.../bindings/media/allwinner,sun4i-a10-csi.yaml | 109 +
.../bindings/media/allwinner,sun4i-a10-ir.yaml | 80 +
.../devicetree/bindings/media/amlogic,vdec.txt | 5 +-
.../devicetree/bindings/media/cdns,csi2tx.txt | 3 +-
.../devicetree/bindings/media/i2c/nokia,smia.txt | 10 +-
.../devicetree/bindings/media/imx7-csi.txt | 2 +-
.../devicetree/bindings/media/meson-ao-cec.txt | 8 +-
.../devicetree/bindings/media/nvidia,tegra-vde.txt | 2 +
Documentation/devicetree/bindings/media/rc.txt | 118 +-
Documentation/devicetree/bindings/media/rc.yaml | 145 +
.../{renesas,rcar-csi2.txt => renesas,csi2.txt} | 0
.../media/{rcar_imr.txt => renesas,imr.txt} | 0
.../media/{rcar_vin.txt => renesas,vin.txt} | 0
.../devicetree/bindings/media/rockchip-vpu.txt | 18 +-
.../devicetree/bindings/media/sunxi-ir.txt | 28 -
.../memory-controllers/mediatek,smi-common.txt | 12 +-
.../memory-controllers/mediatek,smi-larb.txt | 4 +
...sas-memory-controllers.txt => renesas,dbsc.txt} | 0
.../bindings/mfd/allwinner,sun4i-a10-ts.yaml | 76 +
.../devicetree/bindings/mfd/aspeed-scu.txt | 2 -
Documentation/devicetree/bindings/mfd/mt6397.txt | 20 +-
Documentation/devicetree/bindings/mfd/rn5t618.txt | 5 +
.../devicetree/bindings/mfd/sun4i-gpadc.txt | 59 -
.../devicetree/bindings/misc/aspeed-p2a-ctrl.txt | 2 -
.../misc/intel,ixp4xx-ahb-queue-manager.yaml | 49 +
.../bindings/misc/intel,ixp4xx-queue-manager.yaml | 49 -
.../bindings/mmc/allwinner,sun4i-a10-mmc.yaml | 14 +-
.../devicetree/bindings/mmc/arasan,sdhci.txt | 17 +
.../devicetree/bindings/mmc/aspeed,sdhci.yaml | 106 +
.../devicetree/bindings/mmc/brcm,sdhci-iproc.txt | 4 +-
.../devicetree/bindings/mtd/mxic-nand.txt | 36 +
.../devicetree/bindings/net/adi,adin.yaml | 66 +
.../bindings/net/allwinner,sun7i-a20-gmac.yaml | 3 +
.../bindings/net/allwinner,sun8i-a83t-emac.yaml | 2 +-
.../bindings/net/amlogic,meson-dwmac.yaml | 113 +
.../bindings/net/aspeed,ast2600-mdio.yaml | 45 +
.../devicetree/bindings/net/broadcom-bluetooth.txt | 1 +
.../devicetree/bindings/net/can/fsl-flexcan.txt | 10 +
.../devicetree/bindings/net/can/rcar_can.txt | 6 +-
.../devicetree/bindings/net/can/rcar_canfd.txt | 15 +-
.../devicetree/bindings/net/can/tcan4x5x.txt | 40 +
Documentation/devicetree/bindings/net/dsa/ksz.txt | 4 +
.../devicetree/bindings/net/dsa/marvell.txt | 2 +-
.../devicetree/bindings/net/dsa/mt7530.txt | 214 +
.../devicetree/bindings/net/fsl-enetc.txt | 42 +-
Documentation/devicetree/bindings/net/fsl-fec.txt | 30 +-
Documentation/devicetree/bindings/net/macb.txt | 4 +-
.../devicetree/bindings/net/mediatek-net.txt | 1 +
.../devicetree/bindings/net/meson-dwmac.txt | 71 -
.../devicetree/bindings/net/micrel-ksz90x1.txt | 32 +-
.../devicetree/bindings/net/mscc-ocelot.txt | 20 +-
.../devicetree/bindings/net/renesas,ravb.txt | 1 +
.../devicetree/bindings/net/snps,dwmac.yaml | 16 +-
.../devicetree/bindings/net/ti,dp83867.txt | 4 +
.../bindings/nvmem/allwinner,sun4i-a10-sid.yaml | 4 +-
.../devicetree/bindings/nvmem/imx-ocotp.txt | 3 +-
.../devicetree/bindings/nvmem/nvmem-consumer.yaml | 45 +
Documentation/devicetree/bindings/nvmem/nvmem.txt | 81 +-
Documentation/devicetree/bindings/nvmem/nvmem.yaml | 93 +
.../devicetree/bindings/opp/kryo-cpufreq.txt | 680 -
Documentation/devicetree/bindings/opp/opp.txt | 4 +-
.../devicetree/bindings/opp/qcom-nvmem-cpufreq.txt | 795 +
Documentation/devicetree/bindings/opp/qcom-opp.txt | 19 +
.../bindings/opp/sun50i-nvmem-cpufreq.txt | 167 +
.../devicetree/bindings/pci/designware-pcie.txt | 6 +-
.../devicetree/bindings/pci/fsl,imx6q-pcie.txt | 2 +-
.../devicetree/bindings/pci/mediatek-pcie.txt | 1 +
.../bindings/pci/nvidia,tegra194-pcie.txt | 171 +
.../devicetree/bindings/pci/pci-armada8k.txt | 10 +-
Documentation/devicetree/bindings/pci/pci-msi.txt | 2 +-
Documentation/devicetree/bindings/pci/pci.txt | 5 +
Documentation/devicetree/bindings/pci/pcie-al.txt | 46 +
.../phy/allwinner,sun6i-a31-mipi-dphy.yaml | 2 +-
.../bindings/phy/amlogic,meson-g12a-usb2-phy.yaml | 63 +
.../phy/amlogic,meson-g12a-usb3-pcie-phy.yaml | 57 +
.../bindings/phy/lantiq,vrx200-pcie-phy.yaml | 95 +
.../bindings/phy/meson-g12a-usb2-phy.txt | 22 -
.../bindings/phy/meson-g12a-usb3-pcie-phy.txt | 22 -
.../devicetree/bindings/phy/phy-mvebu-comphy.txt | 10 +
.../devicetree/bindings/phy/phy-tegra194-p2u.txt | 28 +
.../bindings/pinctrl/aspeed,ast2400-pinctrl.yaml | 45 +-
.../bindings/pinctrl/aspeed,ast2500-pinctrl.yaml | 49 +-
.../bindings/pinctrl/aspeed,ast2600-pinctrl.yaml | 115 +
.../bindings/pinctrl/brcm,bcm2835-gpio.txt | 1 +
.../bindings/pinctrl/ingenic,pinctrl.txt | 17 +-
.../bindings/pinctrl/pinctrl-mcp23s08.txt | 2 +-
.../bindings/pinctrl/qcom,msm8998-pinctrl.txt | 5 +-
.../devicetree/bindings/pinctrl/qcom,pmic-gpio.txt | 6 +
.../bindings/pinctrl/qcom,sc7180-pinctrl.txt | 186 +
.../bindings/pinctrl/st,stm32-pinctrl.yaml | 3 +-
.../bindings/power/amlogic,meson-ee-pwrc.yaml | 93 +
.../bindings/power/reset/mt6323-poweroff.txt | 20 +
.../devicetree/bindings/pwm/ingenic,jz47xx-pwm.txt | 22 -
.../devicetree/bindings/pwm/pwm-mediatek.txt | 2 +
Documentation/devicetree/bindings/pwm/pwm-sprd.txt | 40 +
.../bindings/regulator/act8865-regulator.txt | 27 +-
.../bindings/regulator/fixed-regulator.yaml | 19 +-
.../bindings/regulator/mt6358-regulator.txt | 358 +
.../bindings/regulator/qcom,rpmh-regulator.txt | 15 +-
.../devicetree/bindings/regulator/sy8824x.txt | 24 +
.../bindings/regulator/twl-regulator.txt | 7 +
.../bindings/regulator/uniphier-regulator.txt | 5 +-
.../bindings/reset/amlogic,meson-reset.txt | 19 -
.../bindings/reset/amlogic,meson-reset.yaml | 37 +
.../devicetree/bindings/reset/fsl,imx7-src.txt | 6 +-
.../bindings/reset/hisilicon,hi6220-reset.txt | 1 +
.../devicetree/bindings/reset/snps,dw-reset.txt | 30 +
Documentation/devicetree/bindings/riscv/cpus.txt | 162 -
Documentation/devicetree/bindings/riscv/cpus.yaml | 16 +
.../devicetree/bindings/riscv/sifive.yaml | 2 +-
.../devicetree/bindings/rng/amlogic,meson-rng.txt | 21 -
.../devicetree/bindings/rng/amlogic,meson-rng.yaml | 37 +
Documentation/devicetree/bindings/rng/mtk-rng.txt | 1 +
.../devicetree/bindings/rng/timeriomem_rng.txt | 2 +-
.../bindings/rtc/allwinner,sun6i-a31-rtc.yaml | 13 +
.../devicetree/bindings/rtc/nxp,rtc-2123.txt | 4 +-
Documentation/devicetree/bindings/rtc/pcf8563.txt | 4 +-
.../devicetree/bindings/rtc/rtc-ds1307.txt | 1 +
.../devicetree/bindings/rtc/rtc-fsl-ftm-alarm.txt | 36 +
.../devicetree/bindings/rtc/rtc-meson-vrtc.txt | 22 +
.../devicetree/bindings/rtc/trivial-rtc.yaml | 2 -
.../bindings/serial/amlogic,meson-uart.txt | 38 -
.../bindings/serial/amlogic,meson-uart.yaml | 73 +
.../bindings/serial/fsl,s32-linflexuart.txt | 22 +
.../devicetree/bindings/serial/fsl-lpuart.txt | 5 +-
.../devicetree/bindings/serial/mtk-uart.txt | 1 +
.../bindings/serial/nvidia,tegra20-hsuart.txt | 39 +-
.../devicetree/bindings/serial/sifive-serial.txt | 33 -
.../devicetree/bindings/serial/sifive-serial.yaml | 62 +
.../devicetree/bindings/serial/st,stm32-usart.txt | 5 +
.../bindings/soc/amlogic/clk-measure.txt | 1 +
.../devicetree/bindings/soc/fsl/cpm_qe/qe.txt | 13 +-
.../devicetree/bindings/soc/qcom/qcom,aoss-qmp.txt | 5 +-
.../devicetree/bindings/soc/ti/sci-pm-domain.txt | 11 +-
.../devicetree/bindings/sound/adi,adau7118.yaml | 85 +
.../bindings/sound/allwinner,sun4i-a10-codec.yaml | 267 +
.../sound/allwinner,sun8i-a23-codec-analog.yaml | 38 +
.../devicetree/bindings/sound/arndale.txt | 5 +-
.../devicetree/bindings/sound/fsl,mqs.txt | 36 +
.../bindings/sound/google,cros-ec-codec.txt | 24 +-
.../devicetree/bindings/sound/mt8183-afe-pcm.txt | 6 +
.../sound/mt8183-mt6358-ts3a227-max98357.txt | 7 +-
.../devicetree/bindings/sound/renesas,rsnd.txt | 1 +
.../bindings/sound/rockchip-max98090.txt | 27 +-
Documentation/devicetree/bindings/sound/rt1011.txt | 10 +
Documentation/devicetree/bindings/sound/rt5682.txt | 6 +
.../devicetree/bindings/sound/samsung,odroid.txt | 54 -
.../devicetree/bindings/sound/samsung,odroid.yaml | 91 +
.../devicetree/bindings/sound/samsung-i2s.txt | 84 -
.../devicetree/bindings/sound/samsung-i2s.yaml | 138 +
.../devicetree/bindings/sound/sun4i-codec.txt | 94 -
.../bindings/sound/sun8i-codec-analog.txt | 17 -
.../devicetree/bindings/sound/tas2562.txt | 34 +
.../devicetree/bindings/sound/tas2770.txt | 37 +
.../bindings/soundwire/soundwire-controller.yaml | 82 +
.../bindings/spi/amlogic,meson-gx-spicc.yaml | 67 +
.../bindings/spi/amlogic,meson6-spifc.yaml | 53 +
.../devicetree/bindings/spi/nuvoton,npcm-fiu.txt | 47 +
.../devicetree/bindings/spi/spi-controller.yaml | 3 +-
.../devicetree/bindings/spi/spi-fsl-dspi.txt | 1 +
.../devicetree/bindings/spi/spi-fsl-qspi.txt | 9 +-
.../devicetree/bindings/spi/spi-meson.txt | 55 -
.../devicetree/bindings/spi/spi-mt65xx.txt | 1 +
.../devicetree/bindings/spi/spi-sprd-adi.txt | 11 +-
.../devicetree/bindings/thermal/qoriq-thermal.txt | 1 +
.../bindings/timer/allwinner,sun4i-a10-timer.yaml | 102 +
.../bindings/timer/allwinner,sun4i-timer.txt | 19 -
.../bindings/timer/allwinner,sun5i-a13-hstimer.txt | 26 -
.../timer/allwinner,sun5i-a13-hstimer.yaml | 79 +
.../devicetree/bindings/timer/ingenic,tcu.txt | 137 +
.../bindings/timer/intel,ixp4xx-timer.yaml | 2 +-
.../devicetree/bindings/timer/renesas,cmt.txt | 40 +-
.../devicetree/bindings/trivial-devices.yaml | 2 +
.../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 2 +
.../devicetree/bindings/usb/cdns-usb3.txt | 45 +
.../devicetree/bindings/usb/ci-hdrc-usb2.txt | 1 +
.../devicetree/bindings/usb/exynos-usb.txt | 41 +-
.../devicetree/bindings/usb/fcs,fusb302.txt | 7 -
Documentation/devicetree/bindings/usb/generic.txt | 4 +
.../devicetree/bindings/usb/mediatek,mtk-xhci.txt | 5 +-
.../devicetree/bindings/usb/mediatek,mtu3.txt | 12 +-
.../{renesas,usb3.txt => renesas,usb3-peri.txt} | 0
.../devicetree/bindings/usb/usb-conn-gpio.txt | 30 +
Documentation/devicetree/bindings/usb/usb251xb.txt | 6 +-
.../devicetree/bindings/usb/usbmisc-imx.txt | 1 +
.../devicetree/bindings/vendor-prefixes.yaml | 23 +
.../bindings/watchdog/allwinner,sun4i-a10-wdt.yaml | 58 +
.../bindings/watchdog/amlogic,meson-gxbb-wdt.yaml | 37 +
.../devicetree/bindings/watchdog/aspeed-wdt.txt | 1 +
.../bindings/watchdog/fsl-imx7ulp-wdt.txt | 22 +
.../bindings/watchdog/ingenic,jz4740-wdt.txt | 17 -
.../bindings/watchdog/meson-gxbb-wdt.txt | 16 -
.../devicetree/bindings/watchdog/sunxi-wdt.txt | 22 -
.../devicetree/bindings/watchdog/watchdog.yaml | 26 +
Documentation/devicetree/writing-schema.md | 130 -
Documentation/devicetree/writing-schema.rst | 154 +
Documentation/doc-guide/conf.py | 10 -
Documentation/driver-api/80211/conf.py | 10 -
Documentation/driver-api/conf.py | 10 -
Documentation/driver-api/device_link.rst | 4 +-
Documentation/driver-api/dmaengine/index.rst | 2 +-
Documentation/driver-api/generic-counter.rst | 4 +-
Documentation/driver-api/gpio/driver.rst | 138 +-
Documentation/driver-api/index.rst | 2 +
Documentation/driver-api/ipmb.rst | 2 +-
Documentation/driver-api/mtd/spi-nor.rst | 2 +-
Documentation/driver-api/phy/phy.rst | 4 +-
Documentation/driver-api/pinctl.rst | 6 +-
Documentation/driver-api/pm/conf.py | 10 -
Documentation/driver-api/serial/n_gsm.rst | 19 +-
Documentation/driver-api/sgi-ioc4.rst | 49 -
Documentation/driver-api/soundwire/index.rst | 2 +-
.../{ => driver-api}/thermal/cpu-cooling-api.rst | 0
.../{ => driver-api}/thermal/exynos_thermal.rst | 0
.../thermal/exynos_thermal_emulation.rst | 0
Documentation/driver-api/thermal/index.rst | 18 +
.../{ => driver-api}/thermal/intel_powerclamp.rst | 0
.../{ => driver-api}/thermal/nouveau_thermal.rst | 0
.../{ => driver-api}/thermal/power_allocator.rst | 0
Documentation/driver-api/thermal/sysfs-api.rst | 798 +
.../thermal/x86_pkg_temperature_thermal.rst | 55 +
Documentation/driver-api/uio-howto.rst | 7 +
.../features/core/jump-labels/arch-support.txt | 2 +-
.../debug/kprobes-on-ftrace/arch-support.txt | 2 +-
.../locking/queued-rwlocks/arch-support.txt | 2 +-
.../locking/queued-spinlocks/arch-support.txt | 4 +-
.../locking/rwsem-optimized/arch-support.txt | 34 -
Documentation/filesystems/Locking | 576 -
Documentation/filesystems/ceph.txt | 14 +
Documentation/filesystems/cifs/AUTHORS | 63 -
Documentation/filesystems/cifs/CHANGES | 4 -
Documentation/filesystems/cifs/README | 743 -
Documentation/filesystems/cifs/TODO | 119 -
Documentation/filesystems/cifs/cifs.txt | 45 -
Documentation/filesystems/cifs/cifsroot.txt | 97 +
Documentation/filesystems/coda.txt | 4 +-
Documentation/filesystems/conf.py | 10 -
Documentation/filesystems/directory-locking | 135 -
Documentation/filesystems/directory-locking.rst | 145 +
Documentation/filesystems/erofs.txt | 210 +
Documentation/filesystems/ext4/bigalloc.rst | 32 +-
Documentation/filesystems/ext4/blockgroup.rst | 10 +-
Documentation/filesystems/ext4/blocks.rst | 4 +-
Documentation/filesystems/ext4/directory.rst | 2 +-
Documentation/filesystems/ext4/group_descr.rst | 9 +-
Documentation/filesystems/ext4/inodes.rst | 10 +-
Documentation/filesystems/ext4/overview.rst | 1 +
Documentation/filesystems/ext4/super.rst | 22 +-
Documentation/filesystems/ext4/verity.rst | 41 +
Documentation/filesystems/f2fs.txt | 8 +
Documentation/filesystems/fscrypt.rst | 758 +-
Documentation/filesystems/fsverity.rst | 726 +
Documentation/filesystems/index.rst | 15 +
Documentation/filesystems/jfs.txt | 52 -
Documentation/filesystems/locking.rst | 665 +
Documentation/filesystems/mandatory-locking.txt | 10 +
Documentation/filesystems/nfs/Exporting | 160 -
Documentation/filesystems/nfs/exporting.rst | 165 +
Documentation/filesystems/overlayfs.txt | 2 +-
Documentation/filesystems/porting | 686 -
Documentation/filesystems/porting.rst | 852 +
Documentation/filesystems/ubifs-authentication.md | 426 -
Documentation/filesystems/ubifs-authentication.rst | 444 +
Documentation/filesystems/ufs.txt | 60 -
Documentation/filesystems/vfs.rst | 2 +-
Documentation/filesystems/virtiofs.rst | 60 +
Documentation/firmware-guide/acpi/dsd/leds.rst | 111 +
Documentation/firmware-guide/acpi/index.rst | 1 +
Documentation/fpga/dfl.rst | 105 +
Documentation/gpu/conf.py | 10 -
Documentation/gpu/drivers.rst | 1 -
Documentation/gpu/drm-kms-helpers.rst | 12 +
Documentation/gpu/drm-mm.rst | 40 +-
Documentation/gpu/i915.rst | 23 +-
Documentation/gpu/introduction.rst | 16 +
Documentation/gpu/tinydrm.rst | 30 -
Documentation/gpu/todo.rst | 81 +-
Documentation/hwmon/adm1021.rst | 2 +-
Documentation/hwmon/adm1275.rst | 2 +-
Documentation/hwmon/ads1015.rst | 90 -
Documentation/hwmon/hih6130.rst | 2 +-
Documentation/hwmon/ibm-cffps.rst | 2 +-
Documentation/hwmon/index.rst | 2 +-
Documentation/hwmon/inspur-ipsps1.rst | 79 +
Documentation/hwmon/k8temp.rst | 2 +-
Documentation/hwmon/lm25066.rst | 2 +-
Documentation/hwmon/lm75.rst | 6 +-
Documentation/hwmon/max16064.rst | 2 +-
Documentation/hwmon/max16065.rst | 2 +-
Documentation/hwmon/max20751.rst | 2 +-
Documentation/hwmon/max34440.rst | 2 +-
Documentation/hwmon/max6650.rst | 2 +-
Documentation/hwmon/max8688.rst | 2 +-
Documentation/hwmon/menf21bmc.rst | 2 +-
Documentation/hwmon/pcf8591.rst | 2 +-
Documentation/hwmon/pxe1610 | 90 -
Documentation/hwmon/pxe1610.rst | 107 +
Documentation/hwmon/sht3x.rst | 2 +-
Documentation/hwmon/shtc1.rst | 21 +-
Documentation/hwmon/submitting-patches.rst | 8 +-
Documentation/hwmon/tmp103.rst | 2 +-
Documentation/hwmon/tps40422.rst | 2 +-
Documentation/hwmon/ucd9000.rst | 2 +-
Documentation/hwmon/ucd9200.rst | 2 +-
Documentation/hwmon/via686a.rst | 2 +-
Documentation/hwmon/zl6100.rst | 2 +-
Documentation/i2c/busses/i2c-ali1535 | 42 -
Documentation/i2c/busses/i2c-ali1535.rst | 45 +
Documentation/i2c/busses/i2c-ali1563 | 27 -
Documentation/i2c/busses/i2c-ali1563.rst | 30 +
Documentation/i2c/busses/i2c-ali15x3 | 112 -
Documentation/i2c/busses/i2c-ali15x3.rst | 122 +
Documentation/i2c/busses/i2c-amd-mp2 | 23 -
Documentation/i2c/busses/i2c-amd-mp2.rst | 25 +
Documentation/i2c/busses/i2c-amd756 | 25 -
Documentation/i2c/busses/i2c-amd756.rst | 29 +
Documentation/i2c/busses/i2c-amd8111 | 41 -
Documentation/i2c/busses/i2c-amd8111.rst | 43 +
Documentation/i2c/busses/i2c-diolan-u2c | 26 -
Documentation/i2c/busses/i2c-diolan-u2c.rst | 29 +
Documentation/i2c/busses/i2c-i801 | 173 -
Documentation/i2c/busses/i2c-i801.rst | 182 +
Documentation/i2c/busses/i2c-ismt | 36 -
Documentation/i2c/busses/i2c-ismt.rst | 44 +
Documentation/i2c/busses/i2c-mlxcpld | 51 -
Documentation/i2c/busses/i2c-mlxcpld.rst | 57 +
Documentation/i2c/busses/i2c-nforce2 | 50 -
Documentation/i2c/busses/i2c-nforce2.rst | 53 +
Documentation/i2c/busses/i2c-nvidia-gpu | 18 -
Documentation/i2c/busses/i2c-nvidia-gpu.rst | 20 +
Documentation/i2c/busses/i2c-ocores | 68 -
Documentation/i2c/busses/i2c-ocores.rst | 70 +
Documentation/i2c/busses/i2c-parport | 178 -
Documentation/i2c/busses/i2c-parport-light | 22 -
Documentation/i2c/busses/i2c-parport-light.rst | 24 +
Documentation/i2c/busses/i2c-parport.rst | 190 +
Documentation/i2c/busses/i2c-pca-isa | 23 -
Documentation/i2c/busses/i2c-pca-isa.rst | 26 +
Documentation/i2c/busses/i2c-piix4 | 112 -
Documentation/i2c/busses/i2c-piix4.rst | 114 +
Documentation/i2c/busses/i2c-sis5595 | 59 -
Documentation/i2c/busses/i2c-sis5595.rst | 68 +
Documentation/i2c/busses/i2c-sis630 | 58 -
Documentation/i2c/busses/i2c-sis630.rst | 63 +
Documentation/i2c/busses/i2c-sis96x | 73 -
Documentation/i2c/busses/i2c-sis96x.rst | 82 +
Documentation/i2c/busses/i2c-taos-evm | 46 -
Documentation/i2c/busses/i2c-taos-evm.rst | 48 +
Documentation/i2c/busses/i2c-via | 34 -
Documentation/i2c/busses/i2c-via.rst | 40 +
Documentation/i2c/busses/i2c-viapro | 73 -
Documentation/i2c/busses/i2c-viapro.rst | 77 +
Documentation/i2c/busses/index.rst | 33 +
Documentation/i2c/busses/scx200_acb | 32 -
Documentation/i2c/busses/scx200_acb.rst | 37 +
Documentation/i2c/dev-interface | 213 -
Documentation/i2c/dev-interface.rst | 219 +
.../{DMA-considerations => dma-considerations.rst} | 0
Documentation/i2c/fault-codes | 128 -
Documentation/i2c/fault-codes.rst | 131 +
Documentation/i2c/functionality | 148 -
Documentation/i2c/functionality.rst | 156 +
Documentation/i2c/gpio-fault-injection | 136 -
Documentation/i2c/gpio-fault-injection.rst | 136 +
Documentation/i2c/i2c-protocol | 88 -
Documentation/i2c/i2c-protocol.rst | 98 +
Documentation/i2c/i2c-stub | 64 -
Documentation/i2c/i2c-stub.rst | 66 +
Documentation/i2c/i2c-topology | 376 -
Documentation/i2c/i2c-topology.rst | 396 +
Documentation/i2c/index.rst | 37 +
Documentation/i2c/instantiating-devices | 248 -
Documentation/i2c/instantiating-devices.rst | 253 +
Documentation/i2c/muxes/i2c-mux-gpio | 83 -
Documentation/i2c/muxes/i2c-mux-gpio.rst | 85 +
Documentation/i2c/old-module-parameters | 44 -
Documentation/i2c/old-module-parameters.rst | 49 +
Documentation/i2c/slave-eeprom-backend | 14 -
Documentation/i2c/slave-eeprom-backend.rst | 14 +
Documentation/i2c/slave-interface | 193 -
Documentation/i2c/slave-interface.rst | 198 +
Documentation/i2c/smbus-protocol | 283 -
Documentation/i2c/smbus-protocol.rst | 301 +
Documentation/i2c/summary | 43 -
Documentation/i2c/summary.rst | 45 +
Documentation/i2c/ten-bit-addresses | 28 -
Documentation/i2c/ten-bit-addresses.rst | 33 +
Documentation/i2c/upgrading-clients | 279 -
Documentation/i2c/upgrading-clients.rst | 285 +
Documentation/i2c/writing-clients | 403 -
Documentation/i2c/writing-clients.rst | 425 +
Documentation/index.rst | 12 +-
Documentation/infiniband/core_locking.rst | 8 +-
Documentation/input/conf.py | 10 -
Documentation/input/multi-touch-protocol.rst | 2 +-
Documentation/ioctl/ioctl-number.rst | 1 +
Documentation/isdn/CREDITS | 70 -
Documentation/isdn/INTERFACE.CAPI | 355 -
Documentation/isdn/README.avmb1 | 187 -
Documentation/isdn/README.gigaset | 403 -
Documentation/isdn/README.hysdn | 195 -
Documentation/isdn/README.mISDN | 6 -
Documentation/isdn/avmb1.rst | 246 +
Documentation/isdn/credits.rst | 73 +
Documentation/isdn/gigaset.rst | 465 +
Documentation/isdn/hysdn.rst | 196 +
Documentation/isdn/index.rst | 24 +
Documentation/isdn/interface_capi.rst | 407 +
Documentation/isdn/m_isdn.rst | 9 +
Documentation/kbuild/index.rst | 1 +
Documentation/kbuild/kbuild.rst | 28 +-
Documentation/kbuild/makefiles.rst | 67 +-
Documentation/kbuild/modules.rst | 7 +-
Documentation/kbuild/namespaces.rst | 154 +
Documentation/kbuild/reproducible-builds.rst | 122 +
Documentation/kernel-hacking/conf.py | 10 -
Documentation/kernel-hacking/hacking.rst | 18 +
Documentation/leds/leds-class.rst | 70 +-
Documentation/locking/spinlocks.rst | 16 +-
Documentation/m68k/README.buddha | 210 -
Documentation/m68k/buddha-driver.rst | 209 +
Documentation/m68k/index.rst | 1 +
Documentation/maintainer/conf.py | 10 -
Documentation/maintainer/pull-requests.rst | 2 +-
Documentation/media/conf.py | 12 -
Documentation/media/kapi/csi2.rst | 17 +-
Documentation/media/kapi/v4l2-dev.rst | 1 +
Documentation/media/uapi/rc/lirc-dev-intro.rst | 57 +-
Documentation/media/uapi/rc/lirc-read.rst | 3 +-
Documentation/media/uapi/rc/lirc-write.rst | 3 +-
Documentation/media/uapi/rc/rc-protos.rst | 456 +
Documentation/media/uapi/rc/remote_controllers.rst | 1 +
Documentation/media/uapi/v4l/biblio.rst | 10 +
Documentation/media/uapi/v4l/control.rst | 2 +-
Documentation/media/uapi/v4l/dev-decoder.rst | 1101 +
Documentation/media/uapi/v4l/dev-mem2mem.rst | 8 +-
Documentation/media/uapi/v4l/ext-ctrls-codec.rst | 422 +-
Documentation/media/uapi/v4l/hist-v4l2.rst | 2 +-
Documentation/media/uapi/v4l/pixfmt-bayer.rst | 38 +
Documentation/media/uapi/v4l/pixfmt-compressed.rst | 67 +-
Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 1306 -
Documentation/media/uapi/v4l/pixfmt-rgb.rst | 1302 +-
Documentation/media/uapi/v4l/pixfmt-v4l2.rst | 7 +-
Documentation/media/uapi/v4l/pixfmt.rst | 1 +
Documentation/media/uapi/v4l/subdev-formats.rst | 115 +
Documentation/media/uapi/v4l/v4l2.rst | 10 +-
.../media/uapi/v4l/vidioc-decoder-cmd.rst | 41 +-
Documentation/media/uapi/v4l/vidioc-dqevent.rst | 11 +-
Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 16 +
Documentation/media/uapi/v4l/vidioc-queryctrl.rst | 4 +-
Documentation/media/v4l-drivers/imx7.rst | 127 +-
Documentation/media/v4l-drivers/vimc.rst | 13 +-
Documentation/media/videodev2.h.rst.exceptions | 6 +-
Documentation/memory-barriers.txt | 2 +-
Documentation/mips/AU1xxx_IDE.README | 115 -
Documentation/mips/au1xxx_ide.rst | 130 +
Documentation/mips/index.rst | 20 +
Documentation/mips/ingenic-tcu.rst | 71 +
Documentation/misc-devices/index.rst | 1 +
Documentation/networking/af_xdp.rst | 10 +-
Documentation/networking/caif/README | 109 -
Documentation/networking/caif/caif.rst | 141 +
Documentation/networking/conf.py | 10 -
Documentation/networking/device_drivers/index.rst | 3 +-
.../networking/device_drivers/intel/iavf.rst | 115 +-
.../networking/device_drivers/mellanox/mlx5.rst | 112 +-
.../networking/device_drivers/netronome/nfp.rst | 133 +
.../networking/device_drivers/pensando/ionic.rst | 43 +
Documentation/networking/devlink-info-versions.rst | 16 +
Documentation/networking/devlink-params-nfp.txt | 5 +
Documentation/networking/devlink-params.txt | 16 +
.../networking/devlink-trap-netdevsim.rst | 20 +
Documentation/networking/devlink-trap.rst | 209 +
Documentation/networking/dsa/sja1105.rst | 90 +
Documentation/networking/index.rst | 5 +-
Documentation/networking/ip-sysctl.txt | 6 +
Documentation/networking/j1939.rst | 422 +
Documentation/networking/mac80211_hwsim/README | 68 -
.../networking/mac80211_hwsim/mac80211_hwsim.rst | 80 +
Documentation/networking/sfp-phylink.rst | 3 +-
Documentation/networking/tls-offload.rst | 41 +-
Documentation/networking/tuntap.txt | 4 +-
Documentation/nios2/README | 23 -
Documentation/nios2/nios2.rst | 24 +
Documentation/openrisc/README | 110 -
Documentation/openrisc/TODO | 12 -
Documentation/openrisc/index.rst | 18 +
Documentation/openrisc/openrisc_port.rst | 121 +
Documentation/openrisc/todo.rst | 15 +
Documentation/packing.txt | 149 -
Documentation/padata.txt | 12 +-
Documentation/parisc/debugging | 39 -
Documentation/parisc/debugging.rst | 46 +
Documentation/parisc/index.rst | 18 +
Documentation/parisc/registers | 129 -
Documentation/parisc/registers.rst | 154 +
Documentation/power/index.rst | 2 +-
Documentation/power/opp.rst | 2 +-
Documentation/power/pm_qos_interface.rst | 5 +-
Documentation/powerpc/DAWR-POWER9.txt | 90 -
Documentation/powerpc/bootwrapper.rst | 155 +
Documentation/powerpc/bootwrapper.txt | 141 -
Documentation/powerpc/cpu_families.rst | 222 +
Documentation/powerpc/cpu_families.txt | 221 -
Documentation/powerpc/cpu_features.rst | 60 +
Documentation/powerpc/cpu_features.txt | 56 -
Documentation/powerpc/cxl.rst | 467 +
Documentation/powerpc/cxl.txt | 449 -
Documentation/powerpc/cxlflash.rst | 433 +
Documentation/powerpc/cxlflash.txt | 429 -
Documentation/powerpc/dawr-power9.rst | 93 +
Documentation/powerpc/dscr.rst | 87 +
Documentation/powerpc/dscr.txt | 83 -
Documentation/powerpc/eeh-pci-error-recovery.rst | 336 +
Documentation/powerpc/eeh-pci-error-recovery.txt | 334 -
Documentation/powerpc/elfnote.rst | 41 +
Documentation/powerpc/firmware-assisted-dump.rst | 361 +
Documentation/powerpc/firmware-assisted-dump.txt | 292 -
Documentation/powerpc/hvcs.rst | 581 +
Documentation/powerpc/hvcs.txt | 567 -
Documentation/powerpc/index.rst | 36 +
Documentation/powerpc/isa-versions.rst | 15 +-
Documentation/powerpc/mpc52xx.rst | 43 +
Documentation/powerpc/mpc52xx.txt | 39 -
.../powerpc/pci_iov_resource_on_powernv.rst | 312 +
.../powerpc/pci_iov_resource_on_powernv.txt | 301 -
Documentation/powerpc/pmu-ebb.rst | 138 +
Documentation/powerpc/pmu-ebb.txt | 137 -
Documentation/powerpc/ptrace.rst | 156 +
Documentation/powerpc/ptrace.txt | 151 -
Documentation/powerpc/qe_firmware.rst | 296 +
Documentation/powerpc/qe_firmware.txt | 295 -
Documentation/powerpc/syscall64-abi.rst | 110 +
Documentation/powerpc/syscall64-abi.txt | 105 -
Documentation/powerpc/transactional_memory.rst | 247 +
Documentation/powerpc/transactional_memory.txt | 244 -
Documentation/powerpc/ultravisor.rst | 1054 +
Documentation/process/conf.py | 10 -
Documentation/process/deprecated.rst | 14 +
Documentation/process/email-clients.rst | 20 +-
.../process/embargoed-hardware-issues.rst | 305 +
Documentation/process/howto.rst | 2 +-
Documentation/process/index.rst | 1 +
Documentation/process/submitting-patches.rst | 2 +-
Documentation/riscv/boot-image-header.rst | 62 +
Documentation/riscv/boot-image-header.txt | 50 -
Documentation/riscv/index.rst | 1 +
Documentation/s390/dasd.rst | 84 -
Documentation/s390/debugging390.rst | 2613 -
Documentation/s390/index.rst | 2 -
Documentation/s390/vfio-ccw.rst | 31 +-
Documentation/scheduler/sched-bwc.rst | 74 +-
Documentation/security/IMA-templates.rst | 3 +
Documentation/security/tpm/index.rst | 2 +
Documentation/security/tpm/tpm_event_log.rst | 55 +
Documentation/security/tpm/tpm_ftpm_tee.rst | 27 +
Documentation/sh/conf.py | 10 -
Documentation/sound/alsa-configuration.rst | 2 +
Documentation/sound/conf.py | 10 -
Documentation/sound/hd-audio/models.rst | 3 +
Documentation/sound/hd-audio/notes.rst | 5 +
Documentation/sound/index.rst | 2 +-
Documentation/sphinx/automarkup.py | 5 +-
Documentation/sphinx/load_config.py | 27 +-
Documentation/spi/butterfly | 68 -
Documentation/spi/butterfly.rst | 74 +
Documentation/spi/index.rst | 22 +
Documentation/spi/pxa2xx | 235 -
Documentation/spi/pxa2xx.rst | 240 +
Documentation/spi/spi-lm70llp | 79 -
Documentation/spi/spi-lm70llp.rst | 84 +
Documentation/spi/spi-sc18is602 | 36 -
Documentation/spi/spi-sc18is602.rst | 39 +
Documentation/spi/spi-summary | 631 -
Documentation/spi/spi-summary.rst | 644 +
Documentation/spi/spidev | 149 -
Documentation/spi/spidev.rst | 163 +
Documentation/thermal/index.rst | 18 -
Documentation/thermal/sysfs-api.rst | 798 -
.../thermal/x86_pkg_temperature_thermal.rst | 55 -
Documentation/trace/coresight-cpu-debug.rst | 192 +
Documentation/trace/coresight-cpu-debug.txt | 187 -
Documentation/trace/coresight.rst | 498 +
Documentation/trace/coresight.txt | 482 -
Documentation/trace/ftrace.rst | 13 +-
Documentation/trace/index.rst | 2 +
Documentation/trace/kprobetrace.rst | 1 +
Documentation/trace/uprobetracer.rst | 1 +
.../translations/it_IT/doc-guide/sphinx.rst | 19 +-
.../translations/it_IT/process/changes.rst | 22 +-
Documentation/translations/it_IT/process/howto.rst | 2 +-
Documentation/translations/it_IT/process/index.rst | 1 +
.../translations/it_IT/process/kernel-docs.rst | 11 +-
.../it_IT/process/maintainer-pgp-guide.rst | 25 +-
.../it_IT/process/programming-language.rst | 51 +
.../it_IT/process/submitting-patches.rst | 2 +-
Documentation/translations/ja_JP/SubmittingPatches | 2 +-
Documentation/translations/ja_JP/howto.rst | 2 +-
Documentation/translations/ko_KR/howto.rst | 2 +-
.../translations/ko_KR/memory-barriers.txt | 2 +-
Documentation/translations/zh_CN/arm64/booting.txt | 4 +-
Documentation/translations/zh_CN/process/howto.rst | 14 +-
.../zh_CN/process/submitting-patches.rst | 2 +-
Documentation/userspace-api/conf.py | 10 -
Documentation/{virtual => virt}/index.rst | 0
.../kvm/amd-memory-encryption.rst | 0
Documentation/virt/kvm/api.txt | 5324 ++
.../{virtual => virt}/kvm/arm/hyp-abi.txt | 0
Documentation/{virtual => virt}/kvm/arm/psci.txt | 0
Documentation/{virtual => virt}/kvm/cpuid.rst | 0
Documentation/{virtual => virt}/kvm/devices/README | 0
.../{virtual => virt}/kvm/devices/arm-vgic-its.txt | 0
.../{virtual => virt}/kvm/devices/arm-vgic-v3.txt | 0
.../{virtual => virt}/kvm/devices/arm-vgic.txt | 0
.../{virtual => virt}/kvm/devices/mpic.txt | 0
.../{virtual => virt}/kvm/devices/s390_flic.txt | 0
.../{virtual => virt}/kvm/devices/vcpu.txt | 0
.../{virtual => virt}/kvm/devices/vfio.txt | 0
Documentation/{virtual => virt}/kvm/devices/vm.txt | 0
.../{virtual => virt}/kvm/devices/xics.txt | 0
.../{virtual => virt}/kvm/devices/xive.txt | 0
.../{virtual => virt}/kvm/halt-polling.txt | 0
Documentation/virt/kvm/hypercalls.txt | 154 +
Documentation/virt/kvm/index.rst | 12 +
Documentation/{virtual => virt}/kvm/locking.txt | 0
Documentation/virt/kvm/mmu.txt | 449 +
Documentation/{virtual => virt}/kvm/msr.txt | 0
Documentation/{virtual => virt}/kvm/nested-vmx.txt | 0
Documentation/{virtual => virt}/kvm/ppc-pv.txt | 0
Documentation/virt/kvm/review-checklist.txt | 38 +
Documentation/{virtual => virt}/kvm/s390-diag.txt | 0
.../{virtual => virt}/kvm/timekeeping.txt | 0
.../{virtual => virt}/kvm/vcpu-requests.rst | 0
Documentation/{virtual => virt}/paravirt_ops.rst | 0
.../{virtual => virt}/uml/UserModeLinux-HOWTO.txt | 0
Documentation/virtual/guest-halt-polling.txt | 78 +
Documentation/virtual/kvm/api.txt | 5296 --
Documentation/virtual/kvm/hypercalls.txt | 154 -
Documentation/virtual/kvm/index.rst | 11 -
Documentation/virtual/kvm/mmu.txt | 449 -
Documentation/virtual/kvm/review-checklist.txt | 38 -
Documentation/vm/conf.py | 10 -
Documentation/vm/hmm.rst | 75 +-
Documentation/vm/split_page_table_lock.rst | 10 +-
Documentation/w1/index.rst | 21 +
Documentation/w1/masters/ds2482 | 31 -
Documentation/w1/masters/ds2482.rst | 39 +
Documentation/w1/masters/ds2490 | 68 -
Documentation/w1/masters/ds2490.rst | 72 +
Documentation/w1/masters/index.rst | 14 +
Documentation/w1/masters/mxc-w1 | 12 -
Documentation/w1/masters/mxc-w1.rst | 17 +
Documentation/w1/masters/omap-hdq | 52 -
Documentation/w1/masters/omap-hdq.rst | 54 +
Documentation/w1/masters/w1-gpio | 44 -
Documentation/w1/masters/w1-gpio.rst | 47 +
Documentation/w1/slaves/index.rst | 16 +
Documentation/w1/slaves/w1_ds2406 | 25 -
Documentation/w1/slaves/w1_ds2406.rst | 27 +
Documentation/w1/slaves/w1_ds2413 | 50 -
Documentation/w1/slaves/w1_ds2413.rst | 59 +
Documentation/w1/slaves/w1_ds2423 | 47 -
Documentation/w1/slaves/w1_ds2423.rst | 54 +
Documentation/w1/slaves/w1_ds2438 | 63 -
Documentation/w1/slaves/w1_ds2438.rst | 69 +
Documentation/w1/slaves/w1_ds28e04 | 36 -
Documentation/w1/slaves/w1_ds28e04.rst | 41 +
Documentation/w1/slaves/w1_ds28e17 | 68 -
Documentation/w1/slaves/w1_ds28e17.rst | 72 +
Documentation/w1/slaves/w1_therm | 67 -
Documentation/w1/slaves/w1_therm.rst | 74 +
Documentation/w1/w1-generic.rst | 133 +
Documentation/w1/w1-netlink.rst | 202 +
Documentation/w1/w1.generic | 121 -
Documentation/w1/w1.netlink | 189 -
Documentation/watchdog/hpwdt.rst | 2 +-
Documentation/watchdog/watchdog-parameters.rst | 19 -
Documentation/wimax/README.i2400m | 260 -
Documentation/wimax/README.wimax | 81 -
Documentation/x86/conf.py | 10 -
Documentation/x86/x86_64/boot-options.rst | 2 +-
Kbuild | 7 -
MAINTAINERS | 744 +-
Makefile | 328 +-
arch/Kconfig | 43 +-
arch/alpha/Kconfig | 1 +
arch/alpha/include/asm/pgalloc.h | 2 -
arch/alpha/include/asm/pgtable.h | 5 -
arch/alpha/include/uapi/asm/mman.h | 3 +
arch/alpha/kernel/pci_iommu.c | 2 +
arch/arc/Makefile | 8 -
arch/arc/boot/dts/Makefile | 3 +
arch/arc/configs/axs101_defconfig | 1 +
arch/arc/configs/axs103_defconfig | 1 +
arch/arc/configs/axs103_smp_defconfig | 1 +
arch/arc/configs/haps_hs_defconfig | 1 +
arch/arc/configs/haps_hs_smp_defconfig | 1 +
arch/arc/configs/hsdk_defconfig | 1 +
arch/arc/configs/nps_defconfig | 1 +
arch/arc/configs/nsim_700_defconfig | 1 +
arch/arc/configs/nsim_hs_defconfig | 1 +
arch/arc/configs/nsim_hs_smp_defconfig | 1 +
arch/arc/configs/nsimosci_defconfig | 1 +
arch/arc/configs/nsimosci_hs_defconfig | 1 +
arch/arc/configs/nsimosci_hs_smp_defconfig | 1 +
arch/arc/configs/tb10x_defconfig | 1 +
arch/arc/configs/vdk_hs38_defconfig | 1 +
arch/arc/configs/vdk_hs38_smp_defconfig | 1 +
arch/arc/include/asm/entry-arcv2.h | 2 +-
arch/arc/include/asm/linkage.h | 8 +-
arch/arc/include/asm/mach_desc.h | 3 +-
arch/arc/include/asm/pgalloc.h | 5 +-
arch/arc/include/asm/pgtable.h | 5 -
arch/arc/kernel/mcip.c | 60 +-
arch/arc/kernel/unwind.c | 5 +-
arch/arc/mm/dma.c | 8 +-
arch/arc/plat-hsdk/platform.c | 87 +-
arch/arm/Kconfig | 110 +-
arch/arm/Kconfig.debug | 48 +-
arch/arm/Makefile | 30 +-
arch/arm/boot/compressed/head.S | 14 +-
arch/arm/boot/dts/Makefile | 23 +-
arch/arm/boot/dts/am335x-boneblue.dts | 92 +-
arch/arm/boot/dts/am335x-cm-t335.dts | 1 -
arch/arm/boot/dts/am33xx-l4.dtsi | 20 +-
arch/arm/boot/dts/am33xx.dtsi | 32 +-
arch/arm/boot/dts/am3517-evm.dts | 23 +-
arch/arm/boot/dts/am3517.dtsi | 24 +
arch/arm/boot/dts/am4372.dtsi | 32 +-
arch/arm/boot/dts/am437x-l4.dtsi | 10 +-
arch/arm/boot/dts/am571x-idk.dts | 7 +-
arch/arm/boot/dts/am572x-idk.dts | 7 +-
arch/arm/boot/dts/am574x-idk.dts | 7 +-
arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 3 +-
arch/arm/boot/dts/am57xx-beagle-x15-revb1.dts | 7 +-
arch/arm/boot/dts/am57xx-beagle-x15-revc.dts | 7 +-
arch/arm/boot/dts/aspeed-ast2500-evb.dts | 11 +
arch/arm/boot/dts/aspeed-ast2600-evb.dts | 80 +
arch/arm/boot/dts/aspeed-bmc-facebook-minipack.dts | 429 +
.../arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts | 272 +-
arch/arm/boot/dts/aspeed-bmc-facebook-wedge100.dts | 149 +
arch/arm/boot/dts/aspeed-bmc-facebook-wedge40.dts | 141 +
arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts | 4 +-
arch/arm/boot/dts/aspeed-bmc-lenovo-hr855xg2.dts | 663 +
arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts | 918 +
arch/arm/boot/dts/aspeed-bmc-opp-swift.dts | 19 +-
arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts | 10 +
arch/arm/boot/dts/aspeed-g4.dtsi | 48 +
arch/arm/boot/dts/aspeed-g5.dtsi | 35 +-
arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi | 1154 +
arch/arm/boot/dts/aspeed-g6.dtsi | 261 +
arch/arm/boot/dts/at91-ariag25.dts | 255 +-
arch/arm/boot/dts/at91-ariettag25.dts | 100 +-
arch/arm/boot/dts/at91-cosino.dtsi | 203 +-
arch/arm/boot/dts/at91-cosino_mega2560.dts | 93 +-
arch/arm/boot/dts/at91-kizboxmini.dts | 179 +-
arch/arm/boot/dts/at91sam9261ek.dts | 2 +-
arch/arm/boot/dts/at91sam9263ek.dts | 2 +-
arch/arm/boot/dts/at91sam9g15.dtsi | 28 +-
arch/arm/boot/dts/at91sam9g15ek.dts | 12 +-
arch/arm/boot/dts/at91sam9g25ek.dts | 89 +-
arch/arm/boot/dts/at91sam9g35ek.dts | 22 +-
arch/arm/boot/dts/at91sam9m10g45ek.dts | 2 +-
arch/arm/boot/dts/at91sam9rlek.dts | 2 +-
arch/arm/boot/dts/at91sam9x25ek.dts | 36 +-
arch/arm/boot/dts/at91sam9x35ek.dts | 43 +-
arch/arm/boot/dts/at91sam9x5.dtsi | 2 +-
arch/arm/boot/dts/at91sam9x5_lcd.dtsi | 194 +-
arch/arm/boot/dts/at91sam9x5dm.dtsi | 86 +-
arch/arm/boot/dts/at91sam9x5ek.dtsi | 265 +-
arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 14 +
arch/arm/boot/dts/bcm2835-rpi-a.dts | 14 +
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 14 +
arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 14 +
arch/arm/boot/dts/bcm2835-rpi-b.dts | 14 +
arch/arm/boot/dts/bcm2835-rpi-cm1-io1.dts | 9 +
arch/arm/boot/dts/bcm2835-rpi-cm1.dtsi | 5 +
arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 14 +
arch/arm/boot/dts/bcm2835-rpi-zero.dts | 14 +
arch/arm/boot/dts/bcm2835-rpi.dtsi | 23 -
arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 10 +
arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts | 3 +
arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 3 +
arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 3 +
arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts | 9 +
arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi | 1 +
arch/arm/boot/dts/bcm283x.dtsi | 6 +-
arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 3 +
arch/arm/boot/dts/da850-evm.dts | 2 +-
arch/arm/boot/dts/dra7-evm.dts | 2 +-
arch/arm/boot/dts/dra7-l4.dtsi | 49 +-
arch/arm/boot/dts/dra74x-mmc-iodelay.dtsi | 50 +-
arch/arm/boot/dts/ep7211-edb7211.dts | 2 +-
arch/arm/boot/dts/exynos3250.dtsi | 3 +-
arch/arm/boot/dts/exynos4.dtsi | 28 +-
arch/arm/boot/dts/exynos4210-universal_c210.dts | 8 +-
arch/arm/boot/dts/exynos4412-itop-elite.dts | 9 +-
arch/arm/boot/dts/exynos4412-itop-scp-core.dtsi | 18 +-
arch/arm/boot/dts/exynos4412-odroidu3.dts | 8 +-
arch/arm/boot/dts/exynos4412-odroidx.dts | 5 +-
arch/arm/boot/dts/exynos4412-origen.dts | 9 +-
arch/arm/boot/dts/exynos5250-arndale.dts | 9 +-
arch/arm/boot/dts/exynos5250-snow-common.dtsi | 5 +
arch/arm/boot/dts/exynos5250.dtsi | 64 +-
arch/arm/boot/dts/exynos5420-peach-pit.dts | 1 +
arch/arm/boot/dts/exynos5420.dtsi | 13 +-
arch/arm/boot/dts/exynos54xx.dtsi | 18 +-
arch/arm/boot/dts/exynos5800-peach-pi.dts | 1 +
arch/arm/boot/dts/exynos5800.dtsi | 9 +
arch/arm/boot/dts/gemini-dlink-dir-685.dts | 1 -
arch/arm/boot/dts/gemini-nas4220b.dts | 37 +-
arch/arm/boot/dts/gemini-sl93512r.dts | 56 +-
.../imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts | 2 +-
.../imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts | 2 +-
.../imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts | 2 +-
arch/arm/boot/dts/imx25-pdk.dts | 2 +-
arch/arm/boot/dts/imx27-apf27dev.dts | 2 +-
.../boot/dts/imx27-eukrea-mbimxsd27-baseboard.dts | 2 +-
arch/arm/boot/dts/imx27-phytec-phycard-s-rdk.dts | 2 +-
arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts | 2 +-
arch/arm/boot/dts/imx53-m53menlo.dts | 3 +-
arch/arm/boot/dts/imx6qdl-colibri.dtsi | 11 +
arch/arm/boot/dts/imx6qdl-nit6xlite.dtsi | 2 -
arch/arm/boot/dts/imx6qdl-phytec-pbab01.dtsi | 2 +-
arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 73 +-
arch/arm/boot/dts/imx6qdl.dtsi | 4 +-
arch/arm/boot/dts/imx6sl.dtsi | 18 +-
arch/arm/boot/dts/imx6sll.dtsi | 24 +-
arch/arm/boot/dts/imx6sx.dtsi | 22 +-
arch/arm/boot/dts/imx6ul-14x14-evk.dtsi | 2 +-
arch/arm/boot/dts/imx6ul-geam.dts | 2 +-
arch/arm/boot/dts/imx6ul-isiot.dtsi | 2 +-
arch/arm/boot/dts/imx6ul-kontron-n6310-s-43.dts | 102 +
arch/arm/boot/dts/imx6ul-kontron-n6310-s.dts | 420 +
arch/arm/boot/dts/imx6ul-kontron-n6310-som.dtsi | 134 +
arch/arm/boot/dts/imx6ul-opos6uldev.dts | 37 +-
arch/arm/boot/dts/imx6ul-phytec-pcl063.dtsi | 148 -
arch/arm/boot/dts/imx6ul-phytec-peb-eval-01.dtsi | 55 -
.../boot/dts/imx6ul-phytec-phyboard-segin-full.dts | 89 -
.../arm/boot/dts/imx6ul-phytec-phyboard-segin.dtsi | 329 -
arch/arm/boot/dts/imx6ul-phytec-phycore-som.dtsi | 171 +
.../boot/dts/imx6ul-phytec-segin-ff-rdk-nand.dts | 93 +
.../boot/dts/imx6ul-phytec-segin-peb-eval-01.dtsi | 57 +
arch/arm/boot/dts/imx6ul-phytec-segin.dtsi | 346 +
arch/arm/boot/dts/imx6ul-pico-hobbit.dts | 2 +-
arch/arm/boot/dts/imx6ul-pico-pi.dts | 4 +-
arch/arm/boot/dts/imx6ul.dtsi | 53 +-
arch/arm/boot/dts/imx6ull-phytec-phycore-som.dtsi | 24 +
.../boot/dts/imx6ull-phytec-segin-ff-rdk-emmc.dts | 93 +
.../boot/dts/imx6ull-phytec-segin-ff-rdk-nand.dts | 93 +
.../boot/dts/imx6ull-phytec-segin-lc-rdk-nand.dts | 45 +
.../boot/dts/imx6ull-phytec-segin-peb-eval-01.dtsi | 19 +
arch/arm/boot/dts/imx6ull-phytec-segin.dtsi | 38 +
arch/arm/boot/dts/imx7-colibri.dtsi | 86 +-
arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 6 +-
arch/arm/boot/dts/imx7d-zii-rmu2.dts | 357 +
arch/arm/boot/dts/imx7d-zii-rpu2.dts | 4 -
arch/arm/boot/dts/imx7d.dtsi | 4 +-
arch/arm/boot/dts/imx7s.dtsi | 6 +-
arch/arm/boot/dts/imx7ulp.dtsi | 38 +-
arch/arm/boot/dts/kirkwood-ts219.dtsi | 8 +
arch/arm/boot/dts/logicpd-som-lv.dtsi | 26 +-
arch/arm/boot/dts/logicpd-torpedo-baseboard.dtsi | 37 +-
arch/arm/boot/dts/ls1021a.dtsi | 2 -
arch/arm/boot/dts/meson8b-ec100.dts | 31 +-
arch/arm/boot/dts/meson8b-mxq.dts | 26 +-
arch/arm/boot/dts/meson8b-odroidc1.dts | 36 +-
arch/arm/boot/dts/meson8b.dtsi | 10 +
arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts | 244 +
arch/arm/boot/dts/mmp2.dtsi | 48 +-
arch/arm/boot/dts/mt7629-rfb.dts | 263 +
arch/arm/boot/dts/mt7629.dtsi | 481 +
arch/arm/boot/dts/nspire-classic.dtsi | 15 +-
arch/arm/boot/dts/nspire-cx.dts | 15 +-
arch/arm/boot/dts/nspire.dtsi | 10 +-
arch/arm/boot/dts/omap3-gta04.dtsi | 4 +
arch/arm/boot/dts/omap3-n950-n9.dtsi | 1 -
arch/arm/boot/dts/omap34xx.dtsi | 26 +
arch/arm/boot/dts/omap36xx.dtsi | 28 +
arch/arm/boot/dts/omap4-l4-abe.dtsi | 1 -
arch/arm/boot/dts/omap4-l4.dtsi | 39 +-
arch/arm/boot/dts/omap4.dtsi | 1 -
arch/arm/boot/dts/omap5.dtsi | 23 +
arch/arm/boot/dts/omap54xx-clocks.dtsi | 14 +
arch/arm/boot/dts/r8a77470.dtsi | 7 +
arch/arm/boot/dts/r8a7779.dtsi | 4 +-
arch/arm/boot/dts/rk3036.dtsi | 2 +-
arch/arm/boot/dts/rk3229-xms6.dts | 283 +
arch/arm/boot/dts/rk3288-evb.dtsi | 2 +-
arch/arm/boot/dts/rk3288-fennec.dts | 347 -
arch/arm/boot/dts/rk3288-tinker.dtsi | 12 +-
arch/arm/boot/dts/rk3288-veyron-chromebook.dtsi | 101 +-
arch/arm/boot/dts/rk3288-veyron-edp.dtsi | 172 +
arch/arm/boot/dts/rk3288-veyron-fievel.dts | 522 +
arch/arm/boot/dts/rk3288-veyron-jaq.dts | 55 -
arch/arm/boot/dts/rk3288-veyron-jerry.dts | 207 +-
arch/arm/boot/dts/rk3288-veyron-minnie.dts | 66 +-
arch/arm/boot/dts/rk3288-veyron-pinky.dts | 17 +
arch/arm/boot/dts/rk3288-veyron-speedy.dts | 58 -
arch/arm/boot/dts/rk3288-veyron-tiger.dts | 118 +
arch/arm/boot/dts/rk3288-veyron.dtsi | 4 +
arch/arm/boot/dts/socfpga.dtsi | 3 +-
arch/arm/boot/dts/socfpga_arria10.dtsi | 7 +-
arch/arm/boot/dts/socfpga_arria10_socdk_nand.dts | 20 +-
arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts | 30 +-
arch/arm/boot/dts/ste-ab8500.dtsi | 228 +
arch/arm/boot/dts/ste-dbx5x0.dtsi | 251 +-
arch/arm/boot/dts/ste-href-ab8500.dtsi | 2 +
arch/arm/boot/dts/ste-href-family-pinctrl.dtsi | 1 -
arch/arm/boot/dts/ste-href-stuib.dtsi | 11 +
arch/arm/boot/dts/ste-href.dtsi | 4 -
arch/arm/boot/dts/ste-hrefprev60-stuib.dts | 14 +-
arch/arm/boot/dts/ste-hrefv60plus-stuib.dts | 14 +-
arch/arm/boot/dts/ste-nomadik-nhk15.dts | 8 +-
arch/arm/boot/dts/ste-snowball.dts | 33 -
arch/arm/boot/dts/stm32429i-eval.dts | 25 +-
arch/arm/boot/dts/stm32f429.dtsi | 12 +
arch/arm/boot/dts/stm32f746.dtsi | 12 +
arch/arm/boot/dts/stm32h743i-eval.dts | 1 +
arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 70 +-
arch/arm/boot/dts/stm32mp157a-dk1.dts | 135 +
arch/arm/boot/dts/stm32mp157c-ed1.dts | 46 +
arch/arm/boot/dts/stm32mp157c-ev1.dts | 17 +
arch/arm/boot/dts/stm32mp157c.dtsi | 61 +
arch/arm/boot/dts/sun4i-a10-a1000.dts | 2 +-
arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts | 2 +-
arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 2 +-
arch/arm/boot/dts/sun4i-a10-hackberry.dts | 2 +-
.../boot/dts/sun4i-a10-itead-iteaduino-plus.dts | 2 +-
arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts | 2 +-
arch/arm/boot/dts/sun4i-a10-marsboard.dts | 2 +-
arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts | 2 +-
arch/arm/boot/dts/sun4i-a10-pcduino.dts | 2 +-
arch/arm/boot/dts/sun4i-a10.dtsi | 9 +-
arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 2 +-
arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts | 2 +-
arch/arm/boot/dts/sun5i-a13-q8-tablet.dts | 2 +-
arch/arm/boot/dts/sun5i.dtsi | 9 +-
arch/arm/boot/dts/sun6i-a31-colombus.dts | 12 +-
arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 18 +-
arch/arm/boot/dts/sun6i-a31-i7.dts | 12 +-
arch/arm/boot/dts/sun6i-a31-m9.dts | 12 +-
arch/arm/boot/dts/sun6i-a31-mele-a1000g-quad.dts | 12 +-
arch/arm/boot/dts/sun6i-a31.dtsi | 15 +-
arch/arm/boot/dts/sun6i-a31s-cs908.dts | 11 +-
arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 12 +-
arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts | 18 +-
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 12 +-
arch/arm/boot/dts/sun7i-a20-bananapi.dts | 12 +-
arch/arm/boot/dts/sun7i-a20-bananapro.dts | 12 +-
arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 12 +-
arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 12 +-
arch/arm/boot/dts/sun7i-a20-hummingbird.dts | 21 +-
arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts | 12 +-
arch/arm/boot/dts/sun7i-a20-icnova-swac.dts | 12 +-
arch/arm/boot/dts/sun7i-a20-itead-ibox.dts | 4 +-
arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts | 2 -
arch/arm/boot/dts/sun7i-a20-m3.dts | 12 +-
arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts | 12 +-
arch/arm/boot/dts/sun7i-a20-olimex-som204-evb.dts | 20 +-
arch/arm/boot/dts/sun7i-a20-olinuxino-lime.dts | 12 +-
arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 12 +-
arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 12 +-
arch/arm/boot/dts/sun7i-a20-orangepi-mini.dts | 12 +-
arch/arm/boot/dts/sun7i-a20-orangepi.dts | 12 +-
arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts | 12 +-
arch/arm/boot/dts/sun7i-a20-pcduino3.dts | 12 +-
arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts | 12 +-
arch/arm/boot/dts/sun7i-a20.dtsi | 35 +-
arch/arm/boot/dts/sun8i-a23-a33.dtsi | 3 +-
arch/arm/boot/dts/sun8i-a23-q8-tablet.dts | 2 +-
arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts | 25 +
arch/arm/boot/dts/sun8i-a83t.dtsi | 14 +-
arch/arm/boot/dts/sun8i-r40.dtsi | 12 +-
arch/arm/boot/dts/sun8i-s3-lichee-zero-plus.dts | 53 +
arch/arm/boot/dts/sun8i-v3.dtsi | 14 +
arch/arm/boot/dts/sun8i-v3s.dtsi | 14 +-
arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 12 +-
arch/arm/boot/dts/sun9i-a80-optimus.dts | 4 +-
arch/arm/boot/dts/sun9i-a80.dtsi | 10 +-
arch/arm/boot/dts/sunxi-h3-h5.dtsi | 15 +-
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 1 +
arch/arm/boot/dts/vexpress-v2m.dtsi | 2 +-
arch/arm/boot/dts/vf610-bk4.dts | 4 +-
arch/arm/boot/dts/vf610-zii-cfu1.dts | 21 +-
arch/arm/boot/dts/vf610-zii-scu4-aib.dts | 12 +-
arch/arm/boot/dts/vf610-zii-spb4.dts | 7 -
arch/arm/common/scoop.c | 2 +-
arch/arm/configs/acs5k_defconfig | 77 -
arch/arm/configs/acs5k_tiny_defconfig | 69 -
arch/arm/configs/aspeed_g4_defconfig | 50 +-
arch/arm/configs/aspeed_g5_defconfig | 68 +-
arch/arm/configs/bcm2835_defconfig | 9 +
arch/arm/configs/davinci_all_defconfig | 5 +
arch/arm/configs/exynos_defconfig | 5 +-
arch/arm/configs/imx_v6_v7_defconfig | 2 +
arch/arm/configs/iop13xx_defconfig | 118 -
arch/arm/configs/iop33x_defconfig | 85 -
arch/arm/configs/ks8695_defconfig | 67 -
arch/arm/configs/lpc32xx_defconfig | 2 +
arch/arm/configs/multi_v5_defconfig | 12 +
arch/arm/configs/multi_v7_defconfig | 27 +-
arch/arm/configs/nuc910_defconfig | 51 -
arch/arm/configs/nuc950_defconfig | 67 -
arch/arm/configs/nuc960_defconfig | 57 -
arch/arm/configs/omap2plus_defconfig | 1 +
arch/arm/configs/qcom_defconfig | 1 +
arch/arm/configs/u8500_defconfig | 34 +-
arch/arm/crypto/Kconfig | 2 +-
arch/arm/crypto/aes-ce-core.S | 482 +-
arch/arm/crypto/aes-ce-glue.c | 545 +-
arch/arm/crypto/aes-cipher-core.S | 40 +-
arch/arm/crypto/aes-cipher-glue.c | 11 +-
arch/arm/crypto/aes-neonbs-core.S | 24 +-
arch/arm/crypto/aes-neonbs-glue.c | 160 +-
arch/arm/crypto/ghash-ce-glue.c | 80 +-
arch/arm/crypto/sha256_glue.c | 8 +-
arch/arm/crypto/sha256_neon_glue.c | 24 +-
arch/arm/include/asm/Kbuild | 1 -
arch/arm/include/asm/device.h | 3 -
arch/arm/include/asm/dma-mapping.h | 10 +-
arch/arm/include/asm/hardware/cache-aurora-l2.h | 103 +
arch/arm/include/asm/hardware/iop3xx-adma.h | 919 -
arch/arm/include/asm/hardware/iop3xx.h | 311 -
arch/arm/include/asm/hardware/iop_adma.h | 106 -
arch/arm/include/asm/pgalloc.h | 2 -
arch/arm/include/asm/pgtable-nommu.h | 6 -
arch/arm/include/asm/pgtable.h | 2 -
arch/arm/include/asm/processor.h | 2 -
arch/arm/include/asm/tlb.h | 2 +-
arch/arm/include/asm/topology.h | 20 -
arch/arm/include/asm/xen/page-coherent.h | 93 -
arch/arm/include/debug/ks8695.S | 37 -
arch/arm/include/debug/renesas-scif.S | 6 +-
arch/arm/include/debug/ux500.S | 9 +-
arch/arm/include/uapi/asm/kvm.h | 4 +-
arch/arm/kernel/hw_breakpoint.c | 5 +
arch/arm/kernel/perf_event_v7.c | 6 +-
arch/arm/kernel/process.c | 5 -
arch/arm/kernel/signal.c | 1 +
arch/arm/kernel/smp.c | 6 +-
arch/arm/kernel/topology.c | 60 +-
arch/arm/kernel/vdso.c | 1 -
arch/arm/kvm/Makefile | 5 +-
arch/arm/kvm/coproc.c | 23 +-
arch/arm/lib/Makefile | 8 +-
arch/arm/lib/backtrace-clang.S | 217 +
arch/arm/lib/backtrace.S | 2 +-
arch/arm/mach-aspeed/Kconfig | 18 +-
arch/arm/mach-aspeed/Makefile | 5 +
arch/arm/mach-aspeed/platsmp.c | 61 +
arch/arm/mach-at91/.gitignore | 1 +
arch/arm/mach-at91/Makefile | 5 +-
arch/arm/mach-at91/pm_suspend.S | 2 +-
arch/arm/mach-davinci/Kconfig | 17 +-
arch/arm/mach-davinci/Makefile | 2 +
arch/arm/mach-davinci/board-da850-evm.c | 90 +-
arch/arm/mach-davinci/da830.c | 45 +-
arch/arm/mach-davinci/da850.c | 50 +-
arch/arm/mach-davinci/davinci.h | 3 +
arch/arm/mach-davinci/dm355.c | 28 +-
arch/arm/mach-davinci/dm365.c | 4 +
arch/arm/mach-davinci/dm644x.c | 28 +-
arch/arm/mach-davinci/dm646x.c | 30 +-
arch/arm/mach-davinci/include/mach/time.h | 2 -
arch/arm/mach-davinci/sleep.S | 1 +
arch/arm/mach-davinci/time.c | 14 -
arch/arm/mach-dove/bridge-regs.h | 55 +
arch/arm/mach-dove/cm-a510.c | 3 +-
arch/arm/mach-dove/common.c | 4 +-
arch/arm/mach-dove/dove-db-setup.c | 2 +-
arch/arm/mach-dove/dove.h | 190 +
arch/arm/mach-dove/include/mach/bridge-regs.h | 57 -
arch/arm/mach-dove/include/mach/dove.h | 192 -
arch/arm/mach-dove/include/mach/hardware.h | 19 -
arch/arm/mach-dove/include/mach/irqs.h | 96 -
arch/arm/mach-dove/include/mach/pm.h | 64 -
arch/arm/mach-dove/include/mach/uncompress.h | 8 +-
arch/arm/mach-dove/irq.c | 5 +-
arch/arm/mach-dove/irqs.h | 94 +
arch/arm/mach-dove/mpp.c | 2 +-
arch/arm/mach-dove/pcie.c | 4 +-
arch/arm/mach-dove/pm.h | 62 +
arch/arm/mach-ep93xx/crunch.c | 1 +
arch/arm/mach-ep93xx/edb93xx.c | 2 +-
arch/arm/mach-ep93xx/simone.c | 2 +-
arch/arm/mach-ep93xx/ts72xx.c | 4 +-
arch/arm/mach-ep93xx/vision_ep9307.c | 2 +-
arch/arm/mach-exynos/Kconfig | 2 +
arch/arm/mach-imx/mach-imx7d.c | 6 -
arch/arm/mach-iop13xx/Kconfig | 21 -
arch/arm/mach-iop13xx/Makefile | 9 -
arch/arm/mach-iop13xx/Makefile.boot | 4 -
arch/arm/mach-iop13xx/include/mach/adma.h | 608 -
arch/arm/mach-iop13xx/include/mach/entry-macro.S | 29 -
arch/arm/mach-iop13xx/include/mach/hardware.h | 22 -
arch/arm/mach-iop13xx/include/mach/iop13xx.h | 508 -
arch/arm/mach-iop13xx/include/mach/iq81340.h | 29 -
arch/arm/mach-iop13xx/include/mach/irqs.h | 195 -
arch/arm/mach-iop13xx/include/mach/memory.h | 68 -
arch/arm/mach-iop13xx/include/mach/time.h | 127 -
arch/arm/mach-iop13xx/include/mach/uncompress.h | 23 -
arch/arm/mach-iop13xx/io.c | 77 -
arch/arm/mach-iop13xx/iq81340mc.c | 84 -
arch/arm/mach-iop13xx/iq81340sc.c | 86 -
arch/arm/mach-iop13xx/irq.c | 227 -
arch/arm/mach-iop13xx/msi.c | 152 -
arch/arm/mach-iop13xx/msi.h | 12 -
arch/arm/mach-iop13xx/pci.c | 1115 -
arch/arm/mach-iop13xx/pci.h | 66 -
arch/arm/mach-iop13xx/setup.c | 595 -
arch/arm/mach-iop13xx/tpmi.c | 244 -
arch/arm/mach-iop32x/Makefile | 10 +-
arch/arm/mach-iop32x/adma.c | 163 +
arch/arm/{plat-iop => mach-iop32x}/cp6.c | 0
arch/arm/mach-iop32x/em7210.c | 5 +-
arch/arm/mach-iop32x/glantank.c | 5 +-
arch/arm/mach-iop32x/glantank.h | 12 +
arch/arm/mach-iop32x/hardware.h | 38 +
arch/arm/mach-iop32x/i2c.c | 93 +
arch/arm/mach-iop32x/include/mach/adma.h | 6 -
arch/arm/mach-iop32x/include/mach/entry-macro.S | 2 -
arch/arm/mach-iop32x/include/mach/glantank.h | 14 -
arch/arm/mach-iop32x/include/mach/hardware.h | 42 -
arch/arm/mach-iop32x/include/mach/iop32x.h | 31 -
arch/arm/mach-iop32x/include/mach/iq31244.h | 18 -
arch/arm/mach-iop32x/include/mach/iq80321.h | 18 -
arch/arm/mach-iop32x/include/mach/irqs.h | 33 -
arch/arm/mach-iop32x/include/mach/n2100.h | 20 -
arch/arm/mach-iop32x/include/mach/time.h | 5 -
arch/arm/mach-iop32x/include/mach/uncompress.h | 18 +-
arch/arm/mach-iop32x/iop3xx.h | 325 +
arch/arm/mach-iop32x/iq31244.c | 5 +-
arch/arm/mach-iop32x/iq31244.h | 16 +
arch/arm/mach-iop32x/iq80321.c | 5 +-
arch/arm/mach-iop32x/iq80321.h | 16 +
arch/arm/mach-iop32x/irq.c | 3 +-
arch/arm/mach-iop32x/irqs.h | 42 +
arch/arm/mach-iop32x/n2100.c | 5 +-
arch/arm/mach-iop32x/n2100.h | 18 +
arch/arm/mach-iop32x/pci.c | 401 +
arch/arm/mach-iop32x/pmu.c | 29 +
arch/arm/mach-iop32x/restart.c | 17 +
arch/arm/mach-iop32x/setup.c | 31 +
arch/arm/mach-iop32x/time.c | 183 +
arch/arm/mach-iop33x/Kconfig | 22 -
arch/arm/mach-iop33x/Makefile | 9 -
arch/arm/mach-iop33x/Makefile.boot | 4 -
arch/arm/mach-iop33x/include/mach/adma.h | 6 -
arch/arm/mach-iop33x/include/mach/entry-macro.S | 34 -
arch/arm/mach-iop33x/include/mach/hardware.h | 44 -
arch/arm/mach-iop33x/include/mach/iop33x.h | 37 -
arch/arm/mach-iop33x/include/mach/iq80331.h | 17 -
arch/arm/mach-iop33x/include/mach/iq80332.h | 17 -
arch/arm/mach-iop33x/include/mach/irqs.h | 57 -
arch/arm/mach-iop33x/include/mach/time.h | 5 -
arch/arm/mach-iop33x/include/mach/uncompress.h | 37 -
arch/arm/mach-iop33x/iq80331.c | 148 -
arch/arm/mach-iop33x/iq80332.c | 148 -
arch/arm/mach-iop33x/irq.c | 115 -
arch/arm/mach-iop33x/uart.c | 100 -
arch/arm/mach-ks8695/Kconfig | 88 -
arch/arm/mach-ks8695/Makefile | 23 -
arch/arm/mach-ks8695/Makefile.boot | 9 -
arch/arm/mach-ks8695/board-acs5k.c | 238 -
arch/arm/mach-ks8695/board-dsm320.c | 127 -
arch/arm/mach-ks8695/board-micrel.c | 59 -
arch/arm/mach-ks8695/board-og.c | 197 -
arch/arm/mach-ks8695/board-sg.c | 118 -
arch/arm/mach-ks8695/cpu.c | 60 -
arch/arm/mach-ks8695/devices.c | 197 -
arch/arm/mach-ks8695/devices.h | 29 -
arch/arm/mach-ks8695/generic.h | 12 -
arch/arm/mach-ks8695/include/mach/entry-macro.S | 47 -
arch/arm/mach-ks8695/include/mach/gpio-ks8695.h | 36 -
arch/arm/mach-ks8695/include/mach/hardware.h | 42 -
arch/arm/mach-ks8695/include/mach/irqs.h | 51 -
arch/arm/mach-ks8695/include/mach/memory.h | 51 -
arch/arm/mach-ks8695/include/mach/regs-gpio.h | 55 -
arch/arm/mach-ks8695/include/mach/regs-irq.h | 41 -
arch/arm/mach-ks8695/include/mach/regs-misc.h | 97 -
arch/arm/mach-ks8695/include/mach/regs-switch.h | 66 -
arch/arm/mach-ks8695/include/mach/regs-uart.h | 89 -
arch/arm/mach-ks8695/include/mach/uncompress.h | 33 -
arch/arm/mach-ks8695/irq.c | 164 -
arch/arm/mach-ks8695/pci.c | 247 -
arch/arm/mach-ks8695/regs-hpna.h | 25 -
arch/arm/mach-ks8695/regs-lan.h | 65 -
arch/arm/mach-ks8695/regs-mem.h | 89 -
arch/arm/mach-ks8695/regs-pci.h | 53 -
arch/arm/mach-ks8695/regs-sys.h | 34 -
arch/arm/mach-ks8695/regs-wan.h | 65 -
arch/arm/mach-ks8695/time.c | 159 -
arch/arm/mach-lpc32xx/Kconfig | 11 +
arch/arm/mach-lpc32xx/common.c | 24 +-
arch/arm/mach-lpc32xx/common.h | 1 -
arch/arm/mach-lpc32xx/include/mach/board.h | 15 -
arch/arm/mach-lpc32xx/include/mach/entry-macro.S | 28 -
arch/arm/mach-lpc32xx/include/mach/hardware.h | 25 -
arch/arm/mach-lpc32xx/include/mach/platform.h | 703 -
arch/arm/mach-lpc32xx/include/mach/uncompress.h | 50 -
arch/arm/mach-lpc32xx/lpc32xx.h | 717 +
arch/arm/mach-lpc32xx/pm.c | 3 +-
arch/arm/mach-lpc32xx/serial.c | 33 +-
arch/arm/mach-lpc32xx/suspend.S | 3 +-
arch/arm/mach-mmp/regs-icu.h | 3 +
arch/arm/mach-mv78xx0/mv78xx0.h | 4 +-
arch/arm/mach-netx/Kconfig | 22 -
arch/arm/mach-netx/Makefile | 13 -
arch/arm/mach-netx/Makefile.boot | 3 -
arch/arm/mach-netx/fb.c | 65 -
arch/arm/mach-netx/fb.h | 12 -
arch/arm/mach-netx/generic.c | 182 -
arch/arm/mach-netx/generic.h | 14 -
arch/arm/mach-netx/include/mach/hardware.h | 27 -
arch/arm/mach-netx/include/mach/irqs.h | 58 -
arch/arm/mach-netx/include/mach/netx-regs.h | 420 -
arch/arm/mach-netx/include/mach/pfifo.h | 42 -
arch/arm/mach-netx/include/mach/uncompress.h | 63 -
arch/arm/mach-netx/include/mach/xc.h | 30 -
arch/arm/mach-netx/nxdb500.c | 197 -
arch/arm/mach-netx/nxdkn.c | 90 -
arch/arm/mach-netx/nxeb500hmi.c | 174 -
arch/arm/mach-netx/pfifo.c | 56 -
arch/arm/mach-netx/time.c | 141 -
arch/arm/mach-netx/xc.c | 246 -
arch/arm/mach-nspire/Makefile | 1 -
arch/arm/mach-nspire/clcd.c | 114 -
arch/arm/mach-nspire/clcd.h | 10 -
arch/arm/mach-nspire/nspire.c | 25 -
arch/arm/mach-omap1/ams-delta-fiq-handler.S | 3 +-
arch/arm/mach-omap1/ams-delta-fiq.c | 4 +-
arch/arm/mach-omap1/board-ams-delta.c | 10 +-
arch/arm/mach-omap2/.gitignore | 1 +
arch/arm/mach-omap2/Makefile | 7 +-
arch/arm/mach-omap2/devices.c | 7 +
arch/arm/mach-omap2/hsmmc.c | 4 +-
arch/arm/mach-omap2/omap-iommu.c | 43 +
arch/arm/mach-omap2/omap4-common.c | 3 +
.../mach-omap2/omap_hwmod_33xx_43xx_common_data.h | 3 -
.../omap_hwmod_33xx_43xx_interconnect_data.c | 6 -
.../mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 50 -
arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 9 -
arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 9 -
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 168 -
arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 478 +-
arch/arm/mach-omap2/pdata-quirks.c | 4 +-
arch/arm/mach-omap2/sleep33xx.S | 2 +-
arch/arm/mach-omap2/sleep43xx.S | 2 +-
arch/arm/mach-orion5x/orion5x.h | 4 +-
arch/arm/mach-rpc/riscpc.c | 1 +
arch/arm/mach-s3c64xx/setup-usb-phy.c | 5 +
arch/arm/mach-tegra/reset.c | 2 +-
arch/arm/mach-ux500/cpu-db8500.c | 1 -
arch/arm/mach-vexpress/spc.c | 4 +-
arch/arm/mach-w90x900/Kconfig | 50 -
arch/arm/mach-w90x900/Makefile | 20 -
arch/arm/mach-w90x900/Makefile.boot | 4 -
arch/arm/mach-w90x900/clksel.c | 88 -
arch/arm/mach-w90x900/clock.c | 121 -
arch/arm/mach-w90x900/clock.h | 40 -
arch/arm/mach-w90x900/cpu.c | 238 -
arch/arm/mach-w90x900/cpu.h | 56 -
arch/arm/mach-w90x900/dev.c | 537 -
arch/arm/mach-w90x900/gpio.c | 150 -
arch/arm/mach-w90x900/include/mach/entry-macro.S | 26 -
arch/arm/mach-w90x900/include/mach/hardware.h | 19 -
arch/arm/mach-w90x900/include/mach/irqs.h | 82 -
arch/arm/mach-w90x900/include/mach/map.h | 153 -
arch/arm/mach-w90x900/include/mach/mfp.h | 21 -
arch/arm/mach-w90x900/include/mach/regs-clock.h | 49 -
arch/arm/mach-w90x900/include/mach/regs-irq.h | 46 -
arch/arm/mach-w90x900/include/mach/regs-ldm.h | 248 -
arch/arm/mach-w90x900/include/mach/regs-serial.h | 54 -
arch/arm/mach-w90x900/include/mach/uncompress.h | 43 -
arch/arm/mach-w90x900/irq.c | 212 -
arch/arm/mach-w90x900/mach-nuc910evb.c | 38 -
arch/arm/mach-w90x900/mach-nuc950evb.c | 42 -
arch/arm/mach-w90x900/mach-nuc960evb.c | 38 -
arch/arm/mach-w90x900/mfp.c | 197 -
arch/arm/mach-w90x900/nuc910.c | 58 -
arch/arm/mach-w90x900/nuc910.h | 17 -
arch/arm/mach-w90x900/nuc950.c | 52 -
arch/arm/mach-w90x900/nuc950.h | 17 -
arch/arm/mach-w90x900/nuc960.c | 50 -
arch/arm/mach-w90x900/nuc960.h | 17 -
arch/arm/mach-w90x900/nuc9xx.h | 22 -
arch/arm/mach-w90x900/regs-ebi.h | 29 -
arch/arm/mach-w90x900/regs-gcr.h | 34 -
arch/arm/mach-w90x900/regs-timer.h | 37 -
arch/arm/mach-w90x900/regs-usb.h | 31 -
arch/arm/mach-w90x900/time.c | 168 -
arch/arm/mach-zynq/headsmp.S | 2 +
arch/arm/mach-zynq/platsmp.c | 4 +-
arch/arm/mm/Kconfig | 3 +-
arch/arm/mm/alignment.c | 4 +-
arch/arm/mm/cache-aurora-l2.h | 55 -
arch/arm/mm/cache-l2x0.c | 18 +-
arch/arm/mm/copypage-xscale.c | 6 +-
arch/arm/mm/dma-mapping-nommu.c | 5 +-
arch/arm/mm/dma-mapping.c | 123 +-
arch/arm/mm/fault.c | 4 +-
arch/arm/mm/fault.h | 1 +
arch/arm/mm/flush.c | 7 +-
arch/arm/mm/init.c | 13 +-
arch/arm/mm/mm.h | 3 -
arch/arm/mm/mmap.c | 52 -
arch/arm/mm/mmu.c | 21 +-
arch/arm/plat-iop/Makefile | 28 -
arch/arm/plat-iop/adma.c | 192 -
arch/arm/plat-iop/i2c.c | 100 -
arch/arm/plat-iop/pci.c | 401 -
arch/arm/plat-iop/pmu.c | 35 -
arch/arm/plat-iop/restart.c | 17 -
arch/arm/plat-iop/setup.c | 31 -
arch/arm/plat-iop/time.c | 182 -
arch/arm/plat-omap/dma.c | 14 +-
arch/arm/plat-samsung/include/plat/gpio-core.h | 1 +
arch/arm/plat-samsung/include/plat/usb-phy.h | 2 -
arch/arm/plat-samsung/watchdog-reset.c | 1 +
arch/arm/xen/mm.c | 129 +-
arch/arm64/Kbuild | 6 +
arch/arm64/Kconfig | 53 +-
arch/arm64/Kconfig.platforms | 2 +
arch/arm64/Makefile | 27 +-
arch/arm64/boot/dts/allwinner/Makefile | 2 +
.../dts/allwinner/sun50i-a64-olinuxino-emmc.dts | 23 +
.../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 4 +
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 29 +-
.../boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 27 +
.../boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 72 +
.../boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 4 +
.../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 4 +
.../boot/dts/allwinner/sun50i-h6-tanix-tx6.dts | 100 +
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 135 +-
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 18 +
arch/arm64/boot/dts/amlogic/Makefile | 4 +
arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 8 +-
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2435 +
arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 61 +
arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 54 +
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 55 +-
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 2422 +-
.../dts/amlogic/meson-g12b-a311d-khadas-vim3.dts | 16 +
arch/arm64/boot/dts/amlogic/meson-g12b-a311d.dtsi | 149 +
.../boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi | 189 +
.../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 104 +-
.../dts/amlogic/meson-g12b-s922x-khadas-vim3.dts | 16 +
arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi | 124 +
arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 39 +-
arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 35 +-
.../boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 1 +
.../boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 4 +-
.../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 4 +-
arch/arm64/boot/dts/amlogic/meson-gxbb-p201.dts | 2 +-
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 4 +-
.../boot/dts/amlogic/meson-gxbb-wetek-hub.dts | 4 +
.../boot/dts/amlogic/meson-gxbb-wetek-play2.dts | 4 +
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 11 +
.../boot/dts/amlogic/meson-gxl-s905w-tx3-mini.dts | 4 +
.../dts/amlogic/meson-gxl-s905x-hwacom-amazetv.dts | 4 +-
.../dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 2 +-
.../dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts | 4 +-
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 16 +-
.../boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 +-
arch/arm64/boot/dts/amlogic/meson-gxm.dtsi | 4 +
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 360 +
.../boot/dts/amlogic/meson-sm1-khadas-vim3l.dts | 70 +
arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts | 383 +
arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 147 +
arch/arm64/boot/dts/arm/fvp-base-revc.dts | 8 -
arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi | 2 -
arch/arm64/boot/dts/bitmain/bm1880.dtsi | 15 +-
arch/arm64/boot/dts/freescale/Makefile | 6 +
arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 5 +-
arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts | 48 +
arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts | 13 +
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 157 +-
arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 3 -
arch/arm64/boot/dts/freescale/fsl-ls1046a-frwy.dts | 155 +
arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 6 -
arch/arm64/boot/dts/freescale/fsl-ls1088a-qds.dts | 33 +
arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 41 +-
arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 9 +-
arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 21 +-
arch/arm64/boot/dts/freescale/imx8mm-evk.dts | 68 +-
arch/arm64/boot/dts/freescale/imx8mm-pinfunc.h | 4 +-
arch/arm64/boot/dts/freescale/imx8mm.dtsi | 69 +-
arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts | 348 +
arch/arm64/boot/dts/freescale/imx8mn.dtsi | 758 +
arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 6 +-
.../dts/freescale/imx8mq-hummingboard-pulse.dts | 256 +
.../boot/dts/freescale/imx8mq-librem5-devkit.dts | 4 +
arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts | 405 +
arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts | 413 +
arch/arm64/boot/dts/freescale/imx8mq-sr-som.dtsi | 309 +
.../arm64/boot/dts/freescale/imx8mq-zii-ultra.dtsi | 46 +-
arch/arm64/boot/dts/freescale/imx8mq.dtsi | 93 +-
arch/arm64/boot/dts/freescale/imx8qxp-ai_ml.dts | 249 +
arch/arm64/boot/dts/freescale/imx8qxp-mek.dts | 4 +
arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 55 +-
arch/arm64/boot/dts/intel/socfpga_agilex.dtsi | 2 +
arch/arm64/boot/dts/marvell/Makefile | 1 +
.../boot/dts/marvell/armada-3720-turris-mox.dts | 840 +
arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 12 +
arch/arm64/boot/dts/marvell/armada-7040-db.dts | 37 +-
.../dts/marvell/armada-8040-clearfog-gt-8k.dts | 22 +-
arch/arm64/boot/dts/marvell/armada-8040-db.dts | 43 +-
arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi | 38 +-
arch/arm64/boot/dts/marvell/armada-ap806-quad.dtsi | 5 +-
arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 7 +
arch/arm64/boot/dts/marvell/armada-cp110.dtsi | 13 +
.../boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts | 28 +-
arch/arm64/boot/dts/mediatek/mt7622.dtsi | 1 -
arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 96 +
arch/arm64/boot/dts/mediatek/mt8183.dtsi | 191 +-
arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 24 +
arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts | 4 +-
arch/arm64/boot/dts/nvidia/tegra194.dtsi | 38 +-
arch/arm64/boot/dts/qcom/Makefile | 8 +
.../boot/dts/qcom/msm8916-longcheer-l8150.dts | 228 +
.../dts/qcom/msm8916-samsung-a2015-common.dtsi | 236 +
.../boot/dts/qcom/msm8916-samsung-a3u-eur.dts | 10 +
.../boot/dts/qcom/msm8916-samsung-a5u-eur.dts | 10 +
arch/arm64/boot/dts/qcom/msm8996.dtsi | 544 +-
.../boot/dts/qcom/msm8998-asus-novago-tp370ql.dts | 47 +
arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi | 240 +
arch/arm64/boot/dts/qcom/msm8998-hp-envy-x2.dts | 30 +
.../boot/dts/qcom/msm8998-lenovo-miix-630.dts | 30 +
arch/arm64/boot/dts/qcom/msm8998.dtsi | 689 +-
arch/arm64/boot/dts/qcom/pm8150.dtsi | 97 +
arch/arm64/boot/dts/qcom/pm8150b.dtsi | 86 +
arch/arm64/boot/dts/qcom/pm8150l.dtsi | 80 +
arch/arm64/boot/dts/qcom/pm8998.dtsi | 2 +-
arch/arm64/boot/dts/qcom/pms405.dtsi | 16 +-
arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 7 +-
arch/arm64/boot/dts/qcom/qcs404.dtsi | 60 +-
arch/arm64/boot/dts/qcom/sdm845-cheza.dtsi | 12 +-
arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 +
arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 2 +
arch/arm64/boot/dts/qcom/sdm845.dtsi | 646 +-
.../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 446 +
arch/arm64/boot/dts/qcom/sm8150-mtp.dts | 375 +
arch/arm64/boot/dts/qcom/sm8150.dtsi | 482 +
arch/arm64/boot/dts/renesas/hihope-common.dtsi | 126 +
arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi | 22 +
arch/arm64/boot/dts/renesas/r8a774a1.dtsi | 342 +-
arch/arm64/boot/dts/renesas/r8a774c0-cat874.dts | 37 +-
arch/arm64/boot/dts/renesas/r8a774c0.dtsi | 100 +-
.../boot/dts/renesas/r8a7795-es1-salvator-x.dts | 26 +-
arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi | 223 +-
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 26 +-
.../arm64/boot/dts/renesas/r8a7795-salvator-xs.dts | 82 +-
arch/arm64/boot/dts/renesas/r8a7795.dtsi | 156 +-
arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 10 +-
.../arm64/boot/dts/renesas/r8a7796-salvator-xs.dts | 10 +-
arch/arm64/boot/dts/renesas/r8a7796.dtsi | 152 +-
.../arm64/boot/dts/renesas/r8a77965-salvator-x.dts | 28 +
.../boot/dts/renesas/r8a77965-salvator-xs.dts | 28 +
arch/arm64/boot/dts/renesas/r8a77965.dtsi | 50 +-
arch/arm64/boot/dts/renesas/r8a77970-eagle.dts | 58 +-
arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts | 116 +-
arch/arm64/boot/dts/renesas/r8a77970.dtsi | 6 +-
arch/arm64/boot/dts/renesas/r8a77980-condor.dts | 42 +-
arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dts | 12 +-
arch/arm64/boot/dts/renesas/r8a77980.dtsi | 4 +-
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 216 +-
arch/arm64/boot/dts/renesas/r8a77990.dtsi | 48 +-
arch/arm64/boot/dts/renesas/r8a77995-draak.dts | 24 +-
arch/arm64/boot/dts/renesas/r8a77995.dtsi | 82 +-
arch/arm64/boot/dts/renesas/salvator-common.dtsi | 72 +-
arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 226 +-
arch/arm64/boot/dts/renesas/ulcb.dtsi | 10 +-
arch/arm64/boot/dts/rockchip/Makefile | 1 +
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 11 +-
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 17 +-
arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts | 14 +
arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts | 645 +
arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts | 21 +
arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 52 +-
arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 10 +-
arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi | 6 +-
arch/arm64/boot/dts/ti/k3-am65.dtsi | 1 +
arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 1 +
.../boot/dts/ti/k3-j721e-common-proc-board.dts | 69 +
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 160 +-
arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 40 +-
arch/arm64/boot/dts/ti/k3-j721e.dtsi | 1 +
arch/arm64/configs/defconfig | 22 +
arch/arm64/crypto/Kconfig | 10 +-
arch/arm64/crypto/aes-ce-ccm-glue.c | 18 +-
arch/arm64/crypto/aes-ce-glue.c | 7 +-
arch/arm64/crypto/aes-ce.S | 3 +
arch/arm64/crypto/aes-cipher-core.S | 40 +-
arch/arm64/crypto/aes-cipher-glue.c | 11 +-
arch/arm64/crypto/aes-ctr-fallback.h | 50 -
arch/arm64/crypto/aes-glue.c | 470 +-
arch/arm64/crypto/aes-modes.S | 135 +-
arch/arm64/crypto/aes-neon.S | 79 +-
arch/arm64/crypto/aes-neonbs-core.S | 9 +-
arch/arm64/crypto/aes-neonbs-glue.c | 140 +-
arch/arm64/crypto/ghash-ce-glue.c | 30 +-
arch/arm64/crypto/sha256-glue.c | 24 +-
arch/arm64/include/asm/Kbuild | 1 +
arch/arm64/include/asm/arch_gicv3.h | 6 +
arch/arm64/include/asm/assembler.h | 28 +-
arch/arm64/include/asm/atomic.h | 99 +-
arch/arm64/include/asm/atomic_ll_sc.h | 217 +-
arch/arm64/include/asm/atomic_lse.h | 395 +-
arch/arm64/include/asm/cache.h | 2 +-
arch/arm64/include/asm/cmpxchg.h | 51 +-
arch/arm64/include/asm/compat.h | 2 -
arch/arm64/include/asm/cpu_ops.h | 3 +
arch/arm64/include/asm/cpufeature.h | 35 +-
arch/arm64/include/asm/cputype.h | 21 +-
arch/arm64/include/asm/daifflags.h | 2 +
arch/arm64/include/asm/debug-monitors.h | 3 -
arch/arm64/include/asm/dma-mapping.h | 31 -
arch/arm64/include/asm/efi.h | 10 +-
arch/arm64/include/asm/elf.h | 2 +-
arch/arm64/include/asm/esr.h | 3 +-
arch/arm64/include/asm/exception.h | 2 +
arch/arm64/include/asm/fpsimd.h | 2 +-
arch/arm64/include/asm/ftrace.h | 13 +
arch/arm64/include/asm/futex.h | 3 -
arch/arm64/include/asm/hw_breakpoint.h | 3 -
arch/arm64/include/asm/io.h | 10 +-
arch/arm64/include/asm/irqflags.h | 5 +-
arch/arm64/include/asm/kasan.h | 11 +-
arch/arm64/include/asm/kvm_arm.h | 7 +-
arch/arm64/include/asm/lse.h | 49 +-
arch/arm64/include/asm/memory.h | 139 +-
arch/arm64/include/asm/mmu.h | 2 +-
arch/arm64/include/asm/mmu_context.h | 4 +-
arch/arm64/include/asm/pci.h | 2 -
arch/arm64/include/asm/pgalloc.h | 2 -
arch/arm64/include/asm/pgtable-hwdef.h | 2 +-
arch/arm64/include/asm/pgtable-prot.h | 2 +-
arch/arm64/include/asm/pgtable.h | 49 +-
arch/arm64/include/asm/pointer_auth.h | 2 +-
arch/arm64/include/asm/proc-fns.h | 2 -
arch/arm64/include/asm/processor.h | 31 +-
arch/arm64/include/asm/ptrace.h | 7 +-
arch/arm64/include/asm/signal32.h | 2 -
arch/arm64/include/asm/stacktrace.h | 78 +-
arch/arm64/include/asm/syscall_wrapper.h | 15 +-
arch/arm64/include/asm/sysreg.h | 32 +-
arch/arm64/include/asm/thread_info.h | 29 +-
arch/arm64/include/asm/tlb.h | 2 +-
arch/arm64/include/asm/tlbflush.h | 1 +
arch/arm64/include/asm/topology.h | 23 -
arch/arm64/include/asm/uaccess.h | 12 +-
arch/arm64/include/asm/vdso.h | 4 -
arch/arm64/include/asm/vdso/compat_gettimeofday.h | 40 +
arch/arm64/include/asm/vdso_datapage.h | 4 -
arch/arm64/include/asm/xen/page-coherent.h | 75 -
arch/arm64/include/uapi/asm/bpf_perf_event.h | 2 +-
arch/arm64/include/uapi/asm/kvm.h | 4 +-
arch/arm64/include/uapi/asm/stat.h | 17 -
arch/arm64/kernel/cpufeature.c | 24 +-
arch/arm64/kernel/cpuidle.c | 50 +-
arch/arm64/kernel/cpuinfo.c | 2 +-
arch/arm64/kernel/debug-monitors.c | 14 +-
arch/arm64/kernel/entry.S | 58 +-
arch/arm64/kernel/fpsimd.c | 29 +-
arch/arm64/kernel/ftrace.c | 22 +-
arch/arm64/kernel/head.S | 116 +-
arch/arm64/kernel/hibernate-asm.S | 8 +-
arch/arm64/kernel/hibernate.c | 2 +-
arch/arm64/kernel/hw_breakpoint.c | 11 +-
arch/arm64/kernel/image-vars.h | 51 +
arch/arm64/kernel/image.h | 42 -
arch/arm64/kernel/insn.c | 2 +-
arch/arm64/kernel/kaslr.c | 11 +-
arch/arm64/kernel/kexec_image.c | 2 +-
arch/arm64/kernel/machine_kexec_file.c | 22 +-
arch/arm64/kernel/module-plts.c | 2 +-
arch/arm64/kernel/module.c | 4 +
arch/arm64/kernel/perf_callchain.c | 7 +-
arch/arm64/kernel/perf_event.c | 2 +-
arch/arm64/kernel/probes/kprobes.c | 40 +-
arch/arm64/kernel/process.c | 120 +-
arch/arm64/kernel/psci.c | 10 +-
arch/arm64/kernel/ptrace.c | 2 +-
arch/arm64/kernel/return_address.c | 12 +-
arch/arm64/kernel/setup.c | 20 +-
arch/arm64/kernel/smp.c | 6 +-
arch/arm64/kernel/smp_spin_table.c | 2 +-
arch/arm64/kernel/stacktrace.c | 62 +-
arch/arm64/kernel/time.c | 7 +-
arch/arm64/kernel/topology.c | 312 +-
arch/arm64/kernel/traps.c | 34 +-
arch/arm64/kernel/vdso/Makefile | 13 +-
arch/arm64/kernel/vdso32/Makefile | 14 +-
arch/arm64/kernel/vmlinux.lds.S | 11 +
arch/arm64/kvm/hyp/debug-sr.c | 30 +
arch/arm64/kvm/hyp/switch.c | 2 +-
arch/arm64/kvm/hyp/tlb.c | 14 +-
arch/arm64/kvm/regmap.c | 5 +
arch/arm64/kvm/sys_regs.c | 32 +-
arch/arm64/kvm/va_layout.c | 14 +-
arch/arm64/lib/Makefile | 21 +-
arch/arm64/lib/atomic_ll_sc.c | 3 -
arch/arm64/lib/error-inject.c | 18 +
arch/arm64/mm/dma-mapping.c | 18 +-
arch/arm64/mm/dump.c | 24 +-
arch/arm64/mm/fault.c | 101 +-
arch/arm64/mm/flush.c | 3 +-
arch/arm64/mm/init.c | 35 +-
arch/arm64/mm/ioremap.c | 4 +-
arch/arm64/mm/kasan_init.c | 9 +-
arch/arm64/mm/mmap.c | 72 -
arch/arm64/mm/mmu.c | 34 +-
arch/arm64/mm/numa.c | 2 +-
arch/arm64/mm/pageattr.c | 2 -
arch/arm64/mm/pgd.c | 2 +-
arch/arm64/mm/proc.S | 20 +-
arch/arm64/net/bpf_jit.h | 3 +
arch/arm64/net/bpf_jit_comp.c | 6 +-
arch/c6x/Kconfig | 1 -
arch/c6x/include/asm/pgtable.h | 5 -
arch/csky/abiv1/alignment.c | 62 +-
arch/csky/abiv1/cacheflush.c | 70 +-
arch/csky/abiv1/inc/abi/cacheflush.h | 45 +-
arch/csky/abiv1/inc/abi/page.h | 5 +-
arch/csky/abiv1/mmap.c | 75 +-
arch/csky/include/asm/barrier.h | 15 +-
arch/csky/include/asm/cache.h | 1 +
arch/csky/include/asm/io.h | 23 +-
arch/csky/include/asm/pgalloc.h | 4 +-
arch/csky/include/asm/pgtable.h | 15 +-
arch/csky/include/asm/tlb.h | 8 +-
arch/csky/include/uapi/asm/byteorder.h | 2 +-
arch/csky/include/uapi/asm/cachectl.h | 2 +-
arch/csky/include/uapi/asm/perf_regs.h | 2 +-
arch/csky/include/uapi/asm/ptrace.h | 2 +-
arch/csky/include/uapi/asm/sigcontext.h | 2 +-
arch/csky/include/uapi/asm/unistd.h | 2 +-
arch/csky/kernel/entry.S | 54 +-
arch/csky/kernel/perf_event.c | 4 +-
arch/csky/kernel/process.c | 2 +-
arch/csky/mm/cachev1.c | 7 +-
arch/csky/mm/cachev2.c | 11 +-
arch/csky/mm/dma-mapping.c | 82 +-
arch/csky/mm/init.c | 16 -
arch/csky/mm/ioremap.c | 27 +-
arch/h8300/include/asm/pgtable.h | 6 -
arch/hexagon/include/asm/pgalloc.h | 4 +-
arch/hexagon/include/asm/pgtable.h | 3 -
arch/hexagon/mm/Makefile | 2 +-
arch/hexagon/mm/init.c | 13 -
arch/hexagon/mm/pgalloc.c | 10 -
arch/ia64/Kconfig | 147 +-
arch/ia64/Kconfig.debug | 2 +-
arch/ia64/Makefile | 38 +-
arch/ia64/configs/bigsur_defconfig | 1 -
arch/ia64/configs/generic_defconfig | 8 -
arch/ia64/configs/gensparse_defconfig | 10 -
arch/ia64/configs/sim_defconfig | 52 -
arch/ia64/configs/tiger_defconfig | 1 -
arch/ia64/configs/zx1_defconfig | 1 -
arch/ia64/dig/Makefile | 15 -
arch/ia64/dig/machvec.c | 3 -
arch/ia64/dig/machvec_vtd.c | 3 -
arch/ia64/dig/setup.c | 71 -
arch/ia64/hp/common/Makefile | 4 +-
arch/ia64/hp/common/hwsw_iommu.c | 60 -
arch/ia64/hp/common/sba_iommu.c | 107 +-
arch/ia64/hp/sim/Kconfig | 23 -
arch/ia64/hp/sim/Makefile | 17 -
arch/ia64/hp/sim/boot/Makefile | 37 -
arch/ia64/hp/sim/boot/boot_head.S | 165 -
arch/ia64/hp/sim/boot/bootloader.c | 175 -
arch/ia64/hp/sim/boot/bootloader.lds | 67 -
arch/ia64/hp/sim/boot/fw-emu.c | 374 -
arch/ia64/hp/sim/boot/ssc.h | 36 -
arch/ia64/hp/sim/hpsim.S | 11 -
arch/ia64/hp/sim/hpsim_console.c | 77 -
arch/ia64/hp/sim/hpsim_irq.c | 76 -
arch/ia64/hp/sim/hpsim_machvec.c | 3 -
arch/ia64/hp/sim/hpsim_setup.c | 41 -
arch/ia64/hp/sim/hpsim_ssc.h | 37 -
arch/ia64/hp/sim/simeth.c | 510 -
arch/ia64/hp/sim/simscsi.c | 373 -
arch/ia64/hp/sim/simserial.c | 521 -
arch/ia64/hp/zx1/Makefile | 9 -
arch/ia64/hp/zx1/hpzx1_machvec.c | 3 -
arch/ia64/hp/zx1/hpzx1_swiotlb_machvec.c | 3 -
arch/ia64/include/asm/acpi.h | 28 +-
arch/ia64/include/asm/dma-mapping.h | 8 +-
arch/ia64/include/asm/dma.h | 6 +-
arch/ia64/include/asm/hpsim.h | 17 -
arch/ia64/include/asm/hw_irq.h | 27 +-
arch/ia64/include/asm/io.h | 222 +-
arch/ia64/include/asm/iommu.h | 3 -
arch/ia64/include/asm/iosapic.h | 12 -
arch/ia64/include/asm/irq.h | 3 -
arch/ia64/include/asm/machvec.h | 347 -
arch/ia64/include/asm/machvec_dig.h | 17 -
arch/ia64/include/asm/machvec_dig_vtd.h | 19 -
arch/ia64/include/asm/machvec_hpsim.h | 19 -
arch/ia64/include/asm/machvec_hpzx1.h | 19 -
arch/ia64/include/asm/machvec_hpzx1_swiotlb.h | 20 -
arch/ia64/include/asm/machvec_init.h | 35 -
arch/ia64/include/asm/machvec_sn2.h | 114 -
arch/ia64/include/asm/machvec_uv.h | 26 -
arch/ia64/include/asm/mmiowb.h | 12 +-
arch/ia64/include/asm/mmzone.h | 13 +-
arch/ia64/include/asm/pci.h | 9 +-
arch/ia64/include/asm/pgalloc.h | 52 +-
arch/ia64/include/asm/pgtable.h | 5 -
arch/ia64/include/asm/processor.h | 2 -
arch/ia64/include/asm/sal.h | 1 +
arch/ia64/include/asm/sn/acpi.h | 15 -
arch/ia64/include/asm/sn/addrs.h | 299 -
arch/ia64/include/asm/sn/arch.h | 86 -
arch/ia64/include/asm/sn/bte.h | 236 -
arch/ia64/include/asm/sn/clksupport.h | 28 -
arch/ia64/include/asm/sn/geo.h | 132 -
arch/ia64/include/asm/sn/intr.h | 53 -
arch/ia64/include/asm/sn/io.h | 274 -
arch/ia64/include/asm/sn/ioc3.h | 242 -
arch/ia64/include/asm/sn/klconfig.h | 246 -
arch/ia64/include/asm/sn/l1.h | 51 -
arch/ia64/include/asm/sn/leds.h | 33 -
arch/ia64/include/asm/sn/module.h | 127 -
arch/ia64/include/asm/sn/mspec.h | 59 -
arch/ia64/include/asm/sn/nodepda.h | 82 -
arch/ia64/include/asm/sn/pcibr_provider.h | 150 -
arch/ia64/include/asm/sn/pcibus_provider_defs.h | 68 -
arch/ia64/include/asm/sn/pcidev.h | 85 -
arch/ia64/include/asm/sn/pda.h | 68 -
arch/ia64/include/asm/sn/pic.h | 261 -
arch/ia64/include/asm/sn/rw_mmr.h | 28 -
arch/ia64/include/asm/sn/shub_mmr.h | 502 -
arch/ia64/include/asm/sn/shubio.h | 3358 --
arch/ia64/include/asm/sn/simulator.h | 25 -
arch/ia64/include/asm/sn/sn2/sn_hwperf.h | 242 -
arch/ia64/include/asm/sn/sn_cpuid.h | 132 -
arch/ia64/include/asm/sn/sn_feature_sets.h | 58 -
arch/ia64/include/asm/sn/sn_sal.h | 1111 +-
arch/ia64/include/asm/sn/tioca.h | 596 -
arch/ia64/include/asm/sn/tioca_provider.h | 207 -
arch/ia64/include/asm/sn/tioce.h | 760 -
arch/ia64/include/asm/sn/tioce_provider.h | 63 -
arch/ia64/include/asm/sn/tiocp.h | 257 -
arch/ia64/include/asm/sn/tiocx.h | 72 -
arch/ia64/include/asm/sn/types.h | 26 -
arch/ia64/include/asm/switch_to.h | 1 -
arch/ia64/include/asm/tlb.h | 1 -
arch/ia64/include/asm/uv/uv.h | 23 +-
arch/ia64/kernel/Makefile | 9 +-
arch/ia64/kernel/acpi.c | 81 +-
arch/ia64/kernel/dma-mapping.c | 14 -
arch/ia64/kernel/efi.c | 3 +
arch/ia64/kernel/iosapic.c | 8 +-
arch/ia64/kernel/irq.c | 23 -
arch/ia64/kernel/irq_ia64.c | 12 +-
arch/ia64/kernel/kprobes.c | 26 -
arch/ia64/kernel/machine_kexec.c | 1 -
arch/ia64/kernel/machvec.c | 77 -
arch/ia64/kernel/mca.c | 29 +-
arch/ia64/kernel/mca_drv.c | 1 -
arch/ia64/kernel/module.c | 8 +-
arch/ia64/kernel/msi_ia64.c | 21 +-
arch/ia64/kernel/pci-dma.c | 24 -
arch/ia64/kernel/sal.c | 9 +-
arch/ia64/kernel/setup.c | 100 +-
arch/ia64/kernel/signal.c | 10 +-
arch/ia64/kernel/smp.c | 9 +-
arch/ia64/kernel/smpboot.c | 9 +-
arch/ia64/kernel/sys_ia64.c | 18 -
arch/ia64/kernel/time.c | 3 -
arch/ia64/kernel/topology.c | 4 -
arch/ia64/kernel/unaligned.c | 6 +-
arch/ia64/kernel/uncached.c | 6 +-
arch/ia64/kernel/vmlinux.lds.S | 10 -
arch/ia64/lib/io.c | 114 -
arch/ia64/mm/contig.c | 6 +-
arch/ia64/mm/discontig.c | 10 +-
arch/ia64/mm/init.c | 21 +-
arch/ia64/mm/tlb.c | 6 +-
arch/ia64/pci/fixup.c | 6 +-
arch/ia64/pci/pci.c | 14 +-
arch/ia64/sn/Makefile | 12 -
arch/ia64/sn/include/ioerror.h | 81 -
arch/ia64/sn/include/tio.h | 41 -
arch/ia64/sn/include/xtalk/hubdev.h | 91 -
arch/ia64/sn/include/xtalk/xbow.h | 301 -
arch/ia64/sn/include/xtalk/xwidgetdev.h | 70 -
arch/ia64/sn/kernel/Makefile | 18 -
arch/ia64/sn/kernel/bte.c | 475 -
arch/ia64/sn/kernel/bte_error.c | 255 -
arch/ia64/sn/kernel/huberror.c | 220 -
arch/ia64/sn/kernel/idle.c | 30 -
arch/ia64/sn/kernel/io_acpi_init.c | 513 -
arch/ia64/sn/kernel/io_common.c | 561 -
arch/ia64/sn/kernel/io_init.c | 308 -
arch/ia64/sn/kernel/iomv.c | 82 -
arch/ia64/sn/kernel/irq.c | 489 -
arch/ia64/sn/kernel/klconflib.c | 107 -
arch/ia64/sn/kernel/machvec.c | 11 -
arch/ia64/sn/kernel/mca.c | 144 -
arch/ia64/sn/kernel/msi_sn.c | 238 -
arch/ia64/sn/kernel/pio_phys.S | 71 -
arch/ia64/sn/kernel/setup.c | 786 -
arch/ia64/sn/kernel/sn2/Makefile | 13 -
arch/ia64/sn/kernel/sn2/cache.c | 41 -
arch/ia64/sn/kernel/sn2/io.c | 101 -
arch/ia64/sn/kernel/sn2/prominfo_proc.c | 207 -
arch/ia64/sn/kernel/sn2/ptc_deadlock.S | 92 -
arch/ia64/sn/kernel/sn2/sn2_smp.c | 577 -
arch/ia64/sn/kernel/sn2/sn_hwperf.c | 1004 -
arch/ia64/sn/kernel/sn2/sn_proc_fs.c | 69 -
arch/ia64/sn/kernel/sn2/timer.c | 61 -
arch/ia64/sn/kernel/sn2/timer_interrupt.c | 60 -
arch/ia64/sn/kernel/tiocx.c | 569 -
arch/ia64/sn/pci/Makefile | 10 -
arch/ia64/sn/pci/pci_dma.c | 446 -
arch/ia64/sn/pci/pcibr/Makefile | 13 -
arch/ia64/sn/pci/pcibr/pcibr_ate.c | 177 -
arch/ia64/sn/pci/pcibr/pcibr_dma.c | 413 -
arch/ia64/sn/pci/pcibr/pcibr_provider.c | 265 -
arch/ia64/sn/pci/pcibr/pcibr_reg.c | 285 -
arch/ia64/sn/pci/tioca_provider.c | 677 -
arch/ia64/sn/pci/tioce_provider.c | 1062 -
arch/ia64/uv/kernel/Makefile | 1 -
arch/ia64/uv/kernel/machvec.c | 11 -
arch/ia64/uv/kernel/setup.c | 74 +-
arch/m68k/Kconfig | 3 +-
arch/m68k/Makefile | 2 +-
arch/m68k/atari/config.c | 6 +-
arch/m68k/coldfire/gpio.c | 1 +
arch/m68k/configs/amiga_defconfig | 13 +-
arch/m68k/configs/apollo_defconfig | 13 +-
arch/m68k/configs/atari_defconfig | 13 +-
arch/m68k/configs/bvme6000_defconfig | 13 +-
arch/m68k/configs/hp300_defconfig | 13 +-
arch/m68k/configs/mac_defconfig | 13 +-
arch/m68k/configs/multi_defconfig | 13 +-
arch/m68k/configs/mvme147_defconfig | 13 +-
arch/m68k/configs/mvme16x_defconfig | 13 +-
arch/m68k/configs/q40_defconfig | 13 +-
arch/m68k/configs/sun3_defconfig | 13 +-
arch/m68k/configs/sun3x_defconfig | 13 +-
arch/m68k/include/asm/atarihw.h | 13 +-
arch/m68k/include/asm/export.h | 1 -
arch/m68k/include/asm/io_mm.h | 6 +-
arch/m68k/include/asm/kmap.h | 17 +-
arch/m68k/include/asm/macintosh.h | 11 +-
arch/m68k/include/asm/mcf_pgalloc.h | 6 +-
arch/m68k/include/asm/motorola_pgalloc.h | 6 +-
arch/m68k/include/asm/pgtable_mm.h | 10 +-
arch/m68k/include/asm/pgtable_no.h | 7 -
arch/m68k/include/asm/sun3_pgalloc.h | 2 +-
arch/m68k/kernel/dma.c | 12 +-
arch/m68k/mac/config.c | 128 +-
arch/microblaze/Kconfig | 4 +-
arch/microblaze/boot/dts/system.dts | 16 +-
arch/microblaze/configs/mmu_defconfig | 22 +-
arch/microblaze/configs/nommu_defconfig | 25 +-
arch/microblaze/include/asm/io.h | 1 -
arch/microblaze/include/asm/pci.h | 2 -
arch/microblaze/include/asm/pgalloc.h | 122 +-
arch/microblaze/include/asm/pgtable.h | 7 -
arch/microblaze/include/asm/uaccess.h | 42 +-
arch/microblaze/kernel/reset.c | 87 +-
arch/microblaze/mm/consistent.c | 221 +-
arch/microblaze/mm/pgtable.c | 4 -
arch/mips/Kconfig | 77 +-
arch/mips/Makefile | 4 -
arch/mips/bcm47xx/board.c | 1 +
arch/mips/bcm47xx/buttons.c | 10 +
arch/mips/boot/Makefile | 2 +-
arch/mips/boot/dts/brcm/bcm3368.dtsi | 12 +-
arch/mips/boot/dts/brcm/bcm63268.dtsi | 12 +-
arch/mips/boot/dts/brcm/bcm6328.dtsi | 6 +
arch/mips/boot/dts/brcm/bcm6358.dtsi | 12 +-
arch/mips/boot/dts/brcm/bcm6362.dtsi | 12 +-
arch/mips/boot/dts/brcm/bcm6368.dtsi | 12 +-
arch/mips/boot/dts/ingenic/ci20.dts | 7 +
arch/mips/boot/dts/ingenic/gcw0.dts | 10 +
arch/mips/boot/dts/ingenic/jz4740.dtsi | 127 +-
arch/mips/boot/dts/ingenic/jz4770.dtsi | 21 +
arch/mips/boot/dts/ingenic/jz4780.dtsi | 23 +
arch/mips/boot/dts/ingenic/qi_lb60.dts | 325 +
arch/mips/boot/dts/mscc/ocelot.dtsi | 7 +-
arch/mips/cavium-octeon/dma-octeon.c | 16 +-
arch/mips/cavium-octeon/octeon-usb.c | 1 +
arch/mips/cavium-octeon/setup.c | 3 +-
arch/mips/configs/bigsur_defconfig | 1 -
arch/mips/configs/ip32_defconfig | 1 -
arch/mips/configs/markeins_defconfig | 1 -
arch/mips/configs/qi_lb60_defconfig | 44 +-
arch/mips/configs/rm200_defconfig | 1 -
arch/mips/configs/sb1250_swarm_defconfig | 1 -
arch/mips/fw/arc/memory.c | 24 +-
arch/mips/include/asm/addrspace.h | 9 -
arch/mips/include/asm/atomic.h | 19 +-
arch/mips/include/asm/barrier.h | 44 +-
arch/mips/include/asm/bitops.h | 47 +-
arch/mips/include/asm/bootinfo.h | 17 +-
arch/mips/include/asm/cmpxchg.h | 18 +-
arch/mips/include/asm/cpu-features.h | 19 +-
arch/mips/include/asm/cpu-type.h | 15 +-
arch/mips/include/asm/cpu.h | 19 +-
arch/mips/include/asm/io.h | 21 +-
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
.../asm/mach-cavium-octeon/cpu-feature-overrides.h | 9 -
arch/mips/include/asm/mach-cavium-octeon/war.h | 1 -
.../include/asm/mach-dec/cpu-feature-overrides.h | 1 -
arch/mips/include/asm/mach-generic/war.h | 1 -
arch/mips/include/asm/mach-ip22/war.h | 1 -
arch/mips/include/asm/mach-ip27/war.h | 1 -
arch/mips/include/asm/mach-ip28/war.h | 1 -
arch/mips/include/asm/mach-ip32/war.h | 1 -
arch/mips/include/asm/mach-jz4740/gpio.h | 15 -
arch/mips/include/asm/mach-jz4740/jz4740_fb.h | 58 -
arch/mips/include/asm/mach-jz4740/jz4740_mmc.h | 12 -
arch/mips/include/asm/mach-jz4740/platform.h | 26 -
.../asm/mach-loongson64/cpu-feature-overrides.h | 1 -
arch/mips/include/asm/mach-malta/war.h | 1 -
arch/mips/include/asm/mach-pmcs-msp71xx/war.h | 1 -
arch/mips/include/asm/mach-rc32434/war.h | 1 -
arch/mips/include/asm/mach-rm/war.h | 1 -
arch/mips/include/asm/mach-sibyte/war.h | 1 -
arch/mips/include/asm/mach-tx49xx/war.h | 1 -
arch/mips/include/asm/mipsregs.h | 4 +
arch/mips/include/asm/module.h | 6 -
arch/mips/include/asm/octeon/cvmx-sli-defs.h | 1 +
arch/mips/include/asm/octeon/octeon.h | 4 +-
arch/mips/include/asm/pci.h | 1 -
arch/mips/include/asm/pgalloc.h | 4 +-
arch/mips/include/asm/pgtable-32.h | 62 +-
arch/mips/include/asm/pgtable-bits.h | 34 +-
arch/mips/include/asm/pgtable.h | 25 +-
arch/mips/include/asm/processor.h | 5 -
arch/mips/include/asm/sn/ioc3.h | 357 +-
arch/mips/include/asm/syscall.h | 21 +-
arch/mips/include/asm/vdso.h | 78 +-
arch/mips/include/asm/vdso/gettimeofday.h | 222 +
arch/mips/include/asm/vdso/vdso.h | 75 +
arch/mips/include/asm/vdso/vsyscall.h | 43 +
arch/mips/include/asm/war.h | 13 -
arch/mips/include/uapi/asm/mman.h | 3 +
arch/mips/jazz/jazzdma.c | 2 +
arch/mips/jz4740/Makefile | 7 +-
arch/mips/jz4740/board-qi_lb60.c | 523 -
arch/mips/jz4740/platform.c | 250 -
arch/mips/jz4740/prom.c | 5 -
arch/mips/jz4740/setup.c | 7 +-
arch/mips/jz4740/time.c | 151 +-
arch/mips/kernel/branch.c | 2 +-
arch/mips/kernel/cacheinfo.c | 2 +
arch/mips/kernel/cpu-probe.c | 53 +-
arch/mips/kernel/genex.S | 3 -
arch/mips/kernel/i8253.c | 3 +-
arch/mips/kernel/idle.c | 3 +-
arch/mips/kernel/proc.c | 4 +
arch/mips/kernel/scall32-o32.S | 2 +-
arch/mips/kernel/scall64-n32.S | 2 +-
arch/mips/kernel/scall64-n64.S | 2 +-
arch/mips/kernel/scall64-o32.S | 2 +-
arch/mips/kernel/setup.c | 357 +-
arch/mips/kernel/syscall.c | 1 +
arch/mips/kernel/syscalls/syscalltbl.sh | 4 +-
arch/mips/kernel/vdso.c | 37 +-
arch/mips/kvm/emulate.c | 1 +
arch/mips/kvm/mips.c | 10 -
arch/mips/lantiq/xway/sysctrl.c | 16 +-
arch/mips/mm/Makefile | 6 +-
arch/mips/mm/c-r4k.c | 2 -
arch/mips/mm/dma-noncoherent.c | 8 -
arch/mips/mm/init.c | 98 +-
arch/mips/mm/mmap.c | 84 -
arch/mips/mm/pgtable-32.c | 20 +
arch/mips/mm/sc-mips.c | 27 +-
arch/mips/mm/tlb-r8k.c | 239 -
arch/mips/mm/tlbex.c | 63 +-
arch/mips/mti-malta/malta-memory.c | 11 -
arch/mips/netlogic/xlp/setup.c | 12 +-
arch/mips/oprofile/op_model_mipsxx.c | 13 +
arch/mips/pci/ops-bcm63xx.c | 1 +
arch/mips/pci/pci-xtalk-bridge.c | 167 +-
arch/mips/pmcs-msp71xx/msp_prom.c | 22 +-
arch/mips/ralink/Kconfig | 1 -
arch/mips/ralink/timer.c | 4 +-
arch/mips/sgi-ip22/ip28-berr.c | 20 +-
arch/mips/sgi-ip27/ip27-console.c | 5 +-
arch/mips/sgi-ip27/ip27-init.c | 13 -
arch/mips/vdso/Makefile | 41 +-
arch/mips/vdso/config-n32-o32-env.c | 19 +
arch/mips/vdso/elf.S | 2 +-
arch/mips/vdso/sigreturn.S | 2 +-
arch/mips/vdso/vdso.h | 85 -
arch/mips/vdso/vdso.lds.S | 4 +
arch/mips/vdso/vgettimeofday.c | 58 +
arch/nds32/include/asm/pgalloc.h | 2 -
arch/nds32/include/asm/pgtable.h | 2 -
arch/nds32/include/uapi/asm/auxvec.h | 2 +-
arch/nds32/include/uapi/asm/byteorder.h | 2 +-
arch/nds32/include/uapi/asm/cachectl.h | 2 +-
arch/nds32/include/uapi/asm/fp_udfiex_crtl.h | 2 +-
arch/nds32/include/uapi/asm/param.h | 2 +-
arch/nds32/include/uapi/asm/ptrace.h | 2 +-
arch/nds32/include/uapi/asm/sigcontext.h | 2 +-
arch/nds32/include/uapi/asm/unistd.h | 2 +-
arch/nds32/kernel/dma.c | 6 -
arch/nds32/kernel/signal.c | 2 +
arch/nios2/include/asm/pgalloc.h | 4 +-
arch/nios2/include/asm/pgtable.h | 2 -
arch/nios2/kernel/setup.c | 6 +-
arch/openrisc/boot/dts/or1ksim.dts | 5 +-
arch/openrisc/boot/dts/simple_smp.dts | 6 +
arch/openrisc/include/asm/io.h | 20 +-
arch/openrisc/include/asm/pgalloc.h | 8 +-
arch/openrisc/include/asm/pgtable.h | 7 +-
arch/openrisc/kernel/dma.c | 23 +-
arch/openrisc/mm/ioremap.c | 8 +-
arch/parisc/Kconfig | 26 +-
arch/parisc/Makefile | 7 +-
arch/parisc/boot/compressed/.gitignore | 2 +
arch/parisc/boot/compressed/Makefile | 4 +-
arch/parisc/boot/compressed/vmlinux.lds.S | 4 +-
.../configs/{default_defconfig => defconfig} | 0
arch/parisc/include/asm/alternative.h | 11 +-
arch/parisc/include/asm/fixmap.h | 1 +
arch/parisc/include/asm/ftrace.h | 1 +
arch/parisc/include/asm/kexec.h | 37 +
arch/parisc/include/asm/kprobes.h | 4 +
arch/parisc/include/asm/pdc.h | 1 +
arch/parisc/include/asm/pgalloc.h | 2 -
arch/parisc/include/asm/pgtable.h | 5 +-
arch/parisc/include/asm/string.h | 15 +
arch/parisc/include/uapi/asm/mman.h | 3 +
arch/parisc/kernel/Makefile | 2 +
arch/parisc/kernel/alternative.c | 23 +-
arch/parisc/kernel/entry.S | 99 +
arch/parisc/kernel/firmware.c | 13 +
arch/parisc/kernel/ftrace.c | 67 +-
arch/parisc/kernel/kexec.c | 112 +
arch/parisc/kernel/kexec_file.c | 86 +
arch/parisc/kernel/kprobes.c | 4 -
arch/parisc/kernel/pacache.S | 12 +-
arch/parisc/kernel/parisc_ksyms.c | 4 +
arch/parisc/kernel/pci.c | 11 -
arch/parisc/kernel/relocate_kernel.S | 149 +
arch/parisc/kernel/smp.c | 1 +
arch/parisc/kernel/syscalls/syscall.tbl | 3 +-
arch/parisc/kernel/traps.c | 2 +
arch/parisc/lib/Makefile | 4 +-
arch/parisc/lib/memset.c | 91 -
arch/parisc/lib/string.S | 136 +
arch/parisc/math-emu/Makefile | 1 +
arch/parisc/mm/fault.c | 1 +
arch/powerpc/Kconfig | 45 +-
arch/powerpc/Makefile | 5 +-
arch/powerpc/Makefile.postlink | 2 +-
arch/powerpc/boot/main.c | 41 +
arch/powerpc/boot/ops.h | 2 +
arch/powerpc/boot/wrapper | 24 +-
arch/powerpc/boot/zImage.lds.S | 8 +
arch/powerpc/configs/pmac32_defconfig | 1 -
arch/powerpc/configs/powernv_defconfig | 2 +-
arch/powerpc/configs/ppc40x_defconfig | 1 -
arch/powerpc/configs/ppc64_defconfig | 1 +
arch/powerpc/configs/pseries_defconfig | 1 +
arch/powerpc/configs/skiroot_defconfig | 1 +
arch/powerpc/include/asm/Kbuild | 1 -
arch/powerpc/include/asm/asm-prototypes.h | 14 +-
arch/powerpc/include/asm/book3s/32/pgtable.h | 18 +-
arch/powerpc/include/asm/book3s/64/mmu.h | 4 -
arch/powerpc/include/asm/book3s/64/pgtable.h | 8 +-
arch/powerpc/include/asm/book3s/64/radix.h | 11 +-
.../powerpc/include/asm/book3s/64/tlbflush-radix.h | 12 +-
arch/powerpc/include/asm/book3s/64/tlbflush.h | 9 +
arch/powerpc/include/asm/book3s/pgtable.h | 11 +
arch/powerpc/include/asm/bug.h | 8 -
arch/powerpc/include/asm/cache.h | 8 +-
arch/powerpc/include/asm/cputable.h | 25 +-
arch/powerpc/include/asm/current.h | 3 +-
arch/powerpc/include/asm/eeh.h | 40 +-
arch/powerpc/include/asm/elfnote.h | 24 +
arch/powerpc/include/asm/error-injection.h | 13 -
arch/powerpc/include/asm/fadump-internal.h | 169 +
arch/powerpc/include/asm/fadump.h | 194 +-
arch/powerpc/include/asm/firmware.h | 5 +-
arch/powerpc/include/asm/ftrace.h | 2 +
arch/powerpc/include/asm/futex.h | 3 +-
arch/powerpc/include/asm/head-64.h | 41 -
arch/powerpc/include/asm/hugetlb.h | 3 -
arch/powerpc/include/asm/hvcall.h | 11 +-
arch/powerpc/include/asm/io-workarounds.h | 20 +
arch/powerpc/include/asm/io.h | 16 +-
arch/powerpc/include/asm/iommu.h | 28 +-
arch/powerpc/include/asm/kvm_book3s_64.h | 2 +-
arch/powerpc/include/asm/kvm_host.h | 23 +-
arch/powerpc/include/asm/kvm_ppc.h | 101 +-
arch/powerpc/include/asm/machdep.h | 7 -
arch/powerpc/include/asm/mce.h | 10 +-
arch/powerpc/include/asm/mem_encrypt.h | 26 +
arch/powerpc/include/asm/mmu.h | 2 +-
arch/powerpc/include/asm/nohash/32/pgtable.h | 18 +-
arch/powerpc/include/asm/nohash/64/pgtable.h | 1 +
arch/powerpc/include/asm/nohash/pgtable.h | 13 +
arch/powerpc/include/asm/opal-api.h | 45 +-
arch/powerpc/include/asm/opal.h | 7 +-
arch/powerpc/include/asm/page.h | 14 +-
arch/powerpc/include/asm/page_32.h | 4 +
arch/powerpc/include/asm/pci-bridge.h | 1 +
arch/powerpc/include/asm/pci.h | 2 -
arch/powerpc/include/asm/pgalloc.h | 2 -
arch/powerpc/include/asm/pgtable.h | 15 +-
arch/powerpc/include/asm/plpar_wrappers.h | 6 +
arch/powerpc/include/asm/pmc.h | 5 +-
arch/powerpc/include/asm/ppc-pci.h | 7 +-
arch/powerpc/include/asm/ppc4xx_ocm.h | 31 -
arch/powerpc/include/asm/ppc_asm.h | 80 +-
arch/powerpc/include/asm/ptrace.h | 6 +-
arch/powerpc/include/asm/reg.h | 12 +-
arch/powerpc/include/asm/scom.h | 154 -
arch/powerpc/include/asm/sections.h | 11 -
arch/powerpc/include/asm/setjmp.h | 4 +-
arch/powerpc/include/asm/spinlock.h | 62 +-
arch/powerpc/include/asm/string.h | 2 +
arch/powerpc/include/asm/svm.h | 31 +
arch/powerpc/include/asm/time.h | 6 +-
arch/powerpc/include/asm/timex.h | 34 +-
arch/powerpc/include/asm/uaccess.h | 14 +
arch/powerpc/include/asm/ultravisor-api.h | 33 +
arch/powerpc/include/asm/ultravisor.h | 49 +
arch/powerpc/include/asm/unistd.h | 1 +
arch/powerpc/include/asm/xive.h | 10 +
arch/powerpc/include/uapi/asm/bpf_perf_event.h | 2 +-
arch/powerpc/include/uapi/asm/kvm_para.h | 2 +-
arch/powerpc/kernel/.gitignore | 1 +
arch/powerpc/kernel/Makefile | 23 +-
arch/powerpc/kernel/align.c | 4 +
arch/powerpc/kernel/asm-offsets.c | 1 +
arch/powerpc/kernel/cpu_setup_power.S | 6 +
arch/powerpc/kernel/cputable.c | 6 +-
arch/powerpc/kernel/dbell.c | 6 +-
arch/powerpc/kernel/dma-iommu.c | 13 +-
arch/powerpc/kernel/dt_cpu_ftrs.c | 35 +-
arch/powerpc/kernel/eeh.c | 281 +-
arch/powerpc/kernel/eeh_cache.c | 37 +-
arch/powerpc/kernel/eeh_dev.c | 2 +
arch/powerpc/kernel/eeh_driver.c | 280 +-
arch/powerpc/kernel/eeh_event.c | 34 +-
arch/powerpc/kernel/eeh_pe.c | 145 +-
arch/powerpc/kernel/entry_32.S | 48 +-
arch/powerpc/kernel/entry_64.S | 26 +-
arch/powerpc/kernel/exceptions-64e.S | 22 +-
arch/powerpc/kernel/exceptions-64s.S | 1646 +-
arch/powerpc/kernel/fadump.c | 1340 +-
arch/powerpc/kernel/head_32.S | 55 +-
arch/powerpc/kernel/head_32.h | 21 +-
arch/powerpc/kernel/head_64.S | 8 +-
arch/powerpc/kernel/head_8xx.S | 28 +-
arch/powerpc/kernel/hw_breakpoint.c | 77 +-
arch/powerpc/kernel/io-workarounds.c | 13 +-
arch/powerpc/kernel/iommu.c | 97 +-
arch/powerpc/kernel/kexec_elf_64.c | 545 +-
arch/powerpc/kernel/kvm.c | 58 +-
arch/powerpc/kernel/kvm_emul.S | 16 +
arch/powerpc/kernel/machine_kexec_64.c | 9 +
arch/powerpc/kernel/mce.c | 71 +-
arch/powerpc/kernel/mce_power.c | 50 +-
arch/powerpc/kernel/misc_32.S | 36 +-
arch/powerpc/kernel/note.S | 40 +
arch/powerpc/kernel/paca.c | 52 +-
arch/powerpc/kernel/pci-common.c | 4 -
arch/powerpc/kernel/pci-hotplug.c | 7 +
arch/powerpc/kernel/pci_32.c | 4 +
arch/powerpc/kernel/pci_64.c | 12 +-
arch/powerpc/kernel/pci_dn.c | 21 +-
arch/powerpc/kernel/pci_of_scan.c | 66 +-
arch/powerpc/kernel/process.c | 49 +-
arch/powerpc/kernel/prom.c | 8 +-
arch/powerpc/kernel/prom_init.c | 98 +-
arch/powerpc/kernel/prom_init_check.sh | 2 +-
arch/powerpc/kernel/rtas.c | 15 +-
arch/powerpc/kernel/security.c | 19 +-
arch/powerpc/kernel/setup-common.c | 14 +-
arch/powerpc/kernel/setup_32.c | 2 +-
arch/powerpc/kernel/signal_32.c | 3 +
arch/powerpc/kernel/signal_64.c | 5 +
arch/powerpc/kernel/stacktrace.c | 2 +-
arch/powerpc/kernel/syscalls/syscall.tbl | 2 +-
arch/powerpc/kernel/sysfs.c | 20 +
arch/powerpc/kernel/trace/ftrace.c | 5 +-
arch/powerpc/kernel/trace/ftrace_32.S | 1 +
arch/powerpc/kernel/trace/ftrace_64_mprofile.S | 1 +
arch/powerpc/kernel/trace/ftrace_64_pg.S | 1 +
arch/powerpc/kernel/traps.c | 1 +
arch/powerpc/kernel/ucall.S | 14 +
arch/powerpc/kernel/vdso.c | 22 -
arch/powerpc/kernel/vdso32/datapage.S | 2 +
arch/powerpc/kernel/vdso32/vdso32.lds.S | 4 +-
arch/powerpc/kvm/book3s.c | 8 +-
arch/powerpc/kvm/book3s_32_mmu.c | 1 +
arch/powerpc/kvm/book3s_64_vio.c | 33 +-
arch/powerpc/kvm/book3s_64_vio_hv.c | 42 +-
arch/powerpc/kvm/book3s_hv.c | 54 +-
arch/powerpc/kvm/book3s_hv_nested.c | 10 +-
arch/powerpc/kvm/book3s_hv_rm_mmu.c | 44 +-
arch/powerpc/kvm/book3s_hv_rm_xics.c | 2 +-
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 87 +-
arch/powerpc/kvm/book3s_xive.c | 64 +-
arch/powerpc/kvm/book3s_xive.h | 2 +
arch/powerpc/kvm/book3s_xive_native.c | 27 +-
arch/powerpc/kvm/e500.c | 3 +
arch/powerpc/kvm/emulate.c | 1 +
arch/powerpc/kvm/emulate_loadstore.c | 6 -
arch/powerpc/kvm/powerpc.c | 18 +-
arch/powerpc/lib/Makefile | 4 +-
arch/powerpc/lib/locks.c | 6 +-
arch/powerpc/lib/memcpy_mcsafe_64.S | 242 +
arch/powerpc/mm/Makefile | 2 +-
arch/powerpc/mm/book3s32/mmu.c | 60 +-
arch/powerpc/mm/book3s64/hash_native.c | 31 +-
arch/powerpc/mm/book3s64/hash_pgtable.c | 2 +
arch/powerpc/mm/book3s64/hash_utils.c | 99 +-
arch/powerpc/mm/book3s64/iommu_api.c | 7 +-
arch/powerpc/mm/book3s64/mmu_context.c | 15 +-
arch/powerpc/mm/book3s64/pgtable.c | 121 +-
arch/powerpc/mm/book3s64/radix_pgtable.c | 87 +-
arch/powerpc/mm/book3s64/radix_tlb.c | 387 +-
arch/powerpc/mm/book3s64/subpage_prot.c | 12 +-
arch/powerpc/mm/dma-noncoherent.c | 312 +-
arch/powerpc/mm/hugetlbpage.c | 2 +-
arch/powerpc/mm/init_64.c | 17 +-
arch/powerpc/mm/ioremap.c | 99 +
arch/powerpc/mm/ioremap_32.c | 92 +
arch/powerpc/mm/ioremap_64.c | 113 +
arch/powerpc/mm/kasan/kasan_init_32.c | 64 +-
arch/powerpc/mm/mem.c | 68 +-
arch/powerpc/mm/mmu_decl.h | 7 +-
arch/powerpc/mm/nohash/book3e_hugetlbpage.c | 16 +-
arch/powerpc/mm/nohash/tlb.c | 3 +-
arch/powerpc/mm/pgtable-frag.c | 6 +-
arch/powerpc/mm/pgtable_32.c | 155 +-
arch/powerpc/mm/pgtable_64.c | 203 +-
arch/powerpc/mm/ptdump/bats.c | 2 +-
arch/powerpc/mm/ptdump/hashpagetable.c | 24 +-
arch/powerpc/mm/ptdump/ptdump.c | 37 +-
arch/powerpc/perf/imc-pmu.c | 29 +-
arch/powerpc/platforms/44x/Kconfig | 8 -
arch/powerpc/platforms/4xx/Makefile | 1 -
arch/powerpc/platforms/4xx/ocm.c | 390 -
arch/powerpc/platforms/Kconfig | 3 +-
arch/powerpc/platforms/Kconfig.cputype | 16 +-
arch/powerpc/platforms/cell/iommu.c | 2 +-
arch/powerpc/platforms/cell/spufs/inode.c | 207 +-
arch/powerpc/platforms/pasemi/iommu.c | 2 +-
arch/powerpc/platforms/powernv/Kconfig | 5 +-
arch/powerpc/platforms/powernv/Makefile | 6 +-
arch/powerpc/platforms/powernv/eeh-powernv.c | 97 +-
arch/powerpc/platforms/powernv/idle.c | 6 +-
arch/powerpc/platforms/powernv/npu-dma.c | 101 +-
arch/powerpc/platforms/powernv/opal-call.c | 5 +-
arch/powerpc/platforms/powernv/opal-core.c | 636 +
arch/powerpc/platforms/powernv/opal-fadump.c | 716 +
arch/powerpc/platforms/powernv/opal-fadump.h | 146 +
arch/powerpc/platforms/powernv/opal-imc.c | 12 +-
arch/powerpc/platforms/powernv/opal-msglog.c | 57 +-
arch/powerpc/platforms/powernv/opal-prd.c | 8 +-
arch/powerpc/platforms/powernv/opal-xscom.c | 213 +-
arch/powerpc/platforms/powernv/opal.c | 42 +-
arch/powerpc/platforms/powernv/pci-ioda-tce.c | 38 +-
arch/powerpc/platforms/powernv/pci-ioda.c | 98 +-
arch/powerpc/platforms/powernv/pci.c | 3 +-
arch/powerpc/platforms/powernv/pci.h | 2 +-
arch/powerpc/platforms/powernv/powernv.h | 5 +
arch/powerpc/platforms/powernv/setup.c | 9 +
arch/powerpc/platforms/powernv/smp.c | 2 +-
arch/powerpc/platforms/powernv/ultravisor.c | 69 +
arch/powerpc/platforms/ps3/spu.c | 10 +-
arch/powerpc/platforms/ps3/system-bus.c | 11 +-
arch/powerpc/platforms/pseries/Kconfig | 14 +
arch/powerpc/platforms/pseries/Makefile | 2 +
arch/powerpc/platforms/pseries/eeh_pseries.c | 68 +-
arch/powerpc/platforms/pseries/hotplug-memory.c | 26 +-
arch/powerpc/platforms/pseries/iommu.c | 24 +-
arch/powerpc/platforms/pseries/lpar.c | 183 +-
arch/powerpc/platforms/pseries/mobility.c | 9 +
arch/powerpc/platforms/pseries/papr_scm.c | 121 +-
arch/powerpc/platforms/pseries/pci.c | 3 +-
arch/powerpc/platforms/pseries/pseries.h | 1 +
arch/powerpc/platforms/pseries/ras.c | 460 +-
arch/powerpc/platforms/pseries/rtas-fadump.c | 550 +
arch/powerpc/platforms/pseries/rtas-fadump.h | 114 +
arch/powerpc/platforms/pseries/setup.c | 33 +-
arch/powerpc/platforms/pseries/smp.c | 3 +-
arch/powerpc/platforms/pseries/svm.c | 85 +
arch/powerpc/platforms/pseries/vio.c | 4 +-
arch/powerpc/sysdev/Kconfig | 7 -
arch/powerpc/sysdev/Makefile | 2 -
arch/powerpc/sysdev/dart_iommu.c | 2 +-
arch/powerpc/sysdev/scom.c | 223 -
arch/powerpc/sysdev/xics/icp-native.c | 6 +-
arch/powerpc/sysdev/xics/icp-opal.c | 6 +-
arch/powerpc/sysdev/xive/common.c | 153 +-
arch/powerpc/sysdev/xive/native.c | 33 +
arch/powerpc/sysdev/xive/spapr.c | 57 +-
arch/powerpc/sysdev/xive/xive-internal.h | 2 +
arch/powerpc/xmon/xmon.c | 51 +-
arch/riscv/Kbuild | 3 +
arch/riscv/Kconfig | 37 +
arch/riscv/Makefile | 7 +-
arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 38 +-
.../riscv/boot/dts/sifive/hifive-unleashed-a00.dts | 17 +
arch/riscv/configs/defconfig | 23 +-
arch/riscv/configs/rv32_defconfig | 14 +
arch/riscv/include/asm/Kbuild | 1 +
arch/riscv/include/asm/fixmap.h | 4 -
arch/riscv/include/asm/image.h | 12 +-
arch/riscv/include/asm/page.h | 2 +
arch/riscv/include/asm/pgalloc.h | 6 +-
arch/riscv/include/asm/pgtable.h | 38 +-
arch/riscv/include/asm/smp.h | 6 -
arch/riscv/include/asm/sparsemem.h | 11 +
arch/riscv/include/asm/switch_to.h | 8 +-
arch/riscv/include/asm/timex.h | 44 +-
arch/riscv/include/asm/tlbflush.h | 31 +-
arch/riscv/include/uapi/asm/auxvec.h | 2 +-
arch/riscv/include/uapi/asm/bitsperlong.h | 2 +-
arch/riscv/include/uapi/asm/byteorder.h | 2 +-
arch/riscv/include/uapi/asm/hwcap.h | 2 +-
arch/riscv/include/uapi/asm/perf_regs.h | 42 +
arch/riscv/include/uapi/asm/ptrace.h | 2 +-
arch/riscv/include/uapi/asm/sigcontext.h | 2 +-
arch/riscv/include/uapi/asm/ucontext.h | 2 +-
arch/riscv/include/uapi/asm/unistd.h | 1 +
arch/riscv/kernel/Makefile | 4 +-
arch/riscv/kernel/entry.S | 12 +-
arch/riscv/kernel/fpu.S | 8 +-
arch/riscv/kernel/head.S | 14 +-
arch/riscv/kernel/perf_callchain.c | 94 +
arch/riscv/kernel/perf_regs.c | 44 +
arch/riscv/kernel/process.c | 11 +-
arch/riscv/kernel/smp.c | 61 +-
arch/riscv/kernel/smpboot.c | 3 +
arch/riscv/kernel/stacktrace.c | 4 +-
arch/riscv/kernel/time.c | 1 +
arch/riscv/kernel/vdso/Makefile | 2 +-
arch/riscv/lib/Makefile | 2 -
arch/riscv/lib/delay.c | 6 +-
arch/riscv/lib/uaccess.S | 12 +-
arch/riscv/lib/udivdi3.S | 32 -
arch/riscv/mm/Makefile | 3 +
arch/riscv/mm/cacheflush.c | 1 -
arch/riscv/mm/context.c | 7 +-
arch/riscv/mm/init.c | 12 +-
arch/riscv/mm/tlbflush.c | 35 +
arch/s390/Kconfig | 28 +-
arch/s390/Makefile | 2 +
arch/s390/boot/Makefile | 2 +-
arch/s390/boot/boot.h | 3 +
arch/s390/boot/compressed/.gitignore | 3 -
arch/s390/boot/compressed/vmlinux.lds.S | 3 +-
arch/s390/boot/head.S | 33 +-
arch/s390/boot/ipl_parm.c | 13 +-
arch/s390/boot/kaslr.c | 42 +-
arch/s390/boot/mem_detect.c | 7 -
arch/s390/boot/pgm_check_info.c | 90 +
arch/s390/boot/startup.c | 6 +
arch/s390/boot/version.c | 7 +
arch/s390/configs/debug_defconfig | 332 +-
arch/s390/configs/defconfig | 235 +-
arch/s390/configs/zfcpdump_defconfig | 31 +-
arch/s390/crypto/Makefile | 2 +
arch/s390/crypto/aes_s390.c | 22 +-
arch/s390/crypto/des_s390.c | 25 +-
arch/s390/crypto/ghash_s390.c | 2 +-
arch/s390/crypto/paes_s390.c | 184 +-
arch/s390/crypto/sha.h | 12 +-
arch/s390/crypto/sha256_s390.c | 8 +-
arch/s390/crypto/sha3_256_s390.c | 147 +
arch/s390/crypto/sha3_512_s390.c | 155 +
arch/s390/crypto/sha_common.c | 75 +-
arch/s390/hypfs/hypfs_vm.c | 4 +-
arch/s390/hypfs/inode.c | 139 +-
arch/s390/include/asm/bitops.h | 73 +-
arch/s390/include/asm/cpacf.h | 8 +
arch/s390/include/asm/cpu_mf.h | 10 +-
arch/s390/include/asm/gmap.h | 4 +-
arch/s390/include/asm/mem_detect.h | 12 +
arch/s390/include/asm/mem_encrypt.h | 5 +-
arch/s390/include/asm/page.h | 2 +
arch/s390/include/asm/perf_event.h | 2 +
arch/s390/include/asm/pgtable.h | 7 +-
arch/s390/include/asm/pkey.h | 114 +-
arch/s390/include/asm/processor.h | 2 -
arch/s390/include/asm/qdio.h | 16 +-
arch/s390/include/asm/setup.h | 6 +-
arch/s390/include/asm/string.h | 9 +-
arch/s390/include/asm/unistd.h | 1 +
arch/s390/include/uapi/asm/bpf_perf_event.h | 2 +-
arch/s390/include/uapi/asm/ipl.h | 2 +-
arch/s390/include/uapi/asm/kvm.h | 6 +
arch/s390/include/uapi/asm/pkey.h | 257 +-
arch/s390/include/uapi/asm/zcrypt.h | 39 +-
arch/s390/kernel/Makefile | 13 +-
arch/s390/kernel/base.S | 21 -
arch/s390/kernel/dumpstack.c | 6 +-
arch/s390/kernel/early.c | 16 +
arch/s390/kernel/early_nobss.c | 45 -
arch/s390/kernel/early_printk.c | 2 +-
arch/s390/kernel/head64.S | 15 +-
arch/s390/kernel/ipl.c | 9 -
arch/s390/kernel/kexec_elf.c | 4 +-
arch/s390/kernel/kexec_image.c | 4 +-
arch/s390/kernel/machine_kexec_file.c | 28 +-
arch/s390/kernel/machine_kexec_reloc.c | 1 +
arch/s390/kernel/module.c | 4 +-
arch/s390/kernel/perf_cpum_cf_diag.c | 2 +-
arch/s390/kernel/perf_cpum_sf.c | 181 +-
arch/s390/kernel/process.c | 26 +-
arch/s390/kernel/setup.c | 30 +-
arch/s390/kernel/stacktrace.c | 50 +-
arch/s390/kernel/syscalls/syscall.tbl | 2 +-
arch/s390/kernel/topology.c | 3 +-
arch/s390/kernel/vdso.c | 23 +-
arch/s390/kernel/vmlinux.lds.S | 10 +-
arch/s390/kvm/interrupt.c | 10 +
arch/s390/kvm/kvm-s390.c | 20 +-
arch/s390/lib/Makefile | 3 -
arch/s390/lib/xor.c | 1 +
arch/s390/mm/dump_pagetables.c | 12 +-
arch/s390/mm/extmem.c | 11 +-
arch/s390/mm/fault.c | 3 +
arch/s390/mm/gmap.c | 49 +-
arch/s390/mm/init.c | 7 +-
arch/s390/mm/kasan_init.c | 14 +-
arch/s390/mm/page-states.c | 14 +-
arch/s390/mm/pgalloc.c | 12 +-
arch/s390/net/bpf_jit_comp.c | 79 +-
arch/s390/numa/mode_emu.c | 7 +-
arch/s390/numa/numa.c | 2 +
arch/s390/pci/pci.c | 8 +-
arch/s390/pci/pci_dma.c | 6 +-
arch/s390/pci/pci_irq.c | 2 +-
arch/s390/purgatory/Makefile | 4 +-
arch/s390/purgatory/purgatory.c | 2 +-
arch/s390/scripts/Makefile.chkbss | 3 +-
arch/s390/tools/gen_facilities.c | 3 +
arch/sh/Kconfig | 1 -
arch/sh/boards/mach-ap325rxa/setup.c | 1 -
arch/sh/boards/mach-ecovec24/setup.c | 2 -
arch/sh/boards/mach-kfr2r09/setup.c | 1 -
arch/sh/boards/mach-migor/setup.c | 1 -
arch/sh/boards/mach-se/7724/setup.c | 2 -
arch/sh/include/asm/pgalloc.h | 46 +-
arch/sh/include/asm/pgtable.h | 5 -
arch/sh/include/uapi/asm/setup.h | 2 +-
arch/sh/include/uapi/asm/types.h | 2 +-
arch/sh/kernel/disassemble.c | 5 +-
arch/sh/kernel/hw_breakpoint.c | 1 +
arch/sh/mm/Kconfig | 3 -
arch/sh/mm/nommu.c | 4 -
arch/sparc/Kconfig | 1 +
arch/sparc/crypto/aes_glue.c | 8 +-
arch/sparc/crypto/des_glue.c | 37 +-
arch/sparc/include/asm/pci.h | 2 -
arch/sparc/include/asm/pgalloc_32.h | 2 -
arch/sparc/include/asm/pgalloc_64.h | 2 -
arch/sparc/include/asm/pgtable_32.h | 5 -
arch/sparc/include/asm/pgtable_64.h | 6 +-
arch/sparc/include/uapi/asm/oradax.h | 2 +-
arch/sparc/kernel/sys_sparc_64.c | 33 +-
arch/sparc/mm/init_32.c | 1 -
arch/sparc/mm/init_64.c | 4 +-
arch/sparc/mm/srmmu.c | 4 +-
arch/um/Kconfig | 1 +
arch/um/drivers/Kconfig | 7 +
arch/um/drivers/Makefile | 3 +-
arch/um/drivers/chan.h | 2 +-
arch/um/drivers/chan_kern.c | 2 +-
arch/um/drivers/chan_user.c | 2 +-
arch/um/drivers/chan_user.h | 2 +-
arch/um/drivers/cow_user.c | 2 +-
arch/um/drivers/daemon.h | 2 +-
arch/um/drivers/daemon_kern.c | 2 +-
arch/um/drivers/daemon_user.c | 2 +-
arch/um/drivers/fd.c | 2 +-
arch/um/drivers/harddog_user.c | 2 +-
arch/um/drivers/hostaudio_kern.c | 2 +-
arch/um/drivers/line.c | 2 +-
arch/um/drivers/line.h | 2 +-
arch/um/drivers/mconsole.h | 2 +-
arch/um/drivers/mconsole_kern.c | 2 +-
arch/um/drivers/mconsole_kern.h | 2 +-
arch/um/drivers/mconsole_user.c | 2 +-
arch/um/drivers/net_kern.c | 2 +-
arch/um/drivers/net_user.c | 2 +-
arch/um/drivers/null.c | 2 +-
arch/um/drivers/pcap_kern.c | 2 +-
arch/um/drivers/pcap_user.c | 2 +-
arch/um/drivers/pcap_user.h | 2 +-
arch/um/drivers/port.h | 2 +-
arch/um/drivers/port_kern.c | 2 +-
arch/um/drivers/port_user.c | 2 +-
arch/um/drivers/pty.c | 2 +-
arch/um/drivers/slip_kern.c | 2 +-
arch/um/drivers/slip_user.c | 2 +-
arch/um/drivers/slirp_kern.c | 2 +-
arch/um/drivers/slirp_user.c | 2 +-
arch/um/drivers/ssl.c | 2 +-
arch/um/drivers/stdio_console.c | 2 +-
arch/um/drivers/stdio_console.h | 2 +-
arch/um/drivers/tty.c | 2 +-
arch/um/drivers/ubd.h | 2 +-
arch/um/drivers/ubd_kern.c | 2 +-
arch/um/drivers/ubd_user.c | 2 +-
arch/um/drivers/umcast.h | 2 +-
arch/um/drivers/umcast_kern.c | 2 +-
arch/um/drivers/umcast_user.c | 2 +-
arch/um/drivers/vde.h | 2 +-
arch/um/drivers/vde_kern.c | 2 +-
arch/um/drivers/vde_user.c | 2 +-
arch/um/drivers/vector_kern.c | 44 +-
arch/um/drivers/vector_kern.h | 3 +-
arch/um/drivers/vector_transports.c | 42 +-
arch/um/drivers/vector_user.c | 293 +-
arch/um/drivers/vector_user.h | 9 +-
arch/um/drivers/vhost_user.h | 117 +
arch/um/drivers/virtio_uml.c | 1177 +
arch/um/drivers/xterm.c | 2 +-
arch/um/drivers/xterm.h | 2 +-
arch/um/drivers/xterm_kern.c | 2 +-
arch/um/include/asm/Kbuild | 1 -
arch/um/include/asm/common.lds.S | 2 +-
arch/um/include/asm/irq.h | 7 +-
arch/um/include/asm/irqflags.h | 1 -
arch/um/include/asm/kmap_types.h | 2 +-
arch/um/include/asm/mmu.h | 2 +-
arch/um/include/asm/mmu_context.h | 2 +-
arch/um/include/asm/page.h | 2 +-
arch/um/include/asm/pgalloc.h | 6 +-
arch/um/include/asm/pgtable-2level.h | 2 +-
arch/um/include/asm/pgtable-3level.h | 2 +-
arch/um/include/asm/pgtable.h | 4 +-
arch/um/include/asm/processor-generic.h | 2 +-
arch/um/include/asm/ptrace-generic.h | 2 +-
arch/um/include/asm/thread_info.h | 2 +-
arch/um/include/asm/tlbflush.h | 2 +-
arch/um/include/asm/uaccess.h | 2 +-
arch/um/include/shared/arch.h | 2 +-
arch/um/include/shared/as-layout.h | 2 +-
arch/um/include/shared/elf_user.h | 2 +-
arch/um/include/shared/frame_kern.h | 2 +-
arch/um/include/shared/irq_kern.h | 2 +-
arch/um/include/shared/irq_user.h | 2 +-
arch/um/include/shared/kern.h | 2 +-
arch/um/include/shared/kern_util.h | 2 +-
arch/um/include/shared/longjmp.h | 2 +-
arch/um/include/shared/mem.h | 2 +-
arch/um/include/shared/net_kern.h | 2 +-
arch/um/include/shared/net_user.h | 2 +-
arch/um/include/shared/os.h | 14 +-
arch/um/include/shared/ptrace_user.h | 2 +-
arch/um/include/shared/registers.h | 2 +-
arch/um/include/shared/sigio.h | 2 +-
arch/um/include/shared/skas/mm_id.h | 2 +-
arch/um/include/shared/skas/skas.h | 2 +-
arch/um/include/shared/skas/stub-data.h | 2 +-
arch/um/include/shared/timer-internal.h | 25 +-
arch/um/include/shared/um_malloc.h | 2 +-
arch/um/include/shared/user.h | 2 +-
arch/um/kernel/Makefile | 3 +-
arch/um/kernel/config.c.in | 4 +-
arch/um/kernel/dyn.lds.S | 3 +-
arch/um/kernel/exec.c | 2 +-
arch/um/kernel/exitcode.c | 2 +-
arch/um/kernel/gmon_syms.c | 2 +-
arch/um/kernel/gprof_syms.c | 2 +-
arch/um/kernel/initrd.c | 2 +-
arch/um/kernel/irq.c | 4 +-
arch/um/kernel/ksyms.c | 4 +-
arch/um/kernel/mem.c | 3 +-
arch/um/kernel/physmem.c | 3 +-
arch/um/kernel/process.c | 20 +-
arch/um/kernel/ptrace.c | 2 +-
arch/um/kernel/reboot.c | 2 +-
arch/um/kernel/sigio.c | 2 +-
arch/um/kernel/signal.c | 30 +-
arch/um/kernel/skas/Makefile | 2 +-
arch/um/kernel/skas/clone.c | 2 +-
arch/um/kernel/skas/mmu.c | 6 +-
arch/um/kernel/skas/process.c | 4 +-
arch/um/kernel/skas/syscall.c | 2 +-
arch/um/kernel/skas/uaccess.c | 2 +-
arch/um/kernel/syscall.c | 2 +-
arch/um/kernel/time.c | 29 +-
arch/um/kernel/tlb.c | 2 +-
arch/um/kernel/trap.c | 2 +-
arch/um/kernel/um_arch.c | 3 +-
arch/um/kernel/umid.c | 2 +-
arch/um/kernel/uml.lds.S | 2 +
arch/um/os-Linux/Makefile | 2 +-
arch/um/os-Linux/drivers/Makefile | 2 +-
arch/um/os-Linux/drivers/etap.h | 2 +-
arch/um/os-Linux/drivers/ethertap_kern.c | 2 +-
arch/um/os-Linux/drivers/ethertap_user.c | 2 +-
arch/um/os-Linux/drivers/tuntap.h | 2 +-
arch/um/os-Linux/drivers/tuntap_kern.c | 2 +-
arch/um/os-Linux/drivers/tuntap_user.c | 2 +-
arch/um/os-Linux/file.c | 46 +-
arch/um/os-Linux/helper.c | 2 +-
arch/um/os-Linux/irq.c | 2 +-
arch/um/os-Linux/main.c | 4 +-
arch/um/os-Linux/mem.c | 2 +-
arch/um/os-Linux/process.c | 2 +-
arch/um/os-Linux/registers.c | 2 +-
arch/um/os-Linux/sigio.c | 8 +-
arch/um/os-Linux/signal.c | 52 +-
arch/um/os-Linux/skas/Makefile | 2 +-
arch/um/os-Linux/skas/mem.c | 2 +-
arch/um/os-Linux/skas/process.c | 14 +-
arch/um/os-Linux/start_up.c | 2 +-
arch/um/os-Linux/time.c | 2 +-
arch/um/os-Linux/tty.c | 2 +-
arch/um/os-Linux/umid.c | 2 +-
arch/um/os-Linux/util.c | 2 +-
arch/unicore32/include/asm/pgalloc.h | 2 -
arch/unicore32/include/asm/pgtable.h | 4 -
arch/unicore32/include/asm/tlb.h | 2 +-
arch/unicore32/kernel/irq.c | 1 -
arch/x86/Kconfig | 34 +-
arch/x86/Kconfig.debug | 2 +-
arch/x86/Makefile | 1 +
arch/x86/boot/boot.h | 2 -
arch/x86/boot/compressed/acpi.c | 19 +-
arch/x86/boot/compressed/head_32.S | 4 +-
arch/x86/boot/compressed/head_64.S | 18 +-
arch/x86/boot/compressed/pgtable_64.c | 13 +-
arch/x86/boot/main.c | 1 +
arch/x86/boot/string.c | 8 +
arch/x86/crypto/Makefile | 21 -
arch/x86/crypto/aegis128l-aesni-asm.S | 823 -
arch/x86/crypto/aegis128l-aesni-glue.c | 293 -
arch/x86/crypto/aegis256-aesni-asm.S | 700 -
arch/x86/crypto/aegis256-aesni-glue.c | 293 -
arch/x86/crypto/aes-i586-asm_32.S | 362 -
arch/x86/crypto/aes-x86_64-asm_64.S | 185 -
arch/x86/crypto/aes_glue.c | 70 -
arch/x86/crypto/aesni-intel_glue.c | 46 +-
arch/x86/crypto/camellia_aesni_avx2_glue.c | 4 +-
arch/x86/crypto/camellia_aesni_avx_glue.c | 4 +-
arch/x86/crypto/cast6_avx_glue.c | 4 +-
arch/x86/crypto/des3_ede_glue.c | 38 +-
arch/x86/crypto/ghash-clmulni-intel_glue.c | 3 +-
arch/x86/crypto/glue_helper.c | 67 +-
arch/x86/crypto/morus1280-avx2-asm.S | 619 -
arch/x86/crypto/morus1280-avx2-glue.c | 62 -
arch/x86/crypto/morus1280-sse2-asm.S | 893 -
arch/x86/crypto/morus1280-sse2-glue.c | 61 -
arch/x86/crypto/morus1280_glue.c | 205 -
arch/x86/crypto/morus640-sse2-asm.S | 612 -
arch/x86/crypto/morus640-sse2-glue.c | 61 -
arch/x86/crypto/morus640_glue.c | 200 -
arch/x86/crypto/serpent_avx2_glue.c | 4 +-
arch/x86/crypto/serpent_avx_glue.c | 4 +-
arch/x86/crypto/sha256_ssse3_glue.c | 12 +-
arch/x86/crypto/twofish_avx_glue.c | 4 +-
arch/x86/entry/calling.h | 17 +
arch/x86/entry/common.c | 13 +-
arch/x86/entry/entry_32.S | 19 +-
arch/x86/entry/entry_64.S | 29 +-
arch/x86/entry/syscall_64.c | 25 +
arch/x86/entry/syscalls/syscall_32.tbl | 4 +-
arch/x86/entry/syscalls/syscalltbl.sh | 35 +-
arch/x86/entry/thunk_32.S | 2 +-
arch/x86/entry/thunk_64.S | 4 +-
arch/x86/entry/vdso/Makefile | 3 +-
arch/x86/entry/vdso/vma.c | 2 +-
arch/x86/events/amd/ibs.c | 13 +-
arch/x86/events/core.c | 38 +-
arch/x86/events/intel/core.c | 107 +-
arch/x86/events/intel/cstate.c | 44 +-
arch/x86/events/intel/ds.c | 53 +-
arch/x86/events/intel/lbr.c | 2 +-
arch/x86/events/intel/pt.c | 336 +-
arch/x86/events/intel/pt.h | 12 +-
arch/x86/events/intel/rapl.c | 30 +-
arch/x86/events/intel/uncore.c | 28 +-
arch/x86/events/msr.c | 28 +-
arch/x86/events/perf_event.h | 17 +
arch/x86/hyperv/hv_init.c | 16 +-
arch/x86/hyperv/mmu.c | 8 +-
arch/x86/include/asm/acpi.h | 9 +
arch/x86/include/asm/alternative.h | 14 +-
arch/x86/include/asm/apic.h | 11 +-
arch/x86/include/asm/apic_flat_64.h | 8 -
arch/x86/include/asm/barrier.h | 3 +-
arch/x86/include/asm/bitops.h | 7 +-
arch/x86/include/asm/bootparam_utils.h | 64 +-
arch/x86/include/asm/bug.h | 4 +-
arch/x86/include/asm/bugs.h | 2 +
arch/x86/include/asm/cpufeature.h | 7 +
arch/x86/include/asm/cpufeatures.h | 7 +-
arch/x86/include/asm/cpuidle_haltpoll.h | 8 +
arch/x86/include/asm/crypto/aes.h | 12 -
arch/x86/include/asm/crypto/glue_helper.h | 2 +-
arch/x86/include/asm/div64.h | 13 +
arch/x86/include/asm/efi.h | 5 +
arch/x86/include/asm/error-injection.h | 13 -
arch/x86/include/asm/fixmap.h | 5 +-
arch/x86/include/asm/ftrace.h | 1 -
arch/x86/include/asm/hw_irq.h | 4 +-
arch/x86/include/asm/hyperv-tlfs.h | 43 +-
arch/x86/include/asm/intel-family.h | 69 +-
arch/x86/include/asm/intel_pt.h | 2 +
arch/x86/include/asm/iommu.h | 1 -
arch/x86/include/asm/ipi.h | 109 -
arch/x86/include/asm/irq.h | 2 +-
arch/x86/include/asm/kvm_emulate.h | 3 +-
arch/x86/include/asm/kvm_host.h | 91 +-
arch/x86/include/asm/mem_encrypt.h | 10 +
arch/x86/include/asm/mmu_context.h | 8 +-
arch/x86/include/asm/mshyperv.h | 5 +-
arch/x86/include/asm/msr-index.h | 16 +-
arch/x86/include/asm/msr.h | 3 +-
arch/x86/include/asm/nospec-branch.h | 2 +-
arch/x86/include/asm/paravirt.h | 12 -
arch/x86/include/asm/paravirt_types.h | 5 -
arch/x86/include/asm/perf_event.h | 12 +-
arch/x86/include/asm/pgtable_32.h | 2 -
arch/x86/include/asm/pgtable_64.h | 3 -
arch/x86/include/asm/preempt.h | 2 +-
arch/x86/include/asm/qspinlock.h | 15 +
arch/x86/include/asm/realmode.h | 1 -
arch/x86/include/asm/set_memory.h | 8 -
arch/x86/include/asm/smp.h | 1 +
arch/x86/include/asm/special_insns.h | 24 -
arch/x86/include/asm/suspend_64.h | 2 +-
arch/x86/include/asm/svm.h | 1 +
arch/x86/include/asm/syscall.h | 4 +
arch/x86/include/asm/text-patching.h | 4 +-
arch/x86/include/asm/tlbflush.h | 30 +-
arch/x86/include/asm/uaccess.h | 4 +-
arch/x86/include/asm/unistd.h | 6 -
arch/x86/include/asm/uv/uv.h | 4 +-
arch/x86/include/asm/vdso/gettimeofday.h | 42 +-
arch/x86/include/asm/vmware.h | 53 +
arch/x86/include/asm/vmx.h | 16 +
arch/x86/include/asm/x86_init.h | 2 +
arch/x86/include/asm/xen/page-coherent.h | 14 -
arch/x86/include/uapi/asm/byteorder.h | 2 +-
arch/x86/include/uapi/asm/errno.h | 1 -
arch/x86/include/uapi/asm/fcntl.h | 1 -
arch/x86/include/uapi/asm/hwcap2.h | 2 +-
arch/x86/include/uapi/asm/ioctl.h | 1 -
arch/x86/include/uapi/asm/ioctls.h | 1 -
arch/x86/include/uapi/asm/ipcbuf.h | 1 -
arch/x86/include/uapi/asm/param.h | 1 -
arch/x86/include/uapi/asm/resource.h | 1 -
arch/x86/include/uapi/asm/sigcontext32.h | 2 +-
arch/x86/include/uapi/asm/svm.h | 1 +
arch/x86/include/uapi/asm/termbits.h | 1 -
arch/x86/include/uapi/asm/termios.h | 1 -
arch/x86/include/uapi/asm/types.h | 7 -
arch/x86/include/uapi/asm/unistd.h | 2 +-
arch/x86/include/uapi/asm/vmx.h | 8 +-
arch/x86/kernel/acpi/boot.c | 5 +
arch/x86/kernel/acpi/wakeup_64.S | 10 +-
arch/x86/kernel/alternative.c | 6 +-
arch/x86/kernel/amd_gart_64.c | 3 +
arch/x86/kernel/amd_nb.c | 3 +
arch/x86/kernel/apic/apic.c | 280 +-
arch/x86/kernel/apic/apic_flat_64.c | 66 +-
arch/x86/kernel/apic/apic_noop.c | 18 +-
arch/x86/kernel/apic/apic_numachip.c | 8 +-
arch/x86/kernel/apic/bigsmp_32.c | 33 +-
arch/x86/kernel/apic/io_apic.c | 8 +-
arch/x86/kernel/apic/ipi.c | 174 +-
arch/x86/kernel/apic/local.h | 68 +
arch/x86/kernel/apic/probe_32.c | 44 +-
arch/x86/kernel/apic/probe_64.c | 21 +-
arch/x86/kernel/apic/vector.c | 11 +
arch/x86/kernel/apic/x2apic.h | 9 -
arch/x86/kernel/apic/x2apic_cluster.c | 20 +-
arch/x86/kernel/apic/x2apic_phys.c | 23 +-
arch/x86/kernel/apic/x2apic_uv_x.c | 30 +-
arch/x86/kernel/asm-offsets_64.c | 21 +-
arch/x86/kernel/cpu/amd.c | 92 +-
arch/x86/kernel/cpu/bugs.c | 127 +-
arch/x86/kernel/cpu/common.c | 56 +-
arch/x86/kernel/cpu/cpuid-deps.c | 97 +-
arch/x86/kernel/cpu/hygon.c | 21 +-
arch/x86/kernel/cpu/intel.c | 31 +-
arch/x86/kernel/cpu/mce/intel.c | 2 +-
arch/x86/kernel/cpu/mce/severity.c | 4 +-
arch/x86/kernel/cpu/mshyperv.c | 10 +
arch/x86/kernel/cpu/mtrr/cyrix.c | 1 +
arch/x86/kernel/cpu/umwait.c | 45 +-
arch/x86/kernel/cpu/vmware.c | 94 +-
arch/x86/kernel/crash.c | 2 -
arch/x86/kernel/crash_dump_64.c | 5 +
arch/x86/kernel/dumpstack.c | 7 +-
arch/x86/kernel/early-quirks.c | 1 +
arch/x86/kernel/head_64.S | 8 +-
arch/x86/kernel/hpet.c | 12 +-
arch/x86/kernel/ima_arch.c | 4 +-
arch/x86/kernel/ioport.c | 7 +-
arch/x86/kernel/irq.c | 10 +-
arch/x86/kernel/irq_32.c | 7 +-
arch/x86/kernel/irq_64.c | 9 -
arch/x86/kernel/kexec-bzimage64.c | 1 +
arch/x86/kernel/kgdb.c | 2 +-
arch/x86/kernel/kprobes/core.c | 2 +-
arch/x86/kernel/kprobes/opt.c | 2 +-
arch/x86/kernel/kvm.c | 59 +-
arch/x86/kernel/machine_kexec_32.c | 4 +-
arch/x86/kernel/msr.c | 8 +
arch/x86/kernel/nmi.c | 3 +
arch/x86/kernel/paravirt.c | 4 -
arch/x86/kernel/pci-calgary_64.c | 2 +
arch/x86/kernel/pci-dma.c | 20 +-
arch/x86/kernel/pci-swiotlb.c | 1 -
arch/x86/kernel/process.c | 2 +-
arch/x86/kernel/ptrace.c | 1 +
arch/x86/kernel/quirks.c | 4 -
arch/x86/kernel/reboot.c | 7 +-
arch/x86/kernel/setup.c | 2 +-
arch/x86/kernel/smp.c | 88 +-
arch/x86/kernel/smpboot.c | 12 +-
arch/x86/kernel/stacktrace.c | 2 +-
arch/x86/kernel/sysfb_efi.c | 46 +
arch/x86/kernel/tsc.c | 2 +-
arch/x86/kernel/tsc_msr.c | 5 +
arch/x86/kernel/umip.c | 65 +-
arch/x86/kernel/uprobes.c | 17 +-
arch/x86/kernel/x86_init.c | 1 +
arch/x86/kvm/cpuid.c | 35 +-
arch/x86/kvm/debugfs.c | 46 +-
arch/x86/kvm/emulate.c | 27 +-
arch/x86/kvm/hyperv.c | 21 +-
arch/x86/kvm/lapic.c | 67 +-
arch/x86/kvm/lapic.h | 1 -
arch/x86/kvm/mmu.c | 252 +-
arch/x86/kvm/mmu.h | 2 +-
arch/x86/kvm/mmutrace.h | 42 +-
arch/x86/kvm/svm.c | 271 +-
arch/x86/kvm/trace.h | 74 +-
arch/x86/kvm/vmx/capabilities.h | 6 +
arch/x86/kvm/vmx/evmcs.h | 2 +
arch/x86/kvm/vmx/nested.c | 383 +-
arch/x86/kvm/vmx/ops.h | 93 +-
arch/x86/kvm/vmx/vmenter.S | 4 +-
arch/x86/kvm/vmx/vmx.c | 394 +-
arch/x86/kvm/vmx/vmx.h | 11 +-
arch/x86/kvm/x86.c | 434 +-
arch/x86/kvm/x86.h | 4 +-
arch/x86/lib/copy_user_64.S | 14 +-
arch/x86/lib/cpu.c | 1 +
arch/x86/lib/getuser.S | 16 +-
arch/x86/lib/putuser.S | 22 +-
arch/x86/math-emu/errors.c | 5 +-
arch/x86/math-emu/fpu_trig.c | 2 +-
arch/x86/mm/fault.c | 15 +-
arch/x86/mm/init_32.c | 2 +-
arch/x86/mm/ioremap.c | 1 +
arch/x86/mm/mem_encrypt.c | 2 -
arch/x86/mm/numa.c | 4 +-
arch/x86/mm/pageattr.c | 136 +-
arch/x86/mm/pat_rbtree.c | 19 +-
arch/x86/mm/pgtable.c | 8 +-
arch/x86/mm/pti.c | 8 +-
arch/x86/mm/testmmiotrace.c | 5 +
arch/x86/mm/tlb.c | 2 +-
arch/x86/net/bpf_jit_comp.c | 9 +-
arch/x86/pci/mmconfig-shared.c | 5 +-
arch/x86/pci/sta2x11-fixup.c | 4 +-
arch/x86/platform/efi/efi.c | 39 +-
arch/x86/platform/intel/iosf_mbi.c | 100 +-
arch/x86/platform/olpc/olpc-xo1-sci.c | 17 +-
arch/x86/platform/uv/bios_uv.c | 10 +-
arch/x86/platform/uv/tlb_uv.c | 4 +-
arch/x86/power/cpu.c | 90 +-
arch/x86/purgatory/Makefile | 42 +-
arch/x86/purgatory/purgatory.c | 8 +-
arch/x86/purgatory/string.c | 23 -
arch/x86/realmode/rm/header.S | 1 -
arch/x86/realmode/rm/trampoline_32.S | 3 -
arch/x86/realmode/rm/trampoline_64.S | 3 -
arch/x86/realmode/rm/trampoline_common.S | 4 -
arch/x86/um/asm/barrier.h | 12 +-
arch/x86/um/vdso/um_vdso.c | 2 +-
arch/x86/xen/enlighten_pv.c | 15 -
arch/x86/xen/mmu_pv.c | 2 -
arch/xtensa/Kconfig | 49 +-
arch/xtensa/boot/dts/virt.dts | 8 +-
arch/xtensa/include/asm/io.h | 1 +
arch/xtensa/include/asm/pgalloc.h | 4 +-
arch/xtensa/include/asm/pgtable.h | 1 -
arch/xtensa/include/asm/processor.h | 11 +-
arch/xtensa/include/asm/regs.h | 1 +
arch/xtensa/include/asm/tlbflush.h | 3 -
arch/xtensa/include/uapi/asm/mman.h | 3 +
arch/xtensa/kernel/coprocessor.S | 1 +
arch/xtensa/kernel/entry.S | 42 +-
arch/xtensa/kernel/head.S | 2 +-
arch/xtensa/kernel/pci-dma.c | 4 +-
arch/xtensa/kernel/setup.c | 10 +-
arch/xtensa/kernel/signal.c | 26 +-
arch/xtensa/kernel/stacktrace.c | 5 +
arch/xtensa/kernel/traps.c | 4 +
arch/xtensa/mm/init.c | 10 -
block/Kconfig | 13 +
block/Makefile | 1 +
block/bfq-cgroup.c | 156 +-
block/bfq-iosched.c | 170 +-
block/bfq-iosched.h | 3 +
block/bfq-wf2q.c | 2 +
block/bio.c | 60 +-
block/blk-cgroup.c | 82 +-
block/blk-core.c | 44 +-
block/blk-flush.c | 10 +
block/blk-integrity.c | 11 +
block/blk-iocost.c | 2465 +
block/blk-iolatency.c | 11 +-
block/blk-merge.c | 151 +-
block/blk-mq-cpumap.c | 29 +-
block/blk-mq-sched.c | 2 -
block/blk-mq-sched.h | 9 -
block/blk-mq-sysfs.c | 23 +-
block/blk-mq-tag.c | 32 +
block/blk-mq.c | 89 +-
block/blk-pm.c | 12 +-
block/blk-rq-qos.c | 25 +-
block/blk-rq-qos.h | 28 +-
block/blk-settings.c | 44 +-
block/blk-sysfs.c | 43 +-
block/blk-throttle.c | 9 +-
block/blk-wbt.c | 20 +-
block/blk-wbt.h | 4 -
block/blk-zoned.c | 39 +
block/blk.h | 13 +-
block/bsg-lib.c | 10 +-
block/elevator.c | 186 +-
block/genhd.c | 11 +-
block/mq-deadline.c | 20 +-
block/opal_proto.h | 5 +-
block/sed-opal.c | 49 +-
block/t10-pi.c | 169 +-
certs/system_keyring.c | 61 +-
crypto/Kconfig | 192 +-
crypto/Makefile | 27 +-
crypto/aead.c | 3 +-
crypto/aegis.h | 39 +-
crypto/aegis128-core.c | 502 +
crypto/aegis128-neon-inner.c | 212 +
crypto/aegis128-neon.c | 49 +
crypto/aegis128.c | 458 -
crypto/aegis128l.c | 522 -
crypto/aegis256.c | 473 -
crypto/aes_generic.c | 169 +-
crypto/aes_ti.c | 313 +-
crypto/asymmetric_keys/pkcs7_verify.c | 33 +
crypto/asymmetric_keys/verify_pefile.c | 4 +-
crypto/cryptd.c | 44 +-
crypto/crypto_engine.c | 2 +-
crypto/crypto_user_base.c | 37 +-
crypto/crypto_user_stat.c | 4 +-
crypto/des_generic.c | 945 +-
crypto/essiv.c | 663 +
crypto/fips.c | 11 +
crypto/gcm.c | 47 +-
crypto/ghash-generic.c | 31 +-
crypto/morus1280.c | 542 -
crypto/morus640.c | 533 -
crypto/pcrypt.c | 167 +-
crypto/sha256_generic.c | 224 +-
crypto/skcipher.c | 42 +-
crypto/streebog_generic.c | 46 -
crypto/tcrypt.c | 16 +
crypto/testmgr.c | 52 +-
crypto/testmgr.h | 5284 +-
crypto/xts.c | 152 +-
drivers/Kconfig | 6 +-
drivers/Makefile | 3 +-
drivers/acpi/Kconfig | 2 +-
drivers/acpi/acpi_apd.c | 7 +
drivers/acpi/acpi_lpss.c | 8 +-
drivers/acpi/acpi_processor.c | 10 +-
drivers/acpi/acpica/aclocal.h | 4 +-
drivers/acpi/acpica/acobject.h | 2 +-
drivers/acpi/acpica/acstruct.h | 2 +-
drivers/acpi/acpica/acutils.h | 10 +-
drivers/acpi/acpica/dbhistry.c | 2 +-
drivers/acpi/acpica/dbinput.c | 10 +-
drivers/acpi/acpica/dbmethod.c | 4 +
drivers/acpi/acpica/dbobject.c | 1 -
drivers/acpi/acpica/dbstats.c | 92 +-
drivers/acpi/acpica/evxfgpe.c | 6 +-
drivers/acpi/acpica/exdump.c | 6 +-
drivers/acpi/acpica/nsaccess.c | 2 +-
drivers/acpi/acpica/nsalloc.c | 2 +-
drivers/acpi/acpica/nsdump.c | 2 +-
drivers/acpi/acpica/nsrepair2.c | 2 +-
drivers/acpi/acpica/tbdata.c | 1 +
drivers/acpi/acpica/utdebug.c | 4 +-
drivers/acpi/acpica/uterror.c | 6 +-
drivers/acpi/acpica/utosi.c | 3 +-
drivers/acpi/acpica/utownerid.c | 12 +-
drivers/acpi/apei/ghes.c | 19 +-
drivers/acpi/arm64/iort.c | 10 +-
drivers/acpi/cppc_acpi.c | 6 +-
drivers/acpi/custom_method.c | 11 +-
drivers/acpi/device_pm.c | 11 +-
drivers/acpi/ec.c | 57 +-
drivers/acpi/hmat/hmat.c | 143 +-
drivers/acpi/internal.h | 6 +-
drivers/acpi/nfit/core.c | 28 +-
drivers/acpi/nfit/intel.c | 59 +-
drivers/acpi/nfit/nfit.h | 24 +
drivers/acpi/osl.c | 20 +-
drivers/acpi/pci_irq.c | 4 +-
drivers/acpi/pci_link.c | 4 +-
drivers/acpi/pci_root.c | 1 -
drivers/acpi/pptt.c | 53 +-
drivers/acpi/processor_driver.c | 39 +-
drivers/acpi/processor_perflib.c | 100 +-
drivers/acpi/processor_thermal.c | 84 +-
drivers/acpi/property.c | 8 +-
drivers/acpi/sbshc.h | 2 -
drivers/acpi/scan.c | 6 +
drivers/acpi/sleep.c | 165 +-
drivers/acpi/tables.c | 6 +
drivers/acpi/thermal.c | 11 +-
drivers/acpi/x86/utils.c | 4 +-
drivers/amba/bus.c | 14 +
drivers/amba/tegra-ahb.c | 11 +-
drivers/android/binder.c | 105 +-
drivers/android/binder_internal.h | 86 +
drivers/android/binderfs.c | 290 +-
drivers/ata/acard-ahci.c | 38 +-
drivers/ata/ahci.c | 149 +-
drivers/ata/ahci.h | 2 +
drivers/ata/libahci.c | 1 -
drivers/ata/libahci_platform.c | 13 +-
drivers/ata/libata-scsi.c | 21 +
drivers/ata/libata-sff.c | 14 +-
drivers/ata/libata-zpodd.c | 2 +-
drivers/ata/pata_atp867x.c | 7 +-
drivers/ata/pata_buddha.c | 228 +-
drivers/ata/pata_cs5520.c | 6 +-
drivers/ata/pata_hpt3x3.c | 5 +-
drivers/ata/pata_ninja32.c | 5 +-
drivers/ata/pata_pdc2027x.c | 6 +-
drivers/ata/pata_rb532_cf.c | 1 -
drivers/ata/pata_sil680.c | 5 +-
drivers/ata/pdc_adma.c | 23 +-
drivers/ata/sata_inic162x.c | 8 +-
drivers/ata/sata_mv.c | 38 +-
drivers/ata/sata_nv.c | 10 +-
drivers/ata/sata_promise.c | 5 +-
drivers/ata/sata_qstor.c | 34 +-
drivers/ata/sata_sil.c | 5 +-
drivers/ata/sata_sil24.c | 26 +-
drivers/ata/sata_svw.c | 5 +-
drivers/ata/sata_sx4.c | 5 +-
drivers/ata/sata_via.c | 9 +-
drivers/ata/sata_vsc.c | 5 +-
drivers/atm/Kconfig | 2 +-
drivers/atm/eni.c | 2 +-
drivers/atm/he.c | 9 +-
drivers/atm/iphase.c | 8 +-
drivers/atm/solos-pci.c | 9 +-
drivers/auxdisplay/Kconfig | 7 +-
drivers/auxdisplay/charlcd.c | 2 +-
drivers/auxdisplay/charlcd.h | 44 +
drivers/auxdisplay/hd44780.c | 3 +-
drivers/auxdisplay/ht16k33.c | 4 +-
drivers/auxdisplay/panel.c | 4 +-
drivers/base/Kconfig | 2 +-
drivers/base/arch_topology.c | 300 +-
drivers/base/base.h | 1 +
drivers/base/bus.c | 24 -
drivers/base/core.c | 314 +-
drivers/base/dd.c | 14 +
drivers/base/devcon.c | 51 +-
drivers/base/devcoredump.c | 13 +-
drivers/base/devtmpfs.c | 38 +-
drivers/base/firmware_loader/firmware.h | 4 +-
drivers/base/memory.c | 44 +-
drivers/base/node.c | 55 +-
drivers/base/platform.c | 125 +-
drivers/base/power/Makefile | 2 +-
drivers/base/power/domain.c | 25 +-
drivers/base/power/main.c | 35 +-
drivers/base/power/power.h | 18 +
drivers/base/power/runtime.c | 19 +-
drivers/base/power/sysfs.c | 6 +
drivers/base/power/wakeup.c | 72 +-
drivers/base/power/wakeup_stats.c | 214 +
drivers/base/regmap/Kconfig | 2 +-
drivers/base/regmap/regmap-debugfs.c | 12 -
drivers/base/regmap/regmap-irq.c | 7 +-
drivers/base/soc.c | 9 +
drivers/base/swnode.c | 39 +-
drivers/bcma/driver_mips.c | 16 -
drivers/bcma/driver_pci.c | 4 +-
drivers/bcma/host_pci.c | 6 +-
drivers/bcma/sprom.c | 10 +-
drivers/block/aoe/aoedev.c | 13 +-
drivers/block/ataflop.c | 1 +
drivers/block/drbd/drbd_interval.c | 29 +-
drivers/block/drbd/drbd_main.c | 2 +
drivers/block/drbd/drbd_receiver.c | 14 +-
drivers/block/floppy.c | 4 +-
drivers/block/loop.c | 19 +-
drivers/block/nbd.c | 237 +-
drivers/block/null_blk.h | 18 +-
drivers/block/null_blk_main.c | 183 +-
drivers/block/null_blk_zoned.c | 59 +-
drivers/block/paride/pcd.c | 12 +-
drivers/block/paride/pf.c | 2 +-
drivers/block/pktcdvd.c | 1 -
drivers/block/rbd.c | 29 +-
drivers/block/xen-blkback/xenbus.c | 6 +-
drivers/bluetooth/bpa10x.c | 2 +-
drivers/bluetooth/btbcm.c | 3 +
drivers/bluetooth/btqca.c | 30 +-
drivers/bluetooth/btqca.h | 7 +
drivers/bluetooth/btrtl.c | 125 +-
drivers/bluetooth/btusb.c | 75 +-
drivers/bluetooth/hci_ath.c | 3 +
drivers/bluetooth/hci_bcm.c | 36 +-
drivers/bluetooth/hci_intel.c | 3 +
drivers/bluetooth/hci_ldisc.c | 13 +
drivers/bluetooth/hci_mrvl.c | 3 +
drivers/bluetooth/hci_qca.c | 50 +-
drivers/bluetooth/hci_uart.h | 1 +
drivers/bus/Kconfig | 10 +
drivers/bus/Makefile | 1 +
drivers/bus/fsl-mc/fsl-mc-allocator.c | 1 -
drivers/bus/fsl-mc/mc-io.c | 1 -
drivers/bus/hisi_lpc.c | 47 +-
drivers/bus/imx-weim.c | 34 +-
drivers/bus/moxtet.c | 885 +
drivers/bus/sunxi-rsb.c | 4 +-
drivers/bus/ti-sysc.c | 177 +-
drivers/bus/uniphier-system-bus.c | 4 +-
drivers/char/Kconfig | 31 +-
drivers/char/Makefile | 2 -
drivers/char/agp/Kconfig | 11 +-
drivers/char/agp/Makefile | 1 -
drivers/char/agp/sgi-agp.c | 338 -
drivers/char/hpet.c | 3 +-
drivers/char/hw_random/atmel-rng.c | 3 +-
drivers/char/hw_random/cavium-rng-vf.c | 11 +-
drivers/char/hw_random/core.c | 7 +-
drivers/char/hw_random/exynos-trng.c | 3 +-
drivers/char/hw_random/imx-rngc.c | 4 +-
drivers/char/hw_random/mxc-rnga.c | 4 +-
drivers/char/hw_random/n2-drv.c | 4 +-
drivers/char/hw_random/nomadik-rng.c | 3 +-
drivers/char/hw_random/omap-rng.c | 3 +-
drivers/char/hw_random/powernv-rng.c | 10 +-
drivers/char/hw_random/st-rng.c | 4 +-
drivers/char/hw_random/timeriomem-rng.c | 4 +-
drivers/char/hw_random/xgene-rng.c | 4 +-
drivers/char/ipmi/ipmb_dev_int.c | 2 +-
drivers/char/ipmi/ipmi_dmi.c | 1 -
drivers/char/ipmi/ipmi_dmi.h | 1 +
drivers/char/ipmi/ipmi_msghandler.c | 121 +-
drivers/char/ipmi/ipmi_si.h | 57 +-
drivers/char/ipmi/ipmi_si_intf.c | 98 +-
drivers/char/ipmi/ipmi_si_mem_io.c | 2 +-
drivers/char/ipmi/ipmi_si_pci.c | 2 +-
drivers/char/ipmi/ipmi_si_platform.c | 2 +-
drivers/char/ipmi/ipmi_si_port_io.c | 2 +-
drivers/char/ipmi/ipmi_si_sm.h | 54 +-
drivers/char/ipmi/ipmi_ssif.c | 79 +-
drivers/char/mbcs.c | 831 -
drivers/char/mbcs.h | 553 -
drivers/char/mem.c | 28 +-
drivers/char/mspec.c | 155 +-
drivers/char/ppdev.c | 2 +-
drivers/char/random.c | 80 +-
drivers/char/snsc.c | 469 -
drivers/char/snsc.h | 92 -
drivers/char/snsc_event.c | 303 -
drivers/char/toshiba.c | 8 +-
drivers/char/tpm/Kconfig | 5 +
drivers/char/tpm/Makefile | 1 +
drivers/char/tpm/tpm-chip.c | 50 +-
drivers/char/tpm/tpm-interface.c | 23 +-
drivers/char/tpm/tpm-sysfs.c | 7 -
drivers/char/tpm/tpm.h | 2 +
drivers/char/tpm/tpm1-cmd.c | 36 +-
drivers/char/tpm/tpm2-cmd.c | 6 +-
drivers/char/tpm/tpm_ftpm_tee.c | 350 +
drivers/char/tpm/tpm_ftpm_tee.h | 40 +
drivers/char/tpm/tpm_tis_core.c | 3 +
drivers/char/xillybus/xillybus_pcie.c | 1 -
drivers/clk/Kconfig | 9 -
drivers/clk/Makefile | 1 +
drivers/clk/actions/owl-common.c | 5 +-
drivers/clk/actions/owl-factor.c | 7 +-
drivers/clk/at91/clk-generated.c | 2 +
drivers/clk/at91/clk-main.c | 12 +-
drivers/clk/at91/sama5d2.c | 2 +-
drivers/clk/bcm/clk-bcm2835.c | 138 +-
drivers/clk/bcm/clk-bcm63xx-gate.c | 4 +-
drivers/clk/clk-aspeed.c | 78 +-
drivers/clk/clk-aspeed.h | 82 +
drivers/clk/clk-ast2600.c | 704 +
drivers/clk/clk-bulk.c | 5 +-
drivers/clk/clk-cdce925.c | 34 +
drivers/clk/clk-composite.c | 1 -
drivers/clk/clk-lochnagar.c | 2 +-
drivers/clk/clk-milbeaut.c | 2 +-
drivers/clk/clk-qoriq.c | 2 +-
drivers/clk/clk-scmi.c | 2 +-
drivers/clk/clk-si5341.c | 1 -
drivers/clk/clk.c | 224 +-
drivers/clk/davinci/pll.c | 5 +-
drivers/clk/imx/Kconfig | 6 +
drivers/clk/imx/Makefile | 1 +
drivers/clk/imx/clk-imx7ulp.c | 31 +
drivers/clk/imx/clk-imx8mm.c | 141 +-
drivers/clk/imx/clk-imx8mn.c | 648 +
drivers/clk/imx/clk-imx8mq.c | 131 +-
drivers/clk/imx/clk-imx8qxp-lpcg.c | 5 +
drivers/clk/imx/clk-pll14xx.c | 27 +-
drivers/clk/imx/clk.c | 8 +
drivers/clk/imx/clk.h | 43 +-
drivers/clk/ingenic/Kconfig | 10 +-
drivers/clk/ingenic/Makefile | 1 +
drivers/clk/ingenic/jz4725b-cgu.c | 2 +-
drivers/clk/ingenic/jz4740-cgu.c | 17 +-
drivers/clk/ingenic/jz4770-cgu.c | 2 +-
drivers/clk/ingenic/jz4780-cgu.c | 2 +-
drivers/clk/ingenic/tcu.c | 474 +
drivers/clk/mediatek/Kconfig | 56 +
drivers/clk/mediatek/Makefile | 9 +
drivers/clk/mediatek/clk-gate.c | 5 +-
drivers/clk/mediatek/clk-gate.h | 3 +-
drivers/clk/mediatek/clk-mt6779-aud.c | 117 +
drivers/clk/mediatek/clk-mt6779-cam.c | 66 +
drivers/clk/mediatek/clk-mt6779-img.c | 58 +
drivers/clk/mediatek/clk-mt6779-ipe.c | 60 +
drivers/clk/mediatek/clk-mt6779-mfg.c | 55 +
drivers/clk/mediatek/clk-mt6779-mm.c | 113 +
drivers/clk/mediatek/clk-mt6779-vdec.c | 67 +
drivers/clk/mediatek/clk-mt6779-venc.c | 58 +
drivers/clk/mediatek/clk-mt6779.c | 1315 +
drivers/clk/mediatek/clk-mt8183-mfgcfg.c | 7 +-
drivers/clk/mediatek/clk-mt8183.c | 90 +-
drivers/clk/mediatek/clk-mtk.c | 16 +-
drivers/clk/mediatek/clk-mtk.h | 8 +
drivers/clk/mediatek/reset.c | 56 +-
drivers/clk/meson/Kconfig | 11 +-
drivers/clk/meson/Makefile | 2 +-
drivers/clk/meson/axg-aoclk.c | 63 +-
drivers/clk/meson/axg-audio.c | 351 +-
drivers/clk/meson/axg-audio.h | 1 +
drivers/clk/meson/axg.c | 207 +-
drivers/clk/meson/clk-cpu-dyndiv.c | 73 +
drivers/clk/meson/clk-cpu-dyndiv.h | 20 +
drivers/clk/meson/clk-input.c | 49 -
drivers/clk/meson/clk-input.h | 19 -
drivers/clk/meson/clk-regmap.h | 12 +-
drivers/clk/meson/g12a-aoclk.c | 81 +-
drivers/clk/meson/g12a.c | 2232 +-
drivers/clk/meson/g12a.h | 25 +-
drivers/clk/meson/gxbb-aoclk.c | 55 +-
drivers/clk/meson/gxbb.c | 657 +-
drivers/clk/meson/meson-aoclk.c | 37 -
drivers/clk/meson/meson-aoclk.h | 8 -
drivers/clk/meson/meson-eeclk.c | 10 -
drivers/clk/meson/meson-eeclk.h | 2 -
drivers/clk/meson/meson8b.c | 710 +-
drivers/clk/mvebu/Kconfig | 8 +
drivers/clk/mvebu/Makefile | 2 +
drivers/clk/mvebu/ap-cpu-clk.c | 356 +
drivers/clk/mvebu/ap806-system-controller.c | 178 +-
drivers/clk/mvebu/armada_ap_cp_helper.c | 30 +
drivers/clk/mvebu/armada_ap_cp_helper.h | 11 +
drivers/clk/mvebu/cp110-system-controller.c | 32 +-
drivers/clk/qcom/Kconfig | 9 +-
drivers/clk/qcom/Makefile | 1 +
drivers/clk/qcom/clk-alpha-pll.c | 236 +-
drivers/clk/qcom/clk-alpha-pll.h | 7 +
drivers/clk/qcom/clk-rcg2.c | 10 +-
drivers/clk/qcom/clk-rpmh.c | 58 +-
drivers/clk/qcom/common.c | 20 +
drivers/clk/qcom/common.h | 2 +
drivers/clk/qcom/gcc-ipq8074.c | 2 +-
drivers/clk/qcom/gcc-msm8998.c | 4 +-
drivers/clk/qcom/gcc-qcs404.c | 34 +-
drivers/clk/qcom/gcc-sdm660.c | 2 +-
drivers/clk/qcom/gcc-sdm845.c | 4 +-
drivers/clk/qcom/gcc-sm8150.c | 3588 ++
drivers/clk/qcom/lpasscc-sdm845.c | 23 +-
drivers/clk/qcom/turingcc-qcs404.c | 2 +-
drivers/clk/renesas/clk-mstp.c | 3 +-
drivers/clk/renesas/r9a06g032-clocks.c | 3 +-
drivers/clk/renesas/rcar-usb2-clock-sel.c | 4 +-
drivers/clk/renesas/renesas-cpg-mssr.c | 19 +-
drivers/clk/rockchip/Makefile | 1 +
drivers/clk/rockchip/clk-rk3308.c | 955 +
drivers/clk/rockchip/clk-rv1108.c | 1 -
drivers/clk/rockchip/clk.h | 13 +
drivers/clk/samsung/clk-exynos5-subcmu.c | 16 +-
drivers/clk/samsung/clk-exynos5-subcmu.h | 2 +-
drivers/clk/samsung/clk-exynos5250.c | 7 +-
drivers/clk/samsung/clk-exynos5420.c | 162 +-
drivers/clk/sirf/clk-common.c | 12 +-
drivers/clk/socfpga/clk-gate.c | 24 +-
drivers/clk/socfpga/clk-periph-a10.c | 7 +-
drivers/clk/socfpga/clk-periph-s10.c | 2 +-
drivers/clk/spear/spear1340_clock.c | 2 +-
drivers/clk/sprd/Kconfig | 1 +
drivers/clk/sprd/common.c | 5 +-
drivers/clk/sprd/pll.c | 2 +
drivers/clk/st/clk-flexgen.c | 1 +
drivers/clk/st/clkgen-fsyn.c | 1 -
drivers/clk/st/clkgen-pll.c | 13 -
drivers/clk/sunxi-ng/ccu-sun50i-h6.c | 8 +-
drivers/clk/sunxi-ng/ccu-sun8i-v3s.c | 250 +-
drivers/clk/sunxi-ng/ccu-sun8i-v3s.h | 6 +-
drivers/clk/sunxi-ng/ccu_common.c | 5 +-
drivers/clk/ti/apll.c | 9 +-
drivers/clk/ti/clk-54xx.c | 34 +
drivers/clk/ti/clk-814x.c | 1 +
drivers/clk/ti/dpll.c | 13 +-
drivers/clk/versatile/clk-versatile.c | 1 +
drivers/clk/zte/clk-zx296718.c | 109 +-
drivers/clocksource/Kconfig | 13 +-
drivers/clocksource/Makefile | 1 +
drivers/clocksource/em_sti.c | 4 +-
drivers/clocksource/hyperv_timer.c | 45 +-
drivers/clocksource/ingenic-timer.c | 356 +
drivers/clocksource/renesas-ostm.c | 2 +-
drivers/clocksource/sh_cmt.c | 19 +-
drivers/clocksource/sh_tmu.c | 5 +-
drivers/clocksource/timer-atmel-tcb.c | 18 +
drivers/clocksource/timer-imx-sysctr.c | 5 +
drivers/clocksource/timer-npcm7xx.c | 9 +-
drivers/clocksource/timer-of.c | 6 +-
drivers/clocksource/timer-probe.c | 4 +-
drivers/clocksource/timer-riscv.c | 23 +-
drivers/clocksource/timer-sun4i.c | 4 +
drivers/connector/connector.c | 6 +-
drivers/counter/ftm-quaddec.c | 30 +-
drivers/cpufreq/Kconfig.arm | 16 +-
drivers/cpufreq/Makefile | 3 +-
drivers/cpufreq/armada-8k-cpufreq.c | 2 +
drivers/cpufreq/cpufreq-dt-platdev.c | 5 +
drivers/cpufreq/cpufreq.c | 59 +-
drivers/cpufreq/imx-cpufreq-dt.c | 8 +-
drivers/cpufreq/intel_pstate.c | 146 +-
drivers/cpufreq/mediatek-cpufreq.c | 4 +-
drivers/cpufreq/pasemi-cpufreq.c | 23 +-
drivers/cpufreq/ppc_cbe_cpufreq.c | 19 +-
drivers/cpufreq/ppc_cbe_cpufreq.h | 8 +
drivers/cpufreq/ppc_cbe_cpufreq_pmi.c | 96 +-
drivers/cpufreq/qcom-cpufreq-hw.c | 23 +-
drivers/cpufreq/qcom-cpufreq-kryo.c | 249 -
drivers/cpufreq/qcom-cpufreq-nvmem.c | 352 +
drivers/cpufreq/sun50i-cpufreq-nvmem.c | 226 +
drivers/cpufreq/ti-cpufreq.c | 1 +
drivers/cpuidle/Kconfig | 20 +
drivers/cpuidle/Kconfig.arm | 10 +
drivers/cpuidle/Makefile | 2 +
drivers/cpuidle/cpuidle-arm.c | 13 +-
drivers/cpuidle/cpuidle-haltpoll.c | 134 +
drivers/cpuidle/cpuidle-psci.c | 236 +
drivers/cpuidle/cpuidle.c | 30 +
drivers/cpuidle/cpuidle.h | 2 +
drivers/cpuidle/driver.c | 25 +
drivers/cpuidle/governor.c | 7 +-
drivers/cpuidle/governors/Makefile | 1 +
drivers/cpuidle/governors/haltpoll.c | 150 +
drivers/cpuidle/governors/ladder.c | 21 +-
drivers/cpuidle/governors/menu.c | 21 +-
drivers/cpuidle/governors/teo.c | 60 +-
drivers/cpuidle/poll_state.c | 11 +-
drivers/cpuidle/sysfs.c | 7 +
drivers/crypto/Kconfig | 76 +-
drivers/crypto/amcc/crypto4xx_alg.c | 24 +-
drivers/crypto/atmel-aes.c | 1 -
drivers/crypto/atmel-i2c.c | 12 +
drivers/crypto/atmel-i2c.h | 12 -
drivers/crypto/atmel-sha.c | 1 -
drivers/crypto/atmel-sha204a.c | 3 +-
drivers/crypto/atmel-tdes.c | 29 +-
drivers/crypto/axis/artpec6_crypto.c | 4 +-
drivers/crypto/bcm/cipher.c | 92 +-
drivers/crypto/caam/Kconfig | 4 +-
drivers/crypto/caam/Makefile | 1 +
drivers/crypto/caam/caamalg.c | 268 +-
drivers/crypto/caam/caamalg_desc.c | 56 +-
drivers/crypto/caam/caamalg_desc.h | 4 +-
drivers/crypto/caam/caamalg_qi.c | 257 +-
drivers/crypto/caam/caamalg_qi2.c | 325 +-
drivers/crypto/caam/caamalg_qi2.h | 31 +-
drivers/crypto/caam/caamhash.c | 116 +-
drivers/crypto/caam/caamhash_desc.c | 5 +-
drivers/crypto/caam/caamhash_desc.h | 2 +-
drivers/crypto/caam/caampkc.c | 99 +-
drivers/crypto/caam/caamrng.c | 19 +-
drivers/crypto/caam/compat.h | 2 +-
drivers/crypto/caam/ctrl.c | 255 +-
drivers/crypto/caam/desc_constr.h | 81 +-
drivers/crypto/caam/dpseci-debugfs.c | 79 +
drivers/crypto/caam/dpseci-debugfs.h | 18 +
drivers/crypto/caam/error.c | 64 +-
drivers/crypto/caam/error.h | 2 +-
drivers/crypto/caam/intern.h | 32 +-
drivers/crypto/caam/jr.c | 124 +-
drivers/crypto/caam/key_gen.c | 14 +-
drivers/crypto/caam/pdb.h | 16 +-
drivers/crypto/caam/pkc_desc.c | 8 +-
drivers/crypto/caam/qi.c | 10 +-
drivers/crypto/caam/qi.h | 26 -
drivers/crypto/caam/regs.h | 141 +-
drivers/crypto/cavium/cpt/cptvf_algs.c | 26 +-
drivers/crypto/cavium/nitrox/Kconfig | 2 +-
drivers/crypto/cavium/nitrox/nitrox_csr.h | 235 +-
drivers/crypto/cavium/nitrox/nitrox_debugfs.c | 3 +-
drivers/crypto/cavium/nitrox/nitrox_dev.h | 8 +-
drivers/crypto/cavium/nitrox/nitrox_hal.c | 158 +-
drivers/crypto/cavium/nitrox/nitrox_hal.h | 6 +-
drivers/crypto/cavium/nitrox/nitrox_lib.c | 66 +-
drivers/crypto/cavium/nitrox/nitrox_main.c | 148 +-
drivers/crypto/cavium/nitrox/nitrox_req.h | 30 +
drivers/crypto/cavium/nitrox/nitrox_skcipher.c | 4 +-
drivers/crypto/cavium/nitrox/nitrox_sriov.c | 3 +
drivers/crypto/cavium/zip/zip_main.c | 3 +
drivers/crypto/ccp/Kconfig | 9 +
drivers/crypto/ccp/Makefile | 4 +-
drivers/crypto/ccp/ccp-crypto-aes-cmac.c | 25 +-
drivers/crypto/ccp/ccp-crypto-aes-galois.c | 14 +
drivers/crypto/ccp/ccp-crypto-aes-xts.c | 3 -
drivers/crypto/ccp/ccp-crypto-des3.c | 7 +-
drivers/crypto/ccp/ccp-crypto-main.c | 4 +-
drivers/crypto/ccp/ccp-crypto.h | 8 +-
drivers/crypto/ccp/ccp-dev-v3.c | 3 +-
drivers/crypto/ccp/ccp-dev-v5.c | 26 +-
drivers/crypto/ccp/ccp-dev.c | 37 +-
drivers/crypto/ccp/ccp-dev.h | 3 +-
drivers/crypto/ccp/ccp-dmaengine.c | 13 +-
drivers/crypto/ccp/ccp-ops.c | 89 +-
drivers/crypto/ccp/psp-dev.h | 1 -
drivers/crypto/ccp/sp-dev.h | 1 -
drivers/crypto/ccp/sp-platform.c | 4 +-
drivers/crypto/ccree/Makefile | 2 +-
drivers/crypto/ccree/cc_aead.c | 129 +-
drivers/crypto/ccree/cc_aead.h | 3 +-
drivers/crypto/ccree/cc_buffer_mgr.c | 21 -
drivers/crypto/ccree/cc_buffer_mgr.h | 2 -
drivers/crypto/ccree/cc_cipher.c | 31 +-
drivers/crypto/ccree/cc_driver.c | 18 +-
drivers/crypto/ccree/cc_driver.h | 10 -
drivers/crypto/ccree/cc_fips.c | 31 +-
drivers/crypto/ccree/cc_hash.c | 153 +-
drivers/crypto/ccree/cc_ivgen.c | 276 -
drivers/crypto/ccree/cc_ivgen.h | 55 -
drivers/crypto/ccree/cc_pm.c | 2 -
drivers/crypto/ccree/cc_request_mgr.c | 47 +-
drivers/crypto/chelsio/Kconfig | 1 +
drivers/crypto/chelsio/chcr_algo.c | 46 +-
drivers/crypto/chelsio/chcr_algo.h | 20 +-
drivers/crypto/chelsio/chcr_crypto.h | 1 -
drivers/crypto/chelsio/chcr_ipsec.c | 19 +-
drivers/crypto/chelsio/chtls/chtls_hw.c | 20 +-
drivers/crypto/chelsio/chtls/chtls_io.c | 11 +-
drivers/crypto/chelsio/chtls/chtls_main.c | 6 +-
drivers/crypto/exynos-rng.c | 4 +-
drivers/crypto/hifn_795x.c | 32 +-
drivers/crypto/hisilicon/Kconfig | 25 +
drivers/crypto/hisilicon/Makefile | 3 +
drivers/crypto/hisilicon/qm.c | 1913 +
drivers/crypto/hisilicon/qm.h | 215 +
drivers/crypto/hisilicon/sec/sec_algs.c | 61 +-
drivers/crypto/hisilicon/sgl.c | 214 +
drivers/crypto/hisilicon/sgl.h | 24 +
drivers/crypto/hisilicon/zip/Makefile | 2 +
drivers/crypto/hisilicon/zip/zip.h | 71 +
drivers/crypto/hisilicon/zip/zip_crypto.c | 653 +
drivers/crypto/hisilicon/zip/zip_main.c | 1010 +
drivers/crypto/img-hash.c | 5 +-
drivers/crypto/inside-secure/safexcel.c | 1171 +-
drivers/crypto/inside-secure/safexcel.h | 226 +-
drivers/crypto/inside-secure/safexcel_cipher.c | 1532 +-
drivers/crypto/inside-secure/safexcel_hash.c | 625 +-
drivers/crypto/inside-secure/safexcel_ring.c | 11 +-
drivers/crypto/ixp4xx_crypto.c | 27 +-
drivers/crypto/marvell/cipher.c | 27 +-
drivers/crypto/marvell/hash.c | 3 +-
drivers/crypto/mediatek/mtk-aes.c | 143 +-
drivers/crypto/mediatek/mtk-platform.c | 7 +-
drivers/crypto/mediatek/mtk-sha.c | 4 +-
drivers/crypto/mxs-dcp.c | 8 +-
drivers/crypto/n2_core.c | 42 +-
drivers/crypto/nx/nx-842-powernv.c | 1 +
drivers/crypto/nx/nx.h | 3 -
drivers/crypto/omap-aes.c | 1 -
drivers/crypto/omap-des.c | 28 +-
drivers/crypto/omap-sham.c | 1 -
drivers/crypto/padlock-aes.c | 10 +-
drivers/crypto/picoxcell_crypto.c | 29 +-
drivers/crypto/qat/qat_common/adf_common_drv.h | 2 +-
drivers/crypto/qce/ablkcipher.c | 55 +-
drivers/crypto/qce/core.c | 4 +-
drivers/crypto/qcom-rng.c | 4 +-
drivers/crypto/rockchip/rk3288_crypto.c | 4 +-
drivers/crypto/rockchip/rk3288_crypto.h | 2 +-
drivers/crypto/rockchip/rk3288_crypto_ablkcipher.c | 21 +-
drivers/crypto/s5p-sss.c | 7 +-
drivers/crypto/sahara.c | 4 +-
drivers/crypto/stm32/Kconfig | 2 +-
drivers/crypto/stm32/stm32-crc32.c | 4 +-
drivers/crypto/stm32/stm32-cryp.c | 38 +-
drivers/crypto/stm32/stm32-hash.c | 4 +-
drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | 26 +-
drivers/crypto/sunxi-ss/sun4i-ss-core.c | 4 +-
drivers/crypto/sunxi-ss/sun4i-ss.h | 2 +-
drivers/crypto/talitos.c | 39 +-
drivers/crypto/ux500/Kconfig | 2 +-
drivers/crypto/ux500/cryp/cryp.c | 6 +
drivers/crypto/ux500/cryp/cryp.h | 4 +-
drivers/crypto/ux500/cryp/cryp_core.c | 39 +-
drivers/crypto/ux500/hash/hash_alg.h | 4 +-
drivers/crypto/ux500/hash/hash_core.c | 12 +-
drivers/crypto/virtio/virtio_crypto_algs.c | 4 +-
drivers/crypto/vmx/aes_xts.c | 2 +-
drivers/devfreq/Kconfig | 19 +-
drivers/devfreq/Makefile | 3 +-
drivers/devfreq/devfreq.c | 12 +-
drivers/devfreq/event/exynos-ppmu.c | 104 +-
drivers/devfreq/exynos-bus.c | 153 +-
drivers/devfreq/governor_passive.c | 7 +-
drivers/devfreq/rk3399_dmc.c | 2 +-
drivers/devfreq/tegra-devfreq.c | 773 -
drivers/devfreq/tegra20-devfreq.c | 212 +
drivers/devfreq/tegra30-devfreq.c | 748 +
drivers/dma-buf/Kconfig | 5 +
drivers/dma-buf/Makefile | 8 +-
drivers/dma-buf/dma-buf.c | 28 +-
drivers/dma-buf/dma-fence-array.c | 32 +-
drivers/dma-buf/dma-fence-chain.c | 24 +-
drivers/dma-buf/dma-fence.c | 55 +-
drivers/dma-buf/dma-resv.c | 650 +
drivers/dma-buf/reservation.c | 591 -
drivers/dma-buf/selftest.c | 167 +
drivers/dma-buf/selftest.h | 30 +
drivers/dma-buf/selftests.h | 13 +
drivers/dma-buf/st-dma-fence.c | 574 +
drivers/dma-buf/sw_sync.c | 16 +-
drivers/dma-buf/sync_file.c | 2 +-
drivers/dma/Kconfig | 10 +-
drivers/dma/Makefile | 1 -
drivers/dma/acpi-dma.c | 12 +-
drivers/dma/bcm2835-dma.c | 42 +-
drivers/dma/dma-jz4740.c | 623 -
drivers/dma/dma-jz4780.c | 19 +-
drivers/dma/dmatest.c | 35 +-
drivers/dma/dw-edma/dw-edma-core.h | 2 +-
drivers/dma/dw-edma/dw-edma-pcie.c | 18 +-
drivers/dma/dw-edma/dw-edma-v0-core.c | 34 +-
drivers/dma/dw-edma/dw-edma-v0-debugfs.c | 29 +-
drivers/dma/dw/Makefile | 4 +-
drivers/dma/dw/acpi.c | 53 +
drivers/dma/dw/internal.h | 51 +
drivers/dma/dw/of.c | 131 +
drivers/dma/dw/pci.c | 62 +-
drivers/dma/dw/platform.c | 221 +-
drivers/dma/fsl-edma-common.c | 20 +-
drivers/dma/fsl-edma-common.h | 4 +
drivers/dma/fsl-edma.c | 81 +-
drivers/dma/fsl-qdma.c | 9 +-
drivers/dma/fsldma.c | 1 +
drivers/dma/imx-dma.c | 1 +
drivers/dma/imx-sdma.c | 4 -
drivers/dma/ioat/dca.c | 3 +-
drivers/dma/iop-adma.c | 24 +-
drivers/dma/iop-adma.h | 914 +
drivers/dma/mediatek/mtk-uart-apdma.c | 4 +-
drivers/dma/mv_xor_v2.c | 11 +-
drivers/dma/pl330.c | 9 +-
drivers/dma/qcom/hidma_ll.c | 2 -
drivers/dma/qcom/hidma_mgmt.c | 9 +-
drivers/dma/s3c24xx-dma.c | 5 +-
drivers/dma/sh/rcar-dmac.c | 32 +-
drivers/dma/sh/usb-dmac.c | 4 +-
drivers/dma/sprd-dma.c | 10 +-
drivers/dma/st_fdma.c | 4 +-
drivers/dma/ste_dma40.c | 4 +-
drivers/dma/stm32-dma.c | 18 +-
drivers/dma/stm32-dmamux.c | 3 +-
drivers/dma/stm32-mdma.c | 9 +-
drivers/dma/sun4i-dma.c | 4 +-
drivers/dma/sun6i-dma.c | 4 +-
drivers/dma/tegra20-apb-dma.c | 75 +-
drivers/dma/tegra210-adma.c | 16 +-
drivers/dma/ti/dma-crossbar.c | 4 +-
drivers/dma/ti/edma.c | 228 +-
drivers/dma/ti/omap-dma.c | 70 +-
drivers/dma/uniphier-mdmac.c | 5 +-
drivers/dma/xgene-dma.c | 8 +-
drivers/edac/Kconfig | 14 +
drivers/edac/Makefile | 2 +
drivers/edac/altera_edac.c | 58 +-
drivers/edac/altera_edac.h | 25 +-
drivers/edac/amd64_edac.c | 371 +-
drivers/edac/amd64_edac.h | 15 +-
drivers/edac/armada_xp_edac.c | 635 +
drivers/edac/bluefield_edac.c | 356 +
drivers/edac/debugfs.c | 11 +
drivers/edac/edac_mc.c | 53 +-
drivers/edac/edac_mc.h | 6 +-
drivers/edac/edac_mc_sysfs.c | 92 +-
drivers/edac/edac_module.h | 4 +
drivers/edac/ghes_edac.c | 2 +-
drivers/edac/i10nm_base.c | 4 +-
drivers/edac/i5100_edac.c | 16 +-
drivers/edac/pnd2_edac.c | 9 +-
drivers/edac/sb_edac.c | 2 +-
drivers/extcon/Kconfig | 2 +-
drivers/extcon/extcon-adc-jack.c | 4 +-
drivers/extcon/extcon-arizona.c | 2 +-
drivers/extcon/extcon-axp288.c | 16 +-
drivers/extcon/extcon-fsa9480.c | 1 +
drivers/extcon/extcon-gpio.c | 29 +-
drivers/extcon/extcon-max77843.c | 6 +-
drivers/extcon/extcon-sm5502.c | 2 +-
drivers/extcon/extcon-usbc-cros-ec.c | 3 +-
drivers/firewire/core-device.c | 2 +-
drivers/firewire/core-iso.c | 2 +-
drivers/firewire/core-topology.c | 1 +
drivers/firmware/Kconfig | 37 +-
drivers/firmware/Makefile | 2 +
drivers/firmware/arm_scmi/Makefile | 2 +-
drivers/firmware/arm_scmi/base.c | 2 +-
drivers/firmware/arm_scmi/clock.c | 33 +-
drivers/firmware/arm_scmi/common.h | 18 +-
drivers/firmware/arm_scmi/driver.c | 366 +-
drivers/firmware/arm_scmi/perf.c | 264 +-
drivers/firmware/arm_scmi/power.c | 6 +-
drivers/firmware/arm_scmi/reset.c | 231 +
drivers/firmware/arm_scmi/sensors.c | 57 +-
drivers/firmware/arm_scpi.c | 5 +-
drivers/firmware/broadcom/Kconfig | 2 +-
drivers/firmware/broadcom/bcm47xx_nvram.c | 6 +-
drivers/firmware/efi/Kconfig | 13 +
drivers/firmware/efi/Makefile | 1 +
drivers/firmware/efi/cper.c | 15 +
drivers/firmware/efi/efi.c | 45 +-
drivers/firmware/efi/libstub/efi-stub-helper.c | 38 +-
drivers/firmware/efi/rci2-table.c | 147 +
drivers/firmware/google/vpd.c | 4 +-
drivers/firmware/google/vpd_decode.c | 55 +-
drivers/firmware/google/vpd_decode.h | 6 +-
drivers/firmware/imx/Kconfig | 11 +
drivers/firmware/imx/Makefile | 1 +
drivers/firmware/imx/imx-dsp.c | 155 +
drivers/firmware/imx/scu-pd.c | 4 +-
drivers/firmware/iscsi_ibft.c | 4 +
drivers/firmware/psci/psci.c | 167 +-
drivers/firmware/psci/psci_checker.c | 16 +-
drivers/firmware/qcom_scm.c | 47 +-
drivers/firmware/stratix10-rsu.c | 451 +
drivers/firmware/stratix10-svc.c | 76 +-
drivers/firmware/ti_sci.c | 45 +-
drivers/firmware/turris-mox-rwtm.c | 384 +
drivers/fpga/Kconfig | 7 +-
drivers/fpga/Makefile | 3 +-
drivers/fpga/altera-cvp.c | 342 +-
drivers/fpga/altera-pr-ip-core-plat.c | 4 +-
drivers/fpga/altera-pr-ip-core.c | 4 +-
drivers/fpga/altera-ps-spi.c | 11 +-
drivers/fpga/dfl-afu-error.c | 230 +
drivers/fpga/dfl-afu-main.c | 381 +-
drivers/fpga/dfl-afu.h | 9 +
drivers/fpga/dfl-fme-error.c | 359 +
drivers/fpga/dfl-fme-main.c | 128 +-
drivers/fpga/dfl-fme-pr.c | 7 +-
drivers/fpga/dfl-fme.h | 6 +-
drivers/fpga/dfl-pci.c | 36 +
drivers/fpga/dfl.c | 226 +-
drivers/fpga/dfl.h | 52 +-
drivers/fpga/fpga-bridge.c | 8 +-
drivers/fpga/fpga-mgr.c | 8 +-
drivers/fsi/fsi-scom.c | 8 +-
drivers/gpio/Kconfig | 22 +-
drivers/gpio/Makefile | 4 +-
drivers/gpio/gpio-arizona.c | 4 +-
drivers/gpio/gpio-aspeed.c | 117 +-
drivers/gpio/gpio-bd70528.c | 4 +-
drivers/gpio/gpio-brcmstb.c | 4 +-
drivers/gpio/gpio-cadence.c | 36 +-
drivers/gpio/gpio-creg-snps.c | 4 +-
drivers/gpio/gpio-dwapb.c | 1 +
drivers/gpio/gpio-eic-sprd.c | 4 +-
drivers/gpio/gpio-em.c | 37 +-
drivers/gpio/gpio-ep93xx.c | 140 +-
drivers/gpio/gpio-ftgpio010.c | 14 +-
drivers/gpio/gpio-grgpio.c | 2 -
drivers/gpio/gpio-hlwd.c | 58 +-
drivers/gpio/gpio-htc-egpio.c | 14 -
drivers/gpio/gpio-intel-mid.c | 35 +-
drivers/gpio/gpio-ixp4xx.c | 279 +-
drivers/gpio/gpio-ks8695.c | 284 -
drivers/gpio/gpio-lpc32xx.c | 118 +-
drivers/gpio/gpio-lynxpoint.c | 35 +-
drivers/gpio/gpio-madera.c | 12 +-
drivers/gpio/gpio-max77620.c | 4 +-
drivers/gpio/gpio-max77650.c | 1 +
drivers/gpio/gpio-mb86s7x.c | 1 +
drivers/gpio/gpio-merrifield.c | 28 +-
drivers/gpio/gpio-mockup.c | 1 +
drivers/gpio/gpio-moxtet.c | 179 +
drivers/gpio/gpio-mpc8xxx.c | 32 +
drivers/gpio/gpio-mt7621.c | 33 +-
drivers/gpio/gpio-mvebu.c | 2 +-
drivers/gpio/gpio-mxc.c | 9 +-
drivers/gpio/gpio-pca953x.c | 85 +-
drivers/gpio/gpio-pch.c | 6 +-
drivers/gpio/gpio-pmic-eic-sprd.c | 4 +-
drivers/gpio/gpio-sprd.c | 4 +-
drivers/gpio/gpio-stmpe.c | 36 +-
drivers/gpio/gpio-tb10x.c | 4 +-
drivers/gpio/gpio-tegra.c | 4 +-
drivers/gpio/gpio-thunderx.c | 163 +-
drivers/gpio/gpio-tqmx86.c | 50 +-
drivers/gpio/gpio-vf610.c | 26 +-
drivers/gpio/gpio-viperboard.c | 20 +-
drivers/gpio/gpio-xgene-sb.c | 1 +
drivers/gpio/gpio-xlp.c | 29 +-
drivers/gpio/gpio-zx.c | 35 +-
drivers/gpio/gpio-zynq.c | 41 +-
drivers/gpio/gpiolib-acpi.c | 69 +-
drivers/gpio/gpiolib-acpi.h | 96 +
drivers/gpio/gpiolib-devres.c | 28 +-
drivers/gpio/gpiolib-of.c | 185 +-
drivers/gpio/gpiolib-of.h | 38 +
drivers/gpio/gpiolib.c | 746 +-
drivers/gpio/gpiolib.h | 120 -
drivers/gpio/sgpio-aspeed.c | 533 +
drivers/gpu/drm/Kconfig | 8 +-
drivers/gpu/drm/Makefile | 4 +-
drivers/gpu/drm/amd/amdgpu/Kconfig | 4 +-
drivers/gpu/drm/amd/amdgpu/Makefile | 19 +-
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 48 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 18 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 +
.../gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 323 +
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c | 42 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 181 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h | 69 +
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 23 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 1 +
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 96 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 41 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 72 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | 4 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 172 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 23 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_display.h | 3 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 48 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h | 4 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_doorbell.h | 9 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 52 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 13 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 11 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_gds.h | 1 -
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 25 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.h | 4 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 6 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 +
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 8 +
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 9 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 9 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 34 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.h | 31 +
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 17 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 137 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 8 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 193 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 120 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 7 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 231 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 313 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 493 +
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h | 90 +
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h | 8 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 10 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h | 4 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 74 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 8 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 20 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 16 +
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 82 +
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 210 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 35 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 45 -
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 13 -
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 54 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 9 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 114 +-
drivers/gpu/drm/amd/amdgpu/arct_reg_init.c | 59 +
drivers/gpu/drm/amd/amdgpu/athub_v1_0.c | 103 +
drivers/gpu/drm/amd/amdgpu/athub_v1_0.h | 30 +
drivers/gpu/drm/amd/amdgpu/athub_v2_0.c | 2 +
drivers/gpu/drm/amd/amdgpu/cik.c | 7 +
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 4 +
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 4 +
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 4 +
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 4 +
drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 7 +-
drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 202 +-
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 254 +-
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 28 +
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 68 +
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1354 +-
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 2 +-
drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 4 +-
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 122 +-
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 23 +-
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 28 +-
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 28 +-
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 401 +-
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.h | 7 +
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 132 +-
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h | 2 +
drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 6 +-
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c | 642 +
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.h | 36 +
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 15 -
drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 3 +-
drivers/gpu/drm/amd/amdgpu/navi10_reg_init.c | 14 +-
drivers/gpu/drm/amd/amdgpu/navi12_reg_init.c | 53 +
drivers/gpu/drm/amd/amdgpu/navi14_reg_init.c | 54 +
drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c | 2 +-
drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 21 +
drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 72 +-
drivers/gpu/drm/amd/amdgpu/nv.c | 128 +-
drivers/gpu/drm/amd/amdgpu/nv.h | 2 +
drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 11 +-
drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 1 -
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 26 +-
drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 565 +
drivers/gpu/drm/amd/amdgpu/psp_v12_0.h | 30 +
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 3 +-
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 688 +-
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 60 +-
drivers/gpu/drm/amd/amdgpu/si.c | 13 +-
drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c | 732 +
drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.h | 34 +
drivers/gpu/drm/amd/amdgpu/soc15.c | 247 +-
drivers/gpu/drm/amd/amdgpu/soc15.h | 1 +
drivers/gpu/drm/amd/amdgpu/soc15_common.h | 5 +-
drivers/gpu/drm/amd/amdgpu/umc_v6_1.c | 255 +
drivers/gpu/drm/amd/amdgpu/umc_v6_1.h | 51 +
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 4 +-
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 2 +-
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 116 +-
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 314 +-
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.h | 38 +
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 1414 +
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.h | 29 +
drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 31 +-
drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c | 4 +
drivers/gpu/drm/amd/amdgpu/vega20_reg_init.c | 6 +
drivers/gpu/drm/amd/amdgpu/vi.c | 7 +
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 1455 +-
.../gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx10.asm | 1992 +-
.../gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx8.asm | 395 +-
.../gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx9.asm | 547 +-
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 28 -
drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 4 +-
drivers/gpu/drm/amd/amdkfd/kfd_device.c | 44 +-
.../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 12 +-
drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 1 +
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c | 2 +
drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 1 +
drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_v9.c | 59 +-
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 10 +-
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.h | 2 +
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 1 -
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 18 +-
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 1 +
drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers_ai.h | 24 +-
drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 4 +-
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 101 +-
drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 17 +-
drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 4 +-
drivers/gpu/drm/amd/display/Kconfig | 8 +
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 262 +-
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 17 +-
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 231 +-
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h | 67 +
.../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 24 +
.../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 4 +-
.../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 26 +-
.../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 51 +-
drivers/gpu/drm/amd/display/dc/Makefile | 3 +
drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 3 +-
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 3 +-
.../amd/display/dc/bios/command_table_helper2.c | 5 +
.../dc/bios/dce110/command_table_helper_dce110.c | 36 +-
.../dc/bios/dce112/command_table_helper2_dce112.c | 36 +-
.../dc/bios/dce112/command_table_helper_dce112.c | 36 +-
drivers/gpu/drm/amd/display/dc/calcs/Makefile | 10 +-
drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 35 +-
drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 16 +-
drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile | 10 +
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 9 +
.../amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c | 17 +-
.../amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c | 31 +-
.../amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c | 4 +-
.../amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.c | 4 +-
.../drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c | 12 +-
.../amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 173 +-
.../amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.h | 5 +
.../drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 590 +
.../drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h | 39 +
.../dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c | 200 +
.../dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.h | 40 +
drivers/gpu/drm/amd/display/dc/core/dc.c | 192 +-
drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 40 +-
drivers/gpu/drm/amd/display/dc/core/dc_link.c | 279 +-
drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 2 +-
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 728 +-
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 204 +-
drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 310 +-
drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 26 +-
drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 3 +-
drivers/gpu/drm/amd/display/dc/dc.h | 57 +-
drivers/gpu/drm/amd/display/dc/dc_bios_types.h | 5 +-
drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 24 +
drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 61 +-
drivers/gpu/drm/amd/display/dc/dc_link.h | 21 +
drivers/gpu/drm/amd/display/dc/dc_types.h | 14 +
drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 4 +
drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 34 +-
drivers/gpu/drm/amd/display/dc/dce/dce_audio.h | 6 +-
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 9 +-
.../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 36 +-
.../gpu/drm/amd/display/dc/dce/dce_clock_source.h | 17 +
drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 168 +-
drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.c | 16 +-
drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 14 +-
.../drm/amd/display/dc/dce/dce_stream_encoder.c | 61 +-
.../drm/amd/display/dc/dce100/dce100_resource.c | 7 +-
.../amd/display/dc/dce110/dce110_hw_sequencer.c | 137 +-
.../amd/display/dc/dce110/dce110_hw_sequencer.h | 10 +-
.../drm/amd/display/dc/dce110/dce110_mem_input_v.c | 42 +-
.../drm/amd/display/dc/dce110/dce110_resource.c | 7 +-
.../drm/amd/display/dc/dce112/dce112_resource.c | 19 +-
.../drm/amd/display/dc/dce120/dce120_resource.c | 14 +-
.../gpu/drm/amd/display/dc/dce80/dce80_resource.c | 14 +-
.../gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c | 7 +-
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 16 +-
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 2 +-
.../gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c | 4 +-
.../gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h | 81 +-
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 72 +-
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h | 53 +-
.../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 429 +-
.../display/dc/dcn10/dcn10_hw_sequencer_debug.c | 2 +-
.../drm/amd/display/dc/dcn10/dcn10_link_encoder.c | 72 +-
.../drm/amd/display/dc/dcn10/dcn10_link_encoder.h | 3 +
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 21 +-
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.h | 4 +
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 25 +-
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h | 14 +-
.../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 13 +-
.../amd/display/dc/dcn10/dcn10_stream_encoder.c | 59 +-
.../amd/display/dc/dcn10/dcn10_stream_encoder.h | 22 +-
drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 6 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.c | 36 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.h | 2 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c | 26 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.h | 21 +-
.../gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c | 7 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c | 130 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.h | 4 +-
.../gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c | 117 +-
.../gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.h | 26 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c | 772 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h | 105 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 725 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.h | 16 +-
.../drm/amd/display/dc/dcn20/dcn20_link_encoder.c | 1 +
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_mpc.c | 40 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_mpc.h | 6 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_opp.c | 1 -
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.c | 97 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.h | 7 +-
.../gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 865 +-
.../gpu/drm/amd/display/dc/dcn20/dcn20_resource.h | 12 +
.../amd/display/dc/dcn20/dcn20_stream_encoder.c | 39 +-
.../amd/display/dc/dcn20/dcn20_stream_encoder.h | 5 +
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_vmid.c | 37 +
drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 10 +
.../gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.c | 595 +
.../gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.h | 132 +
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c | 244 +
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.h | 133 +
.../gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 1682 +
.../gpu/drm/amd/display/dc/dcn21/dcn21_resource.h | 45 +
drivers/gpu/drm/amd/display/dc/dm_pp_smu.h | 47 +
drivers/gpu/drm/amd/display/dc/dm_services.h | 1 +
drivers/gpu/drm/amd/display/dc/dml/Makefile | 30 +-
.../display/dc/dml/dcn20/display_mode_vba_20v2.c | 5136 ++
.../display/dc/dml/dcn20/display_mode_vba_20v2.h | 32 +
.../dc/dml/dcn20/display_rq_dlg_calc_20v2.c | 1701 +
.../dc/dml/dcn20/display_rq_dlg_calc_20v2.h | 74 +
.../amd/display/dc/dml/dcn21/display_mode_vba_21.c | 6123 ++
.../amd/display/dc/dml/dcn21/display_mode_vba_21.h | 32 +
.../display/dc/dml/dcn21/display_rq_dlg_calc_21.c | 1823 +
.../display/dc/dml/dcn21/display_rq_dlg_calc_21.h | 73 +
.../drm/amd/display/dc/dml/display_mode_enums.h | 22 +-
.../gpu/drm/amd/display/dc/dml/display_mode_lib.c | 31 +
.../gpu/drm/amd/display/dc/dml/display_mode_lib.h | 4 +
.../drm/amd/display/dc/dml/display_mode_structs.h | 4 +
.../gpu/drm/amd/display/dc/dml/display_mode_vba.c | 21 +-
.../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 18 +
drivers/gpu/drm/amd/display/dc/dsc/Makefile | 11 +-
drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 71 +-
drivers/gpu/drm/amd/display/dc/dsc/drm_dsc_dc.c | 382 -
drivers/gpu/drm/amd/display/dc/gpio/Makefile | 9 +-
.../amd/display/dc/gpio/dce110/hw_factory_dce110.c | 18 +-
.../amd/display/dc/gpio/dce120/hw_factory_dce120.c | 14 +-
.../amd/display/dc/gpio/dce80/hw_factory_dce80.c | 14 +-
.../amd/display/dc/gpio/dcn10/hw_factory_dcn10.c | 52 +-
.../amd/display/dc/gpio/dcn20/hw_factory_dcn20.c | 51 +-
.../amd/display/dc/gpio/dcn20/hw_translate_dcn20.c | 2 +-
.../amd/display/dc/gpio/dcn21/hw_factory_dcn21.c | 242 +
.../amd/display/dc/gpio/dcn21/hw_factory_dcn21.h | 33 +
.../amd/display/dc/gpio/dcn21/hw_translate_dcn21.c | 385 +
.../amd/display/dc/gpio/dcn21/hw_translate_dcn21.h | 35 +
.../display/dc/gpio/diagnostics/hw_factory_diag.c | 10 +-
drivers/gpu/drm/amd/display/dc/gpio/generic_regs.h | 66 +
drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c | 74 +-
drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c | 117 +-
drivers/gpu/drm/amd/display/dc/gpio/gpio_service.h | 6 +-
drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 26 +-
drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.h | 5 +-
drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 8 +
drivers/gpu/drm/amd/display/dc/gpio/hw_factory.h | 51 +-
drivers/gpu/drm/amd/display/dc/gpio/hw_generic.c | 138 +
drivers/gpu/drm/amd/display/dc/gpio/hw_generic.h | 50 +
drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c | 31 +-
drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.h | 5 +-
drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 8 +
drivers/gpu/drm/amd/display/dc/inc/core_status.h | 3 +
drivers/gpu/drm/amd/display/dc/inc/core_types.h | 21 +-
drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 10 +
drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 132 +
.../drm/amd/display/dc/inc/hw/clk_mgr_internal.h | 15 +-
drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h | 3 +-
drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h | 10 +-
drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 3 +-
drivers/gpu/drm/amd/display/dc/inc/hw/dsc.h | 4 +-
drivers/gpu/drm/amd/display/dc/inc/hw/dwb.h | 12 -
drivers/gpu/drm/amd/display/dc/inc/hw/gpio.h | 10 +
drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 13 +-
drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 1 +
.../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 3 +
drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 6 +-
drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 8 +
drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 5 -
.../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 20 +-
.../drm/amd/display/dc/inc/hw/timing_generator.h | 15 +-
drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 51 +-
drivers/gpu/drm/amd/display/dc/inc/link_hwss.h | 4 +-
drivers/gpu/drm/amd/display/dc/inc/resource.h | 5 +-
drivers/gpu/drm/amd/display/dc/irq/Makefile | 10 +
.../amd/display/dc/irq/dcn20/irq_service_dcn20.c | 28 +-
.../amd/display/dc/irq/dcn21/irq_service_dcn21.c | 374 +
.../amd/display/dc/irq/dcn21/irq_service_dcn21.h | 34 +
.../display/dc/virtual/virtual_stream_encoder.c | 5 +
drivers/gpu/drm/amd/display/include/audio_types.h | 4 +-
drivers/gpu/drm/amd/display/include/dal_asic_id.h | 22 +-
drivers/gpu/drm/amd/display/include/dal_types.h | 3 +
.../drm/amd/display/include/ddc_service_types.h | 10 +-
drivers/gpu/drm/amd/display/include/dpcd_defs.h | 2 +-
.../gpu/drm/amd/display/include/gpio_interface.h | 9 +
.../amd/display/include/gpio_service_interface.h | 18 +-
.../drm/amd/display/include/link_service_types.h | 17 +-
.../gpu/drm/amd/display/include/logger_interface.h | 2 +
drivers/gpu/drm/amd/display/include/logger_types.h | 7 +
.../drm/amd/display/modules/color/color_gamma.c | 367 +-
.../drm/amd/display/modules/color/color_gamma.h | 10 +
.../drm/amd/display/modules/freesync/freesync.c | 303 +-
.../gpu/drm/amd/display/modules/inc/mod_freesync.h | 2 +
.../drm/amd/display/modules/inc/mod_info_packet.h | 2 +-
.../amd/display/modules/info_packet/info_packet.c | 69 +
.../drm/amd/display/modules/power/power_helpers.c | 121 +-
drivers/gpu/drm/amd/include/amd_shared.h | 1 +
drivers/gpu/drm/amd/include/arct_ip_offset.h | 1650 +
.../amd/include/asic_reg/clk/clk_10_0_2_offset.h | 56 +
.../amd/include/asic_reg/clk/clk_10_0_2_sh_mask.h | 73 +
.../amd/include/asic_reg/dcn/dcn_2_1_0_offset.h | 13862 +++++
.../amd/include/asic_reg/dcn/dcn_2_1_0_sh_mask.h | 56638 +++++++++++++++++++
.../amd/include/asic_reg/dcn/dpcs_2_1_0_offset.h | 565 +
.../amd/include/asic_reg/dcn/dpcs_2_1_0_sh_mask.h | 3430 ++
.../drm/amd/include/asic_reg/df/df_3_6_offset.h | 4 +
.../drm/amd/include/asic_reg/gc/gc_10_1_0_offset.h | 2 +
.../amd/include/asic_reg/gc/gc_10_1_0_sh_mask.h | 39 +
.../drm/amd/include/asic_reg/gc/gc_9_0_offset.h | 2 +
.../drm/amd/include/asic_reg/gc/gc_9_0_sh_mask.h | 157 +
.../include/asic_reg/mmhub/mmhub_9_4_0_offset.h | 21 +
.../include/asic_reg/mmhub/mmhub_9_4_0_sh_mask.h | 222 +
.../include/asic_reg/mmhub/mmhub_9_4_1_default.h | 3933 ++
.../include/asic_reg/mmhub/mmhub_9_4_1_offset.h | 7753 +++
.../include/asic_reg/mmhub/mmhub_9_4_1_sh_mask.h | 44884 +++++++++++++++
.../drm/amd/include/asic_reg/mp/mp_12_0_0_offset.h | 336 +
.../amd/include/asic_reg/mp/mp_12_0_0_sh_mask.h | 866 +
.../amd/include/asic_reg/nbio/nbio_7_0_sh_mask.h | 30 +
.../drm/amd/include/asic_reg/nbio/nbio_7_0_smn.h | 6 +
.../amd/include/asic_reg/oss/osssys_4_0_sh_mask.h | 4 +
.../amd/include/asic_reg/rsmu/rsmu_0_0_2_offset.h | 27 +
.../amd/include/asic_reg/rsmu/rsmu_0_0_2_sh_mask.h | 32 +
.../include/asic_reg/sdma0/sdma0_4_2_2_offset.h | 1051 +
.../include/asic_reg/sdma0/sdma0_4_2_2_sh_mask.h | 3002 +
.../include/asic_reg/sdma1/sdma1_4_2_2_offset.h | 1043 +
.../include/asic_reg/sdma1/sdma1_4_2_2_sh_mask.h | 2956 +
.../include/asic_reg/sdma2/sdma2_4_2_2_offset.h | 1043 +
.../include/asic_reg/sdma2/sdma2_4_2_2_sh_mask.h | 2956 +
.../include/asic_reg/sdma3/sdma3_4_2_2_offset.h | 1043 +
.../include/asic_reg/sdma3/sdma3_4_2_2_sh_mask.h | 2956 +
.../include/asic_reg/sdma4/sdma4_4_2_2_offset.h | 1043 +
.../include/asic_reg/sdma4/sdma4_4_2_2_sh_mask.h | 2956 +
.../include/asic_reg/sdma5/sdma5_4_2_2_offset.h | 1043 +
.../include/asic_reg/sdma5/sdma5_4_2_2_sh_mask.h | 2956 +
.../include/asic_reg/sdma6/sdma6_4_2_2_offset.h | 1043 +
.../include/asic_reg/sdma6/sdma6_4_2_2_sh_mask.h | 2956 +
.../include/asic_reg/sdma7/sdma7_4_2_2_offset.h | 1043 +
.../include/asic_reg/sdma7/sdma7_4_2_2_sh_mask.h | 2956 +
.../include/asic_reg/smuio/smuio_11_0_0_offset.h | 92 +
.../include/asic_reg/smuio/smuio_11_0_0_sh_mask.h | 231 +
.../amd/include/asic_reg/umc/umc_6_1_1_offset.h | 31 +
.../amd/include/asic_reg/umc/umc_6_1_1_sh_mask.h | 91 +
.../drm/amd/include/asic_reg/vcn/vcn_2_5_offset.h | 979 +
.../drm/amd/include/asic_reg/vcn/vcn_2_5_sh_mask.h | 3609 ++
drivers/gpu/drm/amd/include/atomfirmware.h | 86 +
drivers/gpu/drm/amd/include/kgd_pp_interface.h | 12 +
drivers/gpu/drm/amd/include/navi12_ip_offset.h | 1119 +
drivers/gpu/drm/amd/include/navi14_ip_offset.h | 1119 +
drivers/gpu/drm/amd/include/renoir_ip_offset.h | 1364 +
drivers/gpu/drm/amd/include/soc15_ih_clientid.h | 11 +-
drivers/gpu/drm/amd/include/v9_structs.h | 8 +-
drivers/gpu/drm/amd/powerplay/Makefile | 2 +-
drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 56 +
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 495 +-
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 1938 +
drivers/gpu/drm/amd/powerplay/arcturus_ppt.h | 72 +
drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 16 +
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 12 +-
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 28 +-
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 26 +-
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 114 +-
drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 254 +-
drivers/gpu/drm/amd/powerplay/inc/arcturus_ppsmc.h | 120 +
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 11 +
drivers/gpu/drm/amd/powerplay/inc/rv_ppsmc.h | 2 +-
.../gpu/drm/amd/powerplay/inc/smu11_driver_if.h | 4 +-
.../amd/powerplay/inc/smu11_driver_if_arcturus.h | 891 +
.../drm/amd/powerplay/inc/smu11_driver_if_navi10.h | 29 +-
.../gpu/drm/amd/powerplay/inc/smu12_driver_if.h | 217 +
drivers/gpu/drm/amd/powerplay/inc/smu_types.h | 263 +
drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 27 +-
drivers/gpu/drm/amd/powerplay/inc/smu_v12_0.h | 42 +
.../gpu/drm/amd/powerplay/inc/smu_v12_0_ppsmc.h | 106 +
drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 489 +-
drivers/gpu/drm/amd/powerplay/navi10_ppt.h | 4 +
drivers/gpu/drm/amd/powerplay/renoir_ppt.c | 265 +
drivers/gpu/drm/amd/powerplay/renoir_ppt.h | 53 +
drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 339 +-
drivers/gpu/drm/amd/powerplay/smu_v12_0.c | 412 +
.../gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c | 4 +
drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c | 5 +-
.../gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 4 +
.../gpu/drm/amd/powerplay/smumgr/vega12_smumgr.c | 4 +
.../gpu/drm/amd/powerplay/smumgr/vega20_smumgr.c | 10 +-
.../gpu/drm/amd/powerplay/smumgr/vega20_smumgr.h | 2 +
drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 288 +-
drivers/gpu/drm/arc/arcpgu_drv.c | 5 +-
.../gpu/drm/arm/display/komeda/d71/d71_component.c | 42 +-
drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 89 +-
drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 16 +-
drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 8 +-
.../drm/arm/display/komeda/komeda_format_caps.c | 19 +
.../drm/arm/display/komeda/komeda_format_caps.h | 3 +
.../drm/arm/display/komeda/komeda_framebuffer.c | 5 +-
drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 35 +-
drivers/gpu/drm/arm/display/komeda/komeda_kms.h | 4 +-
.../gpu/drm/arm/display/komeda/komeda_pipeline.c | 19 +-
.../gpu/drm/arm/display/komeda/komeda_pipeline.h | 7 +-
.../drm/arm/display/komeda/komeda_pipeline_state.c | 2 +-
drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 4 +-
.../drm/arm/display/komeda/komeda_wb_connector.c | 2 +-
drivers/gpu/drm/arm/hdlcd_crtc.c | 12 +-
drivers/gpu/drm/arm/hdlcd_drv.c | 13 +-
drivers/gpu/drm/arm/malidp_crtc.c | 11 +-
drivers/gpu/drm/arm/malidp_drv.c | 13 +-
drivers/gpu/drm/arm/malidp_drv.h | 7 +-
drivers/gpu/drm/arm/malidp_hw.c | 10 +-
drivers/gpu/drm/arm/malidp_mw.c | 5 +-
drivers/gpu/drm/arm/malidp_planes.c | 4 +-
drivers/gpu/drm/armada/armada_crtc.c | 10 +-
drivers/gpu/drm/armada/armada_debugfs.c | 8 +-
drivers/gpu/drm/armada/armada_drm.h | 5 +-
drivers/gpu/drm/armada/armada_drv.c | 11 +-
drivers/gpu/drm/armada/armada_fb.c | 3 +
drivers/gpu/drm/armada/armada_fbdev.c | 3 +
drivers/gpu/drm/armada/armada_gem.c | 12 +-
drivers/gpu/drm/armada/armada_gem.h | 3 +-
drivers/gpu/drm/armada/armada_overlay.c | 8 +-
drivers/gpu/drm/armada/armada_plane.c | 4 +-
drivers/gpu/drm/armada/armada_trace.h | 5 +-
drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c | 2 +-
drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 3 +-
drivers/gpu/drm/ast/Makefile | 2 +-
drivers/gpu/drm/ast/ast_dp501.c | 5 +-
drivers/gpu/drm/ast/ast_drv.c | 22 +-
drivers/gpu/drm/ast/ast_drv.h | 46 +-
drivers/gpu/drm/ast/ast_fb.c | 346 -
drivers/gpu/drm/ast/ast_main.c | 82 +-
drivers/gpu/drm/ast/ast_mode.c | 62 +-
drivers/gpu/drm/ast/ast_post.c | 9 +-
drivers/gpu/drm/ast/ast_ttm.c | 7 +-
drivers/gpu/drm/ati_pcigart.c | 10 +-
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 12 +-
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 18 +-
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 20 +-
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 3 +-
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 12 +-
drivers/gpu/drm/bochs/bochs.h | 6 +-
drivers/gpu/drm/bochs/bochs_drv.c | 17 +-
drivers/gpu/drm/bochs/bochs_hw.c | 4 +
drivers/gpu/drm/bochs/bochs_kms.c | 9 +-
drivers/gpu/drm/bridge/Kconfig | 6 +-
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 18 +-
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 295 +-
drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 2 +-
drivers/gpu/drm/bridge/dumb-vga-dac.c | 13 +-
.../drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c | 1 -
drivers/gpu/drm/bridge/nxp-ptn3460.c | 3 -
drivers/gpu/drm/bridge/parade-ps8622.c | 1 -
drivers/gpu/drm/bridge/sii902x.c | 44 +-
.../gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c | 20 +-
drivers/gpu/drm/bridge/synopsys/dw-hdmi-audio.h | 1 +
drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c | 13 +-
.../gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 71 +-
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 175 +-
drivers/gpu/drm/bridge/synopsys/dw-hdmi.h | 13 +-
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 47 +
drivers/gpu/drm/bridge/tc358767.c | 683 +-
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 46 +-
drivers/gpu/drm/bridge/ti-tfp410.c | 6 +-
drivers/gpu/drm/cirrus/cirrus.c | 2 +-
drivers/gpu/drm/drm_agpsupport.c | 45 +-
drivers/gpu/drm/drm_atomic_helper.c | 22 +-
drivers/gpu/drm/drm_atomic_state_helper.c | 2 +-
drivers/gpu/drm/drm_atomic_uapi.c | 9 +-
drivers/gpu/drm/drm_client.c | 61 +-
drivers/gpu/drm/drm_client_modeset.c | 2 +-
drivers/gpu/drm/drm_connector.c | 109 +-
drivers/gpu/drm/drm_crtc_helper.c | 32 -
drivers/gpu/drm/drm_debugfs_crc.c | 15 +-
drivers/gpu/drm/drm_dma.c | 2 +-
drivers/gpu/drm/drm_dp_aux_dev.c | 18 +-
drivers/gpu/drm/drm_dp_helper.c | 31 +-
drivers/gpu/drm/drm_dp_mst_topology.c | 142 +-
drivers/gpu/drm/drm_drv.c | 14 +-
drivers/gpu/drm/drm_fb_helper.c | 51 +-
drivers/gpu/drm/drm_file.c | 9 +-
drivers/gpu/drm/drm_framebuffer.c | 2 +-
drivers/gpu/drm/drm_gem.c | 37 +-
drivers/gpu/drm/drm_gem_framebuffer_helper.c | 74 +-
drivers/gpu/drm/drm_gem_shmem_helper.c | 71 +-
drivers/gpu/drm/drm_gem_vram_helper.c | 94 +-
drivers/gpu/drm/drm_hdcp.c | 77 +-
drivers/gpu/drm/drm_ioc32.c | 13 +-
drivers/gpu/drm/drm_ioctl.c | 146 +-
drivers/gpu/drm/drm_kms_helper_common.c | 2 +-
drivers/gpu/drm/drm_legacy_misc.c | 2 +-
drivers/gpu/drm/drm_lock.c | 2 +-
drivers/gpu/drm/drm_memory.c | 2 +-
drivers/gpu/drm/drm_mipi_dbi.c | 1330 +
drivers/gpu/drm/drm_mipi_dsi.c | 7 +-
drivers/gpu/drm/drm_mm.c | 2 +-
drivers/gpu/drm/drm_mode_object.c | 4 +
drivers/gpu/drm/drm_modes.c | 77 +-
drivers/gpu/drm/drm_panel.c | 102 +-
drivers/gpu/drm/drm_prime.c | 868 +-
drivers/gpu/drm/drm_scatter.c | 2 +-
drivers/gpu/drm/drm_self_refresh_helper.c | 73 +-
drivers/gpu/drm/drm_syncobj.c | 109 +-
drivers/gpu/drm/drm_sysfs.c | 43 +
drivers/gpu/drm/drm_vblank.c | 25 +-
drivers/gpu/drm/drm_vm.c | 2 +-
drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 93 +-
drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 58 +-
drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.h | 15 +-
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 96 +-
drivers/gpu/drm/etnaviv/etnaviv_drv.h | 27 +-
drivers/gpu/drm/etnaviv/etnaviv_dump.c | 65 +-
drivers/gpu/drm/etnaviv/etnaviv_dump.h | 4 +-
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 78 +-
drivers/gpu/drm/etnaviv/etnaviv_gem.h | 13 +-
drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 3 +-
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 59 +-
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 158 +-
drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 11 +-
drivers/gpu/drm/etnaviv/etnaviv_iommu.c | 167 +-
drivers/gpu/drm/etnaviv/etnaviv_iommu.h | 20 -
drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c | 284 +-
drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 326 +-
drivers/gpu/drm/etnaviv/etnaviv_mmu.h | 114 +-
drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 48 +-
drivers/gpu/drm/etnaviv/etnaviv_sched.c | 4 +-
drivers/gpu/drm/exynos/Kconfig | 1 +
drivers/gpu/drm/exynos/exynos_drm_drv.c | 38 +-
drivers/gpu/drm/exynos/exynos_drm_fimc.c | 4 +-
drivers/gpu/drm/exynos/exynos_drm_g2d.c | 2 +-
drivers/gpu/drm/exynos/exynos_drm_gsc.c | 4 +-
drivers/gpu/drm/exynos/exynos_drm_ipp.c | 5 +-
drivers/gpu/drm/exynos/exynos_drm_ipp.h | 2 -
drivers/gpu/drm/exynos/exynos_drm_rotator.c | 2 +
drivers/gpu/drm/exynos/exynos_drm_scaler.c | 5 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 5 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 9 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 1 -
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 2 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 11 +-
drivers/gpu/drm/hisilicon/hibmc/Kconfig | 2 +-
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 6 +
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 29 +-
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 9 +-
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 2 +
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 1 +
drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 8 +-
drivers/gpu/drm/hisilicon/kirin/Kconfig | 10 +-
drivers/gpu/drm/hisilicon/kirin/Makefile | 3 +-
drivers/gpu/drm/hisilicon/kirin/kirin_ade_reg.h | 1 +
drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 359 +-
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 258 +-
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h | 48 +-
drivers/gpu/drm/i2c/ch7006_priv.h | 1 -
drivers/gpu/drm/i2c/sil164_drv.c | 3 +-
drivers/gpu/drm/i2c/tda998x_drv.c | 2 +-
drivers/gpu/drm/i810/i810_dma.c | 17 +-
drivers/gpu/drm/i810/i810_drv.c | 8 +-
drivers/gpu/drm/i810/i810_drv.h | 2 +
drivers/gpu/drm/i915/Kconfig.debug | 16 +
drivers/gpu/drm/i915/Makefile | 96 +-
drivers/gpu/drm/i915/Makefile.header-test | 22 -
drivers/gpu/drm/i915/display/Makefile | 6 +-
drivers/gpu/drm/i915/display/Makefile.header-test | 16 -
drivers/gpu/drm/i915/display/dvo_ch7017.c | 2 +-
drivers/gpu/drm/i915/display/dvo_ch7xxx.c | 2 +-
drivers/gpu/drm/i915/display/dvo_ivch.c | 2 +-
drivers/gpu/drm/i915/display/dvo_ns2501.c | 2 +-
drivers/gpu/drm/i915/display/dvo_sil164.c | 2 +-
drivers/gpu/drm/i915/display/dvo_tfp410.c | 2 +-
drivers/gpu/drm/i915/display/icl_dsi.c | 244 +-
drivers/gpu/drm/i915/display/intel_atomic.c | 2 +-
drivers/gpu/drm/i915/display/intel_atomic_plane.c | 59 +-
drivers/gpu/drm/i915/display/intel_atomic_plane.h | 5 +-
drivers/gpu/drm/i915/display/intel_audio.c | 83 +-
drivers/gpu/drm/i915/display/intel_bios.c | 27 +-
drivers/gpu/drm/i915/display/intel_bios.h | 3 +-
drivers/gpu/drm/i915/display/intel_bw.c | 33 +-
drivers/gpu/drm/i915/display/intel_bw.h | 15 -
drivers/gpu/drm/i915/display/intel_cdclk.c | 117 +-
drivers/gpu/drm/i915/display/intel_color.c | 2 +-
drivers/gpu/drm/i915/display/intel_combo_phy.c | 195 +-
drivers/gpu/drm/i915/display/intel_combo_phy.h | 4 +-
drivers/gpu/drm/i915/display/intel_connector.c | 4 +-
drivers/gpu/drm/i915/display/intel_crt.c | 17 +-
drivers/gpu/drm/i915/display/intel_ddi.c | 469 +-
drivers/gpu/drm/i915/display/intel_display.c | 1371 +-
drivers/gpu/drm/i915/display/intel_display.h | 239 +-
drivers/gpu/drm/i915/display/intel_display_power.c | 776 +-
drivers/gpu/drm/i915/display/intel_display_power.h | 73 +-
drivers/gpu/drm/i915/display/intel_display_types.h | 1525 +
drivers/gpu/drm/i915/display/intel_dp.c | 393 +-
drivers/gpu/drm/i915/display/intel_dp.h | 2 -
.../gpu/drm/i915/display/intel_dp_aux_backlight.c | 7 +-
.../gpu/drm/i915/display/intel_dp_link_training.c | 2 +-
drivers/gpu/drm/i915/display/intel_dp_mst.c | 37 +-
drivers/gpu/drm/i915/display/intel_dp_mst.h | 1 +
drivers/gpu/drm/i915/display/intel_dpio_phy.c | 8 +-
drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 698 +-
drivers/gpu/drm/i915/display/intel_dpll_mgr.h | 57 +-
drivers/gpu/drm/i915/display/intel_dsi.h | 15 +-
.../gpu/drm/i915/display/intel_dsi_dcs_backlight.c | 2 +-
drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 2 +-
drivers/gpu/drm/i915/display/intel_dvo.c | 2 +-
drivers/gpu/drm/i915/display/intel_fbc.c | 7 +-
drivers/gpu/drm/i915/display/intel_fbdev.c | 51 +-
drivers/gpu/drm/i915/display/intel_fifo_underrun.c | 3 +-
drivers/gpu/drm/i915/display/intel_frontbuffer.c | 257 +-
drivers/gpu/drm/i915/display/intel_frontbuffer.h | 70 +-
drivers/gpu/drm/i915/display/intel_gmbus.c | 19 +-
drivers/gpu/drm/i915/display/intel_gmbus.h | 22 +
drivers/gpu/drm/i915/display/intel_hdcp.c | 104 +-
drivers/gpu/drm/i915/display/intel_hdcp.h | 2 +-
drivers/gpu/drm/i915/display/intel_hdmi.c | 118 +-
drivers/gpu/drm/i915/display/intel_hotplug.c | 67 +-
drivers/gpu/drm/i915/display/intel_hotplug.h | 5 +-
drivers/gpu/drm/i915/display/intel_lspcon.c | 2 +-
drivers/gpu/drm/i915/display/intel_lvds.c | 8 +-
drivers/gpu/drm/i915/display/intel_opregion.c | 2 +-
drivers/gpu/drm/i915/display/intel_overlay.c | 149 +-
drivers/gpu/drm/i915/display/intel_panel.c | 2 +-
drivers/gpu/drm/i915/display/intel_pipe_crc.c | 4 +-
drivers/gpu/drm/i915/display/intel_psr.c | 8 +-
drivers/gpu/drm/i915/display/intel_quirks.c | 2 +-
drivers/gpu/drm/i915/display/intel_sdvo.c | 316 +-
drivers/gpu/drm/i915/display/intel_sprite.c | 344 +-
drivers/gpu/drm/i915/display/intel_sprite.h | 8 +-
drivers/gpu/drm/i915/display/intel_tc.c | 544 +
drivers/gpu/drm/i915/display/intel_tc.h | 30 +
drivers/gpu/drm/i915/display/intel_tv.c | 2 +-
drivers/gpu/drm/i915/display/intel_vbt_defs.h | 12 +-
drivers/gpu/drm/i915/display/intel_vdsc.c | 18 +-
drivers/gpu/drm/i915/display/vlv_dsi.c | 88 +-
drivers/gpu/drm/i915/display/vlv_dsi_pll.c | 20 +-
drivers/gpu/drm/i915/gem/Makefile | 6 +-
drivers/gpu/drm/i915/gem/Makefile.header-test | 16 -
drivers/gpu/drm/i915/gem/i915_gem_busy.c | 4 +-
drivers/gpu/drm/i915/gem/i915_gem_clflush.c | 127 +-
drivers/gpu/drm/i915/gem/i915_gem_client_blt.c | 60 +-
drivers/gpu/drm/i915/gem/i915_gem_context.c | 231 +-
drivers/gpu/drm/i915/gem/i915_gem_context.h | 8 -
drivers/gpu/drm/i915/gem/i915_gem_context_types.h | 9 +-
drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 7 +-
drivers/gpu/drm/i915/gem/i915_gem_domain.c | 49 +-
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 363 +-
drivers/gpu/drm/i915/gem/i915_gem_fence.c | 5 +-
drivers/gpu/drm/i915/gem/i915_gem_mman.c | 34 +-
drivers/gpu/drm/i915/gem/i915_gem_object.c | 159 +-
drivers/gpu/drm/i915/gem/i915_gem_object.h | 24 +-
drivers/gpu/drm/i915/gem/i915_gem_object_blt.c | 376 +-
drivers/gpu/drm/i915/gem/i915_gem_object_blt.h | 25 +-
drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 10 +-
drivers/gpu/drm/i915/gem/i915_gem_pages.c | 15 +-
drivers/gpu/drm/i915/gem/i915_gem_phys.c | 13 +-
drivers/gpu/drm/i915/gem/i915_gem_pm.c | 56 +-
drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 8 +
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 101 +-
drivers/gpu/drm/i915/gem/i915_gem_shrinker.h | 31 +
drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 11 +-
drivers/gpu/drm/i915/gem/i915_gem_stolen.h | 35 +
drivers/gpu/drm/i915/gem/i915_gem_throttle.c | 2 +-
drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 14 +-
drivers/gpu/drm/i915/gem/i915_gem_wait.c | 24 +-
drivers/gpu/drm/i915/gem/i915_gemfs.c | 31 +-
drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 187 +-
.../drm/i915/gem/selftests/i915_gem_client_blt.c | 42 +-
.../drm/i915/gem/selftests/i915_gem_coherency.c | 13 +-
.../gpu/drm/i915/gem/selftests/i915_gem_context.c | 274 +-
.../gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 8 +-
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 66 +-
.../drm/i915/gem/selftests/i915_gem_object_blt.c | 141 +-
drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c | 141 +-
drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.h | 16 +
drivers/gpu/drm/i915/gt/Makefile | 5 +-
drivers/gpu/drm/i915/gt/Makefile.header-test | 16 -
.../gen6_renderstate.c} | 0
.../gen7_renderstate.c} | 0
.../gen8_renderstate.c} | 0
.../gen9_renderstate.c} | 0
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 49 +-
drivers/gpu/drm/i915/gt/intel_context.c | 167 +-
drivers/gpu/drm/i915/gt/intel_context.h | 35 +-
drivers/gpu/drm/i915/gt/intel_context_types.h | 15 +-
drivers/gpu/drm/i915/gt/intel_engine.h | 90 +-
drivers/gpu/drm/i915/gt/intel_engine_cs.c | 436 +-
drivers/gpu/drm/i915/gt/intel_engine_pm.c | 109 +-
drivers/gpu/drm/i915/gt/intel_engine_pm.h | 28 +-
drivers/gpu/drm/i915/gt/intel_engine_pool.c | 177 +
drivers/gpu/drm/i915/gt/intel_engine_pool.h | 34 +
drivers/gpu/drm/i915/gt/intel_engine_pool_types.h | 29 +
drivers/gpu/drm/i915/gt/intel_engine_types.h | 139 +-
drivers/gpu/drm/i915/gt/intel_engine_user.c | 303 +
drivers/gpu/drm/i915/gt/intel_engine_user.h | 25 +
drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 18 +-
drivers/gpu/drm/i915/gt/intel_gt.c | 268 +
drivers/gpu/drm/i915/gt/intel_gt.h | 60 +
drivers/gpu/drm/i915/gt/intel_gt_irq.c | 455 +
drivers/gpu/drm/i915/gt/intel_gt_irq.h | 44 +
drivers/gpu/drm/i915/gt/intel_gt_pm.c | 95 +-
drivers/gpu/drm/i915/gt/intel_gt_pm.h | 41 +-
drivers/gpu/drm/i915/gt/intel_gt_pm_irq.c | 109 +
drivers/gpu/drm/i915/gt/intel_gt_pm_irq.h | 22 +
drivers/gpu/drm/i915/gt/intel_gt_types.h | 102 +
drivers/gpu/drm/i915/gt/intel_hangcheck.c | 71 +-
drivers/gpu/drm/i915/gt/intel_lrc.c | 1387 +-
drivers/gpu/drm/i915/gt/intel_lrc_reg.h | 1 +
drivers/gpu/drm/i915/gt/intel_mocs.c | 218 +-
drivers/gpu/drm/i915/gt/intel_mocs.h | 7 +-
drivers/gpu/drm/i915/gt/intel_renderstate.c | 236 +
drivers/gpu/drm/i915/gt/intel_renderstate.h | 51 +
drivers/gpu/drm/i915/gt/intel_reset.c | 669 +-
drivers/gpu/drm/i915/gt/intel_reset.h | 75 +-
drivers/gpu/drm/i915/gt/intel_reset_types.h | 50 +
drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 362 +-
drivers/gpu/drm/i915/gt/intel_sseu.c | 2 +-
drivers/gpu/drm/i915/gt/intel_timeline.c | 563 +
drivers/gpu/drm/i915/gt/intel_timeline.h | 94 +
drivers/gpu/drm/i915/gt/intel_timeline_types.h | 85 +
drivers/gpu/drm/i915/gt/intel_workarounds.c | 292 +-
drivers/gpu/drm/i915/gt/intel_workarounds.h | 6 +-
drivers/gpu/drm/i915/gt/intel_workarounds_types.h | 1 +
drivers/gpu/drm/i915/gt/mock_engine.c | 103 +-
drivers/gpu/drm/i915/gt/selftest_context.c | 456 +
drivers/gpu/drm/i915/gt/selftest_engine.c | 28 +
drivers/gpu/drm/i915/gt/selftest_engine.h | 14 +
drivers/gpu/drm/i915/gt/selftest_engine_cs.c | 26 +-
drivers/gpu/drm/i915/gt/selftest_engine_pm.c | 83 +
drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 528 +-
drivers/gpu/drm/i915/gt/selftest_lrc.c | 522 +-
drivers/gpu/drm/i915/gt/selftest_reset.c | 134 +-
drivers/gpu/drm/i915/gt/selftest_timeline.c | 846 +
drivers/gpu/drm/i915/gt/selftest_workarounds.c | 191 +-
drivers/gpu/drm/i915/gt/selftests/mock_timeline.c | 29 +
drivers/gpu/drm/i915/gt/selftests/mock_timeline.h | 15 +
drivers/gpu/drm/i915/gt/uc/Makefile | 5 +
drivers/gpu/drm/i915/gt/uc/intel_guc.c | 619 +
drivers/gpu/drm/i915/gt/uc/intel_guc.h | 200 +
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 184 +
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.h | 15 +
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 897 +
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h | 93 +
drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c | 166 +
drivers/gpu/drm/i915/gt/uc/intel_guc_fw.h | 14 +
drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 604 +
drivers/gpu/drm/i915/gt/uc/intel_guc_log.c | 646 +
drivers/gpu/drm/i915/gt/uc/intel_guc_log.h | 80 +
drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h | 143 +
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 1184 +
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h | 67 +
drivers/gpu/drm/i915/gt/uc/intel_huc.c | 192 +
drivers/gpu/drm/i915/gt/uc/intel_huc.h | 54 +
drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c | 58 +
drivers/gpu/drm/i915/gt/uc/intel_huc_fw.h | 14 +
drivers/gpu/drm/i915/gt/uc/intel_uc.c | 627 +
drivers/gpu/drm/i915/gt/uc/intel_uc.h | 67 +
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 616 +
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h | 241 +
drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h | 82 +
drivers/gpu/drm/i915/gt/uc/selftest_guc.c | 317 +
drivers/gpu/drm/i915/gvt/aperture_gm.c | 10 +-
drivers/gpu/drm/i915/gvt/cmd_parser.c | 190 +-
drivers/gpu/drm/i915/gvt/debugfs.c | 47 +-
drivers/gpu/drm/i915/gvt/dmabuf.c | 2 +-
drivers/gpu/drm/i915/gvt/fb_decoder.c | 6 +-
drivers/gpu/drm/i915/gvt/gtt.c | 9 +
drivers/gpu/drm/i915/gvt/gtt.h | 13 +-
drivers/gpu/drm/i915/gvt/gvt.c | 4 +-
drivers/gpu/drm/i915/gvt/gvt.h | 8 +-
drivers/gpu/drm/i915/gvt/interrupt.c | 4 +-
drivers/gpu/drm/i915/gvt/kvmgt.c | 27 +-
drivers/gpu/drm/i915/gvt/mmio_context.c | 57 +-
drivers/gpu/drm/i915/gvt/scheduler.c | 142 +-
drivers/gpu/drm/i915/gvt/trace_points.c | 2 -
drivers/gpu/drm/i915/gvt/vgpu.c | 4 +-
drivers/gpu/drm/i915/i915_active.c | 640 +-
drivers/gpu/drm/i915/i915_active.h | 61 +-
drivers/gpu/drm/i915/i915_active_types.h | 30 +-
drivers/gpu/drm/i915/i915_buddy.c | 428 +
drivers/gpu/drm/i915/i915_buddy.h | 128 +
drivers/gpu/drm/i915/i915_cmd_parser.c | 4 +-
drivers/gpu/drm/i915/i915_debugfs.c | 493 +-
drivers/gpu/drm/i915/i915_drv.c | 925 +-
drivers/gpu/drm/i915/i915_drv.h | 771 +-
drivers/gpu/drm/i915/i915_fixed.h | 5 +
drivers/gpu/drm/i915/i915_gem.c | 609 +-
drivers/gpu/drm/i915/i915_gem.h | 2 +
drivers/gpu/drm/i915/i915_gem_batch_pool.c | 140 -
drivers/gpu/drm/i915/i915_gem_batch_pool.h | 26 -
drivers/gpu/drm/i915/i915_gem_evict.c | 9 -
drivers/gpu/drm/i915/i915_gem_fence_reg.c | 140 +-
drivers/gpu/drm/i915/i915_gem_fence_reg.h | 5 +-
drivers/gpu/drm/i915/i915_gem_gtt.c | 2176 +-
drivers/gpu/drm/i915/i915_gem_gtt.h | 206 +-
drivers/gpu/drm/i915/i915_gem_render_state.c | 235 -
drivers/gpu/drm/i915/i915_gem_render_state.h | 31 -
drivers/gpu/drm/i915/i915_getparam.c | 168 +
drivers/gpu/drm/i915/i915_globals.c | 1 +
drivers/gpu/drm/i915/i915_globals.h | 3 +
drivers/gpu/drm/i915/i915_gpu_error.c | 827 +-
drivers/gpu/drm/i915/i915_gpu_error.h | 78 +-
drivers/gpu/drm/i915/i915_irq.c | 1598 +-
drivers/gpu/drm/i915/i915_irq.h | 110 +-
drivers/gpu/drm/i915/i915_memcpy.c | 2 +-
drivers/gpu/drm/i915/i915_memcpy.h | 32 +
drivers/gpu/drm/i915/i915_mm.c | 5 +-
drivers/gpu/drm/i915/i915_oa_bdw.c | 91 -
drivers/gpu/drm/i915/i915_oa_bdw.h | 15 -
drivers/gpu/drm/i915/i915_oa_bxt.c | 89 -
drivers/gpu/drm/i915/i915_oa_bxt.h | 15 -
drivers/gpu/drm/i915/i915_oa_cflgt2.c | 90 -
drivers/gpu/drm/i915/i915_oa_cflgt2.h | 15 -
drivers/gpu/drm/i915/i915_oa_cflgt3.c | 90 -
drivers/gpu/drm/i915/i915_oa_cflgt3.h | 15 -
drivers/gpu/drm/i915/i915_oa_chv.c | 90 -
drivers/gpu/drm/i915/i915_oa_chv.h | 15 -
drivers/gpu/drm/i915/i915_oa_cnl.c | 102 -
drivers/gpu/drm/i915/i915_oa_cnl.h | 15 -
drivers/gpu/drm/i915/i915_oa_glk.c | 89 -
drivers/gpu/drm/i915/i915_oa_glk.h | 15 -
drivers/gpu/drm/i915/i915_oa_hsw.c | 119 -
drivers/gpu/drm/i915/i915_oa_hsw.h | 15 -
drivers/gpu/drm/i915/i915_oa_icl.c | 99 -
drivers/gpu/drm/i915/i915_oa_icl.h | 15 -
drivers/gpu/drm/i915/i915_oa_kblgt2.c | 90 -
drivers/gpu/drm/i915/i915_oa_kblgt2.h | 15 -
drivers/gpu/drm/i915/i915_oa_kblgt3.c | 90 -
drivers/gpu/drm/i915/i915_oa_kblgt3.h | 15 -
drivers/gpu/drm/i915/i915_oa_sklgt2.c | 89 -
drivers/gpu/drm/i915/i915_oa_sklgt2.h | 15 -
drivers/gpu/drm/i915/i915_oa_sklgt3.c | 90 -
drivers/gpu/drm/i915/i915_oa_sklgt3.h | 15 -
drivers/gpu/drm/i915/i915_oa_sklgt4.c | 90 -
drivers/gpu/drm/i915/i915_oa_sklgt4.h | 15 -
drivers/gpu/drm/i915/i915_params.c | 5 +-
drivers/gpu/drm/i915/i915_params.h | 2 +-
drivers/gpu/drm/i915/i915_pci.c | 65 +-
drivers/gpu/drm/i915/i915_perf.c | 895 +-
drivers/gpu/drm/i915/i915_perf.h | 32 +
drivers/gpu/drm/i915/i915_pmu.c | 298 +-
drivers/gpu/drm/i915/i915_priolist_types.h | 15 +-
drivers/gpu/drm/i915/i915_pvinfo.h | 7 +-
drivers/gpu/drm/i915/i915_query.c | 5 +-
drivers/gpu/drm/i915/i915_reg.h | 356 +-
drivers/gpu/drm/i915/i915_request.c | 381 +-
drivers/gpu/drm/i915/i915_request.h | 29 +-
drivers/gpu/drm/i915/i915_scheduler.c | 7 +-
drivers/gpu/drm/i915/i915_scheduler_types.h | 1 +
drivers/gpu/drm/i915/i915_selftest.h | 29 +-
drivers/gpu/drm/i915/i915_suspend.c | 3 +-
drivers/gpu/drm/i915/i915_suspend.h | 14 +
drivers/gpu/drm/i915/i915_sw_fence.c | 31 +-
drivers/gpu/drm/i915/i915_sw_fence.h | 11 +-
drivers/gpu/drm/i915/i915_sw_fence_work.c | 95 +
drivers/gpu/drm/i915/i915_sw_fence_work.h | 44 +
drivers/gpu/drm/i915/i915_sysfs.c | 2 +-
drivers/gpu/drm/i915/i915_sysfs.h | 14 +
drivers/gpu/drm/i915/i915_timeline.c | 579 -
drivers/gpu/drm/i915/i915_timeline.h | 94 -
drivers/gpu/drm/i915/i915_timeline_types.h | 67 -
drivers/gpu/drm/i915/i915_trace.h | 100 +-
drivers/gpu/drm/i915/i915_utils.c | 78 +
drivers/gpu/drm/i915/i915_utils.h | 51 +
drivers/gpu/drm/i915/i915_vgpu.c | 68 +-
drivers/gpu/drm/i915/i915_vgpu.h | 7 +-
drivers/gpu/drm/i915/i915_vma.c | 145 +-
drivers/gpu/drm/i915/i915_vma.h | 29 +-
drivers/gpu/drm/i915/intel_csr.c | 7 +
drivers/gpu/drm/i915/intel_device_info.c | 45 +-
drivers/gpu/drm/i915/intel_device_info.h | 6 +-
drivers/gpu/drm/i915/intel_drv.h | 1616 -
drivers/gpu/drm/i915/intel_guc.c | 687 -
drivers/gpu/drm/i915/intel_guc.h | 204 -
drivers/gpu/drm/i915/intel_guc_ads.c | 202 -
drivers/gpu/drm/i915/intel_guc_ads.h | 34 -
drivers/gpu/drm/i915/intel_guc_ct.c | 929 -
drivers/gpu/drm/i915/intel_guc_ct.h | 104 -
drivers/gpu/drm/i915/intel_guc_fw.c | 308 -
drivers/gpu/drm/i915/intel_guc_fw.h | 33 -
drivers/gpu/drm/i915/intel_guc_fwif.h | 692 -
drivers/gpu/drm/i915/intel_guc_log.c | 632 -
drivers/gpu/drm/i915/intel_guc_log.h | 100 -
drivers/gpu/drm/i915/intel_guc_reg.h | 155 -
drivers/gpu/drm/i915/intel_guc_submission.c | 1458 -
drivers/gpu/drm/i915/intel_guc_submission.h | 89 -
drivers/gpu/drm/i915/intel_gvt.c | 7 +-
drivers/gpu/drm/i915/intel_gvt.h | 7 +-
drivers/gpu/drm/i915/intel_huc.c | 182 -
drivers/gpu/drm/i915/intel_huc.h | 65 -
drivers/gpu/drm/i915/intel_huc_fw.c | 215 -
drivers/gpu/drm/i915/intel_huc_fw.h | 15 -
drivers/gpu/drm/i915/intel_pch.c | 201 +
drivers/gpu/drm/i915/intel_pch.h | 73 +
drivers/gpu/drm/i915/intel_pm.c | 460 +-
drivers/gpu/drm/i915/intel_pm.h | 4 +-
drivers/gpu/drm/i915/intel_renderstate.h | 47 -
drivers/gpu/drm/i915/intel_runtime_pm.c | 13 +-
drivers/gpu/drm/i915/intel_runtime_pm.h | 2 +-
drivers/gpu/drm/i915/intel_sideband.c | 4 +-
drivers/gpu/drm/i915/intel_uc.c | 561 -
drivers/gpu/drm/i915/intel_uc.h | 64 -
drivers/gpu/drm/i915/intel_uc_fw.c | 357 -
drivers/gpu/drm/i915/intel_uc_fw.h | 155 -
drivers/gpu/drm/i915/intel_uncore.c | 558 +-
drivers/gpu/drm/i915/intel_uncore.h | 54 +-
drivers/gpu/drm/i915/intel_wakeref.c | 89 +-
drivers/gpu/drm/i915/intel_wakeref.h | 99 +-
drivers/gpu/drm/i915/intel_wopcm.c | 268 +-
drivers/gpu/drm/i915/intel_wopcm.h | 18 +-
drivers/gpu/drm/i915/oa/Makefile | 7 +
drivers/gpu/drm/i915/oa/i915_oa_bdw.c | 90 +
drivers/gpu/drm/i915/oa/i915_oa_bdw.h | 16 +
drivers/gpu/drm/i915/oa/i915_oa_bxt.c | 88 +
drivers/gpu/drm/i915/oa/i915_oa_bxt.h | 16 +
drivers/gpu/drm/i915/oa/i915_oa_cflgt2.c | 89 +
drivers/gpu/drm/i915/oa/i915_oa_cflgt2.h | 16 +
drivers/gpu/drm/i915/oa/i915_oa_cflgt3.c | 89 +
drivers/gpu/drm/i915/oa/i915_oa_cflgt3.h | 16 +
drivers/gpu/drm/i915/oa/i915_oa_chv.c | 89 +
drivers/gpu/drm/i915/oa/i915_oa_chv.h | 16 +
drivers/gpu/drm/i915/oa/i915_oa_cnl.c | 101 +
drivers/gpu/drm/i915/oa/i915_oa_cnl.h | 16 +
drivers/gpu/drm/i915/oa/i915_oa_glk.c | 88 +
drivers/gpu/drm/i915/oa/i915_oa_glk.h | 16 +
drivers/gpu/drm/i915/oa/i915_oa_hsw.c | 118 +
drivers/gpu/drm/i915/oa/i915_oa_hsw.h | 16 +
drivers/gpu/drm/i915/oa/i915_oa_icl.c | 98 +
drivers/gpu/drm/i915/oa/i915_oa_icl.h | 16 +
drivers/gpu/drm/i915/oa/i915_oa_kblgt2.c | 89 +
drivers/gpu/drm/i915/oa/i915_oa_kblgt2.h | 16 +
drivers/gpu/drm/i915/oa/i915_oa_kblgt3.c | 89 +
drivers/gpu/drm/i915/oa/i915_oa_kblgt3.h | 16 +
drivers/gpu/drm/i915/oa/i915_oa_sklgt2.c | 88 +
drivers/gpu/drm/i915/oa/i915_oa_sklgt2.h | 16 +
drivers/gpu/drm/i915/oa/i915_oa_sklgt3.c | 89 +
drivers/gpu/drm/i915/oa/i915_oa_sklgt3.h | 16 +
drivers/gpu/drm/i915/oa/i915_oa_sklgt4.c | 89 +
drivers/gpu/drm/i915/oa/i915_oa_sklgt4.h | 16 +
drivers/gpu/drm/i915/selftests/i915_active.c | 127 +-
drivers/gpu/drm/i915/selftests/i915_buddy.c | 720 +
drivers/gpu/drm/i915/selftests/i915_gem.c | 11 +-
drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 22 +-
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 4 +-
.../gpu/drm/i915/selftests/i915_live_selftests.h | 6 +-
.../gpu/drm/i915/selftests/i915_mock_selftests.h | 3 +-
drivers/gpu/drm/i915/selftests/i915_request.c | 89 +-
drivers/gpu/drm/i915/selftests/i915_selftest.c | 67 +-
drivers/gpu/drm/i915/selftests/i915_timeline.c | 845 -
drivers/gpu/drm/i915/selftests/i915_vma.c | 10 +
drivers/gpu/drm/i915/selftests/igt_flush_test.c | 5 +-
drivers/gpu/drm/i915/selftests/igt_reset.c | 38 +-
drivers/gpu/drm/i915/selftests/igt_reset.h | 10 +-
drivers/gpu/drm/i915/selftests/igt_spinner.c | 34 +-
drivers/gpu/drm/i915/selftests/igt_spinner.h | 9 +-
drivers/gpu/drm/i915/selftests/igt_wedge_me.h | 58 -
drivers/gpu/drm/i915/selftests/intel_guc.c | 359 -
drivers/gpu/drm/i915/selftests/lib_sw_fence.c | 1 +
drivers/gpu/drm/i915/selftests/mock_gem_device.c | 19 +-
drivers/gpu/drm/i915/selftests/mock_gtt.c | 3 +
drivers/gpu/drm/i915/selftests/mock_request.c | 6 +-
drivers/gpu/drm/i915/selftests/mock_request.h | 4 +-
drivers/gpu/drm/i915/selftests/mock_timeline.c | 29 -
drivers/gpu/drm/i915/selftests/mock_timeline.h | 15 -
drivers/gpu/drm/i915/selftests/mock_uncore.c | 4 +-
drivers/gpu/drm/imx/Makefile | 1 -
drivers/gpu/drm/imx/dw_hdmi-imx.c | 16 +-
drivers/gpu/drm/imx/imx-drm-core.c | 13 +-
drivers/gpu/drm/imx/imx-ldb.c | 40 +-
drivers/gpu/drm/imx/imx-tve.c | 16 +-
drivers/gpu/drm/imx/ipuv3-crtc.c | 8 +-
drivers/gpu/drm/imx/ipuv3-plane.c | 5 +-
drivers/gpu/drm/imx/parallel-display.c | 19 +-
drivers/gpu/drm/ingenic/ingenic-drm.c | 80 +-
drivers/gpu/drm/lima/lima_device.c | 41 +-
drivers/gpu/drm/lima/lima_drv.c | 20 +-
drivers/gpu/drm/lima/lima_gem.c | 12 +-
drivers/gpu/drm/lima/lima_gem_prime.c | 3 +-
drivers/gpu/drm/lima/lima_object.c | 9 +-
drivers/gpu/drm/lima/lima_object.h | 3 +-
drivers/gpu/drm/lima/lima_vm.h | 4 +-
drivers/gpu/drm/mcde/mcde_drv.c | 13 +-
drivers/gpu/drm/mcde/mcde_dsi.c | 70 +-
drivers/gpu/drm/mediatek/mtk_disp_color.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 2 +-
drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 2 +-
drivers/gpu/drm/mediatek/mtk_dpi.c | 18 +-
drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 10 +-
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 87 +-
drivers/gpu/drm/mediatek/mtk_drm_drv.h | 2 +
drivers/gpu/drm/mediatek/mtk_drm_fb.c | 35 +-
drivers/gpu/drm/mediatek/mtk_drm_fb.h | 1 -
drivers/gpu/drm/mediatek/mtk_drm_gem.c | 7 +-
drivers/gpu/drm/mediatek/mtk_drm_plane.c | 4 +-
drivers/gpu/drm/mediatek/mtk_dsi.c | 14 +-
drivers/gpu/drm/mediatek/mtk_hdmi.c | 14 +-
drivers/gpu/drm/meson/meson_crtc.c | 35 +-
drivers/gpu/drm/meson/meson_drv.c | 73 +-
drivers/gpu/drm/meson/meson_drv.h | 24 +-
drivers/gpu/drm/meson/meson_dw_hdmi.c | 23 +-
drivers/gpu/drm/meson/meson_dw_hdmi.h | 12 +-
drivers/gpu/drm/meson/meson_overlay.c | 15 +-
drivers/gpu/drm/meson/meson_plane.c | 28 +-
drivers/gpu/drm/meson/meson_registers.h | 138 +-
drivers/gpu/drm/meson/meson_vclk.c | 78 +-
drivers/gpu/drm/meson/meson_vclk.h | 4 +
drivers/gpu/drm/meson/meson_venc.c | 181 +-
drivers/gpu/drm/meson/meson_venc.h | 2 +
drivers/gpu/drm/meson/meson_venc_cvbs.c | 24 +-
drivers/gpu/drm/meson/meson_viu.c | 99 +-
drivers/gpu/drm/meson/meson_vpp.c | 42 +-
drivers/gpu/drm/meson/meson_vpp.h | 3 +
drivers/gpu/drm/mga/mga_dma.c | 13 +-
drivers/gpu/drm/mga/mga_drv.c | 7 +-
drivers/gpu/drm/mga/mga_drv.h | 27 +-
drivers/gpu/drm/mga/mga_ioc32.c | 3 +-
drivers/gpu/drm/mga/mga_irq.c | 12 +-
drivers/gpu/drm/mga/mga_state.c | 8 +-
drivers/gpu/drm/mga/mga_warp.c | 4 +-
drivers/gpu/drm/mgag200/Makefile | 2 +-
drivers/gpu/drm/mgag200/mgag200_cursor.c | 11 +-
drivers/gpu/drm/mgag200/mgag200_drv.c | 10 +-
drivers/gpu/drm/mgag200/mgag200_drv.h | 40 +-
drivers/gpu/drm/mgag200/mgag200_fb.c | 315 -
drivers/gpu/drm/mgag200/mgag200_i2c.c | 6 +-
drivers/gpu/drm/mgag200/mgag200_main.c | 96 +-
drivers/gpu/drm/mgag200/mgag200_mode.c | 59 +-
drivers/gpu/drm/mgag200/mgag200_ttm.c | 3 +-
drivers/gpu/drm/msm/Kconfig | 2 +-
drivers/gpu/drm/msm/Makefile | 1 +
drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 4 +-
drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 +
drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 +-
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 1 +
drivers/gpu/drm/msm/adreno/adreno_device.c | 1 +
drivers/gpu/drm/msm/adreno/adreno_gpu.c | 1 +
drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 16 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 95 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 7 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 78 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 11 +-
.../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 3 -
.../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 44 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 1 -
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 3 -
drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c | 1 +
drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.h | 9 -
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 112 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 10 +
drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 9 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 31 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 2 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 11 +-
drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c | 1 +
drivers/gpu/drm/msm/disp/mdp4/mdp4_irq.c | 1 +
drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 51 +-
drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c | 2 +
.../gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c | 2 -
drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c | 2 +
drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 132 +-
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 19 +-
drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c | 4 +-
drivers/gpu/drm/msm/disp/mdp5/mdp5_irq.c | 1 +
drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 62 +-
drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 2 +
drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 1 +
drivers/gpu/drm/msm/disp/mdp_format.c | 2 +-
drivers/gpu/drm/msm/dsi/dsi_host.c | 18 +-
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 12 +-
drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c | 2 +
drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c | 2 +
drivers/gpu/drm/msm/dsi/pll/dsi_pll.h | 2 +-
drivers/gpu/drm/msm/hdmi/hdmi.c | 66 +-
drivers/gpu/drm/msm/hdmi/hdmi.h | 4 +-
drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 2 +
drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 43 +-
drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 1 +
drivers/gpu/drm/msm/hdmi/hdmi_phy_8x60.c | 2 +
drivers/gpu/drm/msm/hdmi/hdmi_pll_8960.c | 2 +
drivers/gpu/drm/msm/msm_atomic.c | 236 +-
drivers/gpu/drm/msm/msm_atomic_trace.h | 110 +
drivers/gpu/drm/msm/msm_atomic_tracepoints.c | 3 +
drivers/gpu/drm/msm/msm_debugfs.c | 5 +
drivers/gpu/drm/msm/msm_drv.c | 81 +-
drivers/gpu/drm/msm/msm_drv.h | 6 +-
drivers/gpu/drm/msm/msm_fb.c | 2 +
drivers/gpu/drm/msm/msm_fbdev.c | 4 +
drivers/gpu/drm/msm/msm_gem.c | 75 +-
drivers/gpu/drm/msm/msm_gem.h | 2 +-
drivers/gpu/drm/msm/msm_gem_prime.c | 6 +-
drivers/gpu/drm/msm/msm_gem_submit.c | 10 +-
drivers/gpu/drm/msm/msm_gpu.c | 5 +-
drivers/gpu/drm/msm/msm_gpu_trace.h | 2 +-
drivers/gpu/drm/msm/msm_gpummu.c | 2 +
drivers/gpu/drm/msm/msm_kms.h | 108 +-
drivers/gpu/drm/msm/msm_perf.c | 3 +
drivers/gpu/drm/msm/msm_rd.c | 7 +-
drivers/gpu/drm/msm/msm_submitqueue.c | 2 +
drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 16 +-
drivers/gpu/drm/mxsfb/mxsfb_drv.c | 18 +-
drivers/gpu/drm/mxsfb/mxsfb_out.c | 3 +-
drivers/gpu/drm/nouveau/Kconfig | 5 +-
drivers/gpu/drm/nouveau/dispnv04/arb.c | 2 -
drivers/gpu/drm/nouveau/dispnv04/crtc.c | 54 +-
drivers/gpu/drm/nouveau/dispnv04/cursor.c | 1 -
drivers/gpu/drm/nouveau/dispnv04/dac.c | 1 -
drivers/gpu/drm/nouveau/dispnv04/dfp.c | 2 +-
drivers/gpu/drm/nouveau/dispnv04/disp.c | 3 +-
drivers/gpu/drm/nouveau/dispnv04/disp.h | 1 -
drivers/gpu/drm/nouveau/dispnv04/hw.c | 1 -
drivers/gpu/drm/nouveau/dispnv04/hw.h | 1 -
drivers/gpu/drm/nouveau/dispnv04/overlay.c | 1 -
drivers/gpu/drm/nouveau/dispnv04/tvmodesnv17.c | 1 -
drivers/gpu/drm/nouveau/dispnv04/tvnv04.c | 1 -
drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 1 -
drivers/gpu/drm/nouveau/dispnv50/atom.h | 14 +
drivers/gpu/drm/nouveau/dispnv50/base507c.c | 26 +-
drivers/gpu/drm/nouveau/dispnv50/base827c.c | 11 +-
drivers/gpu/drm/nouveau/dispnv50/base907c.c | 65 +
drivers/gpu/drm/nouveau/dispnv50/base917c.c | 2 +
drivers/gpu/drm/nouveau/dispnv50/corec37d.c | 2 +-
drivers/gpu/drm/nouveau/dispnv50/disp.c | 68 +-
drivers/gpu/drm/nouveau/dispnv50/head.c | 18 +-
drivers/gpu/drm/nouveau/dispnv50/ovly507e.c | 3 +-
drivers/gpu/drm/nouveau/dispnv50/ovly827e.c | 3 -
drivers/gpu/drm/nouveau/dispnv50/ovly907e.c | 13 +-
drivers/gpu/drm/nouveau/dispnv50/ovly917e.c | 5 +-
drivers/gpu/drm/nouveau/dispnv50/wndw.c | 115 +-
drivers/gpu/drm/nouveau/dispnv50/wndw.h | 10 +-
drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c | 61 +-
drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c | 72 +-
.../drm/nouveau/include/nvkm/subdev/bios/extdev.h | 2 +
.../drm/nouveau/include/nvkm/subdev/bios/gpio.h | 5 +-
drivers/gpu/drm/nouveau/include/nvkm/subdev/pmu.h | 1 +
drivers/gpu/drm/nouveau/nouveau_abi16.c | 10 +-
drivers/gpu/drm/nouveau/nouveau_abi16.h | 1 -
drivers/gpu/drm/nouveau/nouveau_bios.c | 4 +-
drivers/gpu/drm/nouveau/nouveau_bo.c | 98 +-
drivers/gpu/drm/nouveau/nouveau_bo.h | 11 +-
drivers/gpu/drm/nouveau/nouveau_connector.c | 3 +-
drivers/gpu/drm/nouveau/nouveau_crtc.h | 2 +
drivers/gpu/drm/nouveau/nouveau_debugfs.h | 2 +-
drivers/gpu/drm/nouveau/nouveau_display.c | 14 +-
drivers/gpu/drm/nouveau/nouveau_display.h | 4 +
drivers/gpu/drm/nouveau/nouveau_dma.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_dmem.c | 456 +-
drivers/gpu/drm/nouveau/nouveau_dmem.h | 11 -
drivers/gpu/drm/nouveau/nouveau_dp.c | 1 -
drivers/gpu/drm/nouveau/nouveau_drm.c | 39 +-
drivers/gpu/drm/nouveau/nouveau_drv.h | 9 +-
drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_fence.c | 15 +-
drivers/gpu/drm/nouveau/nouveau_gem.c | 51 +-
drivers/gpu/drm/nouveau/nouveau_gem.h | 5 +-
drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 -
drivers/gpu/drm/nouveau/nouveau_ioc32.c | 3 +-
drivers/gpu/drm/nouveau/nouveau_prime.c | 43 +-
drivers/gpu/drm/nouveau/nouveau_svm.c | 50 +-
drivers/gpu/drm/nouveau/nouveau_vga.c | 1 -
drivers/gpu/drm/nouveau/nvif/mmu.c | 2 +-
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c | 188 +-
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 28 +-
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 6 +
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 1 +
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 1 +
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 1 +
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 26 +
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 1 +
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm20b.c | 1 +
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c | 27 +
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp10b.c | 1 +
drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 2 +
drivers/gpu/drm/nouveau/nvkm/subdev/bar/gm20b.c | 1 -
drivers/gpu/drm/nouveau/nvkm/subdev/bios/extdev.c | 13 +
drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 28 +-
drivers/gpu/drm/nouveau/nvkm/subdev/bios/volt.c | 2 +
drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c | 32 +
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c | 24 +-
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 18 +
.../gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 2 +-
.../gpu/drm/nouveau/nvkm/subdev/secboot/gp102.c | 12 +
drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c | 7 +-
drivers/gpu/drm/nouveau/nvkm/subdev/therm/ic.c | 3 +
drivers/gpu/drm/omapdrm/displays/Kconfig | 38 -
drivers/gpu/drm/omapdrm/displays/Makefile | 6 -
.../omapdrm/displays/panel-lgphilips-lb035q02.c | 251 -
.../drm/omapdrm/displays/panel-nec-nl8048hl11.c | 271 -
.../drm/omapdrm/displays/panel-sharp-ls037v7dw01.c | 262 -
.../drm/omapdrm/displays/panel-sony-acx565akm.c | 755 -
.../drm/omapdrm/displays/panel-tpo-td028ttec1.c | 390 -
.../drm/omapdrm/displays/panel-tpo-td043mtea1.c | 513 -
drivers/gpu/drm/omapdrm/dss/dispc.c | 11 +-
drivers/gpu/drm/omapdrm/dss/dss.c | 11 +-
drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c | 7 -
drivers/gpu/drm/omapdrm/dss/output.c | 4 +-
drivers/gpu/drm/omapdrm/omap_crtc.c | 4 +-
drivers/gpu/drm/omapdrm/omap_debugfs.c | 2 +
drivers/gpu/drm/omapdrm/omap_drv.c | 24 +-
drivers/gpu/drm/omapdrm/omap_drv.h | 5 +-
drivers/gpu/drm/omapdrm/omap_fb.c | 4 +-
drivers/gpu/drm/omapdrm/omap_fbdev.c | 4 +-
drivers/gpu/drm/omapdrm/omap_gem.c | 2 +
drivers/gpu/drm/omapdrm/omap_gem.h | 3 +-
drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 8 +-
drivers/gpu/drm/omapdrm/omap_irq.c | 2 +
drivers/gpu/drm/omapdrm/omap_plane.c | 9 +-
drivers/gpu/drm/panel/Kconfig | 64 +
drivers/gpu/drm/panel/Makefile | 8 +
drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 34 +-
drivers/gpu/drm/panel/panel-lg-lb035q02.c | 237 +
drivers/gpu/drm/panel/panel-lvds.c | 5 +-
drivers/gpu/drm/panel/panel-nec-nl8048hl11.c | 248 +
drivers/gpu/drm/panel/panel-novatek-nt39016.c | 359 +
.../gpu/drm/panel/panel-raspberrypi-touchscreen.c | 13 +
drivers/gpu/drm/panel/panel-raydium-rm67191.c | 668 +
drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c | 75 +-
drivers/gpu/drm/panel/panel-sharp-ls037v7dw01.c | 226 +
drivers/gpu/drm/panel/panel-simple.c | 407 +-
drivers/gpu/drm/panel/panel-sony-acx565akm.c | 701 +
drivers/gpu/drm/panel/panel-tpo-td028ttec1.c | 399 +
drivers/gpu/drm/panel/panel-tpo-td043mtea1.c | 509 +
drivers/gpu/drm/panfrost/Makefile | 1 +
drivers/gpu/drm/panfrost/TODO | 15 -
drivers/gpu/drm/panfrost/panfrost_devfreq.c | 12 +-
drivers/gpu/drm/panfrost/panfrost_devfreq.h | 1 +
drivers/gpu/drm/panfrost/panfrost_device.c | 36 +-
drivers/gpu/drm/panfrost/panfrost_device.h | 31 +-
drivers/gpu/drm/panfrost/panfrost_drv.c | 196 +-
drivers/gpu/drm/panfrost/panfrost_gem.c | 142 +-
drivers/gpu/drm/panfrost/panfrost_gem.h | 23 +-
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 110 +
drivers/gpu/drm/panfrost/panfrost_gpu.c | 2 +
drivers/gpu/drm/panfrost/panfrost_job.c | 62 +-
drivers/gpu/drm/panfrost/panfrost_mmu.c | 479 +-
drivers/gpu/drm/panfrost/panfrost_mmu.h | 9 +-
drivers/gpu/drm/pl111/pl111_debugfs.c | 4 +-
drivers/gpu/drm/pl111/pl111_display.c | 52 +-
drivers/gpu/drm/pl111/pl111_drm.h | 11 +-
drivers/gpu/drm/pl111/pl111_drv.c | 13 +-
drivers/gpu/drm/pl111/pl111_nomadik.h | 3 +-
drivers/gpu/drm/pl111/pl111_versatile.c | 9 +-
drivers/gpu/drm/pl111/pl111_versatile.h | 3 +
drivers/gpu/drm/pl111/pl111_vexpress.c | 1 +
drivers/gpu/drm/qxl/qxl_cmd.c | 6 +-
drivers/gpu/drm/qxl/qxl_debugfs.c | 10 +-
drivers/gpu/drm/qxl/qxl_display.c | 11 +-
drivers/gpu/drm/qxl/qxl_draw.c | 2 +
drivers/gpu/drm/qxl/qxl_drv.c | 41 +-
drivers/gpu/drm/qxl/qxl_drv.h | 13 +-
drivers/gpu/drm/qxl/qxl_gem.c | 3 +-
drivers/gpu/drm/qxl/qxl_ioctl.c | 3 +
drivers/gpu/drm/qxl/qxl_irq.c | 4 +
drivers/gpu/drm/qxl/qxl_kms.c | 9 +-
drivers/gpu/drm/qxl/qxl_object.c | 20 +-
drivers/gpu/drm/qxl/qxl_object.h | 6 +-
drivers/gpu/drm/qxl/qxl_release.c | 14 +-
drivers/gpu/drm/qxl/qxl_ttm.c | 20 +-
drivers/gpu/drm/r128/r128_ioc32.c | 3 +-
drivers/gpu/drm/r128/r128_irq.c | 5 +-
drivers/gpu/drm/radeon/cik.c | 2 +-
drivers/gpu/drm/radeon/cik_sdma.c | 2 +-
drivers/gpu/drm/radeon/evergreen_dma.c | 2 +-
drivers/gpu/drm/radeon/r100.c | 2 +-
drivers/gpu/drm/radeon/r200.c | 2 +-
drivers/gpu/drm/radeon/r600.c | 2 +-
drivers/gpu/drm/radeon/r600_dma.c | 2 +-
drivers/gpu/drm/radeon/radeon.h | 15 +-
drivers/gpu/drm/radeon/radeon_asic.h | 18 +-
drivers/gpu/drm/radeon/radeon_benchmark.c | 6 +-
drivers/gpu/drm/radeon/radeon_connectors.c | 2 +-
drivers/gpu/drm/radeon/radeon_cs.c | 6 +-
drivers/gpu/drm/radeon/radeon_device.c | 23 +-
drivers/gpu/drm/radeon/radeon_display.c | 6 +-
drivers/gpu/drm/radeon/radeon_drv.c | 64 +-
drivers/gpu/drm/radeon/radeon_gem.c | 10 +-
drivers/gpu/drm/radeon/radeon_kms.c | 25 -
drivers/gpu/drm/radeon/radeon_mn.c | 158 +-
drivers/gpu/drm/radeon/radeon_object.c | 28 +-
drivers/gpu/drm/radeon/radeon_object.h | 4 +-
drivers/gpu/drm/radeon/radeon_prime.c | 20 +-
drivers/gpu/drm/radeon/radeon_sync.c | 10 +-
drivers/gpu/drm/radeon/radeon_test.c | 8 +-
drivers/gpu/drm/radeon/radeon_ttm.c | 6 +-
drivers/gpu/drm/radeon/radeon_uvd.c | 2 +-
drivers/gpu/drm/radeon/radeon_vm.c | 6 +-
drivers/gpu/drm/radeon/rv770_dma.c | 2 +-
drivers/gpu/drm/radeon/si_dma.c | 2 +-
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 5 +-
drivers/gpu/drm/rcar-du/rcar_lvds.c | 14 +-
drivers/gpu/drm/rockchip/Makefile | 3 +-
drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 118 +-
drivers/gpu/drm/rockchip/cdn-dp-core.c | 17 +-
drivers/gpu/drm/rockchip/cdn-dp-core.h | 2 +-
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 9 +-
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 5 +-
drivers/gpu/drm/rockchip/inno_hdmi.c | 3 +-
drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 20 +-
drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 29 +-
drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 2 +-
drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 8 +-
drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 282 -
drivers/gpu/drm/rockchip/rockchip_drm_psr.h | 22 -
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 114 +-
drivers/gpu/drm/rockchip/rockchip_lvds.c | 16 +-
drivers/gpu/drm/rockchip/rockchip_rgb.c | 9 +-
drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 11 +-
drivers/gpu/drm/scheduler/gpu_scheduler_trace.h | 2 -
drivers/gpu/drm/scheduler/sched_entity.c | 7 +-
drivers/gpu/drm/scheduler/sched_fence.c | 6 +-
drivers/gpu/drm/scheduler/sched_main.c | 3 +-
drivers/gpu/drm/selftests/drm_cmdline_selftests.h | 7 +
.../gpu/drm/selftests/test-drm_cmdline_parser.c | 130 +
drivers/gpu/drm/selftests/test-drm_framebuffer.c | 7 +-
drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 3 +-
drivers/gpu/drm/shmobile/shmob_drm_crtc.h | 4 +-
drivers/gpu/drm/shmobile/shmob_drm_drv.c | 9 +-
drivers/gpu/drm/shmobile/shmob_drm_kms.c | 1 -
drivers/gpu/drm/shmobile/shmob_drm_plane.c | 2 +-
drivers/gpu/drm/shmobile/shmob_drm_plane.h | 1 +
drivers/gpu/drm/shmobile/shmob_drm_regs.h | 3 +
drivers/gpu/drm/sti/sti_drv.c | 6 +-
drivers/gpu/drm/sti/sti_dvo.c | 8 +-
drivers/gpu/drm/sti/sti_hdmi.c | 9 +-
drivers/gpu/drm/sti/sti_tvout.c | 16 +-
drivers/gpu/drm/stm/drv.c | 5 +-
drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 10 +-
drivers/gpu/drm/stm/ltdc.c | 2 +
drivers/gpu/drm/sun4i/sun4i_backend.c | 16 +-
drivers/gpu/drm/sun4i/sun4i_crtc.c | 13 +-
drivers/gpu/drm/sun4i/sun4i_drv.c | 7 +-
drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 1 -
drivers/gpu/drm/sun4i/sun4i_frontend.c | 10 +-
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 24 +-
drivers/gpu/drm/sun4i/sun4i_layer.c | 3 +-
drivers/gpu/drm/sun4i/sun4i_lvds.c | 2 +-
drivers/gpu/drm/sun4i/sun4i_rgb.c | 2 +-
drivers/gpu/drm/sun4i/sun4i_tcon.c | 29 +-
drivers/gpu/drm/sun4i/sun4i_tv.c | 4 +-
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 10 +-
drivers/gpu/drm/sun4i/sun8i_csc.c | 157 +-
drivers/gpu/drm/sun4i/sun8i_csc.h | 6 +-
drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 57 +-
drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 2 +
drivers/gpu/drm/sun4i/sun8i_mixer.c | 14 +-
drivers/gpu/drm/sun4i/sun8i_tcon_top.c | 6 +-
drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 2 +-
drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 22 +-
drivers/gpu/drm/tdfx/tdfx_drv.c | 11 +-
drivers/gpu/drm/tegra/dc.c | 13 +-
drivers/gpu/drm/tegra/dpaux.c | 5 +-
drivers/gpu/drm/tegra/drm.c | 38 +-
drivers/gpu/drm/tegra/drm.h | 3 +-
drivers/gpu/drm/tegra/dsi.c | 8 +-
drivers/gpu/drm/tegra/fb.c | 6 +-
drivers/gpu/drm/tegra/gem.c | 10 +-
drivers/gpu/drm/tegra/gem.h | 4 +-
drivers/gpu/drm/tegra/gr2d.c | 1 +
drivers/gpu/drm/tegra/hdmi.c | 5 +
drivers/gpu/drm/tegra/hub.c | 3 +-
drivers/gpu/drm/tegra/hub.h | 1 -
drivers/gpu/drm/tegra/output.c | 8 +-
drivers/gpu/drm/tegra/plane.c | 1 +
drivers/gpu/drm/tegra/sor.c | 3 +
drivers/gpu/drm/tegra/vic.c | 1 +
drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 46 +-
drivers/gpu/drm/tilcdc/tilcdc_drv.c | 25 +-
drivers/gpu/drm/tilcdc/tilcdc_drv.h | 33 +-
drivers/gpu/drm/tilcdc/tilcdc_external.c | 89 +-
drivers/gpu/drm/tilcdc/tilcdc_external.h | 1 -
drivers/gpu/drm/tilcdc/tilcdc_panel.c | 20 +-
drivers/gpu/drm/tilcdc/tilcdc_plane.c | 4 +-
drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 17 +-
drivers/gpu/drm/tiny/Kconfig | 99 +
drivers/gpu/drm/tiny/Makefile | 10 +
drivers/gpu/drm/tiny/gm12u320.c | 804 +
drivers/gpu/drm/tiny/hx8357d.c | 304 +
drivers/gpu/drm/tiny/ili9225.c | 470 +
drivers/gpu/drm/tiny/ili9341.c | 268 +
drivers/gpu/drm/tiny/mi0283qt.c | 294 +
drivers/gpu/drm/tiny/repaper.c | 1212 +
drivers/gpu/drm/tiny/st7586.c | 424 +
drivers/gpu/drm/tiny/st7735r.c | 246 +
drivers/gpu/drm/tinydrm/Kconfig | 87 -
drivers/gpu/drm/tinydrm/Makefile | 14 -
drivers/gpu/drm/tinydrm/core/Makefile | 4 -
drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c | 207 -
drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | 179 -
drivers/gpu/drm/tinydrm/hx8357d.c | 304 -
drivers/gpu/drm/tinydrm/ili9225.c | 467 -
drivers/gpu/drm/tinydrm/ili9341.c | 266 -
drivers/gpu/drm/tinydrm/mi0283qt.c | 293 -
drivers/gpu/drm/tinydrm/mipi-dbi.c | 1175 -
drivers/gpu/drm/tinydrm/repaper.c | 1165 -
drivers/gpu/drm/tinydrm/st7586.c | 442 -
drivers/gpu/drm/tinydrm/st7735r.c | 245 -
drivers/gpu/drm/ttm/ttm_bo.c | 158 +-
drivers/gpu/drm/ttm/ttm_bo_util.c | 20 +-
drivers/gpu/drm/ttm/ttm_bo_vm.c | 15 +-
drivers/gpu/drm/ttm/ttm_execbuf_util.c | 22 +-
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 6 +-
drivers/gpu/drm/ttm/ttm_tt.c | 2 +-
drivers/gpu/drm/tve200/tve200_display.c | 8 +-
drivers/gpu/drm/tve200/tve200_drm.h | 15 +-
drivers/gpu/drm/tve200/tve200_drv.c | 8 +-
drivers/gpu/drm/udl/udl_connector.c | 4 +-
drivers/gpu/drm/udl/udl_connector.h | 2 +
drivers/gpu/drm/udl/udl_dmabuf.c | 11 +-
drivers/gpu/drm/udl/udl_drv.c | 9 +-
drivers/gpu/drm/udl/udl_drv.h | 11 +-
drivers/gpu/drm/udl/udl_encoder.c | 6 +-
drivers/gpu/drm/udl/udl_fb.c | 15 +-
drivers/gpu/drm/udl/udl_gem.c | 9 +-
drivers/gpu/drm/udl/udl_main.c | 6 +-
drivers/gpu/drm/udl/udl_modeset.c | 6 +-
drivers/gpu/drm/udl/udl_transfer.c | 4 -
drivers/gpu/drm/v3d/v3d_debugfs.c | 3 +-
drivers/gpu/drm/v3d/v3d_drv.c | 6 +-
drivers/gpu/drm/v3d/v3d_drv.h | 13 +-
drivers/gpu/drm/v3d/v3d_gem.c | 16 +-
drivers/gpu/drm/v3d/v3d_irq.c | 2 +
drivers/gpu/drm/vboxvideo/Makefile | 2 +-
drivers/gpu/drm/vboxvideo/vbox_drv.c | 15 +-
drivers/gpu/drm/vboxvideo/vbox_drv.h | 12 -
drivers/gpu/drm/vboxvideo/vbox_main.c | 2 +-
drivers/gpu/drm/vboxvideo/vbox_prime.c | 56 -
drivers/gpu/drm/vc4/vc4_bo.c | 7 +-
drivers/gpu/drm/vc4/vc4_crtc.c | 11 +-
drivers/gpu/drm/vc4/vc4_debugfs.c | 1 -
drivers/gpu/drm/vc4/vc4_drv.c | 12 +-
drivers/gpu/drm/vc4/vc4_drv.h | 20 +-
drivers/gpu/drm/vc4/vc4_dsi.c | 17 +-
drivers/gpu/drm/vc4/vc4_gem.c | 8 +-
drivers/gpu/drm/vc4/vc4_hvs.c | 5 +-
drivers/gpu/drm/vc4/vc4_kms.c | 4 +-
drivers/gpu/drm/vc4/vc4_plane.c | 9 +-
drivers/gpu/drm/vc4/vc4_txp.c | 14 +-
drivers/gpu/drm/vc4/vc4_v3d.c | 4 +
drivers/gpu/drm/vgem/vgem_drv.c | 21 +-
drivers/gpu/drm/vgem/vgem_drv.h | 1 -
drivers/gpu/drm/vgem/vgem_fence.c | 40 +-
drivers/gpu/drm/via/via_dma.c | 43 +-
drivers/gpu/drm/via/via_dmablit.c | 51 +-
drivers/gpu/drm/via/via_drv.c | 7 +-
drivers/gpu/drm/via/via_drv.h | 75 +-
drivers/gpu/drm/via/via_irq.c | 54 +-
drivers/gpu/drm/via/via_map.c | 6 +-
drivers/gpu/drm/via/via_mm.c | 7 +-
drivers/gpu/drm/via/via_verifier.c | 22 +-
drivers/gpu/drm/via/via_video.c | 5 +-
drivers/gpu/drm/virtio/virtgpu_debugfs.c | 4 +-
drivers/gpu/drm/virtio/virtgpu_display.c | 7 +-
drivers/gpu/drm/virtio/virtgpu_drv.c | 9 +-
drivers/gpu/drm/virtio/virtgpu_drv.h | 8 +-
drivers/gpu/drm/virtio/virtgpu_fence.c | 2 +-
drivers/gpu/drm/virtio/virtgpu_gem.c | 4 +-
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 30 +-
drivers/gpu/drm/virtio/virtgpu_kms.c | 4 +-
drivers/gpu/drm/virtio/virtgpu_object.c | 10 +-
drivers/gpu/drm/virtio/virtgpu_plane.c | 8 +-
drivers/gpu/drm/virtio/virtgpu_prime.c | 5 +-
drivers/gpu/drm/virtio/virtgpu_ttm.c | 13 +-
drivers/gpu/drm/virtio/virtgpu_vq.c | 7 +-
drivers/gpu/drm/vkms/Makefile | 2 +-
drivers/gpu/drm/vkms/vkms_composer.c | 249 +
drivers/gpu/drm/vkms/vkms_crc.c | 272 -
drivers/gpu/drm/vkms/vkms_crtc.c | 100 +-
drivers/gpu/drm/vkms/vkms_drv.c | 50 +-
drivers/gpu/drm/vkms/vkms_drv.h | 44 +-
drivers/gpu/drm/vkms/vkms_gem.c | 1 +
drivers/gpu/drm/vkms/vkms_output.c | 6 +-
drivers/gpu/drm/vkms/vkms_plane.c | 46 +-
drivers/gpu/drm/vmwgfx/ttm_lock.c | 100 -
drivers/gpu/drm/vmwgfx/ttm_lock.h | 32 +-
drivers/gpu/drm/vmwgfx/ttm_object.h | 7 +-
drivers/gpu/drm/vmwgfx/vmwgfx_binding.h | 3 +-
drivers/gpu/drm/vmwgfx/vmwgfx_blit.c | 4 +-
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 17 +-
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 3 +
drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 4 +
drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 17 +-
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 200 +-
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 135 +-
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 52 +-
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 8 +-
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 6 +-
drivers/gpu/drm/vmwgfx/vmwgfx_fence.h | 5 +-
drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 6 +-
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c | 4 +-
drivers/gpu/drm/vmwgfx/vmwgfx_irq.c | 3 +-
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 41 +-
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 2 +-
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 6 +-
drivers/gpu/drm/vmwgfx/vmwgfx_mob.c | 2 +
drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 38 +-
drivers/gpu/drm/vmwgfx/vmwgfx_msg.h | 35 +-
drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c | 6 +-
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 62 +-
drivers/gpu/drm/vmwgfx/vmwgfx_resource_priv.h | 2 +
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 6 +-
drivers/gpu/drm/vmwgfx/vmwgfx_shader.c | 8 +-
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 9 +-
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 14 +-
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c | 1 -
drivers/gpu/drm/vmwgfx/vmwgfx_validation.h | 3 +-
drivers/gpu/drm/xen/xen_drm_front.c | 16 +-
drivers/gpu/drm/xen/xen_drm_front.h | 11 +-
drivers/gpu/drm/xen/xen_drm_front_cfg.c | 4 +-
drivers/gpu/drm/xen/xen_drm_front_conn.c | 1 +
drivers/gpu/drm/xen/xen_drm_front_conn.h | 7 +-
drivers/gpu/drm/xen/xen_drm_front_evtchnl.c | 4 +-
drivers/gpu/drm/xen/xen_drm_front_gem.c | 11 +-
drivers/gpu/drm/xen/xen_drm_front_gem.h | 7 +-
drivers/gpu/drm/xen/xen_drm_front_kms.c | 9 +-
drivers/gpu/drm/zte/zx_drm_drv.c | 8 +-
drivers/gpu/drm/zte/zx_hdmi.c | 2 +-
drivers/gpu/drm/zte/zx_plane.c | 2 +-
drivers/gpu/drm/zte/zx_tvenc.c | 4 +-
drivers/gpu/drm/zte/zx_vga.c | 4 +-
drivers/gpu/drm/zte/zx_vou.c | 5 +-
drivers/gpu/ipu-v3/ipu-common.c | 16 +-
drivers/gpu/ipu-v3/ipu-cpmem.c | 26 +-
drivers/gpu/ipu-v3/ipu-image-convert.c | 230 +-
drivers/greybus/Kconfig | 32 +
drivers/greybus/Makefile | 26 +
drivers/greybus/arpc.h | 63 +
drivers/greybus/bundle.c | 252 +
drivers/greybus/connection.c | 942 +
drivers/greybus/control.c | 584 +
drivers/greybus/core.c | 349 +
drivers/greybus/debugfs.c | 29 +
drivers/greybus/es2.c | 1465 +
drivers/greybus/greybus_trace.h | 502 +
drivers/greybus/hd.c | 256 +
drivers/greybus/interface.c | 1263 +
drivers/greybus/manifest.c | 533 +
drivers/greybus/module.c | 236 +
drivers/greybus/operation.c | 1264 +
drivers/greybus/svc.c | 1397 +
drivers/greybus/svc_watchdog.c | 197 +
drivers/hid/Kconfig | 11 +-
drivers/hid/Makefile | 1 +
drivers/hid/hid-a4tech.c | 30 +-
drivers/hid/hid-apple.c | 49 +-
drivers/hid/hid-core.c | 4 +-
drivers/hid/hid-cougar.c | 6 +-
drivers/hid/hid-cp2112.c | 8 +-
drivers/hid/hid-creative-sb0540.c | 268 +
drivers/hid/hid-gfrm.c | 7 -
drivers/hid/hid-google-hammer.c | 4 +-
drivers/hid/hid-holtek-kbd.c | 9 +-
drivers/hid/hid-hyperv.c | 4 +-
drivers/hid/hid-ids.h | 8 +-
drivers/hid/hid-lenovo.c | 2 -
drivers/hid/hid-lg.c | 10 +-
drivers/hid/hid-lg4ff.c | 1 -
drivers/hid/hid-logitech-dj.c | 40 +-
drivers/hid/hid-logitech-hidpp.c | 14 +-
drivers/hid/hid-microsoft.c | 2 +-
drivers/hid/hid-multitouch.c | 37 +-
drivers/hid/hid-picolcd_core.c | 7 +-
drivers/hid/hid-prodikeys.c | 12 +-
drivers/hid/hid-quirks.c | 3 +
drivers/hid/hid-sensor-hub.c | 1 -
drivers/hid/hid-sony.c | 17 +-
drivers/hid/hid-tmff.c | 12 +
drivers/hid/hidraw.c | 4 +-
drivers/hid/i2c-hid/i2c-hid-core.c | 4 +-
drivers/hid/intel-ish-hid/ipc/hw-ish.h | 2 +
drivers/hid/intel-ish-hid/ipc/ipc.c | 2 +-
drivers/hid/intel-ish-hid/ipc/pci-ish.c | 96 +-
drivers/hid/usbhid/hiddev.c | 14 +-
drivers/hid/wacom_sys.c | 25 +-
drivers/hid/wacom_wac.c | 95 +-
drivers/hsi/clients/ssi_protocol.c | 10 +-
drivers/hsi/controllers/omap_ssi_core.c | 4 +-
drivers/hsi/controllers/omap_ssi_port.c | 4 +-
drivers/hv/Kconfig | 3 -
drivers/hv/channel.c | 2 +-
drivers/hv/channel_mgmt.c | 161 +-
drivers/hv/connection.c | 8 +-
drivers/hv/hv.c | 66 +-
drivers/hv/hv_balloon.c | 143 +-
drivers/hv/hv_trace.h | 2 +-
drivers/hv/hyperv_vmbus.h | 40 +-
drivers/hv/vmbus_drv.c | 265 +
drivers/hwmon/Kconfig | 41 +-
drivers/hwmon/Makefile | 3 +-
drivers/hwmon/acpi_power_meter.c | 4 +-
drivers/hwmon/ads1015.c | 324 -
drivers/hwmon/adt7475.c | 146 +-
drivers/hwmon/as370-hwmon.c | 145 +
drivers/hwmon/asb100.c | 12 +-
drivers/hwmon/atxp1.c | 2 +-
drivers/hwmon/coretemp.c | 3 +-
drivers/hwmon/iio_hwmon.c | 18 +-
drivers/hwmon/jz4740-hwmon.c | 135 -
drivers/hwmon/k10temp.c | 1 +
drivers/hwmon/k8temp.c | 233 +-
drivers/hwmon/lm75.c | 462 +-
drivers/hwmon/ltc2990.c | 10 +-
drivers/hwmon/nct6775.c | 183 +-
drivers/hwmon/nct7802.c | 6 +-
drivers/hwmon/nct7904.c | 476 +-
drivers/hwmon/npcm750-pwm-fan.c | 4 +-
drivers/hwmon/occ/common.c | 6 +-
drivers/hwmon/pmbus/Kconfig | 9 +
drivers/hwmon/pmbus/Makefile | 1 +
drivers/hwmon/pmbus/ibm-cffps.c | 110 +-
drivers/hwmon/pmbus/inspur-ipsps.c | 228 +
drivers/hwmon/pmbus/max31785.c | 2 -
drivers/hwmon/pmbus/ucd9000.c | 1 -
drivers/hwmon/pwm-fan.c | 2 +-
drivers/hwmon/raspberrypi-hwmon.c | 2 +-
drivers/hwmon/scmi-hwmon.c | 2 +-
drivers/hwmon/shtc1.c | 57 +-
drivers/hwmon/smm665.c | 8 +-
drivers/hwmon/w83781d.c | 6 +-
drivers/hwmon/w83791d.c | 32 +-
drivers/hwmon/w83792d.c | 32 +-
drivers/hwmon/w83793.c | 30 +-
drivers/hwtracing/coresight/Kconfig | 2 +-
drivers/hwtracing/coresight/coresight-cpu-debug.c | 33 +-
drivers/hwtracing/coresight/coresight-etm-perf.c | 1 +
.../hwtracing/coresight/coresight-etm4x-sysfs.c | 13 +-
drivers/hwtracing/coresight/coresight-etm4x.c | 38 +-
drivers/hwtracing/coresight/coresight-funnel.c | 11 +-
drivers/hwtracing/coresight/coresight-platform.c | 11 +-
drivers/hwtracing/coresight/coresight-priv.h | 12 +-
drivers/hwtracing/coresight/coresight-replicator.c | 3 +-
drivers/hwtracing/coresight/coresight-tmc-etf.c | 23 +-
drivers/hwtracing/coresight/coresight-tmc-etr.c | 93 +-
drivers/hwtracing/coresight/coresight-tmc.c | 40 +
drivers/hwtracing/coresight/coresight-tmc.h | 11 +-
drivers/hwtracing/coresight/coresight.c | 4 +-
drivers/hwtracing/intel_th/Makefile | 3 +
drivers/hwtracing/intel_th/core.c | 10 +-
drivers/hwtracing/intel_th/msu-sink.c | 116 +
drivers/hwtracing/intel_th/msu.c | 537 +-
drivers/hwtracing/intel_th/msu.h | 22 +-
drivers/hwtracing/intel_th/pci.c | 10 +
drivers/hwtracing/intel_th/pti.h | 2 +-
drivers/hwtracing/stm/core.c | 10 +-
drivers/i2c/Kconfig | 4 +-
drivers/i2c/busses/Kconfig | 23 +-
drivers/i2c/busses/Makefile | 1 +
drivers/i2c/busses/i2c-amd-mp2-pci.c | 8 +-
drivers/i2c/busses/i2c-at91-core.c | 2 +-
drivers/i2c/busses/i2c-at91-master.c | 9 +-
drivers/i2c/busses/i2c-axxia.c | 152 +-
drivers/i2c/busses/i2c-bcm-iproc.c | 21 +-
drivers/i2c/busses/i2c-bcm2835.c | 11 +-
drivers/i2c/busses/i2c-cht-wc.c | 49 +-
drivers/i2c/busses/i2c-cros-ec-tunnel.c | 4 +-
drivers/i2c/busses/i2c-designware-master.c | 14 +-
drivers/i2c/busses/i2c-designware-pcidrv.c | 41 +-
drivers/i2c/busses/i2c-designware-platdrv.c | 22 +-
drivers/i2c/busses/i2c-designware-slave.c | 1 +
drivers/i2c/busses/i2c-emev2.c | 16 +-
drivers/i2c/busses/i2c-exynos5.c | 4 +-
drivers/i2c/busses/i2c-fsi.c | 4 +-
drivers/i2c/busses/i2c-hix5hd2.c | 3 +-
drivers/i2c/busses/i2c-i801.c | 163 +-
drivers/i2c/busses/i2c-icy.c | 230 +
drivers/i2c/busses/i2c-imx-lpi2c.c | 4 +-
drivers/i2c/busses/i2c-imx.c | 35 +-
drivers/i2c/busses/i2c-ismt.c | 2 -
drivers/i2c/busses/i2c-mt65xx.c | 11 +-
drivers/i2c/busses/i2c-mxs.c | 4 +-
drivers/i2c/busses/i2c-nvidia-gpu.c | 2 +-
drivers/i2c/busses/i2c-ocores.c | 5 +-
drivers/i2c/busses/i2c-piix4.c | 46 +-
drivers/i2c/busses/i2c-qcom-geni.c | 12 +-
drivers/i2c/busses/i2c-rcar.c | 11 +-
drivers/i2c/busses/i2c-riic.c | 1 +
drivers/i2c/busses/i2c-s3c2410.c | 1 +
drivers/i2c/busses/i2c-sprd.c | 25 +-
drivers/i2c/busses/i2c-stm32.h | 2 +-
drivers/i2c/busses/i2c-stm32f7.c | 2 +-
drivers/i2c/busses/i2c-synquacer.c | 2 +-
drivers/i2c/busses/i2c-taos-evm.c | 4 +-
drivers/i2c/busses/i2c-tegra.c | 56 +-
drivers/i2c/busses/i2c-uniphier-f.c | 26 +-
drivers/i2c/busses/i2c-uniphier.c | 22 +-
drivers/i2c/i2c-core-acpi.c | 9 +-
drivers/i2c/i2c-core-base.c | 26 +-
drivers/i2c/i2c-core-of.c | 7 +-
drivers/i2c/i2c-slave-eeprom.c | 54 +-
drivers/i3c/device.c | 53 +
drivers/i3c/master.c | 67 +-
drivers/i3c/master/dw-i3c-master.c | 4 +-
drivers/i3c/master/i3c-master-cdns.c | 30 +-
drivers/ide/Kconfig | 9 -
drivers/ide/Makefile | 1 -
drivers/ide/sgiioc4.c | 630 -
drivers/idle/intel_idle.c | 28 +-
drivers/iio/accel/Kconfig | 4 +-
drivers/iio/accel/cros_ec_accel_legacy.c | 356 +-
drivers/iio/accel/kxcjk-1013.c | 4 +-
drivers/iio/accel/mxc4005.c | 40 +-
drivers/iio/accel/sca3000.c | 2 +-
drivers/iio/accel/st_accel.h | 1 +
drivers/iio/accel/st_accel_buffer.c | 44 +-
drivers/iio/accel/st_accel_core.c | 32 +-
drivers/iio/accel/st_accel_i2c.c | 23 +-
drivers/iio/accel/st_accel_spi.c | 20 +-
drivers/iio/adc/Kconfig | 2 +-
drivers/iio/adc/ad7606.c | 100 +-
drivers/iio/adc/ad7606.h | 61 +-
drivers/iio/adc/ad7606_par.c | 4 +-
drivers/iio/adc/ad7606_spi.c | 282 +-
drivers/iio/adc/at91_adc.c | 4 +-
drivers/iio/adc/axp288_adc.c | 4 +-
drivers/iio/adc/bcm_iproc_adc.c | 7 +-
drivers/iio/adc/da9150-gpadc.c | 4 +-
drivers/iio/adc/envelope-detector.c | 5 +-
drivers/iio/adc/exynos_adc.c | 4 +-
drivers/iio/adc/fsl-imx25-gcq.c | 1 -
drivers/iio/adc/hi8435.c | 34 +-
drivers/iio/adc/imx7d_adc.c | 4 +-
drivers/iio/adc/ingenic-adc.c | 54 +
drivers/iio/adc/lpc32xx_adc.c | 4 +-
drivers/iio/adc/max1027.c | 38 +-
drivers/iio/adc/max9611.c | 4 +-
drivers/iio/adc/npcm_adc.c | 1 -
drivers/iio/adc/rcar-gyroadc.c | 4 +-
drivers/iio/adc/rockchip_saradc.c | 4 +-
drivers/iio/adc/sc27xx_adc.c | 122 +-
drivers/iio/adc/spear_adc.c | 1 -
drivers/iio/adc/stm32-adc-core.c | 194 +-
drivers/iio/adc/stm32-adc.c | 4 +-
drivers/iio/adc/stm32-dfsdm-adc.c | 5 +-
drivers/iio/adc/sun4i-gpadc-iio.c | 4 +-
drivers/iio/adc/twl6030-gpadc.c | 4 +-
drivers/iio/adc/vf610_adc.c | 4 +-
drivers/iio/common/cros_ec_sensors/Kconfig | 2 +-
.../iio/common/cros_ec_sensors/cros_ec_lid_angle.c | 3 +-
.../iio/common/cros_ec_sensors/cros_ec_sensors.c | 57 +-
.../common/cros_ec_sensors/cros_ec_sensors_core.c | 156 +-
.../iio/common/hid-sensors/hid-sensor-attributes.c | 69 +-
drivers/iio/common/st_sensors/Kconfig | 2 +
drivers/iio/common/st_sensors/st_sensors_buffer.c | 10 +-
drivers/iio/common/st_sensors/st_sensors_core.c | 118 +-
drivers/iio/common/st_sensors/st_sensors_i2c.c | 82 +-
drivers/iio/common/st_sensors/st_sensors_spi.c | 148 +-
drivers/iio/common/st_sensors/st_sensors_trigger.c | 31 +-
drivers/iio/dac/ad5380.c | 2 +-
drivers/iio/dummy/iio_simple_dummy.c | 4 +-
drivers/iio/frequency/adf4371.c | 8 +-
drivers/iio/gyro/st_gyro.h | 1 +
drivers/iio/gyro/st_gyro_buffer.c | 48 +-
drivers/iio/gyro/st_gyro_core.c | 32 +-
drivers/iio/gyro/st_gyro_i2c.c | 22 +-
drivers/iio/gyro/st_gyro_spi.c | 20 +-
drivers/iio/humidity/am2315.c | 24 +-
drivers/iio/humidity/hdc100x.c | 19 +-
drivers/iio/imu/Kconfig | 12 +
drivers/iio/imu/Makefile | 1 +
drivers/iio/imu/adis.c | 12 +
drivers/iio/imu/adis16460.c | 489 +
drivers/iio/imu/inv_mpu6050/Kconfig | 10 +-
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 46 +-
drivers/iio/imu/st_lsm6dsx/Kconfig | 11 +-
drivers/iio/imu/st_lsm6dsx/Makefile | 1 +
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 29 +-
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 36 +-
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 622 +-
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 15 +
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c | 57 +
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c | 15 +
drivers/iio/light/Kconfig | 11 +
drivers/iio/light/Makefile | 1 +
drivers/iio/light/apds9960.c | 2 +-
drivers/iio/light/cm3323.c | 33 +-
drivers/iio/light/cm36651.c | 12 +-
drivers/iio/light/cros_ec_light_prox.c | 54 +-
drivers/iio/light/noa1305.c | 313 +
drivers/iio/light/si1145.c | 42 +-
drivers/iio/light/stk3310.c | 9 +
drivers/iio/light/tsl2772.c | 124 +-
drivers/iio/light/veml6070.c | 6 +-
drivers/iio/magnetometer/mmc35240.c | 4 +-
drivers/iio/magnetometer/st_magn.h | 1 +
drivers/iio/magnetometer/st_magn_buffer.c | 31 +-
drivers/iio/magnetometer/st_magn_core.c | 32 +-
drivers/iio/magnetometer/st_magn_i2c.c | 22 +-
drivers/iio/magnetometer/st_magn_spi.c | 20 +-
drivers/iio/potentiometer/Kconfig | 11 +
drivers/iio/potentiometer/Makefile | 1 +
drivers/iio/potentiometer/max5432.c | 135 +
drivers/iio/pressure/cros_ec_baro.c | 22 +-
drivers/iio/pressure/hp03.c | 6 +-
drivers/iio/pressure/st_pressure.h | 1 +
drivers/iio/pressure/st_pressure_buffer.c | 39 +-
drivers/iio/pressure/st_pressure_core.c | 32 +-
drivers/iio/pressure/st_pressure_i2c.c | 31 +-
drivers/iio/pressure/st_pressure_spi.c | 22 +-
drivers/iio/proximity/Kconfig | 2 +-
drivers/iio/temperature/maxim_thermocouple.c | 25 +-
drivers/iio/trigger/stm32-timer-trigger.c | 84 -
drivers/infiniband/Kconfig | 1 +
drivers/infiniband/core/addr.c | 4 +-
drivers/infiniband/core/cache.c | 1 +
drivers/infiniband/core/cma.c | 8 +-
drivers/infiniband/core/cma_configfs.c | 8 +-
drivers/infiniband/core/core_priv.h | 29 +-
drivers/infiniband/core/counters.c | 35 +-
drivers/infiniband/core/cq.c | 28 +
drivers/infiniband/core/device.c | 231 +-
drivers/infiniband/core/fmr_pool.c | 13 -
drivers/infiniband/core/iwpm_msg.c | 17 +-
drivers/infiniband/core/iwpm_util.c | 15 +-
drivers/infiniband/core/mad.c | 20 +-
drivers/infiniband/core/netlink.c | 63 +-
drivers/infiniband/core/nldev.c | 31 +-
drivers/infiniband/core/restrack.c | 15 +-
drivers/infiniband/core/rw.c | 6 +-
drivers/infiniband/core/sa_query.c | 2 +-
drivers/infiniband/core/sysfs.c | 30 +-
drivers/infiniband/core/umem.c | 66 +-
drivers/infiniband/core/umem_odp.c | 528 +-
drivers/infiniband/core/user_mad.c | 8 +-
drivers/infiniband/core/uverbs_cmd.c | 8 +-
drivers/infiniband/core/uverbs_main.c | 5 +
drivers/infiniband/core/verbs.c | 1 +
drivers/infiniband/hw/bnxt_re/hw_counters.c | 2 +-
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 13 +-
drivers/infiniband/hw/bnxt_re/main.c | 1 -
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 8 +-
drivers/infiniband/hw/bnxt_re/qplib_rcfw.h | 11 +-
drivers/infiniband/hw/bnxt_re/qplib_res.c | 13 +-
drivers/infiniband/hw/bnxt_re/qplib_res.h | 2 +-
drivers/infiniband/hw/bnxt_re/qplib_sp.c | 14 +-
drivers/infiniband/hw/bnxt_re/qplib_sp.h | 7 +-
drivers/infiniband/hw/cxgb3/iwch_provider.c | 45 +-
drivers/infiniband/hw/cxgb4/provider.c | 24 -
drivers/infiniband/hw/efa/efa.h | 3 +
drivers/infiniband/hw/efa/efa_com.c | 70 +-
drivers/infiniband/hw/efa/efa_com_cmd.c | 165 +-
drivers/infiniband/hw/efa/efa_com_cmd.h | 23 +
drivers/infiniband/hw/efa/efa_main.c | 2 +
drivers/infiniband/hw/efa/efa_verbs.c | 91 +-
drivers/infiniband/hw/hfi1/chip.c | 13 +-
drivers/infiniband/hw/hfi1/chip.h | 1 +
drivers/infiniband/hw/hfi1/fault.c | 12 +-
drivers/infiniband/hw/hfi1/mad.c | 45 +-
drivers/infiniband/hw/hfi1/rc.c | 17 +-
drivers/infiniband/hw/hfi1/tid_rdma.c | 127 +-
drivers/infiniband/hw/hfi1/trace_tid.h | 38 +
drivers/infiniband/hw/hfi1/user_pages.c | 5 +-
drivers/infiniband/hw/hfi1/user_sdma.h | 6 -
drivers/infiniband/hw/hfi1/verbs.c | 21 +-
drivers/infiniband/hw/hfi1/vnic_sdma.c | 4 +-
drivers/infiniband/hw/hns/Kconfig | 14 +-
drivers/infiniband/hw/hns/Makefile | 8 +-
drivers/infiniband/hw/hns/hns_roce_ah.c | 23 +-
drivers/infiniband/hw/hns/hns_roce_cmd.c | 11 +-
drivers/infiniband/hw/hns/hns_roce_cq.c | 186 +-
drivers/infiniband/hw/hns/hns_roce_db.c | 15 +-
drivers/infiniband/hw/hns/hns_roce_device.h | 95 +-
drivers/infiniband/hw/hns/hns_roce_hem.c | 252 +-
drivers/infiniband/hw/hns/hns_roce_hem.h | 6 +-
drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 81 +-
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 1065 +-
drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 7 +-
drivers/infiniband/hw/hns/hns_roce_main.c | 11 +-
drivers/infiniband/hw/hns/hns_roce_mr.c | 434 +-
drivers/infiniband/hw/hns/hns_roce_qp.c | 359 +-
drivers/infiniband/hw/hns/hns_roce_srq.c | 296 +-
drivers/infiniband/hw/i40iw/i40iw_verbs.c | 11 -
drivers/infiniband/hw/mlx4/mad.c | 4 +-
drivers/infiniband/hw/mlx4/main.c | 3 +-
drivers/infiniband/hw/mlx4/mr.c | 7 +-
drivers/infiniband/hw/mlx4/qp.c | 242 +-
drivers/infiniband/hw/mlx5/cmd.c | 130 -
drivers/infiniband/hw/mlx5/cmd.h | 4 -
drivers/infiniband/hw/mlx5/devx.c | 38 +-
drivers/infiniband/hw/mlx5/flow.c | 34 +-
drivers/infiniband/hw/mlx5/main.c | 258 +-
drivers/infiniband/hw/mlx5/mem.c | 12 -
drivers/infiniband/hw/mlx5/mlx5_ib.h | 24 +-
drivers/infiniband/hw/mlx5/mr.c | 89 +-
drivers/infiniband/hw/mlx5/odp.c | 220 +-
drivers/infiniband/hw/mlx5/qp.c | 62 +-
drivers/infiniband/hw/mlx5/srq_cmd.c | 6 +-
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 4 +-
drivers/infiniband/hw/qedr/main.c | 12 +-
drivers/infiniband/hw/qedr/qedr.h | 2 +-
drivers/infiniband/hw/qedr/verbs.c | 7 +-
drivers/infiniband/hw/qib/qib_file_ops.c | 3 +-
drivers/infiniband/hw/qib/qib_fs.c | 2 +-
drivers/infiniband/hw/qib/qib_rc.c | 10 +-
drivers/infiniband/hw/qib/qib_sysfs.c | 2 +
drivers/infiniband/hw/qib/qib_user_pages.c | 5 +-
drivers/infiniband/hw/usnic/usnic_ib_main.c | 10 +-
drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 9 +-
drivers/infiniband/hw/usnic/usnic_uiom.c | 5 +-
drivers/infiniband/sw/rxe/rxe.h | 4 -
drivers/infiniband/sw/rxe/rxe_param.h | 2 +-
drivers/infiniband/sw/rxe/rxe_verbs.c | 6 +-
drivers/infiniband/sw/siw/Kconfig | 2 +-
drivers/infiniband/sw/siw/siw.h | 10 +-
drivers/infiniband/sw/siw/siw_cm.c | 116 +-
drivers/infiniband/sw/siw/siw_cq.c | 5 +-
drivers/infiniband/sw/siw/siw_main.c | 5 +-
drivers/infiniband/sw/siw/siw_mem.c | 24 +-
drivers/infiniband/sw/siw/siw_mem.h | 2 +-
drivers/infiniband/sw/siw/siw_qp.c | 22 +-
drivers/infiniband/sw/siw/siw_qp_rx.c | 26 +-
drivers/infiniband/sw/siw/siw_qp_tx.c | 101 +-
drivers/infiniband/sw/siw/siw_verbs.c | 59 +-
drivers/infiniband/ulp/ipoib/ipoib_ib.c | 3 +-
drivers/infiniband/ulp/iser/iscsi_iser.h | 7 +-
drivers/infiniband/ulp/srpt/ib_srpt.c | 4 +-
drivers/input/Makefile | 2 +-
drivers/input/evdev.c | 35 +-
drivers/input/input-poller.c | 213 +
drivers/input/input-poller.h | 18 +
drivers/input/input.c | 83 +-
drivers/input/joystick/Kconfig | 10 +
drivers/input/joystick/Makefile | 5 +-
drivers/input/joystick/fsia6b.c | 231 +
drivers/input/joystick/iforce/iforce-usb.c | 5 +
drivers/input/joystick/sidewinder.c | 2 +-
drivers/input/keyboard/Kconfig | 15 +-
drivers/input/keyboard/Makefile | 1 -
drivers/input/keyboard/applespi.c | 59 +-
drivers/input/keyboard/bcm-keypad.c | 4 +-
drivers/input/keyboard/cros_ec_keyb.c | 10 +-
drivers/input/keyboard/davinci_keyscan.c | 1 -
drivers/input/keyboard/gpio_keys.c | 13 +-
drivers/input/keyboard/imx_keypad.c | 4 +-
drivers/input/keyboard/lpc32xx-keys.c | 4 +-
drivers/input/keyboard/mpr121_touchkey.c | 3 +-
drivers/input/keyboard/nomadik-ske-keypad.c | 4 +-
drivers/input/keyboard/nspire-keypad.c | 4 +-
drivers/input/keyboard/opencores-kbd.c | 4 +-
drivers/input/keyboard/pmic8xxx-keypad.c | 8 +-
drivers/input/keyboard/pxa27x_keypad.c | 4 +-
drivers/input/keyboard/pxa930_rotary.c | 4 +-
drivers/input/keyboard/sh_keysc.c | 4 +-
drivers/input/keyboard/snvs_pwrkey.c | 4 +-
drivers/input/keyboard/spear-keyboard.c | 4 +-
drivers/input/keyboard/st-keyscan.c | 4 +-
drivers/input/keyboard/tegra-kbc.c | 4 +-
drivers/input/keyboard/w90p910_keypad.c | 264 -
drivers/input/matrix-keymap.c | 2 +-
drivers/input/misc/88pm80x_onkey.c | 1 -
drivers/input/misc/88pm860x_onkey.c | 4 +-
drivers/input/misc/Kconfig | 6 +-
drivers/input/misc/ab8500-ponkey.c | 8 +-
drivers/input/misc/axp20x-pek.c | 25 +-
drivers/input/misc/da9055_onkey.c | 5 +-
drivers/input/misc/da9063_onkey.c | 7 +-
drivers/input/misc/e3x0-button.c | 10 +-
drivers/input/misc/hisi_powerkey.c | 8 +-
drivers/input/misc/max8925_onkey.c | 8 +-
drivers/input/misc/pm8941-pwrkey.c | 4 +-
drivers/input/misc/rk805-pwrkey.c | 8 +-
drivers/input/misc/soc_button_array.c | 127 +-
drivers/input/misc/stpmic1_onkey.c | 10 +-
drivers/input/misc/tps65218-pwrbutton.c | 4 +-
drivers/input/misc/twl6040-vibra.c | 4 +-
drivers/input/mouse/alps.h | 11 -
drivers/input/mouse/byd.h | 11 -
drivers/input/mouse/cyapa.c | 16 +-
drivers/input/mouse/cypress_ps2.h | 11 -
drivers/input/mouse/elan_i2c_core.c | 20 +-
drivers/input/mouse/elantech.c | 55 +-
drivers/input/mouse/elantech.h | 18 +-
drivers/input/mouse/hgpk.h | 13 +-
drivers/input/mouse/lifebook.h | 13 +-
drivers/input/mouse/logips2pp.h | 7 -
drivers/input/mouse/pxa930_trkball.c | 4 +-
drivers/input/mouse/sentelic.h | 11 -
drivers/input/mouse/synaptics.c | 3 +-
drivers/input/mouse/touchkit_ps2.h | 8 -
drivers/input/mouse/trackpoint.h | 8 -
drivers/input/mouse/vmmouse.c | 6 +-
drivers/input/mouse/vmmouse.h | 11 -
drivers/input/rmi4/rmi_2d_sensor.c | 1 -
drivers/input/serio/arc_ps2.c | 4 +-
drivers/input/serio/hyperv-keyboard.c | 35 +-
drivers/input/serio/i8042.c | 25 +-
drivers/input/serio/ps2-gpio.c | 2 -
drivers/input/tablet/kbtab.c | 6 +-
drivers/input/touchscreen/88pm860x-ts.c | 4 +-
drivers/input/touchscreen/Kconfig | 9 -
drivers/input/touchscreen/Makefile | 1 -
drivers/input/touchscreen/ads7846.c | 38 +-
drivers/input/touchscreen/atmel_mxt_ts.c | 3 +-
drivers/input/touchscreen/bcm_iproc_tsc.c | 4 +-
drivers/input/touchscreen/bu21013_ts.c | 740 +-
drivers/input/touchscreen/edt-ft5x06.c | 2 -
drivers/input/touchscreen/fsl-imx25-tcq.c | 8 +-
drivers/input/touchscreen/hideep.c | 3 +-
drivers/input/touchscreen/imx6ul_tsc.c | 8 +-
drivers/input/touchscreen/lpc32xx_ts.c | 4 +-
drivers/input/touchscreen/mxs-lradc-ts.c | 10 +-
drivers/input/touchscreen/sun4i-ts.c | 3 +-
drivers/input/touchscreen/sur40.c | 4 +-
drivers/input/touchscreen/ts4800-ts.c | 4 +-
drivers/input/touchscreen/usbtouchscreen.c | 2 +
drivers/input/touchscreen/w90p910_ts.c | 331 -
drivers/input/touchscreen/wacom_w8001.c | 4 +-
drivers/interconnect/core.c | 27 +-
drivers/interconnect/qcom/Kconfig | 12 +
drivers/interconnect/qcom/Makefile | 4 +
drivers/interconnect/qcom/qcs404.c | 539 +
drivers/interconnect/qcom/sdm845.c | 160 +-
drivers/interconnect/qcom/smd-rpm.c | 77 +
drivers/interconnect/qcom/smd-rpm.h | 15 +
drivers/iommu/Kconfig | 3 +-
drivers/iommu/Makefile | 5 +-
drivers/iommu/amd_iommu.c | 371 +-
drivers/iommu/amd_iommu.h | 14 +
drivers/iommu/amd_iommu_init.c | 95 +-
drivers/iommu/amd_iommu_quirks.c | 92 +
drivers/iommu/amd_iommu_types.h | 22 +-
drivers/iommu/arm-smmu-impl.c | 174 +
drivers/iommu/arm-smmu-regs.h | 210 -
drivers/iommu/arm-smmu-v3.c | 993 +-
drivers/iommu/arm-smmu.c | 673 +-
drivers/iommu/arm-smmu.h | 402 +
drivers/iommu/dma-iommu.c | 70 +-
drivers/iommu/dmar.c | 77 +-
drivers/iommu/exynos-iommu.c | 9 +-
drivers/iommu/intel-iommu-debugfs.c | 6 +-
drivers/iommu/intel-iommu.c | 506 +-
drivers/iommu/intel-svm.c | 36 +-
drivers/iommu/intel-trace.c | 14 +
drivers/iommu/intel_irq_remapping.c | 6 +-
drivers/iommu/io-pgtable-arm-v7s.c | 145 +-
drivers/iommu/io-pgtable-arm.c | 48 +-
drivers/iommu/iommu.c | 217 +-
drivers/iommu/iova.c | 27 +-
drivers/iommu/ipmmu-vmsa.c | 106 +-
drivers/iommu/msm_iommu.c | 43 +-
drivers/iommu/mtk_iommu.c | 213 +-
drivers/iommu/mtk_iommu.h | 21 +-
drivers/iommu/mtk_iommu_v1.c | 11 +-
drivers/iommu/omap-iommu.c | 324 +-
drivers/iommu/omap-iommu.h | 9 +-
drivers/iommu/qcom_iommu.c | 72 +-
drivers/iommu/rockchip-iommu.c | 2 +-
drivers/iommu/s390-iommu.c | 3 +-
drivers/iommu/tegra-gart.c | 12 +-
drivers/iommu/tegra-smmu.c | 2 +-
drivers/iommu/virtio-iommu.c | 45 +-
drivers/irqchip/Kconfig | 12 +
drivers/irqchip/Makefile | 1 +
drivers/irqchip/irq-gic-common.c | 35 +-
drivers/irqchip/irq-gic-common.h | 2 +-
drivers/irqchip/irq-gic-v2m.c | 2 +-
drivers/irqchip/irq-gic-v3-its.c | 15 +-
drivers/irqchip/irq-gic-v3.c | 388 +-
drivers/irqchip/irq-gic.c | 14 +-
drivers/irqchip/irq-hip04.c | 9 +-
drivers/irqchip/irq-imgpdc.c | 8 +-
drivers/irqchip/irq-imx-gpcv2.c | 1 +
drivers/irqchip/irq-ingenic-tcu.c | 182 +
drivers/irqchip/irq-ixp4xx.c | 2 +-
drivers/irqchip/irq-keystone.c | 4 +-
drivers/irqchip/irq-mbigen.c | 9 +-
drivers/irqchip/irq-meson-gpio.c | 52 +-
drivers/irqchip/irq-mmp.c | 86 +-
drivers/irqchip/irq-sifive-plic.c | 12 +-
drivers/irqchip/irq-uniphier-aidet.c | 4 +-
drivers/irqchip/qcom-irq-combiner.c | 4 +-
drivers/isdn/capi/capi.c | 10 +-
drivers/isdn/hardware/mISDN/avmfritz.c | 3 +-
drivers/isdn/hardware/mISDN/hfcpci.c | 6 +-
drivers/isdn/hardware/mISDN/hfcsusb.c | 13 +-
drivers/isdn/hardware/mISDN/mISDNipac.c | 12 +-
drivers/isdn/hardware/mISDN/mISDNisar.c | 3 +-
drivers/isdn/hardware/mISDN/netjet.c | 3 +-
drivers/isdn/hardware/mISDN/w6692.c | 9 +-
drivers/isdn/mISDN/l1oip_core.c | 3 +-
drivers/isdn/mISDN/layer2.c | 9 +-
drivers/isdn/mISDN/socket.c | 2 +
drivers/isdn/mISDN/stack.c | 6 +-
drivers/isdn/mISDN/tei.c | 6 +-
drivers/leds/Kconfig | 6 +-
drivers/leds/led-class-flash.c | 9 +-
drivers/leds/led-class.c | 62 +-
drivers/leds/led-core.c | 136 +-
drivers/leds/led-triggers.c | 5 +-
drivers/leds/leds-aat1290.c | 16 +-
drivers/leds/leds-an30259a.c | 29 +-
drivers/leds/leds-apu.c | 157 +-
drivers/leds/leds-as3645a.c | 74 +-
drivers/leds/leds-cr0014114.c | 33 +-
drivers/leds/leds-gpio.c | 26 +-
drivers/leds/leds-is31fl319x.c | 3 +-
drivers/leds/leds-is31fl32xx.c | 8 +-
drivers/leds/leds-ktd2692.c | 4 +-
drivers/leds/leds-lm3532.c | 138 +-
drivers/leds/leds-lm3601x.c | 38 +-
drivers/leds/leds-lm36274.c | 4 +-
drivers/leds/leds-lm3692x.c | 22 +-
drivers/leds/leds-lm3697.c | 5 +-
drivers/leds/leds-lp5562.c | 6 +-
drivers/leds/leds-lp8860.c | 35 +-
drivers/leds/leds-lt3593.c | 20 +-
drivers/leds/leds-max77650.c | 44 +-
drivers/leds/leds-netxbig.c | 76 +-
drivers/leds/leds-ns2.c | 21 +-
drivers/leds/leds-pca9532.c | 2 +-
drivers/leds/leds-pwm.c | 11 +-
drivers/leds/leds-sc27xx-bltc.c | 22 +-
drivers/leds/leds-syscon.c | 2 +-
drivers/leds/leds-ti-lmu-common.c | 15 +-
drivers/leds/leds.h | 1 +
drivers/leds/trigger/ledtrig-gpio.c | 12 +-
drivers/lightnvm/core.c | 97 +-
drivers/lightnvm/pblk-core.c | 116 +-
drivers/lightnvm/pblk-gc.c | 19 +-
drivers/lightnvm/pblk-init.c | 38 +-
drivers/lightnvm/pblk-read.c | 26 +-
drivers/lightnvm/pblk-recovery.c | 42 +-
drivers/lightnvm/pblk-write.c | 20 +-
drivers/lightnvm/pblk.h | 31 +-
drivers/macintosh/smu.c | 1 +
drivers/macintosh/windfarm_cpufreq_clamp.c | 77 +-
drivers/mailbox/armada-37xx-rwtm-mailbox.c | 14 +-
drivers/mailbox/mtk-cmdq-mailbox.c | 18 +-
drivers/mailbox/qcom-apcs-ipc-mailbox.c | 16 +-
drivers/md/Kconfig | 27 +
drivers/md/Makefile | 6 +
drivers/md/bcache/closure.c | 10 +-
drivers/md/bcache/debug.c | 5 +-
drivers/md/bcache/super.c | 3 +
drivers/md/bcache/sysfs.c | 21 +-
drivers/md/dm-bufio.c | 196 +-
drivers/md/dm-clone-metadata.c | 964 +
drivers/md/dm-clone-metadata.h | 158 +
drivers/md/dm-clone-target.c | 2191 +
drivers/md/dm-crypt.c | 341 +-
drivers/md/dm-dust.c | 11 +-
drivers/md/dm-integrity.c | 25 +
drivers/md/dm-ioctl.c | 34 +-
drivers/md/dm-kcopyd.c | 5 +-
drivers/md/dm-raid.c | 12 +-
drivers/md/dm-raid1.c | 7 +-
drivers/md/dm-rq.c | 3 +-
drivers/md/dm-stats.c | 2 +-
drivers/md/dm-table.c | 27 +-
drivers/md/dm-verity-target.c | 43 +-
drivers/md/dm-verity-verify-sig.c | 133 +
drivers/md/dm-verity-verify-sig.h | 60 +
drivers/md/dm-verity.h | 2 +
drivers/md/dm-writecache.c | 27 +-
drivers/md/dm-zoned-metadata.c | 68 +-
drivers/md/dm-zoned-reclaim.c | 47 +-
drivers/md/dm-zoned-target.c | 66 +-
drivers/md/dm-zoned.h | 11 +
drivers/md/dm.c | 8 +-
drivers/md/dm.h | 5 -
drivers/md/md-linear.c | 5 +
drivers/md/md.c | 96 +-
drivers/md/md.h | 20 +
drivers/md/persistent-data/dm-btree.c | 31 +-
drivers/md/persistent-data/dm-space-map-common.c | 4 -
drivers/md/persistent-data/dm-space-map-metadata.c | 2 +-
drivers/md/raid0.c | 41 +-
drivers/md/raid0.h | 14 +
drivers/md/raid1.c | 89 +-
drivers/md/raid10.c | 32 +-
drivers/md/raid5.c | 27 +-
drivers/md/raid5.h | 5 +-
drivers/media/Kconfig | 7 +-
drivers/media/cec/cec-adap.c | 3 +
drivers/media/cec/cec-notifier.c | 2 +
drivers/media/common/saa7146/saa7146_video.c | 16 +-
drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 107 +
.../media/common/videobuf2/videobuf2-dma-contig.c | 23 +-
drivers/media/common/videobuf2/videobuf2-v4l2.c | 8 +-
drivers/media/dvb-core/dvb_frontend.c | 4 +-
drivers/media/dvb-core/dvbdev.c | 7 +-
drivers/media/dvb-frontends/Kconfig | 5 +-
drivers/media/dvb-frontends/cx24117.c | 4 +-
drivers/media/dvb-frontends/cx24123.c | 2 +-
drivers/media/dvb-frontends/cxd2099.c | 2 +-
drivers/media/dvb-frontends/cxd2820r_core.c | 9 +-
drivers/media/dvb-frontends/dib7000p.c | 7 +-
drivers/media/dvb-frontends/drx39xyj/drxj.c | 5 +-
drivers/media/dvb-frontends/dvb-pll.c | 40 +-
drivers/media/dvb-frontends/mn88443x.c | 6 +-
drivers/media/dvb-frontends/mn88472.c | 18 +-
drivers/media/dvb-frontends/mn88473.c | 18 +-
drivers/media/dvb-frontends/rtl2832_sdr.c | 3 -
drivers/media/dvb-frontends/si2168.c | 164 +-
drivers/media/dvb-frontends/si2168.h | 1 +
drivers/media/dvb-frontends/stv0900_core.c | 2 +-
drivers/media/dvb-frontends/zd1301_demod.c | 3 +-
drivers/media/firewire/firedtv-ci.c | 2 +-
drivers/media/i2c/Kconfig | 18 +-
drivers/media/i2c/Makefile | 1 +
drivers/media/i2c/ad9389b.c | 6 +-
drivers/media/i2c/adv7180.c | 12 +-
drivers/media/i2c/adv7343.c | 5 +-
drivers/media/i2c/adv748x/adv748x-core.c | 19 +-
drivers/media/i2c/adv7511-v4l2.c | 28 +-
drivers/media/i2c/adv7604.c | 22 +-
drivers/media/i2c/adv7842.c | 42 +-
drivers/media/i2c/et8ek8/et8ek8_driver.c | 5 +-
drivers/media/i2c/imx274.c | 5 +-
drivers/media/i2c/ir-kbd-i2c.c | 14 +-
drivers/media/i2c/max2175.c | 5 +-
drivers/media/i2c/mt9m001.c | 5 +-
drivers/media/i2c/mt9m111.c | 7 +-
drivers/media/i2c/ov2640.c | 7 +-
drivers/media/i2c/ov2659.c | 9 +-
drivers/media/i2c/ov2680.c | 9 +-
drivers/media/i2c/ov5640.c | 14 +-
drivers/media/i2c/ov5645.c | 151 +-
drivers/media/i2c/ov5647.c | 5 +-
drivers/media/i2c/ov5675.c | 1183 +
drivers/media/i2c/ov5695.c | 5 +-
drivers/media/i2c/ov7670.c | 6 +-
drivers/media/i2c/ov772x.c | 5 +-
drivers/media/i2c/ov7740.c | 13 +-
drivers/media/i2c/ov8856.c | 5 +-
drivers/media/i2c/ov9650.c | 10 +-
drivers/media/i2c/s5c73m3/s5c73m3-core.c | 5 +-
drivers/media/i2c/s5k5baf.c | 5 +-
drivers/media/i2c/s5k6a3.c | 5 +-
drivers/media/i2c/smiapp/smiapp-core.c | 5 +-
drivers/media/i2c/tc358743.c | 5 +-
drivers/media/i2c/tda1997x.c | 9 +-
drivers/media/i2c/ths8200.c | 5 +-
drivers/media/i2c/tvp5150.c | 9 +-
drivers/media/i2c/tvp7002.c | 4 +-
drivers/media/pci/bt8xx/bttv-driver.c | 19 -
drivers/media/pci/bt8xx/bttv-input.c | 4 +-
drivers/media/pci/bt8xx/bttv-risc.c | 8 +-
drivers/media/pci/bt8xx/bttvp.h | 1 -
drivers/media/pci/bt8xx/dvb-bt8xx.c | 2 +-
drivers/media/pci/cobalt/cobalt-driver.c | 40 +-
drivers/media/pci/cobalt/cobalt-driver.h | 63 +-
drivers/media/pci/cobalt/cobalt-flash.c | 2 +-
drivers/media/pci/cobalt/cobalt-v4l2.c | 6 -
drivers/media/pci/cx18/cx18-ioctl.c | 2 +-
drivers/media/pci/cx18/cx18-mailbox.c | 2 +-
drivers/media/pci/cx23885/cx23885-417.c | 1 -
drivers/media/pci/cx23885/cx23885-video.c | 7 +-
drivers/media/pci/cx23885/cx23885.h | 1 -
drivers/media/pci/cx25821/cx25821-video.c | 7 +-
drivers/media/pci/cx25821/cx25821.h | 1 -
drivers/media/pci/cx88/cx88-blackbird.c | 2 -
drivers/media/pci/cx88/cx88-video.c | 17 +-
drivers/media/pci/cx88/cx88.h | 1 -
drivers/media/pci/dt3155/dt3155.c | 1 -
drivers/media/pci/intel/ipu3/ipu3-cio2.c | 100 +-
drivers/media/pci/ivtv/ivtv-driver.c | 2 +-
drivers/media/pci/ivtv/ivtv-ioctl.c | 4 +-
drivers/media/pci/ivtv/ivtv-irq.h | 28 +-
drivers/media/pci/ivtv/ivtv-mailbox.c | 2 -
drivers/media/pci/mantis/mantis_reg.h | 152 +-
drivers/media/pci/meye/meye.c | 3 -
drivers/media/pci/ngene/ngene-core.c | 4 -
drivers/media/pci/pt1/pt1.c | 6 +-
drivers/media/pci/pt3/pt3.c | 6 +-
drivers/media/pci/saa7134/saa7134-dvb.c | 14 +
drivers/media/pci/saa7134/saa7134-empress.c | 2 -
drivers/media/pci/saa7134/saa7134-i2c.c | 12 +-
drivers/media/pci/saa7134/saa7134-tvaudio.c | 1 -
drivers/media/pci/saa7134/saa7134-video.c | 28 +-
drivers/media/pci/saa7134/saa7134.h | 1 -
drivers/media/pci/saa7146/hexium_gemini.c | 3 +
drivers/media/pci/saa7164/saa7164-encoder.c | 1 -
drivers/media/pci/solo6x10/solo6x10-gpio.c | 6 +-
drivers/media/pci/solo6x10/solo6x10-regs.h | 286 +-
drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c | 9 -
drivers/media/pci/solo6x10/solo6x10-v4l2.c | 4 -
drivers/media/pci/sta2x11/sta2x11_vip.c | 2 -
drivers/media/pci/ttpci/av7110_hw.c | 1 -
drivers/media/pci/ttpci/av7110_ir.c | 14 +-
drivers/media/pci/tw68/tw68-video.c | 14 -
drivers/media/pci/tw68/tw68.h | 1 -
drivers/media/platform/Kconfig | 9 +-
drivers/media/platform/Makefile | 2 +-
drivers/media/platform/am437x/am437x-vpfe.c | 30 +-
drivers/media/platform/am437x/am437x-vpfe.h | 6 -
drivers/media/platform/am437x/am437x-vpfe_regs.h | 26 +-
drivers/media/platform/aspeed-video.c | 6 +-
drivers/media/platform/atmel/atmel-isi.c | 2 +-
drivers/media/platform/atmel/atmel-sama5d2-isc.c | 7 +-
drivers/media/platform/cadence/cdns-csi2tx.c | 155 +-
drivers/media/platform/coda/coda-common.c | 4 +-
drivers/media/platform/cros-ec-cec/cros-ec-cec.c | 74 +-
drivers/media/platform/davinci/dm644x_ccdc_regs.h | 20 +-
drivers/media/platform/davinci/vpbe_display.c | 21 +-
drivers/media/platform/davinci/vpbe_osd.c | 5 -
drivers/media/platform/davinci/vpbe_venc.c | 5 -
drivers/media/platform/davinci/vpfe_capture.c | 54 +-
drivers/media/platform/davinci/vpif_capture.c | 33 +-
drivers/media/platform/davinci/vpif_display.c | 7 +-
drivers/media/platform/exynos-gsc/gsc-core.c | 22 -
drivers/media/platform/exynos-gsc/gsc-core.h | 2 -
drivers/media/platform/exynos4-is/fimc-capture.c | 3 -
drivers/media/platform/exynos4-is/fimc-core.c | 20 -
drivers/media/platform/exynos4-is/fimc-is.c | 2 +-
drivers/media/platform/exynos4-is/fimc-isp-video.c | 1 -
drivers/media/platform/exynos4-is/fimc-isp.c | 3 -
drivers/media/platform/exynos4-is/fimc-lite-reg.h | 80 +-
drivers/media/platform/exynos4-is/fimc-lite.c | 8 -
drivers/media/platform/exynos4-is/fimc-m2m.c | 1 -
drivers/media/platform/exynos4-is/fimc-reg.h | 138 +-
drivers/media/platform/exynos4-is/media-dev.c | 2 +
drivers/media/platform/exynos4-is/mipi-csis.c | 10 +-
drivers/media/platform/fsl-viu.c | 11 +-
drivers/media/platform/imx-pxp.c | 4 +-
drivers/media/platform/m2m-deinterlace.c | 140 +-
drivers/media/platform/marvell-ccic/mcam-core.c | 15 +-
drivers/media/platform/marvell-ccic/mmp-driver.c | 1 +
drivers/media/platform/meson/ao-cec-g12a.c | 84 +-
drivers/media/platform/meson/ao-cec.c | 44 +-
drivers/media/platform/mtk-mdp/mtk_mdp_core.c | 9 +-
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 4 +
drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h | 1 +
.../media/platform/mtk-vcodec/vdec/vdec_h264_if.c | 16 +-
drivers/media/platform/mx2_emmaprp.c | 141 +-
drivers/media/platform/omap/Kconfig | 3 +-
drivers/media/platform/omap/omap_vout.c | 1045 +-
drivers/media/platform/omap/omap_vout_vrfb.c | 29 +-
drivers/media/platform/omap/omap_vout_vrfb.h | 4 +-
drivers/media/platform/omap/omap_voutdef.h | 45 +-
drivers/media/platform/omap/omap_voutlib.c | 6 +-
drivers/media/platform/omap3isp/isp.c | 340 +-
drivers/media/platform/omap3isp/ispccdc.c | 1 +
drivers/media/platform/omap3isp/ispccp2.c | 1 +
drivers/media/platform/omap3isp/ispcsi2.c | 1 +
drivers/media/platform/omap3isp/isppreview.c | 1 +
drivers/media/platform/omap3isp/ispreg.h | 584 +-
drivers/media/platform/omap3isp/ispresizer.c | 1 +
drivers/media/platform/omap3isp/ispstat.c | 2 +
drivers/media/platform/omap3isp/ispvideo.c | 15 +-
drivers/media/platform/pxa_camera.c | 7 +-
drivers/media/platform/qcom/camss/camss.c | 2 +-
drivers/media/platform/qcom/venus/core.c | 2 +-
drivers/media/platform/qcom/venus/core.h | 33 +-
drivers/media/platform/qcom/venus/helpers.c | 199 +-
drivers/media/platform/qcom/venus/helpers.h | 11 +
drivers/media/platform/qcom/venus/hfi.c | 11 +-
drivers/media/platform/qcom/venus/hfi.h | 2 +-
drivers/media/platform/qcom/venus/vdec.c | 548 +-
drivers/media/platform/qcom/venus/vdec_ctrls.c | 7 +-
drivers/media/platform/qcom/venus/venc.c | 13 +-
drivers/media/platform/rcar-vin/rcar-core.c | 55 +-
drivers/media/platform/rcar-vin/rcar-dma.c | 56 +-
drivers/media/platform/rcar-vin/rcar-v4l2.c | 68 +-
drivers/media/platform/rcar-vin/rcar-vin.h | 9 +-
drivers/media/platform/rcar_fdp1.c | 3 +-
drivers/media/platform/renesas-ceu.c | 4 +-
drivers/media/platform/rockchip/rga/rga.c | 1 -
drivers/media/platform/s3c-camif/camif-capture.c | 16 +-
drivers/media/platform/s3c-camif/camif-core.c | 10 +-
drivers/media/platform/s3c-camif/camif-core.h | 1 -
drivers/media/platform/s3c-camif/camif-regs.h | 118 +-
drivers/media/platform/s5p-cec/s5p_cec.c | 23 +-
drivers/media/platform/s5p-g2d/g2d.c | 13 +-
drivers/media/platform/s5p-g2d/g2d.h | 1 -
drivers/media/platform/s5p-jpeg/jpeg-core.c | 31 +-
drivers/media/platform/s5p-jpeg/jpeg-core.h | 2 -
drivers/media/platform/s5p-jpeg/jpeg-regs.h | 10 +-
drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 1 -
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 19 +-
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 14 +-
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 4 +-
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 2 +-
drivers/media/platform/seco-cec/seco-cec.c | 55 +-
drivers/media/platform/sh_veu.c | 28 +-
drivers/media/platform/sh_vou.c | 17 +-
drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 6 +-
.../media/platform/sti/c8sectpfe/c8sectpfe-core.c | 8 +-
drivers/media/platform/sti/cec/stih-cec.c | 32 +-
drivers/media/platform/sti/hva/hva-hw.c | 8 +-
drivers/media/platform/stm32/stm32-dcmi.c | 323 +-
drivers/media/platform/sunxi/Kconfig | 2 +
drivers/media/platform/sunxi/Makefile | 2 +
drivers/media/platform/sunxi/sun4i-csi/Kconfig | 11 +
drivers/media/platform/sunxi/sun4i-csi/Makefile | 5 +
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c | 314 +
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.h | 160 +
drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c | 454 +
.../media/platform/sunxi/sun4i-csi/sun4i_v4l2.c | 385 +
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 7 +-
drivers/media/platform/tegra-cec/tegra_cec.c | 35 +-
drivers/media/platform/tegra-cec/tegra_cec.h | 82 +-
drivers/media/platform/ti-vpe/cal.c | 6 +-
drivers/media/platform/ti-vpe/vpdma.c | 10 +-
drivers/media/platform/ti-vpe/vpe.c | 12 -
drivers/media/platform/ti-vpe/vpe_regs.h | 94 +-
drivers/media/platform/via-camera.c | 579 +-
drivers/media/platform/vicodec/codec-v4l2-fwht.c | 30 +-
drivers/media/platform/vicodec/vicodec-core.c | 14 +-
drivers/media/platform/vimc/vimc-capture.c | 76 +-
drivers/media/platform/vimc/vimc-common.c | 309 +-
drivers/media/platform/vimc/vimc-common.h | 58 +-
drivers/media/platform/vimc/vimc-debayer.c | 88 +-
drivers/media/platform/vimc/vimc-scaler.c | 68 +-
drivers/media/platform/vimc/vimc-sensor.c | 57 +-
drivers/media/platform/vimc/vimc-streamer.c | 40 +-
drivers/media/platform/vimc/vimc-streamer.h | 14 -
drivers/media/platform/vivid/vivid-core.c | 12 +-
drivers/media/platform/vivid/vivid-ctrls.c | 26 +-
drivers/media/platform/vivid/vivid-kthread-cap.c | 9 +-
drivers/media/platform/vivid/vivid-vid-common.c | 132 +-
drivers/media/platform/vsp1/vsp1_dl.c | 4 +-
drivers/media/platform/vsp1/vsp1_histo.c | 3 +-
drivers/media/platform/vsp1/vsp1_regs.h | 224 +-
drivers/media/platform/vsp1/vsp1_video.c | 10 +-
drivers/media/platform/xilinx/xilinx-dma.c | 18 +-
drivers/media/platform/xilinx/xilinx-vip.c | 16 +-
drivers/media/platform/xilinx/xilinx-vip.h | 31 +-
drivers/media/platform/xilinx/xilinx-vipp.c | 2 +-
drivers/media/radio/radio-gemtek.c | 2 +-
drivers/media/radio/radio-trust.c | 1 -
drivers/media/radio/si470x/radio-si470x-i2c.c | 5 +-
drivers/media/radio/si470x/radio-si470x-usb.c | 5 +-
drivers/media/radio/si4713/si4713.c | 5 +-
drivers/media/radio/wl128x/fmdrv_common.h | 88 +-
drivers/media/rc/iguanair.c | 15 +-
drivers/media/rc/img-ir/img-ir-core.c | 4 +-
drivers/media/rc/imon.c | 7 +-
drivers/media/rc/imon_raw.c | 43 +-
drivers/media/rc/ir-hix5hd2.c | 4 +-
drivers/media/rc/keymaps/Makefile | 7 +
drivers/media/rc/keymaps/rc-imon-rsc.c | 7 +-
drivers/media/rc/keymaps/rc-khadas.c | 54 +
drivers/media/rc/keymaps/rc-odroid.c | 54 +
drivers/media/rc/keymaps/rc-tanix-tx3mini.c | 77 +
drivers/media/rc/keymaps/rc-tanix-tx5max.c | 68 +
drivers/media/rc/keymaps/rc-wetek-hub.c | 53 +
drivers/media/rc/keymaps/rc-wetek-play2.c | 93 +
drivers/media/rc/keymaps/rc-x96max.c | 83 +
drivers/media/rc/mceusb.c | 401 +-
drivers/media/rc/meson-ir.c | 4 +-
drivers/media/rc/mtk-cir.c | 14 +-
drivers/media/rc/sunxi-cir.c | 89 +-
drivers/media/spi/Kconfig | 5 +-
drivers/media/tuners/Kconfig | 6 +-
drivers/media/tuners/tuner-xc2028.c | 3 +-
drivers/media/tuners/xc4000.c | 3 +-
drivers/media/usb/airspy/airspy.c | 3 -
drivers/media/usb/au0828/au0828-video.c | 6 -
drivers/media/usb/cpia2/cpia2_usb.c | 4 +
drivers/media/usb/cpia2/cpia2_v4l.c | 25 +-
drivers/media/usb/cx231xx/cx231xx-417.c | 2 +-
drivers/media/usb/cx231xx/cx231xx-cards.c | 4 +-
drivers/media/usb/cx231xx/cx231xx-core.c | 2 +-
drivers/media/usb/cx231xx/cx231xx-video.c | 4 +-
drivers/media/usb/cx231xx/cx231xx.h | 1 -
drivers/media/usb/dvb-usb-v2/dvbsky.c | 26 +-
drivers/media/usb/dvb-usb-v2/ec168.c | 2 +-
drivers/media/usb/dvb-usb-v2/gl861.c | 2 +-
drivers/media/usb/dvb-usb/cxusb.c | 161 -
drivers/media/usb/dvb-usb/dib0700_devices.c | 8 +
drivers/media/usb/dvb-usb/pctv452e.c | 8 -
drivers/media/usb/dvb-usb/technisat-usb2.c | 22 +-
drivers/media/usb/em28xx/em28xx-cards.c | 4 +-
drivers/media/usb/em28xx/em28xx-core.c | 2 +-
drivers/media/usb/em28xx/em28xx-video.c | 11 +-
drivers/media/usb/em28xx/em28xx.h | 4 +-
drivers/media/usb/go7007/go7007-v4l2.c | 11 -
drivers/media/usb/go7007/s2250-board.c | 6 +-
drivers/media/usb/go7007/snd-go7007.c | 2 +-
drivers/media/usb/gspca/gspca.c | 37 +-
drivers/media/usb/gspca/konica.c | 5 +
drivers/media/usb/gspca/nw80x.c | 5 +
drivers/media/usb/gspca/ov519.c | 10 +
drivers/media/usb/gspca/ov534.c | 5 +
drivers/media/usb/gspca/ov534_9.c | 1 +
drivers/media/usb/gspca/se401.c | 5 +
drivers/media/usb/gspca/sn9c20x.c | 12 +
drivers/media/usb/gspca/sonixb.c | 5 +
drivers/media/usb/gspca/sonixj.c | 5 +
drivers/media/usb/gspca/spca1528.c | 5 +
drivers/media/usb/gspca/sq930x.c | 5 +
drivers/media/usb/gspca/sunplus.c | 5 +
drivers/media/usb/gspca/vc032x.c | 5 +
drivers/media/usb/gspca/w996Xcf.c | 5 +
drivers/media/usb/hdpvr/hdpvr-core.c | 13 +-
drivers/media/usb/hdpvr/hdpvr-i2c.c | 6 +-
drivers/media/usb/hdpvr/hdpvr-video.c | 3 -
drivers/media/usb/msi2500/msi2500.c | 8 -
drivers/media/usb/pvrusb2/pvrusb2-eeprom.c | 3 +-
drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 19 +-
drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 4 +-
drivers/media/usb/pwc/pwc-v4l.c | 5 -
drivers/media/usb/s2255/s2255drv.c | 10 -
drivers/media/usb/stk1160/stk1160-v4l.c | 2 -
drivers/media/usb/stk1160/stk1160.h | 1 -
drivers/media/usb/stkwebcam/stk-webcam.c | 5 -
drivers/media/usb/tm6000/tm6000-cards.c | 2 +-
drivers/media/usb/tm6000/tm6000-dvb.c | 3 +
drivers/media/usb/tm6000/tm6000-video.c | 4 -
drivers/media/usb/tm6000/tm6000.h | 1 -
drivers/media/usb/ttusb-dec/ttusb_dec.c | 2 +-
drivers/media/usb/usbtv/usbtv-video.c | 2 -
drivers/media/usb/usbvision/usbvision-video.c | 28 +-
drivers/media/usb/usbvision/usbvision.h | 1 -
drivers/media/usb/uvc/uvc_v4l2.c | 2 -
drivers/media/usb/zr364xx/zr364xx.c | 11 +-
drivers/media/v4l2-core/Kconfig | 5 +
drivers/media/v4l2-core/Makefile | 15 +-
drivers/media/v4l2-core/v4l2-async.c | 28 +-
drivers/media/v4l2-core/v4l2-common.c | 218 +-
drivers/media/v4l2-core/v4l2-ctrls.c | 305 +-
drivers/media/v4l2-core/v4l2-dev.c | 7 +-
drivers/media/v4l2-core/v4l2-device.c | 39 +-
drivers/media/v4l2-core/v4l2-fwnode.c | 31 +-
drivers/media/v4l2-core/v4l2-i2c.c | 184 +
drivers/media/v4l2-core/v4l2-ioctl.c | 74 +-
drivers/media/v4l2-core/v4l2-mem2mem.c | 47 +-
drivers/media/v4l2-core/v4l2-spi.c | 78 +
drivers/media/v4l2-core/v4l2-subdev.c | 8 +-
drivers/media/v4l2-core/videobuf-core.c | 5 +-
drivers/media/v4l2-core/videobuf-dma-contig.c | 9 +-
drivers/memory/mtk-smi.c | 268 +-
drivers/memstick/core/ms_block.c | 2 +-
drivers/memstick/host/r592.c | 6 +-
drivers/mfd/88pm800.c | 12 +-
drivers/mfd/88pm860x-core.c | 6 +-
drivers/mfd/Kconfig | 48 +-
drivers/mfd/Makefile | 9 +-
drivers/mfd/aat2870-core.c | 13 +-
drivers/mfd/ab3100-core.c | 53 +-
drivers/mfd/ab3100-otp.c | 21 +-
drivers/mfd/ab8500-debugfs.c | 332 +-
drivers/mfd/altera-sysmgr.c | 14 +-
drivers/mfd/asic3.c | 2 +-
drivers/mfd/bcm590xx.c | 6 +-
drivers/mfd/cros_ec.c | 279 -
drivers/mfd/cros_ec_dev.c | 463 +-
drivers/mfd/cros_ec_dev.h | 35 -
drivers/mfd/da9150-core.c | 6 +-
drivers/mfd/davinci_voicecodec.c | 9 +-
drivers/mfd/db8500-prcmu.c | 99 +-
drivers/mfd/ezx-pcap.c | 53 +-
drivers/mfd/fsl-imx25-tsadc.c | 4 +-
drivers/mfd/htc-i2cpld.c | 3 +-
drivers/mfd/intel-lpss-acpi.c | 26 +
drivers/mfd/intel-lpss-pci.c | 25 +
drivers/mfd/intel-lpss.c | 39 +-
drivers/mfd/intel_soc_pmic_bxtwc.c | 4 +-
drivers/mfd/intel_soc_pmic_mrfld.c | 157 +
drivers/mfd/jz4740-adc.c | 324 -
drivers/mfd/max14577.c | 6 +-
drivers/mfd/max77620.c | 4 +-
drivers/mfd/max77693.c | 12 +-
drivers/mfd/max77843.c | 6 +-
drivers/mfd/max8907.c | 6 +-
drivers/mfd/max8925-i2c.c | 12 +-
drivers/mfd/max8997.c | 18 +-
drivers/mfd/max8998.c | 6 +-
drivers/mfd/mt6397-core.c | 192 +-
drivers/mfd/mt6397-irq.c | 181 +
drivers/mfd/omap-usb-host.c | 4 +-
drivers/mfd/palmas.c | 6 +-
drivers/mfd/qcom_rpm.c | 12 +-
drivers/mfd/rk808.c | 6 +-
drivers/mfd/sm501.c | 5 +-
drivers/mfd/syscon.c | 46 +-
drivers/mfd/timberdale.c | 3 +-
drivers/mfd/tps80031.c | 23 +-
drivers/mfd/twl-core.c | 6 +-
drivers/misc/Kconfig | 27 +-
drivers/misc/Makefile | 2 -
drivers/misc/cardreader/alcor_pci.c | 6 +-
drivers/misc/cxl/main.c | 4 +
drivers/misc/eeprom/Kconfig | 8 +-
drivers/misc/eeprom/at24.c | 3 +-
drivers/misc/eeprom/ee1004.c | 6 +-
drivers/misc/eeprom/max6875.c | 6 +-
drivers/misc/fastrpc.c | 79 +-
drivers/misc/habanalabs/asid.c | 2 +-
drivers/misc/habanalabs/command_buffer.c | 3 +-
drivers/misc/habanalabs/command_submission.c | 29 +-
drivers/misc/habanalabs/context.c | 40 +-
drivers/misc/habanalabs/debugfs.c | 16 +-
drivers/misc/habanalabs/device.c | 493 +-
drivers/misc/habanalabs/firmware_if.c | 22 +-
drivers/misc/habanalabs/goya/goya.c | 178 +-
drivers/misc/habanalabs/goya/goyaP.h | 21 +-
drivers/misc/habanalabs/goya/goya_coresight.c | 89 +-
drivers/misc/habanalabs/goya/goya_hwmgr.c | 109 +
drivers/misc/habanalabs/habanalabs.h | 150 +-
drivers/misc/habanalabs/habanalabs_drv.c | 171 +-
drivers/misc/habanalabs/habanalabs_ioctl.c | 180 +-
drivers/misc/habanalabs/hw_queue.c | 32 +-
drivers/misc/habanalabs/hwmon.c | 24 +-
drivers/misc/habanalabs/include/armcp_if.h | 85 +-
drivers/misc/habanalabs/include/goya/goya.h | 2 +
.../misc/habanalabs/include/goya/goya_packets.h | 13 +
.../misc/habanalabs/include/goya/goya_reg_map.h | 34 +
drivers/misc/habanalabs/irq.c | 31 +-
drivers/misc/habanalabs/memory.c | 2 +
drivers/misc/habanalabs/sysfs.c | 126 +-
drivers/misc/ioc4.c | 498 -
drivers/misc/lkdtm/Makefile | 1 +
drivers/misc/lkdtm/bugs.c | 11 +-
drivers/misc/lkdtm/cfi.c | 42 +
drivers/misc/lkdtm/core.c | 2 +
drivers/misc/lkdtm/lkdtm.h | 4 +
drivers/misc/mei/hw-me-regs.h | 5 +
drivers/misc/mei/main.c | 9 +-
drivers/misc/mei/pci-me.c | 24 +-
drivers/misc/mei/pci-txe.c | 19 +-
drivers/misc/mic/card/mic_x100.c | 28 +-
drivers/misc/mic/scif/scif_epd.h | 5 +-
drivers/misc/ocxl/main.c | 4 +
drivers/misc/sgi-gru/grufile.c | 1 +
drivers/misc/sgi-gru/grutables.h | 2 -
drivers/misc/sgi-gru/grutlbpurge.c | 84 +-
drivers/misc/sgi-xp/Makefile | 13 +-
drivers/misc/sgi-xp/xp.h | 19 -
drivers/misc/sgi-xp/xp_main.c | 8 +-
drivers/misc/sgi-xp/xp_nofault.S | 35 -
drivers/misc/sgi-xp/xp_sn2.c | 190 -
drivers/misc/sgi-xp/xp_uv.c | 9 +-
drivers/misc/sgi-xp/xpc.h | 273 -
drivers/misc/sgi-xp/xpc_main.c | 31 +-
drivers/misc/sgi-xp/xpc_partition.c | 5 -
drivers/misc/sgi-xp/xpc_sn2.c | 2459 -
drivers/misc/sgi-xp/xpc_uv.c | 20 +-
drivers/misc/sgi-xp/xpnet.c | 2 +-
drivers/misc/spear13xx_pcie_gadget.c | 797 -
drivers/misc/vmw_balloon.c | 10 +-
drivers/misc/vmw_vmci/vmci_doorbell.c | 6 +-
drivers/misc/xilinx_sdfec.c | 1214 +-
drivers/mmc/core/mmc_ops.c | 2 +-
drivers/mmc/core/queue.c | 46 +-
drivers/mmc/core/sd.c | 6 +
drivers/mmc/core/sdio.c | 4 +-
drivers/mmc/core/sdio_irq.c | 57 +-
drivers/mmc/host/Kconfig | 13 +
drivers/mmc/host/Makefile | 3 +-
drivers/mmc/host/atmel-mci.c | 4 +
drivers/mmc/host/bcm2835.c | 5 +-
drivers/mmc/host/cavium.c | 4 +-
drivers/mmc/host/dw_mmc-hi3798cv200.c | 2 +-
drivers/mmc/host/dw_mmc.c | 7 +-
drivers/mmc/host/jz4740_mmc.c | 19 +-
drivers/mmc/host/meson-gx-mmc.c | 1 -
drivers/mmc/host/meson-mx-sdio.c | 2 +-
drivers/mmc/host/mmc_spi.c | 2 +-
drivers/mmc/host/mmci.c | 69 +-
drivers/mmc/host/mtk-sd.c | 29 +-
drivers/mmc/host/mxcmmc.c | 4 +-
drivers/mmc/host/mxs-mmc.c | 4 +-
drivers/mmc/host/renesas_sdhi_core.c | 19 +-
drivers/mmc/host/renesas_sdhi_internal_dmac.c | 2 +-
drivers/mmc/host/renesas_sdhi_sys_dmac.c | 36 -
drivers/mmc/host/s3cmci.c | 1 -
drivers/mmc/host/sdhci-acpi.c | 2 +-
drivers/mmc/host/sdhci-cadence.c | 8 +-
drivers/mmc/host/sdhci-esdhc-imx.c | 36 +-
drivers/mmc/host/sdhci-iproc.c | 9 +
drivers/mmc/host/sdhci-msm.c | 2 -
drivers/mmc/host/sdhci-of-arasan.c | 15 +
drivers/mmc/host/sdhci-of-aspeed.c | 342 +
drivers/mmc/host/sdhci-of-at91.c | 5 +-
drivers/mmc/host/sdhci-of-esdhc.c | 8 +-
drivers/mmc/host/sdhci-pci-core.c | 19 +-
drivers/mmc/host/sdhci-pci-gli.c | 352 +
drivers/mmc/host/sdhci-pci-o2micro.c | 313 +-
drivers/mmc/host/sdhci-pci.h | 6 +
drivers/mmc/host/sdhci-pltfm.c | 5 +-
drivers/mmc/host/sdhci-pxav3.c | 2 +-
drivers/mmc/host/sdhci-s3c.c | 7 +-
drivers/mmc/host/sdhci-sprd.c | 33 +-
drivers/mmc/host/sdhci-tegra.c | 62 +-
drivers/mmc/host/sdhci-xenon.c | 2 +-
drivers/mmc/host/sdhci.c | 107 +-
drivers/mmc/host/sdhci.h | 15 +-
drivers/mmc/host/sdhci_f_sdh30.c | 4 +-
drivers/mmc/host/tmio_mmc.c | 5 -
drivers/mmc/host/tmio_mmc.h | 1 +
drivers/mmc/host/tmio_mmc_core.c | 27 +-
drivers/mmc/host/uniphier-sd.c | 7 +-
drivers/mtd/Kconfig | 67 -
drivers/mtd/Makefile | 5 -
drivers/mtd/chips/cfi_cmdset_0002.c | 299 +-
drivers/mtd/chips/gen_probe.c | 2 +-
drivers/mtd/devices/Kconfig | 18 -
drivers/mtd/devices/Makefile | 1 -
drivers/mtd/devices/m25p80.c | 347 -
drivers/mtd/devices/phram.c | 2 +-
drivers/mtd/devices/pmc551.c | 9 +-
drivers/mtd/hyperbus/Kconfig | 4 +-
drivers/mtd/maps/pismo.c | 3 +-
drivers/mtd/maps/pxa2xx-flash.c | 3 +-
drivers/mtd/maps/sa1100-flash.c | 1 +
drivers/mtd/mtdcore.c | 86 +-
drivers/mtd/mtdcore.h | 1 +
drivers/mtd/mtdsuper.c | 174 +-
drivers/mtd/nand/onenand/onenand_base.c | 4 +
drivers/mtd/nand/raw/Kconfig | 14 +-
drivers/mtd/nand/raw/Makefile | 2 +-
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 5 +-
drivers/mtd/nand/raw/ingenic/Kconfig | 7 -
drivers/mtd/nand/raw/ingenic/Makefile | 1 -
drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 5 +-
drivers/mtd/nand/raw/ingenic/jz4740_nand.c | 536 -
drivers/mtd/nand/raw/meson_nand.c | 1 +
drivers/mtd/nand/raw/mxic_nand.c | 582 +
drivers/mtd/nand/raw/nand_base.c | 2 +-
drivers/mtd/nand/raw/nand_bbt.c | 10 +-
drivers/mtd/nand/raw/nand_micron.c | 14 +-
drivers/mtd/nand/raw/nuc900_nand.c | 304 -
drivers/mtd/nand/raw/omap2.c | 2 +-
drivers/mtd/nand/raw/oxnas_nand.c | 8 +-
drivers/mtd/nand/raw/r852.c | 4 +-
drivers/mtd/nand/raw/stm32_fmc2_nand.c | 90 +-
drivers/mtd/nand/raw/tango_nand.c | 1 +
drivers/mtd/nand/raw/vf610_nfc.c | 1 +
drivers/mtd/parsers/Kconfig | 68 +
drivers/mtd/parsers/Makefile | 5 +
drivers/mtd/{ => parsers}/ar7part.c | 0
drivers/mtd/{ => parsers}/bcm47xxpart.c | 0
drivers/mtd/{ => parsers}/bcm63xxpart.c | 0
drivers/mtd/{ => parsers}/cmdlinepart.c | 0
drivers/mtd/{ => parsers}/ofpart.c | 0
drivers/mtd/sm_ftl.c | 5 +-
drivers/mtd/spi-nor/Kconfig | 2 +
drivers/mtd/spi-nor/aspeed-smc.c | 4 +-
drivers/mtd/spi-nor/cadence-quadspi.c | 19 +-
drivers/mtd/spi-nor/hisi-sfc.c | 1 +
drivers/mtd/spi-nor/intel-spi-pci.c | 1 +
drivers/mtd/spi-nor/intel-spi.c | 2 +
drivers/mtd/spi-nor/spi-nor.c | 1715 +-
drivers/mtd/ubi/block.c | 43 +-
drivers/mtd/ubi/fastmap-wl.c | 6 +-
drivers/mtd/ubi/wl.c | 6 +
drivers/mux/core.c | 7 +-
drivers/net/Kconfig | 2 +-
drivers/net/arcnet/Kconfig | 26 +-
drivers/net/arcnet/arc-rimi.c | 3 +
drivers/net/arcnet/arcnet.c | 31 +-
drivers/net/arcnet/capmode.c | 2 +-
drivers/net/arcnet/com20020-isa.c | 6 +
drivers/net/arcnet/com90io.c | 2 +
drivers/net/arcnet/com90xx.c | 3 +
drivers/net/bonding/bond_debugfs.c | 5 -
drivers/net/bonding/bond_main.c | 11 +
drivers/net/caif/caif_serial.c | 26 +-
drivers/net/caif/caif_virtio.c | 6 +-
drivers/net/can/Kconfig | 13 +
drivers/net/can/Makefile | 1 +
drivers/net/can/at91_can.c | 6 +-
drivers/net/can/dev.c | 157 +-
drivers/net/can/flexcan.c | 175 +-
drivers/net/can/janz-ican3.c | 1 -
drivers/net/can/kvaser_pciefd.c | 1911 +
drivers/net/can/m_can/Kconfig | 22 +-
drivers/net/can/m_can/Makefile | 2 +
drivers/net/can/m_can/m_can.c | 1079 +-
drivers/net/can/m_can/m_can.h | 110 +
drivers/net/can/m_can/m_can_platform.c | 201 +
drivers/net/can/m_can/tcan4x5x.c | 505 +
drivers/net/can/peak_canfd/peak_pciefd_main.c | 2 +-
drivers/net/can/rcar/rcar_can.c | 23 +-
drivers/net/can/rcar/rcar_canfd.c | 11 +-
drivers/net/can/sja1000/Kconfig | 79 +-
drivers/net/can/sja1000/Makefile | 11 +-
drivers/net/can/sja1000/f81601.c | 211 +
drivers/net/can/sja1000/peak_pci.c | 2 +-
drivers/net/can/sja1000/peak_pcmcia.c | 2 +-
drivers/net/can/slcan.c | 6 +-
drivers/net/can/spi/hi311x.c | 62 +-
drivers/net/can/spi/mcp251x.c | 239 +-
drivers/net/can/sun4i_can.c | 1 -
drivers/net/can/ti_hecc.c | 268 +-
drivers/net/can/usb/Kconfig | 8 +-
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 3 +-
drivers/net/can/usb/peak_usb/pcan_usb.c | 2 +-
drivers/net/can/usb/peak_usb/pcan_usb_core.c | 10 +-
drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 2 +-
drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 2 +-
drivers/net/can/vcan.c | 26 +-
drivers/net/can/vxcan.c | 4 +-
drivers/net/can/xilinx_can.c | 292 +-
drivers/net/dsa/b53/b53_common.c | 40 +-
drivers/net/dsa/b53/b53_priv.h | 2 +
drivers/net/dsa/b53/b53_serdes.h | 4 +-
drivers/net/dsa/b53/b53_srab.c | 8 +-
drivers/net/dsa/bcm_sf2.c | 17 +-
drivers/net/dsa/lan9303-core.c | 6 +
drivers/net/dsa/lantiq_gswip.c | 16 +-
drivers/net/dsa/lantiq_pce.h | 2 +-
drivers/net/dsa/microchip/Kconfig | 25 +-
drivers/net/dsa/microchip/Makefile | 3 +
drivers/net/dsa/microchip/ksz8795.c | 1310 +
drivers/net/dsa/microchip/ksz8795_reg.h | 1004 +
drivers/net/dsa/microchip/ksz8795_spi.c | 103 +
drivers/net/dsa/microchip/ksz9477.c | 10 +-
drivers/net/dsa/microchip/ksz9477_i2c.c | 101 +
drivers/net/dsa/microchip/ksz9477_spi.c | 3 +-
drivers/net/dsa/microchip/ksz_common.c | 21 +-
drivers/net/dsa/microchip/ksz_common.h | 178 +-
drivers/net/dsa/microchip/ksz_priv.h | 155 -
drivers/net/dsa/mt7530.c | 377 +-
drivers/net/dsa/mt7530.h | 61 +-
drivers/net/dsa/mv88e6xxx/Makefile | 1 +
drivers/net/dsa/mv88e6xxx/chip.c | 846 +-
drivers/net/dsa/mv88e6xxx/chip.h | 76 +-
drivers/net/dsa/mv88e6xxx/global1.c | 95 +-
drivers/net/dsa/mv88e6xxx/global1.h | 48 +-
drivers/net/dsa/mv88e6xxx/global1_atu.c | 13 +-
drivers/net/dsa/mv88e6xxx/global1_vtu.c | 6 +-
drivers/net/dsa/mv88e6xxx/global2.c | 72 +-
drivers/net/dsa/mv88e6xxx/global2.h | 12 +-
drivers/net/dsa/mv88e6xxx/global2_avb.c | 29 +-
drivers/net/dsa/mv88e6xxx/global2_scratch.c | 3 +-
drivers/net/dsa/mv88e6xxx/port.c | 209 +-
drivers/net/dsa/mv88e6xxx/port.h | 49 +-
drivers/net/dsa/mv88e6xxx/port_hidden.c | 70 +
drivers/net/dsa/mv88e6xxx/ptp.c | 95 +-
drivers/net/dsa/mv88e6xxx/ptp.h | 6 +-
drivers/net/dsa/mv88e6xxx/serdes.c | 473 +-
drivers/net/dsa/mv88e6xxx/serdes.h | 100 +-
drivers/net/dsa/mv88e6xxx/smi.c | 4 +-
drivers/net/dsa/qca8k.c | 13 +-
drivers/net/dsa/sja1105/Kconfig | 9 +
drivers/net/dsa/sja1105/Makefile | 4 +
drivers/net/dsa/sja1105/sja1105.h | 6 +
drivers/net/dsa/sja1105/sja1105_dynamic_config.c | 22 +-
drivers/net/dsa/sja1105/sja1105_main.c | 189 +-
drivers/net/dsa/sja1105/sja1105_ptp.c | 7 +-
drivers/net/dsa/sja1105/sja1105_static_config.c | 167 +
drivers/net/dsa/sja1105/sja1105_static_config.h | 48 +-
drivers/net/dsa/sja1105/sja1105_tas.c | 423 +
drivers/net/dsa/sja1105/sja1105_tas.h | 41 +
drivers/net/ethernet/3com/3c59x.c | 8 +-
drivers/net/ethernet/8390/Kconfig | 4 +-
drivers/net/ethernet/Kconfig | 13 +-
drivers/net/ethernet/Makefile | 3 +-
drivers/net/ethernet/aeroflex/greth.c | 2 +-
drivers/net/ethernet/agere/et131x.c | 8 +-
drivers/net/ethernet/allwinner/Kconfig | 10 +-
drivers/net/ethernet/allwinner/sun4i-emac.c | 4 +-
drivers/net/ethernet/amazon/Kconfig | 1 +
drivers/net/ethernet/amazon/ena/ena_admin_defs.h | 8 +
drivers/net/ethernet/amazon/ena/ena_com.c | 175 +-
drivers/net/ethernet/amazon/ena/ena_com.h | 151 +-
drivers/net/ethernet/amazon/ena/ena_eth_com.c | 4 +-
drivers/net/ethernet/amazon/ena/ena_ethtool.c | 89 +-
drivers/net/ethernet/amazon/ena/ena_netdev.c | 88 +-
drivers/net/ethernet/amazon/ena/ena_netdev.h | 8 +-
drivers/net/ethernet/amd/Kconfig | 2 +-
drivers/net/ethernet/amd/au1000_eth.c | 1 -
drivers/net/ethernet/amd/ni65.c | 6 +-
drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c | 107 +-
drivers/net/ethernet/amd/xgbe/xgbe-desc.c | 2 +-
drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 2 +-
drivers/net/ethernet/amd/xgbe/xgbe-main.c | 10 +-
drivers/net/ethernet/amd/xgbe/xgbe-platform.c | 33 +-
drivers/net/ethernet/apm/xgene-v2/main.c | 4 +-
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 10 +-
drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 8 +-
drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c | 10 +-
drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c | 10 +-
drivers/net/ethernet/apple/Kconfig | 4 +-
drivers/net/ethernet/apple/bmac.c | 4 +-
.../net/ethernet/aquantia/atlantic/aq_filters.c | 5 +-
drivers/net/ethernet/aquantia/atlantic/aq_main.c | 4 +
drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 +-
drivers/net/ethernet/aquantia/atlantic/aq_vec.c | 18 +-
.../net/ethernet/aquantia/atlantic/hw_atl/Makefile | 2 -
drivers/net/ethernet/atheros/ag71xx.c | 6 +-
drivers/net/ethernet/atheros/alx/main.c | 10 +-
drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 12 +-
drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 3 +-
drivers/net/ethernet/atheros/atlx/atl1.c | 11 +-
drivers/net/ethernet/aurora/nb8800.c | 4 +-
drivers/net/ethernet/broadcom/Kconfig | 6 +-
drivers/net/ethernet/broadcom/bcm63xx_enet.c | 9 +-
drivers/net/ethernet/broadcom/bcmsysport.c | 11 +-
drivers/net/ethernet/broadcom/bgmac-platform.c | 4 +-
drivers/net/ethernet/broadcom/bgmac.c | 2 +-
drivers/net/ethernet/broadcom/bnx2.c | 6 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 13 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 2 +
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 17 +-
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1541 +-
drivers/net/ethernet/broadcom/bnxt/bnxt.h | 191 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c | 6 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c | 39 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 206 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h | 1 +
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 209 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 247 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 181 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.h | 1 +
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 25 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h | 6 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 3 +
drivers/net/ethernet/broadcom/cnic.c | 5 +
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 18 +-
drivers/net/ethernet/broadcom/tg3.c | 6 +-
drivers/net/ethernet/brocade/bna/bnad.c | 2 +-
drivers/net/ethernet/cadence/macb_main.c | 7 +-
drivers/net/ethernet/calxeda/xgmac.c | 2 +-
drivers/net/ethernet/cavium/common/cavium_ptp.c | 2 +-
drivers/net/ethernet/cavium/liquidio/lio_main.c | 23 +-
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 23 +-
.../net/ethernet/cavium/liquidio/octeon_mailbox.c | 4 +-
.../net/ethernet/cavium/liquidio/request_manager.c | 4 +-
drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 6 +-
drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 18 +-
drivers/net/ethernet/chelsio/cxgb/my3126.c | 4 +-
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 5 +-
drivers/net/ethernet/chelsio/cxgb3/sge.c | 4 +-
drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 9 +-
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 11 +-
.../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 3 +-
drivers/net/ethernet/chelsio/cxgb4/smt.c | 18 +-
drivers/net/ethernet/chelsio/cxgb4/smt.h | 2 +-
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 39 +-
.../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 21 +-
drivers/net/ethernet/cirrus/cs89x0.c | 7 +-
drivers/net/ethernet/cortina/gemini.c | 9 +-
drivers/net/ethernet/davicom/dm9000.c | 2 -
drivers/net/ethernet/emulex/benet/Kconfig | 2 +-
drivers/net/ethernet/emulex/benet/be.h | 2 +-
drivers/net/ethernet/emulex/benet/be_cmds.c | 10 +-
drivers/net/ethernet/emulex/benet/be_ethtool.c | 7 +-
drivers/net/ethernet/emulex/benet/be_main.c | 28 +-
drivers/net/ethernet/ezchip/nps_enet.c | 4 +-
drivers/net/ethernet/ezchip/nps_enet.h | 4 +-
drivers/net/ethernet/faraday/Kconfig | 1 +
drivers/net/ethernet/faraday/ftgmac100.c | 39 +-
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 8 +-
drivers/net/ethernet/freescale/dpaa/dpaa_eth.h | 3 +-
.../ethernet/freescale/dpaa2/dpaa2-eth-debugfs.c | 54 +-
.../ethernet/freescale/dpaa2/dpaa2-eth-debugfs.h | 3 -
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 117 +-
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h | 7 +
.../net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 134 +-
drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h | 3 +-
drivers/net/ethernet/freescale/dpaa2/dpni.c | 42 +-
drivers/net/ethernet/freescale/dpaa2/dpni.h | 45 +
drivers/net/ethernet/freescale/enetc/Kconfig | 11 +
drivers/net/ethernet/freescale/enetc/Makefile | 19 +-
drivers/net/ethernet/freescale/enetc/enetc.c | 2 +-
drivers/net/ethernet/freescale/enetc/enetc_mdio.c | 97 +-
drivers/net/ethernet/freescale/enetc/enetc_mdio.h | 12 +
.../net/ethernet/freescale/enetc/enetc_pci_mdio.c | 101 +
drivers/net/ethernet/freescale/enetc/enetc_pf.c | 7 +-
drivers/net/ethernet/freescale/enetc/enetc_ptp.c | 5 +-
drivers/net/ethernet/freescale/fec_main.c | 78 +-
drivers/net/ethernet/freescale/fman/fman.c | 3 -
.../net/ethernet/freescale/fs_enet/fs_enet-main.c | 2 +-
drivers/net/ethernet/freescale/gianfar.c | 3230 +-
drivers/net/ethernet/freescale/gianfar.h | 45 -
drivers/net/ethernet/freescale/gianfar_ethtool.c | 13 -
drivers/net/ethernet/google/gve/gve.h | 8 +-
drivers/net/ethernet/google/gve/gve_ethtool.c | 4 +-
drivers/net/ethernet/google/gve/gve_main.c | 2 +-
drivers/net/ethernet/google/gve/gve_rx.c | 34 +-
drivers/net/ethernet/hisilicon/hip04_eth.c | 28 +-
drivers/net/ethernet/hisilicon/hisi_femac.c | 1 -
drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 4 +-
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 2 +-
drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 8 +-
drivers/net/ethernet/hisilicon/hns/hns_enet.c | 6 +-
drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h | 4 +-
drivers/net/ethernet/hisilicon/hns3/hnae3.c | 25 +-
drivers/net/ethernet/hisilicon/hns3/hnae3.h | 45 +-
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 51 +-
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 415 +-
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 38 +-
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 166 +-
.../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c | 43 +-
.../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 60 +-
.../net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c | 63 +-
.../ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | 448 +-
.../ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h | 19 +-
.../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 153 +-
.../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h | 1 +
.../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 1114 +-
.../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 73 +-
.../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 49 +-
.../ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 2 +
.../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 31 +-
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c | 18 +-
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.h | 7 +-
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 183 +-
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 7 +-
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c | 14 +-
drivers/net/ethernet/huawei/hinic/hinic_tx.c | 2 +-
drivers/net/ethernet/ibm/ehea/ehea_main.c | 14 +-
drivers/net/ethernet/ibm/emac/core.c | 2 +-
drivers/net/ethernet/ibm/ibmveth.c | 9 +-
drivers/net/ethernet/ibm/ibmvnic.c | 289 +-
drivers/net/ethernet/ibm/ibmvnic.h | 6 +-
drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 3 +-
drivers/net/ethernet/intel/e1000/e1000_main.c | 6 +-
drivers/net/ethernet/intel/e1000e/e1000.h | 1 -
drivers/net/ethernet/intel/e1000e/ethtool.c | 6 +-
drivers/net/ethernet/intel/e1000e/ich8lan.c | 10 +
drivers/net/ethernet/intel/e1000e/ich8lan.h | 2 +-
drivers/net/ethernet/intel/e1000e/netdev.c | 22 +-
drivers/net/ethernet/intel/fm10k/fm10k.h | 10 +-
drivers/net/ethernet/intel/fm10k/fm10k_dcbnl.c | 6 +-
drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c | 2 -
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 15 +-
drivers/net/ethernet/intel/fm10k/fm10k_iov.c | 5 +-
drivers/net/ethernet/intel/fm10k/fm10k_main.c | 24 +-
drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 11 +-
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 23 +-
drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 24 +-
drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 15 +-
drivers/net/ethernet/intel/fm10k/fm10k_tlv.c | 9 +-
drivers/net/ethernet/intel/fm10k/fm10k_type.h | 2 +-
drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 25 +-
drivers/net/ethernet/intel/i40e/i40e.h | 12 +-
drivers/net/ethernet/intel/i40e/i40e_adminq.c | 4 +-
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 38 +-
drivers/net/ethernet/intel/i40e/i40e_common.c | 111 +-
drivers/net/ethernet/intel/i40e/i40e_dcb.c | 18 +-
drivers/net/ethernet/intel/i40e/i40e_dcb.h | 2 +
drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 26 +-
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 80 +-
drivers/net/ethernet/intel/i40e/i40e_hmc.c | 1 +
drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c | 21 +-
drivers/net/ethernet/intel/i40e/i40e_main.c | 191 +-
drivers/net/ethernet/intel/i40e/i40e_nvm.c | 101 +
drivers/net/ethernet/intel/i40e/i40e_osdep.h | 5 +-
drivers/net/ethernet/intel/i40e/i40e_prototype.h | 8 +
drivers/net/ethernet/intel/i40e/i40e_ptp.c | 2 +-
drivers/net/ethernet/intel/i40e/i40e_register.h | 30 +-
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 6 +-
drivers/net/ethernet/intel/i40e/i40e_txrx.h | 2 +-
drivers/net/ethernet/intel/i40e/i40e_type.h | 3 +
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 64 +-
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 1 +
drivers/net/ethernet/intel/i40e/i40e_xsk.c | 57 +-
drivers/net/ethernet/intel/i40e/i40e_xsk.h | 2 +-
drivers/net/ethernet/intel/iavf/iavf.h | 1 -
drivers/net/ethernet/intel/iavf/iavf_main.c | 27 -
drivers/net/ethernet/intel/iavf/iavf_txrx.c | 6 +-
drivers/net/ethernet/intel/iavf/iavf_txrx.h | 2 +-
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 7 +
drivers/net/ethernet/intel/ice/Makefile | 1 +
drivers/net/ethernet/intel/ice/ice.h | 90 +-
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 79 +-
drivers/net/ethernet/intel/ice/ice_common.c | 371 +-
drivers/net/ethernet/intel/ice/ice_common.h | 18 +-
drivers/net/ethernet/intel/ice/ice_controlq.c | 112 +-
drivers/net/ethernet/intel/ice/ice_dcb.c | 50 +-
drivers/net/ethernet/intel/ice/ice_dcb.h | 11 +-
drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 259 +-
drivers/net/ethernet/intel/ice/ice_dcb_lib.h | 2 +
drivers/net/ethernet/intel/ice/ice_ethtool.c | 308 +-
drivers/net/ethernet/intel/ice/ice_flex_pipe.c | 1549 +
drivers/net/ethernet/intel/ice/ice_flex_pipe.h | 29 +
drivers/net/ethernet/intel/ice/ice_flex_type.h | 374 +
drivers/net/ethernet/intel/ice/ice_hw_autogen.h | 36 +-
drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h | 2 +
drivers/net/ethernet/intel/ice/ice_lib.c | 699 +-
drivers/net/ethernet/intel/ice/ice_lib.h | 35 +-
drivers/net/ethernet/intel/ice/ice_main.c | 1366 +-
drivers/net/ethernet/intel/ice/ice_sched.c | 59 +-
drivers/net/ethernet/intel/ice/ice_switch.c | 61 +-
drivers/net/ethernet/intel/ice/ice_txrx.c | 204 +-
drivers/net/ethernet/intel/ice/ice_txrx.h | 13 +
drivers/net/ethernet/intel/ice/ice_type.h | 51 +-
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 591 +-
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h | 39 +-
drivers/net/ethernet/intel/igb/igb_main.c | 11 +-
drivers/net/ethernet/intel/igbvf/netdev.c | 2 +-
drivers/net/ethernet/intel/igc/igc.h | 4 +
drivers/net/ethernet/intel/igc/igc_base.c | 5 +-
drivers/net/ethernet/intel/igc/igc_base.h | 8 +
drivers/net/ethernet/intel/igc/igc_defines.h | 11 +-
drivers/net/ethernet/intel/igc/igc_hw.h | 14 +-
drivers/net/ethernet/intel/igc/igc_mac.c | 73 +-
drivers/net/ethernet/intel/igc/igc_main.c | 129 +-
drivers/net/ethernet/intel/igc/igc_phy.c | 192 +-
drivers/net/ethernet/intel/ixgb/ixgb_main.c | 4 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c | 22 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 9 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 52 +-
.../net/ethernet/intel/ixgbe/ixgbe_txrx_common.h | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 77 +-
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 27 +-
drivers/net/ethernet/jme.c | 16 +-
drivers/net/ethernet/lantiq_xrx200.c | 10 +-
drivers/net/ethernet/marvell/mv643xx_eth.c | 2 +-
drivers/net/ethernet/marvell/mvmdio.c | 31 +-
drivers/net/ethernet/marvell/mvneta.c | 8 +-
drivers/net/ethernet/marvell/mvneta_bm.c | 4 +-
drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 7 +-
drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c | 19 +-
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 426 +-
drivers/net/ethernet/marvell/pxa168_eth.c | 3 +-
drivers/net/ethernet/marvell/skge.c | 47 +-
drivers/net/ethernet/marvell/sky2.c | 17 +-
drivers/net/ethernet/mediatek/Kconfig | 5 +-
drivers/net/ethernet/mediatek/mtk_eth_path.c | 71 +-
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 999 +-
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 123 +-
drivers/net/ethernet/mediatek/mtk_sgmii.c | 65 +-
drivers/net/ethernet/mellanox/mlx4/catas.c | 2 +-
drivers/net/ethernet/mellanox/mlx4/crdump.c | 7 +-
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 2 +-
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 43 +-
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 +-
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 4 +-
drivers/net/ethernet/mellanox/mlx4/main.c | 112 +-
drivers/net/ethernet/mellanox/mlx4/mlx4.h | 3 +-
drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 45 +-
drivers/net/ethernet/mellanox/mlx5/core/Makefile | 18 +-
drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 55 +-
drivers/net/ethernet/mellanox/mlx5/core/debugfs.c | 102 +-
drivers/net/ethernet/mellanox/mlx5/core/dev.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 112 +-
.../net/ethernet/mellanox/mlx5/core/diag/Makefile | 2 -
.../mellanox/mlx5/core/diag/en_rep_tracepoint.h | 54 +
.../mellanox/mlx5/core/diag/en_tc_tracepoint.c | 58 +
.../mellanox/mlx5/core/diag/en_tc_tracepoint.h | 114 +
.../ethernet/mellanox/mlx5/core/diag/fw_tracer.c | 9 +-
drivers/net/ethernet/mellanox/mlx5/core/en.h | 90 +-
.../net/ethernet/mellanox/mlx5/core/en/Makefile | 2 -
drivers/net/ethernet/mellanox/mlx5/core/en/fs.h | 25 +-
.../net/ethernet/mellanox/mlx5/core/en/health.c | 205 +
.../net/ethernet/mellanox/mlx5/core/en/health.h | 53 +
.../ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c | 161 +
.../ethernet/mellanox/mlx5/core/en/hv_vhca_stats.h | 25 +
.../net/ethernet/mellanox/mlx5/core/en/params.c | 23 +-
.../net/ethernet/mellanox/mlx5/core/en/params.h | 7 +-
drivers/net/ethernet/mellanox/mlx5/core/en/port.c | 27 +-
drivers/net/ethernet/mellanox/mlx5/core/en/port.h | 6 +-
.../net/ethernet/mellanox/mlx5/core/en/reporter.h | 15 -
.../ethernet/mellanox/mlx5/core/en/reporter_rx.c | 404 +
.../ethernet/mellanox/mlx5/core/en/reporter_tx.c | 271 +-
.../net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 60 +-
drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 24 +-
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 44 +-
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h | 66 +-
.../ethernet/mellanox/mlx5/core/en/xsk/Makefile | 1 -
.../net/ethernet/mellanox/mlx5/core/en/xsk/rx.c | 5 +-
.../net/ethernet/mellanox/mlx5/core/en/xsk/rx.h | 14 +
.../net/ethernet/mellanox/mlx5/core/en/xsk/setup.c | 47 +-
.../net/ethernet/mellanox/mlx5/core/en/xsk/tx.c | 9 +-
.../net/ethernet/mellanox/mlx5/core/en/xsk/tx.h | 14 +-
.../ethernet/mellanox/mlx5/core/en_accel/Makefile | 2 -
.../ethernet/mellanox/mlx5/core/en_accel/ktls.h | 6 +-
.../ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 56 +-
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c | 97 +-
.../net/ethernet/mellanox/mlx5/core/en_common.c | 12 -
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 2 +-
.../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 151 +-
drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 50 +
.../ethernet/mellanox/mlx5/core/en_fs_ethtool.c | 18 +-
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 233 +-
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 346 +-
drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 20 +-
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 95 +-
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 204 +-
drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 7 +
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 1244 +-
drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 44 +-
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 9 +-
drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 31 +-
drivers/net/ethernet/mellanox/mlx5/core/eq.c | 45 +-
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 222 +-
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 46 +-
.../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 188 +-
.../net/ethernet/mellanox/mlx5/core/fpga/Makefile | 2 -
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 191 +-
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h | 41 +-
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 280 +-
drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 47 +-
.../net/ethernet/mellanox/mlx5/core/fs_counters.c | 451 +-
drivers/net/ethernet/mellanox/mlx5/core/health.c | 22 +-
.../net/ethernet/mellanox/mlx5/core/ipoib/Makefile | 2 -
.../ethernet/mellanox/mlx5/core/ipoib/ethtool.c | 9 +
.../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 11 +-
.../ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c | 7 +-
drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c | 3 +
.../net/ethernet/mellanox/mlx5/core/lib/Makefile | 2 -
.../net/ethernet/mellanox/mlx5/core/lib/crypto.c | 2 +
drivers/net/ethernet/mellanox/mlx5/core/lib/dm.c | 223 +
drivers/net/ethernet/mellanox/mlx5/core/lib/eq.h | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/lib/hv.c | 64 +
drivers/net/ethernet/mellanox/mlx5/core/lib/hv.h | 22 +
.../net/ethernet/mellanox/mlx5/core/lib/hv_vhca.c | 371 +
.../net/ethernet/mellanox/mlx5/core/lib/hv_vhca.h | 104 +
.../net/ethernet/mellanox/mlx5/core/lib/vxlan.c | 9 +-
drivers/net/ethernet/mellanox/mlx5/core/main.c | 31 +-
.../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 5 +-
drivers/net/ethernet/mellanox/mlx5/core/qp.c | 8 +-
drivers/net/ethernet/mellanox/mlx5/core/rdma.c | 10 +-
drivers/net/ethernet/mellanox/mlx5/core/rl.c | 6 +-
.../mlx5/core/{accel => steering}/Makefile | 0
.../mellanox/mlx5/core/steering/dr_action.c | 1588 +
.../ethernet/mellanox/mlx5/core/steering/dr_cmd.c | 480 +
.../mellanox/mlx5/core/steering/dr_crc32.c | 98 +
.../mellanox/mlx5/core/steering/dr_domain.c | 393 +
.../ethernet/mellanox/mlx5/core/steering/dr_fw.c | 93 +
.../mellanox/mlx5/core/steering/dr_icm_pool.c | 570 +
.../mellanox/mlx5/core/steering/dr_matcher.c | 767 +
.../ethernet/mellanox/mlx5/core/steering/dr_rule.c | 1243 +
.../ethernet/mellanox/mlx5/core/steering/dr_send.c | 975 +
.../ethernet/mellanox/mlx5/core/steering/dr_ste.c | 2332 +
.../mellanox/mlx5/core/steering/dr_table.c | 294 +
.../mellanox/mlx5/core/steering/dr_types.h | 1061 +
.../ethernet/mellanox/mlx5/core/steering/fs_dr.c | 600 +
.../ethernet/mellanox/mlx5/core/steering/fs_dr.h | 60 +
.../mellanox/mlx5/core/steering/mlx5_ifc_dr.h | 604 +
.../ethernet/mellanox/mlx5/core/steering/mlx5dr.h | 212 +
drivers/net/ethernet/mellanox/mlx5/core/vport.c | 7 +-
drivers/net/ethernet/mellanox/mlx5/core/wq.c | 5 +
drivers/net/ethernet/mellanox/mlx5/core/wq.h | 1 +
drivers/net/ethernet/mellanox/mlxsw/Kconfig | 6 +-
drivers/net/ethernet/mellanox/mlxsw/Makefile | 2 +-
drivers/net/ethernet/mellanox/mlxsw/core.c | 157 +-
drivers/net/ethernet/mellanox/mlxsw/core.h | 17 +
drivers/net/ethernet/mellanox/mlxsw/pci.h | 1 +
drivers/net/ethernet/mellanox/mlxsw/reg.h | 13 +-
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 312 +-
drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 41 +-
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 19 +-
.../net/ethernet/mellanox/mlxsw/spectrum_buffers.c | 55 +-
.../net/ethernet/mellanox/mlxsw/spectrum_flower.c | 28 +
drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c | 1 +
drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.h | 1 +
.../ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c | 76 +-
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c | 222 +-
drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h | 32 +
.../net/ethernet/mellanox/mlxsw/spectrum_router.c | 4 +-
.../net/ethernet/mellanox/mlxsw/spectrum_trap.c | 267 +
drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 6 -
drivers/net/ethernet/mellanox/mlxsw/trap.h | 7 +
drivers/net/ethernet/micrel/Kconfig | 11 +-
drivers/net/ethernet/micrel/Makefile | 1 -
drivers/net/ethernet/micrel/ks8695net.c | 1632 -
drivers/net/ethernet/micrel/ks8695net.h | 108 -
drivers/net/ethernet/micrel/ks8842.c | 4 +-
drivers/net/ethernet/micrel/ks8851_mll.c | 7 +-
drivers/net/ethernet/micrel/ksz884x.c | 2 +-
drivers/net/ethernet/microchip/lan743x_main.c | 8 +-
drivers/net/ethernet/microchip/lan743x_ptp.c | 3 +-
drivers/net/ethernet/mscc/ocelot.c | 402 +-
drivers/net/ethernet/mscc/ocelot.h | 49 +-
drivers/net/ethernet/mscc/ocelot_ace.c | 2 +-
drivers/net/ethernet/mscc/ocelot_board.c | 145 +-
drivers/net/ethernet/mscc/ocelot_flower.c | 23 +-
drivers/net/ethernet/mscc/ocelot_ptp.h | 41 +
drivers/net/ethernet/mscc/ocelot_regs.c | 11 +
drivers/net/ethernet/mscc/ocelot_tc.c | 6 +-
drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 21 +-
drivers/net/ethernet/natsemi/sonic.c | 6 +-
drivers/net/ethernet/netronome/nfp/Makefile | 1 +
drivers/net/ethernet/netronome/nfp/abm/cls.c | 14 +-
drivers/net/ethernet/netronome/nfp/bpf/Makefile | 2 -
drivers/net/ethernet/netronome/nfp/bpf/cmsg.c | 187 +-
drivers/net/ethernet/netronome/nfp/bpf/fw.h | 1 +
drivers/net/ethernet/netronome/nfp/bpf/jit.c | 17 +-
drivers/net/ethernet/netronome/nfp/bpf/main.c | 33 +
drivers/net/ethernet/netronome/nfp/bpf/main.h | 24 +
drivers/net/ethernet/netronome/nfp/bpf/offload.c | 3 +
drivers/net/ethernet/netronome/nfp/devlink_param.c | 255 +
drivers/net/ethernet/netronome/nfp/flower/Makefile | 2 -
drivers/net/ethernet/netronome/nfp/flower/action.c | 160 +-
drivers/net/ethernet/netronome/nfp/flower/cmsg.c | 10 +-
drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 25 +-
drivers/net/ethernet/netronome/nfp/flower/main.c | 8 +
drivers/net/ethernet/netronome/nfp/flower/main.h | 19 +
.../net/ethernet/netronome/nfp/flower/offload.c | 222 +-
.../net/ethernet/netronome/nfp/flower/qos_conf.c | 2 +-
.../ethernet/netronome/nfp/flower/tunnel_conf.c | 208 +-
drivers/net/ethernet/netronome/nfp/nfp_main.c | 144 +-
drivers/net/ethernet/netronome/nfp/nfp_main.h | 5 +
drivers/net/ethernet/netronome/nfp/nfp_net.h | 2 +-
.../net/ethernet/netronome/nfp/nfp_net_common.c | 15 +-
.../net/ethernet/netronome/nfp/nfp_net_debugfs.c | 17 +-
.../net/ethernet/netronome/nfp/nfp_net_ethtool.c | 4 +-
drivers/net/ethernet/netronome/nfp/nfp_net_main.c | 11 +-
.../net/ethernet/netronome/nfp/nfpcore/Makefile | 2 -
.../netronome/nfp/nfpcore/nfp6000/Makefile | 2 -
.../ethernet/netronome/nfp/nfpcore/nfp_cpplib.c | 16 +-
.../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 77 +-
.../net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h | 29 +
drivers/net/ethernet/netronome/nfp/nic/Makefile | 2 -
drivers/net/ethernet/netx-eth.c | 497 -
drivers/net/ethernet/ni/Kconfig | 2 +-
drivers/net/ethernet/ni/nixge.c | 2 +-
drivers/net/ethernet/nuvoton/Kconfig | 29 -
drivers/net/ethernet/nuvoton/Makefile | 6 -
drivers/net/ethernet/nuvoton/w90p910_ether.c | 1082 -
drivers/net/ethernet/nvidia/forcedeth.c | 146 +-
drivers/net/ethernet/nxp/Kconfig | 8 +-
drivers/net/ethernet/nxp/lpc_eth.c | 45 +-
drivers/net/ethernet/packetengines/Kconfig | 6 +-
drivers/net/ethernet/packetengines/Makefile | 2 +-
drivers/net/ethernet/packetengines/yellowfin.c | 3 +-
drivers/net/ethernet/pensando/Kconfig | 32 +
drivers/net/ethernet/pensando/Makefile | 6 +
drivers/net/ethernet/pensando/ionic/Makefile | 8 +
drivers/net/ethernet/pensando/ionic/ionic.h | 73 +
drivers/net/ethernet/pensando/ionic/ionic_bus.h | 16 +
.../net/ethernet/pensando/ionic/ionic_bus_pci.c | 292 +
.../net/ethernet/pensando/ionic/ionic_debugfs.c | 248 +
.../net/ethernet/pensando/ionic/ionic_debugfs.h | 34 +
drivers/net/ethernet/pensando/ionic/ionic_dev.c | 500 +
drivers/net/ethernet/pensando/ionic/ionic_dev.h | 299 +
.../net/ethernet/pensando/ionic/ionic_devlink.c | 99 +
.../net/ethernet/pensando/ionic/ionic_devlink.h | 14 +
.../net/ethernet/pensando/ionic/ionic_ethtool.c | 779 +
.../net/ethernet/pensando/ionic/ionic_ethtool.h | 9 +
drivers/net/ethernet/pensando/ionic/ionic_if.h | 2482 +
drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2275 +
drivers/net/ethernet/pensando/ionic/ionic_lif.h | 277 +
drivers/net/ethernet/pensando/ionic/ionic_main.c | 548 +
drivers/net/ethernet/pensando/ionic/ionic_regs.h | 136 +
.../net/ethernet/pensando/ionic/ionic_rx_filter.c | 150 +
.../net/ethernet/pensando/ionic/ionic_rx_filter.h | 35 +
drivers/net/ethernet/pensando/ionic/ionic_stats.c | 310 +
drivers/net/ethernet/pensando/ionic/ionic_stats.h | 53 +
drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 925 +
drivers/net/ethernet/pensando/ionic/ionic_txrx.h | 15 +
drivers/net/ethernet/qlogic/Kconfig | 9 -
drivers/net/ethernet/qlogic/Makefile | 1 -
.../net/ethernet/qlogic/netxen/netxen_nic_main.c | 4 +-
drivers/net/ethernet/qlogic/qed/qed_debug.c | 82 +
drivers/net/ethernet/qlogic/qed/qed_hsi.h | 32 +
drivers/net/ethernet/qlogic/qed/qed_int.c | 2 +-
drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 2 +-
drivers/net/ethernet/qlogic/qed/qed_l2.c | 34 +-
drivers/net/ethernet/qlogic/qed/qed_main.c | 153 +-
drivers/net/ethernet/qlogic/qed/qed_mcp.c | 61 +
drivers/net/ethernet/qlogic/qed/qed_mcp.h | 35 +
drivers/net/ethernet/qlogic/qed/qed_rdma.c | 12 +-
drivers/net/ethernet/qlogic/qed/qed_vf.c | 2 +-
drivers/net/ethernet/qlogic/qede/qede.h | 15 +
drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 119 +-
drivers/net/ethernet/qlogic/qede/qede_fp.c | 3 +-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 2 +-
drivers/net/ethernet/qualcomm/emac/emac-mac.c | 12 +-
drivers/net/ethernet/qualcomm/emac/emac.c | 12 +-
drivers/net/ethernet/qualcomm/qca_debug.c | 13 +-
drivers/net/ethernet/qualcomm/qca_spi.c | 3 +-
drivers/net/ethernet/qualcomm/qca_uart.c | 3 +-
.../net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 13 +-
drivers/net/ethernet/realtek/Kconfig | 9 +-
drivers/net/ethernet/realtek/r8169_main.c | 1105 +-
drivers/net/ethernet/renesas/ravb.h | 9 +-
drivers/net/ethernet/renesas/ravb_main.c | 29 +-
drivers/net/ethernet/rocker/rocker_main.c | 5 +
drivers/net/ethernet/samsung/Kconfig | 2 +-
.../net/ethernet/samsung/sxgbe/sxgbe_platform.c | 4 +-
drivers/net/ethernet/seeq/sgiseeq.c | 7 +-
drivers/net/ethernet/sfc/ef10.c | 4 +-
drivers/net/ethernet/sfc/efx.c | 10 +-
drivers/net/ethernet/sfc/falcon/efx.c | 6 +-
drivers/net/ethernet/sfc/falcon/falcon_boards.c | 18 +-
drivers/net/ethernet/sfc/falcon/rx.c | 5 +-
drivers/net/ethernet/sfc/rx.c | 5 +-
drivers/net/ethernet/sfc/tx.c | 2 +-
drivers/net/ethernet/sgi/ioc3-eth.c | 1038 +-
drivers/net/ethernet/sgi/meth.c | 3 +-
drivers/net/ethernet/sis/sis900.c | 68 +
drivers/net/ethernet/smsc/smc911x.c | 1 +
drivers/net/ethernet/smsc/smc91x.c | 3 +-
drivers/net/ethernet/socionext/netsec.c | 2 +-
drivers/net/ethernet/socionext/sni_ave.c | 16 +-
drivers/net/ethernet/stmicro/stmmac/Kconfig | 1 +
drivers/net/ethernet/stmicro/stmmac/common.h | 18 +
.../net/ethernet/stmicro/stmmac/dwmac-anarion.c | 4 +-
.../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 14 +-
.../net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c | 4 +-
.../net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 6 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 6 +-
.../net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 15 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 7 +-
drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 26 +-
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 89 +-
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 43 +
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.h | 9 +
drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c | 5 +-
drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h | 172 +-
.../net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 1078 +-
.../net/ethernet/stmicro/stmmac/dwxgmac2_descs.c | 114 +-
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 49 +-
drivers/net/ethernet/stmicro/stmmac/hwif.c | 4 +-
drivers/net/ethernet/stmicro/stmmac/hwif.h | 66 +
drivers/net/ethernet/stmicro/stmmac/mmc.h | 9 +
drivers/net/ethernet/stmicro/stmmac/mmc_core.c | 192 +
drivers/net/ethernet/stmicro/stmmac/stmmac.h | 35 +-
.../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 124 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 550 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 4 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 244 +
.../net/ethernet/stmicro/stmmac/stmmac_platform.c | 92 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 3 +
.../net/ethernet/stmicro/stmmac/stmmac_selftests.c | 1133 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 251 +-
drivers/net/ethernet/sun/cassini.c | 8 +-
drivers/net/ethernet/sun/niu.c | 2 +-
drivers/net/ethernet/sun/sunvnet_common.c | 7 +-
drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c | 2 +-
drivers/net/ethernet/synopsys/dwc-xlgmac-net.c | 2 +-
drivers/net/ethernet/tehuti/tehuti.c | 2 +-
drivers/net/ethernet/ti/cpsw.c | 7 +-
drivers/net/ethernet/ti/netcp_core.c | 2 +-
drivers/net/ethernet/toshiba/spider_net.c | 7 +-
drivers/net/ethernet/toshiba/tc35815.c | 2 +-
drivers/net/ethernet/tundra/tsi108_eth.c | 5 +-
drivers/net/ethernet/via/via-rhine.c | 4 +-
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +-
drivers/net/ethernet/xscale/Kconfig | 2 +-
drivers/net/geneve.c | 2 +-
drivers/net/hamradio/6pack.c | 4 +-
drivers/net/hamradio/baycom_epp.c | 6 +-
drivers/net/hamradio/hdlcdrv.c | 3 +-
drivers/net/hamradio/mkiss.c | 11 +-
drivers/net/hyperv/hyperv_net.h | 2 +-
drivers/net/hyperv/netvsc_drv.c | 40 +-
drivers/net/hyperv/rndis_filter.c | 1 +
drivers/net/ieee802154/adf7242.c | 13 +-
drivers/net/ieee802154/at86rf230.c | 20 +-
drivers/net/ieee802154/ca8210.c | 9 +-
drivers/net/ieee802154/mac802154_hwsim.c | 8 +-
drivers/net/ipvlan/ipvlan_main.c | 1 +
drivers/net/macsec.c | 1 +
drivers/net/netdevsim/dev.c | 491 +-
drivers/net/netdevsim/fib.c | 102 +-
drivers/net/netdevsim/netdev.c | 9 +-
drivers/net/netdevsim/netdevsim.h | 14 +-
drivers/net/phy/Kconfig | 32 +-
drivers/net/phy/Makefile | 2 +
drivers/net/phy/adin.c | 781 +
drivers/net/phy/at803x.c | 36 +-
drivers/net/phy/dp83822.c | 5 -
drivers/net/phy/dp83848.c | 11 +-
drivers/net/phy/dp83867.c | 19 +
drivers/net/phy/dp83tc811.c | 4 -
drivers/net/phy/fixed_phy.c | 6 +-
drivers/net/phy/mdio-aspeed.c | 157 +
drivers/net/phy/mdio-bcm-iproc.c | 4 +-
drivers/net/phy/mdio-cavium.h | 2 +
drivers/net/phy/mdio-hisi-femac.c | 4 +-
drivers/net/phy/mdio-moxart.c | 4 +-
drivers/net/phy/mdio-mux-meson-g12a.c | 4 +-
drivers/net/phy/mdio-sun4i.c | 4 +-
drivers/net/phy/mdio-xgene.c | 4 +-
drivers/net/phy/mdio_bus.c | 29 +-
drivers/net/phy/meson-gxl.c | 2 +-
drivers/net/phy/micrel.c | 3 +
drivers/net/phy/microchip.c | 1 -
drivers/net/phy/microchip_t1.c | 1 -
drivers/net/phy/mscc.c | 20 +-
drivers/net/phy/national.c | 9 +-
drivers/net/phy/phy-c45.c | 40 +
drivers/net/phy/phy-core.c | 66 +-
drivers/net/phy/phy.c | 70 +-
drivers/net/phy/phy_device.c | 129 +-
drivers/net/phy/phy_led_triggers.c | 3 +-
drivers/net/phy/phylink.c | 16 +-
drivers/net/phy/realtek.c | 188 +-
drivers/net/phy/sfp.c | 75 +-
drivers/net/phy/swphy.c | 8 +
drivers/net/phy/vitesse.c | 6 +-
drivers/net/phy/xilinx_gmii2rgmii.c | 4 +-
drivers/net/ppp/ppp_generic.c | 2 +
drivers/net/ppp/pppoe.c | 3 +
drivers/net/ppp/pppox.c | 13 +
drivers/net/ppp/pptp.c | 3 +
drivers/net/slip/slhc.c | 30 +-
drivers/net/tap.c | 2 +-
drivers/net/team/team.c | 2 +
drivers/net/thunderbolt.c | 2 +-
drivers/net/tun.c | 25 +-
drivers/net/usb/asix_common.c | 9 +-
drivers/net/usb/ax88179_178a.c | 14 +-
drivers/net/usb/cdc_ether.c | 10 +-
drivers/net/usb/cdc_ncm.c | 6 +-
drivers/net/usb/cx82310_eth.c | 3 +-
drivers/net/usb/kalmia.c | 6 +-
drivers/net/usb/lan78xx.c | 31 +-
drivers/net/usb/lg-vl600.c | 4 +-
drivers/net/usb/pegasus.c | 2 +-
drivers/net/usb/qmi_wwan.c | 1 +
drivers/net/usb/r8152.c | 967 +-
drivers/net/usb/rtl8150.c | 6 +-
drivers/net/usb/smsc75xx.c | 20 +-
drivers/net/usb/sr9800.c | 9 +-
drivers/net/usb/usbnet.c | 14 +-
drivers/net/virtio_net.c | 2 +-
drivers/net/vmxnet3/vmxnet3_drv.c | 9 +-
drivers/net/vrf.c | 61 +-
drivers/net/wan/Kconfig | 14 -
drivers/net/wan/Makefile | 1 -
drivers/net/wan/dscc4.c | 2057 -
drivers/net/wan/lmc/lmc_main.c | 2 +-
drivers/net/wan/sdla.c | 1 +
drivers/net/wimax/i2400m/debugfs.c | 150 +-
drivers/net/wimax/i2400m/driver.c | 7 +-
drivers/net/wimax/i2400m/fw.c | 13 +-
drivers/net/wimax/i2400m/i2400m.h | 7 +-
drivers/net/wimax/i2400m/op-rfkill.c | 1 +
drivers/net/wimax/i2400m/rx.c | 1 -
drivers/net/wimax/i2400m/tx.c | 3 +-
drivers/net/wimax/i2400m/usb.c | 64 +-
drivers/net/wireless/ath/Kconfig | 2 +-
drivers/net/wireless/ath/ar5523/Kconfig | 4 +-
drivers/net/wireless/ath/ath10k/htt_rx.c | 91 +-
drivers/net/wireless/ath/ath10k/htt_tx.c | 8 +
drivers/net/wireless/ath/ath10k/mac.c | 12 +-
drivers/net/wireless/ath/ath10k/sdio.c | 29 +-
drivers/net/wireless/ath/ath10k/wmi-tlv.c | 2 +-
drivers/net/wireless/ath/ath10k/wmi-tlv.h | 16 +
drivers/net/wireless/ath/ath10k/wmi.h | 8 -
drivers/net/wireless/ath/ath5k/pci.c | 1 -
drivers/net/wireless/ath/ath6kl/Kconfig | 2 +-
drivers/net/wireless/ath/ath6kl/htc_mbox.c | 4 +-
drivers/net/wireless/ath/ath6kl/usb.c | 8 +
drivers/net/wireless/ath/ath9k/Kconfig | 18 +-
drivers/net/wireless/ath/ath9k/Makefile | 2 +
.../net/wireless/ath/ath9k/ath9k_pci_owl_loader.c | 215 +
drivers/net/wireless/ath/ath9k/dynack.c | 101 +-
drivers/net/wireless/ath/ath9k/htc_drv_init.c | 4 +-
drivers/net/wireless/ath/ath9k/htc_hst.c | 3 +
drivers/net/wireless/ath/ath9k/main.c | 3 +-
drivers/net/wireless/ath/ath9k/wmi.c | 1 +
drivers/net/wireless/ath/carl9170/Kconfig | 6 +-
drivers/net/wireless/ath/carl9170/usb.c | 2 -
drivers/net/wireless/ath/wcn36xx/smd.c | 186 +-
drivers/net/wireless/ath/wil6210/cfg80211.c | 225 +-
drivers/net/wireless/ath/wil6210/debugfs.c | 19 +-
drivers/net/wireless/ath/wil6210/main.c | 4 +
drivers/net/wireless/ath/wil6210/netdev.c | 4 +
drivers/net/wireless/ath/wil6210/pcie_bus.c | 4 +-
drivers/net/wireless/ath/wil6210/pmc.c | 26 +
drivers/net/wireless/ath/wil6210/pmc.h | 1 +
drivers/net/wireless/ath/wil6210/rx_reorder.c | 1 -
drivers/net/wireless/ath/wil6210/txrx.c | 253 +-
drivers/net/wireless/ath/wil6210/txrx.h | 42 +
drivers/net/wireless/ath/wil6210/txrx_edma.c | 42 +-
drivers/net/wireless/ath/wil6210/txrx_edma.h | 12 +-
drivers/net/wireless/ath/wil6210/wil6210.h | 25 +-
drivers/net/wireless/ath/wil6210/wmi.c | 43 +-
drivers/net/wireless/ath/wil6210/wmi.h | 29 +-
drivers/net/wireless/atmel/Kconfig | 32 +-
drivers/net/wireless/broadcom/b43legacy/phy.c | 21 +-
.../wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 11 +-
.../wireless/broadcom/brcm80211/brcmfmac/bcdc.h | 6 +-
.../net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 4 +-
.../broadcom/brcm80211/brcmfmac/cfg80211.c | 84 +-
.../broadcom/brcm80211/brcmfmac/cfg80211.h | 1 -
.../wireless/broadcom/brcm80211/brcmfmac/chip.c | 6 +-
.../wireless/broadcom/brcm80211/brcmfmac/chip.h | 1 +
.../wireless/broadcom/brcm80211/brcmfmac/common.c | 1 -
.../wireless/broadcom/brcm80211/brcmfmac/core.c | 93 +-
.../wireless/broadcom/brcm80211/brcmfmac/core.h | 1 +
.../wireless/broadcom/brcm80211/brcmfmac/debug.h | 4 +
.../wireless/broadcom/brcm80211/brcmfmac/feature.c | 1 +
.../wireless/broadcom/brcm80211/brcmfmac/feature.h | 4 +-
.../wireless/broadcom/brcm80211/brcmfmac/fweh.c | 9 -
.../broadcom/brcm80211/brcmfmac/fwsignal.c | 16 +-
.../broadcom/brcm80211/brcmfmac/fwsignal.h | 3 +-
.../wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 8 +-
.../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 22 +-
.../wireless/broadcom/brcm80211/brcmfmac/proto.c | 10 +-
.../wireless/broadcom/brcm80211/brcmfmac/proto.h | 3 +-
.../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 15 +-
.../net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 34 +-
.../wireless/broadcom/brcm80211/brcmfmac/vendor.c | 1 +
.../wireless/broadcom/brcm80211/brcmsmac/main.c | 13 -
.../broadcom/brcm80211/brcmsmac/phy/phy_n.c | 16 +-
drivers/net/wireless/cisco/airo.c | 11 +-
drivers/net/wireless/intel/ipw2x00/Kconfig | 116 +-
drivers/net/wireless/intel/ipw2x00/ipw2100.c | 2 +-
drivers/net/wireless/intel/ipw2x00/ipw2200.c | 2 +-
drivers/net/wireless/intel/iwlegacy/3945-mac.c | 1 -
drivers/net/wireless/intel/iwlegacy/4965-mac.c | 1 -
drivers/net/wireless/intel/iwlegacy/Kconfig | 6 +-
drivers/net/wireless/intel/iwlegacy/common.c | 3 +-
drivers/net/wireless/intel/iwlwifi/Kconfig | 20 +-
drivers/net/wireless/intel/iwlwifi/cfg/1000.c | 14 +-
drivers/net/wireless/intel/iwlwifi/cfg/2000.c | 26 +-
drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 70 +-
drivers/net/wireless/intel/iwlwifi/cfg/5000.c | 18 +-
drivers/net/wireless/intel/iwlwifi/cfg/6000.c | 44 +-
drivers/net/wireless/intel/iwlwifi/cfg/7000.c | 10 +-
drivers/net/wireless/intel/iwlwifi/cfg/8000.c | 10 +-
drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 10 +-
drivers/net/wireless/intel/iwlwifi/dvm/devices.c | 3 +-
drivers/net/wireless/intel/iwlwifi/dvm/led.c | 5 +-
drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c | 4 +-
drivers/net/wireless/intel/iwlwifi/dvm/main.c | 12 +-
drivers/net/wireless/intel/iwlwifi/dvm/power.c | 3 +-
drivers/net/wireless/intel/iwlwifi/dvm/rs.c | 29 +-
drivers/net/wireless/intel/iwlwifi/dvm/rs.h | 4 -
drivers/net/wireless/intel/iwlwifi/dvm/tx.c | 5 +-
drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 12 +
.../net/wireless/intel/iwlwifi/fw/api/commands.h | 7 +
drivers/net/wireless/intel/iwlwifi/fw/api/d3.h | 6 +-
.../net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h | 102 +-
drivers/net/wireless/intel/iwlwifi/fw/api/debug.h | 83 +-
.../net/wireless/intel/iwlwifi/fw/api/location.h | 4 +-
drivers/net/wireless/intel/iwlwifi/fw/api/mac.h | 4 +
drivers/net/wireless/intel/iwlwifi/fw/api/phy.h | 7 +
drivers/net/wireless/intel/iwlwifi/fw/api/power.h | 12 +
drivers/net/wireless/intel/iwlwifi/fw/api/rs.h | 18 +-
drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | 35 +-
drivers/net/wireless/intel/iwlwifi/fw/api/scan.h | 55 +-
drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 1153 +-
drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 121 +-
drivers/net/wireless/intel/iwlwifi/fw/error-dump.h | 38 +-
drivers/net/wireless/intel/iwlwifi/fw/file.h | 29 +-
drivers/net/wireless/intel/iwlwifi/fw/img.h | 9 -
drivers/net/wireless/intel/iwlwifi/fw/init.c | 2 -
drivers/net/wireless/intel/iwlwifi/fw/paging.c | 6 +-
drivers/net/wireless/intel/iwlwifi/fw/runtime.h | 23 +-
drivers/net/wireless/intel/iwlwifi/fw/smem.c | 2 +-
drivers/net/wireless/intel/iwlwifi/iwl-config.h | 53 +-
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 236 +-
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.h | 36 +-
drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h | 1 -
drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 30 +-
.../net/wireless/intel/iwlwifi/iwl-eeprom-parse.c | 21 +-
.../net/wireless/intel/iwlwifi/iwl-eeprom-parse.h | 4 +-
.../net/wireless/intel/iwlwifi/iwl-eeprom-read.c | 14 +-
drivers/net/wireless/intel/iwlwifi/iwl-fh.h | 6 +-
drivers/net/wireless/intel/iwlwifi/iwl-io.c | 21 +-
drivers/net/wireless/intel/iwlwifi/iwl-io.h | 18 +-
drivers/net/wireless/intel/iwlwifi/iwl-modparams.h | 9 +-
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 60 +-
drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h | 27 +-
drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 5 +
drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 16 -
drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 150 +-
drivers/net/wireless/intel/iwlwifi/mvm/constants.h | 1 +
drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 224 +-
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 154 +-
drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 214 +-
drivers/net/wireless/intel/iwlwifi/mvm/led.c | 6 +-
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 42 +-
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 493 +-
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 158 +-
drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 6 +-
drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 484 +-
drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c | 11 +-
drivers/net/wireless/intel/iwlwifi/mvm/power.c | 82 +-
drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 19 +-
drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 542 +-
drivers/net/wireless/intel/iwlwifi/mvm/rs.h | 3 +-
drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 18 +-
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 278 +-
drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 98 +-
drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 35 +-
drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 12 +-
drivers/net/wireless/intel/iwlwifi/mvm/tdls.c | 9 -
.../net/wireless/intel/iwlwifi/mvm/time-event.c | 8 +-
drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 21 +-
drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 12 +-
drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 23 +-
.../wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c | 4 +-
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 330 +-
drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 38 +-
drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 77 +-
.../net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 19 +-
drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 385 +-
drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 70 +-
drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 178 +-
.../net/wireless/intersil/hostap/hostap_download.c | 6 +-
drivers/net/wireless/intersil/hostap/hostap_plx.c | 3 +-
drivers/net/wireless/intersil/hostap/hostap_proc.c | 3 +-
drivers/net/wireless/mac80211_hwsim.c | 311 +-
drivers/net/wireless/marvell/libertas/dev.h | 2 -
drivers/net/wireless/marvell/libertas/if_spi.c | 14 +-
drivers/net/wireless/marvell/libertas/if_usb.c | 3 +-
drivers/net/wireless/marvell/libertas/main.c | 2 +-
drivers/net/wireless/marvell/libertas/mesh.c | 31 +-
drivers/net/wireless/marvell/libertas/mesh.h | 3 +-
drivers/net/wireless/marvell/libertas_tf/cmd.c | 2 +-
drivers/net/wireless/marvell/mwifiex/ie.c | 3 +
drivers/net/wireless/marvell/mwifiex/init.c | 2 +-
drivers/net/wireless/marvell/mwifiex/main.h | 1 +
drivers/net/wireless/marvell/mwifiex/pcie.c | 8 +-
drivers/net/wireless/marvell/mwifiex/scan.c | 5 +-
drivers/net/wireless/marvell/mwifiex/tdls.c | 3 +-
drivers/net/wireless/marvell/mwifiex/uap_cmd.c | 9 +-
drivers/net/wireless/mediatek/mt76/agg-rx.c | 36 +-
drivers/net/wireless/mediatek/mt76/debugfs.c | 13 +-
drivers/net/wireless/mediatek/mt76/dma.c | 21 +-
drivers/net/wireless/mediatek/mt76/dma.h | 13 +-
drivers/net/wireless/mediatek/mt76/eeprom.c | 13 +-
drivers/net/wireless/mediatek/mt76/mac80211.c | 78 +-
drivers/net/wireless/mediatek/mt76/mcu.c | 13 +-
drivers/net/wireless/mediatek/mt76/mmio.c | 28 +-
drivers/net/wireless/mediatek/mt76/mt76.h | 43 +-
drivers/net/wireless/mediatek/mt76/mt7603/Kconfig | 6 +-
drivers/net/wireless/mediatek/mt76/mt7603/beacon.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7603/core.c | 2 +-
.../net/wireless/mediatek/mt76/mt7603/debugfs.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7603/dma.c | 17 +-
drivers/net/wireless/mediatek/mt76/mt7603/eeprom.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7603/init.c | 6 +-
drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 14 +-
drivers/net/wireless/mediatek/mt76/mt7603/main.c | 41 +-
drivers/net/wireless/mediatek/mt76/mt7603/mcu.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h | 1 -
drivers/net/wireless/mediatek/mt76/mt7603/pci.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7603/soc.c | 9 +-
drivers/net/wireless/mediatek/mt76/mt7615/Kconfig | 7 +-
drivers/net/wireless/mediatek/mt76/mt7615/Makefile | 3 +-
.../net/wireless/mediatek/mt76/mt7615/debugfs.c | 91 +
drivers/net/wireless/mediatek/mt76/mt7615/dma.c | 12 +-
drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c | 38 +
drivers/net/wireless/mediatek/mt76/mt7615/init.c | 80 +-
drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 733 +-
drivers/net/wireless/mediatek/mt76/mt7615/mac.h | 28 +
drivers/net/wireless/mediatek/mt76/mt7615/main.c | 111 +-
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 483 +-
drivers/net/wireless/mediatek/mt76/mt7615/mcu.h | 54 +-
drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 105 +-
drivers/net/wireless/mediatek/mt76/mt7615/pci.c | 1 +
drivers/net/wireless/mediatek/mt76/mt7615/regs.h | 75 +
drivers/net/wireless/mediatek/mt76/mt76x0/Kconfig | 12 +-
drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c | 5 +
drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 17 +-
drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 2 +-
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 30 +-
.../net/wireless/mediatek/mt76/mt76x0/pci_mcu.c | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 49 +-
drivers/net/wireless/mediatek/mt76/mt76x0/phy.h | 10 +-
drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 36 +-
.../net/wireless/mediatek/mt76/mt76x0/usb_mcu.c | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x02.h | 45 +-
.../net/wireless/mediatek/mt76/mt76x02_beacon.c | 83 +-
.../net/wireless/mediatek/mt76/mt76x02_debugfs.c | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.h | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x02_dma.h | 13 +-
.../net/wireless/mediatek/mt76/mt76x02_eeprom.c | 13 +-
.../net/wireless/mediatek/mt76/mt76x02_eeprom.h | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 29 +-
drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 15 +-
drivers/net/wireless/mediatek/mt76/mt76x02_mcu.c | 26 +-
drivers/net/wireless/mediatek/mt76/mt76x02_mcu.h | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 24 +-
drivers/net/wireless/mediatek/mt76/mt76x02_phy.c | 16 +-
drivers/net/wireless/mediatek/mt76/mt76x02_phy.h | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x02_regs.h | 41 +-
drivers/net/wireless/mediatek/mt76/mt76x02_trace.c | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x02_trace.h | 16 +-
drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x02_usb.h | 13 +-
.../net/wireless/mediatek/mt76/mt76x02_usb_core.c | 13 +-
.../net/wireless/mediatek/mt76/mt76x02_usb_mcu.c | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 75 +-
drivers/net/wireless/mediatek/mt76/mt76x2/Kconfig | 14 +-
drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c | 23 +-
drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.h | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x2/init.c | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x2/mac.c | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x2/mac.h | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x2/mcu.c | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x2/mcu.h | 16 +-
drivers/net/wireless/mediatek/mt76/mt76x2/mt76x2.h | 13 +-
.../net/wireless/mediatek/mt76/mt76x2/mt76x2u.h | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x2/pci.c | 13 +-
.../net/wireless/mediatek/mt76/mt76x2/pci_init.c | 14 +-
.../net/wireless/mediatek/mt76/mt76x2/pci_main.c | 15 +-
.../net/wireless/mediatek/mt76/mt76x2/pci_mcu.c | 17 +-
.../net/wireless/mediatek/mt76/mt76x2/pci_phy.c | 13 +-
drivers/net/wireless/mediatek/mt76/mt76x2/phy.c | 18 +-
drivers/net/wireless/mediatek/mt76/mt76x2/usb.c | 14 +-
.../net/wireless/mediatek/mt76/mt76x2/usb_init.c | 20 +-
.../net/wireless/mediatek/mt76/mt76x2/usb_mac.c | 13 +-
.../net/wireless/mediatek/mt76/mt76x2/usb_main.c | 24 +-
.../net/wireless/mediatek/mt76/mt76x2/usb_mcu.c | 13 +-
.../net/wireless/mediatek/mt76/mt76x2/usb_phy.c | 13 +-
drivers/net/wireless/mediatek/mt76/trace.c | 13 +-
drivers/net/wireless/mediatek/mt76/trace.h | 22 +-
drivers/net/wireless/mediatek/mt76/tx.c | 44 +-
drivers/net/wireless/mediatek/mt76/usb.c | 60 +-
drivers/net/wireless/mediatek/mt76/usb_trace.c | 13 +-
drivers/net/wireless/mediatek/mt76/usb_trace.h | 24 +-
drivers/net/wireless/mediatek/mt76/util.c | 13 +-
drivers/net/wireless/mediatek/mt76/util.h | 4 +-
drivers/net/wireless/mediatek/mt7601u/init.c | 3 +
drivers/net/wireless/mediatek/mt7601u/main.c | 4 +-
drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 4 +-
drivers/net/wireless/ralink/rt2x00/Kconfig | 24 +-
drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 46 +-
drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 1 +
drivers/net/wireless/ralink/rt2x00/rt2x00.h | 1 +
drivers/net/wireless/ralink/rt2x00/rt2x00debug.c | 136 +-
drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 16 +-
drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | 9 +-
.../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 11 +-
.../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 3 +-
drivers/net/wireless/realtek/rtlwifi/base.h | 27 -
.../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 8 +-
drivers/net/wireless/realtek/rtlwifi/debug.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/efuse.c | 17 -
drivers/net/wireless/realtek/rtlwifi/pci.c | 8 +-
drivers/net/wireless/realtek/rtlwifi/regd.c | 18 -
.../net/wireless/realtek/rtlwifi/rtl8188ee/def.h | 29 -
.../net/wireless/realtek/rtlwifi/rtl8188ee/dm.c | 7 +-
.../net/wireless/realtek/rtlwifi/rtl8188ee/sw.c | 4 -
.../net/wireless/realtek/rtlwifi/rtl8188ee/trx.c | 257 +-
.../net/wireless/realtek/rtlwifi/rtl8188ee/trx.h | 1046 +-
.../net/wireless/realtek/rtlwifi/rtl8192ce/def.h | 33 -
.../net/wireless/realtek/rtlwifi/rtl8192ce/sw.c | 2 -
.../net/wireless/realtek/rtlwifi/rtl8192ce/trx.c | 238 +-
.../net/wireless/realtek/rtlwifi/rtl8192ce/trx.h | 803 +-
.../net/wireless/realtek/rtlwifi/rtl8192cu/mac.c | 26 +-
.../net/wireless/realtek/rtlwifi/rtl8192cu/sw.c | 2 -
.../net/wireless/realtek/rtlwifi/rtl8192cu/trx.c | 272 +-
.../net/wireless/realtek/rtlwifi/rtl8192cu/trx.h | 529 +-
.../net/wireless/realtek/rtlwifi/rtl8192de/def.h | 31 -
.../net/wireless/realtek/rtlwifi/rtl8192de/trx.c | 18 +-
.../net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 314 +-
.../net/wireless/realtek/rtlwifi/rtl8192ee/trx.h | 861 +-
.../net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 2 -
.../net/wireless/realtek/rtlwifi/rtl8723ae/def.h | 31 -
.../net/wireless/realtek/rtlwifi/rtl8723ae/sw.c | 4 -
.../net/wireless/realtek/rtlwifi/rtl8723ae/trx.c | 212 +-
.../net/wireless/realtek/rtlwifi/rtl8723ae/trx.h | 794 +-
.../net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 4 -
.../net/wireless/realtek/rtlwifi/rtl8723be/trx.c | 236 +-
.../net/wireless/realtek/rtlwifi/rtl8723be/trx.h | 718 +-
.../net/wireless/realtek/rtlwifi/rtl8821ae/def.h | 31 -
.../net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 4 +-
.../net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 4 -
.../net/wireless/realtek/rtlwifi/rtl8821ae/trx.h | 10 +-
drivers/net/wireless/realtek/rtlwifi/usb.c | 16 +-
drivers/net/wireless/realtek/rtw88/Makefile | 1 +
drivers/net/wireless/realtek/rtw88/coex.c | 2502 +
drivers/net/wireless/realtek/rtw88/coex.h | 370 +
drivers/net/wireless/realtek/rtw88/debug.c | 116 +-
drivers/net/wireless/realtek/rtw88/fw.c | 135 +-
drivers/net/wireless/realtek/rtw88/fw.h | 73 +
drivers/net/wireless/realtek/rtw88/mac.c | 3 -
drivers/net/wireless/realtek/rtw88/mac80211.c | 21 +-
drivers/net/wireless/realtek/rtw88/main.c | 50 +-
drivers/net/wireless/realtek/rtw88/main.h | 289 +-
drivers/net/wireless/realtek/rtw88/pci.c | 192 +-
drivers/net/wireless/realtek/rtw88/phy.c | 160 +-
drivers/net/wireless/realtek/rtw88/phy.h | 11 +
drivers/net/wireless/realtek/rtw88/ps.c | 9 +
drivers/net/wireless/realtek/rtw88/reg.h | 79 +
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 470 +-
.../net/wireless/realtek/rtw88/rtw8822b_table.c | 1564 +-
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 1543 +-
drivers/net/wireless/realtek/rtw88/rtw8822c.h | 86 +
.../net/wireless/realtek/rtw88/rtw8822c_table.c | 9565 +++-
.../net/wireless/realtek/rtw88/rtw8822c_table.h | 3 +
drivers/net/wireless/realtek/rtw88/rx.c | 5 +
drivers/net/wireless/rsi/rsi_91x_mac80211.c | 3 +-
drivers/net/wireless/rsi/rsi_91x_sdio.c | 31 +-
drivers/net/wireless/rsi/rsi_91x_usb.c | 1 -
drivers/net/wireless/ti/wlcore/main.c | 3 +-
drivers/net/wireless/ti/wlcore/vendor_cmd.c | 3 +
drivers/net/wireless/wl3501_cs.c | 4 +-
drivers/net/wireless/zydas/zd1211rw/zd_chip.c | 3 +-
drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 1 -
drivers/net/wireless/zydas/zd1211rw/zd_usb.c | 11 +-
drivers/net/xen-netback/netback.c | 15 +-
drivers/net/xen-netback/xenbus.c | 46 +-
drivers/net/xen-netfront.c | 10 +-
drivers/nfc/nfcmrvl/main.c | 4 +-
drivers/nfc/nfcmrvl/uart.c | 4 +-
drivers/nfc/nfcmrvl/usb.c | 1 +
drivers/nfc/nxp-nci/Kconfig | 7 +-
drivers/nfc/nxp-nci/core.c | 2 -
drivers/nfc/nxp-nci/i2c.c | 134 +-
drivers/nfc/nxp-nci/nxp-nci.h | 1 -
drivers/nfc/st-nci/se.c | 2 +
drivers/nfc/st21nfca/se.c | 2 +
drivers/nfc/st95hf/core.c | 4 +-
drivers/ntb/hw/amd/ntb_hw_amd.c | 22 +-
drivers/ntb/hw/amd/ntb_hw_amd.h | 8 +-
drivers/ntb/hw/idt/Kconfig | 6 +-
drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 2 +-
drivers/ntb/msi.c | 5 -
drivers/ntb/ntb_transport.c | 2 +-
drivers/ntb/test/ntb_perf.c | 2 +-
drivers/nvdimm/Kconfig | 12 +
drivers/nvdimm/Makefile | 4 +
drivers/nvdimm/btt.c | 8 +-
drivers/nvdimm/btt_devs.c | 16 +-
drivers/nvdimm/bus.c | 222 +-
drivers/nvdimm/core.c | 10 +-
drivers/nvdimm/dimm_devs.c | 138 +-
drivers/nvdimm/label.c | 5 -
drivers/nvdimm/namespace_devs.c | 83 +-
drivers/nvdimm/nd-core.h | 125 +-
drivers/nvdimm/nd.h | 10 +-
drivers/nvdimm/of_pmem.c | 2 +-
drivers/nvdimm/pfn.h | 5 +-
drivers/nvdimm/pfn_devs.c | 141 +-
drivers/nvdimm/pmem.c | 33 +-
drivers/nvdimm/region.c | 28 +-
drivers/nvdimm/region_devs.c | 102 +-
drivers/nvdimm/security.c | 203 +-
drivers/nvme/host/Kconfig | 1 +
drivers/nvme/host/core.c | 251 +-
drivers/nvme/host/fabrics.c | 38 +-
drivers/nvme/host/fabrics.h | 3 +
drivers/nvme/host/fc.c | 73 +-
drivers/nvme/host/lightnvm.c | 45 +-
drivers/nvme/host/multipath.c | 87 +-
drivers/nvme/host/nvme.h | 68 +-
drivers/nvme/host/pci.c | 135 +-
drivers/nvme/host/rdma.c | 77 +-
drivers/nvme/host/tcp.c | 144 +-
drivers/nvme/host/trace.c | 18 +
drivers/nvme/target/admin-cmd.c | 22 +-
drivers/nvme/target/configfs.c | 1 +
drivers/nvme/target/core.c | 15 +
drivers/nvme/target/discovery.c | 4 +-
drivers/nvme/target/loop.c | 38 +-
drivers/nvme/target/nvmet.h | 3 +
drivers/nvme/target/tcp.c | 24 +-
drivers/nvme/target/trace.c | 18 +
drivers/nvmem/core.c | 7 +-
drivers/nvmem/imx-ocotp-scu.c | 7 +
drivers/nvmem/imx-ocotp.c | 7 +
drivers/nvmem/meson-mx-efuse.c | 3 +-
drivers/nvmem/mxs-ocotp.c | 2 +-
drivers/nvmem/nvmem-sysfs.c | 15 +-
drivers/nvmem/sunxi_sid.c | 1 +
drivers/of/base.c | 58 +-
drivers/of/fdt.c | 14 +
drivers/of/irq.c | 2 +-
drivers/of/of_mdio.c | 10 +-
drivers/of/platform.c | 7 +-
drivers/of/resolver.c | 12 +-
drivers/of/unittest.c | 4 +-
drivers/opp/core.c | 85 +-
drivers/opp/of.c | 30 +-
drivers/parisc/ccio-dma.c | 1 +
drivers/parisc/dino.c | 30 +-
drivers/parisc/eisa_enumerator.c | 10 +-
drivers/parisc/hppb.c | 11 +-
drivers/parisc/sba_iommu.c | 1 +
drivers/parport/Makefile | 2 +-
drivers/parport/parport_serial.c | 50 +-
drivers/pci/Kconfig | 7 +-
drivers/pci/access.c | 9 -
drivers/pci/bus.c | 2 -
drivers/pci/controller/Kconfig | 7 +
drivers/pci/controller/Makefile | 1 +
drivers/pci/controller/dwc/Kconfig | 42 +-
drivers/pci/controller/dwc/Makefile | 4 +-
drivers/pci/controller/dwc/pci-exynos.c | 2 +-
drivers/pci/controller/dwc/pci-imx6.c | 37 +-
drivers/pci/controller/dwc/pci-layerscape-ep.c | 1 +
drivers/pci/controller/dwc/pcie-al.c | 365 +
drivers/pci/controller/dwc/pcie-armada8k.c | 7 +-
drivers/pci/controller/dwc/pcie-designware-ep.c | 45 +-
drivers/pci/controller/dwc/pcie-designware-host.c | 30 +-
drivers/pci/controller/dwc/pcie-designware.c | 96 +-
drivers/pci/controller/dwc/pcie-designware.h | 12 +
drivers/pci/controller/dwc/pcie-histb.c | 4 +-
drivers/pci/controller/dwc/pcie-kirin.c | 2 +-
drivers/pci/controller/dwc/pcie-tegra194.c | 1732 +
drivers/pci/controller/pci-host-common.c | 3 +-
drivers/pci/controller/pci-hyperv-intf.c | 67 +
drivers/pci/controller/pci-hyperv.c | 412 +-
drivers/pci/controller/pci-tegra.c | 22 +-
drivers/pci/controller/pcie-iproc-platform.c | 9 +-
drivers/pci/controller/pcie-mediatek.c | 20 +-
drivers/pci/controller/pcie-mobiveil.c | 10 +-
drivers/pci/controller/pcie-rockchip-host.c | 16 +-
drivers/pci/controller/vmd.c | 25 +-
drivers/pci/hotplug/Kconfig | 9 -
drivers/pci/hotplug/Makefile | 1 -
drivers/pci/hotplug/cpci_hotplug_core.c | 1 -
drivers/pci/hotplug/cpqphp_core.c | 1 -
drivers/pci/hotplug/cpqphp_ctrl.c | 4 -
drivers/pci/hotplug/cpqphp_nvram.h | 5 +-
drivers/pci/hotplug/ibmphp_res.c | 1 +
drivers/pci/hotplug/pciehp.h | 11 +-
drivers/pci/hotplug/pciehp_core.c | 9 +-
drivers/pci/hotplug/pciehp_ctrl.c | 39 +-
drivers/pci/hotplug/pciehp_hpc.c | 87 +-
drivers/pci/hotplug/pnv_php.c | 59 +-
drivers/pci/hotplug/rpadlpar_core.c | 1 -
drivers/pci/hotplug/rpaphp_core.c | 19 +-
drivers/pci/hotplug/sgi_hotplug.c | 700 -
drivers/pci/iov.c | 171 +-
drivers/pci/of.c | 2 +-
drivers/pci/p2pdma.c | 374 +-
drivers/pci/pci-acpi.c | 410 +-
drivers/pci/pci-bridge-emul.c | 4 +-
drivers/pci/pci-sysfs.c | 239 +-
drivers/pci/pci.c | 116 +-
drivers/pci/pci.h | 69 +-
drivers/pci/pcie/aspm.c | 29 +-
drivers/pci/pcie/err.c | 2 +-
drivers/pci/pcie/portdrv_core.c | 66 -
drivers/pci/probe.c | 333 +-
drivers/pci/proc.c | 14 +-
drivers/pci/quirks.c | 108 +-
drivers/pci/search.c | 1 -
drivers/pci/setup-bus.c | 4 +-
drivers/pci/syscall.c | 4 +-
drivers/pci/vc.c | 5 +-
drivers/pci/vpd.c | 6 +
drivers/pcmcia/cistpl.c | 5 +
drivers/pcmcia/db1xxx_ss.c | 4 +
drivers/pcmcia/i82092.c | 6 +-
drivers/perf/arm_pmu.c | 2 +-
drivers/perf/arm_smmuv3_pmu.c | 65 +-
drivers/perf/fsl_imx8_ddr_perf.c | 75 +-
drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 4 +-
drivers/perf/hisilicon/hisi_uncore_hha_pmu.c | 4 +-
drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 4 +-
drivers/perf/qcom_l2_pmu.c | 6 +-
drivers/perf/xgene_pmu.c | 4 +-
drivers/phy/Makefile | 2 +-
drivers/phy/lantiq/Kconfig | 11 +
drivers/phy/lantiq/Makefile | 1 +
drivers/phy/lantiq/phy-lantiq-vrx200-pcie.c | 494 +
drivers/phy/marvell/Kconfig | 1 +
drivers/phy/marvell/phy-armada38x-comphy.c | 4 +-
drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 17 +-
drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 525 +-
drivers/phy/motorola/phy-cpcap-usb.c | 8 +-
drivers/phy/phy-core.c | 10 +
drivers/phy/qualcomm/phy-qcom-qmp.c | 44 +-
drivers/phy/renesas/phy-rcar-gen3-usb2.c | 2 +
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 2 +-
drivers/phy/samsung/phy-exynos-dp-video.c | 1 +
drivers/phy/samsung/phy-exynos-mipi-video.c | 1 +
drivers/phy/samsung/phy-exynos-pcie.c | 1 +
drivers/phy/samsung/phy-exynos5-usbdrd.c | 1 +
drivers/phy/samsung/phy-exynos5250-sata.c | 1 +
drivers/phy/samsung/phy-samsung-usb2.c | 1 +
drivers/phy/tegra/Kconfig | 7 +
drivers/phy/tegra/Makefile | 1 +
drivers/phy/tegra/phy-tegra194-p2u.c | 120 +
drivers/phy/ti/phy-am654-serdes.c | 37 +-
drivers/pinctrl/aspeed/Kconfig | 8 +
drivers/pinctrl/aspeed/Makefile | 1 +
drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c | 1827 +-
drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c | 1989 +-
drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c | 2395 +
drivers/pinctrl/aspeed/pinctrl-aspeed.c | 12 +-
drivers/pinctrl/aspeed/pinmux-aspeed.c | 9 +-
drivers/pinctrl/aspeed/pinmux-aspeed.h | 239 +-
drivers/pinctrl/bcm/pinctrl-bcm2835.c | 156 +-
drivers/pinctrl/bcm/pinctrl-cygnus-mux.c | 1 -
drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 158 +-
drivers/pinctrl/cirrus/Kconfig | 6 +
drivers/pinctrl/cirrus/Makefile | 6 +
drivers/pinctrl/cirrus/pinctrl-cs47l15.c | 40 +
drivers/pinctrl/cirrus/pinctrl-cs47l92.c | 40 +
drivers/pinctrl/cirrus/pinctrl-madera-core.c | 24 +-
drivers/pinctrl/cirrus/pinctrl-madera.h | 2 +
drivers/pinctrl/core.c | 28 +
drivers/pinctrl/devicetree.c | 6 +-
drivers/pinctrl/freescale/pinctrl-imx.c | 13 +-
drivers/pinctrl/freescale/pinctrl-mxs.c | 12 +-
drivers/pinctrl/intel/pinctrl-baytrail.c | 83 +-
drivers/pinctrl/intel/pinctrl-broxton.c | 4 +-
drivers/pinctrl/intel/pinctrl-cannonlake.c | 2 +
drivers/pinctrl/intel/pinctrl-cherryview.c | 50 +-
drivers/pinctrl/intel/pinctrl-denverton.c | 53 +-
drivers/pinctrl/intel/pinctrl-geminilake.c | 2 +
drivers/pinctrl/intel/pinctrl-icelake.c | 2 +
drivers/pinctrl/intel/pinctrl-intel.c | 120 +-
drivers/pinctrl/intel/pinctrl-intel.h | 9 +-
drivers/pinctrl/intel/pinctrl-lewisburg.c | 2 +
drivers/pinctrl/intel/pinctrl-merrifield.c | 4 +-
drivers/pinctrl/intel/pinctrl-sunrisepoint.c | 2 +
drivers/pinctrl/meson/pinctrl-meson-g12a.c | 9 +
drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 12 +-
drivers/pinctrl/meson/pinctrl-meson.c | 1 +
drivers/pinctrl/mvebu/pinctrl-armada-cp110.c | 20 +-
drivers/pinctrl/nomadik/pinctrl-abx500.c | 1 +
drivers/pinctrl/nomadik/pinctrl-nomadik.c | 1 +
drivers/pinctrl/pinctrl-amd.c | 16 +-
drivers/pinctrl/pinctrl-falcon.c | 11 +-
drivers/pinctrl/pinctrl-ingenic.c | 755 +-
drivers/pinctrl/pinctrl-oxnas.c | 8 +-
drivers/pinctrl/pinctrl-pic32.c | 4 +-
drivers/pinctrl/pinctrl-rk805.c | 4 +-
drivers/pinctrl/pinctrl-rockchip.c | 1 +
drivers/pinctrl/pinctrl-rza1.c | 16 +-
drivers/pinctrl/pinctrl-rza2.c | 17 +-
drivers/pinctrl/pinctrl-rzn1.c | 12 +-
drivers/pinctrl/pinctrl-st.c | 12 +-
drivers/pinctrl/pinctrl-stmfx.c | 46 +-
drivers/pinctrl/pinctrl-xway.c | 4 +-
drivers/pinctrl/pinmux.c | 24 +
drivers/pinctrl/pinmux.h | 8 +
drivers/pinctrl/qcom/Kconfig | 10 +
drivers/pinctrl/qcom/Makefile | 1 +
drivers/pinctrl/qcom/pinctrl-msm.c | 59 +-
drivers/pinctrl/qcom/pinctrl-msm8998.c | 76 +-
drivers/pinctrl/qcom/pinctrl-qdf2xxx.c | 2 +-
drivers/pinctrl/qcom/pinctrl-sc7180.c | 1146 +
drivers/pinctrl/qcom/pinctrl-sdm845.c | 8 +-
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 100 +-
drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 5 +-
drivers/pinctrl/sh-pfc/gpio.c | 11 +-
drivers/pinctrl/sh-pfc/pinctrl.c | 43 +-
drivers/pinctrl/spear/pinctrl-spear.c | 8 +-
drivers/pinctrl/sprd/pinctrl-sprd-sc9860.c | 1 -
drivers/pinctrl/sprd/pinctrl-sprd.c | 32 +-
drivers/pinctrl/stm32/pinctrl-stm32.c | 5 +-
drivers/pinctrl/sunxi/pinctrl-sun8i-v3s.c | 265 +-
drivers/pinctrl/sunxi/pinctrl-sunxi.h | 2 +
drivers/pinctrl/tegra/pinctrl-tegra.c | 67 +-
drivers/pinctrl/tegra/pinctrl-tegra.h | 3 +
drivers/pinctrl/tegra/pinctrl-tegra210.c | 1 +
drivers/pinctrl/uniphier/pinctrl-uniphier-ld11.c | 10 +-
drivers/pinctrl/uniphier/pinctrl-uniphier-ld20.c | 20 +-
drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c | 10 +-
drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c | 10 +-
drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c | 10 +-
drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c | 17 +-
drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c | 10 +-
drivers/pinctrl/uniphier/pinctrl-uniphier-pxs3.c | 10 +-
drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c | 10 +-
drivers/platform/chrome/Kconfig | 60 +-
drivers/platform/chrome/Makefile | 2 +
drivers/platform/chrome/chromeos_laptop.c | 10 +-
drivers/platform/chrome/chromeos_tbmc.c | 2 +
drivers/platform/chrome/cros_ec.c | 281 +
drivers/platform/chrome/cros_ec_chardev.c | 419 +
drivers/platform/chrome/cros_ec_debugfs.c | 3 +-
drivers/platform/chrome/cros_ec_i2c.c | 12 +-
drivers/platform/chrome/cros_ec_ishtp.c | 9 +-
drivers/platform/chrome/cros_ec_lightbar.c | 3 +-
drivers/platform/chrome/cros_ec_lpc.c | 7 +-
drivers/platform/chrome/cros_ec_proto.c | 3 +-
drivers/platform/chrome/cros_ec_rpmsg.c | 57 +-
drivers/platform/chrome/cros_ec_spi.c | 14 +-
drivers/platform/chrome/cros_ec_sysfs.c | 3 +-
drivers/platform/chrome/cros_ec_trace.c | 7 +-
drivers/platform/chrome/cros_ec_trace.h | 4 +-
drivers/platform/chrome/cros_ec_vbc.c | 3 +-
drivers/platform/chrome/cros_usbpd_logger.c | 8 +-
drivers/platform/chrome/wilco_ec/telemetry.c | 64 +-
drivers/platform/mellanox/mlxreg-hotplug.c | 5 +-
drivers/platform/olpc/olpc-xo175-ec.c | 6 +
drivers/platform/x86/Kconfig | 1 +
drivers/platform/x86/acer-wmi.c | 49 +-
drivers/platform/x86/asus-nb-wmi.c | 9 +
drivers/platform/x86/asus-wmi.c | 534 +-
drivers/platform/x86/compal-laptop.c | 2 +-
drivers/platform/x86/dell-wmi.c | 12 +-
drivers/platform/x86/hp-wmi.c | 47 +-
drivers/platform/x86/hp_accel.c | 1 +
drivers/platform/x86/i2c-multi-instantiate.c | 6 +-
drivers/platform/x86/intel-hid.c | 36 +-
drivers/platform/x86/intel-vbtn.c | 20 +-
drivers/platform/x86/intel_bxtwc_tmu.c | 5 +-
drivers/platform/x86/intel_cht_int33fe.c | 57 +-
drivers/platform/x86/intel_int0002_vgpio.c | 26 +-
drivers/platform/x86/intel_pmc_core.c | 21 +-
drivers/platform/x86/intel_pmc_core_pltdrv.c | 20 +-
drivers/platform/x86/intel_pmc_ipc.c | 4 +-
.../x86/intel_speed_select_if/isst_if_common.c | 2 +
.../x86/intel_speed_select_if/isst_if_mmio.c | 8 +-
drivers/platform/x86/pcengines-apuv2.c | 19 +-
drivers/platform/x86/pmc_atom.c | 14 +
drivers/platform/x86/surfacepro3_button.c | 47 +
drivers/platform/x86/thinkpad_acpi.c | 122 +-
drivers/platform/x86/touchscreen_dmi.c | 58 +
drivers/platform/x86/wmi.c | 4 +-
drivers/power/reset/gpio-restart.c | 2 +-
drivers/power/reset/reboot-mode.c | 2 +-
drivers/power/supply/Kconfig | 13 +-
drivers/power/supply/Makefile | 1 -
drivers/power/supply/ab8500_charger.c | 8 +-
drivers/power/supply/axp288_fuel_gauge.c | 14 +-
drivers/power/supply/bq25890_charger.c | 12 +-
drivers/power/supply/cpcap-charger.c | 23 +-
drivers/power/supply/cros_usbpd-charger.c | 5 +-
drivers/power/supply/isp1704_charger.c | 2 +-
drivers/power/supply/jz4740-battery.c | 421 -
drivers/power/supply/max17042_battery.c | 8 +-
drivers/power/supply/max77650-charger.c | 1 +
drivers/power/supply/power_supply_core.c | 10 +-
drivers/power/supply/power_supply_hwmon.c | 15 +-
drivers/power/supply/sbs-battery.c | 27 +-
drivers/power/supply/sc27xx_fuel_gauge.c | 223 +-
drivers/powercap/idle_inject.c | 53 +-
drivers/powercap/intel_rapl_common.c | 34 +-
drivers/powercap/powercap_sys.c | 2 +-
drivers/ptp/ptp_chardev.c | 63 +
drivers/ptp/ptp_dte.c | 5 +-
drivers/pwm/Kconfig | 15 +-
drivers/pwm/Makefile | 1 +
drivers/pwm/core.c | 47 +-
drivers/pwm/pwm-atmel-hlcdc.c | 2 +-
drivers/pwm/pwm-atmel.c | 49 +-
drivers/pwm/pwm-bcm-iproc.c | 2 +-
drivers/pwm/pwm-bcm2835.c | 19 +-
drivers/pwm/pwm-cros-ec.c | 6 +-
drivers/pwm/pwm-fsl-ftm.c | 8 +-
drivers/pwm/pwm-hibvt.c | 2 +-
drivers/pwm/pwm-imx-tpm.c | 4 +-
drivers/pwm/pwm-imx27.c | 6 +-
drivers/pwm/pwm-jz4740.c | 7 +-
drivers/pwm/pwm-lpss.c | 2 +-
drivers/pwm/pwm-mediatek.c | 231 +-
drivers/pwm/pwm-meson.c | 4 +-
drivers/pwm/pwm-mxs.c | 4 +-
drivers/pwm/pwm-rcar.c | 4 +-
drivers/pwm/pwm-rockchip.c | 18 +-
drivers/pwm/pwm-sifive.c | 6 +-
drivers/pwm/pwm-sprd.c | 309 +
drivers/pwm/pwm-sti.c | 4 +-
drivers/pwm/pwm-stm32-lp.c | 8 +-
drivers/pwm/pwm-stm32.c | 4 +-
drivers/pwm/pwm-sun4i.c | 10 +-
drivers/pwm/pwm-zx.c | 2 +-
drivers/ras/Makefile | 3 +-
drivers/ras/cec.c | 1 +
drivers/ras/debugfs.c | 2 +
drivers/regulator/Kconfig | 17 +
drivers/regulator/Makefile | 2 +
drivers/regulator/act8865-regulator.c | 316 +-
drivers/regulator/act8945a-regulator.c | 8 +-
drivers/regulator/axp20x-regulator.c | 10 +-
drivers/regulator/core.c | 58 +-
drivers/regulator/da9062-regulator.c | 4 +-
drivers/regulator/da9063-regulator.c | 4 +-
drivers/regulator/da9211-regulator.c | 2 +-
drivers/regulator/fixed.c | 83 +-
drivers/regulator/helpers.c | 21 +
drivers/regulator/lm363x-regulator.c | 10 +-
drivers/regulator/lp87565-regulator.c | 13 +-
drivers/regulator/lp8788-ldo.c | 2 +-
drivers/regulator/max77686-regulator.c | 2 +-
drivers/regulator/max8660.c | 1 -
drivers/regulator/mt6358-regulator.c | 549 +
drivers/regulator/of_regulator.c | 11 +-
drivers/regulator/qcom-rpmh-regulator.c | 193 +-
drivers/regulator/rk808-regulator.c | 2 +-
drivers/regulator/s2mps11.c | 2 +-
drivers/regulator/slg51000-regulator.c | 15 +-
drivers/regulator/stm32-booster.c | 4 -
drivers/regulator/sy8824x.c | 232 +
drivers/regulator/tps65132-regulator.c | 4 +-
drivers/regulator/twl-regulator.c | 23 +-
drivers/regulator/twl6030-regulator.c | 21 +-
drivers/regulator/uniphier-regulator.c | 4 +
drivers/remoteproc/Kconfig | 2 +-
drivers/remoteproc/da8xx_remoteproc.c | 4 +-
drivers/remoteproc/keystone_remoteproc.c | 4 -
drivers/remoteproc/qcom_common.c | 4 +-
drivers/remoteproc/qcom_q6v5.c | 35 +-
drivers/remoteproc/qcom_q6v5_mss.c | 4 +-
drivers/remoteproc/remoteproc_sysfs.c | 11 +
drivers/remoteproc/stm32_rproc.c | 14 +
drivers/reset/Kconfig | 13 +-
drivers/reset/Makefile | 1 +
drivers/reset/reset-imx7.c | 12 +-
drivers/reset/reset-meson.c | 51 +-
drivers/reset/reset-scmi.c | 125 +
drivers/reset/reset-simple.c | 3 +
drivers/rpmsg/qcom_glink_native.c | 2 +-
drivers/rpmsg/qcom_glink_smem.c | 2 +-
drivers/rpmsg/rpmsg_core.c | 8 +-
drivers/rpmsg/rpmsg_internal.h | 5 +-
drivers/rpmsg/virtio_rpmsg_bus.c | 2 +-
drivers/rtc/Kconfig | 44 +-
drivers/rtc/Makefile | 3 +-
drivers/rtc/class.c | 4 +-
drivers/rtc/interface.c | 11 +-
drivers/rtc/rtc-88pm80x.c | 6 +-
drivers/rtc/rtc-88pm860x.c | 4 +-
drivers/rtc/rtc-ab-eoz9.c | 24 +-
drivers/rtc/rtc-ac100.c | 14 +-
drivers/rtc/rtc-armada38x.c | 12 +-
drivers/rtc/rtc-asm9260.c | 4 +-
drivers/rtc/rtc-aspeed.c | 7 +-
drivers/rtc/rtc-at91rm9200.c | 4 +-
drivers/rtc/rtc-at91sam9.c | 4 +-
drivers/rtc/rtc-bd70528.c | 11 +-
drivers/rtc/rtc-brcmstb-waketimer.c | 4 +-
drivers/rtc/rtc-cadence.c | 13 +-
drivers/rtc/rtc-cros-ec.c | 3 +-
drivers/rtc/rtc-davinci.c | 4 +-
drivers/rtc/rtc-ds1305.c | 7 +-
drivers/rtc/rtc-ds1374.c | 2 +-
drivers/rtc/rtc-ds1672.c | 3 -
drivers/rtc/rtc-fsl-ftm-alarm.c | 337 +
drivers/rtc/rtc-imx-sc.c | 4 +-
drivers/rtc/rtc-imxdi.c | 4 +-
drivers/rtc/rtc-isl12026.c | 6 +-
drivers/rtc/rtc-jz4740.c | 8 +-
drivers/rtc/rtc-max77686.c | 26 +-
drivers/rtc/rtc-meson-vrtc.c | 155 +
drivers/rtc/rtc-mt6397.c | 4 +-
drivers/rtc/rtc-mt7622.c | 1 -
drivers/rtc/rtc-mxc.c | 5 +-
drivers/rtc/rtc-mxc_v2.c | 4 +-
drivers/rtc/rtc-nuc900.c | 271 -
drivers/rtc/rtc-pcf2123.c | 136 +-
drivers/rtc/rtc-pcf2127.c | 380 +-
drivers/rtc/rtc-pcf85363.c | 7 +-
drivers/rtc/rtc-pcf8563.c | 48 +-
drivers/rtc/rtc-pic32.c | 4 +-
drivers/rtc/rtc-pm8xxx.c | 4 +-
drivers/rtc/rtc-puv3.c | 12 +-
drivers/rtc/rtc-pxa.c | 8 +-
drivers/rtc/rtc-rk808.c | 6 +-
drivers/rtc/rtc-rv3028.c | 3 +-
drivers/rtc/rtc-rv3029c2.c | 16 +-
drivers/rtc/rtc-rv8803.c | 3 +-
drivers/rtc/rtc-s35390a.c | 56 +-
drivers/rtc/rtc-s3c.c | 8 +-
drivers/rtc/rtc-s5m.c | 6 +-
drivers/rtc/rtc-sc27xx.c | 7 +-
drivers/rtc/rtc-sd3078.c | 4 +-
drivers/rtc/rtc-snvs.c | 25 +-
drivers/rtc/rtc-spear.c | 4 +-
drivers/rtc/rtc-stm32.c | 1 -
drivers/rtc/rtc-sun6i.c | 76 +-
drivers/rtc/rtc-sunxi.c | 14 +-
drivers/rtc/rtc-tegra.c | 8 +-
drivers/rtc/rtc-tps6586x.c | 5 +-
drivers/rtc/rtc-tps65910.c | 8 +-
drivers/rtc/rtc-vt8500.c | 4 +-
drivers/rtc/rtc-xgene.c | 4 +-
drivers/rtc/rtc-zynqmp.c | 8 +-
drivers/s390/Makefile | 3 -
drivers/s390/block/dasd_alias.c | 22 +-
drivers/s390/char/Makefile | 3 -
drivers/s390/char/con3215.c | 1 +
drivers/s390/char/sclp_early.c | 2 +-
drivers/s390/char/tape_core.c | 3 +
drivers/s390/char/vmcp.c | 2 +
drivers/s390/cio/ccwgroup.c | 20 +-
drivers/s390/cio/css.c | 2 +
drivers/s390/cio/device.c | 15 +-
drivers/s390/cio/device_ops.c | 23 +-
drivers/s390/cio/qdio.h | 3 +-
drivers/s390/cio/qdio_main.c | 99 +-
drivers/s390/cio/qdio_setup.c | 2 +-
drivers/s390/cio/vfio_ccw_async.c | 2 +-
drivers/s390/cio/vfio_ccw_cp.c | 28 +-
drivers/s390/cio/vfio_ccw_drv.c | 60 +-
drivers/s390/cio/vfio_ccw_fsm.c | 51 +-
drivers/s390/cio/vfio_ccw_ops.c | 10 +
drivers/s390/cio/vfio_ccw_private.h | 17 +
drivers/s390/crypto/Makefile | 2 +-
drivers/s390/crypto/ap_bus.c | 12 +-
drivers/s390/crypto/ap_bus.h | 3 +-
drivers/s390/crypto/ap_queue.c | 1 +
drivers/s390/crypto/pkey_api.c | 1843 +-
drivers/s390/crypto/vfio_ap_drv.c | 2 +
drivers/s390/crypto/vfio_ap_ops.c | 2 +-
drivers/s390/crypto/zcrypt_api.c | 52 +-
drivers/s390/crypto/zcrypt_api.h | 10 +-
drivers/s390/crypto/zcrypt_ccamisc.c | 1765 +
drivers/s390/crypto/zcrypt_ccamisc.h | 217 +
drivers/s390/crypto/zcrypt_cex4.c | 178 +-
drivers/s390/crypto/zcrypt_msgtype6.c | 17 +-
drivers/s390/net/ctcm_fsms.c | 43 +-
drivers/s390/net/ctcm_main.c | 12 +-
drivers/s390/net/ctcm_mpc.c | 9 +-
drivers/s390/net/lcs.c | 6 +-
drivers/s390/net/qeth_core.h | 87 +-
drivers/s390/net/qeth_core_main.c | 679 +-
drivers/s390/net/qeth_core_mpc.h | 1 -
drivers/s390/net/qeth_ethtool.c | 2 +
drivers/s390/net/qeth_l2_main.c | 76 +-
drivers/s390/net/qeth_l3_main.c | 33 +-
drivers/s390/virtio/virtio_ccw.c | 4 +
drivers/scsi/Kconfig | 4 +-
drivers/scsi/aacraid/linit.c | 1 -
drivers/scsi/aic94xx/aic94xx_init.c | 9 +-
drivers/scsi/arm/fas216.c | 8 +
drivers/scsi/bfa/bfad_im.c | 2 +-
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 4 +-
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 16 -
drivers/scsi/bnx2fc/bnx2fc_io.c | 7 -
drivers/scsi/csiostor/csio_wr.c | 8 +-
drivers/scsi/cxlflash/main.c | 12 +-
drivers/scsi/device_handler/scsi_dh_alua.c | 7 +-
drivers/scsi/device_handler/scsi_dh_rdac.c | 2 +
drivers/scsi/esas2r/esas2r_init.c | 13 +-
drivers/scsi/esas2r/esas2r_ioctl.c | 14 +-
drivers/scsi/fcoe/fcoe.c | 20 +-
drivers/scsi/fcoe/fcoe_ctlr.c | 140 +-
drivers/scsi/fcoe/fcoe_transport.c | 4 +-
drivers/scsi/fdomain.c | 6 +-
drivers/scsi/fdomain_isa.c | 5 +-
drivers/scsi/fnic/fnic_debugfs.c | 4 +-
drivers/scsi/fnic/fnic_fcs.c | 14 +-
drivers/scsi/fnic/fnic_isr.c | 4 +-
drivers/scsi/fnic/fnic_trace.c | 2 +-
drivers/scsi/hisi_sas/hisi_sas.h | 54 +-
drivers/scsi/hisi_sas/hisi_sas_main.c | 982 +-
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 48 +-
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 92 +-
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 307 +-
drivers/scsi/hpsa.c | 19 +-
drivers/scsi/ibmvscsi/ibmvfc.c | 5 +-
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 3 +
drivers/scsi/libfc/fc_rport.c | 5 +-
drivers/scsi/libsas/sas_discover.c | 1 +
drivers/scsi/lpfc/lpfc.h | 12 +-
drivers/scsi/lpfc/lpfc_attr.c | 91 +-
drivers/scsi/lpfc/lpfc_bsg.c | 29 +-
drivers/scsi/lpfc/lpfc_crtn.h | 13 +-
drivers/scsi/lpfc/lpfc_ct.c | 68 +-
drivers/scsi/lpfc/lpfc_debugfs.c | 228 +-
drivers/scsi/lpfc/lpfc_debugfs.h | 61 +-
drivers/scsi/lpfc/lpfc_disc.h | 3 +
drivers/scsi/lpfc/lpfc_els.c | 116 +-
drivers/scsi/lpfc/lpfc_hbadisc.c | 181 +-
drivers/scsi/lpfc/lpfc_hw.h | 6 +-
drivers/scsi/lpfc/lpfc_hw4.h | 34 +
drivers/scsi/lpfc/lpfc_init.c | 959 +-
drivers/scsi/lpfc/lpfc_mem.c | 65 +-
drivers/scsi/lpfc/lpfc_nportdisc.c | 43 +-
drivers/scsi/lpfc/lpfc_nvme.c | 389 +-
drivers/scsi/lpfc/lpfc_nvmet.c | 28 +-
drivers/scsi/lpfc/lpfc_scsi.c | 591 +-
drivers/scsi/lpfc/lpfc_sli.c | 533 +-
drivers/scsi/lpfc/lpfc_sli.h | 11 +-
drivers/scsi/lpfc/lpfc_sli4.h | 53 +-
drivers/scsi/lpfc/lpfc_version.h | 2 +-
drivers/scsi/lpfc/lpfc_vport.c | 8 +-
drivers/scsi/megaraid/megaraid_sas.h | 1 +
drivers/scsi/megaraid/megaraid_sas_base.c | 117 +-
drivers/scsi/megaraid/megaraid_sas_fusion.c | 56 +-
drivers/scsi/mpt3sas/mpi/mpi2.h | 5 +-
drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 10 +-
drivers/scsi/mpt3sas/mpi/mpi2_image.h | 39 +-
drivers/scsi/mpt3sas/mpi/mpi2_pci.h | 13 +-
drivers/scsi/mpt3sas/mpi/mpi2_tool.h | 13 +-
drivers/scsi/mpt3sas/mpt3sas_base.c | 187 +-
drivers/scsi/mpt3sas/mpt3sas_base.h | 30 +-
drivers/scsi/mpt3sas/mpt3sas_ctl.c | 178 +-
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 197 +-
drivers/scsi/ncr53c8xx.c | 4 +
drivers/scsi/pm8001/pm8001_sas.c | 13 +-
drivers/scsi/pmcraid.c | 2 +-
drivers/scsi/qedf/qedf.h | 1 +
drivers/scsi/qedf/qedf_debugfs.c | 16 +-
drivers/scsi/qedf/qedf_els.c | 38 +-
drivers/scsi/qedf/qedf_fip.c | 33 +-
drivers/scsi/qedf/qedf_io.c | 67 +-
drivers/scsi/qedf/qedf_main.c | 180 +-
drivers/scsi/qedf/qedf_version.h | 8 +-
drivers/scsi/qla1280.c | 37 -
drivers/scsi/qla1280.h | 3 -
drivers/scsi/qla2xxx/qla_attr.c | 14 +-
drivers/scsi/qla2xxx/qla_bsg.c | 23 +-
drivers/scsi/qla2xxx/qla_dbg.c | 3 +-
drivers/scsi/qla2xxx/qla_def.h | 132 +-
drivers/scsi/qla2xxx/qla_dfs.c | 9 +-
drivers/scsi/qla2xxx/qla_dsd.h | 2 +
drivers/scsi/qla2xxx/qla_fw.h | 8 +-
drivers/scsi/qla2xxx/qla_gbl.h | 33 +-
drivers/scsi/qla2xxx/qla_gs.c | 254 +-
drivers/scsi/qla2xxx/qla_init.c | 566 +-
drivers/scsi/qla2xxx/qla_inline.h | 28 +-
drivers/scsi/qla2xxx/qla_iocb.c | 226 +-
drivers/scsi/qla2xxx/qla_isr.c | 29 +-
drivers/scsi/qla2xxx/qla_mbx.c | 26 +-
drivers/scsi/qla2xxx/qla_mid.c | 4 +-
drivers/scsi/qla2xxx/qla_mr.c | 67 +-
drivers/scsi/qla2xxx/qla_nvme.c | 32 +-
drivers/scsi/qla2xxx/qla_nvme.h | 5 +-
drivers/scsi/qla2xxx/qla_nx.c | 22 +-
drivers/scsi/qla2xxx/qla_nx.h | 14 +-
drivers/scsi/qla2xxx/qla_nx2.c | 2 +-
drivers/scsi/qla2xxx/qla_os.c | 248 +-
drivers/scsi/qla2xxx/qla_sup.c | 16 +-
drivers/scsi/qla2xxx/qla_target.c | 212 +-
drivers/scsi/qla2xxx/qla_target.h | 35 +-
drivers/scsi/qla2xxx/qla_tmpl.c | 7 +-
drivers/scsi/qla2xxx/qla_version.h | 2 +-
drivers/scsi/qla2xxx/tcm_qla2xxx.c | 27 +-
drivers/scsi/qlogicpti.c | 10 +
drivers/scsi/scsi_debugfs.c | 5 +-
drivers/scsi/scsi_lib.c | 71 +-
drivers/scsi/scsi_logging.c | 48 +-
drivers/scsi/scsi_pm.c | 3 +-
drivers/scsi/scsi_proc.c | 9 +-
drivers/scsi/sd.c | 14 +-
drivers/scsi/sd.h | 5 +-
drivers/scsi/sd_zbc.c | 12 +-
drivers/scsi/smartpqi/Kconfig | 2 +
drivers/scsi/smartpqi/smartpqi.h | 20 +-
drivers/scsi/smartpqi/smartpqi_init.c | 236 +-
drivers/scsi/smartpqi/smartpqi_sas_transport.c | 102 +-
drivers/scsi/sun3_scsi.c | 2 +
drivers/scsi/sym53c8xx_2/sym_nvram.c | 2 +-
drivers/scsi/ufs/cdns-pltfrm.c | 40 +-
drivers/scsi/ufs/ufs-hisi.c | 4 +-
drivers/scsi/ufs/ufs-qcom.c | 41 +-
drivers/scsi/ufs/ufs-qcom.h | 4 +
drivers/scsi/ufs/ufs-sysfs.c | 18 +-
drivers/scsi/ufs/ufs.h | 2 +-
drivers/scsi/ufs/ufshcd-pltfrm.c | 4 +-
drivers/scsi/ufs/ufshcd.c | 284 +-
drivers/scsi/ufs/ufshcd.h | 57 +-
drivers/scsi/virtio_scsi.c | 88 +-
drivers/scsi/wd33c93.c | 1 +
drivers/slimbus/qcom-ngd-ctrl.c | 5 +-
drivers/slimbus/slimbus.h | 2 +-
drivers/sn/Kconfig | 22 -
drivers/sn/Makefile | 7 -
drivers/sn/ioc3.c | 844 -
drivers/soc/amlogic/Kconfig | 11 +
drivers/soc/amlogic/Makefile | 1 +
drivers/soc/amlogic/meson-clk-measure.c | 148 +-
drivers/soc/amlogic/meson-ee-pwrc.c | 492 +
drivers/soc/amlogic/meson-gx-socinfo.c | 7 +-
drivers/soc/fsl/dpaa2-console.c | 2 +-
drivers/soc/fsl/dpio/dpio-service.c | 2 -
drivers/soc/fsl/guts.c | 6 +
drivers/soc/fsl/qbman/bman.c | 17 +-
drivers/soc/fsl/qbman/bman_ccsr.c | 36 +-
drivers/soc/fsl/qbman/bman_portal.c | 22 +-
drivers/soc/fsl/qbman/bman_priv.h | 5 +
drivers/soc/fsl/qbman/dpaa_sys.c | 63 +-
drivers/soc/fsl/qbman/qman.c | 83 +-
drivers/soc/fsl/qbman/qman_ccsr.c | 68 +-
drivers/soc/fsl/qbman/qman_portal.c | 22 +-
drivers/soc/fsl/qbman/qman_priv.h | 8 +
drivers/soc/fsl/qe/qe.c | 165 +-
drivers/soc/imx/gpcv2.c | 2 +-
drivers/soc/imx/soc-imx-scu.c | 39 +
drivers/soc/imx/soc-imx8.c | 45 +
drivers/soc/ixp4xx/Kconfig | 4 +
drivers/soc/mediatek/mtk-cmdq-helper.c | 10 +-
drivers/soc/qcom/Kconfig | 8 +
drivers/soc/qcom/Makefile | 1 +
drivers/soc/qcom/qcom-geni-se.c | 6 +
drivers/soc/qcom/qcom_aoss.c | 133 +
drivers/soc/qcom/smem.c | 11 +-
drivers/soc/qcom/socinfo.c | 476 +
drivers/soc/renesas/Kconfig | 11 +
drivers/soc/renesas/rcar-sysc.c | 7 +-
drivers/soc/renesas/rmobile-sysc.c | 31 +-
drivers/soc/samsung/Kconfig | 6 +
drivers/soc/samsung/Makefile | 2 +
drivers/soc/samsung/exynos-chipid.c | 105 +
drivers/soc/ti/pm33xx.c | 19 +-
drivers/soc/ti/ti_sci_pm_domains.c | 23 +-
drivers/soc/ux500/ux500-soc-id.c | 5 +-
drivers/soundwire/Kconfig | 7 +-
drivers/soundwire/Makefile | 6 +-
drivers/soundwire/bus.c | 20 +-
drivers/soundwire/bus.h | 24 +-
drivers/soundwire/bus_type.c | 3 +
drivers/soundwire/cadence_master.c | 219 +-
drivers/soundwire/cadence_master.h | 6 +-
drivers/soundwire/debugfs.c | 151 +
drivers/soundwire/intel.c | 211 +-
drivers/soundwire/intel_init.c | 11 +
drivers/soundwire/mipi_disco.c | 18 +-
drivers/soundwire/slave.c | 53 +
drivers/soundwire/stream.c | 105 +-
drivers/spi/Kconfig | 19 +-
drivers/spi/Makefile | 2 +-
drivers/spi/atmel-quadspi.c | 1 -
drivers/spi/spi-altera.c | 4 +-
drivers/spi/spi-armada-3700.c | 5 +-
drivers/spi/spi-ath79.c | 4 +-
drivers/spi/spi-atmel.c | 5 +
drivers/spi/spi-axi-spi-engine.c | 4 +-
drivers/spi/spi-bcm-qspi.c | 5 +-
drivers/spi/spi-bcm2835.c | 469 +-
drivers/spi/spi-bcm2835aux.c | 5 +-
drivers/spi/spi-bcm63xx-hsspi.c | 8 +-
drivers/spi/spi-bcm63xx.c | 4 +-
drivers/spi/spi-butterfly.c | 2 +-
drivers/spi/spi-cadence.c | 5 +-
drivers/spi/spi-cavium-octeon.c | 4 +-
drivers/spi/spi-clps711x.c | 4 +-
drivers/spi/spi-coldfire-qspi.c | 4 +-
drivers/spi/spi-dw-mmio.c | 18 +-
drivers/spi/spi-dw-pci.c | 20 +-
drivers/spi/spi-efm32.c | 4 +-
drivers/spi/spi-ep93xx.c | 4 +-
drivers/spi/spi-fsl-cpm.c | 6 +-
drivers/spi/spi-fsl-dspi.c | 718 +-
drivers/spi/spi-fsl-lib.h | 3 -
drivers/spi/spi-fsl-qspi.c | 6 +-
drivers/spi/spi-fsl-spi.c | 193 +-
drivers/spi/spi-geni-qcom.c | 8 +-
drivers/spi/spi-gpio.c | 11 +-
drivers/spi/spi-lantiq-ssc.c | 12 +-
drivers/spi/spi-lm70llp.c | 2 +-
drivers/spi/spi-lp8841-rtc.c | 4 +-
drivers/spi/spi-meson-spicc.c | 4 +-
drivers/spi/spi-meson-spifc.c | 4 +-
drivers/spi/spi-mt65xx.c | 54 +-
drivers/spi/spi-mt7621.c | 4 +-
drivers/spi/spi-mxs.c | 4 +-
drivers/spi/spi-npcm-fiu.c | 769 +
drivers/spi/spi-npcm-pspi.c | 5 +-
drivers/spi/spi-nuc900.c | 429 -
drivers/spi/spi-nxp-fspi.c | 4 +-
drivers/spi/spi-oc-tiny.c | 4 +-
drivers/spi/spi-pic32-sqi.c | 5 +-
drivers/spi/spi-pic32.c | 12 +-
drivers/spi/spi-pxa2xx.c | 14 +-
drivers/spi/spi-qcom-qspi.c | 8 +-
drivers/spi/spi-rb4xx.c | 4 +-
drivers/spi/spi-s3c24xx.c | 5 +-
drivers/spi/spi-sh-msiof.c | 5 +-
drivers/spi/spi-sh.c | 4 +-
drivers/spi/spi-sifive.c | 5 +-
drivers/spi/spi-sirf.c | 4 +-
drivers/spi/spi-slave-mt27xx.c | 1 -
drivers/spi/spi-sprd-adi.c | 92 +-
drivers/spi/spi-sprd.c | 4 +-
drivers/spi/spi-st-ssc4.c | 4 +-
drivers/spi/spi-stm32-qspi.c | 5 +-
drivers/spi/spi-sun4i.c | 5 +-
drivers/spi/spi-sun6i.c | 5 +-
drivers/spi/spi-synquacer.c | 2 -
drivers/spi/spi-tegra20-sflash.c | 4 +-
drivers/spi/spi-ti-qspi.c | 1 -
drivers/spi/spi-uniphier.c | 90 +-
drivers/spi/spi-xlp.c | 8 +-
drivers/spi/spi-zynq-qspi.c | 7 +-
drivers/spi/spi-zynqmp-gqspi.c | 5 +-
drivers/spi/spi.c | 81 +-
drivers/ssb/pci.c | 2 +-
drivers/staging/Kconfig | 9 +-
drivers/staging/Makefile | 5 +-
drivers/staging/android/TODO | 2 -
drivers/staging/android/ion/ion.c | 36 -
drivers/staging/android/ion/ion.h | 10 +-
drivers/staging/android/ion/ion_page_pool.c | 3 +
drivers/staging/android/ion/ion_system_heap.c | 4 +-
drivers/staging/android/vsoc.c | 8 +-
drivers/staging/comedi/drivers/daqboard2000.c | 7 +-
drivers/staging/comedi/drivers/dt3000.c | 8 +-
drivers/staging/comedi/drivers/ni_mio_common.c | 2 +-
drivers/staging/comedi/drivers/usbduxsigma.c | 2 +-
drivers/staging/emxx_udc/emxx_udc.c | 80 +-
drivers/staging/emxx_udc/emxx_udc.h | 5 -
.../erofs/Documentation/filesystems/erofs.txt | 209 -
drivers/staging/erofs/Kconfig | 151 -
drivers/staging/erofs/Makefile | 13 -
drivers/staging/erofs/TODO | 46 -
drivers/staging/erofs/compress.h | 62 -
drivers/staging/erofs/data.c | 400 -
drivers/staging/erofs/decompressor.c | 335 -
drivers/staging/erofs/dir.c | 151 -
drivers/staging/erofs/erofs_fs.h | 322 -
drivers/staging/erofs/include/linux/tagptr.h | 110 -
drivers/staging/erofs/include/trace/events/erofs.h | 256 -
drivers/staging/erofs/inode.c | 332 -
drivers/staging/erofs/internal.h | 642 -
drivers/staging/erofs/namei.c | 256 -
drivers/staging/erofs/super.c | 701 -
drivers/staging/erofs/unzip_pagevec.h | 169 -
drivers/staging/erofs/unzip_vle.c | 1591 -
drivers/staging/erofs/unzip_vle.h | 196 -
drivers/staging/erofs/utils.c | 353 -
drivers/staging/erofs/xattr.c | 704 -
drivers/staging/erofs/xattr.h | 97 -
drivers/staging/erofs/zmap.c | 463 -
drivers/staging/exfat/Kconfig | 49 +
drivers/staging/exfat/Makefile | 10 +
drivers/staging/exfat/TODO | 12 +
drivers/staging/exfat/exfat.h | 971 +
drivers/staging/exfat/exfat_blkdev.c | 136 +
drivers/staging/exfat/exfat_cache.c | 724 +
drivers/staging/exfat/exfat_core.c | 3701 ++
drivers/staging/exfat/exfat_nls.c | 404 +
drivers/staging/exfat/exfat_super.c | 4049 ++
drivers/staging/exfat/exfat_upcase.c | 740 +
drivers/staging/fbtft/fb_bd663474.c | 2 +-
drivers/staging/fbtft/fb_hx8340bn.c | 2 +-
drivers/staging/fbtft/fb_hx8347d.c | 2 +-
drivers/staging/fbtft/fb_ili9163.c | 4 +-
drivers/staging/fbtft/fb_ili9320.c | 2 +-
drivers/staging/fbtft/fb_ili9325.c | 4 +-
drivers/staging/fbtft/fb_pcd8544.c | 4 +-
drivers/staging/fbtft/fb_s6d1121.c | 4 +-
drivers/staging/fbtft/fb_ssd1289.c | 4 +-
drivers/staging/fbtft/fb_ssd1331.c | 4 +-
drivers/staging/fbtft/fb_upd161704.c | 2 +-
drivers/staging/fbtft/fbtft-bus.c | 2 +-
drivers/staging/fbtft/fbtft-core.c | 47 +-
.../bindings/fieldbus/arcx,anybus-controller.txt | 0
drivers/staging/fsl-dpaa2/ethsw/TODO | 1 -
drivers/staging/fsl-dpaa2/ethsw/dpsw-cmd.h | 15 +-
drivers/staging/fsl-dpaa2/ethsw/dpsw.c | 51 +
drivers/staging/fsl-dpaa2/ethsw/dpsw.h | 56 +-
drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c | 44 +-
drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 309 +-
drivers/staging/fsl-dpaa2/ethsw/ethsw.h | 4 +
drivers/staging/gasket/apex_driver.c | 22 +-
drivers/staging/gasket/gasket_ioctl.c | 12 +-
drivers/staging/goldfish/goldfish_audio.c | 4 +-
.../greybus/Documentation/firmware/authenticate.c | 46 -
.../greybus/Documentation/firmware/firmware.c | 46 -
drivers/staging/greybus/Kconfig | 27 -
drivers/staging/greybus/Makefile | 22 -
drivers/staging/greybus/arche-platform.c | 2 +-
drivers/staging/greybus/arpc.h | 109 -
drivers/staging/greybus/audio_apbridgea.c | 3 +-
drivers/staging/greybus/audio_apbridgea.h | 26 +-
drivers/staging/greybus/audio_codec.h | 4 +-
drivers/staging/greybus/audio_gb.c | 4 +-
drivers/staging/greybus/audio_manager.c | 2 +-
drivers/staging/greybus/authentication.c | 3 +-
drivers/staging/greybus/bootrom.c | 2 +-
drivers/staging/greybus/bundle.c | 252 -
drivers/staging/greybus/bundle.h | 89 -
drivers/staging/greybus/camera.c | 2 +-
drivers/staging/greybus/connection.c | 942 -
drivers/staging/greybus/connection.h | 128 -
drivers/staging/greybus/control.c | 584 -
drivers/staging/greybus/control.h | 57 -
drivers/staging/greybus/core.c | 349 -
drivers/staging/greybus/debugfs.c | 30 -
drivers/staging/greybus/es2.c | 1466 -
drivers/staging/greybus/firmware.h | 4 +-
drivers/staging/greybus/fw-core.c | 2 +-
drivers/staging/greybus/fw-download.c | 2 +-
drivers/staging/greybus/fw-management.c | 2 +-
drivers/staging/greybus/gb-camera.h | 2 +-
drivers/staging/greybus/gbphy.c | 2 +-
drivers/staging/greybus/gbphy.h | 2 +-
drivers/staging/greybus/gpio.c | 2 +-
drivers/staging/greybus/greybus.h | 152 -
drivers/staging/greybus/greybus_authentication.h | 48 +-
drivers/staging/greybus/greybus_firmware.h | 48 +-
drivers/staging/greybus/greybus_manifest.h | 178 -
drivers/staging/greybus/greybus_protocols.h | 2222 -
drivers/staging/greybus/greybus_trace.h | 502 -
drivers/staging/greybus/hd.c | 256 -
drivers/staging/greybus/hd.h | 82 -
drivers/staging/greybus/hid.c | 3 +-
drivers/staging/greybus/i2c.c | 24 +-
drivers/staging/greybus/interface.c | 1263 -
drivers/staging/greybus/interface.h | 82 -
drivers/staging/greybus/light.c | 16 +-
drivers/staging/greybus/log.c | 9 +-
drivers/staging/greybus/loopback.c | 9 +-
drivers/staging/greybus/manifest.c | 534 -
drivers/staging/greybus/manifest.h | 15 -
drivers/staging/greybus/module.c | 236 -
drivers/staging/greybus/module.h | 33 -
drivers/staging/greybus/operation.c | 1264 -
drivers/staging/greybus/operation.h | 224 -
drivers/staging/greybus/power_supply.c | 3 +-
drivers/staging/greybus/pwm.c | 2 +-
drivers/staging/greybus/raw.c | 3 +-
drivers/staging/greybus/sdio.c | 2 +-
drivers/staging/greybus/spi.c | 2 +-
drivers/staging/greybus/spilib.c | 2 +-
drivers/staging/greybus/spilib.h | 2 +-
drivers/staging/greybus/svc.c | 1398 -
drivers/staging/greybus/svc.h | 101 -
drivers/staging/greybus/svc_watchdog.c | 197 -
drivers/staging/greybus/tools/loopback_test.c | 2 -
drivers/staging/greybus/uart.c | 2 +-
drivers/staging/greybus/usb.c | 2 +-
drivers/staging/greybus/vibrator.c | 3 +-
drivers/staging/iio/accel/adis16240.c | 5 +-
drivers/staging/iio/adc/ad7192.c | 175 +-
drivers/staging/iio/adc/ad7192.h | 37 -
drivers/staging/iio/resolver/ad2s1210.c | 12 +-
drivers/staging/isdn/hysdn/Kconfig | 2 +-
drivers/staging/isdn/hysdn/hysdn_net.c | 2 +-
drivers/staging/isdn/hysdn/hysdn_procconf.c | 2 +-
drivers/staging/kpc2000/kpc2000/cell_probe.c | 18 +-
drivers/staging/kpc2000/kpc2000/core.c | 18 +-
drivers/staging/kpc2000/kpc2000_i2c.c | 4 +-
drivers/staging/kpc2000/kpc2000_spi.c | 3 +-
drivers/staging/kpc2000/kpc_dma/fileops.c | 8 +-
drivers/staging/media/Kconfig | 4 -
drivers/staging/media/Makefile | 2 -
drivers/staging/media/allegro-dvt/allegro-core.c | 4 +-
drivers/staging/media/bcm2048/Kconfig | 14 -
drivers/staging/media/bcm2048/Makefile | 2 -
drivers/staging/media/bcm2048/TODO | 24 -
drivers/staging/media/bcm2048/radio-bcm2048.c | 2689 -
drivers/staging/media/bcm2048/radio-bcm2048.h | 26 -
drivers/staging/media/davinci_vpfe/Kconfig | 13 -
drivers/staging/media/davinci_vpfe/Makefile | 11 -
drivers/staging/media/davinci_vpfe/TODO | 38 -
.../staging/media/davinci_vpfe/davinci-vpfe-mc.txt | 154 -
.../staging/media/davinci_vpfe/davinci_vpfe_user.h | 1287 -
drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 1852 -
drivers/staging/media/davinci_vpfe/dm365_ipipe.h | 174 -
.../staging/media/davinci_vpfe/dm365_ipipe_hw.c | 1038 -
.../staging/media/davinci_vpfe/dm365_ipipe_hw.h | 556 -
drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 1070 -
drivers/staging/media/davinci_vpfe/dm365_ipipeif.h | 228 -
.../media/davinci_vpfe/dm365_ipipeif_user.h | 90 -
drivers/staging/media/davinci_vpfe/dm365_isif.c | 2097 -
drivers/staging/media/davinci_vpfe/dm365_isif.h | 200 -
.../staging/media/davinci_vpfe/dm365_isif_regs.h | 291 -
drivers/staging/media/davinci_vpfe/dm365_resizer.c | 1995 -
drivers/staging/media/davinci_vpfe/dm365_resizer.h | 241 -
drivers/staging/media/davinci_vpfe/vpfe.h | 83 -
.../staging/media/davinci_vpfe/vpfe_mc_capture.c | 716 -
.../staging/media/davinci_vpfe/vpfe_mc_capture.h | 90 -
drivers/staging/media/davinci_vpfe/vpfe_video.c | 1646 -
drivers/staging/media/davinci_vpfe/vpfe_video.h | 150 -
drivers/staging/media/hantro/Kconfig | 2 +-
drivers/staging/media/hantro/Makefile | 7 +-
drivers/staging/media/hantro/hantro.h | 51 +-
drivers/staging/media/hantro/hantro_drv.c | 110 +-
drivers/staging/media/hantro/hantro_g1_h264_dec.c | 292 +
drivers/staging/media/hantro/hantro_g1_mpeg2_dec.c | 14 +-
drivers/staging/media/hantro/hantro_g1_vp8_dec.c | 503 +
drivers/staging/media/hantro/hantro_h1_jpeg_enc.c | 11 +-
drivers/staging/media/hantro/hantro_h264.c | 646 +
drivers/staging/media/hantro/hantro_hw.h | 80 +
drivers/staging/media/hantro/hantro_v4l2.c | 11 +
drivers/staging/media/hantro/hantro_vp8.c | 201 +
drivers/staging/media/hantro/rk3288_vpu_hw.c | 41 +-
drivers/staging/media/hantro/rk3399_vpu_hw.c | 39 +-
.../staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c | 12 +-
.../staging/media/hantro/rk3399_vpu_hw_mpeg2_dec.c | 14 +-
.../staging/media/hantro/rk3399_vpu_hw_vp8_dec.c | 595 +
drivers/staging/media/imx/Kconfig | 5 +-
drivers/staging/media/imx/Makefile | 3 +-
drivers/staging/media/imx/imx-media-csc-scaler.c | 925 +
drivers/staging/media/imx/imx-media-dev.c | 28 +-
drivers/staging/media/imx/imx-media-internal-sd.c | 4 +
drivers/staging/media/imx/imx-media-utils.c | 2 +-
drivers/staging/media/imx/imx-media.h | 12 +
drivers/staging/media/imx/imx6-mipi-csi2.c | 12 +-
drivers/staging/media/imx/imx7-media-csi.c | 34 +-
drivers/staging/media/imx/imx7-mipi-csis.c | 4 +-
drivers/staging/media/ipu3/ipu3-tables.h | 4 +-
drivers/staging/media/ipu3/ipu3.c | 3 +-
drivers/staging/media/meson/vdec/esparser.c | 4 +-
drivers/staging/media/omap4iss/iss.c | 1 -
drivers/staging/media/omap4iss/iss_video.c | 40 +-
drivers/staging/media/omap4iss/iss_video.h | 2 -
drivers/staging/media/soc_camera/soc_camera.c | 2 -
drivers/staging/media/sunxi/cedrus/cedrus.c | 63 +-
drivers/staging/media/sunxi/cedrus/cedrus.h | 7 +-
drivers/staging/media/sunxi/cedrus/cedrus_dec.c | 2 +-
drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 4 +-
drivers/staging/media/sunxi/cedrus/cedrus_hw.c | 8 +-
drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 2 +-
drivers/staging/media/sunxi/cedrus/cedrus_video.c | 28 +-
drivers/staging/media/tegra-vde/Kconfig | 2 +-
drivers/staging/most/cdev/cdev.c | 4 +-
drivers/staging/most/core.c | 4 +-
drivers/staging/most/dim2/dim2.c | 21 -
drivers/staging/most/dim2/hal.c | 99 +-
drivers/staging/most/dim2/hal.h | 4 -
drivers/staging/most/net/net.c | 3 +-
drivers/staging/most/sound/sound.c | 5 +-
drivers/staging/most/video/video.c | 3 +-
drivers/staging/mt7621-dma/mtk-hsdma.c | 4 +-
drivers/staging/mt7621-pci/pci-mt7621.c | 12 +-
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 5 +-
drivers/staging/nvec/nvec.c | 8 +-
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
drivers/staging/octeon/Kconfig | 3 +-
drivers/staging/octeon/ethernet-defines.h | 2 -
drivers/staging/octeon/ethernet-mdio.c | 6 +-
drivers/staging/octeon/ethernet-mem.c | 5 +-
drivers/staging/octeon/ethernet-rgmii.c | 10 +-
drivers/staging/octeon/ethernet-rx.c | 13 +-
drivers/staging/octeon/ethernet-rx.h | 2 -
drivers/staging/octeon/ethernet-sgmii.c | 8 +-
drivers/staging/octeon/ethernet-spi.c | 10 +-
drivers/staging/octeon/ethernet-tx.c | 19 +-
drivers/staging/octeon/ethernet-util.h | 4 -
drivers/staging/octeon/ethernet.c | 28 +-
drivers/staging/octeon/octeon-ethernet.h | 29 +-
drivers/staging/octeon/octeon-stubs.h | 1429 +
drivers/staging/olpc_dcon/TODO | 4 -
drivers/staging/pi433/Documentation/pi433.txt | 2 +-
drivers/staging/qlge/Kconfig | 10 +
.../{net/ethernet/qlogic => staging}/qlge/Makefile | 0
drivers/staging/qlge/TODO | 46 +
.../{net/ethernet/qlogic => staging}/qlge/qlge.h | 0
.../ethernet/qlogic => staging}/qlge/qlge_dbg.c | 0
.../qlogic => staging}/qlge/qlge_ethtool.c | 0
.../ethernet/qlogic => staging}/qlge/qlge_main.c | 0
.../ethernet/qlogic => staging}/qlge/qlge_mpi.c | 0
drivers/staging/ralink-gdma/ralink-gdma.c | 4 +-
drivers/staging/rtl8188eu/core/rtw_cmd.c | 2 +-
drivers/staging/rtl8188eu/core/rtw_efuse.c | 141 +-
drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 4 +-
drivers/staging/rtl8188eu/core/rtw_mlme.c | 11 +-
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 2 +-
drivers/staging/rtl8188eu/core/rtw_recv.c | 14 +-
drivers/staging/rtl8188eu/core/rtw_security.c | 41 +-
drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 19 +-
drivers/staging/rtl8188eu/hal/bb_cfg.c | 2 +-
drivers/staging/rtl8188eu/hal/rf_cfg.c | 14 +-
drivers/staging/rtl8188eu/hal/usb_halinit.c | 143 +-
.../staging/rtl8188eu/include/hal8188e_phy_reg.h | 881 -
drivers/staging/rtl8188eu/include/hal_intf.h | 2 +-
drivers/staging/rtl8188eu/include/mlme_osdep.h | 1 -
drivers/staging/rtl8188eu/include/osdep_service.h | 2 -
drivers/staging/rtl8188eu/include/rtw_mlme.h | 2 +-
drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 1 -
drivers/staging/rtl8188eu/os_dep/mlme_linux.c | 5 -
drivers/staging/rtl8188eu/os_dep/osdep_service.c | 5 -
drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 3 +-
drivers/staging/rtl8192e/Kconfig | 1 +
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 12 +-
drivers/staging/rtl8192e/rtllib.h | 5 +-
drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 206 +-
drivers/staging/rtl8192e/rtllib_rx.c | 2 -
drivers/staging/rtl8192e/rtllib_softmac.c | 24 +-
drivers/staging/rtl8192u/Kconfig | 2 +
drivers/staging/rtl8192u/ieee80211/dot11d.c | 10 +-
drivers/staging/rtl8192u/ieee80211/ieee80211.h | 42 +-
.../staging/rtl8192u/ieee80211/ieee80211_crypt.c | 2 +-
.../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 204 +-
.../rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 22 +-
.../rtl8192u/ieee80211/ieee80211_crypt_wep.c | 4 +-
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 635 +-
.../staging/rtl8192u/ieee80211/ieee80211_softmac.c | 1 -
.../rtl8192u/ieee80211/ieee80211_softmac_wx.c | 14 +-
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 142 +-
drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c | 43 +-
.../staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 12 +-
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 17 +-
.../staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 4 -
.../staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 18 +-
drivers/staging/rtl8192u/r8180_93cx6.c | 11 +-
drivers/staging/rtl8192u/r8190_rtl8256.c | 42 +-
drivers/staging/rtl8192u/r8192U_core.c | 112 +-
drivers/staging/rtl8192u/r8192U_dm.c | 2 +-
drivers/staging/rtl8192u/r819xU_firmware.c | 2 +-
drivers/staging/rtl8192u/r819xU_phy.c | 59 -
drivers/staging/rtl8712/os_intfs.c | 35 +-
drivers/staging/rtl8712/recv_linux.c | 18 +-
drivers/staging/rtl8712/recv_osdep.h | 16 +-
drivers/staging/rtl8712/rtl8712_cmd.c | 14 +-
drivers/staging/rtl8712/rtl8712_recv.c | 54 +-
drivers/staging/rtl8712/rtl8712_recv.h | 2 +-
drivers/staging/rtl8712/rtl8712_xmit.c | 46 +-
drivers/staging/rtl8712/rtl8712_xmit.h | 8 +-
drivers/staging/rtl8712/rtl871x_io.h | 7 +-
drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 5 +-
drivers/staging/rtl8712/rtl871x_ioctl_set.c | 16 +-
drivers/staging/rtl8712/rtl871x_ioctl_set.h | 4 +-
drivers/staging/rtl8712/rtl871x_mlme.c | 34 +-
drivers/staging/rtl8712/rtl871x_mlme.h | 8 +-
drivers/staging/rtl8712/rtl871x_mp.c | 9 +-
drivers/staging/rtl8712/rtl871x_pwrctrl.c | 10 +-
drivers/staging/rtl8712/rtl871x_pwrctrl.h | 2 +-
drivers/staging/rtl8712/rtl871x_recv.c | 22 +-
drivers/staging/rtl8712/rtl871x_recv.h | 2 +-
drivers/staging/rtl8712/rtl871x_rf.h | 3 +-
drivers/staging/rtl8712/rtl871x_security.c | 29 +-
drivers/staging/rtl8712/rtl871x_security.h | 4 +-
drivers/staging/rtl8712/rtl871x_xmit.c | 65 +-
drivers/staging/rtl8712/rtl871x_xmit.h | 20 +-
drivers/staging/rtl8712/usb_intf.c | 2 +-
drivers/staging/rtl8712/usb_osintf.h | 4 +-
drivers/staging/rtl8712/wifi.h | 8 -
drivers/staging/rtl8712/xmit_linux.c | 2 +-
drivers/staging/rtl8723bs/Makefile | 1 -
drivers/staging/rtl8723bs/core/rtw_ap.c | 113 +-
drivers/staging/rtl8723bs/core/rtw_cmd.c | 11 +-
drivers/staging/rtl8723bs/core/rtw_debug.c | 1307 -
drivers/staging/rtl8723bs/core/rtw_io.c | 2 +-
drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 7 -
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 15 +-
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 121 +-
drivers/staging/rtl8723bs/core/rtw_security.c | 3 +-
drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 7 +-
drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c | 6 -
drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h | 1 -
drivers/staging/rtl8723bs/hal/hal_btcoex.c | 44 +-
drivers/staging/rtl8723bs/hal/hal_com.c | 5 +-
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 18 -
drivers/staging/rtl8723bs/hal/hal_intf.c | 2 +-
drivers/staging/rtl8723bs/hal/hal_phy.c | 157 -
drivers/staging/rtl8723bs/hal/odm.c | 19 +-
drivers/staging/rtl8723bs/hal/odm.h | 4 -
drivers/staging/rtl8723bs/hal/odm_CfoTracking.c | 5 -
drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 7 -
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 15 +-
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 8 +-
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 7 +-
drivers/staging/rtl8723bs/include/autoconf.h | 4 -
drivers/staging/rtl8723bs/include/drv_types.h | 8 +-
drivers/staging/rtl8723bs/include/hal_btcoex.h | 8 +-
drivers/staging/rtl8723bs/include/hal_com_phycfg.h | 17 -
drivers/staging/rtl8723bs/include/hal_intf.h | 2 +-
drivers/staging/rtl8723bs/include/hal_phy_cfg.h | 4 +-
drivers/staging/rtl8723bs/include/osdep_intf.h | 2 -
drivers/staging/rtl8723bs/include/osdep_service.h | 10 +-
.../rtl8723bs/include/osdep_service_linux.h | 14 +-
drivers/staging/rtl8723bs/include/rtw_debug.h | 77 -
drivers/staging/rtl8723bs/include/rtw_mlme.h | 20 +-
drivers/staging/rtl8723bs/include/rtw_mlme_ext.h | 3 +-
drivers/staging/rtl8723bs/include/rtw_recv.h | 16 +-
drivers/staging/rtl8723bs/include/sta_info.h | 2 +-
drivers/staging/rtl8723bs/include/wifi.h | 14 +-
drivers/staging/rtl8723bs/include/wlan_bssdef.h | 2 +-
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 10 -
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 7 -
drivers/staging/rtl8723bs/os_dep/os_intfs.c | 21 +-
drivers/staging/rtl8723bs/os_dep/osdep_service.c | 4 -
drivers/staging/rtl8723bs/os_dep/rtw_proc.c | 779 -
drivers/staging/rtl8723bs/os_dep/rtw_proc.h | 37 -
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 5 +-
drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 5 -
drivers/staging/rts5208/ms.c | 2 +-
drivers/staging/rts5208/rtsx_transport.c | 12 +-
drivers/staging/rts5208/sd.c | 28 +-
drivers/staging/sm750fb/ddk750.h | 3 -
drivers/staging/sm750fb/ddk750_swi2c.c | 3 -
drivers/staging/sm750fb/ddk750_swi2c.h | 3 -
drivers/staging/unisys/visornic/visornic_main.c | 9 +-
drivers/{ => staging}/uwb/Kconfig | 0
drivers/{ => staging}/uwb/Makefile | 0
drivers/staging/uwb/TODO | 8 +
drivers/{ => staging}/uwb/address.c | 0
drivers/staging/uwb/allocator.c | 374 +
drivers/{ => staging}/uwb/beacon.c | 0
drivers/{ => staging}/uwb/driver.c | 0
drivers/{ => staging}/uwb/drp-avail.c | 0
drivers/staging/uwb/drp-ie.c | 305 +
drivers/{ => staging}/uwb/drp.c | 0
drivers/{ => staging}/uwb/est.c | 0
drivers/staging/uwb/hwa-rc.c | 929 +
drivers/{ => staging}/uwb/i1480/Makefile | 0
drivers/{ => staging}/uwb/i1480/dfu/Makefile | 0
drivers/staging/uwb/i1480/dfu/dfu.c | 198 +
drivers/staging/uwb/i1480/dfu/i1480-dfu.h | 246 +
drivers/staging/uwb/i1480/dfu/mac.c | 496 +
drivers/staging/uwb/i1480/dfu/phy.c | 190 +
drivers/staging/uwb/i1480/dfu/usb.c | 448 +
drivers/staging/uwb/i1480/i1480-est.c | 85 +
drivers/{ => staging}/uwb/ie-rcv.c | 0
drivers/{ => staging}/uwb/ie.c | 0
.../staging/uwb/include}/debug-cmd.h | 0
.../uwb => drivers/staging/uwb/include}/spec.h | 0
.../uwb => drivers/staging/uwb/include}/umc.h | 0
.../uwb => drivers/staging/uwb/include}/whci.h | 0
drivers/{ => staging}/uwb/lc-dev.c | 0
drivers/{ => staging}/uwb/lc-rc.c | 0
drivers/{ => staging}/uwb/neh.c | 0
drivers/staging/uwb/pal.c | 128 +
drivers/staging/uwb/radio.c | 196 +
drivers/{ => staging}/uwb/reset.c | 0
drivers/staging/uwb/rsv.c | 1000 +
drivers/{ => staging}/uwb/scan.c | 0
drivers/staging/uwb/umc-bus.c | 211 +
drivers/staging/uwb/umc-dev.c | 94 +
drivers/staging/uwb/umc-drv.c | 31 +
drivers/staging/uwb/uwb-debug.c | 354 +
drivers/staging/uwb/uwb-internal.h | 366 +
drivers/staging/uwb/uwb.h | 817 +
drivers/{ => staging}/uwb/uwbd.c | 0
drivers/staging/uwb/whc-rc.c | 467 +
drivers/staging/uwb/whci.c | 257 +
.../vc04_services/bcm2835-camera/bcm2835-camera.c | 29 -
.../vc04_services/bcm2835-camera/mmal-common.h | 1 -
.../vc04_services/bcm2835-camera/mmal-vchiq.h | 2 +-
.../interface/vchiq_arm/vchiq_2835_arm.c | 4 +-
.../vc04_services/interface/vchiq_arm/vchiq_arm.c | 5 +-
.../vc04_services/interface/vchiq_arm/vchiq_core.c | 38 +-
drivers/staging/vt6656/rxtx.c | 10 +-
drivers/staging/vt6656/usbpipe.c | 2 +-
.../staging/wilc1000/microchip,wilc1000,sdio.txt | 8 +-
.../staging/wilc1000/microchip,wilc1000,spi.txt | 8 +
drivers/staging/wilc1000/wilc_hif.c | 70 +-
drivers/staging/wilc1000/wilc_hif.h | 6 +-
drivers/staging/wilc1000/wilc_mon.c | 3 +-
drivers/staging/wilc1000/wilc_netdev.c | 78 +-
drivers/staging/wilc1000/wilc_sdio.c | 18 +-
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 64 +-
drivers/staging/wilc1000/wilc_wfi_netdevice.h | 3 +-
drivers/staging/wilc1000/wilc_wlan.c | 135 +-
drivers/staging/wilc1000/wilc_wlan.h | 19 +-
drivers/staging/wilc1000/wilc_wlan_cfg.c | 78 +-
drivers/staging/wilc1000/wilc_wlan_cfg.h | 4 +-
drivers/staging/wilc1000/wilc_wlan_if.h | 3 +-
drivers/staging/wlan-ng/hfa384x_usb.c | 210 +-
drivers/staging/wlan-ng/prism2mib.c | 44 +-
drivers/staging/wlan-ng/prism2sta.c | 2 +-
.../staging/wusbcore/Documentation}/wusb-cbaf | 0
.../Documentation}/wusb-design-overview.rst | 0
drivers/staging/wusbcore/Kconfig | 39 +
drivers/staging/wusbcore/Makefile | 28 +
drivers/staging/wusbcore/TODO | 8 +
drivers/staging/wusbcore/cbaf.c | 645 +
drivers/staging/wusbcore/crypto.c | 441 +
drivers/{usb => staging}/wusbcore/dev-sysfs.c | 0
drivers/staging/wusbcore/devconnect.c | 1085 +
drivers/staging/wusbcore/host/Kconfig | 28 +
drivers/staging/wusbcore/host/Makefile | 3 +
drivers/staging/wusbcore/host/hwa-hc.c | 875 +
.../{usb => staging/wusbcore}/host/whci/Makefile | 0
drivers/staging/wusbcore/host/whci/asl.c | 376 +
drivers/staging/wusbcore/host/whci/debug.c | 153 +
drivers/staging/wusbcore/host/whci/hcd.c | 356 +
drivers/staging/wusbcore/host/whci/hw.c | 93 +
drivers/staging/wusbcore/host/whci/init.c | 177 +
drivers/staging/wusbcore/host/whci/int.c | 82 +
drivers/staging/wusbcore/host/whci/pzl.c | 404 +
drivers/staging/wusbcore/host/whci/qset.c | 831 +
drivers/staging/wusbcore/host/whci/whcd.h | 202 +
.../{usb => staging/wusbcore}/host/whci/whci-hc.h | 0
drivers/staging/wusbcore/host/whci/wusb.c | 210 +
.../staging/wusbcore/include}/association.h | 0
.../staging/wusbcore/include}/wusb-wa.h | 0
drivers/staging/wusbcore/include/wusb.h | 362 +
drivers/staging/wusbcore/mmc.c | 303 +
drivers/{usb => staging}/wusbcore/pal.c | 0
drivers/staging/wusbcore/reservation.c | 110 +
drivers/{usb => staging}/wusbcore/rh.c | 0
drivers/{usb => staging}/wusbcore/security.c | 0
drivers/{usb => staging}/wusbcore/wa-hc.c | 0
drivers/staging/wusbcore/wa-hc.h | 467 +
drivers/{usb => staging}/wusbcore/wa-nep.c | 0
drivers/{usb => staging}/wusbcore/wa-rpipe.c | 0
drivers/{usb => staging}/wusbcore/wa-xfer.c | 0
drivers/{usb => staging}/wusbcore/wusbhc.c | 0
drivers/staging/wusbcore/wusbhc.h | 487 +
drivers/target/iscsi/cxgbit/cxgbit_cm.c | 8 +-
drivers/target/iscsi/cxgbit/cxgbit_main.c | 3 +-
drivers/target/iscsi/cxgbit/cxgbit_target.c | 13 +-
drivers/target/target_core_user.c | 29 +-
drivers/target/tcm_fc/tfc_io.c | 3 +-
drivers/tee/optee/call.c | 1 +
drivers/tee/tee_shm.c | 1 +
drivers/thermal/Kconfig | 2 +-
drivers/thermal/armada_thermal.c | 5 +-
drivers/thermal/cpu_cooling.c | 110 +-
drivers/thermal/db8500_thermal.c | 486 +-
.../intel/int340x_thermal/acpi_thermal_rel.c | 6 -
.../intel/int340x_thermal/int3403_thermal.c | 2 +-
.../int340x_thermal/processor_thermal_device.c | 100 +-
drivers/thermal/intel/intel_pch_thermal.c | 6 +-
drivers/thermal/intel/intel_powerclamp.c | 2 +-
drivers/thermal/qcom/tsens-8960.c | 2 +
drivers/thermal/qcom/tsens-v0_1.c | 12 +-
drivers/thermal/qcom/tsens-v1.c | 1 +
drivers/thermal/qcom/tsens.h | 1 +
drivers/thermal/qoriq_thermal.c | 45 +-
drivers/thermal/rcar_gen3_thermal.c | 3 +-
drivers/thermal/tegra/soctherm.c | 2 +-
drivers/thermal/thermal_core.c | 44 +-
drivers/thermal/thermal_hwmon.c | 8 +-
drivers/thermal/thermal_mmio.c | 7 -
drivers/thunderbolt/Makefile | 2 +-
drivers/thunderbolt/ctl.c | 23 +-
drivers/thunderbolt/eeprom.c | 6 +-
drivers/thunderbolt/icm.c | 194 +-
drivers/thunderbolt/nhi.c | 134 +-
drivers/thunderbolt/nhi.h | 22 +
drivers/thunderbolt/nhi_ops.c | 179 +
drivers/thunderbolt/nhi_regs.h | 37 +
drivers/thunderbolt/switch.c | 52 +-
drivers/thunderbolt/tb_msgs.h | 16 +-
drivers/thunderbolt/tunnel.c | 4 +-
drivers/thunderbolt/xdomain.c | 2 +-
drivers/tty/hvc/hvcs.c | 6 +-
drivers/tty/isicom.c | 1 -
drivers/tty/n_gsm.c | 25 +-
drivers/tty/nozomi.c | 4 +-
drivers/tty/serial/8250/8250_bcm2835aux.c | 4 +-
drivers/tty/serial/8250/8250_core.c | 6 +-
drivers/tty/serial/8250/8250_dw.c | 173 +-
drivers/tty/serial/8250/8250_dwlib.c | 126 +
drivers/tty/serial/8250/8250_dwlib.h | 19 +
drivers/tty/serial/8250/8250_exar.c | 114 +-
drivers/tty/serial/8250/8250_lpc18xx.c | 4 +-
drivers/tty/serial/8250/8250_lpss.c | 76 +-
drivers/tty/serial/8250/8250_moxa.c | 155 -
drivers/tty/serial/8250/8250_omap.c | 11 +-
drivers/tty/serial/8250/8250_pci.c | 651 +-
drivers/tty/serial/8250/8250_pnp.c | 20 +-
drivers/tty/serial/8250/8250_port.c | 93 +-
drivers/tty/serial/8250/8250_uniphier.c | 4 +-
drivers/tty/serial/8250/Kconfig | 15 +-
drivers/tty/serial/8250/Makefile | 2 +-
drivers/tty/serial/Kconfig | 82 +-
drivers/tty/serial/Makefile | 6 +-
drivers/tty/serial/amba-pl011.c | 5 +-
drivers/tty/serial/atmel_serial.c | 51 +-
drivers/tty/serial/fsl_linflexuart.c | 937 +
drivers/tty/serial/fsl_lpuart.c | 518 +-
drivers/tty/serial/icom.c | 2 -
drivers/tty/serial/imx.c | 88 +-
drivers/tty/serial/ioc3_serial.c | 2195 -
drivers/tty/serial/ioc4_serial.c | 2955 -
drivers/tty/serial/kgdboc.c | 4 +
drivers/tty/serial/lantiq.c | 261 +-
drivers/tty/serial/lpc32xx_hs.c | 42 +-
drivers/tty/serial/max310x.c | 32 +-
drivers/tty/serial/mvebu-uart.c | 12 +-
drivers/tty/serial/mxs-auart.c | 6 +-
drivers/tty/serial/netx-serial.c | 733 -
drivers/tty/serial/owl-uart.c | 4 +-
drivers/tty/serial/qcom_geni_serial.c | 23 +-
drivers/tty/serial/rda-uart.c | 4 +-
drivers/tty/serial/sccnxp.c | 1 -
drivers/tty/serial/serial-tegra.c | 407 +-
drivers/tty/serial/serial_core.c | 5 +
drivers/tty/serial/serial_ks8695.c | 698 -
drivers/tty/serial/serial_mctrl_gpio.c | 36 +-
drivers/tty/serial/serial_mctrl_gpio.h | 6 +-
drivers/tty/serial/sh-sci.c | 50 +-
drivers/tty/serial/sifive.c | 4 +-
drivers/tty/serial/sn_console.c | 1036 -
drivers/tty/serial/sprd_serial.c | 58 +-
drivers/tty/serial/stm32-usart.c | 72 +-
drivers/tty/serial/xilinx_uartps.c | 2 +-
drivers/tty/tty_io.c | 8 +-
drivers/tty/tty_ldsem.c | 5 +-
drivers/tty/vt/vt.c | 6 +-
drivers/uio/uio_dmem_genirq.c | 4 +-
drivers/uio/uio_fsl_elbc_gpcm.c | 23 +-
drivers/uio/uio_pdrv_genirq.c | 14 +-
drivers/usb/Kconfig | 39 +-
drivers/usb/Makefile | 4 +-
drivers/usb/atm/cxacru.c | 58 +-
drivers/usb/atm/ueagle-atm.c | 16 +-
drivers/usb/cdns3/Kconfig | 46 +
drivers/usb/cdns3/Makefile | 16 +
drivers/usb/cdns3/cdns3-pci-wrap.c | 203 +
drivers/usb/cdns3/core.c | 651 +
drivers/usb/cdns3/core.h | 98 +
drivers/usb/cdns3/debug.h | 161 +
drivers/usb/cdns3/drd.c | 381 +
drivers/usb/cdns3/drd.h | 167 +
drivers/usb/cdns3/ep0.c | 886 +
drivers/usb/cdns3/gadget-export.h | 28 +
drivers/usb/cdns3/gadget.c | 2744 +
drivers/usb/cdns3/gadget.h | 1338 +
drivers/usb/cdns3/host-export.h | 28 +
drivers/usb/cdns3/host.c | 74 +
drivers/usb/cdns3/trace.c | 11 +
drivers/usb/cdns3/trace.h | 493 +
drivers/usb/chipidea/Kconfig | 1 +
drivers/usb/chipidea/ci.h | 12 +
drivers/usb/chipidea/ci_hdrc_imx.c | 19 +-
drivers/usb/chipidea/ci_hdrc_msm.c | 9 +-
drivers/usb/chipidea/core.c | 97 +-
drivers/usb/chipidea/otg.c | 8 +-
drivers/usb/chipidea/udc.c | 35 +-
drivers/usb/class/cdc-acm.c | 12 +-
drivers/usb/class/cdc-wdm.c | 16 +-
drivers/usb/class/usblp.c | 13 +-
drivers/usb/class/usbtmc.c | 16 +-
drivers/usb/common/Kconfig | 51 +
drivers/usb/common/Makefile | 2 +
drivers/usb/common/debug.c | 268 +
drivers/usb/common/usb-conn-gpio.c | 284 +
drivers/usb/core/buffer.c | 10 +-
drivers/usb/core/config.c | 12 +-
drivers/usb/core/devio.c | 118 +-
drivers/usb/core/driver.c | 2 +
drivers/usb/core/file.c | 10 +-
drivers/usb/core/generic.c | 5 +
drivers/usb/core/hcd-pci.c | 33 +-
drivers/usb/core/hcd.c | 142 +-
drivers/usb/core/message.c | 4 +-
drivers/usb/core/phy.c | 21 +
drivers/usb/core/phy.h | 1 +
drivers/usb/core/port.c | 9 +
drivers/usb/core/sysfs.c | 121 +
drivers/usb/core/usb.c | 222 -
drivers/usb/core/usb.h | 8 +
drivers/usb/dwc2/gadget.c | 9 +-
drivers/usb/dwc2/hcd.c | 8 +-
drivers/usb/dwc2/params.c | 5 +-
drivers/usb/dwc2/platform.c | 4 +-
drivers/usb/dwc3/core.c | 61 +-
drivers/usb/dwc3/core.h | 2 +
drivers/usb/dwc3/debug.h | 252 -
drivers/usb/dwc3/dwc3-keystone.c | 5 +-
drivers/usb/dwc3/dwc3-meson-g12a.c | 18 +-
drivers/usb/dwc3/dwc3-omap.c | 15 +-
drivers/usb/dwc3/dwc3-st.c | 10 +-
drivers/usb/dwc3/gadget.c | 24 +-
drivers/usb/dwc3/host.c | 22 +-
drivers/usb/dwc3/trace.h | 2 +-
drivers/usb/gadget/composite.c | 39 +-
drivers/usb/gadget/function/f_fs.c | 233 +-
drivers/usb/gadget/function/f_mass_storage.c | 28 +-
drivers/usb/gadget/udc/Kconfig | 3 +-
drivers/usb/gadget/udc/aspeed-vhub/core.c | 7 +-
drivers/usb/gadget/udc/aspeed-vhub/dev.c | 80 +-
drivers/usb/gadget/udc/aspeed-vhub/ep0.c | 59 +-
drivers/usb/gadget/udc/aspeed-vhub/epn.c | 2 +-
drivers/usb/gadget/udc/aspeed-vhub/hub.c | 15 +-
drivers/usb/gadget/udc/aspeed-vhub/vhub.h | 3 +-
drivers/usb/gadget/udc/atmel_usba_udc.c | 1 +
drivers/usb/gadget/udc/bcm63xx_udc.c | 8 +-
drivers/usb/gadget/udc/bdc/bdc_core.c | 4 +-
drivers/usb/gadget/udc/core.c | 2 +-
drivers/usb/gadget/udc/gr_udc.c | 8 +-
drivers/usb/gadget/udc/lpc32xx_udc.c | 19 +-
drivers/usb/gadget/udc/net2280.c | 38 +-
drivers/usb/gadget/udc/net2280.h | 3 -
drivers/usb/gadget/udc/pch_udc.c | 3 +-
drivers/usb/gadget/udc/renesas_usb3.c | 9 +-
drivers/usb/gadget/udc/s3c-hsudc.c | 4 +-
drivers/usb/gadget/udc/s3c2410_udc.c | 2 +
drivers/usb/gadget/udc/udc-xilinx.c | 4 +-
drivers/usb/host/Kconfig | 35 +-
drivers/usb/host/Makefile | 4 -
drivers/usb/host/ehci-atmel.c | 3 -
drivers/usb/host/ehci-exynos.c | 23 +-
drivers/usb/host/ehci-grlib.c | 2 +-
drivers/usb/host/ehci-hcd.c | 2 +-
drivers/usb/host/ehci-omap.c | 4 +-
drivers/usb/host/ehci-orion.c | 3 -
drivers/usb/host/ehci-pci.c | 4 +-
drivers/usb/host/ehci-platform.c | 4 +-
drivers/usb/host/ehci-pmcmsp.c | 2 +-
drivers/usb/host/ehci-ppc-of.c | 2 +-
drivers/usb/host/ehci-ps3.c | 2 +-
drivers/usb/host/ehci-sh.c | 5 +-
drivers/usb/host/ehci-st.c | 4 +-
drivers/usb/host/ehci-w90x900.c | 130 -
drivers/usb/host/ehci-xilinx-of.c | 2 +-
drivers/usb/host/fhci-hcd.c | 2 +-
drivers/usb/host/fotg210-hcd.c | 6 +-
drivers/usb/host/hwa-hc.c | 875 -
drivers/usb/host/imx21-hcd.c | 6 +-
drivers/usb/host/isp116x-hcd.c | 6 -
drivers/usb/host/isp1362-hcd.c | 5 -
drivers/usb/host/max3421-hcd.c | 17 -
drivers/usb/host/ohci-exynos.c | 23 +-
drivers/usb/host/ohci-hcd.c | 17 +-
drivers/usb/host/ohci-nxp.c | 25 +-
drivers/usb/host/ohci-pci.c | 2 +-
drivers/usb/host/ohci-platform.c | 4 +-
drivers/usb/host/ohci-ppc-of.c | 2 +-
drivers/usb/host/ohci-ps3.c | 2 +-
drivers/usb/host/ohci-pxa27x.c | 2 +-
drivers/usb/host/ohci-sa1111.c | 2 +-
drivers/usb/host/ohci-st.c | 4 +-
drivers/usb/host/ohci-tmio.c | 3 +
drivers/usb/host/oxu210hp-hcd.c | 446 +-
drivers/usb/host/oxu210hp.h | 448 -
drivers/usb/host/pci-quirks.c | 45 +-
drivers/usb/host/pci-quirks.h | 2 +-
drivers/usb/host/r8a66597-hcd.c | 6 -
drivers/usb/host/sl811-hcd.c | 6 -
drivers/usb/host/u132-hcd.c | 2 -
drivers/usb/host/uhci-grlib.c | 2 +-
drivers/usb/host/uhci-pci.c | 2 +-
drivers/usb/host/uhci-platform.c | 2 +-
drivers/usb/host/whci/asl.c | 376 -
drivers/usb/host/whci/debug.c | 153 -
drivers/usb/host/whci/hcd.c | 356 -
drivers/usb/host/whci/hw.c | 93 -
drivers/usb/host/whci/init.c | 177 -
drivers/usb/host/whci/int.c | 82 -
drivers/usb/host/whci/pzl.c | 404 -
drivers/usb/host/whci/qset.c | 831 -
drivers/usb/host/whci/whcd.h | 202 -
drivers/usb/host/whci/wusb.c | 210 -
drivers/usb/host/xhci-dbgcap.c | 1 -
drivers/usb/host/xhci-dbgtty.c | 4 +-
drivers/usb/host/xhci-ext-caps.c | 18 +
drivers/usb/host/xhci-hub.c | 2 +-
drivers/usb/host/xhci-mem.c | 1 -
drivers/usb/host/xhci-mtk.c | 13 +
drivers/usb/host/xhci-mtk.h | 1 +
drivers/usb/host/xhci-pci.c | 2 +-
drivers/usb/host/xhci-plat.c | 15 +-
drivers/usb/host/xhci-plat.h | 2 +
drivers/usb/host/xhci-rcar.c | 25 +-
drivers/usb/host/xhci-rcar.h | 21 +
drivers/usb/host/xhci-tegra.c | 10 +
drivers/usb/host/xhci.c | 15 +-
drivers/usb/host/xhci.h | 6 +-
drivers/usb/isp1760/isp1760-core.c | 3 -
drivers/usb/isp1760/isp1760-if.c | 1 -
drivers/usb/misc/cypress_cy7c63.c | 29 +-
drivers/usb/misc/cytherm.c | 64 +-
drivers/usb/misc/iowarrior.c | 7 +-
drivers/usb/misc/lvstest.c | 19 +-
drivers/usb/misc/rio500.c | 66 +-
drivers/usb/misc/trancevibrator.c | 15 +-
drivers/usb/misc/usb251xb.c | 15 +-
drivers/usb/misc/usbsevseg.c | 17 +-
drivers/usb/misc/yurex.c | 2 +-
drivers/usb/mtu3/Kconfig | 1 +
drivers/usb/mtu3/mtu3.h | 5 +
drivers/usb/mtu3/mtu3_core.c | 4 +-
drivers/usb/mtu3/mtu3_debugfs.c | 4 +-
drivers/usb/mtu3/mtu3_dr.c | 48 +-
drivers/usb/mtu3/mtu3_dr.h | 6 +-
drivers/usb/mtu3/mtu3_plat.c | 3 +-
drivers/usb/musb/musb_core.c | 24 +-
drivers/usb/musb/musb_host.c | 2 +-
drivers/usb/phy/phy-ab8500-usb.c | 18 +-
drivers/usb/phy/phy-fsl-usb.c | 14 +-
drivers/usb/phy/phy-mv-usb.c | 17 +-
drivers/usb/phy/phy-tahvo.c | 18 +-
drivers/usb/phy/phy-twl6030-usb.c | 12 +-
drivers/usb/renesas_usbhs/mod_host.c | 2 +-
drivers/usb/roles/class.c | 57 +-
drivers/usb/roles/intel-xhci-usb-role-switch.c | 54 +-
drivers/usb/serial/ftdi_sio.c | 43 +
drivers/usb/serial/option.c | 10 +
drivers/usb/storage/Makefile | 2 +
drivers/usb/storage/alauda.c | 1 +
drivers/usb/storage/cypress_atacb.c | 1 +
drivers/usb/storage/datafab.c | 1 +
drivers/usb/storage/debug.h | 2 -
drivers/usb/storage/ene_ub6250.c | 1 +
drivers/usb/storage/freecom.c | 1 +
drivers/usb/storage/isd200.c | 3 +-
drivers/usb/storage/jumpshot.c | 1 +
drivers/usb/storage/karma.c | 1 +
drivers/usb/storage/onetouch.c | 1 +
drivers/usb/storage/realtek_cr.c | 16 +-
drivers/usb/storage/scsiglue.c | 19 +-
drivers/usb/storage/sddr09.c | 1 +
drivers/usb/storage/sddr55.c | 1 +
drivers/usb/storage/shuttle_usbat.c | 1 +
drivers/usb/storage/uas.c | 1 +
drivers/usb/storage/unusual_devs.h | 2 +-
drivers/usb/typec/Kconfig | 1 +
drivers/usb/typec/class.c | 16 +-
drivers/usb/typec/mux.c | 2 +-
drivers/usb/typec/tcpm/fusb302.c | 101 +-
drivers/usb/typec/tcpm/tcpm.c | 75 +-
drivers/usb/typec/tcpm/wcove.c | 4 +-
drivers/usb/typec/ucsi/ucsi_ccg.c | 15 +-
drivers/usb/usb-skeleton.c | 8 +-
drivers/usb/usbip/stub.h | 7 +-
drivers/usb/usbip/stub_dev.c | 50 +-
drivers/usb/usbip/stub_main.c | 57 +-
drivers/usb/usbip/stub_rx.c | 204 +-
drivers/usb/usbip/stub_tx.c | 99 +-
drivers/usb/usbip/usbip_common.c | 59 +-
drivers/usb/usbip/vhci_hcd.c | 12 +-
drivers/usb/usbip/vhci_rx.c | 3 +
drivers/usb/usbip/vhci_tx.c | 66 +-
drivers/usb/usbip/vudc.h | 2 +-
drivers/usb/usbip/vudc_dev.c | 9 -
drivers/usb/usbip/vudc_main.c | 1 +
drivers/usb/usbip/vudc_sysfs.c | 7 +-
drivers/usb/wusbcore/Kconfig | 38 -
drivers/usb/wusbcore/Makefile | 26 -
drivers/usb/wusbcore/cbaf.c | 645 -
drivers/usb/wusbcore/crypto.c | 441 -
drivers/usb/wusbcore/devconnect.c | 1085 -
drivers/usb/wusbcore/mmc.c | 303 -
drivers/usb/wusbcore/reservation.c | 110 -
drivers/usb/wusbcore/wa-hc.h | 467 -
drivers/usb/wusbcore/wusbhc.h | 487 -
drivers/uwb/allocator.c | 374 -
drivers/uwb/drp-ie.c | 305 -
drivers/uwb/hwa-rc.c | 929 -
drivers/uwb/i1480/dfu/dfu.c | 198 -
drivers/uwb/i1480/dfu/i1480-dfu.h | 246 -
drivers/uwb/i1480/dfu/mac.c | 496 -
drivers/uwb/i1480/dfu/phy.c | 190 -
drivers/uwb/i1480/dfu/usb.c | 448 -
drivers/uwb/i1480/i1480-est.c | 85 -
drivers/uwb/pal.c | 128 -
drivers/uwb/radio.c | 196 -
drivers/uwb/rsv.c | 1000 -
drivers/uwb/umc-bus.c | 211 -
drivers/uwb/umc-dev.c | 94 -
drivers/uwb/umc-drv.c | 31 -
drivers/uwb/uwb-debug.c | 355 -
drivers/uwb/uwb-internal.h | 366 -
drivers/uwb/whc-rc.c | 467 -
drivers/uwb/whci.c | 257 -
drivers/vfio/pci/vfio_pci.c | 17 +-
drivers/vfio/vfio_iommu_spapr_tce.c | 35 +-
drivers/vfio/vfio_iommu_type1.c | 547 +-
drivers/vhost/test.c | 13 +-
drivers/vhost/vhost.c | 524 +-
drivers/vhost/vhost.h | 41 -
drivers/vhost/vsock.c | 68 +-
drivers/video/backlight/Kconfig | 2 -
drivers/video/backlight/backlight.c | 19 +
drivers/video/backlight/gpio_backlight.c | 24 +-
drivers/video/backlight/lcd.c | 8 -
drivers/video/backlight/lm3630a_bl.c | 3 +-
drivers/video/backlight/lms283gf05.c | 2 +-
drivers/video/backlight/pwm_bl.c | 35 +-
drivers/video/backlight/rave-sp-backlight.c | 10 +-
drivers/video/backlight/tosa_lcd.c | 3 +-
drivers/video/fbdev/Kconfig | 23 -
drivers/video/fbdev/Makefile | 2 -
drivers/video/fbdev/acornfb.c | 1 +
drivers/video/fbdev/amba-clcd.c | 4 +-
drivers/video/fbdev/atafb.c | 42 +-
drivers/video/fbdev/aty/aty128fb.c | 18 -
drivers/video/fbdev/aty/atyfb_base.c | 29 -
drivers/video/fbdev/aty/radeon_base.c | 6 +-
drivers/video/fbdev/au1200fb.c | 5 +-
drivers/video/fbdev/core/fbmem.c | 14 +-
drivers/video/fbdev/core/fbmon.c | 96 -
drivers/video/fbdev/core/modedb.c | 57 -
drivers/video/fbdev/da8xx-fb.c | 118 +-
drivers/video/fbdev/efifb.c | 27 +-
drivers/video/fbdev/jz4740_fb.c | 690 -
drivers/video/fbdev/mmp/core.c | 6 +-
drivers/video/fbdev/mmp/fb/mmpfb.c | 1 -
drivers/video/fbdev/nuc900fb.c | 760 -
drivers/video/fbdev/nuc900fb.h | 51 -
drivers/video/fbdev/nvidia/nv_backlight.c | 2 -
drivers/video/fbdev/nvidia/nv_setup.c | 24 -
drivers/video/fbdev/omap/omapfb_main.c | 8 +
drivers/video/fbdev/omap2/omapfb/displays/Kconfig | 5 +
drivers/video/fbdev/pvr2fb.c | 6 +-
drivers/video/fbdev/pxafb.c | 21 -
drivers/video/fbdev/pxafb.h | 1 -
drivers/video/fbdev/sa1100fb.c | 27 -
drivers/video/fbdev/sa1100fb.h | 1 -
drivers/video/fbdev/sh_mobile_lcdcfb.c | 2 +
drivers/video/fbdev/sm501fb.c | 37 +-
drivers/video/fbdev/sm712fb.c | 8 +-
drivers/video/fbdev/ssd1307fb.c | 131 +-
drivers/video/fbdev/udlfb.c | 2 +-
drivers/video/fbdev/via/via-core.c | 43 -
drivers/video/fbdev/w100fb.c | 23 +-
drivers/video/fbdev/wm8505fb.c | 13 +-
drivers/video/of_display_timing.c | 11 +-
drivers/virtio/virtio_ring.c | 8 +-
drivers/w1/masters/Kconfig | 9 +
drivers/w1/masters/Makefile | 1 +
drivers/w1/masters/mxc_w1.c | 4 +-
drivers/w1/masters/omap_hdq.c | 4 +-
drivers/w1/masters/sgi_w1.c | 130 +
drivers/w1/slaves/Kconfig | 6 +
drivers/w1/slaves/Makefile | 1 +
drivers/w1/slaves/w1_ds250x.c | 290 +
drivers/watchdog/Kconfig | 35 +-
drivers/watchdog/Makefile | 3 +-
drivers/watchdog/ar7_wdt.c | 1 +
drivers/watchdog/aspeed_wdt.c | 69 +-
drivers/watchdog/ath79_wdt.c | 4 +-
drivers/watchdog/cpwd.c | 25 +-
drivers/watchdog/diag288_wdt.c | 3 -
drivers/watchdog/f71808e_wdt.c | 17 +-
drivers/watchdog/iTCO_wdt.c | 26 +-
drivers/watchdog/imx2_wdt.c | 4 +-
drivers/watchdog/imx7ulp_wdt.c | 243 +
drivers/watchdog/imx_sc_wdt.c | 9 +-
drivers/watchdog/jz4740_wdt.c | 1 -
drivers/watchdog/ks8695_wdt.c | 319 -
drivers/watchdog/nuc900_wdt.c | 302 -
drivers/watchdog/orion_wdt.c | 66 +-
drivers/watchdog/pcwd.c | 2 +-
drivers/watchdog/pnx4008_wdt.c | 1 -
drivers/watchdog/qcom-wdt.c | 84 +-
drivers/watchdog/riowd.c | 2 +-
drivers/watchdog/sb_wdog.c | 1 +
drivers/watchdog/scx200_wdt.c | 1 +
drivers/watchdog/sprd_wdt.c | 4 +-
drivers/watchdog/wdt.c | 2 +-
drivers/watchdog/wdt285.c | 2 +-
drivers/watchdog/wdt977.c | 2 +-
drivers/watchdog/ziirave_wdt.c | 351 +-
drivers/xen/events/events_base.c | 2 +-
drivers/xen/gntdev.c | 2 +-
drivers/xen/pci.c | 21 +-
drivers/xen/privcmd.c | 35 +-
drivers/xen/swiotlb-xen.c | 131 +-
drivers/xen/xen-pciback/conf_space_capability.c | 3 +-
drivers/xen/xlate_mmu.c | 32 +
fs/9p/cache.c | 2 +
fs/9p/vfs_file.c | 3 +
fs/9p/vfs_super.c | 10 +-
fs/Kconfig | 3 +
fs/Makefile | 2 +
fs/affs/amigaffs.c | 2 +-
fs/affs/amigaffs.h | 3 +
fs/affs/inode.c | 4 +-
fs/affs/super.c | 4 +
fs/afs/cell.c | 4 +
fs/afs/cmservice.c | 10 +-
fs/afs/dir.c | 146 +-
fs/afs/dynroot.c | 7 -
fs/afs/file.c | 12 +-
fs/afs/fsclient.c | 57 +-
fs/afs/inode.c | 2 +-
fs/afs/internal.h | 2 +-
fs/afs/security.c | 108 +-
fs/afs/vlclient.c | 11 +-
fs/afs/volume.c | 2 -
fs/afs/yfsclient.c | 62 +-
fs/attr.c | 21 +-
fs/autofs/autofs_i.h | 1 -
fs/autofs/expire.c | 103 +-
fs/autofs/root.c | 44 +-
fs/befs/linuxvfs.c | 2 +
fs/bfs/inode.c | 2 +
fs/binfmt_elf.c | 23 +-
fs/block_dev.c | 89 +-
fs/btrfs/Kconfig | 1 +
fs/btrfs/Makefile | 2 +-
fs/btrfs/async-thread.c | 8 +-
fs/btrfs/backref.c | 2 +-
fs/btrfs/block-group.c | 3173 ++
fs/btrfs/block-group.h | 250 +
fs/btrfs/block-rsv.c | 48 +-
fs/btrfs/check-integrity.c | 7 +-
fs/btrfs/compression.c | 21 +-
fs/btrfs/compression.h | 11 +-
fs/btrfs/ctree.c | 452 +-
fs/btrfs/ctree.h | 421 +-
fs/btrfs/dedupe.h | 12 -
fs/btrfs/delalloc-space.c | 34 +-
fs/btrfs/delayed-inode.c | 18 +-
fs/btrfs/delayed-ref.c | 10 +-
fs/btrfs/dev-replace.c | 3 +-
fs/btrfs/disk-io.c | 43 +-
fs/btrfs/disk-io.h | 2 -
fs/btrfs/extent-tree.c | 12445 ++--
fs/btrfs/extent_io.c | 60 +-
fs/btrfs/extent_io.h | 6 +-
fs/btrfs/extent_map.c | 2 +
fs/btrfs/file.c | 435 +-
fs/btrfs/free-space-cache.c | 42 +-
fs/btrfs/free-space-cache.h | 24 +-
fs/btrfs/free-space-tree.c | 1 +
fs/btrfs/free-space-tree.h | 2 +
fs/btrfs/inode-item.c | 62 +-
fs/btrfs/inode-map.c | 32 +-
fs/btrfs/inode.c | 421 +-
fs/btrfs/ioctl.c | 430 +-
fs/btrfs/locking.c | 46 +-
fs/btrfs/locking.h | 2 -
fs/btrfs/lzo.c | 8 +-
fs/btrfs/math.h | 28 -
fs/btrfs/misc.h | 50 +
fs/btrfs/ordered-data.c | 12 +-
fs/btrfs/props.c | 2 +-
fs/btrfs/qgroup.c | 86 +-
fs/btrfs/raid56.c | 16 +
fs/btrfs/reada.c | 30 +
fs/btrfs/relocation.c | 12 +-
fs/btrfs/root-tree.c | 2 +-
fs/btrfs/scrub.c | 1 +
fs/btrfs/send.c | 452 +-
fs/btrfs/space-info.c | 372 +-
fs/btrfs/space-info.h | 30 +-
fs/btrfs/struct-funcs.c | 73 +-
fs/btrfs/super.c | 32 +-
fs/btrfs/sysfs.c | 270 +-
fs/btrfs/sysfs.h | 82 +-
fs/btrfs/tests/btrfs-tests.c | 9 +-
fs/btrfs/tests/extent-io-tests.c | 31 +-
fs/btrfs/tests/free-space-tests.c | 1 +
fs/btrfs/tests/free-space-tree-tests.c | 1 +
fs/btrfs/tests/inode-tests.c | 24 +-
fs/btrfs/transaction.c | 38 +-
fs/btrfs/transaction.h | 3 +
fs/btrfs/tree-checker.c | 432 +
fs/btrfs/tree-log.c | 71 +-
fs/btrfs/volumes.c | 133 +-
fs/btrfs/volumes.h | 9 -
fs/btrfs/zlib.c | 11 +-
fs/btrfs/zstd.c | 12 +-
fs/ceph/Makefile | 2 +-
fs/ceph/addr.c | 66 +-
fs/ceph/cache.c | 2 +
fs/ceph/caps.c | 178 +-
fs/ceph/debugfs.c | 1 -
fs/ceph/export.c | 60 +-
fs/ceph/file.c | 104 +-
fs/ceph/inode.c | 57 +-
fs/ceph/io.c | 163 +
fs/ceph/io.h | 12 +
fs/ceph/locks.c | 11 +-
fs/ceph/mds_client.c | 110 +-
fs/ceph/mds_client.h | 8 +-
fs/ceph/snap.c | 4 +-
fs/ceph/super.c | 54 +-
fs/ceph/super.h | 51 +-
fs/ceph/xattr.c | 95 +-
fs/cifs/Kconfig | 10 +-
fs/cifs/Makefile | 2 +
fs/cifs/cifs_debug.c | 2 +
fs/cifs/cifs_debug.h | 67 +
fs/cifs/cifs_fs_sb.h | 2 +
fs/cifs/cifs_ioctl.h | 10 +
fs/cifs/cifsacl.c | 81 +-
fs/cifs/cifsacl.h | 83 +-
fs/cifs/cifsfs.c | 51 +-
fs/cifs/cifsfs.h | 2 +-
fs/cifs/cifsglob.h | 25 +-
fs/cifs/cifsproto.h | 9 +-
fs/cifs/cifsroot.c | 94 +
fs/cifs/cifssmb.c | 202 +-
fs/cifs/connect.c | 182 +-
fs/cifs/dir.c | 7 +-
fs/cifs/export.c | 2 +-
fs/cifs/file.c | 80 +-
fs/cifs/inode.c | 22 +-
fs/cifs/ioctl.c | 29 +
fs/cifs/misc.c | 22 +
fs/cifs/netmisc.c | 14 +-
fs/cifs/sess.c | 29 +-
fs/cifs/smb2inode.c | 169 +-
fs/cifs/smb2maperror.c | 2 +-
fs/cifs/smb2ops.c | 250 +-
fs/cifs/smb2pdu.c | 315 +-
fs/cifs/smb2pdu.h | 2 +
fs/cifs/smb2proto.h | 7 +-
fs/cifs/smb2transport.c | 62 +-
fs/cifs/smbdirect.c | 10 +-
fs/cifs/smbencrypt.c | 18 +-
fs/cifs/smbfsctl.h | 11 +
fs/cifs/trace.h | 38 +
fs/cifs/transport.c | 120 +-
fs/cifs/xattr.c | 2 +-
fs/coda/inode.c | 3 +
fs/coda/pioctl.c | 7 +-
fs/compat_ioctl.c | 3 -
fs/configfs/configfs_internal.h | 36 +-
fs/configfs/dir.c | 306 +-
fs/configfs/file.c | 280 +-
fs/configfs/inode.c | 36 +-
fs/configfs/mount.c | 9 +
fs/configfs/symlink.c | 197 +-
fs/coredump.c | 44 +-
fs/cramfs/inode.c | 71 +-
fs/crypto/Kconfig | 2 +
fs/crypto/Makefile | 10 +-
fs/crypto/crypto.c | 45 +-
fs/crypto/fname.c | 47 +-
fs/crypto/fscrypt_private.h | 399 +-
fs/crypto/hkdf.c | 181 +
fs/crypto/hooks.c | 6 +-
fs/crypto/keyinfo.c | 611 -
fs/crypto/keyring.c | 984 +
fs/crypto/keysetup.c | 591 +
fs/crypto/keysetup_v1.c | 340 +
fs/crypto/policy.c | 434 +-
fs/d_path.c | 6 +-
fs/dax.c | 4 +-
fs/debugfs/file.c | 30 +
fs/debugfs/inode.c | 32 +-
fs/devpts/inode.c | 2 +-
fs/efs/super.c | 2 +
fs/erofs/Kconfig | 91 +
fs/erofs/Makefile | 11 +
fs/erofs/compress.h | 60 +
fs/erofs/data.c | 360 +
fs/erofs/decompressor.c | 338 +
fs/erofs/dir.c | 142 +
fs/erofs/erofs_fs.h | 316 +
fs/erofs/inode.c | 337 +
fs/erofs/internal.h | 431 +
fs/erofs/namei.c | 252 +
fs/erofs/super.c | 615 +
fs/erofs/tagptr.h | 110 +
fs/erofs/utils.c | 333 +
fs/erofs/xattr.c | 704 +
fs/erofs/xattr.h | 92 +
fs/erofs/zdata.c | 1431 +
fs/erofs/zdata.h | 193 +
fs/erofs/zmap.c | 471 +
fs/erofs/zpvec.h | 157 +
fs/eventpoll.c | 4 +-
fs/exec.c | 4 +-
fs/exportfs/expfs.c | 2 +-
fs/ext2/balloc.c | 10 +-
fs/ext2/super.c | 5 +-
fs/ext2/xattr.c | 2 +-
fs/ext4/Makefile | 1 +
fs/ext4/block_validity.c | 189 +-
fs/ext4/dir.c | 7 +-
fs/ext4/ext4.h | 95 +-
fs/ext4/extents.c | 98 +-
fs/ext4/extents_status.c | 521 +-
fs/ext4/extents_status.h | 8 +-
fs/ext4/file.c | 6 +-
fs/ext4/hash.c | 2 +-
fs/ext4/inline.c | 2 +-
fs/ext4/inode.c | 158 +-
fs/ext4/ioctl.c | 143 +
fs/ext4/namei.c | 4 +-
fs/ext4/readpage.c | 211 +-
fs/ext4/super.c | 45 +-
fs/ext4/sysfs.c | 6 +
fs/ext4/verity.c | 367 +
fs/f2fs/Kconfig | 5 +-
fs/f2fs/Makefile | 1 +
fs/f2fs/data.c | 179 +-
fs/f2fs/debug.c | 4 +-
fs/f2fs/dir.c | 184 +-
fs/f2fs/f2fs.h | 67 +-
fs/f2fs/file.c | 343 +-
fs/f2fs/gc.c | 97 +-
fs/f2fs/hash.c | 37 +-
fs/f2fs/inline.c | 18 +-
fs/f2fs/inode.c | 14 +-
fs/f2fs/namei.c | 54 +-
fs/f2fs/node.c | 57 +-
fs/f2fs/segment.c | 135 +-
fs/f2fs/segment.h | 12 +-
fs/f2fs/super.c | 209 +-
fs/f2fs/sysfs.c | 34 +
fs/f2fs/verity.c | 247 +
fs/f2fs/xattr.c | 6 +
fs/f2fs/xattr.h | 2 +
fs/fat/dir.c | 17 +-
fs/fat/fatent.c | 3 +
fs/fat/inode.c | 12 +
fs/fhandle.c | 2 +-
fs/file_table.c | 1 +
fs/freevxfs/vxfs_super.c | 2 +
fs/fs-writeback.c | 174 +-
fs/fs_context.c | 18 +-
fs/fs_parser.c | 18 +-
fs/fuse/Kconfig | 11 +
fs/fuse/Makefile | 1 +
fs/fuse/cuse.c | 101 +-
fs/fuse/dev.c | 654 +-
fs/fuse/dir.c | 283 +-
fs/fuse/file.c | 1227 +-
fs/fuse/fuse_i.h | 357 +-
fs/fuse/inode.c | 557 +-
fs/fuse/readdir.c | 72 +-
fs/fuse/virtio_fs.c | 1195 +
fs/fuse/xattr.c | 76 +-
fs/gfs2/aops.c | 4 +-
fs/gfs2/bmap.c | 370 +-
fs/gfs2/dentry.c | 45 +-
fs/gfs2/dir.c | 3 +-
fs/gfs2/dir.h | 3 +-
fs/gfs2/file.c | 9 +-
fs/gfs2/glock.c | 115 +-
fs/gfs2/glock.h | 6 +
fs/gfs2/incore.h | 9 +-
fs/gfs2/inode.c | 63 +-
fs/gfs2/lock_dlm.c | 8 +-
fs/gfs2/ops_fstype.c | 496 +-
fs/gfs2/quota.c | 2 +-
fs/gfs2/rgrp.c | 2 +-
fs/gfs2/super.c | 347 +-
fs/gfs2/super.h | 3 +-
fs/gfs2/util.c | 2 +-
fs/hpfs/hpfs_fn.h | 6 +-
fs/hpfs/super.c | 2 +
fs/inode.c | 36 +-
fs/io_uring.c | 926 +-
fs/iomap/Makefile | 2 +-
fs/iomap/direct-io.c | 24 +-
fs/isofs/export.c | 2 +-
fs/isofs/inode.c | 7 +
fs/jbd2/journal.c | 2 -
fs/jbd2/revoke.c | 4 +-
fs/jbd2/transaction.c | 15 +-
fs/jffs2/fs.c | 51 +-
fs/jffs2/gc.c | 21 +-
fs/jffs2/nodelist.c | 2 +-
fs/jffs2/os-linux.h | 7 +-
fs/jffs2/scan.c | 5 +-
fs/jffs2/super.c | 170 +-
fs/jfs/Kconfig | 2 +-
fs/jfs/super.c | 2 +
fs/kernfs/dir.c | 9 +-
fs/kernfs/inode.c | 7 +-
fs/locks.c | 73 +-
fs/minix/inode.c | 2 +
fs/namei.c | 64 +-
fs/namespace.c | 62 +-
fs/nfs/delegation.c | 25 +-
fs/nfs/delegation.h | 2 +-
fs/nfs/dir.c | 43 +-
fs/nfs/direct.c | 27 +-
fs/nfs/filelayout/filelayout.c | 1 +
fs/nfs/flexfilelayout/flexfilelayout.c | 28 +-
fs/nfs/fscache.c | 7 +-
fs/nfs/fscache.h | 2 +-
fs/nfs/inode.c | 35 +-
fs/nfs/internal.h | 18 +-
fs/nfs/nfs3proc.c | 45 +-
fs/nfs/nfs4_fs.h | 14 +-
fs/nfs/nfs4client.c | 5 +-
fs/nfs/nfs4file.c | 12 +-
fs/nfs/nfs4proc.c | 424 +-
fs/nfs/nfs4state.c | 71 +-
fs/nfs/nfs4xdr.c | 2 +-
fs/nfs/nfstrace.h | 2 -
fs/nfs/pagelist.c | 19 +-
fs/nfs/pnfs.c | 78 +-
fs/nfs/pnfs.h | 17 +-
fs/nfs/pnfs_nfs.c | 15 +-
fs/nfs/proc.c | 7 +-
fs/nfs/read.c | 35 +-
fs/nfs/super.c | 30 +-
fs/nfs/write.c | 38 +-
fs/nfsd/Kconfig | 3 +-
fs/nfsd/Makefile | 3 +-
fs/nfsd/acl.h | 8 -
fs/nfsd/blocklayout.c | 3 +-
fs/nfsd/export.c | 13 +
fs/nfsd/filecache.c | 934 +
fs/nfsd/filecache.h | 61 +
fs/nfsd/netns.h | 4 +
fs/nfsd/nfs3proc.c | 9 +-
fs/nfsd/nfs3xdr.c | 13 +-
fs/nfsd/nfs4callback.c | 35 +-
fs/nfsd/nfs4layouts.c | 12 +-
fs/nfsd/nfs4proc.c | 97 +-
fs/nfsd/nfs4recover.c | 388 +-
fs/nfsd/nfs4state.c | 239 +-
fs/nfsd/nfs4xdr.c | 56 +-
fs/nfsd/nfscache.c | 2 +-
fs/nfsd/nfsctl.c | 23 +-
fs/nfsd/nfsproc.c | 4 +-
fs/nfsd/nfssvc.c | 48 +-
fs/nfsd/state.h | 13 +-
fs/nfsd/trace.h | 140 +
fs/nfsd/vfs.c | 351 +-
fs/nfsd/vfs.h | 37 +-
fs/nfsd/xdr3.h | 2 +-
fs/nfsd/xdr4.h | 19 +-
fs/notify/dnotify/dnotify.c | 15 +-
fs/notify/fanotify/fanotify_user.c | 19 +-
fs/notify/fsnotify.h | 2 -
fs/notify/group.c | 2 +
fs/notify/inotify/inotify_user.c | 14 +-
fs/notify/mark.c | 6 +
fs/ntfs/inode.c | 21 +-
fs/ntfs/mft.c | 12 +-
fs/ntfs/namei.c | 2 +-
fs/ntfs/runlist.c | 2 +-
fs/ntfs/super.c | 2 +-
fs/ocfs2/alloc.c | 20 +-
fs/ocfs2/aops.c | 13 +-
fs/ocfs2/blockcheck.c | 26 +-
fs/ocfs2/cluster/heartbeat.c | 103 +-
fs/ocfs2/dir.c | 3 +-
fs/ocfs2/dlm/dlmcommon.h | 1 -
fs/ocfs2/dlm/dlmdebug.c | 55 +-
fs/ocfs2/dlm/dlmdebug.h | 16 +-
fs/ocfs2/dlm/dlmdomain.c | 7 +-
fs/ocfs2/dlm/dlmunlock.c | 23 +-
fs/ocfs2/dlmglue.c | 27 +-
fs/ocfs2/extent_map.c | 3 +-
fs/ocfs2/file.c | 13 +-
fs/ocfs2/inode.c | 2 +-
fs/ocfs2/journal.h | 42 +-
fs/ocfs2/namei.c | 2 -
fs/ocfs2/ocfs2.h | 3 -
fs/ocfs2/super.c | 10 +-
fs/ocfs2/xattr.c | 3 -
fs/omfs/inode.c | 4 +
fs/open.c | 29 +-
fs/orangefs/file.c | 2 +-
fs/orangefs/inode.c | 2 +-
fs/orangefs/namei.c | 2 +-
fs/orangefs/orangefs-kernel.h | 2 +-
fs/overlayfs/export.c | 3 +-
fs/overlayfs/inode.c | 3 +-
fs/overlayfs/ovl_entry.h | 1 +
fs/overlayfs/super.c | 73 +-
fs/proc/kcore.c | 6 +
fs/proc/meminfo.c | 8 +-
fs/proc/root.c | 3 +-
fs/proc/task_mmu.c | 86 +-
fs/proc/vmcore.c | 8 +-
fs/proc_namespace.c | 2 +-
fs/pstore/ram.c | 2 +
fs/qnx4/inode.c | 2 +
fs/qnx6/inode.c | 2 +
fs/quota/dquot.c | 4 +-
fs/ramfs/inode.c | 99 +-
fs/read_write.c | 49 +-
fs/reiserfs/do_balan.c | 15 +-
fs/reiserfs/fix_node.c | 6 +-
fs/reiserfs/journal.c | 22 +-
fs/reiserfs/lbalance.c | 3 +-
fs/reiserfs/objectid.c | 3 +-
fs/reiserfs/prints.c | 3 -
fs/reiserfs/stree.c | 4 -
fs/reiserfs/super.c | 3 +
fs/romfs/super.c | 48 +-
fs/seq_file.c | 2 +-
fs/squashfs/super.c | 102 +-
fs/super.c | 153 +-
fs/sysv/super.c | 5 +-
fs/timerfd.c | 6 +-
fs/tracefs/inode.c | 42 +-
fs/ubifs/auth.c | 4 +-
fs/ubifs/budget.c | 2 +-
fs/ubifs/debug.c | 1 -
fs/ubifs/file.c | 21 +-
fs/ubifs/ioctl.c | 20 +
fs/ubifs/orphan.c | 2 -
fs/ubifs/super.c | 19 +-
fs/ubifs/tnc_misc.c | 1 +
fs/udf/balloc.c | 11 +
fs/udf/ecma_167.h | 14 +
fs/udf/file.c | 3 +
fs/udf/ialloc.c | 3 +
fs/udf/inode.c | 55 +-
fs/udf/super.c | 261 +-
fs/udf/udf_i.h | 6 +-
fs/udf/udfdecl.h | 11 +-
fs/ufs/Kconfig | 2 +-
fs/ufs/super.c | 7 +
fs/unicode/utf8-core.c | 2 +-
fs/unicode/utf8-selftest.c | 4 +-
fs/userfaultfd.c | 47 +-
fs/utimes.c | 6 +-
fs/verity/Kconfig | 55 +
fs/verity/Makefile | 10 +
fs/verity/enable.c | 377 +
fs/verity/fsverity_private.h | 185 +
fs/verity/hash_algs.c | 280 +
fs/verity/init.c | 61 +
fs/verity/measure.c | 57 +
fs/verity/open.c | 356 +
fs/verity/signature.c | 157 +
fs/verity/verify.c | 281 +
fs/xfs/kmem.c | 79 +-
fs/xfs/kmem.h | 15 +-
fs/xfs/libxfs/xfs_alloc.c | 2 +-
fs/xfs/libxfs/xfs_attr.c | 79 +-
fs/xfs/libxfs/xfs_attr.h | 6 +-
fs/xfs/libxfs/xfs_attr_leaf.c | 130 +-
fs/xfs/libxfs/xfs_attr_remote.c | 2 +
fs/xfs/libxfs/xfs_bmap.c | 111 +-
fs/xfs/libxfs/xfs_bmap.h | 11 +-
fs/xfs/libxfs/xfs_bmap_btree.c | 16 +-
fs/xfs/libxfs/xfs_btree.c | 14 +-
fs/xfs/libxfs/xfs_btree.h | 10 +-
fs/xfs/libxfs/xfs_da_btree.c | 25 +-
fs/xfs/libxfs/xfs_da_btree.h | 4 +-
fs/xfs/libxfs/xfs_defer.c | 2 +-
fs/xfs/libxfs/xfs_dir2.c | 14 +-
fs/xfs/libxfs/xfs_dir2_block.c | 2 +-
fs/xfs/libxfs/xfs_dir2_node.c | 681 +-
fs/xfs/libxfs/xfs_dir2_sf.c | 8 +-
fs/xfs/libxfs/xfs_fs.h | 2 +-
fs/xfs/libxfs/xfs_ialloc.c | 9 +-
fs/xfs/libxfs/xfs_iext_tree.c | 8 +-
fs/xfs/libxfs/xfs_inode_fork.c | 16 +-
fs/xfs/libxfs/xfs_refcount.c | 50 +-
fs/xfs/libxfs/xfs_refcount.h | 12 +-
fs/xfs/libxfs/xfs_rmap.c | 59 +-
fs/xfs/libxfs/xfs_rmap.h | 11 +-
fs/xfs/libxfs/xfs_sb.c | 2 +-
fs/xfs/libxfs/xfs_shared.h | 6 -
fs/xfs/libxfs/xfs_types.h | 8 +
fs/xfs/scrub/agheader.c | 4 +-
fs/xfs/scrub/alloc.c | 3 +-
fs/xfs/scrub/attr.c | 6 +-
fs/xfs/scrub/bmap.c | 81 +-
fs/xfs/scrub/dabtree.c | 6 +-
fs/xfs/scrub/fscounters.c | 2 +-
fs/xfs/scrub/repair.c | 6 +-
fs/xfs/scrub/symlink.c | 2 +-
fs/xfs/xfs_acl.c | 14 +-
fs/xfs/xfs_attr_inactive.c | 2 +-
fs/xfs/xfs_attr_list.c | 2 +-
fs/xfs/xfs_bmap_item.c | 8 +-
fs/xfs/xfs_bmap_util.c | 22 +-
fs/xfs/xfs_buf.c | 11 +-
fs/xfs/xfs_buf.h | 6 +
fs/xfs/xfs_buf_item.c | 4 +-
fs/xfs/xfs_dquot.c | 4 +-
fs/xfs/xfs_dquot_item.c | 2 +-
fs/xfs/xfs_error.c | 2 +-
fs/xfs/xfs_extent_busy.c | 2 +-
fs/xfs/xfs_extfree_item.c | 8 +-
fs/xfs/xfs_file.c | 40 +-
fs/xfs/xfs_fsmap.c | 12 +-
fs/xfs/xfs_icache.c | 2 +-
fs/xfs/xfs_icreate_item.c | 2 +-
fs/xfs/xfs_inode.c | 85 +-
fs/xfs/xfs_inode_item.c | 2 +-
fs/xfs/xfs_ioctl.c | 27 +-
fs/xfs/xfs_ioctl32.c | 58 +-
fs/xfs/xfs_iomap.c | 6 +-
fs/xfs/xfs_iops.c | 1 +
fs/xfs/xfs_itable.c | 13 +-
fs/xfs/xfs_itable.h | 13 +-
fs/xfs/xfs_iwalk.c | 4 +-
fs/xfs/xfs_iwalk.h | 13 +-
fs/xfs/xfs_log.c | 469 +-
fs/xfs/xfs_log_cil.c | 10 +-
fs/xfs/xfs_log_recover.c | 50 +-
fs/xfs/xfs_mount.c | 4 +-
fs/xfs/xfs_mount.h | 7 -
fs/xfs/xfs_mru_cache.c | 4 +-
fs/xfs/xfs_pnfs.c | 2 +-
fs/xfs/xfs_qm.c | 4 +-
fs/xfs/xfs_refcount_item.c | 16 +-
fs/xfs/xfs_reflink.c | 86 +-
fs/xfs/xfs_rmap_item.c | 6 +-
fs/xfs/xfs_rtalloc.c | 4 +-
fs/xfs/xfs_super.c | 5 +-
fs/xfs/xfs_sysfs.c | 13 -
fs/xfs/xfs_trace.h | 34 +
fs/xfs/xfs_trans.c | 4 +-
fs/xfs/xfs_trans_dquot.c | 2 +-
fs/xfs/xfs_xattr.c | 2 +-
include/Kbuild | 85 +-
include/acpi/acconfig.h | 4 +-
include/acpi/acpiosxf.h | 1 +
include/acpi/acpixf.h | 10 +-
include/acpi/actypes.h | 20 +-
include/acpi/processor.h | 26 +-
include/asm-generic/5level-fixup.h | 21 +-
include/asm-generic/Kbuild | 2 +
include/asm-generic/bug.h | 55 +-
include/asm-generic/div64.h | 22 +-
include/asm-generic/error-injection.h | 6 +
include/asm-generic/export.h | 15 +-
include/asm-generic/futex.h | 21 +-
include/asm-generic/getorder.h | 50 +-
include/asm-generic/io.h | 9 -
include/asm-generic/mshyperv.h | 1 +
include/asm-generic/pgalloc.h | 13 +-
include/asm-generic/pgtable.h | 7 +-
include/asm-generic/preempt.h | 4 +-
include/asm-generic/vmlinux.lds.h | 8 +-
include/clocksource/hyperv_timer.h | 8 +-
include/crypto/aes.h | 58 +-
include/crypto/algapi.h | 2 -
include/crypto/ctr.h | 50 +
include/crypto/des.h | 77 +-
include/crypto/gcm.h | 55 +
include/crypto/ghash.h | 2 +-
include/crypto/internal/cryptouser.h | 7 +-
include/crypto/internal/des.h | 152 +
include/crypto/internal/skcipher.h | 5 +
include/crypto/morus1280_glue.h | 97 -
include/crypto/morus640_glue.h | 97 -
include/crypto/morus_common.h | 18 -
include/crypto/pkcs7.h | 4 +
include/crypto/sha.h | 47 +
include/crypto/sha1_base.h | 5 +
include/crypto/sha256_base.h | 29 +-
include/crypto/sha512_base.h | 5 +
include/crypto/sm3_base.h | 5 +
include/drm/amd_asic_type.h | 4 +
include/drm/bridge/analogix_dp.h | 4 -
include/drm/bridge/dw_hdmi.h | 6 +
include/drm/drmP.h | 2 +-
include/drm/drm_agpsupport.h | 14 -
include/drm/drm_client.h | 2 +
include/drm/drm_connector.h | 32 +-
include/drm/drm_crtc.h | 14 +-
include/drm/drm_dp_helper.h | 4 +
include/drm/drm_dp_mst_helper.h | 11 +
include/drm/drm_drv.h | 104 +-
include/drm/drm_gem.h | 26 +-
include/drm/drm_gem_framebuffer_helper.h | 7 -
include/drm/drm_gem_shmem_helper.h | 15 +
include/drm/drm_gem_vram_helper.h | 30 +-
include/drm/drm_hdcp.h | 9 +-
include/drm/drm_ioctl.h | 3 +
include/drm/drm_mipi_dbi.h | 188 +
include/drm/drm_mode_config.h | 13 +
include/drm/drm_panel.h | 184 +-
include/drm/drm_prime.h | 41 +-
include/drm/drm_self_refresh_helper.h | 6 +-
include/drm/drm_sysfs.h | 5 +-
include/drm/drm_vblank.h | 1 -
include/drm/drm_vram_mm_helper.h | 2 +
include/drm/i915_component.h | 2 +-
include/drm/i915_drm.h | 13 +-
include/drm/i915_pciids.h | 18 +-
include/drm/tinydrm/mipi-dbi.h | 117 -
include/drm/tinydrm/tinydrm-helpers.h | 75 -
include/drm/ttm/ttm_bo_api.h | 41 +-
include/drm/ttm/ttm_bo_driver.h | 26 +-
include/dt-bindings/bus/moxtet.h | 16 +
include/dt-bindings/bus/ti-sysc.h | 1 +
include/dt-bindings/clock/ast2600-clock.h | 113 +
include/dt-bindings/clock/bcm2835.h | 2 +
include/dt-bindings/clock/g12a-clkc.h | 6 +
include/dt-bindings/clock/imx8-clock.h | 6 +-
include/dt-bindings/clock/imx8mn-clock.h | 216 +
include/dt-bindings/clock/ingenic,tcu.h | 20 +
include/dt-bindings/clock/jz4740-cgu.h | 1 +
include/dt-bindings/clock/mt6779-clk.h | 436 +
include/dt-bindings/clock/mt8183-clk.h | 4 +
include/dt-bindings/clock/omap5.h | 3 +
include/dt-bindings/clock/qcom,gcc-qcs404.h | 3 +
include/dt-bindings/clock/qcom,gcc-sm8150.h | 243 +
include/dt-bindings/clock/rk3308-cru.h | 387 +
include/dt-bindings/clock/sun8i-v3s-ccu.h | 4 +
include/dt-bindings/gce/mt8183-gce.h | 175 +
include/dt-bindings/interconnect/qcom,qcs404.h | 88 +
include/dt-bindings/leds/common.h | 55 +-
include/dt-bindings/memory/mt8183-larb-port.h | 130 +
include/dt-bindings/phy/phy-lantiq-vrx200-pcie.h | 11 +
include/dt-bindings/pinctrl/k3.h | 3 +
include/dt-bindings/power/meson-g12a-power.h | 13 +
include/dt-bindings/power/meson-sm1-power.h | 18 +
.../regulator/active-semi,8865-regulator.h | 28 +
.../dt-bindings/reset-controller/mt8183-resets.h | 81 +
.../reset/amlogic,meson-g12a-audio-reset.h | 38 +
.../dt-bindings/reset/amlogic,meson-gxbb-reset.h | 51 +-
include/dt-bindings/reset/amlogic,meson8b-reset.h | 51 +-
include/dt-bindings/reset/hisi,hi6220-resets.h | 7 +
include/dt-bindings/reset/imx8mq-reset.h | 34 +-
include/dt-bindings/reset/mt7629-resets.h | 71 +
include/dt-bindings/reset/sun8i-v3s-ccu.h | 3 +
include/dt-bindings/soc/ti,sci_pm_domain.h | 9 +
include/dt-bindings/sound/samsung-i2s.h | 12 +-
include/kvm/arm_pmu.h | 2 +
include/kvm/arm_vgic.h | 5 +-
include/linux/acpi.h | 66 +-
include/linux/alarmtimer.h | 3 +-
include/linux/amba/clcd-regs.h | 1 +
include/linux/amd-iommu.h | 12 +
include/linux/arch_topology.h | 26 +
include/linux/audit.h | 21 +-
include/linux/backing-dev-defs.h | 23 +
include/linux/backing-dev.h | 5 +
include/linux/backlight.h | 8 +
include/linux/bitmap.h | 23 +
include/linux/blk-cgroup.h | 7 +-
include/linux/blk-mq.h | 20 +-
include/linux/blk_types.h | 11 +-
include/linux/blkdev.h | 79 +-
include/linux/bpf.h | 16 +-
include/linux/bpf_types.h | 1 +
include/linux/bpf_verifier.h | 1 +
include/linux/bug.h | 5 +
include/linux/can/can-ml.h | 68 +
include/linux/can/core.h | 11 +-
include/linux/can/dev.h | 3 +-
include/linux/can/platform/rcar_can.h | 18 -
include/linux/can/rx-offload.h | 13 +-
include/linux/can/skb.h | 2 +-
include/linux/ccp.h | 2 +
include/linux/ceph/buffer.h | 3 +-
include/linux/ceph/libceph.h | 1 +
include/linux/ceph/messenger.h | 1 +
include/linux/ceph/mon_client.h | 1 +
include/linux/ceph/osd_client.h | 2 +
include/linux/cgroup.h | 1 +
include/linux/clk-provider.h | 4 +-
include/linux/clk.h | 18 +-
include/linux/clk/clk-conf.h | 5 +
include/linux/compaction.h | 22 +-
include/linux/compiler.h | 8 +-
include/linux/compiler_types.h | 37 +-
include/linux/connector.h | 1 -
include/linux/container.h | 5 +
include/linux/cpu.h | 4 +-
include/linux/cpufreq.h | 4 +-
include/linux/cpuidle.h | 27 +-
include/linux/cpuidle_haltpoll.h | 16 +
include/linux/cpumask.h | 55 +-
include/linux/cpuset.h | 13 +-
include/linux/crash_dump.h | 14 +
include/linux/cred.h | 9 +-
include/linux/dcache.h | 2 +-
include/linux/devfreq-event.h | 6 +
include/linux/device.h | 262 +-
include/linux/dim.h | 56 -
include/linux/dma-buf.h | 4 +-
include/linux/dma-contiguous.h | 5 +-
include/linux/dma-fence.h | 34 +-
include/linux/dma-mapping.h | 43 +-
include/linux/dma-noncoherent.h | 24 +-
include/linux/dma-resv.h | 295 +
include/linux/edac.h | 10 +-
include/linux/edma.h | 29 -
include/linux/efi.h | 14 +-
include/linux/elevator.h | 9 +-
include/linux/error-injection.h | 6 +-
include/linux/export.h | 110 +-
include/linux/exportfs.h | 2 +-
include/linux/extable.h | 2 +
include/linux/f2fs_fs.h | 10 +-
include/linux/fb.h | 7 -
include/linux/filter.h | 13 +
include/linux/fips.h | 7 +
include/linux/firmware/imx/dsp.h | 67 +
include/linux/firmware/intel/stratix10-smc.h | 51 +-
.../linux/firmware/intel/stratix10-svc-client.h | 11 +-
include/linux/fpga/altera-pr-ip-core.h | 2 +-
include/linux/fs.h | 73 +
include/linux/fs_context.h | 17 +-
include/linux/fscrypt.h | 55 +-
include/linux/fsnotify_backend.h | 2 +
include/linux/fsverity.h | 211 +
include/linux/fwnode.h | 9 +-
include/linux/gpio.h | 37 -
include/linux/gpio/consumer.h | 199 +-
include/linux/gpio/driver.h | 178 +-
include/linux/greybus.h | 152 +
include/linux/greybus/bundle.h | 92 +
include/linux/greybus/connection.h | 131 +
include/linux/greybus/control.h | 60 +
.../staging => include/linux}/greybus/greybus_id.h | 0
include/linux/greybus/greybus_manifest.h | 181 +
include/linux/greybus/greybus_protocols.h | 2178 +
include/linux/greybus/hd.h | 85 +
include/linux/greybus/interface.h | 85 +
include/linux/greybus/manifest.h | 17 +
include/linux/greybus/module.h | 36 +
include/linux/greybus/operation.h | 229 +
include/linux/greybus/svc.h | 106 +
include/linux/hid.h | 43 +-
include/linux/hmm.h | 179 +-
include/linux/hrtimer.h | 48 +-
include/linux/huge_mm.h | 16 +-
include/linux/hugetlb.h | 2 +-
include/linux/hyperv.h | 45 +-
include/linux/i2c.h | 4 +-
include/linux/i3c/device.h | 4 +
include/linux/i3c/master.h | 5 +
include/linux/idle_inject.h | 8 +-
include/linux/ieee80211.h | 63 +-
include/linux/if_pppox.h | 3 +
include/linux/if_rmnet.h | 4 +-
include/linux/iio/common/cros_ec_sensors_core.h | 31 +-
include/linux/iio/common/st_sensors.h | 66 +-
include/linux/iio/common/st_sensors_i2c.h | 4 +-
include/linux/iio/common/st_sensors_spi.h | 4 +-
include/linux/iio/imu/adis.h | 2 +
include/linux/ima.h | 9 +
include/linux/init_task.h | 11 -
include/linux/input.h | 26 +
include/linux/input/bu21013.h | 34 -
include/linux/input/elan-i2c-ids.h | 2 +-
include/linux/intel-iommu.h | 5 +-
include/linux/intel_th.h | 79 +
include/linux/interconnect-provider.h | 7 +-
include/linux/interconnect.h | 5 +
include/linux/interrupt.h | 5 +
include/linux/interval_tree_generic.h | 22 +-
include/linux/io-pgtable.h | 66 +-
include/linux/ioc4.h | 184 -
include/linux/iomap.h | 10 +-
include/linux/iommu.h | 108 +-
include/linux/ioport.h | 2 +
include/linux/iova.h | 6 +
include/linux/irqchip/arm-gic-v3.h | 30 +-
include/linux/irqchip/irq-partition-percpu.h | 5 +
include/linux/irqdomain.h | 6 +-
include/linux/jbd2.h | 2 -
include/linux/kernel.h | 23 +-
include/linux/kexec.h | 29 +-
include/linux/key.h | 22 +-
include/linux/kgdb.h | 2 +
include/linux/khugepaged.h | 12 +
include/linux/kvm_host.h | 6 +-
include/linux/lcd.h | 10 -
include/linux/led-class-flash.h | 15 +-
include/linux/leds.h | 100 +-
include/linux/libnvdimm.h | 9 +-
include/linux/lightnvm.h | 8 +-
include/linux/lockdep.h | 11 +-
include/linux/logic_pio.h | 1 +
include/linux/lsm_hooks.h | 22 +-
include/linux/mailbox/mtk-cmdq-mailbox.h | 3 +
include/linux/mdio.h | 11 +
include/linux/mem_encrypt.h | 15 +-
include/linux/memcontrol.h | 81 +-
include/linux/memory.h | 7 +-
include/linux/memremap.h | 5 +-
include/linux/mfd/aat2870.h | 1 -
include/linux/mfd/cros_ec.h | 292 -
include/linux/mfd/cros_ec_commands.h | 5713 --
include/linux/mfd/da9063/pdata.h | 60 -
include/linux/mfd/intel_soc_pmic_mrfld.h | 81 +
include/linux/mfd/mt6397/core.h | 11 +
include/linux/mfd/syscon.h | 6 +
include/linux/migrate.h | 120 +-
include/linux/mlx5/device.h | 21 +-
include/linux/mlx5/driver.h | 44 +-
include/linux/mlx5/eswitch.h | 9 +-
include/linux/mlx5/fs.h | 40 +-
include/linux/mlx5/mlx5_ifc.h | 325 +-
include/linux/mm.h | 87 +-
include/linux/mm_types.h | 32 +-
include/linux/mm_types_task.h | 4 +
include/linux/mmc/host.h | 12 +
include/linux/mmu_notifier.h | 59 +-
include/linux/mmzone.h | 19 +-
include/linux/mod_devicetable.h | 1 +
include/linux/module.h | 5 +-
include/linux/module_signature.h | 46 +
include/linux/moxtet.h | 109 +
include/linux/mtd/mtd.h | 3 +
include/linux/mtd/nand.h | 2 +-
include/linux/mtd/sharpsl.h | 5 +
include/linux/mtd/spi-nor.h | 291 +-
include/linux/mtd/super.h | 6 +-
include/linux/mutex.h | 25 +-
include/linux/namei.h | 63 +-
include/linux/netdevice.h | 20 +-
include/linux/netfilter.h | 4 +-
include/linux/netfilter/ipset/ip_set.h | 238 +-
include/linux/netfilter/ipset/ip_set_comment.h | 73 -
include/linux/netfilter/ipset/ip_set_counter.h | 84 -
include/linux/netfilter/ipset/ip_set_getport.h | 6 +-
include/linux/netfilter/ipset/ip_set_skbinfo.h | 42 -
include/linux/netfilter/ipset/ip_set_timeout.h | 77 -
include/linux/netfilter/nf_conntrack_amanda.h | 4 +
include/linux/netfilter/nf_conntrack_common.h | 20 +
include/linux/netfilter/nf_conntrack_dccp.h | 3 -
include/linux/netfilter/nf_conntrack_ftp.h | 8 +-
include/linux/netfilter/nf_conntrack_h323.h | 11 +-
include/linux/netfilter/nf_conntrack_h323_asn1.h | 5 +-
include/linux/netfilter/nf_conntrack_h323_types.h | 5 +
include/linux/netfilter/nf_conntrack_irc.h | 5 +-
include/linux/netfilter/nf_conntrack_pptp.h | 12 +-
include/linux/netfilter/nf_conntrack_proto_gre.h | 2 -
include/linux/netfilter/nf_conntrack_sane.h | 4 -
include/linux/netfilter/nf_conntrack_sip.h | 6 +-
include/linux/netfilter/nf_conntrack_snmp.h | 3 +
include/linux/netfilter/nf_conntrack_tftp.h | 5 +
include/linux/netfilter/x_tables.h | 2 +-
include/linux/netfilter/xt_hashlimit.h | 11 -
include/linux/netfilter/xt_physdev.h | 8 -
include/linux/netfilter_bridge.h | 7 +
include/linux/netfilter_bridge/ebt_802_3.h | 12 -
include/linux/netfilter_bridge/ebtables.h | 1 +
include/linux/netfilter_ipv4/ip_tables.h | 5 +-
include/linux/netfilter_ipv6.h | 28 +-
include/linux/netfilter_ipv6/ip6_tables.h | 18 +-
include/linux/nfs_fs.h | 3 +
include/linux/nvme-fc-driver.h | 2 +
include/linux/nvme.h | 5 +-
include/linux/of.h | 2 +-
include/linux/of_gpio.h | 11 -
include/linux/omap-dma.h | 2 -
include/linux/omap-dmaengine.h | 18 -
include/linux/omap-iommu.h | 15 +
include/linux/oxu210hp.h | 8 -
include/linux/padata.h | 29 +-
include/linux/page-flags-layout.h | 18 +-
include/linux/page-flags.h | 4 +
include/linux/page_ext.h | 1 +
include/linux/pagemap.h | 10 +
include/linux/pagewalk.h | 66 +
include/linux/pci-aspm.h | 36 -
include/linux/pci-p2pdma.h | 28 +-
include/linux/pci.h | 135 +-
include/linux/pci_hotplug.h | 100 -
include/linux/pci_ids.h | 9 +-
include/linux/percpu.h | 2 +-
include/linux/perf_event.h | 14 +
include/linux/phy.h | 15 +-
include/linux/phy_fixed.h | 1 +
include/linux/pid.h | 4 +
include/linux/pinctrl/consumer.h | 6 +
include/linux/platform_data/cros_ec_chardev.h | 38 +
include/linux/platform_data/cros_ec_commands.h | 5880 ++
include/linux/platform_data/cros_ec_proto.h | 319 +
include/linux/platform_data/db8500_thermal.h | 29 -
include/linux/platform_data/dma-iop32x.h | 110 +
include/linux/platform_data/dwc3-omap.h | 43 -
include/linux/platform_data/eth-netx.h | 13 -
include/linux/platform_data/gpio-htc-egpio.h | 3 -
include/linux/platform_data/iommu-omap.h | 4 +
include/linux/platform_data/keypad-w90p910.h | 16 -
.../linux/platform_data/leds-kirkwood-netxbig.h | 54 -
include/linux/platform_data/nxp-nci.h | 19 -
include/linux/platform_data/pinctrl-single.h | 6 +
include/linux/platform_data/sc18is602.h | 2 +-
include/linux/platform_data/sgi-w1.h | 13 +
include/linux/platform_data/spi-nuc900.h | 29 -
include/linux/platform_data/ti-sysc.h | 8 +-
include/linux/platform_data/video-nuc900fb.h | 79 -
include/linux/platform_data/x86/asus-wmi.h | 8 +-
include/linux/platform_device.h | 6 +-
include/linux/pm.h | 4 -
include/linux/pm_domain.h | 16 +-
include/linux/pm_opp.h | 12 +-
include/linux/pm_qos.h | 6 -
include/linux/pm_wakeup.h | 21 +-
include/linux/posix-timers.h | 131 +-
include/linux/preempt.h | 6 +-
include/linux/printk.h | 22 +-
include/linux/property.h | 4 +
include/linux/psci.h | 4 +-
include/linux/pwm.h | 4 +-
include/linux/qcom_scm.h | 9 +-
include/linux/qed/qed_if.h | 31 +-
include/linux/qed/qed_rdma_if.h | 2 +-
include/linux/quicklist.h | 94 -
include/linux/quotaops.h | 2 +-
include/linux/ramfs.h | 6 +-
include/linux/random.h | 1 +
include/linux/rbtree_augmented.h | 88 +-
include/linux/rcu_segcblist.h | 9 +
include/linux/rcu_sync.h | 4 +-
include/linux/rculist.h | 36 +-
include/linux/rcupdate.h | 11 +-
include/linux/rcutiny.h | 2 +-
include/linux/rcutree.h | 2 +-
include/linux/rcuwait.h | 20 +-
include/linux/regulator/consumer.h | 13 +
include/linux/regulator/mt6358-regulator.h | 56 +
include/linux/reservation.h | 297 -
include/linux/root_dev.h | 1 +
include/linux/rwsem.h | 10 +
include/linux/sched.h | 64 +-
include/linux/sched/cputime.h | 12 +-
include/linux/sched/deadline.h | 8 +
include/linux/sched/mm.h | 10 +-
include/linux/sched/numa_balancing.h | 4 +-
include/linux/sched/signal.h | 14 +-
include/linux/sched/task.h | 8 +-
include/linux/sched/topology.h | 10 +
include/linux/sched/types.h | 23 +
include/linux/scmi_protocol.h | 46 +-
include/linux/security.h | 69 +-
include/linux/sha256.h | 28 -
include/linux/shmem_fs.h | 3 +-
include/linux/shrinker.h | 7 +-
include/linux/signal.h | 15 +-
include/linux/skbuff.h | 167 +-
include/linux/skmsg.h | 8 +-
include/linux/slab.h | 62 -
include/linux/soc/amlogic/meson-canvas.h | 1 +
include/linux/soc/mediatek/mtk-cmdq.h | 17 +-
include/linux/soc/nxp/lpc32xx-misc.h | 33 +
include/linux/soc/samsung/exynos-chipid.h | 52 +
include/linux/soc/ti/ti_sci_protocol.h | 3 +
include/linux/socket.h | 3 +
include/linux/sort.h | 5 +
include/linux/soundwire/sdw.h | 20 +-
include/linux/soundwire/sdw_intel.h | 1 +
include/linux/spinlock.h | 2 +-
include/linux/spinlock_api_smp.h | 2 +-
include/linux/stacktrace.h | 4 +-
include/linux/stmmac.h | 4 +
include/linux/string.h | 5 +-
include/linux/sunrpc/cache.h | 7 +-
include/linux/sunrpc/sched.h | 4 -
include/linux/sunrpc/svc_rdma.h | 6 +-
include/linux/sunrpc/xdr.h | 2 +-
include/linux/sunrpc/xprt.h | 1 +
include/linux/sunrpc/xprtrdma.h | 4 +-
include/linux/suspend.h | 4 +-
include/linux/swap.h | 2 +
include/linux/swiotlb.h | 8 +-
include/linux/sys_soc.h | 1 +
include/linux/syscalls.h | 19 +
include/linux/sysfs.h | 9 +
include/linux/t10-pi.h | 14 -
include/linux/tcp.h | 2 +
include/linux/thermal.h | 4 +-
include/linux/thread_info.h | 2 +-
include/linux/thunderbolt.h | 2 +
include/linux/time64.h | 2 +
include/linux/timekeeper_internal.h | 5 +
include/linux/timer.h | 2 +-
include/linux/timeriomem-rng.h | 5 +
include/linux/timerqueue.h | 23 +-
include/linux/tnum.h | 6 +
include/linux/topology.h | 15 +
include/linux/torture.h | 2 +-
include/linux/trace_events.h | 1 +
include/linux/uaccess.h | 21 +-
include/linux/usb.h | 9 +-
include/linux/usb/ch9.h | 27 +
include/linux/usb/gadget.h | 3 +
include/linux/usb/hcd.h | 10 +
include/linux/usb/role.h | 37 +
include/linux/usb/samsung_usb_phy.h | 17 -
include/linux/usb/usb338x.h | 35 +-
include/linux/usb/wusb.h | 362 -
include/linux/uwb.h | 817 -
include/linux/verification.h | 10 +
include/linux/vermagic.h | 2 +
include/linux/virtio_vsock.h | 4 +-
include/linux/vmalloc.h | 22 +-
include/linux/w1.h | 5 +
include/linux/wait.h | 17 +-
include/linux/wimax/debug.h | 20 +-
include/linux/workqueue.h | 4 +
include/linux/writeback.h | 2 +
include/linux/zpool.h | 3 +
include/math-emu/op-common.h | 5 +
include/media/davinci/vpfe_capture.h | 2 +-
include/media/drv-intf/exynos-fimc.h | 2 -
include/media/drv-intf/saa7146_vv.h | 1 -
include/media/drv-intf/soc_mediabus.h | 2 -
include/media/dvb-usb-ids.h | 1 +
include/media/dvb_frontend.h | 21 +-
include/media/h264-ctrls.h | 21 +-
include/media/rc-map.h | 28 +-
include/media/v4l2-async.h | 30 +-
include/media/v4l2-common.h | 150 +-
include/media/v4l2-ctrls.h | 12 +-
include/media/v4l2-ioctl.h | 2 +
include/media/vp8-ctrls.h | 112 +
include/misc/charlcd.h | 39 -
include/net/act_api.h | 13 +-
include/net/addrconf.h | 2 +-
include/net/bluetooth/hci_core.h | 3 +
include/net/bpf_sk_storage.h | 10 +
include/net/cfg80211.h | 124 +-
include/net/devlink.h | 199 +-
include/net/drop_monitor.h | 33 +
include/net/dsa.h | 7 +-
include/net/flow_offload.h | 98 +-
include/net/if_inet6.h | 2 +-
include/net/inet_connection_sock.h | 2 +-
include/net/inet_frag.h | 2 +-
include/net/inet_sock.h | 1 +
include/net/inet_timewait_sock.h | 1 +
include/net/ip.h | 1 +
include/net/ip_fib.h | 4 +-
include/net/ipv6.h | 2 +-
include/net/mac80211.h | 56 +-
include/net/ndisc.h | 1 +
include/net/net_namespace.h | 9 +-
include/net/netfilter/br_netfilter.h | 12 +-
include/net/netfilter/ipv4/nf_dup_ipv4.h | 3 +
include/net/netfilter/ipv6/nf_conntrack_icmpv6.h | 21 -
include/net/netfilter/ipv6/nf_defrag_ipv6.h | 4 +-
include/net/netfilter/ipv6/nf_dup_ipv6.h | 2 +
include/net/netfilter/nf_conntrack.h | 15 +-
include/net/netfilter/nf_conntrack_acct.h | 13 +-
include/net/netfilter/nf_conntrack_bridge.h | 13 +-
include/net/netfilter/nf_conntrack_core.h | 7 +-
include/net/netfilter/nf_conntrack_count.h | 3 +
include/net/netfilter/nf_conntrack_ecache.h | 84 +-
include/net/netfilter/nf_conntrack_expect.h | 14 +-
include/net/netfilter/nf_conntrack_extend.h | 2 +-
include/net/netfilter/nf_conntrack_l4proto.h | 16 +-
include/net/netfilter/nf_conntrack_labels.h | 11 +-
include/net/netfilter/nf_conntrack_synproxy.h | 40 +-
include/net/netfilter/nf_conntrack_timeout.h | 4 +
include/net/netfilter/nf_conntrack_timestamp.h | 10 -
include/net/netfilter/nf_conntrack_tuple.h | 2 +-
include/net/netfilter/nf_conntrack_zones.h | 6 +-
include/net/netfilter/nf_dup_netdev.h | 8 +
include/net/netfilter/nf_flow_table.h | 3 +-
include/net/netfilter/nf_nat.h | 17 +-
include/net/netfilter/nf_nat_helper.h | 4 +-
include/net/netfilter/nf_nat_masquerade.h | 1 +
include/net/netfilter/nf_nat_redirect.h | 3 +
include/net/netfilter/nf_queue.h | 3 +
include/net/netfilter/nf_reject.h | 3 +
include/net/netfilter/nf_synproxy.h | 40 +
include/net/netfilter/nf_tables.h | 68 +-
include/net/netfilter/nf_tables_ipv6.h | 1 +
include/net/netfilter/nf_tables_offload.h | 9 +-
include/net/netfilter/nft_fib.h | 2 +
include/net/netfilter/nft_meta.h | 2 +
include/net/netfilter/nft_reject.h | 5 +
include/net/netlink.h | 5 +-
include/net/netns/can.h | 14 +-
include/net/netns/ipv4.h | 1 +
include/net/netns/sctp.h | 3 +
include/net/nexthop.h | 11 +-
include/net/pkt_cls.h | 63 +-
include/net/pkt_sched.h | 30 +-
include/net/psample.h | 2 +
include/net/route.h | 5 +-
include/net/sch_generic.h | 57 +-
include/net/sctp/auth.h | 2 +
include/net/sctp/structs.h | 4 +-
include/net/sock.h | 10 +-
include/net/sock_reuseport.h | 20 +-
include/net/tc_act/tc_mirred.h | 18 +
include/net/tc_act/tc_mpls.h | 75 +
include/net/tc_act/tc_police.h | 4 +-
include/net/tc_act/tc_sample.h | 6 -
include/net/tc_act/tc_skbedit.h | 27 +
include/net/tc_act/tc_tunnel_key.h | 17 +
include/net/tcp.h | 23 +-
include/net/tls.h | 87 +-
include/net/udp.h | 2 +-
include/net/vxlan.h | 4 +-
include/net/xdp_sock.h | 122 +-
include/net/xfrm.h | 2 -
include/rdma/ib.h | 2 +
include/rdma/ib_umem.h | 2 +-
include/rdma/ib_umem_odp.h | 58 +-
include/rdma/ib_verbs.h | 85 +-
include/rdma/iw_portmap.h | 3 +
include/rdma/opa_port_info.h | 2 +
include/rdma/rdma_netlink.h | 10 +-
include/rdma/rdma_vt.h | 1 +
include/rdma/rdmavt_cq.h | 1 +
include/rdma/rdmavt_qp.h | 44 +-
include/rdma/restrack.h | 3 +-
include/rdma/signature.h | 2 +
include/scsi/libfc.h | 52 +-
include/scsi/libfcoe.h | 3 +-
include/scsi/scsi_cmnd.h | 1 +
include/scsi/scsi_dbg.h | 2 -
include/scsi/scsi_host.h | 16 +-
include/soc/arc/mcip.h | 11 +
include/soc/fsl/qe/qe.h | 2 +-
include/soc/mediatek/smi.h | 5 -
include/soc/qcom/tcs.h | 20 +-
include/sound/compress_driver.h | 5 +-
include/sound/dmaengine_pcm.h | 5 +
include/sound/hda_codec.h | 2 +
include/sound/hdaudio.h | 9 -
include/sound/pxa2xx-lib.h | 26 +-
include/sound/rt5682.h | 1 +
include/sound/simple_card_utils.h | 1 +
include/sound/soc-acpi-intel-match.h | 1 +
include/sound/soc-acpi.h | 4 +
include/sound/soc-component.h | 45 +-
include/sound/soc-dapm.h | 3 +
include/sound/soc-dpcm.h | 18 +-
include/sound/soc.h | 31 +-
include/sound/sof.h | 3 +
include/sound/sof/control.h | 2 +-
include/sound/sof/dai-imx.h | 34 +
include/sound/sof/dai-intel.h | 2 +-
include/sound/sof/dai.h | 4 +-
include/sound/sof/header.h | 4 +-
include/sound/sof/info.h | 2 +-
include/sound/sof/pm.h | 10 +-
include/sound/sof/stream.h | 6 +-
include/sound/sof/topology.h | 2 +-
include/sound/sof/trace.h | 2 +-
include/sound/sof/xtensa.h | 2 +-
include/sound/wm8904.h | 2 +-
include/trace/events/btrfs.h | 3 +-
include/trace/events/dma_fence.h | 2 +-
include/trace/events/erofs.h | 259 +
include/trace/events/filelock.h | 14 +-
include/trace/events/intel_iommu.h | 106 +
include/trace/events/iocost.h | 178 +
include/trace/events/kmem.h | 7 +-
include/trace/events/napi.h | 4 +-
include/trace/events/power.h | 8 +-
include/trace/events/qdisc.h | 4 +-
include/trace/events/rcu.h | 4 +-
include/trace/events/rpcrdma.h | 88 +-
include/trace/events/rxrpc.h | 65 +-
include/trace/events/tegra_apb_dma.h | 4 +-
include/trace/events/writeback.h | 164 +-
include/trace/events/xdp.h | 3 +-
include/uapi/asm-generic/mman-common.h | 3 +
include/uapi/asm-generic/unistd.h | 2 +-
include/uapi/drm/amdgpu_drm.h | 4 +
include/uapi/drm/drm_mode.h | 1 +
include/uapi/drm/etnaviv_drm.h | 10 +-
include/uapi/drm/i915_drm.h | 1 +
include/uapi/drm/panfrost_drm.h | 64 +
include/uapi/linux/bpf.h | 56 +-
include/uapi/linux/bpfilter.h | 2 +-
include/uapi/linux/btf.h | 4 +-
include/uapi/linux/btrfs.h | 13 +-
include/uapi/linux/btrfs_tree.h | 9 +-
include/uapi/linux/can.h | 20 +-
include/uapi/linux/can/gw.h | 17 +-
include/uapi/linux/can/j1939.h | 99 +
include/uapi/linux/can/netlink.h | 6 +-
include/uapi/linux/coff.h | 5 +
include/uapi/linux/cryptouser.h | 5 +
include/uapi/linux/devlink.h | 73 +
include/uapi/linux/dm-ioctl.h | 6 +-
include/uapi/linux/ethtool.h | 22 +
include/uapi/linux/fpga-dfl.h | 18 +
include/uapi/linux/fs.h | 56 +-
include/uapi/linux/fscrypt.h | 181 +
include/uapi/linux/fsverity.h | 40 +
include/uapi/linux/fuse.h | 12 +-
include/uapi/linux/gsmmux.h | 2 +
include/uapi/linux/if_bridge.h | 1 +
include/uapi/linux/if_xdp.h | 22 +
include/uapi/linux/inet_diag.h | 9 +
include/uapi/linux/io_uring.h | 10 +-
include/uapi/linux/ipmi_bmc.h | 2 +-
include/uapi/linux/isdn/capicmd.h | 1 +
include/uapi/linux/isst_if.h | 2 +-
include/uapi/linux/jffs2.h | 5 -
include/uapi/linux/kexec.h | 1 +
include/uapi/linux/kfd_ioctl.h | 20 +-
include/uapi/linux/kvm.h | 9 +-
include/uapi/linux/magic.h | 1 +
include/uapi/linux/mdio.h | 10 +
include/uapi/linux/media-bus-format.h | 3 +-
include/uapi/linux/net_dropmon.h | 66 +
include/uapi/linux/netfilter/nf_synproxy.h | 2 +-
include/uapi/linux/netfilter/nf_tables.h | 10 +-
include/uapi/linux/netfilter/nfnetlink_log.h | 11 +
include/uapi/linux/netfilter/xt_connlabel.h | 6 +
include/uapi/linux/netfilter/xt_nfacct.h | 5 +
include/uapi/linux/netfilter/xt_policy.h | 1 +
include/uapi/linux/netfilter_bridge/ebtables.h | 6 +-
include/uapi/linux/netfilter_ipv4/ipt_LOG.h | 2 -
include/uapi/linux/netfilter_ipv6/ip6t_LOG.h | 2 -
include/uapi/linux/nfsd/cld.h | 41 +-
include/uapi/linux/nl80211.h | 65 +-
include/uapi/linux/openvswitch.h | 3 +
include/uapi/linux/pci_regs.h | 15 +-
include/uapi/linux/perf_event.h | 3 +-
include/uapi/linux/pkt_cls.h | 2 +
include/uapi/linux/pkt_sched.h | 3 +-
include/uapi/linux/ppdev.h | 5 +-
include/uapi/linux/prctl.h | 7 +-
include/uapi/linux/psp-sev.h | 2 +-
include/uapi/linux/ptp_clock.h | 48 +-
include/uapi/linux/raid/md_p.h | 2 +
include/uapi/linux/rds.h | 2 +
include/uapi/linux/rxrpc.h | 2 +-
include/uapi/linux/sctp.h | 3 +
include/uapi/linux/serial_core.h | 12 +-
include/uapi/linux/serio.h | 1 +
include/uapi/linux/socket.h | 19 +-
include/uapi/linux/tcp.h | 6 +
include/uapi/linux/tls.h | 15 +
include/uapi/linux/usb/ch9.h | 2 +
include/uapi/linux/usb/g_uvc.h | 2 +-
include/uapi/linux/usbdevice_fs.h | 4 +
include/uapi/linux/vbox_vmmdev_types.h | 2 +-
include/uapi/linux/vboxguest.h | 2 +-
include/uapi/linux/vfio.h | 71 +-
include/uapi/linux/videodev2.h | 14 +-
include/uapi/linux/virtio_fs.h | 19 +
include/uapi/linux/virtio_ids.h | 1 +
include/uapi/linux/virtio_iommu.h | 32 +-
include/uapi/linux/virtio_pmem.h | 2 +-
include/uapi/linux/vmcore.h | 2 +-
include/uapi/linux/wait.h | 1 +
include/uapi/linux/wmi.h | 2 +-
include/uapi/misc/fastrpc.h | 2 +-
include/uapi/misc/habanalabs.h | 102 +-
include/uapi/misc/xilinx_sdfec.h | 448 +
include/uapi/rdma/mlx5_user_ioctl_verbs.h | 1 +
include/uapi/rdma/rvt-abi.h | 2 +-
include/uapi/rdma/siw-abi.h | 5 +-
include/uapi/scsi/scsi_bsg_fc.h | 54 +-
include/uapi/scsi/scsi_bsg_ufs.h | 2 +-
include/uapi/scsi/scsi_netlink.h | 20 +-
include/uapi/scsi/scsi_netlink_fc.h | 17 +-
include/uapi/sound/skl-tplg-interface.h | 2 +-
include/uapi/sound/sof/abi.h | 2 +-
include/uapi/sound/sof/tokens.h | 11 +-
include/video/da8xx-fb.h | 1 -
include/xen/arm/hypervisor.h | 2 -
include/xen/arm/page-coherent.h | 24 +-
include/xen/swiotlb-xen.h | 5 +
include/xen/xen-ops.h | 3 +
init/Kconfig | 99 +-
init/Makefile | 5 +-
init/do_mounts.c | 11 +-
init/init_task.c | 4 +-
init/main.c | 9 +-
ipc/mqueue.c | 25 +-
ipc/sem.c | 3 +-
ipc/util.h | 25 +-
kernel/Kconfig.preempt | 8 +-
kernel/Makefile | 5 +-
kernel/bpf/Makefile | 3 +
kernel/bpf/btf.c | 23 +-
kernel/bpf/cgroup.c | 27 +-
kernel/bpf/core.c | 8 +-
kernel/bpf/devmap.c | 339 +-
kernel/bpf/inode.c | 92 +-
kernel/bpf/syscall.c | 51 +-
kernel/bpf/sysfs_btf.c | 46 +
kernel/bpf/verifier.c | 43 +-
kernel/bpf/xskmap.c | 133 +-
kernel/cgroup/cgroup-v1.c | 27 +-
kernel/cgroup/cgroup.c | 16 +-
kernel/cgroup/cpuset.c | 163 +-
kernel/configs.c | 16 +-
kernel/cpu.c | 46 +-
kernel/cred.c | 21 +-
kernel/debug/debug_core.c | 36 +-
kernel/debug/kdb/kdb_main.c | 2 +-
kernel/dma/Kconfig | 12 +-
kernel/dma/coherent.c | 13 -
kernel/dma/contiguous.c | 16 +-
kernel/dma/direct.c | 22 +-
kernel/dma/mapping.c | 139 +-
kernel/dma/remap.c | 53 +-
kernel/dma/swiotlb.c | 37 +-
kernel/elfcore.c | 1 +
kernel/events/core.c | 125 +-
kernel/events/hw_breakpoint.c | 4 +-
kernel/events/uprobes.c | 81 +-
kernel/exit.c | 118 +-
kernel/extable.c | 11 +-
kernel/fork.c | 81 +-
kernel/futex.c | 12 +-
kernel/gcov/Kconfig | 2 +-
kernel/irq/affinity.c | 237 +-
kernel/irq/irqdesc.c | 15 +-
kernel/irq/irqdomain.c | 10 +-
kernel/irq/manage.c | 5 +-
kernel/irq/pm.c | 20 +
kernel/irq/proc.c | 14 -
kernel/irq/resend.c | 2 +
kernel/jump_label.c | 4 +-
kernel/kallsyms.c | 6 +-
kernel/kexec.c | 8 +
kernel/kexec_core.c | 2 +
kernel/kexec_elf.c | 430 +
kernel/kexec_file.c | 68 +-
kernel/kprobes.c | 69 +-
kernel/livepatch/core.c | 1 +
kernel/locking/lockdep.c | 174 +-
kernel/locking/lockdep_internals.h | 9 +-
kernel/locking/lockdep_proc.c | 11 +-
kernel/locking/mutex.c | 37 +-
kernel/locking/qspinlock_paravirt.h | 2 +-
kernel/locking/rtmutex.c | 6 +-
kernel/locking/rwsem.c | 82 +-
kernel/memremap.c | 405 -
kernel/module.c | 118 +-
kernel/module_signature.c | 46 +
kernel/module_signing.c | 56 +-
kernel/padata.c | 307 +-
kernel/panic.c | 42 +-
kernel/params.c | 21 +-
kernel/power/autosleep.c | 2 +-
kernel/power/hibernate.c | 3 +-
kernel/power/main.c | 99 +-
kernel/power/qos.c | 48 -
kernel/power/suspend.c | 65 +-
kernel/power/wakelock.c | 32 +-
kernel/printk/braille.c | 15 +-
kernel/printk/printk.c | 24 +-
kernel/rcu/Kconfig | 8 +-
kernel/rcu/Kconfig.debug | 11 +
kernel/rcu/rcu.h | 1 +
kernel/rcu/rcu_segcblist.c | 174 +-
kernel/rcu/rcu_segcblist.h | 54 +-
kernel/rcu/rcuperf.c | 10 +-
kernel/rcu/rcutorture.c | 30 +-
kernel/rcu/srcutree.c | 5 +-
kernel/rcu/tree.c | 217 +-
kernel/rcu/tree.h | 81 +-
kernel/rcu/tree_exp.h | 8 +-
kernel/rcu/tree_plugin.h | 1195 +-
kernel/rcu/tree_stall.h | 15 +-
kernel/rcu/update.c | 105 +-
kernel/resource.c | 49 +-
kernel/sched/core.c | 750 +-
kernel/sched/cpufreq_schedutil.c | 27 +-
kernel/sched/deadline.c | 150 +-
kernel/sched/fair.c | 595 +-
kernel/sched/idle.c | 44 +-
kernel/sched/isolation.c | 12 +-
kernel/sched/membarrier.c | 239 +-
kernel/sched/psi.c | 14 +-
kernel/sched/rt.c | 87 +-
kernel/sched/sched.h | 97 +-
kernel/sched/stats.h | 7 +-
kernel/sched/stop_task.c | 22 +-
kernel/sched/topology.c | 53 +-
kernel/signal.c | 15 +-
kernel/stacktrace.c | 4 +-
kernel/stop_machine.c | 2 +
kernel/sys.c | 48 +-
kernel/sysctl.c | 6 +-
kernel/time/alarmtimer.c | 22 +-
kernel/time/hrtimer.c | 235 +-
kernel/time/itimer.c | 12 +-
kernel/time/posix-cpu-timers.c | 1010 +-
kernel/time/posix-timers.c | 61 +-
kernel/time/posix-timers.h | 1 +
kernel/time/tick-broadcast-hrtimer.c | 13 +-
kernel/time/tick-sched.c | 17 +-
kernel/time/timekeeping.c | 5 +
kernel/time/timer.c | 113 +-
kernel/time/vsyscall.c | 22 +-
kernel/torture.c | 2 -
kernel/trace/Kconfig | 9 +-
kernel/trace/bpf_trace.c | 36 +-
kernel/trace/fgraph.c | 4 +-
kernel/trace/ftrace.c | 25 +-
kernel/trace/ftrace_internal.h | 8 +-
kernel/trace/ring_buffer_benchmark.c | 2 +-
kernel/trace/trace.c | 44 +-
kernel/trace/trace.h | 11 +-
kernel/trace/trace_dynevent.c | 10 +-
kernel/trace/trace_dynevent.h | 7 +-
kernel/trace/trace_events.c | 6 +-
kernel/trace/trace_events_filter.c | 6 +-
kernel/trace/trace_events_hist.c | 25 +-
kernel/trace/trace_functions_graph.c | 17 +-
kernel/trace/trace_kprobe.c | 274 +-
kernel/trace/trace_output.c | 6 +-
kernel/trace/trace_probe.c | 193 +-
kernel/trace/trace_probe.h | 68 +-
kernel/trace/trace_sched_wakeup.c | 3 +-
kernel/trace/trace_stack.c | 112 +
kernel/trace/trace_uprobe.c | 300 +-
kernel/watchdog.c | 4 +-
kernel/workqueue.c | 25 +-
lib/Kconfig | 11 +-
lib/Kconfig.debug | 35 +-
lib/Kconfig.kasan | 19 +-
lib/Makefile | 7 +-
lib/bitmap.c | 20 +
lib/bug.c | 11 +-
lib/crypto/Makefile | 9 +
lib/crypto/aes.c | 356 +
lib/crypto/des.c | 902 +
lib/crypto/sha256.c | 287 +
lib/dim/dim.c | 4 +-
lib/dim/net_dim.c | 56 +
lib/extable.c | 1 +
lib/generic-radix-tree.c | 4 +-
lib/hexdump.c | 21 -
lib/iov_iter.c | 2 +-
lib/kfifo.c | 3 +-
lib/logic_pio.c | 73 +-
lib/lz4/lz4hc_compress.c | 1 -
lib/lzo/lzo1x_compress.c | 14 +-
lib/mpi/longlong.h | 36 +-
lib/raid6/Makefile | 2 +-
lib/rbtree_test.c | 37 +-
lib/sg_split.c | 12 +-
lib/sha256.c | 279 -
lib/show_mem.c | 5 -
lib/sort.c | 34 +-
lib/stackdepot.c | 4 +-
lib/string.c | 12 +-
lib/strncpy_from_user.c | 3 +-
lib/strnlen_user.c | 3 +-
lib/test_bpf.c | 2 +-
lib/test_firmware.c | 55 +-
lib/test_kasan.c | 41 +
lib/test_meminit.c | 2 +-
lib/test_printf.c | 5 +
lib/timerqueue.c | 30 +-
lib/vdso/gettimeofday.c | 79 +-
lib/vsprintf.c | 13 +-
lib/zstd/mem.h | 2 +-
mm/Kconfig | 36 +-
mm/Kconfig.debug | 4 +-
mm/Makefile | 5 +-
mm/backing-dev.c | 120 +-
mm/balloon_compaction.c | 72 +-
mm/compaction.c | 61 +-
mm/fadvise.c | 4 +-
mm/filemap.c | 171 +-
mm/frame_vector.c | 2 +
mm/gup.c | 129 +-
mm/hmm.c | 496 +-
mm/huge_memory.c | 127 +-
mm/hugetlb.c | 108 +-
mm/hugetlb_cgroup.c | 2 +-
mm/init-mm.c | 2 +-
mm/internal.h | 2 +-
mm/kasan/common.c | 42 +-
mm/kasan/kasan.h | 14 +-
mm/kasan/report.c | 44 +-
mm/kasan/tags_report.c | 24 +
mm/khugepaged.c | 368 +-
mm/kmemleak.c | 328 +-
mm/ksm.c | 18 -
mm/madvise.c | 382 +-
mm/memcontrol.c | 508 +-
mm/memfd.c | 2 +
mm/memory.c | 17 +-
mm/memory_hotplug.c | 105 +-
mm/mempolicy.c | 135 +-
mm/memremap.c | 456 +
mm/migrate.c | 300 +-
mm/mincore.c | 19 +-
mm/mlock.c | 4 +
mm/mmap.c | 54 +-
mm/mmu_gather.c | 2 -
mm/mmu_notifier.c | 263 +-
mm/mprotect.c | 28 +-
mm/mremap.c | 3 +
mm/msync.c | 2 +
mm/nommu.c | 2 +-
mm/oom_kill.c | 26 +-
mm/page-writeback.c | 4 +
mm/page_alloc.c | 72 +-
mm/page_owner.c | 123 +-
mm/page_poison.c | 2 +-
mm/page_vma_mapped.c | 3 +-
mm/pagewalk.c | 126 +-
mm/percpu.c | 23 +-
mm/quicklist.c | 103 -
mm/rmap.c | 33 +-
mm/shmem.c | 397 +-
mm/slab.h | 64 +
mm/slab_common.c | 37 +
mm/slob.c | 2 +-
mm/slub.c | 30 +-
mm/sparse.c | 25 +-
mm/swap.c | 58 +-
mm/swap_state.c | 6 +-
mm/swapfile.c | 41 +-
mm/usercopy.c | 10 +-
mm/util.c | 122 +-
mm/vmalloc.c | 115 +-
mm/vmscan.c | 238 +-
mm/vmstat.c | 2 +
mm/workingset.c | 10 +-
mm/z3fold.c | 78 +-
mm/zpool.c | 16 +
mm/zsmalloc.c | 103 +-
mm/zswap.c | 15 +-
net/9p/client.c | 1 +
net/9p/trans_rdma.c | 6 +-
net/Kconfig | 1 +
net/appletalk/ddp.c | 9 +-
net/atm/mpoa_caches.c | 6 +-
net/atm/pppoatm.c | 4 +-
net/ax25/af_ax25.c | 2 +
net/batman-adv/Kconfig | 10 +-
net/batman-adv/bat_iv_ogm.c | 20 +-
net/batman-adv/bat_v.c | 7 +
net/batman-adv/bat_v_ogm.c | 197 +-
net/batman-adv/bat_v_ogm.h | 3 +
net/batman-adv/main.h | 2 +-
net/batman-adv/multicast.c | 8 +-
net/batman-adv/netlink.c | 2 +-
net/batman-adv/soft-interface.c | 8 +-
net/batman-adv/sysfs.c | 2 +-
net/batman-adv/types.h | 12 +
net/bluetooth/6lowpan.c | 2 +-
net/bluetooth/Kconfig | 3 +-
net/bluetooth/hci_core.c | 1 +
net/bluetooth/hci_debugfs.c | 31 +
net/bluetooth/hci_event.c | 5 -
net/bluetooth/hci_request.c | 29 +-
net/bluetooth/hidp/core.c | 13 +-
net/bluetooth/l2cap_core.c | 11 +-
net/bluetooth/mgmt.c | 8 +-
net/bluetooth/smp.c | 103 +-
net/bpf/test_run.c | 39 +-
net/bridge/br.c | 5 +-
net/bridge/br_mdb.c | 179 +-
net/bridge/br_multicast.c | 35 +-
net/bridge/br_netfilter_hooks.c | 4 +
net/bridge/br_private.h | 12 +-
net/bridge/br_vlan.c | 31 +-
net/bridge/netfilter/Kconfig | 6 +-
net/bridge/netfilter/ebt_802_3.c | 8 +-
net/bridge/netfilter/ebtables.c | 40 +-
net/bridge/netfilter/nf_conntrack_bridge.c | 15 +-
net/bridge/netfilter/nft_meta_bridge.c | 12 +-
net/can/Kconfig | 13 +-
net/can/Makefile | 2 +
net/can/af_can.c | 379 +-
net/can/af_can.h | 25 +-
net/can/bcm.c | 170 +-
net/can/gw.c | 559 +-
net/can/j1939/Kconfig | 15 +
net/can/j1939/Makefile | 10 +
net/can/j1939/address-claim.c | 230 +
net/can/j1939/bus.c | 333 +
net/can/j1939/j1939-priv.h | 338 +
net/can/j1939/main.c | 403 +
net/can/j1939/socket.c | 1160 +
net/can/j1939/transport.c | 2027 +
net/can/proc.c | 164 +-
net/can/raw.c | 44 +-
net/ceph/ceph_common.c | 37 +-
net/ceph/crypto.c | 6 +-
net/ceph/messenger.c | 6 +
net/ceph/mon_client.c | 7 +
net/ceph/osd_client.c | 74 +-
net/ceph/osdmap.c | 69 +-
net/core/bpf_sk_storage.c | 104 +-
net/core/datagram.c | 6 +-
net/core/dev.c | 100 +-
net/core/devlink.c | 1611 +-
net/core/drop_monitor.c | 1345 +-
net/core/dst.c | 4 +-
net/core/ethtool.c | 6 +
net/core/fib_notifier.c | 29 +-
net/core/filter.c | 102 +-
net/core/flow_dissector.c | 23 +-
net/core/flow_offload.c | 263 +-
net/core/neighbour.c | 2 +-
net/core/netpoll.c | 6 +-
net/core/page_pool.c | 41 +-
net/core/pktgen.c | 8 +-
net/core/skbuff.c | 105 +-
net/core/skmsg.c | 7 +-
net/core/sock.c | 59 +-
net/core/sock_diag.c | 3 +-
net/core/sock_map.c | 22 +-
net/core/sock_reuseport.c | 15 +-
net/core/stream.c | 16 +-
net/core/sysctl_net_core.c | 8 +
net/core/tso.c | 8 +-
net/dccp/ipv6.c | 5 +-
net/dsa/Kconfig | 16 +-
net/dsa/Makefile | 2 +-
net/dsa/dsa2.c | 127 +-
net/dsa/master.c | 66 +
net/dsa/port.c | 19 +-
net/dsa/slave.c | 108 +-
net/dsa/switch.c | 132 +-
net/dsa/tag_8021q.c | 104 +-
net/dsa/tag_ksz.c | 62 +
net/dsa/tag_sja1105.c | 15 +-
net/ieee802154/6lowpan/reassembly.c | 2 +-
net/ieee802154/core.c | 7 +-
net/ieee802154/socket.c | 5 +-
net/ife/Kconfig | 2 +-
net/ipv4/Kconfig | 4 +-
net/ipv4/af_inet.c | 5 -
net/ipv4/datagram.c | 2 +
net/ipv4/fib_frontend.c | 3 +-
net/ipv4/fib_semantics.c | 15 +-
net/ipv4/fib_trie.c | 2 +-
net/ipv4/icmp.c | 10 +-
net/ipv4/igmp.c | 4 +-
net/ipv4/inet_connection_sock.c | 4 +-
net/ipv4/inet_fragment.c | 41 +-
net/ipv4/ip_forward.c | 2 +-
net/ipv4/ip_fragment.c | 8 +-
net/ipv4/ip_output.c | 6 +-
net/ipv4/ipip.c | 3 +
net/ipv4/ipmr.c | 4 +-
net/ipv4/netfilter/Kconfig | 8 +-
net/ipv4/netfilter/Makefile | 2 +-
net/ipv4/netfilter/ipt_CLUSTERIP.c | 4 +-
net/ipv4/netfilter/ipt_SYNPROXY.c | 2 +
net/ipv4/netfilter/ipt_rpfilter.c | 1 +
net/ipv4/netfilter/nf_nat_h323.c | 12 +-
net/ipv4/nexthop.c | 2 +-
net/ipv4/ping.c | 2 +-
net/ipv4/raw.c | 4 +-
net/ipv4/route.c | 53 +-
net/ipv4/sysctl_net_ipv4.c | 9 +
net/ipv4/tcp.c | 65 +-
net/ipv4/tcp_bbr.c | 14 +-
net/ipv4/tcp_bpf.c | 6 +-
net/ipv4/tcp_diag.c | 52 +-
net/ipv4/tcp_input.c | 84 +-
net/ipv4/tcp_ipv4.c | 20 +
net/ipv4/tcp_minisocks.c | 1 +
net/ipv4/tcp_output.c | 36 +-
net/ipv4/tcp_timer.c | 7 +-
net/ipv4/tcp_ulp.c | 13 +
net/ipv4/udp.c | 7 +-
net/ipv4/xfrm4_policy.c | 1 +
net/ipv6/addrconf.c | 19 +-
net/ipv6/datagram.c | 2 +
net/ipv6/exthdrs_core.c | 4 +-
net/ipv6/fib6_rules.c | 3 +-
net/ipv6/inet6_connection_sock.c | 2 +-
net/ipv6/ip6_fib.c | 2 +-
net/ipv6/ip6_gre.c | 5 +-
net/ipv6/ip6_input.c | 4 +-
net/ipv6/ip6_output.c | 7 +-
net/ipv6/ip6_tunnel.c | 6 +-
net/ipv6/ip6mr.c | 4 +-
net/ipv6/mcast.c | 5 +-
net/ipv6/ndisc.c | 1 +
net/ipv6/netfilter.c | 4 +-
net/ipv6/netfilter/Kconfig | 16 +-
net/ipv6/netfilter/ip6t_SYNPROXY.c | 2 +
net/ipv6/netfilter/ip6t_ipv6header.c | 4 +-
net/ipv6/netfilter/ip6t_rpfilter.c | 8 +-
net/ipv6/netfilter/nf_conntrack_reasm.c | 2 +-
net/ipv6/netfilter/nf_log_ipv6.c | 4 +-
net/ipv6/netfilter/nf_socket_ipv6.c | 1 -
net/ipv6/ping.c | 2 +-
net/ipv6/raw.c | 4 +-
net/ipv6/reassembly.c | 2 +-
net/ipv6/route.c | 39 +-
net/ipv6/tcp_ipv6.c | 39 +-
net/ipv6/udp.c | 8 +-
net/iucv/af_iucv.c | 14 +-
net/kcm/kcmsock.c | 16 +-
net/l2tp/l2tp_ppp.c | 3 +
net/mac80211/agg-rx.c | 72 +-
net/mac80211/cfg.c | 38 +-
net/mac80211/debugfs.c | 3 +-
net/mac80211/driver-ops.c | 13 +-
net/mac80211/driver-ops.h | 8 +-
net/mac80211/he.c | 40 +
net/mac80211/ht.c | 2 +-
net/mac80211/ibss.c | 8 +
net/mac80211/ieee80211_i.h | 20 +-
net/mac80211/iface.c | 3 +-
net/mac80211/key.c | 64 +-
net/mac80211/key.h | 4 +-
net/mac80211/main.c | 19 +-
net/mac80211/mesh.c | 62 +
net/mac80211/mesh.h | 4 +
net/mac80211/mesh_plink.c | 12 +-
net/mac80211/mlme.c | 32 +-
net/mac80211/offchannel.c | 5 +-
net/mac80211/rate.h | 9 -
net/mac80211/rc80211_minstrel.h | 1 +
net/mac80211/rc80211_minstrel_ht.c | 277 +-
net/mac80211/rc80211_minstrel_ht.h | 12 +
net/mac80211/rx.c | 6 +-
net/mac80211/sta_info.c | 8 +-
net/mac80211/sta_info.h | 2 +
net/mac80211/status.c | 195 +-
net/mac80211/trace.h | 7 +-
net/mac80211/tx.c | 6 +-
net/mac80211/util.c | 78 +-
net/mac80211/vht.c | 10 +-
net/mac80211/wpa.c | 6 +-
net/mpls/mpls_iptunnel.c | 8 +-
net/ncsi/internal.h | 7 +-
net/ncsi/ncsi-cmd.c | 13 +-
net/ncsi/ncsi-manage.c | 98 +-
net/ncsi/ncsi-pkt.h | 5 +
net/ncsi/ncsi-rsp.c | 26 +-
net/netfilter/Kconfig | 16 +-
net/netfilter/Makefile | 2 +-
net/netfilter/ipset/ip_set_bitmap_ipmac.c | 2 +-
net/netfilter/ipset/ip_set_core.c | 2 +-
net/netfilter/ipset/ip_set_hash_gen.h | 4 +-
net/netfilter/ipset/ip_set_hash_ipmac.c | 6 +-
net/netfilter/ipset/ip_set_list_set.c | 2 +-
net/netfilter/ipvs/Kconfig | 6 +-
net/netfilter/ipvs/ip_vs_core.c | 2 +-
net/netfilter/ipvs/ip_vs_ctl.c | 73 +-
net/netfilter/ipvs/ip_vs_lblcr.c | 4 +-
net/netfilter/ipvs/ip_vs_mh.c | 4 +-
net/netfilter/ipvs/ip_vs_nfct.c | 2 +-
net/netfilter/ipvs/ip_vs_proto_tcp.c | 2 +-
net/netfilter/nf_conntrack_amanda.c | 2 +-
net/netfilter/nf_conntrack_broadcast.c | 2 +-
net/netfilter/nf_conntrack_core.c | 23 +-
net/netfilter/nf_conntrack_ecache.c | 1 +
net/netfilter/nf_conntrack_expect.c | 28 +-
net/netfilter/nf_conntrack_ftp.c | 6 +-
net/netfilter/nf_conntrack_h323_asn1.c | 5 +-
net/netfilter/nf_conntrack_h323_main.c | 18 +-
net/netfilter/nf_conntrack_helper.c | 5 +-
net/netfilter/nf_conntrack_irc.c | 2 +-
net/netfilter/nf_conntrack_labels.c | 3 +-
net/netfilter/nf_conntrack_netlink.c | 11 +-
net/netfilter/nf_conntrack_pptp.c | 4 +-
net/netfilter/nf_conntrack_proto_gre.c | 2 -
net/netfilter/nf_conntrack_proto_icmp.c | 2 +-
net/netfilter/nf_conntrack_proto_icmpv6.c | 1 -
net/netfilter/nf_conntrack_proto_tcp.c | 10 +-
net/netfilter/nf_conntrack_sane.c | 2 +-
net/netfilter/nf_conntrack_sip.c | 10 +-
net/netfilter/nf_conntrack_standalone.c | 40 +-
net/netfilter/nf_conntrack_tftp.c | 2 +-
net/netfilter/nf_conntrack_timeout.c | 1 +
net/netfilter/nf_dup_netdev.c | 21 +
net/netfilter/nf_flow_table_core.c | 46 +-
net/netfilter/nf_flow_table_ip.c | 44 +
net/netfilter/nf_nat_amanda.c | 2 +-
net/netfilter/nf_nat_core.c | 8 +-
net/netfilter/nf_nat_ftp.c | 2 +-
net/netfilter/nf_nat_irc.c | 2 +-
net/netfilter/nf_nat_proto.c | 4 +-
net/netfilter/nf_nat_sip.c | 8 +-
net/netfilter/nf_nat_tftp.c | 2 +-
net/netfilter/nf_synproxy_core.c | 16 +-
net/netfilter/nf_tables_api.c | 141 +-
net/netfilter/nf_tables_offload.c | 316 +-
net/netfilter/nfnetlink.c | 2 +-
net/netfilter/nfnetlink_log.c | 61 +-
net/netfilter/nfnetlink_queue.c | 4 +-
net/netfilter/nft_bitwise.c | 19 +
net/netfilter/nft_byteorder.c | 9 +-
net/netfilter/nft_chain_filter.c | 2 +-
net/netfilter/nft_chain_nat.c | 3 +
net/netfilter/nft_ct.c | 2 +-
net/netfilter/nft_dup_netdev.c | 12 +
net/netfilter/nft_dynset.c | 6 +
net/netfilter/nft_fib_netdev.c | 3 +
net/netfilter/nft_flow_offload.c | 37 +-
net/netfilter/nft_fwd_netdev.c | 12 +
net/netfilter/nft_hash.c | 2 +-
net/netfilter/nft_immediate.c | 24 +-
net/netfilter/nft_lookup.c | 3 -
net/netfilter/nft_meta.c | 64 +-
net/netfilter/nft_quota.c | 29 +-
net/netfilter/nft_redir.c | 2 +-
net/netfilter/nft_set_bitmap.c | 2 +-
net/netfilter/nft_set_hash.c | 21 +-
net/netfilter/nft_set_rbtree.c | 2 +-
net/netfilter/nft_socket.c | 6 +-
net/netfilter/nft_synproxy.c | 145 +-
net/netfilter/xt_IDLETIMER.c | 2 +-
net/netfilter/xt_connlimit.c | 2 +
net/netfilter/xt_hashlimit.c | 7 +-
net/netfilter/xt_nfacct.c | 36 +-
net/netfilter/xt_physdev.c | 11 +-
net/netfilter/xt_set.c | 1 -
net/netlabel/netlabel_kapi.c | 2 +-
net/netrom/af_netrom.c | 1 +
net/nfc/llcp_sock.c | 7 +-
net/nfc/netlink.c | 6 +-
net/openvswitch/conntrack.c | 20 +-
net/openvswitch/datapath.c | 62 +-
net/openvswitch/datapath.h | 2 +
net/openvswitch/flow.c | 181 +-
net/openvswitch/flow.h | 5 +-
net/openvswitch/flow_table.c | 8 +-
net/packet/af_packet.c | 7 +
net/psample/psample.c | 22 +-
net/qrtr/qrtr.c | 1 +
net/qrtr/tun.c | 5 +-
net/rds/Kconfig | 4 +-
net/rds/af_rds.c | 99 +-
net/rds/bind.c | 49 +-
net/rds/ib.c | 16 +-
net/rds/ib.h | 1 +
net/rds/ib_cm.c | 3 +
net/rds/ib_recv.c | 23 +-
net/rds/ib_stats.c | 2 +-
net/rds/rdma_transport.c | 15 +-
net/rds/rds.h | 11 +-
net/rds/recv.c | 27 +-
net/rds/send.c | 16 +-
net/rds/stats.c | 3 +
net/rxrpc/af_rxrpc.c | 9 +-
net/rxrpc/ar-internal.h | 30 +-
net/rxrpc/call_event.c | 23 +-
net/rxrpc/call_object.c | 35 +-
net/rxrpc/conn_client.c | 44 +
net/rxrpc/conn_event.c | 6 +-
net/rxrpc/conn_object.c | 2 +-
net/rxrpc/input.c | 359 +-
net/rxrpc/insecure.c | 5 +
net/rxrpc/local_event.c | 4 +-
net/rxrpc/local_object.c | 104 +-
net/rxrpc/output.c | 9 +-
net/rxrpc/peer_event.c | 12 +-
net/rxrpc/peer_object.c | 18 +
net/rxrpc/protocol.h | 9 +
net/rxrpc/recvmsg.c | 53 +-
net/rxrpc/rxkad.c | 135 +-
net/rxrpc/sendmsg.c | 14 +-
net/rxrpc/skbuff.c | 40 +-
net/sched/Kconfig | 156 +-
net/sched/act_api.c | 34 +-
net/sched/act_bpf.c | 11 +-
net/sched/act_connmark.c | 11 +-
net/sched/act_csum.c | 11 +-
net/sched/act_ct.c | 13 +-
net/sched/act_ctinfo.c | 11 +-
net/sched/act_gact.c | 10 +-
net/sched/act_ife.c | 15 +-
net/sched/act_ipt.c | 11 +-
net/sched/act_mirred.c | 36 +-
net/sched/act_mpls.c | 10 +-
net/sched/act_nat.c | 11 +-
net/sched/act_pedit.c | 12 +-
net/sched/act_police.c | 37 +-
net/sched/act_sample.c | 46 +-
net/sched/act_simple.c | 12 +-
net/sched/act_skbedit.c | 25 +-
net/sched/act_skbmod.c | 13 +-
net/sched/act_tunnel_key.c | 10 +-
net/sched/act_vlan.c | 41 +-
net/sched/cls_api.c | 684 +-
net/sched/cls_bpf.c | 40 +-
net/sched/cls_flower.c | 126 +-
net/sched/cls_matchall.c | 35 +-
net/sched/cls_u32.c | 35 +-
net/sched/sch_api.c | 5 +-
net/sched/sch_cbs.c | 51 +-
net/sched/sch_codel.c | 6 +-
net/sched/sch_fq_codel.c | 14 +-
net/sched/sch_generic.c | 31 +-
net/sched/sch_hhf.c | 2 +-
net/sched/sch_htb.c | 4 +-
net/sched/sch_multiq.c | 23 +-
net/sched/sch_netem.c | 4 +-
net/sched/sch_sfb.c | 7 +-
net/sched/sch_taprio.c | 447 +-
net/sctp/associola.c | 9 -
net/sctp/auth.c | 101 +-
net/sctp/endpointola.c | 65 +-
net/sctp/ipv6.c | 2 +-
net/sctp/protocol.c | 5 +-
net/sctp/sm_make_chunk.c | 34 +-
net/sctp/sm_sideeffect.c | 4 +-
net/sctp/sm_statefuns.c | 6 +-
net/sctp/sm_statetable.c | 28 +-
net/sctp/socket.c | 707 +-
net/sctp/stream.c | 1 +
net/sctp/sysctl.c | 7 +
net/sctp/transport.c | 2 +-
net/smc/af_smc.c | 15 +-
net/smc/smc_tx.c | 6 +-
net/sunrpc/auth_gss/auth_gss.c | 2 +-
net/sunrpc/auth_gss/gss_krb5_keys.c | 9 +-
net/sunrpc/cache.c | 15 +-
net/sunrpc/clnt.c | 73 +-
net/sunrpc/rpc_pipe.c | 3 +-
net/sunrpc/sched.c | 32 +-
net/sunrpc/svc.c | 4 +-
net/sunrpc/xdr.c | 65 +-
net/sunrpc/xprt.c | 68 +-
net/sunrpc/xprtrdma/backchannel.c | 4 +-
net/sunrpc/xprtrdma/frwr_ops.c | 166 +-
net/sunrpc/xprtrdma/rpc_rdma.c | 71 +-
net/sunrpc/xprtrdma/svc_rdma.c | 7 -
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 24 +-
net/sunrpc/xprtrdma/svc_rdma_transport.c | 14 +-
net/sunrpc/xprtrdma/transport.c | 15 +-
net/sunrpc/xprtrdma/verbs.c | 276 +-
net/sunrpc/xprtrdma/xprt_rdma.h | 59 +-
net/sunrpc/xprtsock.c | 8 +-
net/tipc/addr.c | 1 +
net/tipc/bcast.c | 14 +-
net/tipc/bearer.c | 64 +
net/tipc/bearer.h | 10 +
net/tipc/core.c | 5 +
net/tipc/core.h | 3 +
net/tipc/group.c | 4 +-
net/tipc/link.c | 252 +-
net/tipc/msg.c | 59 +
net/tipc/msg.h | 36 +-
net/tipc/name_distr.c | 5 +-
net/tipc/netlink_compat.c | 11 +-
net/tipc/node.c | 14 +-
net/tipc/node.h | 6 +-
net/tipc/socket.c | 17 +-
net/tipc/topsrv.c | 4 +-
net/tls/tls_device.c | 237 +-
net/tls/tls_device_fallback.c | 2 +-
net/tls/tls_main.c | 217 +-
net/tls/tls_sw.c | 89 +-
net/vmw_vsock/hyperv_transport.c | 32 +-
net/vmw_vsock/virtio_transport.c | 1 +
net/vmw_vsock/virtio_transport_common.c | 104 +-
net/wimax/debugfs.c | 42 +-
net/wimax/stack.c | 11 +-
net/wimax/wimax-internal.h | 7 +-
net/wireless/Kconfig | 2 +
net/wireless/chan.c | 162 +-
net/wireless/core.c | 36 +-
net/wireless/core.h | 4 +-
net/wireless/ibss.c | 16 +-
net/wireless/lib80211_crypt_ccmp.c | 197 +-
net/wireless/nl80211.c | 242 +-
net/wireless/reg.c | 23 +-
net/wireless/scan.c | 269 +-
net/wireless/trace.h | 3 +-
net/wireless/util.c | 107 +-
net/wireless/wext-compat.c | 5 +-
net/xdp/xdp_umem.c | 80 +-
net/xdp/xsk.c | 351 +-
net/xdp/xsk.h | 13 +
net/xdp/xsk_diag.c | 5 +-
net/xdp/xsk_queue.h | 71 +-
net/xfrm/xfrm_interface.c | 56 +-
net/xfrm/xfrm_ipcomp.c | 2 +-
net/xfrm/xfrm_policy.c | 10 +-
samples/auxdisplay/cfag12864b-example.c | 2 +-
samples/bpf/syscall_nrs.c | 6 +
samples/bpf/trace_output_user.c | 43 +-
samples/bpf/tracex5_kern.c | 13 +
samples/bpf/xdp_fwd_kern.c | 39 +-
samples/bpf/xdp_fwd_user.c | 35 +-
samples/bpf/xdp_sample_pkts_user.c | 61 +-
samples/bpf/xdpsock_user.c | 243 +-
samples/rpmsg/rpmsg_client_sample.c | 10 +-
samples/vfio-mdev/mdpy-defs.h | 2 +-
samples/vfio-mdev/mtty.c | 39 +-
scripts/Kbuild.include | 3 -
scripts/Kconfig.include | 5 +-
scripts/Makefile | 4 +-
scripts/Makefile.build | 82 +-
scripts/Makefile.clean | 31 +-
scripts/Makefile.extrawarn | 121 +-
scripts/Makefile.host | 39 +-
scripts/Makefile.kasan | 11 +-
scripts/Makefile.lib | 65 +-
scripts/Makefile.modfinal | 60 +
scripts/Makefile.modpost | 133 +-
scripts/Makefile.package | 159 +
scripts/basic/Makefile | 14 +-
scripts/checkpatch.pl | 69 +-
scripts/coccinelle/api/atomic_as_refcounter.cocci | 1 +
scripts/coccinelle/api/platform_get_irq.cocci | 102 +
scripts/coccinelle/misc/add_namespace.cocci | 23 +
scripts/export_report.pl | 2 +-
scripts/gcc-plugins/randomize_layout_plugin.c | 10 +-
scripts/gdb/linux/symbols.py | 4 +-
scripts/gen_compile_commands.py | 4 +-
scripts/genksyms/Makefile | 11 +-
scripts/genksyms/keywords.c | 6 +-
scripts/genksyms/lex.l | 32 +-
scripts/genksyms/parse.y | 32 +-
scripts/headers_install.sh | 78 +
scripts/kconfig/Makefile | 10 +-
scripts/kconfig/confdata.c | 4 +
scripts/kconfig/merge_config.sh | 12 +-
scripts/kernel-doc | 3 +-
scripts/link-vmlinux.sh | 94 +-
scripts/mkcompile_h | 4 +-
scripts/mkmakefile | 4 +-
scripts/mod/file2alias.c | 5 +
scripts/mod/modpost.c | 198 +-
scripts/mod/modpost.h | 9 +
scripts/nsdeps | 58 +
scripts/package/Makefile | 154 -
scripts/recordmcount.c | 321 +-
scripts/recordmcount.h | 150 +-
scripts/sphinx-pre-install | 118 +-
scripts/tools-support-relr.sh | 16 +
security/Kconfig | 11 +-
security/Kconfig.hardening | 7 +
security/Makefile | 2 +
security/integrity/Kconfig | 2 +-
security/integrity/digsig.c | 43 +-
security/integrity/ima/Kconfig | 15 +-
security/integrity/ima/Makefile | 1 +
security/integrity/ima/ima.h | 62 +-
security/integrity/ima/ima_api.c | 27 +-
security/integrity/ima/ima_appraise.c | 194 +-
security/integrity/ima/ima_crypto.c | 10 +-
security/integrity/ima/ima_main.c | 28 +-
security/integrity/ima/ima_modsig.c | 168 +
security/integrity/ima/ima_policy.c | 121 +-
security/integrity/ima/ima_template.c | 31 +-
security/integrity/ima/ima_template_lib.c | 64 +-
security/integrity/ima/ima_template_lib.h | 4 +
security/integrity/integrity.h | 20 +
security/keys/request_key.c | 2 +-
security/keys/request_key_auth.c | 6 +
security/keys/trusted.c | 10 +-
security/lockdown/Kconfig | 47 +
security/lockdown/Makefile | 1 +
security/lockdown/lockdown.c | 191 +
security/safesetid/securityfs.c | 3 +-
security/security.c | 62 +-
security/selinux/hooks.c | 49 +-
security/selinux/include/classmap.h | 5 +-
security/selinux/include/objsec.h | 20 +-
security/selinux/netif.c | 31 +-
security/selinux/netnode.c | 30 +-
security/selinux/netport.c | 24 +-
security/selinux/ss/policydb.c | 404 +-
security/selinux/ss/policydb.h | 2 +-
security/selinux/ss/services.c | 6 +-
security/selinux/ss/sidtab.c | 53 +-
security/selinux/ss/sidtab.h | 19 +-
security/smack/smack_access.c | 6 +-
security/smack/smack_lsm.c | 40 +-
sound/ac97/bus.c | 13 +-
sound/aoa/codecs/onyx.c | 4 +-
sound/arm/pxa2xx-pcm-lib.c | 80 +-
sound/core/compress_offload.c | 62 +-
sound/core/pcm_dmaengine.c | 83 +
sound/core/pcm_native.c | 25 +-
sound/core/seq/seq_clientmgr.c | 3 +-
sound/core/seq/seq_fifo.c | 17 +
sound/core/seq/seq_fifo.h | 2 +
sound/firewire/amdtp-am824.c | 134 +-
sound/firewire/amdtp-stream-trace.h | 6 +-
sound/firewire/amdtp-stream.c | 359 +-
sound/firewire/amdtp-stream.h | 47 +-
sound/firewire/bebob/bebob.h | 2 +
sound/firewire/bebob/bebob_stream.c | 62 +-
sound/firewire/dice/dice-alesis.c | 2 +-
sound/firewire/dice/dice-stream.c | 34 +-
sound/firewire/dice/dice.h | 2 +
sound/firewire/digi00x/amdtp-dot.c | 112 +-
sound/firewire/digi00x/digi00x-stream.c | 106 +-
sound/firewire/digi00x/digi00x.h | 2 +
sound/firewire/fireface/amdtp-ff.c | 105 +-
sound/firewire/fireface/ff-stream.c | 96 +-
sound/firewire/fireface/ff.h | 2 +
sound/firewire/fireworks/fireworks.h | 2 +
sound/firewire/fireworks/fireworks_stream.c | 176 +-
sound/firewire/motu/amdtp-motu.c | 155 +-
sound/firewire/motu/motu-stream.c | 131 +-
sound/firewire/motu/motu.c | 12 +
sound/firewire/motu/motu.h | 2 +
sound/firewire/oxfw/oxfw-pcm.c | 2 +-
sound/firewire/oxfw/oxfw-stream.c | 77 +-
sound/firewire/oxfw/oxfw.h | 2 +
sound/firewire/packets-buffer.c | 2 +-
sound/firewire/tascam/amdtp-tascam.c | 115 +-
sound/firewire/tascam/tascam-pcm.c | 3 +
sound/firewire/tascam/tascam-stream.c | 165 +-
sound/firewire/tascam/tascam.c | 4 +-
sound/firewire/tascam/tascam.h | 22 +
sound/hda/hdac_bus.c | 8 +-
sound/hda/hdac_controller.c | 2 +
sound/hda/hdac_device.c | 6 +-
sound/hda/hdac_i915.c | 10 +-
sound/hda/hdac_regmap.c | 1 +
sound/hda/hdac_stream.c | 6 +-
sound/hda/local.h | 7 +
sound/i2c/other/ak4xxx-adda.c | 7 +-
sound/isa/sb/sb_common.c | 2 +-
sound/isa/wavefront/wavefront_synth.c | 1 -
sound/oss/dmasound/dmasound_atari.c | 16 +-
sound/pci/ac97/ac97_codec.c | 5 -
sound/pci/echoaudio/echoaudio.c | 5 +-
sound/pci/hda/hda_auto_parser.c | 16 +-
sound/pci/hda/hda_codec.c | 2 +-
sound/pci/hda/hda_controller.c | 31 +-
sound/pci/hda/hda_controller.h | 2 +-
sound/pci/hda/hda_generic.c | 24 +-
sound/pci/hda/hda_generic.h | 2 +
sound/pci/hda/hda_intel.c | 99 +-
sound/pci/hda/hda_intel.h | 1 -
sound/pci/hda/hda_local.h | 3 +-
sound/pci/hda/patch_analog.c | 1 +
sound/pci/hda/patch_ca0132.c | 1 +
sound/pci/hda/patch_conexant.c | 33 +-
sound/pci/hda/patch_hdmi.c | 297 +-
sound/pci/hda/patch_realtek.c | 236 +-
sound/pci/hda/patch_sigmatel.c | 9 -
sound/pci/lx6464es/lx6464es.c | 8 +
sound/soc/amd/Kconfig | 2 +-
sound/soc/amd/acp-pcm-dma.c | 63 +-
sound/soc/amd/raven/acp3x-pcm-dma.c | 56 +-
sound/soc/atmel/atmel-pcm-pdc.c | 48 +-
sound/soc/atmel/mchp-i2s-mcc.c | 41 +-
sound/soc/au1x/dbdma2.c | 64 +-
sound/soc/au1x/dma.c | 63 +-
sound/soc/bcm/cygnus-pcm.c | 56 +-
sound/soc/codecs/Kconfig | 45 +-
sound/soc/codecs/Makefile | 10 +
sound/soc/codecs/adau1761.c | 129 +
sound/soc/codecs/adau7118-hw.c | 43 +
sound/soc/codecs/adau7118-i2c.c | 82 +
sound/soc/codecs/adau7118.c | 586 +
sound/soc/codecs/adau7118.h | 24 +
sound/soc/codecs/cros_ec_codec.c | 1132 +-
sound/soc/codecs/cx2072x.c | 2 +-
sound/soc/codecs/es8316.c | 7 +-
sound/soc/codecs/hdac_hda.c | 116 +-
sound/soc/codecs/hdac_hda.h | 13 +-
sound/soc/codecs/hdmi-codec.c | 12 +-
sound/soc/codecs/madera.h | 2 +
sound/soc/codecs/max98373.c | 4 +-
sound/soc/codecs/msm8916-wcd-analog.c | 58 +-
sound/soc/codecs/mt6358.c | 105 +
sound/soc/codecs/pcm3168a.c | 95 +-
sound/soc/codecs/rt1011.c | 274 +-
sound/soc/codecs/rt1011.h | 24 +
sound/soc/codecs/rt5514-spi.c | 41 +-
sound/soc/codecs/rt5645.c | 13 +
sound/soc/codecs/rt5663.c | 4 +-
sound/soc/codecs/rt5677-spi.c | 386 +
sound/soc/codecs/rt5677-spi.h | 1 +
sound/soc/codecs/rt5682.c | 15 +
sound/soc/codecs/tas2562.c | 590 +
sound/soc/codecs/tas2562.h | 85 +
sound/soc/codecs/tas2770.c | 819 +
sound/soc/codecs/tas2770.h | 143 +
sound/soc/codecs/tlv320aic32x4.c | 3 +
sound/soc/codecs/wcd9335.c | 10 +-
sound/soc/codecs/wm8958-dsp2.c | 22 +-
sound/soc/codecs/wm8994.c | 156 +-
sound/soc/codecs/wm8994.h | 10 +-
sound/soc/dwc/dwc-pcm.c | 48 +-
sound/soc/fsl/Kconfig | 10 +
sound/soc/fsl/Makefile | 2 +
sound/soc/fsl/fsl_asrc.c | 110 +-
sound/soc/fsl/fsl_asrc.h | 7 +-
sound/soc/fsl/fsl_asrc_dma.c | 120 +-
sound/soc/fsl/fsl_dma.c | 54 +-
sound/soc/fsl/fsl_esai.c | 12 +
sound/soc/fsl/fsl_mqs.c | 335 +
sound/soc/fsl/fsl_ssi.c | 18 +-
sound/soc/fsl/imx-pcm-fiq.c | 56 +-
sound/soc/fsl/mpc5200_dma.c | 51 +-
sound/soc/generic/audio-graph-card.c | 4 +-
sound/soc/generic/simple-card.c | 4 +-
sound/soc/intel/Kconfig | 17 +-
sound/soc/intel/atom/sst-mfld-platform-pcm.c | 30 +-
sound/soc/intel/baytrail/sst-baytrail-pcm.c | 53 +-
sound/soc/intel/boards/Kconfig | 52 +-
sound/soc/intel/boards/Makefile | 14 +-
sound/soc/intel/boards/bxt_da7219_max98357a.c | 11 +
sound/soc/intel/boards/bxt_rt298.c | 11 +
sound/soc/intel/boards/bytcht_cx2072x.c | 1 +
sound/soc/intel/boards/cht_bsw_max98090_ti.c | 1 +
sound/soc/intel/boards/cht_bsw_rt5645.c | 26 +-
sound/soc/intel/boards/cht_bsw_rt5672.c | 1 +
sound/soc/intel/boards/cml_rt1011_rt5682.c | 487 +
sound/soc/intel/boards/glk_rt5682_max98357a.c | 11 +
sound/soc/intel/boards/hda_dsp_common.c | 85 +
sound/soc/intel/boards/hda_dsp_common.h | 32 +
.../soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 146 +-
sound/soc/intel/boards/skl_hda_dsp_common.c | 6 +
sound/soc/intel/boards/skl_hda_dsp_common.h | 27 +-
sound/soc/intel/boards/skl_hda_dsp_generic.c | 3 +-
sound/soc/intel/boards/sof_rt5682.c | 13 +-
sound/soc/intel/common/Makefile | 1 +
sound/soc/intel/common/soc-acpi-intel-cnl-match.c | 7 +
sound/soc/intel/common/soc-acpi-intel-jsl-match.c | 18 +
sound/soc/intel/common/soc-intel-quirks.h | 2 +-
sound/soc/intel/common/sst-ipc.c | 2 +
sound/soc/intel/haswell/sst-haswell-pcm.c | 62 +-
sound/soc/intel/skylake/skl-debug.c | 2 +-
sound/soc/intel/skylake/skl-nhlt.c | 2 +-
sound/soc/intel/skylake/skl-pcm.c | 67 +-
sound/soc/jz4740/Kconfig | 25 +-
sound/soc/jz4740/Makefile | 5 -
sound/soc/jz4740/jz4740-i2s.c | 6 +-
sound/soc/jz4740/qi_lb60.c | 106 -
sound/soc/kirkwood/kirkwood-dma.c | 52 +-
sound/soc/kirkwood/kirkwood-i2s.c | 11 +-
sound/soc/mediatek/Kconfig | 1 +
sound/soc/mediatek/common/mtk-afe-fe-dai.c | 3 +-
.../soc/mediatek/common/mtk-afe-platform-driver.c | 28 +-
.../soc/mediatek/common/mtk-afe-platform-driver.h | 10 +-
sound/soc/mediatek/common/mtk-btcvsd.c | 76 +-
sound/soc/mediatek/mt6797/mt6797-afe-pcm.c | 11 +-
sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 26 +-
.../mt8183/mt8183-mt6358-ts3a227-max98357.c | 70 +-
sound/soc/meson/axg-fifo.c | 56 +-
sound/soc/meson/axg-fifo.h | 20 +-
sound/soc/meson/axg-frddr.c | 24 +-
sound/soc/meson/axg-toddr.c | 24 +-
sound/soc/pxa/mmp-pcm.c | 62 +-
sound/soc/pxa/poodle.c | 2 +-
sound/soc/pxa/pxa-ssp.c | 14 +-
sound/soc/pxa/pxa2xx-ac97.c | 14 +-
sound/soc/pxa/pxa2xx-i2s.c | 14 +-
sound/soc/pxa/pxa2xx-pcm.c | 14 +-
sound/soc/qcom/Kconfig | 2 +-
sound/soc/qcom/lpass-platform.c | 70 +-
sound/soc/qcom/qdsp6/q6asm-dai.c | 71 +-
sound/soc/qcom/qdsp6/q6routing.c | 14 +-
sound/soc/rockchip/Kconfig | 3 +-
sound/soc/rockchip/rk3399_gru_sound.c | 9 +-
sound/soc/rockchip/rockchip_max98090.c | 320 +-
sound/soc/samsung/Kconfig | 12 +-
sound/soc/samsung/Makefile | 4 +-
sound/soc/samsung/arndale.c | 217 +
sound/soc/samsung/arndale_rt5631.c | 164 -
sound/soc/samsung/idma.c | 58 +-
sound/soc/sh/dma-sh7760.c | 46 +-
sound/soc/sh/fsi.c | 31 +-
sound/soc/sh/rcar/core.c | 34 +-
sound/soc/sh/rcar/dma.c | 34 +-
sound/soc/sh/siu_pcm.c | 44 +-
sound/soc/soc-component.c | 119 +-
sound/soc/soc-compress.c | 52 +-
sound/soc/soc-core.c | 860 +-
sound/soc/soc-generic-dmaengine-pcm.c | 169 +-
sound/soc/soc-ops.c | 11 +-
sound/soc/soc-pcm.c | 213 +-
sound/soc/soc-topology.c | 23 +-
sound/soc/soc-utils.c | 11 +-
sound/soc/sof/Kconfig | 43 +-
sound/soc/sof/control.c | 34 +
sound/soc/sof/core.c | 31 +-
sound/soc/sof/debug.c | 22 +-
sound/soc/sof/imx/Kconfig | 8 +-
sound/soc/sof/imx/imx8.c | 7 +
sound/soc/sof/intel/Kconfig | 50 +-
sound/soc/sof/intel/apl.c | 8 +
sound/soc/sof/intel/bdw.c | 31 +-
sound/soc/sof/intel/byt.c | 44 +-
sound/soc/sof/intel/cnl.c | 67 +-
sound/soc/sof/intel/hda-codec.c | 22 +-
sound/soc/sof/intel/hda-dsp.c | 122 +-
sound/soc/sof/intel/hda-ipc.c | 6 +-
sound/soc/sof/intel/hda-ipc.h | 51 +
sound/soc/sof/intel/hda-loader.c | 25 +-
sound/soc/sof/intel/hda-pcm.c | 15 +-
sound/soc/sof/intel/hda-stream.c | 28 +-
sound/soc/sof/intel/hda.c | 14 +-
sound/soc/sof/intel/hda.h | 20 +-
sound/soc/sof/ipc.c | 14 +-
sound/soc/sof/ops.h | 10 +
sound/soc/sof/pcm.c | 135 +-
sound/soc/sof/pm.c | 95 +-
sound/soc/sof/sof-acpi-dev.c | 12 +-
sound/soc/sof/sof-pci-dev.c | 80 +-
sound/soc/sof/sof-priv.h | 52 +-
sound/soc/sof/topology.c | 461 +-
sound/soc/sof/trace.c | 17 +-
sound/soc/sprd/sprd-pcm-dma.c | 74 +-
sound/soc/stm/stm32_adfsdm.c | 42 +-
sound/soc/stm/stm32_sai.c | 2 +-
sound/soc/stm/stm32_sai_sub.c | 12 +-
sound/soc/stm/stm32_spdifrx.c | 18 +-
sound/soc/sunxi/sun4i-codec.c | 6 +-
sound/soc/tegra/tegra30_i2s.c | 56 +-
sound/soc/ti/ams-delta.c | 31 +-
sound/soc/ti/davinci-i2s.c | 82 +-
sound/soc/ti/sdma-pcm.c | 2 +-
sound/soc/txx9/txx9aclc.c | 48 +-
sound/soc/uniphier/aio-dma.c | 51 +-
sound/soc/ux500/ux500_msp_i2s.c | 3 +-
sound/soc/xilinx/xlnx_formatter_pcm.c | 63 +-
sound/soc/xtensa/xtfpga-i2s.c | 30 +-
sound/sound_core.c | 3 +-
sound/sparc/dbri.c | 4 +
sound/usb/Makefile | 4 +-
sound/usb/clock.c | 14 +-
sound/usb/helper.c | 2 +-
sound/usb/helper.h | 4 +
sound/usb/hiface/pcm.c | 11 +-
sound/usb/line6/driver.c | 4 +-
sound/usb/line6/pcm.c | 18 +-
sound/usb/line6/podhd.c | 2 +-
sound/usb/line6/variax.c | 2 +-
sound/usb/mixer.c | 678 +-
sound/usb/mixer.h | 4 +
sound/usb/mixer_quirks.c | 15 +-
sound/usb/mixer_scarlett_gen2.c | 2075 +
sound/usb/mixer_scarlett_gen2.h | 7 +
sound/usb/pcm.c | 2 +
sound/usb/power.c | 2 +
sound/usb/quirks-table.h | 57 +
sound/usb/quirks.c | 17 +-
sound/usb/stream.c | 89 +-
sound/usb/validate.c | 332 +
tools/Makefile | 4 +-
tools/arch/arm/include/uapi/asm/kvm.h | 12 +
tools/arch/arm64/include/uapi/asm/kvm.h | 10 +
tools/arch/powerpc/include/uapi/asm/mman.h | 4 -
tools/arch/riscv/include/uapi/asm/perf_regs.h | 42 +
tools/arch/sparc/include/uapi/asm/mman.h | 4 -
tools/arch/x86/include/asm/cpufeatures.h | 7 +-
.../x86/include/asm}/inat.h | 0
.../arch/x86/include/asm/inat_types.h | 0
.../x86/include/asm}/insn.h | 0
.../{objtool => }/arch/x86/include/asm/orc_types.h | 0
tools/arch/x86/include/uapi/asm/kvm.h | 22 +-
tools/arch/x86/include/uapi/asm/unistd.h | 2 +-
tools/arch/x86/include/uapi/asm/vmx.h | 1 -
tools/arch/x86/lib/inat.c | 83 +
tools/arch/x86/lib/insn.c | 593 +
.../{objtool => }/arch/x86/lib/x86-opcode-map.txt | 0
.../arch/x86/tools/gen-insn-attr-x86.awk | 0
tools/bpf/.gitignore | 1 +
tools/bpf/Makefile | 5 +-
tools/bpf/bpftool/.gitignore | 2 +
tools/bpf/bpftool/Documentation/bpftool-btf.rst | 7 +
tools/bpf/bpftool/Documentation/bpftool-cgroup.rst | 16 +-
tools/bpf/bpftool/Documentation/bpftool-map.rst | 11 +-
tools/bpf/bpftool/Documentation/bpftool-net.rst | 57 +-
tools/bpf/bpftool/Makefile | 42 +-
tools/bpf/bpftool/bash-completion/bpftool | 108 +-
tools/bpf/bpftool/btf.c | 344 +-
tools/bpf/bpftool/btf_dumper.c | 8 +-
tools/bpf/bpftool/cgroup.c | 85 +-
tools/bpf/bpftool/common.c | 12 +-
tools/bpf/bpftool/feature.c | 105 +-
tools/bpf/bpftool/json_writer.c | 6 +-
tools/bpf/bpftool/json_writer.h | 6 +-
tools/bpf/bpftool/main.c | 2 +-
tools/bpf/bpftool/main.h | 4 +-
tools/bpf/bpftool/map.c | 67 +-
tools/bpf/bpftool/map_perf_ring.c | 4 +-
tools/bpf/bpftool/net.c | 178 +-
tools/bpf/bpftool/perf.c | 4 +
tools/bpf/bpftool/prog.c | 4 +-
tools/build/Makefile.feature | 2 +
tools/build/feature/Makefile | 4 +
tools/build/feature/test-libcap.c | 20 +
tools/cgroup/iocost_coef_gen.py | 178 +
tools/cgroup/iocost_monitor.py | 277 +
tools/crypto/getstat.c | 294 -
tools/hv/Build | 3 +
tools/hv/Makefile | 51 +-
tools/hv/hv_get_dhcp_info.sh | 2 +-
tools/hv/hv_kvp_daemon.c | 10 +-
tools/hv/hv_set_ifconfig.sh | 2 +-
tools/hv/hv_vss_daemon.c | 4 +-
tools/hv/lsvmbus | 75 +-
tools/iio/.gitignore | 4 +
tools/include/asm/bug.h | 1 +
tools/include/linux/bitops.h | 1 +
tools/include/linux/bits.h | 17 +-
tools/include/linux/compiler-gcc.h | 2 +
tools/include/linux/const.h | 9 +
tools/include/linux/rbtree.h | 71 +-
tools/include/linux/rbtree_augmented.h | 119 +-
tools/include/linux/ring_buffer.h | 1 +
tools/include/uapi/asm-generic/mman-common.h | 15 +-
tools/include/uapi/asm-generic/mman.h | 10 +-
tools/include/uapi/asm-generic/unistd.h | 10 +-
tools/include/uapi/asm/bitsperlong.h | 18 +-
tools/include/uapi/drm/drm.h | 1 +
tools/include/uapi/drm/i915_drm.h | 209 +-
tools/include/uapi/linux/bpf.h | 63 +-
tools/include/uapi/linux/const.h | 31 +
tools/include/uapi/linux/fs.h | 1 +
tools/include/uapi/linux/if_link.h | 5 +
tools/include/uapi/linux/if_xdp.h | 22 +
tools/include/uapi/linux/kvm.h | 7 +-
tools/include/uapi/linux/perf_event.h | 3 +-
tools/include/uapi/linux/prctl.h | 7 +-
tools/include/uapi/linux/sched.h | 30 +-
tools/include/uapi/linux/usbdevice_fs.h | 26 +
tools/leds/get_led_device_info.sh | 201 +
tools/lib/bpf/Makefile | 26 +-
tools/lib/bpf/bpf.c | 24 +-
tools/lib/bpf/bpf.h | 1 +
tools/lib/bpf/btf.c | 255 +-
tools/lib/bpf/btf.h | 182 +
tools/lib/bpf/btf_dump.c | 232 +-
tools/lib/bpf/hashmap.h | 5 +
tools/lib/bpf/libbpf.c | 1072 +-
tools/lib/bpf/libbpf.h | 3 +-
tools/lib/bpf/libbpf.map | 6 +
tools/lib/bpf/libbpf_internal.h | 105 +
tools/lib/bpf/libbpf_probes.c | 1 +
tools/lib/bpf/xsk.c | 108 +-
tools/lib/bpf/xsk.h | 33 +
tools/lib/rbtree.c | 37 +-
tools/lib/traceevent/Build | 11 -
.../Documentation/libtraceevent-event_print.txt | 130 +
.../Documentation/libtraceevent-func_apis.txt | 10 +-
.../Documentation/libtraceevent-handle.txt | 8 +-
.../Documentation/libtraceevent-plugins.txt | 99 +
.../lib/traceevent/Documentation/libtraceevent.txt | 15 +-
tools/lib/traceevent/Makefile | 94 +-
tools/lib/traceevent/event-parse-api.c | 40 -
tools/lib/traceevent/event-parse-local.h | 6 -
tools/lib/traceevent/event-parse.c | 411 +-
tools/lib/traceevent/event-parse.h | 32 +-
tools/lib/traceevent/event-plugin.c | 2 +-
tools/lib/traceevent/plugins/Build | 10 +
tools/lib/traceevent/plugins/Makefile | 222 +
.../lib/traceevent/{ => plugins}/plugin_cfg80211.c | 0
.../lib/traceevent/{ => plugins}/plugin_function.c | 0
.../lib/traceevent/{ => plugins}/plugin_hrtimer.c | 0
tools/lib/traceevent/{ => plugins}/plugin_jbd2.c | 0
tools/lib/traceevent/{ => plugins}/plugin_kmem.c | 0
tools/lib/traceevent/{ => plugins}/plugin_kvm.c | 0
.../lib/traceevent/{ => plugins}/plugin_mac80211.c | 0
.../traceevent/{ => plugins}/plugin_sched_switch.c | 0
tools/lib/traceevent/{ => plugins}/plugin_scsi.c | 0
tools/lib/traceevent/{ => plugins}/plugin_xen.c | 0
tools/memory-model/Documentation/explanation.txt | 53 +-
tools/memory-model/README | 18 +-
tools/memory-model/scripts/checkghlitmus.sh | 0
tools/memory-model/scripts/checklitmushist.sh | 0
tools/memory-model/scripts/cmplitmushist.sh | 0
tools/memory-model/scripts/initlitmushist.sh | 0
tools/memory-model/scripts/judgelitmus.sh | 0
tools/memory-model/scripts/newlitmushist.sh | 0
tools/memory-model/scripts/parseargs.sh | 0
tools/memory-model/scripts/runlitmushist.sh | 0
tools/objtool/Makefile | 6 +-
tools/objtool/arch/x86/Build | 4 +-
tools/objtool/arch/x86/decode.c | 4 +-
tools/objtool/arch/x86/include/asm/inat.h | 230 -
tools/objtool/arch/x86/include/asm/insn.h | 216 -
tools/objtool/arch/x86/lib/inat.c | 83 -
tools/objtool/arch/x86/lib/insn.c | 593 -
tools/objtool/check.c | 8 +-
tools/objtool/check.h | 3 +-
tools/objtool/sync-check.sh | 44 +-
tools/perf/.gitignore | 3 +
tools/perf/Documentation/Makefile | 2 +-
tools/perf/Documentation/intel-pt.txt | 15 +
tools/perf/Documentation/itrace.txt | 2 +
tools/perf/Documentation/perf-config.txt | 4 +
tools/perf/Documentation/perf-record.txt | 13 +-
tools/perf/Documentation/perf-report.txt | 17 +
tools/perf/Documentation/perf-script.txt | 17 +-
tools/perf/Documentation/perf-top.txt | 38 +
tools/perf/Documentation/perf-trace.txt | 9 +
tools/perf/Documentation/perf.data-file-format.txt | 27 +-
tools/perf/Makefile.config | 22 +-
tools/perf/Makefile.perf | 39 +-
tools/perf/arch/arm/annotate/instructions.c | 1 +
tools/perf/arch/arm/util/auxtrace.c | 9 +-
tools/perf/arch/arm/util/cs-etm.c | 114 +-
tools/perf/arch/arm64/annotate/instructions.c | 1 +
tools/perf/arch/arm64/util/arm-spe.c | 36 +-
tools/perf/arch/arm64/util/dwarf-regs.c | 1 -
tools/perf/arch/arm64/util/header.c | 11 +-
tools/perf/arch/arm64/util/sym-handling.c | 8 +-
tools/perf/arch/arm64/util/unwind-libunwind.c | 2 +-
tools/perf/arch/common.c | 3 +
tools/perf/arch/common.h | 4 +-
tools/perf/arch/powerpc/entry/syscalls/syscall.tbl | 146 +-
tools/perf/arch/powerpc/util/dwarf-regs.c | 1 -
tools/perf/arch/powerpc/util/header.c | 1 -
tools/perf/arch/powerpc/util/kvm-stat.c | 57 +-
tools/perf/arch/powerpc/util/mem-events.c | 1 +
tools/perf/arch/powerpc/util/perf_regs.c | 1 -
tools/perf/arch/powerpc/util/skip-callchain-idx.c | 1 +
tools/perf/arch/powerpc/util/sym-handling.c | 2 +-
tools/perf/arch/powerpc/util/unwind-libdw.c | 1 +
tools/perf/arch/riscv/Build | 1 +
tools/perf/arch/riscv/Makefile | 4 +
tools/perf/arch/riscv/include/perf_regs.h | 96 +
tools/perf/arch/riscv/util/Build | 2 +
tools/perf/arch/riscv/util/dwarf-regs.c | 72 +
tools/perf/arch/riscv/util/unwind-libdw.c | 57 +
tools/perf/arch/s390/Makefile | 1 +
tools/perf/arch/s390/util/auxtrace.c | 16 +-
tools/perf/arch/s390/util/kvm-stat.c | 9 +-
tools/perf/arch/s390/util/machine.c | 33 +-
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 2 +
tools/perf/arch/x86/tests/bp-modify.c | 1 +
tools/perf/arch/x86/tests/insn-x86.c | 3 +-
tools/perf/arch/x86/tests/intel-cqm.c | 15 +-
tools/perf/arch/x86/tests/perf-time-to-tsc.c | 46 +-
tools/perf/arch/x86/tests/rdpmc.c | 6 +-
tools/perf/arch/x86/util/archinsn.c | 4 +-
tools/perf/arch/x86/util/auxtrace.c | 10 +-
tools/perf/arch/x86/util/event.c | 2 +
tools/perf/arch/x86/util/header.c | 1 +
tools/perf/arch/x86/util/intel-bts.c | 56 +-
tools/perf/arch/x86/util/intel-pt.c | 138 +-
tools/perf/arch/x86/util/kvm-stat.c | 17 +-
tools/perf/arch/x86/util/machine.c | 3 +-
tools/perf/arch/x86/util/perf_regs.c | 4 +-
tools/perf/arch/x86/util/tsc.c | 10 +-
tools/perf/arch/x86/util/unwind-libunwind.c | 2 +-
tools/perf/bench/epoll-ctl.c | 10 +-
tools/perf/bench/epoll-wait.c | 10 +-
tools/perf/bench/futex-hash.c | 7 +-
tools/perf/bench/futex-lock-pi.c | 9 +-
tools/perf/bench/futex-requeue.c | 9 +-
tools/perf/bench/futex-wake-parallel.c | 9 +-
tools/perf/bench/futex-wake.c | 9 +-
tools/perf/bench/mem-functions.c | 3 +-
tools/perf/bench/numa.c | 8 +-
tools/perf/bench/sched-messaging.c | 3 -
tools/perf/bench/sched-pipe.c | 3 -
tools/perf/builtin-annotate.c | 26 +-
tools/perf/builtin-bench.c | 1 -
tools/perf/builtin-buildid-cache.c | 11 +-
tools/perf/builtin-buildid-list.c | 9 +-
tools/perf/builtin-c2c.c | 29 +-
tools/perf/builtin-config.c | 4 +-
tools/perf/builtin-data.c | 2 +
tools/perf/builtin-diff.c | 33 +-
tools/perf/builtin-evlist.c | 12 +-
tools/perf/builtin-ftrace.c | 37 +-
tools/perf/builtin-help.c | 5 +-
tools/perf/builtin-inject.c | 68 +-
tools/perf/builtin-kallsyms.c | 1 +
tools/perf/builtin-kmem.c | 34 +-
tools/perf/builtin-kvm.c | 88 +-
tools/perf/builtin-list.c | 9 +-
tools/perf/builtin-lock.c | 39 +-
tools/perf/builtin-mem.c | 9 +-
tools/perf/builtin-probe.c | 15 +-
tools/perf/builtin-record.c | 212 +-
tools/perf/builtin-report.c | 59 +-
tools/perf/builtin-sched.c | 118 +-
tools/perf/builtin-script.c | 214 +-
tools/perf/builtin-stat.c | 188 +-
tools/perf/builtin-timechart.c | 61 +-
tools/perf/builtin-top.c | 187 +-
tools/perf/builtin-trace.c | 657 +-
tools/perf/builtin-version.c | 2 +-
tools/perf/builtin.h | 2 -
tools/perf/check-headers.sh | 13 +-
tools/perf/examples/bpf/augmented_raw_syscalls.c | 318 +-
tools/perf/include/bpf/bpf.h | 2 +
tools/perf/jvmti/Build | 9 +
tools/perf/lib/Build | 12 +
tools/perf/lib/Documentation/Makefile | 7 +
tools/perf/lib/Documentation/man/libperf.rst | 100 +
tools/perf/lib/Documentation/tutorial/tutorial.rst | 123 +
tools/perf/lib/Makefile | 186 +
tools/perf/lib/core.c | 37 +
tools/perf/lib/cpumap.c | 274 +
tools/perf/lib/evlist.c | 283 +
tools/perf/lib/evsel.c | 262 +
tools/perf/lib/include/internal/cpumap.h | 19 +
tools/perf/lib/include/internal/evlist.h | 83 +
tools/perf/lib/include/internal/evsel.h | 62 +
tools/perf/lib/include/internal/lib.h | 12 +
tools/perf/lib/include/internal/mmap.h | 32 +
tools/perf/lib/include/internal/tests.h | 19 +
tools/perf/lib/include/internal/threadmap.h | 23 +
tools/perf/lib/include/internal/xyarray.h | 36 +
tools/perf/lib/include/perf/core.h | 22 +
tools/perf/lib/include/perf/cpumap.h | 26 +
tools/perf/lib/include/perf/event.h | 385 +
tools/perf/lib/include/perf/evlist.h | 36 +
tools/perf/lib/include/perf/evsel.h | 39 +
tools/perf/lib/include/perf/threadmap.h | 20 +
tools/perf/lib/internal.h | 18 +
tools/perf/lib/lib.c | 48 +
tools/perf/lib/libperf.map | 45 +
tools/perf/lib/libperf.pc.template | 11 +
tools/perf/lib/tests/Makefile | 38 +
tools/perf/lib/tests/test-cpumap.c | 31 +
tools/perf/lib/tests/test-evlist.c | 196 +
tools/perf/lib/tests/test-evsel.c | 135 +
tools/perf/lib/tests/test-threadmap.c | 31 +
tools/perf/lib/threadmap.c | 91 +
tools/perf/lib/xyarray.c | 33 +
tools/perf/perf-sys.h | 51 +-
tools/perf/perf.c | 22 +-
tools/perf/perf.h | 82 -
tools/perf/pmu-events/README | 22 +-
.../arch/arm64/arm/cortex-a76-n1/branch.json | 14 +
.../arch/arm64/arm/cortex-a76-n1/bus.json | 24 +
.../arch/arm64/arm/cortex-a76-n1/cache.json | 207 +
.../arch/arm64/arm/cortex-a76-n1/exception.json | 52 +
.../arch/arm64/arm/cortex-a76-n1/instruction.json | 108 +
.../arch/arm64/arm/cortex-a76-n1/memory.json | 23 +
.../arch/arm64/arm/cortex-a76-n1/other.json | 7 +
.../arch/arm64/arm/cortex-a76-n1/pipeline.json | 14 +
tools/perf/pmu-events/arch/arm64/mapfile.csv | 2 +
.../perf/pmu-events/arch/powerpc/power8/other.json | 24 -
.../pmu-events/arch/powerpc/power9/memory.json | 2 +-
.../perf/pmu-events/arch/powerpc/power9/other.json | 8 +-
.../perf/pmu-events/arch/x86/amdfam17h/cache.json | 42 +
tools/perf/pmu-events/arch/x86/amdfam17h/core.json | 2 +-
tools/perf/pmu-events/arch/x86/icelake/cache.json | 552 +
.../arch/x86/icelake/floating-point.json | 102 +
.../perf/pmu-events/arch/x86/icelake/frontend.json | 424 +
tools/perf/pmu-events/arch/x86/icelake/memory.json | 410 +
tools/perf/pmu-events/arch/x86/icelake/other.json | 121 +
.../perf/pmu-events/arch/x86/icelake/pipeline.json | 892 +
.../arch/x86/icelake/virtual-memory.json | 236 +
tools/perf/pmu-events/arch/x86/mapfile.csv | 3 +
tools/perf/pmu-events/arch/x86/tremontx/cache.json | 111 +
.../pmu-events/arch/x86/tremontx/frontend.json | 26 +
.../perf/pmu-events/arch/x86/tremontx/memory.json | 26 +
tools/perf/pmu-events/arch/x86/tremontx/other.json | 26 +
.../pmu-events/arch/x86/tremontx/pipeline.json | 111 +
.../arch/x86/tremontx/uncore-memory.json | 73 +
.../pmu-events/arch/x86/tremontx/uncore-other.json | 431 +
.../pmu-events/arch/x86/tremontx/uncore-power.json | 11 +
.../arch/x86/tremontx/virtual-memory.json | 86 +
tools/perf/pmu-events/jevents.c | 2 +
tools/perf/scripts/perl/Perf-Trace-Util/Context.c | 1 -
.../perf/scripts/python/Perf-Trace-Util/Context.c | 1 -
tools/perf/tests/attr.c | 3 +-
tools/perf/tests/backward-ring-buffer.c | 33 +-
tools/perf/tests/bitmap.c | 7 +-
tools/perf/tests/bp_account.c | 3 +-
tools/perf/tests/bp_signal.c | 3 +-
tools/perf/tests/bp_signal_overflow.c | 3 +-
tools/perf/tests/bpf.c | 24 +-
tools/perf/tests/builtin-test.c | 1 +
tools/perf/tests/clang.c | 2 -
tools/perf/tests/code-reading.c | 72 +-
tools/perf/tests/cpumap.c | 34 +-
tools/perf/tests/dso-data.c | 2 +-
tools/perf/tests/dwarf-unwind.c | 2 +
tools/perf/tests/event-times.c | 86 +-
tools/perf/tests/event_update.c | 42 +-
tools/perf/tests/evsel-roundtrip-name.c | 14 +-
tools/perf/tests/evsel-tp-sched.c | 8 +-
tools/perf/tests/expr.c | 1 +
tools/perf/tests/hists_common.c | 5 +-
tools/perf/tests/hists_cumulate.c | 22 +-
tools/perf/tests/hists_filter.c | 12 +-
tools/perf/tests/hists_link.c | 17 +-
tools/perf/tests/hists_output.c | 24 +-
tools/perf/tests/keep-tracking.c | 61 +-
tools/perf/tests/kmod-path.c | 2 +
tools/perf/tests/llvm.c | 3 +-
tools/perf/tests/make | 9 +-
tools/perf/tests/mem.c | 1 +
tools/perf/tests/mem2node.c | 10 +-
tools/perf/tests/mmap-basic.c | 39 +-
tools/perf/tests/mmap-thread-lookup.c | 8 +-
tools/perf/tests/openat-syscall-all-cpus.c | 25 +-
tools/perf/tests/openat-syscall-tp-fields.c | 29 +-
tools/perf/tests/openat-syscall.c | 12 +-
tools/perf/tests/parse-events.c | 1246 +-
tools/perf/tests/parse-no-sample-id-all.c | 12 +-
tools/perf/tests/perf-hooks.c | 1 -
tools/perf/tests/perf-record.c | 26 +-
tools/perf/tests/pmu.c | 1 -
tools/perf/tests/sample-parsing.c | 18 +-
tools/perf/tests/sdt.c | 5 +-
tools/perf/tests/shell/record+zstd_comp_decomp.sh | 2 +-
tools/perf/tests/shell/trace+probe_vfs_getname.sh | 4 +
tools/perf/tests/stat.c | 9 +-
tools/perf/tests/sw-clock.c | 40 +-
tools/perf/tests/switch-tracking.c | 97 +-
tools/perf/tests/task-exit.c | 49 +-
tools/perf/tests/thread-map.c | 44 +-
tools/perf/tests/thread-mg-share.c | 1 -
tools/perf/tests/time-utils-test.c | 2 +-
tools/perf/tests/topology.c | 16 +-
tools/perf/tests/unit_number__scnprintf.c | 1 +
tools/perf/tests/vmlinux-kallsyms.c | 3 +-
tools/perf/tests/wp.c | 5 +
tools/perf/trace/beauty/ioctl.c | 2 +-
tools/perf/trace/beauty/usbdevfs_ioctl.sh | 9 +-
tools/perf/ui/browser.c | 9 +-
tools/perf/ui/browser.h | 1 +
tools/perf/ui/browsers/annotate.c | 19 +-
tools/perf/ui/browsers/header.c | 2 -
tools/perf/ui/browsers/hists.c | 67 +-
tools/perf/ui/browsers/map.c | 2 +-
tools/perf/ui/browsers/res_sample.c | 9 +-
tools/perf/ui/browsers/scripts.c | 19 +-
tools/perf/ui/gtk/annotate.c | 9 +-
tools/perf/ui/gtk/browser.c | 2 -
tools/perf/ui/gtk/gtk.h | 8 +-
tools/perf/ui/gtk/helpline.c | 2 +-
tools/perf/ui/gtk/hists.c | 8 +-
tools/perf/ui/gtk/progress.c | 1 -
tools/perf/ui/gtk/setup.c | 4 +-
tools/perf/ui/gtk/util.c | 2 +-
tools/perf/ui/helpline.c | 2 -
tools/perf/ui/helpline.h | 2 -
tools/perf/ui/hist.c | 21 +-
tools/perf/ui/progress.c | 1 -
tools/perf/ui/setup.c | 7 +-
tools/perf/ui/stdio/hist.c | 3 +
tools/perf/ui/tui/helpline.c | 3 +-
tools/perf/ui/tui/progress.c | 1 -
tools/perf/ui/tui/setup.c | 5 +-
tools/perf/ui/tui/util.c | 39 +-
tools/perf/ui/util.c | 4 +-
tools/perf/ui/util.h | 2 +
tools/perf/util/Build | 14 +-
tools/perf/util/annotate.c | 54 +-
tools/perf/util/annotate.h | 28 +-
tools/perf/util/arm-spe.c | 11 +-
tools/perf/util/auxtrace.c | 112 +-
tools/perf/util/auxtrace.h | 115 +-
tools/perf/util/bpf-event.c | 40 +-
tools/perf/util/bpf-event.h | 30 +-
tools/perf/util/bpf-loader.c | 45 +-
tools/perf/util/bpf-loader.h | 30 +-
tools/perf/util/bpf-prologue.c | 2 +-
tools/perf/util/branch.c | 5 +-
tools/perf/util/branch.h | 17 +-
tools/perf/util/build-id.c | 8 +-
tools/perf/util/build-id.h | 2 +-
tools/perf/util/c++/clang-c.h | 2 +-
tools/perf/util/c++/clang-test.cpp | 4 +-
tools/perf/util/cacheline.c | 25 +
tools/perf/util/cacheline.h | 21 +
tools/perf/util/callchain.c | 7 +-
tools/perf/util/callchain.h | 8 +-
tools/perf/util/cap.c | 29 +
tools/perf/util/cap.h | 32 +
tools/perf/util/cgroup.c | 25 +-
tools/perf/util/cgroup.h | 6 +-
tools/perf/util/cloexec.c | 6 +-
tools/perf/util/color.c | 3 +-
tools/perf/util/color_config.c | 3 +-
tools/perf/util/config.c | 4 +
tools/perf/util/copyfile.c | 144 +
tools/perf/util/copyfile.h | 16 +
tools/perf/util/counts.c | 17 +-
tools/perf/util/counts.h | 38 +-
tools/perf/util/cpumap.c | 290 +-
tools/perf/util/cpumap.h | 63 +-
tools/perf/util/cputopo.c | 15 +-
tools/perf/util/cputopo.h | 1 -
tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 1 -
tools/perf/util/cs-etm.c | 77 +-
tools/perf/util/cs-etm.h | 3 +-
tools/perf/util/data-convert-bt.c | 43 +-
tools/perf/util/data.c | 5 +-
tools/perf/util/db-export.c | 11 +-
tools/perf/util/db-export.h | 10 +-
tools/perf/util/debug.c | 7 +-
tools/perf/util/debug.h | 8 +-
tools/perf/util/demangle-java.c | 1 -
tools/perf/util/demangle-rust.c | 1 -
tools/perf/util/dso.c | 237 +-
tools/perf/util/dso.h | 28 +-
tools/perf/util/dsos.c | 232 +
tools/perf/util/dsos.h | 44 +
tools/perf/util/dwarf-aux.c | 1 +
tools/perf/util/dwarf-aux.h | 2 +
tools/perf/util/dwarf-regs.c | 1 -
tools/perf/util/env.c | 4 +-
tools/perf/util/env.h | 5 +-
tools/perf/util/event.c | 1160 +-
tools/perf/util/event.h | 538 +-
tools/perf/util/events_stats.h | 51 +
tools/perf/util/evlist.c | 833 +-
tools/perf/util/evlist.h | 264 +-
tools/perf/util/evsel.c | 1011 +-
tools/perf/util/evsel.h | 308 +-
tools/perf/util/evsel_config.h | 50 +
tools/perf/util/evsel_fprintf.c | 32 +-
tools/perf/util/evsel_fprintf.h | 50 +
tools/perf/util/evswitch.c | 61 +
tools/perf/util/evswitch.h | 31 +
tools/perf/util/expr.y | 2 +
tools/perf/util/genelf.c | 3 +-
tools/perf/util/genelf.h | 3 +
tools/perf/util/genelf_debug.c | 1 -
tools/perf/util/get_current_dir_name.c | 1 -
tools/perf/util/header.c | 684 +-
tools/perf/util/header.h | 68 +-
tools/perf/util/hist.c | 63 +-
tools/perf/util/hist.h | 46 +-
tools/perf/util/intel-bts.c | 38 +-
tools/perf/util/intel-pt-decoder/Build | 22 +-
.../util/intel-pt-decoder/gen-insn-attr-x86.awk | 392 -
tools/perf/util/intel-pt-decoder/inat.c | 82 -
tools/perf/util/intel-pt-decoder/inat_types.h | 15 -
tools/perf/util/intel-pt-decoder/insn.c | 593 -
.../perf/util/intel-pt-decoder/intel-pt-decoder.c | 2 +-
.../util/intel-pt-decoder/intel-pt-insn-decoder.c | 10 +-
.../perf/util/intel-pt-decoder/x86-opcode-map.txt | 1072 -
tools/perf/util/intel-pt.c | 135 +-
tools/perf/util/jitdump.c | 13 +-
tools/perf/util/kvm-stat.h | 28 +-
tools/perf/util/libunwind/arm64.c | 1 -
tools/perf/util/libunwind/x86_32.c | 1 -
tools/perf/util/llvm-utils.c | 2 +
tools/perf/util/llvm-utils.h | 2 +-
tools/perf/util/lzma.c | 3 +-
tools/perf/util/machine.c | 72 +-
tools/perf/util/machine.h | 25 +-
tools/perf/util/map.c | 8 +-
tools/perf/util/map.h | 2 +-
tools/perf/util/map_groups.h | 4 +
tools/perf/util/mem-events.c | 2 +-
tools/perf/util/mem-events.h | 9 +
tools/perf/util/mem2node.c | 3 +
tools/perf/util/mem2node.h | 3 +-
tools/perf/util/memswap.h | 7 +
tools/perf/util/metricgroup.c | 110 +-
tools/perf/util/metricgroup.h | 20 +-
tools/perf/util/mmap.c | 195 +-
tools/perf/util/mmap.h | 78 +-
tools/perf/util/namespaces.c | 20 +-
tools/perf/util/namespaces.h | 6 +-
tools/perf/util/ordered-events.c | 1 +
tools/perf/util/parse-branch-options.c | 4 +-
tools/perf/util/parse-events.c | 176 +-
tools/perf/util/parse-events.h | 9 +-
tools/perf/util/parse-events.l | 1 +
tools/perf/util/parse-events.y | 4 +-
tools/perf/util/path.c | 3 +-
tools/perf/util/path.h | 3 +
tools/perf/util/perf-hooks.c | 2 +-
tools/perf/util/perf_event_attr_fprintf.c | 148 +
tools/perf/util/pmu.c | 26 +-
tools/perf/util/pmu.h | 4 +-
tools/perf/util/probe-event.c | 8 +-
tools/perf/util/probe-file.c | 5 +-
tools/perf/util/probe-finder.c | 20 +
tools/perf/util/pstack.c | 1 +
tools/perf/util/python-ext-sources | 4 +-
tools/perf/util/python.c | 163 +-
tools/perf/util/record.c | 84 +-
tools/perf/util/record.h | 74 +
tools/perf/util/rwsem.c | 1 +
tools/perf/util/s390-cpumsf.c | 11 +-
tools/perf/util/s390-sample-raw.c | 9 +-
tools/perf/util/sample-raw.c | 2 +-
tools/perf/util/sample-raw.h | 6 +-
.../perf/util/scripting-engines/trace-event-perl.c | 16 +-
.../util/scripting-engines/trace-event-python.c | 48 +-
tools/perf/util/session.c | 280 +-
tools/perf/util/session.h | 18 +-
tools/perf/util/setup.py | 5 +-
tools/perf/util/sort.c | 83 +-
tools/perf/util/sort.h | 34 +-
tools/perf/util/srccode.c | 2 +-
tools/perf/util/stat-display.c | 115 +-
tools/perf/util/stat-shadow.c | 136 +-
tools/perf/util/stat.c | 144 +-
tools/perf/util/stat.h | 49 +-
tools/perf/util/strbuf.c | 5 +
tools/perf/util/svghelper.c | 64 +-
tools/perf/util/svghelper.h | 4 +-
tools/perf/util/symbol-elf.c | 12 +-
tools/perf/util/symbol-minimal.c | 5 +-
tools/perf/util/symbol.c | 29 +-
tools/perf/util/symbol.h | 64 +-
tools/perf/util/symbol_fprintf.c | 1 +
tools/perf/util/symsrc.h | 46 +
tools/perf/util/synthetic-events.c | 1884 +
tools/perf/util/synthetic-events.h | 103 +
tools/perf/util/syscalltbl.c | 1 +
tools/perf/util/syscalltbl.h | 1 +
tools/perf/util/target.c | 5 +-
tools/perf/util/thread-stack.c | 1 +
tools/perf/util/thread.c | 25 +-
tools/perf/util/thread.h | 8 +-
tools/perf/util/thread_map.c | 137 +-
tools/perf/util/thread_map.h | 66 +-
tools/perf/util/time-utils.c | 1 -
tools/perf/util/time-utils.h | 9 +
tools/perf/util/tool.h | 10 +-
tools/perf/util/top.c | 14 +-
tools/perf/util/top.h | 12 +-
tools/perf/util/trace-event-info.c | 17 +-
tools/perf/util/trace-event-parse.c | 3 +-
tools/perf/util/trace-event-read.c | 2 -
tools/perf/util/trace-event-scripting.c | 3 +-
tools/perf/util/trace-event.c | 1 -
tools/perf/util/trace-event.h | 5 +-
tools/perf/util/trigger.h | 1 -
tools/perf/util/tsc.h | 14 +-
tools/perf/util/unwind-libdw.c | 2 +-
tools/perf/util/unwind-libunwind-local.c | 19 +-
tools/perf/util/unwind-libunwind.c | 41 +-
tools/perf/util/unwind.h | 25 +-
tools/perf/util/usage.c | 1 -
tools/perf/util/util-cxx.h | 27 -
tools/perf/util/util.c | 207 +-
tools/perf/util/util.h | 11 -
tools/perf/util/values.c | 1 +
tools/perf/util/vdso.c | 3 +-
tools/perf/util/xyarray.h | 35 -
tools/perf/util/zlib.c | 5 +-
tools/perf/util/zstd.c | 4 +-
tools/power/acpi/tools/acpidump/apfiles.c | 10 +-
tools/power/cpupower/Makefile | 14 +-
tools/power/cpupower/bench/cpufreq-bench_plot.sh | 2 +-
tools/power/cpupower/bench/cpufreq-bench_script.sh | 2 +-
tools/power/cpupower/po/de.po | 344 +-
tools/power/pm-graph/README | 6 +-
tools/power/pm-graph/bootgraph.py | 59 +-
tools/power/pm-graph/sleepgraph.8 | 8 +-
tools/power/pm-graph/sleepgraph.py | 618 +-
tools/power/x86/intel-speed-select/isst-config.c | 143 +-
tools/power/x86/intel-speed-select/isst-core.c | 51 +-
tools/power/x86/intel-speed-select/isst-display.c | 197 +-
tools/power/x86/intel-speed-select/isst.h | 11 +-
tools/power/x86/turbostat/Makefile | 3 +-
tools/power/x86/turbostat/turbostat.c | 215 +-
tools/power/x86/x86_energy_perf_policy/Makefile | 3 +-
.../x86_energy_perf_policy.8 | 2 +-
.../x86_energy_perf_policy.c | 28 +-
tools/scripts/Makefile.include | 9 +-
tools/testing/ktest/config-bisect.pl | 4 +-
tools/testing/nvdimm/dimm_devs.c | 19 +-
tools/testing/nvdimm/test/iomap.c | 1 -
tools/testing/nvdimm/test/nfit.c | 3 +-
tools/testing/nvdimm/test/nfit_test.h | 4 +-
tools/testing/selftests/.gitignore | 2 +
tools/testing/selftests/Makefile | 22 +-
tools/testing/selftests/arm64/.gitignore | 1 +
tools/testing/selftests/arm64/Makefile | 12 +
tools/testing/selftests/arm64/run_tags_test.sh | 12 +
tools/testing/selftests/arm64/tags_test.c | 31 +
tools/testing/selftests/bpf/.gitignore | 4 -
tools/testing/selftests/bpf/Makefile | 102 +-
tools/testing/selftests/bpf/bpf_endian.h | 16 +-
tools/testing/selftests/bpf/bpf_helpers.h | 49 +-
tools/testing/selftests/bpf/config | 1 +
.../testing/selftests/bpf/prog_tests/bpf_obj_id.c | 26 +-
.../selftests/bpf/prog_tests/bpf_verif_scale.c | 89 +-
.../testing/selftests/bpf/prog_tests/core_reloc.c | 385 +
.../selftests/bpf/prog_tests/flow_dissector.c | 268 +-
.../selftests/bpf/prog_tests/get_stack_raw_tp.c | 85 +-
.../testing/selftests/bpf/prog_tests/global_data.c | 20 +-
tools/testing/selftests/bpf/prog_tests/l4lb_all.c | 9 +-
tools/testing/selftests/bpf/prog_tests/map_lock.c | 38 +-
.../testing/selftests/bpf/prog_tests/pkt_access.c | 4 +-
.../selftests/bpf/prog_tests/pkt_md_access.c | 4 +-
.../selftests/bpf/prog_tests/queue_stack_map.c | 8 +-
.../selftests/bpf/prog_tests/reference_tracking.c | 19 +-
.../testing/selftests/bpf/prog_tests/send_signal.c | 52 +-
tools/testing/selftests/bpf/prog_tests/sockopt.c | 985 +
.../selftests/bpf/prog_tests/sockopt_inherit.c | 235 +
.../selftests/bpf/prog_tests/sockopt_multi.c | 332 +
.../testing/selftests/bpf/prog_tests/sockopt_sk.c | 200 +
tools/testing/selftests/bpf/prog_tests/spinlock.c | 16 +-
.../selftests/bpf/prog_tests/stacktrace_build_id.c | 7 +-
.../bpf/prog_tests/stacktrace_build_id_nmi.c | 7 +-
.../selftests/bpf/prog_tests/stacktrace_map.c | 17 +-
.../bpf/prog_tests/stacktrace_map_raw_tp.c | 9 +-
.../selftests/bpf/prog_tests/task_fd_query_rawtp.c | 3 -
.../selftests/bpf/prog_tests/task_fd_query_tp.c | 5 -
.../testing/selftests/bpf/prog_tests/tcp_estats.c | 4 +-
tools/testing/selftests/bpf/prog_tests/tcp_rtt.c | 273 +
tools/testing/selftests/bpf/prog_tests/xdp.c | 4 +-
.../selftests/bpf/prog_tests/xdp_adjust_tail.c | 4 +-
.../selftests/bpf/prog_tests/xdp_noinline.c | 11 +-
tools/testing/selftests/bpf/progs/bpf_flow.c | 60 +-
.../selftests/bpf/progs/btf__core_reloc_arrays.c | 3 +
.../progs/btf__core_reloc_arrays___diff_arr_dim.c | 3 +
.../btf__core_reloc_arrays___diff_arr_val_sz.c | 3 +
.../progs/btf__core_reloc_arrays___err_non_array.c | 3 +
.../btf__core_reloc_arrays___err_too_shallow.c | 3 +
.../progs/btf__core_reloc_arrays___err_too_small.c | 3 +
.../btf__core_reloc_arrays___err_wrong_val_type1.c | 3 +
.../btf__core_reloc_arrays___err_wrong_val_type2.c | 3 +
.../selftests/bpf/progs/btf__core_reloc_flavors.c | 3 +
.../btf__core_reloc_flavors__err_wrong_name.c | 3 +
.../selftests/bpf/progs/btf__core_reloc_ints.c | 3 +
.../bpf/progs/btf__core_reloc_ints___bool.c | 3 +
.../progs/btf__core_reloc_ints___err_bitfield.c | 3 +
.../progs/btf__core_reloc_ints___err_wrong_sz_16.c | 3 +
.../progs/btf__core_reloc_ints___err_wrong_sz_32.c | 3 +
.../progs/btf__core_reloc_ints___err_wrong_sz_64.c | 3 +
.../progs/btf__core_reloc_ints___err_wrong_sz_8.c | 3 +
.../progs/btf__core_reloc_ints___reverse_sign.c | 3 +
.../selftests/bpf/progs/btf__core_reloc_misc.c | 5 +
.../selftests/bpf/progs/btf__core_reloc_mods.c | 3 +
.../bpf/progs/btf__core_reloc_mods___mod_swap.c | 3 +
.../bpf/progs/btf__core_reloc_mods___typedefs.c | 3 +
.../selftests/bpf/progs/btf__core_reloc_nesting.c | 3 +
.../progs/btf__core_reloc_nesting___anon_embed.c | 3 +
.../btf__core_reloc_nesting___dup_compat_types.c | 5 +
...btf__core_reloc_nesting___err_array_container.c | 3 +
.../btf__core_reloc_nesting___err_array_field.c | 3 +
...__core_reloc_nesting___err_dup_incompat_types.c | 4 +
...f__core_reloc_nesting___err_missing_container.c | 3 +
.../btf__core_reloc_nesting___err_missing_field.c | 3 +
..._core_reloc_nesting___err_nonstruct_container.c | 3 +
...__core_reloc_nesting___err_partial_match_dups.c | 4 +
.../progs/btf__core_reloc_nesting___err_too_deep.c | 3 +
.../btf__core_reloc_nesting___extra_nesting.c | 3 +
.../btf__core_reloc_nesting___struct_union_mixup.c | 3 +
.../bpf/progs/btf__core_reloc_primitives.c | 3 +
.../btf__core_reloc_primitives___diff_enum_def.c | 3 +
.../btf__core_reloc_primitives___diff_func_proto.c | 3 +
.../btf__core_reloc_primitives___diff_ptr_type.c | 3 +
.../btf__core_reloc_primitives___err_non_enum.c | 3 +
.../btf__core_reloc_primitives___err_non_int.c | 3 +
.../btf__core_reloc_primitives___err_non_ptr.c | 3 +
.../bpf/progs/btf__core_reloc_ptr_as_arr.c | 3 +
.../progs/btf__core_reloc_ptr_as_arr___diff_sz.c | 3 +
.../testing/selftests/bpf/progs/core_reloc_types.h | 667 +
tools/testing/selftests/bpf/progs/loop4.c | 18 +
tools/testing/selftests/bpf/progs/loop5.c | 32 +
tools/testing/selftests/bpf/progs/sendmsg6_prog.c | 3 +-
.../testing/selftests/bpf/progs/sockopt_inherit.c | 97 +
tools/testing/selftests/bpf/progs/sockopt_sk.c | 22 +
tools/testing/selftests/bpf/progs/strobemeta.h | 5 +-
.../selftests/bpf/progs/test_core_reloc_arrays.c | 55 +
.../selftests/bpf/progs/test_core_reloc_flavors.c | 62 +
.../selftests/bpf/progs/test_core_reloc_ints.c | 44 +
.../selftests/bpf/progs/test_core_reloc_kernel.c | 36 +
.../selftests/bpf/progs/test_core_reloc_misc.c | 57 +
.../selftests/bpf/progs/test_core_reloc_mods.c | 62 +
.../selftests/bpf/progs/test_core_reloc_nesting.c | 46 +
.../bpf/progs/test_core_reloc_primitives.c | 43 +
.../bpf/progs/test_core_reloc_ptr_as_arr.c | 30 +
.../selftests/bpf/progs/test_get_stack_rawtp.c | 2 +-
.../selftests/bpf/progs/test_lwt_seg6local.c | 16 +-
tools/testing/selftests/bpf/progs/test_seg6_loop.c | 8 +-
tools/testing/selftests/bpf/progs/test_tc_edt.c | 1 +
.../bpf/progs/test_tcp_check_syncookie_kern.c | 48 +-
tools/testing/selftests/bpf/test_bpftool_build.sh | 143 +
tools/testing/selftests/bpf/test_btf_dump.c | 7 +
tools/testing/selftests/bpf/test_cgroup_storage.c | 6 +-
tools/testing/selftests/bpf/test_maps.c | 16 +
tools/testing/selftests/bpf/test_offload.py | 2 +-
tools/testing/selftests/bpf/test_progs.c | 432 +-
tools/testing/selftests/bpf/test_progs.h | 55 +-
tools/testing/selftests/bpf/test_sock.c | 7 +-
tools/testing/selftests/bpf/test_sockopt.c | 1021 -
tools/testing/selftests/bpf/test_sockopt_multi.c | 374 -
tools/testing/selftests/bpf/test_sockopt_sk.c | 211 -
tools/testing/selftests/bpf/test_sysctl.c | 140 +-
.../selftests/bpf/test_tcp_check_syncookie.sh | 3 +
.../selftests/bpf/test_tcp_check_syncookie_user.c | 61 +-
tools/testing/selftests/bpf/test_tcp_rtt.c | 254 -
tools/testing/selftests/bpf/test_tcpnotify_user.c | 90 +-
tools/testing/selftests/bpf/test_verifier.c | 80 +-
tools/testing/selftests/bpf/test_xdp_vlan.sh | 57 +-
.../selftests/bpf/test_xdp_vlan_mode_generic.sh | 9 +
.../selftests/bpf/test_xdp_vlan_mode_native.sh | 9 +
tools/testing/selftests/bpf/trace_helpers.c | 125 -
tools/testing/selftests/bpf/trace_helpers.h | 9 -
tools/testing/selftests/bpf/verifier/ctx_skb.c | 11 +
.../testing/selftests/bpf/verifier/event_output.c | 94 +
tools/testing/selftests/bpf/verifier/loops1.c | 28 +
tools/testing/selftests/bpf/verifier/precise.c | 194 +
tools/testing/selftests/cgroup/cgroup_util.c | 3 +-
tools/testing/selftests/cgroup/test_freezer.c | 54 +
.../selftests/drivers/net/mlxsw/devlink_trap.sh | 129 +
.../drivers/net/mlxsw/devlink_trap_l2_drops.sh | 477 +
.../selftests/drivers/net/mlxsw/qos_dscp_bridge.sh | 6 +-
.../selftests/drivers/net/mlxsw/qos_dscp_router.sh | 24 +-
.../selftests/drivers/net/mlxsw/qos_mc_aware.sh | 4 +-
.../selftests/drivers/net/netdevsim/devlink.sh | 114 +-
.../drivers/net/netdevsim/devlink_trap.sh | 364 +
tools/testing/selftests/firmware/fw_filesystem.sh | 57 +-
tools/testing/selftests/firmware/fw_lib.sh | 11 +
tools/testing/selftests/ftrace/test.d/functions | 2 +-
.../ftrace/test.d/kprobe/kprobe_eventname.tc | 16 +-
.../ftrace/test.d/kprobe/kprobe_multiprobe.tc | 35 +
.../ftrace/test.d/kprobe/kprobe_syntax_errors.tc | 16 +
.../ftrace/test.d/trigger/trigger-snapshot.tc | 2 +-
tools/testing/selftests/ir/ir_loopback.c | 6 +-
.../selftests/kexec/test_kexec_file_load.sh | 38 +-
tools/testing/selftests/kmod/kmod.sh | 6 +-
tools/testing/selftests/kselftest.h | 15 +
tools/testing/selftests/kvm/.gitignore | 3 +-
tools/testing/selftests/kvm/Makefile | 10 +-
tools/testing/selftests/kvm/config | 3 +
tools/testing/selftests/kvm/dirty_log_test.c | 140 +-
tools/testing/selftests/kvm/include/evmcs.h | 2 +
tools/testing/selftests/kvm/include/kvm_util.h | 26 +-
.../selftests/kvm/include/x86_64/processor.h | 3 +
.../testing/selftests/kvm/lib/aarch64/processor.c | 3 +
tools/testing/selftests/kvm/lib/aarch64/ucall.c | 112 +
tools/testing/selftests/kvm/lib/kvm_util.c | 67 +-
tools/testing/selftests/kvm/lib/s390x/ucall.c | 56 +
tools/testing/selftests/kvm/lib/ucall.c | 157 -
tools/testing/selftests/kvm/lib/x86_64/processor.c | 46 +-
tools/testing/selftests/kvm/lib/x86_64/ucall.c | 56 +
tools/testing/selftests/kvm/lib/x86_64/vmx.c | 20 +
tools/testing/selftests/kvm/s390x/memop.c | 166 +
tools/testing/selftests/kvm/s390x/sync_regs_test.c | 36 +-
tools/testing/selftests/kvm/x86_64/evmcs_test.c | 15 +-
tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | 39 +-
.../selftests/kvm/x86_64/platform_info_test.c | 2 +-
.../kvm/x86_64/vmx_set_nested_state_test.c | 32 +-
tools/testing/selftests/livepatch/config | 2 +
tools/testing/selftests/livepatch/functions.sh | 46 +-
tools/testing/selftests/membarrier/.gitignore | 3 +-
tools/testing/selftests/membarrier/Makefile | 5 +-
.../testing/selftests/membarrier/membarrier_test.c | 313 -
.../selftests/membarrier/membarrier_test_impl.h | 317 +
.../membarrier/membarrier_test_multi_thread.c | 73 +
.../membarrier/membarrier_test_single_thread.c | 24 +
tools/testing/selftests/net/.gitignore | 4 +-
tools/testing/selftests/net/Makefile | 4 +-
tools/testing/selftests/net/fcnal-test.sh | 3432 ++
.../selftests/net/fib_nexthop_multiprefix.sh | 6 +-
tools/testing/selftests/net/fib_nexthops.sh | 38 +-
tools/testing/selftests/net/fib_tests.sh | 21 +-
.../selftests/net/forwarding/devlink_lib.sh | 189 +-
.../selftests/net/forwarding/gre_multipath.sh | 28 +-
tools/testing/selftests/net/forwarding/lib.sh | 19 +
.../testing/selftests/net/forwarding/tc_common.sh | 17 +-
tools/testing/selftests/net/l2tp.sh | 382 +
tools/testing/selftests/net/nettest.c | 1757 +
.../selftests/net/tcp_fastopen_backup_key.sh | 2 +-
tools/testing/selftests/net/tls.c | 223 +
tools/testing/selftests/net/xfrm_policy.sh | 7 +
tools/testing/selftests/netfilter/nft_flowtable.sh | 48 +
tools/testing/selftests/pidfd/.gitignore | 2 +
tools/testing/selftests/pidfd/Makefile | 2 +-
tools/testing/selftests/pidfd/pidfd.h | 30 +
tools/testing/selftests/pidfd/pidfd_open_test.c | 5 -
tools/testing/selftests/pidfd/pidfd_poll_test.c | 117 +
tools/testing/selftests/pidfd/pidfd_test.c | 20 +-
tools/testing/selftests/pidfd/pidfd_wait.c | 271 +
tools/testing/selftests/powerpc/Makefile | 1 +
.../testing/selftests/powerpc/copyloops/.gitignore | 9 +-
tools/testing/selftests/powerpc/copyloops/Makefile | 7 +-
.../selftests/powerpc/copyloops/asm/export.h | 1 +
.../selftests/powerpc/copyloops/memcpy_mcsafe_64.S | 1 +
tools/testing/selftests/powerpc/eeh/Makefile | 9 +
tools/testing/selftests/powerpc/eeh/eeh-basic.sh | 82 +
.../testing/selftests/powerpc/eeh/eeh-functions.sh | 76 +
tools/testing/selftests/powerpc/mm/Makefile | 2 +
tools/testing/selftests/powerpc/mm/tlbie_test.c | 734 +
tools/testing/selftests/powerpc/ptrace/.gitignore | 3 +
.../testing/selftests/powerpc/security/.gitignore | 1 +
.../selftests/powerpc/stringloops/.gitignore | 5 +-
tools/testing/selftests/powerpc/tm/.gitignore | 1 +
tools/testing/selftests/powerpc/tm/Makefile | 2 +-
tools/testing/selftests/powerpc/tm/tm-poison.c | 179 +
.../powerpc/tm/tm-signal-context-chk-fpu.c | 49 +-
.../powerpc/tm/tm-signal-context-chk-gpr.c | 59 +-
.../powerpc/tm/tm-signal-context-chk-vmx.c | 74 +-
.../powerpc/tm/tm-signal-context-chk-vsx.c | 130 +-
tools/testing/selftests/powerpc/tm/tm.h | 3 +-
.../selftests/rcutorture/bin/kvm-test-1-run.sh | 2 +-
.../selftests/rcutorture/configs/rcu/TREE03.boot | 1 +
tools/testing/selftests/seccomp/seccomp_bpf.c | 5 +
tools/testing/selftests/tc-testing/README | 4 +-
.../selftests/tc-testing/plugin-lib/nsPlugin.py | 22 +-
.../tc-testing/tc-tests/actions/skbedit.json | 47 +
.../tc-testing/tc-tests/actions/vlan.json | 94 +
.../tc-testing/tc-tests/filters/concurrency.json | 18 +-
.../tc-testing/tc-tests/filters/matchall.json | 391 +
.../selftests/tc-testing/tc-tests/qdiscs/fifo.json | 304 +
.../tc-testing/tc-tests/qdiscs/ingress.json | 50 +-
.../selftests/tc-testing/tc-tests/qdiscs/prio.json | 128 +-
tools/testing/selftests/tc-testing/tdc.py | 12 +-
tools/testing/selftests/tc-testing/tdc_config.py | 1 +
tools/testing/selftests/tpm2/Makefile | 1 +
tools/testing/selftests/watchdog/watchdog-test.c | 41 +-
tools/testing/selftests/x86/Makefile | 4 +-
tools/testing/selftests/x86/mpx-debug.h | 15 -
tools/testing/selftests/x86/mpx-dig.c | 497 -
tools/testing/selftests/x86/mpx-hw.h | 124 -
tools/testing/selftests/x86/mpx-mini-test.c | 1613 -
tools/testing/selftests/x86/mpx-mm.h | 10 -
tools/testing/selftests/x86/syscall_numbering.c | 89 +
tools/testing/selftests/x86/test_vsyscall.c | 2 +-
tools/usb/usbip/libsrc/usbip_common.c | 6 +-
tools/usb/usbip/libsrc/usbip_device_driver.c | 6 +-
usr/Makefile | 3 +
usr/include/Makefile | 9 +-
virt/kvm/arm/arm.c | 22 +-
virt/kvm/arm/hyp/vgic-v3-sr.c | 8 +
virt/kvm/arm/mmio.c | 7 +
virt/kvm/arm/pmu.c | 18 +-
virt/kvm/arm/vgic/vgic-init.c | 38 +-
virt/kvm/arm/vgic/vgic-irqfd.c | 36 +-
virt/kvm/arm/vgic/vgic-its.c | 207 +
virt/kvm/arm/vgic/vgic-mmio-v3.c | 87 +-
virt/kvm/arm/vgic/vgic-mmio.c | 34 +
virt/kvm/arm/vgic/vgic-v2.c | 21 +-
virt/kvm/arm/vgic/vgic-v3.c | 19 +-
virt/kvm/arm/vgic/vgic.c | 44 +-
virt/kvm/arm/vgic/vgic.h | 11 +-
virt/kvm/coalesced_mmio.c | 19 +-
virt/kvm/kvm_main.c | 68 +-
12922 files changed, 800470 insertions(+), 402523 deletions(-)
create mode 100644 Documentation/ABI/testing/debugfs-hisi-zip
create mode 100644 Documentation/ABI/testing/debugfs-moxtet
create mode 100644 Documentation/ABI/testing/sysfs-bus-moxtet-devices
create mode 100644 Documentation/ABI/testing/sysfs-class-backlight
rename Documentation/ABI/testing/{sysfs-class-mic.txt => sysfs-class-mic} (100%)
create mode 100644 Documentation/ABI/testing/sysfs-class-wakeup
create mode 100644 Documentation/ABI/testing/sysfs-devices-platform-stratix10-rsu
create mode 100644 Documentation/ABI/testing/sysfs-firmware-turris-mox-rwtm
create mode 100644 Documentation/ABI/testing/sysfs-kernel-btf
rename Documentation/PCI/{picebus-howto.rst => pciebus-howto.rst} (100%)
delete mode 100644 Documentation/acpi/dsd/leds.txt
create mode 100644 Documentation/admin-guide/auxdisplay/cfag12864b.rst
create mode 100644 Documentation/admin-guide/auxdisplay/index.rst
create mode 100644 Documentation/admin-guide/auxdisplay/ks0108.rst
create mode 100644 Documentation/admin-guide/cifs/authors.rst
create mode 100644 Documentation/admin-guide/cifs/changes.rst
create mode 100644 Documentation/admin-guide/cifs/index.rst
create mode 100644 Documentation/admin-guide/cifs/introduction.rst
create mode 100644 Documentation/admin-guide/cifs/todo.rst
create mode 100644 Documentation/admin-guide/cifs/usage.rst
rename Documentation/{filesystems => admin-guide}/cifs/winucase_convert.pl (100%)
delete mode 100644 Documentation/admin-guide/conf.py
create mode 100644 Documentation/admin-guide/device-mapper/dm-clone.rst
create mode 100644 Documentation/admin-guide/jfs.rst
create mode 100644 Documentation/admin-guide/perf/imx-ddr.rst
create mode 100644 Documentation/admin-guide/ufs.rst
create mode 100644 Documentation/admin-guide/wimax/i2400m.rst
create mode 100644 Documentation/admin-guide/wimax/index.rst
create mode 100644 Documentation/admin-guide/wimax/wimax.rst
delete mode 100644 Documentation/arm/sa1100/adsbitsy.rst
delete mode 100644 Documentation/arm/sa1100/brutus.rst
delete mode 100644 Documentation/arm/sa1100/freebird.rst
delete mode 100644 Documentation/arm/sa1100/graphicsclient.rst
delete mode 100644 Documentation/arm/sa1100/graphicsmaster.rst
delete mode 100644 Documentation/arm/sa1100/huw_webpanel.rst
delete mode 100644 Documentation/arm/sa1100/itsy.rst
delete mode 100644 Documentation/arm/sa1100/nanoengine.rst
delete mode 100644 Documentation/arm/sa1100/pangolin.rst
delete mode 100644 Documentation/arm/sa1100/pleb.rst
delete mode 100644 Documentation/arm/sa1100/tifon.rst
delete mode 100644 Documentation/arm/sa1100/yopy.rst
delete mode 100644 Documentation/arm/sh-mobile/.gitignore
create mode 100644 Documentation/arm64/kasan-offsets.sh
create mode 100644 Documentation/arm64/tagged-address-abi.rst
delete mode 100644 Documentation/auxdisplay/cfag12864b
delete mode 100644 Documentation/auxdisplay/ks0108
delete mode 100644 Documentation/core-api/conf.py
create mode 100644 Documentation/core-api/packing.rst
delete mode 100644 Documentation/crypto/conf.py
delete mode 100644 Documentation/dev-tools/conf.py
delete mode 100644 Documentation/devicetree/bindings/arm/actions.txt
create mode 100644 Documentation/devicetree/bindings/arm/actions.yaml
delete mode 100644 Documentation/devicetree/bindings/arm/amlogic/amlogic,meson-gx-ao-secure.txt
create mode 100644 Documentation/devicetree/bindings/arm/amlogic/amlogic,meson-gx-ao-secure.yaml
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,ipesys.txt
delete mode 100644 Documentation/devicetree/bindings/arm/realtek.txt
create mode 100644 Documentation/devicetree/bindings/arm/realtek.yaml
delete mode 100644 Documentation/devicetree/bindings/arm/topology.txt
create mode 100644 Documentation/devicetree/bindings/bus/allwinner,sun50i-a64-de2.yaml
create mode 100644 Documentation/devicetree/bindings/bus/moxtet.txt
delete mode 100644 Documentation/devicetree/bindings/bus/sun50i-de2-bus.txt
create mode 100644 Documentation/devicetree/bindings/clock/imx8mn-clock.yaml
rename Documentation/devicetree/bindings/clock/{emev2-clock.txt => renesas,emev2-smu.txt} (100%)
create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3308-cru.txt
create mode 100644 Documentation/devicetree/bindings/cpu/cpu-topology.txt
create mode 100644 Documentation/devicetree/bindings/crypto/allwinner,sun4i-a10-crypto.yaml
delete mode 100644 Documentation/devicetree/bindings/crypto/sun4i-ss.txt
delete mode 100644 Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.txt
create mode 100644 Documentation/devicetree/bindings/display/amlogic,meson-dw-hdmi.yaml
delete mode 100644 Documentation/devicetree/bindings/display/amlogic,meson-vpu.txt
create mode 100644 Documentation/devicetree/bindings/display/amlogic,meson-vpu.yaml
delete mode 100644 Documentation/devicetree/bindings/display/panel/ampire,am-480272h3tmqw-t01h.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/ampire,am-480272h3tmqw-t01h.yaml
delete mode 100644 Documentation/devicetree/bindings/display/panel/armadeus,st0700-adapt.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/armadeus,st0700-adapt.yaml
delete mode 100644 Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16.yaml
create mode 100644 Documentation/devicetree/bindings/display/panel/boe,himax8279d.txt
delete mode 100644 Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.yaml
create mode 100644 Documentation/devicetree/bindings/display/panel/giantplus,gpm940b0.txt
delete mode 100644 Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
create mode 100644 Documentation/devicetree/bindings/display/panel/kingdisplay,kd035g6-54nt.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/lvds.yaml
delete mode 100644 Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
delete mode 100644 Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
create mode 100644 Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml
create mode 100644 Documentation/devicetree/bindings/display/panel/ortustech,com37h3m05dtc.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/ortustech,com37h3m99dtc.txt
delete mode 100644 Documentation/devicetree/bindings/display/panel/panel-common.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/panel-common.yaml
delete mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.txt
delete mode 100644 Documentation/devicetree/bindings/display/panel/panel.txt
delete mode 100644 Documentation/devicetree/bindings/display/panel/pda,91-00156-a0.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/pda,91-00156-a0.yaml
delete mode 100644 Documentation/devicetree/bindings/display/panel/raspberrypi,7inch-touchscreen.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/raspberrypi,7inch-touchscreen.yaml
create mode 100644 Documentation/devicetree/bindings/display/panel/raydium,rm67191.txt
delete mode 100644 Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
create mode 100644 Documentation/devicetree/bindings/display/panel/sharp,ld-d5116z01b.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/sharp,lq070y3dg3b.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/sharp,ls020b1dd01d.txt
delete mode 100644 Documentation/devicetree/bindings/display/panel/tfc,s9700rtwv43tr-01b.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/tfc,s9700rtwv43tr-01b.yaml
create mode 100644 Documentation/devicetree/bindings/display/panel/ti,nspire.yaml
delete mode 100644 Documentation/devicetree/bindings/display/panel/tpo,tpg110.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/tpo,tpg110.yaml
create mode 100644 Documentation/devicetree/bindings/dma/allwinner,sun4i-a10-dma.yaml
create mode 100644 Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml
create mode 100644 Documentation/devicetree/bindings/dma/allwinner,sun6i-a31-dma.yaml
create mode 100644 Documentation/devicetree/bindings/dma/dma-common.yaml
create mode 100644 Documentation/devicetree/bindings/dma/dma-controller.yaml
create mode 100644 Documentation/devicetree/bindings/dma/dma-router.yaml
rename Documentation/devicetree/bindings/dma/{nbpfaxi.txt => renesas,nbpfaxi.txt} (100%)
rename Documentation/devicetree/bindings/dma/{shdma.txt => renesas,shdma.txt} (100%)
delete mode 100644 Documentation/devicetree/bindings/dma/sun4i-dma.txt
delete mode 100644 Documentation/devicetree/bindings/dma/sun6i-dma.txt
create mode 100644 Documentation/devicetree/bindings/firmware/cznic,turris-mox-rwtm.txt
create mode 100644 Documentation/devicetree/bindings/fpga/fpga-bridge.txt
create mode 100644 Documentation/devicetree/bindings/gpio/gpio-moxtet.txt
create mode 100644 Documentation/devicetree/bindings/gpio/sgpio-aspeed.txt
delete mode 100644 Documentation/devicetree/bindings/gpu/arm,mali-bifrost.txt
create mode 100644 Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
delete mode 100644 Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
create mode 100644 Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml
delete mode 100644 Documentation/devicetree/bindings/gpu/arm,mali-utgard.txt
create mode 100644 Documentation/devicetree/bindings/gpu/arm,mali-utgard.yaml
create mode 100644 Documentation/devicetree/bindings/hwmon/as370.txt
rename Documentation/devicetree/bindings/i2c/{i2c-rcar.txt => renesas,i2c.txt} (100%)
rename Documentation/devicetree/bindings/i2c/{i2c-emev2.txt => renesas,iic-emev2.txt} (100%)
rename Documentation/devicetree/bindings/i2c/{i2c-sh_mobile.txt => renesas,iic.txt} (100%)
rename Documentation/devicetree/bindings/i2c/{i2c-riic.txt => renesas,riic.txt} (100%)
create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
delete mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
rename Documentation/devicetree/bindings/{hwmon => iio/adc}/ads1015.txt (100%)
create mode 100644 Documentation/devicetree/bindings/iio/adc/allwinner,sun8i-a33-ths.yaml
delete mode 100644 Documentation/devicetree/bindings/iio/chemical/plantower,pms7003.txt
create mode 100644 Documentation/devicetree/bindings/iio/chemical/plantower,pms7003.yaml
create mode 100644 Documentation/devicetree/bindings/iio/imu/adi,adis16460.yaml
create mode 100644 Documentation/devicetree/bindings/iio/light/noa1305.yaml
rename Documentation/devicetree/bindings/iio/light/{isl29501.txt => renesas,isl29501.txt} (100%)
create mode 100644 Documentation/devicetree/bindings/iio/light/stk33xx.yaml
create mode 100644 Documentation/devicetree/bindings/iio/mount-matrix.txt
create mode 100644 Documentation/devicetree/bindings/iio/potentiometer/max5432.yaml
create mode 100644 Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml
delete mode 100644 Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,qcs404.txt
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-a10-ic.yaml
delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/allwinner,sun7i-a20-sc-nmi.yaml
delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/allwinner,sunxi-nmi.txt
create mode 100644 Documentation/devicetree/bindings/mailbox/amlogic,meson-gxbb-mhu.yaml
delete mode 100644 Documentation/devicetree/bindings/mailbox/meson-mhu.txt
create mode 100644 Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
create mode 100644 Documentation/devicetree/bindings/media/allwinner,sun4i-a10-ir.yaml
create mode 100644 Documentation/devicetree/bindings/media/rc.yaml
rename Documentation/devicetree/bindings/media/{renesas,rcar-csi2.txt => renesas,csi2.txt} (100%)
rename Documentation/devicetree/bindings/media/{rcar_imr.txt => renesas,imr.txt} (100%)
rename Documentation/devicetree/bindings/media/{rcar_vin.txt => renesas,vin.txt} (100%)
delete mode 100644 Documentation/devicetree/bindings/media/sunxi-ir.txt
rename Documentation/devicetree/bindings/memory-controllers/{renesas-memory-controllers.txt => renesas,dbsc.txt} (100%)
create mode 100644 Documentation/devicetree/bindings/mfd/allwinner,sun4i-a10-ts.yaml
delete mode 100644 Documentation/devicetree/bindings/mfd/sun4i-gpadc.txt
create mode 100644 Documentation/devicetree/bindings/misc/intel,ixp4xx-ahb-queue-manager.yaml
delete mode 100644 Documentation/devicetree/bindings/misc/intel,ixp4xx-queue-manager.yaml
create mode 100644 Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml
create mode 100644 Documentation/devicetree/bindings/mtd/mxic-nand.txt
create mode 100644 Documentation/devicetree/bindings/net/adi,adin.yaml
create mode 100644 Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml
create mode 100644 Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml
create mode 100644 Documentation/devicetree/bindings/net/can/tcan4x5x.txt
delete mode 100644 Documentation/devicetree/bindings/net/meson-dwmac.txt
create mode 100644 Documentation/devicetree/bindings/nvmem/nvmem-consumer.yaml
create mode 100644 Documentation/devicetree/bindings/nvmem/nvmem.yaml
delete mode 100644 Documentation/devicetree/bindings/opp/kryo-cpufreq.txt
create mode 100644 Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt
create mode 100644 Documentation/devicetree/bindings/opp/qcom-opp.txt
create mode 100644 Documentation/devicetree/bindings/opp/sun50i-nvmem-cpufreq.txt
create mode 100644 Documentation/devicetree/bindings/pci/nvidia,tegra194-pcie.txt
create mode 100644 Documentation/devicetree/bindings/pci/pcie-al.txt
create mode 100644 Documentation/devicetree/bindings/phy/amlogic,meson-g12a-usb2-phy.yaml
create mode 100644 Documentation/devicetree/bindings/phy/amlogic,meson-g12a-usb3-pcie-phy.yaml
create mode 100644 Documentation/devicetree/bindings/phy/lantiq,vrx200-pcie-phy.yaml
delete mode 100644 Documentation/devicetree/bindings/phy/meson-g12a-usb2-phy.txt
delete mode 100644 Documentation/devicetree/bindings/phy/meson-g12a-usb3-pcie-phy.txt
create mode 100644 Documentation/devicetree/bindings/phy/phy-tegra194-p2u.txt
create mode 100644 Documentation/devicetree/bindings/pinctrl/aspeed,ast2600-pinctrl.yaml
create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,sc7180-pinctrl.txt
create mode 100644 Documentation/devicetree/bindings/power/amlogic,meson-ee-pwrc.yaml
create mode 100644 Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt
delete mode 100644 Documentation/devicetree/bindings/pwm/ingenic,jz47xx-pwm.txt
create mode 100644 Documentation/devicetree/bindings/pwm/pwm-sprd.txt
create mode 100644 Documentation/devicetree/bindings/regulator/mt6358-regulator.txt
create mode 100644 Documentation/devicetree/bindings/regulator/sy8824x.txt
delete mode 100644 Documentation/devicetree/bindings/reset/amlogic,meson-reset.txt
create mode 100644 Documentation/devicetree/bindings/reset/amlogic,meson-reset.yaml
create mode 100644 Documentation/devicetree/bindings/reset/snps,dw-reset.txt
delete mode 100644 Documentation/devicetree/bindings/riscv/cpus.txt
delete mode 100644 Documentation/devicetree/bindings/rng/amlogic,meson-rng.txt
create mode 100644 Documentation/devicetree/bindings/rng/amlogic,meson-rng.yaml
create mode 100644 Documentation/devicetree/bindings/rtc/rtc-fsl-ftm-alarm.txt
create mode 100644 Documentation/devicetree/bindings/rtc/rtc-meson-vrtc.txt
delete mode 100644 Documentation/devicetree/bindings/serial/amlogic,meson-uart.txt
create mode 100644 Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
create mode 100644 Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.txt
delete mode 100644 Documentation/devicetree/bindings/serial/sifive-serial.txt
create mode 100644 Documentation/devicetree/bindings/serial/sifive-serial.yaml
create mode 100644 Documentation/devicetree/bindings/sound/adi,adau7118.yaml
create mode 100644 Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-codec.yaml
create mode 100644 Documentation/devicetree/bindings/sound/allwinner,sun8i-a23-codec-analog.yaml
create mode 100644 Documentation/devicetree/bindings/sound/fsl,mqs.txt
delete mode 100644 Documentation/devicetree/bindings/sound/samsung,odroid.txt
create mode 100644 Documentation/devicetree/bindings/sound/samsung,odroid.yaml
delete mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.txt
create mode 100644 Documentation/devicetree/bindings/sound/samsung-i2s.yaml
delete mode 100644 Documentation/devicetree/bindings/sound/sun4i-codec.txt
delete mode 100644 Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt
create mode 100644 Documentation/devicetree/bindings/sound/tas2562.txt
create mode 100644 Documentation/devicetree/bindings/sound/tas2770.txt
create mode 100644 Documentation/devicetree/bindings/soundwire/soundwire-controller.yaml
create mode 100644 Documentation/devicetree/bindings/spi/amlogic,meson-gx-spicc.yaml
create mode 100644 Documentation/devicetree/bindings/spi/amlogic,meson6-spifc.yaml
create mode 100644 Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.txt
delete mode 100644 Documentation/devicetree/bindings/spi/spi-meson.txt
create mode 100644 Documentation/devicetree/bindings/timer/allwinner,sun4i-a10-timer.yaml
delete mode 100644 Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt
delete mode 100644 Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.txt
create mode 100644 Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.yaml
create mode 100644 Documentation/devicetree/bindings/timer/ingenic,tcu.txt
create mode 100644 Documentation/devicetree/bindings/usb/cdns-usb3.txt
rename Documentation/devicetree/bindings/usb/{renesas,usb3.txt => renesas,usb3-peri.txt} (100%)
create mode 100644 Documentation/devicetree/bindings/usb/usb-conn-gpio.txt
create mode 100644 Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml
create mode 100644 Documentation/devicetree/bindings/watchdog/amlogic,meson-gxbb-wdt.yaml
create mode 100644 Documentation/devicetree/bindings/watchdog/fsl-imx7ulp-wdt.txt
delete mode 100644 Documentation/devicetree/bindings/watchdog/ingenic,jz4740-wdt.txt
delete mode 100644 Documentation/devicetree/bindings/watchdog/meson-gxbb-wdt.txt
delete mode 100644 Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
create mode 100644 Documentation/devicetree/bindings/watchdog/watchdog.yaml
delete mode 100644 Documentation/devicetree/writing-schema.md
create mode 100644 Documentation/devicetree/writing-schema.rst
delete mode 100644 Documentation/doc-guide/conf.py
delete mode 100644 Documentation/driver-api/80211/conf.py
delete mode 100644 Documentation/driver-api/conf.py
delete mode 100644 Documentation/driver-api/pm/conf.py
delete mode 100644 Documentation/driver-api/sgi-ioc4.rst
rename Documentation/{ => driver-api}/thermal/cpu-cooling-api.rst (100%)
rename Documentation/{ => driver-api}/thermal/exynos_thermal.rst (100%)
rename Documentation/{ => driver-api}/thermal/exynos_thermal_emulation.rst (100%)
create mode 100644 Documentation/driver-api/thermal/index.rst
rename Documentation/{ => driver-api}/thermal/intel_powerclamp.rst (100%)
rename Documentation/{ => driver-api}/thermal/nouveau_thermal.rst (100%)
rename Documentation/{ => driver-api}/thermal/power_allocator.rst (100%)
create mode 100644 Documentation/driver-api/thermal/sysfs-api.rst
create mode 100644 Documentation/driver-api/thermal/x86_pkg_temperature_thermal.rst
delete mode 100644 Documentation/features/locking/rwsem-optimized/arch-support.txt
delete mode 100644 Documentation/filesystems/Locking
delete mode 100644 Documentation/filesystems/cifs/AUTHORS
delete mode 100644 Documentation/filesystems/cifs/CHANGES
delete mode 100644 Documentation/filesystems/cifs/README
delete mode 100644 Documentation/filesystems/cifs/TODO
delete mode 100644 Documentation/filesystems/cifs/cifs.txt
create mode 100644 Documentation/filesystems/cifs/cifsroot.txt
delete mode 100644 Documentation/filesystems/conf.py
delete mode 100644 Documentation/filesystems/directory-locking
create mode 100644 Documentation/filesystems/directory-locking.rst
create mode 100644 Documentation/filesystems/erofs.txt
create mode 100644 Documentation/filesystems/ext4/verity.rst
create mode 100644 Documentation/filesystems/fsverity.rst
delete mode 100644 Documentation/filesystems/jfs.txt
create mode 100644 Documentation/filesystems/locking.rst
delete mode 100644 Documentation/filesystems/nfs/Exporting
create mode 100644 Documentation/filesystems/nfs/exporting.rst
delete mode 100644 Documentation/filesystems/porting
create mode 100644 Documentation/filesystems/porting.rst
delete mode 100644 Documentation/filesystems/ubifs-authentication.md
create mode 100644 Documentation/filesystems/ubifs-authentication.rst
delete mode 100644 Documentation/filesystems/ufs.txt
create mode 100644 Documentation/filesystems/virtiofs.rst
create mode 100644 Documentation/firmware-guide/acpi/dsd/leds.rst
delete mode 100644 Documentation/gpu/conf.py
delete mode 100644 Documentation/gpu/tinydrm.rst
delete mode 100644 Documentation/hwmon/ads1015.rst
create mode 100644 Documentation/hwmon/inspur-ipsps1.rst
delete mode 100644 Documentation/hwmon/pxe1610
create mode 100644 Documentation/hwmon/pxe1610.rst
delete mode 100644 Documentation/i2c/busses/i2c-ali1535
create mode 100644 Documentation/i2c/busses/i2c-ali1535.rst
delete mode 100644 Documentation/i2c/busses/i2c-ali1563
create mode 100644 Documentation/i2c/busses/i2c-ali1563.rst
delete mode 100644 Documentation/i2c/busses/i2c-ali15x3
create mode 100644 Documentation/i2c/busses/i2c-ali15x3.rst
delete mode 100644 Documentation/i2c/busses/i2c-amd-mp2
create mode 100644 Documentation/i2c/busses/i2c-amd-mp2.rst
delete mode 100644 Documentation/i2c/busses/i2c-amd756
create mode 100644 Documentation/i2c/busses/i2c-amd756.rst
delete mode 100644 Documentation/i2c/busses/i2c-amd8111
create mode 100644 Documentation/i2c/busses/i2c-amd8111.rst
delete mode 100644 Documentation/i2c/busses/i2c-diolan-u2c
create mode 100644 Documentation/i2c/busses/i2c-diolan-u2c.rst
delete mode 100644 Documentation/i2c/busses/i2c-i801
create mode 100644 Documentation/i2c/busses/i2c-i801.rst
delete mode 100644 Documentation/i2c/busses/i2c-ismt
create mode 100644 Documentation/i2c/busses/i2c-ismt.rst
delete mode 100644 Documentation/i2c/busses/i2c-mlxcpld
create mode 100644 Documentation/i2c/busses/i2c-mlxcpld.rst
delete mode 100644 Documentation/i2c/busses/i2c-nforce2
create mode 100644 Documentation/i2c/busses/i2c-nforce2.rst
delete mode 100644 Documentation/i2c/busses/i2c-nvidia-gpu
create mode 100644 Documentation/i2c/busses/i2c-nvidia-gpu.rst
delete mode 100644 Documentation/i2c/busses/i2c-ocores
create mode 100644 Documentation/i2c/busses/i2c-ocores.rst
delete mode 100644 Documentation/i2c/busses/i2c-parport
delete mode 100644 Documentation/i2c/busses/i2c-parport-light
create mode 100644 Documentation/i2c/busses/i2c-parport-light.rst
create mode 100644 Documentation/i2c/busses/i2c-parport.rst
delete mode 100644 Documentation/i2c/busses/i2c-pca-isa
create mode 100644 Documentation/i2c/busses/i2c-pca-isa.rst
delete mode 100644 Documentation/i2c/busses/i2c-piix4
create mode 100644 Documentation/i2c/busses/i2c-piix4.rst
delete mode 100644 Documentation/i2c/busses/i2c-sis5595
create mode 100644 Documentation/i2c/busses/i2c-sis5595.rst
delete mode 100644 Documentation/i2c/busses/i2c-sis630
create mode 100644 Documentation/i2c/busses/i2c-sis630.rst
delete mode 100644 Documentation/i2c/busses/i2c-sis96x
create mode 100644 Documentation/i2c/busses/i2c-sis96x.rst
delete mode 100644 Documentation/i2c/busses/i2c-taos-evm
create mode 100644 Documentation/i2c/busses/i2c-taos-evm.rst
delete mode 100644 Documentation/i2c/busses/i2c-via
create mode 100644 Documentation/i2c/busses/i2c-via.rst
delete mode 100644 Documentation/i2c/busses/i2c-viapro
create mode 100644 Documentation/i2c/busses/i2c-viapro.rst
create mode 100644 Documentation/i2c/busses/index.rst
delete mode 100644 Documentation/i2c/busses/scx200_acb
create mode 100644 Documentation/i2c/busses/scx200_acb.rst
delete mode 100644 Documentation/i2c/dev-interface
create mode 100644 Documentation/i2c/dev-interface.rst
rename Documentation/i2c/{DMA-considerations => dma-considerations.rst} (100%)
delete mode 100644 Documentation/i2c/fault-codes
create mode 100644 Documentation/i2c/fault-codes.rst
delete mode 100644 Documentation/i2c/functionality
create mode 100644 Documentation/i2c/functionality.rst
delete mode 100644 Documentation/i2c/gpio-fault-injection
create mode 100644 Documentation/i2c/gpio-fault-injection.rst
delete mode 100644 Documentation/i2c/i2c-protocol
create mode 100644 Documentation/i2c/i2c-protocol.rst
delete mode 100644 Documentation/i2c/i2c-stub
create mode 100644 Documentation/i2c/i2c-stub.rst
delete mode 100644 Documentation/i2c/i2c-topology
create mode 100644 Documentation/i2c/i2c-topology.rst
create mode 100644 Documentation/i2c/index.rst
delete mode 100644 Documentation/i2c/instantiating-devices
create mode 100644 Documentation/i2c/instantiating-devices.rst
delete mode 100644 Documentation/i2c/muxes/i2c-mux-gpio
create mode 100644 Documentation/i2c/muxes/i2c-mux-gpio.rst
delete mode 100644 Documentation/i2c/old-module-parameters
create mode 100644 Documentation/i2c/old-module-parameters.rst
delete mode 100644 Documentation/i2c/slave-eeprom-backend
create mode 100644 Documentation/i2c/slave-eeprom-backend.rst
delete mode 100644 Documentation/i2c/slave-interface
create mode 100644 Documentation/i2c/slave-interface.rst
delete mode 100644 Documentation/i2c/smbus-protocol
create mode 100644 Documentation/i2c/smbus-protocol.rst
delete mode 100644 Documentation/i2c/summary
create mode 100644 Documentation/i2c/summary.rst
delete mode 100644 Documentation/i2c/ten-bit-addresses
create mode 100644 Documentation/i2c/ten-bit-addresses.rst
delete mode 100644 Documentation/i2c/upgrading-clients
create mode 100644 Documentation/i2c/upgrading-clients.rst
delete mode 100644 Documentation/i2c/writing-clients
create mode 100644 Documentation/i2c/writing-clients.rst
delete mode 100644 Documentation/input/conf.py
delete mode 100644 Documentation/isdn/CREDITS
delete mode 100644 Documentation/isdn/INTERFACE.CAPI
delete mode 100644 Documentation/isdn/README.avmb1
delete mode 100644 Documentation/isdn/README.gigaset
delete mode 100644 Documentation/isdn/README.hysdn
delete mode 100644 Documentation/isdn/README.mISDN
create mode 100644 Documentation/isdn/avmb1.rst
create mode 100644 Documentation/isdn/credits.rst
create mode 100644 Documentation/isdn/gigaset.rst
create mode 100644 Documentation/isdn/hysdn.rst
create mode 100644 Documentation/isdn/index.rst
create mode 100644 Documentation/isdn/interface_capi.rst
create mode 100644 Documentation/isdn/m_isdn.rst
create mode 100644 Documentation/kbuild/namespaces.rst
create mode 100644 Documentation/kbuild/reproducible-builds.rst
delete mode 100644 Documentation/kernel-hacking/conf.py
delete mode 100644 Documentation/m68k/README.buddha
create mode 100644 Documentation/m68k/buddha-driver.rst
delete mode 100644 Documentation/maintainer/conf.py
delete mode 100644 Documentation/media/conf.py
create mode 100644 Documentation/media/uapi/rc/rc-protos.rst
create mode 100644 Documentation/media/uapi/v4l/dev-decoder.rst
create mode 100644 Documentation/media/uapi/v4l/pixfmt-bayer.rst
delete mode 100644 Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst
delete mode 100644 Documentation/mips/AU1xxx_IDE.README
create mode 100644 Documentation/mips/au1xxx_ide.rst
create mode 100644 Documentation/mips/index.rst
create mode 100644 Documentation/mips/ingenic-tcu.rst
delete mode 100644 Documentation/networking/caif/README
create mode 100644 Documentation/networking/caif/caif.rst
delete mode 100644 Documentation/networking/conf.py
create mode 100644 Documentation/networking/device_drivers/netronome/nfp.rst
create mode 100644 Documentation/networking/device_drivers/pensando/ionic.rst
create mode 100644 Documentation/networking/devlink-params-nfp.txt
create mode 100644 Documentation/networking/devlink-trap-netdevsim.rst
create mode 100644 Documentation/networking/devlink-trap.rst
create mode 100644 Documentation/networking/j1939.rst
delete mode 100644 Documentation/networking/mac80211_hwsim/README
create mode 100644 Documentation/networking/mac80211_hwsim/mac80211_hwsim.rst
delete mode 100644 Documentation/nios2/README
create mode 100644 Documentation/nios2/nios2.rst
delete mode 100644 Documentation/openrisc/README
delete mode 100644 Documentation/openrisc/TODO
create mode 100644 Documentation/openrisc/index.rst
create mode 100644 Documentation/openrisc/openrisc_port.rst
create mode 100644 Documentation/openrisc/todo.rst
delete mode 100644 Documentation/packing.txt
delete mode 100644 Documentation/parisc/debugging
create mode 100644 Documentation/parisc/debugging.rst
create mode 100644 Documentation/parisc/index.rst
delete mode 100644 Documentation/parisc/registers
create mode 100644 Documentation/parisc/registers.rst
delete mode 100644 Documentation/powerpc/DAWR-POWER9.txt
create mode 100644 Documentation/powerpc/bootwrapper.rst
delete mode 100644 Documentation/powerpc/bootwrapper.txt
create mode 100644 Documentation/powerpc/cpu_families.rst
delete mode 100644 Documentation/powerpc/cpu_families.txt
create mode 100644 Documentation/powerpc/cpu_features.rst
delete mode 100644 Documentation/powerpc/cpu_features.txt
create mode 100644 Documentation/powerpc/cxl.rst
delete mode 100644 Documentation/powerpc/cxl.txt
create mode 100644 Documentation/powerpc/cxlflash.rst
delete mode 100644 Documentation/powerpc/cxlflash.txt
create mode 100644 Documentation/powerpc/dawr-power9.rst
create mode 100644 Documentation/powerpc/dscr.rst
delete mode 100644 Documentation/powerpc/dscr.txt
create mode 100644 Documentation/powerpc/eeh-pci-error-recovery.rst
delete mode 100644 Documentation/powerpc/eeh-pci-error-recovery.txt
create mode 100644 Documentation/powerpc/elfnote.rst
create mode 100644 Documentation/powerpc/firmware-assisted-dump.rst
delete mode 100644 Documentation/powerpc/firmware-assisted-dump.txt
create mode 100644 Documentation/powerpc/hvcs.rst
delete mode 100644 Documentation/powerpc/hvcs.txt
create mode 100644 Documentation/powerpc/index.rst
create mode 100644 Documentation/powerpc/mpc52xx.rst
delete mode 100644 Documentation/powerpc/mpc52xx.txt
create mode 100644 Documentation/powerpc/pci_iov_resource_on_powernv.rst
delete mode 100644 Documentation/powerpc/pci_iov_resource_on_powernv.txt
create mode 100644 Documentation/powerpc/pmu-ebb.rst
delete mode 100644 Documentation/powerpc/pmu-ebb.txt
create mode 100644 Documentation/powerpc/ptrace.rst
delete mode 100644 Documentation/powerpc/ptrace.txt
create mode 100644 Documentation/powerpc/qe_firmware.rst
delete mode 100644 Documentation/powerpc/qe_firmware.txt
create mode 100644 Documentation/powerpc/syscall64-abi.rst
delete mode 100644 Documentation/powerpc/syscall64-abi.txt
create mode 100644 Documentation/powerpc/transactional_memory.rst
delete mode 100644 Documentation/powerpc/transactional_memory.txt
create mode 100644 Documentation/powerpc/ultravisor.rst
delete mode 100644 Documentation/process/conf.py
create mode 100644 Documentation/process/embargoed-hardware-issues.rst
create mode 100644 Documentation/riscv/boot-image-header.rst
delete mode 100644 Documentation/riscv/boot-image-header.txt
delete mode 100644 Documentation/s390/dasd.rst
delete mode 100644 Documentation/s390/debugging390.rst
create mode 100644 Documentation/security/tpm/tpm_event_log.rst
create mode 100644 Documentation/security/tpm/tpm_ftpm_tee.rst
delete mode 100644 Documentation/sh/conf.py
delete mode 100644 Documentation/sound/conf.py
delete mode 100644 Documentation/spi/butterfly
create mode 100644 Documentation/spi/butterfly.rst
create mode 100644 Documentation/spi/index.rst
delete mode 100644 Documentation/spi/pxa2xx
create mode 100644 Documentation/spi/pxa2xx.rst
delete mode 100644 Documentation/spi/spi-lm70llp
create mode 100644 Documentation/spi/spi-lm70llp.rst
delete mode 100644 Documentation/spi/spi-sc18is602
create mode 100644 Documentation/spi/spi-sc18is602.rst
delete mode 100644 Documentation/spi/spi-summary
create mode 100644 Documentation/spi/spi-summary.rst
delete mode 100644 Documentation/spi/spidev
create mode 100644 Documentation/spi/spidev.rst
delete mode 100644 Documentation/thermal/index.rst
delete mode 100644 Documentation/thermal/sysfs-api.rst
delete mode 100644 Documentation/thermal/x86_pkg_temperature_thermal.rst
create mode 100644 Documentation/trace/coresight-cpu-debug.rst
delete mode 100644 Documentation/trace/coresight-cpu-debug.txt
create mode 100644 Documentation/trace/coresight.rst
delete mode 100644 Documentation/trace/coresight.txt
create mode 100644 Documentation/translations/it_IT/process/programming-language.rst
delete mode 100644 Documentation/userspace-api/conf.py
rename Documentation/{virtual => virt}/index.rst (100%)
rename Documentation/{virtual => virt}/kvm/amd-memory-encryption.rst (100%)
create mode 100644 Documentation/virt/kvm/api.txt
rename Documentation/{virtual => virt}/kvm/arm/hyp-abi.txt (100%)
rename Documentation/{virtual => virt}/kvm/arm/psci.txt (100%)
rename Documentation/{virtual => virt}/kvm/cpuid.rst (100%)
rename Documentation/{virtual => virt}/kvm/devices/README (100%)
rename Documentation/{virtual => virt}/kvm/devices/arm-vgic-its.txt (100%)
rename Documentation/{virtual => virt}/kvm/devices/arm-vgic-v3.txt (100%)
rename Documentation/{virtual => virt}/kvm/devices/arm-vgic.txt (100%)
rename Documentation/{virtual => virt}/kvm/devices/mpic.txt (100%)
rename Documentation/{virtual => virt}/kvm/devices/s390_flic.txt (100%)
rename Documentation/{virtual => virt}/kvm/devices/vcpu.txt (100%)
rename Documentation/{virtual => virt}/kvm/devices/vfio.txt (100%)
rename Documentation/{virtual => virt}/kvm/devices/vm.txt (100%)
rename Documentation/{virtual => virt}/kvm/devices/xics.txt (100%)
rename Documentation/{virtual => virt}/kvm/devices/xive.txt (100%)
rename Documentation/{virtual => virt}/kvm/halt-polling.txt (100%)
create mode 100644 Documentation/virt/kvm/hypercalls.txt
create mode 100644 Documentation/virt/kvm/index.rst
rename Documentation/{virtual => virt}/kvm/locking.txt (100%)
create mode 100644 Documentation/virt/kvm/mmu.txt
rename Documentation/{virtual => virt}/kvm/msr.txt (100%)
rename Documentation/{virtual => virt}/kvm/nested-vmx.txt (100%)
rename Documentation/{virtual => virt}/kvm/ppc-pv.txt (100%)
create mode 100644 Documentation/virt/kvm/review-checklist.txt
rename Documentation/{virtual => virt}/kvm/s390-diag.txt (100%)
rename Documentation/{virtual => virt}/kvm/timekeeping.txt (100%)
rename Documentation/{virtual => virt}/kvm/vcpu-requests.rst (100%)
rename Documentation/{virtual => virt}/paravirt_ops.rst (100%)
rename Documentation/{virtual => virt}/uml/UserModeLinux-HOWTO.txt (100%)
create mode 100644 Documentation/virtual/guest-halt-polling.txt
delete mode 100644 Documentation/virtual/kvm/api.txt
delete mode 100644 Documentation/virtual/kvm/hypercalls.txt
delete mode 100644 Documentation/virtual/kvm/index.rst
delete mode 100644 Documentation/virtual/kvm/mmu.txt
delete mode 100644 Documentation/virtual/kvm/review-checklist.txt
delete mode 100644 Documentation/vm/conf.py
create mode 100644 Documentation/w1/index.rst
delete mode 100644 Documentation/w1/masters/ds2482
create mode 100644 Documentation/w1/masters/ds2482.rst
delete mode 100644 Documentation/w1/masters/ds2490
create mode 100644 Documentation/w1/masters/ds2490.rst
create mode 100644 Documentation/w1/masters/index.rst
delete mode 100644 Documentation/w1/masters/mxc-w1
create mode 100644 Documentation/w1/masters/mxc-w1.rst
delete mode 100644 Documentation/w1/masters/omap-hdq
create mode 100644 Documentation/w1/masters/omap-hdq.rst
delete mode 100644 Documentation/w1/masters/w1-gpio
create mode 100644 Documentation/w1/masters/w1-gpio.rst
create mode 100644 Documentation/w1/slaves/index.rst
delete mode 100644 Documentation/w1/slaves/w1_ds2406
create mode 100644 Documentation/w1/slaves/w1_ds2406.rst
delete mode 100644 Documentation/w1/slaves/w1_ds2413
create mode 100644 Documentation/w1/slaves/w1_ds2413.rst
delete mode 100644 Documentation/w1/slaves/w1_ds2423
create mode 100644 Documentation/w1/slaves/w1_ds2423.rst
delete mode 100644 Documentation/w1/slaves/w1_ds2438
create mode 100644 Documentation/w1/slaves/w1_ds2438.rst
delete mode 100644 Documentation/w1/slaves/w1_ds28e04
create mode 100644 Documentation/w1/slaves/w1_ds28e04.rst
delete mode 100644 Documentation/w1/slaves/w1_ds28e17
create mode 100644 Documentation/w1/slaves/w1_ds28e17.rst
delete mode 100644 Documentation/w1/slaves/w1_therm
create mode 100644 Documentation/w1/slaves/w1_therm.rst
create mode 100644 Documentation/w1/w1-generic.rst
create mode 100644 Documentation/w1/w1-netlink.rst
delete mode 100644 Documentation/w1/w1.generic
delete mode 100644 Documentation/w1/w1.netlink
delete mode 100644 Documentation/wimax/README.i2400m
delete mode 100644 Documentation/wimax/README.wimax
delete mode 100644 Documentation/x86/conf.py
create mode 100644 arch/arm/boot/dts/aspeed-ast2600-evb.dts
create mode 100644 arch/arm/boot/dts/aspeed-bmc-facebook-minipack.dts
create mode 100644 arch/arm/boot/dts/aspeed-bmc-facebook-wedge100.dts
create mode 100644 arch/arm/boot/dts/aspeed-bmc-facebook-wedge40.dts
create mode 100644 arch/arm/boot/dts/aspeed-bmc-lenovo-hr855xg2.dts
create mode 100644 arch/arm/boot/dts/aspeed-bmc-opp-mihawk.dts
create mode 100644 arch/arm/boot/dts/aspeed-g6-pinctrl.dtsi
create mode 100644 arch/arm/boot/dts/aspeed-g6.dtsi
create mode 100644 arch/arm/boot/dts/imx6ul-kontron-n6310-s-43.dts
create mode 100644 arch/arm/boot/dts/imx6ul-kontron-n6310-s.dts
create mode 100644 arch/arm/boot/dts/imx6ul-kontron-n6310-som.dtsi
delete mode 100644 arch/arm/boot/dts/imx6ul-phytec-pcl063.dtsi
delete mode 100644 arch/arm/boot/dts/imx6ul-phytec-peb-eval-01.dtsi
delete mode 100644 arch/arm/boot/dts/imx6ul-phytec-phyboard-segin-full.dts
delete mode 100644 arch/arm/boot/dts/imx6ul-phytec-phyboard-segin.dtsi
create mode 100644 arch/arm/boot/dts/imx6ul-phytec-phycore-som.dtsi
create mode 100644 arch/arm/boot/dts/imx6ul-phytec-segin-ff-rdk-nand.dts
create mode 100644 arch/arm/boot/dts/imx6ul-phytec-segin-peb-eval-01.dtsi
create mode 100644 arch/arm/boot/dts/imx6ul-phytec-segin.dtsi
create mode 100644 arch/arm/boot/dts/imx6ull-phytec-phycore-som.dtsi
create mode 100644 arch/arm/boot/dts/imx6ull-phytec-segin-ff-rdk-emmc.dts
create mode 100644 arch/arm/boot/dts/imx6ull-phytec-segin-ff-rdk-nand.dts
create mode 100644 arch/arm/boot/dts/imx6ull-phytec-segin-lc-rdk-nand.dts
create mode 100644 arch/arm/boot/dts/imx6ull-phytec-segin-peb-eval-01.dtsi
create mode 100644 arch/arm/boot/dts/imx6ull-phytec-segin.dtsi
create mode 100644 arch/arm/boot/dts/imx7d-zii-rmu2.dts
create mode 100644 arch/arm/boot/dts/mmp2-olpc-xo-1-75.dts
create mode 100644 arch/arm/boot/dts/mt7629-rfb.dts
create mode 100644 arch/arm/boot/dts/mt7629.dtsi
create mode 100644 arch/arm/boot/dts/rk3229-xms6.dts
delete mode 100644 arch/arm/boot/dts/rk3288-fennec.dts
create mode 100644 arch/arm/boot/dts/rk3288-veyron-edp.dtsi
create mode 100644 arch/arm/boot/dts/rk3288-veyron-fievel.dts
create mode 100644 arch/arm/boot/dts/rk3288-veyron-tiger.dts
create mode 100644 arch/arm/boot/dts/ste-ab8500.dtsi
create mode 100644 arch/arm/boot/dts/sun8i-s3-lichee-zero-plus.dts
create mode 100644 arch/arm/boot/dts/sun8i-v3.dtsi
delete mode 100644 arch/arm/configs/acs5k_defconfig
delete mode 100644 arch/arm/configs/acs5k_tiny_defconfig
delete mode 100644 arch/arm/configs/iop13xx_defconfig
delete mode 100644 arch/arm/configs/iop33x_defconfig
delete mode 100644 arch/arm/configs/ks8695_defconfig
delete mode 100644 arch/arm/configs/nuc910_defconfig
delete mode 100644 arch/arm/configs/nuc950_defconfig
delete mode 100644 arch/arm/configs/nuc960_defconfig
create mode 100644 arch/arm/include/asm/hardware/cache-aurora-l2.h
delete mode 100644 arch/arm/include/asm/hardware/iop3xx-adma.h
delete mode 100644 arch/arm/include/asm/hardware/iop3xx.h
delete mode 100644 arch/arm/include/asm/hardware/iop_adma.h
delete mode 100644 arch/arm/include/debug/ks8695.S
create mode 100644 arch/arm/lib/backtrace-clang.S
create mode 100644 arch/arm/mach-aspeed/Makefile
create mode 100644 arch/arm/mach-aspeed/platsmp.c
create mode 100644 arch/arm/mach-at91/.gitignore
create mode 100644 arch/arm/mach-dove/bridge-regs.h
create mode 100644 arch/arm/mach-dove/dove.h
delete mode 100644 arch/arm/mach-dove/include/mach/bridge-regs.h
delete mode 100644 arch/arm/mach-dove/include/mach/dove.h
delete mode 100644 arch/arm/mach-dove/include/mach/hardware.h
delete mode 100644 arch/arm/mach-dove/include/mach/irqs.h
delete mode 100644 arch/arm/mach-dove/include/mach/pm.h
create mode 100644 arch/arm/mach-dove/irqs.h
create mode 100644 arch/arm/mach-dove/pm.h
delete mode 100644 arch/arm/mach-iop13xx/Kconfig
delete mode 100644 arch/arm/mach-iop13xx/Makefile
delete mode 100644 arch/arm/mach-iop13xx/Makefile.boot
delete mode 100644 arch/arm/mach-iop13xx/include/mach/adma.h
delete mode 100644 arch/arm/mach-iop13xx/include/mach/entry-macro.S
delete mode 100644 arch/arm/mach-iop13xx/include/mach/hardware.h
delete mode 100644 arch/arm/mach-iop13xx/include/mach/iop13xx.h
delete mode 100644 arch/arm/mach-iop13xx/include/mach/iq81340.h
delete mode 100644 arch/arm/mach-iop13xx/include/mach/irqs.h
delete mode 100644 arch/arm/mach-iop13xx/include/mach/memory.h
delete mode 100644 arch/arm/mach-iop13xx/include/mach/time.h
delete mode 100644 arch/arm/mach-iop13xx/include/mach/uncompress.h
delete mode 100644 arch/arm/mach-iop13xx/io.c
delete mode 100644 arch/arm/mach-iop13xx/iq81340mc.c
delete mode 100644 arch/arm/mach-iop13xx/iq81340sc.c
delete mode 100644 arch/arm/mach-iop13xx/irq.c
delete mode 100644 arch/arm/mach-iop13xx/msi.c
delete mode 100644 arch/arm/mach-iop13xx/msi.h
delete mode 100644 arch/arm/mach-iop13xx/pci.c
delete mode 100644 arch/arm/mach-iop13xx/pci.h
delete mode 100644 arch/arm/mach-iop13xx/setup.c
delete mode 100644 arch/arm/mach-iop13xx/tpmi.c
create mode 100644 arch/arm/mach-iop32x/adma.c
rename arch/arm/{plat-iop => mach-iop32x}/cp6.c (100%)
create mode 100644 arch/arm/mach-iop32x/glantank.h
create mode 100644 arch/arm/mach-iop32x/hardware.h
create mode 100644 arch/arm/mach-iop32x/i2c.c
delete mode 100644 arch/arm/mach-iop32x/include/mach/adma.h
delete mode 100644 arch/arm/mach-iop32x/include/mach/glantank.h
delete mode 100644 arch/arm/mach-iop32x/include/mach/hardware.h
delete mode 100644 arch/arm/mach-iop32x/include/mach/iop32x.h
delete mode 100644 arch/arm/mach-iop32x/include/mach/iq31244.h
delete mode 100644 arch/arm/mach-iop32x/include/mach/iq80321.h
delete mode 100644 arch/arm/mach-iop32x/include/mach/n2100.h
delete mode 100644 arch/arm/mach-iop32x/include/mach/time.h
create mode 100644 arch/arm/mach-iop32x/iop3xx.h
create mode 100644 arch/arm/mach-iop32x/iq31244.h
create mode 100644 arch/arm/mach-iop32x/iq80321.h
create mode 100644 arch/arm/mach-iop32x/irqs.h
create mode 100644 arch/arm/mach-iop32x/n2100.h
create mode 100644 arch/arm/mach-iop32x/pci.c
create mode 100644 arch/arm/mach-iop32x/pmu.c
create mode 100644 arch/arm/mach-iop32x/restart.c
create mode 100644 arch/arm/mach-iop32x/setup.c
create mode 100644 arch/arm/mach-iop32x/time.c
delete mode 100644 arch/arm/mach-iop33x/Kconfig
delete mode 100644 arch/arm/mach-iop33x/Makefile
delete mode 100644 arch/arm/mach-iop33x/Makefile.boot
delete mode 100644 arch/arm/mach-iop33x/include/mach/adma.h
delete mode 100644 arch/arm/mach-iop33x/include/mach/entry-macro.S
delete mode 100644 arch/arm/mach-iop33x/include/mach/hardware.h
delete mode 100644 arch/arm/mach-iop33x/include/mach/iop33x.h
delete mode 100644 arch/arm/mach-iop33x/include/mach/iq80331.h
delete mode 100644 arch/arm/mach-iop33x/include/mach/iq80332.h
delete mode 100644 arch/arm/mach-iop33x/include/mach/irqs.h
delete mode 100644 arch/arm/mach-iop33x/include/mach/time.h
delete mode 100644 arch/arm/mach-iop33x/include/mach/uncompress.h
delete mode 100644 arch/arm/mach-iop33x/iq80331.c
delete mode 100644 arch/arm/mach-iop33x/iq80332.c
delete mode 100644 arch/arm/mach-iop33x/irq.c
delete mode 100644 arch/arm/mach-iop33x/uart.c
delete mode 100644 arch/arm/mach-ks8695/Kconfig
delete mode 100644 arch/arm/mach-ks8695/Makefile
delete mode 100644 arch/arm/mach-ks8695/Makefile.boot
delete mode 100644 arch/arm/mach-ks8695/board-acs5k.c
delete mode 100644 arch/arm/mach-ks8695/board-dsm320.c
delete mode 100644 arch/arm/mach-ks8695/board-micrel.c
delete mode 100644 arch/arm/mach-ks8695/board-og.c
delete mode 100644 arch/arm/mach-ks8695/board-sg.c
delete mode 100644 arch/arm/mach-ks8695/cpu.c
delete mode 100644 arch/arm/mach-ks8695/devices.c
delete mode 100644 arch/arm/mach-ks8695/devices.h
delete mode 100644 arch/arm/mach-ks8695/generic.h
delete mode 100644 arch/arm/mach-ks8695/include/mach/entry-macro.S
delete mode 100644 arch/arm/mach-ks8695/include/mach/gpio-ks8695.h
delete mode 100644 arch/arm/mach-ks8695/include/mach/hardware.h
delete mode 100644 arch/arm/mach-ks8695/include/mach/irqs.h
delete mode 100644 arch/arm/mach-ks8695/include/mach/memory.h
delete mode 100644 arch/arm/mach-ks8695/include/mach/regs-gpio.h
delete mode 100644 arch/arm/mach-ks8695/include/mach/regs-irq.h
delete mode 100644 arch/arm/mach-ks8695/include/mach/regs-misc.h
delete mode 100644 arch/arm/mach-ks8695/include/mach/regs-switch.h
delete mode 100644 arch/arm/mach-ks8695/include/mach/regs-uart.h
delete mode 100644 arch/arm/mach-ks8695/include/mach/uncompress.h
delete mode 100644 arch/arm/mach-ks8695/irq.c
delete mode 100644 arch/arm/mach-ks8695/pci.c
delete mode 100644 arch/arm/mach-ks8695/regs-hpna.h
delete mode 100644 arch/arm/mach-ks8695/regs-lan.h
delete mode 100644 arch/arm/mach-ks8695/regs-mem.h
delete mode 100644 arch/arm/mach-ks8695/regs-pci.h
delete mode 100644 arch/arm/mach-ks8695/regs-sys.h
delete mode 100644 arch/arm/mach-ks8695/regs-wan.h
delete mode 100644 arch/arm/mach-ks8695/time.c
create mode 100644 arch/arm/mach-lpc32xx/Kconfig
delete mode 100644 arch/arm/mach-lpc32xx/include/mach/board.h
delete mode 100644 arch/arm/mach-lpc32xx/include/mach/entry-macro.S
delete mode 100644 arch/arm/mach-lpc32xx/include/mach/hardware.h
delete mode 100644 arch/arm/mach-lpc32xx/include/mach/platform.h
delete mode 100644 arch/arm/mach-lpc32xx/include/mach/uncompress.h
create mode 100644 arch/arm/mach-lpc32xx/lpc32xx.h
delete mode 100644 arch/arm/mach-netx/Kconfig
delete mode 100644 arch/arm/mach-netx/Makefile
delete mode 100644 arch/arm/mach-netx/Makefile.boot
delete mode 100644 arch/arm/mach-netx/fb.c
delete mode 100644 arch/arm/mach-netx/fb.h
delete mode 100644 arch/arm/mach-netx/generic.c
delete mode 100644 arch/arm/mach-netx/generic.h
delete mode 100644 arch/arm/mach-netx/include/mach/hardware.h
delete mode 100644 arch/arm/mach-netx/include/mach/irqs.h
delete mode 100644 arch/arm/mach-netx/include/mach/netx-regs.h
delete mode 100644 arch/arm/mach-netx/include/mach/pfifo.h
delete mode 100644 arch/arm/mach-netx/include/mach/uncompress.h
delete mode 100644 arch/arm/mach-netx/include/mach/xc.h
delete mode 100644 arch/arm/mach-netx/nxdb500.c
delete mode 100644 arch/arm/mach-netx/nxdkn.c
delete mode 100644 arch/arm/mach-netx/nxeb500hmi.c
delete mode 100644 arch/arm/mach-netx/pfifo.c
delete mode 100644 arch/arm/mach-netx/time.c
delete mode 100644 arch/arm/mach-netx/xc.c
delete mode 100644 arch/arm/mach-nspire/clcd.c
delete mode 100644 arch/arm/mach-nspire/clcd.h
create mode 100644 arch/arm/mach-omap2/.gitignore
create mode 100644 arch/arm/mach-omap2/omap-iommu.c
delete mode 100644 arch/arm/mach-w90x900/Kconfig
delete mode 100644 arch/arm/mach-w90x900/Makefile
delete mode 100644 arch/arm/mach-w90x900/Makefile.boot
delete mode 100644 arch/arm/mach-w90x900/clksel.c
delete mode 100644 arch/arm/mach-w90x900/clock.c
delete mode 100644 arch/arm/mach-w90x900/clock.h
delete mode 100644 arch/arm/mach-w90x900/cpu.c
delete mode 100644 arch/arm/mach-w90x900/cpu.h
delete mode 100644 arch/arm/mach-w90x900/dev.c
delete mode 100644 arch/arm/mach-w90x900/gpio.c
delete mode 100644 arch/arm/mach-w90x900/include/mach/entry-macro.S
delete mode 100644 arch/arm/mach-w90x900/include/mach/hardware.h
delete mode 100644 arch/arm/mach-w90x900/include/mach/irqs.h
delete mode 100644 arch/arm/mach-w90x900/include/mach/map.h
delete mode 100644 arch/arm/mach-w90x900/include/mach/mfp.h
delete mode 100644 arch/arm/mach-w90x900/include/mach/regs-clock.h
delete mode 100644 arch/arm/mach-w90x900/include/mach/regs-irq.h
delete mode 100644 arch/arm/mach-w90x900/include/mach/regs-ldm.h
delete mode 100644 arch/arm/mach-w90x900/include/mach/regs-serial.h
delete mode 100644 arch/arm/mach-w90x900/include/mach/uncompress.h
delete mode 100644 arch/arm/mach-w90x900/irq.c
delete mode 100644 arch/arm/mach-w90x900/mach-nuc910evb.c
delete mode 100644 arch/arm/mach-w90x900/mach-nuc950evb.c
delete mode 100644 arch/arm/mach-w90x900/mach-nuc960evb.c
delete mode 100644 arch/arm/mach-w90x900/mfp.c
delete mode 100644 arch/arm/mach-w90x900/nuc910.c
delete mode 100644 arch/arm/mach-w90x900/nuc910.h
delete mode 100644 arch/arm/mach-w90x900/nuc950.c
delete mode 100644 arch/arm/mach-w90x900/nuc950.h
delete mode 100644 arch/arm/mach-w90x900/nuc960.c
delete mode 100644 arch/arm/mach-w90x900/nuc960.h
delete mode 100644 arch/arm/mach-w90x900/nuc9xx.h
delete mode 100644 arch/arm/mach-w90x900/regs-ebi.h
delete mode 100644 arch/arm/mach-w90x900/regs-gcr.h
delete mode 100644 arch/arm/mach-w90x900/regs-timer.h
delete mode 100644 arch/arm/mach-w90x900/regs-usb.h
delete mode 100644 arch/arm/mach-w90x900/time.c
delete mode 100644 arch/arm/mm/cache-aurora-l2.h
delete mode 100644 arch/arm/plat-iop/Makefile
delete mode 100644 arch/arm/plat-iop/adma.c
delete mode 100644 arch/arm/plat-iop/i2c.c
delete mode 100644 arch/arm/plat-iop/pci.c
delete mode 100644 arch/arm/plat-iop/pmu.c
delete mode 100644 arch/arm/plat-iop/restart.c
delete mode 100644 arch/arm/plat-iop/setup.c
delete mode 100644 arch/arm/plat-iop/time.c
create mode 100644 arch/arm64/Kbuild
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino-emmc.dts
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-a311d.dtsi
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-s922x-khadas-vim3.dts
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi
create mode 100644 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1.dtsi
create mode 100644 arch/arm64/boot/dts/freescale/fsl-ls1046a-frwy.dts
create mode 100644 arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts
create mode 100644 arch/arm64/boot/dts/freescale/imx8mn.dtsi
create mode 100644 arch/arm64/boot/dts/freescale/imx8mq-hummingboard-pulse.dts
create mode 100644 arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts
create mode 100644 arch/arm64/boot/dts/freescale/imx8mq-pico-pi.dts
create mode 100644 arch/arm64/boot/dts/freescale/imx8mq-sr-som.dtsi
create mode 100644 arch/arm64/boot/dts/freescale/imx8qxp-ai_ml.dts
create mode 100644 arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
create mode 100644 arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts
create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi
create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-a3u-eur.dts
create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts
create mode 100644 arch/arm64/boot/dts/qcom/msm8998-asus-novago-tp370ql.dts
create mode 100644 arch/arm64/boot/dts/qcom/msm8998-clamshell.dtsi
create mode 100644 arch/arm64/boot/dts/qcom/msm8998-hp-envy-x2.dts
create mode 100644 arch/arm64/boot/dts/qcom/msm8998-lenovo-miix-630.dts
create mode 100644 arch/arm64/boot/dts/qcom/pm8150.dtsi
create mode 100644 arch/arm64/boot/dts/qcom/pm8150b.dtsi
create mode 100644 arch/arm64/boot/dts/qcom/pm8150l.dtsi
create mode 100644 arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
create mode 100644 arch/arm64/boot/dts/qcom/sm8150-mtp.dts
create mode 100644 arch/arm64/boot/dts/qcom/sm8150.dtsi
create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts
delete mode 100644 arch/arm64/crypto/aes-ctr-fallback.h
delete mode 100644 arch/arm64/include/asm/dma-mapping.h
delete mode 100644 arch/arm64/include/uapi/asm/stat.h
create mode 100644 arch/arm64/kernel/image-vars.h
delete mode 100644 arch/arm64/lib/atomic_ll_sc.c
create mode 100644 arch/arm64/lib/error-inject.c
delete mode 100644 arch/hexagon/mm/pgalloc.c
delete mode 100644 arch/ia64/configs/sim_defconfig
delete mode 100644 arch/ia64/dig/Makefile
delete mode 100644 arch/ia64/dig/machvec.c
delete mode 100644 arch/ia64/dig/machvec_vtd.c
delete mode 100644 arch/ia64/dig/setup.c
delete mode 100644 arch/ia64/hp/common/hwsw_iommu.c
delete mode 100644 arch/ia64/hp/sim/Kconfig
delete mode 100644 arch/ia64/hp/sim/Makefile
delete mode 100644 arch/ia64/hp/sim/boot/Makefile
delete mode 100644 arch/ia64/hp/sim/boot/boot_head.S
delete mode 100644 arch/ia64/hp/sim/boot/bootloader.c
delete mode 100644 arch/ia64/hp/sim/boot/bootloader.lds
delete mode 100644 arch/ia64/hp/sim/boot/fw-emu.c
delete mode 100644 arch/ia64/hp/sim/boot/ssc.h
delete mode 100644 arch/ia64/hp/sim/hpsim.S
delete mode 100644 arch/ia64/hp/sim/hpsim_console.c
delete mode 100644 arch/ia64/hp/sim/hpsim_irq.c
delete mode 100644 arch/ia64/hp/sim/hpsim_machvec.c
delete mode 100644 arch/ia64/hp/sim/hpsim_setup.c
delete mode 100644 arch/ia64/hp/sim/hpsim_ssc.h
delete mode 100644 arch/ia64/hp/sim/simeth.c
delete mode 100644 arch/ia64/hp/sim/simscsi.c
delete mode 100644 arch/ia64/hp/sim/simserial.c
delete mode 100644 arch/ia64/hp/zx1/Makefile
delete mode 100644 arch/ia64/hp/zx1/hpzx1_machvec.c
delete mode 100644 arch/ia64/hp/zx1/hpzx1_swiotlb_machvec.c
delete mode 100644 arch/ia64/include/asm/hpsim.h
delete mode 100644 arch/ia64/include/asm/machvec.h
delete mode 100644 arch/ia64/include/asm/machvec_dig.h
delete mode 100644 arch/ia64/include/asm/machvec_dig_vtd.h
delete mode 100644 arch/ia64/include/asm/machvec_hpsim.h
delete mode 100644 arch/ia64/include/asm/machvec_hpzx1.h
delete mode 100644 arch/ia64/include/asm/machvec_hpzx1_swiotlb.h
delete mode 100644 arch/ia64/include/asm/machvec_init.h
delete mode 100644 arch/ia64/include/asm/machvec_sn2.h
delete mode 100644 arch/ia64/include/asm/machvec_uv.h
delete mode 100644 arch/ia64/include/asm/sn/acpi.h
delete mode 100644 arch/ia64/include/asm/sn/addrs.h
delete mode 100644 arch/ia64/include/asm/sn/arch.h
delete mode 100644 arch/ia64/include/asm/sn/bte.h
delete mode 100644 arch/ia64/include/asm/sn/clksupport.h
delete mode 100644 arch/ia64/include/asm/sn/geo.h
delete mode 100644 arch/ia64/include/asm/sn/io.h
delete mode 100644 arch/ia64/include/asm/sn/ioc3.h
delete mode 100644 arch/ia64/include/asm/sn/klconfig.h
delete mode 100644 arch/ia64/include/asm/sn/l1.h
delete mode 100644 arch/ia64/include/asm/sn/leds.h
delete mode 100644 arch/ia64/include/asm/sn/module.h
delete mode 100644 arch/ia64/include/asm/sn/mspec.h
delete mode 100644 arch/ia64/include/asm/sn/nodepda.h
delete mode 100644 arch/ia64/include/asm/sn/pcibr_provider.h
delete mode 100644 arch/ia64/include/asm/sn/pcibus_provider_defs.h
delete mode 100644 arch/ia64/include/asm/sn/pcidev.h
delete mode 100644 arch/ia64/include/asm/sn/pda.h
delete mode 100644 arch/ia64/include/asm/sn/pic.h
delete mode 100644 arch/ia64/include/asm/sn/rw_mmr.h
delete mode 100644 arch/ia64/include/asm/sn/shub_mmr.h
delete mode 100644 arch/ia64/include/asm/sn/shubio.h
delete mode 100644 arch/ia64/include/asm/sn/simulator.h
delete mode 100644 arch/ia64/include/asm/sn/sn2/sn_hwperf.h
delete mode 100644 arch/ia64/include/asm/sn/sn_cpuid.h
delete mode 100644 arch/ia64/include/asm/sn/sn_feature_sets.h
delete mode 100644 arch/ia64/include/asm/sn/tioca.h
delete mode 100644 arch/ia64/include/asm/sn/tioca_provider.h
delete mode 100644 arch/ia64/include/asm/sn/tioce.h
delete mode 100644 arch/ia64/include/asm/sn/tioce_provider.h
delete mode 100644 arch/ia64/include/asm/sn/tiocp.h
delete mode 100644 arch/ia64/include/asm/sn/tiocx.h
delete mode 100644 arch/ia64/include/asm/sn/types.h
delete mode 100644 arch/ia64/kernel/machvec.c
delete mode 100644 arch/ia64/sn/Makefile
delete mode 100644 arch/ia64/sn/include/ioerror.h
delete mode 100644 arch/ia64/sn/include/tio.h
delete mode 100644 arch/ia64/sn/include/xtalk/hubdev.h
delete mode 100644 arch/ia64/sn/include/xtalk/xbow.h
delete mode 100644 arch/ia64/sn/include/xtalk/xwidgetdev.h
delete mode 100644 arch/ia64/sn/kernel/Makefile
delete mode 100644 arch/ia64/sn/kernel/bte.c
delete mode 100644 arch/ia64/sn/kernel/bte_error.c
delete mode 100644 arch/ia64/sn/kernel/huberror.c
delete mode 100644 arch/ia64/sn/kernel/idle.c
delete mode 100644 arch/ia64/sn/kernel/io_acpi_init.c
delete mode 100644 arch/ia64/sn/kernel/io_common.c
delete mode 100644 arch/ia64/sn/kernel/io_init.c
delete mode 100644 arch/ia64/sn/kernel/iomv.c
delete mode 100644 arch/ia64/sn/kernel/irq.c
delete mode 100644 arch/ia64/sn/kernel/klconflib.c
delete mode 100644 arch/ia64/sn/kernel/machvec.c
delete mode 100644 arch/ia64/sn/kernel/mca.c
delete mode 100644 arch/ia64/sn/kernel/msi_sn.c
delete mode 100644 arch/ia64/sn/kernel/pio_phys.S
delete mode 100644 arch/ia64/sn/kernel/setup.c
delete mode 100644 arch/ia64/sn/kernel/sn2/Makefile
delete mode 100644 arch/ia64/sn/kernel/sn2/cache.c
delete mode 100644 arch/ia64/sn/kernel/sn2/io.c
delete mode 100644 arch/ia64/sn/kernel/sn2/prominfo_proc.c
delete mode 100644 arch/ia64/sn/kernel/sn2/ptc_deadlock.S
delete mode 100644 arch/ia64/sn/kernel/sn2/sn2_smp.c
delete mode 100644 arch/ia64/sn/kernel/sn2/sn_hwperf.c
delete mode 100644 arch/ia64/sn/kernel/sn2/sn_proc_fs.c
delete mode 100644 arch/ia64/sn/kernel/sn2/timer.c
delete mode 100644 arch/ia64/sn/kernel/sn2/timer_interrupt.c
delete mode 100644 arch/ia64/sn/kernel/tiocx.c
delete mode 100644 arch/ia64/sn/pci/Makefile
delete mode 100644 arch/ia64/sn/pci/pci_dma.c
delete mode 100644 arch/ia64/sn/pci/pcibr/Makefile
delete mode 100644 arch/ia64/sn/pci/pcibr/pcibr_ate.c
delete mode 100644 arch/ia64/sn/pci/pcibr/pcibr_dma.c
delete mode 100644 arch/ia64/sn/pci/pcibr/pcibr_provider.c
delete mode 100644 arch/ia64/sn/pci/pcibr/pcibr_reg.c
delete mode 100644 arch/ia64/sn/pci/tioca_provider.c
delete mode 100644 arch/ia64/sn/pci/tioce_provider.c
delete mode 100644 arch/ia64/uv/kernel/machvec.c
delete mode 100644 arch/mips/include/asm/mach-jz4740/gpio.h
delete mode 100644 arch/mips/include/asm/mach-jz4740/jz4740_fb.h
delete mode 100644 arch/mips/include/asm/mach-jz4740/jz4740_mmc.h
delete mode 100644 arch/mips/include/asm/mach-jz4740/platform.h
create mode 100644 arch/mips/include/asm/vdso/gettimeofday.h
create mode 100644 arch/mips/include/asm/vdso/vdso.h
create mode 100644 arch/mips/include/asm/vdso/vsyscall.h
delete mode 100644 arch/mips/jz4740/board-qi_lb60.c
delete mode 100644 arch/mips/jz4740/platform.c
delete mode 100644 arch/mips/mm/tlb-r8k.c
create mode 100644 arch/mips/vdso/config-n32-o32-env.c
delete mode 100644 arch/mips/vdso/vdso.h
create mode 100644 arch/mips/vdso/vgettimeofday.c
rename arch/parisc/configs/{default_defconfig => defconfig} (100%)
create mode 100644 arch/parisc/include/asm/kexec.h
create mode 100644 arch/parisc/kernel/kexec.c
create mode 100644 arch/parisc/kernel/kexec_file.c
create mode 100644 arch/parisc/kernel/relocate_kernel.S
delete mode 100644 arch/parisc/lib/memset.c
create mode 100644 arch/parisc/lib/string.S
create mode 100644 arch/powerpc/include/asm/elfnote.h
delete mode 100644 arch/powerpc/include/asm/error-injection.h
create mode 100644 arch/powerpc/include/asm/fadump-internal.h
create mode 100644 arch/powerpc/include/asm/mem_encrypt.h
delete mode 100644 arch/powerpc/include/asm/ppc4xx_ocm.h
delete mode 100644 arch/powerpc/include/asm/scom.h
create mode 100644 arch/powerpc/include/asm/svm.h
create mode 100644 arch/powerpc/include/asm/ultravisor-api.h
create mode 100644 arch/powerpc/include/asm/ultravisor.h
create mode 100644 arch/powerpc/kernel/note.S
create mode 100644 arch/powerpc/kernel/ucall.S
create mode 100644 arch/powerpc/lib/memcpy_mcsafe_64.S
create mode 100644 arch/powerpc/mm/ioremap.c
create mode 100644 arch/powerpc/mm/ioremap_32.c
create mode 100644 arch/powerpc/mm/ioremap_64.c
delete mode 100644 arch/powerpc/platforms/4xx/ocm.c
create mode 100644 arch/powerpc/platforms/powernv/opal-core.c
create mode 100644 arch/powerpc/platforms/powernv/opal-fadump.c
create mode 100644 arch/powerpc/platforms/powernv/opal-fadump.h
create mode 100644 arch/powerpc/platforms/powernv/ultravisor.c
create mode 100644 arch/powerpc/platforms/pseries/rtas-fadump.c
create mode 100644 arch/powerpc/platforms/pseries/rtas-fadump.h
create mode 100644 arch/powerpc/platforms/pseries/svm.c
delete mode 100644 arch/powerpc/sysdev/scom.c
create mode 100644 arch/riscv/Kbuild
create mode 100644 arch/riscv/include/asm/sparsemem.h
create mode 100644 arch/riscv/include/uapi/asm/perf_regs.h
create mode 100644 arch/riscv/kernel/perf_callchain.c
create mode 100644 arch/riscv/kernel/perf_regs.c
delete mode 100644 arch/riscv/lib/udivdi3.S
create mode 100644 arch/riscv/mm/tlbflush.c
create mode 100644 arch/s390/boot/pgm_check_info.c
create mode 100644 arch/s390/boot/version.c
create mode 100644 arch/s390/crypto/sha3_256_s390.c
create mode 100644 arch/s390/crypto/sha3_512_s390.c
delete mode 100644 arch/s390/kernel/early_nobss.c
create mode 100644 arch/um/drivers/vhost_user.h
create mode 100644 arch/um/drivers/virtio_uml.c
delete mode 100644 arch/x86/crypto/aegis128l-aesni-asm.S
delete mode 100644 arch/x86/crypto/aegis128l-aesni-glue.c
delete mode 100644 arch/x86/crypto/aegis256-aesni-asm.S
delete mode 100644 arch/x86/crypto/aegis256-aesni-glue.c
delete mode 100644 arch/x86/crypto/aes-i586-asm_32.S
delete mode 100644 arch/x86/crypto/aes-x86_64-asm_64.S
delete mode 100644 arch/x86/crypto/morus1280-avx2-asm.S
delete mode 100644 arch/x86/crypto/morus1280-avx2-glue.c
delete mode 100644 arch/x86/crypto/morus1280-sse2-asm.S
delete mode 100644 arch/x86/crypto/morus1280-sse2-glue.c
delete mode 100644 arch/x86/crypto/morus1280_glue.c
delete mode 100644 arch/x86/crypto/morus640-sse2-asm.S
delete mode 100644 arch/x86/crypto/morus640-sse2-glue.c
delete mode 100644 arch/x86/crypto/morus640_glue.c
delete mode 100644 arch/x86/include/asm/apic_flat_64.h
create mode 100644 arch/x86/include/asm/cpuidle_haltpoll.h
delete mode 100644 arch/x86/include/asm/crypto/aes.h
delete mode 100644 arch/x86/include/asm/error-injection.h
delete mode 100644 arch/x86/include/asm/ipi.h
create mode 100644 arch/x86/include/asm/vmware.h
delete mode 100644 arch/x86/include/uapi/asm/errno.h
delete mode 100644 arch/x86/include/uapi/asm/fcntl.h
delete mode 100644 arch/x86/include/uapi/asm/ioctl.h
delete mode 100644 arch/x86/include/uapi/asm/ioctls.h
delete mode 100644 arch/x86/include/uapi/asm/ipcbuf.h
delete mode 100644 arch/x86/include/uapi/asm/param.h
delete mode 100644 arch/x86/include/uapi/asm/resource.h
delete mode 100644 arch/x86/include/uapi/asm/termbits.h
delete mode 100644 arch/x86/include/uapi/asm/termios.h
delete mode 100644 arch/x86/include/uapi/asm/types.h
create mode 100644 arch/x86/kernel/apic/local.h
delete mode 100644 arch/x86/kernel/apic/x2apic.h
delete mode 100644 arch/x86/purgatory/string.c
create mode 100644 block/blk-iocost.c
create mode 100644 crypto/aegis128-core.c
create mode 100644 crypto/aegis128-neon-inner.c
create mode 100644 crypto/aegis128-neon.c
delete mode 100644 crypto/aegis128.c
delete mode 100644 crypto/aegis128l.c
delete mode 100644 crypto/aegis256.c
create mode 100644 crypto/essiv.c
delete mode 100644 crypto/morus1280.c
delete mode 100644 crypto/morus640.c
create mode 100644 drivers/auxdisplay/charlcd.h
create mode 100644 drivers/base/power/wakeup_stats.c
create mode 100644 drivers/bus/moxtet.c
delete mode 100644 drivers/char/agp/sgi-agp.c
delete mode 100644 drivers/char/mbcs.c
delete mode 100644 drivers/char/mbcs.h
delete mode 100644 drivers/char/snsc.c
delete mode 100644 drivers/char/snsc.h
delete mode 100644 drivers/char/snsc_event.c
create mode 100644 drivers/char/tpm/tpm_ftpm_tee.c
create mode 100644 drivers/char/tpm/tpm_ftpm_tee.h
create mode 100644 drivers/clk/clk-aspeed.h
create mode 100644 drivers/clk/clk-ast2600.c
create mode 100644 drivers/clk/imx/clk-imx8mn.c
create mode 100644 drivers/clk/ingenic/tcu.c
create mode 100644 drivers/clk/mediatek/clk-mt6779-aud.c
create mode 100644 drivers/clk/mediatek/clk-mt6779-cam.c
create mode 100644 drivers/clk/mediatek/clk-mt6779-img.c
create mode 100644 drivers/clk/mediatek/clk-mt6779-ipe.c
create mode 100644 drivers/clk/mediatek/clk-mt6779-mfg.c
create mode 100644 drivers/clk/mediatek/clk-mt6779-mm.c
create mode 100644 drivers/clk/mediatek/clk-mt6779-vdec.c
create mode 100644 drivers/clk/mediatek/clk-mt6779-venc.c
create mode 100644 drivers/clk/mediatek/clk-mt6779.c
create mode 100644 drivers/clk/meson/clk-cpu-dyndiv.c
create mode 100644 drivers/clk/meson/clk-cpu-dyndiv.h
delete mode 100644 drivers/clk/meson/clk-input.c
delete mode 100644 drivers/clk/meson/clk-input.h
create mode 100644 drivers/clk/mvebu/ap-cpu-clk.c
create mode 100644 drivers/clk/mvebu/armada_ap_cp_helper.c
create mode 100644 drivers/clk/mvebu/armada_ap_cp_helper.h
create mode 100644 drivers/clk/qcom/gcc-sm8150.c
create mode 100644 drivers/clk/rockchip/clk-rk3308.c
create mode 100644 drivers/clocksource/ingenic-timer.c
delete mode 100644 drivers/cpufreq/qcom-cpufreq-kryo.c
create mode 100644 drivers/cpufreq/qcom-cpufreq-nvmem.c
create mode 100644 drivers/cpufreq/sun50i-cpufreq-nvmem.c
create mode 100644 drivers/cpuidle/cpuidle-haltpoll.c
create mode 100644 drivers/cpuidle/cpuidle-psci.c
create mode 100644 drivers/cpuidle/governors/haltpoll.c
create mode 100644 drivers/crypto/caam/dpseci-debugfs.c
create mode 100644 drivers/crypto/caam/dpseci-debugfs.h
delete mode 100644 drivers/crypto/ccree/cc_ivgen.c
delete mode 100644 drivers/crypto/ccree/cc_ivgen.h
create mode 100644 drivers/crypto/hisilicon/qm.c
create mode 100644 drivers/crypto/hisilicon/qm.h
create mode 100644 drivers/crypto/hisilicon/sgl.c
create mode 100644 drivers/crypto/hisilicon/sgl.h
create mode 100644 drivers/crypto/hisilicon/zip/Makefile
create mode 100644 drivers/crypto/hisilicon/zip/zip.h
create mode 100644 drivers/crypto/hisilicon/zip/zip_crypto.c
create mode 100644 drivers/crypto/hisilicon/zip/zip_main.c
delete mode 100644 drivers/devfreq/tegra-devfreq.c
create mode 100644 drivers/devfreq/tegra20-devfreq.c
create mode 100644 drivers/devfreq/tegra30-devfreq.c
create mode 100644 drivers/dma-buf/dma-resv.c
delete mode 100644 drivers/dma-buf/reservation.c
create mode 100644 drivers/dma-buf/selftest.c
create mode 100644 drivers/dma-buf/selftest.h
create mode 100644 drivers/dma-buf/selftests.h
create mode 100644 drivers/dma-buf/st-dma-fence.c
delete mode 100644 drivers/dma/dma-jz4740.c
create mode 100644 drivers/dma/dw/acpi.c
create mode 100644 drivers/dma/dw/of.c
create mode 100644 drivers/dma/iop-adma.h
create mode 100644 drivers/edac/armada_xp_edac.c
create mode 100644 drivers/edac/bluefield_edac.c
create mode 100644 drivers/firmware/arm_scmi/reset.c
create mode 100644 drivers/firmware/efi/rci2-table.c
create mode 100644 drivers/firmware/imx/imx-dsp.c
create mode 100644 drivers/firmware/stratix10-rsu.c
create mode 100644 drivers/firmware/turris-mox-rwtm.c
create mode 100644 drivers/fpga/dfl-afu-error.c
create mode 100644 drivers/fpga/dfl-fme-error.c
delete mode 100644 drivers/gpio/gpio-ks8695.c
create mode 100644 drivers/gpio/gpio-moxtet.c
create mode 100644 drivers/gpio/gpiolib-acpi.h
create mode 100644 drivers/gpio/gpiolib-of.h
create mode 100644 drivers/gpio/sgpio-aspeed.c
create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h
create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.h
create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h
create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h
create mode 100644 drivers/gpu/drm/amd/amdgpu/arct_reg_init.c
create mode 100644 drivers/gpu/drm/amd/amdgpu/athub_v1_0.c
create mode 100644 drivers/gpu/drm/amd/amdgpu/athub_v1_0.h
create mode 100644 drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c
create mode 100644 drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.h
create mode 100644 drivers/gpu/drm/amd/amdgpu/navi12_reg_init.c
create mode 100644 drivers/gpu/drm/amd/amdgpu/navi14_reg_init.c
create mode 100644 drivers/gpu/drm/amd/amdgpu/psp_v12_0.c
create mode 100644 drivers/gpu/drm/amd/amdgpu/psp_v12_0.h
create mode 100644 drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
create mode 100644 drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.h
create mode 100644 drivers/gpu/drm/amd/amdgpu/umc_v6_1.c
create mode 100644 drivers/gpu/drm/amd/amdgpu/umc_v6_1.h
create mode 100644 drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c
create mode 100644 drivers/gpu/drm/amd/amdgpu/vcn_v2_5.h
create mode 100644 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h
create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h
create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c
create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.h
create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/Makefile
create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.c
create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.h
create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c
create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.h
create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.h
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.h
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.h
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.h
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c
create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.h
delete mode 100644 drivers/gpu/drm/amd/display/dc/dsc/drm_dsc_dc.c
create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.c
create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.h
create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_translate_dcn21.c
create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_translate_dcn21.h
create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/generic_regs.h
create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/hw_generic.c
create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/hw_generic.h
create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c
create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.h
create mode 100644 drivers/gpu/drm/amd/include/arct_ip_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/clk/clk_10_0_2_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/clk/clk_10_0_2_sh_mask.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_2_1_0_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_2_1_0_sh_mask.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dpcs_2_1_0_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dpcs_2_1_0_sh_mask.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_default.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_sh_mask.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mp/mp_12_0_0_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mp/mp_12_0_0_sh_mask.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/rsmu/rsmu_0_0_2_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/rsmu/rsmu_0_0_2_sh_mask.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma0/sdma0_4_2_2_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma0/sdma0_4_2_2_sh_mask.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma1/sdma1_4_2_2_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma1/sdma1_4_2_2_sh_mask.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma2/sdma2_4_2_2_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma2/sdma2_4_2_2_sh_mask.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma3/sdma3_4_2_2_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma3/sdma3_4_2_2_sh_mask.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma4/sdma4_4_2_2_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma4/sdma4_4_2_2_sh_mask.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma5/sdma5_4_2_2_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma5/sdma5_4_2_2_sh_mask.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma6/sdma6_4_2_2_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma6/sdma6_4_2_2_sh_mask.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma7/sdma7_4_2_2_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/sdma7/sdma7_4_2_2_sh_mask.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/umc/umc_6_1_1_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/umc/umc_6_1_1_sh_mask.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/vcn/vcn_2_5_offset.h
create mode 100644 drivers/gpu/drm/amd/include/asic_reg/vcn/vcn_2_5_sh_mask.h
create mode 100644 drivers/gpu/drm/amd/include/navi12_ip_offset.h
create mode 100644 drivers/gpu/drm/amd/include/navi14_ip_offset.h
create mode 100644 drivers/gpu/drm/amd/include/renoir_ip_offset.h
create mode 100644 drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
create mode 100644 drivers/gpu/drm/amd/powerplay/arcturus_ppt.h
create mode 100644 drivers/gpu/drm/amd/powerplay/inc/arcturus_ppsmc.h
create mode 100644 drivers/gpu/drm/amd/powerplay/inc/smu11_driver_if_arcturus.h
create mode 100644 drivers/gpu/drm/amd/powerplay/inc/smu12_driver_if.h
create mode 100644 drivers/gpu/drm/amd/powerplay/inc/smu_types.h
create mode 100644 drivers/gpu/drm/amd/powerplay/inc/smu_v12_0.h
create mode 100644 drivers/gpu/drm/amd/powerplay/inc/smu_v12_0_ppsmc.h
create mode 100644 drivers/gpu/drm/amd/powerplay/renoir_ppt.c
create mode 100644 drivers/gpu/drm/amd/powerplay/renoir_ppt.h
create mode 100644 drivers/gpu/drm/amd/powerplay/smu_v12_0.c
delete mode 100644 drivers/gpu/drm/ast/ast_fb.c
create mode 100644 drivers/gpu/drm/drm_mipi_dbi.c
delete mode 100644 drivers/gpu/drm/etnaviv/etnaviv_iommu.h
delete mode 100644 drivers/gpu/drm/i915/Makefile.header-test
delete mode 100644 drivers/gpu/drm/i915/display/Makefile.header-test
create mode 100644 drivers/gpu/drm/i915/display/intel_display_types.h
create mode 100644 drivers/gpu/drm/i915/display/intel_tc.c
create mode 100644 drivers/gpu/drm/i915/display/intel_tc.h
delete mode 100644 drivers/gpu/drm/i915/gem/Makefile.header-test
create mode 100644 drivers/gpu/drm/i915/gem/i915_gem_shrinker.h
create mode 100644 drivers/gpu/drm/i915/gem/i915_gem_stolen.h
delete mode 100644 drivers/gpu/drm/i915/gt/Makefile.header-test
rename drivers/gpu/drm/i915/{intel_renderstate_gen6.c => gt/gen6_renderstate.c} (100%)
rename drivers/gpu/drm/i915/{intel_renderstate_gen7.c => gt/gen7_renderstate.c} (100%)
rename drivers/gpu/drm/i915/{intel_renderstate_gen8.c => gt/gen8_renderstate.c} (100%)
rename drivers/gpu/drm/i915/{intel_renderstate_gen9.c => gt/gen9_renderstate.c} (100%)
create mode 100644 drivers/gpu/drm/i915/gt/intel_engine_pool.c
create mode 100644 drivers/gpu/drm/i915/gt/intel_engine_pool.h
create mode 100644 drivers/gpu/drm/i915/gt/intel_engine_pool_types.h
create mode 100644 drivers/gpu/drm/i915/gt/intel_engine_user.c
create mode 100644 drivers/gpu/drm/i915/gt/intel_engine_user.h
create mode 100644 drivers/gpu/drm/i915/gt/intel_gt.c
create mode 100644 drivers/gpu/drm/i915/gt/intel_gt.h
create mode 100644 drivers/gpu/drm/i915/gt/intel_gt_irq.c
create mode 100644 drivers/gpu/drm/i915/gt/intel_gt_irq.h
create mode 100644 drivers/gpu/drm/i915/gt/intel_gt_pm_irq.c
create mode 100644 drivers/gpu/drm/i915/gt/intel_gt_pm_irq.h
create mode 100644 drivers/gpu/drm/i915/gt/intel_gt_types.h
create mode 100644 drivers/gpu/drm/i915/gt/intel_renderstate.c
create mode 100644 drivers/gpu/drm/i915/gt/intel_renderstate.h
create mode 100644 drivers/gpu/drm/i915/gt/intel_reset_types.h
create mode 100644 drivers/gpu/drm/i915/gt/intel_timeline.c
create mode 100644 drivers/gpu/drm/i915/gt/intel_timeline.h
create mode 100644 drivers/gpu/drm/i915/gt/intel_timeline_types.h
create mode 100644 drivers/gpu/drm/i915/gt/selftest_context.c
create mode 100644 drivers/gpu/drm/i915/gt/selftest_engine.c
create mode 100644 drivers/gpu/drm/i915/gt/selftest_engine.h
create mode 100644 drivers/gpu/drm/i915/gt/selftest_engine_pm.c
create mode 100644 drivers/gpu/drm/i915/gt/selftest_timeline.c
create mode 100644 drivers/gpu/drm/i915/gt/selftests/mock_timeline.c
create mode 100644 drivers/gpu/drm/i915/gt/selftests/mock_timeline.h
create mode 100644 drivers/gpu/drm/i915/gt/uc/Makefile
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc.c
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc.h
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_ads.h
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_fw.h
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_log.h
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_huc.c
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_huc.h
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_huc_fw.h
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_uc.c
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_uc.h
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h
create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h
create mode 100644 drivers/gpu/drm/i915/gt/uc/selftest_guc.c
create mode 100644 drivers/gpu/drm/i915/i915_buddy.c
create mode 100644 drivers/gpu/drm/i915/i915_buddy.h
delete mode 100644 drivers/gpu/drm/i915/i915_gem_batch_pool.c
delete mode 100644 drivers/gpu/drm/i915/i915_gem_batch_pool.h
delete mode 100644 drivers/gpu/drm/i915/i915_gem_render_state.c
delete mode 100644 drivers/gpu/drm/i915/i915_gem_render_state.h
create mode 100644 drivers/gpu/drm/i915/i915_getparam.c
create mode 100644 drivers/gpu/drm/i915/i915_memcpy.h
delete mode 100644 drivers/gpu/drm/i915/i915_oa_bdw.c
delete mode 100644 drivers/gpu/drm/i915/i915_oa_bdw.h
delete mode 100644 drivers/gpu/drm/i915/i915_oa_bxt.c
delete mode 100644 drivers/gpu/drm/i915/i915_oa_bxt.h
delete mode 100644 drivers/gpu/drm/i915/i915_oa_cflgt2.c
delete mode 100644 drivers/gpu/drm/i915/i915_oa_cflgt2.h
delete mode 100644 drivers/gpu/drm/i915/i915_oa_cflgt3.c
delete mode 100644 drivers/gpu/drm/i915/i915_oa_cflgt3.h
delete mode 100644 drivers/gpu/drm/i915/i915_oa_chv.c
delete mode 100644 drivers/gpu/drm/i915/i915_oa_chv.h
delete mode 100644 drivers/gpu/drm/i915/i915_oa_cnl.c
delete mode 100644 drivers/gpu/drm/i915/i915_oa_cnl.h
delete mode 100644 drivers/gpu/drm/i915/i915_oa_glk.c
delete mode 100644 drivers/gpu/drm/i915/i915_oa_glk.h
delete mode 100644 drivers/gpu/drm/i915/i915_oa_hsw.c
delete mode 100644 drivers/gpu/drm/i915/i915_oa_hsw.h
delete mode 100644 drivers/gpu/drm/i915/i915_oa_icl.c
delete mode 100644 drivers/gpu/drm/i915/i915_oa_icl.h
delete mode 100644 drivers/gpu/drm/i915/i915_oa_kblgt2.c
delete mode 100644 drivers/gpu/drm/i915/i915_oa_kblgt2.h
delete mode 100644 drivers/gpu/drm/i915/i915_oa_kblgt3.c
delete mode 100644 drivers/gpu/drm/i915/i915_oa_kblgt3.h
delete mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt2.c
delete mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt2.h
delete mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt3.c
delete mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt3.h
delete mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt4.c
delete mode 100644 drivers/gpu/drm/i915/i915_oa_sklgt4.h
create mode 100644 drivers/gpu/drm/i915/i915_perf.h
create mode 100644 drivers/gpu/drm/i915/i915_suspend.h
create mode 100644 drivers/gpu/drm/i915/i915_sw_fence_work.c
create mode 100644 drivers/gpu/drm/i915/i915_sw_fence_work.h
create mode 100644 drivers/gpu/drm/i915/i915_sysfs.h
delete mode 100644 drivers/gpu/drm/i915/i915_timeline.c
delete mode 100644 drivers/gpu/drm/i915/i915_timeline.h
delete mode 100644 drivers/gpu/drm/i915/i915_timeline_types.h
create mode 100644 drivers/gpu/drm/i915/i915_utils.c
delete mode 100644 drivers/gpu/drm/i915/intel_drv.h
delete mode 100644 drivers/gpu/drm/i915/intel_guc.c
delete mode 100644 drivers/gpu/drm/i915/intel_guc.h
delete mode 100644 drivers/gpu/drm/i915/intel_guc_ads.c
delete mode 100644 drivers/gpu/drm/i915/intel_guc_ads.h
delete mode 100644 drivers/gpu/drm/i915/intel_guc_ct.c
delete mode 100644 drivers/gpu/drm/i915/intel_guc_ct.h
delete mode 100644 drivers/gpu/drm/i915/intel_guc_fw.c
delete mode 100644 drivers/gpu/drm/i915/intel_guc_fw.h
delete mode 100644 drivers/gpu/drm/i915/intel_guc_fwif.h
delete mode 100644 drivers/gpu/drm/i915/intel_guc_log.c
delete mode 100644 drivers/gpu/drm/i915/intel_guc_log.h
delete mode 100644 drivers/gpu/drm/i915/intel_guc_reg.h
delete mode 100644 drivers/gpu/drm/i915/intel_guc_submission.c
delete mode 100644 drivers/gpu/drm/i915/intel_guc_submission.h
delete mode 100644 drivers/gpu/drm/i915/intel_huc.c
delete mode 100644 drivers/gpu/drm/i915/intel_huc.h
delete mode 100644 drivers/gpu/drm/i915/intel_huc_fw.c
delete mode 100644 drivers/gpu/drm/i915/intel_huc_fw.h
create mode 100644 drivers/gpu/drm/i915/intel_pch.c
create mode 100644 drivers/gpu/drm/i915/intel_pch.h
delete mode 100644 drivers/gpu/drm/i915/intel_renderstate.h
delete mode 100644 drivers/gpu/drm/i915/intel_uc.c
delete mode 100644 drivers/gpu/drm/i915/intel_uc.h
delete mode 100644 drivers/gpu/drm/i915/intel_uc_fw.c
delete mode 100644 drivers/gpu/drm/i915/intel_uc_fw.h
create mode 100644 drivers/gpu/drm/i915/oa/Makefile
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_bdw.c
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_bdw.h
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_bxt.c
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_bxt.h
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_cflgt2.c
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_cflgt2.h
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_cflgt3.c
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_cflgt3.h
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_chv.c
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_chv.h
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_cnl.c
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_cnl.h
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_glk.c
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_glk.h
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_hsw.c
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_hsw.h
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_icl.c
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_icl.h
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_kblgt2.c
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_kblgt2.h
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_kblgt3.c
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_kblgt3.h
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_sklgt2.c
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_sklgt2.h
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_sklgt3.c
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_sklgt3.h
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_sklgt4.c
create mode 100644 drivers/gpu/drm/i915/oa/i915_oa_sklgt4.h
create mode 100644 drivers/gpu/drm/i915/selftests/i915_buddy.c
delete mode 100644 drivers/gpu/drm/i915/selftests/i915_timeline.c
delete mode 100644 drivers/gpu/drm/i915/selftests/igt_wedge_me.h
delete mode 100644 drivers/gpu/drm/i915/selftests/intel_guc.c
delete mode 100644 drivers/gpu/drm/i915/selftests/mock_timeline.c
delete mode 100644 drivers/gpu/drm/i915/selftests/mock_timeline.h
delete mode 100644 drivers/gpu/drm/mgag200/mgag200_fb.c
create mode 100644 drivers/gpu/drm/msm/msm_atomic_trace.h
create mode 100644 drivers/gpu/drm/msm/msm_atomic_tracepoints.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
delete mode 100644 drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c
create mode 100644 drivers/gpu/drm/panel/panel-lg-lb035q02.c
create mode 100644 drivers/gpu/drm/panel/panel-nec-nl8048hl11.c
create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt39016.c
create mode 100644 drivers/gpu/drm/panel/panel-raydium-rm67191.c
create mode 100644 drivers/gpu/drm/panel/panel-sharp-ls037v7dw01.c
create mode 100644 drivers/gpu/drm/panel/panel-sony-acx565akm.c
create mode 100644 drivers/gpu/drm/panel/panel-tpo-td028ttec1.c
create mode 100644 drivers/gpu/drm/panel/panel-tpo-td043mtea1.c
create mode 100644 drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
delete mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_psr.c
delete mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_psr.h
create mode 100644 drivers/gpu/drm/tiny/Kconfig
create mode 100644 drivers/gpu/drm/tiny/Makefile
create mode 100644 drivers/gpu/drm/tiny/gm12u320.c
create mode 100644 drivers/gpu/drm/tiny/hx8357d.c
create mode 100644 drivers/gpu/drm/tiny/ili9225.c
create mode 100644 drivers/gpu/drm/tiny/ili9341.c
create mode 100644 drivers/gpu/drm/tiny/mi0283qt.c
create mode 100644 drivers/gpu/drm/tiny/repaper.c
create mode 100644 drivers/gpu/drm/tiny/st7586.c
create mode 100644 drivers/gpu/drm/tiny/st7735r.c
delete mode 100644 drivers/gpu/drm/tinydrm/Kconfig
delete mode 100644 drivers/gpu/drm/tinydrm/Makefile
delete mode 100644 drivers/gpu/drm/tinydrm/core/Makefile
delete mode 100644 drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c
delete mode 100644 drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c
delete mode 100644 drivers/gpu/drm/tinydrm/hx8357d.c
delete mode 100644 drivers/gpu/drm/tinydrm/ili9225.c
delete mode 100644 drivers/gpu/drm/tinydrm/ili9341.c
delete mode 100644 drivers/gpu/drm/tinydrm/mi0283qt.c
delete mode 100644 drivers/gpu/drm/tinydrm/mipi-dbi.c
delete mode 100644 drivers/gpu/drm/tinydrm/repaper.c
delete mode 100644 drivers/gpu/drm/tinydrm/st7586.c
delete mode 100644 drivers/gpu/drm/tinydrm/st7735r.c
delete mode 100644 drivers/gpu/drm/vboxvideo/vbox_prime.c
create mode 100644 drivers/gpu/drm/vkms/vkms_composer.c
delete mode 100644 drivers/gpu/drm/vkms/vkms_crc.c
create mode 100644 drivers/greybus/Kconfig
create mode 100644 drivers/greybus/Makefile
create mode 100644 drivers/greybus/arpc.h
create mode 100644 drivers/greybus/bundle.c
create mode 100644 drivers/greybus/connection.c
create mode 100644 drivers/greybus/control.c
create mode 100644 drivers/greybus/core.c
create mode 100644 drivers/greybus/debugfs.c
create mode 100644 drivers/greybus/es2.c
create mode 100644 drivers/greybus/greybus_trace.h
create mode 100644 drivers/greybus/hd.c
create mode 100644 drivers/greybus/interface.c
create mode 100644 drivers/greybus/manifest.c
create mode 100644 drivers/greybus/module.c
create mode 100644 drivers/greybus/operation.c
create mode 100644 drivers/greybus/svc.c
create mode 100644 drivers/greybus/svc_watchdog.c
create mode 100644 drivers/hid/hid-creative-sb0540.c
delete mode 100644 drivers/hwmon/ads1015.c
create mode 100644 drivers/hwmon/as370-hwmon.c
delete mode 100644 drivers/hwmon/jz4740-hwmon.c
create mode 100644 drivers/hwmon/pmbus/inspur-ipsps.c
create mode 100644 drivers/hwtracing/intel_th/msu-sink.c
create mode 100644 drivers/i2c/busses/i2c-icy.c
delete mode 100644 drivers/ide/sgiioc4.c
create mode 100644 drivers/iio/imu/adis16460.c
create mode 100644 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c
create mode 100644 drivers/iio/light/noa1305.c
create mode 100644 drivers/iio/potentiometer/max5432.c
create mode 100644 drivers/input/input-poller.c
create mode 100644 drivers/input/input-poller.h
create mode 100644 drivers/input/joystick/fsia6b.c
delete mode 100644 drivers/input/keyboard/w90p910_keypad.c
delete mode 100644 drivers/input/touchscreen/w90p910_ts.c
create mode 100644 drivers/interconnect/qcom/qcs404.c
create mode 100644 drivers/interconnect/qcom/smd-rpm.c
create mode 100644 drivers/interconnect/qcom/smd-rpm.h
create mode 100644 drivers/iommu/amd_iommu.h
create mode 100644 drivers/iommu/amd_iommu_quirks.c
create mode 100644 drivers/iommu/arm-smmu-impl.c
delete mode 100644 drivers/iommu/arm-smmu-regs.h
create mode 100644 drivers/iommu/arm-smmu.h
create mode 100644 drivers/iommu/intel-trace.c
create mode 100644 drivers/irqchip/irq-ingenic-tcu.c
create mode 100644 drivers/md/dm-clone-metadata.c
create mode 100644 drivers/md/dm-clone-metadata.h
create mode 100644 drivers/md/dm-clone-target.c
create mode 100644 drivers/md/dm-verity-verify-sig.c
create mode 100644 drivers/md/dm-verity-verify-sig.h
create mode 100644 drivers/media/i2c/ov5675.c
create mode 100644 drivers/media/platform/sunxi/Kconfig
create mode 100644 drivers/media/platform/sunxi/Makefile
create mode 100644 drivers/media/platform/sunxi/sun4i-csi/Kconfig
create mode 100644 drivers/media/platform/sunxi/sun4i-csi/Makefile
create mode 100644 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c
create mode 100644 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.h
create mode 100644 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c
create mode 100644 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c
create mode 100644 drivers/media/rc/keymaps/rc-khadas.c
create mode 100644 drivers/media/rc/keymaps/rc-odroid.c
create mode 100644 drivers/media/rc/keymaps/rc-tanix-tx3mini.c
create mode 100644 drivers/media/rc/keymaps/rc-tanix-tx5max.c
create mode 100644 drivers/media/rc/keymaps/rc-wetek-hub.c
create mode 100644 drivers/media/rc/keymaps/rc-wetek-play2.c
create mode 100644 drivers/media/rc/keymaps/rc-x96max.c
create mode 100644 drivers/media/v4l2-core/v4l2-i2c.c
create mode 100644 drivers/media/v4l2-core/v4l2-spi.c
delete mode 100644 drivers/mfd/cros_ec.c
delete mode 100644 drivers/mfd/cros_ec_dev.h
create mode 100644 drivers/mfd/intel_soc_pmic_mrfld.c
delete mode 100644 drivers/mfd/jz4740-adc.c
create mode 100644 drivers/mfd/mt6397-irq.c
create mode 100644 drivers/misc/habanalabs/include/goya/goya_reg_map.h
delete mode 100644 drivers/misc/ioc4.c
create mode 100644 drivers/misc/lkdtm/cfi.c
delete mode 100644 drivers/misc/sgi-xp/xp_nofault.S
delete mode 100644 drivers/misc/sgi-xp/xp_sn2.c
delete mode 100644 drivers/misc/sgi-xp/xpc_sn2.c
delete mode 100644 drivers/misc/spear13xx_pcie_gadget.c
create mode 100644 drivers/mmc/host/sdhci-of-aspeed.c
create mode 100644 drivers/mmc/host/sdhci-pci-gli.c
delete mode 100644 drivers/mtd/devices/m25p80.c
delete mode 100644 drivers/mtd/nand/raw/ingenic/jz4740_nand.c
create mode 100644 drivers/mtd/nand/raw/mxic_nand.c
delete mode 100644 drivers/mtd/nand/raw/nuc900_nand.c
rename drivers/mtd/{ => parsers}/ar7part.c (100%)
rename drivers/mtd/{ => parsers}/bcm47xxpart.c (100%)
rename drivers/mtd/{ => parsers}/bcm63xxpart.c (100%)
rename drivers/mtd/{ => parsers}/cmdlinepart.c (100%)
rename drivers/mtd/{ => parsers}/ofpart.c (100%)
create mode 100644 drivers/net/can/kvaser_pciefd.c
create mode 100644 drivers/net/can/m_can/m_can.h
create mode 100644 drivers/net/can/m_can/m_can_platform.c
create mode 100644 drivers/net/can/m_can/tcan4x5x.c
create mode 100644 drivers/net/can/sja1000/f81601.c
create mode 100644 drivers/net/dsa/microchip/ksz8795.c
create mode 100644 drivers/net/dsa/microchip/ksz8795_reg.h
create mode 100644 drivers/net/dsa/microchip/ksz8795_spi.c
create mode 100644 drivers/net/dsa/microchip/ksz9477_i2c.c
delete mode 100644 drivers/net/dsa/microchip/ksz_priv.h
create mode 100644 drivers/net/dsa/mv88e6xxx/port_hidden.c
create mode 100644 drivers/net/dsa/sja1105/sja1105_tas.c
create mode 100644 drivers/net/dsa/sja1105/sja1105_tas.h
delete mode 100644 drivers/net/ethernet/aquantia/atlantic/hw_atl/Makefile
create mode 100644 drivers/net/ethernet/freescale/enetc/enetc_mdio.h
create mode 100644 drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
create mode 100644 drivers/net/ethernet/intel/ice/ice_flex_pipe.c
create mode 100644 drivers/net/ethernet/intel/ice/ice_flex_pipe.h
create mode 100644 drivers/net/ethernet/intel/ice/ice_flex_type.h
delete mode 100644 drivers/net/ethernet/mellanox/mlx5/core/diag/Makefile
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/diag/en_rep_tracepoint.h
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/diag/en_tc_tracepoint.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/diag/en_tc_tracepoint.h
delete mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/Makefile
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/health.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/health.h
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/hv_vhca_stats.h
delete mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/reporter.h
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c
delete mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/xsk/Makefile
delete mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en_accel/Makefile
delete mode 100644 drivers/net/ethernet/mellanox/mlx5/core/fpga/Makefile
delete mode 100644 drivers/net/ethernet/mellanox/mlx5/core/ipoib/Makefile
delete mode 100644 drivers/net/ethernet/mellanox/mlx5/core/lib/Makefile
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/lib/dm.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/lib/hv.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/lib/hv.h
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/lib/hv_vhca.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/lib/hv_vhca.h
rename drivers/net/ethernet/mellanox/mlx5/core/{accel => steering}/Makefile (100%)
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_cmd.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_crc32.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_fw.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.h
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/mlx5_ifc_dr.h
create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h
create mode 100644 drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c
delete mode 100644 drivers/net/ethernet/micrel/ks8695net.c
delete mode 100644 drivers/net/ethernet/micrel/ks8695net.h
create mode 100644 drivers/net/ethernet/mscc/ocelot_ptp.h
delete mode 100644 drivers/net/ethernet/netronome/nfp/bpf/Makefile
create mode 100644 drivers/net/ethernet/netronome/nfp/devlink_param.c
delete mode 100644 drivers/net/ethernet/netronome/nfp/flower/Makefile
delete mode 100644 drivers/net/ethernet/netronome/nfp/nfpcore/Makefile
delete mode 100644 drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000/Makefile
delete mode 100644 drivers/net/ethernet/netronome/nfp/nic/Makefile
delete mode 100644 drivers/net/ethernet/netx-eth.c
delete mode 100644 drivers/net/ethernet/nuvoton/Kconfig
delete mode 100644 drivers/net/ethernet/nuvoton/Makefile
delete mode 100644 drivers/net/ethernet/nuvoton/w90p910_ether.c
create mode 100644 drivers/net/ethernet/pensando/Kconfig
create mode 100644 drivers/net/ethernet/pensando/Makefile
create mode 100644 drivers/net/ethernet/pensando/ionic/Makefile
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic.h
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_bus.h
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_debugfs.h
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_dev.c
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_dev.h
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_devlink.c
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_devlink.h
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_ethtool.h
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_if.h
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_lif.c
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_lif.h
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_main.c
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_regs.h
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_rx_filter.c
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_rx_filter.h
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_stats.c
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_stats.h
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_txrx.c
create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_txrx.h
create mode 100644 drivers/net/phy/adin.c
create mode 100644 drivers/net/phy/mdio-aspeed.c
delete mode 100644 drivers/net/wan/dscc4.c
create mode 100644 drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c
create mode 100644 drivers/net/wireless/realtek/rtw88/coex.c
create mode 100644 drivers/net/wireless/realtek/rtw88/coex.h
create mode 100644 drivers/pci/controller/dwc/pcie-tegra194.c
create mode 100644 drivers/pci/controller/pci-hyperv-intf.c
delete mode 100644 drivers/pci/hotplug/sgi_hotplug.c
create mode 100644 drivers/phy/lantiq/phy-lantiq-vrx200-pcie.c
create mode 100644 drivers/phy/tegra/phy-tegra194-p2u.c
create mode 100644 drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c
create mode 100644 drivers/pinctrl/cirrus/pinctrl-cs47l15.c
create mode 100644 drivers/pinctrl/cirrus/pinctrl-cs47l92.c
create mode 100644 drivers/pinctrl/qcom/pinctrl-sc7180.c
create mode 100644 drivers/platform/chrome/cros_ec.c
create mode 100644 drivers/platform/chrome/cros_ec_chardev.c
delete mode 100644 drivers/power/supply/jz4740-battery.c
create mode 100644 drivers/pwm/pwm-sprd.c
create mode 100644 drivers/regulator/mt6358-regulator.c
create mode 100644 drivers/regulator/sy8824x.c
create mode 100644 drivers/reset/reset-scmi.c
create mode 100644 drivers/rtc/rtc-fsl-ftm-alarm.c
create mode 100644 drivers/rtc/rtc-meson-vrtc.c
delete mode 100644 drivers/rtc/rtc-nuc900.c
create mode 100644 drivers/s390/crypto/zcrypt_ccamisc.c
create mode 100644 drivers/s390/crypto/zcrypt_ccamisc.h
delete mode 100644 drivers/sn/Kconfig
delete mode 100644 drivers/sn/Makefile
delete mode 100644 drivers/sn/ioc3.c
create mode 100644 drivers/soc/amlogic/meson-ee-pwrc.c
create mode 100644 drivers/soc/qcom/socinfo.c
create mode 100644 drivers/soc/samsung/exynos-chipid.c
create mode 100644 drivers/soundwire/debugfs.c
create mode 100644 drivers/spi/spi-npcm-fiu.c
delete mode 100644 drivers/spi/spi-nuc900.c
delete mode 100644 drivers/staging/erofs/Documentation/filesystems/erofs.txt
delete mode 100644 drivers/staging/erofs/Kconfig
delete mode 100644 drivers/staging/erofs/Makefile
delete mode 100644 drivers/staging/erofs/TODO
delete mode 100644 drivers/staging/erofs/compress.h
delete mode 100644 drivers/staging/erofs/data.c
delete mode 100644 drivers/staging/erofs/decompressor.c
delete mode 100644 drivers/staging/erofs/dir.c
delete mode 100644 drivers/staging/erofs/erofs_fs.h
delete mode 100644 drivers/staging/erofs/include/linux/tagptr.h
delete mode 100644 drivers/staging/erofs/include/trace/events/erofs.h
delete mode 100644 drivers/staging/erofs/inode.c
delete mode 100644 drivers/staging/erofs/internal.h
delete mode 100644 drivers/staging/erofs/namei.c
delete mode 100644 drivers/staging/erofs/super.c
delete mode 100644 drivers/staging/erofs/unzip_pagevec.h
delete mode 100644 drivers/staging/erofs/unzip_vle.c
delete mode 100644 drivers/staging/erofs/unzip_vle.h
delete mode 100644 drivers/staging/erofs/utils.c
delete mode 100644 drivers/staging/erofs/xattr.c
delete mode 100644 drivers/staging/erofs/xattr.h
delete mode 100644 drivers/staging/erofs/zmap.c
create mode 100644 drivers/staging/exfat/Kconfig
create mode 100644 drivers/staging/exfat/Makefile
create mode 100644 drivers/staging/exfat/TODO
create mode 100644 drivers/staging/exfat/exfat.h
create mode 100644 drivers/staging/exfat/exfat_blkdev.c
create mode 100644 drivers/staging/exfat/exfat_cache.c
create mode 100644 drivers/staging/exfat/exfat_core.c
create mode 100644 drivers/staging/exfat/exfat_nls.c
create mode 100644 drivers/staging/exfat/exfat_super.c
create mode 100644 drivers/staging/exfat/exfat_upcase.c
rename {Documentation => drivers/staging/fieldbus/Documentation}/devicetree/bindings/fieldbus/arcx,anybus-controller.txt (100%)
delete mode 100644 drivers/staging/greybus/arpc.h
delete mode 100644 drivers/staging/greybus/bundle.c
delete mode 100644 drivers/staging/greybus/bundle.h
delete mode 100644 drivers/staging/greybus/connection.c
delete mode 100644 drivers/staging/greybus/connection.h
delete mode 100644 drivers/staging/greybus/control.c
delete mode 100644 drivers/staging/greybus/control.h
delete mode 100644 drivers/staging/greybus/core.c
delete mode 100644 drivers/staging/greybus/debugfs.c
delete mode 100644 drivers/staging/greybus/es2.c
delete mode 100644 drivers/staging/greybus/greybus.h
delete mode 100644 drivers/staging/greybus/greybus_manifest.h
delete mode 100644 drivers/staging/greybus/greybus_protocols.h
delete mode 100644 drivers/staging/greybus/greybus_trace.h
delete mode 100644 drivers/staging/greybus/hd.c
delete mode 100644 drivers/staging/greybus/hd.h
delete mode 100644 drivers/staging/greybus/interface.c
delete mode 100644 drivers/staging/greybus/interface.h
delete mode 100644 drivers/staging/greybus/manifest.c
delete mode 100644 drivers/staging/greybus/manifest.h
delete mode 100644 drivers/staging/greybus/module.c
delete mode 100644 drivers/staging/greybus/module.h
delete mode 100644 drivers/staging/greybus/operation.c
delete mode 100644 drivers/staging/greybus/operation.h
delete mode 100644 drivers/staging/greybus/svc.c
delete mode 100644 drivers/staging/greybus/svc.h
delete mode 100644 drivers/staging/greybus/svc_watchdog.c
delete mode 100644 drivers/staging/iio/adc/ad7192.h
delete mode 100644 drivers/staging/media/bcm2048/Kconfig
delete mode 100644 drivers/staging/media/bcm2048/Makefile
delete mode 100644 drivers/staging/media/bcm2048/TODO
delete mode 100644 drivers/staging/media/bcm2048/radio-bcm2048.c
delete mode 100644 drivers/staging/media/bcm2048/radio-bcm2048.h
delete mode 100644 drivers/staging/media/davinci_vpfe/Kconfig
delete mode 100644 drivers/staging/media/davinci_vpfe/Makefile
delete mode 100644 drivers/staging/media/davinci_vpfe/TODO
delete mode 100644 drivers/staging/media/davinci_vpfe/davinci-vpfe-mc.txt
delete mode 100644 drivers/staging/media/davinci_vpfe/davinci_vpfe_user.h
delete mode 100644 drivers/staging/media/davinci_vpfe/dm365_ipipe.c
delete mode 100644 drivers/staging/media/davinci_vpfe/dm365_ipipe.h
delete mode 100644 drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
delete mode 100644 drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.h
delete mode 100644 drivers/staging/media/davinci_vpfe/dm365_ipipeif.c
delete mode 100644 drivers/staging/media/davinci_vpfe/dm365_ipipeif.h
delete mode 100644 drivers/staging/media/davinci_vpfe/dm365_ipipeif_user.h
delete mode 100644 drivers/staging/media/davinci_vpfe/dm365_isif.c
delete mode 100644 drivers/staging/media/davinci_vpfe/dm365_isif.h
delete mode 100644 drivers/staging/media/davinci_vpfe/dm365_isif_regs.h
delete mode 100644 drivers/staging/media/davinci_vpfe/dm365_resizer.c
delete mode 100644 drivers/staging/media/davinci_vpfe/dm365_resizer.h
delete mode 100644 drivers/staging/media/davinci_vpfe/vpfe.h
delete mode 100644 drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
delete mode 100644 drivers/staging/media/davinci_vpfe/vpfe_mc_capture.h
delete mode 100644 drivers/staging/media/davinci_vpfe/vpfe_video.c
delete mode 100644 drivers/staging/media/davinci_vpfe/vpfe_video.h
create mode 100644 drivers/staging/media/hantro/hantro_g1_h264_dec.c
create mode 100644 drivers/staging/media/hantro/hantro_g1_vp8_dec.c
create mode 100644 drivers/staging/media/hantro/hantro_h264.c
create mode 100644 drivers/staging/media/hantro/hantro_vp8.c
create mode 100644 drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c
create mode 100644 drivers/staging/media/imx/imx-media-csc-scaler.c
create mode 100644 drivers/staging/octeon/octeon-stubs.h
create mode 100644 drivers/staging/qlge/Kconfig
rename drivers/{net/ethernet/qlogic => staging}/qlge/Makefile (100%)
create mode 100644 drivers/staging/qlge/TODO
rename drivers/{net/ethernet/qlogic => staging}/qlge/qlge.h (100%)
rename drivers/{net/ethernet/qlogic => staging}/qlge/qlge_dbg.c (100%)
rename drivers/{net/ethernet/qlogic => staging}/qlge/qlge_ethtool.c (100%)
rename drivers/{net/ethernet/qlogic => staging}/qlge/qlge_main.c (100%)
rename drivers/{net/ethernet/qlogic => staging}/qlge/qlge_mpi.c (100%)
delete mode 100644 drivers/staging/rtl8723bs/hal/hal_phy.c
delete mode 100644 drivers/staging/rtl8723bs/os_dep/rtw_proc.c
delete mode 100644 drivers/staging/rtl8723bs/os_dep/rtw_proc.h
rename drivers/{ => staging}/uwb/Kconfig (100%)
rename drivers/{ => staging}/uwb/Makefile (100%)
create mode 100644 drivers/staging/uwb/TODO
rename drivers/{ => staging}/uwb/address.c (100%)
create mode 100644 drivers/staging/uwb/allocator.c
rename drivers/{ => staging}/uwb/beacon.c (100%)
rename drivers/{ => staging}/uwb/driver.c (100%)
rename drivers/{ => staging}/uwb/drp-avail.c (100%)
create mode 100644 drivers/staging/uwb/drp-ie.c
rename drivers/{ => staging}/uwb/drp.c (100%)
rename drivers/{ => staging}/uwb/est.c (100%)
create mode 100644 drivers/staging/uwb/hwa-rc.c
rename drivers/{ => staging}/uwb/i1480/Makefile (100%)
rename drivers/{ => staging}/uwb/i1480/dfu/Makefile (100%)
create mode 100644 drivers/staging/uwb/i1480/dfu/dfu.c
create mode 100644 drivers/staging/uwb/i1480/dfu/i1480-dfu.h
create mode 100644 drivers/staging/uwb/i1480/dfu/mac.c
create mode 100644 drivers/staging/uwb/i1480/dfu/phy.c
create mode 100644 drivers/staging/uwb/i1480/dfu/usb.c
create mode 100644 drivers/staging/uwb/i1480/i1480-est.c
rename drivers/{ => staging}/uwb/ie-rcv.c (100%)
rename drivers/{ => staging}/uwb/ie.c (100%)
rename {include/linux/uwb => drivers/staging/uwb/include}/debug-cmd.h (100%)
rename {include/linux/uwb => drivers/staging/uwb/include}/spec.h (100%)
rename {include/linux/uwb => drivers/staging/uwb/include}/umc.h (100%)
rename {include/linux/uwb => drivers/staging/uwb/include}/whci.h (100%)
rename drivers/{ => staging}/uwb/lc-dev.c (100%)
rename drivers/{ => staging}/uwb/lc-rc.c (100%)
rename drivers/{ => staging}/uwb/neh.c (100%)
create mode 100644 drivers/staging/uwb/pal.c
create mode 100644 drivers/staging/uwb/radio.c
rename drivers/{ => staging}/uwb/reset.c (100%)
create mode 100644 drivers/staging/uwb/rsv.c
rename drivers/{ => staging}/uwb/scan.c (100%)
create mode 100644 drivers/staging/uwb/umc-bus.c
create mode 100644 drivers/staging/uwb/umc-dev.c
create mode 100644 drivers/staging/uwb/umc-drv.c
create mode 100644 drivers/staging/uwb/uwb-debug.c
create mode 100644 drivers/staging/uwb/uwb-internal.h
create mode 100644 drivers/staging/uwb/uwb.h
rename drivers/{ => staging}/uwb/uwbd.c (100%)
create mode 100644 drivers/staging/uwb/whc-rc.c
create mode 100644 drivers/staging/uwb/whci.c
rename {Documentation/usb => drivers/staging/wusbcore/Documentation}/wusb-cbaf (100%)
rename {Documentation/usb => drivers/staging/wusbcore/Documentation}/wusb-design-overview.rst (100%)
create mode 100644 drivers/staging/wusbcore/Kconfig
create mode 100644 drivers/staging/wusbcore/Makefile
create mode 100644 drivers/staging/wusbcore/TODO
create mode 100644 drivers/staging/wusbcore/cbaf.c
create mode 100644 drivers/staging/wusbcore/crypto.c
rename drivers/{usb => staging}/wusbcore/dev-sysfs.c (100%)
create mode 100644 drivers/staging/wusbcore/devconnect.c
create mode 100644 drivers/staging/wusbcore/host/Kconfig
create mode 100644 drivers/staging/wusbcore/host/Makefile
create mode 100644 drivers/staging/wusbcore/host/hwa-hc.c
rename drivers/{usb => staging/wusbcore}/host/whci/Makefile (100%)
create mode 100644 drivers/staging/wusbcore/host/whci/asl.c
create mode 100644 drivers/staging/wusbcore/host/whci/debug.c
create mode 100644 drivers/staging/wusbcore/host/whci/hcd.c
create mode 100644 drivers/staging/wusbcore/host/whci/hw.c
create mode 100644 drivers/staging/wusbcore/host/whci/init.c
create mode 100644 drivers/staging/wusbcore/host/whci/int.c
create mode 100644 drivers/staging/wusbcore/host/whci/pzl.c
create mode 100644 drivers/staging/wusbcore/host/whci/qset.c
create mode 100644 drivers/staging/wusbcore/host/whci/whcd.h
rename drivers/{usb => staging/wusbcore}/host/whci/whci-hc.h (100%)
create mode 100644 drivers/staging/wusbcore/host/whci/wusb.c
rename {include/linux/usb => drivers/staging/wusbcore/include}/association.h (100%)
rename {include/linux/usb => drivers/staging/wusbcore/include}/wusb-wa.h (100%)
create mode 100644 drivers/staging/wusbcore/include/wusb.h
create mode 100644 drivers/staging/wusbcore/mmc.c
rename drivers/{usb => staging}/wusbcore/pal.c (100%)
create mode 100644 drivers/staging/wusbcore/reservation.c
rename drivers/{usb => staging}/wusbcore/rh.c (100%)
rename drivers/{usb => staging}/wusbcore/security.c (100%)
rename drivers/{usb => staging}/wusbcore/wa-hc.c (100%)
create mode 100644 drivers/staging/wusbcore/wa-hc.h
rename drivers/{usb => staging}/wusbcore/wa-nep.c (100%)
rename drivers/{usb => staging}/wusbcore/wa-rpipe.c (100%)
rename drivers/{usb => staging}/wusbcore/wa-xfer.c (100%)
rename drivers/{usb => staging}/wusbcore/wusbhc.c (100%)
create mode 100644 drivers/staging/wusbcore/wusbhc.h
create mode 100644 drivers/thunderbolt/nhi_ops.c
create mode 100644 drivers/tty/serial/8250/8250_dwlib.c
create mode 100644 drivers/tty/serial/8250/8250_dwlib.h
delete mode 100644 drivers/tty/serial/8250/8250_moxa.c
create mode 100644 drivers/tty/serial/fsl_linflexuart.c
delete mode 100644 drivers/tty/serial/ioc3_serial.c
delete mode 100644 drivers/tty/serial/ioc4_serial.c
delete mode 100644 drivers/tty/serial/netx-serial.c
delete mode 100644 drivers/tty/serial/serial_ks8695.c
delete mode 100644 drivers/tty/serial/sn_console.c
create mode 100644 drivers/usb/cdns3/Kconfig
create mode 100644 drivers/usb/cdns3/Makefile
create mode 100644 drivers/usb/cdns3/cdns3-pci-wrap.c
create mode 100644 drivers/usb/cdns3/core.c
create mode 100644 drivers/usb/cdns3/core.h
create mode 100644 drivers/usb/cdns3/debug.h
create mode 100644 drivers/usb/cdns3/drd.c
create mode 100644 drivers/usb/cdns3/drd.h
create mode 100644 drivers/usb/cdns3/ep0.c
create mode 100644 drivers/usb/cdns3/gadget-export.h
create mode 100644 drivers/usb/cdns3/gadget.c
create mode 100644 drivers/usb/cdns3/gadget.h
create mode 100644 drivers/usb/cdns3/host-export.h
create mode 100644 drivers/usb/cdns3/host.c
create mode 100644 drivers/usb/cdns3/trace.c
create mode 100644 drivers/usb/cdns3/trace.h
create mode 100644 drivers/usb/common/Kconfig
create mode 100644 drivers/usb/common/debug.c
create mode 100644 drivers/usb/common/usb-conn-gpio.c
delete mode 100644 drivers/usb/host/ehci-w90x900.c
delete mode 100644 drivers/usb/host/hwa-hc.c
delete mode 100644 drivers/usb/host/oxu210hp.h
delete mode 100644 drivers/usb/host/whci/asl.c
delete mode 100644 drivers/usb/host/whci/debug.c
delete mode 100644 drivers/usb/host/whci/hcd.c
delete mode 100644 drivers/usb/host/whci/hw.c
delete mode 100644 drivers/usb/host/whci/init.c
delete mode 100644 drivers/usb/host/whci/int.c
delete mode 100644 drivers/usb/host/whci/pzl.c
delete mode 100644 drivers/usb/host/whci/qset.c
delete mode 100644 drivers/usb/host/whci/whcd.h
delete mode 100644 drivers/usb/host/whci/wusb.c
delete mode 100644 drivers/usb/wusbcore/Kconfig
delete mode 100644 drivers/usb/wusbcore/Makefile
delete mode 100644 drivers/usb/wusbcore/cbaf.c
delete mode 100644 drivers/usb/wusbcore/crypto.c
delete mode 100644 drivers/usb/wusbcore/devconnect.c
delete mode 100644 drivers/usb/wusbcore/mmc.c
delete mode 100644 drivers/usb/wusbcore/reservation.c
delete mode 100644 drivers/usb/wusbcore/wa-hc.h
delete mode 100644 drivers/usb/wusbcore/wusbhc.h
delete mode 100644 drivers/uwb/allocator.c
delete mode 100644 drivers/uwb/drp-ie.c
delete mode 100644 drivers/uwb/hwa-rc.c
delete mode 100644 drivers/uwb/i1480/dfu/dfu.c
delete mode 100644 drivers/uwb/i1480/dfu/i1480-dfu.h
delete mode 100644 drivers/uwb/i1480/dfu/mac.c
delete mode 100644 drivers/uwb/i1480/dfu/phy.c
delete mode 100644 drivers/uwb/i1480/dfu/usb.c
delete mode 100644 drivers/uwb/i1480/i1480-est.c
delete mode 100644 drivers/uwb/pal.c
delete mode 100644 drivers/uwb/radio.c
delete mode 100644 drivers/uwb/rsv.c
delete mode 100644 drivers/uwb/umc-bus.c
delete mode 100644 drivers/uwb/umc-dev.c
delete mode 100644 drivers/uwb/umc-drv.c
delete mode 100644 drivers/uwb/uwb-debug.c
delete mode 100644 drivers/uwb/uwb-internal.h
delete mode 100644 drivers/uwb/whc-rc.c
delete mode 100644 drivers/uwb/whci.c
delete mode 100644 drivers/video/fbdev/jz4740_fb.c
delete mode 100644 drivers/video/fbdev/nuc900fb.c
delete mode 100644 drivers/video/fbdev/nuc900fb.h
create mode 100644 drivers/w1/masters/sgi_w1.c
create mode 100644 drivers/w1/slaves/w1_ds250x.c
create mode 100644 drivers/watchdog/imx7ulp_wdt.c
delete mode 100644 drivers/watchdog/ks8695_wdt.c
delete mode 100644 drivers/watchdog/nuc900_wdt.c
create mode 100644 fs/btrfs/block-group.c
create mode 100644 fs/btrfs/block-group.h
delete mode 100644 fs/btrfs/dedupe.h
delete mode 100644 fs/btrfs/math.h
create mode 100644 fs/btrfs/misc.h
create mode 100644 fs/ceph/io.c
create mode 100644 fs/ceph/io.h
create mode 100644 fs/cifs/cifsroot.c
create mode 100644 fs/crypto/hkdf.c
delete mode 100644 fs/crypto/keyinfo.c
create mode 100644 fs/crypto/keyring.c
create mode 100644 fs/crypto/keysetup.c
create mode 100644 fs/crypto/keysetup_v1.c
create mode 100644 fs/erofs/Kconfig
create mode 100644 fs/erofs/Makefile
create mode 100644 fs/erofs/compress.h
create mode 100644 fs/erofs/data.c
create mode 100644 fs/erofs/decompressor.c
create mode 100644 fs/erofs/dir.c
create mode 100644 fs/erofs/erofs_fs.h
create mode 100644 fs/erofs/inode.c
create mode 100644 fs/erofs/internal.h
create mode 100644 fs/erofs/namei.c
create mode 100644 fs/erofs/super.c
create mode 100644 fs/erofs/tagptr.h
create mode 100644 fs/erofs/utils.c
create mode 100644 fs/erofs/xattr.c
create mode 100644 fs/erofs/xattr.h
create mode 100644 fs/erofs/zdata.c
create mode 100644 fs/erofs/zdata.h
create mode 100644 fs/erofs/zmap.c
create mode 100644 fs/erofs/zpvec.h
create mode 100644 fs/ext4/verity.c
create mode 100644 fs/f2fs/verity.c
create mode 100644 fs/fuse/virtio_fs.c
create mode 100644 fs/nfsd/filecache.c
create mode 100644 fs/nfsd/filecache.h
create mode 100644 fs/verity/Kconfig
create mode 100644 fs/verity/Makefile
create mode 100644 fs/verity/enable.c
create mode 100644 fs/verity/fsverity_private.h
create mode 100644 fs/verity/hash_algs.c
create mode 100644 fs/verity/init.c
create mode 100644 fs/verity/measure.c
create mode 100644 fs/verity/open.c
create mode 100644 fs/verity/signature.c
create mode 100644 fs/verity/verify.c
create mode 100644 include/crypto/internal/des.h
delete mode 100644 include/crypto/morus1280_glue.h
delete mode 100644 include/crypto/morus640_glue.h
delete mode 100644 include/crypto/morus_common.h
create mode 100644 include/drm/drm_mipi_dbi.h
delete mode 100644 include/drm/tinydrm/mipi-dbi.h
delete mode 100644 include/drm/tinydrm/tinydrm-helpers.h
create mode 100644 include/dt-bindings/bus/moxtet.h
create mode 100644 include/dt-bindings/clock/ast2600-clock.h
create mode 100644 include/dt-bindings/clock/imx8mn-clock.h
create mode 100644 include/dt-bindings/clock/ingenic,tcu.h
create mode 100644 include/dt-bindings/clock/mt6779-clk.h
create mode 100644 include/dt-bindings/clock/qcom,gcc-sm8150.h
create mode 100644 include/dt-bindings/clock/rk3308-cru.h
create mode 100644 include/dt-bindings/gce/mt8183-gce.h
create mode 100644 include/dt-bindings/interconnect/qcom,qcs404.h
create mode 100644 include/dt-bindings/memory/mt8183-larb-port.h
create mode 100644 include/dt-bindings/phy/phy-lantiq-vrx200-pcie.h
create mode 100644 include/dt-bindings/power/meson-g12a-power.h
create mode 100644 include/dt-bindings/power/meson-sm1-power.h
create mode 100644 include/dt-bindings/regulator/active-semi,8865-regulator.h
create mode 100644 include/dt-bindings/reset-controller/mt8183-resets.h
create mode 100644 include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h
create mode 100644 include/dt-bindings/reset/mt7629-resets.h
create mode 100644 include/dt-bindings/soc/ti,sci_pm_domain.h
create mode 100644 include/linux/can/can-ml.h
delete mode 100644 include/linux/can/platform/rcar_can.h
create mode 100644 include/linux/cpuidle_haltpoll.h
create mode 100644 include/linux/dma-resv.h
delete mode 100644 include/linux/edma.h
create mode 100644 include/linux/firmware/imx/dsp.h
create mode 100644 include/linux/fsverity.h
create mode 100644 include/linux/greybus.h
create mode 100644 include/linux/greybus/bundle.h
create mode 100644 include/linux/greybus/connection.h
create mode 100644 include/linux/greybus/control.h
rename {drivers/staging => include/linux}/greybus/greybus_id.h (100%)
create mode 100644 include/linux/greybus/greybus_manifest.h
create mode 100644 include/linux/greybus/greybus_protocols.h
create mode 100644 include/linux/greybus/hd.h
create mode 100644 include/linux/greybus/interface.h
create mode 100644 include/linux/greybus/manifest.h
create mode 100644 include/linux/greybus/module.h
create mode 100644 include/linux/greybus/operation.h
create mode 100644 include/linux/greybus/svc.h
delete mode 100644 include/linux/input/bu21013.h
create mode 100644 include/linux/intel_th.h
delete mode 100644 include/linux/ioc4.h
delete mode 100644 include/linux/mfd/cros_ec_commands.h
delete mode 100644 include/linux/mfd/da9063/pdata.h
create mode 100644 include/linux/mfd/intel_soc_pmic_mrfld.h
create mode 100644 include/linux/module_signature.h
create mode 100644 include/linux/moxtet.h
delete mode 100644 include/linux/netfilter/ipset/ip_set_comment.h
delete mode 100644 include/linux/netfilter/ipset/ip_set_counter.h
delete mode 100644 include/linux/netfilter/ipset/ip_set_skbinfo.h
delete mode 100644 include/linux/netfilter/ipset/ip_set_timeout.h
delete mode 100644 include/linux/netfilter/xt_hashlimit.h
delete mode 100644 include/linux/netfilter/xt_physdev.h
delete mode 100644 include/linux/netfilter_bridge/ebt_802_3.h
delete mode 100644 include/linux/omap-dmaengine.h
delete mode 100644 include/linux/oxu210hp.h
create mode 100644 include/linux/pagewalk.h
delete mode 100644 include/linux/pci-aspm.h
create mode 100644 include/linux/platform_data/cros_ec_chardev.h
create mode 100644 include/linux/platform_data/cros_ec_commands.h
create mode 100644 include/linux/platform_data/cros_ec_proto.h
delete mode 100644 include/linux/platform_data/db8500_thermal.h
create mode 100644 include/linux/platform_data/dma-iop32x.h
delete mode 100644 include/linux/platform_data/dwc3-omap.h
delete mode 100644 include/linux/platform_data/eth-netx.h
delete mode 100644 include/linux/platform_data/keypad-w90p910.h
delete mode 100644 include/linux/platform_data/leds-kirkwood-netxbig.h
delete mode 100644 include/linux/platform_data/nxp-nci.h
create mode 100644 include/linux/platform_data/sgi-w1.h
delete mode 100644 include/linux/platform_data/spi-nuc900.h
delete mode 100644 include/linux/platform_data/video-nuc900fb.h
delete mode 100644 include/linux/quicklist.h
create mode 100644 include/linux/regulator/mt6358-regulator.h
delete mode 100644 include/linux/reservation.h
create mode 100644 include/linux/sched/types.h
delete mode 100644 include/linux/sha256.h
create mode 100644 include/linux/soc/nxp/lpc32xx-misc.h
create mode 100644 include/linux/soc/samsung/exynos-chipid.h
delete mode 100644 include/linux/usb/samsung_usb_phy.h
delete mode 100644 include/linux/usb/wusb.h
delete mode 100644 include/linux/uwb.h
create mode 100644 include/media/vp8-ctrls.h
delete mode 100644 include/misc/charlcd.h
create mode 100644 include/net/drop_monitor.h
delete mode 100644 include/net/netfilter/ipv6/nf_conntrack_icmpv6.h
create mode 100644 include/sound/sof/dai-imx.h
create mode 100644 include/trace/events/erofs.h
create mode 100644 include/trace/events/intel_iommu.h
create mode 100644 include/trace/events/iocost.h
create mode 100644 include/uapi/linux/can/j1939.h
create mode 100644 include/uapi/linux/fscrypt.h
create mode 100644 include/uapi/linux/fsverity.h
create mode 100644 include/uapi/linux/virtio_fs.h
create mode 100644 include/uapi/misc/xilinx_sdfec.h
create mode 100644 kernel/bpf/sysfs_btf.c
create mode 100644 kernel/kexec_elf.c
delete mode 100644 kernel/memremap.c
create mode 100644 kernel/module_signature.c
create mode 100644 lib/crypto/aes.c
create mode 100644 lib/crypto/des.c
create mode 100644 lib/crypto/sha256.c
delete mode 100644 lib/sha256.c
create mode 100644 mm/memremap.c
delete mode 100644 mm/quicklist.c
create mode 100644 net/can/j1939/Kconfig
create mode 100644 net/can/j1939/Makefile
create mode 100644 net/can/j1939/address-claim.c
create mode 100644 net/can/j1939/bus.c
create mode 100644 net/can/j1939/j1939-priv.h
create mode 100644 net/can/j1939/main.c
create mode 100644 net/can/j1939/socket.c
create mode 100644 net/can/j1939/transport.c
create mode 100644 scripts/Makefile.modfinal
create mode 100644 scripts/Makefile.package
create mode 100644 scripts/coccinelle/api/platform_get_irq.cocci
create mode 100644 scripts/coccinelle/misc/add_namespace.cocci
create mode 100644 scripts/nsdeps
delete mode 100644 scripts/package/Makefile
create mode 100755 scripts/tools-support-relr.sh
create mode 100644 security/integrity/ima/ima_modsig.c
create mode 100644 security/lockdown/Kconfig
create mode 100644 security/lockdown/Makefile
create mode 100644 security/lockdown/lockdown.c
create mode 100644 sound/soc/codecs/adau7118-hw.c
create mode 100644 sound/soc/codecs/adau7118-i2c.c
create mode 100644 sound/soc/codecs/adau7118.c
create mode 100644 sound/soc/codecs/adau7118.h
create mode 100644 sound/soc/codecs/tas2562.c
create mode 100644 sound/soc/codecs/tas2562.h
create mode 100644 sound/soc/codecs/tas2770.c
create mode 100644 sound/soc/codecs/tas2770.h
create mode 100644 sound/soc/fsl/fsl_mqs.c
create mode 100644 sound/soc/intel/boards/cml_rt1011_rt5682.c
create mode 100644 sound/soc/intel/boards/hda_dsp_common.c
create mode 100644 sound/soc/intel/boards/hda_dsp_common.h
create mode 100644 sound/soc/intel/common/soc-acpi-intel-jsl-match.c
delete mode 100644 sound/soc/jz4740/qi_lb60.c
create mode 100644 sound/soc/samsung/arndale.c
delete mode 100644 sound/soc/samsung/arndale_rt5631.c
create mode 100644 sound/soc/sof/intel/hda-ipc.h
create mode 100644 sound/usb/mixer_scarlett_gen2.c
create mode 100644 sound/usb/mixer_scarlett_gen2.h
create mode 100644 sound/usb/validate.c
create mode 100644 tools/arch/riscv/include/uapi/asm/perf_regs.h
rename tools/{perf/util/intel-pt-decoder => arch/x86/include/asm}/inat.h (100%)
rename tools/{objtool => }/arch/x86/include/asm/inat_types.h (100%)
rename tools/{perf/util/intel-pt-decoder => arch/x86/include/asm}/insn.h (100%)
rename tools/{objtool => }/arch/x86/include/asm/orc_types.h (100%)
create mode 100644 tools/arch/x86/lib/inat.c
create mode 100644 tools/arch/x86/lib/insn.c
rename tools/{objtool => }/arch/x86/lib/x86-opcode-map.txt (100%)
rename tools/{objtool => }/arch/x86/tools/gen-insn-attr-x86.awk (100%)
create mode 100644 tools/build/feature/test-libcap.c
create mode 100644 tools/cgroup/iocost_coef_gen.py
create mode 100644 tools/cgroup/iocost_monitor.py
delete mode 100644 tools/crypto/getstat.c
create mode 100644 tools/hv/Build
create mode 100644 tools/iio/.gitignore
create mode 100644 tools/include/linux/const.h
create mode 100644 tools/include/uapi/linux/const.h
create mode 100755 tools/leds/get_led_device_info.sh
create mode 100644 tools/lib/traceevent/Documentation/libtraceevent-event_print.txt
create mode 100644 tools/lib/traceevent/Documentation/libtraceevent-plugins.txt
create mode 100644 tools/lib/traceevent/plugins/Build
create mode 100644 tools/lib/traceevent/plugins/Makefile
rename tools/lib/traceevent/{ => plugins}/plugin_cfg80211.c (100%)
rename tools/lib/traceevent/{ => plugins}/plugin_function.c (100%)
rename tools/lib/traceevent/{ => plugins}/plugin_hrtimer.c (100%)
rename tools/lib/traceevent/{ => plugins}/plugin_jbd2.c (100%)
rename tools/lib/traceevent/{ => plugins}/plugin_kmem.c (100%)
rename tools/lib/traceevent/{ => plugins}/plugin_kvm.c (100%)
rename tools/lib/traceevent/{ => plugins}/plugin_mac80211.c (100%)
rename tools/lib/traceevent/{ => plugins}/plugin_sched_switch.c (100%)
rename tools/lib/traceevent/{ => plugins}/plugin_scsi.c (100%)
rename tools/lib/traceevent/{ => plugins}/plugin_xen.c (100%)
mode change 100644 => 100755 tools/memory-model/scripts/checkghlitmus.sh
mode change 100644 => 100755 tools/memory-model/scripts/checklitmushist.sh
mode change 100644 => 100755 tools/memory-model/scripts/cmplitmushist.sh
mode change 100644 => 100755 tools/memory-model/scripts/initlitmushist.sh
mode change 100644 => 100755 tools/memory-model/scripts/judgelitmus.sh
mode change 100644 => 100755 tools/memory-model/scripts/newlitmushist.sh
mode change 100644 => 100755 tools/memory-model/scripts/parseargs.sh
mode change 100644 => 100755 tools/memory-model/scripts/runlitmushist.sh
delete mode 100644 tools/objtool/arch/x86/include/asm/inat.h
delete mode 100644 tools/objtool/arch/x86/include/asm/insn.h
delete mode 100644 tools/objtool/arch/x86/lib/inat.c
delete mode 100644 tools/objtool/arch/x86/lib/insn.c
create mode 100644 tools/perf/arch/riscv/Build
create mode 100644 tools/perf/arch/riscv/Makefile
create mode 100644 tools/perf/arch/riscv/include/perf_regs.h
create mode 100644 tools/perf/arch/riscv/util/Build
create mode 100644 tools/perf/arch/riscv/util/dwarf-regs.c
create mode 100644 tools/perf/arch/riscv/util/unwind-libdw.c
create mode 100644 tools/perf/lib/Build
create mode 100644 tools/perf/lib/Documentation/Makefile
create mode 100644 tools/perf/lib/Documentation/man/libperf.rst
create mode 100644 tools/perf/lib/Documentation/tutorial/tutorial.rst
create mode 100644 tools/perf/lib/Makefile
create mode 100644 tools/perf/lib/core.c
create mode 100644 tools/perf/lib/cpumap.c
create mode 100644 tools/perf/lib/evlist.c
create mode 100644 tools/perf/lib/evsel.c
create mode 100644 tools/perf/lib/include/internal/cpumap.h
create mode 100644 tools/perf/lib/include/internal/evlist.h
create mode 100644 tools/perf/lib/include/internal/evsel.h
create mode 100644 tools/perf/lib/include/internal/lib.h
create mode 100644 tools/perf/lib/include/internal/mmap.h
create mode 100644 tools/perf/lib/include/internal/tests.h
create mode 100644 tools/perf/lib/include/internal/threadmap.h
create mode 100644 tools/perf/lib/include/internal/xyarray.h
create mode 100644 tools/perf/lib/include/perf/core.h
create mode 100644 tools/perf/lib/include/perf/cpumap.h
create mode 100644 tools/perf/lib/include/perf/event.h
create mode 100644 tools/perf/lib/include/perf/evlist.h
create mode 100644 tools/perf/lib/include/perf/evsel.h
create mode 100644 tools/perf/lib/include/perf/threadmap.h
create mode 100644 tools/perf/lib/internal.h
create mode 100644 tools/perf/lib/lib.c
create mode 100644 tools/perf/lib/libperf.map
create mode 100644 tools/perf/lib/libperf.pc.template
create mode 100644 tools/perf/lib/tests/Makefile
create mode 100644 tools/perf/lib/tests/test-cpumap.c
create mode 100644 tools/perf/lib/tests/test-evlist.c
create mode 100644 tools/perf/lib/tests/test-evsel.c
create mode 100644 tools/perf/lib/tests/test-threadmap.c
create mode 100644 tools/perf/lib/threadmap.c
create mode 100644 tools/perf/lib/xyarray.c
create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cortex-a76-n1/branch.json
create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cortex-a76-n1/bus.json
create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cortex-a76-n1/cache.json
create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cortex-a76-n1/exception.json
create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cortex-a76-n1/instruction.json
create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cortex-a76-n1/memory.json
create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cortex-a76-n1/other.json
create mode 100644 tools/perf/pmu-events/arch/arm64/arm/cortex-a76-n1/pipeline.json
create mode 100644 tools/perf/pmu-events/arch/x86/icelake/cache.json
create mode 100644 tools/perf/pmu-events/arch/x86/icelake/floating-point.json
create mode 100644 tools/perf/pmu-events/arch/x86/icelake/frontend.json
create mode 100644 tools/perf/pmu-events/arch/x86/icelake/memory.json
create mode 100644 tools/perf/pmu-events/arch/x86/icelake/other.json
create mode 100644 tools/perf/pmu-events/arch/x86/icelake/pipeline.json
create mode 100644 tools/perf/pmu-events/arch/x86/icelake/virtual-memory.json
create mode 100644 tools/perf/pmu-events/arch/x86/tremontx/cache.json
create mode 100644 tools/perf/pmu-events/arch/x86/tremontx/frontend.json
create mode 100644 tools/perf/pmu-events/arch/x86/tremontx/memory.json
create mode 100644 tools/perf/pmu-events/arch/x86/tremontx/other.json
create mode 100644 tools/perf/pmu-events/arch/x86/tremontx/pipeline.json
create mode 100644 tools/perf/pmu-events/arch/x86/tremontx/uncore-memory.json
create mode 100644 tools/perf/pmu-events/arch/x86/tremontx/uncore-other.json
create mode 100644 tools/perf/pmu-events/arch/x86/tremontx/uncore-power.json
create mode 100644 tools/perf/pmu-events/arch/x86/tremontx/virtual-memory.json
create mode 100644 tools/perf/util/cacheline.c
create mode 100644 tools/perf/util/cacheline.h
create mode 100644 tools/perf/util/cap.c
create mode 100644 tools/perf/util/cap.h
create mode 100644 tools/perf/util/copyfile.c
create mode 100644 tools/perf/util/copyfile.h
create mode 100644 tools/perf/util/dsos.c
create mode 100644 tools/perf/util/dsos.h
create mode 100644 tools/perf/util/events_stats.h
create mode 100644 tools/perf/util/evsel_config.h
create mode 100644 tools/perf/util/evsel_fprintf.h
create mode 100644 tools/perf/util/evswitch.c
create mode 100644 tools/perf/util/evswitch.h
delete mode 100644 tools/perf/util/intel-pt-decoder/gen-insn-attr-x86.awk
delete mode 100644 tools/perf/util/intel-pt-decoder/inat.c
delete mode 100644 tools/perf/util/intel-pt-decoder/inat_types.h
delete mode 100644 tools/perf/util/intel-pt-decoder/insn.c
delete mode 100644 tools/perf/util/intel-pt-decoder/x86-opcode-map.txt
create mode 100644 tools/perf/util/perf_event_attr_fprintf.c
create mode 100644 tools/perf/util/record.h
create mode 100644 tools/perf/util/symsrc.h
create mode 100644 tools/perf/util/synthetic-events.c
create mode 100644 tools/perf/util/synthetic-events.h
delete mode 100644 tools/perf/util/util-cxx.h
delete mode 100644 tools/perf/util/xyarray.h
create mode 100644 tools/testing/selftests/arm64/.gitignore
create mode 100644 tools/testing/selftests/arm64/Makefile
create mode 100755 tools/testing/selftests/arm64/run_tags_test.sh
create mode 100644 tools/testing/selftests/arm64/tags_test.c
create mode 100644 tools/testing/selftests/bpf/prog_tests/core_reloc.c
create mode 100644 tools/testing/selftests/bpf/prog_tests/sockopt.c
create mode 100644 tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c
create mode 100644 tools/testing/selftests/bpf/prog_tests/sockopt_multi.c
create mode 100644 tools/testing/selftests/bpf/prog_tests/sockopt_sk.c
create mode 100644 tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_arrays.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_arrays___diff_arr_dim.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_arrays___diff_arr_val_sz.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_arrays___err_non_array.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_arrays___err_too_shallow.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_arrays___err_too_small.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_arrays___err_wrong_val_type1.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_arrays___err_wrong_val_type2.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_flavors.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_flavors__err_wrong_name.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_ints.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_ints___bool.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_ints___err_bitfield.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_ints___err_wrong_sz_16.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_ints___err_wrong_sz_32.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_ints___err_wrong_sz_64.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_ints___err_wrong_sz_8.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_ints___reverse_sign.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_misc.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_mods.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_mods___mod_swap.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_mods___typedefs.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_nesting.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_nesting___anon_embed.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_nesting___dup_compat_types.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_nesting___err_array_container.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_nesting___err_array_field.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_nesting___err_dup_incompat_types.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_nesting___err_missing_container.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_nesting___err_missing_field.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_nesting___err_nonstruct_container.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_nesting___err_partial_match_dups.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_nesting___err_too_deep.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_nesting___extra_nesting.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_nesting___struct_union_mixup.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_primitives.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_primitives___diff_enum_def.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_primitives___diff_func_proto.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_primitives___diff_ptr_type.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_primitives___err_non_enum.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_primitives___err_non_int.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_primitives___err_non_ptr.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_ptr_as_arr.c
create mode 100644 tools/testing/selftests/bpf/progs/btf__core_reloc_ptr_as_arr___diff_sz.c
create mode 100644 tools/testing/selftests/bpf/progs/core_reloc_types.h
create mode 100644 tools/testing/selftests/bpf/progs/loop4.c
create mode 100644 tools/testing/selftests/bpf/progs/loop5.c
create mode 100644 tools/testing/selftests/bpf/progs/sockopt_inherit.c
create mode 100644 tools/testing/selftests/bpf/progs/test_core_reloc_arrays.c
create mode 100644 tools/testing/selftests/bpf/progs/test_core_reloc_flavors.c
create mode 100644 tools/testing/selftests/bpf/progs/test_core_reloc_ints.c
create mode 100644 tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c
create mode 100644 tools/testing/selftests/bpf/progs/test_core_reloc_misc.c
create mode 100644 tools/testing/selftests/bpf/progs/test_core_reloc_mods.c
create mode 100644 tools/testing/selftests/bpf/progs/test_core_reloc_nesting.c
create mode 100644 tools/testing/selftests/bpf/progs/test_core_reloc_primitives.c
create mode 100644 tools/testing/selftests/bpf/progs/test_core_reloc_ptr_as_arr.c
create mode 100755 tools/testing/selftests/bpf/test_bpftool_build.sh
delete mode 100644 tools/testing/selftests/bpf/test_sockopt.c
delete mode 100644 tools/testing/selftests/bpf/test_sockopt_multi.c
delete mode 100644 tools/testing/selftests/bpf/test_sockopt_sk.c
delete mode 100644 tools/testing/selftests/bpf/test_tcp_rtt.c
create mode 100755 tools/testing/selftests/bpf/test_xdp_vlan_mode_generic.sh
create mode 100755 tools/testing/selftests/bpf/test_xdp_vlan_mode_native.sh
create mode 100644 tools/testing/selftests/bpf/verifier/event_output.c
create mode 100644 tools/testing/selftests/bpf/verifier/precise.c
create mode 100755 tools/testing/selftests/drivers/net/mlxsw/devlink_trap.sh
create mode 100755 tools/testing/selftests/drivers/net/mlxsw/devlink_trap_l2_drops.sh
create mode 100755 tools/testing/selftests/drivers/net/netdevsim/devlink_trap.sh
create mode 100644 tools/testing/selftests/ftrace/test.d/kprobe/kprobe_multiprobe.tc
create mode 100644 tools/testing/selftests/kvm/config
create mode 100644 tools/testing/selftests/kvm/lib/aarch64/ucall.c
create mode 100644 tools/testing/selftests/kvm/lib/s390x/ucall.c
delete mode 100644 tools/testing/selftests/kvm/lib/ucall.c
create mode 100644 tools/testing/selftests/kvm/lib/x86_64/ucall.c
create mode 100644 tools/testing/selftests/kvm/s390x/memop.c
delete mode 100644 tools/testing/selftests/membarrier/membarrier_test.c
create mode 100644 tools/testing/selftests/membarrier/membarrier_test_impl.h
create mode 100644 tools/testing/selftests/membarrier/membarrier_test_multi_thread.c
create mode 100644 tools/testing/selftests/membarrier/membarrier_test_single_thread.c
create mode 100755 tools/testing/selftests/net/fcnal-test.sh
create mode 100644 tools/testing/selftests/net/l2tp.sh
create mode 100644 tools/testing/selftests/net/nettest.c
create mode 100644 tools/testing/selftests/pidfd/pidfd_poll_test.c
create mode 100644 tools/testing/selftests/pidfd/pidfd_wait.c
create mode 120000 tools/testing/selftests/powerpc/copyloops/memcpy_mcsafe_64.S
create mode 100644 tools/testing/selftests/powerpc/eeh/Makefile
create mode 100755 tools/testing/selftests/powerpc/eeh/eeh-basic.sh
create mode 100755 tools/testing/selftests/powerpc/eeh/eeh-functions.sh
create mode 100644 tools/testing/selftests/powerpc/mm/tlbie_test.c
create mode 100644 tools/testing/selftests/powerpc/security/.gitignore
create mode 100644 tools/testing/selftests/powerpc/tm/tm-poison.c
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/filters/matchall.json
create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/fifo.json
delete mode 100644 tools/testing/selftests/x86/mpx-debug.h
delete mode 100644 tools/testing/selftests/x86/mpx-dig.c
delete mode 100644 tools/testing/selftests/x86/mpx-hw.h
delete mode 100644 tools/testing/selftests/x86/mpx-mini-test.c
delete mode 100644 tools/testing/selftests/x86/mpx-mm.h
create mode 100644 tools/testing/selftests/x86/syscall_numbering.c
2
2

[alsa-devel] [PATCH 0/3] ASoC: SOF: Intel: improvements for S0ix support
by Pierre-Louis Bossart 08 Nov '19
by Pierre-Louis Bossart 08 Nov '19
08 Nov '19
Code improvements and missed register setting required to enter S0ix
Keyon Jie (2):
ASoC: SOF: topology: fix missing NULL pointer check
ASoC: SOF: Intel: hda: set L1SEN on S0ix suspend
Ranjani Sridharan (1):
ASoC: SOF: Intel: hda: Simplify the hda_dsp_wait_d0i3c_done() function
sound/soc/sof/intel/hda-dsp.c | 22 +++++++++++++++++++---
sound/soc/sof/intel/hda.h | 3 +++
sound/soc/sof/topology.c | 5 +++++
3 files changed, 27 insertions(+), 3 deletions(-)
--
2.20.1
2
6

[alsa-devel] [PATCH] ASoC: core: Fix compile warning with CONFIG_DEBUG_FS=n
by Takashi Iwai 08 Nov '19
by Takashi Iwai 08 Nov '19
08 Nov '19
Paper over a compile warning:
sound/soc/soc-pcm.c:1185:8: warning: unused variable ‘name’
Fixes: 0632fa042541 ("ASoC: core: Fix pcm code debugfs error")
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
---
sound/soc/soc-pcm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 493a2e80e893..4bf71e3211d8 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1182,7 +1182,9 @@ static int dpcm_be_connect(struct snd_soc_pcm_runtime *fe,
{
struct snd_soc_dpcm *dpcm;
unsigned long flags;
+#ifdef CONFIG_DEBUG_FS
char *name;
+#endif
/* only add new dpcms */
for_each_dpcm_be(fe, stream, dpcm) {
--
2.16.4
2
1
Hi,
here is another small patch set for ALSA timer core to plug a slight
race window and to clean up.
Takashi
===
Takashi Iwai (3):
ALSA: timer: Unify master/slave linking code
ALSA: timer: Make snd_timer_close() returning void
ALSA: timer: Fix possible race at assigning a timer instance
include/sound/timer.h | 6 +-
sound/core/seq/seq_timer.c | 18 +++--
sound/core/timer.c | 181 ++++++++++++++++++++++-----------------------
3 files changed, 104 insertions(+), 101 deletions(-)
--
2.16.4
1
3

[alsa-devel] [PATCH v3 6/6] ASoC: amd: Added ACP3x system resume and runtime pm
by Ravulapati Vishnu vardhan rao 07 Nov '19
by Ravulapati Vishnu vardhan rao 07 Nov '19
07 Nov '19
When system wide suspend happens, ACP will be powered off
and when system resumes, for audio usecase to get continued,
all the runtime configuration data needs to be programmed again.
Added resume pm call back to ACP pm ops and also added runtime PM
operations for ACP3x PCM platform device.
Device will enter into D3 state when there is no activity
on audio I2S lines.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 141 +---------------------------
sound/soc/amd/raven/acp3x.h | 7 ++
sound/soc/amd/raven/pci-acp3x.c | 177 +++++++++++++++++++++++++++++++++++-
3 files changed, 184 insertions(+), 141 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 629a32f..b23db4a 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -58,106 +58,6 @@ static const struct snd_pcm_hardware acp3x_pcm_hardware_capture = {
.periods_max = CAPTURE_MAX_NUM_PERIODS,
};
-static int acp3x_power_on(void __iomem *acp3x_base, bool on)
-{
- u16 val, mask;
- u32 timeout;
-
- if (on == true) {
- val = 1;
- mask = ACP3x_POWER_ON;
- } else {
- val = 0;
- mask = ACP3x_POWER_OFF;
- }
-
- rv_writel(val, acp3x_base + mmACP_PGFSM_CONTROL);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
- if ((val & ACP3x_POWER_OFF_IN_PROGRESS) == mask)
- break;
- if (timeout > 100) {
- pr_err("ACP3x power state change failure\n");
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_reset(void __iomem *acp3x_base)
-{
- u32 val, timeout;
-
- rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
- timeout > 100) {
- if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
-
- rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if (!val || timeout > 100) {
- if (!val)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_init(void __iomem *acp3x_base)
-{
- int ret;
-
- /* power on */
- ret = acp3x_power_on(acp3x_base, true);
- if (ret) {
- pr_err("ACP3x power on failed\n");
- return ret;
- }
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- return 0;
-}
-
-static int acp3x_deinit(void __iomem *acp3x_base)
-{
- int ret;
-
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- /* power off */
- ret = acp3x_power_on(acp3x_base, false);
- if (ret) {
- pr_err("ACP3x power off failed\n");
- return ret;
- }
- return 0;
-}
-
static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
{
u16 play_flag, cap_flag;
@@ -551,63 +451,37 @@ static int acp3x_audio_probe(struct platform_device *pdev)
adata->i2s_irq = res->start;
dev_set_drvdata(&pdev->dev, adata);
- /* Initialize ACP */
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
NULL, 0);
if (status) {
dev_err(&pdev->dev, "Fail to register acp i2s component\n");
- goto dev_err;
+ return -ENODEV;
}
status = devm_request_irq(&pdev->dev, adata->i2s_irq, i2s_irq_handler,
irqflags, "ACP3x_I2S_IRQ", adata);
if (status) {
dev_err(&pdev->dev, "ACP3x I2S IRQ request failed\n");
- goto dev_err;
+ return -ENODEV;
}
pm_runtime_set_autosuspend_delay(&pdev->dev, 10000);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_enable(&pdev->dev);
return 0;
-dev_err:
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_info(&pdev->dev, "ACP de-initialized\n");
- /*ignore device status and return driver probe error*/
- return -ENODEV;
}
static int acp3x_audio_remove(struct platform_device *pdev)
{
- int ret;
- struct i2s_dev_data *adata = dev_get_drvdata(&pdev->dev);
-
- ret = acp3x_deinit(adata->acp3x_base);
- if (ret)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_info(&pdev->dev, "ACP de-initialized\n");
-
pm_runtime_disable(&pdev->dev);
return 0;
}
static int acp3x_resume(struct device *dev)
{
- int status;
u32 val;
struct i2s_dev_data *adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
-
if (adata->play_stream && adata->play_stream->runtime) {
struct i2s_stream_instance *rtd =
adata->play_stream->runtime->private_data;
@@ -652,15 +526,8 @@ static int acp3x_resume(struct device *dev)
static int acp3x_pcm_runtime_suspend(struct device *dev)
{
- int status;
struct i2s_dev_data *adata = dev_get_drvdata(dev);
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(dev, "ACP de-init failed\n");
- else
- dev_info(dev, "ACP de-initialized\n");
-
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
@@ -668,12 +535,8 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
static int acp3x_pcm_runtime_resume(struct device *dev)
{
- int status;
struct i2s_dev_data *adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 01b283a..cf16ceb 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -65,6 +65,13 @@
#define SLOT_WIDTH_16 0x10
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+#define ACP_PGFSM_CNTL_POWER_ON_MASK 0x01
+#define ACP_PGFSM_CNTL_POWER_OFF_MASK 0x00
+#define ACP_PGFSM_STATUS_MASK 0x03
+#define ACP_POWERED_ON 0x00
+#define ACP_POWER_ON_IN_PROGRESS 0x01
+#define ACP_POWERED_OFF 0x02
+#define ACP_POWER_OFF_IN_PROGRESS 0x03
struct acp3x_platform_info {
u16 play_i2s_instance;
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index fe37160c..7dbaa19 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -9,6 +9,9 @@
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
+#include <linux/pm_runtime.h>
+#include <linux/delay.h>
+#include <sound/pcm.h>
#include "acp3x.h"
@@ -19,6 +22,120 @@ struct acp3x_dev_data {
struct platform_device *pdev[ACP3x_DEVS];
};
+static int acp3x_power_on(void __iomem *acp3x_base)
+{
+ u32 val;
+ u32 timeout = 0;
+ int ret = 0;
+
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+
+ if (val == 0)
+ return val;
+
+ if (!((val & ACP_PGFSM_STATUS_MASK) ==
+ ACP_POWER_ON_IN_PROGRESS))
+ rv_writel(ACP_PGFSM_CNTL_POWER_ON_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ while (++timeout < 500) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if (!val)
+ break;
+ udelay(1);
+ if (timeout > 500) {
+ pr_err("ACP is Not Powered ON\n");
+ return -ETIMEDOUT;
+ }
+ }
+}
+
+static int acp3x_power_off(void __iomem *acp3x_base)
+{
+ u32 val;
+ u32 timeout = 0;
+
+ rv_writel(ACP_PGFSM_CNTL_POWER_OFF_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ while (++timeout < 500) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if ((val & ACP_PGFSM_STATUS_MASK) == ACP_POWERED_OFF)
+ return 0;
+ udelay(1);
+ if (timeout > 500) {
+ pr_err("ACP is Not Powered OFF\n");
+ return -ETIMEDOUT;
+ }
+ }
+}
+
+
+static int acp3x_reset(void __iomem *acp3x_base)
+{
+ u32 val, timeout;
+
+ rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout < 100) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
+ timeout > 100) {
+ if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
+ break;
+ return -ENODEV;
+ }
+ cpu_relax();
+ }
+ rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout < 100) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if (!val)
+ break;
+ if (timeout > 100)
+ return -ENODEV;
+ cpu_relax();
+ }
+ return 0;
+}
+
+static int acp3x_init(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* power on */
+ ret = acp3x_power_on(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power on failed\n");
+ return ret;
+ }
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ return 0;
+}
+
+static int acp3x_deinit(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ /* power off */
+ ret = acp3x_power_off(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power off failed\n");
+ return ret;
+ }
+ return 0;
+}
+
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
@@ -63,6 +180,10 @@ static int snd_acp3x_probe(struct pci_dev *pci,
}
pci_set_master(pci);
pci_set_drvdata(pci, adata);
+ ret = acp3x_init(adata->acp3x_base);
+ if (ret)
+ return -ENODEV;
+
val = rv_readl(adata->acp3x_base + mmACP_I2S_PIN_CONFIG);
switch (val) {
@@ -133,9 +254,19 @@ static int snd_acp3x_probe(struct pci_dev *pci,
ret = -ENODEV;
goto unmap_mmio;
}
+ pm_runtime_set_autosuspend_delay(&pci->dev, 10000);
+ pm_runtime_use_autosuspend(&pci->dev);
+ pm_runtime_set_active(&pci->dev);
+ pm_runtime_put_noidle(&pci->dev);
+ pm_runtime_enable(&pci->dev);
return 0;
unmap_mmio:
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_info(&pci->dev, "ACP de-initialized\n");
pci_disable_msi(pci);
for (i = 0 ; i < ACP3x_DEVS ; i++)
platform_device_unregister(adata->pdev[i]);
@@ -149,17 +280,56 @@ static int snd_acp3x_probe(struct pci_dev *pci,
return ret;
}
+static int snd_acp3x_suspend(struct device *dev)
+{
+ int status;
+ struct acp3x_dev_data *adata = dev_get_drvdata(dev);
+
+ status = acp3x_deinit(adata->acp3x_base);
+ if (status)
+ dev_err(dev, "ACP de-init failed\n");
+ else
+ dev_info(dev, "ACP de-initialized\n");
+
+ return 0;
+}
+static int snd_acp3x_resume(struct device *dev)
+{
+ int status;
+ struct acp3x_dev_data *adata = dev_get_drvdata(dev);
+
+ status = acp3x_init(adata->acp3x_base);
+ if (status) {
+ dev_err(dev, "ACP init failed\n");
+ return status;
+ }
+
+ return 0;
+}
+
+static const struct dev_pm_ops acp3x_pm = {
+ .runtime_suspend = snd_acp3x_suspend,
+ .runtime_resume = snd_acp3x_resume,
+ .resume = snd_acp3x_resume,
+};
+
static void snd_acp3x_remove(struct pci_dev *pci)
{
- int i;
+ int i, ret;
struct acp3x_dev_data *adata = pci_get_drvdata(pci);
if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
for (i = 0 ; i < ACP3x_DEVS ; i++)
platform_device_unregister(adata->pdev[i]);
}
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_info(&pci->dev, "ACP de-initialized\n");
iounmap(adata->acp3x_base);
-
+ pm_runtime_disable(&pci->dev);
+ pm_runtime_get_noresume(&pci->dev);
pci_disable_msi(pci);
pci_release_regions(pci);
pci_disable_device(pci);
@@ -178,6 +348,9 @@ static struct pci_driver acp3x_driver = {
.id_table = snd_acp3x_ids,
.probe = snd_acp3x_probe,
.remove = snd_acp3x_remove,
+ .driver = {
+ .pm = &acp3x_pm,
+ }
};
module_pci_driver(acp3x_driver);
--
2.7.4
2
1

[alsa-devel] [RESEND PATCH v3 5/6] ASoC: amd: handle ACP3x i2s-sp watermark interrupt.
by Ravulapati Vishnu vardhan rao 07 Nov '19
by Ravulapati Vishnu vardhan rao 07 Nov '19
07 Nov '19
whenever audio data equal to I2S-SP fifo watermark level is
produced/consumed, interrupt is generated.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 8fab505..629a32f 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -176,6 +176,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->play_stream);
play_flag = 1;
}
+ if ((val & BIT(I2S_TX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_play_stream) {
+ rv_writel(BIT(I2S_TX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_play_stream);
+ play_flag = 1;
+ }
if ((val & BIT(BT_RX_THRESHOLD)) && rv_i2s_data->capture_stream) {
rv_writel(BIT(BT_RX_THRESHOLD), rv_i2s_data->acp3x_base +
@@ -183,6 +190,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->capture_stream);
cap_flag = 1;
}
+ if ((val & BIT(I2S_RX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_capture_stream) {
+ rv_writel(BIT(I2S_RX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_capture_stream);
+ cap_flag = 1;
+ }
if (play_flag | cap_flag)
return IRQ_HANDLED;
--
2.7.4
2
1

[alsa-devel] [PATCH v3 3/6] ASoC: amd: Enabling I2S instance in DMA and DAI
by Ravulapati Vishnu vardhan rao 07 Nov '19
by Ravulapati Vishnu vardhan rao 07 Nov '19
07 Nov '19
This patch adds I2S SP support in ACP PCM DMA and DAI.
Added I2S support in DMA and DAI probe,its hw_params handling
its open and close functionalities.
This enable to open and close on the SP instance for
playback and capture.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 159 +++++++++++++++++++++-----
sound/soc/amd/raven/acp3x-pcm-dma.c | 219 ++++++++++++++++++++++++++----------
sound/soc/amd/raven/acp3x.h | 74 +++++++++---
3 files changed, 351 insertions(+), 101 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index 547f497..6fdf118 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -84,8 +84,18 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
u32 val = 0;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+ struct snd_soc_card *card = prtd->card;
+ struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card);
struct i2s_stream_instance *rtd = substream->runtime->private_data;
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
+
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_U8:
case SNDRV_PCM_FORMAT_S8:
@@ -104,13 +114,31 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
return -EINVAL;
}
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | (rtd->xfer_resolution << 3);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
+ }
} else {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val | (rtd->xfer_resolution << 3);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_IRER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_IRER);
+ }
}
return 0;
}
@@ -121,7 +149,16 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
int ret = 0;
struct i2s_stream_instance *rtd = substream->runtime->private_data;
u32 val, period_bytes;
-
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+ struct snd_soc_card *card = prtd->card;
+ struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card);
+
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
period_bytes = frames_to_bytes(substream->runtime,
substream->runtime->period_size);
switch (cmd) {
@@ -131,33 +168,104 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
rtd->bytescount = acp_get_byte_count(rtd,
substream->stream);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- rv_writel(period_bytes, rtd->acp3x_base +
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ rv_writel(period_bytes, rtd->acp3x_base +
mmACP_BT_TX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(rtd->acp3x_base +
+ mmACP_BTTDM_ITER);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base +
+ mmACP_BTTDM_ITER);
+ rv_writel(1, rtd->acp3x_base +
+ mmACP_BTTDM_IER);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_I2S_TX_INTR_WATERMARK_SIZE);
+ val = rv_readl(rtd->acp3x_base +
+ mmACP_I2STDM_ITER);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base +
+ mmACP_I2STDM_ITER);
+ rv_writel(1, rtd->acp3x_base +
+ mmACP_I2STDM_IER);
+ }
} else {
- rv_writel(period_bytes, rtd->acp3x_base +
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ rv_writel(period_bytes, rtd->acp3x_base +
mmACP_BT_RX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = rv_readl(rtd->acp3x_base +
+ mmACP_BTTDM_IRER);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base +
+ mmACP_BTTDM_IRER);
+ rv_writel(1, rtd->acp3x_base +
+ mmACP_BTTDM_IER);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_I2S_RX_INTR_WATERMARK_SIZE);
+ val = rv_readl(rtd->acp3x_base +
+ mmACP_I2STDM_IRER);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base +
+ mmACP_I2STDM_IRER);
+ rv_writel(1, rtd->acp3x_base +
+ mmACP_I2STDM_IER);
+ }
}
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = rv_readl(rtd->acp3x_base +
+ mmACP_BTTDM_ITER);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base +
+ mmACP_BTTDM_ITER);
+ rv_writel(0, rtd->acp3x_base +
+ mmACP_BTTDM_IER);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = rv_readl(rtd->acp3x_base +
+ mmACP_I2STDM_ITER);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base +
+ mmACP_I2STDM_ITER);
+ rv_writel(0, rtd->acp3x_base +
+ mmACP_I2STDM_IER);
+ }
+
} else {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = rv_readl(rtd->acp3x_base +
+ mmACP_BTTDM_IRER);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base +
+ mmACP_BTTDM_IRER);
+ rv_writel(0, rtd->acp3x_base +
+ mmACP_BTTDM_IER);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = rv_readl(rtd->acp3x_base +
+ mmACP_I2STDM_IRER);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base +
+ mmACP_I2STDM_IRER);
+ rv_writel(0, rtd->acp3x_base +
+ mmACP_I2STDM_IER);
+ }
}
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
break;
default:
ret = -EINVAL;
@@ -212,11 +320,6 @@ static int acp3x_dai_probe(struct platform_device *pdev)
struct resource *res;
struct i2s_dev_data *adata;
- if (!pdev->dev.platform_data) {
- dev_err(&pdev->dev, "platform_data not retrieved\n");
- return -ENODEV;
- }
-
adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data),
GFP_KERNEL);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index f5e4c7b..8fab505 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -193,20 +193,35 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
{
u16 page_idx;
- u32 low, high, val, acp_fifo_addr;
- dma_addr_t addr = rtd->dma_addr;
+ uint64_t low, high, val, acp_fifo_addr;
+ dma_addr_t addr;
- /* 8 scratch registers used to map one 64 bit address */
- if (direction == SNDRV_PCM_STREAM_PLAYBACK)
- val = 0;
- else
- val = rtd->num_pages * 8;
+ addr = rtd->dma_addr;
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_PB_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_PB_PTE_OFFSET;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_CP_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_CP_PTE_OFFSET;
+ }
+ }
/* Group Enable */
rv_writel(ACP_SRAM_PTE_OFFSET | BIT(31), rtd->acp3x_base +
- mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
+ mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
rv_writel(PAGE_SIZE_4K_ENABLE, rtd->acp3x_base +
- mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
+ mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
for (page_idx = 0; page_idx < rtd->num_pages; page_idx++) {
/* Load the low address of page int ACP SRAM through SRBM */
@@ -223,38 +238,95 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
}
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_TX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET + (rtd->num_pages * 8)
- + PLAYBACK_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_TX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_TX_FIFOSIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ /* Config ringbuffer */
+ rv_writel(I2S_BT_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_TX_RINGBUFADDR);
+ rv_writel(MAX_BUFFER, rtd->acp3x_base +
+ mmACP_BT_TX_RINGBUFSIZE);
+ rv_writel(DMA_SIZE,
+ rtd->acp3x_base + mmACP_BT_TX_DMA_SIZE);
+
+ /* Config audio fifo */
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_PB_FIFO_ADDR_OFFSET;
+ rv_writel(acp_fifo_addr,
+ rtd->acp3x_base + mmACP_BT_TX_FIFOADDR);
+ rv_writel(FIFO_SIZE,
+ rtd->acp3x_base + mmACP_BT_TX_FIFOSIZE);
+ /* Enable watermark/period interrupt to host */
+ rv_writel(BIT(BT_TX_THRESHOLD),
+ rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
+ break;
+
+ case I2S_SP_INSTANCE:
+ default:
+ /* Config ringbuffer */
+ rv_writel(I2S_SP_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_TX_RINGBUFADDR);
+ rv_writel(MAX_BUFFER,
+ rtd->acp3x_base + mmACP_I2S_TX_RINGBUFSIZE);
+ rv_writel(DMA_SIZE,
+ rtd->acp3x_base + mmACP_I2S_TX_DMA_SIZE);
+
+ /* Config audio fifo */
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_PB_FIFO_ADDR_OFFSET;
+ rv_writel(acp_fifo_addr,
+ rtd->acp3x_base + mmACP_I2S_TX_FIFOADDR);
+ rv_writel(FIFO_SIZE,
+ rtd->acp3x_base + mmACP_I2S_TX_FIFOSIZE);
+ /* Enable watermark/period interrupt to host */
+ rv_writel(BIT(I2S_TX_THRESHOLD),
+ rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
+ }
} else {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START + MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_RX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
- (rtd->num_pages * 8) + CAPTURE_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_RX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_RX_FIFOSIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ /* Config ringbuffer */
+ rv_writel(I2S_BT_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_RX_RINGBUFADDR);
+ rv_writel(MAX_BUFFER,
+ rtd->acp3x_base + mmACP_BT_RX_RINGBUFSIZE);
+ rv_writel(DMA_SIZE,
+ rtd->acp3x_base + mmACP_BT_RX_DMA_SIZE);
+
+ /* Config audio fifo */
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_CAPT_FIFO_ADDR_OFFSET;
+ rv_writel(acp_fifo_addr,
+ rtd->acp3x_base + mmACP_BT_RX_FIFOADDR);
+ rv_writel(FIFO_SIZE,
+ rtd->acp3x_base + mmACP_BT_RX_FIFOSIZE);
+ /* Enable watermark/period interrupt to host */
+ rv_writel(BIT(BT_RX_THRESHOLD),
+ rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
+ break;
+
+ case I2S_SP_INSTANCE:
+ default:
+ /* Config ringbuffer */
+ rv_writel(I2S_SP_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_RX_RINGBUFADDR);
+ rv_writel(MAX_BUFFER,
+ rtd->acp3x_base + mmACP_I2S_RX_RINGBUFSIZE);
+ rv_writel(DMA_SIZE,
+ rtd->acp3x_base + mmACP_I2S_RX_DMA_SIZE);
+
+ /* Config audio fifo */
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_CAPT_FIFO_ADDR_OFFSET;
+ rv_writel(acp_fifo_addr,
+ rtd->acp3x_base + mmACP_I2S_RX_FIFOADDR);
+ rv_writel(FIFO_SIZE,
+ rtd->acp3x_base + mmACP_I2S_RX_FIFOSIZE);
+ /* Enable watermark/period interrupt to host */
+ rv_writel(BIT(I2S_RX_THRESHOLD),
+ rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
+ }
}
- /* Enable watermark/period interrupt to host */
- rv_writel(BIT(BT_TX_THRESHOLD) | BIT(BT_RX_THRESHOLD),
- rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
}
static int acp3x_dma_open(struct snd_soc_component *component,
@@ -285,13 +357,17 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return ret;
}
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = substream;
- else
+ adata->i2ssp_play_stream = substream;
+ } else {
adata->capture_stream = substream;
+ adata->i2ssp_capture_stream = substream;
+ }
i2s_data->acp3x_base = adata->acp3x_base;
runtime->private_data = i2s_data;
@@ -304,13 +380,24 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_hw_params *params)
{
int status;
- u64 size;
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct i2s_stream_instance *rtd = runtime->private_data;
+ uint64_t size;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+ struct snd_soc_card *card = prtd->card;
+ struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card);
+ struct i2s_stream_instance *rtd = substream->runtime->private_data;
if (!rtd)
return -EINVAL;
+
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ } else
+ pr_err("pinfo failed\n");
+
size = params_buffer_bytes(params);
status = snd_pcm_lib_malloc_pages(substream, size);
if (status < 0)
@@ -334,8 +421,17 @@ static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
u32 pos = 0;
u32 buffersize = 0;
u64 bytescount = 0;
- struct i2s_stream_instance *rtd =
- substream->runtime->private_data;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+ struct snd_soc_card *card = prtd->card;
+ struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card);
+ struct i2s_stream_instance *rtd = substream->runtime->private_data;
+
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
buffersize = frames_to_bytes(substream->runtime,
substream->runtime->buffer_size);
@@ -377,15 +473,19 @@ static int acp3x_dma_close(struct snd_soc_component *component,
component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = NULL;
- else
+ adata->i2ssp_play_stream = NULL;
+ } else {
adata->capture_stream = NULL;
+ adata->i2ssp_capture_stream = NULL;
+ }
/* Disable ACP irq, when the current stream is being closed and
* another stream is also not active.
*/
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ !adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
kfree(rtd);
return 0;
@@ -435,8 +535,6 @@ static int acp3x_audio_probe(struct platform_device *pdev)
}
adata->i2s_irq = res->start;
- adata->play_stream = NULL;
- adata->capture_stream = NULL;
dev_set_drvdata(&pdev->dev, adata);
/* Initialize ACP */
@@ -501,13 +599,16 @@ static int acp3x_resume(struct device *dev)
adata->play_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_PLAYBACK);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_ITER);
+ rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_TXFRMT);
+ mmACP_BTTDM_TXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_ITER);
+ mmACP_BTTDM_ITER);
}
}
@@ -516,13 +617,17 @@ static int acp3x_resume(struct device *dev)
adata->capture_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_CAPTURE);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_IRER);
+ rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
+
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_RXFRMT);
+ mmACP_BTTDM_RXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_IRER);
+ mmACP_BTTDM_IRER);
}
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 72c1a23..c071477 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,6 +7,9 @@
#include "chip_offset_byte.h"
+#define I2S_SP_INSTANCE 0x01
+#define I2S_BT_INSTANCE 0x02
+
#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
@@ -17,8 +20,11 @@
#define ACP3x_BT_TDM_REG_START 0x1242800
#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
+#define I2S_RX_THRESHOLD 27
+#define I2S_TX_THRESHOLD 28
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
+#define ACP_ERR_INTR_MASK 29
#define ACP3x_POWER_ON 0x00
#define ACP3x_POWER_ON_IN_PROGRESS 0x01
#define ACP3x_POWER_OFF 0x02
@@ -26,19 +32,28 @@
#define ACP3x_SOFT_RESET__SoftResetAudDone_MASK 0x00010001
#define ACP_SRAM_PTE_OFFSET 0x02050000
+#define ACP_SRAM_SP_PB_PTE_OFFSET 0x0
+#define ACP_SRAM_SP_CP_PTE_OFFSET 0x100
+#define ACP_SRAM_BT_PB_PTE_OFFSET 0x200
+#define ACP_SRAM_BT_CP_PTE_OFFSET 0x300
#define PAGE_SIZE_4K_ENABLE 0x2
-#define MEM_WINDOW_START 0x4000000
-#define PLAYBACK_FIFO_ADDR_OFFSET 0x400
-#define CAPTURE_FIFO_ADDR_OFFSET 0x500
+#define I2S_SP_TX_MEM_WINDOW_START 0x4000000
+#define I2S_SP_RX_MEM_WINDOW_START 0x4020000
+#define I2S_BT_TX_MEM_WINDOW_START 0x4040000
+#define I2S_BT_RX_MEM_WINDOW_START 0x4060000
+#define SP_PB_FIFO_ADDR_OFFSET 0x500
+#define SP_CAPT_FIFO_ADDR_OFFSET 0x700
+#define BT_PB_FIFO_ADDR_OFFSET 0x900
+#define BT_CAPT_FIFO_ADDR_OFFSET 0xB00
#define PLAYBACK_MIN_NUM_PERIODS 2
#define PLAYBACK_MAX_NUM_PERIODS 8
-#define PLAYBACK_MAX_PERIOD_SIZE 16384
-#define PLAYBACK_MIN_PERIOD_SIZE 4096
+#define PLAYBACK_MAX_PERIOD_SIZE 8192
+#define PLAYBACK_MIN_PERIOD_SIZE 1024
#define CAPTURE_MIN_NUM_PERIODS 2
#define CAPTURE_MAX_NUM_PERIODS 8
-#define CAPTURE_MAX_PERIOD_SIZE 16384
-#define CAPTURE_MIN_PERIOD_SIZE 4096
+#define CAPTURE_MAX_PERIOD_SIZE 8192
+#define CAPTURE_MIN_PERIOD_SIZE 1024
#define MAX_BUFFER (PLAYBACK_MAX_PERIOD_SIZE * PLAYBACK_MAX_NUM_PERIODS)
#define MIN_BUFFER MAX_BUFFER
@@ -64,14 +79,20 @@ struct i2s_dev_data {
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
+ struct snd_pcm_substream *i2ssp_play_stream;
+ struct snd_pcm_substream *i2ssp_capture_stream;
};
struct i2s_stream_instance {
u16 num_pages;
+ u16 i2s_instance;
+ u16 capture_channel;
+ u16 direction;
u16 channels;
u32 xfer_resolution;
- u64 bytescount;
+ u32 val;
dma_addr_t dma_addr;
+ u64 bytescount;
void __iomem *acp3x_base;
};
@@ -91,15 +112,36 @@ static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
u64 byte_count;
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_LOW);
+ }
+
} else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_LOW);
+ }
}
return byte_count;
}
--
2.7.4
2
1

[alsa-devel] [PATCH v3 2/6] ASoC: amd: Refactoring of DAI from DMA driver
by Ravulapati Vishnu vardhan rao 07 Nov '19
by Ravulapati Vishnu vardhan rao 07 Nov '19
07 Nov '19
Asoc: PCM DMA driver should only have dma ops.
So Removed all DAI related functionality.
Refactoring the PCM DMA diver code.
Added new file containing only DAI ops.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/Makefile | 2 +
sound/soc/amd/raven/acp3x-i2s.c | 267 ++++++++++++++++++++++++++++++++++++
sound/soc/amd/raven/acp3x-pcm-dma.c | 232 ++-----------------------------
sound/soc/amd/raven/acp3x.h | 42 ++++++
4 files changed, 325 insertions(+), 218 deletions(-)
create mode 100644 sound/soc/amd/raven/acp3x-i2s.c
diff --git a/sound/soc/amd/raven/Makefile b/sound/soc/amd/raven/Makefile
index 108d1ac..8eef292 100644
--- a/sound/soc/amd/raven/Makefile
+++ b/sound/soc/amd/raven/Makefile
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: GPL-2.0+
# Raven Ridge platform Support
snd-pci-acp3x-objs := pci-acp3x.o
+snd-acp3x-i2s-objs := acp3x-i2s.o
snd-acp3x-pcm-dma-objs := acp3x-pcm-dma.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-pci-acp3x.o
+obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-i2s.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-pcm-dma.o
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
new file mode 100644
index 0000000..547f497
--- /dev/null
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -0,0 +1,267 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// AMD ALSA SoC PCM Driver
+//
+//Copyright 2016 Advanced Micro Devices, Inc.
+
+#include <linux/platform_device.h>
+#include <linux/module.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/pm_runtime.h>
+#include <sound/pcm.h>
+#include <sound/pcm_params.h>
+#include <sound/soc.h>
+#include <sound/soc-dai.h>
+#include <linux/dma-mapping.h>
+
+#include "acp3x.h"
+
+#define DRV_NAME "acp3x-i2s"
+
+static int acp3x_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
+{
+
+ struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
+
+ case SND_SOC_DAIFMT_I2S:
+ adata->tdm_mode = false;
+ break;
+ case SND_SOC_DAIFMT_DSP_A:
+ adata->tdm_mode = true;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
+ u32 rx_mask, int slots, int slot_width)
+{
+ u32 val;
+ u16 slot_len;
+
+ struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ /* These values are as per Hardware Spec */
+
+ switch (slot_width) {
+ case SLOT_WIDTH_8:
+ slot_len = 8;
+ break;
+ case SLOT_WIDTH_16:
+ slot_len = 16;
+ break;
+ case SLOT_WIDTH_24:
+ slot_len = 24;
+ break;
+ case SLOT_WIDTH_32:
+ slot_len = 0;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
+
+ val = (FRM_LEN | (slots << 15) | (slot_len << 18));
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+
+ adata->tdm_fmt = val;
+ return 0;
+}
+
+static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ struct snd_soc_dai *dai)
+{
+ u32 val = 0;
+ struct i2s_stream_instance *rtd = substream->runtime->private_data;
+
+ switch (params_format(params)) {
+ case SNDRV_PCM_FORMAT_U8:
+ case SNDRV_PCM_FORMAT_S8:
+ rtd->xfer_resolution = 0x0;
+ break;
+ case SNDRV_PCM_FORMAT_S16_LE:
+ rtd->xfer_resolution = 0x02;
+ break;
+ case SNDRV_PCM_FORMAT_S24_LE:
+ rtd->xfer_resolution = 0x04;
+ break;
+ case SNDRV_PCM_FORMAT_S32_LE:
+ rtd->xfer_resolution = 0x05;
+ break;
+ default:
+ return -EINVAL;
+ }
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ } else {
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ }
+ return 0;
+}
+
+static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
+ int cmd, struct snd_soc_dai *dai)
+{
+ int ret = 0;
+ struct i2s_stream_instance *rtd = substream->runtime->private_data;
+ u32 val, period_bytes;
+
+ period_bytes = frames_to_bytes(substream->runtime,
+ substream->runtime->period_size);
+ switch (cmd) {
+ case SNDRV_PCM_TRIGGER_START:
+ case SNDRV_PCM_TRIGGER_RESUME:
+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+ rtd->bytescount = acp_get_byte_count(rtd,
+ substream->stream);
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_TX_INTR_WATERMARK_SIZE);
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ } else {
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_RX_INTR_WATERMARK_SIZE);
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ }
+ rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ case SNDRV_PCM_TRIGGER_STOP:
+ case SNDRV_PCM_TRIGGER_SUSPEND:
+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ } else {
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ }
+ rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ default:
+ ret = -EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
+static struct snd_soc_dai_ops acp3x_i2s_dai_ops = {
+ .hw_params = acp3x_i2s_hwparams,
+ .trigger = acp3x_i2s_trigger,
+ .set_fmt = acp3x_i2s_set_fmt,
+ .set_tdm_slot = acp3x_i2s_set_tdm_slot,
+};
+
+static const struct snd_soc_component_driver acp3x_dai_component = {
+ .name = "acp3x-i2s",
+};
+
+static struct snd_soc_dai_driver acp3x_i2s_dai = {
+ .playback = {
+ .rates = SNDRV_PCM_RATE_8000_96000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 8,
+
+ .rate_min = 8000,
+ .rate_max = 96000,
+ },
+ .capture = {
+ .rates = SNDRV_PCM_RATE_8000_48000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 2,
+ .rate_min = 8000,
+ .rate_max = 48000,
+ },
+ .ops = &acp3x_i2s_dai_ops,
+};
+
+
+static int acp3x_dai_probe(struct platform_device *pdev)
+{
+ int status;
+ struct resource *res;
+ struct i2s_dev_data *adata;
+
+ if (!pdev->dev.platform_data) {
+ dev_err(&pdev->dev, "platform_data not retrieved\n");
+ return -ENODEV;
+ }
+
+ adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data),
+ GFP_KERNEL);
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
+ return -ENODEV;
+ }
+
+ adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
+ resource_size(res));
+ if (IS_ERR(adata->acp3x_base))
+ return PTR_ERR(adata->acp3x_base);
+
+ adata->i2s_irq = res->start;
+ dev_set_drvdata(&pdev->dev, adata);
+ status = devm_snd_soc_register_component(&pdev->dev,
+ &acp3x_dai_component,
+ &acp3x_i2s_dai, 1);
+ if (status) {
+ dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ return -ENODEV;
+ }
+
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 10000);
+ pm_runtime_use_autosuspend(&pdev->dev);
+ pm_runtime_enable(&pdev->dev);
+ return 0;
+}
+
+static int acp3x_dai_remove(struct platform_device *pdev)
+{
+ pm_runtime_disable(&pdev->dev);
+ return 0;
+}
+static struct platform_driver acp3x_dai_driver = {
+ .probe = acp3x_dai_probe,
+ .remove = acp3x_dai_remove,
+ .driver = {
+ .name = "acp3x_i2s_playcap",
+ },
+};
+
+module_platform_driver(acp3x_dai_driver);
+
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
+MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:" DRV_NAME);
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 60709e3..f5e4c7b 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -18,24 +18,6 @@
#define DRV_NAME "acp3x-i2s-audio"
-struct i2s_dev_data {
- bool tdm_mode;
- unsigned int i2s_irq;
- u32 tdm_fmt;
- void __iomem *acp3x_base;
- struct snd_pcm_substream *play_stream;
- struct snd_pcm_substream *capture_stream;
-};
-
-struct i2s_stream_instance {
- u16 num_pages;
- u16 channels;
- u32 xfer_resolution;
- u64 bytescount;
- dma_addr_t dma_addr;
- void __iomem *acp3x_base;
-};
-
static const struct snd_pcm_hardware acp3x_pcm_hardware_playback = {
.info = SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -279,7 +261,11 @@ static int acp3x_dma_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
int ret = 0;
+
struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
struct i2s_stream_instance *i2s_data = kzalloc(sizeof(struct i2s_stream_instance),
GFP_KERNEL);
@@ -312,23 +298,6 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return 0;
}
-static u64 acp_get_byte_count(struct i2s_stream_instance *rtd, int direction)
-{
- u64 byte_count;
-
- if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
- } else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
- }
- return byte_count;
-}
static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
@@ -380,6 +349,7 @@ static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
static int acp3x_dma_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd)
{
+ component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
struct device *parent = component->dev->parent;
snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_DEV,
parent, MIN_BUFFER, MAX_BUFFER);
@@ -402,7 +372,9 @@ static int acp3x_dma_mmap(struct snd_soc_component *component,
static int acp3x_dma_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
struct i2s_stream_instance *rtd = substream->runtime->private_data;
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
@@ -419,182 +391,6 @@ static int acp3x_dma_close(struct snd_soc_component *component,
return 0;
}
-static int acp3x_dai_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
-{
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
- case SND_SOC_DAIFMT_I2S:
- adata->tdm_mode = false;
- break;
- case SND_SOC_DAIFMT_DSP_A:
- adata->tdm_mode = true;
- break;
- default:
- return -EINVAL;
- }
-
- return 0;
-}
-
-static int acp3x_dai_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
- u32 rx_mask, int slots, int slot_width)
-{
- u32 val = 0;
- u16 slot_len;
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (slot_width) {
- case SLOT_WIDTH_8:
- slot_len = 8;
- break;
- case SLOT_WIDTH_16:
- slot_len = 16;
- break;
- case SLOT_WIDTH_24:
- slot_len = 24;
- break;
- case SLOT_WIDTH_32:
- slot_len = 0;
- break;
- default:
- return -EINVAL;
- }
-
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
-
- val = (FRM_LEN | (slots << 15) | (slot_len << 18));
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
-
- adata->tdm_fmt = val;
- return 0;
-}
-
-static int acp3x_dai_i2s_hwparams(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *params,
- struct snd_soc_dai *dai)
-{
- u32 val = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
-
- switch (params_format(params)) {
- case SNDRV_PCM_FORMAT_U8:
- case SNDRV_PCM_FORMAT_S8:
- rtd->xfer_resolution = 0x0;
- break;
- case SNDRV_PCM_FORMAT_S16_LE:
- rtd->xfer_resolution = 0x02;
- break;
- case SNDRV_PCM_FORMAT_S24_LE:
- rtd->xfer_resolution = 0x04;
- break;
- case SNDRV_PCM_FORMAT_S32_LE:
- rtd->xfer_resolution = 0x05;
- break;
- default:
- return -EINVAL;
- }
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | (rtd->xfer_resolution << 3);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- else
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
-
- return 0;
-}
-
-static int acp3x_dai_i2s_trigger(struct snd_pcm_substream *substream,
- int cmd, struct snd_soc_dai *dai)
-{
- int ret = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
- u32 val, period_bytes;
-
- period_bytes = frames_to_bytes(substream->runtime,
- substream->runtime->period_size);
- switch (cmd) {
- case SNDRV_PCM_TRIGGER_START:
- case SNDRV_PCM_TRIGGER_RESUME:
- case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
- rtd->bytescount = acp_get_byte_count(rtd, substream->stream);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_TX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_RX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- case SNDRV_PCM_TRIGGER_STOP:
- case SNDRV_PCM_TRIGGER_SUSPEND:
- case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- default:
- ret = -EINVAL;
- break;
- }
-
- return ret;
-}
-
-static struct snd_soc_dai_ops acp3x_dai_i2s_ops = {
- .hw_params = acp3x_dai_i2s_hwparams,
- .trigger = acp3x_dai_i2s_trigger,
- .set_fmt = acp3x_dai_i2s_set_fmt,
- .set_tdm_slot = acp3x_dai_set_tdm_slot,
-};
-
-static struct snd_soc_dai_driver acp3x_i2s_dai_driver = {
- .playback = {
- .rates = SNDRV_PCM_RATE_8000_96000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 8,
-
- .rate_min = 8000,
- .rate_max = 96000,
- },
- .capture = {
- .rates = SNDRV_PCM_RATE_8000_48000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 2,
- .rate_min = 8000,
- .rate_max = 48000,
- },
- .ops = &acp3x_dai_i2s_ops,
-};
-
static const struct snd_soc_component_driver acp3x_i2s_component = {
.name = DRV_NAME,
.open = acp3x_dma_open,
@@ -619,6 +415,9 @@ static int acp3x_audio_probe(struct platform_device *pdev)
return -ENODEV;
}
irqflags = *((unsigned int *)(pdev->dev.platform_data));
+ adata = devm_kzalloc(&pdev->dev, sizeof(*adata), GFP_KERNEL);
+ if (!adata)
+ return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
@@ -626,10 +425,6 @@ static int acp3x_audio_probe(struct platform_device *pdev)
return -ENODEV;
}
- adata = devm_kzalloc(&pdev->dev, sizeof(*adata), GFP_KERNEL);
- if (!adata)
- return -ENOMEM;
-
adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
@@ -650,9 +445,9 @@ static int acp3x_audio_probe(struct platform_device *pdev)
return -ENODEV;
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
- &acp3x_i2s_dai_driver, 1);
+ NULL, 0);
if (status) {
- dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ dev_err(&pdev->dev, "Fail to register acp i2s component\n");
goto dev_err;
}
status = devm_request_irq(&pdev->dev, adata->i2s_irq, i2s_irq_handler,
@@ -774,13 +569,14 @@ static struct platform_driver acp3x_dma_driver = {
.probe = acp3x_audio_probe,
.remove = acp3x_audio_remove,
.driver = {
- .name = "acp3x_rv_i2s",
+ .name = "acp3x_rv_i2s_dma",
.pm = &acp3x_pm_ops,
},
};
module_platform_driver(acp3x_dma_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_AUTHOR("Vijendar.Mukunda(a)amd.com");
MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 2f15fe1..72c1a23 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -51,6 +51,29 @@
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+struct acp3x_platform_info {
+ u16 play_i2s_instance;
+ u16 cap_i2s_instance;
+ u16 capture_channel;
+};
+
+struct i2s_dev_data {
+ bool tdm_mode;
+ unsigned int i2s_irq;
+ u32 tdm_fmt;
+ void __iomem *acp3x_base;
+ struct snd_pcm_substream *play_stream;
+ struct snd_pcm_substream *capture_stream;
+};
+
+struct i2s_stream_instance {
+ u16 num_pages;
+ u16 channels;
+ u32 xfer_resolution;
+ u64 bytescount;
+ dma_addr_t dma_addr;
+ void __iomem *acp3x_base;
+};
static inline u32 rv_readl(void __iomem *base_addr)
{
@@ -61,3 +84,22 @@ static inline void rv_writel(u32 val, void __iomem *base_addr)
{
writel(val, base_addr - ACP3x_PHY_BASE_ADDRESS);
}
+
+static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
+ int direction)
+{
+ u64 byte_count;
+
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ } else {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ }
+ return byte_count;
+}
--
2.7.4
2
1

[alsa-devel] [RESEND PATCH v2 5/7] ASoC: amd: handle ACP3x i2s-sp watermark interrupt.
by Ravulapati Vishnu vardhan rao 07 Nov '19
by Ravulapati Vishnu vardhan rao 07 Nov '19
07 Nov '19
whenever audio data equal to I2S-SP fifo watermark level is
produced/consumed, interrupt is generated.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 58db11b..689e234 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -176,6 +176,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->play_stream);
play_flag = 1;
}
+ if ((val & BIT(I2S_TX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_play_stream) {
+ rv_writel(BIT(I2S_TX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_play_stream);
+ play_flag = 1;
+ }
if ((val & BIT(BT_RX_THRESHOLD)) && rv_i2s_data->capture_stream) {
rv_writel(BIT(BT_RX_THRESHOLD), rv_i2s_data->acp3x_base +
@@ -183,6 +190,13 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
snd_pcm_period_elapsed(rv_i2s_data->capture_stream);
cap_flag = 1;
}
+ if ((val & BIT(I2S_RX_THRESHOLD)) &&
+ rv_i2s_data->i2ssp_capture_stream) {
+ rv_writel(BIT(I2S_RX_THRESHOLD),
+ rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT);
+ snd_pcm_period_elapsed(rv_i2s_data->i2ssp_capture_stream);
+ cap_flag = 1;
+ }
if (play_flag | cap_flag)
return IRQ_HANDLED;
--
2.7.4
1
0

[alsa-devel] [RESEND PATCH v2 4/7] ASoC: amd: add ACP3x TDM mode support
by Ravulapati Vishnu vardhan rao 07 Nov '19
by Ravulapati Vishnu vardhan rao 07 Nov '19
07 Nov '19
ACP3x I2S (CPU DAI) can act in normal I2S and TDM modes. Added support
for TDM mode. Desired mode can be selected from ASoC machine driver.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 52 +++++++++++++++++++++++++++++++++--------
sound/soc/amd/raven/acp3x.h | 2 ++
2 files changed, 44 insertions(+), 10 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index 725e71a..04c740d 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -43,7 +43,8 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
u32 rx_mask, int slots, int slot_width)
{
u32 val = 0;
- u16 slot_len;
+ u32 mode = 0;
+ u16 slot_len, flen;
struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
@@ -64,16 +65,47 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
return -EINVAL;
}
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
+ /* Enable I2S / BT channels TDM and respective
+ * I2S/BT`s TX/RX Formats frame lengths.
+ */
+ flen = (FRM_LEN | (slots << 15) | (slot_len << 18));
- val = (FRM_LEN | (slots << 15) | (slot_len << 18));
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
-
- adata->tdm_fmt = val;
+ if (adata->substream_type == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel((val | 0x2),
+ adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel(flen,
+ adata->acp3x_base + mmACP_BTTDM_TXFRMT);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = rv_readl(adata->acp3x_base + mmACP_I2STDM_ITER);
+ rv_writel((val | 0x2),
+ adata->acp3x_base + mmACP_I2STDM_ITER);
+ rv_writel(flen,
+ adata->acp3x_base + mmACP_I2STDM_TXFRMT);
+ }
+ } else {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel((val | 0x2),
+ adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel(flen,
+ adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = rv_readl(adata->acp3x_base + mmACP_I2STDM_IRER);
+ rv_writel((val | 0x2),
+ adata->acp3x_base + mmACP_I2STDM_IRER);
+ rv_writel(flen,
+ adata->acp3x_base + mmACP_I2STDM_RXFRMT);
+ }
+ }
+ adata->tdm_fmt = flen;
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index c071477..01b283a 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -76,6 +76,8 @@ struct i2s_dev_data {
bool tdm_mode;
unsigned int i2s_irq;
u32 tdm_fmt;
+ u16 i2s_instance;
+ u32 substream_type;
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
--
2.7.4
1
0

[alsa-devel] [RESEND PATCH v3 4/6] ASoC: amd: add ACP3x TDM mode support
by Ravulapati Vishnu vardhan rao 07 Nov '19
by Ravulapati Vishnu vardhan rao 07 Nov '19
07 Nov '19
ACP3x I2S (CPU DAI) can act in normal I2S and TDM modes. Added support
for TDM mode. Desired mode can be selected from ASoC machine driver.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 51 +++++++++++++++++++++++++++++++++--------
sound/soc/amd/raven/acp3x.h | 2 ++
2 files changed, 43 insertions(+), 10 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index 6fdf118..8c0df5f 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -43,7 +43,7 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
u32 rx_mask, int slots, int slot_width)
{
u32 val;
- u16 slot_len;
+ u16 slot_len, flen;
struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
@@ -66,16 +66,47 @@ static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
return -EINVAL;
}
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
+ /* Enable I2S / BT channels TDM and respective
+ * I2S/BT`s TX/RX Formats frame lengths.
+ */
+ flen = (FRM_LEN | (slots << 15) | (slot_len << 18));
- val = (FRM_LEN | (slots << 15) | (slot_len << 18));
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
-
- adata->tdm_fmt = val;
+ if (adata->substream_type == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel((val | 0x2),
+ adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel(flen,
+ adata->acp3x_base + mmACP_BTTDM_TXFRMT);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = rv_readl(adata->acp3x_base + mmACP_I2STDM_ITER);
+ rv_writel((val | 0x2),
+ adata->acp3x_base + mmACP_I2STDM_ITER);
+ rv_writel(flen,
+ adata->acp3x_base + mmACP_I2STDM_TXFRMT);
+ }
+ } else {
+ switch (adata->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel((val | 0x2),
+ adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel(flen,
+ adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = rv_readl(adata->acp3x_base + mmACP_I2STDM_IRER);
+ rv_writel((val | 0x2),
+ adata->acp3x_base + mmACP_I2STDM_IRER);
+ rv_writel(flen,
+ adata->acp3x_base + mmACP_I2STDM_RXFRMT);
+ }
+ }
+ adata->tdm_fmt = flen;
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index c071477..01b283a 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -76,6 +76,8 @@ struct i2s_dev_data {
bool tdm_mode;
unsigned int i2s_irq;
u32 tdm_fmt;
+ u16 i2s_instance;
+ u32 substream_type;
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
--
2.7.4
1
0

[alsa-devel] [PATCH v3 1/6] ASoC: amd:Create multiple I2S platform device endpoints
by Ravulapati Vishnu vardhan rao 07 Nov '19
by Ravulapati Vishnu vardhan rao 07 Nov '19
07 Nov '19
Creates Platform Device endpoints for multiple
I2S instances: SP and BT endpoints device.
Pass PCI resources like MMIO, irq to the platform devices.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x.h | 5 +++
sound/soc/amd/raven/pci-acp3x.c | 78 +++++++++++++++++++++++++++++------------
2 files changed, 60 insertions(+), 23 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 4f2cadd..2f15fe1 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,10 +7,15 @@
#include "chip_offset_byte.h"
+#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
#define ACP3x_REG_START 0x1240000
#define ACP3x_REG_END 0x1250200
+#define ACP3x_I2STDM_REG_START 0x1242400
+#define ACP3x_I2STDM_REG_END 0x1242410
+#define ACP3x_BT_TDM_REG_START 0x1242800
+#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index facec24..fe37160c 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -16,16 +16,16 @@ struct acp3x_dev_data {
void __iomem *acp3x_base;
bool acp3x_audio_mode;
struct resource *res;
- struct platform_device *pdev;
+ struct platform_device *pdev[ACP3x_DEVS];
};
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
int ret;
- u32 addr, val;
+ u32 addr, val, i;
struct acp3x_dev_data *adata;
- struct platform_device_info pdevinfo;
+ struct platform_device_info pdevinfo[ACP3x_DEVS];
unsigned int irqflags;
if (pci_enable_device(pci)) {
@@ -68,7 +68,7 @@ static int snd_acp3x_probe(struct pci_dev *pci,
switch (val) {
case I2S_MODE:
adata->res = devm_kzalloc(&pci->dev,
- sizeof(struct resource) * 2,
+ sizeof(struct resource) * 4,
GFP_KERNEL);
if (!adata->res) {
ret = -ENOMEM;
@@ -80,28 +80,52 @@ static int snd_acp3x_probe(struct pci_dev *pci,
adata->res[0].start = addr;
adata->res[0].end = addr + (ACP3x_REG_END - ACP3x_REG_START);
- adata->res[1].name = "acp3x_i2s_irq";
- adata->res[1].flags = IORESOURCE_IRQ;
- adata->res[1].start = pci->irq;
- adata->res[1].end = pci->irq;
+ adata->res[1].name = "acp3x_i2s_sp";
+ adata->res[1].flags = IORESOURCE_MEM;
+ adata->res[1].start = addr + ACP3x_I2STDM_REG_START;
+ adata->res[1].end = addr + ACP3x_I2STDM_REG_END;
+
+ adata->res[2].name = "acp3x_i2s_bt";
+ adata->res[2].flags = IORESOURCE_MEM;
+ adata->res[2].start = addr + ACP3x_BT_TDM_REG_START;
+ adata->res[2].end = addr + ACP3x_BT_TDM_REG_END;
+
+ adata->res[3].name = "acp3x_i2s_irq";
+ adata->res[3].flags = IORESOURCE_IRQ;
+ adata->res[3].start = pci->irq;
+ adata->res[3].end = adata->res[3].start;
adata->acp3x_audio_mode = ACP3x_I2S_MODE;
memset(&pdevinfo, 0, sizeof(pdevinfo));
- pdevinfo.name = "acp3x_rv_i2s";
- pdevinfo.id = 0;
- pdevinfo.parent = &pci->dev;
- pdevinfo.num_res = 2;
- pdevinfo.res = adata->res;
- pdevinfo.data = &irqflags;
- pdevinfo.size_data = sizeof(irqflags);
-
- adata->pdev = platform_device_register_full(&pdevinfo);
- if (IS_ERR(adata->pdev)) {
- dev_err(&pci->dev, "cannot register %s device\n",
- pdevinfo.name);
- ret = PTR_ERR(adata->pdev);
- goto unmap_mmio;
+ pdevinfo[0].name = "acp3x_rv_i2s_dma";
+ pdevinfo[0].id = 0;
+ pdevinfo[0].parent = &pci->dev;
+ pdevinfo[0].num_res = 4;
+ pdevinfo[0].res = &adata->res[0];
+ pdevinfo[0].data = &irqflags;
+ pdevinfo[0].size_data = sizeof(irqflags);
+
+ pdevinfo[1].name = "acp3x_i2s_playcap";
+ pdevinfo[1].id = 0;
+ pdevinfo[1].parent = &pci->dev;
+ pdevinfo[1].num_res = 1;
+ pdevinfo[1].res = &adata->res[1];
+
+ pdevinfo[2].name = "acp3x_i2s_playcap";
+ pdevinfo[2].id = 1;
+ pdevinfo[2].parent = &pci->dev;
+ pdevinfo[2].num_res = 1;
+ pdevinfo[2].res = &adata->res[2];
+ for (i = 0; i < ACP3x_DEVS ; i++) {
+ adata->pdev[i] =
+ platform_device_register_full(&pdevinfo[i]);
+ IS_ERR(adata->pdev[i]) {
+ dev_err(&pci->dev, "cannot register %s device\n",
+ pdevinfo[i].name);
+ ret = -ENODEV;
+ goto unmap_mmio;
+ }
}
break;
default:
@@ -113,6 +137,9 @@ static int snd_acp3x_probe(struct pci_dev *pci,
unmap_mmio:
pci_disable_msi(pci);
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+ kfree(adata->res);
iounmap(adata->acp3x_base);
release_regions:
pci_release_regions(pci);
@@ -124,9 +151,13 @@ static int snd_acp3x_probe(struct pci_dev *pci,
static void snd_acp3x_remove(struct pci_dev *pci)
{
+ int i;
struct acp3x_dev_data *adata = pci_get_drvdata(pci);
- platform_device_unregister(adata->pdev);
+ if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+ }
iounmap(adata->acp3x_base);
pci_disable_msi(pci);
@@ -151,6 +182,7 @@ static struct pci_driver acp3x_driver = {
module_pci_driver(acp3x_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_DESCRIPTION("AMD ACP3x PCI driver");
MODULE_LICENSE("GPL v2");
--
2.7.4
1
0
Hi all,
I make some internal ucm code cleanups in alsa-lib and added three major
extensions to allow more complex configurations which we require for the SOF
kernel driver.
The first thing is the added substitution for the value strings:
https://github.com/alsa-project/alsa-lib/commit/f1e637b285e8e04e6761248a070…
The second thing is the If block:
https://github.com/alsa-project/alsa-lib/commit/985715ce8148dc7ef62c8e3d8ce…
The third thing is the card / hardware like specifier passed as the ucm name
to snd_use_case_mgr_open() to support multiple card instances:
https://github.com/alsa-project/alsa-lib/commit/60164fc5886cdc6ca55eeed0c2e…
All those patches (with other cleanups) are in the ucm2 branch on github for
comments:
https://github.com/alsa-project/alsa-lib/commits/ucm2
The proposed SOF UCM config diff is here:
https://github.com/alsa-project/alsa-ucm-conf/commit/723b6da881721488229154…
https://github.com/alsa-project/alsa-ucm-conf/commits/ucm2
I added everything to keep the interface backward compatible, so the current
applications should not observe any different behavior. The applications like
pulseaudio should use the 'hw:CARD_INDEX' specifier for the open call in the
future and snd_use_case_parse_ctl_elem_id() helper for the element control names.
If you have another ideas to address those issues, please, let me know.
BTW, Mark: The SOF UCM configs relies on the driver name changes, so it might
be worth to send "ASoC: intel - fix the card names" patch to 5.4 to make
things stable more quickly:
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/?h…
Thanks,
Jaroslav
--
Jaroslav Kysela <perex(a)perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
6
16

[alsa-devel] [PATCH] ASoC: SOF: topology: Fix bytes control size checks
by Pierre-Louis Bossart 07 Nov '19
by Pierre-Louis Bossart 07 Nov '19
07 Nov '19
From: Dragos Tarcatu <dragos_tarcatu(a)mentor.com>
When using the example SOF amp widget topology, KASAN dumps this
when the AMP bytes kcontrol gets loaded:
[ 9.579548] BUG: KASAN: slab-out-of-bounds in
sof_control_load+0x8cc/0xac0 [snd_sof]
[ 9.588194] Write of size 40 at addr ffff8882314559dc by task
systemd-udevd/2411
Fix that by rejecting the topology if the bytes data size > max_size
Fixes: 311ce4fe7637d ("ASoC: SOF: Add support for loading topologies")
Reviewed-by: Jaska Uimonen <jaska.uimonen(a)intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan(a)linux.intel.com>
Signed-off-by: Dragos Tarcatu <dragos_tarcatu(a)mentor.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart(a)linux.intel.com>
---
sound/soc/sof/topology.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index 17fe6a1d5f3e..6096731e89ce 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -1048,15 +1048,16 @@ static int sof_control_load_bytes(struct snd_soc_component *scomp,
struct soc_bytes_ext *sbe = (struct soc_bytes_ext *)kc->private_value;
int max_size = sbe->max;
- if (le32_to_cpu(control->priv.size) > max_size) {
+ /* init the get/put bytes data */
+ scontrol->size = sizeof(struct sof_ipc_ctrl_data) +
+ le32_to_cpu(control->priv.size);
+
+ if (scontrol->size > max_size) {
dev_err(sdev->dev, "err: bytes data size %d exceeds max %d.\n",
- control->priv.size, max_size);
+ scontrol->size, max_size);
return -EINVAL;
}
- /* init the get/put bytes data */
- scontrol->size = sizeof(struct sof_ipc_ctrl_data) +
- le32_to_cpu(control->priv.size);
scontrol->control_data = kzalloc(max_size, GFP_KERNEL);
cdata = scontrol->control_data;
if (!scontrol->control_data)
--
2.20.1
2
6

07 Nov '19
From: Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
This patch switches from .txt base to .yaml base Document for FSI.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
---
.../devicetree/bindings/sound/renesas,fsi.txt | 31 ---------
.../devicetree/bindings/sound/renesas,fsi.yaml | 76 ++++++++++++++++++++++
2 files changed, 76 insertions(+), 31 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sound/renesas,fsi.txt
create mode 100644 Documentation/devicetree/bindings/sound/renesas,fsi.yaml
diff --git a/Documentation/devicetree/bindings/sound/renesas,fsi.txt b/Documentation/devicetree/bindings/sound/renesas,fsi.txt
deleted file mode 100644
index 0cf0f81..0000000
--- a/Documentation/devicetree/bindings/sound/renesas,fsi.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Renesas FSI
-
-Required properties:
-- compatible : "renesas,fsi2-<soctype>",
- "renesas,sh_fsi2" or "renesas,sh_fsi" as
- fallback.
- Examples with soctypes are:
- - "renesas,fsi2-r8a7740" (R-Mobile A1)
- - "renesas,fsi2-sh73a0" (SH-Mobile AG5)
-- reg : Should contain the register physical address and length
-- interrupts : Should contain FSI interrupt
-
-- fsia,spdif-connection : FSI is connected by S/PDIF
-- fsia,stream-mode-support : FSI supports 16bit stream mode.
-- fsia,use-internal-clock : FSI uses internal clock when master mode.
-
-- fsib,spdif-connection : same as fsia
-- fsib,stream-mode-support : same as fsia
-- fsib,use-internal-clock : same as fsia
-
-Example:
-
-sh_fsi2: sh_fsi2@ec230000 {
- compatible = "renesas,sh_fsi2";
- reg = <0xec230000 0x400>;
- interrupts = <0 146 0x4>;
-
- fsia,spdif-connection;
- fsia,stream-mode-support;
- fsia,use-internal-clock;
-};
diff --git a/Documentation/devicetree/bindings/sound/renesas,fsi.yaml b/Documentation/devicetree/bindings/sound/renesas,fsi.yaml
new file mode 100644
index 0000000..140a37f
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/renesas,fsi.yaml
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/renesas,fsi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas FSI Sound Driver Device Tree Bindings
+
+maintainers:
+ - Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
+
+properties:
+ $nodename:
+ pattern: "^sound@.*"
+
+ compatible:
+ oneOf:
+ # for FSI2 SoC
+ - items:
+ - enum:
+ - renesas,fsi2-sh73a0
+ - renesas,fsi2-r8a7740
+ - enum:
+ - renesas,sh_fsi2
+ # for Generic
+ - items:
+ - enum:
+ - renesas,sh_fsi
+ - renesas,sh_fsi2
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ fsia,spdif-connection:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: FSI is connected by S/PDIF
+
+ fsia,stream-mode-support:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: FSI supports 16bit stream mode
+
+ fsia,use-internal-clock:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: FSI uses internal clock when master mode
+
+ fsib,spdif-connection:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: same as fsia
+
+ fsib,stream-mode-support:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: same as fsia
+
+ fsib,use-internal-clock:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description: same as fsia
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+examples:
+ - |
+ sh_fsi2: sound@ec230000 {
+ compatible = "renesas,fsi2-r8a7740", "renesas,sh_fsi2";
+ reg = <0xec230000 0x400>;
+ interrupts = <0 146 0x4>;
+
+ fsia,spdif-connection;
+ fsia,stream-mode-support;
+ fsia,use-internal-clock;
+ };
--
2.7.4
3
2
The following changes since commit 95a32c98055f664f9b3f34c41e153d4dcedd0eff:
ASoC: SOF: control: return true when kcontrol values change (2019-10-18 18:09:22 +0100)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git tags/asoc-fix-v5.4-rc6
for you to fetch changes up to 9508ef5a980f5d847cad9b932b6ada8f2a3466c1:
ASoC: SOF: topology: Fix bytes control size checks (2019-11-06 15:31:12 +0000)
----------------------------------------------------------------
ASoC: Fixes for v5.4
These are a collection of fixes since v5.4-rc4 that have accumilated,
they're all driver specific and there's nothing major in here so it's
probably not essential to actually send them but I'll leave that call to
you.
----------------------------------------------------------------
Actually I miseed the hdmi-codec fix, that one probably should be sent -
I can split that out if needed (unfortunately it's in the middle of the
branch due to a lack of topics...).
Cheng-Yi Chiang (1):
ASoC: rockchip: rockchip_max98090: Enable SHDN to fix headset detection
Dragos Tarcatu (1):
ASoC: SOF: topology: Fix bytes control size checks
Jerome Brunet (1):
ASoC: hdmi-codec: drop mutex locking again
Jiada Wang (1):
ASoC: rsnd: dma: fix SSI9 4/5/6/7 busif dma address
Kai Vehmanen (1):
ASoC: hdac_hda: fix race in device removal
Keyon Jie (1):
ASoC: SOF: Intel: hda-stream: fix the CONFIG_ prefix missing
Navid Emamdoost (2):
ASoC: SOF: Fix memory leak in sof_dfsentry_write
ASoC: SOF: ipc: Fix memory leak in sof_set_get_large_ctrl_data
Olivier Moysan (1):
ASoC: stm32: sai: add restriction on mmap support
Peter Ujfalusi (1):
ASoC: ti: sdma-pcm: Add back the flags parameter for non standard dma names
Russell King (2):
ASoC: kirkwood: fix external clock probe defer
ASoC: kirkwood: fix device remove ordering
Stephan Gerhold (1):
ASoC: msm8916-wcd-analog: Fix RX1 selection in RDAC2 MUX
Xiaojun Sang (1):
ASoC: compress: fix unsigned integer overflow check
Yong Zhi (1):
ASoC: max98373: replace gpio_request with devm_gpio_request
sound/core/compress_offload.c | 2 +-
sound/soc/codecs/hdac_hda.c | 2 +-
sound/soc/codecs/hdmi-codec.c | 12 +++++-------
sound/soc/codecs/max98373.c | 4 ++--
sound/soc/codecs/msm8916-wcd-analog.c | 4 ++--
sound/soc/kirkwood/kirkwood-i2s.c | 11 ++++++-----
sound/soc/rockchip/rockchip_max98090.c | 7 +++++--
sound/soc/sh/rcar/dma.c | 4 ++--
sound/soc/sof/debug.c | 6 ++++--
sound/soc/sof/intel/hda-stream.c | 4 ++--
sound/soc/sof/ipc.c | 4 +++-
sound/soc/sof/topology.c | 11 ++++++-----
sound/soc/stm/stm32_sai_sub.c | 12 +++++++++++-
sound/soc/ti/sdma-pcm.c | 2 +-
14 files changed, 51 insertions(+), 34 deletions(-)
2
1

Re: [alsa-devel] ❌ FAIL: Test report for kernel 5.3.9-rc1-dfe283e.cki (stable)
by Jan Stancek 07 Nov '19
by Jan Stancek 07 Nov '19
07 Nov '19
----- Original Message -----
>
> Hello,
>
> We ran automated tests on a recent commit from this kernel tree:
>
> Kernel repo:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
> Commit: dfe283e9fdac - Linux 5.3.9-rc1
>
> The results of these automated tests are provided below.
>
> Overall result: FAILED (see details below)
> Merge: OK
> Compile: OK
> Tests: FAILED
>
> All kernel binaries, config files, and logs are available for download here:
>
> https://artifacts.cki-project.org/pipelines/262380
>
> One or more kernel tests failed:
>
> x86_64:
> ❌ LTP lite
>
Not a 5.3 -stable regression.
Failure comes from test that sanity checks all /proc files by doing
1k read from each. There are couple issues it hits wrt. snd_hda_*.
Example reproducer:
dd if=/sys/kernel/debug/regmap/hdaudioC0D3-hdaudio/access of=out.txt count=1 bs=1024 iflag=nonblock
It's slow and triggers soft lockups [1]. And it also requires lot
of memory, triggering OOMs on smaller VMs:
0x0000000024f0437b-0x000000001a32b1c8 1073745920 seq_read+0x131/0x400 pages=262144 vmalloc vpages N0=262144
I'm leaning towards skipping all regmap entries in this test.
Comments are welcomed.
Regards,
Jan
[1]
[15341.137116] watchdog: BUG: soft lockup - CPU#2 stuck for 22s! [dd:636573]
[15341.144141] Modules linked in: nls_utf8 isofs dummy minix binfmt_misc nfsv3 nfs_acl nfs lockd grace fscache sctp rds brd vfat fat btrfs xor zstd_compress raid6_pq zstd_decompress loop tu
n ip6table_nat ip6_tables xt_conntrack iptable_filter xt_MASQUERADE xt_comment iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 veth bridge stp llc overlay fuse snd_hda_codec_r
ealtek snd_hda_codec_generic sunrpc ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_hda_codec edac_mce_amd kvm_amd snd_hda_core ccp snd_hwdep snd_pcm kvm snd_timer irqbypass joydev snd c
rct10dif_pclmul crc32_pclmul soundcore broadcom bcm_phy_lib ghash_clmulni_intel sp5100_tco fam15h_power k10temp tg3 wmi_bmof pcspkr i2c_piix4 acpi_cpufreq ip_tables xfs libcrc32c radeon ata
_generic i2c_algo_bit pata_acpi drm_kms_helper firewire_ohci ttm crc32c_intel serio_raw pata_atiixp firewire_core drm crc_itu_t wmi [last unloaded: can]
[15341.223635] CPU: 2 PID: 636573 Comm: dd Tainted: G L 5.3.9-rc1-dfe283e.cki #1
[15341.232073] Hardware name: AMD Pike/Pike, BIOS RPK1506A 09/03/2014
[15341.238467] RIP: 0010:regmap_readable+0x15/0x60
[15341.242996] Code: 25 28 00 00 00 75 07 48 83 c4 10 5b 5d c3 e8 92 08 a6 ff 66 90 0f 1f 44 00 00 48 83 bf b0 01 00 00 00 74 31 8b 97 48 01 00 00 <39> f2 0f 92 c0 85 d2 0f 95 c2 20 d0 75 1
d 48 83 7f 70 00 74 01 c3
[15341.261765] RSP: 0018:ffffb3b100697dc8 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13
[15341.269330] RAX: 0000000000000000 RBX: ffff8d1a63773400 RCX: 0000000000000b41
[15341.276723] RDX: 000000000fffffff RSI: 000000000f3b4139 RDI: ffff8d1a63773400
[15341.283858] RBP: 000000000f3b4139 R08: 0000000000000000 R09: 0000000000000000
[15341.290989] R10: 000000000000000f R11: ffff8d19901fffff R12: 0000000000000079
[15341.298114] R13: 000000000f3b4139 R14: 00000000ffffffff R15: 000000000000006e
[15341.305501] FS: 00007f4e067a0580(0000) GS:ffff8d1a6aa80000(0000) knlGS:0000000000000000
[15341.313583] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[15341.319322] CR2: 00007f5083682dc0 CR3: 00000001287dc000 CR4: 00000000000406e0
[15341.326462] Call Trace:
[15341.328912] regmap_volatile+0x4f/0xa0
[15341.332667] regmap_access_show+0x70/0x100
[15341.336997] seq_read+0xcd/0x400
[15341.340247] full_proxy_read+0x57/0x70
[15341.343997] vfs_read+0x9d/0x150
[15341.347231] ksys_read+0x5f/0xe0
[15341.350473] do_syscall_64+0x5f/0x1a0
[15341.354166] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[15341.359216] RIP: 0033:0x7f4e066823c2
[15341.362795] Code: c0 e9 c2 fe ff ff 50 48 8d 3d c2 0d 0a 00 e8 b5 f1 01 00 0f 1f 44 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 0f 05 <48> 3d 00 f0 ff ff 77 56 c3 0f 1f 44 00 0
0 48 83 ec 28 48 89 54 24
[15341.381852] RSP: 002b:00007ffc6ad30e88 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
[15341.389427] RAX: ffffffffffffffda RBX: 0000000000000400 RCX: 00007f4e066823c2
[15341.396568] RDX: 0000000000000400 RSI: 0000561bc69f0000 RDI: 0000000000000000
[15341.403979] RBP: 0000561bc69f0000 R08: 0000561bc69efb60 R09: 00000000000000c0
[15341.411111] R10: 0000561bc69f0000 R11: 0000000000000246 R12: ffffffffffffffff
[15341.418244] R13: 0000000000000000 R14: 0000000000000000 R15: ffffffffffffffff
4
9

07 Nov '19
The patch series adds definitions for GPIO line directions.
For occasional GPIO contributor like me it is always a pain to remember
whether 1 or 0 was used for GPIO direction INPUT/OUTPUT. Judging the
fact that I removed few comments like:
/* Return 0 if output, 1 if input */
/* This means "out" */
return 1; /* input */
return 0; /* output */
it seems at least some others may find it hard to remember too. Adding
defines for these values helps us who really have good - but short
duration - memory :]
This idea comes from RFC series for ROHM BD71828 PMIC and was initially
discussed with Linus Walleij here:
https://lore.kernel.org/lkml/c06725c3dd34118a324907137758d8b85b3d4043.camel…
but as this has no dependencies to BD71828 work (which probably takes a
while) I decided to make it independent series.
Patches are compile-tested only. I have no HW to really test them. Thus I'd
appreciate carefull review. This work is mainly about converting zeros
and ones to the new defines but it wouldn't be first time I get it
wrong.
Changelog v2:
- squashed patches 2-61 into patch 2.
- dropped patch 62 (can be applied later)
- rebased (cherry-picked) changes on top of GPIO devel branch.
Patch 1:
- adds the defines
Patch 2:
- convert drivers to use new defines
This patch series is based on GPIO tree devel branch.
---
Matti Vaittinen (2):
gpio: Add definition for GPIO direction
gpio: Use new GPIO_LINE_DIRECTION
drivers/gpio/gpio-104-dio-48e.c | 5 ++++-
drivers/gpio/gpio-104-idi-48.c | 2 +-
drivers/gpio/gpio-104-idio-16.c | 4 ++--
drivers/gpio/gpio-74xx-mmio.c | 5 ++++-
drivers/gpio/gpio-amd-fch.c | 2 +-
drivers/gpio/gpio-aspeed.c | 7 +++----
drivers/gpio/gpio-bcm-kona.c | 6 +++---
drivers/gpio/gpio-bd70528.c | 8 +++++---
drivers/gpio/gpio-bd9571mwv.c | 4 +++-
drivers/gpio/gpio-dln2.c | 6 +++---
drivers/gpio/gpio-exar.c | 5 ++++-
drivers/gpio/gpio-f7188x.c | 5 ++++-
drivers/gpio/gpio-gpio-mm.c | 5 ++++-
drivers/gpio/gpio-htc-egpio.c | 5 ++++-
drivers/gpio/gpio-ich.c | 5 ++++-
drivers/gpio/gpio-kempld.c | 5 ++++-
drivers/gpio/gpio-lp873x.c | 2 +-
drivers/gpio/gpio-lp87565.c | 5 ++++-
drivers/gpio/gpio-madera.c | 5 ++++-
drivers/gpio/gpio-max3191x.c | 2 +-
drivers/gpio/gpio-merrifield.c | 5 ++++-
drivers/gpio/gpio-mmio.c | 21 +++++++++++++++------
drivers/gpio/gpio-mockup.c | 11 +++--------
drivers/gpio/gpio-moxtet.c | 4 ++--
drivers/gpio/gpio-mvebu.c | 5 ++++-
drivers/gpio/gpio-mxs.c | 5 ++++-
drivers/gpio/gpio-omap.c | 6 ++++--
drivers/gpio/gpio-pca953x.c | 5 ++++-
drivers/gpio/gpio-pci-idio-16.c | 4 ++--
drivers/gpio/gpio-pcie-idio-24.c | 9 ++++++---
drivers/gpio/gpio-pisosr.c | 2 +-
drivers/gpio/gpio-pl061.c | 5 ++++-
drivers/gpio/gpio-raspberrypi-exp.c | 5 ++++-
drivers/gpio/gpio-rcar.c | 5 ++++-
drivers/gpio/gpio-reg.c | 3 ++-
drivers/gpio/gpio-sa1100.c | 5 ++++-
drivers/gpio/gpio-sama5d2-piobu.c | 7 ++++---
drivers/gpio/gpio-sch.c | 5 ++++-
drivers/gpio/gpio-sch311x.c | 5 ++++-
drivers/gpio/gpio-siox.c | 4 ++--
drivers/gpio/gpio-stmpe.c | 5 ++++-
drivers/gpio/gpio-tc3589x.c | 5 ++++-
drivers/gpio/gpio-tegra.c | 5 ++++-
drivers/gpio/gpio-tegra186.c | 4 ++--
drivers/gpio/gpio-thunderx.c | 5 ++++-
drivers/gpio/gpio-tpic2810.c | 2 +-
drivers/gpio/gpio-tps65086.c | 2 +-
drivers/gpio/gpio-tps65912.c | 4 ++--
drivers/gpio/gpio-tps68470.c | 6 +++---
drivers/gpio/gpio-tqmx86.c | 5 ++++-
drivers/gpio/gpio-ts4900.c | 5 ++++-
drivers/gpio/gpio-twl4030.c | 10 +++++-----
drivers/gpio/gpio-twl6040.c | 3 +--
drivers/gpio/gpio-uniphier.c | 5 ++++-
drivers/gpio/gpio-wcove.c | 7 +++++--
drivers/gpio/gpio-ws16c48.c | 5 ++++-
drivers/gpio/gpio-xgene.c | 5 ++++-
drivers/gpio/gpio-xra1403.c | 5 ++++-
drivers/gpio/gpio-xtensa.c | 4 ++--
drivers/gpio/gpio-zynq.c | 7 +++++--
include/linux/gpio/driver.h | 3 +++
61 files changed, 214 insertions(+), 102 deletions(-)
--
2.21.0
--
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND
~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =]
8
12

Re: [alsa-devel] [PATCH V2 1/2] ASoC: dt-bindings: fsl_asrc: add compatible string for imx8qm
by S.j. Wang 07 Nov '19
by S.j. Wang 07 Nov '19
07 Nov '19
Hi Rob
>
> On Wed, Oct 30, 2019 at 07:41:26PM +0800, Shengjiu Wang wrote:
> > In order to support the two asrc modules in imx8qm, we need to add
> > compatible string "fsl,imx8qm-asrc0" and "fsl,imx8qm-asrc1"
>
> Are the blocks different in some way?
>
> If not, why do you need to distinguish them?
>
The internal clock mapping is different for each module.
Or we can use one compatible string, but need add another
property "fsl,asrc-clk-map" to distinguish the different clock map.
The change is in below.
Which one do you think is better?
Required properties:
- - compatible : Contains "fsl,imx35-asrc" or "fsl,imx53-asrc".
+ - compatible : Contains "fsl,imx35-asrc", "fsl,imx53-asrc",
+ "fsl,imx8qm-asrc".
- reg : Offset and length of the register set for the device.
@@ -35,6 +36,11 @@ Required properties:
- fsl,asrc-width : Defines a mutual sample width used by DPCM Back Ends.
+ - fsl,asrc-clk-map : Defines clock map used in driver. which is required
+ by imx8qm
+ <0> - select the map for asrc0
+ <1> - select the map for asrc1
+
Optional properties:
Best regards
Wang shengjiu
1
0
From: Li Xu <li.xu(a)cirrus.com>
Expose mixer control API for reading and writing.
The exposed API can be used by codec driver for
interacting with mixer control in kernel space.
This allows codec driver to implement more involved
interactions with DSP firmware, such as Fast Use
Case Switching.
Signed-off-by: Li Xu <li.xu(a)cirrus.com>
Signed-off-by: David Rhodes <david.rhodes(a)cirrus.com>
---
sound/soc/codecs/wm_adsp.c | 70 +++++++++++++++++++++++++++++++++++++++++++++-
sound/soc/codecs/wm_adsp.h | 4 +++
2 files changed, 73 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index aa74fd1..77b8aea 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -635,6 +635,9 @@ struct wm_coeff_ctl_ops {
struct wm_coeff_ctl {
const char *name;
const char *fw_name;
+ /* Subname is needed to match with firmware */
+ const char *subname;
+ unsigned int subname_len;
struct wm_adsp_alg_region alg_region;
struct wm_coeff_ctl_ops ops;
struct wm_adsp *dsp;
@@ -1520,6 +1523,7 @@ static void wm_adsp_free_ctl_blk(struct wm_coeff_ctl *ctl)
{
kfree(ctl->cache);
kfree(ctl->name);
+ kfree(ctl->subname);
kfree(ctl);
}
@@ -1597,6 +1601,15 @@ static int wm_adsp_create_control(struct wm_adsp *dsp,
ret = -ENOMEM;
goto err_ctl;
}
+ if (subname) {
+ ctl->subname_len = subname_len;
+ ctl->subname = kmemdup(subname,
+ strlen(subname) + 1, GFP_KERNEL);
+ if (!ctl->subname) {
+ ret = -ENOMEM;
+ goto err_ctl_name;
+ }
+ }
ctl->enabled = 1;
ctl->set = 0;
ctl->ops.xget = wm_coeff_get;
@@ -1610,7 +1623,7 @@ static int wm_adsp_create_control(struct wm_adsp *dsp,
ctl->cache = kzalloc(ctl->len, GFP_KERNEL);
if (!ctl->cache) {
ret = -ENOMEM;
- goto err_ctl_name;
+ goto err_ctl_subname;
}
list_add(&ctl->list, &dsp->ctl_list);
@@ -1633,6 +1646,8 @@ static int wm_adsp_create_control(struct wm_adsp *dsp,
err_ctl_cache:
kfree(ctl->cache);
+err_ctl_subname:
+ kfree(ctl->subname);
err_ctl_name:
kfree(ctl->name);
err_ctl:
@@ -2194,6 +2209,59 @@ static int wm_adsp_load(struct wm_adsp *dsp)
return ret;
}
+/*
+ * Find wm_coeff_ctl with input name as its subname
+ * If not found, return NULL
+ */
+static struct wm_coeff_ctl *wm_adsp_get_ctl(struct wm_adsp *dsp,
+ const char *name)
+{
+ struct wm_coeff_ctl *pos, *rslt = NULL;
+
+ list_for_each_entry(pos, &dsp->ctl_list, list) {
+ if (!pos->subname)
+ continue;
+ if (strncmp(pos->subname, name, pos->subname_len) == 0) {
+ rslt = pos;
+ break;
+ }
+ }
+
+ return rslt;
+}
+
+int wm_adsp_write_ctl(struct wm_adsp *dsp, const char *name, const void *buf,
+ size_t len)
+{
+ struct wm_coeff_ctl *ctl;
+
+ ctl = wm_adsp_get_ctl(dsp, name);
+ if (!ctl)
+ return -EINVAL;
+
+ if (len > ctl->len)
+ return -EINVAL;
+
+ return wm_coeff_write_control(ctl, buf, len);
+}
+EXPORT_SYMBOL_GPL(wm_adsp_write_ctl);
+
+int wm_adsp_read_ctl(struct wm_adsp *dsp, const char *name, void *buf,
+ size_t len)
+{
+ struct wm_coeff_ctl *ctl;
+
+ ctl = wm_adsp_get_ctl(dsp, name);
+ if (!ctl)
+ return -EINVAL;
+
+ if (len > ctl->len)
+ return -EINVAL;
+
+ return wm_coeff_read_control(ctl, buf, len);
+}
+EXPORT_SYMBOL_GPL(wm_adsp_read_ctl);
+
static void wm_adsp_ctl_fixup_base(struct wm_adsp *dsp,
const struct wm_adsp_alg_region *alg_region)
{
diff --git a/sound/soc/codecs/wm_adsp.h b/sound/soc/codecs/wm_adsp.h
index 5275a49..2a8cd09 100644
--- a/sound/soc/codecs/wm_adsp.h
+++ b/sound/soc/codecs/wm_adsp.h
@@ -223,5 +223,9 @@ int wm_adsp_compr_pointer(struct snd_compr_stream *stream,
struct snd_compr_tstamp *tstamp);
int wm_adsp_compr_copy(struct snd_compr_stream *stream,
char __user *buf, size_t count);
+int wm_adsp_write_ctl(struct wm_adsp *dsp, const char *name, const void *buf,
+ size_t len);
+int wm_adsp_read_ctl(struct wm_adsp *dsp, const char *name, void *buf,
+ size_t len);
#endif
--
1.9.1
4
3

06 Nov '19
This patchset applies on top of the series "[PATCH 0/4] soundwire:
update ASoC interfaces". The SOF/Intel code makes use of the
interfaces defined for initialization.
Build support for SoundWire is not provided for now, all
Soundwire-related code will be handled with a dummy fallback. We will
enable SoundWire interfaces in the Kconfigs when the functionality is
enabled in the soundwire tree.
In short, if the interfaces are agreed on, there is no risk with the
integration of these patches on the ASoC side.
Pierre-Louis Bossart (5):
ASoC: SOF: Intel: add SoundWire configuration interface
ASoC: SOF: IPC: dai-intel: move ALH declarations in header file
ASoC: SOF: Intel: hda: add SoundWire stream config/free callbacks
ASoC: SOF: Intel: hda: initial SoundWire machine driver autodetect
ASoC: SOF: Intel: hda: disable SoundWire interrupts on suspend
include/sound/sof/dai-intel.h | 18 +--
sound/soc/sof/intel/hda-dsp.c | 2 +
sound/soc/sof/intel/hda-loader.c | 13 ++
sound/soc/sof/intel/hda.c | 230 ++++++++++++++++++++++++++++++-
sound/soc/sof/intel/hda.h | 44 ++++++
5 files changed, 295 insertions(+), 12 deletions(-)
--
2.20.1
1
6

[alsa-devel] [PATCH v2 00/19] soundwire: code hardening and suspend-resume support
by Pierre-Louis Bossart 06 Nov '19
by Pierre-Louis Bossart 06 Nov '19
06 Nov '19
this patchset applies on top of "[PATCH v2 00/14] soundwire: intel:
implement new ASoC interfaces".
It implements a series of improvements for:
a) interrupt handling on Intel platforms in MSI mode
b) race conditions on codec probe and enumeration
c) suspend-resume issues (clock-stop mode not supported for now)
d) underflow handling
e) updates to the stream state machine which did not support valid
ALSA transitions.
These patches were tested extensively on 4 different platforms and are
viewed as required for any sort of SoundWire-based product.
Changes since v1: (no feedback received since October 23)
added support for initialization_complete, integration with Realtek
codecs exposed an additional race condition between the resume
operation and restoration of settings in separate thread triggered by
Slave status change.
No other functional change
Bard Liao (3):
soundwire: intel/cadence: fix timeouts in MSI mode
soundwire: stream: only prepare stream when it is configured.
soundwire: intel: reinitialize IP+DSP in .prepare()
Pierre-Louis Bossart (16):
soundwire: fix race between driver probe and update_status callback
soundwire: bus: add PM/no-PM versions of read/write functions
soundwire: bus: write Slave Device Number without runtime_pm
soundwire: intel: add helpers for link power down and shim wake
soundwire: intel: Add basic power management support
soundwire: intel: add pm_runtime support
soundwire: intel: reset pm_runtime status during system resume
soundwire: bus: add helper to reset Slave status to UNATTACHED
soundwire: intel: call helper to reset Slave states on resume
soundwire: bus: check first if Slaves become UNATTACHED
soundwire: add enumeration_complete signaling
soundwire: bus: add initialization_complete signaling
soundwire: intel: disable pm_runtime when removing a master
soundwire: bus: disable pm_runtime in sdw_slave_delete
soundwire: stream: update state machine and add state checks
soundwire: stream: do not update parameters during DISABLED-PREPARED
transition
Documentation/driver-api/soundwire/stream.rst | 63 +++-
drivers/soundwire/bus.c | 165 +++++++--
drivers/soundwire/bus.h | 3 +
drivers/soundwire/bus_type.c | 5 +
drivers/soundwire/cadence_master.c | 17 +-
drivers/soundwire/cadence_master.h | 4 +
drivers/soundwire/intel.c | 328 ++++++++++++++++--
drivers/soundwire/intel.h | 2 +
drivers/soundwire/intel_init.c | 45 ++-
drivers/soundwire/slave.c | 4 +
drivers/soundwire/stream.c | 64 +++-
include/linux/soundwire/sdw.h | 1 +
include/linux/soundwire/sdw_intel.h | 2 +
13 files changed, 632 insertions(+), 71 deletions(-)
--
2.20.1
1
19

[alsa-devel] [PATCH v2 00/11] ASoC: Add support to WCD9340/WCD9341 codec
by Srinivas Kandagatla 06 Nov '19
by Srinivas Kandagatla 06 Nov '19
06 Nov '19
This patchset adds support to Qualcomm WCD9340/WCD9341 Codec which
is a standalone Hi-Fi audio codec IC.
This codec supports both I2S/I2C and SLIMbus audio interfaces.
On slimbus interface it supports two data lanes; 16 Tx ports
and 8 Rx ports. It has Five DACs and seven dedicated interpolators,
Multibutton headset control (MBHC), Active noise cancellation,
Sidetone paths, MAD (mic activity detection) and codec processing engine.
It supports Class-H differential earpiece out and stereo single
ended headphones out.
This codec also has integrated SoundWire controller.
Patchset for this is already sent for review at
https://patchwork.kernel.org/cover/11185769/
This patchset has been tested on SDM845 based DragonBoard DB845c and
Lenovo Yoga C630 laptop with WSA881x smart speaker amplifiers via
soundwire and 4 DMICs.
Pin Controller patch does not have any link dependency, it can go by its own.
Most of the code in this driver is rework of Qualcomm downstream drivers
used in Andriod. Credits to Banajit Goswami and Patrick Lai's Team.
If anyone is interested to try, here are working set of patches on top of rc3.
https://git.linaro.org/people/srinivas.kandagatla/linux.git/log/?h=audio/v5…
alsa ucm files:
https://git.linaro.org/people/srinivas.kandagatla/alsa-lib.git/log/?h=DB845c
Thanks,
srini
Changes since v1:
- Code cleanup and convert to proper dpcm widgets where possible.
- converted to mfd driver.
- added pinctrl driver to this series
- added dts changes in this series
- bindings converted to yaml.
Srinivas Kandagatla (10):
ASoC: dt-bindings: add dt bindings for WCD9340/WCD9341 audio codec
mfd: wcd934x: add support to wcd9340/wcd9341 codec
ASoC: wcd934x: add support to wcd9340/wcd9341 codec
ASoC: wcd934x: add basic controls
ASoC: wcd934x: add playback dapm widgets
ASoC: wcd934x: add capture dapm widgets
ASoC: wcd934x: add audio routings
dt-bindings: pinctrl: qcom-wcd934x: Add bindings for gpio
ASoC: dt-bindings: Add compatible for DB845c and Lenovo Yoga
ASoC: qcom: sdm845: add support to DB845c and Lenovo Yoga
Yeleswarapu Nagaradhesh (1):
pinctrl: qcom-wcd934x: Add support to wcd934x pinctrl driver.
.../pinctrl/qcom,wcd934x-pinctrl.yaml | 51 +
.../devicetree/bindings/sound/qcom,sdm845.txt | 5 +-
.../bindings/sound/qcom,wcd934x.yaml | 169 +
drivers/mfd/Kconfig | 8 +
drivers/mfd/Makefile | 1 +
drivers/mfd/wcd934x.c | 330 ++
drivers/pinctrl/qcom/Kconfig | 7 +
drivers/pinctrl/qcom/Makefile | 1 +
drivers/pinctrl/qcom/pinctrl-wcd934x-gpio.c | 365 ++
include/linux/mfd/wcd934x/registers.h | 529 ++
include/linux/mfd/wcd934x/wcd934x.h | 24 +
sound/soc/codecs/Kconfig | 10 +
sound/soc/codecs/Makefile | 2 +
sound/soc/codecs/wcd934x.c | 5218 +++++++++++++++++
sound/soc/qcom/sdm845.c | 71 +-
15 files changed, 6789 insertions(+), 2 deletions(-)
create mode 100644 Documentation/devicetree/bindings/pinctrl/qcom,wcd934x-pinctrl.yaml
create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd934x.yaml
create mode 100644 drivers/mfd/wcd934x.c
create mode 100644 drivers/pinctrl/qcom/pinctrl-wcd934x-gpio.c
create mode 100644 include/linux/mfd/wcd934x/registers.h
create mode 100644 include/linux/mfd/wcd934x/wcd934x.h
create mode 100644 sound/soc/codecs/wcd934x.c
--
2.21.0
4
29

[alsa-devel] [PATCH v2 00/14] soundwire: intel: implement new ASoC interfaces
by Pierre-Louis Bossart 06 Nov '19
by Pierre-Louis Bossart 06 Nov '19
06 Nov '19
This patchset applies on top of the series "[PATCH v2 0/5] soundwire:
update ASoC interfaces"
The changes are essentially a removal of the platform devices and the
implementation of the new interfaces required to scan the ACPI tables,
probe the links and start them.
The missing prepare, trigger and setup ASoC callbacks are also
implemented. The hw_params and free callbacks use the new interfaces
as well.
While there are quite a few lines of code changed, this is mostly
about interface changes. The next series will contain more functional
changes and deal with race conditions on probe, enumeration and
suspend/resume issues.
Changes since v1:
fix typo (Vinod)
removed uevent open for Master (Vinod)
clarified commit messages (Cezary)
no functionality change
Bard Liao (1):
soundwire: add device driver to sdw_md_driver
Pierre-Louis Bossart (10):
soundwire: renames to prepare support for master drivers/devices
soundwire: rename dev_to_sdw_dev macro
soundwire: rename drv_to_sdw_slave_driver macro
soundwire: bus_type: rename sdw_drv_ to sdw_slave_drv
soundwire: intel: rename res field as link_res
soundwire: add support for sdw_slave_type
soundwire: add initial definitions for sdw_master_device
soundwire: intel: remove platform devices and provide new interface
soundwire: intel: free all resources on hw_free()
soundwire: intel_init: add implementation of sdw_intel_enable_irq()
Rander Wang (3):
soundwire: intel: add prepare support in sdw dai driver
soundwire: intel: add trigger support in sdw dai driver
soundwire: intel: add sdw_stream_setup helper for .startup callback
drivers/base/regmap/regmap-sdw.c | 4 +-
drivers/soundwire/Makefile | 2 +-
drivers/soundwire/bus.c | 2 +-
drivers/soundwire/bus_type.c | 57 +++---
drivers/soundwire/intel.c | 280 ++++++++++++++++++++++-----
drivers/soundwire/intel.h | 8 +-
drivers/soundwire/intel_init.c | 300 ++++++++++++++++++++++-------
drivers/soundwire/master.c | 64 ++++++
drivers/soundwire/slave.c | 9 +-
include/linux/soundwire/sdw.h | 39 +++-
include/linux/soundwire/sdw_type.h | 34 +++-
11 files changed, 639 insertions(+), 160 deletions(-)
create mode 100644 drivers/soundwire/master.c
--
2.20.1
1
14

06 Nov '19
We need new fields in existing structures to
a) deal with race conditions on codec probe/enumeration
b) allow for multi-step ACPI scan/probe/startup on Intel plaforms
To avoid conflicts between ASoC and Soundwire trees, these 4 patches
are provided out-of-order, before the functionality enabled in these
header files is added in follow-up patch series which can be applied
separately in the ASoC and Soundwire trees (of course after Vinod and
Mark sync-up so that these patches are present in both trees).
Changes since v1 (no feedback received since October 23)
additional initialization_complete utility to help codec drivers with
their resume operation, waiting for the enumeration to complete is not
always enough.
Pierre-Louis Bossart (4):
soundwire: sdw_slave: add new fields to track probe status
soundwire: add enumeration_complete structure
soundwire: add initialization_complete definition
soundwire: intel: update interfaces between ASoC and SoundWire
Rander Wang (1):
soundwire: intel: update stream callbacks for hwparams/free stream
operations
drivers/soundwire/intel.c | 20 ++++--
drivers/soundwire/intel.h | 13 ++--
drivers/soundwire/intel_init.c | 31 +++------
include/linux/soundwire/sdw.h | 13 ++++
include/linux/soundwire/sdw_intel.h | 103 +++++++++++++++++++++++++---
5 files changed, 137 insertions(+), 43 deletions(-)
--
2.20.1
1
5

[alsa-devel] [PATCH v2 3/7] ASoC: amd: Enabling I2S instance in DMA and DAI
by Ravulapati Vishnu vardhan rao 06 Nov '19
by Ravulapati Vishnu vardhan rao 06 Nov '19
06 Nov '19
This patch adds I2S SP support in ACP PCM DMA and DAI.
Added I2S support in DMA and DAI probe,its hw_params handling
its open and close functionalities.
This enable to open and close on the SP instance for
playback and capture.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-i2s.c | 168 ++++++++++++++++++++++-----
sound/soc/amd/raven/acp3x-pcm-dma.c | 219 +++++++++++++++++++++++++++---------
sound/soc/amd/raven/acp3x.h | 74 +++++++++---
3 files changed, 360 insertions(+), 101 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
index 728e757..725e71a 100644
--- a/sound/soc/amd/raven/acp3x-i2s.c
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -30,8 +30,8 @@ static int acp3x_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
adata->tdm_mode = false;
break;
case SND_SOC_DAIFMT_DSP_A:
- adata->tdm_mode = true;
- break;
+ adata->tdm_mode = true;
+ break;
default:
return -EINVAL;
}
@@ -82,8 +82,18 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
u32 val = 0;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+ struct snd_soc_card *card = prtd->card;
+ struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card);
struct i2s_stream_instance *rtd = substream->runtime->private_data;
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
+
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_U8:
case SNDRV_PCM_FORMAT_S8:
@@ -101,12 +111,33 @@ static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
default:
return -EINVAL;
}
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | (rtd->xfer_resolution << 3);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- else
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_IRER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_IRER);
+ }
+ }
return 0;
}
@@ -117,7 +148,16 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
int ret = 0;
struct i2s_stream_instance *rtd = substream->runtime->private_data;
u32 val, period_bytes;
-
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+ struct snd_soc_card *card = prtd->card;
+ struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card);
+
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
period_bytes = frames_to_bytes(substream->runtime,
substream->runtime->period_size);
switch (cmd) {
@@ -127,33 +167,104 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
rtd->bytescount = acp_get_byte_count(rtd,
substream->stream);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- rv_writel(period_bytes, rtd->acp3x_base +
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ rv_writel(period_bytes, rtd->acp3x_base +
mmACP_BT_TX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(rtd->acp3x_base +
+ mmACP_BTTDM_ITER);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base +
+ mmACP_BTTDM_ITER);
+ rv_writel(1, rtd->acp3x_base +
+ mmACP_BTTDM_IER);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_I2S_TX_INTR_WATERMARK_SIZE);
+ val = rv_readl(rtd->acp3x_base +
+ mmACP_I2STDM_ITER);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base +
+ mmACP_I2STDM_ITER);
+ rv_writel(1, rtd->acp3x_base +
+ mmACP_I2STDM_IER);
+ }
} else {
- rv_writel(period_bytes, rtd->acp3x_base +
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ rv_writel(period_bytes, rtd->acp3x_base +
mmACP_BT_RX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = rv_readl(rtd->acp3x_base +
+ mmACP_BTTDM_IRER);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base +
+ mmACP_BTTDM_IRER);
+ rv_writel(1, rtd->acp3x_base +
+ mmACP_BTTDM_IER);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_I2S_RX_INTR_WATERMARK_SIZE);
+ val = rv_readl(rtd->acp3x_base +
+ mmACP_I2STDM_IRER);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base +
+ mmACP_I2STDM_IRER);
+ rv_writel(1, rtd->acp3x_base +
+ mmACP_I2STDM_IER);
+ }
}
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = rv_readl(rtd->acp3x_base +
+ mmACP_BTTDM_ITER);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base +
+ mmACP_BTTDM_ITER);
+ rv_writel(0, rtd->acp3x_base +
+ mmACP_BTTDM_IER);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = rv_readl(rtd->acp3x_base +
+ mmACP_I2STDM_ITER);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base +
+ mmACP_I2STDM_ITER);
+ rv_writel(0, rtd->acp3x_base +
+ mmACP_I2STDM_IER);
+ }
+
} else {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = rv_readl(rtd->acp3x_base +
+ mmACP_BTTDM_IRER);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base +
+ mmACP_BTTDM_IRER);
+ rv_writel(0, rtd->acp3x_base +
+ mmACP_BTTDM_IER);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = rv_readl(rtd->acp3x_base +
+ mmACP_I2STDM_IRER);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base +
+ mmACP_I2STDM_IRER);
+ rv_writel(0, rtd->acp3x_base +
+ mmACP_I2STDM_IER);
+ }
}
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
break;
default:
ret = -EINVAL;
@@ -208,11 +319,6 @@ static int acp3x_dai_probe(struct platform_device *pdev)
struct resource *res;
struct i2s_dev_data *adata;
- if (!pdev->dev.platform_data) {
- dev_err(&pdev->dev, "platform_data not retrieved\n");
- return -ENODEV;
- }
-
adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data),
GFP_KERNEL);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -231,6 +337,8 @@ static int acp3x_dai_probe(struct platform_device *pdev)
adata->i2s_irq = res->start;
adata->play_stream = NULL;
adata->capture_stream = NULL;
+ adata->i2ssp_play_stream = NULL;
+ adata->i2ssp_capture_stream = NULL;
dev_set_drvdata(&pdev->dev, adata);
status = devm_snd_soc_register_component(&pdev->dev,
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index f5e4c7b..58db11b 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -193,20 +193,35 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
{
u16 page_idx;
- u32 low, high, val, acp_fifo_addr;
- dma_addr_t addr = rtd->dma_addr;
+ uint64_t low, high, val, acp_fifo_addr;
+ dma_addr_t addr;
- /* 8 scratch registers used to map one 64 bit address */
- if (direction == SNDRV_PCM_STREAM_PLAYBACK)
- val = 0;
- else
- val = rtd->num_pages * 8;
+ addr = rtd->dma_addr;
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_PB_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_PB_PTE_OFFSET;
+ }
+ } else {
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ val = ACP_SRAM_BT_CP_PTE_OFFSET;
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ val = ACP_SRAM_SP_CP_PTE_OFFSET;
+ }
+ }
/* Group Enable */
rv_writel(ACP_SRAM_PTE_OFFSET | BIT(31), rtd->acp3x_base +
- mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
+ mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1);
rv_writel(PAGE_SIZE_4K_ENABLE, rtd->acp3x_base +
- mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
+ mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1);
for (page_idx = 0; page_idx < rtd->num_pages; page_idx++) {
/* Load the low address of page int ACP SRAM through SRBM */
@@ -223,38 +238,95 @@ static void config_acp3x_dma(struct i2s_stream_instance *rtd, int direction)
}
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_TX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_TX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET + (rtd->num_pages * 8)
- + PLAYBACK_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_TX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_TX_FIFOSIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ /* Config ringbuffer */
+ rv_writel(I2S_BT_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_TX_RINGBUFADDR);
+ rv_writel(MAX_BUFFER, rtd->acp3x_base +
+ mmACP_BT_TX_RINGBUFSIZE);
+ rv_writel(DMA_SIZE,
+ rtd->acp3x_base + mmACP_BT_TX_DMA_SIZE);
+
+ /* Config audio fifo */
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_PB_FIFO_ADDR_OFFSET;
+ rv_writel(acp_fifo_addr,
+ rtd->acp3x_base + mmACP_BT_TX_FIFOADDR);
+ rv_writel(FIFO_SIZE,
+ rtd->acp3x_base + mmACP_BT_TX_FIFOSIZE);
+ /* Enable watermark/period interrupt to host */
+ rv_writel(BIT(BT_TX_THRESHOLD),
+ rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
+ break;
+
+ case I2S_SP_INSTANCE:
+ default:
+ /* Config ringbuffer */
+ rv_writel(I2S_SP_TX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_TX_RINGBUFADDR);
+ rv_writel(MAX_BUFFER,
+ rtd->acp3x_base + mmACP_I2S_TX_RINGBUFSIZE);
+ rv_writel(DMA_SIZE,
+ rtd->acp3x_base + mmACP_I2S_TX_DMA_SIZE);
+
+ /* Config audio fifo */
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_PB_FIFO_ADDR_OFFSET;
+ rv_writel(acp_fifo_addr,
+ rtd->acp3x_base + mmACP_I2S_TX_FIFOADDR);
+ rv_writel(FIFO_SIZE,
+ rtd->acp3x_base + mmACP_I2S_TX_FIFOSIZE);
+ /* Enable watermark/period interrupt to host */
+ rv_writel(BIT(I2S_TX_THRESHOLD),
+ rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
+ }
} else {
- /* Config ringbuffer */
- rv_writel(MEM_WINDOW_START + MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFADDR);
- rv_writel(MAX_BUFFER, rtd->acp3x_base +
- mmACP_BT_RX_RINGBUFSIZE);
- rv_writel(DMA_SIZE, rtd->acp3x_base + mmACP_BT_RX_DMA_SIZE);
-
- /* Config audio fifo */
- acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
- (rtd->num_pages * 8) + CAPTURE_FIFO_ADDR_OFFSET;
- rv_writel(acp_fifo_addr, rtd->acp3x_base +
- mmACP_BT_RX_FIFOADDR);
- rv_writel(FIFO_SIZE, rtd->acp3x_base + mmACP_BT_RX_FIFOSIZE);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ /* Config ringbuffer */
+ rv_writel(I2S_BT_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_BT_RX_RINGBUFADDR);
+ rv_writel(MAX_BUFFER,
+ rtd->acp3x_base + mmACP_BT_RX_RINGBUFSIZE);
+ rv_writel(DMA_SIZE,
+ rtd->acp3x_base + mmACP_BT_RX_DMA_SIZE);
+
+ /* Config audio fifo */
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ BT_CAPT_FIFO_ADDR_OFFSET;
+ rv_writel(acp_fifo_addr,
+ rtd->acp3x_base + mmACP_BT_RX_FIFOADDR);
+ rv_writel(FIFO_SIZE,
+ rtd->acp3x_base + mmACP_BT_RX_FIFOSIZE);
+ /* Enable watermark/period interrupt to host */
+ rv_writel(BIT(BT_RX_THRESHOLD),
+ rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
+ break;
+
+ case I2S_SP_INSTANCE:
+ default:
+ /* Config ringbuffer */
+ rv_writel(I2S_SP_RX_MEM_WINDOW_START,
+ rtd->acp3x_base + mmACP_I2S_RX_RINGBUFADDR);
+ rv_writel(MAX_BUFFER,
+ rtd->acp3x_base + mmACP_I2S_RX_RINGBUFSIZE);
+ rv_writel(DMA_SIZE,
+ rtd->acp3x_base + mmACP_I2S_RX_DMA_SIZE);
+
+ /* Config audio fifo */
+ acp_fifo_addr = ACP_SRAM_PTE_OFFSET +
+ SP_CAPT_FIFO_ADDR_OFFSET;
+ rv_writel(acp_fifo_addr,
+ rtd->acp3x_base + mmACP_I2S_RX_FIFOADDR);
+ rv_writel(FIFO_SIZE,
+ rtd->acp3x_base + mmACP_I2S_RX_FIFOSIZE);
+ /* Enable watermark/period interrupt to host */
+ rv_writel(BIT(I2S_RX_THRESHOLD),
+ rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
+ }
}
- /* Enable watermark/period interrupt to host */
- rv_writel(BIT(BT_TX_THRESHOLD) | BIT(BT_RX_THRESHOLD),
- rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL);
}
static int acp3x_dma_open(struct snd_soc_component *component,
@@ -285,13 +357,17 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return ret;
}
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = substream;
- else
+ adata->i2ssp_play_stream = substream;
+ } else {
adata->capture_stream = substream;
+ adata->i2ssp_capture_stream = substream;
+ }
i2s_data->acp3x_base = adata->acp3x_base;
runtime->private_data = i2s_data;
@@ -304,13 +380,24 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_hw_params *params)
{
int status;
- u64 size;
- struct snd_pcm_runtime *runtime = substream->runtime;
- struct i2s_stream_instance *rtd = runtime->private_data;
+ uint64_t size;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+ struct snd_soc_card *card = prtd->card;
+ struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card);
+ struct i2s_stream_instance *rtd = substream->runtime->private_data;
if (!rtd)
return -EINVAL;
+
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ } else
+ pr_err("pinfo failed\n");
+
size = params_buffer_bytes(params);
status = snd_pcm_lib_malloc_pages(substream, size);
if (status < 0)
@@ -334,8 +421,17 @@ static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
u32 pos = 0;
u32 buffersize = 0;
u64 bytescount = 0;
- struct i2s_stream_instance *rtd =
- substream->runtime->private_data;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+ struct snd_soc_card *card = prtd->card;
+ struct acp3x_platform_info *pinfo = snd_soc_card_get_drvdata(card);
+ struct i2s_stream_instance *rtd = substream->runtime->private_data;
+
+ if (pinfo) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rtd->i2s_instance = pinfo->play_i2s_instance;
+ else
+ rtd->i2s_instance = pinfo->cap_i2s_instance;
+ }
buffersize = frames_to_bytes(substream->runtime,
substream->runtime->buffer_size);
@@ -377,15 +473,19 @@ static int acp3x_dma_close(struct snd_soc_component *component,
component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = NULL;
- else
+ adata->i2ssp_play_stream = NULL;
+ } else {
adata->capture_stream = NULL;
+ adata->i2ssp_capture_stream = NULL;
+ }
/* Disable ACP irq, when the current stream is being closed and
* another stream is also not active.
*/
- if (!adata->play_stream && !adata->capture_stream)
+ if (!adata->play_stream && !adata->capture_stream &&
+ !adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
kfree(rtd);
return 0;
@@ -437,6 +537,8 @@ static int acp3x_audio_probe(struct platform_device *pdev)
adata->i2s_irq = res->start;
adata->play_stream = NULL;
adata->capture_stream = NULL;
+ adata->i2ssp_play_stream = NULL;
+ adata->i2ssp_capture_stream = NULL;
dev_set_drvdata(&pdev->dev, adata);
/* Initialize ACP */
@@ -501,13 +603,16 @@ static int acp3x_resume(struct device *dev)
adata->play_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_PLAYBACK);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_ITER);
+ rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_TXFRMT);
+ mmACP_BTTDM_TXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_ITER);
+ mmACP_BTTDM_ITER);
}
}
@@ -516,13 +621,17 @@ static int acp3x_resume(struct device *dev)
adata->capture_stream->runtime->private_data;
config_acp3x_dma(rtd, SNDRV_PCM_STREAM_CAPTURE);
rv_writel((rtd->xfer_resolution << 3),
- rtd->acp3x_base + mmACP_BTTDM_IRER);
+ rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ rv_writel(val, rtd->acp3x_base + mmACP_I2STDM_ITER);
+
if (adata->tdm_mode == true) {
rv_writel(adata->tdm_fmt, adata->acp3x_base +
- mmACP_BTTDM_RXFRMT);
+ mmACP_BTTDM_RXFRMT);
val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
rv_writel((val | 0x2), adata->acp3x_base +
- mmACP_BTTDM_IRER);
+ mmACP_BTTDM_IRER);
}
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 72c1a23..c071477 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,6 +7,9 @@
#include "chip_offset_byte.h"
+#define I2S_SP_INSTANCE 0x01
+#define I2S_BT_INSTANCE 0x02
+
#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
@@ -17,8 +20,11 @@
#define ACP3x_BT_TDM_REG_START 0x1242800
#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
+#define I2S_RX_THRESHOLD 27
+#define I2S_TX_THRESHOLD 28
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
+#define ACP_ERR_INTR_MASK 29
#define ACP3x_POWER_ON 0x00
#define ACP3x_POWER_ON_IN_PROGRESS 0x01
#define ACP3x_POWER_OFF 0x02
@@ -26,19 +32,28 @@
#define ACP3x_SOFT_RESET__SoftResetAudDone_MASK 0x00010001
#define ACP_SRAM_PTE_OFFSET 0x02050000
+#define ACP_SRAM_SP_PB_PTE_OFFSET 0x0
+#define ACP_SRAM_SP_CP_PTE_OFFSET 0x100
+#define ACP_SRAM_BT_PB_PTE_OFFSET 0x200
+#define ACP_SRAM_BT_CP_PTE_OFFSET 0x300
#define PAGE_SIZE_4K_ENABLE 0x2
-#define MEM_WINDOW_START 0x4000000
-#define PLAYBACK_FIFO_ADDR_OFFSET 0x400
-#define CAPTURE_FIFO_ADDR_OFFSET 0x500
+#define I2S_SP_TX_MEM_WINDOW_START 0x4000000
+#define I2S_SP_RX_MEM_WINDOW_START 0x4020000
+#define I2S_BT_TX_MEM_WINDOW_START 0x4040000
+#define I2S_BT_RX_MEM_WINDOW_START 0x4060000
+#define SP_PB_FIFO_ADDR_OFFSET 0x500
+#define SP_CAPT_FIFO_ADDR_OFFSET 0x700
+#define BT_PB_FIFO_ADDR_OFFSET 0x900
+#define BT_CAPT_FIFO_ADDR_OFFSET 0xB00
#define PLAYBACK_MIN_NUM_PERIODS 2
#define PLAYBACK_MAX_NUM_PERIODS 8
-#define PLAYBACK_MAX_PERIOD_SIZE 16384
-#define PLAYBACK_MIN_PERIOD_SIZE 4096
+#define PLAYBACK_MAX_PERIOD_SIZE 8192
+#define PLAYBACK_MIN_PERIOD_SIZE 1024
#define CAPTURE_MIN_NUM_PERIODS 2
#define CAPTURE_MAX_NUM_PERIODS 8
-#define CAPTURE_MAX_PERIOD_SIZE 16384
-#define CAPTURE_MIN_PERIOD_SIZE 4096
+#define CAPTURE_MAX_PERIOD_SIZE 8192
+#define CAPTURE_MIN_PERIOD_SIZE 1024
#define MAX_BUFFER (PLAYBACK_MAX_PERIOD_SIZE * PLAYBACK_MAX_NUM_PERIODS)
#define MIN_BUFFER MAX_BUFFER
@@ -64,14 +79,20 @@ struct i2s_dev_data {
void __iomem *acp3x_base;
struct snd_pcm_substream *play_stream;
struct snd_pcm_substream *capture_stream;
+ struct snd_pcm_substream *i2ssp_play_stream;
+ struct snd_pcm_substream *i2ssp_capture_stream;
};
struct i2s_stream_instance {
u16 num_pages;
+ u16 i2s_instance;
+ u16 capture_channel;
+ u16 direction;
u16 channels;
u32 xfer_resolution;
- u64 bytescount;
+ u32 val;
dma_addr_t dma_addr;
+ u64 bytescount;
void __iomem *acp3x_base;
};
@@ -91,15 +112,36 @@ static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
u64 byte_count;
if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_TX_LINEARPOSITIONCNTR_LOW);
+ }
+
} else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ switch (rtd->i2s_instance) {
+ case I2S_BT_INSTANCE:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ break;
+ case I2S_SP_INSTANCE:
+ default:
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_I2S_RX_LINEARPOSITIONCNTR_LOW);
+ }
}
return byte_count;
}
--
2.7.4
3
2

[alsa-devel] [PATCH] ALSA: timer: Fix incorrectly assigned timer instance
by Takashi Iwai 06 Nov '19
by Takashi Iwai 06 Nov '19
06 Nov '19
The clean up commit 41672c0c24a6 ("ALSA: timer: Simplify error path in
snd_timer_open()") unified the error handling code paths with the
standard goto, but it introduced a subtle bug: the timer instance is
stored in snd_timer_open() incorrectly even if it returns an error.
This may eventually lead to UAF, as spotted by fuzzer.
The culprit is the snd_timer_open() code checks the
SNDRV_TIMER_IFLG_EXCLUSIVE flag with the common variable timeri.
This variable is supposed to be the newly created instance, but we
(ab-)used it for a temporary check before the actual creation of a
timer instance. After that point, there is another check for the max
number of instances, and it bails out if over the threshold. Before
the refactoring above, it worked fine because the code returned
directly from that point. After the refactoring, however, it jumps to
the unified error path that stores the timeri variable in return --
even if it returns an error. Unfortunately this stored value is kept
in the caller side (snd_timer_user_tselect()) in tu->timeri. This
causes inconsistency later, as if the timer was successfully
assigned.
In this patch, we fix it by not re-using timeri variable but a
temporary variable for testing the exclusive connection, so timeri
remains NULL at that point.
Fixes: 41672c0c24a6 ("ALSA: timer: Simplify error path in snd_timer_open()")
Reported-and-tested-by: Tristan Madani <tristmd(a)gmail.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
---
sound/core/timer.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 6b724d2ee2de..59ae21b0bb93 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -284,11 +284,11 @@ int snd_timer_open(struct snd_timer_instance **ti,
goto unlock;
}
if (!list_empty(&timer->open_list_head)) {
- timeri = list_entry(timer->open_list_head.next,
+ struct snd_timer_instance *t =
+ list_entry(timer->open_list_head.next,
struct snd_timer_instance, open_list);
- if (timeri->flags & SNDRV_TIMER_IFLG_EXCLUSIVE) {
+ if (t->flags & SNDRV_TIMER_IFLG_EXCLUSIVE) {
err = -EBUSY;
- timeri = NULL;
goto unlock;
}
}
--
2.16.4
1
0

[alsa-devel] [RESEND PATCH v2 7/7] ASoC: amd: Added ACP3x system resume and runtime pm ops
by Ravulapati Vishnu vardhan rao 06 Nov '19
by Ravulapati Vishnu vardhan rao 06 Nov '19
06 Nov '19
When system wide suspend happens, ACP will be powered off
and when system resumes,for audio usecase to continue,
all the runtime configuration data needs to be programmed again.
Added resume pm call back to ACP pm ops and
also Added runtime PM operations for ACP3x PCM platform device.
Device will enter into D3 state when there is no activity
on audio I2S lines.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/pci-acp3x.c | 47 ++++++++++++++++++++++++++++++++++++++++-
1 file changed, 46 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index 7727c9d..d567585 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -9,6 +9,9 @@
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
+#include <linux/pm_runtime.h>
+#include <linux/delay.h>
+#include <sound/pcm.h>
#include "acp3x.h"
@@ -247,6 +250,11 @@ static int snd_acp3x_probe(struct pci_dev *pci,
}
break;
}
+ pm_runtime_set_autosuspend_delay(&pci->dev, 10000);
+ pm_runtime_use_autosuspend(&pci->dev);
+ pm_runtime_set_active(&pci->dev);
+ pm_runtime_put_noidle(&pci->dev);
+ pm_runtime_enable(&pci->dev);
return 0;
unmap_mmio:
@@ -268,6 +276,39 @@ static int snd_acp3x_probe(struct pci_dev *pci,
return ret;
}
+static int snd_acp3x_suspend(struct device *dev)
+{
+ int status;
+ struct acp3x_dev_data *adata = dev_get_drvdata(dev);
+
+ status = acp3x_deinit(adata->acp3x_base);
+ if (status)
+ dev_err(dev, "ACP de-init failed\n");
+ else
+ dev_info(dev, "ACP de-initialized\n");
+
+ return 0;
+}
+static int snd_acp3x_resume(struct device *dev)
+{
+ int status;
+ struct acp3x_dev_data *adata = dev_get_drvdata(dev);
+
+ status = acp3x_init(adata->acp3x_base);
+ if (status) {
+ dev_err(dev, "ACP init failed\n");
+ return status;
+ }
+
+ return 0;
+}
+
+static const struct dev_pm_ops acp3x_pm = {
+ .runtime_suspend = snd_acp3x_suspend,
+ .runtime_resume = snd_acp3x_resume,
+ .resume = snd_acp3x_resume,
+};
+
static void snd_acp3x_remove(struct pci_dev *pci)
{
int i, ret;
@@ -283,7 +324,8 @@ static void snd_acp3x_remove(struct pci_dev *pci)
else
dev_info(&pci->dev, "ACP de-initialized\n");
iounmap(adata->acp3x_base);
-
+ pm_runtime_disable(&pci->dev);
+ pm_runtime_get_noresume(&pci->dev);
pci_disable_msi(pci);
pci_release_regions(pci);
pci_disable_device(pci);
@@ -302,6 +344,9 @@ static struct pci_driver acp3x_driver = {
.id_table = snd_acp3x_ids,
.probe = snd_acp3x_probe,
.remove = snd_acp3x_remove,
+ .driver = {
+ .pm = &acp3x_pm,
+ }
};
module_pci_driver(acp3x_driver);
--
2.7.4
2
1

[alsa-devel] [PATCH v2 6/7] ASoC: amd: ACP powergating to be done by controller
by Ravulapati Vishnu vardhan rao 06 Nov '19
by Ravulapati Vishnu vardhan rao 06 Nov '19
06 Nov '19
ACP power gating should be done by ACP-PCI.previous it was
handled in DMA driver which is not authorised to do.Moving
it to ACP-PCI.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 141 +-----------------------------------
sound/soc/amd/raven/acp3x.h | 7 ++
sound/soc/amd/raven/pci-acp3x.c | 130 ++++++++++++++++++++++++++++++++-
3 files changed, 138 insertions(+), 140 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 689e234..f77f5bc 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -58,106 +58,6 @@ static const struct snd_pcm_hardware acp3x_pcm_hardware_capture = {
.periods_max = CAPTURE_MAX_NUM_PERIODS,
};
-static int acp3x_power_on(void __iomem *acp3x_base, bool on)
-{
- u16 val, mask;
- u32 timeout;
-
- if (on == true) {
- val = 1;
- mask = ACP3x_POWER_ON;
- } else {
- val = 0;
- mask = ACP3x_POWER_OFF;
- }
-
- rv_writel(val, acp3x_base + mmACP_PGFSM_CONTROL);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
- if ((val & ACP3x_POWER_OFF_IN_PROGRESS) == mask)
- break;
- if (timeout > 100) {
- pr_err("ACP3x power state change failure\n");
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_reset(void __iomem *acp3x_base)
-{
- u32 val, timeout;
-
- rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
- timeout > 100) {
- if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
-
- rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
- timeout = 0;
- while (true) {
- val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
- if (!val || timeout > 100) {
- if (!val)
- break;
- return -ENODEV;
- }
- timeout++;
- cpu_relax();
- }
- return 0;
-}
-
-static int acp3x_init(void __iomem *acp3x_base)
-{
- int ret;
-
- /* power on */
- ret = acp3x_power_on(acp3x_base, true);
- if (ret) {
- pr_err("ACP3x power on failed\n");
- return ret;
- }
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- return 0;
-}
-
-static int acp3x_deinit(void __iomem *acp3x_base)
-{
- int ret;
-
- /* Reset */
- ret = acp3x_reset(acp3x_base);
- if (ret) {
- pr_err("ACP3x reset failed\n");
- return ret;
- }
- /* power off */
- ret = acp3x_power_on(acp3x_base, false);
- if (ret) {
- pr_err("ACP3x power off failed\n");
- return ret;
- }
- return 0;
-}
-
static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
{
u16 play_flag, cap_flag;
@@ -555,63 +455,37 @@ static int acp3x_audio_probe(struct platform_device *pdev)
adata->i2ssp_capture_stream = NULL;
dev_set_drvdata(&pdev->dev, adata);
- /* Initialize ACP */
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
NULL, 0);
if (status) {
dev_err(&pdev->dev, "Fail to register acp i2s component\n");
- goto dev_err;
+ return -ENODEV;
}
status = devm_request_irq(&pdev->dev, adata->i2s_irq, i2s_irq_handler,
irqflags, "ACP3x_I2S_IRQ", adata);
if (status) {
dev_err(&pdev->dev, "ACP3x I2S IRQ request failed\n");
- goto dev_err;
+ return -ENODEV;
}
pm_runtime_set_autosuspend_delay(&pdev->dev, 10000);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_enable(&pdev->dev);
return 0;
-dev_err:
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_info(&pdev->dev, "ACP de-initialized\n");
- /*ignore device status and return driver probe error*/
- return -ENODEV;
}
static int acp3x_audio_remove(struct platform_device *pdev)
{
- int ret;
- struct i2s_dev_data *adata = dev_get_drvdata(&pdev->dev);
-
- ret = acp3x_deinit(adata->acp3x_base);
- if (ret)
- dev_err(&pdev->dev, "ACP de-init failed\n");
- else
- dev_info(&pdev->dev, "ACP de-initialized\n");
-
pm_runtime_disable(&pdev->dev);
return 0;
}
static int acp3x_resume(struct device *dev)
{
- int status;
u32 val;
struct i2s_dev_data *adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
-
if (adata->play_stream && adata->play_stream->runtime) {
struct i2s_stream_instance *rtd =
adata->play_stream->runtime->private_data;
@@ -656,15 +530,8 @@ static int acp3x_resume(struct device *dev)
static int acp3x_pcm_runtime_suspend(struct device *dev)
{
- int status;
struct i2s_dev_data *adata = dev_get_drvdata(dev);
- status = acp3x_deinit(adata->acp3x_base);
- if (status)
- dev_err(dev, "ACP de-init failed\n");
- else
- dev_info(dev, "ACP de-initialized\n");
-
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
@@ -672,12 +539,8 @@ static int acp3x_pcm_runtime_suspend(struct device *dev)
static int acp3x_pcm_runtime_resume(struct device *dev)
{
- int status;
struct i2s_dev_data *adata = dev_get_drvdata(dev);
- status = acp3x_init(adata->acp3x_base);
- if (status)
- return -ENODEV;
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
return 0;
}
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 01b283a..cf16ceb 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -65,6 +65,13 @@
#define SLOT_WIDTH_16 0x10
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+#define ACP_PGFSM_CNTL_POWER_ON_MASK 0x01
+#define ACP_PGFSM_CNTL_POWER_OFF_MASK 0x00
+#define ACP_PGFSM_STATUS_MASK 0x03
+#define ACP_POWERED_ON 0x00
+#define ACP_POWER_ON_IN_PROGRESS 0x01
+#define ACP_POWERED_OFF 0x02
+#define ACP_POWER_OFF_IN_PROGRESS 0x03
struct acp3x_platform_info {
u16 play_i2s_instance;
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index ec3ef625..7727c9d 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -19,6 +19,120 @@ struct acp3x_dev_data {
struct platform_device *pdev[ACP3x_DEVS];
};
+static int acp3x_power_on(void __iomem *acp3x_base)
+{
+ u32 val;
+ u32 timeout = 0;
+ int ret = 0;
+
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+
+ if (val == 0)
+ return val;
+
+ if (!((val & ACP_PGFSM_STATUS_MASK) ==
+ ACP_POWER_ON_IN_PROGRESS))
+ rv_writel(ACP_PGFSM_CNTL_POWER_ON_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ while (++timeout < 500) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if (!val)
+ break;
+ udelay(1);
+ if (timeout > 500) {
+ pr_err("ACP is Not Powered ON\n");
+ return -ETIMEDOUT;
+ }
+ }
+}
+
+static int acp3x_power_off(void __iomem *acp3x_base)
+{
+ u32 val;
+ u32 timeout = 0;
+
+ rv_writel(ACP_PGFSM_CNTL_POWER_OFF_MASK,
+ acp3x_base + mmACP_PGFSM_CONTROL);
+ while (++timeout < 500) {
+ val = rv_readl(acp3x_base + mmACP_PGFSM_STATUS);
+ if ((val & ACP_PGFSM_STATUS_MASK) == ACP_POWERED_OFF)
+ return 0;
+ udelay(1);
+ if (timeout > 500) {
+ pr_err("ACP is Not Powered OFF\n");
+ return -ETIMEDOUT;
+ }
+ }
+}
+
+
+static int acp3x_reset(void __iomem *acp3x_base)
+{
+ u32 val, timeout;
+
+ rv_writel(1, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout < 100) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if ((val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK) ||
+ timeout > 100) {
+ if (val & ACP3x_SOFT_RESET__SoftResetAudDone_MASK)
+ break;
+ return -ENODEV;
+ }
+ cpu_relax();
+ }
+ rv_writel(0, acp3x_base + mmACP_SOFT_RESET);
+ timeout = 0;
+ while (++timeout < 100) {
+ val = rv_readl(acp3x_base + mmACP_SOFT_RESET);
+ if (!val)
+ break;
+ if (timeout > 100)
+ return -ENODEV;
+ cpu_relax();
+ }
+ return 0;
+}
+
+static int acp3x_init(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* power on */
+ ret = acp3x_power_on(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power on failed\n");
+ return ret;
+ }
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ return 0;
+}
+
+static int acp3x_deinit(void __iomem *acp3x_base)
+{
+ int ret;
+
+ /* Reset */
+ ret = acp3x_reset(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x reset failed\n");
+ return ret;
+ }
+ /* power off */
+ ret = acp3x_power_off(acp3x_base);
+ if (ret) {
+ pr_err("ACP3x power off failed\n");
+ return ret;
+ }
+ return 0;
+}
+
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
@@ -63,6 +177,10 @@ static int snd_acp3x_probe(struct pci_dev *pci,
}
pci_set_master(pci);
pci_set_drvdata(pci, adata);
+ ret = acp3x_init(adata->acp3x_base);
+ if (ret)
+ return -ENODEV;
+
val = rv_readl(adata->acp3x_base + mmACP_I2S_PIN_CONFIG);
switch (val) {
@@ -132,6 +250,11 @@ static int snd_acp3x_probe(struct pci_dev *pci,
return 0;
unmap_mmio:
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_info(&pci->dev, "ACP de-initialized\n");
pci_disable_msi(pci);
for (i = 0 ; i < ACP3x_DEVS ; i++)
platform_device_unregister(adata->pdev[i]);
@@ -147,13 +270,18 @@ static int snd_acp3x_probe(struct pci_dev *pci,
static void snd_acp3x_remove(struct pci_dev *pci)
{
- int i;
+ int i, ret;
struct acp3x_dev_data *adata = pci_get_drvdata(pci);
if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
for (i = 0 ; i < ACP3x_DEVS ; i++)
platform_device_unregister(adata->pdev[i]);
}
+ ret = acp3x_deinit(adata->acp3x_base);
+ if (ret)
+ dev_err(&pci->dev, "ACP de-init failed\n");
+ else
+ dev_info(&pci->dev, "ACP de-initialized\n");
iounmap(adata->acp3x_base);
pci_disable_msi(pci);
--
2.7.4
2
1

[alsa-devel] [RESEND PATCH v2 2/7] ASoC: amd: Refactoring of DAI from DMA driver
by Ravulapati Vishnu vardhan rao 06 Nov '19
by Ravulapati Vishnu vardhan rao 06 Nov '19
06 Nov '19
Asoc: PCM DMA driver should only have dma ops.
So Removed all DAI related functionality.
Refactoring the PCM DMA diver code.
Added new file containing only DAI ops.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/Makefile | 2 +
sound/soc/amd/raven/acp3x-i2s.c | 268 ++++++++++++++++++++++++++++++++++++
sound/soc/amd/raven/acp3x-pcm-dma.c | 232 ++-----------------------------
sound/soc/amd/raven/acp3x.h | 42 ++++++
4 files changed, 326 insertions(+), 218 deletions(-)
create mode 100644 sound/soc/amd/raven/acp3x-i2s.c
diff --git a/sound/soc/amd/raven/Makefile b/sound/soc/amd/raven/Makefile
index 108d1ac..8eef292 100644
--- a/sound/soc/amd/raven/Makefile
+++ b/sound/soc/amd/raven/Makefile
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: GPL-2.0+
# Raven Ridge platform Support
snd-pci-acp3x-objs := pci-acp3x.o
+snd-acp3x-i2s-objs := acp3x-i2s.o
snd-acp3x-pcm-dma-objs := acp3x-pcm-dma.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-pci-acp3x.o
+obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-i2s.o
obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-pcm-dma.o
diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven/acp3x-i2s.c
new file mode 100644
index 0000000..728e757
--- /dev/null
+++ b/sound/soc/amd/raven/acp3x-i2s.c
@@ -0,0 +1,268 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// AMD ALSA SoC PCM Driver
+//
+//Copyright 2016 Advanced Micro Devices, Inc.
+
+#include <linux/platform_device.h>
+#include <linux/module.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/pm_runtime.h>
+#include <sound/pcm.h>
+#include <sound/pcm_params.h>
+#include <sound/soc.h>
+#include <sound/soc-dai.h>
+#include <linux/dma-mapping.h>
+
+#include "acp3x.h"
+
+#define DRV_NAME "acp3x-i2s"
+
+static int acp3x_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
+{
+
+ struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
+
+ case SND_SOC_DAIFMT_I2S:
+ adata->tdm_mode = false;
+ break;
+ case SND_SOC_DAIFMT_DSP_A:
+ adata->tdm_mode = true;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int acp3x_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
+ u32 rx_mask, int slots, int slot_width)
+{
+ u32 val = 0;
+ u16 slot_len;
+
+ struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
+
+ switch (slot_width) {
+ case SLOT_WIDTH_8:
+ slot_len = 8;
+ break;
+ case SLOT_WIDTH_16:
+ slot_len = 16;
+ break;
+ case SLOT_WIDTH_24:
+ slot_len = 24;
+ break;
+ case SLOT_WIDTH_32:
+ slot_len = 0;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
+ rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
+ val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
+ rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
+
+ val = (FRM_LEN | (slots << 15) | (slot_len << 18));
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
+ rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
+
+ adata->tdm_fmt = val;
+ return 0;
+}
+
+static int acp3x_i2s_hwparams(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ struct snd_soc_dai *dai)
+{
+ u32 val = 0;
+ struct i2s_stream_instance *rtd = substream->runtime->private_data;
+
+ switch (params_format(params)) {
+ case SNDRV_PCM_FORMAT_U8:
+ case SNDRV_PCM_FORMAT_S8:
+ rtd->xfer_resolution = 0x0;
+ break;
+ case SNDRV_PCM_FORMAT_S16_LE:
+ rtd->xfer_resolution = 0x02;
+ break;
+ case SNDRV_PCM_FORMAT_S24_LE:
+ rtd->xfer_resolution = 0x04;
+ break;
+ case SNDRV_PCM_FORMAT_S32_LE:
+ rtd->xfer_resolution = 0x05;
+ break;
+ default:
+ return -EINVAL;
+ }
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = val | (rtd->xfer_resolution << 3);
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ else
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+
+ return 0;
+}
+
+static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
+ int cmd, struct snd_soc_dai *dai)
+{
+ int ret = 0;
+ struct i2s_stream_instance *rtd = substream->runtime->private_data;
+ u32 val, period_bytes;
+
+ period_bytes = frames_to_bytes(substream->runtime,
+ substream->runtime->period_size);
+ switch (cmd) {
+ case SNDRV_PCM_TRIGGER_START:
+ case SNDRV_PCM_TRIGGER_RESUME:
+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+ rtd->bytescount = acp_get_byte_count(rtd,
+ substream->stream);
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_TX_INTR_WATERMARK_SIZE);
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ } else {
+ rv_writel(period_bytes, rtd->acp3x_base +
+ mmACP_BT_RX_INTR_WATERMARK_SIZE);
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = val | BIT(0);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ }
+ rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ case SNDRV_PCM_TRIGGER_STOP:
+ case SNDRV_PCM_TRIGGER_SUSPEND:
+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
+ } else {
+ val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
+ val = val & ~BIT(0);
+ rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
+ }
+ rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
+ break;
+ default:
+ ret = -EINVAL;
+ break;
+ }
+
+ return ret;
+}
+
+static struct snd_soc_dai_ops acp3x_i2s_dai_ops = {
+ .hw_params = acp3x_i2s_hwparams,
+ .trigger = acp3x_i2s_trigger,
+ .set_fmt = acp3x_i2s_set_fmt,
+ .set_tdm_slot = acp3x_i2s_set_tdm_slot,
+};
+
+static const struct snd_soc_component_driver acp3x_dai_component = {
+ .name = "acp3x-i2s",
+};
+
+static struct snd_soc_dai_driver acp3x_i2s_dai = {
+ .playback = {
+ .rates = SNDRV_PCM_RATE_8000_96000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 8,
+
+ .rate_min = 8000,
+ .rate_max = 96000,
+ },
+ .capture = {
+ .rates = SNDRV_PCM_RATE_8000_48000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
+ SNDRV_PCM_FMTBIT_U8 |
+ SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
+ .channels_min = 2,
+ .channels_max = 2,
+ .rate_min = 8000,
+ .rate_max = 48000,
+ },
+ .ops = &acp3x_i2s_dai_ops,
+};
+
+
+static int acp3x_dai_probe(struct platform_device *pdev)
+{
+ int status;
+ struct resource *res;
+ struct i2s_dev_data *adata;
+
+ if (!pdev->dev.platform_data) {
+ dev_err(&pdev->dev, "platform_data not retrieved\n");
+ return -ENODEV;
+ }
+
+ adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data),
+ GFP_KERNEL);
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
+ return -ENODEV;
+ }
+
+ adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
+ resource_size(res));
+ if (IS_ERR(adata->acp3x_base))
+ return PTR_ERR(adata->acp3x_base);
+
+
+
+ adata->i2s_irq = res->start;
+ adata->play_stream = NULL;
+ adata->capture_stream = NULL;
+
+ dev_set_drvdata(&pdev->dev, adata);
+ status = devm_snd_soc_register_component(&pdev->dev,
+ &acp3x_dai_component,
+ &acp3x_i2s_dai, 1);
+ if (status) {
+ dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ return -ENODEV;
+ }
+
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 10000);
+ pm_runtime_use_autosuspend(&pdev->dev);
+ pm_runtime_enable(&pdev->dev);
+ return 0;
+}
+
+static int acp3x_dai_remove(struct platform_device *pdev)
+{
+ pm_runtime_disable(&pdev->dev);
+ return 0;
+}
+static struct platform_driver acp3x_dai_driver = {
+ .probe = acp3x_dai_probe,
+ .remove = acp3x_dai_remove,
+ .driver = {
+ .name = "acp3x_i2s_playcap",
+ },
+};
+
+module_platform_driver(acp3x_dai_driver);
+
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
+MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:" DRV_NAME);
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 60709e3..f5e4c7b 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -18,24 +18,6 @@
#define DRV_NAME "acp3x-i2s-audio"
-struct i2s_dev_data {
- bool tdm_mode;
- unsigned int i2s_irq;
- u32 tdm_fmt;
- void __iomem *acp3x_base;
- struct snd_pcm_substream *play_stream;
- struct snd_pcm_substream *capture_stream;
-};
-
-struct i2s_stream_instance {
- u16 num_pages;
- u16 channels;
- u32 xfer_resolution;
- u64 bytescount;
- dma_addr_t dma_addr;
- void __iomem *acp3x_base;
-};
-
static const struct snd_pcm_hardware acp3x_pcm_hardware_playback = {
.info = SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -279,7 +261,11 @@ static int acp3x_dma_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
int ret = 0;
+
struct snd_pcm_runtime *runtime = substream->runtime;
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
+
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
struct i2s_stream_instance *i2s_data = kzalloc(sizeof(struct i2s_stream_instance),
GFP_KERNEL);
@@ -312,23 +298,6 @@ static int acp3x_dma_open(struct snd_soc_component *component,
return 0;
}
-static u64 acp_get_byte_count(struct i2s_stream_instance *rtd, int direction)
-{
- u64 byte_count;
-
- if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
- } else {
- byte_count = rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
- byte_count |= rv_readl(rtd->acp3x_base +
- mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
- }
- return byte_count;
-}
static int acp3x_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
@@ -380,6 +349,7 @@ static snd_pcm_uframes_t acp3x_dma_pointer(struct snd_soc_component *component,
static int acp3x_dma_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd)
{
+ component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
struct device *parent = component->dev->parent;
snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_DEV,
parent, MIN_BUFFER, MAX_BUFFER);
@@ -402,7 +372,9 @@ static int acp3x_dma_mmap(struct snd_soc_component *component,
static int acp3x_dma_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
+ struct snd_soc_pcm_runtime *prtd = substream->private_data;
struct i2s_stream_instance *rtd = substream->runtime->private_data;
+ component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
@@ -419,182 +391,6 @@ static int acp3x_dma_close(struct snd_soc_component *component,
return 0;
}
-static int acp3x_dai_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
-{
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
- case SND_SOC_DAIFMT_I2S:
- adata->tdm_mode = false;
- break;
- case SND_SOC_DAIFMT_DSP_A:
- adata->tdm_mode = true;
- break;
- default:
- return -EINVAL;
- }
-
- return 0;
-}
-
-static int acp3x_dai_set_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
- u32 rx_mask, int slots, int slot_width)
-{
- u32 val = 0;
- u16 slot_len;
-
- struct i2s_dev_data *adata = snd_soc_dai_get_drvdata(cpu_dai);
-
- switch (slot_width) {
- case SLOT_WIDTH_8:
- slot_len = 8;
- break;
- case SLOT_WIDTH_16:
- slot_len = 16;
- break;
- case SLOT_WIDTH_24:
- slot_len = 24;
- break;
- case SLOT_WIDTH_32:
- slot_len = 0;
- break;
- default:
- return -EINVAL;
- }
-
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_ITER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_ITER);
- val = rv_readl(adata->acp3x_base + mmACP_BTTDM_IRER);
- rv_writel((val | 0x2), adata->acp3x_base + mmACP_BTTDM_IRER);
-
- val = (FRM_LEN | (slots << 15) | (slot_len << 18));
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_TXFRMT);
- rv_writel(val, adata->acp3x_base + mmACP_BTTDM_RXFRMT);
-
- adata->tdm_fmt = val;
- return 0;
-}
-
-static int acp3x_dai_i2s_hwparams(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *params,
- struct snd_soc_dai *dai)
-{
- u32 val = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
-
- switch (params_format(params)) {
- case SNDRV_PCM_FORMAT_U8:
- case SNDRV_PCM_FORMAT_S8:
- rtd->xfer_resolution = 0x0;
- break;
- case SNDRV_PCM_FORMAT_S16_LE:
- rtd->xfer_resolution = 0x02;
- break;
- case SNDRV_PCM_FORMAT_S24_LE:
- rtd->xfer_resolution = 0x04;
- break;
- case SNDRV_PCM_FORMAT_S32_LE:
- rtd->xfer_resolution = 0x05;
- break;
- default:
- return -EINVAL;
- }
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | (rtd->xfer_resolution << 3);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- else
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
-
- return 0;
-}
-
-static int acp3x_dai_i2s_trigger(struct snd_pcm_substream *substream,
- int cmd, struct snd_soc_dai *dai)
-{
- int ret = 0;
- struct i2s_stream_instance *rtd = substream->runtime->private_data;
- u32 val, period_bytes;
-
- period_bytes = frames_to_bytes(substream->runtime,
- substream->runtime->period_size);
- switch (cmd) {
- case SNDRV_PCM_TRIGGER_START:
- case SNDRV_PCM_TRIGGER_RESUME:
- case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
- rtd->bytescount = acp_get_byte_count(rtd, substream->stream);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_TX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- rv_writel(period_bytes, rtd->acp3x_base +
- mmACP_BT_RX_INTR_WATERMARK_SIZE);
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val | BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(1, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- case SNDRV_PCM_TRIGGER_STOP:
- case SNDRV_PCM_TRIGGER_SUSPEND:
- case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_ITER);
- } else {
- val = rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER);
- val = val & ~BIT(0);
- rv_writel(val, rtd->acp3x_base + mmACP_BTTDM_IRER);
- }
- rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
- break;
- default:
- ret = -EINVAL;
- break;
- }
-
- return ret;
-}
-
-static struct snd_soc_dai_ops acp3x_dai_i2s_ops = {
- .hw_params = acp3x_dai_i2s_hwparams,
- .trigger = acp3x_dai_i2s_trigger,
- .set_fmt = acp3x_dai_i2s_set_fmt,
- .set_tdm_slot = acp3x_dai_set_tdm_slot,
-};
-
-static struct snd_soc_dai_driver acp3x_i2s_dai_driver = {
- .playback = {
- .rates = SNDRV_PCM_RATE_8000_96000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 8,
-
- .rate_min = 8000,
- .rate_max = 96000,
- },
- .capture = {
- .rates = SNDRV_PCM_RATE_8000_48000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
- SNDRV_PCM_FMTBIT_U8 |
- SNDRV_PCM_FMTBIT_S24_LE |
- SNDRV_PCM_FMTBIT_S32_LE,
- .channels_min = 2,
- .channels_max = 2,
- .rate_min = 8000,
- .rate_max = 48000,
- },
- .ops = &acp3x_dai_i2s_ops,
-};
-
static const struct snd_soc_component_driver acp3x_i2s_component = {
.name = DRV_NAME,
.open = acp3x_dma_open,
@@ -619,6 +415,9 @@ static int acp3x_audio_probe(struct platform_device *pdev)
return -ENODEV;
}
irqflags = *((unsigned int *)(pdev->dev.platform_data));
+ adata = devm_kzalloc(&pdev->dev, sizeof(*adata), GFP_KERNEL);
+ if (!adata)
+ return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
@@ -626,10 +425,6 @@ static int acp3x_audio_probe(struct platform_device *pdev)
return -ENODEV;
}
- adata = devm_kzalloc(&pdev->dev, sizeof(*adata), GFP_KERNEL);
- if (!adata)
- return -ENOMEM;
-
adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
@@ -650,9 +445,9 @@ static int acp3x_audio_probe(struct platform_device *pdev)
return -ENODEV;
status = devm_snd_soc_register_component(&pdev->dev,
&acp3x_i2s_component,
- &acp3x_i2s_dai_driver, 1);
+ NULL, 0);
if (status) {
- dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
+ dev_err(&pdev->dev, "Fail to register acp i2s component\n");
goto dev_err;
}
status = devm_request_irq(&pdev->dev, adata->i2s_irq, i2s_irq_handler,
@@ -774,13 +569,14 @@ static struct platform_driver acp3x_dma_driver = {
.probe = acp3x_audio_probe,
.remove = acp3x_audio_remove,
.driver = {
- .name = "acp3x_rv_i2s",
+ .name = "acp3x_rv_i2s_dma",
.pm = &acp3x_pm_ops,
},
};
module_platform_driver(acp3x_dma_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_AUTHOR("Vijendar.Mukunda(a)amd.com");
MODULE_DESCRIPTION("AMD ACP 3.x PCM Driver");
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 2f15fe1..72c1a23 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -51,6 +51,29 @@
#define SLOT_WIDTH_24 0x18
#define SLOT_WIDTH_32 0x20
+struct acp3x_platform_info {
+ u16 play_i2s_instance;
+ u16 cap_i2s_instance;
+ u16 capture_channel;
+};
+
+struct i2s_dev_data {
+ bool tdm_mode;
+ unsigned int i2s_irq;
+ u32 tdm_fmt;
+ void __iomem *acp3x_base;
+ struct snd_pcm_substream *play_stream;
+ struct snd_pcm_substream *capture_stream;
+};
+
+struct i2s_stream_instance {
+ u16 num_pages;
+ u16 channels;
+ u32 xfer_resolution;
+ u64 bytescount;
+ dma_addr_t dma_addr;
+ void __iomem *acp3x_base;
+};
static inline u32 rv_readl(void __iomem *base_addr)
{
@@ -61,3 +84,22 @@ static inline void rv_writel(u32 val, void __iomem *base_addr)
{
writel(val, base_addr - ACP3x_PHY_BASE_ADDRESS);
}
+
+static inline u64 acp_get_byte_count(struct i2s_stream_instance *rtd,
+ int direction)
+{
+ u64 byte_count;
+
+ if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_TX_LINEARPOSITIONCNTR_LOW);
+ } else {
+ byte_count = rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH);
+ byte_count |= rv_readl(rtd->acp3x_base +
+ mmACP_BT_RX_LINEARPOSITIONCNTR_LOW);
+ }
+ return byte_count;
+}
--
2.7.4
2
1

[alsa-devel] [RESEND PATCH v2 1/7] ASoC: amd: Create multiple I2S platform device endpoints
by Ravulapati Vishnu vardhan rao 06 Nov '19
by Ravulapati Vishnu vardhan rao 06 Nov '19
06 Nov '19
Creates Platform Device endpoints for multiple
I2S instances: SP and BT endpoints device.
Pass PCI resources like MMIO, irq to the platform devices.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x.h | 5 +++
sound/soc/amd/raven/pci-acp3x.c | 82 +++++++++++++++++++++++++++--------------
2 files changed, 60 insertions(+), 27 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 4f2cadd..2f15fe1 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,10 +7,15 @@
#include "chip_offset_byte.h"
+#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
#define ACP3x_REG_START 0x1240000
#define ACP3x_REG_END 0x1250200
+#define ACP3x_I2STDM_REG_START 0x1242400
+#define ACP3x_I2STDM_REG_END 0x1242410
+#define ACP3x_BT_TDM_REG_START 0x1242800
+#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index facec24..ec3ef625 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -16,16 +16,16 @@ struct acp3x_dev_data {
void __iomem *acp3x_base;
bool acp3x_audio_mode;
struct resource *res;
- struct platform_device *pdev;
+ struct platform_device *pdev[ACP3x_DEVS];
};
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
int ret;
- u32 addr, val;
+ u32 addr, val, i;
struct acp3x_dev_data *adata;
- struct platform_device_info pdevinfo;
+ struct platform_device_info pdevinfo[ACP3x_DEVS];
unsigned int irqflags;
if (pci_enable_device(pci)) {
@@ -68,7 +68,7 @@ static int snd_acp3x_probe(struct pci_dev *pci,
switch (val) {
case I2S_MODE:
adata->res = devm_kzalloc(&pci->dev,
- sizeof(struct resource) * 2,
+ sizeof(struct resource) * 4,
GFP_KERNEL);
if (!adata->res) {
ret = -ENOMEM;
@@ -80,39 +80,62 @@ static int snd_acp3x_probe(struct pci_dev *pci,
adata->res[0].start = addr;
adata->res[0].end = addr + (ACP3x_REG_END - ACP3x_REG_START);
- adata->res[1].name = "acp3x_i2s_irq";
- adata->res[1].flags = IORESOURCE_IRQ;
- adata->res[1].start = pci->irq;
- adata->res[1].end = pci->irq;
+ adata->res[1].name = "acp3x_i2s_sp";
+ adata->res[1].flags = IORESOURCE_MEM;
+ adata->res[1].start = addr + ACP3x_I2STDM_REG_START;
+ adata->res[1].end = addr + ACP3x_I2STDM_REG_END;
+
+ adata->res[2].name = "acp3x_i2s_bt";
+ adata->res[2].flags = IORESOURCE_MEM;
+ adata->res[2].start = addr + ACP3x_BT_TDM_REG_START;
+ adata->res[2].end = addr + ACP3x_BT_TDM_REG_END;
+
+ adata->res[3].name = "acp3x_i2s_irq";
+ adata->res[3].flags = IORESOURCE_IRQ;
+ adata->res[3].start = pci->irq;
+ adata->res[3].end = adata->res[3].start;
adata->acp3x_audio_mode = ACP3x_I2S_MODE;
memset(&pdevinfo, 0, sizeof(pdevinfo));
- pdevinfo.name = "acp3x_rv_i2s";
- pdevinfo.id = 0;
- pdevinfo.parent = &pci->dev;
- pdevinfo.num_res = 2;
- pdevinfo.res = adata->res;
- pdevinfo.data = &irqflags;
- pdevinfo.size_data = sizeof(irqflags);
-
- adata->pdev = platform_device_register_full(&pdevinfo);
- if (IS_ERR(adata->pdev)) {
- dev_err(&pci->dev, "cannot register %s device\n",
- pdevinfo.name);
- ret = PTR_ERR(adata->pdev);
- goto unmap_mmio;
+ pdevinfo[0].name = "acp3x_rv_i2s_dma";
+ pdevinfo[0].id = 0;
+ pdevinfo[0].parent = &pci->dev;
+ pdevinfo[0].num_res = 4;
+ pdevinfo[0].res = &adata->res[0];
+ pdevinfo[0].data = &irqflags;
+ pdevinfo[0].size_data = sizeof(irqflags);
+
+ pdevinfo[1].name = "acp3x_i2s_playcap";
+ pdevinfo[1].id = 0;
+ pdevinfo[1].parent = &pci->dev;
+ pdevinfo[1].num_res = 1;
+ pdevinfo[1].res = &adata->res[1];
+
+ pdevinfo[2].name = "acp3x_i2s_playcap";
+ pdevinfo[2].id = 1;
+ pdevinfo[2].parent = &pci->dev;
+ pdevinfo[2].num_res = 1;
+ pdevinfo[2].res = &adata->res[2];
+ for (i = 0; i < ACP3x_DEVS ; i++) {
+ adata->pdev[i] =
+ platform_device_register_full(&pdevinfo[i]);
+ if (adata->pdev[i] == NULL) {
+ dev_err(&pci->dev, "cannot register %s device\n",
+ pdevinfo[i].name);
+ ret = -ENODEV;
+ goto unmap_mmio;
+ }
}
break;
- default:
- dev_err(&pci->dev, "Invalid ACP audio mode : %d\n", val);
- ret = -ENODEV;
- goto unmap_mmio;
}
return 0;
unmap_mmio:
pci_disable_msi(pci);
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+ kfree(adata->res);
iounmap(adata->acp3x_base);
release_regions:
pci_release_regions(pci);
@@ -124,9 +147,13 @@ static int snd_acp3x_probe(struct pci_dev *pci,
static void snd_acp3x_remove(struct pci_dev *pci)
{
+ int i;
struct acp3x_dev_data *adata = pci_get_drvdata(pci);
- platform_device_unregister(adata->pdev);
+ if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+ }
iounmap(adata->acp3x_base);
pci_disable_msi(pci);
@@ -151,6 +178,7 @@ static struct pci_driver acp3x_driver = {
module_pci_driver(acp3x_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_DESCRIPTION("AMD ACP3x PCI driver");
MODULE_LICENSE("GPL v2");
--
2.7.4
3
2

[alsa-devel] [PATCH] ASoC: soc-core: fixup dead-lock at snd_soc_unregister_component()
by Kuninori Morimoto 06 Nov '19
by Kuninori Morimoto 06 Nov '19
06 Nov '19
From: Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
snd_soc_unregister_component() is calling snd_soc_lookup_component()
under mutex_lock(). But, snd_soc_lookup_component() itself is using
mutex_lock(), thus it will be dead-lock.
This patch adds _nolocked version of it, and avoid dead-lock issue.
Fixes: ac6a4dd3e9f0("ASoC: soc-core: use snd_soc_lookup_component() at snd_soc_unregister_component()")
Reported-by: "kernelci.org bot" <bot(a)kernelci.org>"
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
---
> Please double check/test it.
sound/soc/soc-core.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index cc59687..94f1078 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -356,14 +356,13 @@ struct snd_soc_component *snd_soc_rtdcom_lookup(struct snd_soc_pcm_runtime *rtd,
}
EXPORT_SYMBOL_GPL(snd_soc_rtdcom_lookup);
-struct snd_soc_component *snd_soc_lookup_component(struct device *dev,
- const char *driver_name)
+static struct snd_soc_component
+*snd_soc_lookup_component_nolocked(struct device *dev, const char *driver_name)
{
struct snd_soc_component *component;
struct snd_soc_component *found_component;
found_component = NULL;
- mutex_lock(&client_mutex);
for_each_component(component) {
if ((dev == component->dev) &&
(!driver_name ||
@@ -373,10 +372,21 @@ struct snd_soc_component *snd_soc_lookup_component(struct device *dev,
break;
}
}
- mutex_unlock(&client_mutex);
return found_component;
}
+
+struct snd_soc_component *snd_soc_lookup_component(struct device *dev,
+ const char *driver_name)
+{
+ struct snd_soc_component *component;
+
+ mutex_lock(&client_mutex);
+ component = snd_soc_lookup_component_nolocked(dev, driver_name);
+ mutex_unlock(&client_mutex);
+
+ return component;
+}
EXPORT_SYMBOL_GPL(snd_soc_lookup_component);
struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card,
@@ -2853,7 +2863,7 @@ void snd_soc_unregister_component(struct device *dev)
mutex_lock(&client_mutex);
while (1) {
- component = snd_soc_lookup_component(dev, NULL);
+ component = snd_soc_lookup_component_nolocked(dev, NULL);
if (!component)
break;
--
2.7.4
2
1

[alsa-devel] [PATCH] ASoC: soc-core: fix RIP warning on card removal
by Pierre-Louis Bossart 06 Nov '19
by Pierre-Louis Bossart 06 Nov '19
06 Nov '19
SOF module load/unload tests show nasty recurring warnings:
WARNING: CPU: 5 PID: 1339 at sound/core/control.c:466
snd_ctl_remove+0xf0/0x100 [snd]
RIP: 0010:snd_ctl_remove+0xf0/0x100 [snd]
This regression was introduced by the removal of the call to
soc_remove_link_components() before soc_card_free() is invoked.
Go back to the initial order but only call
soc_remove_link_components() once.
Reviewed-by: Ranjani Sridharan <ranjani.sridharan(a)linux.intel.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx(a)renesas.com>
Fixes: 5a4c9f054ceea ("ASoC: soc-core: snd_soc_unbind_card() cleanup")
GitHub issue: https://github.com/thesofproject/linux/issues/1424
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart(a)linux.intel.com>
---
sound/soc/soc-core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index b07ecfac39d7..1e08fb5da170 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1951,6 +1951,9 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card)
{
struct snd_soc_dai_link *link, *_link;
+ /* This should be called before snd_card_free() */
+ soc_remove_link_components(card);
+
/* free the ALSA card at first; this syncs with pending operations */
if (card->snd_card) {
snd_card_free(card->snd_card);
@@ -1959,7 +1962,6 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card)
/* remove and free each DAI */
soc_remove_link_dais(card);
- soc_remove_link_components(card);
for_each_card_links_safe(card, link, _link)
snd_soc_remove_dai_link(card, link);
--
2.20.1
2
1

06 Nov '19
The fuzzer tries to open the timer instances as much as possible, and
this may cause a system hiccup easily. We've already introduced the
cap for the max number of available instances for the h/w timers, and
we should put such a limit also to the slave timers, too.
This patch introduces the limit to the multiple opened slave timers.
The upper limit is hard-coded to 1000 for now, which should suffice
for any practical usages up to now.
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
---
sound/core/timer.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 5c9fbf3f4340..219249627cc3 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -74,6 +74,9 @@ static LIST_HEAD(snd_timer_slave_list);
/* lock for slave active lists */
static DEFINE_SPINLOCK(slave_active_lock);
+#define MAX_SLAVE_INSTANCES 1000
+static int num_slaves;
+
static DEFINE_MUTEX(register_mutex);
static int snd_timer_free(struct snd_timer *timer);
@@ -250,6 +253,10 @@ int snd_timer_open(struct snd_timer_instance **ti,
err = -EINVAL;
goto unlock;
}
+ if (num_slaves >= MAX_SLAVE_INSTANCES) {
+ err = -EBUSY;
+ goto unlock;
+ }
timeri = snd_timer_instance_new(owner, NULL);
if (!timeri) {
err = -ENOMEM;
@@ -259,6 +266,7 @@ int snd_timer_open(struct snd_timer_instance **ti,
timeri->slave_id = tid->device;
timeri->flags |= SNDRV_TIMER_IFLG_SLAVE;
list_add_tail(&timeri->open_list, &snd_timer_slave_list);
+ num_slaves++;
err = snd_timer_check_slave(timeri);
if (err < 0) {
snd_timer_close_locked(timeri);
@@ -350,6 +358,8 @@ static int snd_timer_close_locked(struct snd_timer_instance *timeri)
}
list_del(&timeri->open_list);
+ if (timeri->flags & SNDRV_TIMER_IFLG_SLAVE)
+ num_slaves--;
/* force to stop the timer */
snd_timer_stop(timeri);
--
2.16.4
1
0

06 Nov '19
Hi,
this is a small series of patches to enhance / clean up the core
memory allocation stuff. The basic changes are:
- The memalloc code accepts NULL device pointer to treat as the
default mode for the continuous pages
- The new SNDRV_DMA_TYPE_VMALLOC type in the core allocator, so that
we can drop the PCM-specific helpers
- The PCM mmap default handler checks the buffer type, and the PCM
page ops can be dropped in almost all cases.
These whole core changes are still compatible with the old code.
The actual cleanup patch for each driver will be posted later once
when this core change set is accepted.
thanks,
Takashi
===
Takashi Iwai (4):
ALSA: memalloc: Allow NULL device for SNDRV_DMA_TYPE_CONTINOUS type
ALSA: memalloc: Add vmalloc buffer allocation support
ALSA: pcm: Handle special page mapping in the default mmap handler
ALSA: docs: Update documentation about SG- and vmalloc-buffers
.../sound/kernel-api/writing-an-alsa-driver.rst | 80 ++++++++++++----------
include/sound/memalloc.h | 1 +
sound/core/memalloc.c | 23 ++++++-
sound/core/pcm_native.c | 14 +++-
4 files changed, 80 insertions(+), 38 deletions(-)
--
2.16.4
4
11

[alsa-devel] [PATCH 1/7] ASoC: amd: Create multiple I2S platform device endpoints.
by Ravulapati Vishnu vardhan rao 06 Nov '19
by Ravulapati Vishnu vardhan rao 06 Nov '19
06 Nov '19
Creates Platform Device endpoints for multiple
I2S instances: SP and BT endpoints device.
Pass PCI resources like MMIO, irq to the platform devices.
Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati(a)amd.com>
---
sound/soc/amd/raven/acp3x.h | 5 +++
sound/soc/amd/raven/pci-acp3x.c | 83 +++++++++++++++++++++++++++--------------
2 files changed, 60 insertions(+), 28 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x.h b/sound/soc/amd/raven/acp3x.h
index 4f2cadd..2f15fe1 100644
--- a/sound/soc/amd/raven/acp3x.h
+++ b/sound/soc/amd/raven/acp3x.h
@@ -7,10 +7,15 @@
#include "chip_offset_byte.h"
+#define ACP3x_DEVS 3
#define ACP3x_PHY_BASE_ADDRESS 0x1240000
#define ACP3x_I2S_MODE 0
#define ACP3x_REG_START 0x1240000
#define ACP3x_REG_END 0x1250200
+#define ACP3x_I2STDM_REG_START 0x1242400
+#define ACP3x_I2STDM_REG_END 0x1242410
+#define ACP3x_BT_TDM_REG_START 0x1242800
+#define ACP3x_BT_TDM_REG_END 0x1242810
#define I2S_MODE 0x04
#define BT_TX_THRESHOLD 26
#define BT_RX_THRESHOLD 25
diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c
index facec24..7f435b3 100644
--- a/sound/soc/amd/raven/pci-acp3x.c
+++ b/sound/soc/amd/raven/pci-acp3x.c
@@ -16,16 +16,16 @@ struct acp3x_dev_data {
void __iomem *acp3x_base;
bool acp3x_audio_mode;
struct resource *res;
- struct platform_device *pdev;
+ struct platform_device *pdev[ACP3x_DEVS];
};
static int snd_acp3x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{
int ret;
- u32 addr, val;
+ u32 addr, val, i;
struct acp3x_dev_data *adata;
- struct platform_device_info pdevinfo;
+ struct platform_device_info pdevinfo[ACP3x_DEVS];
unsigned int irqflags;
if (pci_enable_device(pci)) {
@@ -68,7 +68,7 @@ static int snd_acp3x_probe(struct pci_dev *pci,
switch (val) {
case I2S_MODE:
adata->res = devm_kzalloc(&pci->dev,
- sizeof(struct resource) * 2,
+ sizeof(struct resource) * 4,
GFP_KERNEL);
if (!adata->res) {
ret = -ENOMEM;
@@ -80,39 +80,61 @@ static int snd_acp3x_probe(struct pci_dev *pci,
adata->res[0].start = addr;
adata->res[0].end = addr + (ACP3x_REG_END - ACP3x_REG_START);
- adata->res[1].name = "acp3x_i2s_irq";
- adata->res[1].flags = IORESOURCE_IRQ;
- adata->res[1].start = pci->irq;
- adata->res[1].end = pci->irq;
+ adata->res[1].name = "acp3x_i2s_sp";
+ adata->res[1].flags = IORESOURCE_MEM;
+ adata->res[1].start = addr + ACP3x_I2STDM_REG_START;
+ adata->res[1].end = addr + ACP3x_I2STDM_REG_END;
+
+ adata->res[2].name = "acp3x_i2s_bt";
+ adata->res[2].flags = IORESOURCE_MEM;
+ adata->res[2].start = addr + ACP3x_BT_TDM_REG_START;
+ adata->res[2].end = addr + ACP3x_BT_TDM_REG_END;
+
+ adata->res[3].name = "acp3x_i2s_irq";
+ adata->res[3].flags = IORESOURCE_IRQ;
+ adata->res[3].start = pci->irq;
+ adata->res[3].end = adata->res[3].start;
adata->acp3x_audio_mode = ACP3x_I2S_MODE;
memset(&pdevinfo, 0, sizeof(pdevinfo));
- pdevinfo.name = "acp3x_rv_i2s";
- pdevinfo.id = 0;
- pdevinfo.parent = &pci->dev;
- pdevinfo.num_res = 2;
- pdevinfo.res = adata->res;
- pdevinfo.data = &irqflags;
- pdevinfo.size_data = sizeof(irqflags);
-
- adata->pdev = platform_device_register_full(&pdevinfo);
- if (IS_ERR(adata->pdev)) {
- dev_err(&pci->dev, "cannot register %s device\n",
- pdevinfo.name);
- ret = PTR_ERR(adata->pdev);
- goto unmap_mmio;
+ pdevinfo[0].name = "acp3x_rv_i2s_dma";
+ pdevinfo[0].id = 0;
+ pdevinfo[0].parent = &pci->dev;
+ pdevinfo[0].num_res = 4;
+ pdevinfo[0].res = &adata->res[0];
+ pdevinfo[0].data = &irqflags;
+ pdevinfo[0].size_data = sizeof(irqflags);
+
+ pdevinfo[1].name = "acp3x_i2s_playcap";
+ pdevinfo[1].id = 0;
+ pdevinfo[1].parent = &pci->dev;
+ pdevinfo[1].num_res = 1;
+ pdevinfo[1].res = &adata->res[1];
+
+ pdevinfo[2].name = "acp3x_i2s_playcap";
+ pdevinfo[2].id = 1;
+ pdevinfo[2].parent = &pci->dev;
+ pdevinfo[2].num_res = 1;
+ pdevinfo[2].res = &adata->res[2];
+ for (i = 0; i < ACP3x_DEVS ; i++) {
+ adata->pdev[i] =
+ platform_device_register_full(&pdevinfo[i]);
+ if (adata->pdev[i] == NULL) {
+ dev_err(&pci->dev, "cannot register %s device\n",
+ pdevinfo[i].name);
+ ret = -ENODEV;
+ goto unmap_mmio;
+ }
}
break;
- default:
- dev_err(&pci->dev, "Invalid ACP audio mode : %d\n", val);
- ret = -ENODEV;
- goto unmap_mmio;
}
return 0;
unmap_mmio:
- pci_disable_msi(pci);
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+ kfree(adata->res);
iounmap(adata->acp3x_base);
release_regions:
pci_release_regions(pci);
@@ -124,9 +146,13 @@ static int snd_acp3x_probe(struct pci_dev *pci,
static void snd_acp3x_remove(struct pci_dev *pci)
{
+ int i;
struct acp3x_dev_data *adata = pci_get_drvdata(pci);
- platform_device_unregister(adata->pdev);
+ if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) {
+ for (i = 0 ; i < ACP3x_DEVS ; i++)
+ platform_device_unregister(adata->pdev[i]);
+ }
iounmap(adata->acp3x_base);
pci_disable_msi(pci);
@@ -151,6 +177,7 @@ static struct pci_driver acp3x_driver = {
module_pci_driver(acp3x_driver);
+MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati(a)amd.com");
MODULE_AUTHOR("Maruthi.Bayyavarapu(a)amd.com");
MODULE_DESCRIPTION("AMD ACP3x PCI driver");
MODULE_LICENSE("GPL v2");
--
2.7.4
4
17