Re: [PATCH V2 8/8] cpufreq: OMAP: donot allow to be used with device tree

2013-03-20 Thread Santosh Shilimkar
On Tuesday 19 March 2013 11:23 PM, Nishanth Menon wrote:
 We now use Soc generic cpufreq-cpu0 driver using DT entries.
 However to allow cpufreq-cpu0 and omap-cpufreq drivers to co-exist,
 we need to ensure the following using the same image:
 1. With device tree boot, we use cpufreq-cpu0
 2. With non device tree boot, we use omap-cpufreq
 
 In the case of (1), we will have cpu OPPs and regulator registered
 as part of the DT, to ensure that omap-cpufreq and cpufreq-cpu0 don't
 conflict in managing the frequency of the same cpu, we should not
 permit init to pass in omap-cpufreq.
 
 In the case of (2), we will not have the cpufreq-cpu0 device, hence
 only omap-cpufreq will be active.
 
 So, to acommodate both these usage conditions, we fail init of
 omap-cpufreq when we boot with device tree.
 
 Cc: Kevin Hilman khil...@deeprootsystems.com
 Cc: Jon Hunter jon-hun...@ti.com
 Cc: Benoît Cousson b-cous...@ti.com
 Cc: Santosh Shilimkar santosh.shilim...@ti.com
 Cc: Shawn Guo shawn@linaro.org
 Cc: Keerthy j-keer...@ti.com
 Cc: linux-omap@vger.kernel.org
 Cc: devicetree-disc...@lists.ozlabs.org
 Cc: linux-arm-ker...@lists.infradead.org
 Cc: cpuf...@vger.kernel.org
 Cc: linux...@vger.kernel.org
 
 Signed-off-by: Nishanth Menon n...@ti.com
 ---
I haven't followed all the DT binding for opp discussion but
this patch is inline to keep non-DT cpufreq working till we
move to DT only build.
So FWIW,
Acked-by: Santosh Shilimkar santosh.shilim...@ti.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 2/2] ARM: OMAP2+: Remove dmm device creation

2013-03-20 Thread Archit Taneja

On Wednesday 20 March 2013 11:26 AM, Santosh Shilimkar wrote:

On Wednesday 20 March 2013 10:13 AM, Andy Gross wrote:

Remove DMM device creation via the hwmod entry.  The DMM device will
now be enumerated as part of the device tree information for the
processor.

Signed-off-by: Andy Gross andy.gr...@ti.com
---

OMAP4 is still not made DT only so I suggest you to hold on for this patch
till that happens.


Wouldn't we need to at least prevent building the platform device using 
omap_device_build() when we are using DT?


Archit



Regards,
Santosh
--
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




--
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


[LAKML][Users getting knocked of from list]

2013-03-20 Thread Santosh Shilimkar
Russell,

In last couple of months, I have observed that users are getting knocked off
from LAKML often. I myself faced it 2 times so far and I heard similar complaint
at least from 5 more folks.

Is there a change in settings or something new which started triggering this ?

Regards,
Santosh

--
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: OMAP2+: Remove dmm device creation

2013-03-20 Thread Santosh Shilimkar
On Wednesday 20 March 2013 11:46 AM, Archit Taneja wrote:
 On Wednesday 20 March 2013 11:26 AM, Santosh Shilimkar wrote:
 On Wednesday 20 March 2013 10:13 AM, Andy Gross wrote:
 Remove DMM device creation via the hwmod entry.  The DMM device will
 now be enumerated as part of the device tree information for the
 processor.

 Signed-off-by: Andy Gross andy.gr...@ti.com
 ---
 OMAP4 is still not made DT only so I suggest you to hold on for this patch
 till that happens.
 
 Wouldn't we need to at least prevent building the platform device using 
 omap_device_build() when we are using DT?
 
Yes. I assumed Andy will do that once he decides to keep the
non-dt support :)

Regards,
Santosh

--
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: OMAP2+: Remove dmm device creation

2013-03-20 Thread Gross, Andy
Yes ill fix it up and move the doc to the other patch and send a v2



From: Shilimkar, Santosh
Sent: Wednesday, March 20, 2013 1:22 AM
To: Taneja, Archit
Cc: Gross, Andy; linux-omap@vger.kernel.org; Cousson, Benoit; 
devicetree-disc...@lists.ozlabs.org; Menon, Nishanth
Subject: Re: [PATCH 2/2] ARM: OMAP2+: Remove dmm device creation

On Wednesday 20 March 2013 11:46 AM, Archit Taneja wrote:
 On Wednesday 20 March 2013 11:26 AM, Santosh Shilimkar wrote:
 On Wednesday 20 March 2013 10:13 AM, Andy Gross wrote:
 Remove DMM device creation via the hwmod entry.  The DMM device will
 now be enumerated as part of the device tree information for the
 processor.

 Signed-off-by: Andy Gross andy.gr...@ti.com
 ---
 OMAP4 is still not made DT only so I suggest you to hold on for this patch
 till that happens.

 Wouldn't we need to at least prevent building the platform device using 
 omap_device_build() when we are using DT?

Yes. I assumed Andy will do that once he decides to keep the
non-dt support :)

Regards,
Santosh

--
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 PATCH 1/1] ARM: dts: AM33XX: Add CPSW phy_id device tree data to am335x-evmsk

2013-03-20 Thread Mugunthan V N
Add phy_id device tree data to am335x-evmsk device to bring up CPSW
ethernet present on am335x starter kit.

Signed-off-by: Mugunthan V N mugunthan...@ti.com
---
 arch/arm/boot/dts/am335x-evmsk.dts |8 
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/boot/dts/am335x-evmsk.dts 
b/arch/arm/boot/dts/am335x-evmsk.dts
index f67c360..acbcac3 100644
--- a/arch/arm/boot/dts/am335x-evmsk.dts
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
@@ -248,3 +248,11 @@
};
};
 };
+
+cpsw_emac0 {
+   phy_id = davinci_mdio, 0;
+};
+
+cpsw_emac1 {
+   phy_id = davinci_mdio, 1;
+};
-- 
1.7.9.5

--
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: [LAKML][Users getting knocked of from list]

2013-03-20 Thread Sekhar Nori
On 3/20/2013 11:51 AM, Santosh Shilimkar wrote:
 Russell,
 
 In last couple of months, I have observed that users are getting knocked off
 from LAKML often. I myself faced it 2 times so far and I heard similar 
 complaint
 at least from 5 more folks.
 
 Is there a change in settings or something new which started triggering this ?

Can you login to mailman at
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel and see if
provides information on this? I too got knocked out and it was
apparently because of too many bounces. It maintains a bounce score
and mine is currently 2.0 out of total of 5.0.

I have no clue why my address should bounce.

Thanks,
Sekhar
--
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: [LAKML][Users getting knocked of from list]

2013-03-20 Thread Santosh Shilimkar
On Wednesday 20 March 2013 12:12 PM, Sekhar Nori wrote:
 On 3/20/2013 11:51 AM, Santosh Shilimkar wrote:
 Russell,

 In last couple of months, I have observed that users are getting knocked off
 from LAKML often. I myself faced it 2 times so far and I heard similar 
 complaint
 at least from 5 more folks.

 Is there a change in settings or something new which started triggering this 
 ?
 
 Can you login to mailman at
 http://lists.infradead.org/mailman/listinfo/linux-arm-kernel and see if
 provides information on this? I too got knocked out and it was
 apparently because of too many bounces. It maintains a bounce score
 and mine is currently 2.0 out of total of 5.0.
 
Looks like same reason for me as well.

 I have no clue why my address should bounce.
 
Me neither.

Regards,
santosh
--
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


[GIT PULL] ARM: OMAP2+: Serial driver sysc cleanup for 3.10

2013-03-20 Thread Santosh Shilimkar
Tony,

Here is the pull request for OMAP serial driver sysconfig cleanup. The series
removes all the hackery of sysconfig from UART driver and let runtime backend
handle it. Without this series serial console is almost un-usable on OMAP5.
One of the patch touches driver/serial but I got an ack from Greg KH to get
it queued via OMAP tree.


The following changes since commit a937536b868b8369b98967929045f1df54234323:

  Linux 3.9-rc3 (2013-03-17 15:59:32 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux.git 
for_3.10/omap_serial_sysc_cleanup

for you to fetch changes up to 0f78c88b107a25561d0830c7fb695134ac7e8892:

  ARM: OMAP2+: hwmod: Remove sysc slave idle and auto idle apis (2013-03-19 
12:07:49 +0530)


Rajendra Nayak (4):
  ARM: OMAP2+: hwmod: Remove unused _HWMOD_WAKEUP_ENABLED flag
  ARM: OMAP2+: hwmod: Cleanup sidle/mstandby programming
  ARM: OMAP2+: hwmod: Always have OCP_SYSCONFIG.ENAWAKEUP enabled
  ARM: OMAP2+: hwmod: Add a new flag to handle SIDLE in SWSUP only in active

Santosh Shilimkar (4):
  ARM: OMAP2+: hwmod-data: UART IP needs software control to manage sidle 
modes
  SERIAL: OMAP: Remove the slave idle handling from the driver
  ARM: OMAP2+: serial: Remove the un-used slave idle hooks
  ARM: OMAP2+: hwmod: Remove sysc slave idle and auto idle apis

 arch/arm/mach-omap2/omap_hwmod.c   |  142 
 arch/arm/mach-omap2/omap_hwmod.h   |   13 +-
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |3 +
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c |6 +
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |4 +
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |6 +-
 arch/arm/mach-omap2/serial.c   |   31 -
 drivers/tty/serial/omap-serial.c   |   23 
 include/linux/platform_data/serial-omap.h  |2 -
 9 files changed, 50 insertions(+), 180 deletions(-)
--
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


[GIT PULL] ARM: OMAP2+: Serial driver sysc cleanup for 3.10

2013-03-20 Thread Santosh Shilimkar
Tony,

Here is the pull request for OMAP serial driver sysconfig cleanup. The series
removes all the hackery of sysconfig from UART driver and let runtime backend
handle it. Without this series serial console is almost un-usable on OMAP5.
One of the patch touches driver/serial but I got an ack from Greg KH to get
it queued via OMAP tree.


The following changes since commit a937536b868b8369b98967929045f1df54234323:

  Linux 3.9-rc3 (2013-03-17 15:59:32 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux.git 
for_3.10/omap_serial_sysc_cleanup

for you to fetch changes up to 0f78c88b107a25561d0830c7fb695134ac7e8892:

  ARM: OMAP2+: hwmod: Remove sysc slave idle and auto idle apis (2013-03-19 
12:07:49 +0530)


Rajendra Nayak (4):
  ARM: OMAP2+: hwmod: Remove unused _HWMOD_WAKEUP_ENABLED flag
  ARM: OMAP2+: hwmod: Cleanup sidle/mstandby programming
  ARM: OMAP2+: hwmod: Always have OCP_SYSCONFIG.ENAWAKEUP enabled
  ARM: OMAP2+: hwmod: Add a new flag to handle SIDLE in SWSUP only in active

Santosh Shilimkar (4):
  ARM: OMAP2+: hwmod-data: UART IP needs software control to manage sidle 
modes
  SERIAL: OMAP: Remove the slave idle handling from the driver
  ARM: OMAP2+: serial: Remove the un-used slave idle hooks
  ARM: OMAP2+: hwmod: Remove sysc slave idle and auto idle apis

 arch/arm/mach-omap2/omap_hwmod.c   |  142 
 arch/arm/mach-omap2/omap_hwmod.h   |   13 +-
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |3 +
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c |6 +
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |4 +
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |6 +-
 arch/arm/mach-omap2/serial.c   |   31 -
 drivers/tty/serial/omap-serial.c   |   23 
 include/linux/platform_data/serial-omap.h  |2 -
 9 files changed, 50 insertions(+), 180 deletions(-)
--
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


[GIT PULL] ARM: OMAP2+: Serial driver sysc cleanup for 3.10

2013-03-20 Thread Santosh Shilimkar
Tony,

Here is the pull request for OMAP serial driver sysconfig cleanup. The series
removes all the hackery of sysconfig from UART driver and let runtime backend
handle it. Without this series serial console is almost un-usable on OMAP5.
One of the patch touches driver/serial but I got an ack from Greg KH to get
it queued via OMAP tree.


The following changes since commit a937536b868b8369b98967929045f1df54234323:

  Linux 3.9-rc3 (2013-03-17 15:59:32 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux.git 
for_3.10/omap_serial_sysc_cleanup

for you to fetch changes up to 0f78c88b107a25561d0830c7fb695134ac7e8892:

  ARM: OMAP2+: hwmod: Remove sysc slave idle and auto idle apis (2013-03-19 
12:07:49 +0530)


Rajendra Nayak (4):
  ARM: OMAP2+: hwmod: Remove unused _HWMOD_WAKEUP_ENABLED flag
  ARM: OMAP2+: hwmod: Cleanup sidle/mstandby programming
  ARM: OMAP2+: hwmod: Always have OCP_SYSCONFIG.ENAWAKEUP enabled
  ARM: OMAP2+: hwmod: Add a new flag to handle SIDLE in SWSUP only in active

Santosh Shilimkar (4):
  ARM: OMAP2+: hwmod-data: UART IP needs software control to manage sidle 
modes
  SERIAL: OMAP: Remove the slave idle handling from the driver
  ARM: OMAP2+: serial: Remove the un-used slave idle hooks
  ARM: OMAP2+: hwmod: Remove sysc slave idle and auto idle apis

 arch/arm/mach-omap2/omap_hwmod.c   |  142 
 arch/arm/mach-omap2/omap_hwmod.h   |   13 +-
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |3 +
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c |6 +
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |4 +
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c |6 +-
 arch/arm/mach-omap2/serial.c   |   31 -
 drivers/tty/serial/omap-serial.c   |   23 
 include/linux/platform_data/serial-omap.h  |2 -
 9 files changed, 50 insertions(+), 180 deletions(-)
--
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: Booting 3.9.0-rc2 on Beaglebone ?

2013-03-20 Thread Hiremath, Vaibhav

 -Original Message-
 From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
 ow...@vger.kernel.org] On Behalf Of Tony Lindgren
 Sent: Wednesday, March 20, 2013 12:04 AM
 To: Mark Jackson
 Cc: linux-omap@vger.kernel.org
 Subject: Re: Booting 3.9.0-rc2 on Beaglebone ?
 
 Hi,
 
 * Mark Jackson mpfj-l...@mimc.co.uk [130312 13:48]:
  I'm struggling to get the latest kernel git to load on my beaglebone.
 
  Error: unrecognized/unsupported machine ID (r1 = 0x0e05).
 
  I guess I'm missing some vital step ?
 
 We're changing the mainline kernel tree to use device tree
 based booting only.
 
 So you need to either upgrade your bootloader to support device
 tree based booting, or enable CONFIG_ARM_APPENDED_DTB and
 ARM_ATAG_DTB_COMPAT in your .config and build u-image manually
 with the .dtb appended to the zImage. Doing make dtbs will generate
 you the am335x-bone.dtb to append.
 

This might help you - 
https://github.com/hvaibhav/am335x-linux/wiki/How-To-Use-Upstream-Tree

Thanks,
Vaibhav
--
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: [GIT PULL] ARM: OMAP2+: Serial driver sysc cleanup for 3.10

2013-03-20 Thread Santosh Shilimkar
On Wednesday 20 March 2013 02:06 PM, Santosh Shilimkar wrote:
 Tony,
 
 Here is the pull request for OMAP serial driver sysconfig cleanup. The series
 removes all the hackery of sysconfig from UART driver and let runtime backend
 handle it. Without this series serial console is almost un-usable on OMAP5.
 One of the patch touches driver/serial but I got an ack from Greg KH to get
 it queued via OMAP tree.
 
Sent same email couple of more times. Sorry for noise.

Regards
Santosh

--
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


[GIT PULL] ARM: OMAP2+: Generic cleanups for 3.10

2013-03-20 Thread Santosh Shilimkar
Tony,

Here is the pull request for various OMAP cleanups and fixes which are posted
earlier on the list. It contains OMAP4 smp cleanup, removal of unwanted static
deps from OMAP4, RAM offset consolidation and fiq tuple cleanup. 


The following changes since commit a937536b868b8369b98967929045f1df54234323:

  Linux 3.9-rc3 (2013-03-17 15:59:32 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux.git 
for_3.10/omap_generic_cleanup

for you to fetch changes up to 37e1f64c3bc2b3455a9688de8527a341847b3ad9:

  ARM: OMAP4: Fix the init code to have OMAP4460 errata available in DT build 
(2013-03-19 12:57:30 +0530)


Santosh Shilimkar (8):
  ARM: OMAP2+: PM: Remove bogus fiq_[enable/disable] tuple
  ARM: OMAP4+: Remove the un-necessary cache flush from hotplug code
  ARM: OMAP4+: Remove un-necessary cacheflush in secondary CPU boot path
  ARM: OMAP4+: Remove out of placed smp_wmb() in secondary wakeup code
  ARM: OMAP4+: Move the CPU wakeup prepare code under smp_prepare_cpus()
  ARM: OMAP4: PM: Remove L4 wakeup depedency with MPU since errata fix 
exist now
  ARM: OMAP4: PM: Now remove L4 per clockdomain static depedency with MPU
  ARM: OMAP4: Fix the init code to have OMAP4460 errata available in DT 
build

Tero Kristo (1):
  ARM: OMAP4+: Use common scratchpad SAR RAM offsets for all architectures

 arch/arm/mach-omap2/cpuidle34xx.c  |3 --
 arch/arm/mach-omap2/cpuidle44xx.c  |7 
 arch/arm/mach-omap2/omap-hotplug.c |6 
 arch/arm/mach-omap2/omap-smp.c |   57 +++-
 arch/arm/mach-omap2/omap4-common.c |   16 +
 arch/arm/mach-omap2/omap4-sar-layout.h |   14 
 arch/arm/mach-omap2/pm24xx.c   |   11 ++
 arch/arm/mach-omap2/pm34xx.c   |9 +
 arch/arm/mach-omap2/pm44xx.c   |   20 +++
 9 files changed, 51 insertions(+), 92 deletions(-)
--
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


[GIT PULL] ARM: OMAP5: Generic updates and es2 fixes for 3.10

2013-03-20 Thread Santosh Shilimkar
Tony,

Here is the pull request for various OMAP5 generic updates which are posted
earlier on the list. It contains OMAP5 es2 related updates like idcode,
RAM base and couple of initialisation fixes.

The following changes since commit a937536b868b8369b98967929045f1df54234323:

  Linux 3.9-rc3 (2013-03-17 15:59:32 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux.git 
for_3.10/omap5_generic_updates

for you to fetch changes up to ecf51648c192377ea2830101b12fc3017bfd2b0c:

  ARM: OMAP5: clock: No Freqsel on OMAP5 devices too (2013-03-19 12:57:03 +0530)


Rajendra Nayak (1):
  ARM: OMAP5: clock: No Freqsel on OMAP5 devices too

Santosh Shilimkar (6):
  ARM: OMAP5: Update SOC id detection code for ES2
  ARM: OMAP5: timer: Update the clocksource name as per clock data
  ARM: OMAP5: prm: Allow prm init to succeed
  ARM: OMAP5: Update SAR RAM base address
  ARM: OMAP5: Update SAR memory layout for WakeupGen
  ARM: OMAP5: Make errata i688 workaround available

Tero Kristo (1):
  ARM: OMAP5: Reuse prm read_inst/write_inst

 arch/arm/mach-omap2/Kconfig|2 +-
 arch/arm/mach-omap2/dpll3xxx.c |   11 +--
 arch/arm/mach-omap2/id.c   |   12 +---
 arch/arm/mach-omap2/io.c   |9 +
 arch/arm/mach-omap2/omap4-common.c |   10 --
 arch/arm/mach-omap2/omap4-sar-layout.h |   14 +++---
 arch/arm/mach-omap2/omap54xx.h |1 +
 arch/arm/mach-omap2/prm44xx.c  |6 +++---
 arch/arm/mach-omap2/soc.h  |2 ++
 arch/arm/mach-omap2/timer.c|5 +++--
 10 files changed, 48 insertions(+), 24 deletions(-)
--
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


[GIT PULL] ARM: OMAP5: hwmod, prm/cm data files and updates for 3.10

2013-03-20 Thread Santosh Shilimkar
Tony,

Here is the pull request for OMAP5 data file patches which are on list from
last merge window. As aligned on list, I have dropped clock data from the
series. That means for the boot, one clock data patch needs to be applied.
It is available on my git tree in 'out_of_tree/omap5_clk_data' branch.

As discussed already on list, you will notice hwmod data loc has come down
from ~6000 lines to ~2000 lines becasue of removal of iospace, irq, dma data
as well as unused hwmods. Few hwmods for which dt conversion is pending are
not added as well but those would add max ~400 loc in future.

The following changes since commit a937536b868b8369b98967929045f1df54234323:

  Linux 3.9-rc3 (2013-03-17 15:59:32 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux.git 
for_3.10/omap5_data_files

for you to fetch changes up to 8a6a32e589a1a2a5a3fb8ebe8fc7426997bc6d89:

  ARM: OMAP5: Enable build and frameowrk initialisations (2013-03-19 14:09:11 
+0530)


Benoit Cousson (7):
  ARM: OMAP5: PRM: Add OMAP54XX register and bitfield files
  ARM: OMAP5: CM: Add OMAP54XX register and bitfield files
  ARM: OMAP5: PRCM: Add OMAP54XX local MPU PRCM registers
  ARM: OMAP5: SCRM: Add OMAP54XX header file.
  ARM: OMAP2+: clockdomain data: Add OMAP54XX data and update the header
  ARM: OMAP5: powerdomain data: Add OMAP54XX data and update the header
  ARM: OMAP5: hwmod data: Create initial OMAP5 SOC hwmod data

Santosh Shilimkar (4):
  ARM: OMAP5: hwmod_data: Fix UART sysc settings
  ARM: OMAP5: hwmod-data: Add timer clock activity flags
  ARM: OMAP5: voltagedomain data: Add OMAP5 voltage domain data
  ARM: OMAP5: Enable build and frameowrk initialisations

 arch/arm/mach-omap2/Makefile  |4 +
 arch/arm/mach-omap2/clockdomain.h |1 +
 arch/arm/mach-omap2/clockdomains54xx_data.c   |  464 +
 arch/arm/mach-omap2/cm-regbits-54xx.h | 1737 
 arch/arm/mach-omap2/cm1_54xx.h|  216 ++
 arch/arm/mach-omap2/cm2_54xx.h|  392 
 arch/arm/mach-omap2/io.c  |7 +
 arch/arm/mach-omap2/omap_hwmod.h  |1 +
 arch/arm/mach-omap2/omap_hwmod_54xx_data.c| 2151 
 arch/arm/mach-omap2/powerdomain.h |1 +
 arch/arm/mach-omap2/powerdomains54xx_data.c   |  331 +++
 arch/arm/mach-omap2/prcm44xx.h|6 +
 arch/arm/mach-omap2/prcm_mpu54xx.h|   92 +
 arch/arm/mach-omap2/prm-regbits-54xx.h| 2701 +
 arch/arm/mach-omap2/prm54xx.h |  447 
 arch/arm/mach-omap2/scrm54xx.h|  231 +++
 arch/arm/mach-omap2/voltage.h |1 +
 arch/arm/mach-omap2/voltagedomains54xx_data.c |  102 +
 18 files changed, 8885 insertions(+)
 create mode 100644 arch/arm/mach-omap2/clockdomains54xx_data.c
 create mode 100644 arch/arm/mach-omap2/cm-regbits-54xx.h
 create mode 100644 arch/arm/mach-omap2/cm1_54xx.h
 create mode 100644 arch/arm/mach-omap2/cm2_54xx.h
 create mode 100644 arch/arm/mach-omap2/omap_hwmod_54xx_data.c
 create mode 100644 arch/arm/mach-omap2/powerdomains54xx_data.c
 create mode 100644 arch/arm/mach-omap2/prcm_mpu54xx.h
 create mode 100644 arch/arm/mach-omap2/prm-regbits-54xx.h
 create mode 100644 arch/arm/mach-omap2/prm54xx.h
 create mode 100644 arch/arm/mach-omap2/scrm54xx.h
 create mode 100644 arch/arm/mach-omap2/voltagedomains54xx_data.c
--
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 v3 5/6] ARM: dts: omap: update usb_otg_hs data

2013-03-20 Thread Kishon Vijay Abraham I
Updated the usb_otg_hs dt data to include the *phy* and *phy-names*
binding in order for the driver to use the new generic PHY framework.
Also updated the Documentation to include the binding information.

Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
---
 Documentation/devicetree/bindings/usb/omap-usb.txt |5 +
 arch/arm/boot/dts/omap3.dtsi   |2 ++
 arch/arm/boot/dts/omap4.dtsi   |2 ++
 3 files changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt 
b/Documentation/devicetree/bindings/usb/omap-usb.txt
index abce256..3d6f9f6 100644
--- a/Documentation/devicetree/bindings/usb/omap-usb.txt
+++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
@@ -19,6 +19,9 @@ OMAP MUSB GLUE
  - power : Should be 50. This signifies the controller can supply upto
100mA when operating in host mode.
  - usb-phy : the phandle for the PHY device
+ - phy : the phandle for the PHY device (used by generic PHY framework)
+ - phy-names : the names of the PHY corresponding to the PHYs present in the
+   *phy* phandle.
 
 Optional properties:
  - ctrl-module : phandle of the control module this glue uses to write to
@@ -33,6 +36,8 @@ usb_otg_hs: usb_otg_hs@4a0ab000 {
num_eps = 16;
ram_bits = 12;
ctrl-module = omap_control_usb;
+   phy = usb2_phy;
+   phy-names = usb2-phy;
 };
 
 Board specific device node entry
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 1e21565..cf50c18 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -405,6 +405,8 @@
interrupt-names = mc, dma;
ti,hwmods = usb_otg_hs;
usb-phy = usb2_phy;
+   phy = usb2_phy;
+   phy-names = usb2-phy;
multipoint = 1;
num-eps = 16;
ram-bits = 12;
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 06d044e..188d5b8 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -550,6 +550,8 @@
interrupt-names = mc, dma;
ti,hwmods = usb_otg_hs;
usb-phy = usb2_phy;
+   phy = usb2_phy;
+   phy-names = usb2-phy;
multipoint = 1;
num-eps = 16;
ram-bits = 12;
-- 
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 v3 6/6] usb: musb: omap2430: use the new generic PHY framework

2013-03-20 Thread Kishon Vijay Abraham I
Use the generic PHY framework API to get the PHY. The usb_phy_set_suspend
and usb_phy_set_resume is replaced with phy_suspend and phy_resume to
align with the new PHY framework.

musb-xceiv can't be removed as of now because musb core uses xceiv.state and
xceiv.otg. Once there is a separate state machine to handle otg, these can be
moved out of xceiv and then we can start using the generic PHY framework.

Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
---
 drivers/usb/musb/musb_core.h |2 ++
 drivers/usb/musb/omap2430.c  |   22 --
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index 7fb4819..78251fd 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -46,6 +46,7 @@
 #include linux/usb.h
 #include linux/usb/otg.h
 #include linux/usb/musb.h
+#include linux/phy/phy.h
 
 struct musb;
 struct musb_hw_ep;
@@ -357,6 +358,7 @@ struct musb {
u16 int_tx;
 
struct usb_phy  *xceiv;
+   struct phy  *phy;
 
int nIrq;
unsignedirq_wake:1;
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 1a42a45..55f071d 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -349,14 +349,24 @@ static int omap2430_musb_init(struct musb *musb)
 * up through ULPI.  TWL4030-family PMICs include one,
 * which needs a driver, drivers aren't always needed.
 */
-   if (dev-parent-of_node)
+   if (dev-parent-of_node) {
+   musb-phy = devm_of_phy_get_byname(dev-parent, usb2-phy);
+
+   /* We can't totally remove musb-xceiv as of now because
+* musb core uses xceiv.state and xceiv.otg. Once we have
+* a separate state machine to handle otg, these can be moved
+* out of xceiv and then we can start using the generic PHY
+* framework
+*/
musb-xceiv = devm_usb_get_phy_by_phandle(dev-parent,
usb-phy, 0);
-   else
+   } else {
musb-xceiv = devm_usb_get_phy_dev(dev, 0);
+   musb-phy = devm_phy_get(dev, 0);
+   }
 
-   if (IS_ERR_OR_NULL(musb-xceiv)) {
-   pr_err(HS USB OTG: no transceiver configured\n);
+   if (IS_ERR_OR_NULL(musb-xceiv) || IS_ERR_OR_NULL(musb-phy)) {
+   dev_err(dev, no transceiver configured\n);
return -EPROBE_DEFER;
}
 
@@ -612,7 +622,7 @@ static int omap2430_runtime_suspend(struct device *dev)
OTG_INTERFSEL);
 
omap2430_low_level_exit(musb);
-   usb_phy_set_suspend(musb-xceiv, 1);
+   phy_suspend(musb-phy);
}
 
return 0;
@@ -628,7 +638,7 @@ static int omap2430_runtime_resume(struct device *dev)
musb_writel(musb-mregs, OTG_INTERFSEL,
musb-context.otg_interfsel);
 
-   usb_phy_set_suspend(musb-xceiv, 0);
+   phy_resume(musb-phy);
}
 
return 0;
-- 
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 v3 3/6] usb: otg: twl4030: use the new generic PHY framework

2013-03-20 Thread Kishon Vijay Abraham I
Used the generic PHY framework API to create the PHY. twl4030_usb_suspend
and twl4030_usb_resume is added to phy_ops in order to align
with the new framework.

However using the old USB PHY library cannot be completely removed
because OTG is intertwined with PHY and moving to the new
framework completely will break OTG. Once we have a separate OTG state machine,
we can get rid of the USB PHY library.

Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
---
 drivers/usb/otg/twl4030-usb.c |   36 
 1 file changed, 36 insertions(+)

diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
index a994715..aebcd6a 100644
--- a/drivers/usb/otg/twl4030-usb.c
+++ b/drivers/usb/otg/twl4030-usb.c
@@ -33,6 +33,7 @@
 #include linux/io.h
 #include linux/delay.h
 #include linux/usb/otg.h
+#include linux/phy/phy.h
 #include linux/usb/musb-omap.h
 #include linux/usb/ulpi.h
 #include linux/i2c/twl.h
@@ -575,10 +576,38 @@ static int twl4030_set_host(struct usb_otg *otg, struct 
usb_bus *host)
return 0;
 }
 
+static int twl4030_usb_suspend(struct phy *phy)
+{
+   struct twl4030_usb *twl = dev_get_drvdata(phy-dev);
+
+   twl4030_phy_suspend(twl, 1);
+
+   return 0;
+}
+
+static int twl4030_usb_resume(struct phy *phy)
+{
+   struct twl4030_usb *twl = dev_get_drvdata(phy-dev);
+
+   if (!twl-asleep)
+   return -EBUSY;
+   __twl4030_phy_resume(twl);
+   twl-asleep = 0;
+
+   return 0;
+}
+
+static struct phy_ops ops = {
+   .suspend= twl4030_usb_suspend,
+   .resume = twl4030_usb_resume,
+   .owner  = THIS_MODULE,
+};
+
 static int twl4030_usb_probe(struct platform_device *pdev)
 {
struct twl4030_usb_data *pdata = pdev-dev.platform_data;
struct twl4030_usb  *twl;
+   struct phy  *phy;
int status, err;
struct usb_otg  *otg;
struct device_node  *np = pdev-dev.of_node;
@@ -617,6 +646,13 @@ static int twl4030_usb_probe(struct platform_device *pdev)
otg-set_host   = twl4030_set_host;
otg-set_peripheral = twl4030_set_peripheral;
 
+   phy = devm_phy_create(twl-dev, twl4030, pdev-dev.of_node,
+   USB_PHY_TYPE_USB2, ops, twl);
+   if (IS_ERR(phy)) {
+   dev_dbg(pdev-dev, Failed to create PHY\n);
+   return PTR_ERR(phy);
+   }
+
/* init spinlock for workqueue */
spin_lock_init(twl-lock);
 
-- 
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 v3 1/6] drivers: phy: add generic PHY framework

2013-03-20 Thread Kishon Vijay Abraham I
The PHY framework provides a set of APIs for the PHY drivers to
create/destroy a PHY and APIs for the PHY users to obtain a reference to the
PHY with or without using phandle. To obtain a reference to the PHY without
using phandle, the platform specfic intialization code (say from board file)
should have already called phy_bind with the binding information. The binding
information consists of phy's device name, phy user device name and an index.
The index is used when the same phy user binds to mulitple phys.

PHY drivers should create the PHY by passing phy_descriptor that has
describes the PHY (label, type etc..) and ops like init, exit, suspend, resume,
poweron, shutdown.

The documentation for the generic PHY framework is added in
Documentation/phy.txt and the documentation for the sysfs entry is added
in Documentation/ABI/testing/sysfs-class-phy.

Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
---
 Documentation/ABI/testing/sysfs-class-phy |   15 +
 Documentation/phy.txt |  108 ++
 MAINTAINERS   |7 +
 drivers/Kconfig   |2 +
 drivers/Makefile  |2 +
 drivers/phy/Kconfig   |   13 +
 drivers/phy/Makefile  |5 +
 drivers/phy/phy-core.c|  574 +
 include/linux/phy/phy.h   |  218 +++
 9 files changed, 944 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-phy
 create mode 100644 Documentation/phy.txt
 create mode 100644 drivers/phy/Kconfig
 create mode 100644 drivers/phy/Makefile
 create mode 100644 drivers/phy/phy-core.c
 create mode 100644 include/linux/phy/phy.h

diff --git a/Documentation/ABI/testing/sysfs-class-phy 
b/Documentation/ABI/testing/sysfs-class-phy
new file mode 100644
index 000..47f17c9
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-phy
@@ -0,0 +1,15 @@
+What:  /sys/class/phy/phy/label
+Date:  Feb 2013
+KernelVersion: 3.10
+Contact:   Kishon Vijay Abraham I kis...@ti.com
+Description:
+   This is a read-only file for getting the label of the phy.
+
+What:  /sys/class/phy/phy/phy_bind
+Date:  Feb 2013
+KernelVersion: 3.10
+Contact:   Kishon Vijay Abraham I kis...@ti.com
+Description:
+   This is a read-only file for reading the phy binding
+   information. It contains the device name of the controller,
+   the index and the device name of the PHY in that order.
diff --git a/Documentation/phy.txt b/Documentation/phy.txt
new file mode 100644
index 000..6ba3192
--- /dev/null
+++ b/Documentation/phy.txt
@@ -0,0 +1,108 @@
+   The Generic PHY Framework
+ Kishon Vijay Abraham I kis...@ti.com
+
+This document explains the Generic PHY Framework along with the APIs provided,
+how-to-use, current status and the future work list.
+
+1. Introduction
+
+*PHY* is the abbreviation for physical layer. It is used to connect a device
+to the physical medium e.g., the USB controller has a PHY to provide functions
+such as serialization, de-serialization, encoding, decoding and is responsible
+for obtaining the required data transmission rate. Note that some USB
+controller has PHY functionality embedded into it and others use an external
+PHY. Other peripherals that uses a PHY include Wireless LAN, Ethernet,
+SATA etc.
+
+The intention of creating this framework is to bring the phy drivers spread
+all over the Linux kernel to drivers/phy to increase code re-use and to
+increase code maintainability.
+
+This framework will be of use only to devices that uses external PHY (PHY
+functionality is not embedded within the controller).
+
+2. Creating the PHY
+
+The PHY driver should create the PHY in order for other peripheral controllers
+to make use of it. The PHY framework provides 2 APIs to create the PHY.
+
+struct phy *phy_create(struct device *dev, const char *label,
+   struct device_node *of_node, int type, struct phy_ops *ops,
+   void *priv);
+struct phy *devm_phy_create(struct device *dev, const char *label,
+   struct device_node *of_node, int type, struct phy_ops *ops,
+   void *priv);
+
+The PHY drivers can use one of the above 2 APIs to create the PHY by passing
+the device pointer, label, device node, type, phy ops and a driver data.
+phy_ops is a set of function pointers for performing PHY operations such as
+init, exit, suspend, resume, poweron and shutdown.
+
+3. Binding the PHY to the controller
+
+The framework provides an API for binding the controller to the PHY in the
+case of non dt boot.
+
+struct phy_bind *phy_bind(const char *dev_name, int index,
+   const char *phy_dev_name);
+
+The API fills the phy_bind structure with the dev_name (device name of the
+controller), index and phy_dev_name (device name of the PHY). This will
+be used when the controller 

[PATCH v3 4/6] ARM: OMAP: USB: Add phy binding information

2013-03-20 Thread Kishon Vijay Abraham I
In order for controllers to get PHY in case of non dt boot, the phy
binding information should be added in the platform specific
initialization code using phy_bind. The previously added usb_bind_phy
can't be removed yet because the musb controller continues to use the
old PHY library which has OTG in it (struct usb_phy has struct usb_otg
as member). Until we have a separate OTG state machine to handle all of
that, the new generic PHY framework and the old phy library will co-exist.

Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
---
 arch/arm/mach-omap2/board-2430sdp.c  |2 ++
 arch/arm/mach-omap2/board-3430sdp.c  |2 ++
 arch/arm/mach-omap2/board-4430sdp.c  |2 ++
 arch/arm/mach-omap2/board-cm-t35.c   |2 ++
 arch/arm/mach-omap2/board-devkit8000.c   |2 ++
 arch/arm/mach-omap2/board-igep0020.c |2 ++
 arch/arm/mach-omap2/board-ldp.c  |2 ++
 arch/arm/mach-omap2/board-omap3beagle.c  |2 ++
 arch/arm/mach-omap2/board-omap3evm.c |2 ++
 arch/arm/mach-omap2/board-omap3logic.c   |2 ++
 arch/arm/mach-omap2/board-omap3pandora.c |2 ++
 arch/arm/mach-omap2/board-omap3stalker.c |2 ++
 arch/arm/mach-omap2/board-omap3touchbook.c   |2 ++
 arch/arm/mach-omap2/board-omap4panda.c   |2 ++
 arch/arm/mach-omap2/board-overo.c|2 ++
 arch/arm/mach-omap2/board-rm680.c|2 ++
 arch/arm/mach-omap2/board-rx51.c |2 ++
 arch/arm/mach-omap2/board-zoom-peripherals.c |2 ++
 18 files changed, 36 insertions(+)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
b/arch/arm/mach-omap2/board-2430sdp.c
index a3e0aaa..271458b 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -28,6 +28,7 @@
 #include linux/io.h
 #include linux/gpio.h
 #include linux/usb/phy.h
+#include linux/phy/phy.h
 
 #include asm/mach-types.h
 #include asm/mach/arch.h
@@ -265,6 +266,7 @@ static void __init omap_2430sdp_init(void)
 
omap_mux_init_signal(usb0hs_stp, OMAP_PULL_ENA | OMAP_PULL_UP);
usb_bind_phy(musb-hdrc.0.auto, 0, twl4030_usb);
+   phy_bind(musb-hdrc.0.auto, 0, twl4030_usb);
usb_musb_init(NULL);
 
board_smc91x_init();
diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
b/arch/arm/mach-omap2/board-3430sdp.c
index ce812de..bf6ce1d 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -27,6 +27,7 @@
 #include linux/platform_data/spi-omap2-mcspi.h
 #include linux/platform_data/omap-twl4030.h
 #include linux/usb/phy.h
+#include linux/phy/phy.h
 
 #include asm/mach-types.h
 #include asm/mach/arch.h
@@ -601,6 +602,7 @@ static void __init omap_3430sdp_init(void)
omap_serial_init();
omap_sdrc_init(hyb18m512160af6_sdrc_params, NULL);
usb_bind_phy(musb-hdrc.0.auto, 0, twl4030_usb);
+   phy_bind(musb-hdrc.0.auto, 0, twl4030_usb);
usb_musb_init(NULL);
board_smc91x_init();
board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
diff --git a/arch/arm/mach-omap2/board-4430sdp.c 
b/arch/arm/mach-omap2/board-4430sdp.c
index 35f3ad0..1a236cb 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -32,6 +32,7 @@
 #include linux/platform_data/omap4-keypad.h
 #include linux/usb/musb.h
 #include linux/usb/phy.h
+#include linux/phy/phy.h
 
 #include asm/mach-types.h
 #include asm/mach/arch.h
@@ -725,6 +726,7 @@ static void __init omap_4430sdp_init(void)
omap4_twl6030_hsmmc_init(mmc);
 
usb_bind_phy(musb-hdrc.0.auto, 0, omap-usb2.1.auto);
+   phy_bind(musb-hdrc.0.auto, 0, omap-usb2.1.auto);
usb_musb_init(musb_board_data);
 
status = omap_ethernet_init();
diff --git a/arch/arm/mach-omap2/board-cm-t35.c 
b/arch/arm/mach-omap2/board-cm-t35.c
index af2bb21..6a2615a 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -31,6 +31,7 @@
 #include linux/regulator/machine.h
 #include linux/mmc/host.h
 #include linux/usb/phy.h
+#include linux/phy/phy.h
 
 #include linux/spi/spi.h
 #include linux/spi/tdo24m.h
@@ -726,6 +727,7 @@ static void __init cm_t3x_common_init(void)
omap_twl4030_audio_init(cm-t3x, NULL);
 
usb_bind_phy(musb-hdrc.0.auto, 0, twl4030_usb);
+   phy_bind(musb-hdrc.0.auto, 0, twl4030_usb);
usb_musb_init(NULL);
cm_t35_init_usbh();
cm_t35_init_camera();
diff --git a/arch/arm/mach-omap2/board-devkit8000.c 
b/arch/arm/mach-omap2/board-devkit8000.c
index 53056c3..4ca7d23 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -30,6 +30,7 @@
 #include linux/mtd/nand.h
 #include linux/mmc/host.h
 #include linux/usb/phy.h
+#include linux/phy/phy.h
 
 #include linux/regulator/machine.h
 #include linux/i2c/twl.h
@@ -624,6 +625,7 @@ static void __init devkit8000_init(void)
omap_ads7846_init(2, OMAP3_DEVKIT_TS_GPIO, 0, NULL);
 

[PATCH v3 0/6] Generic PHY Framework

2013-03-20 Thread Kishon Vijay Abraham I
Added a generic PHY framework that provides a set of APIs for the PHY drivers
to create/destroy a PHY and APIs for the PHY users to obtain a reference to
the PHY with or without using phandle. To obtain a reference to the PHY
without using phandle, the platform specfic intialization code (say from board
file) should have already called phy_bind with the binding information. The
binding information consists of phy's device name, phy user device name and an
index. The index is used when the same phy user binds to mulitple phys.

This framework will be of use only to devices that uses external PHY (PHY
functionality is not embedded within the controller).

The intention of creating this framework is to bring the phy drivers spread
all over the Linux kernel to drivers/phy to increase code re-use and to
increase code maintainability.

Comments to make PHY as bus wasn't done because PHY devices can be part of
other bus and making a same device attached to multiple bus leads to bad
design.

Making omap-usb2 and twl4030 to use this framework is provided as a sample.

This patch series is developed on 3.9-rc3. Once the patch series gets finalised
I'll resend omap-usb2 and twl4030 part based on Felipe's tree.

Changes from v2:
* removed phy_descriptor structure completely so changed the APIs which were
  taking phy_descriptor as parameters
* Added 2 more APIs *of_phy_get_byname* and *devm_of_phy_get_byname* to be used
  by PHY user drivers which has *phy* and *phy-names* binding in the dt data
* Fixed a few typos
* Removed phy_list and we now use class_dev_iter_init, class_dev_iter_next and
  class_dev_iter_exit for traversing through the phy list. (Note we still need
  phy_bind list and phy_bind_mutex).
* Changed the sysfs entry name from *bind* to *phy_bind*.

Changes from v1:
* Added Documentation for the PHY framework
* Added few more APIs mostly w.r.t devres
* Modified omap-usb2 and twl4030 to make use of the new framework

Did USB enumeration testing in panda and beagle.
Kishon Vijay Abraham I (6):
  drivers: phy: add generic PHY framework
  usb: phy: omap-usb2: use the new generic PHY framework
  usb: otg: twl4030: use the new generic PHY framework
  ARM: OMAP: USB: Add phy binding information
  ARM: dts: omap: update usb_otg_hs data
  usb: musb: omap2430: use the new generic PHY framework

 Documentation/ABI/testing/sysfs-class-phy  |   15 +
 Documentation/devicetree/bindings/usb/omap-usb.txt |5 +
 Documentation/phy.txt  |  108 
 MAINTAINERS|7 +
 arch/arm/boot/dts/omap3.dtsi   |2 +
 arch/arm/boot/dts/omap4.dtsi   |2 +
 arch/arm/mach-omap2/board-2430sdp.c|2 +
 arch/arm/mach-omap2/board-3430sdp.c|2 +
 arch/arm/mach-omap2/board-4430sdp.c|2 +
 arch/arm/mach-omap2/board-cm-t35.c |2 +
 arch/arm/mach-omap2/board-devkit8000.c |2 +
 arch/arm/mach-omap2/board-igep0020.c   |2 +
 arch/arm/mach-omap2/board-ldp.c|2 +
 arch/arm/mach-omap2/board-omap3beagle.c|2 +
 arch/arm/mach-omap2/board-omap3evm.c   |2 +
 arch/arm/mach-omap2/board-omap3logic.c |2 +
 arch/arm/mach-omap2/board-omap3pandora.c   |2 +
 arch/arm/mach-omap2/board-omap3stalker.c   |2 +
 arch/arm/mach-omap2/board-omap3touchbook.c |2 +
 arch/arm/mach-omap2/board-omap4panda.c |2 +
 arch/arm/mach-omap2/board-overo.c  |2 +
 arch/arm/mach-omap2/board-rm680.c  |2 +
 arch/arm/mach-omap2/board-rx51.c   |2 +
 arch/arm/mach-omap2/board-zoom-peripherals.c   |2 +
 drivers/Kconfig|2 +
 drivers/Makefile   |2 +
 drivers/phy/Kconfig|   13 +
 drivers/phy/Makefile   |5 +
 drivers/phy/phy-core.c |  574 
 drivers/usb/musb/musb_core.h   |2 +
 drivers/usb/musb/omap2430.c|   22 +-
 drivers/usb/otg/twl4030-usb.c  |   36 ++
 drivers/usb/phy/omap-usb2.c|   47 ++
 include/linux/phy/phy.h|  218 
 34 files changed, 1090 insertions(+), 6 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-class-phy
 create mode 100644 Documentation/phy.txt
 create mode 100644 drivers/phy/Kconfig
 create mode 100644 drivers/phy/Makefile
 create mode 100644 drivers/phy/phy-core.c
 create mode 100644 include/linux/phy/phy.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 v3 2/6] usb: phy: omap-usb2: use the new generic PHY framework

2013-03-20 Thread Kishon Vijay Abraham I
Used the generic PHY framework API to create the PHY. omap_usb2_suspend
is split into omap_usb_suspend and omap_usb_resume in order to align
with the new framework.

However using the old USB PHY library cannot be completely removed
because OTG is intertwined with PHY and moving to the new framework
will break OTG. Once we have a separate OTG state machine, we
can get rid of the USB PHY library.

Signed-off-by: Kishon Vijay Abraham I kis...@ti.com
---
 drivers/usb/phy/omap-usb2.c |   47 +++
 1 file changed, 47 insertions(+)

diff --git a/drivers/usb/phy/omap-usb2.c b/drivers/usb/phy/omap-usb2.c
index 844ab68..819ba71 100644
--- a/drivers/usb/phy/omap-usb2.c
+++ b/drivers/usb/phy/omap-usb2.c
@@ -28,6 +28,7 @@
 #include linux/pm_runtime.h
 #include linux/delay.h
 #include linux/usb/omap_control_usb.h
+#include linux/phy/phy.h
 
 /**
  * omap_usb2_set_comparator - links the comparator present in the sytem with
@@ -119,9 +120,48 @@ static int omap_usb2_suspend(struct usb_phy *x, int 
suspend)
return 0;
 }
 
+static int omap_usb_suspend(struct phy *x)
+{
+   struct omap_usb *phy = dev_get_drvdata(x-dev);
+
+   if (!phy-is_suspended) {
+   omap_control_usb_phy_power(phy-control_dev, 0);
+   pm_runtime_put_sync(phy-dev);
+   phy-is_suspended = 1;
+   }
+
+   return 0;
+}
+
+static int omap_usb_resume(struct phy *x)
+{
+   u32 ret;
+   struct omap_usb *phy = dev_get_drvdata(x-dev);
+
+   if (phy-is_suspended) {
+   ret = pm_runtime_get_sync(phy-dev);
+   if (ret  0) {
+   dev_err(phy-dev, get_sync failed with err %d\n,
+   ret);
+   return ret;
+   }
+   omap_control_usb_phy_power(phy-control_dev, 1);
+   phy-is_suspended = 0;
+   }
+
+   return 0;
+}
+
+static struct phy_ops ops = {
+   .suspend= omap_usb_suspend,
+   .resume = omap_usb_resume,
+   .owner  = THIS_MODULE,
+};
+
 static int omap_usb2_probe(struct platform_device *pdev)
 {
struct omap_usb *phy;
+   struct phy  *generic_phy;
struct usb_otg  *otg;
 
phy = devm_kzalloc(pdev-dev, sizeof(*phy), GFP_KERNEL);
@@ -144,6 +184,13 @@ static int omap_usb2_probe(struct platform_device *pdev)
phy-phy.otg= otg;
phy-phy.type   = USB_PHY_TYPE_USB2;
 
+   generic_phy = devm_phy_create(phy-dev, omap-usb2, pdev-dev.of_node,
+   USB_PHY_TYPE_USB2, ops, phy);
+   if (IS_ERR(generic_phy)) {
+   dev_dbg(pdev-dev, Failed to create PHY\n);
+   return PTR_ERR(generic_phy);
+   }
+
phy-control_dev = omap_get_control_dev();
if (IS_ERR(phy-control_dev)) {
dev_dbg(pdev-dev, Failed to get control device\n);
-- 
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


Re: [PATCHv2 00/12] staging: [omap,ti-soc]-thermal: fixes and renaming

2013-03-20 Thread Dan Carpenter
These look nice.  Thanks for breaking up the move and api rename
into separate patches.

regards,
dan carpenter

--
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: [LAKML][Users getting knocked of from list]

2013-03-20 Thread Russell King - ARM Linux
On Wed, Mar 20, 2013 at 11:51:40AM +0530, Santosh Shilimkar wrote:
 Russell,
 
 In last couple of months, I have observed that users are getting knocked off
 from LAKML often. I myself faced it 2 times so far and I heard similar 
 complaint
 at least from 5 more folks.
 
 Is there a change in settings or something new which started triggering this ?

Exactly the same thing happened to me earlier this week.  I don't have
anything to do with the lists anymore, so I'm not the right person to ask.

David Woodhouse runs the servers, and Vince Sanders does the admin.
--
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: [LAKML][Users getting knocked of from list]

2013-03-20 Thread Santosh Shilimkar
Looping David

On Wednesday 20 March 2013 03:10 PM, Russell King - ARM Linux wrote:
 On Wed, Mar 20, 2013 at 11:51:40AM +0530, Santosh Shilimkar wrote:
 Russell,

 In last couple of months, I have observed that users are getting knocked off
 from LAKML often. I myself faced it 2 times so far and I heard similar 
 complaint
 at least from 5 more folks.

 Is there a change in settings or something new which started triggering this 
 ?
 
 Exactly the same thing happened to me earlier this week.  I don't have
 anything to do with the lists anymore, so I'm not the right person to ask.
 
 David Woodhouse runs the servers, and Vince Sanders does the admin.
 
Thanks Russell for the contact.

Regards,
Santosh



--
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


TI users about to be banned from all lists.infradead.org mailing lists (was Re: [LAKML][Users getting knocked of from list])

2013-03-20 Thread David Woodhouse
On Wed, 2013-03-20 at 13:59 +0530, Santosh Shilimkar wrote:
 On Wednesday 20 March 2013 12:12 PM, Sekhar Nori wrote:
  I have no clue why my address should bounce.
  
 Me neither.

TI's incoming mail appears to be broken. For days at a time, it is
simply giving a '421 Service Temporarily Unavailable' error to incoming
mail.

This is a *temporary* error, so the messages sit on the list server's
queue until they time out (5 or 7 days, IIRC) and then are finally
considered to have bounced. I currently have 38865 messages for 32
separate @ti.com recipients clogging up the mail queue.

Here are some recent failed delivery attempts:

2013-03-20 09:18:41 + 1UIF8B-00011C-7Q == santosh.shilim...@ti.com R=lookuph
ost T=verp_smtp defer (-44): SMTP error from remote mail server after RCPT TO:s
antosh.shilim...@ti.com: host cluster5a.us.messagelabs.com [216.82.251.230]: 42
1 Service Temporarily Unavailable

2013-03-20 09:33:49 + 1UDY5k-0002SY-Po == nsek...@ti.com R=lookuphost T=verp
_smtp defer (-44): SMTP error from remote mail server after RCPT TO:nsekhar@ti.
com: host cluster5a.us.messagelabs.com [216.82.251.230]: 421 Service Temporaril
y Unavailable

Please report this to your IT department (it looks like it might be a
problem at messagelabs.com rather than in-house), and be aware that I am
on the verge of just banning *all* @ti.com addresses from all lists
until it's fixed. 

I wonder if you'll even receive this message, but perhaps you'll see it
in the archives?

-- 
dwmw2



smime.p7s
Description: S/MIME cryptographic signature


Re: TI users about to be banned from all lists.infradead.org mailing lists (was Re: [LAKML][Users getting knocked of from list])

2013-03-20 Thread Santosh Shilimkar
On Wednesday 20 March 2013 04:02 PM, David Woodhouse wrote:
 On Wed, 2013-03-20 at 13:59 +0530, Santosh Shilimkar wrote:
 On Wednesday 20 March 2013 12:12 PM, Sekhar Nori wrote:
 I have no clue why my address should bounce.

 Me neither.
 
 TI's incoming mail appears to be broken. For days at a time, it is
 simply giving a '421 Service Temporarily Unavailable' error to incoming
 mail.
 
 This is a *temporary* error, so the messages sit on the list server's
 queue until they time out (5 or 7 days, IIRC) and then are finally
 considered to have bounced. I currently have 38865 messages for 32
 separate @ti.com recipients clogging up the mail queue.
 
 Here are some recent failed delivery attempts:
 
 2013-03-20 09:18:41 + 1UIF8B-00011C-7Q == santosh.shilim...@ti.com 
 R=lookuph
 ost T=verp_smtp defer (-44): SMTP error from remote mail server after RCPT 
 TO:s
 antosh.shilim...@ti.com: host cluster5a.us.messagelabs.com [216.82.251.230]: 
 42
 1 Service Temporarily Unavailable
 
 2013-03-20 09:33:49 + 1UDY5k-0002SY-Po == nsek...@ti.com R=lookuphost 
 T=verp
 _smtp defer (-44): SMTP error from remote mail server after RCPT 
 TO:nsekhar@ti.
 com: host cluster5a.us.messagelabs.com [216.82.251.230]: 421 Service 
 Temporaril
 y Unavailable
 
 Please report this to your IT department (it looks like it might be a
Will do report the issue to TI IT team. Thanks for letting know about the
problem.
 problem at messagelabs.com rather than in-house), and be aware that I am
 on the verge of just banning *all* @ti.com addresses from all lists
 until it's fixed. 
 
Please don't do that. We will try to get this sorted out and keep
you posted on the progress.

Thanks for help

Regards
Santosh


--
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 01/14] OMAPDSS: DISPC: store core clk rate

2013-03-20 Thread Archit Taneja

Hi,

On Friday 08 March 2013 05:22 PM, Tomi Valkeinen wrote:

Store dispc core clock rate so that it's available for calculations even
if the HW is disabled.


I think the core_clk_rate variable should change when we change the lcd 
clock source through dss_select_lcd_clk_source() for omap3.


If we have the following sequence:

...
dispc_mgr_set_lcd_divisor();
dss_select_lcd_clk_source();
...

The value of core_clock variable would be based on the previous clock 
source, and not the current one.


This situation doesn't occur currently as the 'apply' framework delays 
all dispc writes to the point when we enable the manager. So the 
sequence above cannot occur. But maybe we should keep this in mind when 
we move more things to omapdrm, where 'apply' isn't in use.


Archit



Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com
---
  drivers/video/omap2/dss/dispc.c |   18 +-
  1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 05ff2b9..f564955 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -97,6 +97,8 @@ static struct {

int irq;

+   unsigned long core_clk_rate;
+
u32 fifo_size[DISPC_MAX_NR_FIFOS];
/* maps which plane is using a fifo. fifo-id - plane-id */
int fifo_assignment[DISPC_MAX_NR_FIFOS];
@@ -2951,6 +2953,10 @@ static void dispc_mgr_set_lcd_divisor(enum omap_channel 
channel, u16 lck_div,

dispc_write_reg(DISPC_DIVISORo(channel),
FLD_VAL(lck_div, 23, 16) | FLD_VAL(pck_div, 7, 0));
+
+   if (dss_has_feature(FEAT_CORE_CLK_DIV) == false 
+   channel == OMAP_DSS_CHANNEL_LCD)
+   dispc.core_clk_rate = dispc_fclk_rate() / lck_div;
  }

  static void dispc_mgr_get_lcd_divisor(enum omap_channel channel, int *lck_div,
@@ -3056,15 +3062,7 @@ unsigned long dispc_mgr_pclk_rate(enum omap_channel 
channel)

  unsigned long dispc_core_clk_rate(void)
  {
-   int lcd;
-   unsigned long fclk = dispc_fclk_rate();
-
-   if (dss_has_feature(FEAT_CORE_CLK_DIV))
-   lcd = REG_GET(DISPC_DIVISOR, 23, 16);
-   else
-   lcd = REG_GET(DISPC_DIVISORo(OMAP_DSS_CHANNEL_LCD), 23, 16);
-
-   return fclk / lcd;
+   return dispc.core_clk_rate;
  }

  static unsigned long dispc_plane_pclk_rate(enum omap_plane plane)
@@ -3451,6 +3449,8 @@ static void _omap_dispc_initial_config(void)
l = FLD_MOD(l, 1, 0, 0);
l = FLD_MOD(l, 1, 23, 16);
dispc_write_reg(DISPC_DIVISOR, l);
+
+   dispc.core_clk_rate = dispc_fclk_rate();
}

/* FUNCGATED */



--
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 03/14] OMAPDSS: DSI: simplify dsi configuration

2013-03-20 Thread Archit Taneja

On Friday 08 March 2013 05:22 PM, Tomi Valkeinen wrote:

We have a bunch of dsi functions that are used to do the basic
configuration for DSI. To simplify things, and to make sure we have all
the necessary information, create a single dsi config function, which
does the basic configuration.


I had split these funcs in the manner so that they could be converted 
into generic output ops or something equivalent to what we anticipated 
CDF to represent encoders. Hence, we may have to split this into smaller 
funcs again later :p


Also, set_size and set_timings were 2 different ops for command and 
video mode panels respectively. omapdss_dsi_set_size() also came in use 
when we supported rotation in Taal. We have an equivalent func for rfbi.


Archit



Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com
---
  drivers/video/omap2/displays/panel-taal.c |   16 ---
  drivers/video/omap2/dss/dsi.c |   74 -
  include/video/omapdss.h   |   23 -
  3 files changed, 31 insertions(+), 82 deletions(-)

diff --git a/drivers/video/omap2/displays/panel-taal.c 
b/drivers/video/omap2/displays/panel-taal.c
index bc4c95e..eb86cba 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -919,6 +919,13 @@ static int taal_power_on(struct omap_dss_device *dssdev)
struct taal_data *td = dev_get_drvdata(dssdev-dev);
u8 id1, id2, id3;
int r;
+   struct omap_dss_dsi_config dsi_config = {
+   .mode = OMAP_DSS_DSI_CMD_MODE,
+   .pixel_format = OMAP_DSS_DSI_FMT_RGB888,
+   .timings = dssdev-panel.timings,
+   .hs_clk = 21600,
+   .lp_clk = 1000,
+   };

r = omapdss_dsi_configure_pins(dssdev, td-pin_config);
if (r) {
@@ -926,14 +933,9 @@ static int taal_power_on(struct omap_dss_device *dssdev)
goto err0;
};

-   omapdss_dsi_set_size(dssdev, dssdev-panel.timings.x_res,
-   dssdev-panel.timings.y_res);
-   omapdss_dsi_set_pixel_format(dssdev, OMAP_DSS_DSI_FMT_RGB888);
-   omapdss_dsi_set_operation_mode(dssdev, OMAP_DSS_DSI_CMD_MODE);
-
-   r = omapdss_dsi_set_clocks(dssdev, 21600, 1000);
+   r = omapdss_dsi_set_config(dssdev, dsi_config);
if (r) {
-   dev_err(dssdev-dev, failed to set HS and LP clocks\n);
+   dev_err(dssdev-dev, failed to configure DSI\n);
goto err0;
}

diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 5f5b475..901b721 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -4278,7 +4278,7 @@ int omapdss_dsi_configure_pins(struct omap_dss_device 
*dssdev,
  }
  EXPORT_SYMBOL(omapdss_dsi_configure_pins);

-int omapdss_dsi_set_clocks(struct omap_dss_device *dssdev,
+static int dsi_set_clocks(struct omap_dss_device *dssdev,
unsigned long ddr_clk, unsigned long lp_clk)
  {
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
@@ -4293,8 +4293,6 @@ int omapdss_dsi_set_clocks(struct omap_dss_device *dssdev,

DSSDBG(Setting DSI clocks: ddr_clk %lu, lp_clk %lu, ddr_clk, lp_clk);

-   mutex_lock(dsi-lock);
-
/* Calculate PLL output clock */
r = dsi_pll_calc_ddrfreq(dsidev, ddr_clk * 4, cinfo);
if (r)
@@ -4336,13 +4334,10 @@ int omapdss_dsi_set_clocks(struct omap_dss_device 
*dssdev,
OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI :
OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI;

-   mutex_unlock(dsi-lock);
return 0;
  err:
-   mutex_unlock(dsi-lock);
return r;
  }
-EXPORT_SYMBOL(omapdss_dsi_set_clocks);

  int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
  {
@@ -4884,75 +4879,26 @@ int omapdss_dsi_enable_te(struct omap_dss_device 
*dssdev, bool enable)
  }
  EXPORT_SYMBOL(omapdss_dsi_enable_te);

-void omapdss_dsi_set_timings(struct omap_dss_device *dssdev,
-   struct omap_video_timings *timings)
+int omapdss_dsi_set_config(struct omap_dss_device *dssdev,
+   const struct omap_dss_dsi_config *config)
  {
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);

mutex_lock(dsi-lock);

-   dsi-timings = *timings;
-
-   mutex_unlock(dsi-lock);
-}
-EXPORT_SYMBOL(omapdss_dsi_set_timings);
-
-void omapdss_dsi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h)
-{
-   struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
-   struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
-
-   mutex_lock(dsi-lock);
+   dsi-timings = *config-timings;
+   dsi-vm_timings = *config-vm_timings;
+   dsi-pix_fmt = config-pixel_format;
+   dsi-mode = config-mode;

-   dsi-timings.x_res = w;
-   dsi-timings.y_res = h;
+   dsi_set_clocks(dssdev, 

Re: [PATCH 05/14] OMAPDSS: DSI: add enum omap_dss_dsi_trans_mode

2013-03-20 Thread Archit Taneja

On Friday 08 March 2013 05:22 PM, Tomi Valkeinen wrote:

Instead of managing DSI sync ends with booleans, add an enum for the DSI
transfer mode. This is much cleaner way to handle the DSI syncs.


This sort of DSI protocol specific enums should definitely get into the 
CDF encoder drivers, maybe even in include/video/mipi_display.h for the 
time CDF is being worked upon.


Archit

--
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 01/14] OMAPDSS: DISPC: store core clk rate

2013-03-20 Thread Tomi Valkeinen
On 2013-03-20 13:08, Archit Taneja wrote:
 Hi,
 
 On Friday 08 March 2013 05:22 PM, Tomi Valkeinen wrote:
 Store dispc core clock rate so that it's available for calculations even
 if the HW is disabled.
 
 I think the core_clk_rate variable should change when we change the lcd
 clock source through dss_select_lcd_clk_source() for omap3.
 
 If we have the following sequence:
 
 ...
 dispc_mgr_set_lcd_divisor();
 dss_select_lcd_clk_source();
 ...
 
 The value of core_clock variable would be based on the previous clock
 source, and not the current one.
 
 This situation doesn't occur currently as the 'apply' framework delays
 all dispc writes to the point when we enable the manager. So the
 sequence above cannot occur. But maybe we should keep this in mind when
 we move more things to omapdrm, where 'apply' isn't in use.

Hmm. Good point.

I don't think this has to do with apply system. The clock source is set
by the output drivers, and the output drivers also calculate the
divisors, and call the functions to set the divisors. Both DPI and DSI
drivers first set the clock source, and then call the
dss_mgr_set_lcd_config() which sets the divisors (causing the recalc).

Whether using the apply or not, I think it should work correctly. But
it's clearly something that is a bit fragile.
*cough*commonclockframework*cough*.

 Tomi




signature.asc
Description: OpenPGP digital signature


Re: [PATCH 03/14] OMAPDSS: DSI: simplify dsi configuration

2013-03-20 Thread Tomi Valkeinen
On 2013-03-20 13:24, Archit Taneja wrote:
 On Friday 08 March 2013 05:22 PM, Tomi Valkeinen wrote:
 We have a bunch of dsi functions that are used to do the basic
 configuration for DSI. To simplify things, and to make sure we have all
 the necessary information, create a single dsi config function, which
 does the basic configuration.
 
 I had split these funcs in the manner so that they could be converted
 into generic output ops or something equivalent to what we anticipated
 CDF to represent encoders. Hence, we may have to split this into smaller
 funcs again later :p

Well, it was from the CDF discussions that this change arose. Everybody
wanted a simpler way than n+1 functions.

And I think it makes sense. It makes it possible to manage the
configuration as one whole, instead of small bits that may have
interdependencies. E.g the size of the output affects video mode
calculations, so one had to make the calls in certain order. Now we have
all the needed information in one piece.

We could, perhaps, have common parts between different video busses, but
I'm not sure if configuration is one of those common parts.

 Also, set_size and set_timings were 2 different ops for command and
 video mode panels respectively. omapdss_dsi_set_size() also came in use
 when we supported rotation in Taal. We have an equivalent func for rfbi.

Yep. I felt it's a bit confusing, so I just combined them. Even for
command mode some timing information is good (well, pixel clock), to
calculate proper DSI bus speed.

I think this also works in case of panel rotation. From DSS's point of
view (and that's what we're talking about when setting the timings)
there's no rotation. It's the panel's internal thing.

 Tomi




signature.asc
Description: OpenPGP digital signature


Re: [PATCH] drivers: video: omap2: dss: Use PTR_RET function

2013-03-20 Thread Tomi Valkeinen
On 2013-03-19 10:03, Alexandru Gheorghiu wrote:
 Use PTR_RET function instead of IS_ERR and PTR_ERR.
 Patch found using coccinelle.
 
 Signed-off-by: Alexandru Gheorghiu gheorghiuan...@gmail.com
 ---
  drivers/video/omap2/dss/core.c |5 +
  1 file changed, 1 insertion(+), 4 deletions(-)
 
 diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
 index f8779d4..60cc6fe 100644
 --- a/drivers/video/omap2/dss/core.c
 +++ b/drivers/video/omap2/dss/core.c
 @@ -181,10 +181,7 @@ int dss_debugfs_create_file(const char *name, void 
 (*write)(struct seq_file *))
   d = debugfs_create_file(name, S_IRUGO, dss_debugfs_dir,
   write, dss_debug_fops);
  
 - if (IS_ERR(d))
 - return PTR_ERR(d);
 -
 - return 0;
 + return PTR_RET(d);
  }
  #else /* CONFIG_OMAP2_DSS_DEBUGFS */
  static inline int dss_initialize_debugfs(void)
 

Thanks. I'll apply to omapdss tree.

 Tomi




signature.asc
Description: OpenPGP digital signature


Re: [PATCHv2 09/12] staging: ti-soc-thermal: fix several kernel-doc warnings and error

2013-03-20 Thread Eduardo Valentin


Hello Nishanth,

On 19-03-2013 15:22, Nishanth Menon wrote:

On 10:54-20130319, Eduardo Valentin wrote:


cut


   * @adc_start_val: ADC conversion table starting value

You may still want to fix warnings generated by:
./scripts/kernel-doc -v drivers/staging/ti-soc-thermal/ti-bandgap.c/dev/null
For example - the following changes are required for proper error return
documentation (following diff is just an hint):


Although I think the above is a good thing to be done, I don't think it 
is considered mandatory, and for this reason, I don't believe the above 
should block this patch. Basically because, after this patch, at least 
kernel-doc runs successfully.


Besides, there is very few evidence that ppl out there care much about 
-v. A quick grep+awk would inform you this. If you consider the 
population of C files (around 35.4K files) inside the tree (simple find 
* | grep .*\\.[c,h]$ in your tree), only around 12.0% has structured 
comments. Out of the files that have structured comments, only about 
11.0% has 0 warnings (including 0 warnings with -v), that's something 
like ~500 files. A considerable amount don't care about -v (34% out of 
the files with structured comments). Actually most of them don't care 
about warnings (89% out of the files with structured comments) at all. :-)


That said, I am going to send a separate patch to fix the -v later on. 
Including your chunks below.


Thanks for reviewing.



diff --git a/drivers/staging/ti-soc-thermal/ti-bandgap.c 
b/drivers/staging/ti-soc-thermal/ti-bandgap.c
index d479e50..0adae05 100644
--- a/drivers/staging/ti-soc-thermal/ti-bandgap.c
+++ b/drivers/staging/ti-soc-thermal/ti-bandgap.c
@@ -50,7 +50,7 @@
   * @reg: desired register (offset) to be read
   *
   * Helper function to read bandgap registers. It uses the io remapped area.
- * Returns the register value.
+ * Return: the register value.
   */
  static u32 ti_bandgap_readl(struct ti_bandgap *bgp, u32 reg)
  {
@@ -97,6 +97,8 @@ do {  
\
   *
   * Used to power on/off a bandgap device instance. Only used on those
   * that features tempsoff bit.
+ *
+ * Return: 0
   */
  static int ti_bandgap_power(struct ti_bandgap *bgp, bool on)
  {
@@ -122,6 +124,8 @@ exit:
   * This function is desired because, depending on bandgap device version,
   * it might be needed to freeze the bandgap state machine, before fetching
   * the register value.
+ *
+ * Return: temperature in ...
   */
  static u32 ti_bandgap_read_temp(struct ti_bandgap *bgp, int id)
  {
@@ -162,6 +166,8 @@ static u32 ti_bandgap_read_temp(struct ti_bandgap *bgp, int 
id)
   * conditions and acts accordingly. In case there are events pending,
   * it will reset the event mask to wait for the opposite event (next event).
   * Every time there is a new event, it will be reported to thermal layer.
+ *
+ * Return: IRQ_HANDLED
   */
  static irqreturn_t ti_bandgap_talert_irq_handler(int irq, void *data)
  {
@@ -222,6 +228,8 @@ static irqreturn_t ti_bandgap_talert_irq_handler(int irq, 
void *data)
   * This is the Tshut handler. Use it only if bandgap device features
   * HAS(TSHUT). If any sensor fires the Tshut signal, we simply shutdown
   * the system.
+ *
+ * Return: IRQ_HANDLED
   */
  static irqreturn_t ti_bandgap_tshut_irq_handler(int irq, void *data)
  {
@@ -244,6 +252,8 @@ static irqreturn_t ti_bandgap_tshut_irq_handler(int irq, 
void *data)
   * Simple conversion from ADC representation to mCelsius. In case the ADC 
value
   * is out of the ADC conv table range, it returns -ERANGE, 0 on success.
   * The conversion table is indexed by the ADC values.
+ *
+ * Return: 0 if converstion was successful, else -ERANGE if out of range
   */
  static
  int ti_bandgap_adc_to_mcelsius(struct ti_bandgap *bgp, int adc_val, int *t)
@@ -272,6 +282,8 @@ exit:
   * Simple conversion from mCelsius to ADC values. In case the temp value
   * is out of the ADC conv table range, it returns -ERANGE, 0 on success.
   * The conversion table is indexed by the ADC values.
+ *
+ * Return: 0 if converstion was successful, else -ERANGE if out of range
   */
  static
  int ti_bandgap_mcelsius_to_adc(struct ti_bandgap *bgp, long temp, int *adc)
@@ -311,7 +323,8 @@ exit:
   * @sum: address where to write the resulting temperature (in ADC scale)
   *
   * Adds an hysteresis value (in mCelsius) to a ADC temperature value.
- * Returns 0 on success, -ERANGE otherwise.
+ *
+ * Return: 0 on success, -ERANGE otherwise.
   */
  static
  int ti_bandgap_add_hyst(struct ti_bandgap *bgp, int adc_val, int hyst_val,
@@ -384,6 +397,8 @@ static void ti_bandgap_unmask_interrupts(struct ti_bandgap 
*bgp, int id,
   * It checks the resulting t_hot and t_cold values, based on the new passed 
@val
   * and configures the thresholds so that t_hot is always greater than t_cold.
   * Call this function only if bandgap features HAS(TALERT).
+ *
+ * Return: 0 if no error, else corresponding error
   */
  static int 

Re: [PATCH/Resend 2/2] arm: mach-omap2: prevent UART console idle on suspend while using no_console_suspend

2013-03-20 Thread Sourav Poddar

Realised the list  to whom the patch was send got dropped. Ccing them all..
On Wednesday 20 March 2013 05:18 PM, Sourav Poddar wrote:

Hi Kevin,
On Tuesday 19 March 2013 12:24 AM, Kevin Hilman wrote:

Sourav Poddarsourav.pod...@ti.com  writes:

With dt boot, uart wakeup after suspend is non functional on omap4/5 
while using
no_console_suspend in the bootargs. With no_console_suspend 
used, od-flags
should be ORed with OMAP_DEVICE_NO_IDLE_ON_SUSPEND, thereby not 
allowing the console
to idle in the suspend path. For non-dt case, this was taken care by 
platform data.


Tested on omap5430evm, omap4430sdp.

Cc: Santosh Shilimkarsantosh.shilim...@ti.com
Cc: Felipe Balbiba...@ti.com
Cc: Rajendra nayakrna...@ti.com
Signed-off-by: Sourav Poddarsourav.pod...@ti.com

This patch creates a dependency between omap_device (generic,
device-independent code) and a specific driver (UART.)

If you need to do something like this that's DT boot specific, then
we probably need some late initcall in serial.c to handle this.  It does
not belong in omap_device.

The following function omap_device_disable_idle_on_suspend(pdev) 
should only
be called once the omap device has been build, which in the case of 
device tree is
done in omap_device.c file. Moreover, the above call should be 
executed conditionally

and should depend on the following two parameter.

[1]  a. Whether no_console_suspend is set and
 b.  the device build is a console uart.

When I look closely into the serial.c file, I realised that
core_initcall(omap_serial_early_init) gets called irrespective
of dt/non dt boot and will take care of most of the stuff(checking 
whether
no_console_suspend is used and which uart is used as a console uart) 
which the

$subject patch is proposing.

But the problem is that we need to exchange the parsed information
from serial.c to the omap_device file for the condtional execution of
omap_device_disable_idle_on_suspend

In this case,
from serial.c we need
1. no_console_suspend = true
2. strcpy(console_name, oh_name), where oh_name corresponds to the 
console uart.


then in omap_device.c do
if (no_console_suspend  !strcmp(oh-name, console_name))
omap_device_disable_idle_on_suspend(pdev);

Please correct if I am understanding it incorrectly.

If the above understanding looks good to you, is there a way we can 
make this

exchange of information happen between serial.c and omap_device.c file?

Kevin


---
  arch/arm/mach-omap2/omap_device.c |   34 
+-

  1 files changed, 33 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_device.c 
b/arch/arm/mach-omap2/omap_device.c

index 381be7a..71f5a73 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -35,11 +35,17 @@
  #includelinux/pm_runtime.h
  #includelinux/of.h
  #includelinux/notifier.h
+#includelinux/platform_data/serial-omap.h

  #include soc.h
  #include omap_device.h
  #include omap_hwmod.h

+#define MAX_UART_HWMOD_NAME_LEN 16
+
+static u8 no_console_suspend;
+static u8 console_uart_num;
+
  /* Private functions */

  static void _add_clkdev(struct omap_device *od, const char 
*clk_alias,
@@ -108,6 +114,12 @@ static void _add_hwmod_clocks_clkdev(struct 
omap_device *od,

  _add_clkdev(od, oh-opt_clks[i].role, oh-opt_clks[i].clk);
  }

+static char *cmdline_find_option(char *str)
+{
+extern char *saved_command_line;
+
+return strstr(saved_command_line, str);
+}

  /**
   * omap_device_build_from_dt - build an omap_device with multiple 
hwmods
@@ -129,6 +141,7 @@ static int omap_device_build_from_dt(struct 
platform_device *pdev)

  struct device_node *node = pdev-dev.of_node;
  const char *oh_name;
  int oh_cnt, i, ret = 0;
+static u8 console_uart_id;

  oh_cnt = of_property_count_strings(node, ti,hwmods);
  if (!oh_cnt || IS_ERR_VALUE(oh_cnt)) {
@@ -170,7 +183,12 @@ static int omap_device_build_from_dt(struct 
platform_device *pdev)

  r-name = dev_name(pdev-dev);
  }

-if (of_get_property(node, ti,no_idle_on_suspend, NULL))
+if (no_console_suspend  !strncmp(oh-name, uart, 4)) {
+if (console_uart_num == console_uart_id)
+omap_device_disable_idle_on_suspend(pdev);
+else
+console_uart_id++;
+} else if (of_get_property(node, ti,no_idle_on_suspend, NULL))
  omap_device_disable_idle_on_suspend(pdev);

  pdev-dev.pm_domain =omap_device_pm_domain;
@@ -838,7 +856,21 @@ static struct notifier_block platform_nb = {

  static int __init omap_device_init(void)
  {
+int i;
+char uart_name[MAX_UART_HWMOD_NAME_LEN];
+
  bus_register_notifier(platform_bus_type,platform_nb);
+
+if (cmdline_find_option(no_console_suspend)) {
+no_console_suspend = true;
+for (i = 0; i  OMAP_MAX_HSUART_PORTS; i++) {
+snprintf(uart_name, MAX_UART_HWMOD_NAME_LEN,
+%s%d, OMAP_SERIAL_NAME, i);
+if 

GPIO - Fix checkpatch errors

2013-03-20 Thread Laurent Navet
This series fix almost all checkpatch errors in drivers/gpio/

 drivers/gpio/gpio-mvebu.c  |   26 +-
 drivers/gpio/gpio-omap.c   |2 +-
 drivers/gpio/gpio-pca953x.c|3 +--
 drivers/gpio/gpio-pxa.c|4 ++--
 drivers/gpio/gpio-sch.c|   74 
+++---
 drivers/gpio/gpio-stp-xway.c   |2 +-
 drivers/gpio/gpio-tc3589x.c|8 
 drivers/gpio/gpio-timberdale.c |3 +--
 drivers/gpio/gpio-tps65910.c   |2 +-
 drivers/gpio/gpiolib-of.c  |2 +-
 10 files changed, 60 insertions(+), 66 deletions(-)

Regards,
Laurent Navet.

--
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 04/10] gpio: gpio-pca953x.c: fix checkpatch error

2013-03-20 Thread Laurent Navet
Fix :
 gpio/gpio-pca953x.c:150: ERROR: else should follow close brace '}'

Signed-off-by: Laurent Navet laurent.na...@gmail.com
---
 drivers/gpio/gpio-pca953x.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 2405946..15dbc36 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -146,8 +146,7 @@ static int pca953x_write_regs(struct pca953x_chip *chip, 
int reg, u8 *val)
ret = i2c_smbus_write_i2c_block_data(chip-client,
(reg  bank_shift) | REG_ADDR_AI,
NBANK(chip), val);
-   }
-   else {
+   } else {
switch (chip-chip_type) {
case PCA953X_TYPE:
ret = i2c_smbus_write_word_data(chip-client,
-- 
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 06/10] gpio: gpio-sch.c: fix checkpatch error

2013-03-20 Thread Laurent Navet
Fix :
 gpio/gpio-sch.c:206: ERROR: switch and case should be at the same indent

Also remove blank lines

Signed-off-by: Laurent Navet laurent.na...@gmail.com
---
 drivers/gpio/gpio-sch.c |   74 ++-
 1 file changed, 35 insertions(+), 39 deletions(-)

diff --git a/drivers/gpio/gpio-sch.c b/drivers/gpio/gpio-sch.c
index edae963..cb60081 100644
--- a/drivers/gpio/gpio-sch.c
+++ b/drivers/gpio/gpio-sch.c
@@ -204,45 +204,41 @@ static int sch_gpio_probe(struct platform_device *pdev)
gpio_ba = res-start;
 
switch (id) {
-   case PCI_DEVICE_ID_INTEL_SCH_LPC:
-   sch_gpio_core.base = 0;
-   sch_gpio_core.ngpio = 10;
-
-   sch_gpio_resume.base = 10;
-   sch_gpio_resume.ngpio = 4;
-
-   /*
-* GPIO[6:0] enabled by default
-* GPIO7 is configured by the CMC as SLPIOVR
-* Enable GPIO[9:8] core powered gpios explicitly
-*/
-   outb(0x3, gpio_ba + CGEN + 1);
-   /*
-* SUS_GPIO[2:0] enabled by default
-* Enable SUS_GPIO3 resume powered gpio explicitly
-*/
-   outb(0x8, gpio_ba + RGEN);
-   break;
-
-   case PCI_DEVICE_ID_INTEL_ITC_LPC:
-   sch_gpio_core.base = 0;
-   sch_gpio_core.ngpio = 5;
-
-   sch_gpio_resume.base = 5;
-   sch_gpio_resume.ngpio = 9;
-   break;
-
-   case PCI_DEVICE_ID_INTEL_CENTERTON_ILB:
-   sch_gpio_core.base = 0;
-   sch_gpio_core.ngpio = 21;
-
-   sch_gpio_resume.base = 21;
-   sch_gpio_resume.ngpio = 9;
-   break;
-
-   default:
-   err = -ENODEV;
-   goto err_sch_gpio_core;
+   case PCI_DEVICE_ID_INTEL_SCH_LPC:
+   sch_gpio_core.base = 0;
+   sch_gpio_core.ngpio = 10;
+   sch_gpio_resume.base = 10;
+   sch_gpio_resume.ngpio = 4;
+   /*
+* GPIO[6:0] enabled by default
+* GPIO7 is configured by the CMC as SLPIOVR
+* Enable GPIO[9:8] core powered gpios explicitly
+*/
+   outb(0x3, gpio_ba + CGEN + 1);
+   /*
+* SUS_GPIO[2:0] enabled by default
+* Enable SUS_GPIO3 resume powered gpio explicitly
+*/
+   outb(0x8, gpio_ba + RGEN);
+   break;
+
+   case PCI_DEVICE_ID_INTEL_ITC_LPC:
+   sch_gpio_core.base = 0;
+   sch_gpio_core.ngpio = 5;
+   sch_gpio_resume.base = 5;
+   sch_gpio_resume.ngpio = 9;
+   break;
+
+   case PCI_DEVICE_ID_INTEL_CENTERTON_ILB:
+   sch_gpio_core.base = 0;
+   sch_gpio_core.ngpio = 21;
+   sch_gpio_resume.base = 21;
+   sch_gpio_resume.ngpio = 9;
+   break;
+
+   default:
+   err = -ENODEV;
+   goto err_sch_gpio_core;
}
 
sch_gpio_core.dev = pdev-dev;
-- 
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 08/10] gpio: gpio-tc3589x.c: fix checkpatch errors

2013-03-20 Thread Laurent Navet
Fix :
 gpio/gpio-tc3589x.c:285: ERROR: code indent should use tabs where possible
 gpio/gpio-tc3589x.c:286: ERROR: code indent should use tabs where possible
 gpio/gpio-tc3589x.c:287: ERROR: code indent should use tabs where possible
 gpio/gpio-tc3589x.c:347: ERROR: code indent should use tabs where possible

Signed-off-by: Laurent Navet laurent.na...@gmail.com
---
 drivers/gpio/gpio-tc3589x.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-tc3589x.c b/drivers/gpio/gpio-tc3589x.c
index c0595bb..d34d80d 100644
--- a/drivers/gpio/gpio-tc3589x.c
+++ b/drivers/gpio/gpio-tc3589x.c
@@ -282,9 +282,9 @@ static void tc3589x_gpio_irq_unmap(struct irq_domain *d, 
unsigned int virq)
 }
 
 static struct irq_domain_ops tc3589x_irq_ops = {
-.map= tc3589x_gpio_irq_map,
-.unmap  = tc3589x_gpio_irq_unmap,
-.xlate  = irq_domain_xlate_twocell,
+   .map= tc3589x_gpio_irq_map,
+   .unmap  = tc3589x_gpio_irq_unmap,
+   .xlate  = irq_domain_xlate_twocell,
 };
 
 static int tc3589x_gpio_irq_init(struct tc3589x_gpio *tc3589x_gpio,
@@ -344,7 +344,7 @@ static int tc3589x_gpio_probe(struct platform_device *pdev)
tc3589x_gpio-chip.base = (pdata) ? pdata-gpio_base : -1;
 
 #ifdef CONFIG_OF_GPIO
-tc3589x_gpio-chip.of_node = np;
+   tc3589x_gpio-chip.of_node = np;
 #endif
 
tc3589x_gpio-irq_base = tc3589x-irq_base ?
-- 
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 10/10] gpio: gpio-tps65910.c: fix checkpatch error

2013-03-20 Thread Laurent Navet
Fix :
 gpio/gpio-tps65910.c:136: ERROR: space required before the open parenthesis '('

Signed-off-by: Laurent Navet laurent.na...@gmail.com
---
 drivers/gpio/gpio-tps65910.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-tps65910.c b/drivers/gpio/gpio-tps65910.c
index 5083825..0614621 100644
--- a/drivers/gpio/gpio-tps65910.c
+++ b/drivers/gpio/gpio-tps65910.c
@@ -133,7 +133,7 @@ static int tps65910_gpio_probe(struct platform_device *pdev)
tps65910_gpio-gpio_chip.owner = THIS_MODULE;
tps65910_gpio-gpio_chip.label = tps65910-i2c_client-name;
 
-   switch(tps65910_chip_id(tps65910)) {
+   switch (tps65910_chip_id(tps65910)) {
case TPS65910:
tps65910_gpio-gpio_chip.ngpio = TPS65910_NUM_GPIO;
break;
-- 
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 09/10] gpio: gpio-timberdale.c: fix checkpatch error

2013-03-20 Thread Laurent Navet
Fix :
 gpio/gpio-timberdale.c:171: ERROR: else should follow close brace '}'

Signed-off-by: Laurent Navet laurent.na...@gmail.com
---
 drivers/gpio/gpio-timberdale.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c
index 702cca9..4377405 100644
--- a/drivers/gpio/gpio-timberdale.c
+++ b/drivers/gpio/gpio-timberdale.c
@@ -167,8 +167,7 @@ static int timbgpio_irq_type(struct irq_data *d, unsigned 
trigger)
if (ver  3) {
ret = -EINVAL;
goto out;
-   }
-   else {
+   } else {
flr |= 1  offset;
bflr |= 1  offset;
}
-- 
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 07/10] gpio: gpio-stp-xway.c: fix checkpatch error

2013-03-20 Thread Laurent Navet
Fix :
 gpio/gpio-stp-xway.c:220: ERROR: trailing whitespace

Signed-off-by: Laurent Navet laurent.na...@gmail.com
---
 drivers/gpio/gpio-stp-xway.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-stp-xway.c b/drivers/gpio/gpio-stp-xway.c
index c20e051..04882a9 100644
--- a/drivers/gpio/gpio-stp-xway.c
+++ b/drivers/gpio/gpio-stp-xway.c
@@ -217,7 +217,7 @@ static int xway_stp_probe(struct platform_device *pdev)
chip-virt = devm_ioremap_resource(pdev-dev, res);
if (IS_ERR(chip-virt))
return PTR_ERR(chip-virt);
-   
+
chip-gc.dev = pdev-dev;
chip-gc.label = stp-xway;
chip-gc.direction_output = xway_stp_dir_out;
-- 
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 05/10] gpio: gpio-pxa.c: fix checkpatch errors

2013-03-20 Thread Laurent Navet
Fix :
 gpio/gpio-pxa.c:605: ERROR: space required after that ',' (ctx:VxV)
 gpio/gpio-pxa.c:672: ERROR: space prohibited after that open parenthesis '('

Signed-off-by: Laurent Navet laurent.na...@gmail.com
---
 drivers/gpio/gpio-pxa.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index 9cc108d..6d01914 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -602,7 +602,7 @@ static int pxa_gpio_probe(struct platform_device *pdev)
for_each_gpio_chip(gpio, c) {
writel_relaxed(0, c-regbase + GFER_OFFSET);
writel_relaxed(0, c-regbase + GRER_OFFSET);
-   writel_relaxed(~0,c-regbase + GEDR_OFFSET);
+   writel_relaxed(~0, c-regbase + GEDR_OFFSET);
/* unmask GPIO edge detect for AP side */
if (gpio_is_mmp_type(gpio_type))
writel_relaxed(~0, c-regbase + ED_MASK_OFFSET);
@@ -669,7 +669,7 @@ static void pxa_gpio_resume(void)
 
for_each_gpio_chip(gpio, c) {
/* restore level with set/clear */
-   writel_relaxed( c-saved_gplr, c-regbase + GPSR_OFFSET);
+   writel_relaxed(c-saved_gplr, c-regbase + GPSR_OFFSET);
writel_relaxed(~c-saved_gplr, c-regbase + GPCR_OFFSET);
 
writel_relaxed(c-saved_grer, c-regbase + GRER_OFFSET);
-- 
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 01/10] gpio: gpiolib-of.c: fix checkpatch error

2013-03-20 Thread Laurent Navet
Fix :
 gpio/gpiolib-of.c:64: ERROR: code indent should use tabs where possible

Signed-off-by: Laurent Navet laurent.na...@gmail.com
---
 drivers/gpio/gpiolib-of.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index a71a54a..8940793 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -61,7 +61,7 @@ static int of_gpiochip_find_and_xlate(struct gpio_chip *gc, 
void *data)
  * in flags for the GPIO.
  */
 int of_get_named_gpio_flags(struct device_node *np, const char *propname,
-   int index, enum of_gpio_flags *flags)
+  int index, enum of_gpio_flags *flags)
 {
/* Return -EPROBE_DEFER to support probe() functions to be called
 * later when the GPIO actually becomes available
-- 
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 02/10] gpio: gpio-mvebu.c: fix checkpatch errors

2013-03-20 Thread Laurent Navet
Fix :
 gpio/gpio-mvebu.c:120: ERROR: space required before the open parenthesis '('
 gpio/gpio-mvebu.c:136: ERROR: space required before the open parenthesis '('
 gpio/gpio-mvebu.c:154: ERROR: space required before the open parenthesis '('
 gpio/gpio-mvebu.c:404: ERROR: space required before the open parenthesis '('
 gpio/gpio-mvebu.c:476: ERROR: (foo*) should be (foo *)
 gpio/gpio-mvebu.c:480: ERROR: (foo*) should be (foo *)
 gpio/gpio-mvebu.c:484: ERROR: (foo*) should be (foo *)
 gpio/gpio-mvebu.c:512: ERROR: space prohibited after that '!' (ctx:BxW)
 gpio/gpio-mvebu.c:518: ERROR: space prohibited after that '!' (ctx:BxW)
 gpio/gpio-mvebu.c:518: ERROR: space required before the open brace '{'
 gpio/gpio-mvebu.c:563: ERROR: space prohibited after that '!' (ctx:BxW)
 gpio/gpio-mvebu.c:570: ERROR: trailing whitespace
 gpio/gpio-mvebu.c:577: ERROR: space required before the open parenthesis '('
 gpio/gpio-mvebu.c:635: ERROR: space prohibited after that '!' (ctx:BxW)

Signed-off-by: Laurent Navet laurent.na...@gmail.com
---
 drivers/gpio/gpio-mvebu.c |   26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 61a6fde..ca6d4ac 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -117,7 +117,7 @@ static inline void __iomem *mvebu_gpioreg_edge_cause(struct 
mvebu_gpio_chip *mvc
 {
int cpu;
 
-   switch(mvchip-soc_variant) {
+   switch (mvchip-soc_variant) {
case MVEBU_GPIO_SOC_VARIANT_ORION:
case MVEBU_GPIO_SOC_VARIANT_MV78200:
return mvchip-membase + GPIO_EDGE_CAUSE_OFF;
@@ -133,7 +133,7 @@ static inline void __iomem *mvebu_gpioreg_edge_mask(struct 
mvebu_gpio_chip *mvch
 {
int cpu;
 
-   switch(mvchip-soc_variant) {
+   switch (mvchip-soc_variant) {
case MVEBU_GPIO_SOC_VARIANT_ORION:
return mvchip-membase + GPIO_EDGE_MASK_OFF;
case MVEBU_GPIO_SOC_VARIANT_MV78200:
@@ -151,7 +151,7 @@ static void __iomem *mvebu_gpioreg_level_mask(struct 
mvebu_gpio_chip *mvchip)
 {
int cpu;
 
-   switch(mvchip-soc_variant) {
+   switch (mvchip-soc_variant) {
case MVEBU_GPIO_SOC_VARIANT_ORION:
return mvchip-membase + GPIO_LEVEL_MASK_OFF;
case MVEBU_GPIO_SOC_VARIANT_MV78200:
@@ -401,7 +401,7 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, 
unsigned int type)
/*
 * Configure interrupt polarity.
 */
-   switch(type) {
+   switch (type) {
case IRQ_TYPE_EDGE_RISING:
case IRQ_TYPE_LEVEL_HIGH:
u = readl_relaxed(mvebu_gpioreg_in_pol(mvchip));
@@ -473,15 +473,15 @@ static void mvebu_gpio_irq_handler(unsigned int irq, 
struct irq_desc *desc)
 static struct of_device_id mvebu_gpio_of_match[] = {
{
.compatible = marvell,orion-gpio,
-   .data   = (void*) MVEBU_GPIO_SOC_VARIANT_ORION,
+   .data   = (void *) MVEBU_GPIO_SOC_VARIANT_ORION,
},
{
.compatible = marvell,mv78200-gpio,
-   .data   = (void*) MVEBU_GPIO_SOC_VARIANT_MV78200,
+   .data   = (void *) MVEBU_GPIO_SOC_VARIANT_MV78200,
},
{
.compatible = marvell,armadaxp-gpio,
-   .data   = (void*) MVEBU_GPIO_SOC_VARIANT_ARMADAXP,
+   .data   = (void *) MVEBU_GPIO_SOC_VARIANT_ARMADAXP,
},
{
/* sentinel */
@@ -509,13 +509,13 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
soc_variant = MVEBU_GPIO_SOC_VARIANT_ORION;
 
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   if (! res) {
+   if (!res) {
dev_err(pdev-dev, Cannot get memory resource\n);
return -ENODEV;
}
 
mvchip = devm_kzalloc(pdev-dev, sizeof(struct mvebu_gpio_chip), 
GFP_KERNEL);
-   if (! mvchip){
+   if (!mvchip) {
dev_err(pdev-dev, Cannot allocate memory\n);
return -ENOMEM;
}
@@ -560,21 +560,21 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
 * per-CPU registers */
if (soc_variant == MVEBU_GPIO_SOC_VARIANT_ARMADAXP) {
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-   if (! res) {
+   if (!res) {
dev_err(pdev-dev, Cannot get memory resource\n);
return -ENODEV;
}
 
mvchip-percpu_membase = devm_ioremap_resource(pdev-dev,
   res);
-   if (IS_ERR(mvchip-percpu_membase)) 
+   if (IS_ERR(mvchip-percpu_membase))
return PTR_ERR(mvchip-percpu_membase);
}
 
/*
 * Mask and clear GPIO interrupts.
 */
-   switch(soc_variant) {
+   switch (soc_variant) {
  

[PATCH 03/10] gpio: gpio-omap.c: fix checkpatch error

2013-03-20 Thread Laurent Navet
Fix :
 gpio/gpio-omap.c:697: ERROR: space required before the open parenthesis '('

Signed-off-by: Laurent Navet laurent.na...@gmail.com
---
 drivers/gpio/gpio-omap.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 159f5c5..7e8f791 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -694,7 +694,7 @@ static void gpio_irq_handler(unsigned int irq, struct 
irq_desc *desc)
if (WARN_ON(!isr_reg))
goto exit;
 
-   while(1) {
+   while (1) {
u32 isr_saved, level_mask = 0;
u32 enabled;
 
-- 
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


Re: [PATCH 03/10] gpio: gpio-omap.c: fix checkpatch error

2013-03-20 Thread Santosh Shilimkar
On Wednesday 20 March 2013 05:45 PM, Laurent Navet wrote:
 Fix :
  gpio/gpio-omap.c:697: ERROR: space required before the open parenthesis '('
 
 Signed-off-by: Laurent Navet laurent.na...@gmail.com
 ---
Acked-by: Santosh Shilimkar santosh.shilim...@ti.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 03/10] gpio: gpio-omap.c: fix checkpatch error

2013-03-20 Thread Santosh Shilimkar
On Wednesday 20 March 2013 05:54 PM, Santosh Shilimkar wrote:
 On Wednesday 20 March 2013 05:45 PM, Laurent Navet wrote:
 Fix :
  gpio/gpio-omap.c:697: ERROR: space required before the open parenthesis '('

 Signed-off-by: Laurent Navet laurent.na...@gmail.com
 ---
 Acked-by: Santosh Shilimkar santosh.shilim...@ti.com
 
Minor suggestion.
You might want to use $subject like coding style fixes.
No strong opinion though.

--
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: Beagleboard xM - Bogomips are very low

2013-03-20 Thread Frank Agius

On 3/19/2013 11:17 AM, Guillaume Gardet wrote:

Hi,

On a Beagleboard xM rev. B, I noticed that vanilla kernel 3.4.6 have the
folowing bogomips for 300MHz and 800 MHz operations: 262.08 and 700.57.

With kernel 3.7.10, I have : 175.65 and 467.41 bogompis.

Any idea why bogomips are so low now?



I believe this is the reason for the BogoMIPS change:

http://www.spinics.net/lists/arm-kernel/msg221672.html

It looks like BogoMIPS reporting changed because of the delay routine 
patch introduced in 3.6.  So the change in BogoMIPS is real, but should 
not be a concern.


frank agius


Guillaume

--
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




--
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: [PATCHv2 09/12] staging: ti-soc-thermal: fix several kernel-doc warnings and error

2013-03-20 Thread Nishanth Menon
On Wed, Mar 20, 2013 at 6:56 AM, Eduardo Valentin
eduardo.valen...@ti.com wrote:
 On 19-03-2013 15:22, Nishanth Menon wrote:

 On 10:54-20130319, Eduardo Valentin wrote:
[..]
 You may still want to fix warnings generated by:
 ./scripts/kernel-doc -v
 drivers/staging/ti-soc-thermal/ti-bandgap.c/dev/null
 For example - the following changes are required for proper error return
 documentation (following diff is just an hint):


 Although I think the above is a good thing to be done, I don't think it is
 considered mandatory, and for this reason, I don't believe the above should
 block this patch. Basically because, after this patch, at least kernel-doc
 runs successfully.

 Besides, there is very few evidence that ppl out there care much about -v.
 A quick grep+awk would inform you this. If you consider the population of C
 files (around 35.4K files) inside the tree (simple find * | grep .*\\.[c,h]$
 in your tree), only around 12.0% has structured comments. Out of the files
 that have structured comments, only about 11.0% has 0 warnings (including 0
 warnings with -v), that's something like ~500 files. A considerable amount
 don't care about -v (34% out of the files with structured comments).
 Actually most of them don't care about warnings (89% out of the files with
 structured comments) at all. :-)

Yep, commit 4092bac7


 That said, I am going to send a separate patch to fix the -v later on.
 Including your chunks below.

Thanks.
Regards,
Nishanth Menon
--
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: [PATCHv2 0/7] usb: phy: twl4030-usb fixes

2013-03-20 Thread Felipe Balbi
On Sun, Mar 17, 2013 at 08:23:20PM +0200, Grazvydas Ignotas wrote:
 I have a pandora board which has similar musb setup to beagleboard
 (OMAP3530 + TWL4030) and musb never worked well on it for me in mainline.
 Well it usually works if you plug the cable once, but as soon as you start
 replugging cables and mixing host adapter into the game it totally breaks
 and reboot is then needed. Host mode is especially broken, any replugs
 after musb has been in host mode result in dead port that needs reboot
 to recover.
 
 With this series I can switch host/peripheral cables any way I like and
 even suspend works with cable plugged with musb in peripheral mode!
 (ARM: OMAP3: hwmod data: keep MIDLEMODE in force-standby for musb is
 needed that was sent separately). This also fixes power drain when cable
 is plugged an no gadget driver is loaded.
 
 Changed since v1:
 - rebased on Felipe's testing branch
 - added locking for patch 4 to take care of possible races
   between work item and IRQ
 - changed patch 6 to only disable VBUS if not runtime suspended,
   otherwise we get data abort on OMAP3
 
 Grazvydas Ignotas (7):
   usb: phy: twl4030-usb: don't enable PHY during init
   usb: phy: twl4030-usb: ignore duplicate events
   usb: phy: twl4030-usb: don't switch the phy on/off needlessly
   usb: phy: twl4030-usb: poll for ID disconnect
   usb: phy: twl4030-usb: check if vbus is driven by twl itself
   usb: musb: omap2430: turn off vbus on cable disconnect
   usb: musb: gadget: use platform callback to enable vbus

since this falls into has never worked before I will apply them for
v3.10. If you have any objections, let me know.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCHv2 5/7] usb: phy: twl4030-usb: check if vbus is driven by twl itself

2013-03-20 Thread Felipe Balbi
On Sun, Mar 17, 2013 at 08:23:25PM +0200, Grazvydas Ignotas wrote:
 At least on pandora, STS_VBUS gets set even when VBUS is driven by twl
 itself. Reporting VBUS in this case confuses OMAP musb glue and charger
 driver, so check if OTG VBUS charge pump is on before reporting VBUS
 event to avoid this problem.
 
 Signed-off-by: Grazvydas Ignotas nota...@gmail.com
 ---
  drivers/usb/phy/phy-twl4030-usb.c |   36 +++-
  1 file changed, 31 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/usb/phy/phy-twl4030-usb.c 
 b/drivers/usb/phy/phy-twl4030-usb.c
 index 425c18a..87bf11d 100644
 --- a/drivers/usb/phy/phy-twl4030-usb.c
 +++ b/drivers/usb/phy/phy-twl4030-usb.c
 @@ -248,11 +248,31 @@ twl4030_usb_clear_bits(struct twl4030_usb *twl, u8 reg, 
 u8 bits)
  
  /*-*/
  
 +static bool twl4030_is_driving_vbus(struct twl4030_usb *twl)
 +{
 + int ret;
 +
 + ret = twl4030_usb_read(twl, PHY_CLK_CTRL_STS);
 + if (ret  0 || !(ret  PHY_DPLL_CLK))
 + /*
 +  * if clocks are off, registers are not updated,
 +  * but we can assume we don't drive VBUS in this case
 +  */
 + return false;
 +
 + ret = twl4030_usb_read(twl, ULPI_OTG_CTRL);
 + if (ret  0)
 + return false;
 +
 + return (ret  (ULPI_OTG_DRVVBUS | ULPI_OTG_CHRGVBUS)) ? true : false;
 +}
 +
  static enum omap_musb_vbus_id_status
   twl4030_usb_linkstat(struct twl4030_usb *twl)
  {
   int status;
   enum omap_musb_vbus_id_status linkstat = OMAP_MUSB_UNKNOWN;
 + booldriving_vbus = false;
  
   twl-vbus_supplied = false;
  
 @@ -270,20 +290,26 @@ static enum omap_musb_vbus_id_status
   if (status  0)
   dev_err(twl-dev, USB link status err %d\n, status);
   else if (status  (BIT(7) | BIT(2))) {
 - if (status  (BIT(7)))
 -twl-vbus_supplied = true;
 + if (status  BIT(7)) {
 + driving_vbus = twl4030_is_driving_vbus(twl);
 + if (driving_vbus)

how about just:

if (twl4030_is_driving_vbus(twl))
status = ~BIT(7);



-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCHv2 0/7] usb: phy: twl4030-usb fixes

2013-03-20 Thread Felipe Balbi
On Wed, Mar 20, 2013 at 02:54:25PM +0200, Felipe Balbi wrote:
 On Sun, Mar 17, 2013 at 08:23:20PM +0200, Grazvydas Ignotas wrote:
  I have a pandora board which has similar musb setup to beagleboard
  (OMAP3530 + TWL4030) and musb never worked well on it for me in mainline.
  Well it usually works if you plug the cable once, but as soon as you start
  replugging cables and mixing host adapter into the game it totally breaks
  and reboot is then needed. Host mode is especially broken, any replugs
  after musb has been in host mode result in dead port that needs reboot
  to recover.
  
  With this series I can switch host/peripheral cables any way I like and
  even suspend works with cable plugged with musb in peripheral mode!
  (ARM: OMAP3: hwmod data: keep MIDLEMODE in force-standby for musb is
  needed that was sent separately). This also fixes power drain when cable
  is plugged an no gadget driver is loaded.
  
  Changed since v1:
  - rebased on Felipe's testing branch
  - added locking for patch 4 to take care of possible races
between work item and IRQ
  - changed patch 6 to only disable VBUS if not runtime suspended,
otherwise we get data abort on OMAP3
  
  Grazvydas Ignotas (7):
usb: phy: twl4030-usb: don't enable PHY during init
usb: phy: twl4030-usb: ignore duplicate events
usb: phy: twl4030-usb: don't switch the phy on/off needlessly
usb: phy: twl4030-usb: poll for ID disconnect
usb: phy: twl4030-usb: check if vbus is driven by twl itself
usb: musb: omap2430: turn off vbus on cable disconnect
usb: musb: gadget: use platform callback to enable vbus
 
 since this falls into has never worked before I will apply them for
 v3.10. If you have any objections, let me know.

I have applied up to 'poll for ID disconnect'. Please rebase the others
against my 'testing' branch once you update based on my comments.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH 0/5] usb: musb/otg: cleanup and fixes

2013-03-20 Thread Felipe Balbi
On Wed, Mar 13, 2013 at 02:17:05PM +0530, Kishon Vijay Abraham I wrote:
 This series has some misc cleanup and fixes. The fix solves the cold
 plug issue in omap3 which some have reported. Developed these patches on
 Linux 3.9-rc2 after applying 
 http://www.spinics.net/lists/linux-usb/msg81563.html
 (Grazvydas Ignotas patch series)
 
 Tested for g_zero enumeration in pandaboard and beagleboard in both
 cold plug and hot plug case. Any kind of testing for this series is welcome.
 
 Kishon Vijay Abraham I (5):
   usb: musb: omap: remove the check before calling otg_set_vbus
   usb: musb: omap: always glue have the correct vbus/id status
   usb: otg: twl4030: use devres API for regulator get and request irq
   usb: musb: omap: add usb_phy_init in omap2430_musb_init
   usb: otg: twl4030: fix cold plug on OMAP3
 
  drivers/usb/musb/omap2430.c   |   22 ++
  drivers/usb/otg/twl4030-usb.c |   35 ---
  2 files changed, 22 insertions(+), 35 deletions(-)

this needs to be rebased against my 'next' branch.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH 08/14] OMAPDSS: DSS: add new clock calculation code

2013-03-20 Thread Archit Taneja

On Friday 08 March 2013 05:22 PM, Tomi Valkeinen wrote:

Add new way to iterate over DSS clock divisors. dss_div_calc() provides
a generic way to go over all the divisors, within given clock range.
dss_div_calc() will call a callback function for each divider set,
making the function reusable for all use cases.

Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com
---
  drivers/video/omap2/dss/dss.c |   36 
  drivers/video/omap2/dss/dss.h |3 +++
  2 files changed, 39 insertions(+)

diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 054c2a2..21a3dc8 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -473,6 +473,42 @@ int dss_calc_clock_rates(struct dss_clock_info *cinfo)
return 0;
  }

+bool dss_div_calc(unsigned long fck_min, dss_div_calc_func func, void *data)
+{
+   int fckd, fckd_start, fckd_stop;
+   unsigned long fck;
+   unsigned long fck_hw_max;
+   unsigned long fckd_hw_max;
+   unsigned long prate;
+
+   if (dss.dpll4_m4_ck == NULL) {
+   /* XXX can we change the clock on omap2? */


We can change dss_fclk1 on omap2, and the cclock2420_data.c and 
cclock2430_data.c have clksel structs which allow a set of dividers. The 
dividers are not continuous though, 1 to 12 and 16 are allowed. So we 
might need to change the code here a bit, if we want to change the clock 
in the first place.


Archit


+   fck = clk_get_rate(dss.dss_clk);
+   fckd = 1;
+
+   return func(fckd, fck, data);
+   }
+
+   fck_hw_max = dss_feat_get_param_max(FEAT_PARAM_DSS_FCK);
+   fckd_hw_max = dss.feat-fck_div_max;
+
+   prate = dss_get_dpll4_rate() * dss.feat-dss_fck_multiplier;
+
+   fck_min = fck_min ? fck_min : 1;
+
+   fckd_start = min(prate / fck_min, fckd_hw_max);
+   fckd_stop = max(DIV_ROUND_UP(prate, fck_hw_max), 1ul);
+
+   for (fckd = fckd_start; fckd = fckd_stop; --fckd) {
+   fck = prate / fckd;
+
+   if (func(fckd, fck, data))
+   return true;
+   }
+
+   return false;
+}
+
  int dss_set_clock_div(struct dss_clock_info *cinfo)
  {
if (dss.dpll4_m4_ck) {
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index 0ff41dd..4180302 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -271,6 +271,9 @@ int dss_set_clock_div(struct dss_clock_info *cinfo);
  int dss_calc_clock_div(unsigned long req_pck, struct dss_clock_info 
*dss_cinfo,
struct dispc_clock_info *dispc_cinfo);

+typedef bool (*dss_div_calc_func)(int fckd, unsigned long fck, void *data);
+bool dss_div_calc(unsigned long fck_min, dss_div_calc_func func, void *data);
+
  /* SDI */
  int sdi_init_platform_driver(void) __init;
  void sdi_uninit_platform_driver(void) __exit;



--
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] usb: musb/otg: cleanup and fixes

2013-03-20 Thread kishon

Felipe,

On Wednesday 20 March 2013 06:42 PM, Felipe Balbi wrote:

On Wed, Mar 13, 2013 at 02:17:05PM +0530, Kishon Vijay Abraham I wrote:

This series has some misc cleanup and fixes. The fix solves the cold
plug issue in omap3 which some have reported. Developed these patches on
Linux 3.9-rc2 after applying 
http://www.spinics.net/lists/linux-usb/msg81563.html
(Grazvydas Ignotas patch series)

Tested for g_zero enumeration in pandaboard and beagleboard in both
cold plug and hot plug case. Any kind of testing for this series is welcome.

Kishon Vijay Abraham I (5):
   usb: musb: omap: remove the check before calling otg_set_vbus
   usb: musb: omap: always glue have the correct vbus/id status
   usb: otg: twl4030: use devres API for regulator get and request irq
   usb: musb: omap: add usb_phy_init in omap2430_musb_init
   usb: otg: twl4030: fix cold plug on OMAP3

  drivers/usb/musb/omap2430.c   |   22 ++
  drivers/usb/otg/twl4030-usb.c |   35 ---
  2 files changed, 22 insertions(+), 35 deletions(-)


this needs to be rebased against my 'next' branch.


The v2 of this series is already in your testing branch. You still want 
it to be rebased to your 'next' branch?


Thanks
Kishon
--
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/14] OMAPDSS: DSS: add new clock calculation code

2013-03-20 Thread Tomi Valkeinen
On 2013-03-20 17:17, Archit Taneja wrote:
 On Friday 08 March 2013 05:22 PM, Tomi Valkeinen wrote:
 Add new way to iterate over DSS clock divisors. dss_div_calc() provides
 a generic way to go over all the divisors, within given clock range.
 dss_div_calc() will call a callback function for each divider set,
 making the function reusable for all use cases.

 Signed-off-by: Tomi Valkeinen tomi.valkei...@ti.com
 ---
   drivers/video/omap2/dss/dss.c |   36
 
   drivers/video/omap2/dss/dss.h |3 +++
   2 files changed, 39 insertions(+)

 diff --git a/drivers/video/omap2/dss/dss.c
 b/drivers/video/omap2/dss/dss.c
 index 054c2a2..21a3dc8 100644
 --- a/drivers/video/omap2/dss/dss.c
 +++ b/drivers/video/omap2/dss/dss.c
 @@ -473,6 +473,42 @@ int dss_calc_clock_rates(struct dss_clock_info
 *cinfo)
   return 0;
   }

 +bool dss_div_calc(unsigned long fck_min, dss_div_calc_func func, void
 *data)
 +{
 +int fckd, fckd_start, fckd_stop;
 +unsigned long fck;
 +unsigned long fck_hw_max;
 +unsigned long fckd_hw_max;
 +unsigned long prate;
 +
 +if (dss.dpll4_m4_ck == NULL) {
 +/* XXX can we change the clock on omap2? */
 
 We can change dss_fclk1 on omap2, and the cclock2420_data.c and
 cclock2430_data.c have clksel structs which allow a set of dividers. The
 dividers are not continuous though, 1 to 12 and 16 are allowed. So we
 might need to change the code here a bit, if we want to change the clock
 in the first place.

Ok, good to know. Note that the comment is copied from the old code. I
think I tried changing the clock on N800 with clk_set_rate long ago, but
I didn't get it to work. Things might have changed, but, well, I don't
think we should spend time on omap2 code. I'm sure we'll get a patch if
somebody needs it =).

 Tomi




signature.asc
Description: OpenPGP digital signature


Re: [PATCH] drivers: video: omap2: dss: Use PTR_RET function

2013-03-20 Thread Jon Hunter

On 03/20/2013 06:56 AM, Tomi Valkeinen wrote:
 On 2013-03-19 10:03, Alexandru Gheorghiu wrote:
 Use PTR_RET function instead of IS_ERR and PTR_ERR.
 Patch found using coccinelle.

 Signed-off-by: Alexandru Gheorghiu gheorghiuan...@gmail.com
 ---
  drivers/video/omap2/dss/core.c |5 +
  1 file changed, 1 insertion(+), 4 deletions(-)

 diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
 index f8779d4..60cc6fe 100644
 --- a/drivers/video/omap2/dss/core.c
 +++ b/drivers/video/omap2/dss/core.c
 @@ -181,10 +181,7 @@ int dss_debugfs_create_file(const char *name, void 
 (*write)(struct seq_file *))
  d = debugfs_create_file(name, S_IRUGO, dss_debugfs_dir,
  write, dss_debug_fops);
  
 -if (IS_ERR(d))
 -return PTR_ERR(d);
 -
 -return 0;
 +return PTR_RET(d);
  }
  #else /* CONFIG_OMAP2_DSS_DEBUGFS */
  static inline int dss_initialize_debugfs(void)

 
 Thanks. I'll apply to omapdss tree.

Is this correct? If debugfs_create_file() returns a valid pointer, then
now dss_debugfs_create_file() will return a non-zero value on success. I
don't think this is what you want. A similar case came up recently here [1].

Jon

[1] http://comments.gmane.org/gmane.linux.kernel/1455141
--
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 v4 01/21] usb: phy: nop: Add some parameters to platform data

2013-03-20 Thread Roger Quadros
Add clk_rate parameter to platform data. If supplied, the
NOP phy driver will program the clock to that rate during probe.

Also add 2 flags, needs_vcc and needs_reset.
If the flag is set and the regulator couldn't be found
then the driver will bail out with -EPROBE_DEFER.

Signed-off-by: Roger Quadros rog...@ti.com
Acked-by: Felipe Balbi ba...@ti.com
---
 include/linux/usb/nop-usb-xceiv.h |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/linux/usb/nop-usb-xceiv.h 
b/include/linux/usb/nop-usb-xceiv.h
index 28884c7..148d351 100644
--- a/include/linux/usb/nop-usb-xceiv.h
+++ b/include/linux/usb/nop-usb-xceiv.h
@@ -5,6 +5,11 @@
 
 struct nop_usb_xceiv_platform_data {
enum usb_phy_type type;
+   unsigned long clk_rate;
+
+   /* if set fails with -EPROBE_DEFER if can't get regulator */
+   unsigned int needs_vcc:1;
+   unsigned int needs_reset:1;
 };
 
 #if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE)  
defined(MODULE))
-- 
1.7.4.1

--
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 v4 18/21] ARM: OMAP: zoom: Adapt to ehci-omap changes

2013-03-20 Thread Roger Quadros
Use usbhs_init_phys() to register the PHY's RESET regulator
and the NOP PHY device.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/board-zoom.c |   16 ++--
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c
index 5e4d4c9..1a3dd86 100644
--- a/arch/arm/mach-omap2/board-zoom.c
+++ b/arch/arm/mach-omap2/board-zoom.c
@@ -92,14 +92,16 @@ static struct mtd_partition zoom_nand_partitions[] = {
},
 };
 
+static struct usbhs_phy_data phy_data[] __initdata = {
+   {
+   .port = 2,
+   .reset_gpio = ZOOM3_EHCI_RESET_GPIO,
+   .vcc_gpio = -EINVAL,
+   },
+};
+
 static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
-   .port_mode[0]   = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[1]   = OMAP_EHCI_PORT_MODE_PHY,
-   .port_mode[2]   = OMAP_USBHS_PORT_MODE_UNUSED,
-   .phy_reset  = true,
-   .reset_gpio_port[0] = -EINVAL,
-   .reset_gpio_port[1] = ZOOM3_EHCI_RESET_GPIO,
-   .reset_gpio_port[2] = -EINVAL,
 };
 
 static void __init omap_zoom_init(void)
@@ -109,6 +111,8 @@ static void __init omap_zoom_init(void)
} else if (machine_is_omap_zoom3()) {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
omap_mux_init_gpio(ZOOM3_EHCI_RESET_GPIO, OMAP_PIN_OUTPUT);
+
+   usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(usbhs_bdata);
}
 
-- 
1.7.4.1

--
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 v4 21/21] ARM: dts: omap3-beagle: Add USB Host support

2013-03-20 Thread Roger Quadros
Provide RESET and Power regulators for the USB PHY,
the USB Host port mode and the PHY device.

Also provide pin multiplexer information for USB host
pins.

CC: Benoît Cousson b-cous...@ti.com
Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/boot/dts/omap3-beagle.dts |   71 
 1 files changed, 71 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-beagle.dts 
b/arch/arm/boot/dts/omap3-beagle.dts
index f624dc8..02d23f1 100644
--- a/arch/arm/boot/dts/omap3-beagle.dts
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -38,6 +38,57 @@
};
};
 
+   /* HS USB Port 2 RESET */
+   hsusb2_reset: hsusb2_reset_reg {
+   compatible = regulator-fixed;
+   regulator-name = hsusb2_reset;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   gpio = gpio5 19 0;   /* gpio_147 */
+   startup-delay-us = 7;
+   enable-active-high;
+   };
+
+   /* HS USB Port 2 Power */
+   hsusb2_power: hsusb2_power_reg {
+   compatible = regulator-fixed;
+   regulator-name = hsusb2_vbus;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   gpio = twl_gpio 18 0;/* GPIO LEDA */
+   startup-delay-us = 7;
+   };
+
+   /* HS USB Host PHY on PORT 2 */
+   hsusb2_phy: hsusb2_phy {
+   compatible = usb-nop-xceiv;
+   reset-supply = hsusb2_reset;
+   vcc-supply = hsusb2_power;
+   };
+};
+
+omap3_pmx_core {
+   pinctrl-names = default;
+   pinctrl-0 = 
+   hsusbb2_pins
+   ;
+
+   hsusbb2_pins: pinmux_hsusbb2_pins {
+   pinctrl-single,pins = 
+   0x5c0 0x3  /* 
USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_clk OUTPUT */
+   0x5c2 0x3  /* 
USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_stp OUTPUT */
+   0x5c4 0x10b  /* 
USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dir INPUT | PULLDOWN */
+   0x5c6 0x10b  /* 
USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_nxt INPUT | PULLDOWN */
+   0x5c8 0x10b  /* 
USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat0 INPUT | PULLDOWN */
+   0x5cA 0x10b  /* 
USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat1 INPUT | PULLDOWN */
+   0x1a4 0x10b  /* 
USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat2 INPUT | PULLDOWN */
+   0x1a6 0x10b  /* 
USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat3 INPUT | PULLDOWN */
+   0x1a8 0x10b  /* 
USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat4 INPUT | PULLDOWN */
+   0x1aa 0x10b  /* 
USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat5 INPUT | PULLDOWN */
+   0x1ac 0x10b  /* 
USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat6 INPUT | PULLDOWN */
+   0x1ae 0x10b  /* 
USBB2_ULPITLL_CLK_MUXMODE.usbb1_ulpiphy_dat7 INPUT | PULLDOWN */
+   ;
+   };
 };
 
 i2c1 {
@@ -65,3 +116,23 @@
 mmc3 {
status = disabled;
 };
+
+usbhshost {
+   port2-mode = ehci-phy;
+};
+
+usbhsehci {
+   phys = 0 hsusb2_phy;
+};
+
+twl_gpio {
+   ti,use-leds;
+   /* pullups: BIT(1) */
+   ti,pullups = 0x02;
+   /*
+* pulldowns:
+* BIT(2), BIT(6), BIT(7), BIT(8), BIT(13)
+* BIT(15), BIT(16), BIT(17)
+*/
+   ti,pulldowns = 0x03a1c4;
+};
-- 
1.7.4.1

--
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 v4 20/21] ARM: dts: OMAP3: Add HS USB Host IP nodes

2013-03-20 Thread Roger Quadros
Adds device nodes for HS USB Host module, TLL module,
OHCI and EHCI controllers.

CC: Benoît Cousson b-cous...@ti.com
Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/boot/dts/omap3.dtsi |   31 +++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 1acc261..a14f74b 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -397,5 +397,36 @@
ti,timer-alwon;
ti,timer-secure;
};
+
+   usbhstll: usbhstll@48062000 {
+   compatible = ti,usbhs-tll;
+   reg = 0x48062000 0x1000;
+   interrupts = 78;
+   ti,hwmods = usb_tll_hs;
+   };
+
+   usbhshost: usbhshost@48064000 {
+   compatible = ti,usbhs-host;
+   reg = 0x48064000 0x400;
+   ti,hwmods = usb_host_hs;
+   #address-cells = 1;
+   #size-cells = 1;
+   ranges;
+
+   usbhsohci: ohci@48064400 {
+   compatible = ti,ohci-omap3, usb-ohci;
+   reg = 0x48064400 0x400;
+   interrupt-parent = intc;
+   interrupts = 76;
+   };
+
+   usbhsehci: ehci@48064800 {
+   compatible = ti,ehci-omap, usb-ehci;
+   reg = 0x48064800 0x400;
+   interrupt-parent = intc;
+   interrupts = 77;
+   };
+   };
+
};
 };
-- 
1.7.4.1

--
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 v4 19/21] ARM: dts: OMAP4: Add HS USB Host IP nodes

2013-03-20 Thread Roger Quadros
Adds device nodes for HS USB Host module, TLL module,
OHCI and EHCI controllers.

CC: Benoît Cousson b-cous...@ti.com
Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/boot/dts/omap4.dtsi |   30 ++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 739bb79..b7db1a2 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -529,5 +529,35 @@
ti,hwmods = timer11;
ti,timer-pwm;
};
+
+   usbhstll: usbhstll@4a062000 {
+   compatible = ti,usbhs-tll;
+   reg = 0x4a062000 0x1000;
+   interrupts = 0 78 0x4;
+   ti,hwmods = usb_tll_hs;
+   };
+
+   usbhshost: usbhshost@4a064000 {
+   compatible = ti,usbhs-host;
+   reg = 0x4a064000 0x800;
+   ti,hwmods = usb_host_hs;
+   #address-cells = 1;
+   #size-cells = 1;
+   ranges;
+
+   usbhsohci: ohci@4a064800 {
+   compatible = ti,ohci-omap3, usb-ohci;
+   reg = 0x4a064800 0x400;
+   interrupt-parent = gic;
+   interrupts = 0 76 0x4;
+   };
+
+   usbhsehci: ehci@4a064c00 {
+   compatible = ti,ehci-omap, usb-ehci;
+   reg = 0x4a064c00 0x400;
+   interrupt-parent = gic;
+   interrupts = 0 77 0x4;
+   };
+   };
};
 };
-- 
1.7.4.1

--
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 v4 02/21] ARM: OMAP2+: omap-usb-host: Add usbhs_init_phys()

2013-03-20 Thread Roger Quadros
This helper allows board support code to add the PHY's
VCC and RESET regulators which are GPIO controlled as well
as the NOP PHY device.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/usb-host.c |  160 +++-
 arch/arm/mach-omap2/usb.h  |9 ++
 2 files changed, 167 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index 5706bdc..aa27d7f 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -22,8 +22,12 @@
 #include linux/platform_device.h
 #include linux/slab.h
 #include linux/dma-mapping.h
-
-#include asm/io.h
+#include linux/regulator/machine.h
+#include linux/regulator/fixed.h
+#include linux/string.h
+#include linux/io.h
+#include linux/gpio.h
+#include linux/usb/phy.h
 
 #include soc.h
 #include omap_device.h
@@ -526,3 +530,155 @@ void __init usbhs_init(struct usbhs_omap_platform_data 
*pdata)
 }
 
 #endif
+
+/* Template for PHY regulators */
+static struct fixed_voltage_config hsusb_reg_config = {
+   /* .supply_name filled later */
+   .microvolts = 330,
+   .gpio = -1, /* updated later */
+   .startup_delay = 7, /* 70msec */
+   .enable_high = 1,   /* updated later */
+   .enabled_at_boot = 0,   /* keep in RESET */
+   /* .init_data filled later */
+};
+
+static const char *nop_name = nop_usb_xceiv; /* NOP PHY driver */
+static const char *reg_name = reg-fixed-voltage; /* Regulator driver */
+
+/**
+ * usbhs_add_regulator - Add a gpio based fixed voltage regulator device
+ * @name: name for the regulator
+ * @dev_id: device id of the device this regulator supplies power to
+ * @dev_supply: supply name that the device expects
+ * @gpio: GPIO number
+ * @polarity: 1 - Active high, 0 - Active low
+ */
+static int usbhs_add_regulator(char *name, char *dev_id, char *dev_supply,
+   int gpio, int polarity)
+{
+   struct regulator_consumer_supply *supplies;
+   struct regulator_init_data *reg_data;
+   struct fixed_voltage_config *config;
+   struct platform_device *pdev;
+   int ret;
+
+   supplies = kzalloc(sizeof(*supplies), GFP_KERNEL);
+   if (!supplies)
+   return -ENOMEM;
+
+   supplies-supply = dev_supply;
+   supplies-dev_name = dev_id;
+
+   reg_data = kzalloc(sizeof(*reg_data), GFP_KERNEL);
+   if (!reg_data)
+   return -ENOMEM;
+
+   reg_data-constraints.valid_ops_mask = REGULATOR_CHANGE_STATUS;
+   reg_data-consumer_supplies = supplies;
+   reg_data-num_consumer_supplies = 1;
+
+   config = kmemdup(hsusb_reg_config, sizeof(hsusb_reg_config),
+   GFP_KERNEL);
+   if (!config)
+   return -ENOMEM;
+
+   config-supply_name = name;
+   config-gpio = gpio;
+   config-enable_high = polarity;
+   config-init_data = reg_data;
+
+   /* create a regulator device */
+   pdev = kzalloc(sizeof(*pdev), GFP_KERNEL);
+   if (!pdev)
+   return -ENOMEM;
+
+   pdev-id = PLATFORM_DEVID_AUTO;
+   pdev-name = reg_name;
+   pdev-dev.platform_data = config;
+
+   ret = platform_device_register(pdev);
+   if (ret)
+   pr_err(%s: Failed registering regulator %s for %s\n,
+   __func__, name, dev_id);
+
+   return ret;
+}
+
+int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
+{
+   char *rail_name;
+   int i, len;
+   struct platform_device *pdev;
+   char *phy_id;
+
+   /* the phy_id will be something like nop_usb_xceiv.1 */
+   len = strlen(nop_name) + 3; /* 3 - .1 and NULL terminator */
+
+   for (i = 0; i  num_phys; i++) {
+
+   if (!phy-port) {
+   pr_err(%s: Invalid port 0. Must start from 1\n,
+   __func__);
+   continue;
+   }
+
+   /* do we need a NOP PHY device ? */
+   if (!gpio_is_valid(phy-reset_gpio) 
+   !gpio_is_valid(phy-vcc_gpio))
+   continue;
+
+   /* create a NOP PHY device */
+   pdev = kzalloc(sizeof(*pdev), GFP_KERNEL);
+   if (!pdev)
+   return -ENOMEM;
+
+   pdev-id = phy-port;
+   pdev-name = nop_name;
+   pdev-dev.platform_data = phy-platform_data;
+
+   phy_id = kmalloc(len, GFP_KERNEL);
+   if (!phy_id)
+   return -ENOMEM;
+
+   scnprintf(phy_id, len, nop_usb_xceiv.%d\n,
+   pdev-id);
+
+   if (platform_device_register(pdev)) {
+   pr_err(%s: Failed to register device %s\n,
+   __func__,  phy_id);
+   continue;
+   }
+
+   

[PATCH v4 06/21] ARM: OMAP3: 3630SDP: Adapt to ehci-omap changes

2013-03-20 Thread Roger Quadros
Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY devices.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/board-3630sdp.c |   21 +++--
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/board-3630sdp.c 
b/arch/arm/mach-omap2/board-3630sdp.c
index 67447bd..20d6d81 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -53,16 +53,23 @@ static void enable_board_wakeup_source(void)
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
 }
 
+static struct usbhs_phy_data phy_data[] __initdata = {
+   {
+   .port = 1,
+   .reset_gpio = 126,
+   .vcc_gpio = -EINVAL,
+   },
+   {
+   .port = 2,
+   .reset_gpio = 61,
+   .vcc_gpio = -EINVAL,
+   },
+};
+
 static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
 
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-   .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
-   .phy_reset  = true,
-   .reset_gpio_port[0]  = 126,
-   .reset_gpio_port[1]  = 61,
-   .reset_gpio_port[2]  = -EINVAL
 };
 
 #ifdef CONFIG_OMAP_MUX
@@ -199,6 +206,8 @@ static void __init omap_sdp_init(void)
board_smc91x_init();
board_flash_init(sdp_flash_partitions, chip_sel_sdp, NAND_BUSWIDTH_16);
enable_board_wakeup_source();
+
+   usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(usbhs_bdata);
 }
 
-- 
1.7.4.1

--
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 v4 14/21] ARM: OMAP3: omap3pandora: Adapt to ehci-omap changes

2013-03-20 Thread Roger Quadros
Use usbhs_init_phys() to register the PHY's RESET regulator
and NOP PHY device. VAUX2 supplies the PHY's VCC.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/board-omap3pandora.c |   21 -
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3pandora.c 
b/arch/arm/mach-omap2/board-omap3pandora.c
index 2bba362..1004d2a 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -346,7 +346,7 @@ static struct regulator_consumer_supply 
pandora_vcc_lcd_supply[] = {
 };
 
 static struct regulator_consumer_supply pandora_usb_phy_supply[] = {
-   REGULATOR_SUPPLY(hsusb1, ehci-omap.0),
+   REGULATOR_SUPPLY(vcc, nop_usb_xceiv.2), /* hsusb port 2 */
 };
 
 /* ads7846 on SPI and 2 nub controllers on I2C */
@@ -561,6 +561,14 @@ fail:
printk(KERN_ERR wl1251 board initialisation failed\n);
 }
 
+static struct usbhs_phy_data phy_data[] __initdata = {
+   {
+   .port = 2,
+   .reset_gpio = 16,
+   .vcc_gpio = -EINVAL,
+   },
+};
+
 static struct platform_device *omap3pandora_devices[] __initdata = {
pandora_leds_gpio,
pandora_keys_gpio,
@@ -569,15 +577,7 @@ static struct platform_device *omap3pandora_devices[] 
__initdata = {
 };
 
 static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
-
-   .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-   .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
-   .phy_reset  = true,
-   .reset_gpio_port[0]  = -EINVAL,
-   .reset_gpio_port[1]  = 16,
-   .reset_gpio_port[2]  = -EINVAL
 };
 
 #ifdef CONFIG_OMAP_MUX
@@ -601,7 +601,10 @@ static void __init omap3pandora_init(void)
spi_register_board_info(omap3pandora_spi_board_info,
ARRAY_SIZE(omap3pandora_spi_board_info));
omap_ads7846_init(1, OMAP3_PANDORA_TS_GPIO, 0, NULL);
+
+   usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(usbhs_bdata);
+
usb_bind_phy(musb-hdrc.0.auto, 0, twl4030_usb);
usb_musb_init(NULL);
gpmc_nand_init(pandora_nand_data, NULL);
-- 
1.7.4.1

--
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 v4 15/21] ARM: OMAP3: omap3stalker: Adapt to ehci-omap changes

2013-03-20 Thread Roger Quadros
Use usbhs_init_phys() to register the PHY's RESET regulator
and the NOP PHY device.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/board-omap3stalker.c |   17 ++---
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3stalker.c 
b/arch/arm/mach-omap2/board-omap3stalker.c
index 95c10b3..bf09564 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -358,19 +358,20 @@ static int __init omap3_stalker_i2c_init(void)
 
 #define OMAP3_STALKER_TS_GPIO  175
 
+static struct usbhs_phy_data phy_data[] __initdata = {
+   {
+   .port = 2,
+   .reset_gpio = 21,
+   .vcc_gpio = -EINVAL,
+   },
+};
+
 static struct platform_device *omap3_stalker_devices[] __initdata = {
keys_gpio,
 };
 
 static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
-   .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-   .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
-   .phy_reset = true,
-   .reset_gpio_port[0] = -EINVAL,
-   .reset_gpio_port[1] = 21,
-   .reset_gpio_port[2] = -EINVAL,
 };
 
 #ifdef CONFIG_OMAP_MUX
@@ -407,6 +408,8 @@ static void __init omap3_stalker_init(void)
omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);
usb_bind_phy(musb-hdrc.0.auto, 0, twl4030_usb);
usb_musb_init(NULL);
+
+   usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(usbhs_bdata);
omap_ads7846_init(1, OMAP3_STALKER_TS_GPIO, 310, NULL);
 
-- 
1.7.4.1

--
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 v4 17/21] ARM: OMAP3: overo: Adapt to ehci-omap changes

2013-03-20 Thread Roger Quadros
Use usbhs_init_phys() to register the PHY's RESET regulator
and the NOP PHY device.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/board-overo.c |   16 ++--
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/board-overo.c 
b/arch/arm/mach-omap2/board-overo.c
index 86bab51..ab79a44 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -458,14 +458,16 @@ static int __init overo_spi_init(void)
return 0;
 }
 
+static struct usbhs_phy_data phy_data[] __initdata = {
+   {
+   .port = 2,
+   .reset_gpio = OVERO_GPIO_USBH_NRESET,
+   .vcc_gpio = -EINVAL,
+   },
+};
+
 static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
-   .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-   .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-   .phy_reset  = true,
-   .reset_gpio_port[0]  = -EINVAL,
-   .reset_gpio_port[1]  = OVERO_GPIO_USBH_NRESET,
-   .reset_gpio_port[2]  = -EINVAL
 };
 
 #ifdef CONFIG_OMAP_MUX
@@ -502,6 +504,8 @@ static void __init overo_init(void)
ARRAY_SIZE(overo_nand_partitions), NAND_CS, 0, NULL);
usb_bind_phy(musb-hdrc.0.auto, 0, twl4030_usb);
usb_musb_init(NULL);
+
+   usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(usbhs_bdata);
overo_spi_init();
overo_init_smsc911x();
-- 
1.7.4.1

--
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 v4 16/21] ARM: OMAP3: omap3touchbook: Adapt to ehci-omap changes

2013-03-20 Thread Roger Quadros
Use usbhs_init_phys() to register the PHY's RESET regulator
and the NOP PHY device.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/board-omap3touchbook.c |   17 ++---
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c 
b/arch/arm/mach-omap2/board-omap3touchbook.c
index bcd44fb..7da48bc 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -305,21 +305,22 @@ static struct omap_board_mux board_mux[] __initdata = {
 };
 #endif
 
+static struct usbhs_phy_data phy_data[] __initdata = {
+   {
+   .port = 2,
+   .reset_gpio = 147,
+   .vcc_gpio = -EINVAL,
+   },
+};
+
 static struct platform_device *omap3_touchbook_devices[] __initdata = {
leds_gpio,
keys_gpio,
 };
 
 static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
-
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-   .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
-   .phy_reset  = true,
-   .reset_gpio_port[0]  = -EINVAL,
-   .reset_gpio_port[1]  = 147,
-   .reset_gpio_port[2]  = -EINVAL
 };
 
 static void omap3_touchbook_poweroff(void)
@@ -368,6 +369,8 @@ static void __init omap3_touchbook_init(void)
omap_ads7846_init(4, OMAP3_TS_GPIO, 310, ads7846_pdata);
usb_bind_phy(musb-hdrc.0.auto, 0, twl4030_usb);
usb_musb_init(NULL);
+
+   usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(usbhs_bdata);
board_nand_init(omap3touchbook_nand_partitions,
ARRAY_SIZE(omap3touchbook_nand_partitions), NAND_CS,
-- 
1.7.4.1

--
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 v4 12/21] ARM: OMAP3: igep0020: Adapt to ehci-omap changes

2013-03-20 Thread Roger Quadros
Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY devices.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/board-igep0020.c |   32 ++--
 1 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index bf92678..95ccec0 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -527,26 +527,28 @@ static void __init igep_i2c_init(void)
omap3_pmic_init(twl4030, igep_twldata);
 }
 
+static struct usbhs_phy_data igep2_phy_data[] __initdata = {
+   {
+   .port = 1,
+   .reset_gpio = IGEP2_GPIO_USBH_NRESET,
+   .vcc_gpio = -EINVAL,
+   },
+};
+
+static struct usbhs_phy_data igep3_phy_data[] __initdata = {
+   {
+   .port = 2,
+   .reset_gpio = IGEP3_GPIO_USBH_NRESET,
+   .vcc_gpio = -EINVAL,
+   },
+};
+
 static struct usbhs_omap_platform_data igep2_usbhs_bdata __initdata = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
-   .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
-   .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
-   .phy_reset = true,
-   .reset_gpio_port[0] = IGEP2_GPIO_USBH_NRESET,
-   .reset_gpio_port[1] = -EINVAL,
-   .reset_gpio_port[2] = -EINVAL,
 };
 
 static struct usbhs_omap_platform_data igep3_usbhs_bdata __initdata = {
-   .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-   .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
-   .phy_reset = true,
-   .reset_gpio_port[0] = -EINVAL,
-   .reset_gpio_port[1] = IGEP3_GPIO_USBH_NRESET,
-   .reset_gpio_port[2] = -EINVAL,
 };
 
 #ifdef CONFIG_OMAP_MUX
@@ -642,8 +644,10 @@ static void __init igep_init(void)
if (machine_is_igep0020()) {
omap_display_init(igep2_dss_data);
igep2_init_smsc911x();
+   usbhs_init_phys(igep2_phy_data, ARRAY_SIZE(igep2_phy_data));
usbhs_init(igep2_usbhs_bdata);
} else {
+   usbhs_init_phys(igep3_phy_data, ARRAY_SIZE(igep3_phy_data));
usbhs_init(igep3_usbhs_bdata);
}
 }
-- 
1.7.4.1

--
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 v4 13/21] ARM: OMAP3: omap3evm: Adapt to ehci-omap changes

2013-03-20 Thread Roger Quadros
Use usbhs_init_phys() to register the PHY's RESET regulator
and the NOP PHY device. VAUX2 supplies the PHY's VCC.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/board-omap3evm.c |   25 +
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3evm.c 
b/arch/arm/mach-omap2/board-omap3evm.c
index 48789e0..2de92fa 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -496,7 +496,7 @@ struct wl12xx_platform_data omap3evm_wlan_data __initdata = 
{
 static struct regulator_consumer_supply omap3evm_vaux2_supplies[] = {
REGULATOR_SUPPLY(VDD_CSIPHY1, omap3isp),/* OMAP ISP */
REGULATOR_SUPPLY(VDD_CSIPHY2, omap3isp),/* OMAP ISP */
-   REGULATOR_SUPPLY(hsusb1, ehci-omap.0),
+   REGULATOR_SUPPLY(vcc, nop_usb_xceiv.2), /* hsusb port 2 */
REGULATOR_SUPPLY(vaux2, NULL),
 };
 
@@ -539,17 +539,16 @@ static int __init omap3_evm_i2c_init(void)
return 0;
 }
 
-static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
+static struct usbhs_phy_data phy_data[] __initdata = {
+   {
+   .port = 2,
+   .reset_gpio = -1,   /* set at runtime */
+   .vcc_gpio = -EINVAL,
+   },
+};
 
-   .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
+static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-   .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
-   .phy_reset  = true,
-   /* PHY reset GPIO will be runtime programmed based on EVM version */
-   .reset_gpio_port[0]  = -EINVAL,
-   .reset_gpio_port[1]  = -EINVAL,
-   .reset_gpio_port[2]  = -EINVAL
 };
 
 #ifdef CONFIG_OMAP_MUX
@@ -725,7 +724,7 @@ static void __init omap3_evm_init(void)
 
/* setup EHCI phy reset config */
omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP);
-   usbhs_bdata.reset_gpio_port[1] = 21;
+   phy_data[0].reset_gpio = 21;
 
/* EVM REV = E can supply 500mA with EXTVBUS programming */
musb_board_data.power = 500;
@@ -733,10 +732,12 @@ static void __init omap3_evm_init(void)
} else {
/* setup EHCI phy reset on MDC */
omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
-   usbhs_bdata.reset_gpio_port[1] = 135;
+   phy_data[0].reset_gpio = 135;
}
usb_bind_phy(musb-hdrc.0.auto, 0, twl4030_usb);
usb_musb_init(musb_board_data);
+
+   usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(usbhs_bdata);
board_nand_init(omap3evm_nand_partitions,
ARRAY_SIZE(omap3evm_nand_partitions), NAND_CS,
-- 
1.7.4.1

--
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 v4 11/21] ARM: OMAP: devkit8000: Adapt to ehci-omap changes

2013-03-20 Thread Roger Quadros
Remove deprecated USBHS platform data.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/board-devkit8000.c |8 
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-omap2/board-devkit8000.c 
b/arch/arm/mach-omap2/board-devkit8000.c
index 53056c3..42fbf1e 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -437,15 +437,7 @@ static struct platform_device *devkit8000_devices[] 
__initdata = {
 };
 
 static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
-
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
-   .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
-   .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
-   .phy_reset  = true,
-   .reset_gpio_port[0]  = -EINVAL,
-   .reset_gpio_port[1]  = -EINVAL,
-   .reset_gpio_port[2]  = -EINVAL
 };
 
 #ifdef CONFIG_OMAP_MUX
-- 
1.7.4.1

--
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 v4 10/21] ARM: OMAP3: cm-t3517: Adapt to ehci-omap changes

2013-03-20 Thread Roger Quadros
Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY devices.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/board-cm-t3517.c |   20 ++--
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/board-cm-t3517.c 
b/arch/arm/mach-omap2/board-cm-t3517.c
index a66da80..6920f6cf 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -188,15 +188,22 @@ static inline void cm_t3517_init_rtc(void) {}
 #define HSUSB2_RESET_GPIO  (147)
 #define USB_HUB_RESET_GPIO (152)
 
+static struct usbhs_phy_data phy_data[] __initdata = {
+   {
+   .port = 1,
+   .reset_gpio = HSUSB1_RESET_GPIO,
+   .vcc_gpio = -EINVAL,
+   },
+   {
+   .port = 2,
+   .reset_gpio = HSUSB2_RESET_GPIO,
+   .vcc_gpio = -EINVAL,
+   },
+};
+
 static struct usbhs_omap_platform_data cm_t3517_ehci_pdata __initdata = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-   .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
-   .phy_reset  = true,
-   .reset_gpio_port[0]  = HSUSB1_RESET_GPIO,
-   .reset_gpio_port[1]  = HSUSB2_RESET_GPIO,
-   .reset_gpio_port[2]  = -EINVAL,
 };
 
 static int __init cm_t3517_init_usbh(void)
@@ -213,6 +220,7 @@ static int __init cm_t3517_init_usbh(void)
msleep(1);
}
 
+   usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(cm_t3517_ehci_pdata);
 
return 0;
-- 
1.7.4.1

--
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 v4 03/21] ARM: OMAP2+: omap4panda: Adapt to ehci-omap changes

2013-03-20 Thread Roger Quadros
Use usbhs_init_phys() to register the PHY's VCC and RESET
regulators and the NOP PHY device.

Get rid of managing the PHY clock as it will be done by the PHY driver.
For that to work we create a clock alias that links the PHY clock name
to the PHY device name.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/board-omap4panda.c |   55 ---
 1 files changed, 21 insertions(+), 34 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c 
b/arch/arm/mach-omap2/board-omap4panda.c
index b02c2f0..a71ad34 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -31,6 +31,7 @@
 #include linux/ti_wilink_st.h
 #include linux/usb/musb.h
 #include linux/usb/phy.h
+#include linux/usb/nop-usb-xceiv.h
 #include linux/wl12xx.h
 #include linux/irqchip/arm-gic.h
 #include linux/platform_data/omap-abe-twl6040.h
@@ -132,6 +133,22 @@ static struct platform_device btwilink_device = {
.id = -1,
 };
 
+/* PHY device on HS USB Port 1 i.e. nop_usb_xceiv.1 */
+static struct nop_usb_xceiv_platform_data hsusb1_phy_data = {
+   /* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */
+   .clk_rate = 1920,
+};
+
+static struct usbhs_phy_data phy_data[] __initdata = {
+   {
+   .port = 1,
+   .reset_gpio = GPIO_HUB_NRESET,
+   .vcc_gpio = GPIO_HUB_POWER,
+   .vcc_polarity = 1,
+   .platform_data = hsusb1_phy_data,
+   },
+};
+
 static struct platform_device *panda_devices[] __initdata = {
leds_gpio,
wl1271_device,
@@ -142,49 +159,19 @@ static struct platform_device *panda_devices[] __initdata 
= {
 
 static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
-   .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
-   .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-   .phy_reset  = false,
-   .reset_gpio_port[0]  = -EINVAL,
-   .reset_gpio_port[1]  = -EINVAL,
-   .reset_gpio_port[2]  = -EINVAL
-};
-
-static struct gpio panda_ehci_gpios[] __initdata = {
-   { GPIO_HUB_POWER,   GPIOF_OUT_INIT_LOW,  hub_power  },
-   { GPIO_HUB_NRESET,  GPIOF_OUT_INIT_LOW,  hub_nreset },
 };
 
 static void __init omap4_ehci_init(void)
 {
int ret;
-   struct clk *phy_ref_clk;
 
/* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */
-   phy_ref_clk = clk_get(NULL, auxclk3_ck);
-   if (IS_ERR(phy_ref_clk)) {
-   pr_err(Cannot request auxclk3\n);
-   return;
-   }
-   clk_set_rate(phy_ref_clk, 1920);
-   clk_prepare_enable(phy_ref_clk);
-
-   /* disable the power to the usb hub prior to init and reset phy+hub */
-   ret = gpio_request_array(panda_ehci_gpios,
-ARRAY_SIZE(panda_ehci_gpios));
-   if (ret) {
-   pr_err(Unable to initialize EHCI power/reset\n);
-   return;
-   }
-
-   gpio_export(GPIO_HUB_POWER, 0);
-   gpio_export(GPIO_HUB_NRESET, 0);
-   gpio_set_value(GPIO_HUB_NRESET, 1);
+   ret = clk_add_alias(main_clk, nop_usb_xceiv.1, auxclk3_ck, NULL);
+   if (ret)
+   pr_err(Failed to add main_clk alias to auxclk3_ck\n);
 
+   usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(usbhs_bdata);
-
-   /* enable power to hub */
-   gpio_set_value(GPIO_HUB_POWER, 1);
 }
 
 static struct omap_musb_board_data musb_board_data = {
-- 
1.7.4.1

--
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 v4 00/21] ARM: OMAP2+: Adapt to ehci-omap changes for 3.10

2013-03-20 Thread Roger Quadros
Hi Tony,

These patches provide the SoC side code required to support
the changes in the OMAP USB Host drivers done in [1], [2]  [3].

Device tree support is added for Beagleboard only. I've removed
Panda device tree support till we have resolved the AUXCLK issue.

NOTE: The first patch needs to be shared between the
OMAP tree and Felipe's USB tree.

v4:
- Some more cleanup to usbhs_init_phys(). Moved repeated code into
another helper function usbhs_add_regulator().
- Removed patch for Panda device tree support for USB host since
it is non functional.

v3:
- Moved more functionality into usbhs_init_phys().

v2:
- Added helper function usbhs_init_phys() that can be used by board files
to simplify adding of PHY regulators for USB host ports.

[1] MFD side changes to omap-usb-host and omap-usb-tll
  https://lkml.org/lkml/2013/3/12/179
[2] USB EHCI side changes to ehci-omap 
  http://www.mail-archive.com/linux-omap@vger.kernel.org/msg86265.html
[3] USB PHY driver changes
  http://www.mail-archive.com/linux-omap@vger.kernel.org/msg86293.html

The following changes since commit f6161aa153581da4a3867a2d1a7caf4be19b6ec9:

  Linux 3.9-rc2 (2013-03-10 16:54:19 -0700)

are available in the git repository at:
  git://github.com/rogerq/linux.git usbhost-arm-next

Roger Quadros (21):
  usb: phy: nop: Add some parameters to platform data
  ARM: OMAP2+: omap-usb-host: Add usbhs_init_phys()
  ARM: OMAP2+: omap4panda: Adapt to ehci-omap changes
  ARM: OMAP3: Beagle: Adapt to ehci-omap changes
  ARM: OMAP3: 3430SDP: Adapt to ehci-omap changes
  ARM: OMAP3: 3630SDP: Adapt to ehci-omap changes
  ARM: OMAP: AM3517crane: Adapt to ehci-omap changes
  ARM: OMAP: AM3517evm: Adapt to ehci-omap changes
  ARM: OMAP3: cm-t35: Adapt to ehci-omap changes
  ARM: OMAP3: cm-t3517: Adapt to ehci-omap changes
  ARM: OMAP: devkit8000: Adapt to ehci-omap changes
  ARM: OMAP3: igep0020: Adapt to ehci-omap changes
  ARM: OMAP3: omap3evm: Adapt to ehci-omap changes
  ARM: OMAP3: omap3pandora: Adapt to ehci-omap changes
  ARM: OMAP3: omap3stalker: Adapt to ehci-omap changes
  ARM: OMAP3: omap3touchbook: Adapt to ehci-omap changes
  ARM: OMAP3: overo: Adapt to ehci-omap changes
  ARM: OMAP: zoom: Adapt to ehci-omap changes
  ARM: dts: OMAP4: Add HS USB Host IP nodes
  ARM: dts: OMAP3: Add HS USB Host IP nodes
  ARM: dts: omap3-beagle: Add USB Host support

 arch/arm/boot/dts/omap3-beagle.dts |   71 
 arch/arm/boot/dts/omap3.dtsi   |   31 ++
 arch/arm/boot/dts/omap4.dtsi   |   30 +
 arch/arm/mach-omap2/board-3430sdp.c|   21 +++-
 arch/arm/mach-omap2/board-3630sdp.c|   21 +++-
 arch/arm/mach-omap2/board-am3517crane.c|   24 ++---
 arch/arm/mach-omap2/board-am3517evm.c  |   17 ++--
 arch/arm/mach-omap2/board-cm-t35.c |   20 +++-
 arch/arm/mach-omap2/board-cm-t3517.c   |   20 +++-
 arch/arm/mach-omap2/board-devkit8000.c |8 --
 arch/arm/mach-omap2/board-igep0020.c   |   32 +++---
 arch/arm/mach-omap2/board-omap3beagle.c|   32 --
 arch/arm/mach-omap2/board-omap3evm.c   |   25 +++--
 arch/arm/mach-omap2/board-omap3pandora.c   |   21 ++--
 arch/arm/mach-omap2/board-omap3stalker.c   |   17 ++--
 arch/arm/mach-omap2/board-omap3touchbook.c |   17 ++--
 arch/arm/mach-omap2/board-omap4panda.c |   55 --
 arch/arm/mach-omap2/board-overo.c  |   16 ++-
 arch/arm/mach-omap2/board-zoom.c   |   16 ++-
 arch/arm/mach-omap2/usb-host.c |  160 +++-
 arch/arm/mach-omap2/usb.h  |9 ++
 include/linux/usb/nop-usb-xceiv.h  |5 +
 22 files changed, 508 insertions(+), 160 deletions(-)

-- 
1.7.4.1

--
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 v4 04/21] ARM: OMAP3: Beagle: Adapt to ehci-omap changes

2013-03-20 Thread Roger Quadros
Use usbhs_init_phys() to register the PHY's VCC and RESET
regulators and the NOP PHY device.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/board-omap3beagle.c |   32 +-
 1 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
b/arch/arm/mach-omap2/board-omap3beagle.c
index c3558f9..5382215 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -33,6 +33,7 @@
 #include linux/mtd/nand.h
 #include linux/mmc/host.h
 #include linux/usb/phy.h
+#include linux/usb/nop-usb-xceiv.h
 
 #include linux/regulator/machine.h
 #include linux/i2c/twl.h
@@ -277,6 +278,21 @@ static struct regulator_consumer_supply 
beagle_vsim_supply[] = {
 
 static struct gpio_led gpio_leds[];
 
+/* PHY's VCC regulator might be added later, so flag that we need it */
+static struct nop_usb_xceiv_platform_data hsusb2_phy_data = {
+   .needs_vcc = true,
+};
+
+static struct usbhs_phy_data phy_data[] = {
+   {
+   .port = 2,
+   .reset_gpio = 147,
+   .vcc_gpio = -1, /* updated in beagle_twl_gpio_setup */
+   .vcc_polarity = 1,  /* updated in beagle_twl_gpio_setup */
+   .platform_data = hsusb2_phy_data,
+   },
+};
+
 static int beagle_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio)
 {
@@ -318,9 +334,11 @@ static int beagle_twl_gpio_setup(struct device *dev,
}
dvi_panel.power_down_gpio = beagle_config.dvi_pd_gpio;
 
-   gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,
-   nEN_USB_PWR);
+   /* TWL4030_GPIO_MAX i.e. LED_GPO controls HS USB Port 2 power */
+   phy_data[0].vcc_gpio = gpio + TWL4030_GPIO_MAX;
+   phy_data[0].vcc_polarity = beagle_config.usb_pwr_level;
 
+   usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
return 0;
 }
 
@@ -453,15 +471,7 @@ static struct platform_device *omap3_beagle_devices[] 
__initdata = {
 };
 
 static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
-
-   .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-   .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
-   .phy_reset  = true,
-   .reset_gpio_port[0]  = -EINVAL,
-   .reset_gpio_port[1]  = 147,
-   .reset_gpio_port[2]  = -EINVAL
 };
 
 #ifdef CONFIG_OMAP_MUX
@@ -543,7 +553,9 @@ static void __init omap3_beagle_init(void)
 
usb_bind_phy(musb-hdrc.0.auto, 0, twl4030_usb);
usb_musb_init(NULL);
+
usbhs_init(usbhs_bdata);
+
board_nand_init(omap3beagle_nand_partitions,
ARRAY_SIZE(omap3beagle_nand_partitions), NAND_CS,
NAND_BUSWIDTH_16, NULL);
-- 
1.7.4.1

--
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 v4 05/21] ARM: OMAP3: 3430SDP: Adapt to ehci-omap changes

2013-03-20 Thread Roger Quadros
Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY devices.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/board-3430sdp.c |   21 +++--
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
b/arch/arm/mach-omap2/board-3430sdp.c
index ce812de..7eb9651 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -445,16 +445,23 @@ static void enable_board_wakeup_source(void)
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
 }
 
+static struct usbhs_phy_data phy_data[] __initdata = {
+   {
+   .port = 1,
+   .reset_gpio = 57,
+   .vcc_gpio = -EINVAL,
+   },
+   {
+   .port = 2,
+   .reset_gpio = 61,
+   .vcc_gpio = -EINVAL,
+   },
+};
+
 static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
 
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-   .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
-   .phy_reset  = true,
-   .reset_gpio_port[0]  = 57,
-   .reset_gpio_port[1]  = 61,
-   .reset_gpio_port[2]  = -EINVAL
 };
 
 #ifdef CONFIG_OMAP_MUX
@@ -606,6 +613,8 @@ static void __init omap_3430sdp_init(void)
board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
sdp3430_display_init();
enable_board_wakeup_source();
+
+   usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(usbhs_bdata);
 }
 
-- 
1.7.4.1

--
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 v4 09/21] ARM: OMAP3: cm-t35: Adapt to ehci-omap changes

2013-03-20 Thread Roger Quadros
Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY devices.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/board-cm-t35.c |   20 ++--
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/board-cm-t35.c 
b/arch/arm/mach-omap2/board-cm-t35.c
index af2bb21..7fda3f5 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -419,15 +419,22 @@ static struct omap2_hsmmc_info mmc[] = {
{}  /* Terminator */
 };
 
+static struct usbhs_phy_data phy_data[] __initdata = {
+   {
+   .port = 1,
+   .reset_gpio = OMAP_MAX_GPIO_LINES + 6,
+   .vcc_gpio = -EINVAL,
+   },
+   {
+   .port = 2,
+   .reset_gpio = OMAP_MAX_GPIO_LINES + 7,
+   .vcc_gpio = -EINVAL,
+   },
+};
+
 static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
-   .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
-   .phy_reset  = true,
-   .reset_gpio_port[0]  = OMAP_MAX_GPIO_LINES + 6,
-   .reset_gpio_port[1]  = OMAP_MAX_GPIO_LINES + 7,
-   .reset_gpio_port[2]  = -EINVAL
 };
 
 static void  __init cm_t35_init_usbh(void)
@@ -444,6 +451,7 @@ static void  __init cm_t35_init_usbh(void)
msleep(1);
}
 
+   usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(usbhs_bdata);
 }
 
-- 
1.7.4.1

--
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 v4 08/21] ARM: OMAP: AM3517evm: Adapt to ehci-omap changes

2013-03-20 Thread Roger Quadros
Use usbhs_init_phys() to register the PHY's RESET regulators
and the NOP PHY device.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/board-am3517evm.c |   17 ++---
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/board-am3517evm.c 
b/arch/arm/mach-omap2/board-am3517evm.c
index 9fb8590..191f976 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -274,6 +274,14 @@ static __init void am3517_evm_mcbsp1_init(void)
omap_ctrl_writel(devconf0, OMAP2_CONTROL_DEVCONF0);
 }
 
+static struct usbhs_phy_data phy_data[] __initdata = {
+   {
+   .port = 1,
+   .reset_gpio = 57,
+   .vcc_gpio = -EINVAL,
+   },
+};
+
 static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
 #if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \
@@ -282,12 +290,6 @@ static struct usbhs_omap_platform_data usbhs_bdata 
__initdata = {
 #else
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
 #endif
-   .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
-   .phy_reset  = true,
-   .reset_gpio_port[0]  = 57,
-   .reset_gpio_port[1]  = -EINVAL,
-   .reset_gpio_port[2]  = -EINVAL
 };
 
 #ifdef CONFIG_OMAP_MUX
@@ -349,7 +351,6 @@ static struct omap2_hsmmc_info mmc[] = {
{}  /* Terminator */
 };
 
-
 static void __init am3517_evm_init(void)
 {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
@@ -361,6 +362,8 @@ static void __init am3517_evm_init(void)
 
/* Configure GPIO for EHCI port */
omap_mux_init_gpio(57, OMAP_PIN_OUTPUT);
+
+   usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(usbhs_bdata);
am3517_evm_hecc_init(am3517_evm_hecc_pdata);
/* DSS */
-- 
1.7.4.1

--
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 v4 07/21] ARM: OMAP: AM3517crane: Adapt to ehci-omap changes

2013-03-20 Thread Roger Quadros
Use usbhs_init_phys() to register the PHY's VCC and RESET
regulators and the NOP PHY device.

Signed-off-by: Roger Quadros rog...@ti.com
---
 arch/arm/mach-omap2/board-am3517crane.c |   24 ++--
 1 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-omap2/board-am3517crane.c 
b/arch/arm/mach-omap2/board-am3517crane.c
index 7d3358b..fc53911 100644
--- a/arch/arm/mach-omap2/board-am3517crane.c
+++ b/arch/arm/mach-omap2/board-am3517crane.c
@@ -47,15 +47,17 @@ static struct omap_board_mux board_mux[] __initdata = {
 };
 #endif
 
+static struct usbhs_phy_data phy_data[] __initdata = {
+   {
+   .port = 1,
+   .reset_gpio = GPIO_USB_NRESET,
+   .vcc_gpio = GPIO_USB_POWER,
+   .vcc_polarity = 1,
+   },
+};
+
 static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
-   .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
-   .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
-
-   .phy_reset  = true,
-   .reset_gpio_port[0]  = GPIO_USB_NRESET,
-   .reset_gpio_port[1]  = -EINVAL,
-   .reset_gpio_port[2]  = -EINVAL
 };
 
 static struct mtd_partition crane_nand_partitions[] = {
@@ -131,13 +133,7 @@ static void __init am3517_crane_init(void)
return;
}
 
-   ret = gpio_request_one(GPIO_USB_POWER, GPIOF_OUT_INIT_HIGH,
-  usb_ehci_enable);
-   if (ret  0) {
-   pr_err(Can not request GPIO %d\n, GPIO_USB_POWER);
-   return;
-   }
-
+   usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
usbhs_init(usbhs_bdata);
am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1);
 }
-- 
1.7.4.1

--
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 v4 01/21] usb: phy: nop: Add some parameters to platform data

2013-03-20 Thread Felipe Balbi
On Wed, Mar 20, 2013 at 05:44:40PM +0200, Roger Quadros wrote:
 Add clk_rate parameter to platform data. If supplied, the
 NOP phy driver will program the clock to that rate during probe.
 
 Also add 2 flags, needs_vcc and needs_reset.
 If the flag is set and the regulator couldn't be found
 then the driver will bail out with -EPROBE_DEFER.
 
 Signed-off-by: Roger Quadros rog...@ti.com
 Acked-by: Felipe Balbi ba...@ti.com

Hi Tony,

maybe you might prefer to merge commit 1f0972f from my next branch which
is exactly this patch. Basically, if you:

$ git fetch git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
$ git merge 1f0972f

you get $SUBJECT and can apply the others without fear of conflicts
later.

cheers

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH 0/5] usb: musb/otg: cleanup and fixes

2013-03-20 Thread Felipe Balbi
On Wed, Mar 20, 2013 at 08:52:36PM +0530, kishon wrote:
 Felipe,
 
 On Wednesday 20 March 2013 06:42 PM, Felipe Balbi wrote:
 On Wed, Mar 13, 2013 at 02:17:05PM +0530, Kishon Vijay Abraham I wrote:
 This series has some misc cleanup and fixes. The fix solves the cold
 plug issue in omap3 which some have reported. Developed these patches on
 Linux 3.9-rc2 after applying 
 http://www.spinics.net/lists/linux-usb/msg81563.html
 (Grazvydas Ignotas patch series)
 
 Tested for g_zero enumeration in pandaboard and beagleboard in both
 cold plug and hot plug case. Any kind of testing for this series is welcome.
 
 Kishon Vijay Abraham I (5):
usb: musb: omap: remove the check before calling otg_set_vbus
usb: musb: omap: always glue have the correct vbus/id status
usb: otg: twl4030: use devres API for regulator get and request irq
usb: musb: omap: add usb_phy_init in omap2430_musb_init
usb: otg: twl4030: fix cold plug on OMAP3
 
   drivers/usb/musb/omap2430.c   |   22 ++
   drivers/usb/otg/twl4030-usb.c |   35 ---
   2 files changed, 22 insertions(+), 35 deletions(-)
 
 this needs to be rebased against my 'next' branch.
 
 The v2 of this series is already in your testing branch. You still
 want it to be rebased to your 'next' branch?

sorry, no need. I just forgot to mark this one as read. My bad.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH v4 01/21] usb: phy: nop: Add some parameters to platform data

2013-03-20 Thread Tony Lindgren
* Felipe Balbi ba...@ti.com [130320 09:00]:
 On Wed, Mar 20, 2013 at 05:44:40PM +0200, Roger Quadros wrote:
  Add clk_rate parameter to platform data. If supplied, the
  NOP phy driver will program the clock to that rate during probe.
  
  Also add 2 flags, needs_vcc and needs_reset.
  If the flag is set and the regulator couldn't be found
  then the driver will bail out with -EPROBE_DEFER.
  
  Signed-off-by: Roger Quadros rog...@ti.com
  Acked-by: Felipe Balbi ba...@ti.com
 
 Hi Tony,
 
 maybe you might prefer to merge commit 1f0972f from my next branch which
 is exactly this patch. Basically, if you:
 
 $ git fetch git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
 $ git merge 1f0972f
 
 you get $SUBJECT and can apply the others without fear of conflicts
 later.

OK thanks will use commit 1f0972f, so let's consider that commit immutable.

Regards,

Tony
--
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 v4 01/21] usb: phy: nop: Add some parameters to platform data

2013-03-20 Thread Felipe Balbi
On Wed, Mar 20, 2013 at 09:13:24AM -0700, Tony Lindgren wrote:
 * Felipe Balbi ba...@ti.com [130320 09:00]:
  On Wed, Mar 20, 2013 at 05:44:40PM +0200, Roger Quadros wrote:
   Add clk_rate parameter to platform data. If supplied, the
   NOP phy driver will program the clock to that rate during probe.
   
   Also add 2 flags, needs_vcc and needs_reset.
   If the flag is set and the regulator couldn't be found
   then the driver will bail out with -EPROBE_DEFER.
   
   Signed-off-by: Roger Quadros rog...@ti.com
   Acked-by: Felipe Balbi ba...@ti.com
  
  Hi Tony,
  
  maybe you might prefer to merge commit 1f0972f from my next branch which
  is exactly this patch. Basically, if you:
  
  $ git fetch git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
  $ git merge 1f0972f
  
  you get $SUBJECT and can apply the others without fear of conflicts
  later.
 
 OK thanks will use commit 1f0972f, so let's consider that commit immutable.

yeah, once it hits my 'next' branch, I don't rebase anymore.

cheers

ps: that's valid for 'next' and 'fixes'

-- 
balbi


signature.asc
Description: Digital signature


Re: Beagleboard xM - Bogomips are very low

2013-03-20 Thread Guillaume Gardet


Le 20/03/2013 13:48, Frank Agius a écrit :

On 3/19/2013 11:17 AM, Guillaume Gardet wrote:

Hi,

On a Beagleboard xM rev. B, I noticed that vanilla kernel 3.4.6 have the
folowing bogomips for 300MHz and 800 MHz operations: 262.08 and 700.57.

With kernel 3.7.10, I have : 175.65 and 467.41 bogompis.

Any idea why bogomips are so low now?



I believe this is the reason for the BogoMIPS change:

http://www.spinics.net/lists/arm-kernel/msg221672.html

It looks like BogoMIPS reporting changed because of the delay routine patch 
introduced in 3.6.  So the change in BogoMIPS is real, but should not be a 
concern.


Thanks for the pointer. So, it should not affect performances.
I will try to bench it, to be sure there is no hidden problem.

Thanks.


Guillaume




frank agius


Guillaume

--
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






--
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: OMAP: fix typo CONFIG_SMC91x_MODULE

2013-03-20 Thread Tony Lindgren
* Paul Bolle pebo...@tiscali.nl [130308 04:10]:
 There's a (rather subtle) typo in CONFIG_SMC91x_MODULE. Fix it once
 and for all by using IS_ENABLED(), which is designed to avoid issues
 like this.
 
 Signed-off-by: Paul Bolle pebo...@tiscali.nl
 ---
 Untested! And this needs build- and runtime testing, especially for the
 MODULE case!

Thanks looks good to me. Since this is for legacy platforms and been
broken for quite a while, I'll apply it into omap-for-v3.10/fixes-non-critical.

Regards,

Tony
 
  arch/arm/mach-omap2/board-2430sdp.c | 2 +-
  arch/arm/mach-omap2/board-h4.c  | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
 b/arch/arm/mach-omap2/board-2430sdp.c
 index a3e0aaa..cb0596b 100644
 --- a/arch/arm/mach-omap2/board-2430sdp.c
 +++ b/arch/arm/mach-omap2/board-2430sdp.c
 @@ -166,7 +166,7 @@ static void __init sdp2430_display_init(void)
   omap_display_init(sdp2430_dss_data);
  }
  
 -#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91x_MODULE)
 +#if IS_ENABLED(CONFIG_SMC91X)
  
  static struct omap_smc91x_platform_data board_smc91x_data = {
   .cs = 5,
 diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
 index 812c829..5b4ec51 100644
 --- a/arch/arm/mach-omap2/board-h4.c
 +++ b/arch/arm/mach-omap2/board-h4.c
 @@ -246,7 +246,7 @@ static u32 is_gpmc_muxed(void)
   return 0;
  }
  
 -#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91x_MODULE)
 +#if IS_ENABLED(CONFIG_SMC91X)
  
  static struct omap_smc91x_platform_data board_smc91x_data = {
   .cs = 1,
 -- 
 1.7.11.7
 
--
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/2] dmaengine: OMAP: Register SDMA controller with Device Tree DMA driver

2013-03-20 Thread Tony Lindgren
* Jon Hunter jon-hun...@ti.com [130319 09:08]:
 Vinod, Tony, Benoit,
 
 On 02/26/2013 12:27 PM, Jon Hunter wrote:
  If the device-tree blob is present during boot, then register the SDMA
  controller with the device-tree DMA driver so that we can use device-tree
  to look-up DMA client information.
  
  Signed-off-by: Jon Hunter jon-hun...@ti.com
  Reviewed-by: Felipe Balbi ba...@ti.com
  Acked-by: Santosh Shilimkar santosh.shilim...@ti.com
  Tested-by: Santosh Shilimkar santosh.shilim...@ti.com
  ---
   arch/arm/mach-omap2/dma.c |4 
   drivers/dma/omap-dma.c|   38 --
   2 files changed, 40 insertions(+), 2 deletions(-)
  
  diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
  index dab9fc0..49fd0d5 100644
  --- a/arch/arm/mach-omap2/dma.c
  +++ b/arch/arm/mach-omap2/dma.c
  @@ -28,6 +28,7 @@
   #include linux/init.h
   #include linux/device.h
   #include linux/dma-mapping.h
  +#include linux/of.h
   #include linux/omap-dma.h
   
   #include soc.h
  @@ -304,6 +305,9 @@ static int __init omap2_system_dma_init(void)
  if (res)
  return res;
   
  +   if (of_have_populated_dt())
  +   return res;
  +
  pdev = platform_device_register_full(omap_dma_dev_info);
  if (IS_ERR(pdev))
  return PTR_ERR(pdev);

AFAIK we don't currently have anything else touching this file..

  diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
  index c4b4fd2..2ea3d7e 100644
  --- a/drivers/dma/omap-dma.c
  +++ b/drivers/dma/omap-dma.c
  @@ -16,6 +16,8 @@
   #include linux/platform_device.h
   #include linux/slab.h
   #include linux/spinlock.h
  +#include linux/of_dma.h
  +#include linux/of_device.h
   
   #include virt-dma.h
   
  @@ -67,6 +69,10 @@ static const unsigned es_bytes[] = {
  [OMAP_DMA_DATA_TYPE_S32] = 4,
   };
   
  +static struct of_dma_filter_info omap_dma_info = {
  +   .filter_fn = omap_dma_filter_fn,
  +};
  +
   static inline struct omap_dmadev *to_omap_dma_dev(struct dma_device *d)
   {
  return container_of(d, struct omap_dmadev, ddev);
  @@ -621,8 +627,22 @@ static int omap_dma_probe(struct platform_device *pdev)
  pr_warn(OMAP-DMA: failed to register slave DMA engine device: 
  %d\n,
  rc);
  omap_dma_free(od);
  -   } else {
  -   platform_set_drvdata(pdev, od);
  +   return rc;
  +   }
  +
  +   platform_set_drvdata(pdev, od);
  +
  +   if (pdev-dev.of_node) {
  +   omap_dma_info.dma_cap = od-ddev.cap_mask;
  +
  +   /* Device-tree DMA controller registration */
  +   rc = of_dma_controller_register(pdev-dev.of_node,
  +   of_dma_simple_xlate, omap_dma_info);
  +   if (rc) {
  +   pr_warn(OMAP-DMA: failed to register DMA 
  controller\n);
  +   dma_async_device_unregister(od-ddev);
  +   omap_dma_free(od);
  +   }
  }
   
  dev_info(pdev-dev, OMAP DMA engine driver\n);
  @@ -634,18 +654,32 @@ static int omap_dma_remove(struct platform_device 
  *pdev)
   {
  struct omap_dmadev *od = platform_get_drvdata(pdev);
   
  +   if (pdev-dev.of_node)
  +   of_dma_controller_free(pdev-dev.of_node);
  +
  dma_async_device_unregister(od-ddev);
  omap_dma_free(od);
   
  return 0;
   }
   
  +static const struct of_device_id omap_dma_match[] = {
  +   { .compatible = ti,omap2420-sdma, },
  +   { .compatible = ti,omap2430-sdma, },
  +   { .compatible = ti,omap3430-sdma, },
  +   { .compatible = ti,omap3630-sdma, },
  +   { .compatible = ti,omap4430-sdma, },
  +   {},
  +};
  +MODULE_DEVICE_TABLE(of, omap_dma_match);
  +
   static struct platform_driver omap_dma_driver = {
  .probe  = omap_dma_probe,
  .remove = omap_dma_remove,
  .driver = {
  .name = omap-dma-engine,
  .owner = THIS_MODULE,
  +   .of_match_table = of_match_ptr(omap_dma_match),
  },
   };
 
 Who's tree does it make most sense for this patch to go through?
 
 Benoit has queued up patch 1/2 and so I am not sure if this should go
 via Benoit tree to Tony or directly via Vinod's tree. What are your
 thoughts?

OK
 
 It would be great if this could make v3.10.

I suggest Vinod/Grant/Linus W queue this patch:

Acked-by: Tony Lindgren t...@atomide.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: [RFC 0/2] ARM: OMAP: dma.h cleanup

2013-03-20 Thread Tony Lindgren
* Jarkko Nikula jarkko.nik...@bitmer.com [130313 13:20]:
 I don't know is this good or bad idea, thus RFC.
 
 I got this idea after noticing that McBSP DMA channel definitions are no
 longer used for OMAP2 and EAC DMA channel were never used in upstream.
 Scripts here are used to remove all of those unused ones.
 
 Build tested with omap1_defconfig and omap2plus_defconfig.

Yeah let's get rid of them. I'll apply these into omap-for-v3.10/cleanup.

Regards,

Tony
--
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 4/6] ARM: OMAP: USB: Add phy binding information

2013-03-20 Thread Tony Lindgren
* Kishon Vijay Abraham I kis...@ti.com [130320 02:17]:
 
 --- a/arch/arm/mach-omap2/board-2430sdp.c
 +++ b/arch/arm/mach-omap2/board-2430sdp.c
 @@ -265,6 +266,7 @@ static void __init omap_2430sdp_init(void)
  
   omap_mux_init_signal(usb0hs_stp, OMAP_PULL_ENA | OMAP_PULL_UP);
   usb_bind_phy(musb-hdrc.0.auto, 0, twl4030_usb);
 + phy_bind(musb-hdrc.0.auto, 0, twl4030_usb);
   usb_musb_init(NULL);
  
   board_smc91x_init();
 --- a/arch/arm/mach-omap2/board-3430sdp.c
 +++ b/arch/arm/mach-omap2/board-3430sdp.c
 @@ -601,6 +602,7 @@ static void __init omap_3430sdp_init(void)
   omap_serial_init();
   omap_sdrc_init(hyb18m512160af6_sdrc_params, NULL);
   usb_bind_phy(musb-hdrc.0.auto, 0, twl4030_usb);
 + phy_bind(musb-hdrc.0.auto, 0, twl4030_usb);
   usb_musb_init(NULL);
   board_smc91x_init();
   board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);

Can't you call phy_bind() from usb_musb_init() with the default
values automatically when usb_musb_init() is passed NULL?

That way you don't have to patch every board-*.c file with the
same lines, and don't need to include linux/phy/phy.h in each
board-*.c file.

 --- a/arch/arm/mach-omap2/board-4430sdp.c
 +++ b/arch/arm/mach-omap2/board-4430sdp.c
 @@ -32,6 +32,7 @@
  #include linux/platform_data/omap4-keypad.h
  #include linux/usb/musb.h
  #include linux/usb/phy.h
 +#include linux/phy/phy.h
  
  #include asm/mach-types.h
  #include asm/mach/arch.h
 @@ -725,6 +726,7 @@ static void __init omap_4430sdp_init(void)
   omap4_twl6030_hsmmc_init(mmc);
  
   usb_bind_phy(musb-hdrc.0.auto, 0, omap-usb2.1.auto);
 + phy_bind(musb-hdrc.0.auto, 0, omap-usb2.1.auto);
   usb_musb_init(musb_board_data);
  
   status = omap_ethernet_init();

Here usb_musb_init() gets called with musb_board_data, so
keeping the phy_bind() in the board-4430sdp.c can then override
the default in usb_musb_init().

Regards,

Tony
--
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] drivers: video: omap2: dss: Use PTR_RET function

2013-03-20 Thread Tomi Valkeinen
On 2013-03-20 17:44, Jon Hunter wrote:
 
 On 03/20/2013 06:56 AM, Tomi Valkeinen wrote:
 On 2013-03-19 10:03, Alexandru Gheorghiu wrote:
 Use PTR_RET function instead of IS_ERR and PTR_ERR.
 Patch found using coccinelle.

 Signed-off-by: Alexandru Gheorghiu gheorghiuan...@gmail.com
 ---
  drivers/video/omap2/dss/core.c |5 +
  1 file changed, 1 insertion(+), 4 deletions(-)

 diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
 index f8779d4..60cc6fe 100644
 --- a/drivers/video/omap2/dss/core.c
 +++ b/drivers/video/omap2/dss/core.c
 @@ -181,10 +181,7 @@ int dss_debugfs_create_file(const char *name, void 
 (*write)(struct seq_file *))
 d = debugfs_create_file(name, S_IRUGO, dss_debugfs_dir,
 write, dss_debug_fops);
  
 -   if (IS_ERR(d))
 -   return PTR_ERR(d);
 -
 -   return 0;
 +   return PTR_RET(d);
  }
  #else /* CONFIG_OMAP2_DSS_DEBUGFS */
  static inline int dss_initialize_debugfs(void)


 Thanks. I'll apply to omapdss tree.
 
 Is this correct? If debugfs_create_file() returns a valid pointer, then
 now dss_debugfs_create_file() will return a non-zero value on success. I
 don't think this is what you want. A similar case came up recently here [1].

Hmm. I don't follow. And I don't understand the post where you referred.

PTR_RET is defined as:

if (IS_ERR(ptr))
return PTR_ERR(ptr);
else
return 0;

How's that different from the original code?

 Tomi




signature.asc
Description: OpenPGP digital signature


Re: [PATCH] drivers: video: omap2: dss: Use PTR_RET function

2013-03-20 Thread Jon Hunter

On 03/20/2013 11:59 AM, Tomi Valkeinen wrote:
 On 2013-03-20 17:44, Jon Hunter wrote:

 On 03/20/2013 06:56 AM, Tomi Valkeinen wrote:
 On 2013-03-19 10:03, Alexandru Gheorghiu wrote:
 Use PTR_RET function instead of IS_ERR and PTR_ERR.
 Patch found using coccinelle.

 Signed-off-by: Alexandru Gheorghiu gheorghiuan...@gmail.com
 ---
  drivers/video/omap2/dss/core.c |5 +
  1 file changed, 1 insertion(+), 4 deletions(-)

 diff --git a/drivers/video/omap2/dss/core.c 
 b/drivers/video/omap2/dss/core.c
 index f8779d4..60cc6fe 100644
 --- a/drivers/video/omap2/dss/core.c
 +++ b/drivers/video/omap2/dss/core.c
 @@ -181,10 +181,7 @@ int dss_debugfs_create_file(const char *name, void 
 (*write)(struct seq_file *))
d = debugfs_create_file(name, S_IRUGO, dss_debugfs_dir,
write, dss_debug_fops);
  
 -  if (IS_ERR(d))
 -  return PTR_ERR(d);
 -
 -  return 0;
 +  return PTR_RET(d);
  }
  #else /* CONFIG_OMAP2_DSS_DEBUGFS */
  static inline int dss_initialize_debugfs(void)


 Thanks. I'll apply to omapdss tree.

 Is this correct? If debugfs_create_file() returns a valid pointer, then
 now dss_debugfs_create_file() will return a non-zero value on success. I
 don't think this is what you want. A similar case came up recently here [1].
 
 Hmm. I don't follow. And I don't understand the post where you referred.
 
 PTR_RET is defined as:
 
 if (IS_ERR(ptr))
 return PTR_ERR(ptr);
 else
 return 0;
 
 How's that different from the original code?

Oops sorry, I missed that you were returning PTR_RET() and not
PTR_ERR(). Yes that looks fine. Sorry for the noise!

Jon
--
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] drivers: video: omap2: dss: Use PTR_RET function

2013-03-20 Thread Jon Hunter

On 03/20/2013 01:02 PM, Jon Hunter wrote:
 
 On 03/20/2013 11:59 AM, Tomi Valkeinen wrote:
 On 2013-03-20 17:44, Jon Hunter wrote:

 On 03/20/2013 06:56 AM, Tomi Valkeinen wrote:
 On 2013-03-19 10:03, Alexandru Gheorghiu wrote:
 Use PTR_RET function instead of IS_ERR and PTR_ERR.
 Patch found using coccinelle.

 Signed-off-by: Alexandru Gheorghiu gheorghiuan...@gmail.com
 ---
  drivers/video/omap2/dss/core.c |5 +
  1 file changed, 1 insertion(+), 4 deletions(-)

 diff --git a/drivers/video/omap2/dss/core.c 
 b/drivers/video/omap2/dss/core.c
 index f8779d4..60cc6fe 100644
 --- a/drivers/video/omap2/dss/core.c
 +++ b/drivers/video/omap2/dss/core.c
 @@ -181,10 +181,7 @@ int dss_debugfs_create_file(const char *name, void 
 (*write)(struct seq_file *))
   d = debugfs_create_file(name, S_IRUGO, dss_debugfs_dir,
   write, dss_debug_fops);
  
 - if (IS_ERR(d))
 - return PTR_ERR(d);
 -
 - return 0;
 + return PTR_RET(d);
  }
  #else /* CONFIG_OMAP2_DSS_DEBUGFS */
  static inline int dss_initialize_debugfs(void)


 Thanks. I'll apply to omapdss tree.

 Is this correct? If debugfs_create_file() returns a valid pointer, then
 now dss_debugfs_create_file() will return a non-zero value on success. I
 don't think this is what you want. A similar case came up recently here [1].

 Hmm. I don't follow. And I don't understand the post where you referred.

Yes looking at Russell's response I am not sure I following now as it is
also using PTR_RET() and not PTR_ERR(). My eyes deceived me on this one.

Jon
--
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] mach_omap2: use PTR_RET instead of IS_ERR + PTR_ERR

2013-03-20 Thread Jon Hunter

On 03/12/2013 06:05 AM, Russell King - ARM Linux wrote:
 On Tue, Mar 12, 2013 at 09:58:29AM +0200, Silviu-Mihai Popescu wrote:
 This uses PTR_RET instead of IS_ERR and PTR_ERR in order to increase
 readability.

 Signed-off-by: Silviu-Mihai Popescu silviupopescu1...@gmail.com
 ---
  arch/arm/mach-omap2/devices.c |4 ++--
  arch/arm/mach-omap2/fb.c  |5 +
  arch/arm/mach-omap2/gpmc.c|2 +-
  arch/arm/mach-omap2/pmu.c |5 +
  4 files changed, 5 insertions(+), 11 deletions(-)

 diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
 index 1ec7f05..2a0816e 100644
 --- a/arch/arm/mach-omap2/devices.c
 +++ b/arch/arm/mach-omap2/devices.c
 @@ -66,7 +66,7 @@ static int __init omap3_l3_init(void)
  
  WARN(IS_ERR(pdev), could not build omap_device for %s\n, oh_name);
  
 -return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
 +return PTR_RET(pdev);
 
 This is incorrect.
 
 The return value will be tested for  0.  Kernel pointers in general are
 all above 3GB, and so are all  0.
 
 I'm afraid none of these changes stuff is an improvement - they all
 introduce bugs.

Sorry I am now not sure I follow you here. Someone just pointed out to
me that PTR_RET() is defined as ...

static inline int __must_check PTR_RET(const void *ptr)
{
if (IS_ERR(ptr))
return PTR_ERR(ptr);
else
return 0;
}

So the above change appears to be equivalent. Is there something that is
wrong with the current implementation that needs to be fixed?

Jon
--
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 0/2] ARM: dts: OMAP4+: Add dmm device bindings

2013-03-20 Thread Andy Gross
This patch set adds devicetree bindings for the Dynamic Memory Manager (DMM)
inside the OMAP4 and OMAP5 devices, removes generation of the device node via
the hwmod, and adds documentation for the minimal binding.

This patch series is based on device tree patches queued up for OMAP 3.10.

Patches are located at:
https://github.com/andygross/omap_dmm_tiler/commits/for-benoit

Changes in v2:
- Moved documentation file to bindings patch.
- Modified drm code to allow for cases where DT info is unavailable.

Andy Gross (2):
  ARM: dts: OMAP4+: Add DMM bindings
  ARM: OMAP2+: Don't create DMM if DT present

 Documentation/devicetree/bindings/arm/omap/dmm.txt |   16 
 arch/arm/boot/dts/omap4.dtsi   |7 +++
 arch/arm/boot/dts/omap5.dtsi   |7 +++
 arch/arm/mach-omap2/drm.c  |   18 --
 4 files changed, 42 insertions(+), 6 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/omap/dmm.txt

-- 
1.7.5.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 v2 2/2] ARM: OMAP2+: Don't create DMM if DT present

2013-03-20 Thread Andy Gross
Added code to conditionally skip over creating a DMM device from the
hwmod information if there is a DMM node present in the DT.

Signed-off-by: Andy Gross andy.gr...@ti.com
---
 arch/arm/mach-omap2/drm.c |   18 --
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/drm.c b/arch/arm/mach-omap2/drm.c
index 59a4af7..01a0c6a 100644
--- a/arch/arm/mach-omap2/drm.c
+++ b/arch/arm/mach-omap2/drm.c
@@ -24,6 +24,7 @@
 #include linux/platform_device.h
 #include linux/dma-mapping.h
 #include linux/platform_data/omap_drm.h
+#include linux/of.h
 
 #include soc.h
 #include omap_device.h
@@ -47,13 +48,18 @@ static int __init omap_init_drm(void)
struct omap_hwmod *oh = NULL;
struct platform_device *pdev;
 
-   /* lookup and populate the DMM information, if present - OMAP4+ */
-   oh = omap_hwmod_lookup(dmm);
+   if (!of_have_populated_dt()  ||
+   !of_find_compatible_node(NULL, NULL, ti,dmm)) {
 
-   if (oh) {
-   pdev = omap_device_build(oh-name, -1, oh, NULL, 0);
-   WARN(IS_ERR(pdev), Could not build omap_device for %s\n,
-   oh-name);
+   /* resort to hwmod lookup - LEGACY */
+   /* lookup and populate the DMM information, OMAP4+ only */
+   oh = omap_hwmod_lookup(dmm);
+
+   if (oh) {
+   pdev = omap_device_build(oh-name, -1, oh, NULL, 0);
+   WARN(IS_ERR(pdev), Could not build device for %s\n,
+   oh-name);
+   }
}
 
platform_data.omaprev = GET_OMAP_TYPE;
-- 
1.7.5.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 v2 1/2] ARM: dts: OMAP4+: Add DMM bindings

2013-03-20 Thread Andy Gross
Add Dynamic Memory Manager (DMM) bindings for OMAP4 and OMAP5 devices.
Add documentation for the DMM bindings.

Signed-off-by: Andy Gross andy.gr...@ti.com
---
 Documentation/devicetree/bindings/arm/omap/dmm.txt |   16 
 arch/arm/boot/dts/omap4.dtsi   |7 +++
 arch/arm/boot/dts/omap5.dtsi   |7 +++
 3 files changed, 30 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/omap/dmm.txt

diff --git a/Documentation/devicetree/bindings/arm/omap/dmm.txt 
b/Documentation/devicetree/bindings/arm/omap/dmm.txt
new file mode 100644
index 000..5fd1134
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/omap/dmm.txt
@@ -0,0 +1,16 @@
+OMAP Dynamic Memory Manager (DMM) bindings
+
+Required properties:
+- compatible:  Must be ti,dmm for OMAP processors containing DMM block
+- reg: Contains timer register address range (base address and length)
+- interrupts:  Contains interrupt information (source, etc) for the DMM IRQ
+- ti,hwmods:   Name of the hwmod associated to the counter, which is typically
+   dmm
+
+Example:
+
+dmm: dmm@4e00 {
+   compatible = ti,dmm;
+   reg = 0x4e00 0x800;
+   ti,hwmods = dmm;
+};
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index ddfc54a..749fe83 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -624,5 +624,12 @@
ram-bits = 12;
ti,has-mailbox;
};
+
+   dmm: dmm@4e00 {
+   compatible = ti,dmm;
+   reg = 0x4e00 0x800;
+   interrupts = 0 113 0x4;
+   ti,hwmods = dmm;
+   };
};
 };
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index b760c11..c2d2ecc 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -650,5 +650,12 @@
ctrl-module = omap_control_usb;
};
};
+
+   dmm: dmm@4e00 {
+   compatible = ti,dmm;
+   reg = 0x4e00 0x800;
+   interrupts = 0 113 0x4;
+   ti,hwmods = dmm;
+   };
};
 };
-- 
1.7.5.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: [PATCH v3 5/6] ARM: dts: omap: update usb_otg_hs data

2013-03-20 Thread Stephen Warren
On 03/20/2013 03:12 AM, Kishon Vijay Abraham I wrote:
 Updated the usb_otg_hs dt data to include the *phy* and *phy-names*
 binding in order for the driver to use the new generic PHY framework.
 Also updated the Documentation to include the binding information.

 diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt 
 b/Documentation/devicetree/bindings/usb/omap-usb.txt
 index abce256..3d6f9f6 100644
 --- a/Documentation/devicetree/bindings/usb/omap-usb.txt
 +++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
 @@ -19,6 +19,9 @@ OMAP MUSB GLUE
   - power : Should be 50. This signifies the controller can supply upto
 100mA when operating in host mode.
   - usb-phy : the phandle for the PHY device
 + - phy : the phandle for the PHY device (used by generic PHY framework)
 + - phy-names : the names of the PHY corresponding to the PHYs present in the
 +   *phy* phandle.

If the intent is for those properties to be generic and used by any DT
binding that refers to a PHY node, I think you'd want to define those
properties in e.g. Documentation/devicetree/bindings/phy/phy.txt, just
like common clock/GPIO/... properties are defined in standalone common
files.

I think you want to require that DT nodes that represent PHYs have a
#phy-cells property, and that the format of the phy property be
phy_phandle phy_specifier*, where #phy-cells in the referenced node
defines how many cells are part of phy_specifier*, just like (almost)
any other DT property that references another node by phandle. That way,
if a single DT node represents a HW block that implements e.g. 3 PHYs,
it can use #phy-cells = 1, and the referencing phy property can
include a cell that indicates which of those 3 PHYs is being referenced.
--
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: convert arm/arm64 arch timer to use CLKSRC_OF init

2013-03-20 Thread Rob Herring
From: Rob Herring rob.herr...@calxeda.com

This converts arm and arm64 to use CLKSRC_OF DT based initialization for
the arch timer. A new function arch_timer_arch_init is added to allow for
arch specific setup.

This has a side effect of enabling sched_clock on omap5 and exynos5. There
should not be any reason not to use the arch timers for sched_clock.

Signed-off-by: Rob Herring rob.herr...@calxeda.com
Cc: Russell King li...@arm.linux.org.uk
Cc: Kukjin Kim kgene@samsung.com
Cc: Tony Lindgren t...@atomide.com
Cc: Simon Horman ho...@verge.net.au
Cc: Magnus Damm magnus.d...@gmail.com
Cc: Catalin Marinas catalin.mari...@arm.com
Cc: Will Deacon will.dea...@arm.com
Cc: John Stultz john.stu...@linaro.org
Cc: Thomas Gleixner t...@linutronix.de
Cc: linux-samsung-...@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Cc: linux...@vger.kernel.org
---
This is dependent on my CLKSRC_OF clean-up in arm-soc, my 64-bit sched_clock
support series, and Arnd's default machine descriptor patch (for default
clocksource_of_init call). This is only compile tested on arm.

The full series (including sp804 work) is available here:
git://sources.calxeda.com/kernel/linux.git arm-timers

Rob

 arch/arm/include/asm/arch_timer.h|   13 +
 arch/arm/kernel/arch_timer.c |   17 +++--
 arch/arm/mach-exynos/mach-exynos5-dt.c   |1 -
 arch/arm/mach-exynos/mct.c   |6 --
 arch/arm/mach-highbank/highbank.c|5 +
 arch/arm/mach-omap2/timer.c  |5 +
 arch/arm/mach-shmobile/board-kzm9d.c |1 -
 arch/arm/mach-shmobile/include/mach/common.h |1 -
 arch/arm/mach-shmobile/setup-emev2.c |1 -
 arch/arm/mach-shmobile/setup-r8a7740.c   |1 -
 arch/arm/mach-shmobile/setup-sh7372.c|1 -
 arch/arm/mach-shmobile/setup-sh73a0.c|1 -
 arch/arm/mach-shmobile/timer.c   |6 --
 arch/arm/mach-vexpress/v2m.c |7 ++-
 arch/arm/mach-virt/virt.c|9 -
 arch/arm64/include/asm/arch_timer.h  |5 +
 arch/arm64/kernel/time.c |6 --
 drivers/clocksource/Kconfig  |1 +
 drivers/clocksource/arm_arch_timer.c |   22 ++
 include/clocksource/arm_arch_timer.h |6 --
 20 files changed, 24 insertions(+), 91 deletions(-)

diff --git a/arch/arm/include/asm/arch_timer.h 
b/arch/arm/include/asm/arch_timer.h
index 7ade91d..7c1bfc0 100644
--- a/arch/arm/include/asm/arch_timer.h
+++ b/arch/arm/include/asm/arch_timer.h
@@ -10,8 +10,7 @@
 #include clocksource/arm_arch_timer.h
 
 #ifdef CONFIG_ARM_ARCH_TIMER
-int arch_timer_of_register(void);
-int arch_timer_sched_clock_init(void);
+int arch_timer_arch_init(void);
 
 /*
  * These register accessors are marked inline so the compiler can
@@ -110,16 +109,6 @@ static inline void __cpuinit 
arch_counter_set_user_access(void)
 
asm volatile(mcr p15, 0, %0, c14, c1, 0 : : r (cntkctl));
 }
-#else
-static inline int arch_timer_of_register(void)
-{
-   return -ENXIO;
-}
-
-static inline int arch_timer_sched_clock_init(void)
-{
-   return -ENXIO;
-}
 #endif
 
 #endif
diff --git a/arch/arm/kernel/arch_timer.c b/arch/arm/kernel/arch_timer.c
index d813ae6..d0b59bc 100644
--- a/arch/arm/kernel/arch_timer.c
+++ b/arch/arm/kernel/arch_timer.c
@@ -32,24 +32,13 @@ static void __init arch_timer_delay_timer_register(void)
register_current_timer_delay(arch_delay_timer);
 }
 
-int __init arch_timer_of_register(void)
-{
-   int ret;
-
-   ret = arch_timer_init();
-   if (ret)
-   return ret;
-
-   arch_timer_delay_timer_register();
-
-   return 0;
-}
-
-int __init arch_timer_sched_clock_init(void)
+int __init arch_timer_arch_init(void)
 {
if (arch_timer_get_rate() == 0)
return -ENXIO;
 
+   arch_timer_delay_timer_register();
+
setup_sched_clock_64(arch_timer_read_counter, arch_timer_get_rate());
return 0;
 }
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c 
b/arch/arm/mach-exynos/mach-exynos5-dt.c
index acaeb14..4d97b43 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -216,7 +216,6 @@ DT_MACHINE_START(EXYNOS5_DT, SAMSUNG EXYNOS5 (Flattened 
Device Tree))
.map_io = exynos5_dt_map_io,
.init_machine   = exynos5_dt_machine_init,
.init_late  = exynos_init_late,
-   .init_time  = exynos4_timer_init,
.dt_compat  = exynos5_dt_compat,
.restart= exynos5_restart,
.reserve= exynos5_reserve,
diff --git a/arch/arm/mach-exynos/mct.c b/arch/arm/mach-exynos/mct.c
index c9d6650..04aff6a 100644
--- a/arch/arm/mach-exynos/mct.c
+++ b/arch/arm/mach-exynos/mct.c
@@ -21,7 +21,6 @@
 #include linux/percpu.h
 #include linux/of.h
 
-#include asm/arch_timer.h
 #include asm/localtimer.h
 
 #include plat/cpu.h

Re: [PATCH v3 1/6] drivers: phy: add generic PHY framework

2013-03-20 Thread Sylwester Nawrocki

Hi Kishon,

On 03/20/2013 10:12 AM, Kishon Vijay Abraham I wrote:

The PHY framework provides a set of APIs for the PHY drivers to
create/destroy a PHY and APIs for the PHY users to obtain a reference to the
PHY with or without using phandle. To obtain a reference to the PHY without
using phandle, the platform specfic intialization code (say from board file)
should have already called phy_bind with the binding information. The binding
information consists of phy's device name, phy user device name and an index.
The index is used when the same phy user binds to mulitple phys.

PHY drivers should create the PHY by passing phy_descriptor that has
describes the PHY (label, type etc..) and ops like init, exit, suspend, resume,
poweron, shutdown.

The documentation for the generic PHY framework is added in
Documentation/phy.txt and the documentation for the sysfs entry is added
in Documentation/ABI/testing/sysfs-class-phy.

Signed-off-by: Kishon Vijay Abraham Ikis...@ti.com
---

[...]

+static inline struct phy *phy_get(struct device *dev, int index)
+{
+   return ERR_PTR(-EOPNOTSUPP);


Shouldn't these be -ENOSYS ? EOPNOTSUPP is defined by POSIX as
Operation not supported on socket. And EOPNOTSUPP appears to be
mostly used in the network code in the kernel.


+}
+
+static inline struct phy *devm_phy_get(struct device *dev, int index)
+{
+   return ERR_PTR(-EOPNOTSUPP);
+}
+
+static inline struct phy *of_phy_get(struct device *dev, int index)
+{
+   return ERR_PTR(-EOPNOTSUPP);
+}
+
+static inline struct phy *devm_of_phy_get(struct device *dev, int index)
+{
+   return ERR_PTR(-EOPNOTSUPP);
+}
+
+static inline struct phy *of_phy_get_byname(struct device *dev,
+   const char *string)
+{
+   return ERR_PTR(-EOPNOTSUPP);
+}
+
+static inline struct phy *devm_of_phy_get_byname(struct device *dev,
+   const char *string)
+{
+   return ERR_PTR(-EOPNOTSUPP);
+}


Thanks,
Sylwester
--
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   >