summaryrefslogtreecommitdiff
path: root/arch/unicore32/kernel/pwm.c
AgeCommit message (Collapse)AuthorFilesLines
2012-10-05pwm: Move PUV3 PWM driver to PWM frameworkThierry Reding1-219/+0
This commit moves the driver to drivers/pwm and converts it to the new PWM framework. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Qin Rui <qinrui@mprc.pku.edu.cn> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
2012-10-05unicore32: pwm: Use managed resource allocationsThierry Reding1-38/+9
This commit uses the managed resource allocation functions to simplify the cleanup paths on error and removal. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Qin Rui <qinrui@mprc.pku.edu.cn> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
2012-10-05unicore32: pwm: Remove unnecessary indirectionThierry Reding1-17/+6
Calling the actual probing function through a proxy isn't required and makes the code needlessly complex. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Qin Rui <qinrui@mprc.pku.edu.cn> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
2012-10-05unicore32: pwm: Use module_platform_driver()Thierry Reding1-20/+1
Some of the boilerplate code can be eliminated by using this macro. The driver was previously registered with an arch_initcall(), so technically this is no longer the same, but when the driver is moved to the PWM framework, deferred probing will take care of any driver probe ordering issues. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Qin Rui <qinrui@mprc.pku.edu.cn> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
2012-10-05unicore32: pwm: Properly remap memory-mapped registersThierry Reding1-3/+18
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>
2011-03-17unicore32 core architecture: timer and time handlingGuanXuetao1-0/+263
This patch implements timer and time. RTC and PWM device drivers are also here. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>