Re: [PATCH] spi: omap2-mcspi: add runtime PM to set_cs()

2015-08-30 Thread Jarkko Nikula
Hi

On 07/24/2015 07:39 PM, Mark Brown wrote:
 On Wed, Jul 22, 2015 at 08:46:09PM +0200, Sebastian Reichel wrote:
 Since commit ddcad7e9068eb omap2_mcspi_set_cs() is called without
 runtime power management requested. Thus the below kernel oops may be
 generated if a device is accessed after the runtime power management
 timeout. This patch fixes the problem by requesting runtime power
 management in omap2_mcspi_set_cs().

 [   13.933959] Unhandled fault: external abort on non-linefetch (0x1028) at 
 0xfa09802c
 [   13.940490] pgd = cfb38000
 [   13.946594] [fa09802c] *pgd=48011452(bad)
 [   13.952758] Internal error: : 1028 [#1] PREEMPT ARM
 [   13.958862] Modules linked in: tsc2005(+) omap_sham twl4030_wdt omap_wdt
 [   13.965332] CPU: 0 PID: 183 Comm: modprobe Not tainted 4.2.0-rc1+ #363
 [   13.971801] Hardware name: Nokia RX-51 board
 [   13.978302] task: cf572300 ti: cb1f2000 task.ti: cb1f2000
 [   13.984924] PC is at omap2_mcspi_set_cs+0x44/0x4c
 [   13.991485] LR is at spi_set_cs+0x5c/0x60
 
 Please don't paste entire backtraces into commit messages, they are very
 large and almost entirely noise (for example in this case the entire
 explanation is in the commit message itself).  If you feel a backtrace
 helps clarify things then please present an *edited* highlight of the
 relevant sections.
 present
 
Is there update to this patch? I don't see such in 4.2.0-rc8+. I hit
this same issue on Nokia N900 WLAN (CONFIG_WL1251=m and
CONFIG_WL1251_SPI=m) and googling lead to this patch which made the WLAN
working.

If you are going to resend this, please feel free to add my tested by:

Tested-by: Jarkko Nikula jarkko.nik...@bitmer.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Nokia N900 - audio TPA6130A2 problems

2015-08-03 Thread Jarkko Nikula
Hi

On 08/01/2015 01:18 PM, Pali Rohár wrote:
 On Saturday 25 July 2015 15:17:13 Lars-Peter Clausen wrote:
 On 07/25/2015 12:28 PM, Pali Rohár wrote:
 Hello,

 sometimes after rebooting Nokia N900 initializing alsa audio fails.
 Here output from dmesg log when it happen:

 [6.925140] tpa6130a2 2-0060: Write failed
 [6.929534] tpa6130a2 2-0060: Failed to initialize chip
 [6.935272] tpa6130a2: probe of 2-0060 failed with error -121
 [7.624237] rx51-audio n900-audio: Failed to add TPA6130A2
 controls [7.635101] rx51-audio n900-audio: ASoC: failed to
 init TLV320AIC34: -19 [7.645874] rx51-audio n900-audio: ASoC:
 failed to instantiate card -19 [7.665740] rx51-audio
 n900-audio: snd_soc_register_card failed (-19) [8.063049] ALSA
 device list:
 [8.070343]   No soundcards found.

 Any idea what to do?

 Looks like the chip is not responding. Try to add a small delay after
 powerup to give the device to be fully ready, something like the
 following:

 --- a/sound/soc/codecs/tpa6130a2.c
 +++ b/sound/soc/codecs/tpa6130a2.c
 @@ -152,6 +152,8 @@ static int tpa6130a2_power(u8 power)
  if (data-power_gpio = 0)
  gpio_set_value(data-power_gpio, 1);

 +msleep(5);
 +
  data-power_state = 1;
  ret = tpa6130a2_initialize();
  if (ret  0) {
 
 
 Hello, your patch did not helped. Problem is still there...
 
For me v4.2-rc5 works, i.e. TPA6130A2 can still play loudly to
headphones. Don't know were there any i2c etc regression before it or
how easy it would be to reproduce.

Logs below made me thinking can it be a HW issue? Although if it is an
HW issue it shouldn't work sometimes I guess. Do you have any earlier
well known configuration you could try is it an SW regression or
something else?

 [5.962585] tpa6130a2 2-0060: Write failed
 [5.962707] tpa6130a2 2-0060: Failed to initialize chip
 [5.962860] tpa6130a2: probe of 2-0060 failed with error -121

-121 == EREMOTEIO which is returned from i2c-omap.c when there is no ACK
from the chip.

 [   28.102233] omap_i2c 48072000.i2c: controller timed out
 [   29.463653] lp5523x 2-0032: lp5523 Programmable led chip found
 [   30.734191] omap_i2c 48072000.i2c: controller timed out waiting for start 
 condition to finish
 [   32.142333] i2c i2c-2: SCL is stuck low, exit recovery

If SCL is really stuck it also explains why chip doesn't acknowledge.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Nokia N900 - audio TPA6130A2 problems

2015-08-03 Thread Jarkko Nikula
On 08/03/2015 09:17 PM, Pali Rohár wrote:
 On Monday 03 August 2015 20:03:16 Jarkko Nikula wrote:
 Hi

 On 08/01/2015 01:18 PM, Pali Rohár wrote:
 On Saturday 25 July 2015 15:17:13 Lars-Peter Clausen wrote:
 Hello, your patch did not helped. Problem is still there...

 For me v4.2-rc5 works, i.e. TPA6130A2 can still play loudly to
 headphones. Don't know were there any i2c etc regression before it or
 how easy it would be to reproduce.

 
 Did you tested it on Nokia N900? Or other device?
 
N900. Seems to be only user of TPA6130A2 in mainline :-)

 Logs below made me thinking can it be a HW issue? Although if it is
 an HW issue it shouldn't work sometimes I guess. Do you have any
 earlier well known configuration you could try is it an SW
 regression or something else?

 
 Stock Nokia's 2.6.28 kernel works always. With that kernel I have never 
 seen this problem. So I do not think this is HW problem.
 
 This problem is there in more kernel versions, maybe in some older (like 
 v3.5) is was there not so often. But do not remember correctly...

It is well possible that some regression got introduced to TPA6130A2 I2C
communication over the years without nobody than you now notices. We
used to do QA back in Meego N900 days but that was pre 3.x kernels.

 Maybe some power management problem? Something is not always initialized 
 correctly?
 
 I remember that there is some problem (maybe in NoLo - Nokia bootloader) 
 that sometimes chainloaded U-Boot (booted via NoLo) is not able to 
 initialize mmc chip (all read operation fails). In U-Boot I added some 
 code to enable some parts in twl4030 regulator and after that mmc is 
 working always...
 
 So maybe something similar? Kernel expects that some PM or regulator 
 parts are initialized, but they are only sometimes? Just speculation...

I'm thinking the same. I could figure SCL could be stuck low if TPA or
some other chip connected to the same I2C bus is without power and is
pulling I2C signals down.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RESEND] ARM: dts: OMAP3-N900: Add microphone bias voltages

2015-03-30 Thread Jarkko Nikula
On 03/30/2015 07:42 PM, Tony Lindgren wrote:
 * Jarkko Nikula jarkko.nik...@bitmer.com [150330 09:31]:
 On 03/01/2015 09:07 PM, Jarkko Nikula wrote:
 From: Pavel Machek pa...@ucw.cz

 N900 audio recording needs that codec provides bias voltage for integrated
 digital microphone and headset microphone depending which one is used.
 Digital microphone uses 2 V bias and it comes from the codec A part. Codec
 B part drives the headset microphone bias and that is set to 2.5 V.

 Signed-off-by: Pavel Machek pa...@ucw.cz
 [Jarkko: Headset mic bias changed to 2 (2.5 V) as it was before commit
 e2e8bfdf6157 (ASoC: tlv320aic3x: Convert mic bias to a supply widget)]
 Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
 ---
  arch/arm/boot/dts/omap3-n900.dts | 4 
  1 file changed, 4 insertions(+)

 Ping?
 
 Oops sorry I have missed this one. This looks like a regression fix
 for the v4.0-rc series? Should it be cc stable v3.16+ or something?
 
Well, there has been regression but finding exactly how far should the
fix go didn't look instantly straightforward due all DT, codec driver
mic bias etc changes and I ended up not cc'ing stable.

But well, I guess first kernel where this commit makes sense is 3.16+
due commit f7d0f2a08567 (ARM: dts: omap3-n900: Add sound support).
Although it applies on top of commit 14e3e295b2b9 (ARM: dts:
omap3-n900: Add TLV320AIC3X support) too (3.12+) but not before that.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RESEND] ARM: dts: OMAP3-N900: Add microphone bias voltages

2015-03-30 Thread Jarkko Nikula
On 03/01/2015 09:07 PM, Jarkko Nikula wrote:
 From: Pavel Machek pa...@ucw.cz
 
 N900 audio recording needs that codec provides bias voltage for integrated
 digital microphone and headset microphone depending which one is used.
 Digital microphone uses 2 V bias and it comes from the codec A part. Codec
 B part drives the headset microphone bias and that is set to 2.5 V.
 
 Signed-off-by: Pavel Machek pa...@ucw.cz
 [Jarkko: Headset mic bias changed to 2 (2.5 V) as it was before commit
 e2e8bfdf6157 (ASoC: tlv320aic3x: Convert mic bias to a supply widget)]
 Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
 ---
  arch/arm/boot/dts/omap3-n900.dts | 4 
  1 file changed, 4 insertions(+)
 
Ping?

-- 
Jarkko

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ASoC: omap-pcm: Allow only formats with 1, 2, and 4 byte physical size

2015-03-03 Thread Jarkko Nikula
On Tue, Mar 03, 2015 at 01:41:21PM +0200, Peter Ujfalusi wrote:
 On 03/03/2015 01:28 PM, Jyri Sarha wrote:
  sDMA support only transfer elements with 1, 2, and 4 byte physical
  size. Initialize the pcm driver accordingly.
 
 Acked-by: Peter Ujfalusi peter.ujfal...@ti.com
 
  
  Signed-off-by: Jyri Sarha jsa...@ti.com
  ---
   sound/soc/omap/omap-pcm.c | 21 -
   1 file changed, 20 insertions(+), 1 deletion(-)
  
  diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
  index f4b05bc..e49ee23 100644
  --- a/sound/soc/omap/omap-pcm.c
  +++ b/sound/soc/omap/omap-pcm.c
  @@ -39,7 +39,7 @@
   #define pcm_omap1510() 0
   #endif
   
  -static const struct snd_pcm_hardware omap_pcm_hardware = {
  +static struct snd_pcm_hardware omap_pcm_hardware = {
  .info   = SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_INTERLEAVED |
  @@ -53,6 +53,24 @@ static const struct snd_pcm_hardware omap_pcm_hardware = 
  {
  .buffer_bytes_max   = 128 * 1024,
   };
   
  +/* sDMA supports only 1, 2, and 4 byte transfer elements. */
  +static void omap_pcm_limit_supported_formats(void)
  +{
  +   int i;
  +
  +   for (i = 0; i  SNDRV_PCM_FORMAT_LAST; i++) {
  +   switch (snd_pcm_format_physical_width(i)) {
  +   case 8:
  +   case 16:
  +   case 32:
  +   omap_pcm_hardware.formats |= (1LL  i);
  +   break;
  +   default:
  +   break;
  +   }
  +   }
  +}
  +

I wonder why these are set in a loop instead of setting formats statically
and why this is needed after commit 60e21d287344 (ASoC: omap: Don't set
unused struct snd_pcm_hardware fields)?

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH RESEND] ARM: dts: OMAP3-N900: Add microphone bias voltages

2015-03-01 Thread Jarkko Nikula
From: Pavel Machek pa...@ucw.cz

N900 audio recording needs that codec provides bias voltage for integrated
digital microphone and headset microphone depending which one is used.
Digital microphone uses 2 V bias and it comes from the codec A part. Codec
B part drives the headset microphone bias and that is set to 2.5 V.

Signed-off-by: Pavel Machek pa...@ucw.cz
[Jarkko: Headset mic bias changed to 2 (2.5 V) as it was before commit
e2e8bfdf6157 (ASoC: tlv320aic3x: Convert mic bias to a supply widget)]
Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 arch/arm/boot/dts/omap3-n900.dts | 4 
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index db80f9d376fa..9c8bdf2c93a1 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -484,6 +484,8 @@
DRVDD-supply = vmmc2;
IOVDD-supply = vio;
DVDD-supply = vio;
+
+   ai3x-micbias-vg = 1;
};
 
tlv320aic3x_aux: tlv320aic3x@19 {
@@ -495,6 +497,8 @@
DRVDD-supply = vmmc2;
IOVDD-supply = vio;
DVDD-supply = vio;
+
+   ai3x-micbias-vg = 2;
};
 
tsl2563: tsl2563@29 {
-- 
2.1.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: v3.19: Nokia N900 - auto not working

2015-01-31 Thread Jarkko Nikula
Hi

On 01/31/2015 11:35 AM, Pali Rohár wrote:
 Hello,
 
 audio on (real) n900 device does not working with 3.19 kernel. Here is 
 relevant dmesg output:
 
 [5.687438] omap_i2c 4807.i2c: bus 1 rev3.3 at 2200 kHz
 [5.696166] tpa6130a2 2-0060: Write failed
 [5.696228] tpa6130a2 2-0060: Failed to initialize chip
 [5.696380] tpa6130a2: probe of 2-0060 failed with error -121
 [5.697937] omap_i2c 48072000.i2c: bus 2 rev3.3 at 100 kHz
 [5.700256] omap_i2c 4806.i2c: bus 3 rev3.3 at 400 kHz
 [6.289154] rx51-audio n900-audio: Failed to add TPA6130A2 controls
 [6.295715] rx51-audio n900-audio: ASoC: failed to init TLV320AIC34: -19
 [6.302459] rx51-audio n900-audio: ASoC: failed to instantiate card -19
 [6.309173] gpiod_unexport: invalid GPIO
 [6.315612] rx51-audio n900-audio: snd_soc_register_card failed (-19)
 [6.397949] ALSA device list:
 [6.404876]   No soundcards found.
 
 Any idea why tpa6130a2 fails to initialize?
 
 I applied also these patches:
 https://lkml.org/lkml/2015/1/29/465
 http://mailman.alsa-project.org/pipermail/alsa-devel/2015-January/087228.html
 
Here probes and plays from headset fine on top of
1c999c47a9f1 Merge tag 'dm-3.19-fixes-3' of
git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm

I have above patches and these two:
http://marc.info/?l=devicetreem=142264840506833w=2
http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=8294/1

Your error code -121, -EREMOTEIO suggests that chip doesn't acknowledge
its address on i2c bus when trying to communicate with it. I don't know
what can cause it. Could it be some timing or probe ordering issue? I
have CONFIG_I2C_OMAP=y and sound drivers including
CONFIG_SND_SOC_TPA6130A2 as modules.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: dst: OMAP3-N900: Add microphone bias voltages

2015-01-30 Thread Jarkko Nikula
From: Pavel Machek pa...@ucw.cz

N900 audio recording needs that codec provides bias voltage for integrated
digital microphone and headset microphone depending which one is used.
Digital microphone uses 2 V bias and it comes from the codec A part. Codec
B part drives the headset microphone bias and that is set to 2.5 V.

Signed-off-by: Pavel Machek pa...@ucw.cz
[Jarkko: Headset mic bias changed to 2 (2.5 V) as it was before commit
e2e8bfdf6157 (ASoC: tlv320aic3x: Convert mic bias to a supply widget)]
Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
Pavel: I hope you don't mind I took your diff from
http://marc.info/?l=linux-kernelm=142249383224678w=2
and added your Signed-off-by?
---
 arch/arm/boot/dts/omap3-n900.dts | 4 
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index b550c41b46f1..f7858f5974e3 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -478,6 +478,8 @@
DRVDD-supply = vmmc2;
IOVDD-supply = vio;
DVDD-supply = vio;
+
+   ai3x-micbias-vg = 1;
};
 
tlv320aic3x_aux: tlv320aic3x@19 {
@@ -489,6 +491,8 @@
DRVDD-supply = vmmc2;
IOVDD-supply = vio;
DVDD-supply = vio;
+
+   ai3x-micbias-vg = 2;
};
 
tsl2563: tsl2563@29 {
-- 
2.1.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: 3.19 on Nokia n900: audio quality awful

2015-01-28 Thread Jarkko Nikula
On 01/26/2015 03:20 PM, Peter Ujfalusi wrote:
 On 01/18/2015 02:01 PM, Pavel Machek wrote:
 In 2.6.28-nokia, it is neccessary to set Input select na digital
 mic, then it works. Input select being in playback option makes it
 easy to miss.

 In 3.18 and 3.19-rc3, all I can record are zeros.

 Does playback/recording work for you on OMAP 3430-based machines?
 
 Same codec (tlv320aic3106) works fine on my am335x and omap-l138 boards.
 BeagleBoard-xM also fine with twl4030 codec.
 
 I don't have my n900 in hacking mode (it is still in use time-to-time) but
 looking at the dts file: you might want to add ai3x-micbias-vg property to the
 aic3x nodes to select the correct mic bias voltage. I can't recall what is
 appropriate for n900, but 2.6.28-nokia sources might give you the answer.
 
No need to go that far. N900 has been supported in mainline since 2.6.39
or so. Part A of AIC34 (which is basically dual AIC33 in a same package)
drives 2 V for the digital microphone bias and part B 2.5 V for the headset.

Unfortunately I haven't had time recently to try what might have caused
that regression after 3.18.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: 3.19 on Nokia n900: audio quality awful

2015-01-28 Thread Jarkko Nikula
On Wed, Jan 28, 2015 at 11:41:44PM +0100, Pavel Machek wrote:
 On Wed 2015-01-28 20:15:46, Jarkko Nikula wrote:
  On 01/26/2015 03:20 PM, Peter Ujfalusi wrote:
   On 01/18/2015 02:01 PM, Pavel Machek wrote:
  No need to go that far. N900 has been supported in mainline since 2.6.39
  or so. Part A of AIC34 (which is basically dual AIC33 in a same package)
  drives 2 V for the digital microphone bias and part B 2.5 V for the headset.
 
 Let me try... Umm, no change here :-(
 
 root@n900:/tmp# arecord delme
 Recording WAVE 'delme' : Unsigned 8 bit, Rate 8000 Hz, Mono
 ^CAborted by signal Interrupt...
 root@n900:/tmp# hexdump delme
 000 4952 4646 987c  4157 4556 6d66 2074
 010 0010  0001 0001 1f40  1f40 
 020 0001 0008 6164 6174 9858  8080 8080
 030 8080 8080 8080 8080 8080 8080 8080 8080
 *
 0009880
 root@n900:/tmp# aplay delme
 Playing WAVE 'delme' : Unsigned 8 bit, Rate 8000 Hz, Mono
 root@n900:/tmp#
 
 I did this:
 
 I'm not sure which one is main microphone and which is headset, but
 I guess 2V should be close enough to 2.5V to produce something
 different from zeros..?
 
Main or integrated is digital microphone which does AD conversion itself
and headset is analogue. If DMIC is without bias codec will sample plain
zeros from DMIC input but analogue input should always produce some random
LSB bits from codec's AD converter.

If codec produces zeros also from analogue input then I suppose codec
ADC is not powered up or similar. One way to hunt regression if
bisecting is not possible due reason or another is to dump and diff codec
registers from /sys/kernel/debug/regmap/ using both working commit and head.

 diff --git a/arch/arm/boot/dts/omap3-n900.dts 
 b/arch/arm/boot/dts/omap3-n900.dts
 index 48b0987..f18a5b0 100644
 --- a/arch/arm/boot/dts/omap3-n900.dts
 +++ b/arch/arm/boot/dts/omap3-n900.dts
 @@ -491,6 +491,8 @@
   DRVDD-supply = vmmc2;
   IOVDD-supply = vio;
   DVDD-supply = vio;
 +
 + ai3x-micbias-vg = 1;
   };
Looks ok for digital mic.

  
   tlv320aic3x_aux: tlv320aic3x@19 {
 @@ -502,6 +504,8 @@
   DRVDD-supply = vmmc2;
   IOVDD-supply = vio;
   DVDD-supply = vio;
 +
 + ai3x-micbias-vg = 1;
   };
This should be 2, i.e. 2.5 V according to
Documentation/devicetree/bindings/sound/tlv320aic3x.txt. I think 2 V is
too low for some headset mics and that was the reason for 2.5 V.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ASoC: OMAP: mcbsp: ensure that CLKX and CLKR are not used as ouput pins when they are used as input clock for the SRG.

2015-01-16 Thread Jarkko Nikula
Hi

On Thu, Jan 15, 2015 at 11:28:21PM +0100, Thomas Niederprüm wrote:
 This patch fixes faulty behaviour in a setup where the input clock for
 the SRG is fed through the CLKR pin but the McBSP is configured to be
 master (SND_SOC_DAIFMT_CBS_CFS). In that case of course CLKR must not be
 configured as output pin. Otherwise the input clock is messed up
 horribly. The same reasoning applies if CLKX is configured as input for
 the SRG.
 
 Signed-off-by: Thomas Niederprüm nied...@physik.uni-kl.de
 ---
  sound/soc/omap/omap-mcbsp.c | 4 
  1 file changed, 4 insertions(+)
 
I cannot check at the moment but is this actually a contradictory
configuration if McBSP is set to bit clock master but at the same want
to use it as an input also? Should you use SND_SOC_DAIFMT_CBM_CFS
instead?

Peter: care to check?

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: ASoC: omap-mcbsp: Deletion of an unnecessary check before the function call kfree

2014-11-17 Thread Jarkko Nikula
On 11/17/2014 03:15 PM, SF Markus Elfring wrote:
 From: Markus Elfring elfr...@users.sourceforge.net
 Date: Mon, 17 Nov 2014 14:05:27 +0100
 
 The kfree() function tests whether its argument is NULL and then
 returns immediately. Thus the test around the call is not needed.
 
 This issue was detected by using the Coccinelle software.
 
 Signed-off-by: Markus Elfring elfr...@users.sourceforge.net
 ---
  sound/soc/omap/mcbsp.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
 
Acked-by: Jarkko Nikula jarkko.nik...@bitmer.com

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/5] ASoC: omap: Add HA (HEAD acoustics) DSP add-on card audio driver for TAO3530

2014-04-28 Thread Jarkko Nikula
On 04/28/2014 03:17 PM, Stefan Roese wrote:
 From: Jarkko Nikula jarkko.nik...@bitmer.com
 
Same authorship and commit log notes here than to 2/5. One important
comment below.

 --- /dev/null
 +++ b/sound/soc/omap/ha-dsp-card.c
 @@ -0,0 +1,307 @@
 +/*
 + * ha-dsp-card.c  --  SoC audio HA-DSP add-on card for TAO-3530
 + *
 + * Author: Jarkko Nikula jarkko.nik...@bitmer.com
 + *
 + * Additional changes by:
 + *   Thorsten Eisbein thorsten.eisb...@head-acoustics.de
 + *   Stefan Roese s...@denx.de

Put here Copyright 2011 Head acoustics GmbH.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/5] ASoC: omap: Add HA (HEAD acoustics) DSP add-on card audio driver for TAO3530

2014-04-28 Thread Jarkko Nikula
On 04/28/2014 03:17 PM, Stefan Roese wrote:
 From: Jarkko Nikula jarkko.nik...@bitmer.com

Same authorship and commit log notes here than to 2/5. One important
note below.

 --- /dev/null
 +++ b/sound/soc/omap/ha-dsp-card.c
 @@ -0,0 +1,307 @@
 +/*
 + * ha-dsp-card.c  --  SoC audio HA-DSP add-on card for TAO-3530
 + *
 + * Author: Jarkko Nikula jarkko.nik...@bitmer.com
 + *
 + * Additional changes by:
 + *   Thorsten Eisbein thorsten.eisb...@head-acoustics.de
 + *   Stefan Roese s...@denx.de
 + *
Put here Copyright 2011 Head acoustics GmbH.

-- 
Jarkko

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/5] ASoC: Add HA (HEAD acoustics) DSP codec driver template

2014-04-28 Thread Jarkko Nikula
Hi Stefan

On 04/28/2014 03:17 PM, Stefan Roese wrote:
 From: Jarkko Nikula jarkko.nik...@bitmer.com
 
 This codec driver template represents an I2C controlled multichannel audio
 codec that has many typical ASoC codec driver features like volume controls,
 mixer stages, mux selection, output power control, in-codec audio routings,
 codec bias management and DAI link configuration.
 
I think it's fair to change authorship to you or Thorsten as this is now
more a real codec driver than implementation template I developed
originally a few years back and you have done porting to newer kernel
and API. Plus taking review commits too :-)

 Updates from Stefan Roese, 2014-04-28:
 Port the HA DSP codec driver to Linux v3.15-rc. This includes
 support for DT based probing. No platform-data code is needed
 any more, DT nodes are sufficient.
 
 Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
 Signed-off-by: Stefan Roese s...@denx.de
 Cc: Thorsten Eisbein thorsten.eisb...@head-acoustics.de
 ---
To me it's fine if you write commit log like it was done by you and say
it's based on early implementation template from me. Or something like that.

 diff --git a/sound/soc/codecs/ha-dsp.c b/sound/soc/codecs/ha-dsp.c
 new file mode 100644
 index 000..7cf24dc
 --- /dev/null
 +++ b/sound/soc/codecs/ha-dsp.c
 @@ -0,0 +1,419 @@
 +/*
 + * ha-dsp.c  --  HA DSP ALSA SoC Audio driver
 + *
 + * Copyright 2011 Head acoustics GmbH
 + *
 + * Author: Jarkko Nikula jarkko.nik...@bitmer.com
 + *
List here also other authors in order to get kudos to you too.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] sound: omap: n810: fix init with DT boot

2014-03-03 Thread Jarkko Nikula
On 03/01/2014 08:08 PM, Aaro Koskinen wrote:
 Since 3.14-rc1 only DT boot has been supported on N810. Make a minimal
 fix to retain functionality. This file should be properly converted
 to DT in longer term.
 
 Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
 ---
  sound/soc/omap/n810.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
Right, so there is actually regression. Can you get codec to probe? I
get this when drivers are modules:

tlv320aic3x-codec: probe of 1-0018 failed with error -16

I don't see quickly from where this -EBUSY comes but
arch/arm/mach-omap2/board-n8x0.c seems to register it since module is
loaded.

With your patch basic n810 machine driver probing works again although
audio card is not registered for me due failing codec probe.

Please resend you fix and cc maintainers Mark Brown broo...@kernel.org
and Liam Girdwood lgirdw...@gmail.com. You can add my ack

Acked-by: Jarkko Nikula jarkko.nik...@linux.intel.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND 5/7] mmc: omap: Convert to devm_ioremap_resource

2014-02-22 Thread Jarkko Nikula
Simplify probe and cleanup code by using devm_ioremap_resource. This also
makes probe code to follow more common allocate private struct followed by
other initialization style.

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
Acked-by: Tony Lindgren t...@atomide.com
Tested-by: Aaro Koskinen aaro.koski...@iki.fi
---
 drivers/mmc/host/omap.c | 41 -
 1 file changed, 12 insertions(+), 29 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 0d669cfa6af6..e4c7a0380a63 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1334,22 +1334,19 @@ static int mmc_omap_probe(struct platform_device *pdev)
return -EPROBE_DEFER;
}
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+   host = devm_kzalloc(pdev-dev, sizeof(struct mmc_omap_host),
+   GFP_KERNEL);
+   if (host == NULL)
+   return -ENOMEM;
+
irq = platform_get_irq(pdev, 0);
-   if (res == NULL || irq  0)
+   if (irq  0)
return -ENXIO;
 
-   res = request_mem_region(res-start, resource_size(res),
-pdev-name);
-   if (res == NULL)
-   return -EBUSY;
-
-   host = devm_kzalloc(pdev-dev, sizeof(struct mmc_omap_host),
-   GFP_KERNEL);
-   if (host == NULL) {
-   ret = -ENOMEM;
-   goto err_free_mem_region;
-   }
+   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+   host-virt_base = devm_ioremap_resource(pdev-dev, res);
+   if (IS_ERR(host-virt_base))
+   return PTR_ERR(host-virt_base);
 
INIT_WORK(host-slot_release_work, mmc_omap_slot_release_work);
INIT_WORK(host-send_stop_work, mmc_omap_send_stop_work);
@@ -1374,15 +1371,9 @@ static int mmc_omap_probe(struct platform_device *pdev)
host-irq = irq;
host-use_dma = 1;
host-phys_base = res-start;
-   host-virt_base = ioremap(res-start, resource_size(res));
-   if (!host-virt_base)
-   goto err_ioremap;
-
host-iclk = clk_get(pdev-dev, ick);
-   if (IS_ERR(host-iclk)) {
-   ret = PTR_ERR(host-iclk);
-   goto err_free_mmc_host;
-   }
+   if (IS_ERR(host-iclk))
+   return PTR_ERR(host-iclk);
clk_enable(host-iclk);
 
host-fclk = clk_get(pdev-dev, fck);
@@ -1460,11 +1451,6 @@ err_free_dma:
 err_free_iclk:
clk_disable(host-iclk);
clk_put(host-iclk);
-err_free_mmc_host:
-   iounmap(host-virt_base);
-err_ioremap:
-err_free_mem_region:
-   release_mem_region(res-start, resource_size(res));
return ret;
 }
 
@@ -1492,9 +1478,6 @@ static int mmc_omap_remove(struct platform_device *pdev)
if (host-dma_rx)
dma_release_channel(host-dma_rx);
 
-   iounmap(host-virt_base);
-   release_mem_region(pdev-resource[0].start,
-  pdev-resource[0].end - pdev-resource[0].start + 1);
destroy_workqueue(host-mmc_omap_wq);
 
return 0;
-- 
1.8.5.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND 0/7] mmc: omap: Fixes, cleanup and add ERASE capability

2014-02-22 Thread Jarkko Nikula
I've sent these patches earlier early December. See
http://www.spinics.net/lists/linux-mmc/msg23540.html

Resending now as mmc.git is updated over v3.13-rc2-208-g8ecffd791448.
No other changes than added Acked-by and Tested-by lines from Tony and Aaro.
Note Jarkko Lavinen is not cc'ed since he no longer works for Samsung and I
don't know his personal address.

Set goes on top of mmc.git v3.14-rc2-10-g7536d3f83aa4.

Jarkko Nikula (7):
  mmc: omap: Fix NULL pointer dereference due uninitialized
cover_tasklet
  mmc: omap: Convert to devm_kzalloc
  mmc: omap: Remove duplicate host-irq assignment
  mmc: omap: Remove mem_res field from struct mmc_omap_host
  mmc: omap: Convert to devm_ioremap_resource
  mmc: omap: Remove always set use_dma flag from struct mmc_omap_host
  mmc: omap: Add erase capability

 drivers/mmc/host/omap.c | 93 +++--
 1 file changed, 36 insertions(+), 57 deletions(-)

-- 
1.8.5.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND 4/7] mmc: omap: Remove mem_res field from struct mmc_omap_host

2014-02-22 Thread Jarkko Nikula
Field mem_res in struct mmc_omap_host is used only once in mmc_omap_probe
when setting the phys_base field so we may just se the phys_base straight
and remove needless mem_res.

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
Acked-by: Tony Lindgren t...@atomide.com
Tested-by: Aaro Koskinen aaro.koski...@iki.fi
---
 drivers/mmc/host/omap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index b438f0addb3c..0d669cfa6af6 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -130,7 +130,6 @@ struct mmc_omap_host {
u32 dma_rx_burst;
struct dma_chan *dma_tx;
u32 dma_tx_burst;
-   struct resource *mem_res;
void __iomem*virt_base;
unsigned intphys_base;
int irq;
@@ -1372,10 +1371,9 @@ static int mmc_omap_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, host);
 
host-id = pdev-id;
-   host-mem_res = res;
host-irq = irq;
host-use_dma = 1;
-   host-phys_base = host-mem_res-start;
+   host-phys_base = res-start;
host-virt_base = ioremap(res-start, resource_size(res));
if (!host-virt_base)
goto err_ioremap;
-- 
1.8.5.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND 1/7] mmc: omap: Fix NULL pointer dereference due uninitialized cover_tasklet

2014-02-22 Thread Jarkko Nikula
Omap MMC driver initialization can cause a NULL pointer dereference in
tasklet_hi_action on Nokia N810 if its miniSD cover is open during driver
initialization.

[1.07] Unable to handle kernel NULL pointer dereference at virtual 
address 
[1.08] pgd = c0004000
[1.08] [] *pgd=
[1.08] Internal error: Oops: 8005 [#1] PREEMPT ARM
[1.08] Modules linked in:
[1.08] CPU: 0 PID: 24 Comm: kworker/0:1 Not tainted 3.13.0-rc2+ #95
[1.08] Workqueue: events menelaus_work
[1.08] task: c7863340 ti: c7878000 task.ti: c7878000
[1.08] PC is at 0x0
[1.08] LR is at tasklet_hi_action+0x68/0xa4
...
[1.08] [c003543c] (tasklet_hi_action+0x68/0xa4) from [c0034dd0] 
(__do_softirq+0xbc/0x208)
[1.08] [c0034dd0] (__do_softirq+0xbc/0x208) from [c003521c] 
(irq_exit+0x84/0xac)
[1.08] [c003521c] (irq_exit+0x84/0xac) from [c00135cc] 
(handle_IRQ+0x64/0x84)
[1.08] [c00135cc] (handle_IRQ+0x64/0x84) from [c000859c] 
(omap2_intc_handle_irq+0x54/0x68)
[1.08] [c000859c] (omap2_intc_handle_irq+0x54/0x68) from [c0015be0] 
(__irq_svc+0x40/0x74)
[1.08] Exception stack(0xc7879d70 to 0xc7879db8)
[1.08] 9d60: 03f1 000a 
0009 001c
[1.08] 9d80: c7879e70 c780bc10 c780bc10  0001 8603 
c780bc78 c7879e4e
[1.08] 9da0: 0002 c7879db8 c00343b0 c0160c9c 2113 
[1.08] [c0015be0] (__irq_svc+0x40/0x74) from [c0160c9c] 
(__aeabi_uidiv+0x20/0x9c)
[1.08] [c0160c9c] (__aeabi_uidiv+0x20/0x9c) from [c00343b0] 
(msecs_to_jiffies+0x18/0x24)
[1.08] [c00343b0] (msecs_to_jiffies+0x18/0x24) from [c01ec3ec] 
(omap_i2c_xfer+0x30c/0x458)
[1.08] [c01ec3ec] (omap_i2c_xfer+0x30c/0x458) from [c01e9724] 
(__i2c_transfer+0x3c/0x74)
[1.08] [c01e9724] (__i2c_transfer+0x3c/0x74) from [c01eac4c] 
(i2c_transfer+0x78/0x94)
[1.08] [c01eac4c] (i2c_transfer+0x78/0x94) from [c01eb0bc] 
(i2c_smbus_xfer+0x3c0/0x4f8)
[1.08] [c01eb0bc] (i2c_smbus_xfer+0x3c0/0x4f8) from [c01eb414] 
(i2c_smbus_write_byte_data+0x34/0x3c)
[1.08] [c01eb414] (i2c_smbus_write_byte_data+0x34/0x3c) from 
[c01bb308] (menelaus_write_reg+0x1c/0x40)
[1.08] [c01bb308] (menelaus_write_reg+0x1c/0x40) from [c01bb904] 
(menelaus_work+0xa0/0xc4)
[1.08] [c01bb904] (menelaus_work+0xa0/0xc4) from [c00439c4] 
(process_one_work+0x1fc/0x334)
[1.08] [c00439c4] (process_one_work+0x1fc/0x334) from [c0043d6c] 
(worker_thread+0x244/0x380)
[1.08] [c0043d6c] (worker_thread+0x244/0x380) from [c0049d04] 
(kthread+0xc0/0xd4)
[1.08] [c0049d04] (kthread+0xc0/0xd4) from [c0012758] 
(ret_from_fork+0x14/0x3c)
[1.08] Code: bad PC value
[1.09] ---[ end trace 7bc2fc7cd14f1d95 ]---
[1.10] Kernel panic - not syncing: Fatal exception in interrupt

Reason for this is that omap_notify_cover_event which calls
tasklet_hi_schedule gets called before struct cover_tasklet is initialized.

Call to omap_notify_cover_event on Nokia N810 happens from menelaus.c PMIC
driver via board-n8x0.c during execution of mmc_add_host in case of open
miniSD cover.

Fix this by moving cover_timer and cover_tasklet initialization before
mmc_add_host call in mmc_omap_new_slot.

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
Acked-by: Tony Lindgren t...@atomide.com
Tested-by: Aaro Koskinen aaro.koski...@iki.fi
---
v2: a snip of stack dump added to commit log
---
 drivers/mmc/host/omap.c | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 98b6b6ef7e5c..42b665dfaa73 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1262,6 +1262,13 @@ static int mmc_omap_new_slot(struct mmc_omap_host *host, 
int id)
mmc-max_req_size = mmc-max_blk_size * mmc-max_blk_count;
mmc-max_seg_size = mmc-max_req_size;
 
+   if (slot-pdata-get_cover_state != NULL) {
+   setup_timer(slot-cover_timer, mmc_omap_cover_timer,
+   (unsigned long)slot);
+   tasklet_init(slot-cover_tasklet, mmc_omap_cover_handler,
+(unsigned long)slot);
+   }
+
r = mmc_add_host(mmc);
if (r  0)
goto err_remove_host;
@@ -1278,11 +1285,6 @@ static int mmc_omap_new_slot(struct mmc_omap_host *host, 
int id)
dev_attr_cover_switch);
if (r  0)
goto err_remove_slot_name;
-
-   setup_timer(slot-cover_timer, mmc_omap_cover_timer,
-   (unsigned long)slot);
-   tasklet_init(slot-cover_tasklet, mmc_omap_cover_handler,
-(unsigned long)slot);
tasklet_schedule(slot-cover_tasklet);
}
 
-- 
1.8.5.3

--
To unsubscribe from this list: send the line unsubscribe

[RESEND 6/7] mmc: omap: Remove always set use_dma flag from struct mmc_omap_host

2014-02-22 Thread Jarkko Nikula
Because use_dma is set only in mmc_omap_probe and unset nowhere there is no
need to carry that flag in struct mmc_omap_host for mmc_omap_prepare_data
function.

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
Acked-by: Tony Lindgren t...@atomide.com
Tested-by: Aaro Koskinen aaro.koski...@iki.fi
---
 drivers/mmc/host/omap.c | 15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index e4c7a0380a63..42175cd90435 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -152,7 +152,6 @@ struct mmc_omap_host {
u32 total_bytes_left;
 
unsignedfeatures;
-   unsigneduse_dma:1;
unsignedbrs_received:1, dma_done:1;
unsigneddma_in_use:1;
spinlock_t  dma_lock;
@@ -944,7 +943,7 @@ static void
 mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req)
 {
struct mmc_data *data = req-data;
-   int i, use_dma, block_size;
+   int i, use_dma = 1, block_size;
unsigned sg_len;
 
host-data = data;
@@ -969,13 +968,10 @@ mmc_omap_prepare_data(struct mmc_omap_host *host, struct 
mmc_request *req)
sg_len = (data-blocks == 1) ? 1 : data-sg_len;
 
/* Only do DMA for entire blocks */
-   use_dma = host-use_dma;
-   if (use_dma) {
-   for (i = 0; i  sg_len; i++) {
-   if ((data-sg[i].length % block_size) != 0) {
-   use_dma = 0;
-   break;
-   }
+   for (i = 0; i  sg_len; i++) {
+   if ((data-sg[i].length % block_size) != 0) {
+   use_dma = 0;
+   break;
}
}
 
@@ -1369,7 +1365,6 @@ static int mmc_omap_probe(struct platform_device *pdev)
 
host-id = pdev-id;
host-irq = irq;
-   host-use_dma = 1;
host-phys_base = res-start;
host-iclk = clk_get(pdev-dev, ick);
if (IS_ERR(host-iclk))
-- 
1.8.5.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND 7/7] mmc: omap: Add erase capability

2014-02-22 Thread Jarkko Nikula
This patch adds the erase capability to OMAP1/OMAP2420 MMC driver. Idea is
the same than in commit 93caf8e (omap_hsmmc: add erase capability) that we
disable the data timeout interrupt for erases.

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
Acked-by: Tony Lindgren t...@atomide.com
Tested-by: Aaro Koskinen aaro.koski...@iki.fi
---
 drivers/mmc/host/omap.c | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 42175cd90435..5c2e58b29305 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -26,6 +26,7 @@
 #include linux/omap-dma.h
 #include linux/mmc/host.h
 #include linux/mmc/card.h
+#include linux/mmc/mmc.h
 #include linux/clk.h
 #include linux/scatterlist.h
 #include linux/slab.h
@@ -336,6 +337,7 @@ mmc_omap_start_command(struct mmc_omap_host *host, struct 
mmc_command *cmd)
u32 cmdreg;
u32 resptype;
u32 cmdtype;
+   u16 irq_mask;
 
host-cmd = cmd;
 
@@ -388,12 +390,14 @@ mmc_omap_start_command(struct mmc_omap_host *host, struct 
mmc_command *cmd)
OMAP_MMC_WRITE(host, CTO, 200);
OMAP_MMC_WRITE(host, ARGL, cmd-arg  0x);
OMAP_MMC_WRITE(host, ARGH, cmd-arg  16);
-   OMAP_MMC_WRITE(host, IE,
-  OMAP_MMC_STAT_A_EMPTY| OMAP_MMC_STAT_A_FULL|
-  OMAP_MMC_STAT_CMD_CRC| OMAP_MMC_STAT_CMD_TOUT  |
-  OMAP_MMC_STAT_DATA_CRC   | OMAP_MMC_STAT_DATA_TOUT |
-  OMAP_MMC_STAT_END_OF_CMD | OMAP_MMC_STAT_CARD_ERR  |
-  OMAP_MMC_STAT_END_OF_DATA);
+   irq_mask = OMAP_MMC_STAT_A_EMPTY| OMAP_MMC_STAT_A_FULL|
+  OMAP_MMC_STAT_CMD_CRC| OMAP_MMC_STAT_CMD_TOUT  |
+  OMAP_MMC_STAT_DATA_CRC   | OMAP_MMC_STAT_DATA_TOUT |
+  OMAP_MMC_STAT_END_OF_CMD | OMAP_MMC_STAT_CARD_ERR  |
+  OMAP_MMC_STAT_END_OF_DATA;
+   if (cmd-opcode == MMC_ERASE)
+   irq_mask = ~OMAP_MMC_STAT_DATA_TOUT;
+   OMAP_MMC_WRITE(host, IE, irq_mask);
OMAP_MMC_WRITE(host, CMD, cmdreg);
 }
 
@@ -1234,7 +1238,7 @@ static int mmc_omap_new_slot(struct mmc_omap_host *host, 
int id)
 
mmc-caps = 0;
if (host-pdata-slots[id].wires = 4)
-   mmc-caps |= MMC_CAP_4_BIT_DATA;
+   mmc-caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_ERASE;
 
mmc-ops = mmc_omap_ops;
mmc-f_min = 40;
-- 
1.8.5.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND 3/7] mmc: omap: Remove duplicate host-irq assignment

2014-02-22 Thread Jarkko Nikula
host-irq is set twice so remove needless one.

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
Acked-by: Tony Lindgren t...@atomide.com
Tested-by: Aaro Koskinen aaro.koski...@iki.fi
---
 drivers/mmc/host/omap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 927ed24d0708..b438f0addb3c 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1375,7 +1375,6 @@ static int mmc_omap_probe(struct platform_device *pdev)
host-mem_res = res;
host-irq = irq;
host-use_dma = 1;
-   host-irq = irq;
host-phys_base = host-mem_res-start;
host-virt_base = ioremap(res-start, resource_size(res));
if (!host-virt_base)
-- 
1.8.5.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RESEND 2/7] mmc: omap: Convert to devm_kzalloc

2014-02-22 Thread Jarkko Nikula
Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
Acked-by: Tony Lindgren t...@atomide.com
Tested-by: Aaro Koskinen aaro.koski...@iki.fi
---
 drivers/mmc/host/omap.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 42b665dfaa73..927ed24d0708 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1345,7 +1345,8 @@ static int mmc_omap_probe(struct platform_device *pdev)
if (res == NULL)
return -EBUSY;
 
-   host = kzalloc(sizeof(struct mmc_omap_host), GFP_KERNEL);
+   host = devm_kzalloc(pdev-dev, sizeof(struct mmc_omap_host),
+   GFP_KERNEL);
if (host == NULL) {
ret = -ENOMEM;
goto err_free_mem_region;
@@ -1465,7 +1466,6 @@ err_free_iclk:
 err_free_mmc_host:
iounmap(host-virt_base);
 err_ioremap:
-   kfree(host);
 err_free_mem_region:
release_mem_region(res-start, resource_size(res));
return ret;
@@ -1500,8 +1500,6 @@ static int mmc_omap_remove(struct platform_device *pdev)
   pdev-resource[0].end - pdev-resource[0].start + 1);
destroy_workqueue(host-mmc_omap_wq);
 
-   kfree(host);
-
return 0;
 }
 
-- 
1.8.5.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/7] mmc: omap: Fixes, cleanup and add ERASE capability

2013-12-06 Thread Jarkko Nikula
On 12/06/2013 01:41 PM, Aaro Koskinen wrote:
 Set goes on top of v3.13-rc2-208-g8ecffd791448.
 
 Patch 5 had some fuzz with plain 3.13-rc2. Otherwise these look fine.
 I tested these on 770 and N800, so for all patches:
 
 Tested-by: Aaro Koskinen aaro.koski...@iki.fi
 
Yes, reason for your fuzz observation is that 3.13-rc2 don't have those
two patches from Tony but 8ecffd791448 had.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/7] mmc: omap: Convert to devm_kzalloc

2013-12-04 Thread Jarkko Nikula
Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 drivers/mmc/host/omap.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 42b665d..927ed24 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1345,7 +1345,8 @@ static int mmc_omap_probe(struct platform_device *pdev)
if (res == NULL)
return -EBUSY;
 
-   host = kzalloc(sizeof(struct mmc_omap_host), GFP_KERNEL);
+   host = devm_kzalloc(pdev-dev, sizeof(struct mmc_omap_host),
+   GFP_KERNEL);
if (host == NULL) {
ret = -ENOMEM;
goto err_free_mem_region;
@@ -1465,7 +1466,6 @@ err_free_iclk:
 err_free_mmc_host:
iounmap(host-virt_base);
 err_ioremap:
-   kfree(host);
 err_free_mem_region:
release_mem_region(res-start, resource_size(res));
return ret;
@@ -1500,8 +1500,6 @@ static int mmc_omap_remove(struct platform_device *pdev)
   pdev-resource[0].end - pdev-resource[0].start + 1);
destroy_workqueue(host-mmc_omap_wq);
 
-   kfree(host);
-
return 0;
 }
 
-- 
1.8.4.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/7] mmc: omap: Remove mem_res field from struct mmc_omap_host

2013-12-04 Thread Jarkko Nikula
Field mem_res in struct mmc_omap_host is used only once in mmc_omap_probe
when setting the phys_base field so we may just se the phys_base straight
and remove needless mem_res.

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 drivers/mmc/host/omap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index b438f0a..0d669cf 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -130,7 +130,6 @@ struct mmc_omap_host {
u32 dma_rx_burst;
struct dma_chan *dma_tx;
u32 dma_tx_burst;
-   struct resource *mem_res;
void __iomem*virt_base;
unsigned intphys_base;
int irq;
@@ -1372,10 +1371,9 @@ static int mmc_omap_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, host);
 
host-id = pdev-id;
-   host-mem_res = res;
host-irq = irq;
host-use_dma = 1;
-   host-phys_base = host-mem_res-start;
+   host-phys_base = res-start;
host-virt_base = ioremap(res-start, resource_size(res));
if (!host-virt_base)
goto err_ioremap;
-- 
1.8.4.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 6/7] mmc: omap: Remove always set use_dma flag from struct mmc_omap_host

2013-12-04 Thread Jarkko Nikula
Because use_dma is set only in mmc_omap_probe and unset nowhere there is no
need to carry that flag in struct mmc_omap_host for mmc_omap_prepare_data
function.

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 drivers/mmc/host/omap.c | 15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index e4c7a03..42175cd 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -152,7 +152,6 @@ struct mmc_omap_host {
u32 total_bytes_left;
 
unsignedfeatures;
-   unsigneduse_dma:1;
unsignedbrs_received:1, dma_done:1;
unsigneddma_in_use:1;
spinlock_t  dma_lock;
@@ -944,7 +943,7 @@ static void
 mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req)
 {
struct mmc_data *data = req-data;
-   int i, use_dma, block_size;
+   int i, use_dma = 1, block_size;
unsigned sg_len;
 
host-data = data;
@@ -969,13 +968,10 @@ mmc_omap_prepare_data(struct mmc_omap_host *host, struct 
mmc_request *req)
sg_len = (data-blocks == 1) ? 1 : data-sg_len;
 
/* Only do DMA for entire blocks */
-   use_dma = host-use_dma;
-   if (use_dma) {
-   for (i = 0; i  sg_len; i++) {
-   if ((data-sg[i].length % block_size) != 0) {
-   use_dma = 0;
-   break;
-   }
+   for (i = 0; i  sg_len; i++) {
+   if ((data-sg[i].length % block_size) != 0) {
+   use_dma = 0;
+   break;
}
}
 
@@ -1369,7 +1365,6 @@ static int mmc_omap_probe(struct platform_device *pdev)
 
host-id = pdev-id;
host-irq = irq;
-   host-use_dma = 1;
host-phys_base = res-start;
host-iclk = clk_get(pdev-dev, ick);
if (IS_ERR(host-iclk))
-- 
1.8.4.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/7] mmc: omap: Convert to devm_ioremap_resource

2013-12-04 Thread Jarkko Nikula
Simplify probe and cleanup code by using devm_ioremap_resource. This also
makes probe code to follow more common allocate private struct followed by
other initialization style.

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 drivers/mmc/host/omap.c | 41 -
 1 file changed, 12 insertions(+), 29 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 0d669cf..e4c7a03 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1334,22 +1334,19 @@ static int mmc_omap_probe(struct platform_device *pdev)
return -EPROBE_DEFER;
}
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+   host = devm_kzalloc(pdev-dev, sizeof(struct mmc_omap_host),
+   GFP_KERNEL);
+   if (host == NULL)
+   return -ENOMEM;
+
irq = platform_get_irq(pdev, 0);
-   if (res == NULL || irq  0)
+   if (irq  0)
return -ENXIO;
 
-   res = request_mem_region(res-start, resource_size(res),
-pdev-name);
-   if (res == NULL)
-   return -EBUSY;
-
-   host = devm_kzalloc(pdev-dev, sizeof(struct mmc_omap_host),
-   GFP_KERNEL);
-   if (host == NULL) {
-   ret = -ENOMEM;
-   goto err_free_mem_region;
-   }
+   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+   host-virt_base = devm_ioremap_resource(pdev-dev, res);
+   if (IS_ERR(host-virt_base))
+   return PTR_ERR(host-virt_base);
 
INIT_WORK(host-slot_release_work, mmc_omap_slot_release_work);
INIT_WORK(host-send_stop_work, mmc_omap_send_stop_work);
@@ -1374,15 +1371,9 @@ static int mmc_omap_probe(struct platform_device *pdev)
host-irq = irq;
host-use_dma = 1;
host-phys_base = res-start;
-   host-virt_base = ioremap(res-start, resource_size(res));
-   if (!host-virt_base)
-   goto err_ioremap;
-
host-iclk = clk_get(pdev-dev, ick);
-   if (IS_ERR(host-iclk)) {
-   ret = PTR_ERR(host-iclk);
-   goto err_free_mmc_host;
-   }
+   if (IS_ERR(host-iclk))
+   return PTR_ERR(host-iclk);
clk_enable(host-iclk);
 
host-fclk = clk_get(pdev-dev, fck);
@@ -1460,11 +1451,6 @@ err_free_dma:
 err_free_iclk:
clk_disable(host-iclk);
clk_put(host-iclk);
-err_free_mmc_host:
-   iounmap(host-virt_base);
-err_ioremap:
-err_free_mem_region:
-   release_mem_region(res-start, resource_size(res));
return ret;
 }
 
@@ -1492,9 +1478,6 @@ static int mmc_omap_remove(struct platform_device *pdev)
if (host-dma_rx)
dma_release_channel(host-dma_rx);
 
-   iounmap(host-virt_base);
-   release_mem_region(pdev-resource[0].start,
-  pdev-resource[0].end - pdev-resource[0].start + 1);
destroy_workqueue(host-mmc_omap_wq);
 
return 0;
-- 
1.8.4.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/7] mmc: omap: Fix NULL pointer dereference due uninitialized cover_tasklet

2013-12-04 Thread Jarkko Nikula
Omap MMC driver initialization can cause a NULL pointer dereference in
tasklet_hi_action on Nokia N810 if its miniSD cover is open during driver
initialization.

[1.07] Unable to handle kernel NULL pointer dereference at virtual 
address 
[1.08] pgd = c0004000
[1.08] [] *pgd=
[1.08] Internal error: Oops: 8005 [#1] PREEMPT ARM
[1.08] Modules linked in:
[1.08] CPU: 0 PID: 24 Comm: kworker/0:1 Not tainted 3.13.0-rc2+ #95
[1.08] Workqueue: events menelaus_work
[1.08] task: c7863340 ti: c7878000 task.ti: c7878000
[1.08] PC is at 0x0
[1.08] LR is at tasklet_hi_action+0x68/0xa4
...
[1.08] [c003543c] (tasklet_hi_action+0x68/0xa4) from [c0034dd0] 
(__do_softirq+0xbc/0x208)
[1.08] [c0034dd0] (__do_softirq+0xbc/0x208) from [c003521c] 
(irq_exit+0x84/0xac)
[1.08] [c003521c] (irq_exit+0x84/0xac) from [c00135cc] 
(handle_IRQ+0x64/0x84)
[1.08] [c00135cc] (handle_IRQ+0x64/0x84) from [c000859c] 
(omap2_intc_handle_irq+0x54/0x68)
[1.08] [c000859c] (omap2_intc_handle_irq+0x54/0x68) from [c0015be0] 
(__irq_svc+0x40/0x74)
[1.08] Exception stack(0xc7879d70 to 0xc7879db8)
[1.08] 9d60: 03f1 000a 
0009 001c
[1.08] 9d80: c7879e70 c780bc10 c780bc10  0001 8603 
c780bc78 c7879e4e
[1.08] 9da0: 0002 c7879db8 c00343b0 c0160c9c 2113 
[1.08] [c0015be0] (__irq_svc+0x40/0x74) from [c0160c9c] 
(__aeabi_uidiv+0x20/0x9c)
[1.08] [c0160c9c] (__aeabi_uidiv+0x20/0x9c) from [c00343b0] 
(msecs_to_jiffies+0x18/0x24)
[1.08] [c00343b0] (msecs_to_jiffies+0x18/0x24) from [c01ec3ec] 
(omap_i2c_xfer+0x30c/0x458)
[1.08] [c01ec3ec] (omap_i2c_xfer+0x30c/0x458) from [c01e9724] 
(__i2c_transfer+0x3c/0x74)
[1.08] [c01e9724] (__i2c_transfer+0x3c/0x74) from [c01eac4c] 
(i2c_transfer+0x78/0x94)
[1.08] [c01eac4c] (i2c_transfer+0x78/0x94) from [c01eb0bc] 
(i2c_smbus_xfer+0x3c0/0x4f8)
[1.08] [c01eb0bc] (i2c_smbus_xfer+0x3c0/0x4f8) from [c01eb414] 
(i2c_smbus_write_byte_data+0x34/0x3c)
[1.08] [c01eb414] (i2c_smbus_write_byte_data+0x34/0x3c) from 
[c01bb308] (menelaus_write_reg+0x1c/0x40)
[1.08] [c01bb308] (menelaus_write_reg+0x1c/0x40) from [c01bb904] 
(menelaus_work+0xa0/0xc4)
[1.08] [c01bb904] (menelaus_work+0xa0/0xc4) from [c00439c4] 
(process_one_work+0x1fc/0x334)
[1.08] [c00439c4] (process_one_work+0x1fc/0x334) from [c0043d6c] 
(worker_thread+0x244/0x380)
[1.08] [c0043d6c] (worker_thread+0x244/0x380) from [c0049d04] 
(kthread+0xc0/0xd4)
[1.08] [c0049d04] (kthread+0xc0/0xd4) from [c0012758] 
(ret_from_fork+0x14/0x3c)
[1.08] Code: bad PC value
[1.09] ---[ end trace 7bc2fc7cd14f1d95 ]---
[1.10] Kernel panic - not syncing: Fatal exception in interrupt

Reason for this is that omap_notify_cover_event which calls
tasklet_hi_schedule gets called before struct cover_tasklet is initialized.

Call to omap_notify_cover_event on Nokia N810 happens from menelaus.c PMIC
driver via board-n8x0.c during execution of mmc_add_host in case of open
miniSD cover.

Fix this by moving cover_timer and cover_tasklet initialization before
mmc_add_host call in mmc_omap_new_slot.

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
v2: a snip of stack dump added to commit log
---
 drivers/mmc/host/omap.c | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 98b6b6e..42b665d 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1262,6 +1262,13 @@ static int mmc_omap_new_slot(struct mmc_omap_host *host, 
int id)
mmc-max_req_size = mmc-max_blk_size * mmc-max_blk_count;
mmc-max_seg_size = mmc-max_req_size;
 
+   if (slot-pdata-get_cover_state != NULL) {
+   setup_timer(slot-cover_timer, mmc_omap_cover_timer,
+   (unsigned long)slot);
+   tasklet_init(slot-cover_tasklet, mmc_omap_cover_handler,
+(unsigned long)slot);
+   }
+
r = mmc_add_host(mmc);
if (r  0)
goto err_remove_host;
@@ -1278,11 +1285,6 @@ static int mmc_omap_new_slot(struct mmc_omap_host *host, 
int id)
dev_attr_cover_switch);
if (r  0)
goto err_remove_slot_name;
-
-   setup_timer(slot-cover_timer, mmc_omap_cover_timer,
-   (unsigned long)slot);
-   tasklet_init(slot-cover_tasklet, mmc_omap_cover_handler,
-(unsigned long)slot);
tasklet_schedule(slot-cover_tasklet);
}
 
-- 
1.8.4.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http

[PATCH 7/7] mmc: omap: Add erase capability

2013-12-04 Thread Jarkko Nikula
This patch adds the erase capability to OMAP1/OMAP2420 MMC driver. Idea is
the same than in commit 93caf8e (omap_hsmmc: add erase capability) that we
disable the data timeout interrupt for erases.

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 drivers/mmc/host/omap.c | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 42175cd..5c2e58b 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -26,6 +26,7 @@
 #include linux/omap-dma.h
 #include linux/mmc/host.h
 #include linux/mmc/card.h
+#include linux/mmc/mmc.h
 #include linux/clk.h
 #include linux/scatterlist.h
 #include linux/slab.h
@@ -336,6 +337,7 @@ mmc_omap_start_command(struct mmc_omap_host *host, struct 
mmc_command *cmd)
u32 cmdreg;
u32 resptype;
u32 cmdtype;
+   u16 irq_mask;
 
host-cmd = cmd;
 
@@ -388,12 +390,14 @@ mmc_omap_start_command(struct mmc_omap_host *host, struct 
mmc_command *cmd)
OMAP_MMC_WRITE(host, CTO, 200);
OMAP_MMC_WRITE(host, ARGL, cmd-arg  0x);
OMAP_MMC_WRITE(host, ARGH, cmd-arg  16);
-   OMAP_MMC_WRITE(host, IE,
-  OMAP_MMC_STAT_A_EMPTY| OMAP_MMC_STAT_A_FULL|
-  OMAP_MMC_STAT_CMD_CRC| OMAP_MMC_STAT_CMD_TOUT  |
-  OMAP_MMC_STAT_DATA_CRC   | OMAP_MMC_STAT_DATA_TOUT |
-  OMAP_MMC_STAT_END_OF_CMD | OMAP_MMC_STAT_CARD_ERR  |
-  OMAP_MMC_STAT_END_OF_DATA);
+   irq_mask = OMAP_MMC_STAT_A_EMPTY| OMAP_MMC_STAT_A_FULL|
+  OMAP_MMC_STAT_CMD_CRC| OMAP_MMC_STAT_CMD_TOUT  |
+  OMAP_MMC_STAT_DATA_CRC   | OMAP_MMC_STAT_DATA_TOUT |
+  OMAP_MMC_STAT_END_OF_CMD | OMAP_MMC_STAT_CARD_ERR  |
+  OMAP_MMC_STAT_END_OF_DATA;
+   if (cmd-opcode == MMC_ERASE)
+   irq_mask = ~OMAP_MMC_STAT_DATA_TOUT;
+   OMAP_MMC_WRITE(host, IE, irq_mask);
OMAP_MMC_WRITE(host, CMD, cmdreg);
 }
 
@@ -1234,7 +1238,7 @@ static int mmc_omap_new_slot(struct mmc_omap_host *host, 
int id)
 
mmc-caps = 0;
if (host-pdata-slots[id].wires = 4)
-   mmc-caps |= MMC_CAP_4_BIT_DATA;
+   mmc-caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_ERASE;
 
mmc-ops = mmc_omap_ops;
mmc-f_min = 40;
-- 
1.8.4.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/7] mmc: omap: Fixes, cleanup and add ERASE capability

2013-12-04 Thread Jarkko Nikula
Hi

I've sent these patches earlier to linux-mmc list. This time set is one
patch smaller since commit 31ee9181eb92
(mmc: omap: Fix DMA configuration to not rely on device id) does
practically same what one of my patch did.

Patch 1 is an obvious fix. 2-4 are preparing for 5 which also should fix
the error introduced by 31ee9181eb92:
http://www.spinics.net/lists/linux-omap/msg100790.html

Patch 6 continue cleanup and 7 adds the ERASE capability to the driver so
one could utilize discards with mkfs, mount option or with the fstrim.

Set goes on top of v3.13-rc2-208-g8ecffd791448.

Jarkko Nikula (7):
  mmc: omap: Fix NULL pointer dereference due uninitialized
cover_tasklet
  mmc: omap: Convert to devm_kzalloc
  mmc: omap: Remove duplicate host-irq assignment
  mmc: omap: Remove mem_res field from struct mmc_omap_host
  mmc: omap: Convert to devm_ioremap_resource
  mmc: omap: Remove always set use_dma flag from struct mmc_omap_host
  mmc: omap: Add erase capability

 drivers/mmc/host/omap.c | 93 +++--
 1 file changed, 36 insertions(+), 57 deletions(-)

-- 
1.8.4.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/7] mmc: omap: Remove duplicate host-irq assignment

2013-12-04 Thread Jarkko Nikula
host-irq is set twice so remove needless one.

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 drivers/mmc/host/omap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 927ed24..b438f0a 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1375,7 +1375,6 @@ static int mmc_omap_probe(struct platform_device *pdev)
host-mem_res = res;
host-irq = irq;
host-use_dma = 1;
-   host-irq = irq;
host-phys_base = host-mem_res-start;
host-virt_base = ioremap(res-start, resource_size(res));
if (!host-virt_base)
-- 
1.8.4.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mmc: omap: Fix error introduced by fix to release_mem_region() path

2013-12-03 Thread Jarkko Nikula
On 12/02/2013 07:34 PM, Tony Lindgren wrote:
 Commit 31ee9181eb92: (mmc: omap: Fix DMA configuration to not rely
 on device id) fixed getting of the DMA resources when booted with
 device tree. This patch however changed the handling of the
 free_mem_region() error path by reusing the struct resource *res
 for the DMA resources.
 
 Fix the error the same way omap_hsmmc.c driver handles it, which
 is to restore the resource before using the values to call
 release_mem_region().
 
 Reported-by: Dan Carpenter dan.carpen...@oracle.com
 Signed-off-by: Tony Lindgren t...@atomide.com
 
I guess my devm_ioremap conversion would have fixed this?

http://www.spinics.net/lists/linux-mmc/msg23317.html

Does not help now but I'm thinking if queuing some of those my patches
(3-5) on top of yours as a fix? Especially fix to NULL pointer dereference:

http://www.spinics.net/lists/linux-mmc/msg23320.html

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 4/4] ASoC: RX-51: Add DT support to sound driver

2013-11-30 Thread Jarkko Nikula
Hi

On 11/06/2013 04:32 PM, Pavel Machek wrote:
 Hi!
 
 This patch adds device tree support to the Nokia N900 audio driver.
 
 Note, N900 audio driver.
 
 +- compatible: nokia,rx51-audio
 
 Still, it is rx51-audio. If it is feasible, could we move away from
 rx51 naming and into n900 naming that is familiar to mere humans?
 
 We can rename the sources later, but I guess we should get dts binding
 right first time...

Sorry the long response. I definitely would like n900 naming more in dts.

History is that the basic board file for N900 went to mainline before
sales started and used the hw name in sources and Kconfig. Audio machine
driver then followed the same rx51 hw naming scheme with rest of sources.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id

2013-11-28 Thread Jarkko Nikula
Hi

On 11/27/2013 11:59 PM, Tony Lindgren wrote:
 * Chris Ball c...@laptop.org [131127 13:48]:
 Hi,

 On Wed, Nov 27 2013, Jarkko Nikula wrote:
 Can you enlighten me what's the proper way to get patches to mmc since
 I cannot figure out working methodology from MAINTAINERS file?

 Sorry about this, Jarkko.

 Since I don't have omap.c hardware, I'm generally going to wait for
 a Tested-by/Acked-by from someone else on patches like these.  We
 actually have a maintainer already listed for the driver, Jarkko
 Lavinen jarkko.lavi...@nokia.com.

 So, maybe the MAINTAINERS section for drivers/mmc/host/omap.c needs
 an update?  Feel free to send me patches to it.  Either way, I'll
 start treating Aaro and Jarkko (Nikula) as maintainers for this
 driver.
 
Oh, I see. I even didn't check ./scripts/get_maintainer.pl nor check
MAINTAINERS file further than main MMC entry as I knew Jarkko L. is not
working anymore for Nokia. Sorry, we should have noticed that.

 Hmm looks like here's a reasonably recent update that we've missed
 from Jarkko Lavinen to update his email address:
 
 http://lkml.org/lkml/2013/10/4/142
 
 I've updated Jarkko Lavinen's address in this mail, we should
 probably also patch the MAINTAINERS file for that, and then see if
 Aaro and Jarkko Nikula are interested to be listed there as well.
 
I can volunteer. Not that I know much about mmc but I like to keep my
legacy hw still running :-)

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id

2013-11-28 Thread Jarkko Nikula
Hi

On 11/27/2013 11:37 PM, Tony Lindgren wrote:
 * Jarkko Nikula jarkko.nik...@bitmer.com [131127 12:55]:
 Bummer, sounds like some duplicate work could have been avoided :(
 I suggest resend to Chris and linux-mmc one more time as Chris should
 pick up the MMC patches in general.
 
Before that should Chris merge your 2 patches in order to avoid couple
trivial merge conflicts with my set when linux-omap and mmc are merged?

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: omap3-beagle: Add omap-twl4030 audio support

2013-11-28 Thread Jarkko Nikula
On 11/28/2013 12:02 AM, Tony Lindgren wrote:
 * Jarkko Nikula jarkko.nik...@bitmer.com [131127 10:48]:
 This adds typical McBSP2-TWL4030 audio description to the legacy
 Beagle Board.
 
 Nice to see that work almost out of the box :)
 
 BTW, I just noticed that sound/soc/omap/Kconfig has depends on
 OMAP_MUX. The OMAP_MUX option will be dropped for mach-omap2
 for v3.14, so you may want to take a look at that too. If there
 really is a dependency, that should be handled using
 pinctrl-single for the .dts entries.
 
There is actually dependency but only on N810 which needs to remux 4
pins from EAC to McBSP2. I'll try to keep my eye on it but don't let
that block your cleanup work.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: dts: omap3-beagle: Add omap-twl4030 audio support

2013-11-27 Thread Jarkko Nikula
This adds typical McBSP2-TWL4030 audio description to the legacy
Beagle Board.

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 arch/arm/boot/dts/omap3-beagle.dts | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-beagle.dts 
b/arch/arm/boot/dts/omap3-beagle.dts
index fa532aaacc68..1912c421e246 100644
--- a/arch/arm/boot/dts/omap3-beagle.dts
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -61,6 +61,14 @@
vcc-supply = hsusb2_power;
};
 
+   sound {
+   compatible = ti,omap-twl4030;
+   ti,model = omap3beagle;
+
+   ti,mcbsp = mcbsp2;
+   ti,codec = twl_audio;
+   };
+
gpio_keys {
compatible = gpio-keys;
 
@@ -120,6 +128,12 @@
reg = 0x48;
interrupts = 7; /* SYS_NIRQ cascaded to intc */
interrupt-parent = intc;
+
+   twl_audio: audio {
+   compatible = ti,twl4030-audio;
+   codec {
+   };
+   };
};
 };
 
-- 
1.8.4.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id

2013-11-27 Thread Jarkko Nikula
Hi Chris

On Tue, 26 Nov 2013 18:33:50 -0500
Chris Ball c...@laptop.org wrote:

 Hi Tony,
 
 On Mon, Nov 18 2013, Tony Lindgren wrote:
  We are wrongly relying on device id for the DMA configuration
  which can lead to wrong DMA channel being selected.
 
  Fix the issue by using the standard resources like we should.
 
  Cc: Chris Ball c...@laptop.org
  Cc: linux-...@vger.kernel.org
  Signed-off-by: Tony Lindgren t...@atomide.com
 
 Feel free to merge via your tree:
 
 Acked-by: Chris Ball c...@laptop.org
 
Can you enlighten me what's the proper way to get patches to mmc since
I cannot figure out working methodology from MAINTAINERS file?

I happened to notice that Tony had this similar patch in linux-omap
list I sent first time already September to you and linux-mmc (sorry
linux-omap folks, I didn't want to spam multiple lists):

http://www.spinics.net/lists/linux-mmc/msg22137.html

After that I've resend the set a few times including a fix to
user triggable NULL pointer dereference:

http://www.spinics.net/lists/linux-mmc/msg22610.html

I'm fine if mmc patches should go through other subsystems but at least
it should be documented in MAINTAINERS file.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 16/23] ASoC: omap: mcbsp, mcpdm, dmic: raw read and write endian fix

2013-11-16 Thread Jarkko Nikula
On 11/16/2013 02:01 AM, Taras Kondratiuk wrote:
 From: Victor Kamensky victor.kamen...@linaro.org
 
 All OMAP IP blocks expect LE data, but CPU may operate in BE mode.
 Need to use endian neutral functions to read/write h/w registers.
 I.e instead of __raw_read[lw] and __raw_write[lw] functions code
 need to use read[lw]_relaxed and write[lw]_relaxed functions.
 If the first simply reads/writes register, the second will byteswap
 it if host operates in BE mode.
 
 Changes are trivial sed like replacement of __raw_xxx functions
 with xxx_relaxed variant.
 
 Signed-off-by: Victor Kamensky victor.kamen...@linaro.org
 Signed-off-by: Taras Kondratiuk taras.kondrat...@linaro.org
 ---
  sound/soc/omap/mcbsp.c  |   12 ++--
  sound/soc/omap/omap-dmic.c  |4 ++--
  sound/soc/omap/omap-mcpdm.c |4 ++--
  3 files changed, 10 insertions(+), 10 deletions(-)
 
Looks ok to me by looking at the _relaxed definitions in
arch/arm/include/asm/io.h.

Acked-by: Jarkko Nikula jarkko.nik...@bitmer.com

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/6] ASoC: omap: simplify platform_get_resource_byname/devm_ioremap_resource

2013-08-19 Thread Jarkko Nikula
Hi

On 08/19/2013 11:51 AM, Julia Lawall wrote:
 From: Julia Lawall julia.law...@lip6.fr
 
 Remove unneeded error handling on the result of a call to
 platform_get_resource_byname when the value is passed to 
 devm_ioremap_resource.
 
 In the case of omap-dmic.c, the error-handling code of
 devm_ioremap_resource is also corrected to include releasing the clock.
 
 A simplified version of the semantic patch that makes this change is as
 follows: (http://coccinelle.lip6.fr/)
 
 // smpl
 @@
 expression pdev,res,e,e1;
 expression ret != 0;
 identifier l;
 @@
 
   res = platform_get_resource_byname(...);
 - if (res == NULL) { ... \(goto l;\|return ret;\) }
   e = devm_ioremap_resource(e1, res);
 // /smpl
 
 Signed-off-by: Julia Lawall julia.law...@lip6.fr
 
 ---
  sound/soc/omap/omap-dmic.c  |9 +++--
  sound/soc/omap/omap-mcpdm.c |3 ---
  2 files changed, 3 insertions(+), 9 deletions(-)
 
To the patch and catch of missing clock release in omap-dmic.c in case
of failing devm_ioremap_resource:

Acked-by: Jarkko Nikula jarkko.nik...@bitmer.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/8] ARM: OMAP2+: hwmod: Remove remaining DMA channel definitions

2013-06-16 Thread Jarkko Nikula
Hi Felipe

On 06/15/2013 06:06 PM, Felipe Balbi wrote:
 On Sat, Jun 15, 2013 at 11:31:04AM +0300, Jarkko Nikula wrote:
 Last remaining DMA channel definitions in arch/arm/mach-omap2/dma.h
 are used only by omap_hwmod_2xxx_3xxx_ipblock_data.c and
 omap_hwmod_3xxx_data.c. Remove them by using directly DMA channel number in
 hwmod data and drop definitions with a following script:

 egrep '#define [OMAP|AM35XX].*DMA' arch/arm/mach-omap2/dma.h | cut -f 1,3 \
  | while read i; do \
  DEF=`echo $i |cut -d ' ' -f 2`; \
  CH=`echo $i |cut -d ' ' -f 3`; \
  echo removing $DEF; \
  sed -i s/${DEF}/${CH}/ arch/arm/mach-omap2/omap_hwmod_*.c; \
  sed -i /${DEF}/d arch/arm/mach-omap2/dma.h; \
  done

  /* DMA channels for 24xx */
 
 could remove the comments too.
 
You are right. Actually I was thinking that myself too with this and
omap1 patches but decided to keep manual work and scripts bare minimum
and let final git rm in 4/8 and 8/8 to handle these :-)

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/8] ARM: OMAP2+: Remove AES crypto device DMA channel definitions

2013-06-15 Thread Jarkko Nikula
These became unused after commit 660ffd6
(ARM: OMAP2xxx: hwmod: Convert AES crypto devcie data to hwmod).

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 arch/arm/mach-omap2/dma.h |2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/mach-omap2/dma.h b/arch/arm/mach-omap2/dma.h
index 65f80ca..4141ef0 100644
--- a/arch/arm/mach-omap2/dma.h
+++ b/arch/arm/mach-omap2/dma.h
@@ -25,8 +25,6 @@
 #define OMAP24XX_DMA_EXT_DMAREQ0   2   /* S_DMA_1 */
 #define OMAP24XX_DMA_EXT_DMAREQ1   3   /* S_DMA_2 */
 #define OMAP24XX_DMA_GPMC  4   /* S_DMA_3 */
-#define OMAP24XX_DMA_AES_TX9   /* S_DMA_8 */
-#define OMAP24XX_DMA_AES_RX10  /* S_DMA_9 */
 #define OMAP242X_DMA_EXT_DMAREQ2   14  /* S_DMA_13 */
 #define OMAP242X_DMA_EXT_DMAREQ3   15  /* S_DMA_14 */
 #define OMAP242X_DMA_EXT_DMAREQ4   16  /* S_DMA_15 */
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/8] ARM: OMAP: dma.h and legacy code removal

2013-06-15 Thread Jarkko Nikula
Hi

This set gets rid off arch/arm/mach-omap1/dma.h and
arch/arm/mach-omap2/dma.h by removing duplicated definitions,
by using numeric values when setting hwmod and platform data and
by removing legacy stuff.

Most cleanup is done by the scripts in commit logs and
set has been build tested with omap1_defconfig and omap2plus_defconfig.

Jarkko Nikula (8):
  ARM: OMAP2+: Remove AES crypto device DMA channel definitions
  ARM: OMAP2+: Remove duplicated DMA channel definitions
  ARM: OMAP2+: hwmod: Remove remaining DMA channel definitions
  ARM: OMAP2+: Remove dma.h
  ARM: OMAP1: Remove McBSP DMA channel definitions
  ARM: OMAP1: Remove duplicated DMA channel definitions
  ARM: OMAP1: Remove legacy irda.h and irda setup from board files
  ARM: OMAP1: Remove dma.h

 arch/arm/mach-omap1/board-h2.c |   36 
 arch/arm/mach-omap1/board-palmte.c |   31 --
 arch/arm/mach-omap1/board-palmtt.c |   30 --
 arch/arm/mach-omap1/board-palmz71.c|   31 --
 arch/arm/mach-omap1/board-sx1.c|   36 
 arch/arm/mach-omap1/devices.c  |9 ++-
 arch/arm/mach-omap1/dma.c  |2 -
 arch/arm/mach-omap1/dma.h  |   42 --
 arch/arm/mach-omap1/include/mach/irda.h|   33 ---
 arch/arm/mach-omap1/lcd_dma.c  |2 -
 arch/arm/mach-omap1/mcbsp.c|   33 +--
 arch/arm/mach-omap2/devices.c  |1 -
 arch/arm/mach-omap2/dma.h  |   61 
 .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c |   21 ---
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |   19 +++---
 15 files changed, 39 insertions(+), 348 deletions(-)
 delete mode 100644 arch/arm/mach-omap1/dma.h
 delete mode 100644 arch/arm/mach-omap1/include/mach/irda.h
 delete mode 100644 arch/arm/mach-omap2/dma.h

-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/8] ARM: OMAP2+: Remove duplicated DMA channel definitions

2013-06-15 Thread Jarkko Nikula
Many DMA channel definitions in arch/arm/mach-omap2/dma.h have been moved or
redefined in drivers without removing them from dma.h. Remove those with a
script below:

egrep '#define OMAP.*DMA' arch/arm/mach-omap2/dma.h \
|cut -f 1 |cut -d ' ' -f 1-2 | while read -r i; do \
if [ `git grep -c $i |wc -l` -gt 1 ]; then \
echo removing $i; \
sed -i /${i}/d arch/arm/mach-omap2/dma.h; \
fi; \
done

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 arch/arm/mach-omap2/dma.h |   12 
 1 file changed, 12 deletions(-)

diff --git a/arch/arm/mach-omap2/dma.h b/arch/arm/mach-omap2/dma.h
index 4141ef0..8a71c7b 100644
--- a/arch/arm/mach-omap2/dma.h
+++ b/arch/arm/mach-omap2/dma.h
@@ -21,30 +21,18 @@
 
 
 /* DMA channels for 24xx */
-#define OMAP24XX_DMA_NO_DEVICE 0
-#define OMAP24XX_DMA_EXT_DMAREQ0   2   /* S_DMA_1 */
-#define OMAP24XX_DMA_EXT_DMAREQ1   3   /* S_DMA_2 */
-#define OMAP24XX_DMA_GPMC  4   /* S_DMA_3 */
-#define OMAP242X_DMA_EXT_DMAREQ2   14  /* S_DMA_13 */
-#define OMAP242X_DMA_EXT_DMAREQ3   15  /* S_DMA_14 */
-#define OMAP242X_DMA_EXT_DMAREQ4   16  /* S_DMA_15 */
 #define OMAP34XX_DMA_I2C3_TX   25  /* S_DMA_24 */
 #define OMAP34XX_DMA_I2C3_RX   26  /* S_DMA_25 */
 #define OMAP24XX_DMA_I2C1_TX   27  /* S_DMA_26 */
 #define OMAP24XX_DMA_I2C1_RX   28  /* S_DMA_27 */
 #define OMAP24XX_DMA_I2C2_TX   29  /* S_DMA_28 */
 #define OMAP24XX_DMA_I2C2_RX   30  /* S_DMA_29 */
-#define OMAP24XX_DMA_MMC2_TX   47  /* S_DMA_46 */
-#define OMAP24XX_DMA_MMC2_RX   48  /* S_DMA_47 */
 #define OMAP24XX_DMA_UART1_TX  49  /* S_DMA_48 */
 #define OMAP24XX_DMA_UART1_RX  50  /* S_DMA_49 */
 #define OMAP24XX_DMA_UART2_TX  51  /* S_DMA_50 */
 #define OMAP24XX_DMA_UART2_RX  52  /* S_DMA_51 */
 #define OMAP24XX_DMA_UART3_TX  53  /* S_DMA_52 */
 #define OMAP24XX_DMA_UART3_RX  54  /* S_DMA_53 */
-#define OMAP24XX_DMA_MMC1_TX   61  /* S_DMA_60 */
-#define OMAP24XX_DMA_MMC1_RX   62  /* S_DMA_61 */
-#define OMAP242X_DMA_EXT_DMAREQ5   64  /* S_DMA_63 */
 #define OMAP34XX_DMA_AES2_TX   65  /* S_DMA_64 */
 #define OMAP34XX_DMA_AES2_RX   66  /* S_DMA_65 */
 #define OMAP34XX_DMA_SHA1MD5_RX69  /* S_DMA_68 */
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/8] ARM: OMAP2+: hwmod: Remove remaining DMA channel definitions

2013-06-15 Thread Jarkko Nikula
Last remaining DMA channel definitions in arch/arm/mach-omap2/dma.h
are used only by omap_hwmod_2xxx_3xxx_ipblock_data.c and
omap_hwmod_3xxx_data.c. Remove them by using directly DMA channel number in
hwmod data and drop definitions with a following script:

egrep '#define [OMAP|AM35XX].*DMA' arch/arm/mach-omap2/dma.h | cut -f 1,3 \
| while read i; do \
DEF=`echo $i |cut -d ' ' -f 2`; \
CH=`echo $i |cut -d ' ' -f 3`; \
echo removing $DEF; \
sed -i s/${DEF}/${CH}/ arch/arm/mach-omap2/omap_hwmod_*.c; \
sed -i /${DEF}/d arch/arm/mach-omap2/dma.h; \
done

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
Cc: Paul Walmsley p...@pwsan.com
---
 arch/arm/mach-omap2/dma.h  |   19 ---
 .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c |   20 ++--
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |   18 +-
 3 files changed, 19 insertions(+), 38 deletions(-)

diff --git a/arch/arm/mach-omap2/dma.h b/arch/arm/mach-omap2/dma.h
index 8a71c7b..aa735a4 100644
--- a/arch/arm/mach-omap2/dma.h
+++ b/arch/arm/mach-omap2/dma.h
@@ -21,27 +21,8 @@
 
 
 /* DMA channels for 24xx */
-#define OMAP34XX_DMA_I2C3_TX   25  /* S_DMA_24 */
-#define OMAP34XX_DMA_I2C3_RX   26  /* S_DMA_25 */
-#define OMAP24XX_DMA_I2C1_TX   27  /* S_DMA_26 */
-#define OMAP24XX_DMA_I2C1_RX   28  /* S_DMA_27 */
-#define OMAP24XX_DMA_I2C2_TX   29  /* S_DMA_28 */
-#define OMAP24XX_DMA_I2C2_RX   30  /* S_DMA_29 */
-#define OMAP24XX_DMA_UART1_TX  49  /* S_DMA_48 */
-#define OMAP24XX_DMA_UART1_RX  50  /* S_DMA_49 */
-#define OMAP24XX_DMA_UART2_TX  51  /* S_DMA_50 */
-#define OMAP24XX_DMA_UART2_RX  52  /* S_DMA_51 */
-#define OMAP24XX_DMA_UART3_TX  53  /* S_DMA_52 */
-#define OMAP24XX_DMA_UART3_RX  54  /* S_DMA_53 */
-#define OMAP34XX_DMA_AES2_TX   65  /* S_DMA_64 */
-#define OMAP34XX_DMA_AES2_RX   66  /* S_DMA_65 */
-#define OMAP34XX_DMA_SHA1MD5_RX69  /* S_DMA_68 */
 
-#define OMAP36XX_DMA_UART4_TX  81  /* S_DMA_80 */
-#define OMAP36XX_DMA_UART4_RX  82  /* S_DMA_81 */
 
 /* Only for AM35xx */
-#define AM35XX_DMA_UART4_TX54
-#define AM35XX_DMA_UART4_RX55
 
 #endif /* __OMAP2PLUS_DMA_CHANNEL_H */
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c 
b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
index 534974e..ef56897 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
@@ -89,32 +89,32 @@ struct omap_hwmod_class omap2_venc_hwmod_class = {
 
 /* Common DMA request line data */
 struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[] = {
-   { .name = rx, .dma_req = OMAP24XX_DMA_UART1_RX, },
-   { .name = tx, .dma_req = OMAP24XX_DMA_UART1_TX, },
+   { .name = rx, .dma_req = 50, },
+   { .name = tx, .dma_req = 49, },
{ .dma_req = -1 }
 };
 
 struct omap_hwmod_dma_info omap2_uart2_sdma_reqs[] = {
-   { .name = rx, .dma_req = OMAP24XX_DMA_UART2_RX, },
-   { .name = tx, .dma_req = OMAP24XX_DMA_UART2_TX, },
+   { .name = rx, .dma_req = 52, },
+   { .name = tx, .dma_req = 51, },
{ .dma_req = -1 }
 };
 
 struct omap_hwmod_dma_info omap2_uart3_sdma_reqs[] = {
-   { .name = rx, .dma_req = OMAP24XX_DMA_UART3_RX, },
-   { .name = tx, .dma_req = OMAP24XX_DMA_UART3_TX, },
+   { .name = rx, .dma_req = 54, },
+   { .name = tx, .dma_req = 53, },
{ .dma_req = -1 }
 };
 
 struct omap_hwmod_dma_info omap2_i2c1_sdma_reqs[] = {
-   { .name = tx, .dma_req = OMAP24XX_DMA_I2C1_TX },
-   { .name = rx, .dma_req = OMAP24XX_DMA_I2C1_RX },
+   { .name = tx, .dma_req = 27 },
+   { .name = rx, .dma_req = 28 },
{ .dma_req = -1 }
 };
 
 struct omap_hwmod_dma_info omap2_i2c2_sdma_reqs[] = {
-   { .name = tx, .dma_req = OMAP24XX_DMA_I2C2_TX },
-   { .name = rx, .dma_req = OMAP24XX_DMA_I2C2_RX },
+   { .name = tx, .dma_req = 29 },
+   { .name = rx, .dma_req = 30 },
{ .dma_req = -1 }
 };
 
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c 
b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 31c7126..33d5620 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -548,8 +548,8 @@ static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
 };
 
 static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
-   { .name = rx, .dma_req = OMAP36XX_DMA_UART4_RX, },
-   { .name = tx, .dma_req = OMAP36XX_DMA_UART4_TX, },
+   { .name = rx, .dma_req = 82, },
+   { .name = tx, .dma_req = 81, },
{ .dma_req = -1 }
 };
 
@@ -577,8 +577,8 @@ static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = 
{
 };
 
 static struct

[PATCH 4/8] ARM: OMAP2+: Remove dma.h

2013-06-15 Thread Jarkko Nikula
All definitions in arch/arm/mach-omap2/dma.h are removed so it can be
removed now.

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 arch/arm/mach-omap2/devices.c  |1 -
 arch/arm/mach-omap2/dma.h  |   28 
 .../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c |1 -
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |1 -
 4 files changed, 31 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/dma.h

diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index c0f99ab..403c211 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -37,7 +37,6 @@
 #include mux.h
 #include control.h
 #include devices.h
-#include dma.h
 
 #define L3_MODULES_MAX_LEN 12
 #define L3_MODULES 3
diff --git a/arch/arm/mach-omap2/dma.h b/arch/arm/mach-omap2/dma.h
deleted file mode 100644
index aa735a4..000
--- a/arch/arm/mach-omap2/dma.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- *  OMAP2PLUS DMA channel definitions
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef __OMAP2PLUS_DMA_CHANNEL_H
-#define __OMAP2PLUS_DMA_CHANNEL_H
-
-
-/* DMA channels for 24xx */
-
-
-/* Only for AM35xx */
-
-#endif /* __OMAP2PLUS_DMA_CHANNEL_H */
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c 
b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
index ef56897..5da7a42 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
@@ -17,7 +17,6 @@
 #include hdq1w.h
 
 #include omap_hwmod_common_data.h
-#include dma.h
 
 /* UART */
 
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c 
b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 33d5620..fa99154 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -35,7 +35,6 @@
 #include prm-regbits-34xx.h
 #include cm-regbits-34xx.h
 
-#include dma.h
 #include i2c.h
 #include mmc.h
 #include wd_timer.h
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 6/8] ARM: OMAP1: Remove duplicated DMA channel definitions

2013-06-15 Thread Jarkko Nikula
Similarly than with OMAP2 there are many DMA channel definitions that have
been moved or redefined in drivers using them and we can remove them from
dma.h.

There is exception with MMC that arch/arm/mach-omap1/devices.c is using
MMC DMA channel definitions for setting platform data but those can be well
replaced with numeric values.

Remove dma.h include from arch/arm/mach-omap1/devices.c and use a script
below for dropping duplicated definitions and for replacing definitions
with DMA channel numbers.

grep '#define OMAP_DMA' arch/arm/mach-omap1/dma.h | while read -r i; do \
DDEF=`echo $i |cut -d ' ' -f 1-2`; \
DEF=`echo $DDEF |cut -d ' ' -f 2`; \
CH=`echo $i |cut -d ' ' -f 3`; \
if [ `git grep -c $DDEF |wc -l` -gt 1 ]; then \
echo removing $DEF; \
sed -i s/${DEF}/${CH}/ arch/arm/mach-omap1/devices.c; 
\
sed -i /${DDEF}/d arch/arm/mach-omap1/dma.h; \
fi; \
done

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 arch/arm/mach-omap1/devices.c |9 -
 arch/arm/mach-omap1/dma.h |8 
 2 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 0af635205..325e603 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -30,7 +30,6 @@
 
 #include common.h
 #include clock.h
-#include dma.h
 #include mmc.h
 #include sram.h
 
@@ -223,16 +222,16 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data 
**mmc_data,
case 0:
base = OMAP1_MMC1_BASE;
irq = INT_MMC;
-   rx_req = OMAP_DMA_MMC_RX;
-   tx_req = OMAP_DMA_MMC_TX;
+   rx_req = 22;
+   tx_req = 21;
break;
case 1:
if (!cpu_is_omap16xx())
return;
base = OMAP1_MMC2_BASE;
irq = INT_1610_MMC2;
-   rx_req = OMAP_DMA_MMC2_RX;
-   tx_req = OMAP_DMA_MMC2_TX;
+   rx_req = 55;
+   tx_req = 54;
break;
default:
continue;
diff --git a/arch/arm/mach-omap1/dma.h b/arch/arm/mach-omap1/dma.h
index 1932e9a..dc33cd9 100644
--- a/arch/arm/mach-omap1/dma.h
+++ b/arch/arm/mach-omap1/dma.h
@@ -20,17 +20,9 @@
 #define __OMAP1_DMA_CHANNEL_H
 
 /* DMA channels for omap1 */
-#define OMAP_DMA_NO_DEVICE 0
 #define OMAP_DMA_UART3_TX  18
 #define OMAP_DMA_UART3_RX  19
-#define OMAP_DMA_CAMERA_IF_RX  20
-#define OMAP_DMA_MMC_TX21
-#define OMAP_DMA_MMC_RX22
-#define OMAP_DMA_USB_W2FC_RX0  26
-#define OMAP_DMA_USB_W2FC_TX0  29
 
 /* These are only for 1610 */
-#define OMAP_DMA_MMC2_TX   54
-#define OMAP_DMA_MMC2_RX   55
 
 #endif /* __OMAP1_DMA_CHANNEL_H */
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/8] ARM: OMAP1: Remove McBSP DMA channel definitions

2013-06-15 Thread Jarkko Nikula
arch/arm/mach-omap1/mcbsp.c is only place where OMAP1 McBSP DMA channel
definitions are set. We may well use numerical values there and get rid
of their definitions in arch/arm/mach-omap1/dma.h.

Remove dma.h include from arch/arm/mach-omap1/mcbsp.c and use following
script for replacing definitions with DMA channel number:

egrep '#define OMAP_DMA_MCBSP' arch/arm/mach-omap1/dma.h | cut -f 1,3 \
| while read i; do \
DEF=`echo $i |cut -d ' ' -f 2`; \
CH=`echo $i |cut -d ' ' -f 3`; \
echo removing $DEF; \
sed -i s/${DEF}/${CH}/ arch/arm/mach-omap1/mcbsp.c; \
sed -i /${DEF}/d arch/arm/mach-omap1/dma.h; \
done

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 arch/arm/mach-omap1/dma.h   |6 --
 arch/arm/mach-omap1/mcbsp.c |   33 -
 2 files changed, 16 insertions(+), 23 deletions(-)

diff --git a/arch/arm/mach-omap1/dma.h b/arch/arm/mach-omap1/dma.h
index d05909c..1932e9a 100644
--- a/arch/arm/mach-omap1/dma.h
+++ b/arch/arm/mach-omap1/dma.h
@@ -21,12 +21,6 @@
 
 /* DMA channels for omap1 */
 #define OMAP_DMA_NO_DEVICE 0
-#define OMAP_DMA_MCBSP1_TX 8
-#define OMAP_DMA_MCBSP1_RX 9
-#define OMAP_DMA_MCBSP3_TX 10
-#define OMAP_DMA_MCBSP3_RX 11
-#define OMAP_DMA_MCBSP2_TX 16
-#define OMAP_DMA_MCBSP2_RX 17
 #define OMAP_DMA_UART3_TX  18
 #define OMAP_DMA_UART3_RX  19
 #define OMAP_DMA_CAMERA_IF_RX  20
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
index b0d4723..8ed67f8 100644
--- a/arch/arm/mach-omap1/mcbsp.c
+++ b/arch/arm/mach-omap1/mcbsp.c
@@ -27,7 +27,6 @@
 #include mach/irqs.h
 
 #include iomap.h
-#include dma.h
 
 #define DPS_RSTCT2_PER_EN  (1  0)
 #define DSP_RSTCT2_WD_PER_EN   (1  1)
@@ -114,12 +113,12 @@ struct resource omap7xx_mcbsp_res[][6] = {
},
{
.name  = rx,
-   .start = OMAP_DMA_MCBSP1_RX,
+   .start = 9,
.flags = IORESOURCE_DMA,
},
{
.name  = tx,
-   .start = OMAP_DMA_MCBSP1_TX,
+   .start = 8,
.flags = IORESOURCE_DMA,
},
},
@@ -141,12 +140,12 @@ struct resource omap7xx_mcbsp_res[][6] = {
},
{
.name  = rx,
-   .start = OMAP_DMA_MCBSP3_RX,
+   .start = 11,
.flags = IORESOURCE_DMA,
},
{
.name  = tx,
-   .start = OMAP_DMA_MCBSP3_TX,
+   .start = 10,
.flags = IORESOURCE_DMA,
},
},
@@ -191,12 +190,12 @@ struct resource omap15xx_mcbsp_res[][6] = {
},
{
.name  = rx,
-   .start = OMAP_DMA_MCBSP1_RX,
+   .start = 9,
.flags = IORESOURCE_DMA,
},
{
.name  = tx,
-   .start = OMAP_DMA_MCBSP1_TX,
+   .start = 8,
.flags = IORESOURCE_DMA,
},
},
@@ -218,12 +217,12 @@ struct resource omap15xx_mcbsp_res[][6] = {
},
{
.name  = rx,
-   .start = OMAP_DMA_MCBSP2_RX,
+   .start = 17,
.flags = IORESOURCE_DMA,
},
{
.name  = tx,
-   .start = OMAP_DMA_MCBSP2_TX,
+   .start = 16,
.flags = IORESOURCE_DMA,
},
},
@@ -245,12 +244,12 @@ struct resource omap15xx_mcbsp_res[][6] = {
},
{
.name  = rx,
-   .start = OMAP_DMA_MCBSP3_RX,
+   .start = 11,
.flags = IORESOURCE_DMA,
},
{
.name  = tx,
-   .start = OMAP_DMA_MCBSP3_TX,
+   .start = 10,
.flags = IORESOURCE_DMA,
},
},
@@ -298,12 +297,12 @@ struct resource omap16xx_mcbsp_res[][6] = {
},
{
.name  = rx,
-   .start = OMAP_DMA_MCBSP1_RX,
+   .start = 9,
.flags = IORESOURCE_DMA,
},
{
.name  = tx,
-   .start = OMAP_DMA_MCBSP1_TX,
+   .start = 8,
.flags = IORESOURCE_DMA

[PATCH 8/8] ARM: OMAP1: Remove dma.h

2013-06-15 Thread Jarkko Nikula
Add definitions in arch/arm/mach-omap1/dma.h are now removed so remove
the file and include statements from dma.c and lcd_dma.c.

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 arch/arm/mach-omap1/dma.c |2 --
 arch/arm/mach-omap1/dma.h |   26 --
 arch/arm/mach-omap1/lcd_dma.c |2 --
 3 files changed, 30 deletions(-)
 delete mode 100644 arch/arm/mach-omap1/dma.h

diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
index a94b3a7..5bb8ce8 100644
--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -30,8 +30,6 @@
 
 #include mach/irqs.h
 
-#include dma.h
-
 #define OMAP1_DMA_BASE (0xfffed800)
 #define OMAP1_LOGICAL_DMA_CH_COUNT 17
 #define OMAP1_DMA_STRIDE   0x40
diff --git a/arch/arm/mach-omap1/dma.h b/arch/arm/mach-omap1/dma.h
deleted file mode 100644
index 6c751e8..000
--- a/arch/arm/mach-omap1/dma.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *  OMAP1 DMA channel definitions
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef __OMAP1_DMA_CHANNEL_H
-#define __OMAP1_DMA_CHANNEL_H
-
-/* DMA channels for omap1 */
-
-/* These are only for 1610 */
-
-#endif /* __OMAP1_DMA_CHANNEL_H */
diff --git a/arch/arm/mach-omap1/lcd_dma.c b/arch/arm/mach-omap1/lcd_dma.c
index 77924be..26a2b01 100644
--- a/arch/arm/mach-omap1/lcd_dma.c
+++ b/arch/arm/mach-omap1/lcd_dma.c
@@ -32,8 +32,6 @@
 #include mach/hardware.h
 #include mach/lcdc.h
 
-#include dma.h
-
 int omap_lcd_dma_running(void)
 {
/*
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 7/8] ARM: OMAP1: Remove legacy irda.h and irda setup from board files

2013-06-15 Thread Jarkko Nikula
omap-ir.c driver has never been upstream and was also removed from
linux-omap.git four years ago (See linux-omap.git commit efd1e3f
(REMOVE OMAP LEGACY CODE: Reset drivers/net/irda to mainline)).

Therefore remove needless device registration from a few board files
and delete thus to be unused arch/arm/mach-omap1/include/mach/irda.h
and unused OMAP_DMA_UART3_* definitions from dma.h.

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 arch/arm/mach-omap1/board-h2.c  |   36 ---
 arch/arm/mach-omap1/board-palmte.c  |   31 --
 arch/arm/mach-omap1/board-palmtt.c  |   30 --
 arch/arm/mach-omap1/board-palmz71.c |   31 --
 arch/arm/mach-omap1/board-sx1.c |   36 ---
 arch/arm/mach-omap1/dma.h   |2 --
 arch/arm/mach-omap1/include/mach/irda.h |   33 
 7 files changed, 199 deletions(-)
 delete mode 100644 arch/arm/mach-omap1/include/mach/irda.h

diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 0dac3d2..fd90caf 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -41,7 +41,6 @@
 #include mach/mux.h
 #include linux/omap-dma.h
 #include mach/tc.h
-#include mach/irda.h
 #include linux/platform_data/keypad-omap.h
 #include mach/flash.h
 
@@ -50,7 +49,6 @@
 
 #include common.h
 #include board-h2.h
-#include dma.h
 
 /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
 #define OMAP1610_ETHR_START0x04000300
@@ -276,39 +274,6 @@ static struct platform_device h2_kp_device = {
.resource   = h2_kp_resources,
 };
 
-#define H2_IRDA_FIRSEL_GPIO_PIN17
-
-static struct omap_irda_config h2_irda_data = {
-   .transceiver_cap= IR_SIRMODE | IR_MIRMODE | IR_FIRMODE,
-   .rx_channel = OMAP_DMA_UART3_RX,
-   .tx_channel = OMAP_DMA_UART3_TX,
-   .dest_start = UART3_THR,
-   .src_start  = UART3_RHR,
-   .tx_trigger = 0,
-   .rx_trigger = 0,
-};
-
-static struct resource h2_irda_resources[] = {
-   [0] = {
-   .start  = INT_UART3,
-   .end= INT_UART3,
-   .flags  = IORESOURCE_IRQ,
-   },
-};
-
-static u64 irda_dmamask = 0x;
-
-static struct platform_device h2_irda_device = {
-   .name   = omapirda,
-   .id = 0,
-   .dev= {
-   .platform_data  = h2_irda_data,
-   .dma_mask   = irda_dmamask,
-   },
-   .num_resources  = ARRAY_SIZE(h2_irda_resources),
-   .resource   = h2_irda_resources,
-};
-
 static struct gpio_led h2_gpio_led_pins[] = {
{
.name   = h2:red,
@@ -339,7 +304,6 @@ static struct platform_device *h2_devices[] __initdata = {
h2_nor_device,
h2_nand_device,
h2_smc91x_device,
-   h2_irda_device,
h2_kp_device,
h2_gpio_leds,
 };
diff --git a/arch/arm/mach-omap1/board-palmte.c 
b/arch/arm/mach-omap1/board-palmte.c
index 845a1a7..3b8e98f 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -38,14 +38,12 @@
 #include mach/mux.h
 #include mach/tc.h
 #include linux/omap-dma.h
-#include mach/irda.h
 #include linux/platform_data/keypad-omap.h
 
 #include mach/hardware.h
 #include mach/usb.h
 
 #include common.h
-#include dma.h
 
 #define PALMTE_USBDETECT_GPIO  0
 #define PALMTE_USB_OR_DC_GPIO  1
@@ -167,40 +165,11 @@ static struct platform_device palmte_backlight_device = {
},
 };
 
-static struct omap_irda_config palmte_irda_config = {
-   .transceiver_cap= IR_SIRMODE,
-   .rx_channel = OMAP_DMA_UART3_RX,
-   .tx_channel = OMAP_DMA_UART3_TX,
-   .dest_start = UART3_THR,
-   .src_start  = UART3_RHR,
-   .tx_trigger = 0,
-   .rx_trigger = 0,
-};
-
-static struct resource palmte_irda_resources[] = {
-   [0] = {
-   .start  = INT_UART3,
-   .end= INT_UART3,
-   .flags  = IORESOURCE_IRQ,
-   },
-};
-
-static struct platform_device palmte_irda_device = {
-   .name   = omapirda,
-   .id = -1,
-   .dev= {
-   .platform_data  = palmte_irda_config,
-   },
-   .num_resources  = ARRAY_SIZE(palmte_irda_resources),
-   .resource   = palmte_irda_resources,
-};
-
 static struct platform_device *palmte_devices[] __initdata = {
palmte_rom_device,
palmte_kp_device,
palmte_lcd_device,
palmte_backlight_device,
-   palmte_irda_device,
 };
 
 static struct omap_usb_config palmte_usb_config __initdata = {
diff --git a/arch/arm/mach-omap1/board-palmtt.c 
b/arch/arm/mach-omap1/board-palmtt.c
index 65a4a3e..ca50120 100644

Re: [PATCH] ASoC: OMAP: Remove obsolete Makefile line

2013-05-30 Thread Jarkko Nikula
On Thu, 30 May 2013 09:37:40 +0200
Paul Bolle pebo...@tiscali.nl wrote:

 Support for omap2evm was removed in v3.0. But only one of its two
 lines in this Makefile was removed. Remove the second line too.
 
 Signed-off-by: Paul Bolle pebo...@tiscali.nl
 ---
 Eyeball tested only.
 
  sound/soc/omap/Makefile | 1 -
  1 file changed, 1 deletion(-)
 
True, commit 91d94af (omap: Remove support for omap2evm) removed only 
omap2evm.o.

Acked-by: Jarkko Nikula jarkko.nik...@bitmer.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC 1/2] ARM: OMAP1: Remove unused DMA channel definitions

2013-03-13 Thread Jarkko Nikula
Many of these channel definitions have became unused or were never used
so remove unused definitions from arch/arm/mach-omap1/dma.h using a script
below. See also notes in commit 8c4cc00
(ARM: OMAP1: DMA: Moving OMAP1 DMA channel definitions to mach-omap1)
for removing remaining ones.

egrep '#define OMAP.*DMA' arch/arm/mach-omap1/dma.h \
|cut -f 1 |cut -d ' ' -f 2 | while read -r i; do \
if [ `git grep -c $i | wc -l` -eq 1 ]; then \
echo removing $i; \
sed -i /${i}/d arch/arm/mach-omap1/dma.h; \
fi; \
done

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 arch/arm/mach-omap1/dma.h |   41 -
 1 file changed, 41 deletions(-)

diff --git a/arch/arm/mach-omap1/dma.h b/arch/arm/mach-omap1/dma.h
index da6345d..d05909c 100644
--- a/arch/arm/mach-omap1/dma.h
+++ b/arch/arm/mach-omap1/dma.h
@@ -21,21 +21,10 @@
 
 /* DMA channels for omap1 */
 #define OMAP_DMA_NO_DEVICE 0
-#define OMAP_DMA_MCSI1_TX  1
-#define OMAP_DMA_MCSI1_RX  2
-#define OMAP_DMA_I2C_RX3
-#define OMAP_DMA_I2C_TX4
-#define OMAP_DMA_EXT_NDMA_REQ  5
-#define OMAP_DMA_EXT_NDMA_REQ2 6
-#define OMAP_DMA_UWIRE_TX  7
 #define OMAP_DMA_MCBSP1_TX 8
 #define OMAP_DMA_MCBSP1_RX 9
 #define OMAP_DMA_MCBSP3_TX 10
 #define OMAP_DMA_MCBSP3_RX 11
-#define OMAP_DMA_UART1_TX  12
-#define OMAP_DMA_UART1_RX  13
-#define OMAP_DMA_UART2_TX  14
-#define OMAP_DMA_UART2_RX  15
 #define OMAP_DMA_MCBSP2_TX 16
 #define OMAP_DMA_MCBSP2_RX 17
 #define OMAP_DMA_UART3_TX  18
@@ -43,41 +32,11 @@
 #define OMAP_DMA_CAMERA_IF_RX  20
 #define OMAP_DMA_MMC_TX21
 #define OMAP_DMA_MMC_RX22
-#define OMAP_DMA_NAND  23
-#define OMAP_DMA_IRQ_LCD_LINE  24
-#define OMAP_DMA_MEMORY_STICK  25
 #define OMAP_DMA_USB_W2FC_RX0  26
-#define OMAP_DMA_USB_W2FC_RX1  27
-#define OMAP_DMA_USB_W2FC_RX2  28
 #define OMAP_DMA_USB_W2FC_TX0  29
-#define OMAP_DMA_USB_W2FC_TX1  30
-#define OMAP_DMA_USB_W2FC_TX2  31
 
 /* These are only for 1610 */
-#define OMAP_DMA_CRYPTO_DES_IN 32
-#define OMAP_DMA_SPI_TX33
-#define OMAP_DMA_SPI_RX34
-#define OMAP_DMA_CRYPTO_HASH   35
-#define OMAP_DMA_CCP_ATTN  36
-#define OMAP_DMA_CCP_FIFO_NOT_EMPTY37
-#define OMAP_DMA_CMT_APE_TX_CHAN_0 38
-#define OMAP_DMA_CMT_APE_RV_CHAN_0 39
-#define OMAP_DMA_CMT_APE_TX_CHAN_1 40
-#define OMAP_DMA_CMT_APE_RV_CHAN_1 41
-#define OMAP_DMA_CMT_APE_TX_CHAN_2 42
-#define OMAP_DMA_CMT_APE_RV_CHAN_2 43
-#define OMAP_DMA_CMT_APE_TX_CHAN_3 44
-#define OMAP_DMA_CMT_APE_RV_CHAN_3 45
-#define OMAP_DMA_CMT_APE_TX_CHAN_4 46
-#define OMAP_DMA_CMT_APE_RV_CHAN_4 47
-#define OMAP_DMA_CMT_APE_TX_CHAN_5 48
-#define OMAP_DMA_CMT_APE_RV_CHAN_5 49
-#define OMAP_DMA_CMT_APE_TX_CHAN_6 50
-#define OMAP_DMA_CMT_APE_RV_CHAN_6 51
-#define OMAP_DMA_CMT_APE_TX_CHAN_7 52
-#define OMAP_DMA_CMT_APE_RV_CHAN_7 53
 #define OMAP_DMA_MMC2_TX   54
 #define OMAP_DMA_MMC2_RX   55
-#define OMAP_DMA_CRYPTO_DES_OUT56
 
 #endif /* __OMAP1_DMA_CHANNEL_H */
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC 2/2] ARM: OMAP2+: Remove unused DMA channel definitions

2013-03-13 Thread Jarkko Nikula
Many of these channel definitions have became unused or were never used
so remove unused definitions from arch/arm/mach-omap2/dma.h using a script
below. See also notes in commit d5e7c86
(ARM: OMAP2+: DMA: Moving OMAP2+ DMA channel definitions to mach-omap2)
for removing remaining ones.

egrep '#define OMAP.*DMA' arch/arm/mach-omap2/dma.h \
|cut -f 1 |cut -d ' ' -f 2 | while read -r i; do \
if [ `git grep -c $i | wc -l` -eq 1 ]; then \
echo removing $i; \
sed -i /${i}/d arch/arm/mach-omap2/dma.h; \
fi; \
done

Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
---
 arch/arm/mach-omap2/dma.h |   70 -
 1 file changed, 70 deletions(-)

diff --git a/arch/arm/mach-omap2/dma.h b/arch/arm/mach-omap2/dma.h
index eba80db..65f80ca 100644
--- a/arch/arm/mach-omap2/dma.h
+++ b/arch/arm/mach-omap2/dma.h
@@ -22,69 +22,20 @@
 
 /* DMA channels for 24xx */
 #define OMAP24XX_DMA_NO_DEVICE 0
-#define OMAP24XX_DMA_XTI_DMA   1   /* S_DMA_0 */
 #define OMAP24XX_DMA_EXT_DMAREQ0   2   /* S_DMA_1 */
 #define OMAP24XX_DMA_EXT_DMAREQ1   3   /* S_DMA_2 */
 #define OMAP24XX_DMA_GPMC  4   /* S_DMA_3 */
-#define OMAP24XX_DMA_GFX   5   /* S_DMA_4 */
-#define OMAP24XX_DMA_DSS   6   /* S_DMA_5 */
-#define OMAP242X_DMA_VLYNQ_TX  7   /* S_DMA_6 */
-#define OMAP24XX_DMA_EXT_DMAREQ2   7   /* S_DMA_6 */
-#define OMAP24XX_DMA_CWT   8   /* S_DMA_7 */
 #define OMAP24XX_DMA_AES_TX9   /* S_DMA_8 */
 #define OMAP24XX_DMA_AES_RX10  /* S_DMA_9 */
-#define OMAP24XX_DMA_DES_TX11  /* S_DMA_10 */
-#define OMAP24XX_DMA_DES_RX12  /* S_DMA_11 */
-#define OMAP24XX_DMA_SHA1MD5_RX13  /* S_DMA_12 */
-#define OMAP34XX_DMA_SHA2MD5_RX13  /* S_DMA_12 */
 #define OMAP242X_DMA_EXT_DMAREQ2   14  /* S_DMA_13 */
 #define OMAP242X_DMA_EXT_DMAREQ3   15  /* S_DMA_14 */
 #define OMAP242X_DMA_EXT_DMAREQ4   16  /* S_DMA_15 */
-#define OMAP242X_DMA_EAC_AC_RD 17  /* S_DMA_16 */
-#define OMAP242X_DMA_EAC_AC_WR 18  /* S_DMA_17 */
-#define OMAP242X_DMA_EAC_MD_UL_RD  19  /* S_DMA_18 */
-#define OMAP242X_DMA_EAC_MD_UL_WR  20  /* S_DMA_19 */
-#define OMAP242X_DMA_EAC_MD_DL_RD  21  /* S_DMA_20 */
-#define OMAP242X_DMA_EAC_MD_DL_WR  22  /* S_DMA_21 */
-#define OMAP242X_DMA_EAC_BT_UL_RD  23  /* S_DMA_22 */
-#define OMAP242X_DMA_EAC_BT_UL_WR  24  /* S_DMA_23 */
-#define OMAP242X_DMA_EAC_BT_DL_RD  25  /* S_DMA_24 */
-#define OMAP242X_DMA_EAC_BT_DL_WR  26  /* S_DMA_25 */
-#define OMAP243X_DMA_EXT_DMAREQ3   14  /* S_DMA_13 */
-#define OMAP24XX_DMA_SPI3_TX0  15  /* S_DMA_14 */
-#define OMAP24XX_DMA_SPI3_RX0  16  /* S_DMA_15 */
-#define OMAP24XX_DMA_MCBSP3_TX 17  /* S_DMA_16 */
-#define OMAP24XX_DMA_MCBSP3_RX 18  /* S_DMA_17 */
-#define OMAP24XX_DMA_MCBSP4_TX 19  /* S_DMA_18 */
-#define OMAP24XX_DMA_MCBSP4_RX 20  /* S_DMA_19 */
-#define OMAP24XX_DMA_MCBSP5_TX 21  /* S_DMA_20 */
-#define OMAP24XX_DMA_MCBSP5_RX 22  /* S_DMA_21 */
-#define OMAP24XX_DMA_SPI3_TX1  23  /* S_DMA_22 */
-#define OMAP24XX_DMA_SPI3_RX1  24  /* S_DMA_23 */
-#define OMAP243X_DMA_EXT_DMAREQ4   25  /* S_DMA_24 */
-#define OMAP243X_DMA_EXT_DMAREQ5   26  /* S_DMA_25 */
 #define OMAP34XX_DMA_I2C3_TX   25  /* S_DMA_24 */
 #define OMAP34XX_DMA_I2C3_RX   26  /* S_DMA_25 */
 #define OMAP24XX_DMA_I2C1_TX   27  /* S_DMA_26 */
 #define OMAP24XX_DMA_I2C1_RX   28  /* S_DMA_27 */
 #define OMAP24XX_DMA_I2C2_TX   29  /* S_DMA_28 */
 #define OMAP24XX_DMA_I2C2_RX   30  /* S_DMA_29 */
-#define OMAP24XX_DMA_MCBSP1_TX 31  /* S_DMA_30 */
-#define OMAP24XX_DMA_MCBSP1_RX 32  /* S_DMA_31 */
-#define OMAP24XX_DMA_MCBSP2_TX 33  /* S_DMA_32 */
-#define OMAP24XX_DMA_MCBSP2_RX 34  /* S_DMA_33 */
-#define OMAP24XX_DMA_SPI1_TX0  35  /* S_DMA_34 */
-#define OMAP24XX_DMA_SPI1_RX0  36  /* S_DMA_35 */
-#define OMAP24XX_DMA_SPI1_TX1  37  /* S_DMA_36 */
-#define OMAP24XX_DMA_SPI1_RX1  38  /* S_DMA_37 */
-#define OMAP24XX_DMA_SPI1_TX2  39  /* S_DMA_38 */
-#define OMAP24XX_DMA_SPI1_RX2  40  /* S_DMA_39 */
-#define OMAP24XX_DMA_SPI1_TX3  41  /* S_DMA_40 */
-#define OMAP24XX_DMA_SPI1_RX3  42  /* S_DMA_41 */
-#define OMAP24XX_DMA_SPI2_TX0  43  /* S_DMA_42 */
-#define OMAP24XX_DMA_SPI2_RX0  44  /* S_DMA_43 */
-#define OMAP24XX_DMA_SPI2_TX1  45  /* S_DMA_44 */
-#define OMAP24XX_DMA_SPI2_RX1  46

Re: [PATCH V2 1/2] ARM: dts: OMAP2+: Add SDMA Audio IPs bindings

2013-03-11 Thread Jarkko Nikula
On 03/11/2013 04:19 PM, Peter Ujfalusi wrote:
 On 03/11/2013 08:50 AM, Sebastien Guiriec wrote:
 Populate DMA client information for McBSP DMIC and McPDM periperhal on
 OMAP2+ devices.
 
 Looks good to me:
 Reviewed-by: Peter Ujfalusi peter.ujfal...@ti.com
 

Reviewed-by: Jarkko Nikula jarkko.nik...@bitmer.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V2 2/2] ASoC: OMAP2+: Move McBSP, DMIC and McPDM to generic DMA DT binding

2013-03-11 Thread Jarkko Nikula
On 03/11/2013 04:18 PM, Peter Ujfalusi wrote:
 On 03/11/2013 08:50 AM, Sebastien Guiriec wrote:
 Update OMAP2+ driver in order to use OMAP DMA DT binding for OMAP2+.
 In case of DT boot snd_dmaengine_generic_pcm_open function is used.
 
 Acked-by: Peter Ujfalusi peter.ujfal...@ti.com
 
Acked-by: Jarkko Nikula jarkko.nik...@bitmer.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] omap: convert to devm_ioremap_resource()

2013-03-11 Thread Jarkko Nikula
Hi

On 03/11/2013 05:58 PM, Silviu-Mihai Popescu wrote:
 Convert all uses of devm_request_and_ioremap() to the newly introduced
 devm_ioremap_resource() which provides more consistent error handling.
 
 devm_ioremap_resource() provides its own error messages so all explicit
 error messages can be removed from the failure code paths.
 
 Signed-off-by: Silviu-Mihai Popescu silviupopescu1...@gmail.com
 ---
  sound/soc/omap/omap-dmic.c  |9 +++--
  sound/soc/omap/omap-mcpdm.c |8 +++-
  2 files changed, 6 insertions(+), 11 deletions(-)
 
Acked-by: Jarkko Nikula jarkko.nik...@bitmer.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/5] ASoC: OMAP2+: Update Audio IP with sDMA binding for DT boot

2013-03-07 Thread Jarkko Nikula
On Thu, 7 Mar 2013 14:03:31 +0100
Peter Ujfalusi peter.ujfal...@ti.com wrote:

 Hi Sebastien,
 
 On 03/07/2013 01:43 PM, Sebastien Guiriec wrote:
  This patch serie is converting OMAP Audio IPs in order to use OMAP sDMA DT
  binding in case of DT boot on OMAP2+ platforms.
 
 The content of the patches looks about right for me, however I would squash
 together the IP and platform driver patches so we avoid breakage within the
 series. Also I would put the patch for the .dtsi files as first one.
 
Looks ok to me too at quick look. Would it be possible to avoid possible 
breakage if first patch is divided to omap-pcm.h change which come before audio 
link driver changes and do omap-pcm.c change last?

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ASoC: omap: Check regulator enable for DAC on Pandora

2013-03-03 Thread Jarkko Nikula
On Sat, 2013-03-02 at 16:02 +0100, Peter Ujfalusi wrote:
  diff --git a/sound/soc/omap/omap3pandora.c b/sound/soc/omap/omap3pandora.c
  index 805512f..953483e 100644
  --- a/sound/soc/omap/omap3pandora.c
  +++ b/sound/soc/omap/omap3pandora.c
  @@ -85,7 +85,11 @@ static int omap3pandora_dac_event(struct 
  snd_soc_dapm_widget *w,
   * VCC power on/off and /PD pin high/low
   */
  if (SND_SOC_DAPM_EVENT_ON(event)) {
  -   regulator_enable(omap3pandora_dac_reg);
  +   ret = regulator_enable(omap3pandora_dac_reg);
  +   if (ret != 0) {
 
 The rest of this machine driver uses if (ret  0) or if (ret). I would 
 use:
  +if (ret) {
 
...
 Otherwise:
 Acked-by: Peter Ujfalusi peter.ujfal...@ti.com
 
To whatever version of (ret != 0), (ret) or (ret  0) is used :-)

Acked-by: Jarkko Nikula jarkko.nik...@bitmer.com

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] spi: spi-omap2-mcspi.c: fix coding style

2013-01-24 Thread Jarkko Nikula
Hi

On Thu, 24 Jan 2013 13:28:58 +0100
Matthias Brugger matthias@gmail.com wrote:

 This patch fixes some indentation errors.
 
 Signed-off-by: Matthias Brugger matthias@gmail.com
 ---
  drivers/spi/spi-omap2-mcspi.c | 16 
  1 file changed, 8 insertions(+), 8 deletions(-)
 
...
 @@ -1052,8 +1052,8 @@ static int omap2_mcspi_transfer_one_message(struct 
 spi_master *master,
   }
   if (t-speed_hz  t-speed_hz  (OMAP2_MCSPI_MAX_FREQ  15)) {
   dev_dbg(mcspi-dev, speed_hz %d below minimum %d Hz\n,
 - t-speed_hz,
 - OMAP2_MCSPI_MAX_FREQ  15);
 + t-speed_hz,
 + OMAP2_MCSPI_MAX_FREQ  15);

I have some mixed feelings from these changes and looking at the driver 
currently. Above change makes the readability a step backward but the driver 
has already these so in that sense your change makes the style more consistent.

I can see three options with this patch: take your patch as it, do nothing or 
do larger style 'spring cleanup'.

I'm personally somewhere take as it or do nothing. If style is not terribly 
wrong I personally favor smaller style fixes when those lines are changing 
anyway.

In case maintainer takes this you could add:

Reviewed-by: Jarkko Nikula jarkko.nik...@bitmer.com

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] spi: spi-omap2-mcspi.c: Toggle CS after each word

2013-01-23 Thread Jarkko Nikula
Hi

On Wed, 23 Jan 2013 19:08:49 +0100
Matthias Brugger matthias@gmail.com wrote:

 @@ -1020,7 +1038,7 @@ static void omap2_mcspi_work(struct omap2_mcspi *mcspi, 
 struct spi_message *m)
  }
  
  static int omap2_mcspi_transfer_one_message(struct spi_master *master,
 - struct spi_message *m)
 + struct spi_message *m)
  {
   struct omap2_mcspi  *mcspi;
   struct spi_transfer *t;
 @@ -1041,7 +1059,7 @@ static int omap2_mcspi_transfer_one_message(struct 
 spi_master *master,
   || (len  !(rx_buf || tx_buf))
   || (t-bits_per_word 
   (  t-bits_per_word  4
 - || t-bits_per_word  32))) {
 +|| t-bits_per_word  32))) {
   dev_dbg(mcspi-dev, transfer: %d Hz, %d %s%s, %d 
 bpw\n,
   t-speed_hz,
   len,

Just a sidenote but these indentation changes should go to another patch as 
they count about half of the lines.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: McBSP functions not exported

2013-01-15 Thread Jarkko Nikula
Hi

On Tue, 15 Jan 2013 17:43:54 +
Paul Barker p...@paulbarker.me.uk wrote:

 I'm going to go back to using kernel 3.2 and check that this actually 
 works
 with the McBSP. If it does, how much hassle is it to export the 
 required symbols
 in more recent kernels? I'll happily write the patch, I just don't want 
 to
 introduce too much more maintenance overhead going forward.
 
Quick idea that came to my mind. Hack and I don't know how feasible it is but 
would it be possible to make that ADC as a simple ASoC codec driver in your 
usecase? I.e. using ALSA API for high-rate ADC measurements and reuse existing 
serial link and dma drivers.

Anyway I think high-rate ADC falls in gray area in kernel currently. 
drivers/iio/ seems to not cover them and does not match exactly with ASoC 
either.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH_v2] watchdog: Convert twl4030_wdt to watchdog core

2012-12-13 Thread Jarkko Nikula

Hi

On 12/14/2012 03:28 AM, Sebastian Reichel wrote:

Hi,

On Thu, Sep 27, 2012 at 11:23:12PM +0200, Wim Van Sebroeck wrote:

On 09/11/2012 09:01 AM, Jarkko Nikula wrote:

Convert the twl4030_wdt watchdog driver to watchdog core.

While at there use devm_kzalloc and set the default timeout in order to be
able test this driver with a simple shell script.

Signed-off-by: Jarkko Nikulajarkko.nik...@jollamobile.com
Tested-by: Aaro Koskinenaaro.koski...@iki.fi

on my todo list.

Will this patch get into 3.8? I did not yet see it
in linux-watchdog-next.git.

I've been wondering the same. How to get forward with this patch?

--
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/5] ASoC: OMAP: mcbsp fixes for enabling ARM multiplatform support

2012-11-22 Thread Jarkko Nikula
On Wed, 21 Nov 2012 09:42:25 -0800
Tony Lindgren t...@atomide.com wrote:

 We cannot include any plat or mach headers for the multiplatform
 support.
 
 Fix the issue by defining local mcbsp_omap1().
 
 cc: Peter Ujfalusi peter.ujfal...@ti.com
 cc: Jarkko Nikula jarkko.nik...@bitmer.com
 cc: Liam Girdwood l...@ti.com
 cc: Mark Brown broo...@opensource.wolfsonmicro.com
 cc: Jaroslav Kysela pe...@perex.cz
 cc: Takashi Iwai ti...@suse.de
 cc: alsa-de...@alsa-project.org
 Signed-off-by: Tony Lindgren t...@atomide.com
 ---
  sound/soc/omap/mcbsp.c  |4 +---
  sound/soc/omap/mcbsp.h  |6 ++
  sound/soc/omap/omap-mcbsp.c |5 ++---
  3 files changed, 9 insertions(+), 6 deletions(-)
 
Acked-by: Jarkko Nikula jarkko.nik...@bitmer.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] ARM: OMAP: Trivial driver changes to remove include plat/cpu.h

2012-10-09 Thread Jarkko Nikula
On Mon, 08 Oct 2012 10:35:57 -0700
Tony Lindgren t...@atomide.com wrote:

 - omap-dma.c and omap-pcm.c can test the arch locally as
   omap1 and omap2 cannot be compiled together because of
   conflicting compiler flags
...
  sound/soc/omap/omap-pcm.c |9 +++--

Build tested above for omap1 and omap2+.

Acked-by: Jarkko Nikula jarkko.nik...@bitmer.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH_v2] watchdog: Convert twl4030_wdt to watchdog core

2012-09-27 Thread Jarkko Nikula

Hi

On 09/11/2012 09:01 AM, Jarkko Nikula wrote:

Convert the twl4030_wdt watchdog driver to watchdog core.

While at there use devm_kzalloc and set the default timeout in order to be
able test this driver with a simple shell script.

Signed-off-by: Jarkko Nikulajarkko.nik...@jollamobile.com
Tested-by: Aaro Koskinenaaro.koski...@iki.fi
---
v2:
- select WATCHDOG_CORE in Kconfig was accidentally put to to OMAP_WATCHDOG
   instead of TWL4030_WATCHDOG. Thanks to Aaro Koskinenaaro.koski...@iki.fi
   for noticing.
- Added Aaro's Tested-by
---
  drivers/watchdog/Kconfig   |1 +
  drivers/watchdog/twl4030_wdt.c |  183 
  2 files changed, 35 insertions(+), 149 deletions(-)


Gentle ping if this got lost and if I need to repost, fix, etc.

--
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] arm: omap: sram: skip the first 16K on OMAP3 HS

2012-09-26 Thread Jarkko Nikula
Hi Aaro

On Thu, 30 Aug 2012 13:40:30 -0700
Tony Lindgren t...@atomide.com wrote:

 * Shilimkar, Santosh santosh.shilim...@ti.com [120829 08:30]:
  On Wed, Aug 29, 2012 at 8:24 AM, Aaro Koskinen aaro.koski...@iki.fi wrote:
   In some OMAP3 HS devices (at least Nokia N9 and N950), the public SRAM
   seems to conflict with secure portition of SRAM. When booting the 3.6-rc3
   kernel (and also earlier) on these devices, the kernel gets tainted with
   tons of the following warnings:
  
   [6.894348] In-band Error seen by MPU  at address 0
   [...]
   [6.894378] WARNING: at arch/arm/mach-omap2/omap_l3_smx.c:162
  
   Fix this by skipping the first 16K of the public SRAM. (Note that the
   mapping could not be changed, as it resulted in secure monitor call
   failure in save_secure_sram().)
  
   This will leave 12K SRAM available that should be still sufficient. The
   patch has been boot tested with vanilla 3.6-rc3 on N900, N950 and N9.
  
   Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
   ---
arch/arm/plat-omap/sram.c |9 ++---
1 files changed, 6 insertions(+), 3 deletions(-)
  
  Looks good.
  
  Acked-by: Santosh Shilimkar santosh.shilim...@ti.com
 
 Thanks applying both into fixes. Aaro, note that now that we're merging
 patches via the arm soc tree, let's use ARM: OMAP:  for the subject so
 I don't need to fix it up ;)
 
This issue appears to be in 3.5 too (I didn't check others). Should you commit 
id of this patch and affected kernel versions to stable?

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Revert spi: omap2-mcspi: convert to module_platform_driver

2012-09-21 Thread Jarkko Nikula
On Fri, 3 Aug 2012 12:45:53 +0300
Aaro Koskinen aaro.koski...@iki.fi wrote:

 So an altenative hack to fix this is to modify the board file
 (board-rx51-peripherals.c):
 
/* list all spi devices here */
enum {
   RX51_SPI_WL1251,
   -   RX51_SPI_MIPID, /* LCD panel */
   RX51_SPI_TSC2005,   /* Touch Controller */
   +   RX51_SPI_MIPID, /* LCD panel */
};
 
 I guess the proper fix would be to modify SPI core so that it first does
 spi_setup for all the children/chip selects, before calling any of the
 probe functions of SPI devices? (Initializing the controller driver at
 subsys_initcall is one way to accomplish this.)
 
As the N900 framebuffer still appears to be broken would it make sense to queue 
above change as a workaround for 3.5 and 3.6?

Aaro: For above change you could add my 'Tested-by: Jarkko Nikula 
jarkko.nik...@bitmer.com'

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH_v2] watchdog: Convert twl4030_wdt to watchdog core

2012-09-11 Thread Jarkko Nikula
Convert the twl4030_wdt watchdog driver to watchdog core.

While at there use devm_kzalloc and set the default timeout in order to be
able test this driver with a simple shell script.

Signed-off-by: Jarkko Nikula jarkko.nik...@jollamobile.com
Tested-by: Aaro Koskinen aaro.koski...@iki.fi
---
v2:
- select WATCHDOG_CORE in Kconfig was accidentally put to to OMAP_WATCHDOG
  instead of TWL4030_WATCHDOG. Thanks to Aaro Koskinen aaro.koski...@iki.fi
  for noticing.
- Added Aaro's Tested-by
---
 drivers/watchdog/Kconfig   |1 +
 drivers/watchdog/twl4030_wdt.c |  183 
 2 files changed, 35 insertions(+), 149 deletions(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 53d7571..89a4140 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -300,6 +300,7 @@ config COH901327_WATCHDOG
 config TWL4030_WATCHDOG
tristate TWL4030 Watchdog
depends on TWL4030_CORE
+   select WATCHDOG_CORE
help
  Support for TI TWL4030 watchdog.  Say 'Y' here to enable the
  watchdog timer support for TWL4030 chips.
diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c
index 249f113..71c283a 100644
--- a/drivers/watchdog/twl4030_wdt.c
+++ b/drivers/watchdog/twl4030_wdt.c
@@ -22,26 +22,12 @@
 #include linux/types.h
 #include linux/slab.h
 #include linux/kernel.h
-#include linux/fs.h
 #include linux/watchdog.h
 #include linux/platform_device.h
-#include linux/miscdevice.h
-#include linux/uaccess.h
 #include linux/i2c/twl.h
 
 #define TWL4030_WATCHDOG_CFG_REG_OFFS  0x3
 
-#define TWL4030_WDT_STATE_OPEN 0x1
-#define TWL4030_WDT_STATE_ACTIVE   0x8
-
-static struct platform_device *twl4030_wdt_dev;
-
-struct twl4030_wdt {
-   struct miscdevice   miscdev;
-   int timer_margin;
-   unsigned long   state;
-};
-
 static bool nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, bool, 0);
 MODULE_PARM_DESC(nowayout, Watchdog cannot be stopped once started 
@@ -53,171 +39,71 @@ static int twl4030_wdt_write(unsigned char val)
TWL4030_WATCHDOG_CFG_REG_OFFS);
 }
 
-static int twl4030_wdt_enable(struct twl4030_wdt *wdt)
+static int twl4030_wdt_start(struct watchdog_device *wdt)
 {
-   return twl4030_wdt_write(wdt-timer_margin + 1);
+   return twl4030_wdt_write(wdt-timeout + 1);
 }
 
-static int twl4030_wdt_disable(struct twl4030_wdt *wdt)
+static int twl4030_wdt_stop(struct watchdog_device *wdt)
 {
return twl4030_wdt_write(0);
 }
 
-static int twl4030_wdt_set_timeout(struct twl4030_wdt *wdt, int timeout)
-{
-   if (timeout  0 || timeout  30) {
-   dev_warn(wdt-miscdev.parent,
-   Timeout can only be in the range [0-30] seconds);
-   return -EINVAL;
-   }
-   wdt-timer_margin = timeout;
-   return twl4030_wdt_enable(wdt);
-}
-
-static ssize_t twl4030_wdt_write_fop(struct file *file,
-   const char __user *data, size_t len, loff_t *ppos)
+static int twl4030_wdt_set_timeout(struct watchdog_device *wdt,
+  unsigned int timeout)
 {
-   struct twl4030_wdt *wdt = file-private_data;
-
-   if (len)
-   twl4030_wdt_enable(wdt);
-
-   return len;
-}
-
-static long twl4030_wdt_ioctl(struct file *file,
-   unsigned int cmd, unsigned long arg)
-{
-   void __user *argp = (void __user *)arg;
-   int __user *p = argp;
-   int new_margin;
-   struct twl4030_wdt *wdt = file-private_data;
-
-   static const struct watchdog_info twl4030_wd_ident = {
-   .identity = TWL4030 Watchdog,
-   .options = WDIOF_SETTIMEOUT,
-   .firmware_version = 0,
-   };
-
-   switch (cmd) {
-   case WDIOC_GETSUPPORT:
-   return copy_to_user(argp, twl4030_wd_ident,
-   sizeof(twl4030_wd_ident)) ? -EFAULT : 0;
-
-   case WDIOC_GETSTATUS:
-   case WDIOC_GETBOOTSTATUS:
-   return put_user(0, p);
-
-   case WDIOC_KEEPALIVE:
-   twl4030_wdt_enable(wdt);
-   break;
-
-   case WDIOC_SETTIMEOUT:
-   if (get_user(new_margin, p))
-   return -EFAULT;
-   if (twl4030_wdt_set_timeout(wdt, new_margin))
-   return -EINVAL;
-   return put_user(wdt-timer_margin, p);
-
-   case WDIOC_GETTIMEOUT:
-   return put_user(wdt-timer_margin, p);
-
-   default:
-   return -ENOTTY;
-   }
-
+   wdt-timeout = timeout;
return 0;
 }
 
-static int twl4030_wdt_open(struct inode *inode, struct file *file)
-{
-   struct twl4030_wdt *wdt = platform_get_drvdata(twl4030_wdt_dev);
-
-   /* /dev/watchdog can only be opened once */
-   if (test_and_set_bit(0, wdt-state))
-   return -EBUSY;
-
-   wdt-state |= TWL4030_WDT_STATE_ACTIVE

Re: [PATCH v2] watchdog: omap_wdt: convert to new watchdog core

2012-09-10 Thread Jarkko Nikula
On Sat,  8 Sep 2012 21:04:01 +0300
Aaro Koskinen aaro.koski...@iki.fi wrote:

 Convert omap_wdt to new watchdog core. On OMAP boards, there are usually
 multiple watchdogs. Since the new watchdog core supports multiple
 watchdogs, all watchdog drivers used on OMAP should be converted.
 
 The legacy watchdog device node is still created, so this should not
 break existing users.
 
 Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
 ---
 
 v2: Fix a bug in the first version of the patch: __omap_wdt_disable()
 in probe was mistakenly moved outside PM runtime calls. This caused a
 crash as device was probably accessed with some clocks off. Thanks to
 Jarkko Nikula jarkko.nik...@bitmer.com for reporting this.
 
  drivers/watchdog/Kconfig|1 +
  drivers/watchdog/omap_wdt.c |  266 
 ++-
  2 files changed, 114 insertions(+), 153 deletions(-)
 
Tested-by: Jarkko Nikula jarkko.nik...@jollamobile.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] watchdog: Convert twl4030_wdt to watchdog core

2012-09-10 Thread Jarkko Nikula
Convert the twl4030_wdt watchdog driver to watchdog core.

While at there use devm_kzalloc and set the default timeout in order to be
able test this driver with a simple shell script.

Signed-off-by: Jarkko Nikula jarkko.nik...@jollamobile.com
---
 drivers/watchdog/Kconfig   |1 +
 drivers/watchdog/twl4030_wdt.c |  183 
 2 files changed, 35 insertions(+), 149 deletions(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 53d7571..21f6205 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -232,6 +232,7 @@ config EP93XX_WATCHDOG
 config OMAP_WATCHDOG
tristate OMAP Watchdog
depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS
+   select WATCHDOG_CORE
help
  Support for TI OMAP1610/OMAP1710/OMAP2420/OMAP3430/OMAP4430 watchdog. 
 Say 'Y'
  here to enable the OMAP1610/OMAP1710/OMAP2420/OMAP3430/OMAP4430 
watchdog timer.
diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c
index 249f113..71c283a 100644
--- a/drivers/watchdog/twl4030_wdt.c
+++ b/drivers/watchdog/twl4030_wdt.c
@@ -22,26 +22,12 @@
 #include linux/types.h
 #include linux/slab.h
 #include linux/kernel.h
-#include linux/fs.h
 #include linux/watchdog.h
 #include linux/platform_device.h
-#include linux/miscdevice.h
-#include linux/uaccess.h
 #include linux/i2c/twl.h
 
 #define TWL4030_WATCHDOG_CFG_REG_OFFS  0x3
 
-#define TWL4030_WDT_STATE_OPEN 0x1
-#define TWL4030_WDT_STATE_ACTIVE   0x8
-
-static struct platform_device *twl4030_wdt_dev;
-
-struct twl4030_wdt {
-   struct miscdevice   miscdev;
-   int timer_margin;
-   unsigned long   state;
-};
-
 static bool nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, bool, 0);
 MODULE_PARM_DESC(nowayout, Watchdog cannot be stopped once started 
@@ -53,171 +39,71 @@ static int twl4030_wdt_write(unsigned char val)
TWL4030_WATCHDOG_CFG_REG_OFFS);
 }
 
-static int twl4030_wdt_enable(struct twl4030_wdt *wdt)
+static int twl4030_wdt_start(struct watchdog_device *wdt)
 {
-   return twl4030_wdt_write(wdt-timer_margin + 1);
+   return twl4030_wdt_write(wdt-timeout + 1);
 }
 
-static int twl4030_wdt_disable(struct twl4030_wdt *wdt)
+static int twl4030_wdt_stop(struct watchdog_device *wdt)
 {
return twl4030_wdt_write(0);
 }
 
-static int twl4030_wdt_set_timeout(struct twl4030_wdt *wdt, int timeout)
-{
-   if (timeout  0 || timeout  30) {
-   dev_warn(wdt-miscdev.parent,
-   Timeout can only be in the range [0-30] seconds);
-   return -EINVAL;
-   }
-   wdt-timer_margin = timeout;
-   return twl4030_wdt_enable(wdt);
-}
-
-static ssize_t twl4030_wdt_write_fop(struct file *file,
-   const char __user *data, size_t len, loff_t *ppos)
+static int twl4030_wdt_set_timeout(struct watchdog_device *wdt,
+  unsigned int timeout)
 {
-   struct twl4030_wdt *wdt = file-private_data;
-
-   if (len)
-   twl4030_wdt_enable(wdt);
-
-   return len;
-}
-
-static long twl4030_wdt_ioctl(struct file *file,
-   unsigned int cmd, unsigned long arg)
-{
-   void __user *argp = (void __user *)arg;
-   int __user *p = argp;
-   int new_margin;
-   struct twl4030_wdt *wdt = file-private_data;
-
-   static const struct watchdog_info twl4030_wd_ident = {
-   .identity = TWL4030 Watchdog,
-   .options = WDIOF_SETTIMEOUT,
-   .firmware_version = 0,
-   };
-
-   switch (cmd) {
-   case WDIOC_GETSUPPORT:
-   return copy_to_user(argp, twl4030_wd_ident,
-   sizeof(twl4030_wd_ident)) ? -EFAULT : 0;
-
-   case WDIOC_GETSTATUS:
-   case WDIOC_GETBOOTSTATUS:
-   return put_user(0, p);
-
-   case WDIOC_KEEPALIVE:
-   twl4030_wdt_enable(wdt);
-   break;
-
-   case WDIOC_SETTIMEOUT:
-   if (get_user(new_margin, p))
-   return -EFAULT;
-   if (twl4030_wdt_set_timeout(wdt, new_margin))
-   return -EINVAL;
-   return put_user(wdt-timer_margin, p);
-
-   case WDIOC_GETTIMEOUT:
-   return put_user(wdt-timer_margin, p);
-
-   default:
-   return -ENOTTY;
-   }
-
+   wdt-timeout = timeout;
return 0;
 }
 
-static int twl4030_wdt_open(struct inode *inode, struct file *file)
-{
-   struct twl4030_wdt *wdt = platform_get_drvdata(twl4030_wdt_dev);
-
-   /* /dev/watchdog can only be opened once */
-   if (test_and_set_bit(0, wdt-state))
-   return -EBUSY;
-
-   wdt-state |= TWL4030_WDT_STATE_ACTIVE;
-   file-private_data = (void *) wdt;
-
-   twl4030_wdt_enable(wdt);
-   return nonseekable_open(inode, file);
-}
-
-static int twl4030_wdt_release(struct inode *inode

Re: [PATCH] watchdog: Convert twl4030_wdt to watchdog core

2012-09-10 Thread Jarkko Nikula

Thanks Aaro!

On 09/11/2012 12:59 AM, Aaro Koskinen wrote:

On Mon, Sep 10, 2012 at 06:44:46PM +0300, Jarkko Nikula wrote:

Convert the twl4030_wdt watchdog driver to watchdog core.

While at there use devm_kzalloc and set the default timeout in order to be
able test this driver with a simple shell script.

Signed-off-by: Jarkko Nikulajarkko.nik...@jollamobile.com
---
  drivers/watchdog/Kconfig   |1 +
  drivers/watchdog/twl4030_wdt.c |  183 
  2 files changed, 35 insertions(+), 149 deletions(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 53d7571..21f6205 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -232,6 +232,7 @@ config EP93XX_WATCHDOG
  config OMAP_WATCHDOG
tristate OMAP Watchdog
depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS
+   select WATCHDOG_CORE

This should be under TWL4030_WATCHDOG.
Grr.. leftover from testing your patch and accidentally dropping my 
change :-)


I'll fix this, add your Tested-by and repost.

--
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] watchdog: omap_wdt: convert to new watchdog core

2012-09-07 Thread Jarkko Nikula
Hi

On Tue, Sep 04, 2012 at 05:41:24PM +0300, Aaro Koskinen wrote:
 Convert omap_wdt to new watchdog core. On OMAP boards, there are usually
 multiple watchdogs. Since the new watchdog core supports multiple
 watchdogs, all watchdog drivers used on OMAP should be converted.
 
 The legacy watchdog device node is still created, so this should not
 break existing users.
 
 Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
 ---
  drivers/watchdog/Kconfig|1 +
  drivers/watchdog/omap_wdt.c |  268 
 ++-
  2 files changed, 115 insertions(+), 154 deletions(-)
 
Am I missing some extra patch but this causes a crash on top of v3.6-rc4
commit eeea3ac?

Crash happens in omap_wdt.c:99 on Nokia N9.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] watchdog: omap_wdt: convert to new watchdog core

2012-09-07 Thread Jarkko Nikula
On Fri, Sep 07, 2012 at 06:51:43PM +0300, Aaro Koskinen wrote:
 
 Thanks for the report! I'll look into this and test with other
 Nokia boards. I tested the patch only with N800 and v3.6-rc4
 (4cbe5a555fa58a79b6ecbb6c531b8bab0650778d) and did not see any issues
 with normal use cases (boot, watchdog open, feeding, watchdog close).

I forgot to test on another hw but will try to do in coming days. Anyway I'm
happy to test your patch again if you spot something so you could cc also me
for retesting.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] omap-mcbsp: properly check for availablity of mcbsp mux settings

2012-08-20 Thread Jarkko Nikula
Hi

On 08/19/2012 10:14 PM, Andreas Kemnade wrote:
 The code did return -EINVAl when the mux_signal function pointer is available.
 If not, the corresponding function (the NULL pointer) is called.
 This patch inverts that logic.
 
 Signed-off-by: Andreas Kemnade andr...@kemnade.info
 ---
Thanks for the patch. Fortunately Peter has already the same fix d0db84e
(ASoC: omap-mcbsp: Fix 6pin mux configuration) for it in:

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

I expect fix to hit 3.6-rc and 3.4-3.5 stable soon.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/9] sound/soc/omap/am3517evm.c: fix error return code

2012-08-20 Thread Jarkko Nikula
On 08/19/2012 10:03 AM, Julia Lawall wrote:
 From: Julia Lawall julia.law...@lip6.fr
 
 It was forgotten to initialize ret to the result of calling
 snd_soc_dai_set_sysclk, unlike at the other calls in the same function.
 
 A simplified version of the semantic match that finds this problem is as
 follows: (http://coccinelle.lip6.fr/)
 
 // smpl
 (
 if@p1 (\(ret  0\|ret != 0\))
  { ... return ret; }
 |
 ret@p1 = 0
 )
 ... when != ret = e1
 when != ret
 *if(...)
 {
   ... when != ret = e2
   when forall
  return ret;
 }
 
 // /smpl
 
 Signed-off-by: Julia Lawall julia.law...@lip6.fr
 
 ---
  sound/soc/omap/am3517evm.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/sound/soc/omap/am3517evm.c b/sound/soc/omap/am3517evm.c
 index 009533a..df65f98 100644
 --- a/sound/soc/omap/am3517evm.c
 +++ b/sound/soc/omap/am3517evm.c
 @@ -59,7 +59,7 @@ static int am3517evm_hw_params(struct snd_pcm_substream 
 *substream,
   return ret;
   }
  
 - snd_soc_dai_set_sysclk(cpu_dai, OMAP_MCBSP_FSR_SRC_FSX, 0,
 + ret = snd_soc_dai_set_sysclk(cpu_dai, OMAP_MCBSP_FSR_SRC_FSX, 0,
   SND_SOC_CLOCK_IN);
   if (ret  0) {
   printk(KERN_ERR can't set CPU system clock 
 OMAP_MCBSP_FSR_SRC_FSX\n);
 

Acked-by: Jarkko Nikula jarkko.nik...@bitmer.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 2/9] ARM: OMAP: mcbsp: Enable FIFO use for OMAP2430

2012-08-17 Thread Jarkko Nikula
On 08/17/2012 04:07 PM, Tony Lindgren wrote:
 * Peter Ujfalusi peter.ujfal...@ti.com [120816 06:41]:
 On OMAP2430 all McBSP ports have 128 word long buffer, enable the use of
 the FIFO for the audio stack.
 Is this the case also for 2420? I thought some only had a FIFO at
 one port?
 
IRCC (I don't have specs), nope. Only 2430 (as noted by Peter) and
onwards have FIFO.

But that's true that FIFO sizes differ between the ports. E.g. only
ports 2 and 3 have 1024+128 deep FIFOs in OMAP3.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [alsa-devel] [PATCH 08/11] ARM: OMAP3: Remove callback for McBSP sidetone ICLK workaround

2012-08-10 Thread Jarkko Nikula
Hi Peter

On 08/08/2012 05:00 PM, Peter Ujfalusi wrote:
 Are you sure it works without any changes to sidetone audio quality or
 current consumption? What I remember idlemode was broken at least on
 3430 and caused bad sidetone audio if autoidle was set and a little bit
 higher current consumption (something like 2-3 mA higher where reference
 consumption was around 10 mA) when McBSP was set to no-idle.
 
 Yes, the idelmode settings are still broken in the sidetone block. However we
 are toggling the SIDLEMODE of the corresponding McBSP instance where the ST
 block is attached.
 This should have the same effect as doing the same down in PRCM level since
 the McBSP SIDLEMODE does work correctly preventing ICLK to be gated when it is
 set to no-idle.
 
 Unfortunately I can not get my BeagleBoard to start gating iclk even if I
 remove the ICLK gating prevention (on top of 3.6-rc1). So I can not really say
 for 100% this is equivalent to the the PRCM level workaround.
 However I have also spend long time hacking around in McBSP, and I know that
 the SIDLEMODE in McBSP is working correctly.
 Do you know how can I get OMAP3 to start gating the clocks (to idle)?
 
I got some odd current consumption results from Beagle to really compare
different kernel versions but I was able get sensible results from N900.

I tested your set on top of 196973c of sound.git.

First consumption when using threshold based transfer has remained the
same between 2.6.38-3.6.0-rc1 (wau!). Active sidetone under arecord -f
dat /dev/null |aplay -f dat /dev/zero test increases consumption from
plain playback about 17 mA in 3.4 and 3.6.0-rc1.

With your set applied consumption increases 28 mA when the sidetone is
active (i.e. +11 mA higher than on top of 196973c). Plain threshold
based playback remains still the same.

 I'm doing the same test on BeagleBoard, but this thing does not want to hit
 retention despite all the effort :(
 
Could it be display subsystem which keeps it active? At least on N900 I
need to get DSS drivers activated in order to be able to blank the
display after bootloader and thus be able to reach the retention idle.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/11] ARM/ASoC: OMAP McBSP device tree support

2012-08-10 Thread Jarkko Nikula
On 08/08/2012 02:21 PM, Mark Brown wrote:
 On Wed, Aug 08, 2012 at 12:11:30PM +0300, Peter Ujfalusi wrote:
 
 The series changes McBSP related files mostly. It would be great if the whole
 series could go via audio tree (if the patches are OK and it is fine by 
 Tony).
 
 I'm OK with all the patches, if Tony's happy with me applying them then
 I'll put them in a separate branch so they can easily be merged into the
 OMAP trees (or similarly if it's applied in an OMAP tree having a branch
 I can merge if needed would be good).

I suppose we could apply 1/11, 3-6/11 and 9-10 right away (2/11 perhaps
should go near 11/11?) and apply 7-8/11 (sidetone patches that increase
consumption) later?

My ack to patches 1, 3-6 and 9-10:

Acked-by: Jarkko Nikula jarkko.nik...@bitmer.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 08/11] ARM: OMAP3: Remove callback for McBSP sidetone ICLK workaround

2012-08-08 Thread Jarkko Nikula
On 08/08/2012 12:11 PM, Peter Ujfalusi wrote:
 We can achieve the same result with SIDLEMODE field within McBSP SYSCONFIG
 register.
 The ASoC driver has been modified to use this method and we can now remove
 the workaround using the control module register.
 
Are you sure it works without any changes to sidetone audio quality or
current consumption? What I remember idlemode was broken at least on
3430 and caused bad sidetone audio if autoidle was set and a little bit
higher current consumption (something like 2-3 mA higher where reference
consumption was around 10 mA) when McBSP was set to no-idle.

Here's the old thread:

http://www.mail-archive.com/linux-omap@vger.kernel.org/msg52024.html

I think I tested all of this by using arecord /dev/null | aplay
/dev/zero with threshold based DMA transfers with all bells and whistles
set for dynamic retention idle in order to hear only McBSP sidetone
while measuring current consumption.

But I guess 2-3 mA higher consumption is ok if it simplifies SW a lot
and base consumption is anyway much higher than 10 mA when sidetone is
in real use (my test above was artificial where actual use is under a
phone call with heavy consumption from cellular modem etc).

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Please help! AM35xx mm/slab.c BUG

2012-06-06 Thread Jarkko Nikula
my 2 cents.

On 06/06/2012 11:41 AM, Tony Lindgren wrote:
 * CF Adad cfa...@rocketmail.com [120606 00:55]:

 Do you folks know of a good reference for properly calculating these GPMC 
 settings?
 
 In theory you just need to know the timings of connected components,
 then check which ones depend on cycles and which ones depend on time.
 
I afraid paper-and-pencil gpmc exercise is often required but after that
it is more easy to see from charts if e.g. original settings were not
optimal or too near to edge. Helps to understand and point possible
problems on oscilloscope measurements too.

 Also take into account latencies added by level shifters if you have those.
 Paul Walmsley noticed a few years ago that those affected the smsc911x
 timings if not accounted for.
 
I've noticed the same. Even one-directional level shifters easily add a
few ns and double amount in read operation since then there are two
level shifters in a path: one in clk/cs/oe/etc cpu-to-chip signal and
one on chip-to-cpu side.

Pay also attention if there are extra latencies in chip. Chip memory
reads/writes may be slower than chip register access (probably similar
than smsc fifo issue what Tony mentioned earlier in this thread).

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] omap: dma: Clear status registers on enable/disable irq.

2012-06-01 Thread Jarkko Nikula
On 05/16/2012 12:35 AM, Oleg Matcovschi wrote:
 Use omap_disable_channel_irq() function instead of directly accessing CICR.
 The omap_disable_chanel_irq() function clears pending interrupts
 and disables interrupt on channel.
 Functions omap2_enable_irq_lch()/omap2_disable_irq_lch() clear interrupt
 status register.
 
 
 Signed-off-by: Oleg Matcovschi oleg.matcovs...@ti.com
 ---
 v1 initial revision
 v2 Review by Tony Lindgren
 ---
  arch/arm/plat-omap/dma.c |   59 +
  1 files changed, 28 insertions(+), 31 deletions(-)
 
Tested on BeagleBoard by using mmc and audio

Tested-by: Jarkko Nikula jarkko.nik...@bitmer.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Compile err when enable CONFIG_SND_OMAP_SOC_OMAP_HDMI

2012-05-31 Thread Jarkko Nikula
On 05/31/2012 09:31 AM, Tomi Valkeinen wrote:
 It's true that there's a commit range where the asoc stuff doesn't
 compile, and I agree that it's not good. But you need to explicitly
 enable the HDMI ASOC support to get the error.
 
You can still hit the build breakage by randconfig or if it's enabled by
default in the future and you start bisecting with that config old kernel.

 It's quite boring to try to bisect over multiple kernel versions and
 where most of the time goes solving random unrelated build breakages.
 
 How to get arm/arm/, omapdss, omapdrm and asoc driver changes in at the
 same time? All go through various different trees and maintainers. I
 haven't found a solution for this. If you have good ideas, please share
 =).
 
One simple - wait for next merge window. It's not that long. Only ~3
months and meanwhile one could keep boss/customer/wife/whatever
satisfied by carrying patches in own tree :-)

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Compile err when enable CONFIG_SND_OMAP_SOC_OMAP_HDMI

2012-05-31 Thread Jarkko Nikula
On 05/31/2012 10:00 AM, Tomi Valkeinen wrote:
 One simple - wait for next merge window. It's not that long. Only ~3
 months and meanwhile one could keep boss/customer/wife/whatever
 satisfied by carrying patches in own tree :-)
 
 Well... I'm not sure how serious you are here =).
 
Quite serious :-)

 In some cases that's doable, and we've done it, for example omapdrm had
 some things delayed until next merge window, so it's definitely an option.
 
 But it's quite easy to get some build dependencies between pull
 requests, so we'd be delaying features all the time. And sometimes even
 cross dependencies. In the worst case it could end up with delaying some
 features for a year to get all single pieces in bit by bit.
 
Something what is usually done is to get ack from maintainers and let
code to be merged via another tree. Needs careful planning though in
order to avoid preventing e.g. API changes in one subsystem.

 Something I think we could try to do is create some kinds of temporary
 dummy functions or such which allow the compilation, but of course makes
 the component not (fully) functional. The temp functions could then be
 removed in -rc2 or so, when the dependencies are all there. But doesn't
 feel like an optimal solution either...
 
Yeah, this might work too.

-- 
Jarkko

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Compile err when enable CONFIG_SND_OMAP_SOC_OMAP_HDMI

2012-05-30 Thread Jarkko Nikula
On 05/31/2012 02:35 AM, Ricardo Neri wrote:
 Build breaks because there some patches [1] that are still missing in
 Linus' tree. ASoC HDMI audio driver for OMAP[2] now uses the new DSS
 audio functionality in [1], but ASoC patches were merged first. DSS
 patches have been accepted and they are part of Tomi's pull request for
 DSS for K3.5. Hopefully this will be fixed when v3.5-rc1 is out.
 
Then there was an error already in the process if dependent sets didn't
go together via the same merge or in next merge window. Remember each
commit must compile alone.

It's quite boring to try to bisect over multiple kernel versions and
where most of the time goes solving random unrelated build breakages.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] omap: dma: Clear status registers on enable/disable irq.

2012-05-06 Thread Jarkko Nikula
On 05/04/2012 10:39 PM, Janusz Krzysztofik wrote:
 This seems like a nice fix to me. As it affects all omaps, I'd like to
 see some tested-by from Janusz/Jarkko/Peter. Can you guys give it a 
 try
 with some audio tests?
 
 OK, I can do, but perhaps not before next Saturday, when I'm back home, 
 able to actually listen to the audio, not only watch the IRQ counters 
 rising up ;-).
 
Ok from omap3

Tested-by: Jarkko Nikula jarkko.nik...@bitmer.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] ASoC: omap-pcm: Free dma buffers in case of error.

2012-04-25 Thread Jarkko Nikula
On 04/25/2012 05:02 AM, Oleg Matcovschi wrote:
 Change-Id: I4ba9de0de4681332539246ccc5e11a7a8fb32e79
 Signed-off-by: Oleg Matcovschi oleg.matcovs...@ti.com
 ---
 v1:
  initial revision
 v2:
  resending patch including maintainers
 
  sound/soc/omap/omap-pcm.c |4 
  1 files changed, 4 insertions(+), 0 deletions(-)
 
Acked-by: Jarkko Nikula jarkko.nik...@bitmer.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] omap1: mux: add missing include

2012-04-02 Thread Jarkko Nikula
On 04/01/2012 06:30 PM, Aaro Koskinen wrote:
 Fix the following build breakage in v3.4-rc1:
 
 arch/arm/mach-omap1/mux.c:89:1: error: 'FUNC_MUX_CTRL_9' undeclared here (not 
 in a function)
 arch/arm/mach-omap1/mux.c:89:1: error: 'PULL_DWN_CTRL_2' undeclared here (not 
 in a function)
 arch/arm/mach-omap1/mux.c:93:1: error: 'FUNC_MUX_CTRL_C' undeclared here (not 
 in a function)
 
 etc.
 
 Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
 ---
  arch/arm/mach-omap1/mux.c |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
 
(happens with omap1_defconfig if CONFIG_OMAP_MUX=y)

Acked-by: Jarkko Nikula jarkko.nik...@bitmer.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/5] ARM: OMAP2+: clean up some cppcheck warnings

2012-03-13 Thread Jarkko Nikula
On 03/13/2012 12:43 AM, Paul Walmsley wrote:
 Resolve some warnings identified by cppcheck in arch/arm/mach-omap2:
...
 [arch/arm/mach-omap2/mcbsp.c:133]: (warning) scanf without field width 
 limits can crash with huge input data
...
 diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
 index fb4bcf8..efe59c7 100644

 --- a/arch/arm/mach-omap2/mcbsp.c
 +++ b/arch/arm/mach-omap2/mcbsp.c
 @@ -130,7 +130,7 @@ static int omap_init_mcbsp(struct omap_hwmod *oh, void 
 *unused)
   struct omap_mcbsp_platform_data *pdata = NULL;
   struct platform_device *pdev;
  
 - sscanf(oh-name, mcbsp%d, id);
 + sscanf(oh-name, mcbsp%1d, id);
  
Correct if I'm wrong but is this a false alarm? Can %d scan more than
sizeof(int)?

Anyway this shouldn't be fatal issue since name comes from kernel
omap_hwmod data, i.e. only developer can hit it.

Peter: worth to check and possible add this Paul's fix to your mcbsp
change set.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/3] ARM/ASoC: OMAP McBSP: Move remainig defines from arch to ASoC header

2012-03-08 Thread Jarkko Nikula
On 03/08/2012 11:29 AM, Peter Ujfalusi wrote:
 Hi Jarkko,
 
 On 03/08/2012 11:22 AM, Peter Ujfalusi wrote:
 Clock signal muxing, and functional clock related defines are only needed
 in ASoC drivers.

 Signed-off-by: Peter Ujfalusi peter.ujfal...@ti.com
 Acked-by: Jarkko Nikula jarkko.nik...@bitmer.com
 
 I have added your ack to this patch by accident when I updated the
 series. Sorry about that.
 Please confirm if you are OK with this change.
 
Go ahead :-)

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 00/10] OMAP/ASoC: Move and merge McBSP driver under ASoC

2012-02-28 Thread Jarkko Nikula
On 02/28/2012 09:40 AM, Peter Ujfalusi wrote:
 Hello,
 
 Changes since v1 (RFC series):
 - removed pm_runtime_get/put_sync calls since core takes care of this.
   Fixes the initial issue with OMAP3 Pandora setup reported by Grazvydas 
 Ignotas
 - Dropped my version of snd_soc_add_dai_controls from the series since Liam
   implementation adds the same functionality.
 - Added Tested-by tags from Janusz (OMAP1), and Grazvydas (OMAP3 pandora)
 - Added Ack from Tony for the arch/arm/ patches
 - I have not added Ack from Mark, and Jarkko although they said it looks OK, 
 but
   not given explicit ack for the series.
 
I'm sending a minor comment to 1/10 but here's ack to whole series

Acked-by: Jarkko Nikula jarkko.nik...@bitmer.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/10] ARM: OMAP: mcbsp: Convert core driver to proper platform driver

2012-02-28 Thread Jarkko Nikula
On 02/28/2012 09:40 AM, Peter Ujfalusi wrote:
 --- a/arch/arm/plat-omap/mcbsp.c
 +++ b/arch/arm/plat-omap/mcbsp.c
 @@ -1354,8 +1354,9 @@ static struct platform_driver omap_mcbsp_driver = {
   },
  };
  
 -int __init omap_mcbsp_init(void)
 -{
 - /* Register the McBSP driver */
 - return platform_driver_register(omap_mcbsp_driver);
 -}
 +module_platform_driver(omap_mcbsp_driver);
 +
 +MODULE_AUTHOR(Samuel Ortiz samuel.or...@nokia.com);

Minor, you shouldn't add expired email address here. No need to resend
though since this gets removed in 4/10.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ASoC: pandora: switch clock back to internal on stop

2012-02-21 Thread Jarkko Nikula
On 02/20/2012 11:52 AM, Peter Ujfalusi wrote:
 I have patch on top of the mcbsp merge series which allows users
 (developers) to switch between McBSP2 master/slave configuration on
 Beagle. It will have two PCM:
 0 is the current configuration (twl4030 master, mcbsp2 slave)
 1 is the same as with pandora (twl4030 slave, mcbsp2 master - CLKS pin
 is the source for the SRG).
 
Side note: Don't forget the FCLK as a SRG source for McBSP master case.
It's quite useful when bringing up and testing new hw.

-- 
jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 00/11]O MAP/ASoC: Move and merge McBSP driver under ASoC

2012-02-15 Thread Jarkko Nikula
On 02/15/2012 05:56 PM, Ujfalusi, Peter wrote:
 Hi,
 
 CC-ing Janusz, since he is the only one I know who have, and use OMAP1
 with audio...
 Janusz: if your time allows would you be able to test this series on
 OMAP1 (it compiles...)?
 
Yeah, it would be shame to break omap1, especially considering how much
Janusz has put his personal effort on it.

 McBSP is only used by audio, there are no known other users of the OMAP McBSP
 (well, Nokia n700 has the WLAN connected through McBSP but we do not have
 driver for that anyway).

And since the clock stop mode is not supported in newer omaps there very
unlikely won't be.

 The series was created against Takashi's topic/asoc branch. I have tested it 
 on
 Beagle xM, and compile tested it for OMAP1, OMAP2, and OMAP4 as well.

 I'm going to do more work on the cleanup, and the plan is to merge the two 
 files
 into one (mcbsp.c - omap-mcbsp.c) eventually.

 Comments, testers are welcome...

Unfortunately I won't be able to give any test this week but at quick
look the set looks good to me.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ASoC: Fix build error in sound/soc/omap/n810.c

2012-02-10 Thread Jarkko Nikula
On 02/10/2012 08:54 AM, Axel Lin wrote:
 Fix below build error which is introduced by
 commit 022658 ASoC: core: Add support for DAI and machine kcontrols.
 
   CC [M]  sound/soc/omap/n810.o
 sound/soc/omap/n810.c: In function 'n810_set_input':
 sound/soc/omap/n810.c:194: error: 'codec' undeclared (first use in this 
 function)
 sound/soc/omap/n810.c:194: error: (Each undeclared identifier is reported 
 only once
 sound/soc/omap/n810.c:194: error: for each function it appears in.)
 sound/soc/omap/n810.c:188: warning: unused variable 'card'
 make[3]: *** [sound/soc/omap/n810.o] Error 1
 make[2]: *** [sound/soc/omap] Error 2
 make[1]: *** [sound/soc] Error 2
 make: *** [sound] Error 2
 
 Signed-off-by: Axel Lin axel@gmail.com
 ---
  sound/soc/omap/n810.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 

Acked-by: Jarkko Nikula jarkko.nik...@bitmer.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: OMAP34xx

2012-02-08 Thread Jarkko Nikula
On 02/09/2012 02:47 AM, Greg KH wrote:
 Show me an OMAP user that actually runs a mainline kernel :)
 
I guess pretty much all these days? Most error reports what I recall
seeing during past 2-3 years are from mainline kernel and not that much
from linux-omap or some board support package kernel.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: ASoC related suspend problems on OMAP3

2012-02-07 Thread Jarkko Nikula
On 02/08/2012 02:34 AM, Grazvydas Ignotas wrote:
 Hi,
 
 On OMAP3 pandora, system suspend stops working properly after using
 audio at least once:
 
 (just after boot):
 # echo mem  /sys/power/state
 [   12.578186] PM: Entering mem sleep
 [   12.678802] PM: suspend of devices complete after 92.834 msecs
 [   12.688201] PM: late suspend of devices complete after 3.173 msecs
 [   17.607971] Successfully put all powerdomains to target state
 
 # aplay /dev/zero
 ^C
 # echo mem  /sys/power/state
 [  104.404663] PM: suspend of devices complete after 78.794 msecs
 [  104.413909] PM: late suspend of devices complete after 3.021 msecs
 [  106.601196] Powerdomain (per_pwrdm) didn't enter target state 1
 [  106.607421] Powerdomain (core_pwrdm) didn't enter target state 1
 [  106.613739] Could not enter target state in pm_suspend
 
 I'm seeing this on 3.2, unable to verify on current Linus HEAD as
 something else is preventing core/per low power states there.
 Any ideas what could be causing this? Perhaps some clock is left enabled?
 
If this is still working in 3.1 then one possible reason could be my
mcbsp changes between commits 40246e..7bc0c4 that went to 3.2.

Unfortunately I'm not near my OMAP3 boards in coming days so I cannot
bisect myself.

-- 
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [alsa-devel] It looks like snd-soc-rx51 only works as built-in, not as a module

2011-12-30 Thread Jarkko Nikula

On 12/30/2011 12:52 PM, Mark Brown wrote:

On Thu, Dec 29, 2011 at 10:22:31PM +, M?ns Rullg?rd wrote:

Mark Brownbroo...@opensource.wolfsonmicro.com  writes:



The reason the driver is not loaded automatically is that the OMAP
machine drivers have not been converted to platform devices.



I posted patches doing the conversion a long time ago (September?).  It
seems they got lost somewhere.


Most of them have been converted, but the rx51 wasn't.


I guess that patch has been forgotten. Måns: care to check and resend? 
It's definitely great to get OMAP ASoC machine driver autoloading working.


--
Jarkko
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


  1   2   3   4   5   6   7   >