Commit eb101b30 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.34pre1

parent 38b1ae7e
......@@ -480,6 +480,11 @@ D: trivial hack to add variable address length routing to Rose.
D: AX25-HOWTO, HAM-HOWTO, IPX-HOWTO, NET-2-HOWTO
D: ax25-utils maintainer.
N: Peter Denison
E: peterd@pnd-pc.demon.co.uk
W: http://www.pnd-pc.demon.co.uk/promise/
D: Promise DC4030VL caching HD controller drivers
N: Todd J. Derr
E: tjd@fore.com
W: http://www.wordsmith.org/~tjd
......@@ -727,7 +732,7 @@ D: Transformed old user space bdflush into 1st kernel thread - kflushd.
D: Many other patches, documentation files, mini kernels, utilities, ...
N: John E. Gotts
E: jgotts@engin.umich.edu
E: jgotts@linuxsavvy.com
D: kernel hacker
S: 8124 Constitution Apt. 7
S: Sterling Heights, Michigan 48313
......@@ -820,6 +825,7 @@ N: Andre Hedrick
E: andre@suse.com
D: Random SMP kernel hacker...
D: Uniform Multi-Platform E-IDE driver
D: AEC6210UF Ultra33
D: Aladdin 1533/1543(C) chipset
D: Active-Chipset maddness..........
D: HighPoint HPT343/5 Ultra/33 & HPT366 Ultra/66 chipsets
......@@ -827,7 +833,8 @@ D: Intel PIIX chipset
D: Promise PDC20246/20247 & PDC20262 chipsets
D: SiS5513 Ultra/66/33 chipsets
D: VIA 82C586/596/686 chipsets
S: Nashville, TN
S: 580 Second Street, Suite 2
S: Oakland, CA
S: USA
N: Jochen Hein
......
......@@ -449,6 +449,8 @@ CONFIG_BLK_DEV_IDETAPE
to the SCSI protocol. If you have an SCSI tape drive however, you
can say N here.
This now includes the OnStream DI-30 tape drive support.
If you say Y here, the tape drive will be identified at boot time
along with other IDE devices, as "hdb" or "hdc", or something
similar, and will be mapped to a character device such as "ht0"
......@@ -7880,36 +7882,15 @@ CONFIG_USB_UHCI
The module will be called usb-uhci.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt.
OHCI (compaq and some others) support?
CONFIG_USB_OHCI
OHCI-HCD (compaq and some others) support?
CONFIG_USB_OHCI_HCD
The Open Host Controller Interface is a standard by Compaq for
accessing the USB PC hardware (also called USB host controller). If
your USB host controller conforms to this standard, say Y. The USB
host controllers on most non-Intel architectures and on several x86
compatibles with non-Intel chipsets conform to this standard.
There are currently two OHCI drivers in development. You should
compile at most one. The other one is "OHCI-HCD (other OHCI opt.
Virt. Root Hub) support?", below.
You may want to read the file drivers/usb/README.ohci.
This code is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called usb-ohci.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt.
Enable tons of OHCI debugging output
CONFIG_USB_OHCI_DEBUG
Say Y here in order to have the OHCI code generate verbose debugging
output.
OHCI-HCD (other OHCI opt. Virt. Root Hub) support?
CONFIG_USB_OHCI_HCD
This is an alternative driver for USB PC hardware (also called USB
host controller) which complies with Compaq's Open Host Controller
Interface. You may want to read the file
drivers/usb/README.ohci_hcd.
You may want to read the file drivers/usb/README.ohci_hcd.
There are currently two OHCI drivers in development. You should
compile at most one. The other one is "OHCI (compaq and some others)
......@@ -7920,29 +7901,6 @@ CONFIG_USB_OHCI_HCD
The module will be called usb-ohci-hcd.o. If you want to compile it
as a module, say M here and read Documentation/modules.txt.
OHCI-HCD Virtual Root Hub
CONFIG_USB_OHCI_VROOTHUB
The virtual root hub support is currently unstable, so you probably
want to say N unless you are a hacker. But you aren't a hacker since
you are reading help texts.
Enable lots of ISOC debugging output
CONFIG_USB_DEBUG_ISOC
Say Y here if you want to get lots of debugging output related to
the USB code.
USB hub support
CONFIG_USB_HUB
Say Y here if you want to connect several USB devices to a single
USB port. You will need an USB hub to do this.
If unsure, say Y.
This code is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called hub.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt.
USB mouse support
CONFIG_USB_MOUSE
Say Y here if you want to connect a USB mouse to your computer's USB
......@@ -8086,6 +8044,13 @@ CONFIG_USB_PROC
Note that you must say Y to "/proc filesystem support" below for
this to work.
DABUSB driver
CONFIG_USB_DABUSB
A Digital Audio Broadcasting (DAB) Receiver for USB and Linux brought to
you by the DAB-Team (http://dab.in.tum.de).
This driver can be taken as an example for URB-based bulk, control, and
isochronous transactions.
ACPI support
CONFIG_ACPI
Advanced Configuration and Power Interface (ACPI) is an interface
......
This diff is collapsed.
Usually, i2c devices are controlled by a kernel driver. But it is also
possible to access all devices on an adapter from userspace, through
the /dev interface. You need to load module i2c-dev for this.
Each registered i2c adapter gets a number, counting from 0. You can
examine /proc/bus/i2c to see what number corresponds to which adapter.
I2C device files are character device files with major device number 89
and a minor device number corresponding to the number assigned as
explained above. They should be called "i2c-%d" (i2c-0, i2c-1, ...,
i2c-10, ...). All 256 minor device numbers are reserved for i2c.
C example
=========
So let's say you want to access an i2c adapter from a C program. The
first thing to do is `#include <linux/i2c.h>" and "#include <linux/i2c-dev.h>.
Yes, I know, you should never include kernel header files, but until glibc
knows about i2c, there is not much choice.
Now, you have to decide which adapter you want to access. You should
inspect /proc/bus/i2c to decide this. Adapter numbers are assigned
somewhat dynamically, so you can not even assume /dev/i2c-0 is the
first adapter.
Next thing, open the device file, as follows:
int file;
int adapter_nr = 2; /* probably dynamically determined */
char filename[20];
sprintf(filename,"/dev/i2c-%d",adapter_nr);
if ((file = open(filename,O_RDWR)) < 0) {
/* ERROR HANDLING; you can check errno to see what went wrong */
exit(1);
}
When you have opened the device, you must specify with what device
address you want to communicate:
int addr = 0x40; /* The I2C address */
if (ioctl(file,I2C_SLAVE,addr) < 0) {
/* ERROR HANDLING; you can check errno to see what went wrong */
exit(1);
}
Well, you are all set up now. You can now use SMBus commands or plain
I2C to communicate with your device. SMBus commands are preferred if
the device supports them. Both are illustrated below.
__u8 register = 0x10; /* Device register to access */
__s32 res;
char buf[10];
/* Using SMBus commands */
res = i2c_smbus_read_word_data(file,register);
if (res < 0) {
/* ERROR HANDLING: i2c transaction failed */
} else {
/* res contains the read word */
}
/* Using I2C Write, equivalent of
i2c_smbus_write_word_data(file,register,0x6543) */
buf[0] = register;
buf[1] = 0x43;
buf[2] = 0x65;
if ( write(file,buf,3) != 3) {
/* ERROR HANDLING: i2c transaction failed */
}
/* Using I2C Read, equivalent of i2c_smbus_read_byte(file) */
if (read(file,buf,1) != 1) {
/* ERROR HANDLING: i2c transaction failed */
} else {
/* buf[0] contains the read byte */
}
Full interface description
==========================
The following IOCTLs are defined and fully supported
(see also i2c-dev.h and i2c.h):
ioctl(file,I2C_SLAVE,long addr)
Change slave address. The address is passed in the 7 lower bits of the
argument (except for 10 bit addresses, passed in the 10 lower bits in this
case).
ioctl(file,I2C_TENBIT,long select)
Selects ten bit addresses if select not equals 0, selects normal 7 bit
addresses if select equals 0.
ioctl(file,I2C_FUNCS,unsigned long *funcs)
Gets the adapter functionality and puts it in *funcs.
Other values are NOT supported at this moment, except for I2C_SMBUS,
which you should never directly call; instead, use the access functions
below.
You can do plain i2c transactions by using read(2) and write(2) calls.
Combined read/write transactions are not yet supported (they will in
the future, through an ioctl). You do not need to pass the address
byte; instead, set it through ioctl I2C_SLAVE before you try to
access the device.
You can do SMBus level transactions (see documentation file smbus-protocol
for details) through the following functions:
__s32 i2c_smbus_write_quick(int file, __u8 value);
__s32 i2c_smbus_read_byte(int file);
__s32 i2c_smbus_write_byte(int file, __u8 value);
__s32 i2c_smbus_read_byte_data(int file, __u8 command);
__s32 i2c_smbus_write_byte_data(int file, __u8 command, __u8 value);
__s32 i2c_smbus_read_word_data(int file, __u8 command);
__s32 i2c_smbus_write_word_data(int file, __u8 command, __u16 value);
__s32 i2c_smbus_process_call(int file, __u8 command, __u16 value);
__s32 i2c_smbus_read_block_data(int file, __u8 command, __u8 *values);
__s32 i2c_smbus_write_block_data(int file, __u8 command, __u8 length,
__u8 *values);
All these tranactions return -1 on failure; you can read errno to see
what happened. The 'write' transactions return 0 on success; the
'read' transactions return the read value, except for read_block, which
returns the number of values read. The block buffers need not be longer
than 32 bytes.
The above functions are all macros, that resolve to calls to the
i2c_smbus_access function, that on its turn calls a specific ioctl
with the data in a specific format. Read the source code if you
want to know what happens behind the screens.
This document describes the i2c protocol. Or will, when it is finished :-)
Key to symbols
==============
S (1 bit) : Start bit
P (1 bit) : Stop bit
Rd/Wr (1 bit) : Read/Write bit. Rd equals 1, Wr equals 0.
A, NA (1 bit) : Accept and reverse accept bit.
Addr (7 bits): I2C 7 bit address. Note that this can be expanded as usual to
get a 10 bit I2C address.
Comm (8 bits): Command byte, a data byte which often selects a register on
the device.
Data (8 bits): A plain data byte. Sometimes, I write DataLow, DataHigh
for 16 bit data.
Count (8 bits): A data byte containing the length of a block operation.
[..]: Data sent by I2C device, as opposed to data sent by the host adapter.
Simple send tranaction
======================
This corresponds to i2c_master_send.
S Addr Wr [A] Data [A] Data [A] ... [A] Data [A] P
Simple receive transaction
===========================
This corresponds to i2c_master_recv
S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P
Combined tranactions
====================
This corresponds to i2c_transfer
They are just like the above transactions, but instead of a stop bit P
a start bit S is sent and the transaction continues. An example of
a byte read, followed by a byte write:
S Addr Rd [A] [Data] NA S Addr Wr [A] Data [A] P
i2c-core is the core i2c module (surprise!) which offers general routines on
which other modules build. You will find that all i2c-related modules depend
on this module, so it will (need to) be loaded whenever another i2c-related
module is loaded. Seen from the outside, the most interesting is the /proc
interface. Note that there is no corresponding sysctl interface!
/proc/bus/i2c
=============
Whenever i2c-core is loaded, you will find a file /proc/bus/i2c, which lists
all currently registered I2C adapters. Each line contains exactly one
I2C adapter. Each line has the following format: "i2c-%d\t%9s\t%-32s't%-32s\n",
which works out to four columns separated by tabs. Note that the file
will be empty, if no adapters are registered at all.
Adapters are numbered from 0 upwards. The first column contains the number
of the adapter, for example "i2c-4" for adapter 4. The name listed is also
the name of the /proc file which lists all devices attached to it, and
of the /dev file which corresponds to this adapter.
The second column documents what kind of adapter this is. Some adapters
understand the full I2C protocol, others only a subset called SMBus,
and yet others are some kind of pseudo-adapters that do not understand
i2c at all. Possible values in here are "i2c", "smbus", "i2c/smbus"
and "dummy". Because the SMBus protocol can be fully emulated by i2c
adapters, if you see "i2c" here, SMBus is supported too. There may
be some future adapters which support both specific SMBus commands and
general I2C, and they will display "i2c/smbus".
The third and fourth column are respectively the algorithm and adapter
name of this adapter. Each adapter is associated with an algorithm,
and several adapters can share the same algorithm. The combination of
algorithm name and adapter name should be unique for an adapter, but
you can't really count on that yet.
/proc/bus/i2c-*
===============
Each registered adapter gets its own file in /proc/bus/, which lists
the devices registered to the adapter. Each line in such a file contains
one registered device. Each line has the following format:
"%02x\t%-32s\t%-32s\n", which works out to three columns separated by
tabs. Note that this file can be empty, if no devices are found on
the adapter.
The first column contains the (hexadecimal) address of the client. As
only 7-bit addresses are supported at this moment, two digits are
enough.
The second and third column are respectively the client name and the
driver name of this client. Each client is associated with a driver,
and several clients can share the same driver.
Some adapters understand only the SMBus (System Management Bus) protocol,
which is a subset from the I2C protocol. Fortunately, many devices use
only the same subset, which makes it possible to put them on an SMBus.
If you write a driver for some I2C device, please try to use the SMBus
commands if at all possible (if the device uses only that subset of the
I2C protocol). This makes it possible to use the device driver on both
SMBus adapters and I2C adapters (the SMBus command set is automatically
translated to I2C on I2C adapters, but plain I2C commands can not be
handled at all on a pure SMBus adapter).
Below is a list of SMBus commands.
Key to symbols
==============
S (1 bit) : Start bit
P (1 bit) : Stop bit
Rd/Wr (1 bit) : Read/Write bit. Rd equals 1, Wr equals 0.
A, NA (1 bit) : Accept and reverse accept bit.
Addr (7 bits): I2C 7 bit address. Note that this can be expanded as usual to
get a 10 bit I2C address.
Comm (8 bits): Command byte, a data byte which often selects a register on
the device.
Data (8 bits): A plain data byte. Sometimes, I write DataLow, DataHigh
for 16 bit data.
Count (8 bits): A data byte containing the length of a block operation.
[..]: Data sent by I2C device, as opposed to data sent by the host adapter.
SMBus Write Quick
=================
This sends a single byte to the device, at the place of the Rd/Wr bit.
There is no equivalent Read Quick command.
A Addr Rd/Wr [A] P
SMBus Read Byte
===============
This reads a single byte from a device, without specifying a device
register. Some devices are so simple that this interface is enough; for
others, it is a shorthand if you want to read the same register as in
the previous SMBus command.
S Addr Rd [A] [Data] NA P
SMBus Write Byte
================
This is the reverse of Read Byte: it sends a single byte to a device.
See Read Byte for more information.
S Addr Wr [A] Data NA P
SMBus Read Byte Data
====================
This reads a single byte from a device, from a designated register.
The register is specified through the Comm byte.
S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] NA P
SMBus Read Word Data
====================
This command is very like Read Byte Data; again, data is read from a
device, from a designated register that is specified through the Comm
byte. But this time, the data is a complete word (16 bits).
S Addr Wr [A] Comm [A] S Addr Rd [A] [DataLow] A [DataHigh] NA P
SMBus Write Byte Data
=====================
This writes a single byte to a device, to a designated register. The
register is specified through the Comm byte. This is the opposite of
the Read Byte Data command.
S Addr Wr [A] Comm [A] Data [A] P
SMBus Write Word Data
=====================
This is the opposite operation of the Read Word Data command. 16 bits
of data is read from a device, from a designated register that is
specified through the Comm byte.
S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P
SMBus Process Call
==================
This command selects a device register (through the Comm byte), sends
16 bits of data to it, and reads 16 bits of data in return.
S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A]
S Addr Rd [A] [DataLow] A [DataHigh] NA P
SMBus Block Read
================
This command reads a block of upto 32 bytes from a device, from a
designated register that is specified through the Comm byte. The amount
of data is specified by the device in the Count byte.
S Addr Wr [A] Comm [A]
S Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P
SMBus Block Write
=================
The opposite of the Block Read command, this writes upto 32 bytes to
a device, to a designated register that is specified through the
Comm byte. The amount of data is specified in the Count byte.
S Addr Wr [A] Comm [A] Count [A] Data [A] Data [A] ... [A] Data [A] P
This is an explanation of what i2c is, and what is supported.
I2C and SMBus
=============
I2C (pronounce: I square C) is a protocol developed by Philips. It is a
slow two-wire protocol (10-100 kHz), but it suffices for many types of
devices.
SMBus (System Management Bus) is a subset of the I2C protocol. Many
modern mainboards have a System Management Bus. There are a lot of
devices which can be connected to a SMBus; the most notable are modern
memory chips with EEPROM memories and chips for hardware monitoring.
Because the SMBus is just a special case of the generalized I2C bus, we
can simulate the SMBus protocol on plain I2C busses. The reverse is
regretfully impossible.
Terminology
===========
When we talk about I2C, we use the following terms:
Bus -> Algorithm
Adapter
Device -> Driver
Client
An Algorithm driver contains general code that can be used for a whole class
of I2C adapters. Each specific adapter driver depends on one algorithm
driver.
A Driver driver (yes, this sounds ridiculous, sorry) contains the general
code to access some type of device. Each detected device gets its own
data in the Client structure. Usually, Driver and Client are more closely
integrated than Algorithm and Adapter.
For a given configuration, you will need a driver for your I2C bus (usually
a separate Adapter and Algorithm driver), and drivers for your I2C devices
(usually one driver for each device).
Included Drivers
================
Base modules
------------
i2c-core: The basic I2C code, including the /proc interface
i2c-dev: The /dev interface
Algorithm drivers
-----------------
i2c-algo-bit: A bit-banging algorithm
i2c-algo-pcf: A PCF 8584 style algorithm
Adapter drivers
---------------
i2c-elektor: Elektor ISA card (uses i2c-algo-pcf)
i2c-elv: ELV parallel port adapter (uses i2c-algo-bit)
i2c-philips-par: Philips style parallel port adapter (uses i2c-algo-bit)
i2c-velleman: Velleman K9000 parallel port adapter (uses i2c-algo-bit)
The I2C protocol knows about two kinds of device addresses: normal 7 bit
addresses, and an extended set of 10 bit addresses. The sets of addresses
do not intersect: the 7 bit address 0x10 is not the same as the 10 bit
address 0x10 (though a single device could respond to both of them). You
select a 10 bit address by adding an extra byte after the address
byte:
S Addr7 Rd/Wr ....
becomes
S 11110 Addr10 Rd/Wr
S is the start bit, Rd/Wr the read/write bit, and if you count the number
of bits, you will see the there are 8 after the S bit for 7 bit addresses,
and 16 after the S bit for 10 bit addresses.
WARNING! The current 10 bit address support is EXPERIMENTAL. There are
several places in the code that will cause SEVERE PROBLEMS with 10 bit
addresses, even though there is some basic handling and hooks. Also,
almost no supported adapter handles the 10 bit addresses correctly.
As soon as a real 10 bit address device is spotted 'in the wild', we
can and will add proper support. Right now, 10 bit address devices
are defined by the I2C protocol, but we have never seen a single device
which supports them.
This diff is collapsed.
......@@ -52,7 +52,7 @@ be entered as an environment variable, whereas its absence indicates that
it will appear as a kernel argument readable via /proc/cmdline by programs
running once the system is up.
53c7xx= [HW,SCSI]
53c7xx= [HW,SCSI] Amiga SCSI controllers
adb_buttons= [HW,MOUSE]
......@@ -70,6 +70,8 @@ running once the system is up.
arcrimi= [HW,NET]
ataflop= [HW, M68k]
atamouse= [HW,MOUSE] Atari Mouse.
atascsi= [HW,SCSI] Atari SCSI.
......@@ -98,22 +100,22 @@ running once the system is up.
com90xx= [HW,NET]
console=
console= [KNL] output console + comm spec (speed, control, parity)
cyclades= [HW,SERIAL] Cyclades multi-serial port adapter.
debug [KNL] Enable kernel debugging.
debug [KNL] Enable kernel debugging (events log level).
decnet= [HW,NET]
digi= [HW,SERIAL]
digi= [HW,SERIAL] io parameters + enable/disable command
digiepca= [HW,SERIAL]
dmascc= [HW,AX25,SERIAL] AX.25 Z80SCC driver with DMA
support available.
dmasound= [HW,SOUND]
dmasound= [HW,SOUND] (sound subsystem buffers)
dtc3181e= [HW,SCSI]
......@@ -123,7 +125,7 @@ running once the system is up.
edb= [HW,PS2]
ether= [HW,NET] Ethernet.
ether= [HW,NET] Ethernet cards parameters (iomem,irq,dev_name).
fd_mcs= [HW,SCSI]
......@@ -131,7 +133,7 @@ running once the system is up.
floppy= [HW]
ftape= [HW] Floppy Tape subsystem.
ftape= [HW] Floppy Tape subsystem debugging options.
gdth= [HW,SCSI]
......@@ -139,7 +141,8 @@ running once the system is up.
gvp11= [HW,SCSI]
hd= [EIDE] IDE and EIDE hard drive subsystem.
hd= [EIDE] (E)IDE hard drive subsystem
geometry (Cyl/heads/sectors) or tune parameters.
hfmodem= [HW,AX25]
......@@ -147,13 +150,27 @@ running once the system is up.
hisax= [HW,ISDN]
in2000= [HW,SCSI]
init= [KNL]
ibmmcascsi= [HW,MCA,SCSI] IBM MicroChannel SCSI adapter.
icn= [HW,ISDN]
ide?= [HW] (E)IDE subsystem : config (iomem/irq), tuning or
debugging (serialize,reset,no{dma,tune,probe}) or
chipset specific parameters
idebus= [HW] (E)IDE subsystem : VLB/PCI bus speed
in2000= [HW,SCSI]
init= [KNL]
init= [KNL] default init level
initrd= [KNL] initial ramdisk path
ip= [PNP]
......@@ -187,7 +204,7 @@ running once the system is up.
kbd-reset [VT]
load_ramdisk= [RAM]
load_ramdisk= [RAM] initrd loading boolean
lp=0 [LP] Specify parallel ports to use, e.g,
or lp=port[,port...] lp=none,parport0 (lp0 not configured, lp1 uses
......@@ -223,10 +240,13 @@ or lp=auto driver. 'lp=reset' (which can be specified in
mcdx= [HW,CD]
md= [HW]
md= [HW] RAID subsystems devices and level
mdacon= [MDA]
mem= [KNL] force use XX Mb of memory when the kernel is not able
to see the whole system memory or for test
msmouse= [HW,MOUSE] Microsoft Mouse.
ncr5380= [HW,SCSI]
......@@ -241,7 +261,9 @@ or lp=auto driver. 'lp=reset' (which can be specified in
nfsaddrs= [NFS]
nfsroot= [NFS]
nfsroot= [NFS] nfs root filesystem for disk-less boxes
nmi_watchdog= [KNL, BUGS=ix86] debugging features for SMP kernels
no387 [BUGS=ix86] Tells the kernel to use the 387 maths
emulation library even if a 387 maths coprocessor
......@@ -250,6 +272,10 @@ or lp=auto driver. 'lp=reset' (which can be specified in
noapic [SMP,APIC] Tells the kernel not to make use of any
APIC that may be present on the system.
noasync [HW, M68K] Disables async and sync negotiation for all devices.
nodisconnect [HW,SCSI, M68K] Disables SCSI disconnects.
no-halt [BUGS=ix86]
noinitrd [RAM] Tells the kernel not to load any configured
......@@ -259,9 +285,11 @@ or lp=auto driver. 'lp=reset' (which can be specified in
nosmp [SMP] Tells an SMP kernel to act as a UP kernel.
nosync [HW, M68K] Disables sync negotiation for all devices.
optcd= [HW,CD]
panic=
panic= [KNL] kernel behaviour on panic
parport=0 [HW,PPT] Specify parallel ports. 0
or parport=auto disables. Use 'auto' to force the driver
......@@ -293,11 +321,11 @@ or parport=0xBBB[,IRQ[,DMA]] to use any IRQ/DMA settings detected
pg. [PARIDE]
pirq= [SMP,APIC]
pirq= [SMP,APIC] mp-table
plip= [PPT,NET] Parallel port network link.
profile=
profile= [KNL] enable kernel profiling via /proc/profile (param:log level)
prompt_ramdisk= [RAM] Whether to prompt for ramdisk before loading
its contents into memory.
......@@ -312,16 +340,18 @@ or parport=0xBBB[,IRQ[,DMA]] to use any IRQ/DMA settings detected
reboot= [BUGS=ix86]
reserve=
reserve= [KNL,BUGS] force the kernel to ignore some iomem area
riscom8= [HW,SERIAL]
ro [KNL] Mount root device read-only on boot.
root=
root= [KNL] root filesystem
rw [KNL] Mount root device read-write on boot.
S [KNL] run init in single mode
sbpcd= [HW,CD] Soundblaster CD adapter.
scsi_logging= [SCSI]
......@@ -336,12 +366,14 @@ or parport=0xBBB[,IRQ[,DMA]] to use any IRQ/DMA settings detected
specialix= [HW,SERIAL] Specialix multi-serial port adapter.
st= [HW]
st= [HW] SCSI tape parameters (buffers, ..)
st0x= [HW,SCSI]
stram_swap= [HW]
switches= [HW, M68K]
sym53c416= [HW,SCSI]
sym53c8xx= [HW,SCSI]
......@@ -356,7 +388,10 @@ or parport=0xBBB[,IRQ[,DMA]] to use any IRQ/DMA settings detected
u14-34f= [HW,SCSI]
video= [FB]
video= [FB] frame buffer configuration
vga= [KNL] on ix386, enable to choose a peculiar video mode
vga=ask
wd33c93= [HW,SCSI]
......@@ -364,6 +399,6 @@ or parport=0xBBB[,IRQ[,DMA]] to use any IRQ/DMA settings detected
wdt= [HW]
xd= [HW,XT]
xd= [HW,XT] Original XT pre-IDE (RLL encoded) disks
xd_geo= [HW,XT]
make[1]: Entering directory `/home/kraxel/2/src/bttv-0.7.10/driver'
bttv.o
card=0 - unknown
card=1 - MIRO PCTV
card=2 - Hauppauge old
card=3 - STB
card=4 - Intel
card=5 - Diamond DTV2000
card=6 - AVerMedia TVPhone
card=7 - MATRIX-Vision MV-Delta
card=8 - Fly Video II
card=9 - TurboTV
card=10 - Hauppauge new (bt878)
card=11 - MIRO PCTV pro
card=12 - ADS Technologies Channel Surfer TV
card=13 - AVerMedia TVCapture 98
card=14 - Aimslab VHX
card=15 - Zoltrix TV-Max
card=16 - Pixelview PlayTV (bt878)
card=17 - Leadtek WinView 601
card=18 - AVEC Intercapture
card=19 - LifeView FlyKit w/o Tuner
card=20 - CEI Raffles Card
card=21 - Lucky Star Image World ConferenceTV
card=22 - Phoebe Tv Master + FM
card=23 - Modular Technology MM205 PCTV, bt878
card=24 - Magic TView CPH061 (bt878)
card=25 - Terratec/Vobis TV-Boostar
card=26 - Newer Hauppauge WinCam (bt878)
card=27 - MAXI TV Video PCI2
card=28 - Terratec TerraTV+
card=29 - Imagenation PXC200
card=30 - FlyVideo 98
card=31 - iProTV
card=32 - Intel Create and Share PCI
card=33 - Askey/Typhoon/Anubis Magic TView
tuner.o
type=0 - Temic PAL
type=1 - Philips PAL_I
type=2 - Philips NTSC
type=3 - Philips SECAM
type=4 - NoTuner
type=5 - Philips PAL
type=6 - Temic NTSC
type=7 - Temic PAL_I
type=8 - Temic 4036 FY5 NTSC
type=9 - Alps HSBH1
type=10 - Alps TSBE1
type=11 - Alps TSBB5
type=12 - Alps TSBE5
type=13 - Alps TSBC5
make[1]: Leaving directory `/home/kraxel/2/src/bttv-0.7.10/driver'
Suppported cards:
Bt848/Bt848a/Bt849/Bt878/Bt879 cards
------------------------------------
All cards with Bt848/Bt848a/Bt849/Bt878/Bt879 and normal Composite/S-VHS inputs
are supported.
Teletext and Intercast support (PAL only) via VBI samples decoding in software.
Some cards with additional multiplexing of inputs are only partially
supported (unless specifications by the card manufacturer are given).
All other cards only differ by additional components as tuners, sound decoders,
EEPROMs, teletext decoders ...
Tuner and sound decoder support for Bt878/879 is not fully working yet.
MATRIX Vision
-------------
MV-Delta
- Bt848A
- 4 Composite inputs, 1 S-VHS input (shared with 4th composite)
- EEPROM
http://www.matrix-vision.de/
This card has no tuner but supports all 4 composite (1 shared with an
S-VHS input) of the Bt848A.
Very nice card if you only have satellite TV but several tuners connected
to the card via composite.
Many thanks to Matrix-Vision for giving us 2 cards for free which made
Bt848a/Bt849 single crytal operation support possible!!!
Miro/Pinnacle PCTV
------------------
- Bt848
some (all??) come with 2 crystals for PAL/SECAM and NTSC
- PAL, SECAM or NTSC TV tuner (Philips or TEMIC)
- MSP34xx sound decoder on add on board
decoder is supported but AFAIK does not yet work
(other sound MUX setting in GPIO port needed??? somebody who fixed this???)
- 1 tuner, 1 composite and 1 S-VHS input
- tuner type is autodetected
http://www.miro.de/
http://www.miro.com/
Many thanks for the free card which made first NTSC support possible back
in 1997!
Hauppauge Win/TV pci
--------------------
There are many different versions of the Hauppauge cards with different
tuners (TV+Radio ...), teletext decoders.
Note that even cards with same model numbers have (depending on the revision)
different chips on it.
- Bt848 (and others but always in 2 crystal operation???)
newer cards have a Bt878, I2C support for it is still experimental
- PAL, SECAM, NTSC or tuner with or without Radio support
e.g.:
PAL:
TDA5737: VHF, hyperband and UHF mixer/oscillator for TV and VCR 3-band tuners
TSA5522: 1.4 GHz I2C-bus controlled synthesizer, I2C 0xc2-0xc3
NTSC:
TDA5731: VHF, hyperband and UHF mixer/oscillator for TV and VCR 3-band tuners
TSA5518: no datasheet available on Philips site
- Philips SAA5246 or SAA5284 ( or no) Teletext decoder chip
with buffer RAM (e.g. Winbond W24257AS-35: 32Kx8 CMOS static RAM)
SAA5246 (I2C 0x22) is supported
- 256 bytes EEPROM: Microchip 24LC02B or Philips 8582E2Y
with configuration information
I2C address 0xa0 (24LC02B also responds to 0xa2-0xaf)
- 1 tuner, 1 composite and (depending on model) 1 S-VHS input
- 14052B: mux for selection of sound source
- sound decoder: TDA9800, MSP34xx (stereo cards)
AverMedia
---------
...
ADS Channel Surfer
------------------
...
Maxi TV Video PCI 2 card
------------------------
...
Image World ConferenceTV
------------------------
Doesn't work:
- autodetect. Use card=21
- sound mute. Use the line-in volume of your soundcard
- radio tuner. Since the card doesn't have an antenna, it is quite
understandable ;) However, you can hear some stations if you
``ln -s /dev/bttv0 /dev/radio''
=20
- Make sure you have a recent 2.0.x kernel (I recommend AT LEAST 2.0.33!)
or a recent 2.1.x kernel.
Older kernels might lead to problems.
- Do NOT compile videodev into your kernel!
Use the module supplied with bttv.
- Edit "driver/Makefile":
- If you do NOT have a Miro card:
Adjust TUNER to a number between 0 and 7.
This number has the following meaning:
0: Temic PAL tuner
1: Philips PAL_I tuner
2: Philips NTSC tuner
3: Philips SECAM tuner
4: no tuner
5: Philips PAL tuner
6: Temic NTSC tuner
7: Temic PAL tuner
8: Temic 4036 FY5 NTSC tuner
The number corresponds to the number (-1) given at the GPIO port of the
Bt848 on Miro cards.
- Adjust CARD to one of the numbers below:
0: Auto-Detect
1: Miro
2: Hauppauge
3: STB
4: Intel
5: Diamond
6: AVerMedia
7: Matrix Vision MV-Delta
8: Fly Video II
9: TurboTV
10: Newer Hauppauge (Bt878)
11: Miro PCTV Pro
12: ADS Tech Channel Surfer TV (and maybe TV+FM)
13: AVerMedia TVCapture 98
14: Aimslab VHX
15: Zoltrix TV-Max
- You may have to adjust BTTV_MAJOR to a different number depending on your
kernel version. The official number 81 does not work on some setups.
But instead of changing it, better update to a newer kernel.
- If you have a Bt848a or Bt849 on your board you might have to
uncomment: -DUSE_PLL
- do a "make" in the main directory.
If you have Hauppauge card read "README.HAUPPAUGE" before proceeding.
- type "make ins"
This creates the bttv devices in /dev and installs the bttv module
Look in the kernel log file (/var/adm/syslog or /var/log/kernel or something
else depending on your /etc/syslogd.conf or just call "dmesg")
and see what bttv reported (lines starting with "bttv:")
If the installation failed and you send e-mail to me always include those
lines! Dumps of the insmod output alone do not help at all.
- Start X11 in hi or true color mode
8 bit color is also supported but really ugly!
(If you have an S3 card you might have to start X11 before installing
the module!)
If you have Motif or LessTif, "xtvscreen" in the "XTV" directory should
have been compiled with the "make" above.
Otherwise use the statically linked version which should be available
on the web site you got bttv from.
Read the documentation in "XTV" and start xtvscreen.
- make applications by typing "make" in "apps"
bttv.o
the bt848 (grabber chip) driver
insmod args:
card=n card type, see cardlist for a list.
radio=0/1 card supports radio
pll=0/1/2 pll settings
0: don't use PLL
1: 28 MHz crystal installed
2: 35 MHz crystal installed
triton1=0/1 for Triton1 compatibility
Triton1 is automatically recognized
but this might also help with other chipsets
bigendian=n Set the endianness of the gfx framebuffer.
Default is native endian.
fieldnr=1 Count fields. Some TV descrambling software
needs this, for others it only generates
50 useless IRQs/sec.
remap, card, radio and pll accept up to four comma-separted arguments
(for multiple boards).
msp3400.o
The driver for the msp34xx sound processor chips. If you have a
stereo card, you probably want to insmod this one.
insmod args:
debug=1/2 print some debug info to the syslog,
2 is more verbose.
simple=1 Use the "short programming" method. Newer
msp34xx versions support this. You need this
for dbx stereo.
once=1 Don't check the TV-stations Audio mode
every few seconds, but only once after
channel switches.
amsound=1 Audio carrier is AM/NICAM at 6.5 Mhz. This
should improve things for french people, the
carrier autoscan seems to work with FM only...
mixer=n allocate mixer device #n. Default is the
first free slot.
tea6300.o
The driver for the tea6300 fader chip. If you have a stereo
card and the msp3400.o doesn't work, you might want to try this
one. This chip is seen on most STB TV/FM cards (usually from
Gateway OEM sold surplus on auction sites).
insmod args:
debug=1 print some debug info to the syslog.
tda8425.o
The driver for the tda8425 fader chip. This driver used to be
part of bttv.c, so if your sound used to work but does not
anymore, try loading this module.
insmod args:
debug=1 print some debug info to the syslog.
tda9855.o
The driver for the tda9855 audio chip. Afaik, only the
Diamond DTV2000 has this chip.
insmod args:
debug=1 print some debug info to the syslog.
tuner.o
The tuner driver. You need this unless you want to use only
with a camera or external tuner ...
insmod args:
debug=1 print some debug info to the syslog
type=n type of the tuner chip. n as follows:
0: Temic PAL tuner
1: Philips PAL_I tuner
2: Philips NTSC tuner
3: Philips SECAM tuner
4: no tuner
5: Philips PAL tuner
6: Temic NTSC tuner
7: Temic PAL tuner
#!/bin/bash
function makedev () {
for dev in 0 1 2 3; do
echo "/dev/$1$dev: char 81 $[ $2 + $dev ]"
rm -f /dev/$1$dev
mknod /dev/$1$dev c 81 $[ $2 + $dev ]
chmod 666 /dev/$1$dev
done
# symlink for default device
rm -f /dev/$1
ln -s /dev/${1}0 /dev/$1
}
# see http://roadrunner.swansea.uk.linux.org/v4lapi.shtml
echo "*** new device names ***"
makedev video 0
makedev radio 64
makedev vtx 192
makedev vbi 224
#echo "*** old device names (for compatibility only) ***"
#makedev bttv 0
#makedev bttv-fm 64
#makedev bttv-vbi 224
# i2c
alias char-major-89 i2c-dev
options i2c-core i2c_debug=1
options i2c-algo-bit bit_test=1
# bttv
alias char-major-81 videodev
alias char-major-81-0 bttv
options bttv card=2 radio=1
options tuner debug=1
# make alsa + msp3400 play nicely
options snd-card-ens snd_index=0
options msp3400 mixer=1
bttv - BT848 frame grabber driver
Copyright (C) 1996,97 Ralph Metzler (rjkm@thp.uni-koeln.de)
& Marcus Metzler (mocm@thp.uni-koeln.de)
according to GNU GPL in file COPYING.
Bttv is a device driver for frame grabber cards using the Bt848 family
of video decoder chips.
Among those are the Bt848, Bt848A, Bt849, Bt878 and Bt879.
The only major differences between the cards by different manufacturers
are the types of tuners and extra components on the boards.
E.g., some cards by Hauppauge have an additional Videotext decoder
and/or sound decoder chip.
Also type (Composite or S-VHS) and number of inputs differ.
Other Brooktree chips (e.g. the Bt829) or chips by other manufacturers
(Philips, Zoran, ...) are NOT supported by bttv.
You can use several cards at the same time.
Interrupts can be shared with other Bt848 cards or any other drivers
which allow it.
The (arbitrary) maximum number of cards is 4 but can be adjusted by
changing BTTV_MAX at the beginning of bttv.c if you need more.
(But which board has more than 4 PCI slots plus 1 for the VGA card?)
Bttv is a standard component of all newer 2.1.x kernels.
This distribution additionally supports 2.0.x kernels and all other
changes and improvements which did not make it into the kernel version
yet.
It also includes versions of videodev.c, i2.c, tuner.c and others
which are the same as in the latest 2.1.x kernel but with 2.0.x support.
A kernel version >2.0.30 is recommended.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Although bttv is now used and tested by many people it still might crash your
computer! Take all precautions to avoid data loss until you are certain
bttv runs on your setup without problems.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The latest version of bttv can be found at:
http://www.thp.uni-koeln.de/~rjkm/linux/bttv.html
Release notes for bttv-0.7.x
============================
This version is based on Ralphs 0.6.4 release. There are alot of
changes. Bugfixes, merged patches from other people, merged fixes
from the kernel version, port to the new i2c stack, removed support
for 2.0.x, code cleanups, ...
You'll need the new i2c stack, download it from
http://www2.lm-sensors.nu/~lm78/download.html
You'll find Ralphs original (mostly outdated) documentation in the
ralphs-doc subdirectory.
Compile bttv
------------
If you are compiling the kernel version, just say 'm' if you are asked
for bttv. I /strongly/ suggest to compile bttv as module, because
there are some insmod options for configuring the driver.
If you downloaded the separate bttv bundle: You need configured kernel
sources to compile the bttv driver. The driver uses some Makefile
magic to compile the modules with your kernel's configuration
(wrt. module-versions, SMP, ...). If you already have compiled the
kernel at least once, you probably don't have do worry about this. If
not, go to /usr/src/linux and run at least "make config". Even
better, compile your own kernel, you'll never become a real hacker
else ;-)
Make bttv work with your card
-----------------------------
Of cource you have to load the modules as very first thing. The
separate bttv bundle comes with a script called "update". I use this
one to load a new version while doing driver hacking. You can use it
too, but check the module arguments first. They work for my setup,
and probably do *not* for yours. Another way is to setup your
/etc/modules.conf file and let kmod load the modules. See also:
Modules.conf: some sample entries for /etc/modules.conf
Insmod-options: list of all insmod options available for bttv and
the helper modules.
MAKEDEV: a script to create the special files for v4l
CARDLIST: List of all supported cards
Loading just the bttv modules is'nt enouth for most cards. The
drivers for the i2c tuner/sound chips must also be loaded. bttv tries
to load them automagically by calling request_module() now, but this
obviously works only with kmod enabled.
The most important insmod option for bttv is "card=n" to select the
correct card type. If you get video but no sound you've very likely
specified the wrong (or no) card type. A list of supported cards is
in CARDLIST.
If your card is'nt listed in CARDLIST, you should read the Sound-FAQ.
Still does'nt work?
-------------------
I do NOT have a lab with 30+ different grabber boards and a
PAL/NTSC/SECAM test signal generator at home, so I often can't
reproduce your problems. This makes debugging very difficuilt for me.
If you have some knowledge and spare time, please try to fix this
yourself (patches very welcome of course...) You know: The linux
slogan is "Do it yourself".
There is a mailing list: video4linux-list@redhat.com. If you have
trouble with some specific TV card, try to ask there instead of
mailing me directly. The chance that someone with the same card
listens there is much higher...
Finally: If you mail some patches for bttv around the world (to
linux-kernel/Alan/Linus/...), please Cc: me.
Have fun with bttv,
Gerd
--
Gerd Knorr <kraxel@goldbach.in-berlin.de>
o Please direct queries about the in kernel version of this driver to
Alan Cox first not to Ralph, or better yet join the video4linux mailing
list (mail video4linux-list-request@redhat.com with "subscribe")
The current I2C-Code could by accident overwrite the configuration EEPROM on
Hauppauge boards!!!
(E.g. the videotext driver and the bt848 driver do not know about each other.
This might cause unwanted states on the I2C bus which overwrite the EEPROM)
Back up this EEPROM before doing anything else by typing:
(do this AFTER installing bttv.o with "make ins" but BEFORE starting the
X application)
make readee
readee > tvee.h
If you encounter any problems in Windows95 (like "PNP component not found" ...)
go back into linux, load bttv and type:
make writeee
writeee
to write the backed up contents.
If you backed up your EEPROM as described above, this will restore it to its
original state.
A detailed description of the meaning of the EEPROM bytes by
Hauppauge would of course be even more helpful!
If you have board type 405 and you did not make a backup, my tvee.h file in
mytvee.h might be of help.
Forget about all of the above if you do not have a Hauppauge board.
The right tuner type should automatically be detected.
Look in your kernel log files to see which one bttv thinks it is.
Because some people were asking about the bandwidth the Bt848 might use up
on the PCI bus I did a little benchmark.
"bonnie -s 200" with a Fireball TM 3.8 Gb using Busmaster DMA on an ASUS P6NP5
without capturing:
-------Sequential Output-------- ---Sequential Input-- --Random--
-Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
200 5353 76.6 5898 16.9 2363 12.1 5889 51.3 6416 10.2 37.8 0.9
while capturing full screen PAL (786x576) with 24bpp:
-------Sequential Output-------- ---Sequential Input-- --Random--
-Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
200 5619 69.3 5939 16.9 2334 12.0 5859 50.9 6441 10.5 37.9 0.9
The differences are small and probably within the normal error margin of
bonnie.
So, one bt848 card does not have much(any?) impact on the normal operation
of a Linux system.
If you have several cards running this will look very differently!
The same is probably true if your Linux box is used as a file server
with 15 (or 30) SCSI drives.
I tested having 2 Bt848 cards grabbing in 32 bit mode (That's almost 100MB/s!)
while running bonnie.
The xtvscreen windows showed severe pixel errors.
After a while the ide driver failed to use DMA and switched DMA off.
It continued running but the results where bad.
Support is in now:
- Turn on the "big red switch" of the sound processor.
- two ioctls to access (some) registers of the sound processor.
- a function in the TV-Widget which monitors the signal quality
and does the mono/stereo switching.
So you should have TV with (stereo) sound now. Radio does _not_ work.
It probably does not work with sat receivers. I can't test this and
therefore have not added support for it yet. If someone needs this and
can help testing the sat stuff, drop me a note.
Gerd
--
Gerd Knorr <kraxel@cs.tu-berlin.de>
bttv and sound mini howto
=========================
There are alot of different bt848/849/878/879 based boards available.
Making video work often is not a big deal, because this is handled
completely by the bt8xx chip, which is common on all boards. But
sound is handled in slightly different ways on each board.
To handle the grabber boards correctly, there is a array tvcards[] in
bttv.c, which holds the informations required for each board. Sound
will work only, if the correct entry is used (for video it often makes
no difference). The bttv driver prints a line to the kernel log,
telling which card type is used. Like this one:
bttv0: model: BT848(Hauppauge old)
You should verify this is correct. If it is'nt, you have to pass the
correct board type as insmod argument, "insmod bttv card=2" for
example. The file MODULES in the driver directory has a list of valid
arguments. If your card is'nt listed there, you might check the
source code for new entries which are not listed yet. If there is'nt
one for your card, you can check if one of the existing entries does
work for you (just trial and error...).
Some boards have an extra processor for sound to do stereo decoding
and other nice features. The msp34xx chips are used by Hauppauge for
example. If your board has one, you might have to load a helper
module like msp3400.o to make sound work. If there is'nt one for the
chip used on your board: Bad luck. Start writing a new one. Well,
you might want to check the video4linux mailing list archive first...
Of course you need a correctly installed soundcard unless you have the
speakers connected directly to the grabber board. Hint: check the
mixer settings too...
How sound works in detail
=========================
Still does'nt work? Looks like some driver hacking is required.
Below is a do-it-yourself description for you.
The bt8xx chips have 32 general purpose pins, and registers to control
these pins. One register is the output enable register
(BT848_GPIO_OUT_EN), it says which pins are actively driven by the
bt848 chip. Another one is the data register (BT848_GPIO_DATA), where
you can get/set the status if these pins. They can be used for input
and output.
All grabber board vendors use these pins to control an external chip
which does the sound routing. But every board is a little different.
These pins are also used by some companies to drive remote control
receiver chips.
As mentioned above, there is a array which holds the required
informations for each known board. You basically have to create a new
line for your board. What is in there:
struct tvcard
{
char *name;
int inputs; /* number of video inputs */
int tuner; /* which of them is the tuner */
int svhs; /* which of them is the svhs input */
u32 gpiomask;
u32 muxsel[8]; /* video mux */
u32 audiomux[6]; /* audio mux: Tuner, Radio, external, internal, mute, stereo */
u32 gpiomask2; /* GPIO MUX mask (this is video) */
};
gpiomask has all bits set which are used to control the audio mux.
This value basically goes to the gpio output enable register. It is
also used to mask bits when switching the audio mux (which is done by
read-modify-write on the gpio data register).
What you have to do is figure out the correct values for gpiomask and
the audiomux array. If you have Windows and the drivers four your
card installed, you might to check out if you can read these registers
values used by the windows driver. A tool to do this is available
from ftp://telepresence.dmem.strath.ac.uk/pub/bt848/winutil
If you hav'nt Windows installed, this is a trial and error game...
Good luck,
Gerd
PS: If you have a new working entry, mail it to Ralph. So it can be
included into next driver version...
......@@ -733,6 +733,12 @@ M: longyear@pobox.com
L: linux-ppp@vger.rutgers.edu
S: Maintained
PROMISE DC4030 CACHING DISK CONTROLLER DRIVER
P: Peter Denison
M: promise@pnd-pc.demon.co.uk
W: http://www.pnd-pc.demon.co.uk/promise/
S: Maintained
RAYLINK/WEBGEAR 802.11 WIRELESS LAN DRIVER
P: Corey Thomas
M: corey@world.std.com
......
......@@ -233,6 +233,10 @@ ifeq ($(CONFIG_IRDA),y)
DRIVERS := $(DRIVERS) drivers/net/irda/irda_drivers.a
endif
ifeq ($(CONFIG_I2C),y)
DRIVERS := $(DRIVERS) drivers/i2c/i2c.a
endif
include arch/$(ARCH)/Makefile
.S.s:
......
......@@ -29,16 +29,16 @@ ifeq ($(have_mcpu),y)
# the host compiler might have on by default. Given that EV4 and EV5
# have the same instruction set, prefer EV5 because an EV5 schedule is
# more likely to keep an EV4 processor busy than vice-versa.
mcpu_done :=
mcpu_done := n
ifeq ($(CONFIG_ALPHA_GENERIC),y)
CFLAGS := $(CFLAGS) -mcpu=ev5
mcpu_done := y
endif
ifeq ($(mcpu_done)$(CONFIG_ALPHA_PYXIS),y)
ifeq ($(mcpu_done)$(CONFIG_ALPHA_PYXIS),ny)
CFLAGS := $(CFLAGS) -mcpu=ev56
mcpu_done := y
endif
ifeq ($(mcpu_done)$(CONFIG_ALPHA_POLARIS),y)
ifeq ($(mcpu_done)$(CONFIG_ALPHA_POLARIS),ny)
ifeq ($(have_mcpu_pca56),y)
CFLAGS := $(CFLAGS) -mcpu=pca56
else
......@@ -46,15 +46,15 @@ ifeq ($(have_mcpu),y)
endif
mcpu_done := y
endif
ifeq ($(mcpu_done)$(CONFIG_ALPHA_NAUTILUS)$(have_mcpu_ev67),yy)
ifeq ($(mcpu_done)$(CONFIG_ALPHA_NAUTILUS)$(have_mcpu_ev67),nyy)
CFLAGS := $(CFLAGS) -mcpu=ev67
mcpu_done := y
endif
ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV4),y)
ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV4),ny)
CFLAGS := $(CFLAGS) -mcpu=ev4
mcpu_done := y
endif
ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV6),y)
ifeq ($(mcpu_done)$(CONFIG_ALPHA_EV6),ny)
ifeq ($(have_mcpu_ev6),y)
CFLAGS := $(CFLAGS) -mcpu=ev6
else
......
......@@ -84,8 +84,8 @@
ldq $1,8($30); \
ldq $2,16($30); \
ldq $3,24($30); \
ldq $20,152($30); \
ldq $21,HAE_CACHE($19); \
ldq $21,152($30); \
ldq $20,HAE_CACHE($19); \
ldq $4,32($30); \
ldq $5,40($30); \
ldq $6,48($30); \
......
......@@ -85,7 +85,7 @@
.long SYMBOL_NAME(sys_sigpending)
.long SYMBOL_NAME(sys_sethostname)
/* 75 */ .long SYMBOL_NAME(sys_setrlimit)
.long SYMBOL_NAME(sys_getrlimit)
.long SYMBOL_NAME(sys_old_getrlimit)
.long SYMBOL_NAME(sys_getrusage)
.long SYMBOL_NAME(sys_gettimeofday)
.long SYMBOL_NAME(sys_settimeofday)
......@@ -200,8 +200,15 @@
.long SYMBOL_NAME(sys_ni_syscall)
.long SYMBOL_NAME(sys_ni_syscall)
/* 190 */ .long SYMBOL_NAME(sys_vfork_wrapper)
.long SYMBOL_NAME(sys_getrlimit)
.long SYMBOL_NAME(sys_mmap2)
.long SYMBOL_NAME(sys_truncate64)
.long SYMBOL_NAME(sys_ftruncate64)
/* 195 */ .long SYMBOL_NAME(sys_stat64)
.long SYMBOL_NAME(sys_lstat64)
.long SYMBOL_NAME(sys_fstat64)
.rept NR_syscalls-186
.rept NR_syscalls-197
.long SYMBOL_NAME(sys_ni_syscall)
.endr
#endif
......@@ -595,7 +595,10 @@ ENTRY(sys_call_table)
.long SYMBOL_NAME(sys_mmap2)
.long SYMBOL_NAME(sys_truncate64)
.long SYMBOL_NAME(sys_ftruncate64)
/* 195 */
.long SYMBOL_NAME(sys_stat64) /* 195 */
.long SYMBOL_NAME(sys_lstat64)
.long SYMBOL_NAME(sys_fstat64)
/*
* NOTE!! This doesn't have to be exact - we just have
......@@ -603,6 +606,6 @@ ENTRY(sys_call_table)
* entries. Don't panic if you notice that this hasn't
* been shrunk every time we add a new system call.
*/
.rept NR_syscalls-194
.rept NR_syscalls-197
.long SYMBOL_NAME(sys_ni_syscall)
.endr
......@@ -68,6 +68,16 @@ void (*acpi_idle)(void) = NULL;
*/
void (*acpi_power_off)(void) = NULL;
/*
* We use this if we don't have any better
* idle routine..
*/
static void default_idle(void)
{
if (current_cpu_data.hlt_works_ok && !hlt_counter)
asm volatile("sti ; hlt" : : : "memory");
}
/*
* The idle thread. There's no useful work to be
* done, so just try to conserve power and have a
......@@ -82,26 +92,16 @@ void cpu_idle(void)
current->counter = -100;
while (1) {
while (!current->need_resched) {
if (!current_cpu_data.hlt_works_ok)
continue;
if (hlt_counter)
continue;
asm volatile("sti ; hlt" : : : "memory");
}
void (*idle)(void) = acpi_idle;
if (!idle)
idle = default_idle;
while (!current->need_resched)
idle();
schedule();
check_pgt_cache();
if (acpi_idle)
acpi_idle();
}
}
/*
* This routine reboots the machine by asking the keyboard
* controller to pulse the reset-line low. We try that for a while,
* and if it doesn't work, we do some other stupid things.
*/
static long no_idt[2] = {0, 0};
static int reboot_mode = 0;
static int reboot_thru_bios = 0;
......
......@@ -592,13 +592,16 @@ void __init setup_arch(char **cmdline_p)
*/
max_pfn = 0;
for (i = 0; i < e820.nr_map; i++) {
unsigned long curr_pfn;
unsigned long start, end;
/* RAM? */
if (e820.map[i].type != E820_RAM)
continue;
curr_pfn = PFN_DOWN(e820.map[i].addr + e820.map[i].size);
if (curr_pfn > max_pfn)
max_pfn = curr_pfn;
start = PFN_UP(e820.map[i].addr);
end = PFN_DOWN(e820.map[i].addr + e820.map[i].size);
if (start >= end)
continue;
if (end > max_pfn)
max_pfn = end;
}
/*
......
......@@ -11,6 +11,7 @@
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/spinlock.h>
#include <linux/kernel_stat.h>
#include <linux/smp_lock.h>
#include <linux/irq.h>
......@@ -638,12 +639,19 @@ int prof_counter[NR_CPUS] = { 1, };
*/
static unsigned int __init get_8254_timer_count(void)
{
extern rwlock_t xtime_lock;
unsigned long flags;
unsigned int count;
write_lock_irqsave(&xtime_lock, flags);
outb_p(0x00, 0x43);
count = inb_p(0x40);
count |= inb_p(0x40) << 8;
write_unlock_irqrestore(&xtime_lock, flags);
return count;
}
......
......@@ -11,7 +11,7 @@ SUB_DIRS := block char net parport sound misc
MOD_SUB_DIRS := $(SUB_DIRS)
ALL_SUB_DIRS := $(SUB_DIRS) pci sgi scsi sbus cdrom isdn pnp i2o \
macintosh video dio zorro fc4 usb \
nubus tc ap1000 atm pcmcia
nubus tc ap1000 atm pcmcia i2c
ifdef CONFIG_DIO
SUB_DIRS += dio
......@@ -141,4 +141,13 @@ ifeq ($(CONFIG_HAMRADIO),y)
MOD_SUB_DIRS += net/hamradio
endif
ifeq ($(CONFIG_I2C),y)
SUB_DIRS += i2c
MOD_SUB_DIRS += i2c
else
ifeq ($(CONFIG_I2C),m)
MOD_SUB_DIRS += i2c
endif
endif
include $(TOPDIR)/Rules.make
......@@ -73,7 +73,7 @@ else
fi
if [ "$CONFIG_X86" = "y" ]; then
bool ' Intel PIIXn chipsets support' CONFIG_BLK_DEV_PIIX
if [ "$CONFIG_BLK_DEV_PIIX" = "y" ]; then
if [ "$CONFIG_BLK_DEV_PIIX" = "y" -a "$CONFIG_IDEDMA_PCI_AUTO" = "y" ]; then
bool ' PIIXn Tuning support' CONFIG_BLK_DEV_PIIX_TUNING
fi
fi
......@@ -98,7 +98,7 @@ else
if [ "$CONFIG_IDEDMA_PCI_EXPERIMENTAL" = "y" ]; then
bool ' Tekram TRM290 chipset support (EXPERIMENTAL)' CONFIG_BLK_DEV_TRM290
if [ "$CONFIG_X86" = "y" ]; then
bool ' VIA82CXXX chipset support (EXPERIMENTAL)' CONFIG_BLK_DEV_VIA82CXXX
bool ' VIA82CXXX chipset support (EXPERIMENTAL)' CONFIG_BLK_DEV_VIA82CXXX
fi
fi
fi
......
......@@ -4,7 +4,7 @@ FAQ list:
=========
A FAQ list may be found in the fdutils package (see below), and also
at http://poboxes.com/Alain.Knaff/floppy/FAQ.html
at http://fdutils.linux.lu/FAQ.html
LILO configuration options (Thinkpad users, read this)
......@@ -13,15 +13,15 @@ LILO configuration options (Thinkpad users, read this)
The floppy driver is configured using the 'floppy=' option in
lilo. This option can be typed at the boot prompt, or entered in the
lilo configuration file.
Example: If your kernel is called linux-pre2.0.9, type the following line
Example: If your kernel is called linux-2.2.13, type the following line
at the lilo boot prompt (if you have a thinkpad):
linux-pre2.0.9 floppy=thinkpad
linux-2.2.13 floppy=thinkpad
You may also enter the following line in /etc/lilo.conf, in the description
of linux-pre2.0.9:
of linux-2.2.13:
append = "floppy=thinkpad"
Several floppy related options may be given, example:
linux-pre2.0.9 floppy=daring floppy=two_fdc
linux-2.2.13 floppy=daring floppy=two_fdc
append = "floppy=daring floppy=two_fdc"
If you give options both in the lilo config file and on the boot
......@@ -30,28 +30,19 @@ prompt options coming last. That's why there are also options to
restore the default behavior.
If you use the floppy driver as a module, use the following syntax:
insmod floppy 'floppy="<options>"'
insmod floppy <options>
Example:
insmod floppy 'floppy="daring two_fdc"'
Note that in this case 'floppy=' should only be typed out once, and
not once for each option. You need at least modules-1.3.57 for this
method. However, the older environment variable based syntax is still
available:
(sh syntax): floppy="daring two_fdc" insmod floppy
(csh syntax): setenv floppy "daring two_fdc" ; insmod floppy
insmod floppy daring two_fdc
Some versions of insmod are buggy in one way or another. If you have
any problems (options not being passed correctly, segfaults during
insmod), first check whether there is a more recent version. If there
isn't, use the old method using environment variables.
insmod), first check whether there is a more recent version.
The floppy related options include:
floppy=asus_pci
Sets the bit mask to allow only units 0 and 1. Obsolete, as
this is the default setting anyways
Sets the bit mask to allow only units 0 and 1. (default)
floppy=daring
Tells the floppy driver that you have a well behaved floppy controller.
......@@ -63,14 +54,15 @@ isn't, use the old method using environment variables.
with caution.
floppy=one_fdc
Tells the floppy driver that you have only floppy controller (default)
Tells the floppy driver that you have only one floppy controller.
(default)
floppy=two_fdc
floppy=<address>,two_fdc
Tells the floppy driver that you have two floppy controllers. The
second floppy controller is assumed to be at <address>. This
option is not needed if the second controller is at address
0x370, and if you use the 'cmos' option
Tells the floppy driver that you have two floppy controllers.
The second floppy controller is assumed to be at <address>.
This option is not needed if the second controller is at address
0x370, and if you use the 'cmos' option.
floppy=thinkpad
Tells the floppy driver that you have a Thinkpad. Thinkpads use an
......@@ -89,7 +81,7 @@ isn't, use the old method using environment variables.
and is thus harder to find, whereas non-dma buffers may be
allocated in virtual memory. However, I advise against this if
you have an FDC without a FIFO (8272A or 82072). 82072A and
later are OK). You also need at least a 486 to use nodma.
later are OK. You also need at least a 486 to use nodma.
If you use nodma mode, I suggest you also set the FIFO
threshold to 10 or lower, in order to limit the number of data
transfer interrupts.
......@@ -99,8 +91,8 @@ isn't, use the old method using environment variables.
If you want to avoid this, explicitely ask for 'yesdma'.
floppy=yesdma
Tells the floppy driver that a workable DMA channel is available
(the default).
Tells the floppy driver that a workable DMA channel is available.
(default)
floppy=nofifo
Disables the FIFO entirely. This is needed if you get "Bus
......@@ -108,7 +100,7 @@ isn't, use the old method using environment variables.
from other devices) while accessing the floppy.
floppy=fifo
Enables the FIFO (default)
Enables the FIFO. (default)
floppy=<threshold>,fifo_depth
Sets the FIFO threshold. This is mostly relevant in DMA
......@@ -147,18 +139,18 @@ isn't, use the old method using environment variables.
(Note: there are two valid types for ED drives. This is because 5 was
initially chosen to represent floppy *tapes*, and 6 for ED drives.
AMI ignored this, and used 5 for ED drives. That's why the floppy
driver handles both)
driver handles both.)
floppy=unexpected_interrupts
Print a warning message when an unexpected interrupt is received
(default behavior)
Print a warning message when an unexpected interrupt is received.
(default)
floppy=no_unexpected_interrupts
floppy=L40SX
Don't print a message when an unexpected interrupt is received. This
is needed on IBM L40SX laptops in certain video modes. (There seems
to be an interaction between video and floppy. The unexpected interrupts
only affect performance, and can safely be ignored.)
to be an interaction between video and floppy. The unexpected
interrupts affect only performance, and can be safely ignored.)
floppy=broken_dcl
Don't use the disk change line, but assume that the disk was
......@@ -168,53 +160,52 @@ isn't, use the old method using environment variables.
floppy operation less efficient due to unneeded cache
flushings, and slightly more unreliable. Please verify your
cable, connection and jumper settings if you have any DCL
problems. However, some older drives, and also some Laptops
problems. However, some older drives, and also some laptops
are known not to have a DCL.
floppy=debug
Print debugging messages
Print debugging messages.
floppy=messages
Print informational messages for some operations (disk change
notifications, warnings about over and underruns, and about
autodetection)
autodetection).
floppy=silent_dcl_clear
Uses a less noisy way to clear the disk change line (which
doesn't involve seeks). Implied by daring.
doesn't involve seeks). Implied by 'daring' option.
floppy=<nr>,irq
Sets the floppy IRQ to <nr> instead of 6
Sets the floppy IRQ to <nr> instead of 6.
floppy=<nr>,dma
Sets the floppy DMA channel to <nr> instead of 2
Sets the floppy DMA channel to <nr> instead of 2.
floppy=slow
Use PS/2 stepping rate:
" PS/2 floppies have much slower step rates than regular floppies.
It's been recommended that take about 1/4 of the default speed
in some more extreme cases."
Supporting utilities and additional documentation:
==================================================
Additional parameters of the floppy driver can be configured at run
time. Utilities which do this can be found in the fdutils
package. This package also contains a new version of mtools which
allows to access high capacity disks (up to 1992K on a high density 3
1/2 disk!). It also contains additional documentation about the floppy
driver. It can be found at:
linux.wauug.org:/pub/knaff/fdutils/fdutils-4.3.src.tar.gz
sunsite.unc.edu:/pub/Linux/system/Misc/fdutils-4.3.src.tar.gz
tsx-11.mit.edu:/pub/linux/sources/sbin/fdutils-4.3.src.tar.gz
Alpha patches to these utilities are at:
http://www.club.innet.lu/~year3160/fdutils/ALPHA
All patches contained in this directory are directly against the base
version, i.e. DON'T APPLY THEM ON TOP OF EACH OTHER. Only apply the
most recent one.
Additional parameters of the floppy driver can be configured at
runtime. Utilities which do this can be found in the fdutils package.
This package also contains a new version of mtools which allows to
access high capacity disks (up to 1992K on a high density 3 1/2 disk!).
It also contains additional documentation about the floppy driver.
The latest version can be found at fdutils homepage:
http://fdutils.linux.lu
The fdutils-5.3 release can be found at:
http://fdutils.linux.lu/fdutils-5.3.src.tar.gz
http://www.tux.org/pub/knaff/fdutils/fdutils-5.3.src.tar.gz
ftp://tsx-11.mit.edu/pub/linux/sources/sbin/fdutils-5.3.src.tar.gz
ftp://metalab.unc.edu/pub/Linux/utils/disk-management/fdutils-5.3.src.tar.gz
Reporting problems about the floppy driver
==========================================
......@@ -228,4 +219,4 @@ sure to mention also the type of the filesystem in the subject line.
Be sure to read the FAQ before mailing/posting any bug reports!
Alain
Alain
/*
* linux/drivers/block/aec6210.c Version 0.03 Nov. 12, 1999
* linux/drivers/block/aec6210.c Version 0.04 Dec. 13, 1999
*
* Copyright (C) 1998-99 Andre Hedrick (andre@suse.com)
* May be copied or modified under the terms of the GNU General Public License
......
/*
* linux/drivers/block/alim15x3.c Version 0.06 Sept. 3, 1999
* linux/drivers/block/alim15x3.c Version 0.07 Dec. 13, 1999
*
* Copyright (C) 1998-99 Michel Aubry, Maintainer
* Copyright (C) 1998-99 Andrzej Krzysztofowicz, Maintainer
......@@ -251,6 +251,8 @@ static void ali15x3_tune_drive (ide_drive_t *drive, byte pio)
unsigned long flags;
int bus_speed = ide_system_bus_speed();
int port = hwif->index ? 0x5c : 0x58;
int portFIFO = hwif->channel ? 0x55 : 0x54;
byte cd_dma_fifo = 0;
pio = ide_get_best_pio_mode(drive, pio, 5, &d);
s_time = ide_pio_timings[pio].setup_time;
......@@ -270,10 +272,29 @@ static void ali15x3_tune_drive (ide_drive_t *drive, byte pio)
r_clc = 1;
} else {
if (r_clc >= 16)
r_clc = 0;
r_clc = 0;
}
save_flags(flags);
cli();
/*
* PIO mode => ATA FIFO on, ATAPI FIFO off
*/
pci_read_config_byte(dev, portFIFO, &cd_dma_fifo);
if (drive->media==ide_disk) {
if (hwif->index) {
pci_write_config_byte(dev, portFIFO, (cd_dma_fifo & 0x0F) | 0x50);
} else {
pci_write_config_byte(dev, portFIFO, (cd_dma_fifo & 0xF0) | 0x05);
}
} else {
if (hwif->index) {
pci_write_config_byte(dev, portFIFO, cd_dma_fifo & 0x0F);
} else {
pci_write_config_byte(dev, portFIFO, cd_dma_fifo & 0xF0);
}
}
pci_write_config_byte(dev, port, s_clc);
pci_write_config_byte(dev, port+drive->select.b.unit+2, (a_clc << 4) | r_clc);
restore_flags(flags);
......@@ -374,6 +395,7 @@ static void ali15x3_dma2_enable(ide_drive_t *drive, unsigned long dma_base)
{
byte unit = (drive->select.b.unit & 0x01);
byte bits = (drive->id->dma_mword | drive->id->dma_1word) & 0x07;
byte ultra = (unit) ? 0x7f : 0xf7;
byte tmpbyte;
ide_hwif_t *hwif = HWIF(drive);
unsigned long flags;
......@@ -385,11 +407,15 @@ static void ali15x3_dma2_enable(ide_drive_t *drive, unsigned long dma_base)
* clear "ultra enable" bit
*/
pci_read_config_byte(hwif->pci_dev, m5229_udma_setting_index, &tmpbyte);
#if 0
if (unit) {
tmpbyte &= 0x7f;
} else {
tmpbyte &= 0xf7;
}
#else
tmpbyte &= ultra;
#endif
save_flags(flags);
cli();
pci_write_config_byte(hwif->pci_dev, m5229_udma_setting_index, tmpbyte);
......@@ -586,6 +612,7 @@ unsigned int __init pci_init_ali15x3 (struct pci_dev *dev, const char *name)
struct pci_dev *isa;
unsigned long fixdma_base = dev->resource[4].start;
byte tmpbyte;
unsigned long flags;
pci_read_config_byte(dev, PCI_REVISION_ID, &m5229_revision);
......@@ -717,17 +744,123 @@ unsigned int __init pci_init_ali15x3 (struct pci_dev *dev, const char *name)
m5229_revision = 0xC2;
}
}
/*
* CD_ROM DMA on (m5229, 0x53, bit0)
* Enable this bit even if we want to use PIO
* PIO FIFO off (m5229, 0x53, bit1)
* The hardware will use 0x54h and 0x55h to control PIO FIFO
*/
pci_read_config_byte(dev, 0x53, &tmpbyte);
tmpbyte = (tmpbyte & (~0x02)) | 0x01;
save_flags(flags);
cli();
pci_write_config_byte(dev, 0x53, tmpbyte);
restore_flags(flags);
return 0;
}
unsigned int __init ata66_ali15x3 (ide_hwif_t *hwif)
{
#if 0
/*
* FIXME !!!!
* {0x4a,0x01,0x01}, {0x4a,0x02,0x02}
* FIXME !!! This detection needs to be in "ata66_ali15x3()"
* below as a standard detection return.
*/
if (m5229_revision >= 0xC2) {
unsigned long flags;
/*
* 1543C-B?, 1535, 1535D, 1553
* Note 1: not all "motherboard" support this detection
* Note 2: if no udma 66 device, the detection may "error".
* but in this case, we will not set the device to
* ultra 66, the detection result is not important
*/
save_flags(flags);
cli();
/*
* enable "Cable Detection", m5229, 0x4b, bit3
*/
pci_read_config_byte(dev, 0x4b, &tmpbyte);
pci_write_config_byte(dev, 0x4b, tmpbyte | 0x08);
/*
* set south-bridge's enable bit, m1533, 0x79
*/
pci_read_config_byte(isa_dev, 0x79, &tmpbyte);
if (m5229_revision == 0xC2) {
/*
* 1543C-B0 (m1533, 0x79, bit 2)
*/
pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x04);
} else if (m5229_revision == 0xC3) {
/*
* 1553/1535 (m1533, 0x79, bit 1)
*/
pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x02);
}
restore_flags(flags);
/*
* Ultra66 cable detection (from Host View)
* m5229, 0x4a, bit0: primary, bit1: secondary 80 pin
*/
pci_read_config_byte(dev, 0x4a, &tmpbyte);
/*
* 0x4a, bit0 is 0 => primary channel
* has 80-pin (from host view)
*/
if (!(tmpbyte & 0x01))
cable_80_pin[0] = 1;
/*
* 0x4a, bit1 is 0 => secondary channel
* has 80-pin (from host view)
*/
if (!(tmpbyte & 0x02))
cable_80_pin[1] = 1;
} else {
unsigned long flags;
/*
* revision 0x20 (1543-E, 1543-F)
* revision 0xC0, 0xC1 (1543C-C, 1543C-D, 1543C-E)
* clear CD-ROM DMA write bit, m5229, 0x4b, bit 7
*/
pci_read_config_byte(dev, 0x4b, &tmpbyte);
save_flags(flags);
cli();
/*
* clear bit 7
*/
pci_write_config_byte(dev, 0x4b, tmpbyte & 0x7F);
restore_flags(flags);
/*
* check m1533, 0x5e, bit 1~4 == 1001 => & 00011110 = 00010010
*/
pci_read_config_byte(isa_dev, 0x5e, &tmpbyte);
chip_is_1543c_e = ((tmpbyte & 0x1e) == 0x12) ? 1: 0;
}
byte ata66mask = hwif->channel ? 0x02 : 0x01;
unsigned int ata66 = 0;
/*
* Ultra66 cable detection (from Host View)
* m5229, 0x4a, bit0: primary, bit1: secondary 80 pin
*
* 0x4a, bit0 is 0 => primary channel
* has 80-pin (from host view)
*
* 0x4a, bit1 is 0 => secondary channel
* has 80-pin (from host view)
*/
pci_read_config_byte(hwif->pci_dev, 0x4a, &tmpbyte);
ata66 = (!(tmpbyte & ata66mask)) ? 0 : 1;
return(ata66);
#else
return 0;
#endif
}
void __init ide_init_ali15x3 (ide_hwif_t *hwif)
......@@ -773,12 +906,14 @@ void __init ide_init_ali15x3 (ide_hwif_t *hwif)
*/
hwif->dmaproc = &ali15x3_dmaproc;
hwif->autodma = 1;
hwif->drives[0].autotune = 0;
hwif->drives[1].autotune = 0;
} else {
hwif->autodma = 0;
hwif->drives[0].autotune = 1;
hwif->drives[1].autotune = 1;
}
#if defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_PROC_FS)
ali_proc = 1;
bmide_dev = hwif->pci_dev;
......
/*
* linux/drivers/block/cy82c693.c Version 0.34 Sept 3, 1999
* linux/drivers/block/cy82c693.c Version 0.34 Dec. 13, 1999
*
* Copyright (C) 1998-99 Andreas S. Krebs (akrebs@altavista.net), Maintainer
* Copyright (C) 1998-99 Andre Hedrick, Integrater
......@@ -426,8 +426,14 @@ unsigned int __init pci_init_cy82c693(struct pci_dev *dev, const char *name)
void __init ide_init_cy82c693(ide_hwif_t *hwif)
{
hwif->chipset = ide_cy82c693;
if (hwif->dma_base)
hwif->dmaproc = &cy82c693_dmaproc;
hwif->tuneproc = &cy82c693_tune_drive;
if (hwif->dma_base) {
hwif->dmaproc = &cy82c693_dmaproc;
hwif->drives[0].autotune = 0;
hwif->drives[1].autotune = 0;
} else {
hwif->drives[0].autotune = 1;
hwif->drives[1].autotune = 1;
}
}
/*
* linux/drivers/block/hpt34x.c Version 0.27 Sept 03, 1999
* linux/drivers/block/hpt34x.c Version 0.28 Dec. 13, 1999
*
* Copyright (C) 1998-99 Andre Hedrick (andre@suse.com)
* May be copied or modified under the terms of the GNU General Public License
......@@ -377,6 +377,8 @@ void __init ide_init_hpt34x (ide_hwif_t *hwif)
#endif
#endif /* CONFIG_BLK_DEV_HPT34X_DMA */
hwif->dmaproc = &hpt34x_dmaproc;
hwif->drives[0].autotune = 0;
hwif->drives[1].autotune = 0;
} else {
hwif->drives[0].autotune = 1;
hwif->drives[1].autotune = 1;
......
/*
* linux/drivers/block/hpt366.c Version 0.13 Sept. 3, 1999
* linux/drivers/block/hpt366.c Version 0.14 Dec. 13, 1999
*
* Copyright (C) 1999 Andre Hedrick <andre@suse.com>
* May be copied or modified under the terms of the GNU General Public License
......@@ -507,6 +507,10 @@ void __init ide_init_hpt366 (ide_hwif_t *hwif)
hwif->tuneproc = &hpt366_tune_drive;
if (hwif->dma_base) {
hwif->dmaproc = &hpt366_dmaproc;
#if 0
hwif->drives[0].autotune = 0;
hwif->drives[1].autotune = 0;
#endif
} else {
hwif->autodma = 0;
hwif->drives[0].autotune = 1;
......
......@@ -2613,6 +2613,10 @@ int __init ide_cdrom_init (void)
continue;
}
}
if (drive->scsi) {
printk("ide-cd: passing drive %s to ide-scsi emulation.\n", drive->name);
continue;
}
info = (struct cdrom_info *) kmalloc (sizeof (struct cdrom_info), GFP_KERNEL);
if (info == NULL) {
printk ("%s: Can't allocate a cdrom structure\n", drive->name);
......
......@@ -241,9 +241,10 @@ int ide_multwrite (ide_drive_t *drive, unsigned int mcount)
#ifdef CONFIG_BLK_DEV_PDC4030
rq->sector += nsect;
#endif
if ((rq->nr_sectors -= nsect) <= 0)
{
spin_unlock_irqrestore(&io_request_lock, flags);
if ((rq->nr_sectors -= nsect) <= 0) {
printk("%s: multwrite: count=%d, current=%ld\n",
drive->name, nsect, rq->nr_sectors);
spin_unlock_irqrestore(&io_request_lock, flags);
break;
}
if ((rq->current_nr_sectors -= nsect) == 0) {
......
......@@ -42,6 +42,8 @@
char *ide_xfer_verbose (byte xfer_rate)
{
switch(xfer_rate) {
case XFER_UDMA_6: return("UDMA 6");
case XFER_UDMA_5: return("UDMA 5");
case XFER_UDMA_4: return("UDMA 4");
case XFER_UDMA_3: return("UDMA 3");
case XFER_UDMA_2: return("UDMA 2");
......@@ -251,6 +253,10 @@ int ide_config_drive_speed (ide_drive_t *drive, byte speed)
drive->id->dma_1word &= ~0x0F00;
switch(speed) {
#if 0
case XFER_UDMA_6: drive->id->dma_ultra |= 0x1010; break;
case XFER_UDMA_5: drive->id->dma_ultra |= 0x1010; break;
#endif
case XFER_UDMA_4: drive->id->dma_ultra |= 0x1010; break;
case XFER_UDMA_3: drive->id->dma_ultra |= 0x0808; break;
case XFER_UDMA_2: drive->id->dma_ultra |= 0x0404; break;
......
......@@ -1614,6 +1614,10 @@ int idefloppy_init (void)
printk (KERN_ERR "ide-floppy: %s: not supported by this version of ide-floppy\n", drive->name);
continue;
}
if (drive->scsi) {
printk("ide-floppy: passing drive %s to ide-scsi emulation.\n", drive->name);
continue;
}
if ((floppy = (idefloppy_floppy_t *) kmalloc (sizeof (idefloppy_floppy_t), GFP_KERNEL)) == NULL) {
printk (KERN_ERR "ide-floppy: %s: Can't allocate a floppy structure\n", drive->name);
continue;
......
......@@ -29,6 +29,8 @@
#define DEVID_PIIXb ((ide_pci_devid_t){PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371FB_1})
#define DEVID_PIIX3 ((ide_pci_devid_t){PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_1})
#define DEVID_PIIX4 ((ide_pci_devid_t){PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB})
#define DEVID_PIIX4E ((ide_pci_devid_t){PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_1})
#define DEVID_PIIX4U ((ide_pci_devid_t){PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_1})
#define DEVID_VIA_IDE ((ide_pci_devid_t){PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C561})
#define DEVID_VP_IDE ((ide_pci_devid_t){PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1})
#define DEVID_PDC20246 ((ide_pci_devid_t){PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20246})
......@@ -171,11 +173,14 @@ extern void ide_init_pdc202xx(ide_hwif_t *);
#ifdef CONFIG_BLK_DEV_PIIX
extern unsigned int pci_init_piix(struct pci_dev *, const char *);
extern unsigned int ata66_piix(ide_hwif_t *);
extern void ide_init_piix(ide_hwif_t *);
#define PCI_PIIX &pci_init_piix
#define ATA66_PIIX &ata66_piix
#define INIT_PIIX &ide_init_piix
#else
#define PCI_PIIX NULL
#define ATA66_PIIX NULL
#define INIT_PIIX NULL
#endif
......@@ -254,6 +259,8 @@ static ide_pci_device_t ide_pci_chipsets[] __initdata = {
{DEVID_PIIXb, "PIIX", NULL, NULL, INIT_PIIX, NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0 },
{DEVID_PIIX3, "PIIX3", PCI_PIIX, NULL, INIT_PIIX, NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0 },
{DEVID_PIIX4, "PIIX4", PCI_PIIX, NULL, INIT_PIIX, NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0 },
{DEVID_PIIX4E, "PIIX4", PCI_PIIX, NULL, INIT_PIIX, NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0 },
{DEVID_PIIX4U, "PIIX4", PCI_PIIX, ATA66_PIIX, INIT_PIIX, NULL, {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, ON_BOARD, 0 },
{DEVID_VIA_IDE, "VIA_IDE", NULL, NULL, NULL, NULL, {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, ON_BOARD, 0 },
{DEVID_VP_IDE, "VP_IDE", PCI_VIA82CXXX, ATA66_VIA82CXXX,INIT_VIA82CXXX, DMA_VIA82CXXX, {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, ON_BOARD, 0 },
{DEVID_PDC20246,"PDC20246", PCI_PDC202XX, NULL, INIT_PDC202XX, NULL, {{0x50,0x02,0x02}, {0x50,0x04,0x04}}, OFF_BOARD, 16 },
......@@ -566,7 +573,11 @@ static void __init ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_t *
hwif->irq = hwif->channel ? 15 : 14;
goto bypass_umc_dma;
}
hwif->udma_four = (d->ata66_check) ? d->ata66_check(hwif) : 0;
if (hwif->udma_four) {
printk("%s: ATA-66 forced bit set (WARNING)!!\n", d->name);
} else {
hwif->udma_four = (d->ata66_check) ? d->ata66_check(hwif) : 0;
}
#ifdef CONFIG_BLK_DEV_IDEDMA
if (IDE_PCI_DEVID_EQ(d->devid, DEVID_SIS5513) ||
IDE_PCI_DEVID_EQ(d->devid, DEVID_HPT34X))
......
This diff is collapsed.
......@@ -136,6 +136,9 @@
#include <linux/genhd.h>
#include <linux/blkpg.h>
#include <linux/malloc.h>
#ifndef MODULE
#include <linux/init.h>
#endif /* MODULE */
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/ide.h>
......@@ -1219,6 +1222,8 @@ static void ide_do_request (ide_hwgroup_t *hwgroup)
ide_get_lock(&ide_lock, ide_intr, hwgroup); /* for atari only: POSSIBLY BROKEN HERE(?) */
__cli(); /* necessary paranoia: ensure IRQs are masked on local CPU */
while (!hwgroup->busy) {
hwgroup->busy = 1;
drive = choose_drive(hwgroup);
......@@ -1538,14 +1543,8 @@ void ide_intr (int irq, void *dev_id, struct pt_regs *regs)
} else {
/*
* Whack the status register, just in case we have a leftover pending IRQ.
*
* Unless we are some version of a Promise Ultra66 :: PDC20262.
* We will hang like a rock....
*/
byte skip_status = ((hwif->pci_dev->device == PCI_DEVICE_ID_PROMISE_20262) ||
(hwif->pci_dev->device == PCI_DEVICE_ID_TTI_HPT366)) ? 1 : 0;
if (!skip_status)
(void) IN_BYTE(hwif->io_ports[IDE_STATUS_OFFSET]);
(void) IN_BYTE(hwif->io_ports[IDE_STATUS_OFFSET]);
#endif /* CONFIG_BLK_DEV_IDEPCI */
}
spin_unlock_irqrestore(&io_request_lock, flags);
......@@ -2337,6 +2336,7 @@ void ide_add_generic_settings (ide_drive_t *drive)
ide_add_setting(drive, "slow", SETTING_RW, -1, -1, TYPE_BYTE, 0, 1, 1, 1, &drive->slow, NULL);
ide_add_setting(drive, "unmaskirq", drive->no_unmask ? SETTING_READ : SETTING_RW, HDIO_GET_UNMASKINTR, HDIO_SET_UNMASKINTR, TYPE_BYTE, 0, 1, 1, 1, &drive->unmask, NULL);
ide_add_setting(drive, "using_dma", SETTING_RW, HDIO_GET_DMA, HDIO_SET_DMA, TYPE_BYTE, 0, 1, 1, 1, &drive->using_dma, set_using_dma);
ide_add_setting(drive, "ide_scsi", SETTING_RW, -1, -1, TYPE_BYTE, 0, 1, 1, 1, &drive->scsi, NULL);
}
int ide_wait_cmd (ide_drive_t *drive, int cmd, int nsect, int feature, int sectors, byte *buf)
......@@ -2457,54 +2457,7 @@ static int ide_ioctl (struct inode *inode, struct file *file,
err = ide_wait_cmd(drive, args[0], args[1], args[2], args[3], argbuf);
if (!err && set_transfer(drive, args[0], args[1], args[2])) {
#if 1
ide_driveid_update(drive);
#else /*
* Re-read drive->id for possible DMA mode
* change (copied from ide-probe.c)
*/
struct hd_driveid *id;
unsigned long timeout, irqs, flags;
probe_irq_off(probe_irq_on());
irqs = probe_irq_on();
if (IDE_CONTROL_REG)
OUT_BYTE(drive->ctl,IDE_CONTROL_REG);
ide_delay_50ms();
OUT_BYTE(WIN_IDENTIFY, IDE_COMMAND_REG);
timeout = jiffies + WAIT_WORSTCASE;
do {
if (0 < (signed long)(jiffies - timeout)) {
if (irqs)
(void) probe_irq_off(irqs);
goto abort; /* drive timed-out */
}
ide_delay_50ms(); /* give drive a breather */
} while (IN_BYTE(IDE_ALTSTATUS_REG) & BUSY_STAT);
ide_delay_50ms(); /* wait for IRQ and DRQ_STAT */
if (!OK_STAT(GET_STAT(),DRQ_STAT,BAD_R_STAT))
goto abort;
__save_flags(flags); /* local CPU only */
__cli(); /* local CPU only; some systems need this */
id = kmalloc(SECTOR_WORDS*4, GFP_ATOMIC);
ide_input_data(drive, id, SECTOR_WORDS);
(void) GET_STAT(); /* clear drive IRQ */
ide__sti(); /* local CPU only */
__restore_flags(flags); /* local CPU only */
ide_fix_driveid(id);
if (id && id->cyls) {
drive->id->dma_ultra = id->dma_ultra;
drive->id->dma_mword = id->dma_mword;
drive->id->dma_1word = id->dma_1word;
/* anything more ? */
#ifdef DEBUG
printk("%s: dma_ultra=%04X, dma_mword=%04X, dma_1word=%04X\n",
drive->name, id->dma_ultra, id->dma_mword, id->dma_1word);
#endif
kfree(id);
}
#endif
}
abort:
if (copy_to_user((void *)arg, argbuf, argsize))
......@@ -2690,7 +2643,9 @@ static int __init match_parm (char *s, const char *keywords[], int vals[], int m
* "hdx=flash" : allows for more than one ata_flash disk to be
* registered. In most cases, only one device
* will be present.
*
* "hdx=scsi" : the return of the ide-scsi flag, this is useful for
* allowwing ide-floppy, ide-tape, and ide-cdrom|writers
* to use ide-scsi emulation on a device specific option.
* "idebus=xx" : inform IDE driver of VESA/PCI bus speed in MHz,
* where "xx" is between 20 and 66 inclusive,
* used when tuning chipset PIO modes.
......@@ -2752,7 +2707,7 @@ static int __init match_parm (char *s, const char *keywords[], int vals[], int m
* "idex=dc4030" : probe/support Promise DC4030VL interface
* "ide=doubler" : probe/support IDE doublers on Amiga
*/
void __init ide_setup (char *s)
int __init ide_setup (char *s)
{
int i, vals[3];
ide_hwif_t *hwif;
......@@ -2769,7 +2724,7 @@ void __init ide_setup (char *s)
printk("ide: Enabled support for IDE doublers\n");
ide_doubler = 1;
return;
return 0;
}
#endif /* CONFIG_BLK_DEV_IDEDOUBLER */
......@@ -2782,7 +2737,7 @@ void __init ide_setup (char *s)
const char *hd_words[] = {"none", "noprobe", "nowerr", "cdrom",
"serialize", "autotune", "noautotune",
"slow", "swapdata", "bswap", "flash",
"remap", "noremap", NULL};
"remap", "noremap", "scsi", NULL};
unit = s[2] - 'a';
hw = unit / MAX_DRIVES;
unit = unit % MAX_DRIVES;
......@@ -2845,6 +2800,15 @@ void __init ide_setup (char *s)
case -13: /* "noremap" */
drive->remap_0_to_1 = 2;
goto done;
case -14: /* "scsi" */
#if defined(CONFIG_BLK_DEV_IDESCSI) && defined(CONFIG_SCSI)
drive->scsi = 1;
goto done;
#else
#warning ide scsi-emulation selected but no SCSI-subsystem in kernel
drive->scsi = 0;
goto bad_option;
#endif /* defined(CONFIG_BLK_DEV_IDESCSI) && defined(CONFIG_SCSI) */
case 3: /* cyl,head,sect */
drive->media = ide_disk;
drive->cyl = drive->bios_cyl = vals[0];
......@@ -3076,26 +3040,19 @@ void __init ide_setup (char *s)
case 0: goto bad_option;
default:
printk(" -- SUPPORT NOT CONFIGURED IN THIS KERNEL\n");
return;
return 0;
}
}
bad_option:
printk(" -- BAD OPTION\n");
return;
return 0;
bad_hwif:
printk("-- NOT SUPPORTED ON ide%d", hw);
done:
printk("\n");
return 0;
}
/*
* __setup("ide", ide_setup);
* #ifdef CONFIG_BLK_DEV_VIA82CXXX
* __setup("splitfifo", ide_setup);
* #endif
* __setup("hd", ide_setup);
*/
/*
* probe_for_hwifs() finds/initializes "known" IDE interfaces
*/
......@@ -3517,10 +3474,6 @@ int __init ide_init (void)
return 0;
}
#ifdef MODULE
char *options = NULL;
MODULE_PARM(options,"s");
static void __init parse_options (char *line)
{
char *next = line;
......@@ -3534,11 +3487,16 @@ static void __init parse_options (char *line)
#ifdef CONFIG_BLK_DEV_VIA82CXXX
!strncmp(line,"splitfifo",9) ||
#endif /* CONFIG_BLK_DEV_VIA82CXXX */
!strncmp(line,"hdxlun",6) ||
(!strncmp(line,"hd",2) && line[2] != '='))
ide_setup(line);
(void) ide_setup(line);
}
}
#ifdef MODULE
char *options = NULL;
MODULE_PARM(options,"s");
int init_module (void)
{
parse_options(options);
......@@ -3560,4 +3518,14 @@ void cleanup_module (void)
proc_ide_destroy();
#endif
}
#else /* !MODULE */
static int parse_ide_setup (char *line)
{
parse_options(line);
return 0;
}
__setup("", parse_ide_setup);
#endif /* MODULE */
......@@ -97,6 +97,10 @@ static int ns87415_dmaproc(ide_dma_action_t func, ide_drive_t *drive)
return 0;
ns87415_prepare_drive(drive, 0); /* DMA failed: select PIO xfer */
return 1;
case ide_dma_check:
if (drive->media != ide_disk)
return ide_dmaproc(ide_dma_off_quietly, drive);
/* Fallthrough... */
default:
return ide_dmaproc(func, drive); /* use standard DMA stuff */
}
......
......@@ -20,6 +20,7 @@
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/wait.h>
#include <linux/types.h>
#include <asm/io.h>
......
......@@ -20,6 +20,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/wait.h>
#include <asm/io.h>
#include "paride.h"
......
......@@ -20,6 +20,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/wait.h>
#include <asm/io.h>
#include "paride.h"
......
......@@ -19,6 +19,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/wait.h>
#include <asm/io.h>
#include "paride.h"
......
......@@ -21,6 +21,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/wait.h>
#include <asm/io.h>
#include "paride.h"
......
......@@ -23,6 +23,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/wait.h>
#include <asm/io.h>
#include "paride.h"
......
......@@ -19,6 +19,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/wait.h>
#include <asm/io.h>
#include "paride.h"
......
......@@ -23,6 +23,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/wait.h>
#include <asm/io.h>
#include "paride.h"
......
......@@ -31,6 +31,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/wait.h>
#include <asm/io.h>
#include "paride.h"
......
......@@ -29,6 +29,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/wait.h>
#include <asm/io.h>
#include "paride.h"
......
......@@ -24,6 +24,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/wait.h>
#include <asm/io.h>
#include "paride.h"
......
......@@ -15,6 +15,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/wait.h>
#include <asm/io.h>
#include "paride.h"
......
......@@ -18,6 +18,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/wait.h>
#include <asm/io.h>
#include "paride.h"
......
......@@ -22,6 +22,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/wait.h>
#include <asm/io.h>
#include "paride.h"
......
......@@ -169,6 +169,7 @@ static int pg_drive_count;
#include <linux/malloc.h>
#include <linux/mtio.h>
#include <linux/pg.h>
#include <linux/wait.h>
#include <asm/uaccess.h>
......
......@@ -147,6 +147,7 @@ static int pt_drive_count;
#include <linux/delay.h>
#include <linux/malloc.h>
#include <linux/mtio.h>
#include <linux/wait.h>
#include <asm/uaccess.h>
......
/*
* linux/drivers/block/pdc202xx.c Version 0.27 Sept. 3, 1999
* linux/drivers/block/pdc202xx.c Version 0.28 Dec. 13, 1999
*
* Copyright (C) 1998-99 Andre Hedrick (andre@suse.com)
* May be copied or modified under the terms of the GNU General Public License
......@@ -78,7 +78,6 @@
* Released under terms of General Public License
*/
#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/delay.h>
......@@ -221,7 +220,7 @@ static int config_chipset_for_dma (ide_drive_t *drive, byte ultra)
int err;
unsigned int drive_conf;
byte drive_pci, speed_ok = 0;
byte drive_pci;
byte test1, test2, speed = -1;
byte AP, BP, CP, DP, TB, TC;
unsigned short EP;
......@@ -279,20 +278,16 @@ static int config_chipset_for_dma (ide_drive_t *drive, byte ultra)
switch(drive_number) {
case 0: drive_pci = 0x60;
pci_read_config_dword(dev, drive_pci, &drive_conf);
if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4)) {
speed_ok = 1;
if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4))
goto chipset_is_set;
}
pci_read_config_byte(dev, (drive_pci), &test1);
if (!(test1 & SYNC_ERRDY_EN))
pci_write_config_byte(dev, (drive_pci), test1|SYNC_ERRDY_EN);
break;
case 1: drive_pci = 0x64;
pci_read_config_dword(dev, drive_pci, &drive_conf);
if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4)) {
speed_ok = 1;
if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4))
goto chipset_is_set;
}
pci_read_config_byte(dev, 0x60, &test1);
pci_read_config_byte(dev, (drive_pci), &test2);
if ((test1 & SYNC_ERRDY_EN) && !(test2 & SYNC_ERRDY_EN))
......@@ -300,20 +295,16 @@ static int config_chipset_for_dma (ide_drive_t *drive, byte ultra)
break;
case 2: drive_pci = 0x68;
pci_read_config_dword(dev, drive_pci, &drive_conf);
if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4)) {
speed_ok = 1;
if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4))
goto chipset_is_set;
}
pci_read_config_byte(dev, (drive_pci), &test1);
if (!(test1 & SYNC_ERRDY_EN))
pci_write_config_byte(dev, (drive_pci), test1|SYNC_ERRDY_EN);
break;
case 3: drive_pci = 0x6c;
pci_read_config_dword(dev, drive_pci, &drive_conf);
if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4)) {
speed_ok = 1;
if ((drive_conf != 0x004ff304) && (drive_conf != 0x004ff3c4))
goto chipset_is_set;
}
pci_read_config_byte(dev, 0x68, &test1);
pci_read_config_byte(dev, (drive_pci), &test2);
if ((test1 & SYNC_ERRDY_EN) && !(test2 & SYNC_ERRDY_EN))
......@@ -411,8 +402,7 @@ static int config_chipset_for_dma (ide_drive_t *drive, byte ultra)
decode_registers(REG_D, DP);
#endif /* PDC202XX_DECODE_REGISTER_INFO */
if (!speed_ok)
err = ide_config_drive_speed(drive, speed);
err = ide_config_drive_speed(drive, speed);
#if PDC202XX_DEBUG_DRIVE_INFO
printk("%s: %s drive%d 0x%08x ",
......@@ -670,6 +660,8 @@ void __init ide_init_pdc202xx (ide_hwif_t *hwif)
if (hwif->dma_base) {
hwif->dmaproc = &pdc202xx_dmaproc;
hwif->drives[0].autotune = 0;
hwif->drives[1].autotune = 0;
} else {
hwif->drives[0].autotune = 1;
hwif->drives[1].autotune = 1;
......
This diff is collapsed.
......@@ -22,7 +22,7 @@
#include <linux/blkdev.h>
#include <linux/hdreg.h>
#include "ide.h"
#include <linux/ide.h>
/*
* Bases of the IDE interfaces
......
/*
* linux/drivers/block/sis5513.c Version 0.07 Sept. 3, 1999
* linux/drivers/block/sis5513.c Version 0.08 Dec. 13, 1999
*
* Copyright (C) 1999 Andre Hedrick (andre@suse.com)
* May be copied or modified under the terms of the GNU General Public License
......@@ -266,15 +266,13 @@ static int config_chipset_for_dma (ide_drive_t *drive, byte ultra)
pci_read_config_byte(dev, drive_pci|0x01, &test2);
}
if ((id->dma_ultra & 0x0010) && (ultra) &&
(udma_66) && (four_two)) {
if ((id->dma_ultra & 0x0010) && (ultra) && (udma_66) && (four_two)) {
if (!(test2 & 0x90)) {
pci_write_config_byte(dev, drive_pci|0x01, test2 & ~unmask);
pci_write_config_byte(dev, drive_pci|0x01, test2|0x90);
}
speed = XFER_UDMA_4;
} else if ((id->dma_ultra & 0x0008) && (ultra) &&
(udma_66) && (four_two)) {
} else if ((id->dma_ultra & 0x0008) && (ultra) && (udma_66) && (four_two)) {
if (!(test2 & 0xA0)) {
pci_write_config_byte(dev, drive_pci|0x01, test2 & ~unmask);
pci_write_config_byte(dev, drive_pci|0x01, test2|0xA0);
......
......@@ -79,13 +79,13 @@ static int ide_set_drive_pio_mode(ide_drive_t *drive, byte pio)
BUSY_STAT|DRQ_STAT|ERR_STAT, WAIT_CMD)) {
printk("%s: drive not ready for command\n",
drive->name);
return 1;
return 1; /* return startstop; ?? */
}
if (IDE_CONTROL_REG)
OUT_BYTE(drive->ctl, IDE_CONTROL_REG);
}
return 0;
return 0; /* return startstop; ?? */
}
/*
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -54,7 +54,7 @@
#include <linux/version.h>
#include <asm/uaccess.h>
#include <linux/i2c.h>
#include <linux/i2c-old.h>
#include "buz.h"
#include <linux/video_decoder.h>
#include <linux/video_encoder.h>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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