[PATCH 0/7] Bugfixes and clean-ups bound for the v3.6 RCs

STALE5104d

Revision v1 of 2 in this series.

15 messages, 3 authors, 2012-09-19 · open the first message on its own page

[PATCH 0/7] Bugfixes and clean-ups bound for the v3.6 RCs

From: Lee Jones <hidden>
Date: 2012-07-27 12:39:26

This patch-set includes some important changes which should make
their way to the Mainline Release Candidates for the v3.6 release.
Without them Audio doesn't even probe (at all) when booting with
Device Tree selected. The kernel can't compile with ux500 audio
enabled. Also platform data will fail to reach the AB8500 CODEC
driver. Even if we can get that far SoC Core will assume we're
using regmaps and attempt to use them; however, none exist for
this driver, so the kernel will oops.

 arch/arm/mach-ux500/board-mop500-msp.c |    2 +-
 arch/arm/mach-ux500/board-mop500.c     |    9 ++++-----
 drivers/mfd/ab8500-core.c              |    1 +
 drivers/mfd/db8500-prcmu.c             |    1 +
 sound/soc/codecs/ab8500-codec.c        |    4 ++++
 sound/soc/soc-dapm.c                   |    2 --
 6 files changed, 11 insertions(+), 8 deletions(-)

[PATCH 1/7] ASoC: dapm: If one widget fails, do not force all subsequent widgets to fail too

From: Lee Jones <hidden>
Date: 2012-07-27 12:39:28

If a list of widgets is provided and one of them fails to be added as
a control, the present semantics fail all subsequent widgets. A better
solution would be to only fail that widget, but pursue in attempting
to add the rest of the list.

Signed-off-by: Lee Jones <redacted>
---
 sound/soc/soc-dapm.c |    2 --
 1 file changed, 2 deletions(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index eded657..7d9c154 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3095,8 +3095,6 @@ int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm,
 			dev_err(dapm->dev,
 				"ASoC: Failed to create DAPM control %s\n",
 				widget->name);
-			ret = -ENOMEM;
-			break;
 		}
 		widget++;
 	}
-- 
1.7.9.5

[PATCH 2/7] ASoC: ab8500: Inform SoC Core that we have our own I/O arrangements

From: Lee Jones <hidden>
Date: 2012-07-27 12:39:31

If codec->control_data is not populated SoC Core assumes we want to
use regmap, which fails catastrophically, as we don't have one:

Unable to handle kernel NULL pointer dereference at virtual address 00000080
pgd = c0004000
[00000080] *pgd=00000000
Internal error: Oops: 17 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 1    Not tainted  (3.5.0-rc6-00884-g0b2419e-dirty #130)
PC is at regmap_read+0x10/0x5c
LR is at hw_read+0x80/0x90
pc : [<c01a91b8>]    lr : [<c0216804>]    psr: 60000013

Signed-off-by: Lee Jones <redacted>
---
 sound/soc/codecs/ab8500-codec.c |    4 ++++
 1 file changed, 4 insertions(+)
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index 3c79592..23b4018 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -2406,6 +2406,10 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec)
 
 	/* Setup AB8500 according to board-settings */
 	pdata = (struct ab8500_platform_data *)dev_get_platdata(dev->parent);
+
+	/* Inform SoC Core that we have our own I/O arrangements. */
+	codec->control_data = (void *)true;
+
 	status = ab8500_audio_setup_mics(codec, &pdata->codec->amics);
 	if (status < 0) {
 		pr_err("%s: Failed to setup mics (%d)!\n", __func__, status);
-- 
1.7.9.5

[PATCH 3/7] mfd: db8500-prcmu: Ensure AB8500 platform data is passed through MFD Core

From: Lee Jones <hidden>
Date: 2012-07-27 12:39:33

When booting via platform code the AB8500 platform data is now passed
in though the DB8500. However, if pdata_size is not set it will not be
subsequently passed onto subordinate devices. This patch correctly
populates pdata_size.

Signed-off-by: Lee Jones <redacted>
---
 drivers/mfd/db8500-prcmu.c |    1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 4050a1e..7040a00 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -3002,6 +3002,7 @@ static int __devinit db8500_prcmu_probe(struct platform_device *pdev)
 	for (i = 0; i < ARRAY_SIZE(db8500_prcmu_devs); i++) {
 		if (!strcmp(db8500_prcmu_devs[i].name, "ab8500-core")) {
 			db8500_prcmu_devs[i].platform_data = ab8500_platdata;
+			db8500_prcmu_devs[i].pdata_size = sizeof(struct ab8500_platform_data);
 		}
 	}
 
-- 
1.7.9.5

[PATCH 4/7] mfd: ab8500-core: Apply the AB8500 CODEC's compatible string to its MFD cell

From: Lee Jones <hidden>
Date: 2012-07-27 12:39:35

Provide a compatible string for the AB8500 CODEC to aid in
configuration property look-up from its associated Device Tree
node.

Signed-off-by: Lee Jones <redacted>
---
 drivers/mfd/ab8500-core.c |    1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 626b4ec..0c5b70f 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -1076,6 +1076,7 @@ static struct mfd_cell __devinitdata ab8500_devs[] = {
 	},
 	{
 		.name = "ab8500-codec",
+		.of_compatible = "stericsson,ab8500-codec",
 	},
 };
 
-- 
1.7.9.5

[PATCH 5/7] ARM: ux500: Remove unused snowball_of_platform_devs struct

From: Lee Jones <hidden>
Date: 2012-07-27 12:39:36

This was left over during a recent clean-up which removed Device Tree
helper structs. There is no longer a requirement for it, so we can just
remove it.

Signed-off-by: Lee Jones <redacted>
---
 arch/arm/mach-ux500/board-mop500.c |    5 -----
 1 file changed, 5 deletions(-)
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 80b4f0e..e641003 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -726,11 +726,6 @@ MACHINE_END
 
 #ifdef CONFIG_MACH_UX500_DT
 
-static struct platform_device *snowball_of_platform_devs[] __initdata = {
-	&snowball_led_dev,
-	&snowball_key_dev,
-};
-
 struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
 	/* Requires call-back bindings. */
 	OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata),
-- 
1.7.9.5

[PATCH 6/7] ARM: ux500: Fix merge error, so such struct 'snd_soc_u8500'

From: Lee Jones <hidden>
Date: 2012-07-27 12:39:38

The platform attempts to register platform device 'snd_soc_u8500'
which doesn't actually exist. Here we change the reference to the
correct one 'snd_soc_mop500'.

Signed-off-by: Lee Jones <redacted>
---
 arch/arm/mach-ux500/board-mop500-msp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-ux500/board-mop500-msp.c b/arch/arm/mach-ux500/board-mop500-msp.c
index 9960480..1b6a193 100644
--- a/arch/arm/mach-ux500/board-mop500-msp.c
+++ b/arch/arm/mach-ux500/board-mop500-msp.c
@@ -228,7 +228,7 @@ int mop500_msp_init(struct device *parent)
 	struct platform_device *msp1;
 
 	pr_info("%s: Register platform-device 'snd-soc-u8500'.\n", __func__);
-	platform_device_register(&snd_soc_u8500);
+	platform_device_register(&snd_soc_mop500);
 
 	pr_info("Initialize MSP I2S-devices.\n");
 	db8500_add_msp_i2s(parent, 0, U8500_MSP0_BASE, IRQ_DB8500_MSP0,
-- 
1.7.9.5

[PATCH 7/7] ARM: ux500: Ensure probing of Audio devices when Device Tree is enabled

From: Lee Jones <hidden>
Date: 2012-07-27 12:39:39

Previous attempts to add platform probing of the Audio related devices
only call from non-DT initialisation functions. This patch extends that
functionality to the Device Tree related ones too.

Signed-off-by: Lee Jones <redacted>
---
 arch/arm/mach-ux500/board-mop500.c |    4 ++++
 1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index e641003..87a5cd7 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -794,6 +794,7 @@ static void __init u8500_init_machine(void)
 				ARRAY_SIZE(mop500_platform_devs));
 
 		mop500_sdi_init(parent);
+		mop500_msp_init(parent);
 		i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
 		i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
 		i2c_register_board_info(2, mop500_i2c2_devices,
@@ -801,6 +802,8 @@ static void __init u8500_init_machine(void)
 
 		mop500_uib_init();
 
+	} else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
+		mop500_of_msp_init(parent);
 	} else if (of_machine_is_compatible("st-ericsson,hrefv60+")) {
 		/*
 		 * The HREFv60 board removed a GPIO expander and routed
@@ -812,6 +815,7 @@ static void __init u8500_init_machine(void)
 				ARRAY_SIZE(mop500_platform_devs));
 
 		hrefv60_sdi_init(parent);
+		mop500_msp_init(parent);
 
 		i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
 		i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;
-- 
1.7.9.5

Re: [PATCH 3/7] mfd: db8500-prcmu: Ensure AB8500 platform data is passed through MFD Core

From: Samuel Ortiz <hidden>
Date: 2012-07-27 13:36:13

Hi Lee,

On Fri, Jul 27, 2012 at 01:38:50PM +0100, Lee Jones wrote:
When booting via platform code the AB8500 platform data is now passed
in though the DB8500. However, if pdata_size is not set it will not be
subsequently passed onto subordinate devices. This patch correctly
populates pdata_size.

Signed-off-by: Lee Jones <redacted>
---
 drivers/mfd/db8500-prcmu.c |    1 +
 1 file changed, 1 insertion(+)
Applied, thanks.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

Re: [PATCH 4/7] mfd: ab8500-core: Apply the AB8500 CODEC's compatible string to its MFD cell

From: Samuel Ortiz <hidden>
Date: 2012-07-27 13:36:35

Hi Lee,

On Fri, Jul 27, 2012 at 01:38:51PM +0100, Lee Jones wrote:
Provide a compatible string for the AB8500 CODEC to aid in
configuration property look-up from its associated Device Tree
node.

Signed-off-by: Lee Jones <redacted>
---
 drivers/mfd/ab8500-core.c |    1 +
 1 file changed, 1 insertion(+)
Applied as well.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

Re: [PATCH 1/7] ASoC: dapm: If one widget fails, do not force all subsequent widgets to fail too

From: Mark Brown <hidden>
Date: 2012-07-29 20:25:14

On Fri, Jul 27, 2012 at 01:38:48PM +0100, Lee Jones wrote:
If a list of widgets is provided and one of them fails to be added as
a control, the present semantics fail all subsequent widgets. A better
solution would be to only fail that widget, but pursue in attempting
to add the rest of the list.
You've completely ignored my question about why this is better.

This is also *clearly* not an urgent bugfix.

Re: [PATCH 4/7] mfd: ab8500-core: Apply the AB8500 CODEC's compatible string to its MFD cell

From: Mark Brown <hidden>
Date: 2012-07-29 20:28:11

On Fri, Jul 27, 2012 at 03:36:33PM +0200, Samuel Ortiz wrote:
On Fri, Jul 27, 2012 at 01:38:51PM +0100, Lee Jones wrote:
quoted
Provide a compatible string for the AB8500 CODEC to aid in
configuration property look-up from its associated Device Tree
node.
Applied as well.
I remain *deeply* unconvinced that this is tasteful design for the
device tree bindings, and it's certainly not needed urgently for v3.6 as
there's no DT bindings on the CODEC side.

Re: [PATCH 4/7] mfd: ab8500-core: Apply the AB8500 CODEC's compatible string to its MFD cell

From: Samuel Ortiz <hidden>
Date: 2012-07-30 13:24:27

On Sun, Jul 29, 2012 at 09:28:07PM +0100, Mark Brown wrote:
On Fri, Jul 27, 2012 at 03:36:33PM +0200, Samuel Ortiz wrote:
quoted
On Fri, Jul 27, 2012 at 01:38:51PM +0100, Lee Jones wrote:
quoted
quoted
Provide a compatible string for the AB8500 CODEC to aid in
configuration property look-up from its associated Device Tree
node.
quoted
Applied as well.
I remain *deeply* unconvinced that this is tasteful design for the
device tree bindings, and it's certainly not needed urgently for v3.6 as
there's no DT bindings on the CODEC side.
Fair enough, I'll keep this one for the next merge window.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

Re: [PATCH 4/7] mfd: ab8500-core: Apply the AB8500 CODEC's compatible string to its MFD cell

From: Lee Jones <hidden>
Date: 2012-09-14 16:05:22

On Mon, Jul 30, 2012 at 03:24:22PM +0200, Samuel Ortiz wrote:
On Sun, Jul 29, 2012 at 09:28:07PM +0100, Mark Brown wrote:
quoted
On Fri, Jul 27, 2012 at 03:36:33PM +0200, Samuel Ortiz wrote:
quoted
On Fri, Jul 27, 2012 at 01:38:51PM +0100, Lee Jones wrote:
quoted
quoted
Provide a compatible string for the AB8500 CODEC to aid in
configuration property look-up from its associated Device Tree
node.
quoted
Applied as well.
I remain *deeply* unconvinced that this is tasteful design for the
device tree bindings, and it's certainly not needed urgently for v3.6 as
there's no DT bindings on the CODEC side.
Fair enough, I'll keep this one for the next merge window.
Chasing this, as it still doesn't appear in v3.7 -next.

Kind regards,
Lee

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Re: [PATCH 4/7] mfd: ab8500-core: Apply the AB8500 CODEC's compatible string to its MFD cell

From: Samuel Ortiz <hidden>
Date: 2012-09-19 11:29:11

Hi Lee,

On Fri, Jul 27, 2012 at 01:38:51PM +0100, Lee Jones wrote:
Provide a compatible string for the AB8500 CODEC to aid in
configuration property look-up from its associated Device Tree
node.

Signed-off-by: Lee Jones <redacted>
---
 drivers/mfd/ab8500-core.c |    1 +
 1 file changed, 1 insertion(+)
Applied, thanks.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help