diff options
Diffstat (limited to 'drivers/pwm/pwm-atmel.c')
-rw-r--r-- | drivers/pwm/pwm-atmel.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c index b1473ed55110..a9fd6f0d408c 100644 --- a/drivers/pwm/pwm-atmel.c +++ b/drivers/pwm/pwm-atmel.c | |||
@@ -48,14 +48,6 @@ | |||
48 | #define PWMV2_CPRD 0x0C | 48 | #define PWMV2_CPRD 0x0C |
49 | #define PWMV2_CPRDUPD 0x10 | 49 | #define PWMV2_CPRDUPD 0x10 |
50 | 50 | ||
51 | /* Max values for period and prescaler */ | ||
52 | |||
53 | /* Only the LSB 16 bits are significant. */ | ||
54 | #define PWM_MAXV1_PRD 0xFFFF | ||
55 | /* All 32 bits are significant. */ | ||
56 | #define PWM_MAXV2_PRD 0xFFFFFFFF | ||
57 | #define PRD_MAXV1_PRES 10 | ||
58 | |||
59 | struct atmel_pwm_registers { | 51 | struct atmel_pwm_registers { |
60 | u8 period; | 52 | u8 period; |
61 | u8 period_upd; | 53 | u8 period_upd; |
@@ -294,8 +286,8 @@ static const struct atmel_pwm_data atmel_sam9rl_pwm_data = { | |||
294 | }, | 286 | }, |
295 | .cfg = { | 287 | .cfg = { |
296 | /* 16 bits to keep period and duty. */ | 288 | /* 16 bits to keep period and duty. */ |
297 | .max_period = PWM_MAXV1_PRD, | 289 | .max_period = 0xffff, |
298 | .max_pres = PRD_MAXV1_PRES, | 290 | .max_pres = 10, |
299 | }, | 291 | }, |
300 | }; | 292 | }; |
301 | 293 | ||
@@ -308,8 +300,8 @@ static const struct atmel_pwm_data atmel_sama5_pwm_data = { | |||
308 | }, | 300 | }, |
309 | .cfg = { | 301 | .cfg = { |
310 | /* 16 bits to keep period and duty. */ | 302 | /* 16 bits to keep period and duty. */ |
311 | .max_period = PWM_MAXV1_PRD, | 303 | .max_period = 0xffff, |
312 | .max_pres = PRD_MAXV1_PRES, | 304 | .max_pres = 10, |
313 | }, | 305 | }, |
314 | }; | 306 | }; |
315 | 307 | ||
@@ -322,8 +314,8 @@ static const struct atmel_pwm_data mchp_sam9x60_pwm_data = { | |||
322 | }, | 314 | }, |
323 | .cfg = { | 315 | .cfg = { |
324 | /* 32 bits to keep period and duty. */ | 316 | /* 32 bits to keep period and duty. */ |
325 | .max_period = PWM_MAXV2_PRD, | 317 | .max_period = 0xffffffff, |
326 | .max_pres = PRD_MAXV1_PRES, | 318 | .max_pres = 10, |
327 | }, | 319 | }, |
328 | }; | 320 | }; |
329 | 321 | ||