[GIT PULL] ARM: defconfig: Improvements for 4.3

2015-07-16 Thread Krzysztof Kozlowski
Dear Kukjin,

Few defconfig related changes.

Description along with a tag.
You can find them also on the lists with my reviewed-by.

Best regards,
Krzysztof


The following changes since commit 1c4c7159ed2468f3ac4ce5a7f08d79663d381a93:

  Merge tag 'ext4_for_linus_stable' of 
git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 (2015-07-05 16:24:54 
-0700)

are available in the git repository at:


  https://github.com/krzk/linux.git tags/samsung-defconfig-4.3

for you to fetch changes up to 5efedc7617df7add295702f21f11dd7e7a67b76e:

  ARM: multi_v7_defconfig: Enable max77802 regulator (2015-07-16 15:57:31 +0900)


Defconfig changes around Exynos based boards:
1. Enable sound on Odroid XU3 on exynos defconfig.
2. Enable NTC thermistors for Chromebooks on exynos and multi_v7.
3. Enable main PMIC regulator for Chromebooks on multi_v7.
4. Clean up in multi_v7 - remove old (non-existing) configs.


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


Re: [PATCH v2 4/4] mfd: max77686: Split out regulator part from the DT binding

2015-07-16 Thread Krzysztof Kozlowski
2015-07-17 15:46 GMT+09:00 Javier Martinez Canillas :
> Hello Krzysztof,
>
> On 07/17/2015 08:42 AM, Krzysztof Kozlowski wrote:
>> 2015-07-17 15:29 GMT+09:00 Javier Martinez Canillas :
>>> The Maxim MAX77686 PMIC is a multi-function device with regulators,
>>> clocks and a RTC. The DT bindings for the clocks are in a separate
>>> file but the bindings for the regulators are inside the mfd part.
>>>
>>> To make it consistent with the clocks portion of the binding and
>>> because is more natural to look for regulator bindings under the
>>> bindings/regulator sub-directory, split the regulator portion of
>>> the DT binding and add it as a separate file.
>>>
>>> Signed-off-by: Javier Martinez Canillas 
>>>
>>> ---
>>>
>>> Changes in v2:
>>> - Use a generic name for the max77686 node in the regulator example.
>>>
>>>  Documentation/devicetree/bindings/mfd/max77686.txt | 58 +-
>>>  .../devicetree/bindings/regulator/max77686.txt | 71 
>>> ++
>>>  2 files changed, 74 insertions(+), 55 deletions(-)
>>>  create mode 100644 Documentation/devicetree/bindings/regulator/max77686.txt
>>
>> Putting regulator bindings under regulator directory seems logical so
>> I am fine with it.
>>
>> Reviewed-by: Krzysztof Kozlowski 
>>
>
> Thanks a lot for your review. For completeness, I talked with Lee Jones
> over IRC yesterday asking him his opinion on whether MFD DT binding doc
> should contain all the info or if it should be split across different
> subsystems and he prefers the later. That's why I re-spun this series.

Okay, this sounds good.

One more thing - can you update the maintainers file? The bindings
documentation is mentioned there for max77686.

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 4/4] mfd: max77686: Split out regulator part from the DT binding

2015-07-16 Thread Javier Martinez Canillas
Hello Krzysztof,

On 07/17/2015 08:42 AM, Krzysztof Kozlowski wrote:
> 2015-07-17 15:29 GMT+09:00 Javier Martinez Canillas :
>> The Maxim MAX77686 PMIC is a multi-function device with regulators,
>> clocks and a RTC. The DT bindings for the clocks are in a separate
>> file but the bindings for the regulators are inside the mfd part.
>>
>> To make it consistent with the clocks portion of the binding and
>> because is more natural to look for regulator bindings under the
>> bindings/regulator sub-directory, split the regulator portion of
>> the DT binding and add it as a separate file.
>>
>> Signed-off-by: Javier Martinez Canillas 
>>
>> ---
>>
>> Changes in v2:
>> - Use a generic name for the max77686 node in the regulator example.
>>
>>  Documentation/devicetree/bindings/mfd/max77686.txt | 58 +-
>>  .../devicetree/bindings/regulator/max77686.txt | 71 
>> ++
>>  2 files changed, 74 insertions(+), 55 deletions(-)
>>  create mode 100644 Documentation/devicetree/bindings/regulator/max77686.txt
> 
> Putting regulator bindings under regulator directory seems logical so
> I am fine with it.
> 
> Reviewed-by: Krzysztof Kozlowski 
>

Thanks a lot for your review. For completeness, I talked with Lee Jones
over IRC yesterday asking him his opinion on whether MFD DT binding doc
should contain all the info or if it should be split across different
subsystems and he prefers the later. That's why I re-spun this series.
 
> Best regards,
> Krzysztof
> --

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 4/4] mfd: max77686: Split out regulator part from the DT binding

2015-07-16 Thread Krzysztof Kozlowski
2015-07-17 15:29 GMT+09:00 Javier Martinez Canillas :
> The Maxim MAX77686 PMIC is a multi-function device with regulators,
> clocks and a RTC. The DT bindings for the clocks are in a separate
> file but the bindings for the regulators are inside the mfd part.
>
> To make it consistent with the clocks portion of the binding and
> because is more natural to look for regulator bindings under the
> bindings/regulator sub-directory, split the regulator portion of
> the DT binding and add it as a separate file.
>
> Signed-off-by: Javier Martinez Canillas 
>
> ---
>
> Changes in v2:
> - Use a generic name for the max77686 node in the regulator example.
>
>  Documentation/devicetree/bindings/mfd/max77686.txt | 58 +-
>  .../devicetree/bindings/regulator/max77686.txt | 71 
> ++
>  2 files changed, 74 insertions(+), 55 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/regulator/max77686.txt

Putting regulator bindings under regulator directory seems logical so
I am fine with it.

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/4] mfd: Add DT binding for Maxim MAX77802 IC

2015-07-16 Thread Krzysztof Kozlowski
2015-07-17 15:29 GMT+09:00 Javier Martinez Canillas :
> The MAX77802 is a chip that contains regulators, 2 32kHz clocks,
> a RTC and an I2C interface to program the individual components.
>
> The are already DT bindings for the regulators and clocks and
> these reference to a bindings/mfd/max77802.txt file, that didn't
> exist, for the details about the PMIC.
>
> Signed-off-by: Javier Martinez Canillas 
>
> ---
>
> Changes in v2:
> - Use the correct "maxim,max77802" compatible string.
>   Suggested by Krzysztof Kozlowski
> - Use a pmic generic node name for the max77802 node example.
>   Suggested by Sergei Shtylyov.
>
>  Documentation/devicetree/bindings/mfd/max77802.txt | 26 
> ++
>  1 file changed, 26 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mfd/max77802.txt

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


[PATCH v2 3/4] mfd: Add DT binding for Maxim MAX77802 IC

2015-07-16 Thread Javier Martinez Canillas
The MAX77802 is a chip that contains regulators, 2 32kHz clocks,
a RTC and an I2C interface to program the individual components.

The are already DT bindings for the regulators and clocks and
these reference to a bindings/mfd/max77802.txt file, that didn't
exist, for the details about the PMIC.

Signed-off-by: Javier Martinez Canillas 

---

Changes in v2:
- Use the correct "maxim,max77802" compatible string.
  Suggested by Krzysztof Kozlowski
- Use a pmic generic node name for the max77802 node example.
  Suggested by Sergei Shtylyov.

 Documentation/devicetree/bindings/mfd/max77802.txt | 26 ++
 1 file changed, 26 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/max77802.txt

diff --git a/Documentation/devicetree/bindings/mfd/max77802.txt 
b/Documentation/devicetree/bindings/mfd/max77802.txt
new file mode 100644
index ..c60cdec50d36
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/max77802.txt
@@ -0,0 +1,26 @@
+Maxim MAX77802 multi-function device
+
+The Maxim MAX77802 is a power management chip (PMIC) that contains 10 high
+efficiency Buck regulators, 32 Low-dropout (LDO) regulators used to power
+up application processors and peripherals, a 2-channel 32kHz clock outputs,
+a Real-Time-Clock (RTC) and a I2C interface to program the individual
+regulators, clocks outputs and the RTC.
+
+Binding for the built-in 32k clock generator block is defined separately
+in the bindings/clk/maxim,max77802.txt file and binding for the regulators
+is defined in the bindings/regulator/max77802.txt file.
+
+Required properties:
+- compatible : Must be "maxim,max77802";
+- reg : Specifies the i2c slave address of PMIC block.
+- interrupts : This i2c device has an IRQ line connected to the main SoC.
+- interrupt-parent : The parent interrupt controller.
+
+Example:
+
+   max77802: pmic@09 {
+   compatible = "maxim,max77802";
+   interrupt-parent = <&intc>;
+   interrupts = <26 0>;
+   reg = <0x09>;
+   };
-- 
2.4.3

--
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/4] mfd: Improve DT binding docs for max77686 and max77802

2015-07-16 Thread Javier Martinez Canillas
Hello Lee,

This series contains some improvements for the Device Tree bindings of
the Maxim MAX77686 and MAX77802 multi-function devices.

This is the second version of the series that addresses issues pointed
out by Krzysztof Kozlowski and Sergei Shtylyov.

Patch #1 changes the max77686 binding to not suggest using a deprecated
property of the regulator DT binding.

Patch #2 changes the max77686 example to use a generic node name instead
of the chip's name.

Patch #3 adds a DT binding for the mfd portion of the max77802 that was
missing.

Patch #4 moves the regulator portion of the max77686 to the regulator's
DT binding sub-directory since it is a better fit for this information.
This fourth patch needs an ack from the regulator sub-system maintainer.

Changes in v2:
- Add Krzysztof Kozlowski Reviewed-by tag in patch #1.
- Use the correct "maxim,max77802" compatible string.
  Suggested by Krzysztof Kozlowski
- Use a pmic generic node name for the max77802 node example.
  Suggested by Sergei Shtylyov.
- Use a generic name for the max77686 node in the regulator example.

Javier Martinez Canillas (4):
  mfd: max77686: Don't suggest in binding to use a deprecated property
  mfd: max77686: Use a generic name for the PMIC node in the example
  mfd: Add DT binding for Maxim MAX77802 IC
  mfd: max77686: Split out regulator part from the DT binding

 Documentation/devicetree/bindings/mfd/max77686.txt | 63 ++-
 Documentation/devicetree/bindings/mfd/max77802.txt | 26 
 .../devicetree/bindings/regulator/max77686.txt | 71 ++
 3 files changed, 101 insertions(+), 59 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/max77802.txt
 create mode 100644 Documentation/devicetree/bindings/regulator/max77686.txt

-- 
2.4.3

--
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/4] mfd: max77686: Use a generic name for the PMIC node in the example

2015-07-16 Thread Javier Martinez Canillas
The ePAR standard says that: "the name of a node should be somewhat
generic, reflecting the function of the device and not its precise
programming model."

So, change the max77686 binding document example to use a generic
node name instead of using the chip's name.

Suggested-by: Sergei Shtylyov 
Signed-off-by: Javier Martinez Canillas 
---

Changes in v2: None

 Documentation/devicetree/bindings/mfd/max77686.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mfd/max77686.txt 
b/Documentation/devicetree/bindings/mfd/max77686.txt
index 8221102d3fc2..d2ed3c20a5c3 100644
--- a/Documentation/devicetree/bindings/mfd/max77686.txt
+++ b/Documentation/devicetree/bindings/mfd/max77686.txt
@@ -48,7 +48,7 @@ to get matched with their hardware counterparts as follow:
 
 Example:
 
-   max77686@09 {
+   max77686: pmic@09 {
compatible = "maxim,max77686";
interrupt-parent = <&wakeup_eint>;
interrupts = <26 0>;
-- 
2.4.3

--
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 4/4] mfd: max77686: Split out regulator part from the DT binding

2015-07-16 Thread Javier Martinez Canillas
The Maxim MAX77686 PMIC is a multi-function device with regulators,
clocks and a RTC. The DT bindings for the clocks are in a separate
file but the bindings for the regulators are inside the mfd part.

To make it consistent with the clocks portion of the binding and
because is more natural to look for regulator bindings under the
bindings/regulator sub-directory, split the regulator portion of
the DT binding and add it as a separate file.

Signed-off-by: Javier Martinez Canillas 

---

Changes in v2:
- Use a generic name for the max77686 node in the regulator example.

 Documentation/devicetree/bindings/mfd/max77686.txt | 58 +-
 .../devicetree/bindings/regulator/max77686.txt | 71 ++
 2 files changed, 74 insertions(+), 55 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/max77686.txt

diff --git a/Documentation/devicetree/bindings/mfd/max77686.txt 
b/Documentation/devicetree/bindings/mfd/max77686.txt
index d2ed3c20a5c3..c5aeca609b1f 100644
--- a/Documentation/devicetree/bindings/mfd/max77686.txt
+++ b/Documentation/devicetree/bindings/mfd/max77686.txt
@@ -8,7 +8,8 @@ client while probing.This document describes the binding for 
mfd device and
 PMIC submodule.
 
 Binding for the built-in 32k clock generator block is defined separately
-in bindings/clk/maxim,max77686.txt file.
+in the bindings/clk/maxim,max77686.txt file and binding for the regulators
+is defined in the bindings/regulator/max77686.txt file.
 
 Required properties:
 - compatible : Must be "maxim,max77686";
@@ -16,36 +17,6 @@ Required properties:
 - interrupts : This i2c device has an IRQ line connected to the main SoC.
 - interrupt-parent : The parent interrupt controller.
 
-Optional node:
-- voltage-regulators : The regulators of max77686 have to be instantiated
-  under subnode named "voltage-regulators" using the following format.
-
-   regulator_name {
-   regulator-compatible = LDOn/BUCKn
-   standard regulator constraints
-   };
-   refer Documentation/devicetree/bindings/regulator/regulator.txt
-
-  The regulator node's name should be initialized with a string
-to get matched with their hardware counterparts as follow:
-
-   -LDOn   :   for LDOs, where n can lie in range 1 to 26.
-   example: LDO1, LDO2, LDO26.
-   -BUCKn  :   for BUCKs, where n can lie in range 1 to 9.
-   example: BUCK1, BUCK5, BUCK9.
-
-  Regulators which can be turned off during system suspend:
-   -LDOn   :   2, 6-8, 10-12, 14-16,
-   -BUCKn  :   1-4.
-  Use standard regulator bindings for it ('regulator-off-in-suspend').
-
-  LDO20, LDO21, LDO22, BUCK8 and BUCK9 can be configured to GPIO enable
-  control. To turn this feature on this property must be added to the regulator
-  sub-node:
-   - maxim,ena-gpios : one GPIO specifier enable control (the gpio
-   flags are actually ignored and always
-   ACTIVE_HIGH is used)
-
 Example:
 
max77686: pmic@09 {
@@ -53,27 +24,4 @@ Example:
interrupt-parent = <&wakeup_eint>;
interrupts = <26 0>;
reg = <0x09>;
-
-   voltage-regulators {
-   ldo11_reg: LDO11 {
-   regulator-name = "vdd_ldo11";
-   regulator-min-microvolt = <190>;
-   regulator-max-microvolt = <190>;
-   regulator-always-on;
-   };
-
-   buck1_reg: BUCK1 {
-   regulator-name = "vdd_mif";
-   regulator-min-microvolt = <95>;
-   regulator-max-microvolt = <130>;
-   regulator-always-on;
-   regulator-boot-on;
-   };
-
-   buck9_reg: BUCK9 {
-   regulator-name = "CAM_ISP_CORE_1.2V";
-   regulator-min-microvolt = <100>;
-   regulator-max-microvolt = <120>;
-   maxim,ena-gpios = <&gpm0 3 GPIO_ACTIVE_HIGH>;
-   };
-   }
+   };
diff --git a/Documentation/devicetree/bindings/regulator/max77686.txt 
b/Documentation/devicetree/bindings/regulator/max77686.txt
new file mode 100644
index ..831cbd3cd965
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/max77686.txt
@@ -0,0 +1,71 @@
+Binding for Maxim MAX77686 regulators
+
+This is a part of the device tree bindings of MAX77686 multi-function device.
+More information can be found in bindings/mfd/max77686.txt file.
+
+The MAX77686 PMIC has 9 high-efficiency Buck and 26 Low-dropout (LDO)
+regulators that can be controlled over I2C.
+
+Following properties should be present in main device no

[PATCH v2 1/4] mfd: max77686: Don't suggest in binding to use a deprecated property

2015-07-16 Thread Javier Martinez Canillas
The regulator-compatible property from the regulator DT binding was
deprecated. But the max77686 DT binding doc still suggest to use it
instead of the regulator node name's which is the correct approach.

Signed-off-by: Javier Martinez Canillas 
Reviewed-by: Krzysztof Kozlowski 

---

Changes in v2:
- Add Krzysztof Kozlowski Reviewed-by tag in patch #1.

 Documentation/devicetree/bindings/mfd/max77686.txt | 11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/max77686.txt 
b/Documentation/devicetree/bindings/mfd/max77686.txt
index 163bd81a4607..8221102d3fc2 100644
--- a/Documentation/devicetree/bindings/mfd/max77686.txt
+++ b/Documentation/devicetree/bindings/mfd/max77686.txt
@@ -26,7 +26,7 @@ Optional node:
};
refer Documentation/devicetree/bindings/regulator/regulator.txt
 
-  The regulator-compatible property of regulator should initialized with string
+  The regulator node's name should be initialized with a string
 to get matched with their hardware counterparts as follow:
 
-LDOn   :   for LDOs, where n can lie in range 1 to 26.
@@ -55,16 +55,14 @@ Example:
reg = <0x09>;
 
voltage-regulators {
-   ldo11_reg {
-   regulator-compatible = "LDO11";
+   ldo11_reg: LDO11 {
regulator-name = "vdd_ldo11";
regulator-min-microvolt = <190>;
regulator-max-microvolt = <190>;
regulator-always-on;
};
 
-   buck1_reg {
-   regulator-compatible = "BUCK1";
+   buck1_reg: BUCK1 {
regulator-name = "vdd_mif";
regulator-min-microvolt = <95>;
regulator-max-microvolt = <130>;
@@ -72,8 +70,7 @@ Example:
regulator-boot-on;
};
 
-   buck9_reg {
-   regulator-compatible = "BUCK9";
+   buck9_reg: BUCK9 {
regulator-name = "CAM_ISP_CORE_1.2V";
regulator-min-microvolt = <100>;
regulator-max-microvolt = <120>;
-- 
2.4.3

--
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: s3c2410: remove unused variable

2015-07-16 Thread Wolfram Sang
On Thu, Jul 16, 2015 at 10:36:16PM +0200, Laurent Navet wrote:
> ret is assigned zero and just used to return. remove it.
> Found by using coccinelle.
> 
> Signed-off-by: Laurent Navet 

Why not make it void?



signature.asc
Description: Digital signature


Re: [PATCH v2 06/13] irqchip: kill off set_irq_flags usage

2015-07-16 Thread Russell King - ARM Linux
On Thu, Jul 16, 2015 at 09:32:20PM +0200, Robert Jarzmik wrote:
> For PXA I must admit I don't yet know. I know lubbock has an UCB1400, but I
> don't have it working yet, so I can't foresee the problems yet.

The UCB1400 is an AC'97 device which is quite different from its
predecessors, and is not supported by the UCB1x00 driver.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
--
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] i2c: s3c2410: remove unused variable

2015-07-16 Thread Laurent Navet
ret is assigned zero and just used to return. remove it.
Found by using coccinelle.

Signed-off-by: Laurent Navet 
---
 drivers/i2c/busses/i2c-s3c2410.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 50bfd8c..cf3c6c0 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -409,7 +409,6 @@ static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, 
unsigned long iicstat)
 {
unsigned long tmp;
unsigned char byte;
-   int ret = 0;
 
switch (i2c->state) {
 
@@ -565,7 +564,7 @@ static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, 
unsigned long iicstat)
tmp &= ~S3C2410_IICCON_IRQPEND;
writel(tmp, i2c->regs + S3C2410_IICCON);
  out:
-   return ret;
+   return 0;
 }
 
 /* s3c24xx_i2c_irq
-- 
2.1.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 06/13] irqchip: kill off set_irq_flags usage

2015-07-16 Thread Robert Jarzmik
Russell King - ARM Linux  writes:

>> drivers/net/ethernet/smsc/smc911x.c
>> drivers/net/ethernet/smsc/smc9194.c
>> drivers/net/ethernet/smsc/smc91x.c
>> 
>> Those might still be, but on the DT based boards the probing should be
>> completely irrelevant
>
> SA11x0 stuff uses smc91x.c
PXA uses it also for lubbock, mainstone and zylonite boards, which are not yet
converted to DT, and won't drop platform_data, even if they are DT converted.
I remember testing this patchset on lubbock at least.

> ucb1x00.c definitely uses IRQ probing on SA11x0 platforms.
For PXA I must admit I don't yet know. I know lubbock has an UCB1400, but I
don't have it working yet, so I can't foresee the problems yet.

Cheers.

-- 
Robert
--
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 00/23] drm/exynos: atomic improvements + exynos_encoder removal

2015-07-16 Thread Gustavo Padovan
2015-07-14 Joonyoung Shim :

> On 07/06/2015 11:20 PM, Gustavo Padovan wrote:
> > From: Gustavo Padovan 
> >
> > Hi,
> >
> > This set improves exynos in a number of ways. The first five patches are
> > general clean up/fixes.
> >
> > Patches 06 to 12 are improvements on top of the newly added atomic 
> > modesetting
> > support.
> >
> > Patches 13-23 are a big journey to completely remove the internal
> > exynos_drm_encoder struct. Now exynos encoders register themselves directly
> > with the drm core.
> 
> I got compile error with 13-23 patches.
> 
> drivers/gpu/drm/exynos/exynos_drm_dsi.c: In function ‘exynos_dsi_bind’:
> drivers/gpu/drm/exynos/exynos_drm_dsi.c:1839:3: error: ‘display’ undeclared 
> (first use in this function)
>display->encoder->bridge = bridge;
>^
> drivers/gpu/drm/exynos/exynos_drm_dsi.c:1839:3: note: each undeclared 
> identifier is reported only once for each function it appears in
> make[4]: *** [drivers/gpu/drm/exynos/exynos_drm_dsi.o] Error 1
> 
> 
> If you post the stuff that only be related, it will be reviewed and
> merged easier.
> 
> 01-04 and 06-11 patches look good to me, about them,
> Reviewed-by: Joonyoung Shim 

Sure, I've resent only the patch with your Reviewed-by in a separate
patchset. The others will come in another patcheset.

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


[PATCH v3 5/9] drm/exynos: pass struct exynos_drm_plane in update/enable

2015-07-16 Thread Gustavo Padovan
From: Gustavo Padovan 

We already have the plane pointer in before calling .update_plane() or
disable_plane() so pass it directly to those calls avoiding a new
conversion from zpos to struct exynos_drm_plane.

v2: don't remove check for suspended in FIMD (comment by Joonyoung)

Signed-off-by: Gustavo Padovan 
Reviewed-by: Joonyoung Shim 
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 22 +++---
 drivers/gpu/drm/exynos/exynos7_drm_decon.c| 22 +++---
 drivers/gpu/drm/exynos/exynos_drm_drv.h   |  6 --
 drivers/gpu/drm/exynos/exynos_drm_fimd.c  | 22 +++---
 drivers/gpu/drm/exynos/exynos_drm_plane.c |  4 ++--
 drivers/gpu/drm/exynos/exynos_drm_vidi.c  |  9 ++---
 drivers/gpu/drm/exynos/exynos_mixer.c | 20 +++-
 7 files changed, 40 insertions(+), 65 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c 
b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index c7f3680..6dc2be2 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -219,17 +219,13 @@ static void decon_shadow_protect_win(struct decon_context 
*ctx, int win,
writel(val, ctx->addr + DECON_SHADOWCON);
 }
 
-static void decon_update_plane(struct exynos_drm_crtc *crtc, unsigned int win)
+static void decon_update_plane(struct exynos_drm_crtc *crtc,
+  struct exynos_drm_plane *plane)
 {
struct decon_context *ctx = crtc->ctx;
-   struct exynos_drm_plane *plane;
+   unsigned int win = plane->zpos;
u32 val;
 
-   if (win < 0 || win >= WINDOWS_NR)
-   return;
-
-   plane = &ctx->planes[win];
-
if (ctx->suspended)
return;
 
@@ -277,17 +273,13 @@ static void decon_update_plane(struct exynos_drm_crtc 
*crtc, unsigned int win)
atomic_set(&ctx->win_updated, 1);
 }
 
-static void decon_disable_plane(struct exynos_drm_crtc *crtc, unsigned int win)
+static void decon_disable_plane(struct exynos_drm_crtc *crtc,
+   struct exynos_drm_plane *plane)
 {
struct decon_context *ctx = crtc->ctx;
-   struct exynos_drm_plane *plane;
+   unsigned int win = plane->zpos;
u32 val;
 
-   if (win < 0 || win >= WINDOWS_NR)
-   return;
-
-   plane = &ctx->planes[win];
-
if (ctx->suspended)
return;
 
@@ -378,7 +370,7 @@ static void decon_disable(struct exynos_drm_crtc *crtc)
 * a destroyed buffer later.
 */
for (i = 0; i < WINDOWS_NR; i++)
-   decon_disable_plane(crtc, i);
+   decon_disable_plane(crtc, &ctx->planes[i]);
 
decon_swreset(ctx);
 
diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c 
b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
index 34da2a4..79b74d2 100644
--- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
@@ -382,24 +382,20 @@ static void decon_shadow_protect_win(struct decon_context 
*ctx,
writel(val, ctx->regs + SHADOWCON);
 }
 
-static void decon_update_plane(struct exynos_drm_crtc *crtc, unsigned int win)
+static void decon_update_plane(struct exynos_drm_crtc *crtc,
+  struct exynos_drm_plane *plane)
 {
struct decon_context *ctx = crtc->ctx;
struct drm_display_mode *mode = &crtc->base.state->adjusted_mode;
-   struct exynos_drm_plane *plane;
int padding;
unsigned long val, alpha;
unsigned int last_x;
unsigned int last_y;
+   unsigned int win = plane->zpos;
 
if (ctx->suspended)
return;
 
-   if (win < 0 || win >= WINDOWS_NR)
-   return;
-
-   plane = &ctx->planes[win];
-
/*
 * SHADOWCON/PRTCON register is used for enabling timing.
 *
@@ -492,17 +488,13 @@ static void decon_update_plane(struct exynos_drm_crtc 
*crtc, unsigned int win)
writel(val, ctx->regs + DECON_UPDATE);
 }
 
-static void decon_disable_plane(struct exynos_drm_crtc *crtc, unsigned int win)
+static void decon_disable_plane(struct exynos_drm_crtc *crtc,
+   struct exynos_drm_plane *plane)
 {
struct decon_context *ctx = crtc->ctx;
-   struct exynos_drm_plane *plane;
+   unsigned int win = plane->zpos;
u32 val;
 
-   if (win < 0 || win >= WINDOWS_NR)
-   return;
-
-   plane = &ctx->planes[win];
-
if (ctx->suspended)
return;
 
@@ -598,7 +590,7 @@ static void decon_disable(struct exynos_drm_crtc *crtc)
 * a destroyed buffer later.
 */
for (i = 0; i < WINDOWS_NR; i++)
-   decon_disable_plane(crtc, i);
+   decon_disable_plane(crtc, &ctx->planes[i]);
 
clk_disable_unprepare(ctx->vclk);
clk_disable_unprepare(ctx->eclk);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h 
b/drivers/gpu/drm/exyno

[PATCH v3 7/9] drm/exynos: remove unused fields from struct exynos_drm_plane

2015-07-16 Thread Gustavo Padovan
From: Gustavo Padovan 

Now after the move to use drm_plane_state directly struct drm_plane_state
has many unused fields, along with others that weren't used before the
plane state change. Thus remove them all.

Signed-off-by: Gustavo Padovan 
Reviewed-by: Joonyoung Shim 
---
 drivers/gpu/drm/exynos/exynos_drm_drv.h | 18 --
 1 file changed, 18 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h 
b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index cec46b6..00e4145 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -46,21 +46,12 @@ enum exynos_drm_output_type {
  * - the unit is screen coordinates.
  * @src_width: width of a partial image to be displayed from framebuffer.
  * @src_height: height of a partial image to be displayed from framebuffer.
- * @fb_width: width of a framebuffer.
- * @fb_height: height of a framebuffer.
  * @crtc_x: offset x on hardware screen.
  * @crtc_y: offset y on hardware screen.
  * @crtc_width: window width to be displayed (hardware screen).
  * @crtc_height: window height to be displayed (hardware screen).
- * @mode_width: width of screen mode.
- * @mode_height: height of screen mode.
  * @h_ratio: horizontal scaling ratio, 16.16 fixed point
  * @v_ratio: vertical scaling ratio, 16.16 fixed point
- * @refresh: refresh rate.
- * @scan_flag: interlace or progressive way.
- * (it could be DRM_MODE_FLAG_*)
- * @bpp: pixel size.(in bit)
- * @pixel_format: fourcc pixel format of this overlay
  * @dma_addr: array of bus(accessed by dma) address to the memory region
  *   allocated for a overlay.
  * @zpos: order of overlay layer(z position).
@@ -75,21 +66,12 @@ struct exynos_drm_plane {
unsigned int src_y;
unsigned int src_width;
unsigned int src_height;
-   unsigned int fb_width;
-   unsigned int fb_height;
unsigned int crtc_x;
unsigned int crtc_y;
unsigned int crtc_width;
unsigned int crtc_height;
-   unsigned int mode_width;
-   unsigned int mode_height;
unsigned int h_ratio;
unsigned int v_ratio;
-   unsigned int refresh;
-   unsigned int scan_flag;
-   unsigned int bpp;
-   unsigned int pitch;
-   uint32_t pixel_format;
dma_addr_t dma_addr[MAX_FB_BUFFER];
unsigned int zpos;
 };
-- 
2.1.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


[PATCH v3 9/9] drm/exynos: return return value of exynos_crtc->enable_vblank

2015-07-16 Thread Gustavo Padovan
From: Gustavo Padovan 

Instead of blindly ignore the return value of enable_vblank return it
to the upper DRM layer for error handling.

Suggested-by: Joonyoung Shim 
Signed-off-by: Gustavo Padovan 
Reviewed-by: Joonyoung Shim 
---
 drivers/gpu/drm/exynos/exynos_drm_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c 
b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index e9c291f..9bc2353 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -175,7 +175,7 @@ int exynos_drm_crtc_enable_vblank(struct drm_device *dev, 
int pipe)
return -EPERM;
 
if (exynos_crtc->ops->enable_vblank)
-   exynos_crtc->ops->enable_vblank(exynos_crtc);
+   return exynos_crtc->ops->enable_vblank(exynos_crtc);
 
return 0;
 }
-- 
2.1.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


[PATCH v3 8/9] drm/exynos: unify exynos_drm_plane names with drm core

2015-07-16 Thread Gustavo Padovan
From: Gustavo Padovan 

Rename crtc_{widht,height} to crtc_{w,h} and src_{width,height} to
src_{w,h} to make it similar to the atomic state names.

Signed-off-by: Gustavo Padovan 
Reviewed-by: Joonyoung Shim 
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 10 +-
 drivers/gpu/drm/exynos/exynos7_drm_decon.c| 14 +++---
 drivers/gpu/drm/exynos/exynos_drm_drv.h   | 16 
 drivers/gpu/drm/exynos/exynos_drm_fimd.c  | 14 +++---
 drivers/gpu/drm/exynos/exynos_drm_plane.c | 11 ++-
 drivers/gpu/drm/exynos/exynos_mixer.c | 22 +++---
 6 files changed, 44 insertions(+), 43 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c 
b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index dd41390..e50e6bb 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -237,8 +237,8 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,
val = COORDINATE_X(plane->crtc_x) | COORDINATE_Y(plane->crtc_y);
writel(val, ctx->addr + DECON_VIDOSDxA(win));
 
-   val = COORDINATE_X(plane->crtc_x + plane->crtc_width - 1) |
-   COORDINATE_Y(plane->crtc_y + plane->crtc_height - 1);
+   val = COORDINATE_X(plane->crtc_x + plane->crtc_w - 1) |
+   COORDINATE_Y(plane->crtc_y + plane->crtc_h - 1);
writel(val, ctx->addr + DECON_VIDOSDxB(win));
 
val = VIDOSD_Wx_ALPHA_R_F(0x0) | VIDOSD_Wx_ALPHA_G_F(0x0) |
@@ -251,11 +251,11 @@ static void decon_update_plane(struct exynos_drm_crtc 
*crtc,
 
writel(plane->dma_addr[0], ctx->addr + DECON_VIDW0xADD0B0(win));
 
-   val = plane->dma_addr[0] + pitch * plane->crtc_height;
+   val = plane->dma_addr[0] + pitch * plane->crtc_h;
writel(val, ctx->addr + DECON_VIDW0xADD1B0(win));
 
-   val = OFFSIZE(pitch - plane->crtc_width * bpp)
-   | PAGEWIDTH(plane->crtc_width * bpp);
+   val = OFFSIZE(pitch - plane->crtc_w * bpp)
+   | PAGEWIDTH(plane->crtc_w * bpp);
writel(val, ctx->addr + DECON_VIDW0xADD2(win));
 
decon_win_set_pixfmt(ctx, win, state->fb);
diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c 
b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
index 7f00a20..85657cf 100644
--- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
@@ -429,25 +429,25 @@ static void decon_update_plane(struct exynos_drm_crtc 
*crtc,
DRM_DEBUG_KMS("start addr = 0x%lx\n",
(unsigned long)val);
DRM_DEBUG_KMS("ovl_width = %d, ovl_height = %d\n",
-   plane->crtc_width, plane->crtc_height);
+   plane->crtc_w, plane->crtc_h);
 
/*
 * OSD position.
 * In case the window layout goes of LCD layout, DECON fails.
 */
-   if ((plane->crtc_x + plane->crtc_width) > mode->hdisplay)
-   plane->crtc_x = mode->hdisplay - plane->crtc_width;
-   if ((plane->crtc_y + plane->crtc_height) > mode->vdisplay)
-   plane->crtc_y = mode->vdisplay - plane->crtc_height;
+   if ((plane->crtc_x + plane->crtc_w) > mode->hdisplay)
+   plane->crtc_x = mode->hdisplay - plane->crtc_w;
+   if ((plane->crtc_y + plane->crtc_h) > mode->vdisplay)
+   plane->crtc_y = mode->vdisplay - plane->crtc_h;
 
val = VIDOSDxA_TOPLEFT_X(plane->crtc_x) |
VIDOSDxA_TOPLEFT_Y(plane->crtc_y);
writel(val, ctx->regs + VIDOSD_A(win));
 
-   last_x = plane->crtc_x + plane->crtc_width;
+   last_x = plane->crtc_x + plane->crtc_w;
if (last_x)
last_x--;
-   last_y = plane->crtc_y + plane->crtc_height;
+   last_y = plane->crtc_y + plane->crtc_h;
if (last_y)
last_y--;
 
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h 
b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index 00e4145..5d7ae07 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -44,12 +44,12 @@ enum exynos_drm_output_type {
  * - the unit is screen coordinates.
  * @src_y: offset y on a framebuffer to be displayed.
  * - the unit is screen coordinates.
- * @src_width: width of a partial image to be displayed from framebuffer.
- * @src_height: height of a partial image to be displayed from framebuffer.
+ * @src_w: width of a partial image to be displayed from framebuffer.
+ * @src_h: height of a partial image to be displayed from framebuffer.
  * @crtc_x: offset x on hardware screen.
  * @crtc_y: offset y on hardware screen.
- * @crtc_width: window width to be displayed (hardware screen).
- * @crtc_height: window height to be displayed (hardware screen).
+ * @crtc_w: window width to be displayed (hardware screen).
+ * @crtc_h: window height to be displayed (hardware screen).
  * @h_ratio: horizontal scaling ratio, 16.16 fixed point
  * @v_ratio: vertical scaling ratio, 16.16 fixed po

[PATCH v3 4/9] drm/exynos: rename win_commit/disable to atomic-like names

2015-07-16 Thread Gustavo Padovan
From: Gustavo Padovan 

Rename win_commit() helper to update_plane() and win_disable() to
disable_plane().

Signed-off-by: Gustavo Padovan 
Reviewed-by: Joonyoung Shim 
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 10 +-
 drivers/gpu/drm/exynos/exynos7_drm_decon.c| 10 +-
 drivers/gpu/drm/exynos/exynos_drm_drv.h   |  8 
 drivers/gpu/drm/exynos/exynos_drm_fimd.c  | 10 +-
 drivers/gpu/drm/exynos/exynos_drm_plane.c | 10 +-
 drivers/gpu/drm/exynos/exynos_drm_vidi.c  |  6 +++---
 drivers/gpu/drm/exynos/exynos_mixer.c | 10 +-
 7 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c 
b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index 61e6e4a..c7f3680 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -219,7 +219,7 @@ static void decon_shadow_protect_win(struct decon_context 
*ctx, int win,
writel(val, ctx->addr + DECON_SHADOWCON);
 }
 
-static void decon_win_commit(struct exynos_drm_crtc *crtc, unsigned int win)
+static void decon_update_plane(struct exynos_drm_crtc *crtc, unsigned int win)
 {
struct decon_context *ctx = crtc->ctx;
struct exynos_drm_plane *plane;
@@ -277,7 +277,7 @@ static void decon_win_commit(struct exynos_drm_crtc *crtc, 
unsigned int win)
atomic_set(&ctx->win_updated, 1);
 }
 
-static void decon_win_disable(struct exynos_drm_crtc *crtc, unsigned int win)
+static void decon_disable_plane(struct exynos_drm_crtc *crtc, unsigned int win)
 {
struct decon_context *ctx = crtc->ctx;
struct exynos_drm_plane *plane;
@@ -378,7 +378,7 @@ static void decon_disable(struct exynos_drm_crtc *crtc)
 * a destroyed buffer later.
 */
for (i = 0; i < WINDOWS_NR; i++)
-   decon_win_disable(crtc, i);
+   decon_disable_plane(crtc, i);
 
decon_swreset(ctx);
 
@@ -460,8 +460,8 @@ static struct exynos_drm_crtc_ops decon_crtc_ops = {
.enable_vblank  = decon_enable_vblank,
.disable_vblank = decon_disable_vblank,
.commit = decon_commit,
-   .win_commit = decon_win_commit,
-   .win_disable= decon_win_disable,
+   .update_plane   = decon_update_plane,
+   .disable_plane  = decon_disable_plane,
.te_handler = decon_te_irq_handler,
.clear_channels = decon_clear_channels,
 };
diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c 
b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
index f720f2a..34da2a4 100644
--- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
@@ -382,7 +382,7 @@ static void decon_shadow_protect_win(struct decon_context 
*ctx,
writel(val, ctx->regs + SHADOWCON);
 }
 
-static void decon_win_commit(struct exynos_drm_crtc *crtc, unsigned int win)
+static void decon_update_plane(struct exynos_drm_crtc *crtc, unsigned int win)
 {
struct decon_context *ctx = crtc->ctx;
struct drm_display_mode *mode = &crtc->base.state->adjusted_mode;
@@ -492,7 +492,7 @@ static void decon_win_commit(struct exynos_drm_crtc *crtc, 
unsigned int win)
writel(val, ctx->regs + DECON_UPDATE);
 }
 
-static void decon_win_disable(struct exynos_drm_crtc *crtc, unsigned int win)
+static void decon_disable_plane(struct exynos_drm_crtc *crtc, unsigned int win)
 {
struct decon_context *ctx = crtc->ctx;
struct exynos_drm_plane *plane;
@@ -598,7 +598,7 @@ static void decon_disable(struct exynos_drm_crtc *crtc)
 * a destroyed buffer later.
 */
for (i = 0; i < WINDOWS_NR; i++)
-   decon_win_disable(crtc, i);
+   decon_disable_plane(crtc, i);
 
clk_disable_unprepare(ctx->vclk);
clk_disable_unprepare(ctx->eclk);
@@ -618,8 +618,8 @@ static const struct exynos_drm_crtc_ops decon_crtc_ops = {
.enable_vblank = decon_enable_vblank,
.disable_vblank = decon_disable_vblank,
.wait_for_vblank = decon_wait_for_vblank,
-   .win_commit = decon_win_commit,
-   .win_disable = decon_win_disable,
+   .update_plane = decon_update_plane,
+   .disable_plane = decon_disable_plane,
.clear_channels = decon_clear_channels,
 };
 
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h 
b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index dd00f16..77da485 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -153,8 +153,8 @@ struct exynos_drm_display {
  * @disable_vblank: specific driver callback for disabling vblank interrupt.
  * @wait_for_vblank: wait for vblank interrupt to make sure that
  * hardware overlay is updated.
- * @win_commit: apply hardware specific overlay data to registers.
- * @win_disable: disable hardware specific overlay.
+ * @update_plane: apply hardware specifi

[PATCH v3 6/9] drm/exynos: use drm atomic state directly

2015-07-16 Thread Gustavo Padovan
From: Gustavo Padovan 

For some fields the use of struct exynos_drm_plane filled with data from
the plane state just creates a source of duplicated information and
overhead.  Here we change the crtc drivers to access the plane state
directly simplifying the code by not relying on a exynos internal struct.

Signed-off-by: Gustavo Padovan 
Reviewed-by: Joonyoung Shim 
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 21 +
 drivers/gpu/drm/exynos/exynos7_drm_decon.c| 23 +-
 drivers/gpu/drm/exynos/exynos_drm_fimd.c  | 29 ++--
 drivers/gpu/drm/exynos/exynos_drm_plane.c | 12 -
 drivers/gpu/drm/exynos/exynos_mixer.c | 65 ++-
 5 files changed, 75 insertions(+), 75 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c 
b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index 6dc2be2..dd41390 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -152,15 +152,15 @@ static void decon_commit(struct exynos_drm_crtc *crtc)
 #define OFFSIZE(x) (((x) & 0x3fff) << 14)
 #define PAGEWIDTH(x)   ((x) & 0x3fff)
 
-static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win)
+static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win,
+struct drm_framebuffer *fb)
 {
-   struct exynos_drm_plane *plane = &ctx->planes[win];
unsigned long val;
 
val = readl(ctx->addr + DECON_WINCONx(win));
val &= ~WINCONx_BPPMODE_MASK;
 
-   switch (plane->pixel_format) {
+   switch (fb->pixel_format) {
case DRM_FORMAT_XRGB1555:
val |= WINCONx_BPPMODE_16BPP_I1555;
val |= WINCONx_HAWSWP_F;
@@ -186,7 +186,7 @@ static void decon_win_set_pixfmt(struct decon_context *ctx, 
unsigned int win)
return;
}
 
-   DRM_DEBUG_KMS("bpp = %u\n", plane->bpp);
+   DRM_DEBUG_KMS("bpp = %u\n", fb->bits_per_pixel);
 
/*
 * In case of exynos, setting dma-burst to 16Word causes permanent
@@ -196,7 +196,7 @@ static void decon_win_set_pixfmt(struct decon_context *ctx, 
unsigned int win)
 * movement causes unstable DMA which results into iommu crash/tear.
 */
 
-   if (plane->fb_width < MIN_FB_WIDTH_FOR_16WORD_BURST) {
+   if (fb->width < MIN_FB_WIDTH_FOR_16WORD_BURST) {
val &= ~WINCONx_BURSTLEN_MASK;
val |= WINCONx_BURSTLEN_8WORD;
}
@@ -223,7 +223,10 @@ static void decon_update_plane(struct exynos_drm_crtc 
*crtc,
   struct exynos_drm_plane *plane)
 {
struct decon_context *ctx = crtc->ctx;
+   struct drm_plane_state *state = plane->base.state;
unsigned int win = plane->zpos;
+   unsigned int bpp = state->fb->bits_per_pixel >> 3;
+   unsigned int pitch = state->fb->pitches[0];
u32 val;
 
if (ctx->suspended)
@@ -248,14 +251,14 @@ static void decon_update_plane(struct exynos_drm_crtc 
*crtc,
 
writel(plane->dma_addr[0], ctx->addr + DECON_VIDW0xADD0B0(win));
 
-   val = plane->dma_addr[0] + plane->pitch * plane->crtc_height;
+   val = plane->dma_addr[0] + pitch * plane->crtc_height;
writel(val, ctx->addr + DECON_VIDW0xADD1B0(win));
 
-   val = OFFSIZE(plane->pitch - plane->crtc_width * (plane->bpp >> 3))
-   | PAGEWIDTH(plane->crtc_width * (plane->bpp >> 3));
+   val = OFFSIZE(pitch - plane->crtc_width * bpp)
+   | PAGEWIDTH(plane->crtc_width * bpp);
writel(val, ctx->addr + DECON_VIDW0xADD2(win));
 
-   decon_win_set_pixfmt(ctx, win);
+   decon_win_set_pixfmt(ctx, win, state->fb);
 
/* window enable */
val = readl(ctx->addr + DECON_WINCONx(win));
diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c 
b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
index 79b74d2..7f00a20 100644
--- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
@@ -271,16 +271,16 @@ static void decon_disable_vblank(struct exynos_drm_crtc 
*crtc)
}
 }
 
-static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win)
+static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win,
+struct drm_framebuffer *fb)
 {
-   struct exynos_drm_plane *plane = &ctx->planes[win];
unsigned long val;
int padding;
 
val = readl(ctx->regs + WINCON(win));
val &= ~WINCONx_BPPMODE_MASK;
 
-   switch (plane->pixel_format) {
+   switch (fb->pixel_format) {
case DRM_FORMAT_RGB565:
val |= WINCONx_BPPMODE_16BPP_565;
val |= WINCONx_BURSTLEN_16WORD;
@@ -329,7 +329,7 @@ static void decon_win_set_pixfmt(struct decon_context *ctx, 
unsigned int win)
break;
}
 
-   DRM_DEBUG_KMS("bpp = %d\n", plane->bpp);
+   DRM_DEBUG_KMS("bpp = %d\n", fb->bit

[PATCH v3 3/9] drm/exynos: remove duplicated check for suspend

2015-07-16 Thread Gustavo Padovan
From: Gustavo Padovan 

The same check is placed twice in fimd/decon_update_plane(), remove
one of them.

Signed-off-by: Gustavo Padovan 
Reviewed-by: Joonyoung Shim 
---
 drivers/gpu/drm/exynos/exynos7_drm_decon.c | 3 ---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c   | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c 
b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
index 5a1174a..f720f2a 100644
--- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
@@ -400,9 +400,6 @@ static void decon_win_commit(struct exynos_drm_crtc *crtc, 
unsigned int win)
 
plane = &ctx->planes[win];
 
-   if (ctx->suspended)
-   return;
-
/*
 * SHADOWCON/PRTCON register is used for enabling timing.
 *
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c 
b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 9eb9e33..0875f111 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -630,9 +630,6 @@ static void fimd_win_commit(struct exynos_drm_crtc *crtc, 
unsigned int win)
 
plane = &ctx->planes[win];
 
-   if (ctx->suspended)
-   return;
-
/*
 * SHADOWCON/PRTCON register is used for enabling timing.
 *
-- 
2.1.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


[PATCH v3 2/9] drm/exynos: use KMS version of DRM vblanks functions

2015-07-16 Thread Gustavo Padovan
From: Gustavo Padovan 

Get rid of legacy DRM vblank function that are less clear to use.
The new ones basically requires only the crtc as parameters.

It also clean ups exynos_drm_crtc_finish_pageflip() parameters as a
consequence.

Signed-off-by: Gustavo Padovan 
Reviewed-by: Joonyoung Shim 
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c |  6 +++---
 drivers/gpu/drm/exynos/exynos7_drm_decon.c|  4 ++--
 drivers/gpu/drm/exynos/exynos_drm_crtc.c  | 14 ++
 drivers/gpu/drm/exynos/exynos_drm_crtc.h  |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_fimd.c  |  8 
 drivers/gpu/drm/exynos/exynos_drm_vidi.c  |  4 ++--
 drivers/gpu/drm/exynos/exynos_mixer.c |  4 ++--
 7 files changed, 20 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c 
b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index 8b1225f..61e6e4a 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -407,7 +407,7 @@ void decon_te_irq_handler(struct exynos_drm_crtc *crtc)
writel(val, ctx->addr + DECON_TRIGCON);
}
 
-   drm_handle_vblank(ctx->drm_dev, ctx->pipe);
+   drm_crtc_handle_vblank(&ctx->crtc->base);
 }
 
 static void decon_clear_channels(struct exynos_drm_crtc *crtc)
@@ -533,7 +533,7 @@ static irqreturn_t decon_vsync_irq_handler(int irq, void 
*dev_id)
 
val = readl(ctx->addr + DECON_VIDINTCON1);
if (val & VIDINTCON1_INTFRMPEND) {
-   drm_handle_vblank(ctx->drm_dev, ctx->pipe);
+   drm_crtc_handle_vblank(&ctx->crtc->base);
 
/* clear */
writel(VIDINTCON1_INTFRMPEND, ctx->addr + DECON_VIDINTCON1);
@@ -553,7 +553,7 @@ static irqreturn_t decon_lcd_sys_irq_handler(int irq, void 
*dev_id)
 
val = readl(ctx->addr + DECON_VIDINTCON1);
if (val & VIDINTCON1_INTFRMDONEPEND) {
-   exynos_drm_crtc_finish_pageflip(ctx->drm_dev, ctx->pipe);
+   exynos_drm_crtc_finish_pageflip(ctx->crtc);
 
/* clear */
writel(VIDINTCON1_INTFRMDONEPEND,
diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c 
b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
index 362532a..5a1174a 100644
--- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
@@ -643,8 +643,8 @@ static irqreturn_t decon_irq_handler(int irq, void *dev_id)
goto out;
 
if (!ctx->i80_if) {
-   drm_handle_vblank(ctx->drm_dev, ctx->pipe);
-   exynos_drm_crtc_finish_pageflip(ctx->drm_dev, ctx->pipe);
+   drm_crtc_handle_vblank(&ctx->crtc->base);
+   exynos_drm_crtc_finish_pageflip(ctx->crtc);
 
/* set wait vsync event to zero and wake up queue. */
if (atomic_read(&ctx->wait_vsync_event)) {
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c 
b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index 22b9ca0..e9c291f 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -193,24 +193,22 @@ void exynos_drm_crtc_disable_vblank(struct drm_device 
*dev, int pipe)
exynos_crtc->ops->disable_vblank(exynos_crtc);
 }
 
-void exynos_drm_crtc_finish_pageflip(struct drm_device *dev, int pipe)
+void exynos_drm_crtc_finish_pageflip(struct exynos_drm_crtc *exynos_crtc)
 {
-   struct exynos_drm_private *dev_priv = dev->dev_private;
-   struct drm_crtc *drm_crtc = dev_priv->crtc[pipe];
-   struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(drm_crtc);
+   struct drm_crtc *crtc = &exynos_crtc->base;
unsigned long flags;
 
-   spin_lock_irqsave(&dev->event_lock, flags);
+   spin_lock_irqsave(&crtc->dev->event_lock, flags);
if (exynos_crtc->event) {
 
-   drm_send_vblank_event(dev, pipe, exynos_crtc->event);
-   drm_vblank_put(dev, pipe);
+   drm_crtc_send_vblank_event(crtc, exynos_crtc->event);
+   drm_crtc_vblank_put(crtc);
wake_up(&exynos_crtc->pending_flip_queue);
 
}
 
exynos_crtc->event = NULL;
-   spin_unlock_irqrestore(&dev->event_lock, flags);
+   spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
 }
 
 void exynos_drm_crtc_complete_scanout(struct drm_framebuffer *fb)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.h 
b/drivers/gpu/drm/exynos/exynos_drm_crtc.h
index 0f3aa70..d01d49a 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.h
@@ -25,7 +25,7 @@ struct exynos_drm_crtc *exynos_drm_crtc_create(struct 
drm_device *drm_dev,
void *context);
 int exynos_drm_crtc_enable_vblank(struct drm_device *dev, int pipe);
 void exynos_drm_crtc_disable_vblank(struct drm_device *dev, int pipe);
-void exynos_drm_crtc_finish_pageflip(struct drm_device *dev, int pipe);
+void exynos_drm_crtc_finish_pageflip(struct exy

[PATCH v3 1/9] drm/exynos: pass the correct pipe number

2015-07-16 Thread Gustavo Padovan
From: Gustavo Padovan 

Instead of giving -1 to as arg to  drm_send_vblank_event() pass the
correct pipe number to it.

Signed-off-by: Gustavo Padovan 
Reviewed-by: Joonyoung Shim 
---
 drivers/gpu/drm/exynos/exynos_drm_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c 
b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index 644b4b7..22b9ca0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -203,7 +203,7 @@ void exynos_drm_crtc_finish_pageflip(struct drm_device 
*dev, int pipe)
spin_lock_irqsave(&dev->event_lock, flags);
if (exynos_crtc->event) {
 
-   drm_send_vblank_event(dev, -1, exynos_crtc->event);
+   drm_send_vblank_event(dev, pipe, exynos_crtc->event);
drm_vblank_put(dev, pipe);
wake_up(&exynos_crtc->pending_flip_queue);
 
-- 
2.1.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


Re: [PATCH v2 06/13] irqchip: kill off set_irq_flags usage

2015-07-16 Thread Russell King - ARM Linux
On Sun, Jul 12, 2015 at 06:43:56PM +0200, Thomas Gleixner wrote:
> The probe function was added in the initial implementation of the
> driver (2006), so it predates device tree.
> 
> drivers/net/appletalk/ltpc.c
> drivers/net/arcnet/com20020-isa.c
> drivers/net/arcnet/com90io.c
> drivers/net/arcnet/com90xx.c
> 
> Surely not stuff you find on todays ARM systems
> 
> drivers/net/ethernet/8390/ne.c
> drivers/net/ethernet/8390/wd.c
> drivers/net/ethernet/amd/lance.c
> drivers/net/ethernet/amd/ni65.c
> drivers/net/ethernet/amd/pcnet32.c

pcnet32 is used on the Netwinder, which we still have supported in the ARM
tree.  Even worse, the Netwinder has the Cyberpro capture IRQ missing a
resistor, so it defaults to "asserted" and can trigger a stuck-IRQ, so
it's best not to allow probing of that known bad IRQ.

> Ditto
> 
> drivers/net/ethernet/smsc/smc911x.c
> drivers/net/ethernet/smsc/smc9194.c
> drivers/net/ethernet/smsc/smc91x.c
> 
> Those might still be, but on the DT based boards the probing should be
> completely irrelevant

SA11x0 stuff uses smc91x.c

> drivers/pcmcia/yenta_socket.c
> 
> Russell might still use that.

Some EBSA285 systems use that, Compaq Personal Server (which is my wireless
AP using hostap) does.

ucb1x00.c definitely uses IRQ probing on SA11x0 platforms.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
--
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: [PATCHv7 14/15] cec: s5p-cec: Add s5p-cec driver

2015-07-16 Thread Hans Verkuil
Marek, Kamil,



On 06/29/15 12:14, Hans Verkuil wrote:
> From: Kamil Debski 
> 
> Add CEC interface driver present in the Samsung Exynos range of
> SoCs.
> 
> The following files were based on work by SangPil Moon:
> - exynos_hdmi_cec.h
> - exynos_hdmi_cecctl.c
> 
> Signed-off-by: Kamil Debski 
> Signed-off-by: Hans Verkuil 
> ---



> diff --git a/drivers/media/platform/s5p-cec/s5p_cec.c 
> b/drivers/media/platform/s5p-cec/s5p_cec.c
> new file mode 100644
> index 000..0f16d00
> --- /dev/null
> +++ b/drivers/media/platform/s5p-cec/s5p_cec.c
> @@ -0,0 +1,283 @@
> +/* drivers/media/platform/s5p-cec/s5p_cec.c
> + *
> + * Samsung S5P CEC driver
> + *
> + * Copyright (c) 2014 Samsung Electronics Co., Ltd.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This driver is based on the "cec interface driver for exynos soc" by
> + * SangPil Moon.
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include "exynos_hdmi_cec.h"
> +#include "regs-cec.h"
> +#include "s5p_cec.h"
> +
> +#define CEC_NAME "s5p-cec"
> +
> +static int debug;
> +module_param(debug, int, 0644);
> +MODULE_PARM_DESC(debug, "debug level (0-2)");
> +
> +static int s5p_cec_enable(struct cec_adapter *adap, bool enable)
> +{
> + struct s5p_cec_dev *cec = container_of(adap, struct s5p_cec_dev, adap);
> + int ret;
> +
> + if (enable) {
> + ret = pm_runtime_get_sync(cec->dev);
> +
> + adap->phys_addr = 0x100b;

This is a bogus physical address. The actual physical address has to be derived
from the EDID that is read by the HDMI transmitter.

I think in the case of this driver it will have to be userspace that assigns
the physical address after reading the EDID from drm/kms?

How did you test this, Kamil?

Regards,

Hans

> + s5p_cec_reset(cec);
> +
> + s5p_cec_set_divider(cec);
> + s5p_cec_threshold(cec);
> +
> + s5p_cec_unmask_tx_interrupts(cec);
> + s5p_cec_unmask_rx_interrupts(cec);
> + s5p_cec_enable_rx(cec);
> + } else {
> + s5p_cec_mask_tx_interrupts(cec);
> + s5p_cec_mask_rx_interrupts(cec);
> + pm_runtime_disable(cec->dev);
> + }
> +
> + return 0;
> +}
> +
> +static int s5p_cec_log_addr(struct cec_adapter *adap, u8 addr)
> +{
> + struct s5p_cec_dev *cec = container_of(adap, struct s5p_cec_dev, adap);
> +
> + s5p_cec_set_addr(cec, addr);
> + return 0;
> +}
> +
> +static int s5p_cec_transmit(struct cec_adapter *adap, struct cec_msg *msg)
> +{
> + struct s5p_cec_dev *cec = container_of(adap, struct s5p_cec_dev, adap);
> +
> + s5p_cec_copy_packet(cec, msg->msg, msg->len);
> + return 0;
> +}
> +
> +static void s5p_cec_transmit_timed_out(struct cec_adapter *adap)
> +{
> +
> +}
> +
> +static irqreturn_t s5p_cec_irq_handler(int irq, void *priv)
> +{
> + struct s5p_cec_dev *cec = priv;
> + u32 status = 0;
> +
> + status = s5p_cec_get_status(cec);
> +
> + dev_dbg(cec->dev, "irq received\n");
> +
> + if (status & CEC_STATUS_TX_DONE) {
> + if (status & CEC_STATUS_TX_ERROR) {
> + dev_dbg(cec->dev, "CEC_STATUS_TX_ERROR set\n");
> + cec->tx = STATE_ERROR;
> + } else {
> + dev_dbg(cec->dev, "CEC_STATUS_TX_DONE\n");
> + cec->tx = STATE_DONE;
> + }
> + s5p_clr_pending_tx(cec);
> + }
> +
> + if (status & CEC_STATUS_RX_DONE) {
> + if (status & CEC_STATUS_RX_ERROR) {
> + dev_dbg(cec->dev, "CEC_STATUS_RX_ERROR set\n");
> + s5p_cec_rx_reset(cec);
> + s5p_cec_enable_rx(cec);
> + } else {
> + dev_dbg(cec->dev, "CEC_STATUS_RX_DONE set\n");
> + if (cec->rx != STATE_IDLE)
> + dev_dbg(cec->dev, "Buffer overrun (worker did 
> not process previous message)\n");
> + cec->rx = STATE_BUSY;
> + cec->msg.len = status >> 24;
> + cec->msg.status = CEC_RX_STATUS_READY;
> + s5p_cec_get_rx_buf(cec, cec->msg.len,
> + cec->msg.msg);
> + cec->rx = STATE_DONE;
> + s5p_cec_enable_rx(cec);
> + }
> + /* Clear interrupt pending bit */
> + s5p_clr_pending_rx(cec);
> + }
> + return IRQ_WAKE_THREAD;
> +}
> +
> +static irqreturn_t s5p_cec_irq_handler_thread(int irq, void *priv)
> +{
> + struct s5p_cec_dev *cec = priv;
> +
> + dev_dbg(cec->dev, "irq pro

Re: [PATCH v2 06/13] irqchip: kill off set_irq_flags usage

2015-07-16 Thread Thomas Gleixner
On Mon, 13 Jul 2015, Rob Herring wrote:
> On Sun, Jul 12, 2015 at 11:43 AM, Thomas Gleixner  wrote:
> > So in most of the irqchip drivers, this is irrelevant.
> 
> Agreed, but that's a separate series I think. I'm trying not to change
> behavior with this series. Are you proposing I do something different
> with this patch?

No, consolidating it with no functional change is certainly the right
thing to do first.

Thanks,

tglx
--
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/2] pinctrl: samsung: remove "out of memory" messages

2015-07-16 Thread Linus Walleij
On Mon, Jun 22, 2015 at 5:13 PM, Dan Carpenter  wrote:

> Checkpatch.pl complains about these:
>
> WARNING: Possible unnecessary 'out of memory' message
>
> The messages use a little extra RAM and they add a few extra lines of
> code.  We're probably never going to hit these out of memory situations
> but if we did then kmalloc() has pretty good error messages built-in.
>
> Signed-off-by: Dan Carpenter 

Patch applied with Krzysztof's review tag.

Yours,
Linus Walleij
--
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/2] pinctrl: samsung: don't truncate the last char

2015-07-16 Thread Linus Walleij
On Mon, Jun 22, 2015 at 5:12 PM, Dan Carpenter  wrote:

> We were allocating enough space because sizeof("-grp") and
> sizeof("-mux") are both equal to 5 but in the snprintf() we only allowed
> for 4 characters so the last 'p' and 'x' characters were truncated.
>
> The allocate and sprintf can be done in one step with the kasprintf().
>
> Signed-off-by: Dan Carpenter 

Patch applied with Krzysztof's review tag.

Yours,
Linus Walleij
--
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 1/3] clk: samsung: exynos3250: Add cpu clock configuration data and instaniate cpu clock

2015-07-16 Thread Krzysztof Kozlowski
2015-07-02 9:42 GMT+09:00 Chanwoo Choi :
> This patch add CPU clock configuration data and instantiate the CPU clock type
> for Exynos3250 to support Samsung specific cpu-clock type.
>
> Cc: Sylwester Nawrocki 
> Cc: Tomasz Figa 
> Signed-off-by: Chanwoo Choi 
> Acked-by: Kyungmin Park 
> Reviewed-by: Krzysztof Kozlowski 
> ---
>  drivers/clk/samsung/clk-exynos3250.c   | 32 ++--
>  include/dt-bindings/clock/exynos3250.h |  1 +

Sylwester,

I think this patch also waits for your review or ack.
The patchset is rebased on Bartlomiej's series for Exynos5250 cpufreq
so the easiest way would be to take it through samsung-soc tree.

Best regards,
Krzysztof


>  2 files changed, 31 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clk/samsung/clk-exynos3250.c 
> b/drivers/clk/samsung/clk-exynos3250.c
> index 538de66a759e..378ad5ad3492 100644
> --- a/drivers/clk/samsung/clk-exynos3250.c
> +++ b/drivers/clk/samsung/clk-exynos3250.c
> @@ -19,6 +19,7 @@
>  #include 
>
>  #include "clk.h"
> +#include "clk-cpu.h"
>  #include "clk-pll.h"
>
>  #define SRC_LEFTBUS0x4200
> @@ -319,8 +320,10 @@ static struct samsung_mux_clock mux_clks[] __initdata = {
> MUX(CLK_MOUT_MPLL_USER_C, "mout_mpll_user_c", mout_mpll_user_p,
> SRC_CPU, 24, 1),
> MUX(CLK_MOUT_HPM, "mout_hpm", mout_hpm_p, SRC_CPU, 20, 1),
> -   MUX(CLK_MOUT_CORE, "mout_core", mout_core_p, SRC_CPU, 16, 1),
> -   MUX(CLK_MOUT_APLL, "mout_apll", mout_apll_p, SRC_CPU, 0, 1),
> +   MUX_F(CLK_MOUT_CORE, "mout_core", mout_core_p, SRC_CPU, 16, 1,
> +   CLK_SET_RATE_PARENT, 0),
> +   MUX_F(CLK_MOUT_APLL, "mout_apll", mout_apll_p, SRC_CPU, 0, 1,
> +   CLK_SET_RATE_PARENT, 0),
>  };
>
>  static struct samsung_div_clock div_clks[] __initdata = {
> @@ -772,6 +775,26 @@ static struct samsung_cmu_info cmu_info __initdata = {
> .nr_clk_regs= ARRAY_SIZE(exynos3250_cmu_clk_regs),
>  };
>
> +#define E3250_CPU_DIV0(apll, pclk_dbg, atb, corem) \
> +   (((apll) << 24) | ((pclk_dbg) << 20) | ((atb) << 16) |  \
> +   ((corem) << 4))
> +#define E3250_CPU_DIV1(hpm, copy)  \
> +   (((hpm) << 4) | ((copy) << 0))
> +
> +static const struct exynos_cpuclk_cfg_data e3250_armclk_d[] __initconst = {
> +   { 100, E3250_CPU_DIV0(1, 7, 4, 1), E3250_CPU_DIV1(7, 7), },
> +   {  90, E3250_CPU_DIV0(1, 7, 3, 1), E3250_CPU_DIV1(7, 7), },
> +   {  80, E3250_CPU_DIV0(1, 7, 3, 1), E3250_CPU_DIV1(7, 7), },
> +   {  70, E3250_CPU_DIV0(1, 7, 3, 1), E3250_CPU_DIV1(7, 7), },
> +   {  60, E3250_CPU_DIV0(1, 7, 3, 1), E3250_CPU_DIV1(7, 7), },
> +   {  50, E3250_CPU_DIV0(1, 7, 3, 1), E3250_CPU_DIV1(7, 7), },
> +   {  40, E3250_CPU_DIV0(1, 7, 3, 1), E3250_CPU_DIV1(7, 7), },
> +   {  30, E3250_CPU_DIV0(1, 5, 3, 1), E3250_CPU_DIV1(7, 7), },
> +   {  20, E3250_CPU_DIV0(1, 3, 3, 1), E3250_CPU_DIV1(7, 7), },
> +   {  10, E3250_CPU_DIV0(1, 1, 1, 1), E3250_CPU_DIV1(7, 7), },
> +   {  0 },
> +};
> +
>  static void __init exynos3250_cmu_init(struct device_node *np)
>  {
> struct samsung_clk_provider *ctx;
> @@ -780,6 +803,11 @@ static void __init exynos3250_cmu_init(struct 
> device_node *np)
> if (!ctx)
> return;
>
> +   exynos_register_cpu_clock(ctx, CLK_ARM_CLK, "armclk",
> +   mout_core_p[0], mout_core_p[1], 0x14200,
> +   e3250_armclk_d, ARRAY_SIZE(e3250_armclk_d),
> +   CLK_CPU_HAS_DIV1);
> +
> exynos3_core_down_clock(ctx->reg_base);
>  }
>  CLK_OF_DECLARE(exynos3250_cmu, "samsung,exynos3250-cmu", 
> exynos3250_cmu_init);
> diff --git a/include/dt-bindings/clock/exynos3250.h 
> b/include/dt-bindings/clock/exynos3250.h
> index aab088d30199..63d01c15d2b3 100644
> --- a/include/dt-bindings/clock/exynos3250.h
> +++ b/include/dt-bindings/clock/exynos3250.h
> @@ -31,6 +31,7 @@
>  #define CLK_FOUT_VPLL  4
>  #define CLK_FOUT_UPLL  5
>  #define CLK_FOUT_MPLL  6
> +#define CLK_ARM_CLK7
>
>  /* Muxes */
>  #define CLK_MOUT_MPLL_USER_L   16
> --
> 1.8.5.5
>
> --
> 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
--
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