Commit adbc4706 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

v2.4.6.1 -> v2.4.6.2

  - merge with Alan (USB, zoran, sony motion-eye, rio, dmi-scan)
parent 17023327
......@@ -78,8 +78,8 @@ P: 1024/85AD9EED AD C0 49 08 91 67 DF D7 FA 04 1A EE 09 E8 44 B0
D: Unix98 pty support.
D: APM update to 1.2 spec.
D: /devfs hacking.
S: 322 N. Riverside Dr.
S: Neptune, NJ 07753
S: 7 Kiwi Loop
S: Howell, NJ 07731
S: USA
N: Erik Andersen
......@@ -679,6 +679,14 @@ S: Ottawa, Ontario
S: K1N 6Z9
S: CANADA
N: Jeff Dike
E: jdike@karaya.com
W: http://user-mode-linux.sourceforge.net
D: User mode kernel port
S: RR1 Box 67C
S: Deering NH 03244
S: USA
N: Eddie C. Dost
E: ecd@skynet.be
D: Linux/Sparc kernel hacker
......@@ -1062,6 +1070,11 @@ S: PO-Box 297
S: 2400 AG, Alphen aan den Rijn
S: The Netherlands
N: Enver Haase
E: ehaase@inf.fu-berlin.de
W: http://www.inf.fu-berlin.de/~ehaase
D: Driver for the Commodore A2232 serial board
N: Bruno Haible
E: haible@ma2s2.mathematik.uni-karlsruhe.de
D: SysV FS, shm swapping, memory management fixes
......@@ -1275,12 +1288,11 @@ S: Pittsburgh, PA 15203-1250
S: USA
N: Gareth Hughes
E: gareth@valinux.com
E: gareth@precisioninsight.com
E: gareth.hughes@acm.org
D: Pentium III FXSR, SSE support
S: 11/187 West Street
S: Crows Nest NSW 2065
S: Australia
D: Author/maintainer of most DRM drivers (especially ATI, MGA)
D: Core DRM templates, general DRM and 3D-related hacking
S: No fixed address
N: Kenn Humborg
E: kenn@wombat.ie
......@@ -2259,6 +2271,15 @@ N: Ken Pizzini
E: ken@halcyon.com
D: CDROM driver "sonycd535" (Sony CDU-535/531)
N: Stelian Pop
E: stelian.pop@fr.alcove.com
P: 1024D/EDBB6147 7B36 0E07 04BC 11DC A7A0 D3F7 7185 9E7A EDBB 6147
D: sonypi, meye drivers, mct_u232 usb serial hacks
S: Alcve
S: 153, bd. Anatole France
S: 93200 Saint Denis
S: France
N: Frederic Potter
E: fpotter@cirpack.com
D: Some PCI kernel support
......@@ -2355,14 +2376,15 @@ S: 75019 Paris
S: France
N: Rik van Riel
E: riel@nl.linux.org
W: http://www.nl.linux.org/~riel/
E: riel@conectiva.com.br
W: http://www.surriel.com/
D: Linux-MM site, Documentation/sysctl/*, swap/mm readaround
D: clustering contributor, kswapd fixes, random kernel hacker,
D: nl.linux.org maintainer, minor scheduler additions
S: IJsselstraat 23a
S: 9725 GA Groningen
S: The Netherlands
D: nl.linux.org administrator, minor scheduler additions
S: Conectiva S.A.
S: R. Tocantins, 89 - Cristo Rei
S: 80050-430 - Curitiba - Paran
S: Brazil
N: Pekka Riikonen
E: priikone@poseidon.pspt.fi
......@@ -2868,6 +2890,7 @@ S: Belgium
N: Petr Vandrovec
E: vandrove@vc.cvut.cz
D: Small contributions to ncpfs
D: Matrox framebuffer driver
S: Chudenicka 8
S: 10200 Prague 10, Hostivar
S: Czech Republic
......
Sony Programmable I/O Control Device Driver Readme
--------------------------------------------------
Copyright (C) 2001 Stelian Pop <stelian.pop@fr.alcove.com>, Alcôve
Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au>
Copyright (C) 2001 Junichi Morita <jun1m@mars.dti.ne.jp>
Copyright (C) 2000 Takaya Kinjo <t-kinjo@tc4.so-net.ne.jp>
Copyright (C) 2000 Andrew Tridgell <tridge@samba.org>
This driver enables access to the Sony Programmable I/O Control Device which
can be found in many (all ?) Sony Vaio laptops.
It will give access (through a user space utility) to some events those laptops
generate, like:
- jogdial events (the small wheel on the side of Vaios)
- capture button events (only on Vaio Picturebook series)
- Fn keys
- bluetooth button (only on C1VR model)
Those events (see linux/sonypi.h) can be polled using the character device node
/dev/sonypi (major 10, minor auto allocated or specified as a option).
A simple daemon which translates the jogdial movements into mouse wheel events
can be downloaded at: <http://www.alcove-labs.org/en/software/sonypi/>
This driver supports also some ioctl commands for setting the LCD screen
brightness (some more commands may be added in the future).
This driver can also be used to set the camera controls on Picturebook series
(brightness, contrast etc), and is used by the video4linux driver for the
Motion Eye camera.
Please note that this driver was created by reverse engineering the Windows
driver and the ACPI BIOS, because Sony doesn't agree to release any programming
specs for its laptops. If someone convinces them to do so, drop me a note.
Module options:
---------------
minor: minor number of the misc device /dev/sonypi,
default is -1 (automatic allocation, see /proc/misc
or kernel logs)
camera: if you have a PictureBook series Vaio (with the
integrated MotionEye camera), set this parameter to 1
in order to let the driver access to the camera
fnkeyinit: on some Vaios (C1VE, C1VR etc), the Fn key events don't
get enabled unless you set this parameter to 1
verbose: print unknown events from the sonypi device
Module use:
-----------
In order to automatically load the sonypi module on use, you can put those
lines in your /etc/modules.conf file:
alias char-major-10-250 sonypi
options sonypi minor=250 fnkeyinit=1
This supposes the use of minor 250 for the sonypi device:
# mknod /dev/sonypi c 10 250
Bugs:
-----
- since all development was done by reverse engineering, there is
_absolutely no guarantee_ that this driver will not crash your
laptop. Permanently.
This diff is collapsed.
Vaio Picturebook Motion Eye Camera Driver Readme
------------------------------------------------
Copyright (C) 2001 Stelian Pop <stelian.pop@fr.alcove.com>, Alcôve
Copyright (C) 2000 Andrew Tridgell <tridge@samba.org>
This driver enable the use of video4linux compatible applications with the
Motion Eye camera.
It can do at maximum 30 fps @ 320x240 or 15 fps @ 640x480.
Grabbing is supported in packed YUV colorspace only.
MJPEG hardware grabbing is supported via a private API (see below).
Module options:
---------------
gbuffers: number of capture buffers, default is 2 (32 max)
gbufsize: size of each capture buffer, default is 614400
video_nr: video device to register (0 = /dev/video0, etc)
Module use:
-----------
In order to automatically load the meye module on use, you can put those lines
in your /etc/modules.conf file:
alias char-major-81 videodev
alias char-major-81-0 meye
options meye gbuffers=32
Usage:
------
xawtv >= 3.49 (<http://bytesex.org/xawtv/>)
for display and uncompressed video capture:
xawtv -c /dev/video0 -geometry 640x480
or
xawtv -c /dev/video0 -geometry 320x240
motioneye (<http://www.alcove-labs.org/en/software/meye/>)
for getting ppm or jpg snapshots, mjpeg video
Private API:
------------
The driver supports frame grabbing with the video4linux API, so
all video4linux tools (like xawtv) should work with this driver.
Besides the video4linux interface, the driver has a private interface
for accessing the Motion Eye extended parameters (camera sharpness,
agc, video framerate), the shapshot and the MJPEG capture facilities.
This interface consists of several ioctls (prototypes and structures
can be found in include/linux/meye.h):
MEYEIOC_G_PARAMS
MEYEIOC_S_PARAMS
Get and set the extended parameters of the motion eye camera.
The user should always query the current parameters with
MEYEIOC_G_PARAMS, change what he likes and then issue the
MEYEIOC_S_PARAMS call (checking for -EINVAL). The extended
parameters are described by the meye_params structure.
MEYEIOC_QBUF_CAPT
Queue a buffer for capture (the buffers must have been
obtained with a VIDIOCGMBUF call and mmap'ed by the
application). The argument to MEYEIOC_QBUF_CAPT is the
buffer number to queue (or -1 to end capture). The first
call to MEYEIOC_QBUF_CAPT starts the streaming capture.
MEYEIOC_SYNC
Takes as an argument the buffer number you want to sync.
This ioctl blocks untils the buffer is filled and ready
for the application to use. It returns the buffer size.
MEYEIOC_STILLCAPT
MEYEIOC_STILLJCAPT
Takes a snapshot in an uncompressed or compressed jpeg format.
This ioctl blocks until the snapshot is done and returns (for
jpeg snapshot) the size of the image. The image data is
available from the first mmap'ed buffer.
Look at the 'motioneye' application code for an actual example.
Bugs / Todo:
------------
- overlay output is not supported (although the camera is capable of).
(it should not be too hard to to it, provided we found how...)
- mjpeg hardware playback doesn't work (depends on overlay...)
- rewrite the driver to use some commun video4linux API for snapshot
and mjpeg capture. Unfortunately, video4linux1 does not permit it,
the BUZ API seems to be targeted to TV cards only. The video4linux 2
API may be an option, if it goes into the kernel (maybe 2.5
material ?).
W9966 Camera driver, written by Jakob Kemi (jakob.kemi@post.utfors.se)
Ok, after a lot of work in softice, wdasm, reading pdf-files
and trial-and-error work I've finally got everything to work.
Since I needed some vision for a robotics project I borrowed
this camera from a friend and started hacking. Anyway I've
converted my original code from the AVR 8bit RISC C/asm
into a working linux driver. I would really appreciate _any_
kind of feedback regarding this driver.
To get it working quickly configure your kernel
to support parport, ieee1284, video4linux, experimental drivers
and w9966
If w9966 is statically linked it will perform aggressive probing
for the camera. If built as a module you'll have more configuration options.
Options:
modprobe w9966.o pardev=parport0(or whatever) parmode=0 (0=auto, 1=ecp, 2=epp)
voila!
you can also type 'modinfo -p w9966.o' for option usage
(or checkout w9966.c)
I've only tested it with custom built testprograms
(http://hem.fyristorg.com/mogul/w9966.html) and with gqcam.
(you'll need to tweak the code to qcam a bit to make it work,
dimensions and such)
The slow framerate is due to missing DMA ECP read support in the
parport drivers. I might add working EPP support later.
Good luck!
/Jakob
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 7
EXTRAVERSION =-pre1
EXTRAVERSION =-pre2
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
......
......@@ -8,6 +8,7 @@
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <asm/page.h> /* for BUG() */
......@@ -18,6 +19,20 @@
static int debug_pci;
int have_isa_bridge;
struct pci_sys_data {
/*
* The hardware we are attached to
*/
struct hw_pci *hw;
unsigned long mem_offset;
/*
* These are the resources for the root bus.
*/
struct resource *resource[3];
};
void pcibios_report_status(u_int status_mask, int warn)
{
struct pci_dev *dev;
......@@ -118,19 +133,22 @@ static void __init pci_fixup_unassign(struct pci_dev *dev)
}
/*
* Prevent the PCI layer from seeing the resources
* allocated to this device. These resources are
* of no consequence to the PCI layer (they are
* handled elsewhere).
* Prevent the PCI layer from seeing the resources allocated to this device
* if it is the host bridge by marking it as such. These resources are of
* no consequence to the PCI layer (they are handled elsewhere).
*/
static void __init pci_fixup_disable(struct pci_dev *dev)
static void __init pci_fixup_dec21285(struct pci_dev *dev)
{
int i;
for (i = 0; i < PCI_NUM_RESOURCES; i++) {
dev->resource[i].start = 0;
dev->resource[i].end = 0;
dev->resource[i].flags = 0;
if (dev->devfn == 0) {
dev->class &= 0xff;
dev->class |= PCI_CLASS_BRIDGE_HOST << 8;
for (i = 0; i < PCI_NUM_RESOURCES; i++) {
dev->resource[i].start = 0;
dev->resource[i].end = 0;
dev->resource[i].flags = 0;
}
}
}
......@@ -167,7 +185,7 @@ struct pci_fixup pcibios_fixups[] = {
{
PCI_FIXUP_HEADER,
PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285,
pci_fixup_disable
pci_fixup_dec21285
}, {
PCI_FIXUP_HEADER,
PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_83C553,
......@@ -187,27 +205,11 @@ struct pci_fixup pcibios_fixups[] = {
}, { 0 }
};
/*
* Allocate resources for all PCI devices that have been enabled.
* We need to do that before we try to fix up anything.
*/
static void __init pcibios_claim_resources(void)
{
struct pci_dev *dev;
int idx;
pci_for_each_dev(dev) {
for (idx = 0; idx < PCI_NUM_RESOURCES; idx++)
if (dev->resource[idx].flags &&
dev->resource[idx].start)
pci_claim_resource(dev, idx);
}
}
void __init
pcibios_update_resource(struct pci_dev *dev, struct resource *root,
struct resource *res, int resource)
{
struct pci_sys_data *sys = dev->sysdata;
u32 val, check;
int reg;
......@@ -216,12 +218,9 @@ pcibios_update_resource(struct pci_dev *dev, struct resource *root,
res->flags & IORESOURCE_IO ? "IO" : "MEM",
res->start, dev->name);
val = res->start | (res->flags & PCI_REGION_FLAG_MASK);
if (resource < 6) {
reg = PCI_BASE_ADDRESS_0 + 4*resource;
} else if (resource == PCI_ROM_RESOURCE) {
res->flags |= PCI_ROM_ADDRESS_ENABLE;
val |= PCI_ROM_ADDRESS_ENABLE;
reg = dev->rom_base_reg;
} else {
/* Somebody might have asked allocation of a
......@@ -229,6 +228,12 @@ pcibios_update_resource(struct pci_dev *dev, struct resource *root,
*/
return;
}
val = res->start;
if (res->flags & IORESOURCE_MEM)
val -= sys->mem_offset;
val |= res->flags & PCI_REGION_FLAG_MASK;
pci_write_config_dword(dev, reg, val);
pci_read_config_dword(dev, reg, &check);
if ((val ^ check) & ((val & PCI_BASE_ADDRESS_SPACE_IO) ?
......@@ -246,77 +251,93 @@ void __init pcibios_update_irq(struct pci_dev *dev, int irq)
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);
}
/**
* pcibios_fixup_bus - Called after each bus is probed, but before its children
* are examined.
/*
* If the bus contains any of these devices, then we must not turn on
* parity checking of any kind. Currently this is CyberPro 20x0 only.
*/
void __init pcibios_fixup_bus(struct pci_bus *bus)
static inline int pdev_bad_for_parity(struct pci_dev *dev)
{
struct list_head *walk = &bus->devices;
struct arm_pci_sysdata *sysdata =
(struct arm_pci_sysdata *)bus->sysdata;
struct arm_bus_sysdata *busdata;
return (dev->vendor == PCI_VENDOR_ID_INTERG &&
(dev->device == PCI_DEVICE_ID_INTERG_2000 ||
dev->device == PCI_DEVICE_ID_INTERG_2010));
}
if (bus->number >= MAX_NR_BUS)
BUG();
/*
* Adjust the device resources from bus-centric to Linux-centric.
*/
static void __init
pdev_fixup_device_resources(struct pci_sys_data *root, struct pci_dev *dev)
{
int i;
if (bus->self) {
struct pci_dev *dev = bus->self;
int i;
for (i = 0; i < PCI_NUM_RESOURCES; i++) {
if (dev->resource[i].start == 0)
continue;
if (dev->resource[i].flags & IORESOURCE_MEM) {
dev->resource[i].start += root->mem_offset;
dev->resource[i].end += root->mem_offset;
}
}
}
static void __init
pbus_assign_bus_resources(struct pci_bus *bus, struct pci_sys_data *root)
{
struct pci_dev *dev = bus->self;
int i;
if (dev) {
for (i = 0; i < 3; i++) {
bus->resource[i] = &dev->resource[PCI_BRIDGE_RESOURCES + i];
bus->resource[i]->name = bus->name;
bus->resource[i] = &dev->resource[PCI_BRIDGE_RESOURCES+i];
bus->resource[i]->name = bus->name;
}
bus->resource[0]->start = ioport_resource.start;
bus->resource[0]->end = ioport_resource.end;
bus->resource[0]->flags |= pci_bridge_check_io(dev);
bus->resource[1]->start = iomem_resource.start;
bus->resource[1]->end = iomem_resource.end;
bus->resource[1]->flags |= IORESOURCE_MEM;
/* Turn off downsteam prefetchable memory address range */
bus->resource[2]->start = 1024*1024;
bus->resource[2]->end = bus->resource[2]->start - 1;
if (root->resource[2])
bus->resource[2]->flags = root->resource[2]->flags;
else {
/* no prefetchable memory region - disable it */
bus->resource[2]->start = 1024*1024;
bus->resource[2]->end = bus->resource[2]->start - 1;
}
} else {
/*
* Assign root bus resources.
*/
for (i = 0; i < 3; i++)
bus->resource[i] = root->resource[i];
}
}
busdata = sysdata->bus + bus->number;
busdata->max_lat = 255;
/*
* pcibios_fixup_bus - Called after each bus is probed,
* but before its children are examined.
*/
void __init pcibios_fixup_bus(struct pci_bus *bus)
{
struct pci_sys_data *root = bus->sysdata;
struct list_head *walk;
u16 features = PCI_COMMAND_SERR | PCI_COMMAND_PARITY;
u16 all_status = -1;
pbus_assign_bus_resources(bus, root);
/*
* Walk the devices on this bus, working out what we can
* and can't support.
*/
for (walk = walk->next; walk != &bus->devices; walk = walk->next) {
for (walk = bus->devices.next; walk != &bus->devices; walk = walk->next) {
struct pci_dev *dev = pci_dev_b(walk);
u16 status;
u8 max_lat, min_gnt;
pci_read_config_word(dev, PCI_STATUS, &status);
pdev_fixup_device_resources(root, dev);
/*
* If this device does not support fast back to back
* transfers, the bus as a whole cannot support them.
*/
if (!(status & PCI_STATUS_FAST_BACK))
busdata->features &= ~PCI_COMMAND_FAST_BACK;
/*
* If we encounter a CyberPro 2000, then we disable
* SERR and PERR reporting - this chip doesn't drive the
* parity line correctly.
*/
if (dev->vendor == PCI_VENDOR_ID_INTERG &&
(dev->device == PCI_DEVICE_ID_INTERG_2000 ||
dev->device == PCI_DEVICE_ID_INTERG_2010))
busdata->features &= ~(PCI_COMMAND_SERR |
PCI_COMMAND_PARITY);
pci_read_config_word(dev, PCI_STATUS, &status);
all_status &= status;
/*
* Calculate the maximum devsel latency.
*/
if (busdata->maxdevsel < (status & PCI_STATUS_DEVSEL_MASK))
busdata->maxdevsel = (status & PCI_STATUS_DEVSEL_MASK);
if (pdev_bad_for_parity(dev))
features &= ~(PCI_COMMAND_SERR | PCI_COMMAND_PARITY);
/*
* If this device is an ISA bridge, set the have_isa_bridge
......@@ -326,63 +347,48 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
if (dev->class >> 8 == PCI_CLASS_BRIDGE_ISA ||
dev->class >> 8 == PCI_CLASS_BRIDGE_EISA)
have_isa_bridge = !0;
/*
* Calculate the maximum latency on this bus. Note
* that we ignore any device which reports its max
* latency is the same as its use.
*/
pci_read_config_byte(dev, PCI_MAX_LAT, &max_lat);
pci_read_config_byte(dev, PCI_MIN_GNT, &min_gnt);
if (max_lat && max_lat != min_gnt && max_lat < busdata->max_lat)
busdata->max_lat = max_lat;
}
/*
* If any device on this bus does not support fast back to back
* transfers, then the bus as a whole is not able to support them.
* Having fast back to back transfers on saves us one PCI cycle
* per transaction.
*/
if (all_status & PCI_STATUS_FAST_BACK)
features |= PCI_COMMAND_FAST_BACK;
/*
* Now walk the devices again, this time setting them up.
*/
walk = &bus->devices;
for (walk = walk->next; walk != &bus->devices; walk = walk->next) {
for (walk = bus->devices.next; walk != &bus->devices; walk = walk->next) {
struct pci_dev *dev = pci_dev_b(walk);
u16 cmd;
u8 min_gnt, latency;
/*
* Calculate this masters latency timer value.
* This is rather primitive - it does not take
* account of the number of masters in a system
* wanting to use the bus.
*/
pci_read_config_byte(dev, PCI_MIN_GNT, &min_gnt);
if (min_gnt) {
if (min_gnt > busdata->max_lat)
min_gnt = busdata->max_lat;
latency = (int)min_gnt * 25 / 3;
} else
latency = 32; /* 1us */
pci_write_config_byte(dev, PCI_LATENCY_TIMER, latency);
/*
* Set the cache line size to 32 bytes.
* Also, set system error enable, parity error enable.
* Disable ROM.
*/
pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 8);
pci_read_config_word(dev, PCI_COMMAND, &cmd);
cmd |= busdata->features;
cmd |= features;
pci_write_config_word(dev, PCI_COMMAND, cmd);
pci_read_config_word(dev, PCI_COMMAND, &cmd);
pci_write_config_dword(dev, PCI_ROM_ADDRESS, 0);
}
/*
* Report what we did for this bus
*/
printk(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n",
bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis");
}
/*
* Convert from Linux-centric to bus-centric addresses for bridge devices.
*/
void __init
pcibios_fixup_pbus_ranges(struct pci_bus *bus, struct pbus_set_ranges_data *ranges)
{
struct pci_sys_data *root = bus->sysdata;
ranges->mem_start -= root->mem_offset;
ranges->mem_end -= root->mem_offset;
ranges->prefetch_start -= root->mem_offset;
ranges->prefetch_end -= root->mem_offset;
}
u8 __init no_swizzle(struct pci_dev *dev, u8 *pin)
......@@ -400,81 +406,90 @@ extern struct hw_pci integrator_pci;
void __init pcibios_init(void)
{
struct hw_pci *hw_pci = NULL;
struct arm_pci_sysdata sysdata;
int i;
struct pci_sys_data *root;
struct hw_pci *hw = NULL;
do {
#ifdef CONFIG_ARCH_EBSA285
if (machine_is_ebsa285()) {
hw_pci = &ebsa285_pci;
hw = &ebsa285_pci;
break;
}
#endif
#ifdef CONFIG_ARCH_SHARK
if (machine_is_shark()) {
hw_pci = &shark_pci;
hw = &shark_pci;
break;
}
#endif
#ifdef CONFIG_ARCH_CATS
if (machine_is_cats()) {
hw_pci = &cats_pci;
hw = &cats_pci;
break;
}
#endif
#ifdef CONFIG_ARCH_NETWINDER
if (machine_is_netwinder()) {
hw_pci = &netwinder_pci;
hw = &netwinder_pci;
break;
}
#endif
#ifdef CONFIG_ARCH_PERSONAL_SERVER
if (machine_is_personal_server()) {
hw_pci = &personal_server_pci;
hw = &personal_server_pci;
break;
}
#endif
#ifdef CONFIG_ARCH_FTVPCI
if (machine_is_ftvpci()) {
hw_pci = &ftv_pci;
hw = &ftv_pci;
break;
}
#endif
#ifdef CONFIG_ARCH_INTEGRATOR
if (machine_is_integrator()) {
hw_pci = &integrator_pci;
hw = &integrator_pci;
break;
}
#endif
} while (0);
if (hw_pci == NULL)
if (hw == NULL)
return;
for (i = 0; i < MAX_NR_BUS; i++) {
sysdata.bus[i].features = PCI_COMMAND_FAST_BACK |
PCI_COMMAND_SERR |
PCI_COMMAND_PARITY;
sysdata.bus[i].maxdevsel = PCI_STATUS_DEVSEL_FAST;
}
root = kmalloc(sizeof(*root), GFP_KERNEL);
if (!root)
panic("PCI: unable to allocate root data!");
root->hw = hw;
root->mem_offset = hw->mem_offset;
memset(root->resource, 0, sizeof(root->resource));
/*
* Set up the host bridge, and scan the bus.
* Setup the resources for this bus.
* resource[0] - IO ports
* resource[1] - non-prefetchable memory
* resource[2] - prefetchable memory
*/
hw_pci->init(&sysdata);
if (root->hw->setup_resources)
root->hw->setup_resources(root->resource);
else {
root->resource[0] = &ioport_resource;
root->resource[1] = &iomem_resource;
root->resource[2] = NULL;
}
/*
* Claim the currently allocated resources. This ensures
* that we will not allocate an already inuse region.
* Set up the host bridge, and scan the bus.
*/
pcibios_claim_resources();
root->hw->init(root);
/*
* Assign any unassigned resources.
*/
pci_assign_unassigned_resources();
pci_fixup_irqs(hw_pci->swizzle, hw_pci->map_irq);
pci_fixup_irqs(root->hw->swizzle, root->hw->map_irq);
}
char * __init pcibios_setup(char *str)
......@@ -499,7 +514,7 @@ char * __init pcibios_setup(char *str)
* is reserved for motherboard devices that decode all 16
* bits, so it's ok to allocate at, say, 0x2800-0x28ff,
* but we want to try to avoid allocating at 0x2900-0x2bff
* which might have be mirrored at 0x0100-0x03ff..
* which might be mirrored at 0x0100-0x03ff..
*/
void pcibios_align_resource(void *data, struct resource *res, unsigned long size)
{
......
......@@ -13,6 +13,7 @@
#include <linux/ptrace.h>
#include <linux/interrupt.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/ioport.h>
......@@ -24,6 +25,11 @@
#define MAX_SLOTS 21
#define PCICMD_ERROR_BITS ((PCI_STATUS_DETECTED_PARITY | \
PCI_STATUS_REC_MASTER_ABORT | \
PCI_STATUS_REC_TARGET_ABORT | \
PCI_STATUS_PARITY) << 16)
extern int setup_arm_irq(int, struct irqaction *);
extern void pcibios_report_status(u_int status_mask, int warn);
extern void register_isa_ports(unsigned int, unsigned int, unsigned int);
......@@ -255,12 +261,33 @@ static void dc21285_parity_irq(int irq, void *dev_id, struct pt_regs *regs)
add_timer(timer);
}
void __init dc21285_init(struct arm_pci_sysdata *sysdata)
void __init dc21285_setup_resources(struct resource **resource)
{
struct resource *busmem, *busmempf;
busmem = kmalloc(sizeof(*busmem), GFP_KERNEL);
busmempf = kmalloc(sizeof(*busmempf), GFP_KERNEL);
memset(busmem, 0, sizeof(*busmem));
memset(busmempf, 0, sizeof(*busmempf));
busmem->flags = IORESOURCE_MEM;
busmem->name = "Footbridge non-prefetch";
busmempf->flags = IORESOURCE_MEM | IORESOURCE_PREFETCH;
busmempf->name = "Footbridge prefetch";
allocate_resource(&iomem_resource, busmempf, 0x20000000,
0x80000000, 0xffffffff, 0x20000000, NULL, NULL);
allocate_resource(&iomem_resource, busmem, 0x40000000,
0x80000000, 0xffffffff, 0x40000000, NULL, NULL);
resource[0] = &ioport_resource;
resource[1] = busmem;
resource[2] = busmempf;
}
void __init dc21285_init(void *sysdata)
{
unsigned long cntl;
unsigned int mem_size, mem_mask;
unsigned int pci_cmd = PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE;
int cfn_mode;
mem_size = (unsigned int)high_memory - PAGE_OFFSET;
......@@ -286,26 +313,17 @@ void __init dc21285_init(struct arm_pci_sysdata *sysdata)
"central function" : "addin");
if (cfn_mode) {
static struct resource csrmem, csrio, busmem, busmempf;
struct pci_bus *bus;
static struct resource csrmem, csrio;
csrio.flags = IORESOURCE_IO;
csrio.name = "Footbridge";
csrio.flags = IORESOURCE_IO;
csrio.name = "Footbridge";
csrmem.flags = IORESOURCE_MEM;
csrmem.name = "Footbridge";
busmem.flags = IORESOURCE_MEM;
busmem.name = "Footbridge non-prefetch";
busmempf.flags = IORESOURCE_MEM | IORESOURCE_PREFETCH;
busmempf.name = "Footbridge prefetch";
allocate_resource(&ioport_resource, &csrio, 128,
0xff00, 0xffff, 128, NULL, NULL);
allocate_resource(&iomem_resource, &csrmem, 128,
0xf4000000, 0xf8000000, 128, NULL, NULL);
allocate_resource(&iomem_resource, &busmempf, 0x20000000,
0x00000000, 0x80000000, 0x20000000, NULL, NULL);
allocate_resource(&iomem_resource, &busmem, 0x40000000,
0x00000000, 0x80000000, 0x40000000, NULL, NULL);
/*
* Map our SDRAM at a known address in PCI space, just in case
......@@ -313,37 +331,23 @@ void __init dc21285_init(struct arm_pci_sysdata *sysdata)
* necessary, since some VGA cards forcefully use PCI addresses
* in the range 0x000a0000 to 0x000c0000. (eg, S3 cards).
*/
*CSR_PCICACHELINESIZE = 0x00002008;
*CSR_PCICSRBASE = csrmem.start;
*CSR_PCICSRIOBASE = csrio.start;
*CSR_PCISDRAMBASE = __virt_to_bus(PAGE_OFFSET);
*CSR_PCIROMBASE = 0;
*CSR_PCICMD = pci_cmd |
(1 << 31) | (1 << 29) | (1 << 28) | (1 << 24);
bus = pci_scan_bus(0, &dc21285_ops, sysdata);
/*
* bus->resource[0] is the IO resource for this bus
* bus->resource[1] is the mem resource for this bus
* bus->resource[2] is the prefetch mem resource for this bus
*/
bus->resource[1] = &busmem;
bus->resource[2] = &busmempf;
pci_cmd |= sysdata->bus[0].features;
*CSR_PCICMD = PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |
PCI_COMMAND_INVALIDATE | PCICMD_ERROR_BITS;
printk("PCI: Fast back to back transfers %sabled\n",
(sysdata->bus[0].features & PCI_COMMAND_FAST_BACK) ?
"en" : "dis");
pci_scan_bus(0, &dc21285_ops, sysdata);
/*
* Clear any existing errors - we aren't
* interested in historical data...
*/
cntl = *CSR_SA110_CNTL & 0xffffde07;
*CSR_SA110_CNTL = cntl | SA110_CNTL_RXSERR;
*CSR_PCICMD = pci_cmd | 1 << 31 | 1 << 29 | 1 << 28 | 1 << 24;
} else {
*CSR_SA110_CNTL = (*CSR_SA110_CNTL & 0xffffde07) |
SA110_CNTL_RXSERR;
*CSR_PCICMD = (*CSR_PCICMD & 0xffff) | PCICMD_ERROR_BITS;
} else if (footbridge_cfn_mode() != 0) {
/*
* If we are not compiled to accept "add-in" mode, then
* we are using a constant virt_to_bus translation which
......
......@@ -155,7 +155,7 @@ static void a5k_floppy_enable_dma(dmach_t channel, dma_t *dma)
}
memcpy((void *)0x1c, fiqhandler_start, fiqhandler_length);
regs.ARM_r9 = dma->buf.length;
regs.ARM_r10 = dma->buf.address;
regs.ARM_r10 = (unsigned long)dma->buf.address;
regs.ARM_fp = FLOPPYDMA_BASE;
set_fiq_regs(&regs);
enable_fiq(dma->dma_irq);
......
......@@ -79,7 +79,7 @@ ENTRY(stext)
* ideal, but in this case, it should ONLY set r0 and r1 to the
* appropriate value.
*/
#if defined(CONFIG_ARCH_NETWINDER) || defined(CONFIG_ARCH_INTEGRATOR)
#if defined(CONFIG_ARCH_NETWINDER)
/*
* Compatability cruft for old NetWinder NeTTroms. This
* code is currently scheduled for destruction in 2.5.xx
......@@ -124,8 +124,6 @@ __entry:
* FIXME - No bootloader, so manually set 'r1' with our architecture number.
*/
mov r1, #MACH_TYPE_L7200
#elif defined(CONFIG_ARCH_INTEGRATOR)
mov r1, #MACH_TYPE_INTEGRATOR
#endif
mov r0, #F_BIT | I_BIT | MODE_SVC @ make sure svc mode
......@@ -236,14 +234,16 @@ __create_page_tables:
* nearest megabyte boundary.
*/
add r0, r4, #(TEXTADDR & 0xff000000) >> 18 @ start of kernel
bic r2, r3, #0x00f00000
str r2, [r0] @ PAGE_OFFSET + 0MB
add r0, r0, #(TEXTADDR & 0x00f00000) >> 18
str r3, [r0], #4 @ PAGE_OFFSET + 0MB
str r3, [r0], #4 @ KERNEL + 0MB
add r3, r3, #1 << 20
str r3, [r0], #4 @ PAGE_OFFSET + 1MB
str r3, [r0], #4 @ KERNEL + 1MB
add r3, r3, #1 << 20
str r3, [r0], #4 @ PAGE_OFFSET + 2MB
str r3, [r0], #4 @ KERNEL + 2MB
add r3, r3, #1 << 20
str r3, [r0], #4 @ PAGE_OFFSET + 3MB
str r3, [r0], #4 @ KERNEL + 3MB
/*
* Ensure that the first section of RAM is present.
......
......@@ -216,7 +216,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
irq_exit(cpu, irq);
if (softirq_active(cpu) & softirq_mask(cpu))
if (softirq_pending(cpu))
do_softirq();
return;
......
......@@ -50,13 +50,14 @@ void oldlatch_bupdate(unsigned char mask,unsigned char newdata)
BUG();
}
static void __init oldlatch_init(void)
static int __init oldlatch_init(void)
{
if (machine_is_archimedes()) {
oldlatch_aupdate(0xff, 0xff);
/* Thats no FDC reset...*/
oldlatch_bupdate(0xff, LATCHB_FDCRESET);
}
return 0;
}
__initcall(oldlatch_init);
......
......@@ -129,8 +129,6 @@ plx90x0_init(struct arm_sysdata *sysdata)
static const unsigned long int base = PLX_BASE;
char *what;
unsigned long bar = (unsigned long)virt_to_bus((void *)PAGE_OFFSET);
unsigned int pci_cmd = PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE;
/* Have a sniff around and see which PLX device is present. */
unsigned long id = __raw_readl(base + 0xf0);
......@@ -189,10 +187,4 @@ plx90x0_init(struct arm_sysdata *sysdata)
"system error", NULL);
pci_scan_bus(0, &plx90x0_ops, sysdata);
pci_cmd |= sysdata->bus[0].features;
printk("PCI: Fast back to back transfers %sabled\n",
(sysdata->bus[0].features & PCI_COMMAND_FAST_BACK) ?
"en" : "dis");
}
......@@ -28,9 +28,9 @@
#include <asm/uaccess.h>
#include <asm/ipc.h>
/*
* Constant strings used in inlined functions in header files
*/
extern unsigned long do_mremap(unsigned long addr, unsigned long old_len,
unsigned long new_len, unsigned long flags,
unsigned long new_addr);
/*
* sys_pipe() is the normal C calling standard for creating
......
......@@ -11,6 +11,7 @@
#include <asm/irq.h>
#include <asm/mach/pci.h>
#include <asm/hardware/dec21285.h>
/* cats host-specific stuff */
static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
......@@ -31,7 +32,9 @@ static int __init cats_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
}
struct hw_pci cats_pci __initdata = {
init: dc21285_init,
swizzle: no_swizzle,
map_irq: cats_map_irq,
setup_resources: dc21285_setup_resources,
init: dc21285_init,
mem_offset: DC21285_PCI_MEM,
swizzle: no_swizzle,
map_irq: cats_map_irq,
};
......@@ -11,6 +11,7 @@
#include <asm/irq.h>
#include <asm/mach/pci.h>
#include <asm/hardware/dec21285.h>
static int irqmap_ebsa285[] __initdata = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI };
......@@ -33,7 +34,9 @@ static int __init ebsa285_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
}
struct hw_pci ebsa285_pci __initdata = {
init: dc21285_init,
swizzle: ebsa285_swizzle,
map_irq: ebsa285_map_irq,
setup_resources: dc21285_setup_resources,
init: dc21285_init,
mem_offset: DC21285_PCI_MEM,
swizzle: ebsa285_swizzle,
map_irq: ebsa285_map_irq,
};
......@@ -11,6 +11,7 @@
#include <asm/irq.h>
#include <asm/mach/pci.h>
#include <asm/hardware/dec21285.h>
/* netwinder host-specific stuff */
static int __init netwinder_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
......@@ -48,7 +49,9 @@ static int __init netwinder_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
}
struct hw_pci netwinder_pci __initdata = {
init: dc21285_init,
swizzle: no_swizzle,
map_irq: netwinder_map_irq,
setup_resources: dc21285_setup_resources,
init: dc21285_init,
mem_offset: DC21285_PCI_MEM,
swizzle: no_swizzle,
map_irq: netwinder_map_irq,
};
......@@ -11,6 +11,7 @@
#include <asm/irq.h>
#include <asm/mach/pci.h>
#include <asm/hardware/dec21285.h>
static int irqmap_personal_server[] __initdata = {
IRQ_IN0, IRQ_IN1, IRQ_IN2, IRQ_IN3, 0, 0, 0,
......@@ -37,7 +38,9 @@ static int __init personal_server_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
}
struct hw_pci personal_server_pci __initdata = {
init: dc21285_init,
swizzle: no_swizzle,
map_irq: personal_server_map_irq,
setup_resources: dc21285_setup_resources,
init: dc21285_init,
mem_offset: DC21285_PCI_MEM,
swizzle: no_swizzle,
map_irq: personal_server_map_irq,
};
......@@ -6,7 +6,7 @@
# To add an entry into this database, please see Documentation/arm/README,
# or contact rmk@arm.linux.org.uk
#
# Last update: Sun Jun 17 00:53:17 2001
# Last update: Wed Jul 4 20:04:11 2001
#
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
#
......@@ -91,12 +91,17 @@ mercury ARCH_MERCURY MERCURY 78
empeg SA1100_EMPEG EMPEG 79
adi_eb ARCH_I80200FCC I80200FCC 80
itt_cpb SA1100_ITT_CPB ITT_CPB 81
sa1110_svc ARCH_SA1110_SVC SA1110_SVC 82
svc SA1100_SVC SVC 82
alpha2 SA1100_ALPHA2 ALPHA2 84
alpha1 SA1100_ALPHA1 ALPHA1 85
netarm ARCH_NETARM NETARM 86
simpad SA1100_SIMPAD SIMPAD 87
pda1 ARCH_PDA1 PDA1 88
lubbock ARCH_LUBBOCK LUBBOCK 89
aniko ARCH_ANIKO ANIKO 90
clep7212 ARCH_CLEP7212 CLEP7212 91
cs89712 ARCH_CS89712 CS89712 92
weararm SA1100_WEARARM WEARARM 93
possio_px SA1100_POSSIO_PX POSSIO_PX 94
# The following are unallocated
#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/apm_bios.h>
#include <linux/slab.h>
#include <asm/io.h>
struct dmi_header
......@@ -13,6 +15,7 @@ struct dmi_header
};
#define dmi_printk(x)
//#define dmi_printk(x) printk(x)
static char * __init dmi_string(struct dmi_header *dm, u8 s)
{
......@@ -90,9 +93,254 @@ int __init dmi_iterate(void (*decode)(struct dmi_header *))
}
enum
{
DMI_BIOS_VENDOR,
DMI_BIOS_VERSION,
DMI_BIOS_DATE,
DMI_SYS_VENDOR,
DMI_PRODUCT_NAME,
DMI_PRODUCT_VERSION,
DMI_BOARD_VENDOR,
DMI_BOARD_NAME,
DMI_BOARD_VERSION,
DMI_STRING_MAX
};
static char *dmi_ident[DMI_STRING_MAX];
/*
* Save a DMI string
*/
static void __init dmi_save_ident(struct dmi_header *dm, int slot, int string)
{
char *d = (char*)dm;
char *p = dmi_string(dm, d[string]);
if(p==NULL || *p == 0)
return;
if (dmi_ident[slot])
return;
dmi_ident[slot] = kmalloc(strlen(p)+1, GFP_KERNEL);
if(dmi_ident[slot])
strcpy(dmi_ident[slot], p);
else
printk(KERN_ERR "dmi_save_ident: out of memory.\n");
}
/*
* DMI callbacks for problem boards
*/
struct dmi_strmatch
{
u8 slot;
char *substr;
};
#define NONE 255
struct dmi_blacklist
{
int (*callback)(struct dmi_blacklist *);
char *ident;
struct dmi_strmatch matches[4];
};
#define NO_MATCH { NONE, NULL}
#define MATCH(a,b) { a, b }
/*
* We have problems with IDE DMA on some platforms. In paticular the
* KT7 series. On these it seems the newer BIOS has fixed them. The
* rule needs to be improved to match specific BIOS revisions with
* corruption problems
*/
static __init int disable_ide_dma(struct dmi_blacklist *d)
{
#ifdef CONFIG_BLK_DEV_IDE
extern int noautodma;
if(noautodma == 0)
{
noautodma = 1;
printk(KERN_INFO "%s series board detected. Disabling IDE DMA.\n", d->ident);
}
#endif
return 0;
}
/*
* Some machines require the "reboot=b" commandline option, this quirk makes that automatic.
*/
static __init int set_bios_reboot(struct dmi_blacklist *d)
{
extern int reboot_thru_bios;
if (reboot_thru_bios == 0)
{
reboot_thru_bios = 1;
printk(KERN_INFO "%s series board detected. Selecting BIOS-method for reboots.\n", d->ident);
}
return 0;
}
/*
* Some bioses have a broken protected mode poweroff and need to use realmode
*/
static __init int set_realmode_power_off(struct dmi_blacklist *d)
{
if (apm_info.realmode_power_off == 0)
{
apm_info.realmode_power_off = 1;
printk(KERN_INFO "%s bios detected. Using realmode poweroff only.\n", d->ident);
}
return 0;
}
/*
* Some laptops require interrupts to be enabled during APM calls
*/
static __init int set_apm_ints(struct dmi_blacklist *d)
{
if (apm_info.allow_ints == 0)
{
apm_info.allow_ints = 1;
printk(KERN_INFO "%s machine detected. Enabling interrupts during APM calls.\n", d->ident);
}
return 0;
}
/*
* Some APM bioses corrupt memory or just plain do not work
*/
static __init int apm_is_horked(struct dmi_blacklist *d)
{
if (apm_info.disabled == 0)
{
apm_info.disabled = 1;
printk(KERN_INFO "%s machine detected. Disabling APM.\n", d->ident);
}
return 0;
}
/*
* Check for clue free BIOS implementations who use
* the following QA technique
*
* [ Write BIOS Code ]<------
* | ^
* < Does it Compile >----N--
* |Y ^
* < Does it Boot Win98 >-N--
* |Y
* [Ship It]
*
* Phoenix A04 08/24/2000 is known bad (Dell Inspiron 5000e)
* Phoenix A07 09/29/2000 is known good (Dell Inspiron 5000)
*/
static __init int broken_apm_power(struct dmi_blacklist *d)
{
apm_info.get_power_status_broken = 1;
printk(KERN_WARNING "BIOS strings suggest APM bugs, disabling power status reporting.\n");
return 0;
}
/*
* Process the DMI blacklists
*/
/*
* This will be expanded over time to force things like the APM
* interrupt mask settings according to the laptop
*/
static __initdata struct dmi_blacklist dmi_blacklist[]={
#if 0
{ disable_ide_dma, "KT7", { /* Overbroad right now - kill DMA on problem KT7 boards */
MATCH(DMI_PRODUCT_NAME, "KT7-RAID"),
NO_MATCH, NO_MATCH, NO_MATCH
} },
#endif
{ broken_apm_power, "Dell Inspiron 5000e", { /* Handle problems with APM on Inspiron 5000e */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "A04"),
MATCH(DMI_BIOS_DATE, "08/24/2000"), NO_MATCH
} },
{ set_realmode_power_off, "Award Software v4.60 PGMA", { /* broken PM poweroff bios */
MATCH(DMI_BIOS_VENDOR, "Award Software International, Inc."),
MATCH(DMI_BIOS_VERSION, "4.60 PGMA"),
MATCH(DMI_BIOS_DATE, "134526184"), NO_MATCH
} },
{ set_bios_reboot, "PowerEdge 1300/500", { /* Handle problems with rebooting on Dell 1300's */
MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
MATCH(DMI_PRODUCT_NAME, "PowerEdge 1300/500"),
NO_MATCH, NO_MATCH
} },
{ set_bios_reboot, "PowerEdge 1300/550", { /* Handle problems with rebooting on Dell 1300's */
MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
MATCH(DMI_PRODUCT_NAME, "PowerEdge 1300/550"),
NO_MATCH, NO_MATCH
} },
{ set_apm_ints, "IBM", { /* Allow interrupts during suspend on IBM laptops */
MATCH(DMI_SYS_VENDOR, "IBM"),
NO_MATCH, NO_MATCH, NO_MATCH
} },
{ set_apm_ints, "ASUSTeK", { /* Allow interrupts during APM or the clock goes slow */
MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
MATCH(DMI_PRODUCT_NAME, "L8400K series Notebook PC"),
NO_MATCH, NO_MATCH
} },
{ apm_is_horked, "Trigem Delhi3", { /* APM crashes */
MATCH(DMI_SYS_VENDOR, "TriGem Computer, Inc"),
MATCH(DMI_PRODUCT_NAME, "Delhi3"),
NO_MATCH, NO_MATCH,
} },
{ NULL, }
};
/*
* Walk the blacklist table running matching functions until someone
* returns 1 or we hit the end.
*/
static __init void dmi_check_blacklist(void)
{
struct dmi_blacklist *d;
int i;
d=&dmi_blacklist[0];
while(d->callback)
{
for(i=0;i<4;i++)
{
int s = d->matches[i].slot;
if(s==NONE)
continue;
if(dmi_ident[s] && strstr(dmi_ident[s], d->matches[i].substr))
continue;
/* No match */
goto fail;
}
if(d->callback(d))
return;
fail:
d++;
}
}
/*
* Process a DMI table entry. Right now all we care about are the BIOS
* and machine entries. For 2.4 we should pull the smbus controller info
* and machine entries. For 2.5 we should pull the smbus controller info
* out of here.
*/
......@@ -105,66 +353,47 @@ static void __init dmi_decode(struct dmi_header *dm)
{
case 0:
p=dmi_string(dm,data[4]);
if(*p && *p!=' ')
if(*p)
{
dmi_printk(("BIOS Vendor: %s\n", p));
dmi_save_ident(dm, DMI_BIOS_VENDOR, 4);
dmi_printk(("BIOS Version: %s\n",
dmi_string(dm, data[5])));
dmi_save_ident(dm, DMI_BIOS_VERSION, 5);
dmi_printk(("BIOS Release: %s\n",
dmi_string(dm, data[8])));
}
/*
* Check for clue free BIOS implementations who use
* the following QA technique
*
* [ Write BIOS Code ]<------
* | ^
* < Does it Compile >----N--
* |Y ^
* < Does it Boot Win98 >-N--
* |Y
* [Ship It]
*
* Phoenix A04 08/24/2000 is known bad (Dell Inspiron 5000e)
* Phoenix A07 09/29/2000 is known good (Dell Inspiron 5000)
*/
if(strcmp(dmi_string(dm, data[4]), "Phoenix Technologies LTD")==0)
{
if(strcmp(dmi_string(dm, data[5]), "A04")==0
&& strcmp(dmi_string(dm, data[8]), "08/24/2000")==0)
{
apm_info.get_power_status_broken = 1;
printk(KERN_WARNING "BIOS strings suggest APM bugs, disabling power status reporting.\n");
}
dmi_save_ident(dm, DMI_BIOS_DATE, 8);
}
break;
case 1:
p=dmi_string(dm,data[4]);
if(*p && *p!=' ')
if(*p)
{
dmi_printk(("System Vendor: %s.\n",p));
dmi_save_ident(dm, DMI_SYS_VENDOR, 4);
dmi_printk(("Product Name: %s.\n",
dmi_string(dm, data[5])));
dmi_save_ident(dm, DMI_PRODUCT_NAME, 5);
dmi_printk(("Version %s.\n",
dmi_string(dm, data[6])));
dmi_save_ident(dm, DMI_PRODUCT_VERSION, 6);
dmi_printk(("Serial Number %s.\n",
dmi_string(dm, data[7])));
}
break;
case 2:
p=dmi_string(dm,data[4]);
if(*p && *p!=' ')
if(*p)
{
dmi_printk(("Board Vendor: %s.\n",p));
dmi_save_ident(dm, DMI_BOARD_VENDOR, 4);
dmi_printk(("Board Name: %s.\n",
dmi_string(dm, data[5])));
dmi_save_ident(dm, DMI_BOARD_NAME, 5);
dmi_printk(("Board Version: %s.\n",
dmi_string(dm, data[6])));
dmi_save_ident(dm, DMI_BOARD_VERSION, 6);
}
break;
case 3:
......@@ -177,7 +406,10 @@ static void __init dmi_decode(struct dmi_header *dm)
static int __init dmi_scan_machine(void)
{
return dmi_iterate(dmi_decode);
int err = dmi_iterate(dmi_decode);
if(err == 0)
dmi_check_blacklist();
return err;
}
module_init(dmi_scan_machine);
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