[PATCH] ARM: EXYNOS: Fix compiler warning in dma.c file

2012-04-03 Thread Sachin Kamat
Fixes the following warning:
warning: ‘dma_dmamask’ defined but not used [-Wunused-variable]

Signed-off-by: Sachin Kamat 
---
 arch/arm/mach-exynos/dma.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-exynos/dma.c b/arch/arm/mach-exynos/dma.c
index 3983abe..69aaa45 100644
--- a/arch/arm/mach-exynos/dma.c
+++ b/arch/arm/mach-exynos/dma.c
@@ -35,8 +35,6 @@
 #include 
 #include 
 
-static u64 dma_dmamask = DMA_BIT_MASK(32);
-
 static u8 exynos4210_pdma0_peri[] = {
DMACH_PCM0_RX,
DMACH_PCM0_TX,
-- 
1.7.4.1

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


Re: [PATCH V2] mmc: core: Add host capability check for power class

2012-04-03 Thread Saugata Das
On 2 April 2012 16:24, Subhash Jadavani  wrote:
>
>
>> -Original Message-
>> From: Saugata Das [mailto:saugata@linaro.org]
>> Sent: Monday, April 02, 2012 1:20 PM
>> To: Subhash Jadavani
>> Cc: Girish K S; linux-...@vger.kernel.org; patc...@linaro.org; linux-
>> samsung-...@vger.kernel.org; Chris Ball
>> Subject: Re: [PATCH V2] mmc: core: Add host capability check for power
> class
>>
>> On 28 March 2012 16:39, Subhash Jadavani 
>> wrote:
>> >
>> >
>> >> -Original Message-
>> >> From: linux-mmc-ow...@vger.kernel.org [mailto:linux-mmc-
>> >> ow...@vger.kernel.org] On Behalf Of Saugata Das
>> >> Sent: Thursday, December 15, 2011 6:35 PM
>> >> To: Girish K S
>> >> Cc: linux-...@vger.kernel.org; patc...@linaro.org; linux-samsung-
>> >> s...@vger.kernel.org; subha...@codeaurora.org; Chris Ball
>> >> Subject: Re: [PATCH V2] mmc: core: Add host capability check for
>> >> power
>> > class
>> >>
>> >> On 15 December 2011 16:22, Girish K S
>> >> 
>> >> wrote:
>> >> > On 15 December 2011 15:34, Saugata Das 
>> wrote:
>> >> >> On 15 December 2011 09:28, Girish K S
>> >> >> 
>> >> wrote:
>> >> >>> This patch adds a check whether the host supports maximum current
>> >> >>> value obtained from the device's extended csd register for a
>> >> >>> selected interface voltage and frequency.
>> >> >>>
>> >> >>> cc: Chris Ball 
>> >> >>> Signed-off-by: Girish K S 
>> >> >>> ---
>> >> >>> Changes in v2:
>> >> >>>        deleted a unnecessary if else condition identified by
>> >> >>> subhash J Changes in v1:
>> >> >>>       reduced the number of comparisons as per Hein's suggestion
>> >> >>>
>> >> >>>  drivers/mmc/core/mmc.c   |   19 +++
>> >> >>>  include/linux/mmc/card.h |    4 
>> >> >>>  2 files changed, 23 insertions(+), 0 deletions(-)
>> >> >>>
>> >> >>> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
>> >> >>> index
>> >> >>> 006e932..b9ef777 100644
>> >> >>> --- a/drivers/mmc/core/mmc.c
>> >> >>> +++ b/drivers/mmc/core/mmc.c
>> >> >>> @@ -688,6 +688,25 @@ static int mmc_select_powerclass(struct
>> >> >>> mmc_card *card,
>> >> >>>                pwrclass_val = (pwrclass_val &
>> >> >>> EXT_CSD_PWR_CL_4BIT_MASK) >>
>> >> >>>                                EXT_CSD_PWR_CL_4BIT_SHIFT;
>> >> >>>
>> >> >>> +       if (pwrclass_val >= MMC_MAX_CURRENT_800)
>> >> >>> +               pwrclass_val = MMC_MAX_CURRENT_800;
>> >> >>> +       else if (pwrclass_val >= MMC_MAX_CURRENT_600)
>> >> >>> +               pwrclass_val = MMC_MAX_CURRENT_600;
>> >> >>> +       else if (pwrclass_val >= MMC_MAX_CURRENT_400)
>> >> >>> +               pwrclass_val = MMC_MAX_CURRENT_400;
>> >> >>> +       else
>> >> >>> +               pwrclass_val = MMC_MAX_CURRENT_200;
>> >> >>> +
>> >> >>> +       if ((pwrclass_val == MMC_MAX_CURRENT_800) &&
>> >> >>> +           !(card->host->caps & MMC_CAP_MAX_CURRENT_800))
>> >> >>> +               pwrclass_val = MMC_MAX_CURRENT_600;
>> >> >>> +       if ((pwrclass_val == MMC_MAX_CURRENT_600) &&
>> >> >>> +           !(card->host->caps & MMC_CAP_MAX_CURRENT_600))
>> >> >>> +               pwrclass_val = MMC_MAX_CURRENT_400;
>> >> >>> +       if ((pwrclass_val == MMC_MAX_CURRENT_400) &&
>> >> >>> +           !(card->host->caps & MMC_CAP_MAX_CURRENT_400))
>> >> >>> +               pwrclass_val = MMC_MAX_CURRENT_200;
>> >> >>> +
>> >> >>>        /* If the power class is different from the default value
>> >> >>> */
>> >> >>>        if (pwrclass_val > 0) {
>> >> >>>                err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
>> >> >>
>> >> >> It is not allowed to set the POWER_CLASS with any value other than
>> >> >> what is mentioned in the PWR_CL_ff_vvv or PWR_CL_DDR_ff_vvv  for
>> >> the
>> >> >> corresponding frequency, voltage. That is, if PWR_CL_200_195 is 14
>> >> >> and we want to operate at HS200 then the only value allowed for
>> >> >> POWER_CLASS is 14. So, we need to check the PWR_CL numbers and
>> >> choose
>> >> >> the operating mode (HS200/DDR50/..) based on the platform
>> >> >> capability to support the current consumption and set the
>> >> >> corresponding POWER_CLASS value.
>> >> >>
>> >> >> Please refer to section 6.6.5 of the 4.5 spec.
>> >> >
>> >> > The upstreamed code reads the extended csd value based on the
>> >> > already set voltage level and frequency of host. So it will get the
>> >> > required power class value which can be set directly. Is my
>> >> > understanding correct?
>> >> >
>> >>
>> >> It is not enough to just check the voltage level and frequency.
>> >> Consider this example, host has capability to support
>> >> MMC_CAP_MAX_CURRENT_400, the PWR_CL_DDR_52_360 has the value
>> 9
>> >> (400mA) and PWR_CL_200_360 has the value 14 (800mA). Then even
>> though
>> >> the host might be capable to run 200MHz clock and 3.6V, it can only
>> >> enable DDR at 52MHz and set 9 in POWER_CLASS.
>> >>
>> >> I think, in mmc_select_powerclass, we need to loop through the power
>> >> classes of all supported modes of transfer (HS200, DDR52, ... ) 

Re: [PATCH] ARM: S3C24XX: fix missing common.h in mach-s3c24xx/

2012-04-03 Thread Paul Gortmaker
Hi,

On Wed, Mar 28, 2012 at 8:14 PM, Kukjin Kim  wrote:
> This patch fixes missing mach-s3c24xx/common.h which has been
> lost when regarding s3c24xx directories merged.

Just checking that the updated version of this patch is headed
in for 3.4 -- we are still seeing the failure in linux-next builds
and it would be nice to close out the build regressions in there
as quickly as possible, since they tend to mask other regressions
from being seen.

Thanks,
Paul.
--

>
> Signed-off-by: Kukjin Kim 
> ---
>  arch/arm/mach-s3c24xx/common.h |   23 +++
>  1 files changed, 23 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-s3c24xx/common.h
>
> diff --git a/arch/arm/mach-s3c24xx/common.h b/arch/arm/mach-s3c24xx/common.h
> new file mode 100644
> index 000..a7cd62f
> --- /dev/null
> +++ b/arch/arm/mach-s3c24xx/common.h
> @@ -0,0 +1,23 @@
> +/*
> + * Copyright (c) 2012 Samsung Electronics Co., Ltd.
> + *             http://www.samsung.com
> + *
> + * Common Header for S3C24XX SoCs
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#ifndef __ARCH_ARM_MACH_S3C24XX_COMMON_H
> +#define __ARCH_ARM_MACH_S3C24XX_COMMON_H
> +
> +#ifdef CONFIG_CPU_S3C2410
> +void s3c2410_restart(char mode, const char *cmd);
> +#endif
> +
> +#ifdef CONFIG_CPU_S3C244X
> +void s3c244x_restart(char mode, const char *cmd);
> +#endif
> +
> +#endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */
> --
> 1.7.2.3
>
>
> ___
> linux-arm-kernel mailing list
> linux-arm-ker...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
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] serial: samsung: fix omission initialize ulcon in reset port fn()

2012-04-03 Thread Kukjin Kim
Fix omission initialize ulcon in s3c24xx_serial_resetport(),
reset port function in drivers/tty/serial/samsung.c. It has
been happened from commit 0dfb3b41("serial: samsung: merge
all SoC specific port reset functions")

Signed-off-by: Kukjin Kim 
---
 drivers/tty/serial/samsung.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index de249d2..d8b0aee 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -982,6 +982,7 @@ static void s3c24xx_serial_resetport(struct uart_port *port,
 
ucon &= ucon_mask;
wr_regl(port, S3C2410_UCON,  ucon | cfg->ucon);
+   wr_regl(port, S3C2410_ULCON, cfg->ulcon);
 
/* reset both fifos */
wr_regl(port, S3C2410_UFCON, cfg->ufcon | S3C2410_UFCON_RESETBOTH);
-- 
1.7.2.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 V2 0/6] thermal: exynos: Add kernel thermal support for exynos platform

2012-04-03 Thread Amit Kachhap
Hi Len/Rui,

Any comment or feedback from your side about the status of this patch?
Is it merge-able or major re-work is needed? I have fixed most of the
comments in this patchset and currently working on some of the minor
comments received and will submit them shortly.

Regards,
Amit Daniel

On 19 March 2012 11:47, Amit Daniel Kachhap  wrote:
> Changes since V1:
> *Moved the sensor driver to driver/thermal folder from driver/hwmon folder
>  as suggested by Mark Brown and Guenter Roeck
> *Added notifier support to notify the registered drivers of any cpu cooling
>  action. The driver can modify the default cooling behaviour(eg set different
>  max clip frequency).
> *The percentage based frequency replaced with absolute clipped frequency.
> *Some more conditional checks when setting max frequency.
> *Renamed the new trip type THERMAL_TRIP_STATE_ACTIVE to
>  THERMAL_TRIP_STATE_INSTANCE
> *Many review comments from R, Durgadoss  and
>  eduardo.valen...@ti.com implemented.
> *Removed cooling stats through debugfs patch
> *The V1 based can be found here,
>  https://lkml.org/lkml/2012/2/22/123
>  http://lkml.org/lkml/2012/3/3/32
>
> Changes since RFC:
> *Changed the cpu cooling registration/unregistration API's to instance based
> *Changed the STATE_ACTIVE trip type to pass correct instance id
> *Adding support to restore back the policy->max_freq after doing frequency
>  clipping.
> *Moved the trip cooling stats from sysfs node to debugfs node as suggested
>  by Greg KH g...@kroah.com
> *Incorporated several review comments from eduardo.valen...@ti.com
> *Moved the Temperature sensor driver from driver/hwmon/ to driver/mfd
>  as discussed with Guenter Roeck  and
>  Donggeun Kim  (https://lkml.org/lkml/2012/1/5/7)
> *Some changes according to the changes in common cpu cooling APIs
> *The RFC based patches can be found here,
>  https://lkml.org/lkml/2011/12/13/186
>  https://lkml.org/lkml/2011/12/21/169
>
>
> Brief Description:
>
> 1) The generic cooling devices code is placed inside driver/thermal/* as
> placing inside acpi folder will need un-necessary enabling of acpi code. This
> codes is architecture independent.
>
> 2) This patchset adds a new trip type THERMAL_TRIP_STATE_INSTANCE which passes
> cooling device instance number and may be helpful for cpufreq cooling devices
> to take the correct cooling action. This trip type avoids the temperature
> comparision check again inside the cooling handler.
>
> 3) This patchset adds generic cpu cooling low level implementation through
> frequency clipping and cpu hotplug. In future, other cpu related cooling
> devices may be added here. An ACPI version of this already exists
> (drivers/acpi/processor_thermal.c). But this will be useful for platforms
> like ARM using the generic thermal interface along with the generic cpu
> cooling devices. The cooling device registration API's return cooling device
> pointers which can be easily binded with the thermal zone trip points.
> The important APIs exposed are,
>   a)struct thermal_cooling_device *cpufreq_cooling_register(
>        struct freq_clip_table *tab_ptr, unsigned int tab_size,
>        const struct cpumask *mask_val)
>   b)void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
>
> 4) Samsung exynos platform thermal implementation is done using the generic
> cpu cooling APIs and the new trip type. The temperature sensor driver present
> in the hwmon folder(registered as hwmon driver) is moved to thermal folder
> and registered as a thermal driver.
>
> All this patchset is based on Kernel version 3.3-rc7
>
> A simple data/control flow diagrams is shown below,
>
> Core Linux thermal <->  Exynos thermal interface <- Temperature Sensor
>          |                             |
>         \|/                            |
>  Cpufreq cooling device <---
>
>
> Amit Daniel Kachhap (6):
>  thermal: Add a new trip type to use cooling device instance number
>  thermal: Add generic cpufreq cooling implementation
>  thermal: Add generic cpuhotplug cooling implementation
>  hwmon: exynos4: Move thermal sensor driver to driver/thermal
>    directory
>  thermal: exynos4: Register the tmu sensor with the kernel thermal
>    layer
>  ARM: exynos4: Add thermal sensor driver platform device support
>
>  Documentation/hwmon/exynos4_tmu           |   81 ---
>  Documentation/thermal/cpu-cooling-api.txt |   76 +++
>  Documentation/thermal/exynos4_tmu         |   52 ++
>  Documentation/thermal/sysfs-api.txt       |    4 +-
>  arch/arm/mach-exynos/Kconfig              |   11 +
>  arch/arm/mach-exynos/Makefile             |    1 +
>  arch/arm/mach-exynos/clock.c              |    4 +
>  arch/arm/mach-exynos/dev-tmu.c            |   39 ++
>  arch/arm/mach-exynos/include/mach/irqs.h  |    2 +
>  arch/arm/mach-exynos/include/mach/map.h   |    1 +
>  arch/arm/mach-exynos/mach-origen.c        |    1 +
>  arch/arm/plat-samsung/include/plat/devs.h |    1 +
>  drivers/hwmon/Kconfig                     |   10 -
>  

[PATCH] ARM: EXYNOS: Remove unused code related to samsung power domain

2012-04-03 Thread jhbird . choi
From: Jonghwan Choi 

Generic I/O Domain will be used to control power domain instead of
samsung power domain. So remove unused code related to samsung
power domain.

Signed-off-by: Jonghwan Choi 
---
 arch/arm/mach-exynos/mach-nuri.c   |1 -
 arch/arm/mach-exynos/mach-origen.c |1 -
 arch/arm/mach-exynos/mach-smdkv310.c   |1 -
 arch/arm/mach-exynos/mach-universal_c210.c |1 -
 arch/arm/plat-samsung/Kconfig  |8 ---
 arch/arm/plat-samsung/Makefile |4 -
 arch/arm/plat-samsung/include/plat/pd.h|   30 -
 arch/arm/plat-samsung/pd.c |   95 
 8 files changed, 0 insertions(+), 141 deletions(-)
 delete mode 100644 arch/arm/plat-samsung/include/plat/pd.h
 delete mode 100644 arch/arm/plat-samsung/pd.c

diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index b3982c8..b33ef08 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -48,7 +48,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/arch/arm/mach-exynos/mach-origen.c 
b/arch/arm/mach-exynos/mach-origen.c
index 878d4c9..a734e93 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -38,7 +38,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c 
b/arch/arm/mach-exynos/mach-smdkv310.c
index 83b91fa..e3597f0 100644
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ b/arch/arm/mach-exynos/mach-smdkv310.c
@@ -34,7 +34,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c 
b/arch/arm/mach-exynos/mach-universal_c210.c
index 6bb9dbd..427dc33 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -36,7 +36,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 71553f4..986f2ef 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -350,14 +350,6 @@ config SAMSUNG_WAKEMASK
  and above. This code allows a set of interrupt to wakeup-mask
  mappings. See 
 
-comment "Power Domain"
-
-config SAMSUNG_PD
-   bool "Samsung Power Domain"
-   depends on PM_RUNTIME
-   help
- Say Y here if you want to control Power Domain by Runtime PM.
-
 config DEBUG_S3C_UART
depends on PLAT_SAMSUNG
int
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index 6012366..403ae65 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -47,10 +47,6 @@ obj-$(CONFIG_SAMSUNG_PM_CHECK)   += pm-check.o
 
 obj-$(CONFIG_SAMSUNG_WAKEMASK) += wakeup-mask.o
 
-# PD support
-
-obj-$(CONFIG_SAMSUNG_PD)   += pd.o
-
 # PWM support
 
 obj-$(CONFIG_HAVE_PWM) += pwm.o
diff --git a/arch/arm/plat-samsung/include/plat/pd.h 
b/arch/arm/plat-samsung/include/plat/pd.h
deleted file mode 100644
index abb4bc3..000
--- a/arch/arm/plat-samsung/include/plat/pd.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* linux/arch/arm/plat-samsung/include/plat/pd.h
- *
- * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
- * http://www.samsung.com
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_PLAT_SAMSUNG_PD_H
-#define __ASM_PLAT_SAMSUNG_PD_H __FILE__
-
-struct samsung_pd_info {
-   int (*enable)(struct device *dev);
-   int (*disable)(struct device *dev);
-   void __iomem *base;
-};
-
-enum exynos4_pd_block {
-   PD_MFC,
-   PD_G3D,
-   PD_LCD0,
-   PD_LCD1,
-   PD_TV,
-   PD_CAM,
-   PD_GPS
-};
-
-#endif /* __ASM_PLAT_SAMSUNG_PD_H */
diff --git a/arch/arm/plat-samsung/pd.c b/arch/arm/plat-samsung/pd.c
deleted file mode 100644
index 312b510..000
--- a/arch/arm/plat-samsung/pd.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/* linux/arch/arm/plat-samsung/pd.c
- *
- * Copyright (c) 2010 Samsung Electronics Co., Ltd.
- * http://www.samsung.com
- *
- * Samsung Power domain support
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-static int samsung_pd_probe(struct platform_device *pdev)
-{
-   struct samsung_pd_info *pdata = pdev->dev.platform_data;
-   struct device *dev = &pdev->dev;
-
-   if (!pdata) {
-   dev_err(dev, "no device data specified\n");
-   return -ENOENT;
-   }
-
-   pm_runtime_set_active(dev);
-   pm_runtime_enable(dev);
-
-   dev_i