* [PATCH v3 1/4] ASoC: tlv320aic3x: Convert mic bias to a supply widget
From: Mark Brown @ 2013-01-31 11:30 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1BAFE6F6C881BF42822005164F1491C33EB5A48E@DBDE01.ent.ti.com>
On Thu, Jan 31, 2013 at 11:27:07AM +0000, Hebbar, Gururaja wrote:
> On Thu, Jan 31, 2013 at 16:54:16, Mark Brown wrote:
> > As mentioned when you posted this before this patch needs to update the
> > machine drivers using the device too.
> The patch-set 2/4 does the same thing. Since I have da850-evm at my end, I
> have modified that machine driver and sent-it as 2/4.
Two problems here. One is that the update should be done in the same
patch and the other is that you need to update *all* the machine drivers
using the device, not just one of them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130131/6d513f38/attachment.sig>
^ permalink raw reply
* [RFC v2 13/18] ARM: OMAP2+: AM33XX: timer: Interchance clkevt and clksrc timers
From: Bedia, Vaibhav @ 2013-01-31 11:29 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <51095D2E.1040708@ti.com>
On Wed, Jan 30, 2013 at 23:19:34, Hunter, Jon wrote:
>
> By the way, this need to be applied on top of the fix I sent yesterday
> to pass the property.
>
Ok. Thanks for pointing this out.
^ permalink raw reply
* [PATCH v3 1/4] ASoC: tlv320aic3x: Convert mic bias to a supply widget
From: Hebbar, Gururaja @ 2013-01-31 11:27 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130131112414.GE11078@opensource.wolfsonmicro.com>
On Thu, Jan 31, 2013 at 16:54:16, Mark Brown wrote:
> On Thu, Jan 31, 2013 at 04:53:10PM +0530, Hebbar Gururaja wrote:
>
> > :100644 100644 e7b98f4... f47c3f5... M Documentation/devicetree/bindings/sound/tlv320aic3x.txt
> > :100644 100644 ffd9bc7... 9407fd0... M include/sound/tlv320aic3x.h
> > :100644 100644 4989143... 65d09d6... M sound/soc/codecs/tlv320aic3x.c
> > :100644 100644 6db3c41... e521ac3... M sound/soc/codecs/tlv320aic3x.h
>
> As mentioned when you posted this before this patch needs to update the
> machine drivers using the device too.
The patch-set 2/4 does the same thing. Since I have da850-evm at my end, I
have modified that machine driver and sent-it as 2/4.
>
Regards,
Gururaja
^ permalink raw reply
* OMAP4 PM bootloader dependency problems
From: Rajendra Nayak @ 2013-01-31 11:26 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359622829.10415.40.camel@sokoban>
Tero,
On Thursday 31 January 2013 02:30 PM, Tero Kristo wrote:
> Personally I don't like too much to have just extra spam during boot,
> which in many cases is even unnecessary (e.g. people who actually have
> good u-boot in use.) Personally I would like to have some sort of test
> during boot which detects broken PM and maybe prevents core idle
> completely if this is the case. Alternatively we can add extra info to
> the failed suspend dump and mention a good u-boot to try out (v2012-07
> or newer.)
>
> If we could detect boot loader version from kernel side, that would work
> also.
Given that there is no easy way to say for sure the bootloader is the
cause for broken PM in the kernel, neither is it possible to know the
bootloader version, why don't we do this.
Throw a pr_warn() at boot only when CONFIG_CPU_IDLE is enabled. Note
that it isn't enabled by default in omap2plus_defconfig. Also
throw one when a suspend fails, saying bootloader *could be* a possible
cause specifying the right version to be used. That should give enough
hints to folks still using old bootloaders and testing PM.
Does that sound good?
regards,
Rajendra
^ permalink raw reply
* [PATCH v2 4/4] irqchip: gic: Perform the gic_secondary_init() call via CPU notifier
From: Russell King - ARM Linux @ 2013-01-31 11:25 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <alpine.LFD.2.02.1301291907340.6300@xanadu.home>
On Tue, Jan 29, 2013 at 07:11:56PM -0500, Nicolas Pitre wrote:
> On Tue, 29 Jan 2013, Catalin Marinas wrote:
> > I would like to get them in as soon as possible (ideally 3.9) as AArch64
> > needs GIC support. I can base them on Rob's branch (already in -next)
> > and send them the same route (the arm-soc tree if Olof/Arnd are ok to
> > take them).
>
> Well... I'd prefer if my series was merged by RMK since this is mostly
> core ARM code. That is posing dependency issues.
>
> I think I'll just ignore your change for now and we'll fix things up
> during the v3.9-rc period.
Given that the ARM kernel seems to be rather broken at the moment, that's
not going to happen until the 32-bit kernel gets some loving attention to
make it work again.
Our primary responsibility is not to stuff the kernel with new features
as quickly as we possibly can. It's to make sure that the kernel works,
and at the moment, it doesn't. I'm not talking about ancient architectures.
I'm talking about platforms using ARMv6 and above - platforms with the GIC
which I'd be able to test this change on.
Realview EB (MPCore)
- Various failures yesterday but now works in my tree. Fixes queued for
the next -rc. (But the hardware randomly locks up during kernel boot,
normally around the time when the CLCD is enabled, so this can't really
be used for testing.)
OMAP4430SDP (Cortex A9)
- Fails to boot even with proper uImage addresses (no idea yet). No
kernel output.
OMAP3430LDP (Cortex A8 iirc)
- Ditto. No kernel output.
I haven't tried Versatile Express yet as it has the TC2 tile on, and I
don't yet a boot loader on it which is capable of TFTP (which makes it
rather useless to me - I've been saying this for a time now but this is
probably the first time publically.) I'm thinking about putting the
CA9x4 tile back on because that's a lot more functionally useful to me
than TC2.
^ permalink raw reply
* [PATCH v7 0/6] watchdog: dt: add support for the timeout-sec dt property
From: Fabio Porcedda @ 2013-01-31 11:24 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130108153447.GC7360@game.jcrosoft.org>
On Tue, Jan 8, 2013 at 4:34 PM, Jean-Christophe PLAGNIOL-VILLARD
<plagnioj@jcrosoft.com> wrote:
> On 11:04 Tue 08 Jan , Fabio Porcedda wrote:
>> Hi all,
>> this patchset add the timeout-sec property to the watchdog core,
>> to the at91sam9_wdt driver and on all framework enabled watchdog driver
>> with dt support.
>> The at91sam9_wdt is tested on evk-pr3,
>> the other drivers are compile tested only.
>>
>
> I'll prefer a macro to abstract the string in every driver
I know but Rob Herring dislikes that macro/function. I had to remove that part.
> except this fine by me
On Fri, Dec 21, 2012 at 12:32 PM, Wim Van Sebroeck <wim@iguana.be> wrote:
>> Ping.
>>
>> The dependency is already merged.
>
> Will not be for this merge window. Will review next week.
Hi Wim,
Ping.
Best regards
Fabio Porcedda
> Best Regards,
> J.
>
>> Best regards
>> Fabio Porcedda
>>
>> changes:
>> v7:
>> - rebase over v3.8-rc2
>> - remove the patch already merged
>> v6:
>> - remove patch for function of_get_timeout_sec as aked by Rob Herring
>> - add Acked-by: Jason Cooper <jason@lakedaemon.net>
>> - add Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
>> v5:
>> - fix codestyle for compilance ti checkpatch.pl about
>> "ERROR: do not initialise statics to 0 or NULL"
>> for s3c2410_wdt.c:56 and at91sam9_wdt.c:63
>> v4:
>> - add of_get_timeout_sec
>> - add s3c2410_wdt driver
>> - split driver patch
>> - fixed watchdog_init_timeout handling of min_timeout and max_timeout
>> v3:
>> - rename watchdog_probe_dt_timeout -> watchdog_init_timeout
>> - move the watchdog_init_timeout function from inline to watchdog_core.c
>> - add timeout parameter handling code to watchdog_init_timeout
>> - add timeout-sec property to the pnx4008-wdt driver
>> - add two small commit for fixup and cleanup
>> v2:
>> - change "timeout" to "timeout-sec" as asked by Jean-Christophe
>> - at91sam9_wdt: use the new helper function
>> - at91sam9_wdt: add bounds checking
>> - watchdog.h: add bounds checking
>>
>> Fabio Porcedda (6):
>> watchdog: core: dt: add support for the timeout-sec dt property
>> watchdog: orion_wdt: add timeout-sec property binding
>> watchdog: pnx4008: add timeout-sec property binding
>> watchdog: s3c2410_wdt: add timeout-sec property binding
>> watchdog: at91sam9_wdt: add timeout-sec property binding
>> watchdog: orion_wdt: move the min_timeout initialization
>>
>> .../devicetree/bindings/watchdog/atmel-wdt.txt | 4 +++
>> .../devicetree/bindings/watchdog/marvel.txt | 5 +++
>> .../devicetree/bindings/watchdog/pnx4008-wdt.txt | 4 +++
>> .../devicetree/bindings/watchdog/samsung-wdt.txt | 3 ++
>> Documentation/watchdog/watchdog-kernel-api.txt | 10 ++++++
>> drivers/watchdog/Kconfig | 1 +
>> drivers/watchdog/at91sam9_wdt.c | 16 ++++++++--
>> drivers/watchdog/orion_wdt.c | 10 +++---
>> drivers/watchdog/pnx4008_wdt.c | 7 ++--
>> drivers/watchdog/s3c2410_wdt.c | 6 ++--
>> drivers/watchdog/watchdog_core.c | 37 ++++++++++++++++++++++
>> include/linux/watchdog.h | 3 ++
>> 12 files changed, 91 insertions(+), 15 deletions(-)
>>
>> --
>> 1.8.0.3
>>
--
Fabio Porcedda
^ permalink raw reply
* [PATCH v3 1/4] ASoC: tlv320aic3x: Convert mic bias to a supply widget
From: Mark Brown @ 2013-01-31 11:24 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359631394-9511-2-git-send-email-gururaja.hebbar@ti.com>
On Thu, Jan 31, 2013 at 04:53:10PM +0530, Hebbar Gururaja wrote:
> :100644 100644 e7b98f4... f47c3f5... M Documentation/devicetree/bindings/sound/tlv320aic3x.txt
> :100644 100644 ffd9bc7... 9407fd0... M include/sound/tlv320aic3x.h
> :100644 100644 4989143... 65d09d6... M sound/soc/codecs/tlv320aic3x.c
> :100644 100644 6db3c41... e521ac3... M sound/soc/codecs/tlv320aic3x.h
As mentioned when you posted this before this patch needs to update the
machine drivers using the device too.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130131/0ad46819/attachment.sig>
^ permalink raw reply
* [PATCH v3 4/4] ASoC: davinci: remove __dev* attributes
From: Hebbar Gururaja @ 2013-01-31 11:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359631394-9511-1-git-send-email-gururaja.hebbar@ti.com>
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.
Remove use of __devexit_p and __devexit.
Signed-off-by: Hebbar Gururaja <gururaja.hebbar@ti.com>
---
Changes in v3
- New patch
:100644 100644 e6009a4... 37b8e78... M sound/soc/davinci/davinci-evm.c
sound/soc/davinci/davinci-evm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
index e6009a4..37b8e78 100644
--- a/sound/soc/davinci/davinci-evm.c
+++ b/sound/soc/davinci/davinci-evm.c
@@ -390,7 +390,7 @@ static int davinci_evm_probe(struct platform_device *pdev)
return ret;
}
-static int __devexit davinci_evm_remove(struct platform_device *pdev)
+static int davinci_evm_remove(struct platform_device *pdev)
{
struct snd_soc_card *card = platform_get_drvdata(pdev);
@@ -401,7 +401,7 @@ static int __devexit davinci_evm_remove(struct platform_device *pdev)
static struct platform_driver davinci_evm_driver = {
.probe = davinci_evm_probe,
- .remove = __devexit_p(davinci_evm_remove),
+ .remove = davinci_evm_remove,
.driver = {
.name = "davinci_evm",
.owner = THIS_MODULE,
--
1.7.9.5
^ permalink raw reply related
* [PATCH v3 3/4] ASoC: davinci: machine: Add device tree binding
From: Hebbar Gururaja @ 2013-01-31 11:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359631394-9511-1-git-send-email-gururaja.hebbar@ti.com>
From: "Hebbar, Gururaja" <gururaja.hebbar@ti.com>
Device tree support for Davinci Machine driver
When the board boots with device tree, the driver will receive card,
codec, dai interface details (like the card name, DAPM routing map,
phandle for the audio components described in the dts file, codec mclk
speed).
The card will be set up based on this information.
Since the routing is provided via DT we can mark the card fully routed
so core can take care of disconnecting the unused pins.
Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
---
Changes in v3
- New patch
Changes in v2
- Remove reference to Linux & software details from DT binding
:000000 100644 0000000... 92ad4c7... A Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
:100644 100644 484b22c... e6009a4... M sound/soc/davinci/davinci-evm.c
.../bindings/sound/davinci-evm-audio.txt | 53 ++++++
sound/soc/davinci/davinci-evm.c | 179 +++++++++++++++++---
2 files changed, 212 insertions(+), 20 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt b/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
new file mode 100644
index 0000000..92ad4c7
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
@@ -0,0 +1,53 @@
+* Texas Instruments SoC audio setups with TLV320AIC3X Codec
+
+Required properties:
+- compatible :
+ "ti,dm365-voice-codec-audio" : for DM365 platforms with Voice Codec
+ "ti,da830-evm-audio" : for DM365/DA8xx/OMAPL1x/AM33xx
+
+- ti,model : The user-visible name of this sound complex.
+- ti,audio-codec : The phandle of the TLV320AIC3x audio codec
+- ti,mcasp-controller : The phandle of the McASP controller
+- ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec
+- ti,audio-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. Valid names for sources and
+ sinks are the codec's pins, and the jacks on the board:
+
+ Codec pins:
+
+ * MIC3L
+ * MIC3R
+ * LINE1L
+ * LINE2L
+ * LINE1R
+ * LINE2R
+
+ Board connectors:
+
+ * Headphone Jack
+ * Line Out
+ * Mic Jack
+
+
+Example:
+
+sound {
+ compatible = "ti,da830-evm-audio";
+ ti,model = "DA830 EVM";
+ ti,audio-codec = <&tlv320aic3x>;
+ ti,mcasp-controller = <&mcasp1>;
+ ti,codec-clock-rate = <12000000>;
+ ti,audio-routing =
+ "Headphone Jack", "HPLOUT",
+ "Headphone Jack", "HPROUT",
+ "Line Out", "LLOUT",
+ "Line Out", "RLOUT",
+ "MIC3L", "Mic Bias",
+ "MIC3R", "Mic Bias",
+ "Mic Bias", "Mic Jack",
+ "LINE1L", "Line In",
+ "LINE2L", "Line In",
+ "LINE1R", "Line In",
+ "LINE2R", "Line In";
+};
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
index 484b22c..e6009a4 100644
--- a/sound/soc/davinci/davinci-evm.c
+++ b/sound/soc/davinci/davinci-evm.c
@@ -15,6 +15,7 @@
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/i2c.h>
+#include <linux/of_platform.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/soc.h>
@@ -34,27 +35,38 @@ static int evm_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *codec_dai = rtd->codec_dai;
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+ struct snd_soc_codec *codec = rtd->codec;
+ struct snd_soc_card *soc_card = codec->card;
+ struct device_node *np = soc_card->dev->of_node;
int ret = 0;
unsigned sysclk;
- /* ASP1 on DM355 EVM is clocked by an external oscillator */
- if (machine_is_davinci_dm355_evm() || machine_is_davinci_dm6467_evm() ||
- machine_is_davinci_dm365_evm())
- sysclk = 27000000;
-
- /* ASP0 in DM6446 EVM is clocked by U55, as configured by
- * board-dm644x-evm.c using GPIOs from U18. There are six
- * options; here we "know" we use a 48 KHz sample rate.
- */
- else if (machine_is_davinci_evm())
- sysclk = 12288000;
-
- else if (machine_is_davinci_da830_evm() ||
- machine_is_davinci_da850_evm())
- sysclk = 24576000;
-
- else
- return -EINVAL;
+ if (np) {
+ ret = of_property_read_u32(np, "ti,codec-clock-rate", &sysclk);
+ if (ret < 0)
+ return ret;
+ } else {
+ /* ASP1 on DM355 EVM is clocked by an external oscillator */
+ if (machine_is_davinci_dm355_evm() ||
+ machine_is_davinci_dm6467_evm() ||
+ machine_is_davinci_dm365_evm())
+ sysclk = 27000000;
+
+ /*
+ * ASP0 in DM6446 EVM is clocked by U55, as configured by
+ * board-dm644x-evm.c using GPIOs from U18. There are six
+ * options; here we "know" we use a 48 KHz sample rate.
+ */
+ else if (machine_is_davinci_evm())
+ sysclk = 12288000;
+
+ else if (machine_is_davinci_da830_evm() ||
+ machine_is_davinci_da850_evm())
+ sysclk = 24576000;
+
+ else
+ return -EINVAL;
+ }
/* set codec DAI configuration */
ret = snd_soc_dai_set_fmt(codec_dai, AUDIO_FORMAT);
@@ -132,13 +144,22 @@ static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd)
{
struct snd_soc_codec *codec = rtd->codec;
struct snd_soc_dapm_context *dapm = &codec->dapm;
+ struct device_node *np = codec->card->dev->of_node;
+ int ret;
/* Add davinci-evm specific widgets */
snd_soc_dapm_new_controls(dapm, aic3x_dapm_widgets,
ARRAY_SIZE(aic3x_dapm_widgets));
- /* Set up davinci-evm specific audio path audio_map */
- snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
+ if (np) {
+ ret = snd_soc_of_parse_audio_routing(codec->card,
+ "ti,audio-routing");
+ if (ret)
+ return ret;
+ } else {
+ /* Set up davinci-evm specific audio path audio_map */
+ snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
+ }
/* not connected */
snd_soc_dapm_disable_pin(dapm, "MONO_LOUT");
@@ -287,6 +308,108 @@ static struct snd_soc_card da850_snd_soc_card = {
.num_links = 1,
};
+#if defined(CONFIG_OF)
+
+enum {
+ MACHINE_VERSION_1 = 0, /* DM365 with Voice Codec */
+ MACHINE_VERSION_2, /* DM365/DA8xx/OMAPL1x/AM33xx */
+};
+
+static const struct of_device_id davinci_evm_dt_ids[] = {
+ {
+ .compatible = "ti,dm365-voice-codec-audio",
+ .data = (void *)MACHINE_VERSION_1,
+ },
+ {
+ .compatible = "ti,da830-evm-audio",
+ .data = (void *)MACHINE_VERSION_2,
+ },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, davinci_mcasp_dt_ids);
+
+/*
+ * This struct is just used as place holder. It will be filled with
+ * data from dt node
+ */
+static struct snd_soc_dai_link evm_dai = {
+ .name = "TLV320AIC3X",
+ .stream_name = "AIC3X",
+ .codec_dai_name = "tlv320aic3x-hifi",
+};
+
+/* davinci evm audio machine driver */
+static struct snd_soc_card evm_soc_card = {
+ .owner = THIS_MODULE,
+ .dai_link = &evm_dai,
+ .num_links = 1,
+};
+
+static int davinci_evm_probe(struct platform_device *pdev)
+{
+ struct device_node *np = pdev->dev.of_node;
+ const struct of_device_id *match =
+ of_match_device(of_match_ptr(davinci_evm_dt_ids), &pdev->dev);
+ u32 machine_ver;
+ int ret = 0;
+
+ machine_ver = (u32)match->data;
+ switch (machine_ver) {
+ case MACHINE_VERSION_1:
+ evm_dai.name = "Voice Codec - CQ93VC";
+ evm_dai.stream_name = "CQ93";
+ evm_dai.codec_dai_name = "cq93vc-hifi";
+ break;
+
+ case MACHINE_VERSION_2:
+ evm_dai.ops = &evm_ops;
+ evm_dai.init = evm_aic3x_init;
+ break;
+ }
+
+ evm_dai.codec_of_node = of_parse_phandle(np, "ti,audio-codec", 0);
+ if (!evm_dai.codec_of_node)
+ return -EINVAL;
+
+ evm_dai.cpu_of_node = of_parse_phandle(np,
+ "ti,mcasp-controller", 0);
+ if (!evm_dai.cpu_of_node)
+ return -EINVAL;
+
+ evm_dai.platform_of_node = evm_dai.cpu_of_node;
+
+ evm_soc_card.dev = &pdev->dev;
+ ret = snd_soc_of_parse_card_name(&evm_soc_card, "ti,model");
+ if (ret)
+ return ret;
+
+ ret = snd_soc_register_card(&evm_soc_card);
+ if (ret)
+ dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
+
+ return ret;
+}
+
+static int __devexit davinci_evm_remove(struct platform_device *pdev)
+{
+ struct snd_soc_card *card = platform_get_drvdata(pdev);
+
+ snd_soc_unregister_card(card);
+
+ return 0;
+}
+
+static struct platform_driver davinci_evm_driver = {
+ .probe = davinci_evm_probe,
+ .remove = __devexit_p(davinci_evm_remove),
+ .driver = {
+ .name = "davinci_evm",
+ .owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(davinci_evm_dt_ids),
+ },
+};
+#endif
+
static struct platform_device *evm_snd_device;
static int __init evm_init(void)
@@ -295,6 +418,15 @@ static int __init evm_init(void)
int index;
int ret;
+#if defined(CONFIG_OF)
+ /*
+ * If dtb is there, the devices will be created dynamically.
+ * Only register platfrom driver structure.
+ */
+ if (of_have_populated_dt())
+ return platform_driver_register(&davinci_evm_driver);
+#endif
+
if (machine_is_davinci_evm()) {
evm_snd_dev_data = &dm6446_snd_soc_card_evm;
index = 0;
@@ -330,6 +462,13 @@ static int __init evm_init(void)
static void __exit evm_exit(void)
{
+#if defined(CONFIG_OF)
+ if (of_have_populated_dt()) {
+ platform_driver_unregister(&davinci_evm_driver);
+ return;
+ }
+#endif
+
platform_device_unregister(evm_snd_device);
}
--
1.7.9.5
^ permalink raw reply related
* [PATCH v3 2/4] ASoC: davinci: update machine driver dapm routes
From: Hebbar Gururaja @ 2013-01-31 11:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359631394-9511-1-git-send-email-gururaja.hebbar@ti.com>
Now since micbias is converted to supply widget, updated machine driver
as well.
Signed-off-by: Hebbar Gururaja <gururaja.hebbar@ti.com>
---
Changes in v3
- New patch
:100644 100644 d55e647... 484b22c... M sound/soc/davinci/davinci-evm.c
sound/soc/davinci/davinci-evm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
index d55e647..484b22c 100644
--- a/sound/soc/davinci/davinci-evm.c
+++ b/sound/soc/davinci/davinci-evm.c
@@ -116,9 +116,9 @@ static const struct snd_soc_dapm_route audio_map[] = {
{"Line Out", NULL, "RLOUT"},
/* Mic connected to (MIC3L | MIC3R) */
- {"MIC3L", NULL, "Mic Bias 2V"},
- {"MIC3R", NULL, "Mic Bias 2V"},
- {"Mic Bias 2V", NULL, "Mic Jack"},
+ {"MIC3L", NULL, "Mic Bias"},
+ {"MIC3R", NULL, "Mic Bias"},
+ {"Mic Bias", NULL, "Mic Jack"},
/* Line In connected to (LINE1L | LINE2L), (LINE1R | LINE2R) */
{"LINE1L", NULL, "Line In"},
--
1.7.9.5
^ permalink raw reply related
* [PATCH v3 1/4] ASoC: tlv320aic3x: Convert mic bias to a supply widget
From: Hebbar Gururaja @ 2013-01-31 11:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359631394-9511-1-git-send-email-gururaja.hebbar@ti.com>
Convert MicBias widgets to supply widget.
On tlv320aic3x, Mic bias power on/off shares the same register bits
with output mic bias voltage. So, when power on mic bias, we need
reclaim it to voltage value.
Provide a new platform data so that the micbias voltage can be sent
according to board requirement. Now since tlc320aic3x codec driver
is DT aware, update dt files and functions to handle this new
"micbias-vg" platform data.
Because of sharing of bits, when enabling the micbias, voltage also
needs to be updated. So use SND_SOC_DAPM_POST_PMU & SND_SOC_DAPM_PRE_PMD
macro to create an event to handle this.
Signed-off-by: Hebbar Gururaja <gururaja.hebbar@ti.com>
---
Changes in v3
- New patch
:100644 100644 e7b98f4... f47c3f5... M Documentation/devicetree/bindings/sound/tlv320aic3x.txt
:100644 100644 ffd9bc7... 9407fd0... M include/sound/tlv320aic3x.h
:100644 100644 4989143... 65d09d6... M sound/soc/codecs/tlv320aic3x.c
:100644 100644 6db3c41... e521ac3... M sound/soc/codecs/tlv320aic3x.h
.../devicetree/bindings/sound/tlv320aic3x.txt | 6 ++
include/sound/tlv320aic3x.h | 10 +++
sound/soc/codecs/tlv320aic3x.c | 83 ++++++++++++++++++--
sound/soc/codecs/tlv320aic3x.h | 4 +
4 files changed, 97 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/tlv320aic3x.txt b/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
index e7b98f4..f47c3f5 100644
--- a/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
+++ b/Documentation/devicetree/bindings/sound/tlv320aic3x.txt
@@ -11,6 +11,12 @@ Optional properties:
- gpio-reset - gpio pin number used for codec reset
- ai3x-gpio-func - <array of 2 int> - AIC3X_GPIO1 & AIC3X_GPIO2 Functionality
+- ai3x-micbias-vg - MicBias Voltage required.
+ 1 - MICBIAS output is powered to 2.0V,
+ 2 - MICBIAS output is powered to 2.5V,
+ 3 - MICBIAS output is connected to AVDD,
+ If this node is not mentioned or if the value is incorrect, then MicBias
+ is powered down.
Example:
diff --git a/include/sound/tlv320aic3x.h b/include/sound/tlv320aic3x.h
index ffd9bc7..9407fd0 100644
--- a/include/sound/tlv320aic3x.h
+++ b/include/sound/tlv320aic3x.h
@@ -46,6 +46,13 @@ enum {
AIC3X_GPIO2_FUNC_BUTTON_PRESS_IRQ = 15
};
+enum aic3x_micbias_voltage {
+ AIC3X_MICBIAS_OFF = 0,
+ AIC3X_MICBIAS_2_0V = 1,
+ AIC3X_MICBIAS_2_5V = 2,
+ AIC3X_MICBIAS_AVDDV = 3,
+};
+
struct aic3x_setup_data {
unsigned int gpio_func[2];
};
@@ -53,6 +60,9 @@ struct aic3x_setup_data {
struct aic3x_pdata {
int gpio_reset; /* < 0 if not used */
struct aic3x_setup_data *setup;
+
+ /* Selects the micbias voltage */
+ enum aic3x_micbias_voltage micbias_vg;
};
#endif
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 4989143..65d09d6 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -85,6 +85,9 @@ struct aic3x_priv {
#define AIC3X_MODEL_33 1
#define AIC3X_MODEL_3007 2
u16 model;
+
+ /* Selects the micbias voltage */
+ enum aic3x_micbias_voltage micbias_vg;
};
/*
@@ -195,6 +198,37 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol,
return ret;
}
+/*
+ * mic bias power on/off share the same register bits with
+ * output voltage of mic bias. when power on mic bias, we
+ * need reclaim it to voltage value.
+ * 0x0 = Powered off
+ * 0x1 = MICBIAS output is powered to 2.0V,
+ * 0x2 = MICBIAS output is powered to 2.5V
+ * 0x3 = MICBIAS output is connected to AVDD
+ */
+static int mic_bias_event(struct snd_soc_dapm_widget *w,
+ struct snd_kcontrol *kcontrol, int event)
+{
+ struct snd_soc_codec *codec = w->codec;
+ struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec);
+
+ switch (event) {
+ case SND_SOC_DAPM_POST_PMU:
+ /* change mic bias voltage to user defined */
+ snd_soc_update_bits(codec, MICBIAS_CTRL,
+ MICBIAS_LEVEL_MASK,
+ aic3x->micbias_vg << MICBIAS_LEVEL_SHIFT);
+ break;
+
+ case SND_SOC_DAPM_PRE_PMD:
+ snd_soc_update_bits(codec, MICBIAS_CTRL,
+ MICBIAS_LEVEL_MASK, 0);
+ break;
+ }
+ return 0;
+}
+
static const char *aic3x_left_dac_mux[] = { "DAC_L1", "DAC_L3", "DAC_L2" };
static const char *aic3x_right_dac_mux[] = { "DAC_R1", "DAC_R3", "DAC_R2" };
static const char *aic3x_left_hpcom_mux[] =
@@ -596,12 +630,9 @@ static const struct snd_soc_dapm_widget aic3x_dapm_widgets[] = {
AIC3X_ASD_INTF_CTRLA, 0, 3, 3, 0),
/* Mic Bias */
- SND_SOC_DAPM_REG(snd_soc_dapm_micbias, "Mic Bias 2V",
- MICBIAS_CTRL, 6, 3, 1, 0),
- SND_SOC_DAPM_REG(snd_soc_dapm_micbias, "Mic Bias 2.5V",
- MICBIAS_CTRL, 6, 3, 2, 0),
- SND_SOC_DAPM_REG(snd_soc_dapm_micbias, "Mic Bias AVDD",
- MICBIAS_CTRL, 6, 3, 3, 0),
+ SND_SOC_DAPM_SUPPLY("Mic Bias", MICBIAS_CTRL, 6, 0,
+ mic_bias_event,
+ SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
/* Output mixers */
SND_SOC_DAPM_MIXER("Left Line Mixer", SND_SOC_NOPM, 0, 0,
@@ -1386,6 +1417,24 @@ static int aic3x_probe(struct snd_soc_codec *codec)
if (aic3x->model == AIC3X_MODEL_3007)
snd_soc_add_codec_controls(codec, &aic3x_classd_amp_gain_ctrl, 1);
+ /* set mic bias voltage */
+ switch (aic3x->micbias_vg) {
+ case AIC3X_MICBIAS_2_0V:
+ case AIC3X_MICBIAS_2_5V:
+ case AIC3X_MICBIAS_AVDDV:
+ snd_soc_update_bits(codec, MICBIAS_CTRL,
+ MICBIAS_LEVEL_MASK,
+ (aic3x->micbias_vg) << MICBIAS_LEVEL_SHIFT);
+ break;
+ case AIC3X_MICBIAS_OFF:
+ /*
+ * noting to do. target won't enter here. This is just to avoid
+ * compile time warning "warning: enumeration value
+ * 'AIC3X_MICBIAS_OFF' not handled in switch"
+ */
+ break;
+ }
+
aic3x_add_widgets(codec);
list_add(&aic3x->list, &reset_list);
@@ -1461,6 +1510,7 @@ static int aic3x_i2c_probe(struct i2c_client *i2c,
struct aic3x_setup_data *ai3x_setup;
struct device_node *np = i2c->dev.of_node;
int ret;
+ u32 value;
aic3x = devm_kzalloc(&i2c->dev, sizeof(struct aic3x_priv), GFP_KERNEL);
if (aic3x == NULL) {
@@ -1474,6 +1524,7 @@ static int aic3x_i2c_probe(struct i2c_client *i2c,
if (pdata) {
aic3x->gpio_reset = pdata->gpio_reset;
aic3x->setup = pdata->setup;
+ aic3x->micbias_vg = pdata->micbias_vg;
} else if (np) {
ai3x_setup = devm_kzalloc(&i2c->dev, sizeof(*ai3x_setup),
GFP_KERNEL);
@@ -1493,6 +1544,26 @@ static int aic3x_i2c_probe(struct i2c_client *i2c,
aic3x->setup = ai3x_setup;
}
+ if (!of_property_read_u32(np, "ai3x-micbias-vg", &value)) {
+ switch (value) {
+ case 1 :
+ aic3x->micbias_vg = AIC3X_MICBIAS_2_0V;
+ break;
+ case 2 :
+ aic3x->micbias_vg = AIC3X_MICBIAS_2_5V;
+ break;
+ case 3 :
+ aic3x->micbias_vg = AIC3X_MICBIAS_AVDDV;
+ break;
+ default :
+ aic3x->micbias_vg = AIC3X_MICBIAS_OFF;
+ dev_err(&i2c->dev, "Unsuitable MicBias voltage "
+ "found in DT\n");
+ }
+ } else {
+ aic3x->micbias_vg = AIC3X_MICBIAS_OFF;
+ }
+
} else {
aic3x->gpio_reset = -1;
}
diff --git a/sound/soc/codecs/tlv320aic3x.h b/sound/soc/codecs/tlv320aic3x.h
index 6db3c41..e521ac3 100644
--- a/sound/soc/codecs/tlv320aic3x.h
+++ b/sound/soc/codecs/tlv320aic3x.h
@@ -238,6 +238,10 @@
/* Default input volume */
#define DEFAULT_GAIN 0x20
+/* MICBIAS Control Register */
+#define MICBIAS_LEVEL_SHIFT (6)
+#define MICBIAS_LEVEL_MASK (3 << 6)
+
/* headset detection / button API */
/* The AIC3x supports detection of stereo headsets (GND + left + right signal)
--
1.7.9.5
^ permalink raw reply related
* [PATCH v3 0/4] ASoC davinci/tlv320aic3x updates, fixes & DT support
From: Hebbar Gururaja @ 2013-01-31 11:23 UTC (permalink / raw)
To: linux-arm-kernel
1. Convert tlv320aic3x mic bias to a supply widget and related machine driver
2. Add DT support for Davinci machine platform
3. remove __dev* attributes
This patch-set is tested on Davinci platform (DA850 EVM). This series applies on
top of tag next-20130128 git tree
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
These patches cannot be tested directly on mainline kernel (DT based).
This is because dma is not yet completely ported to Davinci ASoC. I had to add
few hacks to get Audio working on Davinci DA850 platform.
For reference, I have placed the entire working tree @
Tree : https://github.com/ghebbar/linux.git
Branch : dev_next-20130128_davinci_asoc_dt_v3
changes in v3
- drop mcasp pinctrl handler patch from seried as it is now handled
centrally.
- Convert tlv320aic3x mic bias to a supply widget and related machine
driver
- remove __dev* attributes
Changes in V2
- Remove reference to Linux & software details from DT binding
Hebbar Gururaja (3):
ASoC: tlv320aic3x: Convert mic bias to a supply widget
ASoC: davinci: update machine driver dapm routes
ASoC: davinci: remove __dev* attributes
Hebbar, Gururaja (1):
ASoC: davinci: machine: Add device tree binding
.../bindings/sound/davinci-evm-audio.txt | 53 ++++++
.../devicetree/bindings/sound/tlv320aic3x.txt | 6 +
include/sound/tlv320aic3x.h | 10 ++
sound/soc/codecs/tlv320aic3x.c | 83 ++++++++-
sound/soc/codecs/tlv320aic3x.h | 4 +
sound/soc/davinci/davinci-evm.c | 185 +++++++++++++++++---
6 files changed, 312 insertions(+), 29 deletions(-)
create mode 100644 Documentation/devicetree/bindings/sound/davinci-evm-audio.txt
--
1.7.9.5
^ permalink raw reply
* [PATCH 2/3] mmc: davinci_mmc: add DT support
From: Mark Rutland @ 2013-01-31 11:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359628387-14437-3-git-send-email-prakash.pm@ti.com>
Hello,
I have a few comments on the devicetree binding and the way it's parsed.
On Thu, Jan 31, 2013 at 10:33:06AM +0000, Manjunathappa, Prakash wrote:
> Adds device tree support for davinci_mmc. Also add
> binding documentation.
> Tested with non-dma PIO mode and without GPIO
> card_detect/write_protect option because of
> dependencies on EDMA and GPIO modules DT support.
>
> Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
> Cc: linux-mmc at vger.kernel.org
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-kernel at vger.kernel.org
> Cc: davinci-linux-open-source at linux.davincidsp.com
> Cc: devicetree-discuss at lists.ozlabs.org
> Cc: cjb at laptop.org
> Cc: Sekhar Nori <nsekhar@ti.com>
> Cc: mporter at ti.com
> ---
> .../devicetree/bindings/mmc/davinci_mmc.txt | 23 +++++++
> drivers/mmc/host/davinci_mmc.c | 69 +++++++++++++++++++-
> 2 files changed, 91 insertions(+), 1 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/mmc/davinci_mmc.txt
>
> diff --git a/Documentation/devicetree/bindings/mmc/davinci_mmc.txt b/Documentation/devicetree/bindings/mmc/davinci_mmc.txt
> new file mode 100644
> index 0000000..144bee6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/davinci_mmc.txt
> @@ -0,0 +1,23 @@
> +* TI Highspeed MMC host controller for DaVinci
> +
> +The Highspeed MMC Host Controller on TI DaVinci family
> +provides an interface for MMC, SD and SDIO types of memory cards.
> +
> +This file documents differences between the core properties described
> +by mmc.txt and the properties used by the davinci_mmc driver.
> +
> +Required properties:
> +- compatible:
> + Should be "ti,davinci_mmc", for davinci controllers
"ti,davinci-mmc" (with '-' rather than '_') would be preferable.
> +
> +Optional properties:
> +- bus-width: Number of data lines, can be <1>, <4>, or <8>, default <1>
> +- max-frequency: maximum operating clock frequency.
You said you only described differences from mmc.txt, but this is listed in
mmc.txt.
> +- caps: Check for Host capabilities in <linux/mmc/host.h>
Is this a set of binary flags? Also, is this Linux-specific?
I really don't think this should be in the devicetree binding. Why do you need
this?
> +- version: version of controller.
This should be encoded as part of the compatible string.
> +Example:
> + mmc1: mmc at 0x4809c000 {
> + compatible = "ti,omap4-hsmmc";
> + reg = <0x4809c000 0x400>;
> + bus-width = <4>;
> + };
It would be nice if the example referred to this binding rather than another.
> diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
> index 382b79d..ce6730d 100644
> --- a/drivers/mmc/host/davinci_mmc.c
> +++ b/drivers/mmc/host/davinci_mmc.c
> @@ -34,6 +34,7 @@
> #include <linux/dma-mapping.h>
> #include <linux/edma.h>
> #include <linux/mmc/mmc.h>
> +#include <linux/of.h>
>
> #include <linux/platform_data/mmc-davinci.h>
>
> @@ -1156,16 +1157,75 @@ static void __init init_mmcsd_host(struct mmc_davinci_host *host)
>
> mmc_davinci_reset_ctrl(host, 0);
> }
> +#ifdef CONFIG_OF
> +static struct davinci_mmc_config
> + *mmc_of_get_pdata(struct platform_device *pdev)
> +{
> + struct device_node *np;
> + struct davinci_mmc_config *pdata = NULL;
> + u32 data;
> + int ret;
> +
> + pdata = pdev->dev.platform_data;
> + if (!pdata) {
> + pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
> + if (!pdata) {
> + dev_err(&pdev->dev, "Failed to allocate memory for struct davinci_mmc_config\n");
> + goto nodata;
> + }
> + }
Why do you need to conditionally allocate this? This only seems to be called
once.
> +
> + np = pdev->dev.of_node;
> + if (!np)
> + goto nodata;
Why not just return immediately here? You do nothing special at nodata.
> +
> + ret = of_property_read_u32(np, "bus-width", &data);
> + if (ret)
> + dev_info(&pdev->dev, "wires not specified, defaulting to 4 bit mode\n");
> + pdata->wires = data;
That dev_info doesn't seem to match up with what the next line is doing (data
might not have been initialised). Also, unless I've misunderstood, it doesn't
match up with the default of 1 mentioned in the binding doc.
> +
> + ret = of_property_read_u32(np, "max-frequency", &data);
> + if (ret)
> + dev_info(&pdev->dev, "max-frequency not specified, defaulting to 25MHz\n");
> + pdata->max_freq = data;
Again, the dev_info doesn't match up with the line below it. I notice
the default's not one specified in the binding. Is this frequency chosen
from the hardware docs, or is it an arbitrary choice. If not arbitrary,
it might be worth specifying in the binding.
> +
> + ret = of_property_read_u32(np, "caps", &data);
> + if (ret)
> + dev_info(&pdev->dev, "card capability not specified\n");
> + pdata->caps = data;
Again, you may be using garbage data.
> +
> + ret = of_property_read_u32(np, "version", &data);
> + if (ret)
> + dev_err(&pdev->dev, "version not specified\n");
> + pdata->version = data;
And again, though I'd prefer to see this property go entirely.
> +
> +nodata:
> + return pdata;
> +}
> +
> +#else
> +static struct davinci_mmc_config
> + *mmc_of_get_pdata(struct platform_device *pdev)
> +{
> + return pdev->dev.platform_data;
> +}
> +#endif
This is poorly named if it's required for !CONFIG_OF.
Why not change this to something like mmc_parse_pdata, returning an
error code. For !CONFIG_OF, it can simply return 0, which should be less
surprising for anyone else reading this code.
>
> static int __init davinci_mmcsd_probe(struct platform_device *pdev)
> {
> - struct davinci_mmc_config *pdata = pdev->dev.platform_data;
> + struct davinci_mmc_config *pdata = NULL;
> struct mmc_davinci_host *host = NULL;
> struct mmc_host *mmc = NULL;
> struct resource *r, *mem = NULL;
> int ret = 0, irq = 0;
> size_t mem_size;
>
> + pdata = mmc_of_get_pdata(pdev);
> + if (pdata == NULL) {
> + dev_err(&pdev->dev, "Can not get platform data\n");
> + return -ENOENT;
> + }
> +
> /* REVISIT: when we're fully converted, fail if pdata is NULL */
>
> ret = -ENODEV;
> @@ -1403,11 +1463,18 @@ static const struct dev_pm_ops davinci_mmcsd_pm = {
> #define davinci_mmcsd_pm_ops NULL
> #endif
>
> +static const struct of_device_id davinci_mmc_of_match[] = {
> + {.compatible = "ti,davinci_mmc", },
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, davinci_mmc_of_match);
For supporting multiple versions, you could either use some auxdata
here, or check each one in davince_mmcsd_probe.
> +
> static struct platform_driver davinci_mmcsd_driver = {
> .driver = {
> .name = "davinci_mmc",
> .owner = THIS_MODULE,
> .pm = davinci_mmcsd_pm_ops,
> + .of_match_table = of_match_ptr(davinci_mmc_of_match),
> },
> .remove = __exit_p(davinci_mmcsd_remove),
> };
Where does davinci_mmcsd_probe get called from, and how is the
of_match_table used? Should it not be set as .probe on the driver?
Thanks,
Mark.
^ permalink raw reply
* [PATCH 1/1] drivers: net: davinci_cpdma: acknowledge interrupt properly
From: Pantelis Antoniou @ 2013-01-31 11:22 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <510A44B0.30200@ti.com>
Hi
On Jan 31, 2013, at 12:17 PM, Mugunthan V N wrote:
> On 1/31/2013 1:33 AM, Koen Kooi wrote:
>> Op 30 jan. 2013, om 20:56 heeft Mugunthan V N <mugunthanvnm@ti.com> het volgende geschreven:
>>
>>> CPDMA interrupts are not properly acknowledged which leads to interrupt
>>> storm, only cpdma interrupt 0 is acknowledged in Davinci CPDMA driver.
>>> Changed cpdma_ctlr_eoi api to acknowledge 1 and 2 interrupts which are
>>> used for rx and tx respectively.
>> A brief inspection shows that this still isn't following the TRM, but Pantelis' patch does. Can you please fix this driver to follow the TRM and make it work on both PG1.0 and PG2.0 instead of papering over bugs instead of fixing them properly?
> Existing driver implementation is also complies with TRM. What Pantelis added
> additionally are non-napi implementation, handled cpdma processed tx and rx
> processing separately and renamed wr_reg as per TRM naming convention.. Also he
> has added a dummy reading tx/rx stat which is mentioned in TRM, but this stat
> is required only when using multichannel for data transfer. Current implementation
> of CPSW driver uses only channel 0 of Tx and Rx channels respectively for transmission
> and reading stat doesn't gets any effect in interrupt acknowledgment.
>
> Since both tx and rx are processed in same napi api, so i have added interrupt
> acknowledgment to the same existing api.
>
First of all, this method of not needing to read the stat registers besides when
using multichannel for data transfers is never described anywhere in any manual,
or in the driver sources.
Secondly, I find the method of ack-ing all interrupt sources problematic.
Consider the following sequence
Rx-interrupt ---> | |
| IRQ handler |
| schedules NAPI |
| disables interrupts --> | cpsw_poll()
| | handle Rx
Tx-interrupt ---> |-------------------------|-------------
| | ack Rx & Tx IRQ
| | enable interrupts
When will the Tx interrupt get handled? Is it guaranteed that the DMA
logic will assert the Tx interrupt when the interrupts are enabled, even
though the interrupt was previously acked? It is not clear in the TRM.
Another problem that I see is that the other interrupts (MISC) are not supposed
to be routed to the napi cpsw_poll() function at all. NAPI is for the tx/rx path
as far as I know.
> Regards
> Mugunthan V N
Regards
-- Pantelis
^ permalink raw reply
* [RFC v2 12/18] ARM: OMAP2+: timer: Add suspend-resume callbacks for clockevent device
From: Bedia, Vaibhav @ 2013-01-31 11:17 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <51095C7A.9080904@ti.com>
On Wed, Jan 30, 2013 at 23:16:34, Hunter, Jon wrote:
>
> Ok fair enough. By the way, I posted a patch today [1] that will use the
> hwmod name as the clockevent timer name. Care to try on top of that
> patch and then we can eliminate the sprintf.
>
Thanks. Will try it out later today.
Regards,
Vaibhav
^ permalink raw reply
* [PATCH v2 2/2] drivers: net:ethernet: cpsw: add support for VLAN
From: Mugunthan V N @ 2013-01-31 11:09 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130130220243.GB22847@electric-eye.fr.zoreil.com>
On 1/31/2013 3:32 AM, Francois Romieu wrote:
> Mugunthan V N <mugunthanvnm@ti.com> :
> [...]
>> diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt
>> index 6ddd028..99696bf 100644
>> --- a/Documentation/devicetree/bindings/net/cpsw.txt
>> +++ b/Documentation/devicetree/bindings/net/cpsw.txt
>> @@ -24,6 +24,8 @@ Required properties:
>> Optional properties:
>> - ti,hwmods : Must be "cpgmac0"
>> - no_bd_ram : Must be 0 or 1
>> +- default_vlan : Specifies Default VLAN for non tagged packets
>> + ALE processing
> Isn't it a device-tree hack for what should belong to a common API ?
Its a hardware feature which stack will not be aware of. It is used in
the ALE filtering
process with a non-tagged packet arrives.
>
> [...]
>> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
>> index a40750e..6c66f01 100644
>> --- a/drivers/net/ethernet/ti/cpsw.c
>> +++ b/drivers/net/ethernet/ti/cpsw.c
> [...]
>> @@ -607,14 +611,41 @@ static void cpsw_slave_open(struct cpsw_slave *slave, struct cpsw_priv *priv)
>> }
>> }
>>
>> +static inline void cpsw_add_default_vlan(struct cpsw_priv *priv)
>> +{
>> + writel(priv->data.default_vlan, &priv->host_port_regs->port_vlan);
>> + if (priv->version == CPSW_VERSION_1) {
>> + slave_write(&priv->slaves[0], priv->data.default_vlan,
>> + CPSW1_PORT_VLAN);
>> + slave_write(&priv->slaves[1], priv->data.default_vlan,
>> + CPSW1_PORT_VLAN);
>> + } else {
>> + slave_write(&priv->slaves[0], priv->data.default_vlan,
>> + CPSW2_PORT_VLAN);
>> + slave_write(&priv->slaves[1], priv->data.default_vlan,
>> + CPSW2_PORT_VLAN);
>> + }
>> + cpsw_ale_add_vlan(priv->ale, priv->data.default_vlan,
>> + ALE_ALL_PORTS << priv->host_port,
>> + ALE_ALL_PORTS << priv->host_port,
>> + ALE_ALL_PORTS << priv->host_port,
>> + (BIT(1) | BIT(2)) << priv->host_port);
>> +}
> static inline void cpsw_add_default_vlan(struct cpsw_priv *priv)
> {
> const int vlan = priv->data.default_vlan;
> const int port = priv->host_port;
> u32 reg;
> int i;
>
> reg = (priv->version == CPSW_VERSION_1) ? CPSW1_PORT_VLAN :
> CPSW2_PORT_VLAN;
>
> writel(vlan, &priv->host_port_regs->port_vlan);
>
> for (int i = 0; i < 2; i++)
> slave_write(priv->slaves + i, vlan, reg);
>
> cpsw_ale_add_vlan(priv->ale, vlan, ALE_ALL_PORTS << port,
> ALE_ALL_PORTS << port, ALE_ALL_PORTS << port,
> (BIT(1) | BIT(2)) << port);
> }
>
> ... or somewhere between both. Your call.
Will modify the code as this looks simpler
>
> [...]
>> @@ -933,6 +967,55 @@ static void cpsw_ndo_poll_controller(struct net_device *ndev)
>> }
>> #endif
>>
>> +static inline void cpsw_add_vlan_ale_entry(struct cpsw_priv *priv,
>> + unsigned short vid)
>> +{
>> + cpsw_ale_add_vlan(priv->ale, vid, ALE_ALL_PORTS << priv->host_port,
>> + 0, ALE_ALL_PORTS << priv->host_port,
>> + (BIT(1) | BIT(2)) << priv->host_port);
> "(BIT(1) | BIT(2))" is repeated a couple of times.
Will replace with port number defines.
>
> [...]
>> +static int cpsw_ndo_vlan_rx_add_vid(struct net_device *ndev,
>> + unsigned short vid)
>> +{
>> + struct cpsw_priv *priv = netdev_priv(ndev);
>> +
>> + if (vid == priv->data.default_vlan)
>> + return 0;
>> +
>> + spin_lock(&priv->lock);
>> +
>> + dev_info(priv->dev, "Adding vlanid %d to vlan filter\n", vid);
>> + cpsw_add_vlan_ale_entry(priv, vid);
>> +
>> + spin_unlock(&priv->lock);
>> + return 0;
>> +}
>> +
>> +static int cpsw_ndo_vlan_rx_kill_vid(struct net_device *ndev,
>> + unsigned short vid)
>> +{
>> + struct cpsw_priv *priv = netdev_priv(ndev);
>> +
>> + if (vid == priv->data.default_vlan)
>> + return 0;
>> +
>> + spin_lock(&priv->lock);
>> +
>> + dev_info(priv->dev, "removing vlanid %d from vlan filter\n", vid);
>> + cpsw_ale_del_vlan(priv->ale, vid, 0);
>> + cpsw_ale_del_ucast(priv->ale, priv->mac_addr,
>> + priv->host_port, ALE_VLAN, vid);
>> + cpsw_ale_del_mcast(priv->ale, priv->ndev->broadcast, 0, ALE_VLAN, vid);
>> +
>> + spin_unlock(&priv->lock);
> What are you trying to achieve with the lock ?
>
> It is not used anywhere else and both cpsw_ndo_vlan_rx_{add, kill}_vid are
> called under RTNL.
Will remove the lock from both apis
Regards
Mugunthan V N
^ permalink raw reply
* [PATCH v2 1/2] drivers: net: cpsw: Add helper functions for VLAN ALE implementation
From: Mugunthan V N @ 2013-01-31 11:09 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130130220208.GA22847@electric-eye.fr.zoreil.com>
On 1/31/2013 3:32 AM, Francois Romieu wrote:
> Mugunthan V N <mugunthanvnm@ti.com> :
> [...]
>> diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c
>> index 0e9ccc2..18b88ce 100644
>> --- a/drivers/net/ethernet/ti/cpsw_ale.c
>> +++ b/drivers/net/ethernet/ti/cpsw_ale.c
> [...]
>> @@ -274,19 +292,26 @@ int cpsw_ale_flush(struct cpsw_ale *ale, int port_mask)
>> return 0;
>> }
>>
>> -int cpsw_ale_add_ucast(struct cpsw_ale *ale, u8 *addr, int port, int flags)
>> +int cpsw_ale_add_ucast(struct cpsw_ale *ale, u8 *addr, int port,
>> + int flags, u16 vid)
>> {
>> u32 ale_entry[ALE_ENTRY_WORDS] = {0, 0, 0};
>> int idx;
>>
>> - cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_ADDR);
>> + if (flags & ALE_VLAN) {
>> + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_VLAN_ADDR);
>> + cpsw_ale_set_vlan_id(ale_entry, vid);
>> + } else {
>> + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_ADDR);
>> + }
>> +
> [...]
>> + if (flags & ALE_VLAN) {
>> + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_VLAN_ADDR);
>> + cpsw_ale_set_vlan_id(ale_entry, vid);
>> + } else {
>> + cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_ADDR);
>> + }
>> +
> It could be fctored out.
Are you mentioning to have static inline function for the above two
statements above?
>
> [...]
>> @@ -362,6 +395,55 @@ int cpsw_ale_del_mcast(struct cpsw_ale *ale, u8 *addr, int port_mask)
>> return 0;
>> }
>>
>> +int cpsw_ale_add_vlan(struct cpsw_ale *ale, u16 vid, int port, int untag,
>> + int reg_mcast, int unreg_mcast)
>> +{
> [...]
>> +int cpsw_ale_del_vlan(struct cpsw_ale *ale, u16 vid, int port_mask)
> [...]
>
> Patch #2 doesn't use the returned status code.
Will modify the prototype to return void
Regards
Mugunthan V N
^ permalink raw reply
* [PATCH v3 15/15] ARM: vexpress/dcscb: probe via device tree
From: Dave Martin @ 2013-01-31 10:54 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <alpine.LFD.2.02.1301301239220.6300@xanadu.home>
On Wed, Jan 30, 2013 at 12:43:29PM -0500, Nicolas Pitre wrote:
> On Wed, 30 Jan 2013, Achin Gupta wrote:
>
> > On Tue, Jan 29, 2013 at 9:41 PM, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:
> > > On Tue, 29 Jan 2013, Rob Herring wrote:
> > >
> > >> On 01/29/2013 01:51 AM, Nicolas Pitre wrote:
> > >> > + node = of_find_compatible_node(NULL, NULL, "arm,dcscb");
> > >>
> > >> This needs binding documentation and should be a more specific name. Not
> > >> knowing what dcscb is, I don't have a suggestion.
The name is 100% specific. The real problem seems to be that it's also
very cryptic, and undocumented.
> > >
> > > Yes, I mentioned in the cover page that DT bindings are not yet
> > > documented.
> > >
> > > DCSCB stands for "Dual Cluster System Control Block". This is in fact a
> > > set of miscellaneous registers, mainly for reset control of individual
> > > CPUs and clusters.
> > >
> > >> Perhaps should include vexpress or specific core tile name it is part
> > >> of.
> > >
> > > /me hopes for some ARM dude more acquainted with their nomenclature to
> > > chime in with suggestions.
> > >
> >
> > As nico said, the DCSCB is just a reset controller thats a part of the
> > FastModels implementation. The implementation should be referred to as
> > VE bL RTSM. The official name goes by:
> >
> > RTSM_VE_Cortex-A15x4-A7x4
> > RTSM_VE_Cortex-A15x1-A7x1
> >
> > The file should be renamed as bL_rtsm.c or something similar.
>
> I don't think the file name is a problem. Actually, going with
> bL_rtsm.c is rather too generic for what itcovers.
>
> It's the actual device tree binding name that I'd need suggestions for.
We could go for a slightly more generic, informative name like
arm,dcscb-system-controller
Any views on that?
I think the most important thing is to document the binding, though.
As discussed, this thing appears in the fast models, but we don't
anticipate its being used in real SoCs because they will usually need
something more sophisticated.
Cheers
---Dave
^ permalink raw reply
* Failure to boot...
From: Russell King - ARM Linux @ 2013-01-31 10:40 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130131092024.GN2637@n2100.arm.linux.org.uk>
On Thu, Jan 31, 2013 at 09:20:24AM +0000, Russell King - ARM Linux wrote:
> On Wed, Jan 30, 2013 at 11:19:40PM -0500, Nicolas Pitre wrote:
> > Better yet (IMHO): just enable the zboot command in U-Boot to let you
> > boot a zImage binary directly.
>
> I wish it were that easy but it isn't. I've no idea where to get a
> version of uboot for my boards which supports that; TI have always
> supplied updates to uboot for me, and with the current state of TI
> being afaict in chaos.
>
> TI have always supplied a replacement X-Loader with each uboot update.
> I've no idea what X-Loader is or why both get updated together, but...
>
> Moreover, I doubt that the 3430LDP, of which there are multiple versions,
> will ever see a uboot update. It already suffers from a lack of correct
> kernel support due to random wiring changes between these versions (the
> keypad doesn't work correctly) and I've yet to indentify which version
> it is despite downloading the circuits. So trying to locate the right
> uboot will be impossible there.
>
> So, I'm _stuck_ with uImages for these platforms.
Right, so I'm now passing LOADADDR= which allows this to work - and the
latest OMAP4430SDP boot result shows almost the same sad broken story.
^ permalink raw reply
* [PATCH 3/3] ARM: davinci: da850: add mmc DT entries
From: Manjunathappa, Prakash @ 2013-01-31 10:33 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359628387-14437-1-git-send-email-prakash.pm@ti.com>
Add DT entry for MMC. Also add entry for pinmux information.
Tested on da850-evm without card detect and EDMA support as
DT support for GPIO and EDMA are yet come.
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Cc: linux-mmc at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-kernel at vger.kernel.org
Cc: davinci-linux-open-source at linux.davincidsp.com
Cc: devicetree-discuss at lists.ozlabs.org
Cc: cjb at laptop.org
Cc: Sekhar Nori <nsekhar@ti.com>
---
arch/arm/boot/dts/da850-evm.dts | 13 +++++++++++++
arch/arm/boot/dts/da850.dtsi | 15 +++++++++++++++
2 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index fa04152..51c87e7 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -30,6 +30,19 @@
rtc0: rtc at 1c23000 {
status = "okay";
};
+ mmc0: mmc at 1c40000 {
+ status = "okay";
+ bus-width = <4>;
+ max-frequency = <50000000>;
+ /*
+ * BIT(1) MMC_CAP_MMC_HIGHSPEED
+ * BIT(2) MMC_CAP_SD_HIGHSPEED
+ */
+ caps = <6>;
+ version = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc0_pins>;
+ };
};
nand_cs3 at 62000000 {
status = "okay";
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 099c81e..5978a83 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -56,6 +56,15 @@
0x30 0x01100000 0x0ff00000
>;
};
+ mmc0_pins: pinmux_mmc_pins {
+ pinctrl-single,bits = <
+ /* MMCSD0_DAT[3] MMCSD0_DAT[2]
+ * MMCSD0_DAT[1] MMCSD0_DAT[0]
+ * MMCSD0_CMD MMCSD0_CLK
+ */
+ 0x28 0x00222222 0x00ffffff
+ >;
+ };
};
serial0: serial at 1c42000 {
compatible = "ns16550a";
@@ -88,6 +97,12 @@
19>;
status = "disabled";
};
+ mmc0: mmc at 1c40000 {
+ compatible = "ti,davinci_mmc";
+ reg = <0x40000 0x1000>;
+ interrupts = <16>;
+ status = "disabled";
+ };
};
nand_cs3 at 62000000 {
compatible = "ti,davinci-nand";
--
1.7.4.1
^ permalink raw reply related
* [PATCH 2/3] mmc: davinci_mmc: add DT support
From: Manjunathappa, Prakash @ 2013-01-31 10:33 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359628387-14437-1-git-send-email-prakash.pm@ti.com>
Adds device tree support for davinci_mmc. Also add
binding documentation.
Tested with non-dma PIO mode and without GPIO
card_detect/write_protect option because of
dependencies on EDMA and GPIO modules DT support.
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Cc: linux-mmc at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-kernel at vger.kernel.org
Cc: davinci-linux-open-source at linux.davincidsp.com
Cc: devicetree-discuss at lists.ozlabs.org
Cc: cjb at laptop.org
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: mporter at ti.com
---
.../devicetree/bindings/mmc/davinci_mmc.txt | 23 +++++++
drivers/mmc/host/davinci_mmc.c | 69 +++++++++++++++++++-
2 files changed, 91 insertions(+), 1 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mmc/davinci_mmc.txt
diff --git a/Documentation/devicetree/bindings/mmc/davinci_mmc.txt b/Documentation/devicetree/bindings/mmc/davinci_mmc.txt
new file mode 100644
index 0000000..144bee6
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/davinci_mmc.txt
@@ -0,0 +1,23 @@
+* TI Highspeed MMC host controller for DaVinci
+
+The Highspeed MMC Host Controller on TI DaVinci family
+provides an interface for MMC, SD and SDIO types of memory cards.
+
+This file documents differences between the core properties described
+by mmc.txt and the properties used by the davinci_mmc driver.
+
+Required properties:
+- compatible:
+ Should be "ti,davinci_mmc", for davinci controllers
+
+Optional properties:
+- bus-width: Number of data lines, can be <1>, <4>, or <8>, default <1>
+- max-frequency: maximum operating clock frequency.
+- caps: Check for Host capabilities in <linux/mmc/host.h>
+- version: version of controller.
+Example:
+ mmc1: mmc at 0x4809c000 {
+ compatible = "ti,omap4-hsmmc";
+ reg = <0x4809c000 0x400>;
+ bus-width = <4>;
+ };
diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index 382b79d..ce6730d 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -34,6 +34,7 @@
#include <linux/dma-mapping.h>
#include <linux/edma.h>
#include <linux/mmc/mmc.h>
+#include <linux/of.h>
#include <linux/platform_data/mmc-davinci.h>
@@ -1156,16 +1157,75 @@ static void __init init_mmcsd_host(struct mmc_davinci_host *host)
mmc_davinci_reset_ctrl(host, 0);
}
+#ifdef CONFIG_OF
+static struct davinci_mmc_config
+ *mmc_of_get_pdata(struct platform_device *pdev)
+{
+ struct device_node *np;
+ struct davinci_mmc_config *pdata = NULL;
+ u32 data;
+ int ret;
+
+ pdata = pdev->dev.platform_data;
+ if (!pdata) {
+ pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
+ if (!pdata) {
+ dev_err(&pdev->dev, "Failed to allocate memory for struct davinci_mmc_config\n");
+ goto nodata;
+ }
+ }
+
+ np = pdev->dev.of_node;
+ if (!np)
+ goto nodata;
+
+ ret = of_property_read_u32(np, "bus-width", &data);
+ if (ret)
+ dev_info(&pdev->dev, "wires not specified, defaulting to 4 bit mode\n");
+ pdata->wires = data;
+
+ ret = of_property_read_u32(np, "max-frequency", &data);
+ if (ret)
+ dev_info(&pdev->dev, "max-frequency not specified, defaulting to 25MHz\n");
+ pdata->max_freq = data;
+
+ ret = of_property_read_u32(np, "caps", &data);
+ if (ret)
+ dev_info(&pdev->dev, "card capability not specified\n");
+ pdata->caps = data;
+
+ ret = of_property_read_u32(np, "version", &data);
+ if (ret)
+ dev_err(&pdev->dev, "version not specified\n");
+ pdata->version = data;
+
+nodata:
+ return pdata;
+}
+
+#else
+static struct davinci_mmc_config
+ *mmc_of_get_pdata(struct platform_device *pdev)
+{
+ return pdev->dev.platform_data;
+}
+#endif
static int __init davinci_mmcsd_probe(struct platform_device *pdev)
{
- struct davinci_mmc_config *pdata = pdev->dev.platform_data;
+ struct davinci_mmc_config *pdata = NULL;
struct mmc_davinci_host *host = NULL;
struct mmc_host *mmc = NULL;
struct resource *r, *mem = NULL;
int ret = 0, irq = 0;
size_t mem_size;
+ pdata = mmc_of_get_pdata(pdev);
+ if (pdata == NULL) {
+ dev_err(&pdev->dev, "Can not get platform data\n");
+ return -ENOENT;
+ }
+
/* REVISIT: when we're fully converted, fail if pdata is NULL */
ret = -ENODEV;
@@ -1403,11 +1463,18 @@ static const struct dev_pm_ops davinci_mmcsd_pm = {
#define davinci_mmcsd_pm_ops NULL
#endif
+static const struct of_device_id davinci_mmc_of_match[] = {
+ {.compatible = "ti,davinci_mmc", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, davinci_mmc_of_match);
+
static struct platform_driver davinci_mmcsd_driver = {
.driver = {
.name = "davinci_mmc",
.owner = THIS_MODULE,
.pm = davinci_mmcsd_pm_ops,
+ .of_match_table = of_match_ptr(davinci_mmc_of_match),
},
.remove = __exit_p(davinci_mmcsd_remove),
};
--
1.7.4.1
^ permalink raw reply related
* [PATCH 1/3] ARM: davinci: da850: override mmc DT node device name
From: Manjunathappa, Prakash @ 2013-01-31 10:33 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359628387-14437-1-git-send-email-prakash.pm@ti.com>
Populate OF_DEV_AUXDATA with desired device name expected by
davinci_mmc driver. Without this clk_get of davinci_mmc DT driver
fails.
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Cc: linux-mmc at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-kernel at vger.kernel.org
Cc: davinci-linux-open-source at linux.davincidsp.com
Cc: devicetree-discuss at lists.ozlabs.org
Cc: cjb at laptop.org
Cc: Sekhar Nori <nsekhar@ti.com>
---
arch/arm/mach-davinci/da8xx-dt.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 37c27af..c623db0 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -39,9 +39,15 @@ static void __init da8xx_init_irq(void)
#ifdef CONFIG_ARCH_DAVINCI_DA850
+static const struct of_dev_auxdata da8xx_auxdata[] __initconst = {
+ OF_DEV_AUXDATA("ti,davinci_mmc", 0x01c40000, "davinci_mmc.0", NULL),
+ {},
+};
+
static void __init da850_init_machine(void)
{
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+ of_platform_populate(NULL, of_default_bus_match_table, da8xx_auxdata,
+ NULL);
da8xx_uart_clk_enable();
}
--
1.7.4.1
^ permalink raw reply related
* [PATCH 0/3] Add DT support for davinci_mmc driver
From: Manjunathappa, Prakash @ 2013-01-31 10:33 UTC (permalink / raw)
To: linux-arm-kernel
Patch set adds DT support for davinci_mmc driver and is
verified on da850-evm without card_detect/write_protect and
EDMA support.
This patch depends on below patches under review:
1) Patch "pinctrl: pinctrl-single: use arch_initcall and module_exit"
http://www.gossamer-threads.com/lists/linux/kernel/1669067
2) Patch "drivers/pinctrl: grab default handles from device core"
http://www.gossamer-threads.com/lists/linux/kernel/1664015?page=last
3) Patch "mmc: davinci: allow driver to work without DMA resource"
http://permalink.gmane.org/gmane.linux.kernel.mmc/18978
Applies on top of v3.9/dt branch of linux_davinci tree:
git://gitorious.org/linux-davinci/linux-davinci.git
Manjunathappa, Prakash (3):
ARM: davinci: da850: override mmc DT node device name
mmc: davinci_mmc: add DT support
ARM: davinci: da850: add mmc DT entries
.../devicetree/bindings/mmc/davinci_mmc.txt | 23 +++++++
arch/arm/boot/dts/da850-evm.dts | 13 ++++
arch/arm/boot/dts/da850.dtsi | 15 ++++
arch/arm/mach-davinci/da8xx-dt.c | 8 ++-
drivers/mmc/host/davinci_mmc.c | 69 +++++++++++++++++++-
5 files changed, 126 insertions(+), 2 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mmc/davinci_mmc.txt
--
1.7.4.1
^ permalink raw reply
* [PATCH v9 00/20] OMAP USB Host cleanup
From: Roger Quadros @ 2013-01-31 10:31 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1358937492-8129-1-git-send-email-rogerq@ti.com>
Hi Samuel,
Could you please pull this if it looks OK? Thanks :).
cheers,
-roger
On 01/23/2013 12:37 PM, Roger Quadros wrote:
> Hi Samuel,
>
> I think this series is in a pretty good shape to pull now :). I've added
> Reviewed-by and Acked-by tags. You can please pull from below.
>
> NOTE: the first patch is a stable fix so Greg KH might want to pick it up for 3.8-rc.
>
> The following changes since commit 7d1f9aeff1ee4a20b1aeb377dd0f579fe9647619:
>
> Linux 3.8-rc4 (2013-01-17 19:25:45 -0800)
>
> are available in the git repository at:
> git://github.com/rogerq/linux.git linux-usbhost14-part
>
> This patchset addresses the following
>
> - Consolidate USB Host platform data.
> - Avoid addressing clocks one by one by name and use a for loop + bunch
> of cleanups.
> - Get number of channels/ports dynamically either from revision register
> or from platform data. Avoids getting clocks that are not present.
> - Add OMAP5 and HSIC mode (Not tested).
>
> v9:
> - Addressed clock framework related comments from Russell King.
> - Removed 2 clock data patches from the series as they will be taken care
> of by Paul Walmsey.
>
> v8:
> - Re-arranged patch "USB-ehci-omap-Don-t-free-gpios-that-we-didn-t-reques.patch"
> to be the first since it is a candidate for stable.
> - Fixed issues raised by Felipe, i.e. indentation and use of switch ()
>
> v7:
> - Updated patch 4 to not hold a spinlock when using clk_get().
> - Updated patches 3 and 11 to return -EADDRNOTAVAIL on failure of
> demv_request_and_ioremap().
>
> v6:
> - Added USB Host platform data consolidation patch as the first patch.
> based on request from Tony.
> - Rebased on v3.8-rc3.
>
> v5:
> - Rebased on top of todays arm-soc/for-next.
> - Removed the clock merging patch from the list.
> - Updated patches 14, 19 and 20 to accomodate the above change.
> - Added patch 22 to fix a build warning.
>
> v4:
> - Added appropriate maintainers in to/cc.
> - minor print message fix in patch 23 to maintain consistency.
>
> v3:
> - Rebased on arm-soc/for-next commit f979306c4d38d213c6977aaf3b1115e8ded71e3a.
> - Rearranged patch that get rids of cpu_is_omap..() macros.
> - Coding style fixes.
>
> v2:
> - Clocks are allocated dynamically based on number of ports available
> on the platform.
> - Reduced console spam if non critical clocks are not found on the platform.
> - Get rid of cpu_is_.. macros from USB host driver.
>
> cheers,
> -roger
>
> ---
> Roger Quadros (20):
> USB: ehci-omap: Don't free gpios that we didn't request
> mfd: omap-usb-host: Consolidate OMAP USB-HS platform data
> mfd: omap-usb-tll: Fix channel count detection
> mfd: omap-usb-tll: Use devm_kzalloc/ioremap and clean up error path
> mfd: omap-usb-tll: Clean up clock handling
> mfd: omap-usb-tll: introduce and use mode_needs_tll()
> mfd: omap-usb-tll: Check for missing platform data in probe
> mfd: omap-usb-tll: Fix error message
> mfd: omap-usb-tll: serialize access to TLL device
> mfd: omap-usb-tll: Add OMAP5 revision and HSIC support
> mfd: omap_usb_host: Avoid missing platform data checks in suspend/resume
> mfd: omap-usb-host: Use devm_kzalloc() and devm_request_and_ioremap()
> mfd: omap-usb-host: know about number of ports from revision register
> mfd: omap-usb-host: override number of ports from platform data
> mfd: omap-usb-host: cleanup clock management code
> mfd: omap-usb-host: Manage HSIC clocks for HSIC mode
> mfd: omap-usb-host: Get rid of unnecessary spinlock
> mfd: omap-usb-host: clean up omap_usbhs_init()
> mfd: omap-usb-host: Don't spam console on clk_set_parent failure
> mdf: omap-usb-host: get rid of build warning
>
> arch/arm/mach-omap2/board-3430sdp.c | 2 +-
> arch/arm/mach-omap2/board-3630sdp.c | 2 +-
> arch/arm/mach-omap2/board-am3517crane.c | 2 +-
> arch/arm/mach-omap2/board-am3517evm.c | 2 +-
> arch/arm/mach-omap2/board-cm-t35.c | 2 +-
> arch/arm/mach-omap2/board-cm-t3517.c | 2 +-
> arch/arm/mach-omap2/board-devkit8000.c | 2 +-
> arch/arm/mach-omap2/board-igep0020.c | 4 +-
> arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
> arch/arm/mach-omap2/board-omap3evm.c | 2 +-
> arch/arm/mach-omap2/board-omap3pandora.c | 2 +-
> arch/arm/mach-omap2/board-omap3stalker.c | 2 +-
> arch/arm/mach-omap2/board-omap3touchbook.c | 2 +-
> arch/arm/mach-omap2/board-omap4panda.c | 2 +-
> arch/arm/mach-omap2/board-overo.c | 2 +-
> arch/arm/mach-omap2/board-zoom.c | 2 +-
> arch/arm/mach-omap2/usb-host.c | 29 +--
> arch/arm/mach-omap2/usb.h | 20 +-
> drivers/mfd/omap-usb-host.c | 558 +++++++++++++++++-----------
> drivers/mfd/omap-usb-tll.c | 243 +++++++------
> drivers/usb/host/ehci-omap.c | 14 +-
> include/linux/platform_data/usb-omap.h | 24 +-
> 22 files changed, 497 insertions(+), 425 deletions(-)
>
^ permalink raw reply
* [PATCH v2 0/4] Preparatory GIC patches for arm64 support
From: Catalin Marinas @ 2013-01-31 10:30 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359476319-23720-1-git-send-email-catalin.marinas@arm.com>
Olof, Arnd,
On Tue, Jan 29, 2013 at 04:18:35PM +0000, Catalin Marinas wrote:
> That's the second version of the GIC clean-up patches to support arm64.
> The only change from v1 is that the second patch (chained_irq.h) also
> covers drivers/gpio and drivers/pinctrl (#include change).
Are you ok to merge this series via the arm-soc tree for 3.9-rc1? There
are no complaints so far (only acks ;). This would allow me to push GIC
support for arm64.
Thanks,
Catalin
Stats below for reference:
> Catalin Marinas (4):
> arm: Move the set_handle_irq and handle_arch_irq declarations to
> asm/irq.h
> arm: Move chained_irq_(enter|exit) to a generic file
> irqchip: gic: Call handle_bad_irq() directly
> irqchip: gic: Perform the gic_secondary_init() call via CPU notifier
>
> arch/arm/include/asm/irq.h | 5 +++
> arch/arm/include/asm/mach/irq.h | 36 --------------------
> arch/arm/mach-at91/gpio.c | 3 +-
> arch/arm/mach-exynos/common.c | 1 +
> arch/arm/mach-exynos/platsmp.c | 8 -----
> arch/arm/mach-highbank/platsmp.c | 7 ----
> arch/arm/mach-imx/platsmp.c | 12 -------
> arch/arm/mach-msm/platsmp.c | 8 -----
> arch/arm/mach-omap2/omap-smp.c | 7 ----
> arch/arm/mach-shmobile/smp-emev2.c | 7 ----
> arch/arm/mach-shmobile/smp-r8a7779.c | 7 ----
> arch/arm/mach-shmobile/smp-sh73a0.c | 7 ----
> arch/arm/mach-socfpga/platsmp.c | 12 -------
> arch/arm/mach-spear13xx/platsmp.c | 8 -----
> arch/arm/mach-tegra/platsmp.c | 8 -----
> arch/arm/mach-ux500/platsmp.c | 8 -----
> arch/arm/plat-samsung/irq-vic-timer.c | 3 +-
> arch/arm/plat-samsung/s5p-irq-gpioint.c | 3 +-
> arch/arm/plat-versatile/platsmp.c | 8 -----
> drivers/gpio/gpio-msm-v2.c | 3 +-
> drivers/gpio/gpio-mxc.c | 2 +-
> drivers/gpio/gpio-omap.c | 3 +-
> drivers/gpio/gpio-pl061.c | 2 +-
> drivers/gpio/gpio-pxa.c | 3 +-
> drivers/gpio/gpio-tegra.c | 3 +-
> drivers/irqchip/irq-gic.c | 32 +++++++++++++-----
> drivers/irqchip/irq-vic.c | 2 +-
> drivers/pinctrl/pinctrl-at91.c | 3 +-
> drivers/pinctrl/pinctrl-exynos.c | 3 +-
> drivers/pinctrl/pinctrl-nomadik.c | 2 +-
> drivers/pinctrl/pinctrl-sirf.c | 2 +-
> drivers/pinctrl/spear/pinctrl-plgpio.c | 2 +-
> drivers/staging/imx-drm/ipu-v3/ipu-common.c | 2 +-
> include/linux/irqchip/arm-gic.h | 1 -
> include/linux/irqchip/chained_irq.h | 52 +++++++++++++++++++++++++++++
> 35 files changed, 97 insertions(+), 178 deletions(-)
> create mode 100644 include/linux/irqchip/chained_irq.h
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox