Skip to contentSkip to conversation

Baytrail followup patches

PATCH In review Pierre-Louis Bossart 2 participants 7 messages Aug 16, 2016 – Aug 17, 2016

Subsystems (5)
x86 Sound ASoC Common clk +1 more subsystems
lore
Share & tools
lore
#0 lore raw

cover Baytrail followup patches

fixes for warnings detected by 0-Day
New quirk for Acer Aspire platforms
Resending clock framework support (for-next audio not working on all platforms enabling MCLK if this patch is not applied)

Irina Tirdea (1):
clk: x86: Add Atom PMC platform clocks

Pierre-Louis Bossart (2):
ASoC: Intel: atom: fix 0-day warnings
ASoC: Intel: bytcr_rt5640: quirk for Acer Aspire SWS-012

 arch/x86/Kconfig                      |   1 +
 arch/x86/include/asm/pmc_atom.h       |   6 +
 arch/x86/platform/atom/pmc_atom.c     |  55 ++++-
 drivers/clk/x86/Makefile              |   1 +
 drivers/clk/x86/clk-byt-plt.c         | 413 ++++++++++++++++++++++++++++++++++
 sound/soc/intel/atom/sst/sst_acpi.c   |   2 +-
 sound/soc/intel/boards/bytcr_rt5640.c |  15 +-
 7 files changed, 487 insertions(+), 6 deletions(-)
 create mode 100644 drivers/clk/x86/clk-byt-plt.c
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/3 ASoC: Intel: atom: fix 0-day warnings

spurious __initconst copy/pasted from other drivers

---
 sound/soc/intel/atom/sst/sst_acpi.c   | 2 +-
 sound/soc/intel/boards/bytcr_rt5640.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/intel/atom/sst/sst_acpi.c +1 -1
index 0c2cc42..773acfb 100644
@@ -245,7 +245,7 @@ static int is_byt_cr(struct device *dev, bool *bytcr)
 	int status = 0;
 
 	if (IS_ENABLED(CONFIG_IOSF_MBI)) {
-		static const struct x86_cpu_id cpu_ids[] __initconst = {
+		static const struct x86_cpu_id cpu_ids[] = {
 			{ X86_VENDOR_INTEL, 6, 55 }, /* Valleyview, Bay Trail */
 			{}
 		};
sound/soc/intel/boards/bytcr_rt5640.c +1 -1
index 09ec3d7..2548815 100644
@@ -668,7 +668,7 @@ static char byt_rt5640_cpu_dai_name[10]; /*  = "ssp[0|2]-port" */
 
 static bool is_valleyview(void)
 {
-	static const struct x86_cpu_id cpu_ids[] __initconst = {
+	static const struct x86_cpu_id cpu_ids[] = {
 		{ X86_VENDOR_INTEL, 6, 55 }, /* Valleyview, Bay Trail */
 		{}
 	};
Signature · 1 line
2.7.4
maintainer
#2 lore raw

Applied "ASoC: Intel: atom: fix 0-day warnings" to the asoc tree

The patch

ASoC: Intel: atom: fix 0-day warnings

has been applied to the asoc tree at

git://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

Quoted 1 line

From cac17731df11e076850c46f50a17266181a10b7c Mon Sep 17 00:00:00 2001

From: Pierre-Louis Bossart <[email protected]>
Date: Tue, 16 Aug 2016 18:28:21 -0500
Subject: [PATCH] ASoC: Intel: atom: fix 0-day warnings

spurious __initconst copy/pasted from other drivers

---
 sound/soc/intel/atom/sst/sst_acpi.c   | 2 +-
 sound/soc/intel/boards/bytcr_rt5640.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/intel/atom/sst/sst_acpi.c +1 -1
index 0c2cc4207b95..773acfbaaf2f 100644
@@ -245,7 +245,7 @@ static int is_byt_cr(struct device *dev, bool *bytcr)
 	int status = 0;
 
 	if (IS_ENABLED(CONFIG_IOSF_MBI)) {
-		static const struct x86_cpu_id cpu_ids[] __initconst = {
+		static const struct x86_cpu_id cpu_ids[] = {
 			{ X86_VENDOR_INTEL, 6, 55 }, /* Valleyview, Bay Trail */
 			{}
 		};
sound/soc/intel/boards/bytcr_rt5640.c +1 -1
index 09ec3d718357..254881594c36 100644
@@ -668,7 +668,7 @@ static char byt_rt5640_cpu_dai_name[10]; /*  = "ssp[0|2]-port" */
 
 static bool is_valleyview(void)
 {
-	static const struct x86_cpu_id cpu_ids[] __initconst = {
+	static const struct x86_cpu_id cpu_ids[] = {
 		{ X86_VENDOR_INTEL, 6, 55 }, /* Valleyview, Bay Trail */
 		{}
 	};
Signature · 1 line
2.8.1
#3 lore raw

PATCH 2/3 ASoC: Intel: bytcr_rt5640: quirk for Acer Aspire SWS-012

In reply to Pierre-Louis Bossart

Baytrail-CR platform needing SSP0-AIF1 routing
Also fix SSP0 while we are at it.

---
 sound/soc/intel/boards/bytcr_rt5640.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
sound/soc/intel/boards/bytcr_rt5640.c +12 -1
index 2548815..bff77a1 100644
@@ -378,6 +378,17 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
 						BYT_RT5640_MCLK_EN |
 						BYT_RT5640_SSP0_AIF1),
 	},
+	{
+		.callback = byt_rt5640_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW5-012"),
+		},
+		.driver_data = (unsigned long *)(BYT_RT5640_IN1_MAP |
+						 BYT_RT5640_MCLK_EN |
+						 BYT_RT5640_SSP0_AIF1),
+
+	},
 	{}
 };
 
@@ -527,7 +538,7 @@ static int byt_rt5640_codec_fixup(struct snd_soc_pcm_runtime *rtd,
 	if ((byt_rt5640_quirk & BYT_RT5640_SSP0_AIF1) ||
 		(byt_rt5640_quirk & BYT_RT5640_SSP0_AIF2)) {
 
-		/* set SSP2 to 16-bit */
+		/* set SSP0 to 16-bit */
 		params_set_format(params, SNDRV_PCM_FORMAT_S16_LE);
 
 		/*
Signature · 1 line
2.7.4
maintainer
#4 lore raw

Applied "ASoC: Intel: bytcr_rt5640: quirk for Acer Aspire SWS-012" to the asoc tree

The patch

ASoC: Intel: bytcr_rt5640: quirk for Acer Aspire SWS-012

has been applied to the asoc tree at

git://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

Quoted 1 line

From 8f98307d023810669391555e370a8c2a8e2af9b6 Mon Sep 17 00:00:00 2001

From: Pierre-Louis Bossart <[email protected]>
Date: Tue, 16 Aug 2016 18:28:22 -0500
Subject: [PATCH] ASoC: Intel: bytcr_rt5640: quirk for Acer Aspire SWS-012

Baytrail-CR platform needing SSP0-AIF1 routing
Also fix SSP0 while we are at it.

---
 sound/soc/intel/boards/bytcr_rt5640.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
sound/soc/intel/boards/bytcr_rt5640.c +12 -1
index 254881594c36..bff77a1f27fc 100644
@@ -378,6 +378,17 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
 						BYT_RT5640_MCLK_EN |
 						BYT_RT5640_SSP0_AIF1),
 	},
+	{
+		.callback = byt_rt5640_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW5-012"),
+		},
+		.driver_data = (unsigned long *)(BYT_RT5640_IN1_MAP |
+						 BYT_RT5640_MCLK_EN |
+						 BYT_RT5640_SSP0_AIF1),
+
+	},
 	{}
 };
 
@@ -527,7 +538,7 @@ static int byt_rt5640_codec_fixup(struct snd_soc_pcm_runtime *rtd,
 	if ((byt_rt5640_quirk & BYT_RT5640_SSP0_AIF1) ||
 		(byt_rt5640_quirk & BYT_RT5640_SSP0_AIF2)) {
 
-		/* set SSP2 to 16-bit */
+		/* set SSP0 to 16-bit */
 		params_set_format(params, SNDRV_PCM_FORMAT_S16_LE);
 
 		/*
Signature · 1 line
2.8.1
#5 lore raw

PATCH 3/3 clk: x86: Add Atom PMC platform clocks

In reply to Pierre-Louis Bossart

From: Irina Tirdea <[email protected]>

The Baytral and CherryTrail platforms provide platform clocks through their Power Management Controller (PMC).

The SoC supports up to 6 clocks (PMC_PLT_CLK[5:0]) with a frequency of either 19.2 MHz (PLL) or 25 MHz (XTAL).
These clocks are available for general system use, where appropriate and each have Control & Frequency register fields associated with them.

For example, the usage for platform clocks could be:
PLT_CLK[2:0] - Camera
PLT_CLK[3] - Audio Codec
PLT_CLK[4] -
PLT_CLK[5] - COMMs

---
 arch/x86/Kconfig                  |   1 +
 arch/x86/include/asm/pmc_atom.h   |   6 +
 arch/x86/platform/atom/pmc_atom.c |  55 ++++-
 drivers/clk/x86/Makefile          |   1 +
 drivers/clk/x86/clk-byt-plt.c     | 413 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 473 insertions(+), 3 deletions(-)
 create mode 100644 drivers/clk/x86/clk-byt-plt.c
arch/x86/Kconfig +1 -0
index 5c6e747..781c417 100644
@@ -2743,6 +2743,7 @@ config X86_DMA_REMAP
 config PMC_ATOM
 	def_bool y
         depends on PCI
+	select COMMON_CLK
 
 config VMD
 	depends on PCI_MSI
arch/x86/include/asm/pmc_atom.h +6 -0
index aa8744c..59f9516 100644
@@ -152,6 +152,12 @@
 #define	SLEEP_TYPE_S5		0x1C00
 #define	SLEEP_ENABLE		0x2000
 
+struct pmc_clk {
+	const char *name;
+	unsigned long freq;
+	const char *parent_name;
+};
+
 extern int pmc_atom_read(int offset, u32 *value);
 extern int pmc_atom_write(int offset, u32 value);
 
arch/x86/platform/atom/pmc_atom.c +52 -3

98 lines not on this page · raw message

drivers/clk/x86/Makefile +1 -0
index 0478138..cbdc8cc 100644
@@ -1,2 +1,3 @@
 clk-x86-lpss-objs		:= clk-lpt.o
 obj-$(CONFIG_X86_INTEL_LPSS)	+= clk-x86-lpss.o
+obj-$(CONFIG_PMC_ATOM)		+= clk-byt-plt.o
drivers/clk/x86/clk-byt-plt.c new file +413 -0

413 lines not on this page · raw message

Signature · 1 line
2.7.4
maintainer
#6 lore raw

Re: [PATCH 3/3] clk: x86: Add Atom PMC platform clocks

Quoted 4 lines · Pierre-Louis Bossart

From: Irina Tirdea <[email protected]>

The Baytral and CherryTrail platforms provide platform clocks through their Power Management Controller (PMC).

You need to submit clock API patches to the clock maintainers.