Staging
v0.8.1
https://github.com/torvalds/linux
Revision dd668d150cad39d3af676519c81c2757fb7787da authored by Alan Cox on 21 May 2007, 14:00:53 UTC, committed by Jeff Garzik on 25 May 2007, 00:34:48 UTC
- Rename sis_port_base to sis_old_port_base() so nobody uses it for new
generation controllers in error.
- Use byte size operations where it is cleaner for mode setup
- Fix a couple of masking errors on certai chip revs when setting speeds

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
1 parent 824cf33
Raw File
Tip revision: dd668d150cad39d3af676519c81c2757fb7787da authored by Alan Cox on 21 May 2007, 14:00:53 UTC
pata_sis: Fix and clean up some timing setups
Tip revision: dd668d1
delay.h
#ifndef _X8664_DELAY_H
#define _X8664_DELAY_H

/*
 * Copyright (C) 1993 Linus Torvalds
 *
 * Delay routines calling functions in arch/x86_64/lib/delay.c
 */
 
/* Undefined functions to get compile-time errors */
extern void __bad_udelay(void);
extern void __bad_ndelay(void);

extern void __udelay(unsigned long usecs);
extern void __ndelay(unsigned long nsecs);
extern void __const_udelay(unsigned long usecs);
extern void __delay(unsigned long loops);

/* 0x10c7 is 2**32 / 1000000 (rounded up) */
#define udelay(n) (__builtin_constant_p(n) ? \
	((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c7ul)) : \
	__udelay(n))

/* 0x5 is 2**32 / 1000000000 (rounded up) */
#define ndelay(n) (__builtin_constant_p(n) ? \
       ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \
       __ndelay(n))


#endif /* defined(_X8664_DELAY_H) */
back to top