Commit 29e031d5 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

V4L/DVB (7737): drx397xD: fix math usage

The previous code were using a div64 math specific to i386. Replace for an
asm-generic one.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 89f9257c
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/firmware.h> #include <linux/firmware.h>
#include <asm/div64.h>
#include "dvb_frontend.h" #include "dvb_frontend.h"
#include "drx397xD.h" #include "drx397xD.h"
...@@ -1024,17 +1025,15 @@ static int drx_tune(struct drx397xD_state *s, ...@@ -1024,17 +1025,15 @@ static int drx_tune(struct drx397xD_state *s,
rc = WR16(s, 0x0820050, rc); rc = WR16(s, 0x0820050, rc);
{ {
long dummy;
/* Configure bandwidth specific factor */ /* Configure bandwidth specific factor */
ebx = div_ll_X_l_rem(((u64) (s->f_osc) << 21) + (ebx >> 1), ebx = div64_64(((u64) (s->f_osc) << 21) + (ebx >> 1),
ebx, &dummy) - 0x800000; (u64)ebx) - 0x800000;
EXIT_RC(WR16(s, 0x0c50010, ebx & 0xffff)); EXIT_RC(WR16(s, 0x0c50010, ebx & 0xffff));
EXIT_RC(WR16(s, 0x0c50011, ebx >> 16)); EXIT_RC(WR16(s, 0x0c50011, ebx >> 16));
/* drx397xD oscillator calibration */ /* drx397xD oscillator calibration */
ebx = div_ll_X_l_rem(((u64) (s->config.f_if + df_tuner) << 28) + ebx = div64_64(((u64) (s->config.f_if + df_tuner) << 28) +
(s->f_osc >> 1), s->f_osc, &dummy); (s->f_osc >> 1), (u64)s->f_osc);
} }
ebx &= 0xfffffff; ebx &= 0xfffffff;
if (fep->inversion == INVERSION_ON) if (fep->inversion == INVERSION_ON)
......
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