Re: [PATCH v2 11/11] drm/exynos: remove struct exynos_drm_encoder layer

2015-08-12 Thread Gustavo Padovan
Hi Inki,

2015-08-11 Inki Dae inki@samsung.com:

 On 2015년 08월 11일 09:38, Gustavo Padovan wrote:
  Hi Inki,
  
  2015-08-07 Inki Dae inki@samsung.com:
  
  Hi Gustavo,
 
  On 2015년 08월 06일 22:31, Gustavo Padovan wrote:
  From: Gustavo Padovan gustavo.pado...@collabora.co.uk
 
  struct exynos_drm_encoder was justing wrapping struct drm_encoder, it had
  only a drm_encoder member and the internal exynos_drm_encoders ops that
  was directly mapped to the drm_encoder helper funcs.
 
  So now exynos DRM uses struct drm_encoder directly, this removes
  completely the struct exynos_drm_encoder.
 
 
  Trats2 board, which uses Exynos4412 Soc, doesn't work after this patch
  is applied. Below is the booting logs,
  [1.171318] console [ttySAC2] enabled
  [1.175522] 1383.serial: ttySAC3 at MMIO 0x1383 (irq = 60,
  base_baud = 0) is a S3C6400/10
  [1.185545] [drm] Initialized drm 1.1.0 20060810
  [1.194104] exynos-drm exynos-drm: bound 11c0.fimd (ops
  fimd_component_ops)
  [1.200352] exynos-drm exynos-drm: bound 11c8.dsi (ops
  exynos_dsi_component_ops)
  [1.207688] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
  [1.214313] [drm] No driver support for vblank timestamp query.
  [1.220218] [drm] Initialized exynos 1.0.0 20110530 on minor 0
 
  Booting is locked up here. This patch looks good to me so I tried to
  find why locked up and I found the booting is locked up as soon as
  console_lock function is called. Can you and other guys look into this
  issue?
  
  I've realized that I left a fix for patch 01 behind, it could be the
  cause of this issue. I've just resent this patch with the added v2 fix
  up.
 
 With above change, still locked up. So your updated patch doesn't
 resolve this issue.
 
 Anyway, I tested it with fbdev emulation relevant patch series[1] and
 the booting was ok with disabling fbdev emulation as Daniel commented.
 However, I think the booting should also be ok with fbdev emulation so I
 don't want for your last patch to be merged to mainline until the issue
 is resolved.

I've tried to reproduce your issue with these patches on a odroid-x2
(exynos4412) but it seems to work fine for me with fbdev emulation
enabled. In snow and peach-pi it also works fine. We would need
to debug better on your side to figure out what is breaking for you.

Gustavo
--
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 11/11] drm/exynos: remove struct exynos_drm_encoder layer

2015-08-12 Thread Gustavo Padovan
2015-08-12 Gustavo Padovan gustavo.pado...@collabora.co.uk:

 Hi Inki,
 
 2015-08-11 Inki Dae inki@samsung.com:
 
  On 2015년 08월 11일 09:38, Gustavo Padovan wrote:
   Hi Inki,
   
   2015-08-07 Inki Dae inki@samsung.com:
   
   Hi Gustavo,
  
   On 2015년 08월 06일 22:31, Gustavo Padovan wrote:
   From: Gustavo Padovan gustavo.pado...@collabora.co.uk
  
   struct exynos_drm_encoder was justing wrapping struct drm_encoder, it 
   had
   only a drm_encoder member and the internal exynos_drm_encoders ops that
   was directly mapped to the drm_encoder helper funcs.
  
   So now exynos DRM uses struct drm_encoder directly, this removes
   completely the struct exynos_drm_encoder.
  
  
   Trats2 board, which uses Exynos4412 Soc, doesn't work after this patch
   is applied. Below is the booting logs,
   [1.171318] console [ttySAC2] enabled
   [1.175522] 1383.serial: ttySAC3 at MMIO 0x1383 (irq = 60,
   base_baud = 0) is a S3C6400/10
   [1.185545] [drm] Initialized drm 1.1.0 20060810
   [1.194104] exynos-drm exynos-drm: bound 11c0.fimd (ops
   fimd_component_ops)
   [1.200352] exynos-drm exynos-drm: bound 11c8.dsi (ops
   exynos_dsi_component_ops)
   [1.207688] [drm] Supports vblank timestamp caching Rev 2 
   (21.10.2013).
   [1.214313] [drm] No driver support for vblank timestamp query.
   [1.220218] [drm] Initialized exynos 1.0.0 20110530 on minor 0
  
   Booting is locked up here. This patch looks good to me so I tried to
   find why locked up and I found the booting is locked up as soon as
   console_lock function is called. Can you and other guys look into this
   issue?
   
   I've realized that I left a fix for patch 01 behind, it could be the
   cause of this issue. I've just resent this patch with the added v2 fix
   up.
  
  With above change, still locked up. So your updated patch doesn't
  resolve this issue.
  
  Anyway, I tested it with fbdev emulation relevant patch series[1] and
  the booting was ok with disabling fbdev emulation as Daniel commented.
  However, I think the booting should also be ok with fbdev emulation so I
  don't want for your last patch to be merged to mainline until the issue
  is resolved.
 
 I've tried to reproduce your issue with these patches on a odroid-x2
 (exynos4412) but it seems to work fine for me with fbdev emulation
 enabled. In snow and peach-pi it also works fine. We would need
 to debug better on your side to figure out what is breaking for you.

Can you please git bisect this? So we can figure out which commit is
causing the issue. That would be great.

Gustavo
--
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 RESEND v6 3/3] ARM: dts: Add properties to use pwm-fan device as a cooling device in Odroid U3

2015-08-12 Thread Krzysztof Kozlowski
On 11.08.2015 22:15, Lukasz Majewski wrote:
 With those bindings it is possible to use pwm-fan device available in
 Odroid U3 as a cooling device.
 
 Signed-off-by: Lukasz Majewski l.majew...@samsung.com
 Acked-by: Eduardo Valentin edubez...@gmail.com
 ---
  arch/arm/boot/dts/exynos4412-odroidu3.dts | 33 
 ++-
  1 file changed, 32 insertions(+), 1 deletion(-)

Looks sensible.

Reviewed-by: Krzysztof Kozlowski k.kozlow...@samsung.com

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 RESEND v6 2/3] ARM: dts: Add pwm-fan node to the Odroid-U3 board

2015-08-12 Thread Krzysztof Kozlowski
On 11.08.2015 22:14, Lukasz Majewski wrote:
 From: Kamil Debski k.deb...@samsung.com
 
 Add pwm-fan node to the Odroid-U3 board file to enable PWM control of the
 cooling fan. In addition, add the pwm label to the pwm@139D node
 in the exynos4412.dtsi.
 
 Signed-off-by: Kamil Debski k.deb...@samsung.com
 Signed-off-by: Lukasz Majewski l.majew...@samsung.com
 ---
  arch/arm/boot/dts/exynos4412-odroidu3.dts | 12 
  1 file changed, 12 insertions(+)
 

Reviewed-by: Krzysztof Kozlowski k.kozlow...@samsung.com

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 RFC v3 07/16] media: get rid of unused extra_links param on media_entity_init()

2015-08-12 Thread Mauro Carvalho Chehab
Currently, media_entity_init() creates an array with the links,
allocated at init time. It provides a parameter (extra_links)
that would allocate more links than the current needs, but this
is not used by any driver.

As we want to be able to do dynamic link allocation/removal,
we'll need to change the implementation of the links. So,
before doing that, let's first remove that extra unused
parameter, in order to cleanup the interface first.

Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com

diff --git a/Documentation/media-framework.txt 
b/Documentation/media-framework.txt
index f552a75c0e70..2cc6019f7147 100644
--- a/Documentation/media-framework.txt
+++ b/Documentation/media-framework.txt
@@ -104,7 +104,7 @@ although drivers can allocate entities directly.
 Drivers initialize entities by calling
 
media_entity_init(struct media_entity *entity, u16 num_pads,
- struct media_pad *pads, u16 extra_links);
+ struct media_pad *pads);
 
 The media_entity name, type, flags, revision and group_id fields can be
 initialized before or after calling media_entity_init. Entities embedded in
diff --git a/Documentation/video4linux/v4l2-framework.txt 
b/Documentation/video4linux/v4l2-framework.txt
index 75d5c18d689a..109cc3792534 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -300,7 +300,7 @@ calling media_entity_init():
struct media_pad *pads = my_sd-pads;
int err;
 
-   err = media_entity_init(sd-entity, npads, pads, 0);
+   err = media_entity_init(sd-entity, npads, pads);
 
 The pads array must have been previously initialized. There is no need to
 manually set the struct media_entity type and name fields, but the revision
@@ -700,7 +700,7 @@ calling media_entity_init():
struct media_pad *pad = my_vdev-pad;
int err;
 
-   err = media_entity_init(vdev-entity, 1, pad, 0);
+   err = media_entity_init(vdev-entity, 1, pad);
 
 The pads array must have been previously initialized. There is no need to
 manually set the struct media_entity type and name fields.
diff --git a/Documentation/zh_CN/video4linux/v4l2-framework.txt 
b/Documentation/zh_CN/video4linux/v4l2-framework.txt
index 2b828e631e31..ff815cb92031 100644
--- a/Documentation/zh_CN/video4linux/v4l2-framework.txt
+++ b/Documentation/zh_CN/video4linux/v4l2-framework.txt
@@ -295,7 +295,7 @@ owner ??? i2c 
?
struct media_pad *pads = my_sd-pads;
int err;
 
-   err = media_entity_init(sd-entity, npads, pads, 0);
+   err = media_entity_init(sd-entity, npads, pads);
 
 pads  media_entity ??? type ???
 name revision ?
@@ -602,7 +602,7 @@ v4l2_file_operations  file_operations 
???
struct media_pad *pad = my_vdev-pad;
int err;
 
-   err = media_entity_init(vdev-entity, 1, pad, 0);
+   err = media_entity_init(vdev-entity, 1, pad);
 
 pads ?? media_entity ??? 
type ???
 name ??
diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
index 13bb57f0457f..2fdcbb5f000a 100644
--- a/drivers/media/dvb-core/dvbdev.c
+++ b/drivers/media/dvb-core/dvbdev.c
@@ -249,7 +249,7 @@ static void dvb_register_media_device(struct dvb_device 
*dvbdev,
}
 
if (npads)
-   ret = media_entity_init(dvbdev-entity, npads, dvbdev-pads, 0);
+   ret = media_entity_init(dvbdev-entity, npads, dvbdev-pads);
if (!ret)
ret = media_device_register_entity(dvbdev-adapter-mdev,
   dvbdev-entity);
diff --git a/drivers/media/i2c/ad9389b.c b/drivers/media/i2c/ad9389b.c
index 69094ab047b1..39d6ee681aeb 100644
--- a/drivers/media/i2c/ad9389b.c
+++ b/drivers/media/i2c/ad9389b.c
@@ -1158,7 +1158,7 @@ static int ad9389b_probe(struct i2c_client *client, const 
struct i2c_device_id *
state-rgb_quantization_range_ctrl-is_private = true;
 
state-pad.flags = MEDIA_PAD_FL_SINK;
-   err = media_entity_init(sd-entity, 1, state-pad, 0);
+   err = media_entity_init(sd-entity, 1, state-pad);
if (err)
goto err_hdl;
 
diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c
index c70ababce954..5f76997f6e07 100644
--- a/drivers/media/i2c/adp1653.c
+++ b/drivers/media/i2c/adp1653.c
@@ -512,7 +512,7 @@ static int adp1653_probe(struct i2c_client *client,
if (ret)
goto free_and_quit;
 
-   ret = media_entity_init(flash-subdev.entity, 0, NULL, 0);
+   ret = media_entity_init(flash-subdev.entity, 0, NULL);
if (ret  0)
goto free_and_quit;
 
diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index 

Re: [RFC PATCH v4 3/9] mips: pistachio_defconfig: remove CONFIG_MMC_DW_IDMAC

2015-08-12 Thread Ralf Baechle
On Thu, Aug 06, 2015 at 02:45:15PM +0800, Shawn Lin wrote:

 DesignWare MMC Controller's transfer mode should be decided
 at runtime instead of compile-time. So we remove this config
 option and read dw_mmc's register to select DMA master.
 
 Signed-off-by: Shawn Lin shawn@rock-chips.com
 ---
 
 Changes in v4: None
 Changes in v3: None
 Changes in v2: None
 
  arch/mips/configs/pistachio_defconfig | 1 -

Acked-by: Ralf Baechle r...@linux-mips.org

Please feel free to merge this patch with the remainder
of the series.

  Ralf
--
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: [RFC PATCH v4 3/9] mips: pistachio_defconfig: remove CONFIG_MMC_DW_IDMAC

2015-08-12 Thread Shawn Lin

在 2015/8/13 6:05, Ralf Baechle 写道:

On Thu, Aug 06, 2015 at 02:45:15PM +0800, Shawn Lin wrote:


DesignWare MMC Controller's transfer mode should be decided
at runtime instead of compile-time. So we remove this config
option and read dw_mmc's register to select DMA master.

Signed-off-by: Shawn Lin shawn@rock-chips.com
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

  arch/mips/configs/pistachio_defconfig | 1 -


Acked-by: Ralf Baechle r...@linux-mips.org

Please feel free to merge this patch with the remainder
of the series.



Thanks, Ralf. :)

v5 is coming which will be rebased on 
https://github.com/jh80chung/dw-mmc.git tags/dw-mmc-for-ulf-v4.2 for 
the next merge window

that make Jeahoon do it easier. Also define new macro for reading
HCON register suggested by Joachim.



   Ralf






--
Shawn Lin

--
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: exynos4*: add iommu property to JPEG device

2015-08-12 Thread Krzysztof Kozlowski
On 12.08.2015 18:39, Marek Szyprowski wrote:
 JPEG codec node has been added in parallel to the patch, which added
 support for IOMMU to Exynos platform, so JPEG device for Exynos4 series
 lacked IOMMU property. This patch fixes this issue.
 
 Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
 ---
  arch/arm/boot/dts/exynos4.dtsi | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
 index b0d52b1..98c0a36 100644
 --- a/arch/arm/boot/dts/exynos4.dtsi
 +++ b/arch/arm/boot/dts/exynos4.dtsi
 @@ -702,6 +702,7 @@
   clocks = clock CLK_JPEG;
   clock-names = jpeg;
   power-domains = pd_cam;
 + iommus = sysmmu_jpeg;
   };
  
   hdmi: hdmi@12D0 {


Reviewed-by: Krzysztof Kozlowski k.kozlow...@samsung.com

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


[GIT PULL 2nd 3/4] Samsung driver 2nd updates for v4.3

2015-08-12 Thread Kukjin Kim
Hi,

I've created the signed tag based on previous tags/samsung-driver so you
can see several merge in there. To support cpufreq-dt driver requires
clk/cpufreq/exynos changes together and clk/cpufreq maintainers are
aware of this changes. And we can remove exynos cpufreq driver at last.

Note this drivers update is including previous dependencies and if
you're OK, please pull.

Thanks,
Kukjin


The following changes since commit 6b1621c4a15b9110cda7cc2e2eb3e8e1a0c2bcfc:

  ARM: EXYNOS: Add exynos3250 compatible to use generic cpufreq driver
(2015-08-04 15:59:33 +0900)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
tags/samsung-driver-2

for you to fetch changes up to 50ef057c78ba7141b502f85ca1035e9c45612f4e:

  Merge branch 'v4.3-topic/cpufreq-samsung-2' into
v4.3-next/clk-cpufreq-samsung-2 (2015-08-12 07:44:59 +0900)



Samsung 2nd driver updates for v4.3

- add generic cpufreq driver for exynos4212 and 4412

- remove exynos4 SoCs specific cpufreq driver will not
  be used more and acked by cpufreq maintainer Viresh

Note this is based on tags/samsung-driver + tags/samsung-dt-3
to support cpufreq-dt driver for Exynos SoCs 3250, 4210, 4412
and 5250 finally


Bartlomiej Zolnierkiewicz (4):
  clk: exynos4x12: add cpu clock configuration data and instantiate
cpu clock
  ARM: dts: add CPU OPP and regulator supply property for exynos4x12
  ARM: EXYNOS: switch to using generic cpufreq driver for exynos4x12
  cpufreq: exynos: remove Exynos4x12 specific cpufreq driver support

Kukjin Kim (3):
  Merge branch 'v4.3-topic/clk-samsung-2' into v4.3-next/dt-samsung-3
  Merge branch 'v4.3-next/dt-samsung-3' into
v4.3-next/clk-cpufreq-samsung-2
  Merge branch 'v4.3-topic/cpufreq-samsung-2' into
v4.3-next/clk-cpufreq-samsung-2

 arch/arm/boot/dts/exynos4212.dtsi   |  81 
 arch/arm/boot/dts/exynos4412-odroid-common.dtsi |   4 +
 arch/arm/boot/dts/exynos4412-origen.dts |   4 +
 arch/arm/boot/dts/exynos4412-trats2.dts |   4 +
 arch/arm/boot/dts/exynos4412.dtsi   |  83 +
 arch/arm/mach-exynos/Kconfig|   2 +
 arch/arm/mach-exynos/exynos.c   |   2 +
 drivers/clk/samsung/clk-exynos4.c   |  50 +
 drivers/cpufreq/Kconfig.arm |  38 
 drivers/cpufreq/Makefile|   2 -
 drivers/cpufreq/exynos-cpufreq.c| 234
---
 drivers/cpufreq/exynos-cpufreq.h|  72 
 drivers/cpufreq/exynos4x12-cpufreq.c| 236

 13 files changed, 230 insertions(+), 582 deletions(-)
 delete mode 100644 drivers/cpufreq/exynos-cpufreq.c
 delete mode 100644 drivers/cpufreq/exynos-cpufreq.h
 delete mode 100644 drivers/cpufreq/exynos4x12-cpufreq.c
--
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


[GIT PULL 2nd 1/4] Samsung defconfig updates for v4.3

2015-08-12 Thread Kukjin Kim
The following changes since commit d770e558e21961ad6cfdf0ff7df0eb5d7d4f0754:

  Linux 4.2-rc1 (2015-07-05 11:01:52 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
tags/samsung-defconfig-1

for you to fetch changes up to c3e71f4b5f580b43e0eb3be18059c8844d8713e7:

  ARM: multi_v7_defconfig: Enable max77802 regulator (2015-08-12
08:15:02 +0900)


Samsung defconfig updates for v4.3

- for exynos_defconfig
  : enable SND_SOC_ODROIDX2 and SND_SIMPLE_CARD for
Odroid-XU3 to use max98090 audio codec
  : enalbe SENSORS_NTC_THERMISTOR for Peach boards

- for multi_v7_defconfig:
  : remove SAMSUNG_USB2PHY and SAMSUNG_USB3PHY are not used now
  : enable SENSORS_NTC_THERMISTOR and EXYNOS_ADC for Peach boards
  : enable REGULATOR_MAX77802 for Peach boards


Anand Moon (1):
  ARM: exynos_defconfig: Enable CONFIG_SND_SOC_ODROIDX2 for Odroid-XU3

Javier Martinez Canillas (4):
  ARM: multi_v7_defconfig: Remove old Samsung USB PHY configs
  ARM: multi_v7_defconfig: Enable NTC Thermistors support
  ARM: exynos_defconfig: Enable NTC Thermistors support
  ARM: multi_v7_defconfig: Enable max77802 regulator

 arch/arm/configs/exynos_defconfig   | 3 +++
 arch/arm/configs/multi_v7_defconfig | 5 +++--
 2 files changed, 6 insertions(+), 2 deletions(-)
--
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


[GIT PULL 2nd 2/4] Samsung DT 3rd updates for v4.3

2015-08-12 Thread Kukjin Kim
Hi Arnd, Olof, Kevin

This is based on tags/samsung-dt-2 and including exynos4 related clock
changes to support cpufreq-dt driver for exynos4 SoCs. Note that I've
created one more clk topic branch called v4.3-topic/clk-samsung-2 based
on previous one has been merged by Mike into clock tree before but I'm
not sure new one merged into clk tree that's why I've noted its merge in
this signed tag.

Please pull.

Thanks,
Kukjin


The following changes since commit 71ae9acc2e3b4b85a08c65e7f411d110b786ca1d:

  ARM: dts: Add SPI CS on exynos5250-snow (2015-07-30 23:12:43 +0900)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
tags/samsung-dt-3

for you to fetch changes up to 99f610d89b5bb1852742165b94ab99a8f63af6a9:

  ARM: dts: add CPU OPP and regulator supply property for exynos4x12
(2015-08-12 07:38:45 +0900)


Samsung 3rd DT updates for v4.3

- add CPU OPP and regulator for exynos4212 and 4412
  based on adding regarding cpu clock configuration


Bartlomiej Zolnierkiewicz (2):
  clk: exynos4x12: add cpu clock configuration data and instantiate
cpu clock
  ARM: dts: add CPU OPP and regulator supply property for exynos4x12

Kukjin Kim (1):
  Merge branch 'v4.3-topic/clk-samsung-2' into v4.3-next/dt-samsung-3

 arch/arm/boot/dts/exynos4212.dtsi   | 81

 arch/arm/boot/dts/exynos4412-odroid-common.dtsi |  4 ++
 arch/arm/boot/dts/exynos4412-origen.dts |  4 ++
 arch/arm/boot/dts/exynos4412-trats2.dts |  4 ++
 arch/arm/boot/dts/exynos4412.dtsi   | 83
+
 drivers/clk/samsung/clk-exynos4.c   | 50 +++
 6 files changed, 226 insertions(+)
--
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


[GIT PULL 2nd 4/4] Samsung defconfig 2nd update for v4.3

2015-08-12 Thread Kukjin Kim
Here is enable cpufreq-dt driver for exynos stuff.

Please pull and sorry for little bit confused branches in this time...

Thanks,
Kukjin


The following changes since commit c3e71f4b5f580b43e0eb3be18059c8844d8713e7:

  ARM: multi_v7_defconfig: Enable max77802 regulator (2015-08-12
08:15:02 +0900)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
tags/samsung-defconfig-2

for you to fetch changes up to 2b347c6494cbc6bfdc81b5201b8aa34afb2c3500:

  ARM: exynos_defconfig: Enable cpufreq-dt driver (2015-08-12 08:17:31
+0900)


Samsung 2nd defconfig updates for v4.3

- enable cpufreq-dt driver with ONDEMAND governor
  for Exynos SoCs 3250, 4210, 4212, 4412 and 5250


Krzysztof Kozlowski (1):
  ARM: exynos_defconfig: Enable cpufreq-dt driver

 arch/arm/configs/exynos_defconfig | 2 ++
 1 file changed, 2 insertions(+)
--
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: exynos4412-odroidu3: Enable SPI1.

2015-08-12 Thread Krzysztof Kozlowski
On 12.08.2015 20:27, Alexis Ballier wrote:
 SPI1 is available on IO Port #2 (as depicted on their website) in
 PCB Revision 0.5 of Hardkernel Odroid U3 board.
 The shield connects a 256KiB spi-nor flash on that bus.
 
 Signed-off-by: Alexis Ballier aball...@gentoo.org
 ---
  arch/arm/boot/dts/exynos4412-odroidu3.dts | 7 +++
  1 file changed, 7 insertions(+)
 
 diff --git a/arch/arm/boot/dts/exynos4412-odroidu3.dts 
 b/arch/arm/boot/dts/exynos4412-odroidu3.dts
 index 44684e5..37698e4 100644
 --- a/arch/arm/boot/dts/exynos4412-odroidu3.dts
 +++ b/arch/arm/boot/dts/exynos4412-odroidu3.dts
 @@ -61,3 +61,10 @@
   Speakers, SPKL,
   Speakers, SPKR;
  };
 +
 +spi_1 {
 + pinctrl-names = default;
 + pinctrl-0 = spi1_bus;
 + cs-gpios = gpb 5 0;

Please use GPIO_ACTIVE_HIGH.

Best regards,
Krzysztof

 + status = okay;
 +};
 

--
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 RFC v3 11/16] media: rename the function that create pad links

2015-08-12 Thread Mauro Carvalho Chehab
Now that a link can be either between two different graph
objects, we'll need to add more functions to create links.
So, rename the existing one that create links only between
two pads as media_create_pad_link().

No functional changes.

This patch was created via this shell script:
for i in $(find drivers/media -name '*.[ch]' -type f) $(find 
drivers/staging/media -name '*.[ch]' -type f) $(find include/ -name '*.h' -type 
f) ; do sed s,media_entity_create_link,media_create_pad_link,g $i a  mv a 
$i; done

Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com

diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
index 2fdcbb5f000a..65f59f2124b4 100644
--- a/drivers/media/dvb-core/dvbdev.c
+++ b/drivers/media/dvb-core/dvbdev.c
@@ -412,16 +412,16 @@ void dvb_create_media_graph(struct dvb_adapter *adap)
}
 
if (tuner  fe)
-   media_entity_create_link(tuner, 0, fe, 0, 0);
+   media_create_pad_link(tuner, 0, fe, 0, 0);
 
if (fe  demux)
-   media_entity_create_link(fe, 1, demux, 0, MEDIA_LNK_FL_ENABLED);
+   media_create_pad_link(fe, 1, demux, 0, MEDIA_LNK_FL_ENABLED);
 
if (demux  dvr)
-   media_entity_create_link(demux, 1, dvr, 0, 
MEDIA_LNK_FL_ENABLED);
+   media_create_pad_link(demux, 1, dvr, 0, MEDIA_LNK_FL_ENABLED);
 
if (demux  ca)
-   media_entity_create_link(demux, 1, ca, 0, MEDIA_LNK_FL_ENABLED);
+   media_create_pad_link(demux, 1, ca, 0, MEDIA_LNK_FL_ENABLED);
 }
 EXPORT_SYMBOL_GPL(dvb_create_media_graph);
 #endif
diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c 
b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
index 6d167428727d..c81bfbfea32f 100644
--- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
+++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
@@ -1482,11 +1482,11 @@ static int s5c73m3_oif_registered(struct v4l2_subdev 
*sd)
return ret;
}
 
-   ret = media_entity_create_link(state-sensor_sd.entity,
+   ret = media_create_pad_link(state-sensor_sd.entity,
S5C73M3_ISP_PAD, state-oif_sd.entity, OIF_ISP_PAD,
MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED);
 
-   ret = media_entity_create_link(state-sensor_sd.entity,
+   ret = media_create_pad_link(state-sensor_sd.entity,
S5C73M3_JPEG_PAD, state-oif_sd.entity, OIF_JPEG_PAD,
MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED);
 
diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
index 30a9ca62e034..d3bff30bcb6f 100644
--- a/drivers/media/i2c/s5k5baf.c
+++ b/drivers/media/i2c/s5k5baf.c
@@ -1756,7 +1756,7 @@ static int s5k5baf_registered(struct v4l2_subdev *sd)
v4l2_err(sd, failed to register subdev %s\n,
 state-cis_sd.name);
else
-   ret = media_entity_create_link(state-cis_sd.entity, PAD_CIS,
+   ret = media_create_pad_link(state-cis_sd.entity, PAD_CIS,
   state-sd.entity, PAD_CIS,
   MEDIA_LNK_FL_IMMUTABLE |
   MEDIA_LNK_FL_ENABLED);
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c 
b/drivers/media/i2c/smiapp/smiapp-core.c
index 308613ea0aed..5aa49eb393a9 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2495,7 +2495,7 @@ static int smiapp_register_subdevs(struct smiapp_sensor 
*sensor)
return rval;
}
 
-   rval = media_entity_create_link(this-sd.entity,
+   rval = media_create_pad_link(this-sd.entity,
this-source_pad,
last-sd.entity,
last-sink_pad,
@@ -2503,7 +2503,7 @@ static int smiapp_register_subdevs(struct smiapp_sensor 
*sensor)
MEDIA_LNK_FL_IMMUTABLE);
if (rval) {
dev_err(client-dev,
-   media_entity_create_link failed\n);
+   media_create_pad_link failed\n);
return rval;
}
 
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c
index aafa1119fba7..03c0ebdd8026 100644
--- a/drivers/media/media-entity.c
+++ b/drivers/media/media-entity.c
@@ -479,7 +479,7 @@ static void __media_entity_remove_link(struct media_entity 
*entity,
   struct media_link *link);
 
 int
-media_entity_create_link(struct media_entity *source, u16 source_pad,
+media_create_pad_link(struct media_entity *source, u16 source_pad,
 struct media_entity *sink, u16 sink_pad, u32 flags)
 {
struct media_link *link;
@@ -517,7 +517,7 @@ 

[PATCH RFC v3 10/16] media: rename link source/sink to pad0_source/pad1_sink

2015-08-12 Thread Mauro Carvalho Chehab
Change the internal namespace for links between two pads to
have the pad there.

We're also numbering it, as a common constructor is to do
things like:

if (link-port1.type != MEDIA_GRAPH_PAD)
continue;
if (link-pad1_sink-entity == entity)
/* do something */

by preserving the number, we keep consistency between
port1 and pad1_sink, and port0 and pad0_source.

This was generated via this script:
for i in $(find drivers/media -name '*.[ch]' -type f) $(find 
drivers/staging/media -name '*.[ch]' -type f) $(find include/ -name '*.h' -type 
f) ; do sed s,link-sink,link-pad1_sink,g; 
s,link-source,link-pad0_source,g; $i a  mv a $i; done

Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com

diff --git a/drivers/media/dvb-core/dvb_frontend.c 
b/drivers/media/dvb-core/dvb_frontend.c
index 3c97ebdf9f2a..e673f6f7c398 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -637,7 +637,7 @@ static int dvb_enable_media_tuner(struct dvb_frontend *fe)
link = entity-links[i];
if (link-port1.type != MEDIA_GRAPH_PAD)
continue;
-   if (link-sink-entity == entity) {
+   if (link-pad1_sink-entity == entity) {
found_link = link;
n_links++;
if (link-flags  MEDIA_LNK_FL_ENABLED)
@@ -660,7 +660,7 @@ static int dvb_enable_media_tuner(struct dvb_frontend *fe)
return -EINVAL;
}
 
-   source = found_link-source-entity;
+   source = found_link-pad0_source-entity;
fepriv-pipe_start_entity = source;
for (i = 0; i  source-num_links; i++) {
struct media_entity *sink;
@@ -669,7 +669,7 @@ static int dvb_enable_media_tuner(struct dvb_frontend *fe)
link = source-links[i];
if (link-port1.type != MEDIA_GRAPH_PAD)
continue;
-   sink = link-sink-entity;
+   sink = link-pad1_sink-entity;
 
if (sink == entity)
flags = MEDIA_LNK_FL_ENABLED;
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
index b4bd718ad736..2c29c4600c3a 100644
--- a/drivers/media/media-device.c
+++ b/drivers/media/media-device.c
@@ -160,13 +160,13 @@ static long __media_device_enum_links(struct media_device 
*mdev,
ent_link-port1-type != MEDIA_GRAPH_PAD)
continue;
/* Ignore backlinks. */
-   if (ent_link-source-entity != entity)
+   if (ent_link-pad0_source-entity != entity)
continue;
 
memset(link, 0, sizeof(link));
-   media_device_kpad_to_upad(ent_link-source,
+   media_device_kpad_to_upad(ent_link-pad0_source,
  link.source);
-   media_device_kpad_to_upad(ent_link-sink,
+   media_device_kpad_to_upad(ent_link-pad1_sink,
  link.sink);
link.flags = ent_link-flags;
if (copy_to_user(ulink, link, sizeof(*ulink)))
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c
index fc2e4886c830..aafa1119fba7 100644
--- a/drivers/media/media-entity.c
+++ b/drivers/media/media-entity.c
@@ -125,10 +125,10 @@ media_entity_other(struct media_entity *entity, struct 
media_link *link)
if (link-port0-type != MEDIA_GRAPH_PAD ||
link-port1-type != MEDIA_GRAPH_PAD)
return NULL;
-   if (link-source-entity == entity)
-   return link-sink-entity;
+   if (link-pad0_source-entity == entity)
+   return link-pad1_sink-entity;
else
-   return link-source-entity;
+   return link-pad0_source-entity;
 }
 
 /* push an entity to traversal stack */
@@ -299,8 +299,8 @@ __must_check int media_entity_pipeline_start(struct 
media_entity *entity,
if (link-port0-type != MEDIA_GRAPH_PAD)
continue;
 
-   pad = link-sink-entity == entity
-   ? link-sink : link-source;
+   pad = link-pad1_sink-entity == entity
+   ? link-pad1_sink : link-pad0_source;
 
/* Mark that a pad is connected by a link. */
bitmap_clear(has_no_links, pad-index, 1);
@@ -318,7 +318,7 @@ __must_check int media_entity_pipeline_start(struct 
media_entity *entity,
 * Link validation will only take place for
 * sink ends of the link that are enabled.
 */
-   if (link-sink != pad ||
+   

Re: [PATCH RESEND v6 1/3] Documentation: dts: Documentation entry to explain how to use PWM FAN as a cooling device

2015-08-12 Thread Krzysztof Kozlowski
On 11.08.2015 22:07, Lukasz Majewski wrote:
 Explanation of several properties, which allow PWM fan working as a cooling
 device, have been embraced in this commit.
 
 Signed-off-by: Lukasz Majewski l.majew...@samsung.com
 Acked-by: Eduardo Valentin edubez...@gmail.com
 ---
  .../devicetree/bindings/hwmon/pwm-fan.txt  | 29 
 --
  1 file changed, 27 insertions(+), 2 deletions(-)
 

Acked-by: Krzysztof Kozlowski k.kozlow...@samsung.com

I'll take care of it and send it to Kukjin for v4.4.

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 2/2] clk: Convert __clk_get_name(hw-clk) to clk_hw_get_name(hw)

2015-08-12 Thread Stephen Boyd
Use the provider based method to get a clock's name so that we
can get rid of the clk member in struct clk_hw one day. Mostly
converted with the following coccinelle script.

@@
struct clk_hw *E;
@@

-__clk_get_name(E-clk)
+clk_hw_get_name(E)

Cc: Heiko Stuebner he...@sntech.de
Cc: Sylwester Nawrocki s.nawro...@samsung.com
Cc: Tomasz Figa tomasz.f...@gmail.com
Cc: Peter De Schrijver pdeschrij...@nvidia.com
Cc: Prashant Gaikwad pgaik...@nvidia.com
Cc: Stephen Warren swar...@wwwdotorg.org
Cc: Thierry Reding thierry.red...@gmail.com
Cc: Alexandre Courbot gnu...@gmail.com
Cc: Tero Kristo t-kri...@ti.com
Cc: Ulf Hansson ulf.hans...@linaro.org
Cc: Sebastian Hesselbarth sebastian.hesselba...@gmail.com
Cc: Andrew Bresticker abres...@chromium.org
Cc: Ezequiel Garcia ezequiel.gar...@imgtec.com
Cc: Ralf Baechle r...@linux-mips.org
Cc: Kevin Cernekee cerne...@chromium.org
Cc: Geert Uytterhoeven geert+rene...@glider.be
Cc: Ulrich Hecht ulrich.hecht+rene...@gmail.com
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-rockc...@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-te...@vger.kernel.org
Cc: linux-o...@vger.kernel.org
Signed-off-by: Stephen Boyd sb...@codeaurora.org
---
 drivers/clk/berlin/berlin2-pll.c |  4 ++--
 drivers/clk/clk-xgene.c  | 22 +++---
 drivers/clk/pistachio/clk-pll.c  |  4 ++--
 drivers/clk/qcom/clk-branch.c|  2 +-
 drivers/clk/rockchip/clk-inverter.c  |  2 +-
 drivers/clk/rockchip/clk-mmc-phase.c |  2 +-
 drivers/clk/samsung/clk-pll.c| 18 +-
 drivers/clk/shmobile/clk-div6.c  |  2 +-
 drivers/clk/st/clk-flexgen.c |  4 ++--
 drivers/clk/st/clkgen-fsyn.c | 18 +-
 drivers/clk/st/clkgen-mux.c  |  2 +-
 drivers/clk/st/clkgen-pll.c  |  8 
 drivers/clk/tegra/clk-pll.c  |  8 
 drivers/clk/ti/apll.c|  4 ++--
 drivers/clk/ti/clkt_dflt.c   |  8 
 drivers/clk/ti/clockdomain.c | 14 +++---
 drivers/clk/ux500/clk-prcmu.c| 16 
 drivers/clk/ux500/clk-sysctrl.c  |  2 +-
 18 files changed, 70 insertions(+), 70 deletions(-)

diff --git a/drivers/clk/berlin/berlin2-pll.c b/drivers/clk/berlin/berlin2-pll.c
index f4b8d324b083..1c2294d3ba85 100644
--- a/drivers/clk/berlin/berlin2-pll.c
+++ b/drivers/clk/berlin/berlin2-pll.c
@@ -61,7 +61,7 @@ berlin2_pll_recalc_rate(struct clk_hw *hw, unsigned long 
parent_rate)
fbdiv = (val  map-fbdiv_shift)  FBDIV_MASK;
rfdiv = (val  map-rfdiv_shift)  RFDIV_MASK;
if (rfdiv == 0) {
-   pr_warn(%s has zero rfdiv\n, __clk_get_name(hw-clk));
+   pr_warn(%s has zero rfdiv\n, clk_hw_get_name(hw));
rfdiv = 1;
}
 
@@ -70,7 +70,7 @@ berlin2_pll_recalc_rate(struct clk_hw *hw, unsigned long 
parent_rate)
vcodiv = map-vcodiv[vcodivsel];
if (vcodiv == 0) {
pr_warn(%s has zero vcodiv (index %d)\n,
-   __clk_get_name(hw-clk), vcodivsel);
+   clk_hw_get_name(hw), vcodivsel);
vcodiv = 1;
}
 
diff --git a/drivers/clk/clk-xgene.c b/drivers/clk/clk-xgene.c
index 4caee9356407..96a6190acac2 100644
--- a/drivers/clk/clk-xgene.c
+++ b/drivers/clk/clk-xgene.c
@@ -74,7 +74,7 @@ static int xgene_clk_pll_is_enabled(struct clk_hw *hw)
u32 data;
 
data = xgene_clk_read(pllclk-reg + pllclk-pll_offset);
-   pr_debug(%s pll %s\n, __clk_get_name(hw-clk),
+   pr_debug(%s pll %s\n, clk_hw_get_name(hw),
data  REGSPEC_RESET_F1_MASK ? disabled : enabled);
 
return data  REGSPEC_RESET_F1_MASK ? 0 : 1;
@@ -112,7 +112,7 @@ static unsigned long xgene_clk_pll_recalc_rate(struct 
clk_hw *hw,
fref = parent_rate / nref;
fvco = fref * nfb;
}
-   pr_debug(%s pll recalc rate %ld parent %ld\n, __clk_get_name(hw-clk),
+   pr_debug(%s pll recalc rate %ld parent %ld\n, clk_hw_get_name(hw),
fvco / nout, parent_rate);
 
return fvco / nout;
@@ -225,7 +225,7 @@ static int xgene_clk_enable(struct clk_hw *hw)
spin_lock_irqsave(pclk-lock, flags);
 
if (pclk-param.csr_reg != NULL) {
-   pr_debug(%s clock enabled\n, __clk_get_name(hw-clk));
+   pr_debug(%s clock enabled\n, clk_hw_get_name(hw));
reg = __pa(pclk-param.csr_reg);
/* First enable the clock */
data = xgene_clk_read(pclk-param.csr_reg +
@@ -234,7 +234,7 @@ static int xgene_clk_enable(struct clk_hw *hw)
xgene_clk_write(data, pclk-param.csr_reg +
pclk-param.reg_clk_offset);
pr_debug(%s clock PADDR base %pa clk offset 0x%08X mask 0x%08X 
value 0x%08X\n,
-   __clk_get_name(hw-clk), reg,
+   clk_hw_get_name(hw), reg,
pclk-param.reg_clk_offset, 

RE: [PATCH] ARM: dts: exynos4*: add iommu property to JPEG device

2015-08-12 Thread Kukjin Kim
Krzysztof Kozlowski wrote:
 
 On 12.08.2015 18:39, Marek Szyprowski wrote:
  JPEG codec node has been added in parallel to the patch, which added
  support for IOMMU to Exynos platform, so JPEG device for Exynos4 series
  lacked IOMMU property. This patch fixes this issue.
 
  Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
  ---
   arch/arm/boot/dts/exynos4.dtsi | 1 +
   1 file changed, 1 insertion(+)
 
  diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
  index b0d52b1..98c0a36 100644
  --- a/arch/arm/boot/dts/exynos4.dtsi
  +++ b/arch/arm/boot/dts/exynos4.dtsi
  @@ -702,6 +702,7 @@
  clocks = clock CLK_JPEG;
  clock-names = jpeg;
  power-domains = pd_cam;
  +   iommus = sysmmu_jpeg;
  };
 
  hdmi: hdmi@12D0 {
 
 
 Reviewed-by: Krzysztof Kozlowski k.kozlow...@samsung.com
 
Applied with Javier and Krzysztof's 'Reviewed-by'.

Thanks,
Kukjin

--
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: exynos4*: add iommu property to JPEG device

2015-08-12 Thread Marek Szyprowski
JPEG codec node has been added in parallel to the patch, which added
support for IOMMU to Exynos platform, so JPEG device for Exynos4 series
lacked IOMMU property. This patch fixes this issue.

Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
---
 arch/arm/boot/dts/exynos4.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index b0d52b1..98c0a36 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -702,6 +702,7 @@
clocks = clock CLK_JPEG;
clock-names = jpeg;
power-domains = pd_cam;
+   iommus = sysmmu_jpeg;
};
 
hdmi: hdmi@12D0 {
-- 
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 3/4] rtc: s3c: use unified functions for enable/disable of clk

2015-08-12 Thread Joonyoung Shim
On 08/12/2015 09:10 AM, Krzysztof Kozlowski wrote:
 On 11.08.2015 20:28, Joonyoung Shim wrote:
 The driver uses clk_prepare_enable()/clk_disable_unprepare() only in
 probe only, elsewhere, use the unified functions for enable/disable of
 clk, e.g. s3c_rtc_enable_clk() / s3c_rtc_disable_clk(), so it's better
 to use them for consistency of code.

 Signed-off-by: Joonyoung Shim jy0922.s...@samsung.com
 ---
  drivers/rtc/rtc-s3c.c | 14 +-
  1 file changed, 9 insertions(+), 5 deletions(-)
 
 First of all - the code is larger (9 insertions, 5 deletion) so I have
 doubts if this is better.
 
 Second - this is not equivalent change. The s3c_rtc_enable_clk/disable
 calls grab spin lock which is not necessary in probe.
 

I made this patch because of patch 4/4, but patch 4/4 should be removed
dependency from previous patches, so i will drop this patch.

Thanks.

--
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] rtc: s3c: fix disabled clocks for alarm

2015-08-12 Thread Joonyoung Shim
The clock enable/disable codes for alarm have been removed from
commit 24e1455493da (drivers/rtc/rtc-s3c.c: delete duplicate clock
control) and the clocks are disabled even if alarm is set, so alarm
interrupt can't happen.

The s3c_rtc_setaie function can be called several times with 'enabled'
argument having same value, so it needs to check whether clocks are
enabled or not.

Signed-off-by: Joonyoung Shim jy0922.s...@samsung.com
Cc: sta...@vger.kernel.org # v4.1
---
This is v2 of prior patch [PATCH 4/4] rtc: s3c: enable/disable clocks
for alarm.

Changelog for v2:
- commit messages is modified by Krzysztof suggestion
- make to backportable patch
- add Cc-stable

 drivers/rtc/rtc-s3c.c | 24 ++--
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 44b2921..7cc8f73 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -39,6 +39,7 @@ struct s3c_rtc {
void __iomem *base;
struct clk *rtc_clk;
struct clk *rtc_src_clk;
+   bool clk_disabled;
 
struct s3c_rtc_data *data;
 
@@ -71,9 +72,12 @@ static void s3c_rtc_enable_clk(struct s3c_rtc *info)
unsigned long irq_flags;
 
spin_lock_irqsave(info-alarm_clk_lock, irq_flags);
-   clk_enable(info-rtc_clk);
-   if (info-data-needs_src_clk)
-   clk_enable(info-rtc_src_clk);
+   if (info-clk_disabled) {
+   clk_enable(info-rtc_clk);
+   if (info-data-needs_src_clk)
+   clk_enable(info-rtc_src_clk);
+   info-clk_disabled = false;
+   }
spin_unlock_irqrestore(info-alarm_clk_lock, irq_flags);
 }
 
@@ -82,9 +86,12 @@ static void s3c_rtc_disable_clk(struct s3c_rtc *info)
unsigned long irq_flags;
 
spin_lock_irqsave(info-alarm_clk_lock, irq_flags);
-   if (info-data-needs_src_clk)
-   clk_disable(info-rtc_src_clk);
-   clk_disable(info-rtc_clk);
+   if (!info-clk_disabled) {
+   if (info-data-needs_src_clk)
+   clk_disable(info-rtc_src_clk);
+   clk_disable(info-rtc_clk);
+   info-clk_disabled = true;
+   }
spin_unlock_irqrestore(info-alarm_clk_lock, irq_flags);
 }
 
@@ -128,6 +135,11 @@ static int s3c_rtc_setaie(struct device *dev, unsigned int 
enabled)
 
s3c_rtc_disable_clk(info);
 
+   if (enabled)
+   s3c_rtc_enable_clk(info);
+   else
+   s3c_rtc_disable_clk(info);
+
return 0;
 }
 
-- 
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 RESEND] clk: s5pv210: add missing call to samsung_clk_of_add_provider()

2015-08-12 Thread Tomasz Figa
2015-08-12 17:58 GMT+09:00 Marek Szyprowski m.szyprow...@samsung.com:
 Commit d5e136a21b2028fb1f45143ea7112d5869bfc6c7 (clk: samsung: Register
 clk provider only after registering its all clocks, merged to v3.17-rc1)
 modified a way that driver registers registers to core framework. This
 change has not been applied to s5pv210 clocks driver, which has been
 merged in parallel to that commit. This patch adds a missing call to
 samsung_clk_of_add_provider(), so the driver is operational again.

 Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
 CC: sta...@vger.kernel.org  # v3.17+
 ---
  drivers/clk/samsung/clk-s5pv210.c | 2 ++
  1 file changed, 2 insertions(+)


Acked-by: Tomasz Figa tomasz.f...@gmail.com

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


[PATCH RESEND] clk: s5pv210: add missing call to samsung_clk_of_add_provider()

2015-08-12 Thread Marek Szyprowski
Commit d5e136a21b2028fb1f45143ea7112d5869bfc6c7 (clk: samsung: Register
clk provider only after registering its all clocks, merged to v3.17-rc1)
modified a way that driver registers registers to core framework. This
change has not been applied to s5pv210 clocks driver, which has been
merged in parallel to that commit. This patch adds a missing call to
samsung_clk_of_add_provider(), so the driver is operational again.

Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
CC: sta...@vger.kernel.org  # v3.17+
---
 drivers/clk/samsung/clk-s5pv210.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/samsung/clk-s5pv210.c 
b/drivers/clk/samsung/clk-s5pv210.c
index d270a20..f41b017 100644
--- a/drivers/clk/samsung/clk-s5pv210.c
+++ b/drivers/clk/samsung/clk-s5pv210.c
@@ -828,6 +828,8 @@ static void __init __s5pv210_clk_init(struct device_node 
*np,
 
s5pv210_clk_sleep_init();
 
+   samsung_clk_of_add_provider(np, ctx);
+
pr_info(%s clocks: mout_apll = %ld, mout_mpll = %ld\n
\tmout_epll = %ld, mout_vpll = %ld\n,
is_s5p6442 ? S5P6442 : S5PV210,
-- 
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: exynos4*: add iommu property to JPEG device

2015-08-12 Thread Javier Martinez Canillas
Hello Marek,

On 08/12/2015 11:39 AM, Marek Szyprowski wrote:
 JPEG codec node has been added in parallel to the patch, which added
 support for IOMMU to Exynos platform, so JPEG device for Exynos4 series
 lacked IOMMU property. This patch fixes this issue.
 
 Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
 ---
  arch/arm/boot/dts/exynos4.dtsi | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
 index b0d52b1..98c0a36 100644
 --- a/arch/arm/boot/dts/exynos4.dtsi
 +++ b/arch/arm/boot/dts/exynos4.dtsi
 @@ -702,6 +702,7 @@
   clocks = clock CLK_JPEG;
   clock-names = jpeg;
   power-domains = pd_cam;
 + iommus = sysmmu_jpeg;
   };
  
   hdmi: hdmi@12D0 {
 

Looks good to me.

Reviewed-by: Javier Martinez Canillas jav...@osg.samsung.com

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


[PATCH] ARM: dts: exynos4412-odroidu3: Enable SPI1.

2015-08-12 Thread Alexis Ballier
SPI1 is available on IO Port #2 (as depicted on their website) in
PCB Revision 0.5 of Hardkernel Odroid U3 board.
The shield connects a 256KiB spi-nor flash on that bus.

Signed-off-by: Alexis Ballier aball...@gentoo.org
---
 arch/arm/boot/dts/exynos4412-odroidu3.dts | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4412-odroidu3.dts 
b/arch/arm/boot/dts/exynos4412-odroidu3.dts
index 44684e5..37698e4 100644
--- a/arch/arm/boot/dts/exynos4412-odroidu3.dts
+++ b/arch/arm/boot/dts/exynos4412-odroidu3.dts
@@ -61,3 +61,10 @@
Speakers, SPKL,
Speakers, SPKR;
 };
+
+spi_1 {
+   pinctrl-names = default;
+   pinctrl-0 = spi1_bus;
+   cs-gpios = gpb 5 0;
+   status = okay;
+};
-- 
2.5.0

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