Commit bf1b8ab6 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Russell King

[PATCH] ARM: 2721/1: remove reliance on udivdi3 for pxafb driver

Patch from Nicolas Pitre
Signed-off-by: default avatarNicolas Pitre <nico@cam.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent b7c84c6a
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/div64.h>
#include <asm/arch/pxa-regs.h> #include <asm/arch/pxa-regs.h>
#include <asm/arch/bitfield.h> #include <asm/arch/bitfield.h>
#include <asm/arch/pxafb.h> #include <asm/arch/pxafb.h>
...@@ -460,7 +461,7 @@ static inline unsigned int get_pcd(unsigned int pixclock) ...@@ -460,7 +461,7 @@ static inline unsigned int get_pcd(unsigned int pixclock)
* speeds */ * speeds */
pcd = (unsigned long long)get_lcdclk_frequency_10khz() * pixclock; pcd = (unsigned long long)get_lcdclk_frequency_10khz() * pixclock;
pcd /= 100000000 * 2; do_div(pcd, 100000000 * 2);
/* no need for this, since we should subtract 1 anyway. they cancel */ /* no need for this, since we should subtract 1 anyway. they cancel */
/* pcd += 1; */ /* make up for integer math truncations */ /* pcd += 1; */ /* make up for integer math truncations */
return (unsigned int)pcd; return (unsigned int)pcd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment