Skip to content

Commit

Permalink
Merge branch 'for-linus/samsung-fixes' of git://git.fluff.org/bjdooks…
Browse files Browse the repository at this point in the history
…/linux

* 'for-linus/samsung-fixes' of git://git.fluff.org/bjdooks/linux:
  ARM: SAMSUNG: Fixup commit 4e6d488
  ARM: SAMSUNG: Fix build error from stale define in <plat/uncompress.h>
  ARM: SAMSUNG: Add suspend/resume support for S3C PWM driver
  ARM: S3C2440: Fix s3c2440 cpufreq compilation post move.
  • Loading branch information
Linus Torvalds committed Mar 18, 2010
2 parents 7228744 + 0e17226 commit a41842f
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 5 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c64xx/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* aligned and add in the offset when we load the value here.
*/

.macro addruart, rx
.macro addruart, rx, rtmp
mrc p15, 0, \rx, c1, c0
tst \rx, #1
ldreq \rx, = S3C_PA_UART
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s5p6440/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* aligned and add in the offset when we load the value here.
*/

.macro addruart, rx
.macro addruart, rx, rtmp
mrc p15, 0, \rx, c1, c0
tst \rx, #1
ldreq \rx, = S3C_PA_UART
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s5p6442/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <mach/map.h>
#include <plat/regs-serial.h>

.macro addruart, rx
.macro addruart, rx, rtmp
mrc p15, 0, \rx, c1, c0
tst \rx, #1
ldreq \rx, = S3C_PA_UART
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/plat-samsung/include/plat/uncompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ static void arch_decomp_error(const char *x)
#define arch_error arch_decomp_error
#endif

static void error(char *err);

#ifdef CONFIG_S3C_BOOT_UART_FORCE_FIFO
static inline void arch_enable_uart_fifo(void)
{
Expand Down
35 changes: 35 additions & 0 deletions arch/arm/plat-samsung/pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,48 @@ static int __devexit s3c_pwm_remove(struct platform_device *pdev)
return 0;
}

#ifdef CONFIG_PM
static int s3c_pwm_suspend(struct platform_device *pdev, pm_message_t state)
{
struct pwm_device *pwm = platform_get_drvdata(pdev);

/* No one preserve these values during suspend so reset them
* Otherwise driver leaves PWM unconfigured if same values
* passed to pwm_config
*/
pwm->period_ns = 0;
pwm->duty_ns = 0;

return 0;
}

static int s3c_pwm_resume(struct platform_device *pdev)
{
struct pwm_device *pwm = platform_get_drvdata(pdev);
unsigned long tcon;

/* Restore invertion */
tcon = __raw_readl(S3C2410_TCON);
tcon |= pwm_tcon_invert(pwm);
__raw_writel(tcon, S3C2410_TCON);

return 0;
}

#else
#define s3c_pwm_suspend NULL
#define s3c_pwm_resume NULL
#endif

static struct platform_driver s3c_pwm_driver = {
.driver = {
.name = "s3c24xx-pwm",
.owner = THIS_MODULE,
},
.probe = s3c_pwm_probe,
.remove = __devexit_p(s3c_pwm_remove),
.suspend = s3c_pwm_suspend,
.resume = s3c_pwm_resume,
};

static int __init pwm_init(void)
Expand Down

0 comments on commit a41842f

Please sign in to comment.