Commit 2a86df06 authored by Linus Torvalds's avatar Linus Torvalds

The Basted Turkey Release (aka 2.1.130)

Following hot on the heels of the greased weasel, the basted turkey rears
its handsome head.

The basted turkey release fixes some problems that our dear weasel had,
namely:
 - NFS reference counting was wrong. It had been wrong for a long time,
   but apparently the more aggressively asynchronous code was more easily
   able to show the resultant random memory corruption. That should be
   gone.
 - The UP flu fixed officially (this has been in most of the 2.1.129
   patches)
 - kernel_thread() used to be able to cause bad things in init-routines at
   bootup. Fixed.
 - itimers could lead to bad things in SMP under heavy itimer load.
 - various mm tweaks to make it behave better under load. Things for dirty
   buffers still under consideration.
 - IP masqerading check fixes.
 - acenic gigabit ethernet driver
 - some drunken revelers fixed some MCA issues.
 - alpha PCI setup updates and video drivers
 - hfs and minix filesystem fixes.

On the whole, an excellent thing to do this evening, and goes together
remarkably well with some good red wine. Amaze your friends and relatives
by completely ignoring them, sitting in a corner with your own basted
turkey, and getting wasted on red wine. Much more fun than your average
thanksgiving dinner,

		Linus
parent 63f5d27a
This diff is collapsed.
......@@ -2,7 +2,7 @@
-----------------------
Maintained by Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
Last revised: June 10, 1998
Last revised: November 7, 1998
0. Introduction
......@@ -114,7 +114,7 @@ much trouble...
--------------------------------------
Frame buffer resolutions are maintained using the utility `fbset'. It can
change the video mode properties of the current resolution. Its main usage is
change the video mode properties of a frame buffer device. Its main usage is
to change the current video mode, e.g. during boot up in one of your /etc/rc.*
or /etc/init.d/* files.
......@@ -126,8 +126,8 @@ easily add your own modes and refer to them with a simple identifier.
---------------
The X server (XF68_FBDev) is the most notable application program for the frame
buffer device. The current X server is part of the XFree86/XFree68 release
3.3.1 package and has 2 modes:
buffer device. Starting with XFree86 release 3.2, the X server is part of
XFree86 and has 2 modes:
- If the `Display' subsection for the `fbdev' driver in the /etc/XF86Config
file contains a
......@@ -135,19 +135,18 @@ buffer device. The current X server is part of the XFree86/XFree68 release
Modes "default"
line, the X server will use the scheme discussed above, i.e. it will start
up in the resolution determined by /dev/fb0current (or $FRAMEBUFFER, if
set). This is the default for the configuration file supplied with XFree68
3.2. It's the most simple configuration (and the only possible one if you
want to have a broadcast compatible display, e.g. PAL or NTSC), but it has
some limitations.
up in the resolution determined by /dev/fb0 (or $FRAMEBUFFER, if set). You
still have to specify the color depth (using the Depth keyword) and virtual
resolution (using the Virtual keyword) though. This is the default for the
configuration file supplied with XFree86. It's the most simple
configuration, but it has some limitations.
- Therefore it's also possible to specify resolutions in the /etc/XF86Config
file. This allows for on-the-fly resolution switching while retaining the
same virtual desktop size. The frame buffer device that's used is still
/dev/fb0current (or $FRAMEBUFFER), but the available resolutions are
defined by /etc/XF86Config now. The disadvantage is that you have to
specify the timings in a different format (but `fbset -x' may help) and
that you can't have a broadcast compatible display (e.g. no PAL or NTSC).
specify the timings in a different format (but `fbset -x' may help).
To tune a video mode, you can use fbset or xvidtune. Note that xvidtune doesn't
work 100% with XF68_FBDev: the reported clock values are always incorrect.
......@@ -298,11 +297,11 @@ For more specific information about the frame buffer device and its
applications, please refer to the following documentation:
- The manual pages for fbset: fbset(8), fb.modes(5)
- The manual pages for XFree68: XF68_FBDev(1), XF86Config(4/5)
- The manual pages for XFree86: XF68_FBDev(1), XF86Config(4/5)
- The mighty kernel sources:
o linux/drivers/video/
o linux/include/linux/fb.h
o linux/drivers/char/fbmem.c
o linux/drivers/video/*fb.c
o linux/include/video/
8. Downloading
......
......@@ -719,9 +719,17 @@ layout_bus(struct pci_bus *bus)
pcibios_write_config_dword(bridge->bus->number, bridge->devfn,
PCI_IO_BASE, l);
/* Also clear out the upper 16 bits. */
/*
* Also:
* clear out the upper 16 bits of IO base/limit.
* clear out the upper 32 bits of PREF base/limit.
*/
pcibios_write_config_dword(bridge->bus->number, bridge->devfn,
PCI_IO_BASE_UPPER16, 0);
pcibios_write_config_dword(bridge->bus->number, bridge->devfn,
PCI_PREF_BASE_UPPER32, 0);
pcibios_write_config_dword(bridge->bus->number, bridge->devfn,
PCI_PREF_LIMIT_UPPER32, 0);
/*
* Set up the top and bottom of the PCI Memory segment
......@@ -731,27 +739,35 @@ layout_bus(struct pci_bus *bus)
pcibios_write_config_dword(bridge->bus->number, bridge->devfn,
PCI_MEMORY_BASE, l);
/*
* Turn off downstream PF memory address range:
* Turn off downstream PF memory address range, unless
* there is a VGA behind this bridge, in which case, we
* enable the PREFETCH range to include BIOS ROM at C0000.
*
* NOTE: this is a bit of a hack, done with PREFETCH for
* simplicity, rather than having to add it into the above
* non-PREFETCH range, which could then be bigger than we want.
* We might assume that we could relocate the BIOS ROM, but
* that would depend on having it found by those who need it
* (the DEC BIOS emulator would find it, but I do not know
* about the Xservers). So, we do it this way for now... ;-}
*/
l = (found_vga) ? 0 : 0x0000ffff;
pcibios_write_config_dword(bridge->bus->number, bridge->devfn,
PCI_PREF_MEMORY_BASE, 0x0000ffff);
PCI_PREF_MEMORY_BASE, l);
/*
* Tell bridge that there is an ISA bus in the system,
* and (possibly) a VGA as well.
*/
/* ??? This appears to be a single-byte write into MIN_GNT.
What is up with this? */
l = 0x00040000; /* ISA present */
if (found_vga) l |= 0x00080000; /* VGA present */
pcibios_write_config_dword(bridge->bus->number, bridge->devfn,
0x3c, l);
l = (found_vga) ? 0x0c : 0x04;
pcibios_write_config_byte(bridge->bus->number, bridge->devfn,
PCI_BRIDGE_CONTROL, l);
/*
* Clear status bits, enable I/O (for downstream I/O),
* turn on master enable (for upstream I/O), turn on
* memory enable (for downstream memory), turn on
* master enable (for upstream memory and I/O).
* Clear status bits,
* turn on I/O enable (for downstream I/O),
* turn on memory enable (for downstream memory),
* turn on master enable (for upstream memory and I/O).
*/
pcibios_write_config_dword(bridge->bus->number, bridge->devfn,
PCI_COMMAND, 0xffff0007);
......@@ -806,12 +822,15 @@ void __init
enable_ide(long ide_base)
{
int data;
unsigned long flags;
__save_and_cli(flags);
outb(0, ide_base); /* set the index register for reg #0 */
data = inb(ide_base+1); /* read the current contents */
outb(0, ide_base); /* set the index register for reg #0 */
outb(data | 0x40, ide_base+1); /* turn on IDE */
outb(data | 0x40, ide_base+1); /* turn on IDE, really! */
__restore_flags(flags);
}
/* Look for mis-configured devices' I/O space addresses behind bridges. */
......
......@@ -351,6 +351,12 @@ static char rawhide_names[][16] = {
};
static int rawhide_indices[] = {0,0,0,1,1,2,2,3,3,4,4};
static char tsunami_names[][16] = {
"0", "DP264", "Warhol", "Windjammer", "Monet", "Clipper",
"Goldrush", "Webbrick", "Catamaran"
};
static int tsunami_indices[] = {0,1,2,3,4,5,6,7,8};
static struct alpha_machine_vector * __init
get_sysvec(long type, long variation, long cpu)
......@@ -600,6 +606,10 @@ get_sysnames(long type, long variation,
if (member < N(rawhide_indices))
*variation_name = rawhide_names[rawhide_indices[member]];
break;
case ST_DEC_TSUNAMI:
if (member < N(tsunami_indices))
*variation_name = tsunami_names[tsunami_indices[member]];
break;
}
}
......@@ -651,8 +661,8 @@ int get_cpuinfo(char *buffer)
} unaligned[2];
static char cpu_names[][8] = {
"EV3", "EV4", "Unknown", "LCA4", "EV5", "EV45", "EV56",
"EV6", "PCA56", "PCA57"
"EV3", "EV4", "Simulate", "LCA4", "EV5", "EV45", "EV56",
"EV6", "PCA56", "PCA57", "EV67"
};
struct percpu_struct *cpu;
......
......@@ -2519,10 +2519,10 @@ SMC37c669_dump_registers(void)
void __init SMC669_Init ( void )
{
SMC37c669_CONFIG_REGS *SMC_base;
unsigned long flags;
__save_and_cli(flags);
if ( ( SMC_base = SMC37c669_detect( ) ) != NULL ) {
printk( "SMC37c669 Super I/O Controller found @ 0x%lx\n",
(unsigned long) SMC_base );
#if SMC_DEBUG
SMC37c669_config_mode( TRUE );
SMC37c669_dump_registers( );
......@@ -2573,8 +2573,12 @@ void __init SMC669_Init ( void )
SMC37c669_config_mode( FALSE );
SMC37c669_display_device_info( );
#endif
__restore_flags(flags);
printk( "SMC37c669 Super I/O Controller found @ 0x%lx\n",
(unsigned long) SMC_base );
}
else {
__restore_flags(flags);
#if SMC_DEBUG
printk( "No SMC37c669 Super I/O Controller found\n" );
#endif
......
......@@ -241,10 +241,10 @@ static void __init SMCReportDeviceStatus(unsigned long baseAddr)
int __init SMC93x_Init(void)
{
unsigned long SMCUltraBase;
unsigned long flags;
__save_and_cli(flags);
if ((SMCUltraBase = SMCDetectUltraIO()) != 0UL) {
printk("SMC FDC37C93X Ultra I/O Controller found @ 0x%lx\n",
SMCUltraBase);
#if SMC_DEBUG
SMCReportDeviceStatus(SMCUltraBase);
#endif
......@@ -264,9 +264,13 @@ int __init SMC93x_Init(void)
SMCReportDeviceStatus(SMCUltraBase);
#endif
SMCRunState(SMCUltraBase);
__restore_flags(flags);
printk("SMC FDC37C93X Ultra I/O Controller found @ 0x%lx\n",
SMCUltraBase);
return 1;
}
else {
__restore_flags(flags);
DBG_DEVS(("No SMC FDC37C93X Ultra I/O Controller found\n"));
return 0;
}
......
......@@ -25,12 +25,24 @@
#include <asm/pci.h>
#include <asm/pgtable.h>
#include <asm/core_tsunami.h>
#include <asm/hwrpb.h>
#include "proto.h"
#include "irq.h"
#include "bios32.h"
#include "machvec.h"
struct hwrpb_struct *hwrpb;
/* hwrpb->sys_variation helpers */
#define MEMBER_ID(x) (((x)>>10)&0x3f)
#define DP264_ID 1
#define MONET_ID 4
#define GOLDRUSH_ID 6
#define WEBBRICK_ID 7
#define dev2hose(d) (bus2hose[(d)->bus->number]->pci_hose_index)
/*
* HACK ALERT! only CPU#0 is used currently
......@@ -217,16 +229,94 @@ dp264_map_irq(struct pci_dev *dev, int slot, int pin)
};
const long min_idsel = 5, max_idsel = 10, irqs_per_slot = 5;
int irq = COMMON_TABLE_LOOKUP;
if (irq >= 0)
irq += 16 * bus2hose[dev->bus->number]->pci_hose_index;
irq += 16 * dev2hose(dev);
return irq;
}
static int __init
monet_map_irq(struct pci_dev *dev, int slot, int pin)
{
static char irq_tab[13][5] __initlocaldata = {
/*INT INTA INTB INTC INTD */
{ 45, 45, 45, 45, 45}, /* IdSel 3 21143 PCI1 */
{ -1, -1, -1, -1, -1}, /* IdSel 4 unused */
{ -1, -1, -1, -1, -1}, /* IdSel 5 unused */
{ 47, 47, 47, 47, 47}, /* IdSel 6 SCSI PCI1 */
{ -1, -1, -1, -1, -1}, /* IdSel 7 ISA Bridge */
{ -1, -1, -1, -1, -1}, /* IdSel 8 P2P PCI1 */
#if 1
{ 28, 28, 29, 30, 31}, /* IdSel 14 slot 4 PCI2*/
{ 24, 24, 25, 26, 27}, /* IdSel 15 slot 5 PCI2*/
#else
{ -1, -1, -1, -1, -1}, /* IdSel 9 unused */
{ -1, -1, -1, -1, -1}, /* IdSel 10 unused */
#endif
{ 40, 40, 41, 42, 43}, /* IdSel 11 slot 1 PCI0*/
{ 36, 36, 37, 38, 39}, /* IdSel 12 slot 2 PCI0*/
{ 32, 32, 33, 34, 35}, /* IdSel 13 slot 3 PCI0*/
{ 28, 28, 29, 30, 31}, /* IdSel 14 slot 4 PCI2*/
{ 24, 24, 25, 26, 27} /* IdSel 15 slot 5 PCI2*/
};
const long min_idsel = 3, max_idsel = 15, irqs_per_slot = 5;
int irq = COMMON_TABLE_LOOKUP;
return irq;
}
static int __init
monet_swizzle(struct pci_dev *dev, int *pinp)
{
int slot, pin = *pinp;
/* Check first for the built-in bridge on hose 1. */
if (dev2hose(dev) == 1 && PCI_SLOT(dev->bus->self->devfn) == 8) {
slot = PCI_SLOT(dev->devfn);
}
else
{
/* Must be a card-based bridge. */
do {
/* Check for built-in bridge on hose 1. */
if (dev2hose(dev) == 1 &&
PCI_SLOT(dev->bus->self->devfn) == 8) {
slot = PCI_SLOT(dev->devfn);
break;
}
pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn)) ;
/* Move up the chain of bridges. */
dev = dev->bus->self;
/* Slot of the next bridge. */
slot = PCI_SLOT(dev->devfn);
} while (dev->bus->self);
}
*pinp = pin;
return slot;
}
static void __init
dp264_pci_fixup(void)
{
layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE);
/* must do map and/or swizzle different on some */
switch (MEMBER_ID(hwrpb->sys_variation)) {
case MONET_ID:
common_pci_fixup(monet_map_irq, monet_swizzle);
/* es1888_init(); */ /* later? */
break;
case DP264_ID:
case GOLDRUSH_ID:
case WEBBRICK_ID:
default:
common_pci_fixup(dp264_map_irq, common_swizzle);
break;
} /* end MEMBER_ID switch */
SMC669_Init();
}
......
......@@ -36,7 +36,7 @@ miata_update_irq_hw(unsigned long irq, unsigned long mask, int unmask_p)
if (irq >= 16) {
/* Make CERTAIN none of the bogus ints get enabled... */
*(vulp)PYXIS_INT_MASK =
~((long)mask >> 16) & ~0x4000000000000e3bUL;
~((long)mask >> 16) & ~0x400000000000063bUL;
mb();
/* ... and read it back to make sure it got written. */
*(vulp)PYXIS_INT_MASK;
......@@ -62,7 +62,7 @@ miata_device_interrupt(unsigned long vector, struct pt_regs *regs)
* then all the PCI slots/INTXs (12-31).
*/
/* Maybe HALT should only be used for SRM console boots? */
pld &= 0x00000000fffff1c4UL;
pld &= 0x00000000fffff9c4UL;
/*
* Now for every possible bit set, work through them and call
......@@ -101,8 +101,8 @@ miata_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
* used for this purpose, as PIC interrupts are delivered as the
* vectors 0x800-0x8f0).
* But I really don't want to change the fixup code for allocation
* of IRQs, nor the alpha_irq_mask maintenance stuff, both of which look
* nice and clean now.
* of IRQs, nor the alpha_irq_mask maintenance stuff, both of which
* look nice and clean now.
* So, here's this grotty hack... :-(
*/
if (irq >= 16)
......@@ -120,14 +120,15 @@ miata_init_irq(void)
alpha_mv.device_interrupt = miata_srm_device_interrupt;
/* Note invert on MASK bits. */
*(vulp)PYXIS_INT_MASK = ~((long)alpha_irq_mask >> 16); mb();
*(vulp)PYXIS_INT_MASK =
~((long)alpha_irq_mask >> 16) & ~0x400000000000063bUL; mb();
#if 0
/* These break on MiataGL so we'll try not to do it at all. */
*(vulp)PYXIS_INT_HILO = 0x000000B2UL; mb(); /* ISA/NMI HI */
*(vulp)PYXIS_RT_COUNT = 0UL; mb(); /* clear count */
#endif
/* Clear upper timer. */
*(vulp)PYXIS_INT_REQ = 0x4000000000000000UL; mb();
*(vulp)PYXIS_INT_REQ = 0x4000000000000180UL; mb();
enable_irq(16 + 2); /* enable HALT switch - SRM only? */
enable_irq(16 + 6); /* enable timer */
......@@ -209,22 +210,21 @@ miata_map_irq(struct pci_dev *dev, int slot, int pin)
{ -1, -1, -1, -1, -1}, /* IdSel 15, EIDE */
{ -1, -1, -1, -1, -1}, /* IdSel 16, none */
{ -1, -1, -1, -1, -1}, /* IdSel 17, none */
/* {16+11, 16+11, 16+11, 16+11, 16+11},*//* IdSel 17, USB ?? */
{ -1, -1, -1, -1, -1}, /* IdSel 18, PCI-ISA */
{ -1, -1, -1, -1, -1}, /* IdSel 19, PCI-PCI */
{ -1, -1, -1, -1, -1}, /* IdSel 20, none */
{ -1, -1, -1, -1, -1}, /* IdSel 21, none */
{16+12, 16+12, 16+13, 16+14, 16+15}, /* IdSel 22, slot 4 */
{16+16, 16+16, 16+17, 16+18, 16+19}, /* IdSel 23, slot 5 */
/* The following are actually on bus 1, which is
across the builtin PCI-PCI bridge. */
{16+20, 16+20, 16+21, 16+22, 16+23}, /* IdSel 24, slot 1 */
{16+24, 16+24, 16+25, 16+26, 16+27}, /* IdSel 25, slot 2 */
{16+28, 16+28, 16+29, 16+30, 16+31}, /* IdSel 26, slot 3 */
/* the next 7 are actually on PCI bus 1, across the bridge */
{16+11, 16+11, 16+11, 16+11, 16+11}, /* IdSel 24, QLISP/GL*/
{ -1, -1, -1, -1, -1}, /* IdSel 25, none */
{ -1, -1, -1, -1, -1}, /* IdSel 26, none */
{ -1, -1, -1, -1, -1}, /* IdSel 27, none */
{ -1, -1, -1, -1, -1}, /* IdSel 28, none */
{ -1, -1, -1, -1, -1}, /* IdSel 29, none */
{ -1, -1, -1, -1, -1}, /* IdSel 30, none */
{16+20, 16+20, 16+21, 16+22, 16+23}, /* IdSel 28, slot 1 */
{16+24, 16+24, 16+25, 16+26, 16+27}, /* IdSel 29, slot 2 */
{16+28, 16+28, 16+29, 16+30, 16+31}, /* IdSel 30, slot 3 */
/* this bridge is on the main bus of the later original MIATA */
{ -1, -1, -1, -1, -1}, /* IdSel 31, PCI-PCI */
};
const long min_idsel = 3, max_idsel = 20, irqs_per_slot = 5;
......@@ -239,7 +239,7 @@ miata_swizzle(struct pci_dev *dev, int *pinp)
/* Check first for the built-in bridge. */
if ((PCI_SLOT(dev->bus->self->devfn) == 8) ||
(PCI_SLOT(dev->bus->self->devfn) == 20)) {
slot = PCI_SLOT(dev->devfn) + 5;
slot = PCI_SLOT(dev->devfn) + 9;
}
else
{
......@@ -247,7 +247,7 @@ miata_swizzle(struct pci_dev *dev, int *pinp)
do {
if ((PCI_SLOT(dev->bus->self->devfn) == 8) ||
(PCI_SLOT(dev->bus->self->devfn) == 20)) {
slot = PCI_SLOT(dev->devfn) + 5;
slot = PCI_SLOT(dev->devfn) + 9;
break;
}
pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn));
......
......@@ -62,7 +62,7 @@ ruffian_ack_irq(unsigned long irq)
outb(0x20, 0x20);
} else {
/* Ack PYXIS PCI interrupt. */
*(vulp)PYXIS_INT_REQ = (1UL << (irq - 16));
*(vulp)PYXIS_INT_REQ = (1UL << (irq - 16)); mb();
/* ... and read it back to make sure it got written. */
*(vulp)PYXIS_INT_REQ;
}
......@@ -91,8 +91,8 @@ ruffian_device_interrupt(unsigned long vector, struct pt_regs *regs)
while (pld) {
i = ffz(~pld);
pld &= pld - 1; /* clear least bit set */
if (i == 7) {
/* Copy this bit from isa_device_interrupt cause
if (i == 7) { /* if ISA int */
/* Copy this code from isa_device_interrupt because
we need to hook into int 0 for the timer. I
refuse to soil device_interrupt with ifdefs. */
......@@ -107,13 +107,12 @@ ruffian_device_interrupt(unsigned long vector, struct pt_regs *regs)
if (j == 7 && !(inb(0x20) & 0x80)) {
/* It's only a passive release... */
} else if (j == 0) {
timer_interrupt(0, NULL, regs);
handle_irq(8, -1, regs); /* fake it */
ruffian_ack_irq(0);
} else {
handle_irq(j, j, regs);
}
} else {
/* if not timer int */
} else { /* if not an ISA int */
handle_irq(16 + i, 16 + i, regs);
}
......@@ -171,6 +170,7 @@ ruffian_pci_fixup(void)
}
#ifdef BUILDING_FOR_MILO
/*
* The DeskStation Ruffian motherboard firmware does not place
* the memory size in the PALimpure area. Therefore, we use
......@@ -207,6 +207,7 @@ ruffian_get_bank_size(unsigned long offset)
return ret;
}
#endif /* BUILDING_FOR_MILO */
static void __init
ruffian_init_arch(unsigned long *mem_start, unsigned long *mem_end)
......@@ -232,10 +233,12 @@ ruffian_init_pit (void)
static void
ruffian_kill_arch (int mode, char *reboot_cmd)
{
#if 0
/* this only causes re-entry to ARCSBIOS */
/* Perhaps this works for other PYXIS as well? */
*(vuip) PYXIS_RESET = 0x0000dead;
mb();
#endif
generic_kill_arch(mode, reboot_cmd);
}
......
......@@ -146,8 +146,6 @@ EXPORT_SYMBOL(ide_outsw);
EXPORT_SYMBOL(start_thread);
EXPORT_SYMBOL(__kernel_thread);
EXPORT_SYMBOL(__down_interruptible);
EXPORT_SYMBOL(__cli);
EXPORT_SYMBOL(__sti);
/*EXPORT_SYMBOL(__restore_flags);*/
......
......@@ -2582,7 +2582,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
tty->driver_data = info;
info->tty = tty;
if (serial_paranoia_check(info, tty->device, "rs_open")) {
MOD_DEC_USE_COUNT;
/* MOD_DEC_USE_COUNT; "info->tty" will cause this */
return -ENODEV;
}
......@@ -2595,7 +2595,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
if (!tmp_buf) {
page = get_free_page(GFP_KERNEL);
if (!page) {
MOD_DEC_USE_COUNT;
/* MOD_DEC_USE_COUNT; "info->tty" will cause this? */
return -ENOMEM;
}
if (tmp_buf)
......@@ -2611,7 +2611,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
(info->flags & ASYNC_CLOSING)) {
if (info->flags & ASYNC_CLOSING)
interruptible_sleep_on(&info->close_wait);
MOD_DEC_USE_COUNT;
/* MOD_DEC_USE_COUNT; "info->tty" will cause this? */
#ifdef SERIAL_DO_RESTART
return ((info->flags & ASYNC_HUP_NOTIFY) ?
-EAGAIN : -ERESTARTSYS);
......@@ -2625,13 +2625,13 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
*/
retval = startup(info);
if (retval) {
MOD_DEC_USE_COUNT;
/* MOD_DEC_USE_COUNT; "info->tty" will cause this? */
return retval;
}
retval = block_til_ready(tty, filp, info);
if (retval) {
MOD_DEC_USE_COUNT;
/* MOD_DEC_USE_COUNT; "info->tty" will cause this? */
#ifdef SERIAL_DEBUG_OPEN
printk("rs_open returning after block_til_ready with %d\n",
retval);
......
......@@ -4,10 +4,10 @@
mainmenu_option next_comment
comment 'Fibre Channel support'
tristate 'Fibre Channel and FC4 SCSI support' CONFIG_FC4 m
tristate 'Fibre Channel and FC4 SCSI support' CONFIG_FC4
if [ ! "$CONFIG_FC4" = "n" ]; then
comment 'FC4 drivers'
tristate 'Sun SOC/Sbus' CONFIG_FC4_SOC m
tristate 'Sun SOC/Sbus' CONFIG_FC4_SOC
comment 'FC4 targets'
dep_tristate 'SparcSTORAGE Array 100 and 200 series' CONFIG_SCSI_PLUTO $CONFIG_SCSI
else
......
......@@ -81,6 +81,7 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
tristate 'RealTek 8129/8139 (not 8019/8029!) support' CONFIG_RTL8139
tristate 'Packet Engines Yellowfin Gigabit-NIC support' CONFIG_YELLOWFIN
tristate 'Alteon AceNIC & 3Com 3C985 Gigabit support' CONFIG_ACENIC
fi
bool 'Other ISA cards' CONFIG_NET_ISA
if [ "$CONFIG_NET_ISA" = "y" ]; then
......
......@@ -538,6 +538,14 @@ else
endif
endif
ifeq ($(CONFIG_ACENIC),y)
L_OBJS += acenic.o
else
ifeq ($(CONFIG_ACENIC),m)
M_OBJS += acenic.o
endif
endif
ifeq ($(CONFIG_WAVELAN),y)
L_OBJS += wavelan.o
else
......
......@@ -114,6 +114,7 @@ extern int tc515_probe(struct device *dev);
/* Gigabit Ethernet adapters */
extern int yellowfin_probe(struct device *dev);
extern int acenic_probe(struct device *dev);
/* Detachable devices ("pocket adaptors") */
extern int atp_init(struct device *);
......@@ -198,6 +199,9 @@ struct devprobe pci_probes[] __initdata = {
#ifdef CONFIG_YELLOWFIN
{yellowfin_probe, 0},
#endif
#ifdef CONFIG_ACENIC
{acenic_probe, 0},
#endif
#ifdef CONFIG_VIA_RHINE
{via_rhine_probe, 0},
#endif
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -1107,8 +1107,9 @@ static int isp1020_reset_hardware(struct Scsi_Host *host)
#if RELOAD_FIRMWARE
/* Do not reload firmware if 1040B, i.e. revision 5 chip. */
if (((struct isp1020_hostdata *) host->hostdata)->revision == 5)
printk("qlogicisp : 1040B chip, firmware not (re)loaded\n");
if (((struct isp1020_hostdata *) host->hostdata)->revision >= 5)
printk("qlogicisp : 1040B or later chip,"
" firmware not (re)loaded\n");
else
{
int i;
......
......@@ -60,11 +60,12 @@ if [ "$CONFIG_FB" = "y" ]; then
if [ "$CONFIG_PCI" != "n" ]; then
tristate 'Matrox acceleration' CONFIG_FB_MATROX
if [ "$CONFIG_FB_MATROX" != "n" ]; then
bool ' Millenium I/II support' CONFIG_FB_MATROX_MILLENIUM
bool ' Millennium I/II support' CONFIG_FB_MATROX_MILLENIUM
bool ' Mystique support' CONFIG_FB_MATROX_MYSTIQUE
bool ' G100/G200 support' CONFIG_FB_MATROX_G100
bool ' Multihead support' CONFIG_FB_MATROX_MULTIHEAD
fi
bool 'ATI Mach64 display support' CONFIG_FB_ATY
fi
fi
if [ "$ARCH" = "sparc" -o "$ARCH" = "sparc64" ]; then
......
......@@ -718,12 +718,20 @@
/* mach64CT family / mach64VT class */
#define VT_CHIP_ID 0x5654 /* mach64VT (ATI264VT) */
#define VU_CHIP_ID 0x5655 /* mach64VTB (ATI264VTB) */
#define VV_CHIP_ID 0x5656 /* mach64VT4 (ATI264VT4) */
/* mach64CT family / mach64GT (3D RAGE) class */
#define LT_CHIP_ID 0x4c54 /* 3D RAGE LT */
#define LG_CHIP_ID 0x4c47 /* 3D RAGE LG */
#define GT_CHIP_ID 0x4754 /* 3D RAGE (GT) */
#define GU_CHIP_ID 0x4755 /* 3D RAGE II/II+ (GTB) */
#define LB_CHIP_ID 0x4c42 /* RAGE LT PRO, AGP */
#define LD_CHIP_ID 0x4c44 /* RAGE LT PRO */
#define LG_CHIP_ID 0x4c47 /* RAGE LT PRO */
#define LI_CHIP_ID 0x4c49 /* RAGE LT PRO */
#define LP_CHIP_ID 0x4c50 /* RAGE LT PRO */
#define LT_CHIP_ID 0x4c54 /* RAGE LT */
#define GT_CHIP_ID 0x4754 /* RAGE (GT) */
#define GU_CHIP_ID 0x4755 /* RAGE II/II+ (GTB) */
#define GV_CHIP_ID 0x4756 /* RAGE IIC, PCI */
#define GW_CHIP_ID 0x4757 /* RAGE IIC, AGP */
#define GZ_CHIP_ID 0x475a /* RAGE IIC, AGP */
#define GB_CHIP_ID 0x4742 /* RAGE PRO, BGA, AGP 1x and 2x */
#define GD_CHIP_ID 0x4744 /* RAGE PRO, BGA, AGP 1x only */
#define GI_CHIP_ID 0x4749 /* RAGE PRO, BGA, PCI33 only */
......
/* $Id: atyfb.c,v 1.89 1998/11/12 13:07:26 geert Exp $
/* $Id: atyfb.c,v 1.90 1998/11/20 12:27:03 geert Exp $
* linux/drivers/video/atyfb.c -- Frame buffer device for ATI Mach64
*
* Copyright (C) 1997-1998 Geert Uytterhoeven
......@@ -435,14 +435,20 @@ static struct aty_features {
/* mach64CT family / mach64VT class */
{ 0x5654, 0x5654, "mach64VT (ATI264VT)" },
{ 0x5655, 0x5655, "mach64VTB (ATI264VTB)" },
/* { 0x5656, 0x5656, "mach64VT4 (ATI264VT4)" }, */
{ 0x5656, 0x5656, "mach64VT4 (ATI264VT4)" },
/* mach64CT family / mach64GT (3D RAGE) class */
{ 0x4c42, 0x4c42, "3D RAGE LT PRO (AGP)" },
{ 0x4c42, 0x4c44, "3D RAGE LT PRO" },
{ 0x4c42, 0x4c47, "3D RAGE LT PRO" },
{ 0x4c42, 0x4c49, "3D RAGE LT PRO" },
{ 0x4c42, 0x4c50, "3D RAGE LT PRO" },
{ 0x4c54, 0x4c54, "3D RAGE LT" },
{ 0x4c47, 0x4c47, "3D RAGE LG" },
{ 0x4754, 0x4754, "3D RAGE (GT)" },
{ 0x4755, 0x4755, "3D RAGE II+ (GTB)" },
/* { 0x4756, 0x4756, "3D RAGE IIC" }, */
{ 0x4756, 0x4756, "3D RAGE IIC (PCI)" },
{ 0x4757, 0x4757, "3D RAGE IIC (AGP)" },
{ 0x475a, 0x475a, "3D RAGE IIC (AGP)" },
{ 0x4742, 0x4742, "3D RAGE PRO (BGA, AGP)" },
{ 0x4744, 0x4744, "3D RAGE PRO (BGA, AGP, 1x only)" },
{ 0x4749, 0x4749, "3D RAGE PRO (BGA, PCI)" },
......@@ -1144,8 +1150,7 @@ static int aty_var_to_crtc(const struct fb_info_aty *info,
crtc->off_pitch = ((yoffset*vxres+xoffset)*bpp/64) | (vxres<<19);
crtc->gen_cntl = pix_width | c_sync | CRTC_EXT_DISP_EN | CRTC_ENABLE;
if ((Gx == CT_CHIP_ID) || (Gx == ET_CHIP_ID) ||
((Gx == VT_CHIP_ID) && !(Rev & 0x03)) ||
((Gx == GT_CHIP_ID) && !(Rev & 0x03))) {
((Gx == VT_CHIP_ID || Gx == GT_CHIP_ID) && !(Rev & 0x07))) {
/* Not VTB/GTB */
/* FIXME: magic FIFO values */
crtc->gen_cntl |= aty_ld_le32(CRTC_GEN_CNTL, info) & 0x000e0000;
......@@ -1468,10 +1473,9 @@ static void aty_set_pll_ct(const struct fb_info_aty *info,
aty_st_pll(VCLK0_FB_DIV, pll->vclk_fb_div, info);
aty_st_pll(PLL_EXT_CNTL, pll->pll_ext_cntl, info);
if (((Gx == GT_CHIP_ID) && (Rev & 0x03)) || (Gx == GU_CHIP_ID) ||
(Gx == LG_CHIP_ID) || (Gx == GB_CHIP_ID) || (Gx == GD_CHIP_ID) ||
(Gx == GI_CHIP_ID) || (Gx == GP_CHIP_ID) || (Gx == GQ_CHIP_ID) ||
(Gx == VU_CHIP_ID)) {
if (!(Gx == GX_CHIP_ID || Gx == CX_CHIP_ID || Gx == CT_CHIP_ID ||
Gx == ET_CHIP_ID ||
((Gx == VT_CHIP_ID || Gx == GT_CHIP_ID) && !(Rev & 0x07)))) {
if (info->ram_type >= SDRAM)
aty_st_pll(DLL_CNTL, 0xa6, info);
else
......@@ -1494,8 +1498,9 @@ static int aty_dsp_gt(const struct fb_info_aty *info, u8 mclk_fb_div,
(vclk_fb_div*mclk_post_div*bpp);
if (xclks_per_row < (1<<11))
FAIL("Dotclock to high");
if ((Gx == GT_CHIP_ID) || (Gx == GU_CHIP_ID) || (Gx == VT_CHIP_ID) ||
(Gx == VU_CHIP_ID)) {
if (Gx == GT_CHIP_ID || Gx == GU_CHIP_ID || Gx == VT_CHIP_ID ||
Gx == VU_CHIP_ID || Gx == GV_CHIP_ID || Gx == GW_CHIP_ID ||
Gx == GZ_CHIP_ID) {
fifo_size = 24;
dsp_loop_latency = 0;
} else {
......@@ -1911,15 +1916,15 @@ static int encode_fix(struct fb_fix_screeninfo *fix,
* Reg Block 0 (CT-compatible block) is at ati_regbase_phys
* Reg Block 1 (multimedia extensions) is at ati_regbase_phys-0x400
*/
if ((Gx == GX_CHIP_ID) || (Gx == CX_CHIP_ID)) {
if (Gx == GX_CHIP_ID || Gx == CX_CHIP_ID) {
fix->mmio_start = (char *)info->ati_regbase_phys;
fix->mmio_len = 0x400;
fix->accel = FB_ACCEL_ATI_MACH64GX;
} else if ((Gx == CT_CHIP_ID) || (Gx == ET_CHIP_ID)) {
} else if (Gx == CT_CHIP_ID || Gx == ET_CHIP_ID) {
fix->mmio_start = (char *)info->ati_regbase_phys;
fix->mmio_len = 0x400;
fix->accel = FB_ACCEL_ATI_MACH64CT;
} else if ((Gx == VT_CHIP_ID) || (Gx == VU_CHIP_ID)) {
} else if (Gx == VT_CHIP_ID || Gx == VU_CHIP_ID || Gx == VV_CHIP_ID) {
fix->mmio_start = (char *)(info->ati_regbase_phys-0x400);
fix->mmio_len = 0x800;
fix->accel = FB_ACCEL_ATI_MACH64VT;
......@@ -2329,7 +2334,7 @@ static void atyfb_save_palette(struct fb_info *fb, int enter)
(Gx == GP_CHIP_ID) || (Gx == GQ_CHIP_ID))
tmp |= 0x2;
aty_st_8(DAC_CNTL, tmp, info);
aty_st_8(DAC_REGS + DAC_MASK, 0xff, info);
aty_st_8(DAC_MASK, 0xff, info);
eieio();
scale = ((Gx != GX_CHIP_ID) && (Gx != CX_CHIP_ID) &&
(info->current_par.crtc.bpp == 16)) ? 3 : 0;
......@@ -2460,10 +2465,14 @@ __initfunc(static int aty_init(struct fb_info_aty *info, const char *name))
(Gx == GU_CHIP_ID)) {
/* RAGE II+ */
pll = 200;
} else if ((Gx == GB_CHIP_ID) || (Gx == GD_CHIP_ID) ||
(Gx == GI_CHIP_ID) || (Gx == GP_CHIP_ID) ||
(Gx == GQ_CHIP_ID)) {
/* RAGE PRO */
} else if (Gx == GB_CHIP_ID || Gx == GD_CHIP_ID ||
Gx == GI_CHIP_ID || Gx == GP_CHIP_ID ||
Gx == GQ_CHIP_ID || Gx == VV_CHIP_ID ||
Gx == GV_CHIP_ID || Gx == GW_CHIP_ID ||
Gx == GZ_CHIP_ID || Gx == LD_CHIP_ID ||
Gx == LG_CHIP_ID || Gx == LB_CHIP_ID ||
Gx == LI_CHIP_ID || Gx == LP_CHIP_ID) {
/* RAGE PRO or IIC */
pll = 230;
} else {
/* other RAGE */
......@@ -2474,11 +2483,9 @@ __initfunc(static int aty_init(struct fb_info_aty *info, const char *name))
}
i = aty_ld_le32(MEM_CNTL, info);
gtb_memsize = (((Gx == GT_CHIP_ID) && (Rev & 0x03)) || (Gx == GU_CHIP_ID)
|| ((Gx == VT_CHIP_ID) && (Rev & 0x01)) || (Gx == VU_CHIP_ID)
|| (Gx == LG_CHIP_ID) || (Gx == GB_CHIP_ID)
|| (Gx == GD_CHIP_ID) || (Gx == GI_CHIP_ID)
|| (Gx == GP_CHIP_ID) || (Gx == GQ_CHIP_ID));
gtb_memsize = !(Gx == GX_CHIP_ID || Gx == CX_CHIP_ID || Gx == CT_CHIP_ID ||
Gx == ET_CHIP_ID ||
((Gx == VT_CHIP_ID || Gx == GT_CHIP_ID) && !(Rev & 0x07)));
if (gtb_memsize)
switch (i & 0xF) { /* 0xF used instead of MEM_SIZE_ALIAS */
case MEM_SIZE_512K:
......@@ -3303,7 +3310,7 @@ static int atyfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
(Gx == GP_CHIP_ID) || (Gx == GQ_CHIP_ID))
i |= 0x2; /*DAC_CNTL|0x2 turns off the extra brightness for gt*/
aty_st_8(DAC_CNTL, i, info);
aty_st_8(DAC_REGS + DAC_MASK, 0xff, info);
aty_st_8(DAC_MASK, 0xff, info);
eieio();
scale = ((Gx != GX_CHIP_ID) && (Gx != CX_CHIP_ID) &&
(info->current_par.crtc.bpp == 16)) ? 3 : 0;
......@@ -3398,14 +3405,8 @@ static inline void aty_rectcopy(int srcx, int srcy, int dstx, int dsty,
} else
direction |= DST_X_LEFT_TO_RIGHT;
wait_for_fifo(5, info);
wait_for_fifo(4, info);
aty_st_le32(DP_SRC, FRGD_SRC_BLIT, info);
/*
* ++Geert:
* Warning: SRC_OFF_PITCH may be thrashed by writing to other registers
* (e.g. CRTC_H_TOTAL_DISP, DP_SRC, DP_FRGD_CLR)
*/
aty_st_le32(SRC_OFF_PITCH, (pitch_value / 8) << 22, info);
aty_st_le32(SRC_Y_X, (srcx << 16) | srcy, info);
aty_st_le32(SRC_HEIGHT1_WIDTH1, (width << 16) | height, info);
aty_st_le32(DST_CNTL, direction, info);
......
This diff is collapsed.
This diff is collapsed.
......@@ -169,18 +169,25 @@ void fbcon_iplan2p2_bmove(struct display *p, int sy, int sx, int dy, int dx,
/* Special (but often used) case: Moving whole lines can be
* done with memmove()
*/
mymemmove(p->screen_base + ((dy * p->next_line) << fontheightlog(p)),
p->screen_base + ((sy * p->next_line) << fontheightlog(p)),
(p->next_line * height) << fontheightlog(p));
mymemmove(p->screen_base + dy * p->next_line * fontheight(p),
p->screen_base + sy * p->next_line * fontheight(p),
p->next_line * height * fontheight(p));
} else {
int rows, cols;
u8 *src;
u8 *dst;
int bytes = p->next_line;
int linesize = bytes << fontheightlog(p);
u_int colsize = height << fontheightlog(p);
int linesize;
u_int colsize;
u_int upwards = (dy < sy) || (dy == sy && dx < sx);
if (fontheightlog(p)) {
linesize = bytes << fontheightlog(p);
colsize = height << fontheightlog(p);
} else {
linesize = bytes * fontheight(p);
colsize = height * fontheight(p);
}
if ((sx & 1) == (dx & 1)) {
/* odd->odd or even->even */
if (upwards) {
......@@ -258,19 +265,30 @@ void fbcon_iplan2p2_clear(struct vc_data *conp, struct display *p, int sy,
u8 *start;
int rows;
int bytes = p->next_line;
int lines = height << fontheightlog(p);
int lines;
u32 size;
u32 cval;
u16 pcval;
cval = expand2l (COLOR_2P (attr_bgcol_ec(p,conp)));
if (fontheightlog(p))
lines = height << fontheightlog(p);
else
lines = height * fontheight(p);
if (sx == 0 && width * 2 == bytes) {
if (fontheightlog(p))
offset = (sy * bytes) << fontheightlog(p);
else
offset = sy * bytes * fontheight(p);
size = lines * bytes;
memset_even_2p(p->screen_base+offset, size, cval);
} else {
if (fontheightlog(p))
offset = ((sy * bytes) << fontheightlog(p)) + (sx>>1)*4 + (sx & 1);
else
offset = sy * bytes * fontheight(p) + (sx>>1)*4 + (sx & 1);
start = p->screen_base + offset;
pcval = expand2w(COLOR_2P(attr_bgcol_ec(p,conp)));
......@@ -306,8 +324,15 @@ void fbcon_iplan2p2_putc(struct vc_data *conp, struct display *p, int c,
int bytes = p->next_line;
u16 eorx, fgx, bgx, fdx;
dest = p->screen_base + ((yy * bytes) << fontheightlog(p)) + (xx>>1)*4 + (xx & 1);
if (fontheightlog(p)) {
dest = (p->screen_base + ((yy * bytes) << fontheightlog(p)) +
(xx>>1)*4 + (xx & 1));
cdat = p->fontdata + ((c & p->charmask) << fontheightlog(p));
} else {
dest = (p->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*4 + (xx & 1));
cdat = p->fontdata + (c & p->charmask) * fontheight(p);
}
fgx = expand2w(COLOR_2P(attr_fgcol(p,c)));
bgx = expand2w(COLOR_2P(attr_bgcol(p,c)));
......@@ -330,14 +355,22 @@ void fbcon_iplan2p2_putcs(struct vc_data *conp, struct display *p,
u16 eorx, fgx, bgx, fdx;
bytes = p->next_line;
dest0 = p->screen_base + ((yy * bytes) << fontheightlog(p)) + (xx>>1)*4 + (xx & 1);
if (fontheightlog(p))
dest0 = (p->screen_base + ((yy * bytes) << fontheightlog(p)) +
(xx>>1)*4 + (xx & 1));
else
dest0 = (p->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*4 + (xx & 1));
fgx = expand2w(COLOR_2P(attr_fgcol(p,*s)));
bgx = expand2w(COLOR_2P(attr_bgcol(p,*s)));
eorx = fgx ^ bgx;
while (count--) {
c = *s++ & p->charmask;
if (fontheightlog(p))
cdat = p->fontdata + (c << fontheightlog(p));
else
cdat = p->fontdata + c * fontheight(p);
for (rows = fontheight(p), dest = dest0; rows-- ; dest += bytes) {
fdx = dup2w(*cdat++);
......@@ -353,8 +386,12 @@ void fbcon_iplan2p2_revc(struct display *p, int xx, int yy)
int j;
int bytes;
if (fontheightlog(p))
dest = (p->screen_base + ((yy * p->next_line) << fontheightlog(p)) +
(xx>>1)*4 + (xx & 1));
else
dest = (p->screen_base + yy * p->next_line * fontheight(p) +
(xx>>1)*4 + (xx & 1));
j = fontheight(p);
bytes = p->next_line;
while (j--) {
......
......@@ -177,18 +177,25 @@ void fbcon_iplan2p4_bmove(struct display *p, int sy, int sx, int dy, int dx,
/* Special (but often used) case: Moving whole lines can be
*done with memmove()
*/
mymemmove(p->screen_base + ((dy * p->next_line) << fontheightlog(p)),
p->screen_base + ((sy * p->next_line) << fontheightlog(p)),
(p->next_line * height) << fontheightlog(p));
mymemmove(p->screen_base + dy * p->next_line * fontheight(p),
p->screen_base + sy * p->next_line * fontheight(p),
p->next_line * height * fontheight(p));
} else {
int rows, cols;
u8 *src;
u8 *dst;
int bytes = p->next_line;
int linesize = bytes << fontheightlog(p);
u_int colsize = height << fontheightlog(p);
int linesize;
u_int colsize;
u_int upwards = (dy < sy) || (dy == sy && dx < sx);
if (fontheightlog(p)) {
linesize = bytes << fontheightlog(p);
colsize = height << fontheightlog(p);
} else {
linesize = bytes * fontheight(p);
colsize = height * fontheight(p);
}
if ((sx & 1) == (dx & 1)) {
/* odd->odd or even->even */
......@@ -269,18 +276,29 @@ void fbcon_iplan2p4_clear(struct vc_data *conp, struct display *p, int sy,
u8 *start;
int rows;
int bytes = p->next_line;
int lines = height << fontheightlog(p);
int lines;
u32 size;
u32 cval1, cval2, pcval;
expand4dl(attr_bgcol_ec(p,conp), &cval1, &cval2);
if (fontheightlog(p))
lines = height << fontheightlog(p);
else
lines = height * fontheight(p);
if (sx == 0 && width * 4 == bytes) {
if (fontheightlog(p))
offset = (sy * bytes) << fontheightlog(p);
else
offset = sy * bytes * fontheight(p);
size = lines * bytes;
memset_even_4p(p->screen_base+offset, size, cval1, cval2);
} else {
if (fontheightlog(p))
offset = ((sy * bytes) << fontheightlog(p)) + (sx>>1)*8 + (sx & 1);
else
offset = sy * bytes * fontheight(p) + (sx>>1)*8 + (sx & 1);
start = p->screen_base + offset;
pcval = expand4l(attr_bgcol_ec(p,conp));
......@@ -316,8 +334,15 @@ void fbcon_iplan2p4_putc(struct vc_data *conp, struct display *p, int c,
int bytes = p->next_line;
u32 eorx, fgx, bgx, fdx;
dest = p->screen_base + ((yy * bytes) << fontheightlog(p)) + (xx>>1)*8 + (xx & 1);
if (fontheightlog(p)) {
dest = (p->screen_base + ((yy * bytes) << fontheightlog(p)) +
(xx>>1)*8 + (xx & 1));
cdat = p->fontdata + ((c & p->charmask) << fontheightlog(p));
} else {
dest = (p->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*8 + (xx & 1));
cdat = p->fontdata + (c & p->charmask) * fontheight(p);
}
fgx = expand4l(attr_fgcol(p,c));
bgx = expand4l(attr_bgcol(p,c));
......@@ -340,7 +365,12 @@ void fbcon_iplan2p4_putcs(struct vc_data *conp, struct display *p,
u32 eorx, fgx, bgx, fdx;
bytes = p->next_line;
dest0 = p->screen_base + ((yy * bytes) << fontheightlog(p)) + (xx>>1)*8 + (xx & 1);
if (fontheightlog(p))
dest0 = (p->screen_base + ((yy * bytes) << fontheightlog(p)) +
(xx>>1)*8 + (xx & 1));
else
dest0 = (p->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*8 + (xx & 1));
fgx = expand4l(attr_fgcol(p,*s));
bgx = expand4l(attr_bgcol(p,*s));
eorx = fgx ^ bgx;
......@@ -354,7 +384,10 @@ void fbcon_iplan2p4_putcs(struct vc_data *conp, struct display *p,
*/
c = *s++ & p->charmask;
if (fontheightlog(p))
cdat = p->fontdata + (c << fontheightlog(p));
else
cdat = p->fontdata + c * fontheight(p);
for(rows = fontheight(p), dest = dest0; rows-- ; dest += bytes) {
fdx = dup4l(*cdat++);
......@@ -370,8 +403,12 @@ void fbcon_iplan2p4_revc(struct display *p, int xx, int yy)
int j;
int bytes;
if (fontheightlog(p))
dest = (p->screen_base + ((yy * p->next_line) << fontheightlog(p)) +
(xx>>1)*8 + (xx & 1));
else
dest = (p->screen_base + yy * p->next_line * fontheight(p) +
(xx>>1)*8 + (xx & 1));
j = fontheight(p);
bytes = p->next_line;
......
......@@ -209,18 +209,25 @@ void fbcon_iplan2p8_bmove(struct display *p, int sy, int sx, int dy, int dx,
/* Special (but often used) case: Moving whole lines can be
* done with memmove()
*/
fast_memmove(p->screen_base + ((dy * p->next_line) << fontheightlog(p)),
p->screen_base + ((sy * p->next_line) << fontheightlog(p)),
(p->next_line * height) << fontheightlog(p));
fast_memmove(p->screen_base + dy * p->next_line * fontheight(p),
p->screen_base + sy * p->next_line * fontheight(p),
p->next_line * height * fontheight(p));
} else {
int rows, cols;
u8 *src;
u8 *dst;
int bytes = p->next_line;
int linesize = bytes << fontheightlog(p);
u_int colsize = height << fontheightlog(p);
int linesize;
u_int colsize;
u_int upwards = (dy < sy) || (dy == sy && dx < sx);
if (fontheightlog(p)) {
linesize = bytes << fontheightlog(p);
colsize = height << fontheightlog(p);
} else {
linesize = bytes * fontheight(p);
colsize = height * fontheight(p);
}
if ((sx & 1) == (dx & 1)) {
/* odd->odd or even->even */
......@@ -301,18 +308,29 @@ void fbcon_iplan2p8_clear(struct vc_data *conp, struct display *p, int sy,
u8 *start;
int rows;
int bytes = p->next_line;
int lines = height << fontheightlog(p);
int lines;
u32 size;
u32 cval1, cval2, cval3, cval4, pcval1, pcval2;
expand8ql(attr_bgcol_ec(p,conp), &cval1, &cval2, &cval3, &cval4);
if (fontheightlog(p))
lines = height << fontheightlog(p);
else
lines = height * fontheight(p);
if (sx == 0 && width * 8 == bytes) {
if (fontheightlog(p))
offset = (sy * bytes) << fontheightlog(p);
else
offset = sy * bytes * fontheight(p);
size = lines * bytes;
memset_even_8p(p->screen_base+offset, size, cval1, cval2, cval3, cval4);
} else {
if (fontheightlog(p))
offset = ((sy * bytes) << fontheightlog(p)) + (sx>>1)*16 + (sx & 1);
else
offset = sy * bytes * fontheight(p) + (sx>>1)*16 + (sx & 1);
start = p->screen_base + offset;
expand8dl(attr_bgcol_ec(p,conp), &pcval1, &pcval2);
......@@ -348,8 +366,15 @@ void fbcon_iplan2p8_putc(struct vc_data *conp, struct display *p, int c,
int bytes = p->next_line;
u32 eorx1, eorx2, fgx1, fgx2, bgx1, bgx2, fdx;
dest = p->screen_base + ((yy * bytes) << fontheightlog(p)) + (xx>>1)*16 + (xx & 1);
if (fontheightlog(p)) {
dest = (p->screen_base + ((yy * bytes) << fontheightlog(p)) +
(xx>>1)*16 + (xx & 1));
cdat = p->fontdata + ((c & p->charmask) << fontheightlog(p));
} else {
dest = (p->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*16 + (xx & 1));
cdat = p->fontdata + (c & p->charmask) * fontheight(p);
}
expand8dl(attr_fgcol(p,c), &fgx1, &fgx2);
expand8dl(attr_bgcol(p,c), &bgx1, &bgx2);
......@@ -372,8 +397,12 @@ void fbcon_iplan2p8_putcs(struct vc_data *conp, struct display *p,
u32 eorx1, eorx2, fgx1, fgx2, bgx1, bgx2, fdx;
bytes = p->next_line;
dest0 = p->screen_base + ((yy * bytes) << fontheightlog(p)) + (xx>>1)*16 +
(xx & 1);
if (fontheightlog(p))
dest0 = (p->screen_base + ((yy * bytes) << fontheightlog(p)) +
(xx>>1)*16 + (xx & 1));
else
dest0 = (p->screen_base + yy * bytes * fontheight(p) +
(xx>>1)*16 + (xx & 1));
expand8dl(attr_fgcol(p,*s), &fgx1, &fgx2);
expand8dl(attr_bgcol(p,*s), &bgx1, &bgx2);
......@@ -389,7 +418,10 @@ void fbcon_iplan2p8_putcs(struct vc_data *conp, struct display *p,
*/
c = *s++ & p->charmask;
if (fontheightlog(p))
cdat = p->fontdata + (c << fontheightlog(p));
else
cdat = p->fontdata + c * fontheight(p);
for(rows = fontheight(p), dest = dest0; rows-- ; dest += bytes) {
fdx = dup4l(*cdat++);
......@@ -405,8 +437,12 @@ void fbcon_iplan2p8_revc(struct display *p, int xx, int yy)
int j;
int bytes;
if (fontheightlog(p))
dest = (p->screen_base + ((yy * p->next_line) << fontheightlog(p)) +
(xx>>1)*16 + (xx & 1));
else
dest = (p->screen_base + yy * p->next_line * fontheight(p) +
(xx>>1)*16 + (xx & 1));
j = fontheight(p);
bytes = p->next_line;
......
......@@ -530,6 +530,9 @@ static void fbcon_setup(int con, int init, int logo)
conp->vc_rows = nr_rows;
}
p->vrows = p->var.yres_virtual/fontheight(p);
if ((p->var.yres % fontheight(p)) &&
(p->var.yres_virtual % fontheight(p) < p->var.yres % fontheight(p)))
p->vrows--;
conp->vc_can_do_color = p->var.bits_per_pixel != 1;
conp->vc_complement_mask = conp->vc_can_do_color ? 0x7700 : 0x0800;
if (charcnt == 256) {
......@@ -1211,7 +1214,7 @@ static int fbcon_blank(struct vc_data *conp, int blank)
p->var.xres_virtual*p->var.yres_virtual*
p->var.bits_per_pixel>>3);
} else
p->dispsw->clear(NULL, p, 0, 0, p->conp->vc_rows, p->conp->vc_cols);
p->dispsw->clear(conp, p, 0, 0, conp->vc_rows, conp->vc_cols);
return 0;
} else {
/* Tell console.c that it has to restore the screen itself */
......@@ -1339,6 +1342,8 @@ static int fbcon_do_set_font(int unit, struct console_font_op *op, u8 *data, int
/* reset wrap/pan */
p->var.xoffset = p->var.yoffset = p->yscroll = 0;
p->vrows = p->var.yres_virtual/h;
if ((p->var.yres % h) && (p->var.yres_virtual % h < p->var.yres % h))
p->vrows--;
updatescrollmode(p);
vc_resize_con( p->var.yres/h, p->var.xres/w, unit );
} else if (CON_IS_VISIBLE(p->conp) && vt_cons[unit]->vc_mode == KD_TEXT) {
......@@ -1786,8 +1791,15 @@ __initfunc(static int fbcon_show_logo( void ))
unsigned char val, mask;
int plane = p->next_plane;
#if defined(CONFIG_FBCON_IPLAN2P2) || defined(CONFIG_FBCON_IPLAN2P4) || \
defined(CONFIG_FBCON_IPLAN2P8)
int line_length = p->line_length;
/* for support of Atari interleaved planes */
#define MAP_X(x) (plane > line ? x : (x & ~1)*depth + (x & 1))
#define MAP_X(x) (line_length ? x : (x & ~1)*depth + (x & 1))
#else
#define MAP_X(x) (x)
#endif
/* extract a bit from the source image */
#define BIT(p,pix,bit) (p[pix*logo_depth/8] & \
(1 << ((8-((pix*logo_depth)&7)-logo_depth) + bit)))
......
......@@ -281,7 +281,6 @@ static int set_all_vcs(int fbidx, struct fb_ops *fb,
var->activate &= ~FB_ACTIVATE_TEST;
if (err)
return err;
info->disp->var = *var;
for (unit = 0; unit < MAX_NR_CONSOLES; unit++)
if (fb_display[unit].conp && con2fb_map[unit] == fbidx)
fb->fb_set_var(var, unit, info);
......
This diff is collapsed.
......@@ -301,6 +301,9 @@ extern void imsttfb_of_init(struct device_node *dp);
#ifdef CONFIG_FB_CT65550
extern void chips_of_init(struct device_node *dp);
#endif /* CONFIG_FB_CT65550 */
#ifdef CONFIG_FB_MATROX
extern void matrox_of_init(struct device_node *dp);
#endif /* CONFIG_FB_MATROX */
#ifdef CONFIG_FB_CONTROL
extern void control_of_init(struct device_node *dp);
#endif /* CONFIG_FB_CONTROL */
......@@ -411,6 +414,12 @@ __initfunc(static int offb_init_driver(struct device_node *dp))
return 1;
}
#endif /* CONFIG_FB_CT65550 */
#ifdef CONFIG_FB_MATROX
if (!strncmp(dp->name, "MTRX", 4)) {
matrox_of_init(dp);
return 1;
}
#endif /* CONFIG_FB_MATROX */
#ifdef CONFIG_FB_CONTROL
if(!strcmp(dp->name, "control")) {
control_of_init(dp);
......@@ -857,10 +866,21 @@ int console_setmode(struct vc_mode *mode, int doit)
}
if ((err = mac_vmode_to_var(mode->mode, cmode, &var)))
return err;
var.activate = doit ? FB_ACTIVATE_NOW : FB_ACTIVATE_TEST;
var.activate = FB_ACTIVATE_TEST;
err = console_fb_info->fbops->fb_set_var(&var, fg_console,
console_fb_info);
if (err || !doit)
return err;
else {
int unit;
var.activate = FB_ACTIVATE_NOW;
for (unit = 0; unit < MAX_NR_CONSOLES; unit++)
if (fb_display[unit].conp &&
(GET_FB_IDX(console_fb_info->node) == con2fb_map[unit]))
console_fb_info->fbops->fb_set_var(&var, unit,
console_fb_info);
}
return 0;
}
static u16 palette_red[16];
......
......@@ -242,7 +242,9 @@ static int currcon = 0;
static struct display disp;
static struct fb_info fb_info;
static struct { u_char red, green, blue, pad; } palette[256];
#ifdef FBCON_HAS_CFB32
static u32 fbcon_cfb32_cmap[16];
#endif
static struct fb_fix_screeninfo fb_fix = { { "DEC TGA ", } };
static struct fb_var_screeninfo fb_var = { 0, };
......
......@@ -130,6 +130,8 @@ static int vesafb_pan_display(struct fb_var_screeninfo *var, int con,
{
int offset;
if (!ypan && !ywrap)
return -EINVAL;
if (var->xoffset)
return -EINVAL;
if (ypan && var->yoffset+var->yres > var->yres_virtual)
......
......@@ -32,7 +32,7 @@ extern struct linux_hose_info *bus2hose[256];
#if defined(CONFIG_ALPHA_GENERIC) \
|| defined(CONFIG_ALPHA_MCPCIA) \
/* || defined(CONFIG_ALPHA_TSUNAMI) */
|| defined(CONFIG_ALPHA_TSUNAMI)
#define PCI_HANDLE(bus) ((bus2hose[bus]->pci_hose_index & 3UL) << 32)
#define DEV_IS_ON_PRIMARY(dev) \
......
......@@ -49,7 +49,6 @@ extern struct consw *conswitchp;
extern struct consw dummy_con; /* dummy console buffer */
extern struct consw fb_con; /* frame buffer based console */
extern struct consw vga_con; /* VGA text console */
extern struct consw compat_con; /* console wrapper */
extern struct consw prom_con; /* SPARC PROM console */
void take_over_console(struct consw *sw, int first, int last, int deflt);
......
......@@ -20,6 +20,7 @@
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/smp_lock.h>
#include <linux/blk.h>
#include <asm/io.h>
#include <asm/bugs.h>
......
......@@ -8,6 +8,7 @@
#include <linux/mm.h>
#include <linux/smp_lock.h>
#include <linux/interrupt.h>
#include <asm/uaccess.h>
......
......@@ -242,7 +242,7 @@ function tristate () {
# are nested, and one module requires the presence of something
# else in the kernel.
#
# tristate question define default ...
# dep_tristate question define default ...
#
function dep_tristate () {
old=$(eval echo "\${$2}")
......
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