[PATCH] ARM: dts: am43x-epos-evm: Add Missing cpsw-phy-sel for am43x-epos-evm

2014-06-06 Thread George Cherian
AM437x EPOS evm use external clock for RMII interface.
Enable the same in DT. 

Signed-off-by: George Cherian george.cher...@ti.com
Reported-by: Nishanth Menon n...@ti.com
---
 arch/arm/boot/dts/am43x-epos-evm.dts | 4 
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts 
b/arch/arm/boot/dts/am43x-epos-evm.dts
index 19f1f7e..90098f9 100644
--- a/arch/arm/boot/dts/am43x-epos-evm.dts
+++ b/arch/arm/boot/dts/am43x-epos-evm.dts
@@ -319,6 +319,10 @@
phy-mode = rmii;
 };
 
+phy_sel {
+   rmii-clock-ext;
+};
+
 i2c0 {
status = okay;
pinctrl-names = default;
-- 
1.8.3.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] ARM: dts: am43x-epos-evm: Add Missing cpsw-phy-sel for am43x-epos-evm

2014-06-06 Thread Nishanth Menon
On 06/06/2014 01:17 AM, George Cherian wrote:
 AM437x EPOS evm use external clock for RMII interface.
 Enable the same in DT. 
 
 Signed-off-by: George Cherian george.cher...@ti.com
 Reported-by: Nishanth Menon n...@ti.com
 ---
  arch/arm/boot/dts/am43x-epos-evm.dts | 4 
  1 file changed, 4 insertions(+)
 
 diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts 
 b/arch/arm/boot/dts/am43x-epos-evm.dts
 index 19f1f7e..90098f9 100644
 --- a/arch/arm/boot/dts/am43x-epos-evm.dts
 +++ b/arch/arm/boot/dts/am43x-epos-evm.dts
 @@ -319,6 +319,10 @@
   phy-mode = rmii;
  };
  
 +phy_sel {
 + rmii-clock-ext;
 +};
 +
  i2c0 {
   status = okay;
   pinctrl-names = default;
 
Where does this apply on?
With linux-next next-20140506 tag, and this patch applied, I get the
following error.

  LD  kernel/trace/built-in.o
  LD  kernel/built-in.o
build fail, Error:
Error: arch/arm/boot/dts/am43x-epos-evm.dts:219.2-3 label or path,
'phy_sel', not found
FATAL ERROR: Syntax error parsing input tree
make[1]: *** [arch/arm/boot/dts/am43x-epos-evm.dtb] Error 1
make[1]: *** Waiting for unfinished jobs
make: *** [dtbs] Error 2
make: *** Waiting for unfinished jobs

in the future, it is helpful if you can point out that this is a
regression seen on next-20140603 and the patch needs to be applied on
some specific branch.

for the record:
last working next tag:
https://github.com/nmenon/kernel-test-logs/blob/next-20140602/omap2plus_defconfig/am43xx-epos.txt

first broken next tag:
https://github.com/nmenon/kernel-test-logs/blob/next-20140603/omap2plus_defconfig/am43xx-epos.txt


-- 
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: [PATCH] ARM: dts: am43x-epos-evm: Add Missing cpsw-phy-sel for am43x-epos-evm

2014-06-06 Thread Nishanth Menon
On 06/06/2014 01:53 AM, Nishanth Menon wrote:
 On 06/06/2014 01:17 AM, George Cherian wrote:
 AM437x EPOS evm use external clock for RMII interface.
 Enable the same in DT. 

 Signed-off-by: George Cherian george.cher...@ti.com
 Reported-by: Nishanth Menon n...@ti.com
 ---
  arch/arm/boot/dts/am43x-epos-evm.dts | 4 
  1 file changed, 4 insertions(+)

 diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts 
 b/arch/arm/boot/dts/am43x-epos-evm.dts
 index 19f1f7e..90098f9 100644
 --- a/arch/arm/boot/dts/am43x-epos-evm.dts
 +++ b/arch/arm/boot/dts/am43x-epos-evm.dts
 @@ -319,6 +319,10 @@
  phy-mode = rmii;
  };
  
 +phy_sel {
 +rmii-clock-ext;
 +};
 +
  i2c0 {
  status = okay;
  pinctrl-names = default;

 Where does this apply on?
 With linux-next next-20140506 tag, and this patch applied, I get the
 following error.
 
   LD  kernel/trace/built-in.o
   LD  kernel/built-in.o
 build fail, Error:
 Error: arch/arm/boot/dts/am43x-epos-evm.dts:219.2-3 label or path,
 'phy_sel', not found
 FATAL ERROR: Syntax error parsing input tree
 make[1]: *** [arch/arm/boot/dts/am43x-epos-evm.dtb] Error 1
 make[1]: *** Waiting for unfinished jobs
 make: *** [dtbs] Error 2
 make: *** Waiting for unfinished jobs
 
 in the future, it is helpful if you can point out that this is a
 regression seen on next-20140603 and the patch needs to be applied on
 some specific branch.
 
 for the record:
 last working next tag:
 https://github.com/nmenon/kernel-test-logs/blob/next-20140602/omap2plus_defconfig/am43xx-epos.txt
 
 first broken next tag:
 https://github.com/nmenon/kernel-test-logs/blob/next-20140603/omap2plus_defconfig/am43xx-epos.txt
 
 
interestingly, i just re-tested today's tag without the patch
(omap2plus_defconfig):
http://slexy.org/raw/s205sRdFvy

I wonder why the behavior change and what was being fixed here?

-- 
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: am335x: system doesn't reboot after flashing NAND

2014-06-06 Thread Roger Quadros
On 06/05/2014 01:07 PM, Yegor Yefremov wrote:
 On Thu, Jun 5, 2014 at 12:02 PM, Roger Quadros rog...@ti.com wrote:
 On 06/04/2014 10:45 PM, Yegor Yefremov wrote:
 On Wed, Jun 4, 2014 at 12:52 PM, Sekhar Nori nsek...@ti.com wrote:
 On Wednesday 04 June 2014 04:00 PM, Yegor Yefremov wrote:
 On Wed, Jun 4, 2014 at 12:20 PM, Sekhar Nori nsek...@ti.com wrote:
 On Wednesday 04 June 2014 03:11 PM, Yegor Yefremov wrote:
 On Wed, Jun 4, 2014 at 10:48 AM, Roger Quadros rog...@ti.com wrote:
 Hi,

 On 06/04/2014 11:25 AM, Yegor Yefremov wrote:
 On Wed, Jun 4, 2014 at 8:40 AM, Sekhar Nori nsek...@ti.com wrote:
 On Tuesday 03 June 2014 04:18 PM, Yegor Yefremov wrote:
 On Tue, Jun 3, 2014 at 9:57 AM, Yegor Yefremov
 yegorsli...@googlemail.com wrote:
 Kernel: 3.14, 3.15 (I haven't tried another kernels)

 As soon as I write something to my NAND flash (via cat image 
 /dev/mtdblockx or ubiupdatevol) and make reboot or press a reset
 button, I see only C and nothing happens before I make a power
 cycle. Any idea?

 Just forgot to mention, that I was actually booting from MMC (mmc1).
 The boot sequence is UART0...XIP...MMC0...NAND.

 Can you try to get XIP out of the boot sequence and see if it works?
 Maybe try to boot from mmc directly?

 This would prove that NAND/GPMC driver is leaving some state that 
 doesn't
 go well with the bootROM XIP.

 This configuration is soldered. It won't be easy to change.

 Most likely XIP is the issue if sysboot has not changed.

 The way ROM works for XIP boot is:

 1) Set chip select 0 base address to 0x0800'
 2) Read memory at 0x0800'
 3) If something else other than 0x0 or ~0x0 is found, jump to
 0x0800' and start executing.

 Can you check to see the contents of 0x0800' before and after nand
 write using mtdblock?

 Before writing:

 # devmem 0x0800 32
 0x

 After writing:

 # devmem 0x0800 32
 0xE0E0E0E0

 Okay, so this is the cause of failure to boot. I am not sure what
 operation by NAND driver causes this value to change. Perhaps you could
 bisect a bit by dumping this address at various points during the write
 operation?

 If you have a debugger it will become easy to do this.

 The 0x8000 address seems to be the beginning of NAND region:

 ranges = 0 0 0x0800 0x1000;   /* CS0: NAND */

 I've taken this example from am335x_evm.dts. I have tried to change
 the mapping to 0x9000, but kernel still uses 0x8000, Where in
 the kernel will ranges be evaluated? I'm digging thorugh
 arch/arm/mach-omap2/gpmc.c and gpmc-nand.c, but didn't really found
 the place.

 Well it doesn't. It just uses whatever was setup by the bootloader or
 randomly allocated by gpmc_cs_request().

 I'm working on fixing this up. I should be posting v2 of the GPMC refactor
 series by this week and you should be able to map the CS region as specified
 in the DT.

 Till then, maybe you can pre-configure CS0 in the bootloader to wherever you 
 want
 or alternatively call gpmc_cs_remap() after the gpmc_cs_request() in 
 gpmc_nand_init();
 
 I've found the stuff in bootloader and mapped NAND to 0x0900, but
 it didn't help.
 

Not sure why it didn't work. Was the CSVALID bit in GPMC_CONFIG7_0 register set?

If you are daring enough ;), you could try out the cleaned up GPMC code where 
remapping
should work. I still need to do some final touches before I can post it to 
mailing list.

g...@github.com:rogerq/linux.gitgpmc-3.16-temp

There are some subtle changes you need to do to the GPMC/Nand node. e.g. adding 
compatible_id,
2nd register space and interrupts. For a working example, please see 
omap3-beagle.dts.

And finally you need to enable CONFIG_TI_GPMC, which is a new kernel config 
option.

cheers,
-roger
--
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: am335x: system doesn't reboot after flashing NAND

2014-06-06 Thread jean-philippe francois
2014-06-06 11:33 GMT+02:00 Roger Quadros rog...@ti.com:
 On 06/05/2014 01:07 PM, Yegor Yefremov wrote:
 On Thu, Jun 5, 2014 at 12:02 PM, Roger Quadros rog...@ti.com wrote:
 On 06/04/2014 10:45 PM, Yegor Yefremov wrote:
 On Wed, Jun 4, 2014 at 12:52 PM, Sekhar Nori nsek...@ti.com wrote:
 On Wednesday 04 June 2014 04:00 PM, Yegor Yefremov wrote:
 On Wed, Jun 4, 2014 at 12:20 PM, Sekhar Nori nsek...@ti.com wrote:
 On Wednesday 04 June 2014 03:11 PM, Yegor Yefremov wrote:
 On Wed, Jun 4, 2014 at 10:48 AM, Roger Quadros rog...@ti.com wrote:
 Hi,

 On 06/04/2014 11:25 AM, Yegor Yefremov wrote:
 On Wed, Jun 4, 2014 at 8:40 AM, Sekhar Nori nsek...@ti.com wrote:
 On Tuesday 03 June 2014 04:18 PM, Yegor Yefremov wrote:
 On Tue, Jun 3, 2014 at 9:57 AM, Yegor Yefremov
 yegorsli...@googlemail.com wrote:
 Kernel: 3.14, 3.15 (I haven't tried another kernels)

 As soon as I write something to my NAND flash (via cat image 
 /dev/mtdblockx or ubiupdatevol) and make reboot or press a reset
 button, I see only C and nothing happens before I make a power
 cycle. Any idea?

What is your nand partitioning ?
Modifying the mapping in linux won't change anything when you reboot.
If you write to some mtdx and another mtdx is modified, you
effectively are in trouble.



 Just forgot to mention, that I was actually booting from MMC 
 (mmc1).
 The boot sequence is UART0...XIP...MMC0...NAND.

 Can you try to get XIP out of the boot sequence and see if it works?
 Maybe try to boot from mmc directly?

 This would prove that NAND/GPMC driver is leaving some state that 
 doesn't
 go well with the bootROM XIP.

 This configuration is soldered. It won't be easy to change.

 Most likely XIP is the issue if sysboot has not changed.

 The way ROM works for XIP boot is:

 1) Set chip select 0 base address to 0x0800'
 2) Read memory at 0x0800'
 3) If something else other than 0x0 or ~0x0 is found, jump to
 0x0800' and start executing.

 Can you check to see the contents of 0x0800' before and after nand
 write using mtdblock?

 Before writing:

 # devmem 0x0800 32
 0x

 After writing:

 # devmem 0x0800 32
 0xE0E0E0E0

 Okay, so this is the cause of failure to boot. I am not sure what
 operation by NAND driver causes this value to change. Perhaps you could
 bisect a bit by dumping this address at various points during the write
 operation?

 If you have a debugger it will become easy to do this.

 The 0x8000 address seems to be the beginning of NAND region:

 ranges = 0 0 0x0800 0x1000;   /* CS0: NAND */

 I've taken this example from am335x_evm.dts. I have tried to change
 the mapping to 0x9000, but kernel still uses 0x8000, Where in
 the kernel will ranges be evaluated? I'm digging thorugh
 arch/arm/mach-omap2/gpmc.c and gpmc-nand.c, but didn't really found
 the place.

 Well it doesn't. It just uses whatever was setup by the bootloader or
 randomly allocated by gpmc_cs_request().

 I'm working on fixing this up. I should be posting v2 of the GPMC refactor
 series by this week and you should be able to map the CS region as specified
 in the DT.

 Till then, maybe you can pre-configure CS0 in the bootloader to wherever 
 you want
 or alternatively call gpmc_cs_remap() after the gpmc_cs_request() in 
 gpmc_nand_init();

 I've found the stuff in bootloader and mapped NAND to 0x0900, but
 it didn't help.


 Not sure why it didn't work. Was the CSVALID bit in GPMC_CONFIG7_0 register 
 set?

 If you are daring enough ;), you could try out the cleaned up GPMC code where 
 remapping
 should work. I still need to do some final touches before I can post it to 
 mailing list.

 g...@github.com:rogerq/linux.git gpmc-3.16-temp

 There are some subtle changes you need to do to the GPMC/Nand node. e.g. 
 adding compatible_id,
 2nd register space and interrupts. For a working example, please see 
 omap3-beagle.dts.

 And finally you need to enable CONFIG_TI_GPMC, which is a new kernel config 
 option.

 cheers,
 -roger
 --
 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: dts: am43x-epos-evm: Add Missing cpsw-phy-sel for am43x-epos-evm

2014-06-06 Thread George Cherian

On 6/6/2014 12:23 PM, Nishanth Menon wrote:

On 06/06/2014 01:17 AM, George Cherian wrote:

AM437x EPOS evm use external clock for RMII interface.
Enable the same in DT.

Signed-off-by: George Cherian george.cher...@ti.com
Reported-by: Nishanth Menon n...@ti.com
---
  arch/arm/boot/dts/am43x-epos-evm.dts | 4 
  1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts 
b/arch/arm/boot/dts/am43x-epos-evm.dts
index 19f1f7e..90098f9 100644
--- a/arch/arm/boot/dts/am43x-epos-evm.dts
+++ b/arch/arm/boot/dts/am43x-epos-evm.dts
@@ -319,6 +319,10 @@
phy-mode = rmii;
  };
  
+phy_sel {

+   rmii-clock-ext;
+};
+
  i2c0 {
status = okay;
pinctrl-names = default;


Where does this apply on?
With linux-next next-20140506 tag, and this patch applied, I get the

Is'nt next-20140506 a month old.
I tried the patch on next-20140604.

following error.

   LD  kernel/trace/built-in.o
   LD  kernel/built-in.o
build fail, Error:
Error: arch/arm/boot/dts/am43x-epos-evm.dts:219.2-3 label or path,
'phy_sel', not found
FATAL ERROR: Syntax error parsing input tree
make[1]: *** [arch/arm/boot/dts/am43x-epos-evm.dtb] Error 1
make[1]: *** Waiting for unfinished jobs
make: *** [dtbs] Error 2
make: *** Waiting for unfinished jobs

in the future, it is helpful if you can point out that this is a
regression seen on next-20140603 and the patch needs to be applied on
some specific branch.

for the record:
last working next tag:
https://github.com/nmenon/kernel-test-logs/blob/next-20140602/omap2plus_defconfig/am43xx-epos.txt

first broken next tag:
https://github.com/nmenon/kernel-test-logs/blob/next-20140603/omap2plus_defconfig/am43xx-epos.txt





--
-George

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


Re: [PATCH] ARM: dts: am43x-epos-evm: Add Missing cpsw-phy-sel for am43x-epos-evm

2014-06-06 Thread George Cherian

On 6/6/2014 12:25 PM, Nishanth Menon wrote:

On 06/06/2014 01:53 AM, Nishanth Menon wrote:

On 06/06/2014 01:17 AM, George Cherian wrote:

AM437x EPOS evm use external clock for RMII interface.
Enable the same in DT.

Signed-off-by: George Cherian george.cher...@ti.com
Reported-by: Nishanth Menon n...@ti.com
---
  arch/arm/boot/dts/am43x-epos-evm.dts | 4 
  1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts 
b/arch/arm/boot/dts/am43x-epos-evm.dts
index 19f1f7e..90098f9 100644
--- a/arch/arm/boot/dts/am43x-epos-evm.dts
+++ b/arch/arm/boot/dts/am43x-epos-evm.dts
@@ -319,6 +319,10 @@
phy-mode = rmii;
  };
  
+phy_sel {

+   rmii-clock-ext;
+};
+
  i2c0 {
status = okay;
pinctrl-names = default;


Where does this apply on?
With linux-next next-20140506 tag, and this patch applied, I get the
following error.

   LD  kernel/trace/built-in.o
   LD  kernel/built-in.o
build fail, Error:
Error: arch/arm/boot/dts/am43x-epos-evm.dts:219.2-3 label or path,
'phy_sel', not found
FATAL ERROR: Syntax error parsing input tree
make[1]: *** [arch/arm/boot/dts/am43x-epos-evm.dtb] Error 1
make[1]: *** Waiting for unfinished jobs
make: *** [dtbs] Error 2
make: *** Waiting for unfinished jobs

in the future, it is helpful if you can point out that this is a
regression seen on next-20140603 and the patch needs to be applied on
some specific branch.

for the record:
last working next tag:
https://github.com/nmenon/kernel-test-logs/blob/next-20140602/omap2plus_defconfig/am43xx-epos.txt

first broken next tag:
https://github.com/nmenon/kernel-test-logs/blob/next-20140603/omap2plus_defconfig/am43xx-epos.txt



interestingly, i just re-tested today's tag without the patch
(omap2plus_defconfig):
http://slexy.org/raw/s205sRdFvy

Lil old kernel
from the above link.

Linux version 3.15.0-rc4-next-20140506 (nmenon@kahuna) (gcc version 
4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #2 SMP Fri Jun 6 01:47:42 CDT 2014

I wonder why the behavior change and what was being fixed here?

This kernel should not have the dt entries for phy sel driver.
Thats why it is working.


--
-George

--
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] PM / OPP: Remove ARCH_HAS_OPP

2014-06-06 Thread Mark Brown
From: Mark Brown broo...@linaro.org

Since the OPP layer is a kernel library which has been converted to be
directly selectable by its callers rather than user selectable and
requiring architectures to enable it explicitly the ARCH_HAS_OPP symbol
has become redundant and can be removed. Do so.

Signed-off-by: Mark Brown broo...@linaro.org
---
 Documentation/power/opp.txt| 3 ---
 arch/arm/mach-exynos/Kconfig   | 1 -
 arch/arm/mach-highbank/Kconfig | 1 -
 arch/arm/mach-imx/Kconfig  | 1 -
 arch/arm/mach-omap2/Kconfig| 1 -
 arch/arm/mach-shmobile/Kconfig | 2 --
 arch/arm/mach-vexpress/Kconfig | 1 -
 arch/arm/mach-zynq/Kconfig | 1 -
 drivers/devfreq/Kconfig| 1 -
 kernel/power/Kconfig   | 3 ---
 10 files changed, 15 deletions(-)

diff --git a/Documentation/power/opp.txt b/Documentation/power/opp.txt
index a9adad8..c6279c2 100644
--- a/Documentation/power/opp.txt
+++ b/Documentation/power/opp.txt
@@ -51,9 +51,6 @@ Typical usage of the OPP library is as follows:
 SoC framework  - modifies on required cases certain OPPs  - OPP layer
- queries to search/retrieve information   -
 
-Architectures that provide a SoC framework for OPP should select ARCH_HAS_OPP
-to make the OPP layer available.
-
 OPP layer expects each domain to be represented by a unique device pointer. SoC
 framework registers a set of initial OPPs per device with the OPP layer. This
 list is expected to be an optimally small number typically around 5 per device.
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index d58995c9..3f78c45 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -103,7 +103,6 @@ config SOC_EXYNOS5440
default y
depends on ARCH_EXYNOS5
select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
-   select ARCH_HAS_OPP
select HAVE_ARM_ARCH_TIMER
select AUTO_ZRELADDR
select MIGHT_HAVE_PCI
diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
index 830b76e..bef970f 100644
--- a/arch/arm/mach-highbank/Kconfig
+++ b/arch/arm/mach-highbank/Kconfig
@@ -3,7 +3,6 @@ config ARCH_HIGHBANK
select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
select ARCH_HAS_CPUFREQ
select ARCH_HAS_HOLES_MEMORYMODEL
-   select ARCH_HAS_OPP
select ARCH_SUPPORTS_BIG_ENDIAN
select ARM_AMBA
select ARM_ERRATA_764369 if SMP
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 4cce93d..95690e4 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -1,7 +1,6 @@
 config ARCH_MXC
bool Freescale i.MX family if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7
select ARCH_HAS_CPUFREQ
-   select ARCH_HAS_OPP
select ARCH_REQUIRE_GPIOLIB
select ARM_CPU_SUSPEND if PM
select CLKSRC_MMIO
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 0ba4826..524b027 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -12,7 +12,6 @@ config ARCH_OMAP3
bool TI OMAP3
depends on ARCH_MULTI_V7
select ARCH_OMAP2PLUS
-   select ARCH_HAS_OPP
select ARM_CPU_SUSPEND if PM
select OMAP_INTERCONNECT
select PM_OPP if PM
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index dbd954e..b51d142 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -86,7 +86,6 @@ config ARCH_R8A73A4
select SH_CLK_CPG
select RENESAS_IRQC
select ARCH_HAS_CPUFREQ
-   select ARCH_HAS_OPP
select SYS_SUPPORTS_SH_CMT
select SYS_SUPPORTS_SH_TMU
 
@@ -265,7 +264,6 @@ config MACH_KZM9G
bool KZM-A9-GT board
depends on ARCH_SH73A0
select ARCH_HAS_CPUFREQ
-   select ARCH_HAS_OPP
select ARCH_REQUIRE_GPIOLIB
select REGULATOR_FIXED_VOLTAGE if REGULATOR
select SND_SOC_AK4642 if SND_SIMPLE_CARD
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index 90249cf..71629fe 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -66,7 +66,6 @@ config ARCH_VEXPRESS_DCSCB
 config ARCH_VEXPRESS_SPC
bool Versatile Express Serial Power Controller (SPC)
select ARCH_HAS_CPUFREQ
-   select ARCH_HAS_OPP
select PM_OPP
help
  The TC2 (A15x2 A7x3) versatile express core tile integrates a logic
diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
index 573e0db..bc485f2 100644
--- a/arch/arm/mach-zynq/Kconfig
+++ b/arch/arm/mach-zynq/Kconfig
@@ -1,7 +1,6 @@
 config ARCH_ZYNQ
bool Xilinx Zynq ARM Cortex A9 Platform if ARCH_MULTI_V7
select ARCH_HAS_CPUFREQ
-   select ARCH_HAS_OPP
select ARCH_SUPPORTS_BIG_ENDIAN
select ARM_AMBA
select ARM_GIC
diff --git a/drivers/devfreq/Kconfig b/drivers/devfreq/Kconfig
index 49e74c1..3dced0a 100644
--- a/drivers/devfreq/Kconfig
+++ 

Re: [PATCH 0/9] mfd: tps65917: Add support for for TPS65917 PMIC

2014-06-06 Thread Keerthy

Hi Mark/Lee Jones,

On Wednesday 28 May 2014 03:50 PM, Keerthy wrote:

The TPS65917 chip is a power management IC for Portable Navigation Systems
and Tablet Computing devices. It contains the following components:

  - Regulators.
  - GPADC.
  - Over Temperature warning and Shut down.

This patch series adds support for TPS65917 mfd device. At this time only
the regulator functionality is made available.

The closest drivers are PALMAS series drivers. Hence adapted palmas mfd
driver to support the tps65917 PMIC.

The register set for SMPSs and LDOs are changed and the ramp delay support
is also changed. Bit-field defenitions are changed.
Hence added driver data structures for mfd and regulator drivers
for palmas and added support for tps65917.

The patches are boot tested on DRA72-EVM.
The patches are boot tested on OMAP5-UEVM board.


A gentle ping on this rework.


Keerthy (9):
   mfd: Add DT bindings for tps65917 PMIC
   regulator: palmas: Add tps65917 compatible string
   mfd: palmas: Add tps65917 specific definitions and enums
   mfd: palmas: Add tps65917 support
   regulator: palmas: Shift the reg_info structure definition to the
 header file
   mfd: palmas: shift the palmas_sleep_requestor_info structure
 definition to the header file
   regulator: palmas: Add palmas_pmic_driver_data structure
   regulator: palmas: add driver data and modularize the probe
   regulator: palmas: Add tps65917 PMIC support

  Documentation/devicetree/bindings/mfd/palmas.txt   |2 +
  .../devicetree/bindings/regulator/palmas-pmic.txt  |1 +
  drivers/mfd/palmas.c   |  228 +++--
  drivers/regulator/palmas-regulator.c   | 1006 +++-
  include/linux/mfd/palmas.h |  837 
  5 files changed, 1770 insertions(+), 304 deletions(-)



Regards,
Keerthy
--
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] PM / OPP: Remove ARCH_HAS_OPP

2014-06-06 Thread Simon Horman
On Fri, Jun 06, 2014 at 11:36:56AM +0100, Mark Brown wrote:
 From: Mark Brown broo...@linaro.org
 
 Since the OPP layer is a kernel library which has been converted to be
 directly selectable by its callers rather than user selectable and
 requiring architectures to enable it explicitly the ARCH_HAS_OPP symbol
 has become redundant and can be removed. Do so.
 
 Signed-off-by: Mark Brown broo...@linaro.org
 ---
  Documentation/power/opp.txt| 3 ---
  arch/arm/mach-exynos/Kconfig   | 1 -
  arch/arm/mach-highbank/Kconfig | 1 -
  arch/arm/mach-imx/Kconfig  | 1 -
  arch/arm/mach-omap2/Kconfig| 1 -
  arch/arm/mach-shmobile/Kconfig | 2 --
  arch/arm/mach-vexpress/Kconfig | 1 -
  arch/arm/mach-zynq/Kconfig | 1 -
  drivers/devfreq/Kconfig| 1 -
  kernel/power/Kconfig   | 3 ---
  10 files changed, 15 deletions(-)

shmobile portion:

Acked-by: Simon Horman horms+rene...@verge.net.au

 diff --git a/Documentation/power/opp.txt b/Documentation/power/opp.txt
 index a9adad8..c6279c2 100644
 --- a/Documentation/power/opp.txt
 +++ b/Documentation/power/opp.txt
 @@ -51,9 +51,6 @@ Typical usage of the OPP library is as follows:
  SoC framework- modifies on required cases certain OPPs  - OPP 
 layer
   - queries to search/retrieve information   -
  
 -Architectures that provide a SoC framework for OPP should select ARCH_HAS_OPP
 -to make the OPP layer available.
 -
  OPP layer expects each domain to be represented by a unique device pointer. 
 SoC
  framework registers a set of initial OPPs per device with the OPP layer. This
  list is expected to be an optimally small number typically around 5 per 
 device.
 diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
 index d58995c9..3f78c45 100644
 --- a/arch/arm/mach-exynos/Kconfig
 +++ b/arch/arm/mach-exynos/Kconfig
 @@ -103,7 +103,6 @@ config SOC_EXYNOS5440
   default y
   depends on ARCH_EXYNOS5
   select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
 - select ARCH_HAS_OPP
   select HAVE_ARM_ARCH_TIMER
   select AUTO_ZRELADDR
   select MIGHT_HAVE_PCI
 diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
 index 830b76e..bef970f 100644
 --- a/arch/arm/mach-highbank/Kconfig
 +++ b/arch/arm/mach-highbank/Kconfig
 @@ -3,7 +3,6 @@ config ARCH_HIGHBANK
   select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
   select ARCH_HAS_CPUFREQ
   select ARCH_HAS_HOLES_MEMORYMODEL
 - select ARCH_HAS_OPP
   select ARCH_SUPPORTS_BIG_ENDIAN
   select ARM_AMBA
   select ARM_ERRATA_764369 if SMP
 diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
 index 4cce93d..95690e4 100644
 --- a/arch/arm/mach-imx/Kconfig
 +++ b/arch/arm/mach-imx/Kconfig
 @@ -1,7 +1,6 @@
  config ARCH_MXC
   bool Freescale i.MX family if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7
   select ARCH_HAS_CPUFREQ
 - select ARCH_HAS_OPP
   select ARCH_REQUIRE_GPIOLIB
   select ARM_CPU_SUSPEND if PM
   select CLKSRC_MMIO
 diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
 index 0ba4826..524b027 100644
 --- a/arch/arm/mach-omap2/Kconfig
 +++ b/arch/arm/mach-omap2/Kconfig
 @@ -12,7 +12,6 @@ config ARCH_OMAP3
   bool TI OMAP3
   depends on ARCH_MULTI_V7
   select ARCH_OMAP2PLUS
 - select ARCH_HAS_OPP
   select ARM_CPU_SUSPEND if PM
   select OMAP_INTERCONNECT
   select PM_OPP if PM
 diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
 index dbd954e..b51d142 100644
 --- a/arch/arm/mach-shmobile/Kconfig
 +++ b/arch/arm/mach-shmobile/Kconfig
 @@ -86,7 +86,6 @@ config ARCH_R8A73A4
   select SH_CLK_CPG
   select RENESAS_IRQC
   select ARCH_HAS_CPUFREQ
 - select ARCH_HAS_OPP
   select SYS_SUPPORTS_SH_CMT
   select SYS_SUPPORTS_SH_TMU
  
 @@ -265,7 +264,6 @@ config MACH_KZM9G
   bool KZM-A9-GT board
   depends on ARCH_SH73A0
   select ARCH_HAS_CPUFREQ
 - select ARCH_HAS_OPP
   select ARCH_REQUIRE_GPIOLIB
   select REGULATOR_FIXED_VOLTAGE if REGULATOR
   select SND_SOC_AK4642 if SND_SIMPLE_CARD
 diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
 index 90249cf..71629fe 100644
 --- a/arch/arm/mach-vexpress/Kconfig
 +++ b/arch/arm/mach-vexpress/Kconfig
 @@ -66,7 +66,6 @@ config ARCH_VEXPRESS_DCSCB
  config ARCH_VEXPRESS_SPC
   bool Versatile Express Serial Power Controller (SPC)
   select ARCH_HAS_CPUFREQ
 - select ARCH_HAS_OPP
   select PM_OPP
   help
 The TC2 (A15x2 A7x3) versatile express core tile integrates a logic
 diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
 index 573e0db..bc485f2 100644
 --- a/arch/arm/mach-zynq/Kconfig
 +++ b/arch/arm/mach-zynq/Kconfig
 @@ -1,7 +1,6 @@
  config ARCH_ZYNQ
   bool Xilinx Zynq ARM Cortex A9 Platform if ARCH_MULTI_V7
   select ARCH_HAS_CPUFREQ
 - select ARCH_HAS_OPP
   select ARCH_SUPPORTS_BIG_ENDIAN
   select ARM_AMBA
   

Re: [PATCH] PM / OPP: Remove ARCH_HAS_OPP

2014-06-06 Thread Magnus Damm
On Fri, Jun 6, 2014 at 8:14 PM, Simon Horman ho...@verge.net.au wrote:
 On Fri, Jun 06, 2014 at 11:36:56AM +0100, Mark Brown wrote:
 From: Mark Brown broo...@linaro.org

 Since the OPP layer is a kernel library which has been converted to be
 directly selectable by its callers rather than user selectable and
 requiring architectures to enable it explicitly the ARCH_HAS_OPP symbol
 has become redundant and can be removed. Do so.

 Signed-off-by: Mark Brown broo...@linaro.org
 ---
  Documentation/power/opp.txt| 3 ---
  arch/arm/mach-exynos/Kconfig   | 1 -
  arch/arm/mach-highbank/Kconfig | 1 -
  arch/arm/mach-imx/Kconfig  | 1 -
  arch/arm/mach-omap2/Kconfig| 1 -
  arch/arm/mach-shmobile/Kconfig | 2 --
  arch/arm/mach-vexpress/Kconfig | 1 -
  arch/arm/mach-zynq/Kconfig | 1 -
  drivers/devfreq/Kconfig| 1 -
  kernel/power/Kconfig   | 3 ---
  10 files changed, 15 deletions(-)

 shmobile portion:

 Acked-by: Simon Horman horms+rene...@verge.net.au

Hi Simon, Mark,

Nice to see cleanups in this area. Reducing the number of Kconfig
symbols must be a good thing.

I'm not sure about the expected merge order for this kind of change vs
queued up stuff in the renesas git tree, but I believe the following
patch selects ARCH_HAS_OPP:

[PATCH v3] ARM: shmobile: Mark all SoCs in shmobile as CPUFreq, capable

Cheers,

/ magnus
--
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/9] mfd: tps65917: Add support for for TPS65917 PMIC

2014-06-06 Thread Lee Jones
 Hi Mark/Lee Jones,
 
 On Wednesday 28 May 2014 03:50 PM, Keerthy wrote:
 The TPS65917 chip is a power management IC for Portable Navigation Systems
 and Tablet Computing devices. It contains the following components:
 
   - Regulators.
   - GPADC.
   - Over Temperature warning and Shut down.
 
 This patch series adds support for TPS65917 mfd device. At this time only
 the regulator functionality is made available.
 
 The closest drivers are PALMAS series drivers. Hence adapted palmas mfd
 driver to support the tps65917 PMIC.
 
 The register set for SMPSs and LDOs are changed and the ramp delay support
 is also changed. Bit-field defenitions are changed.
 Hence added driver data structures for mfd and regulator drivers
 for palmas and added support for tps65917.
 
 The patches are boot tested on DRA72-EVM.
 The patches are boot tested on OMAP5-UEVM board.
 
 A gentle ping on this rework.

There's no point in pinging on any patch during the merge-window.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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] PM / OPP: Remove ARCH_HAS_OPP

2014-06-06 Thread Simon Horman
On Fri, Jun 06, 2014 at 09:14:01PM +0900, Magnus Damm wrote:
 On Fri, Jun 6, 2014 at 8:14 PM, Simon Horman ho...@verge.net.au wrote:
  On Fri, Jun 06, 2014 at 11:36:56AM +0100, Mark Brown wrote:
  From: Mark Brown broo...@linaro.org
 
  Since the OPP layer is a kernel library which has been converted to be
  directly selectable by its callers rather than user selectable and
  requiring architectures to enable it explicitly the ARCH_HAS_OPP symbol
  has become redundant and can be removed. Do so.
 
  Signed-off-by: Mark Brown broo...@linaro.org
  ---
   Documentation/power/opp.txt| 3 ---
   arch/arm/mach-exynos/Kconfig   | 1 -
   arch/arm/mach-highbank/Kconfig | 1 -
   arch/arm/mach-imx/Kconfig  | 1 -
   arch/arm/mach-omap2/Kconfig| 1 -
   arch/arm/mach-shmobile/Kconfig | 2 --
   arch/arm/mach-vexpress/Kconfig | 1 -
   arch/arm/mach-zynq/Kconfig | 1 -
   drivers/devfreq/Kconfig| 1 -
   kernel/power/Kconfig   | 3 ---
   10 files changed, 15 deletions(-)
 
  shmobile portion:
 
  Acked-by: Simon Horman horms+rene...@verge.net.au
 
 Hi Simon, Mark,
 
 Nice to see cleanups in this area. Reducing the number of Kconfig
 symbols must be a good thing.
 
 I'm not sure about the expected merge order for this kind of change vs
 queued up stuff in the renesas git tree, but I believe the following
 patch selects ARCH_HAS_OPP:
 
 [PATCH v3] ARM: shmobile: Mark all SoCs in shmobile as CPUFreq, capable

I propose that we fix that up by adding an incremental patch to
mach-shmobile via my renesas tree once the dependency (assuming there is
one) is in Linus's tree.
--
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/9] mfd: tps65917: Add support for for TPS65917 PMIC

2014-06-06 Thread Mark Brown
On Fri, Jun 06, 2014 at 04:29:03PM +0530, Keerthy wrote:

 A gentle ping on this rework.

Please don't send contentless pings.


signature.asc
Description: Digital signature


Re: [PATCH] PM / OPP: Remove ARCH_HAS_OPP

2014-06-06 Thread Magnus Damm
On Fri, Jun 6, 2014 at 9:50 PM, Simon Horman ho...@verge.net.au wrote:
 On Fri, Jun 06, 2014 at 09:14:01PM +0900, Magnus Damm wrote:
 On Fri, Jun 6, 2014 at 8:14 PM, Simon Horman ho...@verge.net.au wrote:
  On Fri, Jun 06, 2014 at 11:36:56AM +0100, Mark Brown wrote:
  From: Mark Brown broo...@linaro.org
 
  Since the OPP layer is a kernel library which has been converted to be
  directly selectable by its callers rather than user selectable and
  requiring architectures to enable it explicitly the ARCH_HAS_OPP symbol
  has become redundant and can be removed. Do so.
 
  Signed-off-by: Mark Brown broo...@linaro.org
  ---
   Documentation/power/opp.txt| 3 ---
   arch/arm/mach-exynos/Kconfig   | 1 -
   arch/arm/mach-highbank/Kconfig | 1 -
   arch/arm/mach-imx/Kconfig  | 1 -
   arch/arm/mach-omap2/Kconfig| 1 -
   arch/arm/mach-shmobile/Kconfig | 2 --
   arch/arm/mach-vexpress/Kconfig | 1 -
   arch/arm/mach-zynq/Kconfig | 1 -
   drivers/devfreq/Kconfig| 1 -
   kernel/power/Kconfig   | 3 ---
   10 files changed, 15 deletions(-)
 
  shmobile portion:
 
  Acked-by: Simon Horman horms+rene...@verge.net.au

 Hi Simon, Mark,

 Nice to see cleanups in this area. Reducing the number of Kconfig
 symbols must be a good thing.

 I'm not sure about the expected merge order for this kind of change vs
 queued up stuff in the renesas git tree, but I believe the following
 patch selects ARCH_HAS_OPP:

 [PATCH v3] ARM: shmobile: Mark all SoCs in shmobile as CPUFreq, capable

 I propose that we fix that up by adding an incremental patch to
 mach-shmobile via my renesas tree once the dependency (assuming there is
 one) is in Linus's tree.

Sounds good. Thanks!

/ magnus
--
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] PM / OPP: Remove ARCH_HAS_OPP

2014-06-06 Thread Rob Herring
On Fri, Jun 6, 2014 at 5:36 AM, Mark Brown broo...@kernel.org wrote:
 From: Mark Brown broo...@linaro.org

 Since the OPP layer is a kernel library which has been converted to be
 directly selectable by its callers rather than user selectable and
 requiring architectures to enable it explicitly the ARCH_HAS_OPP symbol
 has become redundant and can be removed. Do so.

 Signed-off-by: Mark Brown broo...@linaro.org

Acked-by: Rob Herring r...@kernel.org

 ---
  Documentation/power/opp.txt| 3 ---
  arch/arm/mach-exynos/Kconfig   | 1 -
  arch/arm/mach-highbank/Kconfig | 1 -
  arch/arm/mach-imx/Kconfig  | 1 -
  arch/arm/mach-omap2/Kconfig| 1 -
  arch/arm/mach-shmobile/Kconfig | 2 --
  arch/arm/mach-vexpress/Kconfig | 1 -
  arch/arm/mach-zynq/Kconfig | 1 -
  drivers/devfreq/Kconfig| 1 -
  kernel/power/Kconfig   | 3 ---
  10 files changed, 15 deletions(-)

 diff --git a/Documentation/power/opp.txt b/Documentation/power/opp.txt
 index a9adad8..c6279c2 100644
 --- a/Documentation/power/opp.txt
 +++ b/Documentation/power/opp.txt
 @@ -51,9 +51,6 @@ Typical usage of the OPP library is as follows:
  SoC framework  - modifies on required cases certain OPPs  - OPP layer
 - queries to search/retrieve information   -

 -Architectures that provide a SoC framework for OPP should select ARCH_HAS_OPP
 -to make the OPP layer available.
 -
  OPP layer expects each domain to be represented by a unique device pointer. 
 SoC
  framework registers a set of initial OPPs per device with the OPP layer. This
  list is expected to be an optimally small number typically around 5 per 
 device.
 diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
 index d58995c9..3f78c45 100644
 --- a/arch/arm/mach-exynos/Kconfig
 +++ b/arch/arm/mach-exynos/Kconfig
 @@ -103,7 +103,6 @@ config SOC_EXYNOS5440
 default y
 depends on ARCH_EXYNOS5
 select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
 -   select ARCH_HAS_OPP
 select HAVE_ARM_ARCH_TIMER
 select AUTO_ZRELADDR
 select MIGHT_HAVE_PCI
 diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
 index 830b76e..bef970f 100644
 --- a/arch/arm/mach-highbank/Kconfig
 +++ b/arch/arm/mach-highbank/Kconfig
 @@ -3,7 +3,6 @@ config ARCH_HIGHBANK
 select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
 select ARCH_HAS_CPUFREQ
 select ARCH_HAS_HOLES_MEMORYMODEL
 -   select ARCH_HAS_OPP
 select ARCH_SUPPORTS_BIG_ENDIAN
 select ARM_AMBA
 select ARM_ERRATA_764369 if SMP
 diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
 index 4cce93d..95690e4 100644
 --- a/arch/arm/mach-imx/Kconfig
 +++ b/arch/arm/mach-imx/Kconfig
 @@ -1,7 +1,6 @@
  config ARCH_MXC
 bool Freescale i.MX family if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7
 select ARCH_HAS_CPUFREQ
 -   select ARCH_HAS_OPP
 select ARCH_REQUIRE_GPIOLIB
 select ARM_CPU_SUSPEND if PM
 select CLKSRC_MMIO
 diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
 index 0ba4826..524b027 100644
 --- a/arch/arm/mach-omap2/Kconfig
 +++ b/arch/arm/mach-omap2/Kconfig
 @@ -12,7 +12,6 @@ config ARCH_OMAP3
 bool TI OMAP3
 depends on ARCH_MULTI_V7
 select ARCH_OMAP2PLUS
 -   select ARCH_HAS_OPP
 select ARM_CPU_SUSPEND if PM
 select OMAP_INTERCONNECT
 select PM_OPP if PM
 diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
 index dbd954e..b51d142 100644
 --- a/arch/arm/mach-shmobile/Kconfig
 +++ b/arch/arm/mach-shmobile/Kconfig
 @@ -86,7 +86,6 @@ config ARCH_R8A73A4
 select SH_CLK_CPG
 select RENESAS_IRQC
 select ARCH_HAS_CPUFREQ
 -   select ARCH_HAS_OPP
 select SYS_SUPPORTS_SH_CMT
 select SYS_SUPPORTS_SH_TMU

 @@ -265,7 +264,6 @@ config MACH_KZM9G
 bool KZM-A9-GT board
 depends on ARCH_SH73A0
 select ARCH_HAS_CPUFREQ
 -   select ARCH_HAS_OPP
 select ARCH_REQUIRE_GPIOLIB
 select REGULATOR_FIXED_VOLTAGE if REGULATOR
 select SND_SOC_AK4642 if SND_SIMPLE_CARD
 diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
 index 90249cf..71629fe 100644
 --- a/arch/arm/mach-vexpress/Kconfig
 +++ b/arch/arm/mach-vexpress/Kconfig
 @@ -66,7 +66,6 @@ config ARCH_VEXPRESS_DCSCB
  config ARCH_VEXPRESS_SPC
 bool Versatile Express Serial Power Controller (SPC)
 select ARCH_HAS_CPUFREQ
 -   select ARCH_HAS_OPP
 select PM_OPP
 help
   The TC2 (A15x2 A7x3) versatile express core tile integrates a logic
 diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
 index 573e0db..bc485f2 100644
 --- a/arch/arm/mach-zynq/Kconfig
 +++ b/arch/arm/mach-zynq/Kconfig
 @@ -1,7 +1,6 @@
  config ARCH_ZYNQ
 bool Xilinx Zynq ARM Cortex A9 Platform if ARCH_MULTI_V7
 select ARCH_HAS_CPUFREQ
 -   select ARCH_HAS_OPP
 

Re: [PATCH] PM / OPP: Remove ARCH_HAS_OPP

2014-06-06 Thread Nishanth Menon
On 06/06/2014 05:36 AM, Mark Brown wrote:
[...]
 diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
 index 0ba4826..524b027 100644
 --- a/arch/arm/mach-omap2/Kconfig
 +++ b/arch/arm/mach-omap2/Kconfig
 @@ -12,7 +12,6 @@ config ARCH_OMAP3
   bool TI OMAP3
   depends on ARCH_MULTI_V7
   select ARCH_OMAP2PLUS
 - select ARCH_HAS_OPP
   select ARM_CPU_SUSPEND if PM
   select OMAP_INTERCONNECT
   select PM_OPP if PM

For OMAP portion:
Acked-by: Nishanth Menon n...@ti.com

-- 
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: [PATCH] ARM: dts: am43x-epos-evm: Add Missing cpsw-phy-sel for am43x-epos-evm

2014-06-06 Thread Nishanth Menon
On 06/06/2014 04:52 AM, George Cherian wrote:
 On 6/6/2014 12:23 PM, Nishanth Menon wrote:
 On 06/06/2014 01:17 AM, George Cherian wrote:
 AM437x EPOS evm use external clock for RMII interface.
 Enable the same in DT.

 Signed-off-by: George Cherian george.cher...@ti.com
 Reported-by: Nishanth Menon n...@ti.com
 ---
   arch/arm/boot/dts/am43x-epos-evm.dts | 4 
   1 file changed, 4 insertions(+)

 diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts 
 b/arch/arm/boot/dts/am43x-epos-evm.dts
 index 19f1f7e..90098f9 100644
 --- a/arch/arm/boot/dts/am43x-epos-evm.dts
 +++ b/arch/arm/boot/dts/am43x-epos-evm.dts
 @@ -319,6 +319,10 @@
 phy-mode = rmii;
   };
   
 +phy_sel {
 +   rmii-clock-ext;
 +};
 +
   i2c0 {
 status = okay;
 pinctrl-names = default;

 Where does this apply on?
 With linux-next next-20140506 tag, and this patch applied, I get the
 Is'nt next-20140506 a month old.

Uggh.. yeah - 1AM+migraine is not a good combination to try to do
testing. :( Apologies on the noise


 I tried the patch on next-20140604.

Tested on next-20140606 - applies clean, builds and works :)

am43xx-epos:  Boot PASS: http://slexy.org/raw/s2fT6zs45y

Tested-by: Nishanth Menon n...@ti.com

-- 
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: [PATCH] PM / OPP: Remove ARCH_HAS_OPP

2014-06-06 Thread Mark Brown
On Fri, Jun 06, 2014 at 09:50:06PM +0900, Simon Horman wrote:
 On Fri, Jun 06, 2014 at 09:14:01PM +0900, Magnus Damm wrote:

  I'm not sure about the expected merge order for this kind of change vs
  queued up stuff in the renesas git tree, but I believe the following
  patch selects ARCH_HAS_OPP:

  [PATCH v3] ARM: shmobile: Mark all SoCs in shmobile as CPUFreq, capable

 I propose that we fix that up by adding an incremental patch to
 mach-shmobile via my renesas tree once the dependency (assuming there is
 one) is in Linus's tree.

Yes, the conversion to make ARCH_HAS_OPP unused is in Raphael's tree for
the merge window.  I'd expect this patch to end up going after the merge
window (or at the end I guess).


signature.asc
Description: Digital signature


[PATCH] omap: Add devicetree for Gumstix Pepper board

2014-06-06 Thread Ash Charles
This adds the Gumstix Pepper[1] single-board computer based on the
TI AM335x processor. Schematics are available [2].

[1] https://store.gumstix.com/index.php/products/344/
[2] https://pubs.gumstix.com/boards/PEPPER/

Signed-off-by: Ash Charles ashchar...@gmail.com
---
 MAINTAINERS |   6 +
 arch/arm/boot/dts/Makefile  |   3 +-
 arch/arm/boot/dts/am335x-pepper.dts | 661 
 3 files changed, 669 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/am335x-pepper.dts

diff --git a/MAINTAINERS b/MAINTAINERS
index 51ebb77..d44e2e3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6427,6 +6427,12 @@ L:   linux-omap@vger.kernel.org
 S: Maintained
 F: arch/arm/boot/dts/am335x-nano.dts
 
+OMAP/GUMSTIX PEPPER MACHINE SUPPORT
+M: Ash Charles ashchar...@gmail.com
+L: linux-omap@vger.kernel.org
+S: Maintained
+F: arch/arm/boot/dts/am335x-pepper.dts
+
 OMFS FILESYSTEM
 M: Bob Copeland m...@bobcopeland.com
 L: linux-karma-de...@lists.sourceforge.net
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index a81a24c..9e0352f 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -277,7 +277,8 @@ dtb-$(CONFIG_SOC_AM33XX) += am335x-base0033.dtb \
am335x-boneblack.dtb \
am335x-evm.dtb \
am335x-evmsk.dtb \
-   am335x-nano.dtb
+   am335x-nano.dtb \
+   am335x-pepper.dtb
 dtb-$(CONFIG_ARCH_OMAP4) += omap4-duovero-parlor.dtb \
omap4-panda.dtb \
omap4-panda-a4.dtb \
diff --git a/arch/arm/boot/dts/am335x-pepper.dts 
b/arch/arm/boot/dts/am335x-pepper.dts
new file mode 100644
index 000..27d9b75
--- /dev/null
+++ b/arch/arm/boot/dts/am335x-pepper.dts
@@ -0,0 +1,661 @@
+/*
+ * Copyright (C) 2014 Gumstix, Inc. - https://www.gumstix.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+/dts-v1/;
+
+#include am33xx.dtsi
+
+/ {
+   model = Gumstix Pepper;
+   compatible = gumstix,am335x-pepper, ti,am33xx;
+
+   cpus {
+   cpu@0 {
+   cpu0-supply = dcdc3_reg;
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x8000 0x2000; /* 512 MB */
+   };
+
+   buttons: user_buttons {
+   compatible = gpio-keys;
+   };
+
+   leds: user_leds {
+   compatible = gpio-leds;
+   };
+
+   panel: lcd_panel {
+   compatible = ti,tilcdc,panel;
+   };
+
+   sound: sound_iface {
+   compatible = ti,da830-evm-audio;
+   };
+
+   vbat: fixedregulator@0 {
+   compatible = regulator-fixed;
+   };
+
+   v3v3c_reg: fixedregulator@1 {
+   compatible = regulator-fixed;
+   };
+
+   vdd5_reg: fixedregulator@2 {
+   compatible = regulator-fixed;
+   };
+};
+
+/* I2C Busses */
+i2c0 {
+   status = okay;
+   pinctrl-names = default;
+   pinctrl-0 = i2c0_pins;
+
+   clock-frequency = 40;
+
+   tps: tps@24 {
+   reg = 0x24;
+   };
+
+   eeprom: eeprom@50 {
+   compatible = at,24c256;
+   reg = 0x50;
+   };
+
+   audio_codec: tlv320aic3106@1b {
+   compatible = ti,tlv320aic3106;
+   reg = 0x1b;
+   };
+
+   accel: lis331dlh@1d {
+   compatible = st,lis3lv02d;
+   reg = 0x1d;
+   };
+};
+
+i2c1 {
+   status = okay;
+   pinctrl-names = default;
+   pinctrl-0 = i2c1_pins;
+   clock-frequency = 40;
+};
+
+am33xx_pinmux {
+   i2c0_pins: pinmux_i2c0 {
+   pinctrl-single,pins = 
+   0x188 (PIN_INPUT_PULLUP | MUX_MODE0)/* 
i2c0_sda.i2c0_sda */
+   0x18c (PIN_INPUT_PULLUP | MUX_MODE0)/* 
i2c0_scl.i2c0_scl */
+   ;
+   };
+   i2c1_pins: pinmux_i2c1 {
+   pinctrl-single,pins = 
+   0x10C (PIN_INPUT_PULLUP | MUX_MODE3)/* 
mii1_crs,i2c1_sda */
+   0x110 (PIN_INPUT_PULLUP | MUX_MODE3)/* 
mii1_rxerr,i2c1_scl */
+   ;
+   };
+};
+
+/* Accelerometer */
+accel {
+   pinctrl-names = default;
+   pinctrl-0 = accel_pins;
+
+   Vdd-supply = ldo3_reg;
+   Vdd_IO-supply = ldo3_reg;
+   st,irq1-click;
+   st,wakeup-x-lo;
+   st,wakeup-x-hi;
+   st,wakeup-y-lo;
+   st,wakeup-y-hi;
+   st,wakeup-z-lo;
+   st,wakeup-z-hi;
+   st,min-limit-x = 92;
+   st,max-limit-x = 14;
+   st,min-limit-y = 14;
+   st,max-limit-y = 92;
+   st,min-limit-z = 92;
+   st,max-limit-z = 14;
+};
+
+am33xx_pinmux {
+   accel_pins: pinmux_accel {
+   pinctrl-single,pins = 
+   0x98 (PIN_INPUT_PULLUP | MUX_MODE7)   /* 

Re: [PATCH] PM / OPP: Remove ARCH_HAS_OPP

2014-06-06 Thread Rafael J. Wysocki
On Friday, June 06, 2014 02:08:50 PM Mark Brown wrote:
 
 --cU9XODsizZBnwgll
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Fri, Jun 06, 2014 at 09:50:06PM +0900, Simon Horman wrote:
  On Fri, Jun 06, 2014 at 09:14:01PM +0900, Magnus Damm wrote:
 
   I'm not sure about the expected merge order for this kind of change vs
   queued up stuff in the renesas git tree, but I believe the following
   patch selects ARCH_HAS_OPP:
 
   [PATCH v3] ARM: shmobile: Mark all SoCs in shmobile as CPUFreq, capable
 
  I propose that we fix that up by adding an incremental patch to
  mach-shmobile via my renesas tree once the dependency (assuming there is
  one) is in Linus's tree.
 
 Yes, the conversion to make ARCH_HAS_OPP unused is in Raphael's tree for
 the merge window.

Perhaps already merged?

Rafael

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


[PATCH 4/9] drm/tilcdc: tfp410: fix dangling sysfs connector node

2014-06-06 Thread Guido Martínez
Add a drm_sysfs_connector_remove call when we destroy the panel to make
sure the connector node in sysfs gets deleted.

This is required for proper unload and re-load of this driver, otherwise
we will get a warning about a duplicate filename in sysfs.

Signed-off-by: Guido Martínez gu...@vanguardiasur.com.ar
Cc: sta...@vger.kernel.org
---
 drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c 
b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
index c38b56b..ce75ac8 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c
@@ -167,6 +167,7 @@ struct tfp410_connector {
 static void tfp410_connector_destroy(struct drm_connector *connector)
 {
struct tfp410_connector *tfp410_connector = 
to_tfp410_connector(connector);
+   drm_sysfs_connector_remove(connector);
drm_connector_cleanup(connector);
kfree(tfp410_connector);
 }
-- 
2.0.0.rc2

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


[PATCH 6/9] drm/tilcdc: fix release order on exit

2014-06-06 Thread Guido Martínez
Unregister resources in the correct order on tilcdc_drm_fini, which is
the reverse order they were registered during tilcdc_drm_init.

This also means unregistering the driver before releasing its resources.

Signed-off-by: Guido Martínez gu...@vanguardiasur.com.ar
Cc: sta...@vger.kernel.org
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c 
b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index de34657..0644429 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -629,10 +629,10 @@ static int __init tilcdc_drm_init(void)
 static void __exit tilcdc_drm_fini(void)
 {
DBG(fini);
-   tilcdc_tfp410_fini();
-   tilcdc_slave_fini();
-   tilcdc_panel_fini();
platform_driver_unregister(tilcdc_platform_driver);
+   tilcdc_panel_fini();
+   tilcdc_slave_fini();
+   tilcdc_tfp410_fini();
 }
 
 late_initcall(tilcdc_drm_init);
-- 
2.0.0.rc2

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


[PATCH 1/9] drm/i2c: tda998x: move drm_i2c_encoder_destroy call

2014-06-06 Thread Guido Martínez
Currently tda998x_encoder_destroy() calls cec_write() and reg_clear(),
as part of the release procedure. Such calls need to access the I2C bus
and therefore, we need to call them before drm_i2c_encoder_destroy()
which unregisters the I2C device.

This commit moves the latter so it's done afterwards.

Signed-off-by: Guido Martínez gu...@vanguardiasur.com.ar
Signed-off-by: Ezequiel García ezequ...@vanguardiasur.com.ar
Cc: sta...@vger.kernel.org
---
 drivers/gpu/drm/i2c/tda998x_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c 
b/drivers/gpu/drm/i2c/tda998x_drv.c
index 219c7e8..d06eff6 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -1183,7 +1183,6 @@ static void
 tda998x_encoder_destroy(struct drm_encoder *encoder)
 {
struct tda998x_priv *priv = to_tda998x_priv(encoder);
-   drm_i2c_encoder_destroy(encoder);
 
/* disable all IRQs and free the IRQ handler */
cec_write(priv, REG_CEC_RXSHPDINTENA, 0);
@@ -1193,6 +1192,7 @@ tda998x_encoder_destroy(struct drm_encoder *encoder)
 
if (priv-cec)
i2c_unregister_device(priv-cec);
+   drm_i2c_encoder_destroy(encoder);
kfree(priv);
 }
 
-- 
2.0.0.rc2

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


[PATCH 0/9] tilcdc driver fixes

2014-06-06 Thread Guido Martínez
The tilcdc driver could be compiled as a module, but was severely broken
and could not be used as such. This patchset attempts to fix the issues
preventing a proper load/unload of the module.

Issues included dangling sysfs nodes, dangling devices, memory leaks and
a double kfree.

It now seems to be working ok. We have tested this by loading and
unloading the driver repeteadly, with both panel and slave connectors
and found no flaws.

There is still one warning left on tilcdc_crtc_destroy, caused by
destroying the connector while still in an ON status. We don't know why
this happens or why it's an issue, so we did not fix it.

The first 7 patches are bug fixes which and should probably be applied
in the stable trees. The last two are clean-ups.

The series applies cleanly over -next and 3.15-rc8, and will be resent
for v3.16-rc1, once it's out.

Guido Martínez (9):
  drm/i2c: tda998x: move drm_i2c_encoder_destroy call
  drm/tilcdc: panel: fix dangling sysfs connector node
  drm/tilcdc: slave: fix dangling sysfs connector node
  drm/tilcdc: tfp410: fix dangling sysfs connector node
  drm/tilcdc: panel: fix leak when unloading the module
  drm/tilcdc: fix release order on exit
  drm/tilcdc: fix double kfree
  drm/tilcdc: remove submodule destroy calls
  drm/tilcdc: replace late_initcall with module_init

 drivers/gpu/drm/i2c/tda998x_drv.c  |  2 +-
 drivers/gpu/drm/tilcdc/Module.symvers  |  0
 drivers/gpu/drm/tilcdc/tilcdc_drv.c| 15 +
 drivers/gpu/drm/tilcdc/tilcdc_drv.h|  1 -
 drivers/gpu/drm/tilcdc/tilcdc_panel.c  | 39 +-
 drivers/gpu/drm/tilcdc/tilcdc_slave.c  | 27 +--
 drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 35 +++---
 7 files changed, 59 insertions(+), 60 deletions(-)
 create mode 100644 drivers/gpu/drm/tilcdc/Module.symvers

-- 
2.0.0.rc2

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


[PATCH 7/9] drm/tilcdc: fix double kfree

2014-06-06 Thread Guido Martínez
display_timings_release calls kfree on the display_timings object passed
to it. Calling kfree after it is wrong. SLUB debug showed the following
warning:


=
BUG kmalloc-64 (Tainted: GW): Object already free

-

Disabling lock debugging due to kernel taint
INFO: Allocated in of_get_display_timings+0x2c/0x214 age=601 cpu=0
pid=884
 __slab_alloc.constprop.79+0x2e0/0x33c
 kmem_cache_alloc+0xac/0xdc
 of_get_display_timings+0x2c/0x214
 panel_probe+0x7c/0x314 [tilcdc]
 platform_drv_probe+0x18/0x48
 [..snip..]
INFO: Freed in panel_destroy+0x18/0x3c [tilcdc] age=0 cpu=0 pid=907
 __slab_free+0x34/0x330
 panel_destroy+0x18/0x3c [tilcdc]
 tilcdc_unload+0xd0/0x118 [tilcdc]
 drm_dev_unregister+0x24/0x98
 [..snip..]

Signed-off-by: Guido Martínez gu...@vanguardiasur.com.ar
Cc: sta...@vger.kernel.org
---
 drivers/gpu/drm/tilcdc/tilcdc_panel.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c 
b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
index 1943b2f..b085dcc 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
@@ -286,10 +286,8 @@ static void panel_destroy(struct tilcdc_module *mod)
 {
struct panel_module *panel_mod = to_panel_module(mod);
 
-   if (panel_mod-timings) {
+   if (panel_mod-timings)
display_timings_release(panel_mod-timings);
-   kfree(panel_mod-timings);
-   }
 
tilcdc_module_cleanup(mod);
kfree(panel_mod-info);
-- 
2.0.0.rc2

--
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 9/9] drm/tilcdc: replace late_initcall with module_init

2014-06-06 Thread Guido Martínez
Use module_init instead of late_initcall, as is the norm for modular
drivers.

module_init was used until 6e8de0bd6a51fdeebd5d975c4fcc426f730b339b
(drm/tilcdc: add encoder slave (v2)) changed it to a late_initcall,
but it does not explain why. Tests show it's working properly with
module_init.

Signed-off-by: Guido Martínez gu...@vanguardiasur.com.ar
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c 
b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 702315f..80e6697 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -629,7 +629,7 @@ static void __exit tilcdc_drm_fini(void)
tilcdc_tfp410_fini();
 }
 
-late_initcall(tilcdc_drm_init);
+module_init(tilcdc_drm_init);
 module_exit(tilcdc_drm_fini);
 
 MODULE_AUTHOR(Rob Clark robdcl...@gmail.com);
-- 
2.0.0.rc2

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


[PATCH 3/9] drm/tilcdc: slave: fix dangling sysfs connector node

2014-06-06 Thread Guido Martínez
Add a drm_sysfs_connector_remove call when we destroy the panel to make
sure the connector node in sysfs gets deleted.

This is required for proper unload and re-load of this driver as a
module. Without this, we would get a warning at re-load time like so:

   tda998x 0-0070: found TDA19988
   [ cut here ]
   WARNING: CPU: 0 PID: 825 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x54/0x74()
   sysfs: cannot create duplicate filename '/class/drm/card0-HDMI-A-1'
   Modules linked in: [..]
   CPU: 0 PID: 825 Comm: modprobe Not tainted 3.15.0-rc4-00027-g9dcdef4 #82
   [c0013bb8] (unwind_backtrace) from [c0011824] (show_stack+0x10/0x14)
   [c0011824] (show_stack) from [c0034e8c] (warn_slowpath_common+0x68/0x88)
   [c0034e8c] (warn_slowpath_common) from [c0034edc] 
(warn_slowpath_fmt+0x30/0x40)
   [c0034edc] (warn_slowpath_fmt) from [c01243f4] (sysfs_warn_dup+0x54/0x74)
   [c01243f4] (sysfs_warn_dup) from [c0124708] 
(sysfs_do_create_link_sd.isra.2+0xb0/0xb8)
   [c0124708] (sysfs_do_create_link_sd.isra.2) from [c02ae37c] 
(device_add+0x338/0x520)
   [c02ae37c] (device_add) from [c02ae6e8] 
(device_create_groups_vargs+0xa0/0xc4)
   [c02ae6e8] (device_create_groups_vargs) from [c02ae758] 
(device_create+0x24/0x2c)
   [c02ae758] (device_create) from [c029b4ec] 
(drm_sysfs_connector_add+0x64/0x204)
   [c029b4ec] (drm_sysfs_connector_add) from [bf0b1b40] 
(slave_modeset_init+0x120/0x1bc [tilcdc])
   [bf0b1b40] (slave_modeset_init [tilcdc]) from [bf0b2be8] 
(tilcdc_load+0x214/0x4c0 [tilcdc])
   [bf0b2be8] (tilcdc_load [tilcdc]) from [c029955c] 
(drm_dev_register+0xa4/0x104)
  [..snip..]
   ---[ end trace 4df8d614936ebdee ]---
   [drm:drm_sysfs_connector_add] *ERROR* failed to register connector device: 
-17

Signed-off-by: Guido Martínez gu...@vanguardiasur.com.ar
Cc: sta...@vger.kernel.org
---
 drivers/gpu/drm/tilcdc/tilcdc_slave.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_slave.c 
b/drivers/gpu/drm/tilcdc/tilcdc_slave.c
index a37924e..28c8478 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_slave.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_slave.c
@@ -176,6 +176,7 @@ struct slave_connector {
 static void slave_connector_destroy(struct drm_connector *connector)
 {
struct slave_connector *slave_connector = to_slave_connector(connector);
+   drm_sysfs_connector_remove(connector);
drm_connector_cleanup(connector);
kfree(slave_connector);
 }
-- 
2.0.0.rc2

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


[PATCH 5/9] drm/tilcdc: panel: fix leak when unloading the module

2014-06-06 Thread Guido Martínez
The driver did not unregister the allocated framebuffer, which caused
memory leaks (and memory manager WARNs) when unloading. Also, the
framebuffer device under /dev still existed after unloading.

Add a call to drm_fbdev_cma_fini when unloading the module to prevent
both issues.

Signed-off-by: Guido Martínez gu...@vanguardiasur.com.ar
Cc: sta...@vger.kernel.org
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c 
b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 171a820..de34657 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -122,6 +122,7 @@ static int tilcdc_unload(struct drm_device *dev)
struct tilcdc_drm_private *priv = dev-dev_private;
struct tilcdc_module *mod, *cur;
 
+   drm_fbdev_cma_fini(priv-fbdev);
drm_kms_helper_poll_fini(dev);
drm_mode_config_cleanup(dev);
drm_vblank_cleanup(dev);
-- 
2.0.0.rc2

--
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 8/9] drm/tilcdc: remove submodule destroy calls

2014-06-06 Thread Guido Martínez
The TI tilcdc driver is designed with a notion of submodules. Currently,
at unload time, these submodules are iterated and destroyed.

Now that the tilcdc remove order is fixed, this can be handled perfectly
by the kernel using the device infrastructure, since each submodule
is a kernel driver itself, and they are only destroy()'ed at unload
time. Therefore we move the destroy() functionality to each submodule's
remove().

Also, remove some checks in the unloading process since the new code
guarantees the resources are allocated and need a release.

Signed-off-by: Guido Martínez gu...@vanguardiasur.com.ar
---
 drivers/gpu/drm/tilcdc/Module.symvers  |  0
 drivers/gpu/drm/tilcdc/tilcdc_drv.c|  6 --
 drivers/gpu/drm/tilcdc/tilcdc_drv.h|  1 -
 drivers/gpu/drm/tilcdc/tilcdc_panel.c  | 36 +-
 drivers/gpu/drm/tilcdc/tilcdc_slave.c  | 26 +---
 drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 34 
 6 files changed, 50 insertions(+), 53 deletions(-)
 create mode 100644 drivers/gpu/drm/tilcdc/Module.symvers

diff --git a/drivers/gpu/drm/tilcdc/Module.symvers 
b/drivers/gpu/drm/tilcdc/Module.symvers
new file mode 100644
index 000..e69de29
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c 
b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 0644429..702315f 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -120,7 +120,6 @@ static int cpufreq_transition(struct notifier_block *nb,
 static int tilcdc_unload(struct drm_device *dev)
 {
struct tilcdc_drm_private *priv = dev-dev_private;
-   struct tilcdc_module *mod, *cur;
 
drm_fbdev_cma_fini(priv-fbdev);
drm_kms_helper_poll_fini(dev);
@@ -149,11 +148,6 @@ static int tilcdc_unload(struct drm_device *dev)
 
pm_runtime_disable(dev-dev);
 
-   list_for_each_entry_safe(mod, cur, module_list, list) {
-   DBG(destroying module: %s, mod-name);
-   mod-funcs-destroy(mod);
-   }
-
kfree(priv);
 
return 0;
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.h 
b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
index 0938036..7596c14 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.h
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.h
@@ -98,7 +98,6 @@ struct tilcdc_module;
 struct tilcdc_module_ops {
/* create appropriate encoders/connectors: */
int (*modeset_init)(struct tilcdc_module *mod, struct drm_device *dev);
-   void (*destroy)(struct tilcdc_module *mod);
 #ifdef CONFIG_DEBUG_FS
/* create debugfs nodes (can be NULL): */
int (*debugfs_init)(struct tilcdc_module *mod, struct drm_minor *minor);
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c 
b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
index b085dcc..2f6efae 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
@@ -282,21 +282,8 @@ static int panel_modeset_init(struct tilcdc_module *mod, 
struct drm_device *dev)
return 0;
 }
 
-static void panel_destroy(struct tilcdc_module *mod)
-{
-   struct panel_module *panel_mod = to_panel_module(mod);
-
-   if (panel_mod-timings)
-   display_timings_release(panel_mod-timings);
-
-   tilcdc_module_cleanup(mod);
-   kfree(panel_mod-info);
-   kfree(panel_mod);
-}
-
 static const struct tilcdc_module_ops panel_module_ops = {
.modeset_init = panel_modeset_init,
-   .destroy = panel_destroy,
 };
 
 /*
@@ -372,6 +359,7 @@ static int panel_probe(struct platform_device *pdev)
return -ENOMEM;
 
mod = panel_mod-base;
+   pdev-dev.platform_data = mod;
 
tilcdc_module_init(mod, panel, panel_module_ops);
 
@@ -379,17 +367,16 @@ static int panel_probe(struct platform_device *pdev)
if (IS_ERR(pinctrl))
dev_warn(pdev-dev, pins are not configured\n);
 
-
panel_mod-timings = of_get_display_timings(node);
if (!panel_mod-timings) {
dev_err(pdev-dev, could not get panel timings\n);
-   goto fail;
+   goto fail_free;
}
 
panel_mod-info = of_get_panel_info(node);
if (!panel_mod-info) {
dev_err(pdev-dev, could not get panel info\n);
-   goto fail;
+   goto fail_timings;
}
 
mod-preferred_bpp = panel_mod-info-bpp;
@@ -400,13 +387,26 @@ static int panel_probe(struct platform_device *pdev)
 
return 0;
 
-fail:
-   panel_destroy(mod);
+fail_timings:
+   display_timings_release(panel_mod-timings);
+
+fail_free:
+   kfree(panel_mod);
+   tilcdc_module_cleanup(mod);
return ret;
 }
 
 static int panel_remove(struct platform_device *pdev)
 {
+   struct tilcdc_module *mod = dev_get_platdata(pdev-dev);
+   struct panel_module *panel_mod = to_panel_module(mod);
+
+   display_timings_release(panel_mod-timings);
+
+   tilcdc_module_cleanup(mod);
+   

[PATCH 2/9] drm/tilcdc: panel: fix dangling sysfs connector node

2014-06-06 Thread Guido Martínez
Add a drm_sysfs_connector_remove call when we destroy the panel to make
sure the connector node in sysfs gets deleted.

This is required for proper unload and re-load of this driver as a
module. Without this, we would get a warning at re-load time like so:

   [ cut here ]
   WARNING: CPU: 0 PID: 824 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x54/0x74()
   sysfs: cannot create duplicate filename '/class/drm/card0-LVDS-1'
   Modules linked in: [...]
   CPU: 0 PID: 824 Comm: modprobe Not tainted 3.15.0-rc4-00027-g6484f96-dirty 
#81
   [c0013bb8] (unwind_backtrace) from [c0011824] (show_stack+0x10/0x14)
   [c0011824] (show_stack) from [c0034e8c] (warn_slowpath_common+0x68/0x88)
   [c0034e8c] (warn_slowpath_common) from [c0034edc] 
(warn_slowpath_fmt+0x30/0x40)
   [c0034edc] (warn_slowpath_fmt) from [c01243f4] (sysfs_warn_dup+0x54/0x74)
   [c01243f4] (sysfs_warn_dup) from [c0124708] 
(sysfs_do_create_link_sd.isra.2+0xb0/0xb8)
   [c0124708] (sysfs_do_create_link_sd.isra.2) from [c02ae37c] 
(device_add+0x338/0x520)
   [c02ae37c] (device_add) from [c02ae6e8] 
(device_create_groups_vargs+0xa0/0xc4)
   [c02ae6e8] (device_create_groups_vargs) from [c02ae758] 
(device_create+0x24/0x2c)
   [c02ae758] (device_create) from [c029b4ec] 
(drm_sysfs_connector_add+0x64/0x204)
   [c029b4ec] (drm_sysfs_connector_add) from [bf0b1fec] 
(panel_modeset_init+0xb8/0x134 [tilcdc])
   [bf0b1fec] (panel_modeset_init [tilcdc]) from [bf0b2bf0] 
(tilcdc_load+0x214/0x4c0 [tilcdc])
   [bf0b2bf0] (tilcdc_load [tilcdc]) from [c029955c] 
(drm_dev_register+0xa4/0x104)
  [ .. snip .. ]
   ---[ end trace b2d09cd9578b0497 ]---
   [drm:drm_sysfs_connector_add] *ERROR* failed to register connector device: 
-17

Signed-off-by: Guido Martínez gu...@vanguardiasur.com.ar
Cc: sta...@vger.kernel.org
---
 drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c 
b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
index 86c6732..1943b2f 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
@@ -151,6 +151,7 @@ struct panel_connector {
 static void panel_connector_destroy(struct drm_connector *connector)
 {
struct panel_connector *panel_connector = to_panel_connector(connector);
+   drm_sysfs_connector_remove(connector);
drm_connector_cleanup(connector);
kfree(panel_connector);
 }
-- 
2.0.0.rc2

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