ia64/linux-2.6.18-xen.hg

view arch/powerpc/math-emu/mcrfs.c @ 854:950b9eb27661

usbback: fix urb interval value for interrupt urbs.

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Apr 06 13:51:20 2009 +0100 (2009-04-06)
parents 831230e53067
children
line source
1 #include <linux/types.h>
2 #include <linux/errno.h>
3 #include <asm/uaccess.h>
5 #include "soft-fp.h"
7 int
8 mcrfs(u32 *ccr, u32 crfD, u32 crfS)
9 {
10 u32 value, clear;
12 #ifdef DEBUG
13 printk("%s: %p (%08x) %d %d\n", __FUNCTION__, ccr, *ccr, crfD, crfS);
14 #endif
16 clear = 15 << ((7 - crfS) << 2);
17 if (!crfS)
18 clear = 0x90000000;
20 value = (__FPU_FPSCR >> ((7 - crfS) << 2)) & 15;
21 __FPU_FPSCR &= ~(clear);
23 *ccr &= ~(15 << ((7 - crfD) << 2));
24 *ccr |= (value << ((7 - crfD) << 2));
26 #ifdef DEBUG
27 printk("CR: %08x\n", __FUNCTION__, *ccr);
28 #endif
30 return 0;
31 }