From: Ralf Baechle Update DECstation code. This still isn't usable but updates the code from rotten to less rotten and most importantly eleminates the diff between kernel.org and linux-mips.org tree to easy future work. Signed-off-by: Andrew Morton --- 25-akpm/arch/mips/Kconfig | 1 25-akpm/arch/mips/configs/decstation_defconfig | 52 ++ 25-akpm/arch/mips/dec/boot/decstation.c | 1 25-akpm/arch/mips/dec/ioasic-irq.c | 2 25-akpm/arch/mips/dec/kn02-irq.c | 2 25-akpm/arch/mips/dec/setup.c | 1 25-akpm/drivers/video/Kconfig | 34 - 25-akpm/drivers/video/Makefile | 7 25-akpm/drivers/video/bt431.h | 236 +++++++++++ 25-akpm/drivers/video/bt455.h | 95 ++++ 25-akpm/drivers/video/logo/Kconfig | 2 25-akpm/drivers/video/maxinefb.c | 54 +- 25-akpm/drivers/video/pmag-aa-fb.c | 514 +++++++++++++++++++++++++ 25-akpm/drivers/video/pmag-ba-fb.c | 39 + 25-akpm/drivers/video/pmagb-b-fb.c | 30 - 25-akpm/fs/partitions/Kconfig | 2 25-akpm/include/video/maxinefb.h | 5 drivers/scsi/Kconfig | 0 drivers/scsi/dec_esp.c | 0 19 files changed, 985 insertions(+), 92 deletions(-) diff -puN arch/mips/configs/decstation_defconfig~mips-decstation-updates arch/mips/configs/decstation_defconfig --- 25/arch/mips/configs/decstation_defconfig~mips-decstation-updates 2005-01-29 11:26:04.121121416 -0800 +++ 25-akpm/arch/mips/configs/decstation_defconfig 2005-01-29 11:26:04.146117616 -0800 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.10-rc2 -# Sun Nov 21 14:11:58 2004 +# Linux kernel version: 2.6.11-rc2 +# Wed Jan 26 02:49:03 2005 # CONFIG_MIPS=y # CONFIG_MIPS64 is not set @@ -85,6 +85,7 @@ CONFIG_MACH_DECSTATION=y # CONFIG_SNI_RM200_PCI is not set # CONFIG_TOSHIBA_RBTX4927 is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_HAVE_DEC_LOCK=y CONFIG_DMA_NONCOHERENT=y CONFIG_EARLY_PRINTK=y @@ -92,7 +93,6 @@ CONFIG_CPU_LITTLE_ENDIAN=y CONFIG_IRQ_CPU=y CONFIG_BOOT_ELF32=y CONFIG_MIPS_L1_CACHE_SHIFT=4 -# CONFIG_FB is not set # # CPU selection @@ -129,6 +129,19 @@ CONFIG_TC=y CONFIG_MMU=y # +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# PC-card bridges +# + +# +# PCI Hotplug Support +# + +# # Executable file formats # CONFIG_BINFMT_ELF=y @@ -144,6 +157,7 @@ CONFIG_TRAD_SIGNALS=y # CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set # # Memory Technology Devices (MTD) @@ -163,9 +177,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y # Block devices # # CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_INITRAMFS_SOURCE="" # CONFIG_LBD is not set CONFIG_CDROM_PKTCDVD=m @@ -179,6 +195,7 @@ CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y +CONFIG_ATA_OVER_ETH=m # # ATA/ATAPI/MFM/RLL support @@ -212,6 +229,7 @@ CONFIG_SCSI_CONSTANTS=y # # CONFIG_SCSI_SPI_ATTRS is not set # CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set # # SCSI low-level drivers @@ -219,7 +237,6 @@ CONFIG_SCSI_CONSTANTS=y CONFIG_SCSI_DECNCR=y # CONFIG_SCSI_DECSII is not set # CONFIG_SCSI_SATA is not set -# CONFIG_SCSI_QLOGIC_1280_1040 is not set # CONFIG_SCSI_DEBUG is not set # @@ -382,6 +399,7 @@ CONFIG_SERIO=y # CONFIG_SERIO_I8042 is not set CONFIG_SERIO_SERPORT=y # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_LIBPS2 is not set CONFIG_SERIO_RAW=m # @@ -434,7 +452,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # # Ftape, the floppy tape device driver # -# CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set @@ -465,12 +482,14 @@ CONFIG_LEGACY_PTY_COUNT=256 # # Graphics support # +# CONFIG_FB is not set # # Console display driver support # # CONFIG_VGA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound @@ -484,11 +503,25 @@ CONFIG_DUMMY_CONSOLE=y # CONFIG_USB_ARCH_HAS_OHCI is not set # +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information +# + +# # USB Gadget Support # # CONFIG_USB_GADGET is not set # +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# InfiniBand support +# +# CONFIG_INFINIBAND is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -590,6 +623,11 @@ CONFIG_ULTRIX_PARTITION=y # CONFIG_NLS is not set # +# Profiling support +# +# CONFIG_PROFILING is not set + +# # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set @@ -609,6 +647,10 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y # CONFIG_CRYPTO is not set # +# Hardware crypto devices +# + +# # Library routines # # CONFIG_CRC_CCITT is not set diff -puN arch/mips/dec/boot/decstation.c~mips-decstation-updates arch/mips/dec/boot/decstation.c --- 25/arch/mips/dec/boot/decstation.c~mips-decstation-updates 2005-01-29 11:26:04.122121264 -0800 +++ 25-akpm/arch/mips/dec/boot/decstation.c 2005-01-29 11:26:04.147117464 -0800 @@ -1,7 +1,6 @@ /* * arch/mips/dec/decstation.c */ -#include #define RELOC #define INITRD diff -puN arch/mips/dec/ioasic-irq.c~mips-decstation-updates arch/mips/dec/ioasic-irq.c --- 25/arch/mips/dec/ioasic-irq.c~mips-decstation-updates 2005-01-29 11:26:04.124120960 -0800 +++ 25-akpm/arch/mips/dec/ioasic-irq.c 2005-01-29 11:26:04.147117464 -0800 @@ -21,7 +21,7 @@ #include -static spinlock_t ioasic_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(ioasic_lock); static int ioasic_irq_base; diff -puN arch/mips/dec/kn02-irq.c~mips-decstation-updates arch/mips/dec/kn02-irq.c --- 25/arch/mips/dec/kn02-irq.c~mips-decstation-updates 2005-01-29 11:26:04.125120808 -0800 +++ 25-akpm/arch/mips/dec/kn02-irq.c 2005-01-29 11:26:04.147117464 -0800 @@ -29,7 +29,7 @@ * There is no default value -- it has to be initialized. */ u32 cached_kn02_csr; -spinlock_t kn02_lock = SPIN_LOCK_UNLOCKED; +DEFINE_SPINLOCK(kn02_lock); static int kn02_irq_base; diff -puN arch/mips/dec/setup.c~mips-decstation-updates arch/mips/dec/setup.c --- 25/arch/mips/dec/setup.c~mips-decstation-updates 2005-01-29 11:26:04.126120656 -0800 +++ 25-akpm/arch/mips/dec/setup.c 2005-01-29 11:26:04.148117312 -0800 @@ -8,7 +8,6 @@ * Copyright (C) 1998 Harald Koerfgen * Copyright (C) 2000, 2001, 2002, 2003 Maciej W. Rozycki */ -#include #include #include #include diff -puN arch/mips/Kconfig~mips-decstation-updates arch/mips/Kconfig --- 25/arch/mips/Kconfig~mips-decstation-updates 2005-01-29 11:26:04.128120352 -0800 +++ 25-akpm/arch/mips/Kconfig 2005-01-29 11:26:04.149117160 -0800 @@ -149,6 +149,7 @@ config MIPS_COBALT config MACH_DECSTATION bool "Support for DECstations" + select BOOT_ELF32 select DMA_NONCOHERENT select IRQ_CPU depends on MIPS32 || EXPERIMENTAL diff -puN drivers/scsi/dec_esp.c~mips-decstation-updates drivers/scsi/dec_esp.c diff -puN drivers/scsi/Kconfig~mips-decstation-updates drivers/scsi/Kconfig diff -puN /dev/null drivers/video/bt431.h --- /dev/null 2003-09-15 06:40:47.000000000 -0700 +++ 25-akpm/drivers/video/bt431.h 2005-01-29 11:26:04.151116856 -0800 @@ -0,0 +1,236 @@ +/* + * linux/drivers/video/bt431.h + * + * Copyright 2003 Thiemo Seufer + * + * This file is subject to the terms and conditions of the GNU General + * Public License. See the file COPYING in the main directory of this + * archive for more details. + */ +#include +#include + +/* + * Bt431 cursor generator registers, 32-bit aligned. + * Two twin Bt431 are used on the DECstation's PMAG-AA. + */ +struct bt431_regs { + volatile u16 addr_lo; + u16 pad0; + volatile u16 addr_hi; + u16 pad1; + volatile u16 addr_cmap; + u16 pad2; + volatile u16 addr_reg; + u16 pad3; +}; + +static inline u16 bt431_set_value(u8 val) +{ + return ((val << 8) | (val & 0xff)) & 0xffff; +} + +static inline u8 bt431_get_value(u16 val) +{ + return val & 0xff; +} + +/* + * Additional registers addressed indirectly. + */ +#define BT431_REG_CMD 0x0000 +#define BT431_REG_CXLO 0x0001 +#define BT431_REG_CXHI 0x0002 +#define BT431_REG_CYLO 0x0003 +#define BT431_REG_CYHI 0x0004 +#define BT431_REG_WXLO 0x0005 +#define BT431_REG_WXHI 0x0006 +#define BT431_REG_WYLO 0x0007 +#define BT431_REG_WYHI 0x0008 +#define BT431_REG_WWLO 0x0009 +#define BT431_REG_WWHI 0x000a +#define BT431_REG_WHLO 0x000b +#define BT431_REG_WHHI 0x000c + +#define BT431_REG_CRAM_BASE 0x0000 +#define BT431_REG_CRAM_END 0x01ff + +/* + * Command register. + */ +#define BT431_CMD_CURS_ENABLE 0x40 +#define BT431_CMD_XHAIR_ENABLE 0x20 +#define BT431_CMD_OR_CURSORS 0x10 +#define BT431_CMD_AND_CURSORS 0x00 +#define BT431_CMD_1_1_MUX 0x00 +#define BT431_CMD_4_1_MUX 0x04 +#define BT431_CMD_5_1_MUX 0x08 +#define BT431_CMD_xxx_MUX 0x0c +#define BT431_CMD_THICK_1 0x00 +#define BT431_CMD_THICK_3 0x01 +#define BT431_CMD_THICK_5 0x02 +#define BT431_CMD_THICK_7 0x03 + +static inline void bt431_select_reg(struct bt431_regs *regs, int ir) +{ + /* + * The compiler splits the write in two bytes without these + * helper variables. + */ + volatile u16 *lo = &(regs->addr_lo); + volatile u16 *hi = &(regs->addr_hi); + + mb(); + *lo = bt431_set_value(ir & 0xff); + wmb(); + *hi = bt431_set_value((ir >> 8) & 0xff); +} + +/* Autoincrement read/write. */ +static inline u8 bt431_read_reg_inc(struct bt431_regs *regs) +{ + /* + * The compiler splits the write in two bytes without the + * helper variable. + */ + volatile u16 *r = &(regs->addr_reg); + + mb(); + return bt431_get_value(*r); +} + +static inline void bt431_write_reg_inc(struct bt431_regs *regs, u8 value) +{ + /* + * The compiler splits the write in two bytes without the + * helper variable. + */ + volatile u16 *r = &(regs->addr_reg); + + mb(); + *r = bt431_set_value(value); +} + +static inline u8 bt431_read_reg(struct bt431_regs *regs, int ir) +{ + bt431_select_reg(regs, ir); + return bt431_read_reg_inc(regs); +} + +static inline void bt431_write_reg(struct bt431_regs *regs, int ir, u8 value) +{ + bt431_select_reg(regs, ir); + bt431_write_reg_inc(regs, value); +} + +/* Autoincremented read/write for the cursor map. */ +static inline u16 bt431_read_cmap_inc(struct bt431_regs *regs) +{ + /* + * The compiler splits the write in two bytes without the + * helper variable. + */ + volatile u16 *r = &(regs->addr_cmap); + + mb(); + return *r; +} + +static inline void bt431_write_cmap_inc(struct bt431_regs *regs, u16 value) +{ + /* + * The compiler splits the write in two bytes without the + * helper variable. + */ + volatile u16 *r = &(regs->addr_cmap); + + mb(); + *r = value; +} + +static inline u16 bt431_read_cmap(struct bt431_regs *regs, int cr) +{ + bt431_select_reg(regs, cr); + return bt431_read_cmap_inc(regs); +} + +static inline void bt431_write_cmap(struct bt431_regs *regs, int cr, u16 value) +{ + bt431_select_reg(regs, cr); + bt431_write_cmap_inc(regs, value); +} + +static inline void bt431_enable_cursor(struct bt431_regs *regs) +{ + bt431_write_reg(regs, BT431_REG_CMD, + BT431_CMD_CURS_ENABLE | BT431_CMD_OR_CURSORS + | BT431_CMD_4_1_MUX | BT431_CMD_THICK_1); +} + +static inline void bt431_erase_cursor(struct bt431_regs *regs) +{ + bt431_write_reg(regs, BT431_REG_CMD, BT431_CMD_4_1_MUX); +} + +static inline void bt431_position_cursor(struct bt431_regs *regs, u16 x, u16 y) +{ + /* + * Magic from the MACH sources. + * + * Cx = x + D + H - P + * P = 37 if 1:1, 52 if 4:1, 57 if 5:1 + * D = pixel skew between outdata and external data + * H = pixels between HSYNCH falling and active video + * + * Cy = y + V - 32 + * V = scanlines between HSYNCH falling, two or more + * clocks after VSYNCH falling, and active video + */ + x += 412 - 52; + y += 68 - 32; + + /* Use autoincrement. */ + bt431_select_reg(regs, BT431_REG_CXLO); + bt431_write_reg_inc(regs, x & 0xff); /* BT431_REG_CXLO */ + bt431_write_reg_inc(regs, (x >> 8) & 0x0f); /* BT431_REG_CXHI */ + bt431_write_reg_inc(regs, y & 0xff); /* BT431_REG_CYLO */ + bt431_write_reg_inc(regs, (y >> 8) & 0x0f); /* BT431_REG_CYHI */ +} + +static inline void bt431_set_font(struct bt431_regs *regs, u8 fgc, + u16 width, u16 height) +{ + int i; + u16 fgp = fgc ? 0xffff : 0x0000; + u16 bgp = fgc ? 0x0000 : 0xffff; + + bt431_select_reg(regs, BT431_REG_CRAM_BASE); + for (i = BT431_REG_CRAM_BASE; i <= BT431_REG_CRAM_END; i++) { + u16 value; + + if (height << 6 <= i << 3) + value = bgp; + else if (width <= i % 8 << 3) + value = bgp; + else if (((width >> 3) & 0xffff) > i % 8) + value = fgp; + else + value = fgp & ~(bgp << (width % 8 << 1)); + + bt431_write_cmap_inc(regs, value); + } +} + +static inline void bt431_init_cursor(struct bt431_regs *regs) +{ + /* no crosshair window */ + bt431_select_reg(regs, BT431_REG_WXLO); + bt431_write_reg_inc(regs, 0x00); /* BT431_REG_WXLO */ + bt431_write_reg_inc(regs, 0x00); /* BT431_REG_WXHI */ + bt431_write_reg_inc(regs, 0x00); /* BT431_REG_WYLO */ + bt431_write_reg_inc(regs, 0x00); /* BT431_REG_WYHI */ + bt431_write_reg_inc(regs, 0x00); /* BT431_REG_WWLO */ + bt431_write_reg_inc(regs, 0x00); /* BT431_REG_WWHI */ + bt431_write_reg_inc(regs, 0x00); /* BT431_REG_WHLO */ + bt431_write_reg_inc(regs, 0x00); /* BT431_REG_WHHI */ +} diff -puN /dev/null drivers/video/bt455.h --- /dev/null 2003-09-15 06:40:47.000000000 -0700 +++ 25-akpm/drivers/video/bt455.h 2005-01-29 11:26:04.151116856 -0800 @@ -0,0 +1,95 @@ +/* + * linux/drivers/video/bt455.h + * + * Copyright 2003 Thiemo Seufer + * + * This file is subject to the terms and conditions of the GNU General + * Public License. See the file COPYING in the main directory of this + * archive for more details. + */ +#include +#include + +/* + * Bt455 byte-wide registers, 32-bit aligned. + */ +struct bt455_regs { + volatile u8 addr_cmap; + u8 pad0[3]; + volatile u8 addr_cmap_data; + u8 pad1[3]; + volatile u8 addr_clr; + u8 pad2[3]; + volatile u8 addr_ovly; + u8 pad3[3]; +}; + +static inline void bt455_select_reg(struct bt455_regs *regs, int ir) +{ + mb(); + regs->addr_cmap = ir & 0x0f; +} + +/* + * Read/write to a Bt455 color map register. + */ +static inline void bt455_read_cmap_entry(struct bt455_regs *regs, int cr, + u8* red, u8* green, u8* blue) +{ + bt455_select_reg(regs, cr); + mb(); + *red = regs->addr_cmap_data & 0x0f; + rmb(); + *green = regs->addr_cmap_data & 0x0f; + rmb(); + *blue = regs->addr_cmap_data & 0x0f; +} + +static inline void bt455_write_cmap_entry(struct bt455_regs *regs, int cr, + u8 red, u8 green, u8 blue) +{ + bt455_select_reg(regs, cr); + wmb(); + regs->addr_cmap_data = red & 0x0f; + wmb(); + regs->addr_cmap_data = green & 0x0f; + wmb(); + regs->addr_cmap_data = blue & 0x0f; +} + +static inline void bt455_write_ovly_entry(struct bt455_regs *regs, int cr, + u8 red, u8 green, u8 blue) +{ + bt455_select_reg(regs, cr); + wmb(); + regs->addr_ovly = red & 0x0f; + wmb(); + regs->addr_ovly = green & 0x0f; + wmb(); + regs->addr_ovly = blue & 0x0f; +} + +static inline void bt455_set_cursor(struct bt455_regs *regs) +{ + mb(); + regs->addr_ovly = 0x0f; + wmb(); + regs->addr_ovly = 0x0f; + wmb(); + regs->addr_ovly = 0x0f; +} + +static inline void bt455_erase_cursor(struct bt455_regs *regs) +{ + /* bt455_write_cmap_entry(regs, 8, 0x00, 0x00, 0x00); */ + /* bt455_write_cmap_entry(regs, 9, 0x00, 0x00, 0x00); */ + bt455_write_ovly_entry(regs, 8, 0x03, 0x03, 0x03); + bt455_write_ovly_entry(regs, 9, 0x07, 0x07, 0x07); + + wmb(); + regs->addr_ovly = 0x09; + wmb(); + regs->addr_ovly = 0x09; + wmb(); + regs->addr_ovly = 0x09; +} diff -puN drivers/video/Kconfig~mips-decstation-updates drivers/video/Kconfig --- 25/drivers/video/Kconfig~mips-decstation-updates 2005-01-29 11:26:04.133119592 -0800 +++ 25-akpm/drivers/video/Kconfig 2005-01-29 11:26:04.153116552 -0800 @@ -1014,29 +1014,35 @@ config FB_HIT This is the frame buffer device driver for the Hitachi HD64461 LCD frame buffer card. +config FB_PMAG_AA + bool "PMAG-AA TURBOchannel framebuffer support" + depends on FB && MACH_DECSTATION && TC + help + Support for the PMAG-AA TURBOchannel framebuffer card (1280x1024x1) + used mainly in the MIPS-based DECstation series. + config FB_PMAG_BA bool "PMAG-BA TURBOchannel framebuffer support" - depends on FB && DECSTATION && TC + depends on FB && MACH_DECSTATION && TC help - Say Y here to directly support the on-board PMAG-BA framebuffer in - the 5000/1xx versions of the DECstation. There is a page dedicated - to Linux on DECstations at . + Support for the PMAG-BA TURBOchannel framebuffer card (1024x864x8) + used mainly in the MIPS-based DECstation series. config FB_PMAGB_B - bool "PMAGB-B TURBOchannel framebuffer spport" - depends on FB && DECSTATION && TC + bool "PMAGB-B TURBOchannel framebuffer support" + depends on FB && MACH_DECSTATION && TC help - Say Y here to directly support the on-board PMAGB-B framebuffer in - the 5000/1xx versions of the DECstation. There is a page dedicated - to Linux on DECstations at . + Support for the PMAGB-B TURBOchannel framebuffer card used mainly + in the MIPS-based DECstation series. The card is currently only + supported in 1280x1024x8 mode. config FB_MAXINE - bool "Maxine (Personal DECstation) onboard framebuffer spport" - depends on FB && DECSTATION && TC + bool "Maxine (Personal DECstation) onboard framebuffer support" + depends on FB && MACH_DECSTATION && TC help - Say Y here to directly support the on-board framebuffer in the - Maxine (5000/20, /25, /33) version of the DECstation. There is a - page dedicated to Linux on DECstations at . + Support for the onboard framebuffer (1024x768x8) in the Personal + DECstation series (Personal DECstation 5000/20, /25, /33, /50, + Codename "Maxine"). config FB_TX3912 bool "TMPTX3912/PR31700 frame buffer support" diff -puN drivers/video/logo/Kconfig~mips-decstation-updates drivers/video/logo/Kconfig --- 25/drivers/video/logo/Kconfig~mips-decstation-updates 2005-01-29 11:26:04.134119440 -0800 +++ 25-akpm/drivers/video/logo/Kconfig 2005-01-29 11:26:04.153116552 -0800 @@ -25,7 +25,7 @@ config LOGO_LINUX_CLUT224 config LOGO_DEC_CLUT224 bool "224-color Digital Equipment Corporation Linux logo" - depends on LOGO && DECSTATION + depends on LOGO && MACH_DECSTATION default y config LOGO_MAC_CLUT224 diff -puN drivers/video/Makefile~mips-decstation-updates drivers/video/Makefile --- 25/drivers/video/Makefile~mips-decstation-updates 2005-01-29 11:26:04.135119288 -0800 +++ 25-akpm/drivers/video/Makefile 2005-01-29 11:26:04.154116400 -0800 @@ -85,9 +85,6 @@ obj-$(CONFIG_FB_HIT) += hit obj-$(CONFIG_FB_TX3912) += tx3912fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_EPSON1355) += epson1355fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_PVR2) += pvr2fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_PMAG_BA) += pmag-ba-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_PMAGB_B) += pmagb-b-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_MAXINE) += maxinefb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_VOODOO1) += sstfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_ARMCLCD) += amba-clcd.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_68328) += 68328fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o @@ -97,6 +94,10 @@ obj-$(CONFIG_FB_ASILIANT) += asiliantf obj-$(CONFIG_FB_PXA) += pxafb.o cfbimgblt.o cfbcopyarea.o cfbfillrect.o obj-$(CONFIG_FB_W100) += w100fb.o cfbimgblt.o cfbcopyarea.o cfbfillrect.o obj-$(CONFIG_FB_AU1100) += au1100fb.o fbgen.o +obj-$(CONFIG_FB_PMAG_AA) += pmag-aa-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_PMAG_BA) += pmag-ba-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_PMAGB_B) += pmagb-b-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_MAXINE) += maxinefb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o # Platform or fallback drivers go here obj-$(CONFIG_FB_VESA) += vesafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o diff -puN drivers/video/maxinefb.c~mips-decstation-updates drivers/video/maxinefb.c --- 25/drivers/video/maxinefb.c~mips-decstation-updates 2005-01-29 11:26:04.137118984 -0800 +++ 25-akpm/drivers/video/maxinefb.c 2005-01-29 11:26:04.155116248 -0800 @@ -43,31 +43,25 @@ static struct fb_info fb_info; static struct fb_var_screeninfo maxinefb_defined = { - .xres = 1024, - .yres = 768, - .xres_virtual = 1024, - .yres_virtual = 768, - .bits_per_pixel = 8, - .red.length = 8, - .green.length = 8, - .blue.length = 8, - .activate = FB_ACTIVATE_NOW, - .height = -1, - .width = -1, - .vmode = FB_VMODE_NONINTERLACED, + .xres = 1024, + .yres = 768, + .xres_virtual = 1024, + .yres_virtual = 768, + .bits_per_pixel =8, + .activate = FB_ACTIVATE_NOW, + .height = -1, + .width = -1, + .vmode = FB_VMODE_NONINTERLACED, }; static struct fb_fix_screeninfo maxinefb_fix = { - .id = "Maxine onboard graphics 1024x768x8", - .smem_len = (1024*768), - .type = FB_TYPE_PACKED_PIXELS, - .visual = FB_VISUAL_PSEUDOCOLOR, - .line_length = 1024, + .id = "Maxine onboard graphics 1024x768x8", + .smem_len = (1024*768), + .type = FB_TYPE_PACKED_PIXELS, + .visual = FB_VISUAL_PSEUDOCOLOR, + .line_length = 1024, }; -/* Reference to machine type set in arch/mips/dec/prom/identify.c, KM */ -extern unsigned long mips_machtype; - /* Handle the funny Inmos RamDAC/video controller ... */ void maxinefb_ims332_write_register(int regno, register unsigned int val) @@ -100,12 +94,12 @@ static int maxinefb_setcolreg(unsigned r /* value to be written into the palette reg. */ unsigned long hw_colorvalue = 0; - red >>= 8; /* The cmap fields are 16 bits */ - green >>= 8; /* wide, but the harware colormap */ - blue >>= 8; /* registers are only 8 bits wide */ + red >>= 8; /* The cmap fields are 16 bits */ + green >>= 8; /* wide, but the harware colormap */ + blue >>= 8; /* registers are only 8 bits wide */ hw_colorvalue = (blue << 16) + (green << 8) + (red); - + maxinefb_ims332_write_register(IMS332_REG_COLOR_PALETTE + regno, hw_colorvalue); return 0; @@ -113,16 +107,18 @@ static int maxinefb_setcolreg(unsigned r static struct fb_ops maxinefb_ops = { .owner = THIS_MODULE, - .fb_setcolreg = maxinefb_setcolreg, + .fb_get_fix = gen_get_fix, + .fb_get_var = gen_get_var, + .fb_setcolreg = maxinefb_setcolreg, .fb_fillrect = cfb_fillrect, .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, + .fb_imageblit = cfb_imageblit, .fb_cursor = soft_cursor, }; int __init maxinefb_init(void) { - volatile unsigned char *fboff; + unsigned long fboff; unsigned long fb_start; int i; @@ -142,7 +138,7 @@ int __init maxinefb_init(void) /* Clear screen */ for (fboff = fb_start; fboff < fb_start + 0x1ffff; fboff++) - *fboff = 0x0; + *(volatile unsigned char *)fboff = 0x0; maxinefb_fix.smem_start = fb_start; @@ -159,7 +155,7 @@ int __init maxinefb_init(void) } fb_info.fbops = &maxinefb_ops; - fb_info.screen_base = (char *) maxinefb_fix.smem_start; + fb_info.screen_base = (char *)maxinefb_fix.smem_start; fb_info.var = maxinefb_defined; fb_info.fix = maxinefb_fix; fb_info.flags = FBINFO_DEFAULT; diff -puN /dev/null drivers/video/pmag-aa-fb.c --- /dev/null 2003-09-15 06:40:47.000000000 -0700 +++ 25-akpm/drivers/video/pmag-aa-fb.c 2005-01-29 11:26:04.157115944 -0800 @@ -0,0 +1,514 @@ +/* + * linux/drivers/video/pmag-aa-fb.c + * Copyright 2002 Karsten Merker + * + * PMAG-AA TurboChannel framebuffer card support ... derived from + * pmag-ba-fb.c, which is Copyright (C) 1999, 2000, 2001 by + * Michael Engel , Karsten Merker + * and Harald Koerfgen , which itself is derived from + * "HP300 Topcat framebuffer support (derived from macfb of all things) + * Phil Blundell 1998" + * + * This file is subject to the terms and conditions of the GNU General + * Public License. See the file COPYING in the main directory of this + * archive for more details. + * + * 2002-09-28 Karsten Merker + * Version 0.01: First try to get a PMAG-AA running. + * + * 2003-02-24 Thiemo Seufer + * Version 0.02: Major code cleanup. + * + * 2003-09-21 Thiemo Seufer + * Hardware cursor support. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include