X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fvideo%2Fpm3fb.h;h=ac021379ac40abb0b1c7767a69d90ce33d412b88;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=49383fd724ae390929ada446fcf51caa6b79912a;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/include/video/pm3fb.h b/include/video/pm3fb.h index 49383fd72..ac021379a 100644 --- a/include/video/pm3fb.h +++ b/include/video/pm3fb.h @@ -1119,34 +1119,6 @@ /* ***** pm3fb useful define and macro ***** */ /* ***************************************** */ -/* kernel -specific definitions */ -/* what kernel is this ? */ -#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))) -#define KERNEL_2_5 -#endif - -#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))) -#define KERNEL_2_4 -#endif - -#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0))) -#define KERNEL_2_2 -/* pci_resource_start, available in 2.2.18 */ -#include -#ifdef CONFIG_FB_OF -#define SUPPORT_FB_OF -#endif -#endif - -#if (!defined(KERNEL_2_2)) && (!defined(KERNEL_2_4)) && (!defined(KERNEL_2_5)) -#error "Only kernel 2.2.x, kernel 2.4.y and kernel 2.5.z might work" -#endif - -/* not sure if/why it's needed. doesn't work without on my PowerMac... */ -#ifdef __BIG_ENDIAN -#define MUST_BYTESWAP -#endif - /* permedia3 -specific definitions */ #define PM3_SCALE_TO_CLOCK(pr, fe, po) ((2 * PM3_REF_CLOCK * fe) / (pr * (1 << (po)))) @@ -1156,10 +1128,7 @@ #endif /* max number of simultaneous board */ -/* warning : make sure module array def's are coherent with PM3_MAX_BOARD */ #define PM3_MAX_BOARD 4 -#define PM3_MAX_BOARD_MODULE_ARRAY_SHORT "1-4h" -#define PM3_MAX_BOARD_MODULE_ARRAY_STRING "1-4s" /* max size of options */ #define PM3_OPTIONS_SIZE 256 @@ -1170,9 +1139,6 @@ /* do we want accelerated console */ #define PM3FB_USE_ACCEL 1 -/* useful ? */ -#define CHAR_IS_NUM(a) ((((a) >= '0') && ((a) <= '9')) ? 1 : 0) - /* for driver debugging ONLY */ /* 0 = assert only, 1 = error, 2 = info, 3+ = verbose */ /* define PM3FB_MASTER_DEBUG 1 */ @@ -1203,19 +1169,9 @@ /* ******************************************** */ /* ***** A bunch of register-access macro ***** */ /* ******************************************** */ -#ifdef KERNEL_2_2 -#ifdef MUST_BYTESWAP /* we are writing big_endian to big_endian through a little_endian macro */ -#define PM3_READ_REG(r) __swab32(readl((l_fb_info->vIOBase + r))) -#define PM3_WRITE_REG(r, v) writel(__swab32(v), (l_fb_info->vIOBase + r)) -#else /* MUST_BYTESWAP */ -#define PM3_WRITE_REG(r, v) writel(v, (l_fb_info->vIOBase + r)) -#define PM3_READ_REG(r) readl((l_fb_info->vIOBase + r)) -#endif /* MUST_BYTESWAP */ -#endif /* KERNEL_2_2 */ -#if (defined KERNEL_2_4) || (defined KERNEL_2_5) /* native-endian access */ + #define PM3_WRITE_REG(r, v) fb_writel(v, (l_fb_info->vIOBase + r)) #define PM3_READ_REG(r) fb_readl((l_fb_info->vIOBase + r)) -#endif /* KERNEL_2_4 or KERNEL_2_5 */ #define depth2bpp(d) ((d + 7L) & ~7L)