Re: [PATCH] thermal: Add missing cpumask_clear

2014-07-05 Thread Sachin Kamat
On Sat, Jul 5, 2014 at 6:04 AM, Tomasz Figa  wrote:
> Hi Jonghwan,
>
> On 05.07.2014 01:37, Jonghwan Choi wrote:
>> On Fri, Jul 4, 2014 at 8:23 PM, Sachin Kamat  wrote:
>>
 Cpumasks should be cleared before using.
>>>
>>> Please explain why and what is issue observed without this.
>>>
>>
>> -> When I checked the mask value, I knew that unwanted bit is set.
>>
>> Test code without cpumask_clear.
>>
>> +   cpumask_set_cpu(0, &mask_val);
>> +   cpulist_scnprintf(buf, 64, &mask_val);
>> +   printk("--ID [ %d] = %s \n", id, buf);
>> +   th_zone->cool_dev[id] = cpufreq_cooling_register(&mask_val);
>>
>>
>> Console message-> 4.861157] [c6] --ID [ 1] = 0,4-5,7 (4,5,7 cpu bit was set.)
>>
>> And when I tried to register two cooling devices with cpumask_set_cpu(0, 
>> &mask_val) and cpumask_set_cpu(4, &mask_val).
>>
>> I found that cpu 0 bit is also set in latter cpumask. (I hope latter cpumask 
>> has a cpu 4 bit.)
>>
>> So I think that cpumask_clear should be inserted.
>
> I believe Sachin's concern was related to your patch description. A good
> description should say what the patch changes and what is the rationale
> behind this change. Also for fixes it is a good practice to specify
> observed issues in patch description as well.

Yes, that is correct. Sorry if it wasn't clear in my previous mail.

-- 
Regards,
Sachin.
--
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 Resend 1/2] ARM: EXYNOS: Update secondary boot addr for secure mode

2014-07-05 Thread Sachin Kamat
On Wed, Jun 25, 2014 at 5:13 PM, Kukjin Kim  wrote:
> Sachin Kamat wrote:
>>
>> On Fri, May 30, 2014 at 11:49 PM, Andreas Färber  wrote:
>> > Am 28.05.2014 06:13, schrieb Sachin Kamat:
>> >> Almost all Exynos-series of SoCs that run in secure mode don't need
>> >> additional offset for every CPU, with Exynos4412 being the only
>> >> exception.
>> >>
>> >> Tested on Origen-Quad (Exynos4412) and Arndale-Octa (Exynos5420).
>> >>
>> >> While at it, fix the coding style (space around *).
>> >>
>> >> Signed-off-by: Sachin Kamat 
>> >> Signed-off-by: Tushar Behera 
>> >> ---
>> >>  arch/arm/mach-exynos/firmware.c |9 +++--
>> >>  1 file changed, 7 insertions(+), 2 deletions(-)
>> >
>> > Fixes ODROID-XU (Exynos5410) as well - thought it had been a prereq to
>> > applying the 5410 patches...
>> >
>> > Tested-by: Andreas Färber 
>> >
>>
>> Kukjin, this patch is required to bring up 4 A15 cores on some 5410
>> and 5420 based
>> boards. Can you please queue this up for the upcoming rc as fixes?
>
> Sure, I will take this into fixes.

Kukjin,

I don't see this patch in your fixes-2 branch yet.


>
> Thanks,
> Kukjin
>

Regards,
Sachin.
--
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] video: fbdev: exynos: s6e8ax0.c: Cleaning up variable that is never used

2014-07-05 Thread Rickard Strandqvist
From: Rickard Strandqvist 

Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist 
---
 drivers/video/fbdev/exynos/s6e8ax0.c |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/exynos/s6e8ax0.c 
b/drivers/video/fbdev/exynos/s6e8ax0.c
index 29e70ed..9bd67e7 100644
--- a/drivers/video/fbdev/exynos/s6e8ax0.c
+++ b/drivers/video/fbdev/exynos/s6e8ax0.c
@@ -602,11 +602,10 @@ static void s6e8ax0_acl_ctrl_set(struct s6e8ax0 *lcd)
 
 static void s6e8ax0_read_id(struct s6e8ax0 *lcd, u8 *mtp_id)
 {
-   unsigned int ret;
unsigned int addr = 0xd1;   /* MTP ID */
struct mipi_dsim_master_ops *ops = lcd_to_master_ops(lcd);
 
-   ret = ops->cmd_read(lcd_to_master(lcd),
+   ops->cmd_read(lcd_to_master(lcd),
MIPI_DSI_GENERIC_READ_REQUEST_1_PARAM,
addr, 3, mtp_id);
 }
-- 
1.7.10.4

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


[PATCH] video: fbdev: exynos: exynos_mipi_dsi_common.c: Cleaning up variable that is never used

2014-07-05 Thread Rickard Strandqvist
From: Rickard Strandqvist 

Variable ar assigned a value that is never used.
I have also removed all the code that thereby serves no purpose.

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist 
---
 drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c 
b/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c
index 85edabf..9e4f9bd 100644
--- a/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c
+++ b/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c
@@ -219,11 +219,9 @@ int exynos_mipi_dsi_wr_data(struct mipi_dsim_device *dsim, 
unsigned int data_id,
case MIPI_DSI_GENERIC_LONG_WRITE:
case MIPI_DSI_DCS_LONG_WRITE:
{
-   unsigned int size, payload = 0;
+   unsigned int payload = 0;
reinit_completion(&dsim_wr_comp);
 
-   size = data_size * 4;
-
/* if data count is less then 4, then send 3bytes data.  */
if (data_size < 4) {
payload = data0[0] |
-- 
1.7.10.4

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


Re: [PATCH 00/19] ARM: SAMSUNG: S5PV210 platform clean-up

2014-07-05 Thread Heiko Stübner
Am Samstag, 5. Juli 2014, 13:00:43 schrieb Tomasz Figa:
> On 05.07.2014 06:46, Viresh Kumar wrote:
> > On Fri, Jul 4, 2014 at 11:14 PM, Tomasz Figa  wrote:
> >> This huge series is a (hopefully final) attempt to convert Samsung
> >> S5PV210
> >> into a DT-only and multiplatform-aware platform. It consists of several
> >> steps to gradually replace legacy code with one meeting current standards
> >> and then finally remove unused remnants.
> >> 
> >> Patches 1-6 migrate the platform to fully use the Common Clock Framework
> >> and get rid of legacy private clock code, of which s5pv210 was the last
> >> user. Then patch 7 adds generic PHY driver for USB PHY on S5PV210 to
> >> allow
> >> USB to be supported when using DT. Further three patches (8-10) add DT
> >> support for mach-s5pv210 and necessary DT sources for currently supported
> >> boards. Patch 11 removes board files and code directly related to them,
> >> effectively making s5pv210 a DT-only platform. In next step, patches
> >> 12-15
> >> prepare remaining code for multiplatform enablement, which is finally
> >> done
> >> in patch 16. Patches 17-19 are a final clean-up, which remove a lot of
> >> unused code left after making the last S5P platform DT-only.
> >> 
> >> Build tested patch by patch on following configs:
> >>  - s3c2410_defconfig (with DT support enabled),
> >>  - s3c6400_defconfig (with DT support enabled),
> >>  - s5pv210_defconfig (with DT support enabled after patches adding it),
> >>  - exynos_defconfig,
> >>  - exynos_defconfig with S5PV210 enabled in multiplatform configuration.
> >> 
> >> Boot tested on s5pv210-goni board.
> >> 
> >> Note that support for smdkc110, smdkv210 and torbreck boards is provided
> >> by moving data from existing board files to new device tree sources. No
> >> testing was performed due to mentioned board not being available anymore.
> >> However I believe we agreed on this approach, because apparently there
> >> are no active users of them. See the RFC from August 2013 asking for
> >> removal of the whole platform [1].
> >> 
> >> [1]
> >> http://www.mail-archive.com/linux-samsung-soc%40vger.kernel.org/msg21882
> >> .html>> 
> >> Tomasz Figa (13):
> >>   cpufreq: s3c24xx: Remove some dead code
> >>   cpufreq: s5pv210: Make the driver multiplatform aware
> > 
> > Looks like you used --suppress-cc=all while sending these and none of
> > CPUFreq/PM guys received it :(
> 
> Oops, I had a feeling that I has screwed up something with this series
> and now we know what. Sorry for this. Will resend properly next Tuesday.

I got the cover-letter 3 times (19:44, 19:46 and 19:48). The one from 19:48 
also did contain all 19 patches ;-)


Heiko

--
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 00/19] ARM: SAMSUNG: S5PV210 platform clean-up

2014-07-05 Thread Tomasz Figa
On 05.07.2014 06:46, Viresh Kumar wrote:
> On Fri, Jul 4, 2014 at 11:14 PM, Tomasz Figa  wrote:
>> This huge series is a (hopefully final) attempt to convert Samsung S5PV210
>> into a DT-only and multiplatform-aware platform. It consists of several
>> steps to gradually replace legacy code with one meeting current standards
>> and then finally remove unused remnants.
>>
>> Patches 1-6 migrate the platform to fully use the Common Clock Framework
>> and get rid of legacy private clock code, of which s5pv210 was the last
>> user. Then patch 7 adds generic PHY driver for USB PHY on S5PV210 to allow
>> USB to be supported when using DT. Further three patches (8-10) add DT
>> support for mach-s5pv210 and necessary DT sources for currently supported
>> boards. Patch 11 removes board files and code directly related to them,
>> effectively making s5pv210 a DT-only platform. In next step, patches 12-15
>> prepare remaining code for multiplatform enablement, which is finally done
>> in patch 16. Patches 17-19 are a final clean-up, which remove a lot of
>> unused code left after making the last S5P platform DT-only.
>>
>> Build tested patch by patch on following configs:
>>  - s3c2410_defconfig (with DT support enabled),
>>  - s3c6400_defconfig (with DT support enabled),
>>  - s5pv210_defconfig (with DT support enabled after patches adding it),
>>  - exynos_defconfig,
>>  - exynos_defconfig with S5PV210 enabled in multiplatform configuration.
>>
>> Boot tested on s5pv210-goni board.
>>
>> Note that support for smdkc110, smdkv210 and torbreck boards is provided
>> by moving data from existing board files to new device tree sources. No
>> testing was performed due to mentioned board not being available anymore.
>> However I believe we agreed on this approach, because apparently there
>> are no active users of them. See the RFC from August 2013 asking for
>> removal of the whole platform [1].
>>
>> [1] 
>> http://www.mail-archive.com/linux-samsung-soc%40vger.kernel.org/msg21882.html
> 
>> Tomasz Figa (13):
>>   cpufreq: s3c24xx: Remove some dead code
>>   cpufreq: s5pv210: Make the driver multiplatform aware
> 
> Looks like you used --suppress-cc=all while sending these and none of
> CPUFreq/PM guys received it :(

Oops, I had a feeling that I has screwed up something with this series
and now we know what. Sorry for this. Will resend properly next Tuesday.

> 
> Anyways, for cpufreq part:
> 
> Acked-by: Viresh Kumar 
> 

Thanks. Will add to the patches when resending.

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


RE: [PATCH v5 5/5] ARM: EXYNOS: Move PMU specific definitions from common.h

2014-07-05 Thread Pankaj Dubey
Hi Tomasz,

On Monday, June 30, 2014 Tomasz Figa wrote:
> Hi Pankaj,
> 
> On 25.06.2014 16:03, Pankaj Dubey wrote:
> > This patch moves PMU specific definitions into a new file as
> > exynos-pmu.h.
> > This will help in reducing dependency of common.h in pmu.c.
> >
> > Signed-off-by: Pankaj Dubey 
> > ---
> >  arch/arm/mach-exynos/common.h |   17 -
> >  arch/arm/mach-exynos/exynos-pmu.h |   31
> +++
> >  arch/arm/mach-exynos/pm.c |1 +
> >  arch/arm/mach-exynos/pmu.c|2 +-
> >  4 files changed, 33 insertions(+), 18 deletions(-)  create mode
> > 100644 arch/arm/mach-exynos/exynos-pmu.h
> >
> > diff --git a/arch/arm/mach-exynos/common.h
> > b/arch/arm/mach-exynos/common.h index 296c6e1..0326ca2 100644
> > --- a/arch/arm/mach-exynos/common.h
> > +++ b/arch/arm/mach-exynos/common.h
> > @@ -135,23 +135,6 @@ extern struct smp_operations exynos_smp_ops;
> >
> >  extern void exynos_cpu_die(unsigned int cpu);
> >
> > -/* PMU(Power Management Unit) support */
> > -
> > -#define PMU_TABLE_END  (-1U)
> > -
> > -enum sys_powerdown {
> > -   SYS_AFTR,
> > -   SYS_LPA,
> > -   SYS_SLEEP,
> > -   NUM_SYS_POWERDOWN,
> > -};
> > -
> > -struct exynos_pmu_conf {
> > -   unsigned int offset;
> > -   unsigned int val[NUM_SYS_POWERDOWN];
> > -};
> 
> While at it, I'd say this struct could be moved to pmu.c, along with the
> PMU_TABLE_END macro as they are both private to this file.
> 

OK, I will update this.

> Best regards,
> Tomasz

Thanks,
Pankaj Dubey

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


RE: [PATCH v5 4/5] ARM: EXYNOS: Add platform driver support for Exynos PMU

2014-07-05 Thread Pankaj Dubey
Hi Tomasz,


On Monday, June 30, 2014 Tomasz Figa wrote:
> Hi Pankaj,
> 
> Please see my comments inline.
> 
> On 25.06.2014 16:03, Pankaj Dubey wrote:
> > This patch modifies Exynos Power Management Unit (PMU) initialization
> > implementation in following way:
> >
> > - Added platform driver support and probe function where Exynos PMU
> >   driver will register itself as syscon provider with syscon framework.
> > - Added platform struct exynos_pmu_data to hold platform specific data.
> > - For each SoC's PMU support now we can add platform data and statically
> >   bind PMU configuration and SoC specific initialization function.
> > - Separate each SoC's PMU initialization function and make it as part of
> >   platform data.
> > - It also removes uses of soc_is_exynosXYZ().
> 
> [snip]
> 
> > @@ -93,7 +112,7 @@ static const struct exynos_pmu_conf
> exynos4210_pmu_config[] = {
> > { PMU_TABLE_END,},
> >  };
> >
> > -static const struct exynos_pmu_conf exynos4x12_pmu_config[] = {
> > +static const struct exynos_pmu_conf exynos4212_pmu_config[] = {
> 
> Why the name change?

OK, looks like by mistake I replaced all exynos4x12 with exynos4212, I will
correct this.

> 
> > { S5P_ARM_CORE0_LOWPWR, { 0x0, 0x0, 0x2 } },
> > { S5P_DIS_IRQ_CORE0,{ 0x0, 0x0, 0x0 } },
> > { S5P_DIS_IRQ_CENTRAL0, { 0x0, 0x0, 0x0 } },
> > @@ -335,7 +354,7 @@ static unsigned int const
exynos5_list_diable_wfi_wfe[] =
> {
> > EXYNOS5_ISP_ARM_OPTION,
> >  };
> >
> > -static void exynos5_init_pmu(void)
> > +static void exynos5_powerdown_conf(enum sys_powerdown mode)
> >  {
> > unsigned int i;
> > unsigned int tmp;
> > @@ -372,51 +391,151 @@ void exynos_sys_powerdown_conf(enum
> > sys_powerdown mode)  {
> > unsigned int i;
> >
> > -   if (soc_is_exynos5250())
> > -   exynos5_init_pmu();
> > +   struct exynos_pmu_data *pmu_data = pmu_context->pmu_data;
> > +
> > +   if (!pmu_data)
> > +   return;
> >
> > -   for (i = 0; (exynos_pmu_config[i].offset != PMU_TABLE_END) ; i++)
> > -   __raw_writel(exynos_pmu_config[i].val[mode],
> > -   pmu_base_addr +
exynos_pmu_config[i].offset);
> > +   if (pmu_data->powerdown_conf)
> > +   pmu_data->powerdown_conf(mode);
> >
> > -   if (soc_is_exynos4412()) {
> > -   for (i = 0; exynos4412_pmu_config[i].offset != PMU_TABLE_END
;
> i++)
> > -   __raw_writel(exynos4412_pmu_config[i].val[mode],
> > -   pmu_base_addr +
exynos4412_pmu_config[i].offset);
> > +   if (pmu_data->pmu_config) {
> > +   for (i = 0; (pmu_data->pmu_config[i].offset !=
PMU_TABLE_END)
> ; i++)
> > +   __raw_writel(pmu_data->pmu_config[i].val[mode],
> > +   pmu_base_addr + pmu_data-
> >pmu_config[i].offset);
> 
> Analogically to patch 2/5, you could add static inline accessors and use
them instead
> of adding pmu_base_addr every time.
> 

OK. 

> > +   }
> > +
> > +   if (pmu_data->pmu_config_extra) {
> > +   for (i = 0; pmu_data->pmu_config_extra[i].offset !=
> PMU_TABLE_END; i++)
> > +
__raw_writel(pmu_data->pmu_config_extra[i].val[mode],
> > +   pmu_base_addr + pmu_data-
> >pmu_config_extra[i].offset);
> > }
> >  }
> >
> > -static int __init exynos_pmu_init(void)
> > +static void exynos5250_pmu_init(void)
> >  {
> > unsigned int value;
> > +   /*
> > +* When SYS_WDTRESET is set, watchdog timer reset request
> > +* is ignored by power management unit.
> > +*/
> > +   value = __raw_readl(pmu_base_addr +
> EXYNOS5_AUTO_WDTRESET_DISABLE);
> > +   value &= ~EXYNOS5_SYS_WDTRESET;
> > +   __raw_writel(value, pmu_base_addr +
> EXYNOS5_AUTO_WDTRESET_DISABLE);
> > +
> > +   value = __raw_readl(pmu_base_addr +
> EXYNOS5_MASK_WDTRESET_REQUEST);
> > +   value &= ~EXYNOS5_SYS_WDTRESET;
> > +   __raw_writel(value, pmu_base_addr +
> EXYNOS5_MASK_WDTRESET_REQUEST);
> > +}
> > +
> > +static struct exynos_pmu_data exynos4210_pmu_data = {
> 
> static const struct
> 
> > +   .pmu_config = exynos4210_pmu_config,
> > +};
> > +
> > +static struct exynos_pmu_data exynos4212_pmu_data = {
> 
> static const struct
> 
> > +   .pmu_config = exynos4212_pmu_config,
> > +};
> > +
> > +static struct exynos_pmu_data exynos4412_pmu_data = {
> 
> static const struct
> 
> > +   .pmu_config = exynos4212_pmu_config,
> > +   .pmu_config_extra   = exynos4412_pmu_config,
> > +};
> > +
> > +static struct exynos_pmu_data exynos5250_pmu_data = {
> 
> static const struct
>

Ok, will make all of them const.
 
> > +   .pmu_config = exynos5250_pmu_config,
> > +   .pmu_init   = exynos5250_pmu_init,
> > +   .powerdown_conf = exynos5_powerdown_conf,
> > +};
> >
> > -   exynos_pmu_config = exynos4210_pmu_config;
> > -
> > -   if (soc_is_exynos4210()) {
> > -   exynos_pmu_config = exynos4210_pmu_config;
> > -   pr_info("EXYNOS4210 PMU Initialize\n