Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274061
b: refs/heads/master
c: c0468b0
h: refs/heads/master
i:
  274059: 39493ea
v: v3
  • Loading branch information
Kukjin Kim committed Oct 4, 2011
1 parent 273716d commit 7ed6ff8
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 322 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4b2656fe4957a20edeecc0991616b9b96512839b
refs/heads/master: c0468b0244464a9d85e527fd0bfee91caed697a7
56 changes: 0 additions & 56 deletions trunk/arch/arm/mach-s3c64xx/include/mach/pwm-clock.h

This file was deleted.

68 changes: 0 additions & 68 deletions trunk/arch/arm/mach-s5p64x0/include/mach/pwm-clock.h

This file was deleted.

56 changes: 0 additions & 56 deletions trunk/arch/arm/mach-s5pc100/include/mach/pwm-clock.h

This file was deleted.

70 changes: 0 additions & 70 deletions trunk/arch/arm/mach-s5pv210/include/mach/pwm-clock.h

This file was deleted.

55 changes: 0 additions & 55 deletions trunk/arch/arm/plat-s3c24xx/include/mach/pwm-clock.h

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* linux/arch/arm/mach-exynos4/include/mach/pwm-clock.h
/* linux/arch/arm/plat-samsung/include/plat/pwm-clock.h
*
* Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
* http://www.samsung.com
Expand All @@ -8,17 +8,15 @@
* Ben Dooks <ben@simtec.co.uk>
* http://armlinux.simtec.co.uk/
*
* Based on arch/arm/mach-s3c64xx/include/mach/pwm-clock.h
*
* EXYNOS4 - pwm clock and timer support
* SAMSUNG - pwm clock and timer 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.
*/

#ifndef __ASM_ARCH_PWMCLK_H
#define __ASM_ARCH_PWMCLK_H __FILE__
#ifndef __ASM_PLAT_PWM_CLOCK_H
#define __ASM_PLAT_PWM_CLOCK_H __FILE__

/**
* pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk
Expand All @@ -29,7 +27,14 @@
*/
static inline int pwm_cfg_src_is_tclk(unsigned long tcfg)
{
return tcfg == S3C64XX_TCFG1_MUX_TCLK;
if (soc_is_s3c24xx())
return tcfg == S3C2410_TCFG1_MUX_TCLK;
else if (soc_is_s3c64xx() || soc_is_s5pc100())
return tcfg >= S3C64XX_TCFG1_MUX_TCLK;
else if (soc_is_s5p6440() || soc_is_s5p6450())
return 0;
else
return tcfg == S3C64XX_TCFG1_MUX_TCLK;
}

/**
Expand All @@ -41,7 +46,10 @@ static inline int pwm_cfg_src_is_tclk(unsigned long tcfg)
*/
static inline unsigned long tcfg_to_divisor(unsigned long tcfg1)
{
return 1 << tcfg1;
if (soc_is_s3c24xx())
return 1 << (tcfg1 + 1);
else
return 1 << tcfg1;
}

/**
Expand All @@ -51,7 +59,10 @@ static inline unsigned long tcfg_to_divisor(unsigned long tcfg1)
*/
static inline unsigned int pwm_tdiv_has_div1(void)
{
return 1;
if (soc_is_s3c24xx())
return 0;
else
return 1;
}

/**
Expand All @@ -62,9 +73,9 @@ static inline unsigned int pwm_tdiv_has_div1(void)
*/
static inline unsigned long pwm_tdiv_div_bits(unsigned int div)
{
return ilog2(div);
if (soc_is_s3c24xx())
return ilog2(div) - 1;
else
return ilog2(div);
}

#define S3C_TCFG1_MUX_TCLK S3C64XX_TCFG1_MUX_TCLK

#endif /* __ASM_ARCH_PWMCLK_H */
#endif /* __ASM_PLAT_PWM_CLOCK_H */
Loading

0 comments on commit 7ed6ff8

Please sign in to comment.