Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191967
b: refs/heads/master
c: 17dcd13
h: refs/heads/master
i:
  191965: 618d3db
  191963: 548bf91
  191959: 4cb58c2
  191951: 0385186
  191935: 011b7b0
v: v3
  • Loading branch information
Arnaud Patard authored and Ben Dooks committed May 5, 2010
1 parent eca3ba0 commit b04c712
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 40 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: b78232da3f85950a207bbcb64db46fd95b581465
refs/heads/master: 17dcd13a3793d434c030dcf9c52ad0d43493b2a0
3 changes: 2 additions & 1 deletion trunk/arch/arm/mach-s3c2410/mach-h1940.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ static struct platform_device h1940_lcd_powerdev = {
};

static struct platform_device *h1940_devices[] __initdata = {
&s3c_device_ts,
&s3c_device_ohci,
&s3c_device_lcd,
&s3c_device_wdt,
Expand All @@ -285,6 +284,8 @@ static struct platform_device *h1940_devices[] __initdata = {
&s3c_device_timer[0],
&h1940_backlight,
&h1940_lcd_powerdev,
&s3c_device_adc,
&s3c_device_ts,
};

static void __init h1940_map_io(void)
Expand Down
24 changes: 8 additions & 16 deletions trunk/arch/arm/mach-s5p6440/include/mach/pwm-clock.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
/* linux/arch/arm/mach-s5p6440/include/mach/pwm-clock.h
*
* Copyright (c) 2009 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
* Copyright 2008 Openmoko, Inc.
* Copyright 2008 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
* http://armlinux.simtec.co.uk/
*
* Based on arch/arm/mach-s3c64xx/include/mach/pwm-clock.h
* Copyright 2009 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
* S5P6440 - pwm clock and timer support
*
Expand All @@ -17,19 +14,16 @@
* published by the Free Software Foundation.
*/

#ifndef __ASM_ARCH_PWMCLK_H
#define __ASM_ARCH_PWMCLK_H __FILE__

/**
* pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk
* @tcfg: The timer TCFG1 register bits shifted down to 0.
* @cfg: The timer TCFG1 register bits shifted down to 0.
*
* Return true if the given configuration from TCFG1 is a TCLK instead
* any of the TDIV clocks.
*/
static inline int pwm_cfg_src_is_tclk(unsigned long tcfg)
{
return 0;
return tcfg == S3C2410_TCFG1_MUX_TCLK;
}

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

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

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

#define S3C_TCFG1_MUX_TCLK 0

#endif /* __ASM_ARCH_PWMCLK_H */
#define S3C_TCFG1_MUX_TCLK S3C2410_TCFG1_MUX_TCLK
21 changes: 10 additions & 11 deletions trunk/arch/arm/mach-s5p6442/include/mach/pwm-clock.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/* linux/arch/arm/mach-s5p6442/include/mach/pwm-clock.h
*
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
* Copyright 2008 Openmoko, Inc.
* Copyright 2008 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
* http://armlinux.simtec.co.uk/
*
* Based on arch/arm/mach-s3c64xx/include/mach/pwm-clock.h
* Copyright 2010 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
* Based on arch/arm/plat-s3c24xx/include/mach/pwm-clock.h
*
* S5P6442 - pwm clock and timer support
*
Expand All @@ -22,14 +21,14 @@

/**
* pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk
* @tcfg: The timer TCFG1 register bits shifted down to 0.
* @cfg: The timer TCFG1 register bits shifted down to 0.
*
* Return true if the given configuration from TCFG1 is a TCLK instead
* any of the TDIV clocks.
*/
static inline int pwm_cfg_src_is_tclk(unsigned long tcfg)
{
return tcfg == S3C64XX_TCFG1_MUX_TCLK;
return tcfg == S3C2410_TCFG1_MUX_TCLK;
}

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

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

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

#define S3C_TCFG1_MUX_TCLK S3C64XX_TCFG1_MUX_TCLK
#define S3C_TCFG1_MUX_TCLK S3C2410_TCFG1_MUX_TCLK

#endif /* __ASM_ARCH_PWMCLK_H */
21 changes: 10 additions & 11 deletions trunk/arch/arm/mach-s5pv210/include/mach/pwm-clock.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/* linux/arch/arm/mach-s5pv210/include/mach/pwm-clock.h
*
* Copyright (c) 2009 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
* Copyright 2008 Openmoko, Inc.
* Copyright 2008 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
* http://armlinux.simtec.co.uk/
*
* Based on arch/arm/mach-s3c64xx/include/mach/pwm-clock.h
* Copyright (c) 2009 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
* Based on arch/arm/plat-s3c24xx/include/mach/pwm-clock.h
*
* S5PV210 - pwm clock and timer support
*
Expand All @@ -22,14 +21,14 @@

/**
* pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk
* @tcfg: The timer TCFG1 register bits shifted down to 0.
* @cfg: The timer TCFG1 register bits shifted down to 0.
*
* Return true if the given configuration from TCFG1 is a TCLK instead
* any of the TDIV clocks.
*/
static inline int pwm_cfg_src_is_tclk(unsigned long tcfg)
{
return tcfg == S3C64XX_TCFG1_MUX_TCLK;
return tcfg == S3C2410_TCFG1_MUX_TCLK;
}

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

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

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

#define S3C_TCFG1_MUX_TCLK S3C64XX_TCFG1_MUX_TCLK
#define S3C_TCFG1_MUX_TCLK S3C2410_TCFG1_MUX_TCLK

#endif /* __ASM_ARCH_PWMCLK_H */

0 comments on commit b04c712

Please sign in to comment.