diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2012-09-14 04:14:25 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@avionic-design.de> | 2012-10-05 14:56:39 -0400 |
commit | d1b6886502160eb771aefe21c1f891597138ddfe (patch) | |
tree | eee4f1aade9c3b34878ba849301a196532a9fdd0 /arch/unicore32/include | |
parent | 60ce70285b4d3b933eea15e494a9b35fe85b19b7 (diff) |
unicore32: pwm: Properly remap memory-mapped registers
Instead of writing to the timer controller registers by dereferencing a
pointer to the memory location, properly remap the memory region with a
call to ioremap_nocache() and access the registers using writel().
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Tested-by: Qin Rui <qinrui@mprc.pku.edu.cn>
Diffstat (limited to 'arch/unicore32/include')
-rw-r--r-- | arch/unicore32/include/mach/regs-ost.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/unicore32/include/mach/regs-ost.h b/arch/unicore32/include/mach/regs-ost.h index 7b91fe698eed..4a85fb463848 100644 --- a/arch/unicore32/include/mach/regs-ost.h +++ b/arch/unicore32/include/mach/regs-ost.h | |||
@@ -33,18 +33,16 @@ | |||
33 | * Interrupt Enable Reg OST_OIER | 33 | * Interrupt Enable Reg OST_OIER |
34 | */ | 34 | */ |
35 | #define OST_OIER (PKUNITY_OST_BASE + 0x001C) | 35 | #define OST_OIER (PKUNITY_OST_BASE + 0x001C) |
36 | |||
36 | /* | 37 | /* |
37 | * PWM Pulse Width Control Reg OST_PWMPWCR | 38 | * PWM Registers: IO base address: PKUNITY_OST_BASE + 0x80 |
38 | */ | 39 | * PWCR: Pulse Width Control Reg |
39 | #define OST_PWMPWCR (PKUNITY_OST_BASE + 0x0080) | 40 | * DCCR: Duty Cycle Control Reg |
40 | /* | 41 | * PCR: Period Control Reg |
41 | * PWM Duty Cycle Control Reg OST_PWMDCCR | ||
42 | */ | ||
43 | #define OST_PWMDCCR (PKUNITY_OST_BASE + 0x0084) | ||
44 | /* | ||
45 | * PWM Period Control Reg OST_PWMPCR | ||
46 | */ | 42 | */ |
47 | #define OST_PWMPCR (PKUNITY_OST_BASE + 0x0088) | 43 | #define OST_PWM_PWCR (0x00) |
44 | #define OST_PWM_DCCR (0x04) | ||
45 | #define OST_PWM_PCR (0x08) | ||
48 | 46 | ||
49 | /* | 47 | /* |
50 | * Match detected 0 OST_OSSR_M0 | 48 | * Match detected 0 OST_OSSR_M0 |