Re: [PATCH 1/2] clk: samsung: Don't build ARMv8 clock drivers on ARMv7

2015-11-19 Thread Tomasz Figa
2015-11-19 13:51 GMT+09:00 Krzysztof Kozlowski :
> On 19.11.2015 13:18, Tomasz Figa wrote:
>> However, I don't think we can disable compilation of particular 64-bit
>> SoCs, so maybe there isn't much sense in splitting their clock drivers
>> into separate symbols?
>
> To me it does not really matter. Indeed as you said one cannot disable
> building of one particular Exynos SoCs.
>
> However we could still want not build some parts of such SoCs (like
> clock, pinctrl etc). I don't see much benefit for such case except when
> someone would like to drastically reduce the size of kernel image (for
> whatever reasons he has.).

Can we really build a kernel that support selected Exynos SoC without
its clock driver? Actually I don't think we even allow deselecting
clock drivers currently, because they are not visible in menuconfig.
Unless there is a clear goal to separate ARCH level Kconfig symbol for
particular ARM64-based Exynos SoCs, I don't think it makes any sense
to keep the clock-related symbols separate.

>
> On the other hand having separate symbols causes duplication and
> obfuscates a little the Kconfig/Makefile. I like keeping things simple
> so one symbol for all ARM64 Exynos clocks sounds good.
>
> Sylwester preferred current approach. You and Pankaj seem to prefer one
> symbol-way.

Hmm, I read Sylwester's post as a reply to your original message and
not Pankaj's. Sylwester, could you clarify?

Best regards,
Tomasz
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] clk: samsung: Don't build ARMv8 clock drivers on ARMv7

2015-11-19 Thread Krzysztof Kozlowski
W dniu 19.11.2015 o 18:16, Tomasz Figa pisze:
> 2015-11-19 13:51 GMT+09:00 Krzysztof Kozlowski :
>> On 19.11.2015 13:18, Tomasz Figa wrote:
>>> However, I don't think we can disable compilation of particular 64-bit
>>> SoCs, so maybe there isn't much sense in splitting their clock drivers
>>> into separate symbols?
>>
>> To me it does not really matter. Indeed as you said one cannot disable
>> building of one particular Exynos SoCs.
>>
>> However we could still want not build some parts of such SoCs (like
>> clock, pinctrl etc). I don't see much benefit for such case except when
>> someone would like to drastically reduce the size of kernel image (for
>> whatever reasons he has.).
> 
> Can we really build a kernel that support selected Exynos SoC without
> its clock driver? Actually I don't think we even allow deselecting
> clock drivers currently, because they are not visible in menuconfig.
> Unless there is a clear goal to separate ARCH level Kconfig symbol for
> particular ARM64-based Exynos SoCs, I don't think it makes any sense
> to keep the clock-related symbols separate.

That is reasonable and very convincing. I'll wait for Sylwester reply
before re-spinning.

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


Re: [PATCH v5 0/4] mfd: sec: add S2MPS15 PMIC support

2015-11-19 Thread Alim Akhtar
Hi Lee,
Do I need to resend this series? This series still apply cleanly on
top of v4.4-rc1.
I can see 1/4 is already applied.

Thanks & Regards,
Alim

On Fri, Oct 30, 2015 at 11:55 AM, Alim Akhtar  wrote:
> Samsung's S2MPS15 PMIC is targetted to be used with Samsung's Exynos7 SoC.
> The S2MPS15 PMIC is similar in functionality to S2MPS11/14 PMIC. It contains
> 27 LDO and 10 Buck regulators, RTC, three 32.768 KHz clock outputs and allows
> programming these blocks via a I2C interface. This patch series adds initial
> support for LDO/Buck regulators of S2MPS15 PMIC.
>
> Changes since v4:
> * Dorpped Krzysztof reviewed-by and Lee Acked-by tags from patch 1/4,
>   because of the new changes to DT bindings. Seeking a fresh review/ack tags.
> * Removed samsung,s2mps15-clk compatible as we can reuse exsisting compatible 
> of s2mps13.
> * Added acked-by on patch 2/4
> * Modified rtc driver as s2mps15 differs from s2mps14/13 etc, addressed 
> Krzysztof
>   concerns on rtc patch.
>   There are some other improvement suggestion from Krzystof for the rtc, I 
> feel that can be done
>   as a sperate patch later.
>
> Changes since v3:
> * Changes regulator driver name from s2mps15-pmic -> s2mps15-regulator as 
> disscussed here [2]
> * Re-use the exsisting compatible/names for s2mps15 clock block.
>
> Changes since v2:
> * Addressed Lee Jones review comments.
>
> Changes since v1:
> * Added suggestion from Krzysztof [1].
> * Added s2mps15's 32.768 clocks support.
> * Added s2mps15's rtc support.
>
> V1 of these patches (with a lesser features) were posted a year back,
> since then there is not much progress on this, this is my attempt to
> move things forward.
>
> [1]-> https://lkml.org/lkml/2014/10/14/67
> [2]-> https://lkml.org/lkml/2015/10/28/417
>
> This series is based on linux-next-20151022.
> This is tested on exynos7-espresso board.
>
> Alim Akhtar (1):
>   drivers/rtc/rtc-s5m.c: add support for S2MPS15 RTC
>
> Thomas Abraham (3):
>   dt-bindings: mfd: s2mps11: add documentation for s2mps15 PMIC
>   mfd: sec: Add support for S2MPS15 PMIC
>   regulator: s2mps11: add support for S2MPS15 regulators
>
>  Documentation/devicetree/bindings/mfd/s2mps11.txt |   21 ++-
>  drivers/mfd/sec-core.c|   31 
>  drivers/mfd/sec-irq.c |8 ++
>  drivers/regulator/Kconfig |4 +-
>  drivers/regulator/s2mps11.c   |  135 +-
>  drivers/rtc/rtc-s5m.c |   37 -
>  include/linux/mfd/samsung/core.h  |1 +
>  include/linux/mfd/samsung/rtc.h   |2 +
>  include/linux/mfd/samsung/s2mps15.h   |  158 
> +
>  9 files changed, 383 insertions(+), 14 deletions(-)
>  create mode 100644 include/linux/mfd/samsung/s2mps15.h
>
> --
> 1.7.10.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



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


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-11-19 Thread Alim Akhtar
Hi Krzysztof/Ulf/Kukjin

On Thu, Oct 22, 2015 at 5:47 AM, Krzysztof Kozlowski
 wrote:
> On 22.10.2015 00:01, Alim Akhtar wrote:
>> On Wed, Oct 21, 2015 at 8:25 PM, Javier Martinez Canillas
>>  wrote:
>>> Hello Alim,
>>>
>>> On 10/21/2015 04:50 PM, Alim Akhtar wrote:
>>>
>>> [snip]
>>>
>
> [0]:
> From c9b250ee03bae338339b70693e906145c719f783 Mon Sep 17 00:00:00 2001
> From: Javier Martinez Canillas 
> Date: Wed, 21 Oct 2015 11:59:44 +0200
> Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
>  handler
>
> The pwrseq_emmc driver does a eMMC card reset before a system reboot to
> allow broken or limited ROM boot-loaders, that don't have an eMMC reset
> logic, to be able to read the second stage from the eMMC.
>
> But this has to be called before a system reboot handler and while most
> of them use the priority 128, there are other restart handlers (such as
> the syscon-reboot one) that use a higher priority. So, use the highest
> priority to make sure that the eMMC hw is reset before a system reboot.
>
> Signed-off-by: Javier Martinez Canillas 
> ---
 Looks good.
 Reviewed-by: Alim Akhtar 

>>>
>
> +Cc Ulf,
>
> Javier,
>
> First of all, thanks Javier for digging into the issue. Actually I have
> Odroid U3 but because of user-space limitations (which I need for other
> work) I cannot test all of mainline patches there.
>
>
>>> Thanks, should I post it as a proper patch or are adding it to your
>>> series?
>> Suggest you to post as a patch collecting {Tested, Reviewed}-by (easy
>> for maintainers to pickup ) and probably CCing Ulf for his feedback.
>>
>>> I think the latter is more reasonable so with an ack from Ulf,
>>> all patches can go through the linux-samsung tree.
>>>
>> yes, that is reasonable, as I said, let Krzysztof and Ulf take a call here.
>
> Javier, Alim, Ulf,
>
> I am not grabbing any more patches for v4.4 because I doubt that they
> could be merged to arm-soc for this cycle. My last pull requests for
> v4.4 is still pending...
>
> This means that I plan to pick up these series for v4.5, after closing
> v4.4 merge window (unless Kukjin picks it also). Because of that, we
> have plenty of time, so my idea is:
> 1. Wait for some comments from Ulf on Javier's fix.
> 2. If the fix goes into v4.4, then problem solved.
> 3. If not and it get acked, then it can go with this set.
> 4. If not and it get applied by Ulf for v4.5, then a tag from him would
> be a nice way to solve dependency.
>
> Either way we don't have to hurry, I think.
>

Is It the right time to get this series in?
Thanks!!

> Best regards,
> Krzysztof



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


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-11-19 Thread Javier Martinez Canillas
Hello Alim,

On Thu, Nov 19, 2015 at 3:06 PM, Alim Akhtar  wrote:

[snip]

>>
>> Javier, Alim, Ulf,
>>
>> I am not grabbing any more patches for v4.4 because I doubt that they
>> could be merged to arm-soc for this cycle. My last pull requests for
>> v4.4 is still pending...
>>
>> This means that I plan to pick up these series for v4.5, after closing
>> v4.4 merge window (unless Kukjin picks it also). Because of that, we
>> have plenty of time, so my idea is:
>> 1. Wait for some comments from Ulf on Javier's fix.
>> 2. If the fix goes into v4.4, then problem solved.
>> 3. If not and it get acked, then it can go with this set.
>> 4. If not and it get applied by Ulf for v4.5, then a tag from him would
>> be a nice way to solve dependency.
>>
>> Either way we don't have to hurry, I think.
>>
>
> Is It the right time to get this series in?

The patch that the series had as a dependency made it to v4.4-rc1 as
commit 1c6e58d83615 ("mmc: pwrseq: Use highest priority for eMMC
restart handler") so it should be safe now to pick this series for
v4.5.

> Thanks!!
>

Best regards,
Javier
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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/27] mtd: nand: fix drivers abusing mtd->priv

2015-11-19 Thread Brian Norris
On Mon, Nov 16, 2015 at 02:37:34PM +0100, Boris Brezillon wrote:
> The ->priv field of the mtd_info object attached to a nand_chip device
> should point to the nand_chip device. The pxa and cafe drivers are
> assigning this field their own private structure, which works fine as long
> as the nand_chip field is the first one in the driver private struct but
> seems a bit fragile.
> Fix that by setting mtd->priv to point the nand_chip field and assigning
> chip->priv to the private structure head.
> 
> Signed-off-by: Boris Brezillon 

Applied to l2-mtd.git
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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/27] mtd: nand: update examples in the documentation to use mtd_to_nand()

2015-11-19 Thread Brian Norris
On Mon, Nov 16, 2015 at 02:37:36PM +0100, Boris Brezillon wrote:
> mtd_to_nand() has been introduced to hide accesses to mtd->priv.
> All NAND controller drivers should use it instead of directly accessing
> the ->priv field.
> 
> Signed-off-by: Boris Brezillon 

Pushed to l2-mtd.git
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 02/27] mtd: nand: add an mtd_to_nand() helper

2015-11-19 Thread Brian Norris
On Mon, Nov 16, 2015 at 02:37:35PM +0100, Boris Brezillon wrote:
> Some drivers are retrieving the nand_chip pointer using the container_of
> macro on a struct wrapping both the nand_chip and the mtd_info struct while
> the standard way of retrieving this pointer is through mtd->priv.
> Provide an helper to do that.
> 
> Signed-off-by: Boris Brezillon 
> ---
>  include/linux/mtd/nand.h | 5 +
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
> index 4f7c9b9..056d165 100644
> --- a/include/linux/mtd/nand.h
> +++ b/include/linux/mtd/nand.h
> @@ -730,6 +730,11 @@ static inline struct device_node 
> *nand_get_flash_node(struct nand_chip *chip)
>   return chip->flash_node;
>  }
>  
> +static inline struct nand_chip *mtd_to_nand(struct mtd_info *mtd)
> +{
> + return mtd->priv;
> +}
> +

Pushed this patch to l2-mtd.git, though I rebased it directly onto
4.4-rc1 and then merged it in. That way, if any other subsystems want to
start using this in the 4.5 -next cycle (e.g., for patches 4-8), they
can pull it in without taking the rest of MTD.

I can push this to a separate branch or signed tag, if anyone wants.

Or, I can take the arch/ patches via MTD, if that's a better option.

Brian
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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] arm64: EXYNOS: Consolidate ARCH_EXYNOS7 symbol into ARCH_EXYNOS

2015-11-19 Thread Krzysztof Kozlowski
The ARMv8 Exynos family SoCs in Linux kernel are currently:
 - Exynos5433 (controlled by ARCH_EXYNOS),
 - Exynos7 (controlled by ARCH_EXYNOS7).

It duplicates Kconfig symbols unnecessarily, so consolidate them into
one ARCH_EXYNOS. Future SoCs could fall also under the ARCH_EXYNOS
symbol.

The commit should not bring any visible functional change.

Signed-off-by: Krzysztof Kozlowski 
Reviewed-by: Chanwoo Choi 
Reviewed-by: Pankaj Dubey 
Tested-by: Alim Akhtar 
Reviewed-by: Tomasz Figa 

---

Changes since v1:
1. Minor cleanups after Tomasz's comments.
2. Added tags: Chanwoo's, Pankaj's, Alim's and Tomasz's.
---
 arch/arm64/Kconfig.platforms| 11 ++-
 arch/arm64/boot/dts/exynos/Makefile |  2 +-
 arch/arm64/configs/defconfig|  2 +-
 3 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 4043c35962cc..64f1116640bc 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -13,21 +13,14 @@ config ARCH_BERLIN
  This enables support for Marvell Berlin SoC Family
 
 config ARCH_EXYNOS
-   bool
-   help
- This enables support for Samsung Exynos SoC family
-
-config ARCH_EXYNOS7
-   bool "ARMv8 based Samsung Exynos7"
-   select ARCH_EXYNOS
+   bool "ARMv8 based Samsung Exynos SoC family"
select COMMON_CLK_SAMSUNG
select HAVE_S3C2410_WATCHDOG if WATCHDOG
select HAVE_S3C_RTC if RTC_CLASS
select PINCTRL
select PINCTRL_EXYNOS
-
help
- This enables support for Samsung Exynos7 SoC family
+ This enables support for ARMv8 based Samsung Exynos SoC family.
 
 config ARCH_LAYERSCAPE
bool "ARMv8 based Freescale Layerscape SoC family"
diff --git a/arch/arm64/boot/dts/exynos/Makefile 
b/arch/arm64/boot/dts/exynos/Makefile
index 20310e5b6d6f..50c9b9383cfa 100644
--- a/arch/arm64/boot/dts/exynos/Makefile
+++ b/arch/arm64/boot/dts/exynos/Makefile
@@ -1,4 +1,4 @@
-dtb-$(CONFIG_ARCH_EXYNOS7) += exynos7-espresso.dtb
+dtb-$(CONFIG_ARCH_EXYNOS) += exynos7-espresso.dtb
 
 always := $(dtb-y)
 subdir-y   := $(dts-dirs)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index bdd7aa358d2a..a396fa7c69a5 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -33,7 +33,7 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_IOSCHED_DEADLINE is not set
 CONFIG_ARCH_BCM_IPROC=y
 CONFIG_ARCH_BERLIN=y
-CONFIG_ARCH_EXYNOS7=y
+CONFIG_ARCH_EXYNOS=y
 CONFIG_ARCH_LAYERSCAPE=y
 CONFIG_ARCH_HISI=y
 CONFIG_ARCH_MEDIATEK=y
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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] clk: samsung: Don't build ARMv8 clock drivers on ARMv7

2015-11-19 Thread Krzysztof Kozlowski
Currently the Exynos5433 (ARMv8 SoC) clock driver depends on ARCH_EXYNOS
so it is built also on ARMv7. This does not bring any kind of benefit.
There won't be a single kernel image for ARMv7 and ARMv8 SoCs (like
multi_v7 for ARMv7).

Instead build clock drivers only for respective SoC's architecture.

Signed-off-by: Krzysztof Kozlowski 
Reviewed-by: Chanwoo Choi 
Acked-by: Sylwester Nawrocki 
Tested-by: Alim Akhtar 
Acked-by: Tomasz Figa 

---

Changes since v1:
1. Use one Kconfig symbol for clocks of all ARM64 SoCs (after
   discussion): EXYNOS_ARM64_COMMON_CLK.
2. Minor cleanups after Tomasz's comments.
3. Added tags: Chanwoo's, Sylwester's, Alim's and Tomasz's (the tags
   were given for v1 but assuming that change from 1. is not major
   enough to require re-tagging).
---
 drivers/clk/samsung/Kconfig  | 6 ++
 drivers/clk/samsung/Makefile | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/samsung/Kconfig b/drivers/clk/samsung/Kconfig
index 84196ecdaa12..3a2c032965e6 100644
--- a/drivers/clk/samsung/Kconfig
+++ b/drivers/clk/samsung/Kconfig
@@ -2,6 +2,7 @@ config COMMON_CLK_SAMSUNG
bool
select COMMON_CLK
 
+# ARM SoCs:
 config S3C2410_COMMON_CLK
bool
select COMMON_CLK_SAMSUNG
@@ -24,3 +25,8 @@ config S3C2443_COMMON_CLK
bool
select COMMON_CLK_SAMSUNG
 
+# ARM64 SoCs (e.g. Exynos5433, Exynos7):
+config EXYNOS_ARM64_COMMON_CLK
+   def_bool ARCH_EXYNOS
+   depends on ARM64 || COMPILE_TEST
+   select COMMON_CLK_SAMSUNG
diff --git a/drivers/clk/samsung/Makefile b/drivers/clk/samsung/Makefile
index 5f6833ea355d..fc367d4b2902 100644
--- a/drivers/clk/samsung/Makefile
+++ b/drivers/clk/samsung/Makefile
@@ -10,11 +10,11 @@ obj-$(CONFIG_SOC_EXYNOS5250)+= clk-exynos5250.o
 obj-$(CONFIG_SOC_EXYNOS5260)   += clk-exynos5260.o
 obj-$(CONFIG_SOC_EXYNOS5410)   += clk-exynos5410.o
 obj-$(CONFIG_SOC_EXYNOS5420)   += clk-exynos5420.o
-obj-$(CONFIG_ARCH_EXYNOS)  += clk-exynos5433.o
+obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK)  += clk-exynos5433.o
 obj-$(CONFIG_SOC_EXYNOS5440)   += clk-exynos5440.o
 obj-$(CONFIG_ARCH_EXYNOS)  += clk-exynos-audss.o
 obj-$(CONFIG_ARCH_EXYNOS)  += clk-exynos-clkout.o
-obj-$(CONFIG_ARCH_EXYNOS7) += clk-exynos7.o
+obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK)  += clk-exynos7.o
 obj-$(CONFIG_S3C2410_COMMON_CLK)+= clk-s3c2410.o
 obj-$(CONFIG_S3C2410_COMMON_DCLK)+= clk-s3c2410-dclk.o
 obj-$(CONFIG_S3C2412_COMMON_CLK)+= clk-s3c2412.o
-- 
1.9.1

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


Re: [PATCH v2 4/6] arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC

2015-11-19 Thread Krzysztof Kozlowski
On 20.10.2015 18:24, Alim Akhtar wrote:
> This patch adds syscon-{reboot, poweroff} nodes to allow the
> generic syscon-{reboot, poweroff} driver to reset/poweroff exynos5410 SoC.
> 
> Signed-off-by: Alim Akhtar 
> Reviewed-by: Pankaj Dubey 
> Reviewed-by: Javier Martinez Canillas 
> Acked-by: Moritz Fischer 
> ---
>  arch/arm/boot/dts/exynos5410.dtsi |   14 ++
>  1 file changed, 14 insertions(+)
> 


Reviewed-by: Krzysztof Kozlowski 

Best regards,
Krzysztof

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


Re: [PATCH v2 3/6] arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5

2015-11-19 Thread Krzysztof Kozlowski
On 20.10.2015 18:24, Alim Akhtar wrote:
> This patch adds syscon-{reboot, poweroff} nodes to allow the
> generic syscon-{reboot, poweroff} driver to reset/poweroff exynos5 SoCs.
> 
> Signed-off-by: Alim Akhtar 
> Reviewed-by: Pankaj Dubey 
> Reviewed-by: Javier Martinez Canillas 
> Acked-by: Moritz Fischer 
> ---
>  arch/arm/boot/dts/exynos5.dtsi |   14 ++
>  1 file changed, 14 insertions(+)
> 


Reviewed-by: Krzysztof Kozlowski 

Best regards,
Krzysztof

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


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-11-19 Thread Krzysztof Kozlowski
On 20.11.2015 03:06, Alim Akhtar wrote:
> Hi Krzysztof/Ulf/Kukjin
> 
> On Thu, Oct 22, 2015 at 5:47 AM, Krzysztof Kozlowski
>  wrote:
>> On 22.10.2015 00:01, Alim Akhtar wrote:
>>> On Wed, Oct 21, 2015 at 8:25 PM, Javier Martinez Canillas
>>>  wrote:
 Hello Alim,

 On 10/21/2015 04:50 PM, Alim Akhtar wrote:

 [snip]

>>
>> [0]:
>> From c9b250ee03bae338339b70693e906145c719f783 Mon Sep 17 00:00:00 2001
>> From: Javier Martinez Canillas 
>> Date: Wed, 21 Oct 2015 11:59:44 +0200
>> Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
>>  handler
>>
>> The pwrseq_emmc driver does a eMMC card reset before a system reboot to
>> allow broken or limited ROM boot-loaders, that don't have an eMMC reset
>> logic, to be able to read the second stage from the eMMC.
>>
>> But this has to be called before a system reboot handler and while most
>> of them use the priority 128, there are other restart handlers (such as
>> the syscon-reboot one) that use a higher priority. So, use the highest
>> priority to make sure that the eMMC hw is reset before a system reboot.
>>
>> Signed-off-by: Javier Martinez Canillas 
>> ---
> Looks good.
> Reviewed-by: Alim Akhtar 
>

>>
>> +Cc Ulf,
>>
>> Javier,
>>
>> First of all, thanks Javier for digging into the issue. Actually I have
>> Odroid U3 but because of user-space limitations (which I need for other
>> work) I cannot test all of mainline patches there.
>>
>>
 Thanks, should I post it as a proper patch or are adding it to your
 series?
>>> Suggest you to post as a patch collecting {Tested, Reviewed}-by (easy
>>> for maintainers to pickup ) and probably CCing Ulf for his feedback.
>>>
 I think the latter is more reasonable so with an ack from Ulf,
 all patches can go through the linux-samsung tree.

>>> yes, that is reasonable, as I said, let Krzysztof and Ulf take a call here.
>>
>> Javier, Alim, Ulf,
>>
>> I am not grabbing any more patches for v4.4 because I doubt that they
>> could be merged to arm-soc for this cycle. My last pull requests for
>> v4.4 is still pending...
>>
>> This means that I plan to pick up these series for v4.5, after closing
>> v4.4 merge window (unless Kukjin picks it also). Because of that, we
>> have plenty of time, so my idea is:
>> 1. Wait for some comments from Ulf on Javier's fix.
>> 2. If the fix goes into v4.4, then problem solved.
>> 3. If not and it get acked, then it can go with this set.
>> 4. If not and it get applied by Ulf for v4.5, then a tag from him would
>> be a nice way to solve dependency.
>>
>> Either way we don't have to hurry, I think.
>>
> 
> Is It the right time to get this series in?
> Thanks!!

I started applying it but stopped at #5. It should be squashed with #6
to get rid of (not important) conflict between syscon reboot and
existing Exynos restart handler:

syscon-poweroff syscon-poweroff: pm_power_off already claimed c001e52c
exynos_power_off
syscon-poweroff: probe of syscon-poweroff failed with error -16

The conflict is not really an issue because of ordering of init calls
the Exynos will register itself before syscon. Nevertheless splitting
the patches does not really make sense... so please merge #5 with #6.

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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] arm64: EXYNOS: Consolidate Exynos7 symbol

2015-11-19 Thread Krzysztof Kozlowski
Hi,

We don't need ARCH_EXYNOS7 symbol because all ARMv8 platforms should
fall under generic ARCH_EXYNOS. In the same time there is no sense
in building clocks for these ARMv8 SoCs on ARMv7 builds. In future
this will also influence PMU [1] driver.

Patch 2 *depends* on patch 1. Patch 1 received acks from Samsung clock
folks so everything can go through Samsung-soc or ARM64 tree.

Best regards,
Krzysztof


[1] https://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg48090.html


Krzysztof Kozlowski (2):
  clk: samsung: Don't build ARMv8 clock drivers on ARMv7
  arm64: EXYNOS: Consolidate ARCH_EXYNOS7 symbol into ARCH_EXYNOS

 arch/arm64/Kconfig.platforms| 11 ++-
 arch/arm64/boot/dts/exynos/Makefile |  2 +-
 arch/arm64/configs/defconfig|  2 +-
 drivers/clk/samsung/Kconfig |  6 ++
 drivers/clk/samsung/Makefile|  4 ++--
 5 files changed, 12 insertions(+), 13 deletions(-)

-- 
1.9.1

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


Re: [PATCH v2 1/6] arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs

2015-11-19 Thread Krzysztof Kozlowski
On 20.10.2015 18:24, Alim Akhtar wrote:
> This patch adds syscon-{reboot, poweroff} nodes to allow the
> generic syscon-{reboot, poweroff} driver to reset/poweroff exynos3250 SoC.
> 
> Signed-off-by: Alim Akhtar 
> Reviewed-by: Pankaj Dubey 
> Reviewed-by: Javier Martinez Canillas 
> Acked-by: Moritz Fischer 
> ---
>  arch/arm/boot/dts/exynos3250.dtsi |   14 ++
>  1 file changed, 14 insertions(+)
> 


Reviewed-by: Krzysztof Kozlowski 

Best regards,
Krzysztof

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


Re: [PATCH v2 2/6] arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4

2015-11-19 Thread Krzysztof Kozlowski
On 20.10.2015 18:24, Alim Akhtar wrote:
> This patch adds syscon-{reboot, poweroff} nodes to allow the
> generic syscon-{reboot, poweroff} driver to reset/poweroff exynos4 SoC.
> 
> Signed-off-by: Alim Akhtar 
> Reviewed-by: Pankaj Dubey 
> Reviewed-by: Javier Martinez Canillas 
> Tested-by: Tobias Jakobi 
> Acked-by: Moritz Fischer 
> ---
>  arch/arm/boot/dts/exynos4.dtsi |   14 ++
>  1 file changed, 14 insertions(+)
> 


Reviewed-by: Krzysztof Kozlowski 

Best regards,
Krzysztof

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


Re: [PATCH 1/2] clk: samsung: Don't build ARMv8 clock drivers on ARMv7

2015-11-19 Thread Sylwester Nawrocki
On 19/11/15 10:16, Tomasz Figa wrote:
> 2015-11-19 13:51 GMT+09:00 Krzysztof Kozlowski :
>> > On 19.11.2015 13:18, Tomasz Figa wrote:
>>> >> However, I don't think we can disable compilation of particular
>>> >> 64-bit SoCs, so maybe there isn't much sense in splitting their 
>>> >> clock drivers into separate symbols?
>> >
>> > To me it does not really matter. Indeed as you said one cannot 
>> > disable building of one particular Exynos SoCs.
>> >
>> > However we could still want not build some parts of such SoCs (like
>> > clock, pinctrl etc). I don't see much benefit for such case except
>> > when someone would like to drastically reduce the size of kernel 
>> > image (for whatever reasons he has.).
>
> Can we really build a kernel that support selected Exynos SoC without
> its clock driver? Actually I don't think we even allow deselecting
> clock drivers currently, because they are not visible in menuconfig.
> Unless there is a clear goal to separate ARCH level Kconfig symbol for
> particular ARM64-based Exynos SoCs, I don't think it makes any sense
> to keep the clock-related symbols separate.
> 
>> >
>> > On the other hand having separate symbols causes duplication and
>> > obfuscates a little the Kconfig/Makefile. I like keeping things 
>> > simple so one symbol for all ARM64 Exynos clocks sounds good.
>> >
>> > Sylwester preferred current approach. You and Pankaj seem to prefer
>> > one symbol-way.
>
> Hmm, I read Sylwester's post as a reply to your original message and
> not Pankaj's. Sylwester, could you clarify?

OK, let's just use a common clk Kconfig symbol for Exynos ARM64.

What I tried to say is that with addition of support for few more
of those SoCs the kernel image size can easily grow by 1MB order,
due to just clk drivers inclusion. Perhaps it's not a big issue
with current hardware configuration.
Maybe in long term we should think about splitting CMU drivers
into a built-in critical clocks part and the rest in loadable
modules.

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


[PATCH] ARM: exynos_defconfig: add drivers for Exynos4210 Universal C210 board

2015-11-19 Thread Marek Szyprowski
This patch enables drivers needed to get Exynos 4210 Universal C210 board
working: MAX8998 MFD and regulators, GPIO-based bit-bang SPI, Exynos DRM
FIMD parallel output and Samsung LD9040 RGB panel.

Signed-off-by: Marek Szyprowski 
---
 arch/arm/configs/exynos_defconfig | 5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/configs/exynos_defconfig 
b/arch/arm/configs/exynos_defconfig
index bb2d1f7..b3f9c75 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -90,6 +90,7 @@ CONFIG_I2C_ARB_GPIO_CHALLENGE=y
 CONFIG_I2C_GPIO=y
 CONFIG_I2C_CROS_EC_TUNNEL=y
 CONFIG_SPI=y
+CONFIG_SPI_GPIO=y
 CONFIG_SPI_S3C64XX=y
 CONFIG_DEBUG_GPIO=y
 CONFIG_POWER_SUPPLY=y
@@ -117,6 +118,7 @@ CONFIG_MFD_MAX14577=y
 CONFIG_MFD_MAX77686=y
 CONFIG_MFD_MAX77693=y
 CONFIG_MFD_MAX8997=y
+CONFIG_MFD_MAX8998=y
 CONFIG_MFD_SEC_CORE=y
 CONFIG_MFD_TPS65090=y
 CONFIG_REGULATOR=y
@@ -124,6 +126,7 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_REGULATOR_GPIO=y
 CONFIG_REGULATOR_MAX14577=y
 CONFIG_REGULATOR_MAX8997=y
+CONFIG_REGULATOR_MAX8998=y
 CONFIG_REGULATOR_MAX77686=y
 CONFIG_REGULATOR_MAX77693=y
 CONFIG_REGULATOR_MAX77802=y
@@ -142,8 +145,10 @@ CONFIG_DRM_EXYNOS=y
 CONFIG_DRM_EXYNOS_FIMD=y
 CONFIG_DRM_EXYNOS_DSI=y
 CONFIG_DRM_EXYNOS_MIXER=y
+CONFIG_DRM_EXYNOS_DPI=y
 CONFIG_DRM_EXYNOS_HDMI=y
 CONFIG_DRM_PANEL_SIMPLE=y
+CONFIG_DRM_PANEL_SAMSUNG_LD9040=y
 CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=y
 CONFIG_EXYNOS_VIDEO=y
 CONFIG_EXYNOS_MIPI_DSI=y
-- 
1.9.2

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


[PATCH] ARM: dts: exynos5422-odroidxu3*: use peripheral mode for dwc3_1

2015-11-19 Thread Marek Szyprowski
DWC3 device found on Exynos SoCs cannot work in OTG mode alone, because
it lacks some OTG related control part. OTG mode operation is possible
only with external hardware logic (usually GPIO-based) specific to
the board. Right now, however, there is no driver for such logic and no
bindings, so the OTG mode is disfunctional at all (this means that it
doesn't work as a peripheral nor as a host). This patch sets the operation
mode to peripheral to get DWC3_1 device at least somehow working. This can
be later updated, when proper OTG driver and bindings get developed.

Signed-off-by: Marek Szyprowski 
---
 arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts | 2 +-
 arch/arm/boot/dts/exynos5422-odroidxu3.dts  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts 
b/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts
index b1b3608..2ae1cf4 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts
@@ -67,5 +67,5 @@
 };
 
 _dwc3_1 {
-   dr_mode = "otg";
+   dr_mode = "peripheral";
 };
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts 
b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
index 0c0bbdb..432406d 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
@@ -98,5 +98,5 @@
 };
 
 _dwc3_1 {
-   dr_mode = "otg";
+   dr_mode = "peripheral";
 };
-- 
1.9.2

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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: exynos5422-odroidxu3*: use peripheral mode for dwc3_1

2015-11-19 Thread Krzysztof Kozlowski
W dniu 19.11.2015 o 20:51, Marek Szyprowski pisze:
> DWC3 device found on Exynos SoCs cannot work in OTG mode alone, because
> it lacks some OTG related control part. OTG mode operation is possible
> only with external hardware logic (usually GPIO-based) specific to
> the board. Right now, however, there is no driver for such logic and no
> bindings, so the OTG mode is disfunctional at all (this means that it

s/disfunctional/dysfunctional/
(no need to resend, this can be fixed when applying)

> doesn't work as a peripheral nor as a host). This patch sets the operation
> mode to peripheral to get DWC3_1 device at least somehow working. This can
> be later updated, when proper OTG driver and bindings get developed.
> 
> Signed-off-by: Marek Szyprowski 
> ---
>  arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts | 2 +-
>  arch/arm/boot/dts/exynos5422-odroidxu3.dts  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 

Explanation makes sense.

Reviewed-by: Krzysztof Kozlowski 

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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: exynos4210-universal_c210: disable DMA for UARTs

2015-11-19 Thread Krzysztof Kozlowski
W dniu 16.11.2015 o 23:36, Marek Szyprowski pisze:
> PDMA for UART devices seems not to be working properly on Exynos 4210
> revision 0 used in Universal C210 boards, so disable it to let one to
> use UART devices (driver defaults to PIO mode if DMA is not present).
> 
> Signed-off-by: Marek Szyprowski 
> ---
>  arch/arm/boot/dts/exynos4210-universal_c210.dts | 8 
>  1 file changed, 8 insertions(+)
> 

Oh, DMA on UART strikes back.

Reviewed-by: Krzysztof Kozlowski 

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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: exynos_defconfig: add drivers for Exynos4210 Universal C210 board

2015-11-19 Thread Krzysztof Kozlowski
W dniu 19.11.2015 o 20:52, Marek Szyprowski pisze:
> This patch enables drivers needed to get Exynos 4210 Universal C210 board
> working: MAX8998 MFD and regulators, GPIO-based bit-bang SPI, Exynos DRM
> FIMD parallel output and Samsung LD9040 RGB panel.
> 
> Signed-off-by: Marek Szyprowski 
> ---
>  arch/arm/configs/exynos_defconfig | 5 +
>  1 file changed, 5 insertions(+)
> 

Reviewed-by: Krzysztof Kozlowski 

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 14/25] drm/exynos: introduce exynos_drm_plane_config structure

2015-11-19 Thread Marek Szyprowski

Hello,

On 2015-11-18 16:40, Tobias Jakobi wrote:

Marek Szyprowski wrote:

On 2015-11-17 19:00, Tobias Jakobi wrote:

Marek Szyprowski wrote:

This patch adds common structure for keeping plane configuration and
capabilities data. This patch is inspired by similar code developed by
Tobias Jakobi.

Signed-off-by: Marek Szyprowski 
---
   drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 18 +++---
   drivers/gpu/drm/exynos/exynos7_drm_decon.c| 23 +++-
   drivers/gpu/drm/exynos/exynos_drm_drv.h   | 22 
   drivers/gpu/drm/exynos/exynos_drm_fimd.c  | 25 -
   drivers/gpu/drm/exynos/exynos_drm_plane.c | 34 --
   drivers/gpu/drm/exynos/exynos_drm_plane.h |  7 ++--
   drivers/gpu/drm/exynos/exynos_drm_vidi.c  | 25 -
   drivers/gpu/drm/exynos/exynos_mixer.c | 51
---
   8 files changed, 131 insertions(+), 74 deletions(-)




diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c
b/drivers/gpu/drm/exynos/exynos_mixer.c
index 015e85cabcc9..cdec3c1827c6 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -43,7 +43,6 @@
 #define MIXER_WIN_NR3
   #define VP_DEFAULT_WIN2
-#define CURSOR_WIN1
 /* The pixelformats that are natively supported by the mixer. */
   #define MXR_FORMAT_RGB5654
@@ -112,6 +111,31 @@ struct mixer_drv_data {
   boolhas_sclk;
   };
   +static const struct exynos_drm_plane_config
plane_configs[MIXER_WIN_NR] = {
+{
+.zpos = 0,
+.type = DRM_PLANE_TYPE_PRIMARY,
+.pixel_formats = mixer_formats,
+.num_pixel_formats = ARRAY_SIZE(mixer_formats),
+.capabilities = EXYNOS_DRM_PLANE_CAP_DOUBLE_X |
+EXYNOS_DRM_PLANE_CAP_DOUBLE_Y,
+}, {
+.zpos = 1,
+.type = DRM_PLANE_TYPE_CURSOR,
+.pixel_formats = mixer_formats,
+.num_pixel_formats = ARRAY_SIZE(mixer_formats),
+.capabilities = EXYNOS_DRM_PLANE_CAP_DOUBLE_X |
+EXYNOS_DRM_PLANE_CAP_DOUBLE_Y,
+}, {
+.zpos = 2,
+.type = DRM_PLANE_TYPE_OVERLAY,
+.pixel_formats = vp_formats,
+.num_pixel_formats = ARRAY_SIZE(vp_formats),
+.capabilities = EXYNOS_DRM_PLANE_CAP_DOUBLE_X |
+EXYNOS_DRM_PLANE_CAP_DOUBLE_Y,

As far as I know the video plane supports arbitrary scaling and provides
no dedicated 'pixel doubling' mode.

Right, I've forgotten that, I will update the code then. BTW, do you
plan to
submit your patches for Mixer, which fixes alpha blending setup?

I'll try to send a new version out this weekend. Any specific branch I
should base these on? (e.g. Inki's exynos-drm-next)


exynos-drm-next will be okay.

Best regards
--
Marek Szyprowski, PhD
Samsung R Institute Poland

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


Re: [PATCH v6 8/9] ARM: EXYNOS: rearrange static and non-static functions of PMU driver

2015-11-19 Thread Krzysztof Kozlowski
On 20.11.2015 13:46, Manish Badarkhe wrote:
> On Tue, Nov 17, 2015 at 11:35 AM, Pankaj Dubey  
> wrote:
>> This patch moves exynos_sys_powerdown_conf function above all
>> static functions, to avoid confusion causing due to mixing of
>> static-nonstatic-static functions and to improve readability of this
>> driver.
>>
>> Signed-off-by: Pankaj Dubey 
>> Suggested-by: Krzysztof Kozlowski 
>> Reviewed-by: Krzysztof Kozlowski 
>> ---
>>  arch/arm/mach-exynos/pmu.c | 34 +-
>>  1 file changed, 17 insertions(+), 17 deletions(-)
>>
>> diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c
>> index 01cb649..a7741d4 100644
>> --- a/arch/arm/mach-exynos/pmu.c
>> +++ b/arch/arm/mach-exynos/pmu.c
>> @@ -39,23 +39,6 @@ u32 pmu_raw_readl(u32 offset)
>> return readl_relaxed(pmu_base_addr + offset);
>>  }
>>
>> -static void exynos_power_off(void)
>> -{
>> -   unsigned int tmp;
>> -
>> -   pr_info("Power down.\n");
>> -   tmp = pmu_raw_readl(EXYNOS_PS_HOLD_CONTROL);
>> -   tmp ^= (1 << 8);
>> -   pmu_raw_writel(tmp, EXYNOS_PS_HOLD_CONTROL);
>> -
>> -   /* Wait a little so we don't give a false warning below */
>> -   mdelay(100);
>> -
>> -   pr_err("Power down failed, please power off system manually.\n");
>> -   while (1)
>> -   ;
>> -}
>> -
>>  void exynos_sys_powerdown_conf(enum sys_powerdown mode)
>>  {
>> unsigned int i;
>> @@ -85,6 +68,23 @@ void exynos_sys_powerdown_conf(enum sys_powerdown mode)
>> }
>>  }
>>
>> +static void exynos_power_off(void)
>> +{
>> +   unsigned int tmp;
>> +
>> +   pr_info("Power down.\n");
>> +   tmp = pmu_raw_readl(EXYNOS_PS_HOLD_CONTROL);
>> +   tmp ^= (1 << 8);
> Can we have some define over here? to operate this bit.
> 

1. This will be removed by syscon-reboot/poweroff patches [0].
2. This patch is only rename/move. Fixing stuff should go to separate
patches. But IMHO fixing is not needed because of 1.

[0] http://www.spinics.net/lists/devicetree/msg98858.html

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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/5] ARM: exynos: select POWER_RESET_SYSCON and POWER_RESET_SYSCON_POWEROFF

2015-11-19 Thread Alim Akhtar
Since we switch to use generic syscon regmap based reset/poweroff
driver for exynos SoC, lets select it from ARCH_EXYNOS instead of
enabling it from various defconfigs. This also select POWER_RESET
as SYSCON-{reset, poweroff} drivers depends on it.

Also because of the above changes we don't need special handling
for reboot/poweroff in exynos pmu driver. This patch also removes
the same from exynos pmu driver to keep git bisect working.

Note: This will break reboot/poweroff on boards with older dtbs
with a newer kernel.

Signed-off-by: Alim Akhtar 
Reviewed-by: Javier Martinez Canillas 
Acked-by: Moritz Fischer 
---
 arch/arm/mach-exynos/Kconfig |3 +++
 arch/arm/mach-exynos/pmu.c   |   43 --
 2 files changed, 3 insertions(+), 43 deletions(-)

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 3a10f1a8317a..d279edf9b10d 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -27,6 +27,9 @@ menuconfig ARCH_EXYNOS
select SRAM
select THERMAL
select MFD_SYSCON
+   select POWER_RESET
+   select POWER_RESET_SYSCON
+   select POWER_RESET_SYSCON_POWEROFF
help
  Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)
 
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c
index de68938ee6aa..393c04aa727e 100644
--- a/arch/arm/mach-exynos/pmu.c
+++ b/arch/arm/mach-exynos/pmu.c
@@ -14,9 +14,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-
 
 #include "exynos-pmu.h"
 #include "regs-pmu.h"
@@ -681,23 +678,6 @@ static unsigned int const 
exynos5420_list_disable_pmu_reg[] = {
EXYNOS5420_CMU_RESET_FSYS_SYS_PWR_REG,
 };
 
-static void exynos_power_off(void)
-{
-   unsigned int tmp;
-
-   pr_info("Power down.\n");
-   tmp = pmu_raw_readl(EXYNOS_PS_HOLD_CONTROL);
-   tmp ^= (1 << 8);
-   pmu_raw_writel(tmp, EXYNOS_PS_HOLD_CONTROL);
-
-   /* Wait a little so we don't give a false warning below */
-   mdelay(100);
-
-   pr_err("Power down failed, please power off system manually.\n");
-   while (1)
-   ;
-}
-
 static void exynos5420_powerdown_conf(enum sys_powerdown mode)
 {
u32 this_cluster;
@@ -875,14 +855,6 @@ static void exynos5420_pmu_init(void)
pr_info("EXYNOS5420 PMU initialized\n");
 }
 
-static int pmu_restart_notify(struct notifier_block *this,
-   unsigned long code, void *unused)
-{
-   pmu_raw_writel(0x1, EXYNOS_SWRESET);
-
-   return NOTIFY_DONE;
-}
-
 static const struct exynos_pmu_data exynos3250_pmu_data = {
.pmu_config = exynos3250_pmu_config,
.pmu_init   = exynos3250_pmu_init,
@@ -940,20 +912,11 @@ static const struct of_device_id 
exynos_pmu_of_device_ids[] = {
{ /*sentinel*/ },
 };
 
-/*
- * Exynos PMU restart notifier, handles restart functionality
- */
-static struct notifier_block pmu_restart_handler = {
-   .notifier_call = pmu_restart_notify,
-   .priority = 128,
-};
-
 static int exynos_pmu_probe(struct platform_device *pdev)
 {
const struct of_device_id *match;
struct device *dev = >dev;
struct resource *res;
-   int ret;
 
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
pmu_base_addr = devm_ioremap_resource(dev, res);
@@ -978,12 +941,6 @@ static int exynos_pmu_probe(struct platform_device *pdev)
 
platform_set_drvdata(pdev, pmu_context);
 
-   ret = register_restart_handler(_restart_handler);
-   if (ret)
-   dev_warn(dev, "can't register restart handler err=%d\n", ret);
-
-   pm_power_off = exynos_power_off;
-
dev_dbg(dev, "Exynos PMU Driver probe done\n");
return 0;
 }
-- 
1.7.10.4

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


[PATCH v3 4/5] arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC

2015-11-19 Thread Alim Akhtar
This patch adds syscon-{reboot, poweroff} nodes to allow the
generic syscon-{reboot, poweroff} driver to reset/poweroff exynos5410 SoC.

Signed-off-by: Alim Akhtar 
Reviewed-by: Pankaj Dubey 
Reviewed-by: Javier Martinez Canillas 
Reviewed-by: Krzysztof Kozlowski 
Acked-by: Moritz Fischer 
---
 arch/arm/boot/dts/exynos5410.dtsi |   14 ++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5410.dtsi 
b/arch/arm/boot/dts/exynos5410.dtsi
index 731eefd23fa9..fad0779b1b6e 100644
--- a/arch/arm/boot/dts/exynos5410.dtsi
+++ b/arch/arm/boot/dts/exynos5410.dtsi
@@ -102,6 +102,20 @@
reg = <0x1004 0x5000>;
};
 
+   poweroff: syscon-poweroff {
+   compatible = "syscon-poweroff";
+   regmap = <_system_controller>;
+   offset = <0x330C>; /* PS_HOLD_CONTROL */
+   mask = <0x5200>; /* reset value */
+   };
+
+   reboot: syscon-reboot {
+   compatible = "syscon-reboot";
+   regmap = <_system_controller>;
+   offset = <0x0400>; /* SWRESET */
+   mask = <0x1>;
+   };
+
mct: mct@101C {
compatible = "samsung,exynos4210-mct";
reg = <0x101C 0xB00>;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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/5] arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs

2015-11-19 Thread Alim Akhtar
This patch adds syscon-{reboot, poweroff} nodes to allow the
generic syscon-{reboot, poweroff} driver to reset/poweroff exynos3250 SoC.

Signed-off-by: Alim Akhtar 
Reviewed-by: Pankaj Dubey 
Reviewed-by: Javier Martinez Canillas 
Reviewed-by: Krzysztof Kozlowski 
Acked-by: Moritz Fischer 
---
 arch/arm/boot/dts/exynos3250.dtsi |   14 ++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/exynos3250.dtsi 
b/arch/arm/boot/dts/exynos3250.dtsi
index 2f30d632f1cc..18e3deffbf48 100644
--- a/arch/arm/boot/dts/exynos3250.dtsi
+++ b/arch/arm/boot/dts/exynos3250.dtsi
@@ -152,6 +152,20 @@
interrupt-parent = <>;
};
 
+   poweroff: syscon-poweroff {
+   compatible = "syscon-poweroff";
+   regmap = <_system_controller>;
+   offset = <0x330C>; /* PS_HOLD_CONTROL */
+   mask = <0x5200>; /* Reset value */
+   };
+
+   reboot: syscon-reboot {
+   compatible = "syscon-reboot";
+   regmap = <_system_controller>;
+   offset = <0x0400>; /* SWRESET */
+   mask = <0x1>;
+   };
+
mipi_phy: video-phy@10020710 {
compatible = "samsung,s5pv210-mipi-video-phy";
#phy-cells = <1>;
-- 
1.7.10.4

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


[PATCH v3 0/5] Switch to generic syscon regmap based drivers

2015-11-19 Thread Alim Akhtar
Now we have a nice way to reboot/poweroff system using a generic
syscon regmap based drivers, this series moves exynos SoCs to
make use of the same.

Changes since v2:
* Merged patch 5 and 6 to keep git bisect happy

Changes since v1:
* Added a comment about the register information
* Droped defconfig changes as disscussed
* Collected various Reviewed-by, Tested-by and Acked-by tags
* Added SYSCON-{RESET, POWEROFF} to select from Kconfig

Alim Akhtar (5):
  arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
  arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
  arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
  arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
  ARM: exynos: select POWER_RESET_SYSCON and
POWER_RESET_SYSCON_POWEROFF

 arch/arm/boot/dts/exynos3250.dtsi |   14 
 arch/arm/boot/dts/exynos4.dtsi|   14 
 arch/arm/boot/dts/exynos5.dtsi|   14 
 arch/arm/boot/dts/exynos5410.dtsi |   14 
 arch/arm/mach-exynos/Kconfig  |3 +++
 arch/arm/mach-exynos/pmu.c|   43 -
 6 files changed, 59 insertions(+), 43 deletions(-)

-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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/5] arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4

2015-11-19 Thread Alim Akhtar
This patch adds syscon-{reboot, poweroff} nodes to allow the
generic syscon-{reboot, poweroff} driver to reset/poweroff exynos4 SoC.

Signed-off-by: Alim Akhtar 
Reviewed-by: Pankaj Dubey 
Reviewed-by: Javier Martinez Canillas 
Reviewed-by: Krzysztof Kozlowski 
Tested-by: Tobias Jakobi 
Acked-by: Moritz Fischer 
---
 arch/arm/boot/dts/exynos4.dtsi |   14 ++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index 3184e10f260a..07e10ee60bd8 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -158,6 +158,20 @@
interrupt-parent = <>;
};
 
+   poweroff: syscon-poweroff {
+   compatible = "syscon-poweroff";
+   regmap = <_system_controller>;
+   offset = <0x330C>; /* PS_HOLD_CONTROL */
+   mask = <0x5200>; /* reset value */
+   };
+
+   reboot: syscon-reboot {
+   compatible = "syscon-reboot";
+   regmap = <_system_controller>;
+   offset = <0x0400>; /* SWRESET */
+   mask = <0x1>;
+   };
+
dsi_0: dsi@11C8 {
compatible = "samsung,exynos4210-mipi-dsi";
reg = <0x11C8 0x1>;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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/5] arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5

2015-11-19 Thread Alim Akhtar
This patch adds syscon-{reboot, poweroff} nodes to allow the
generic syscon-{reboot, poweroff} driver to reset/poweroff exynos5 SoCs.

Signed-off-by: Alim Akhtar 
Reviewed-by: Pankaj Dubey 
Reviewed-by: Javier Martinez Canillas 
Reviewed-by: Krzysztof Kozlowski 
Acked-by: Moritz Fischer 
---
 arch/arm/boot/dts/exynos5.dtsi |   14 ++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5.dtsi b/arch/arm/boot/dts/exynos5.dtsi
index 110dbd4fb884..e2439e87ee4a 100644
--- a/arch/arm/boot/dts/exynos5.dtsi
+++ b/arch/arm/boot/dts/exynos5.dtsi
@@ -88,6 +88,20 @@
status = "disabled";
};
 
+   poweroff: syscon-poweroff {
+   compatible = "syscon-poweroff";
+   regmap = <_system_controller>;
+   offset = <0x330C>; /* PS_HOLD_CONTROL */
+   mask = <0x5200>; /* reset value */
+   };
+
+   reboot: syscon-reboot {
+   compatible = "syscon-reboot";
+   regmap = <_system_controller>;
+   offset = <0x0400>; /* SWRESET */
+   mask = <0x1>;
+   };
+
fimd: fimd@1440 {
compatible = "samsung,exynos5250-fimd";
interrupt-parent = <>;
-- 
1.7.10.4

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


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-11-19 Thread Alim Akhtar

Hi Krzysztof,

On 11/20/2015 06:16 AM, Krzysztof Kozlowski wrote:

On 20.11.2015 03:06, Alim Akhtar wrote:

Hi Krzysztof/Ulf/Kukjin

On Thu, Oct 22, 2015 at 5:47 AM, Krzysztof Kozlowski
 wrote:

On 22.10.2015 00:01, Alim Akhtar wrote:

On Wed, Oct 21, 2015 at 8:25 PM, Javier Martinez Canillas
 wrote:

Hello Alim,

On 10/21/2015 04:50 PM, Alim Akhtar wrote:

[snip]



[0]:
 From c9b250ee03bae338339b70693e906145c719f783 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas 
Date: Wed, 21 Oct 2015 11:59:44 +0200
Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
  handler

The pwrseq_emmc driver does a eMMC card reset before a system reboot to
allow broken or limited ROM boot-loaders, that don't have an eMMC reset
logic, to be able to read the second stage from the eMMC.

But this has to be called before a system reboot handler and while most
of them use the priority 128, there are other restart handlers (such as
the syscon-reboot one) that use a higher priority. So, use the highest
priority to make sure that the eMMC hw is reset before a system reboot.

Signed-off-by: Javier Martinez Canillas 
---

Looks good.
Reviewed-by: Alim Akhtar 





+Cc Ulf,

Javier,

First of all, thanks Javier for digging into the issue. Actually I have
Odroid U3 but because of user-space limitations (which I need for other
work) I cannot test all of mainline patches there.



Thanks, should I post it as a proper patch or are adding it to your
series?

Suggest you to post as a patch collecting {Tested, Reviewed}-by (easy
for maintainers to pickup ) and probably CCing Ulf for his feedback.


I think the latter is more reasonable so with an ack from Ulf,
all patches can go through the linux-samsung tree.


yes, that is reasonable, as I said, let Krzysztof and Ulf take a call here.


Javier, Alim, Ulf,

I am not grabbing any more patches for v4.4 because I doubt that they
could be merged to arm-soc for this cycle. My last pull requests for
v4.4 is still pending...

This means that I plan to pick up these series for v4.5, after closing
v4.4 merge window (unless Kukjin picks it also). Because of that, we
have plenty of time, so my idea is:
1. Wait for some comments from Ulf on Javier's fix.
2. If the fix goes into v4.4, then problem solved.
3. If not and it get acked, then it can go with this set.
4. If not and it get applied by Ulf for v4.5, then a tag from him would
be a nice way to solve dependency.

Either way we don't have to hurry, I think.



Is It the right time to get this series in?
Thanks!!


I started applying it but stopped at #5. It should be squashed with #6
to get rid of (not important) conflict between syscon reboot and
existing Exynos restart handler:

syscon-poweroff syscon-poweroff: pm_power_off already claimed c001e52c
exynos_power_off
syscon-poweroff: probe of syscon-poweroff failed with error -16

The conflict is not really an issue because of ordering of init calls
the Exynos will register itself before syscon. Nevertheless splitting
the patches does not really make sense... so please merge #5 with #6.


Hmm...nice catch..will send v3 shortly after merging patch #5 and #6.


Best regards,
Krzysztof



--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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/5] ARM: exynos: select POWER_RESET_SYSCON and POWER_RESET_SYSCON_POWEROFF

2015-11-19 Thread Krzysztof Kozlowski
On 20.11.2015 14:17, Alim Akhtar wrote:
> Since we switch to use generic syscon regmap based reset/poweroff
> driver for exynos SoC, lets select it from ARCH_EXYNOS instead of
> enabling it from various defconfigs. This also select POWER_RESET
> as SYSCON-{reset, poweroff} drivers depends on it.
> 
> Also because of the above changes we don't need special handling
> for reboot/poweroff in exynos pmu driver. This patch also removes
> the same from exynos pmu driver to keep git bisect working.
> 
> Note: This will break reboot/poweroff on boards with older dtbs
> with a newer kernel.
> 
> Signed-off-by: Alim Akhtar 
> Reviewed-by: Javier Martinez Canillas 
> Acked-by: Moritz Fischer 
> ---
>  arch/arm/mach-exynos/Kconfig |3 +++
>  arch/arm/mach-exynos/pmu.c   |   43 
> --
>  2 files changed, 3 insertions(+), 43 deletions(-)
> 

Reviewed-by: Krzysztof Kozlowski 


Thanks, applied with different title:
"ARM: EXYNOS: Switch to syscon reboot and poweroff"
https://git.kernel.org/cgit/linux/kernel/git/krzk/linux.git/log/?h=next/soc

I'll be pushing this to Kukjin for v4.5 (unless he picks it by himself).

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/7] drm/exynos: add pm runtime support

2015-11-19 Thread Javier Martinez Canillas
On 11/19/2015 11:55 AM, Javier Martinez Canillas wrote:
>>>
>>
>> This series causes a boot failure on at least an Exynos5800 Peach Pi
>> Chromebook (tested myself) and seems to be the cause of other Exynos
>> boards failing to boot: http://kernelci.org/boot/?exynos
>>
>> [snip]
>>
>>>   drm/exynos: add pm_runtime to Mixer
>>>   drm/exynos: add pm_runtime to FIMD
>>
>> I had to revert these patches in order to get the machine in a bootable
>> state again, the sha1 hash for these patches in next-20151119 are:
>>
>> 045febd5f813 drm/exynos: add pm_runtime to FIMD

On a closer look, only reverting the FIMD patch is enough
to make at least the Exynos5800 Peach Pi to boot again.

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/7] drm/exynos: add pm runtime support

2015-11-19 Thread Javier Martinez Canillas
[adding Kevin and Tyler to cc list]

Hello Inki and Gustavo,

On 11/03/2015 07:47 AM, Inki Dae wrote:
> This patch series adds pm runtime support for Exynos drm.
> 
> Originally, this patch was posted by Gustavo but there was no any
> answer about some comments. So I rebased this patch series on top of
> exynos-drm-next, removed unnecessary patches and modified wrong macro.
> 
> Changelog v2:
> - Remove patch 5 and 6.
>   . commit callback are already removed so isn't required anymore.
> - Remove patch 8 which makes dp clock enabled directly from FIMD.
>   . Really not mendatory for FIMD uses DP, and it could be different
> according to Board.
> - Modified CONFIG_PM_SLEEP to CONFIG_PM.
>   . In case of runtime pm, CONFIG_PM macro should be used instead of
> CONFIG_PM_SLEEP.
>

This series causes a boot failure on at least an Exynos5800 Peach Pi
Chromebook (tested myself) and seems to be the cause of other Exynos
boards failing to boot: http://kernelci.org/boot/?exynos

[snip]

>   drm/exynos: add pm_runtime to Mixer
>   drm/exynos: add pm_runtime to FIMD

I had to revert these patches in order to get the machine in a bootable
state again, the sha1 hash for these patches in next-20151119 are:

045febd5f813 drm/exynos: add pm_runtime to FIMD
dd766fb8479b drm/exynos: add pm_runtime to Mixer

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/7] drm/exynos: add pm runtime support

2015-11-19 Thread Javier Martinez Canillas
On 11/19/2015 11:51 AM, Javier Martinez Canillas wrote:
> [adding Kevin and Tyler to cc list]
>
> Hello Inki and Gustavo,

I didn't notice before that Gustavo was not cc'ed in the
original email from Inki so I'm adding him as well.

Sorry to others for the noise.

> 
> On 11/03/2015 07:47 AM, Inki Dae wrote:
>> This patch series adds pm runtime support for Exynos drm.
>>
>> Originally, this patch was posted by Gustavo but there was no any
>> answer about some comments. So I rebased this patch series on top of
>> exynos-drm-next, removed unnecessary patches and modified wrong macro.
>>
>> Changelog v2:
>> - Remove patch 5 and 6.
>>   . commit callback are already removed so isn't required anymore.
>> - Remove patch 8 which makes dp clock enabled directly from FIMD.
>>   . Really not mendatory for FIMD uses DP, and it could be different
>> according to Board.
>> - Modified CONFIG_PM_SLEEP to CONFIG_PM.
>>   . In case of runtime pm, CONFIG_PM macro should be used instead of
>> CONFIG_PM_SLEEP.
>>
> 
> This series causes a boot failure on at least an Exynos5800 Peach Pi
> Chromebook (tested myself) and seems to be the cause of other Exynos
> boards failing to boot: http://kernelci.org/boot/?exynos
> 
> [snip]
> 
>>   drm/exynos: add pm_runtime to Mixer
>>   drm/exynos: add pm_runtime to FIMD
> 
> I had to revert these patches in order to get the machine in a bootable
> state again, the sha1 hash for these patches in next-20151119 are:
> 
> 045febd5f813 drm/exynos: add pm_runtime to FIMD
> dd766fb8479b drm/exynos: add pm_runtime to Mixer
> 
> Best regards,
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] i2c: exynos5: register driver early in subsys initcall to avoid probe defer

2015-11-19 Thread Wolfram Sang
Hi Marek,

> This problem is known for ages, there were number of attempts to add

Yes, I heard of it, too.

> support for deferred probe or solve the problem of deferred UDC driver
> probe, but none got accepted so far:

Then they need to be worked on. AFAIK the rejection is based on
implementation details, not because the feature itself is not wanted,
or?

> Till now it worked somehow for boards with older i2c bus drivers, which
> were registered in subsys initcall. Boards, which use newer i2c bus drivers
> cannot be used with usb gadgets compiled-in.

Yes, because the above issue needs to be *fixed*, not workarounded. You
still have the option to carry your patch out-of-tree if fixing the
issue is not an option for you.

We already had problems here when someone tried to revert
subsys_initcall to module_init because of other dependency issues on
another particular board. So, the pain should really go where the fixing
is needed.

I hope you understand,

   Wolfram



signature.asc
Description: Digital signature


Re: [PATCH] i2c: exynos5: register driver early in subsys initcall to avoid probe defer

2015-11-19 Thread Marek Szyprowski

Hello,

On 2015-11-01 17:02, Wolfram Sang wrote:

On Fri, Oct 30, 2015 at 03:23:28PM +0100, Marek Szyprowski wrote:

i2c bus drivers should be registered earlier than typical drivers to let
important i2c devices (like PMICs/regulators) get registered early
enough to avoid probe defer of all devices in typical embedded system.

Signed-off-by: Marek Szyprowski 

I don't accept such patches anymore. Some more background:

http://www.spinics.net/lists/linux-i2c/msg13102.html
http://www.spinics.net/lists/linux-i2c/msg16644.html


Well, then how can we get Exynos5xxx-based boards working with USB gadget
driver compiled-in? USB Device controller driver (UDC) needs regulator to
probe successfully. On the other hand USB gadget subsystem doesn't wait
until all UDC drivers gets probed and fails to bind compiled-in gadget
drivers if no UDC is available on probe time.

This problem is known for ages, there were number of attempts to add
support for deferred probe or solve the problem of deferred UDC driver
probe, but none got accepted so far:

http://www.spinics.net/lists/linux-usb/msg102795.html (20 Feb 2014)
http://www.spinics.net/lists/linux-usb/msg105279.html (2 Apr 2014)
http://thread.gmane.org/gmane.linux.usb.general/109745 (10 Jun 2014)
https://lkml.org/lkml/2015/6/22/554 (23 Jun 2015)

Till now it worked somehow for boards with older i2c bus drivers, which
were registered in subsys initcall. Boards, which use newer i2c bus drivers
cannot be used with usb gadgets compiled-in.

Best regards
--
Marek Szyprowski, PhD
Samsung R Institute Poland

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