Commit 8f3af4d1 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.36pre1

parent 2dd9c63b
...@@ -12621,6 +12621,25 @@ CONFIG_BLK_CPQ_DA ...@@ -12621,6 +12621,25 @@ CONFIG_BLK_CPQ_DA
boards supported by this driver, and for further information boards supported by this driver, and for further information
on the use of this driver. on the use of this driver.
QuickNet Internet LineJack/PhoneJack support
CONFIG_PHONE_IXJ
Say M if you have a telephony card manufactured by Quicknet
Technologies, Inc. These include the Internet PhoneJACK and
Internet LineJACK Telephony Cards.
For the ISA versions of these products, you can configure the
cards using the isapnp tools (pnpdump/isapnp) or you can use the
isapnp support. Please read:
/usr/src/linux/Documentation/telephony/ixj.txt.
For more information on these cards, see Quicknet's website at:
http://www.quicknet.net/
If you do not have any Quicknet telephony cards, you can safely
ignore this option.
# #
# ARM options # ARM options
# #
......
...@@ -356,7 +356,8 @@ so you do not have to define it yourself. ...@@ -356,7 +356,8 @@ so you do not have to define it yourself.
The i2c_probe or sensors_detect function will call the foo_detect_client The i2c_probe or sensors_detect function will call the foo_detect_client
function only for those i2c addresses that actually have a device on function only for those i2c addresses that actually have a device on
them (unless a `force' parameter was used). them (unless a `force' parameter was used). In addition, addresses that
are already in use (by some other registered client) are skipped.
The detect client function The detect client function
...@@ -667,12 +668,6 @@ need this. You may even set it to NULL. ...@@ -667,12 +668,6 @@ need this. You may even set it to NULL.
return 0; return 0;
} }
You should never directly call this function, but instead use the
general function below:
extern int i2c_control(struct i2c_client *,unsigned int, unsigned long);
Sending and receiving Sending and receiving
===================== =====================
......
This diff is collapsed.
make[1]: Entering directory `/home/kraxel/2/src/bttv-0.7.10/driver'
bttv.o bttv.o
card=0 - unknown card=0 - unknown
card=1 - MIRO PCTV card=1 - MIRO PCTV
...@@ -34,6 +33,7 @@ bttv.o ...@@ -34,6 +33,7 @@ bttv.o
card=31 - iProTV card=31 - iProTV
card=32 - Intel Create and Share PCI card=32 - Intel Create and Share PCI
card=33 - Askey/Typhoon/Anubis Magic TView card=33 - Askey/Typhoon/Anubis Magic TView
card=34 - Terratec TerraTValue
tuner.o tuner.o
type=0 - Temic PAL type=0 - Temic PAL
...@@ -50,4 +50,3 @@ tuner.o ...@@ -50,4 +50,3 @@ tuner.o
type=11 - Alps TSBB5 type=11 - Alps TSBB5
type=12 - Alps TSBE5 type=12 - Alps TSBE5
type=13 - Alps TSBC5 type=13 - Alps TSBC5
make[1]: Leaving directory `/home/kraxel/2/src/bttv-0.7.10/driver'
...@@ -17,6 +17,8 @@ bttv.o ...@@ -17,6 +17,8 @@ bttv.o
fieldnr=1 Count fields. Some TV descrambling software fieldnr=1 Count fields. Some TV descrambling software
needs this, for others it only generates needs this, for others it only generates
50 useless IRQs/sec. 50 useless IRQs/sec.
autoload=0/1 autoload helper modules (tuner, audio).
default is 1 (on).
remap, card, radio and pll accept up to four comma-separted arguments remap, card, radio and pll accept up to four comma-separted arguments
(for multiple boards). (for multiple boards).
......
...@@ -7,7 +7,9 @@ changes. Bugfixes, merged patches from other people, merged fixes ...@@ -7,7 +7,9 @@ changes. Bugfixes, merged patches from other people, merged fixes
from the kernel version, port to the new i2c stack, removed support from the kernel version, port to the new i2c stack, removed support
for 2.0.x, code cleanups, ... for 2.0.x, code cleanups, ...
You'll need the new i2c stack, download it from To compile this bttv version, you'll the new i2c stack. Kernels
newer than 2.3.34 have this already included. If you have a older
kernel, download it from:
http://www2.lm-sensors.nu/~lm78/download.html http://www2.lm-sensors.nu/~lm78/download.html
You'll find Ralphs original (mostly outdated) documentation in the You'll find Ralphs original (mostly outdated) documentation in the
......
...@@ -17,11 +17,11 @@ telling which card type is used. Like this one: ...@@ -17,11 +17,11 @@ telling which card type is used. Like this one:
You should verify this is correct. If it is'nt, you have to pass the 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 correct board type as insmod argument, "insmod bttv card=2" for
example. The file MODULES in the driver directory has a list of valid example. The file CARDLIST has a list of valid arguments for card.
arguments. If your card is'nt listed there, you might check the If your card is'nt listed there, you might check the source code for
source code for new entries which are not listed yet. If there is'nt new entries which are not listed yet. If there is'nt one for your
one for your card, you can check if one of the existing entries does card, you can check if one of the existing entries does work for you
work for you (just trial and error...). (just trial and error...).
Some boards have an extra processor for sound to do stereo decoding Some boards have an extra processor for sound to do stereo decoding
and other nice features. The msp34xx chips are used by Hauppauge for and other nice features. The msp34xx chips are used by Hauppauge for
...@@ -78,13 +78,19 @@ What you have to do is figure out the correct values for gpiomask and ...@@ -78,13 +78,19 @@ 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 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 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 values used by the windows driver. A tool to do this is available
from ftp://telepresence.dmem.strath.ac.uk/pub/bt848/winutil from ftp://telepresence.dmem.strath.ac.uk/pub/bt848/winutil. There is
If you hav'nt Windows installed, this is a trial and error game... some #ifdef'ed code in bttv.c (search for "new card") which prints
these values before board initialization, this might help too: boot
win, start tv app, softboot (loadlin) into linux and load bttv with
this enabled. If you hav'nt Windows installed, this is a trial and
error game...
Good luck, Good luck,
Gerd Gerd
PS: If you have a new working entry, mail it to Ralph. So it can be PS: If you have a new working entry, mail it to me.
included into next driver version...
--
Gerd Knorr <kraxel@goldbach.in-berlin.de>
...@@ -410,6 +410,15 @@ M: mikulas@artax.karlin.mff.cuni.cz ...@@ -410,6 +410,15 @@ M: mikulas@artax.karlin.mff.cuni.cz
W: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi W: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi
S: Maintained S: Maintained
I2C DRIVERS
P: Simon Vogl
M: simon@tk.uni-linz.ac.at
P: Frodo Looijaard
M: frodol@dds.nl
L: linux-i2c@pelican.tk.uni-linz.ac.at
W: http://www.tk.uni-linz.ac.at/~simon/private/i2c
S: Maintained
i386 BOOT CODE i386 BOOT CODE
P: Riley H. Williams P: Riley H. Williams
M: rhw@memalpha.cx M: rhw@memalpha.cx
......
VERSION = 2 VERSION = 2
PATCHLEVEL = 3 PATCHLEVEL = 3
SUBLEVEL = 35 SUBLEVEL = 36
EXTRAVERSION = EXTRAVERSION =
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
...@@ -238,6 +238,10 @@ ifeq ($(CONFIG_I2C),y) ...@@ -238,6 +238,10 @@ ifeq ($(CONFIG_I2C),y)
DRIVERS := $(DRIVERS) drivers/i2c/i2c.a DRIVERS := $(DRIVERS) drivers/i2c/i2c.a
endif endif
ifeq ($(CONFIG_PHONE),y)
DRIVERS := $(DRIVERS) drivers/telephony/telephony.a
endif
include arch/$(ARCH)/Makefile include arch/$(ARCH)/Makefile
.S.s: .S.s:
......
...@@ -985,7 +985,7 @@ sys_call_table: ...@@ -985,7 +985,7 @@ sys_call_table:
.quad osf_utsname .quad osf_utsname
.quad sys_lchown .quad sys_lchown
.quad osf_shmat .quad osf_shmat
.quad sys_shmctl /* 210 */ .quad sys_shmctlold /* 210 */
.quad sys_shmdt .quad sys_shmdt
.quad sys_shmget .quad sys_shmget
.quad alpha_ni_syscall .quad alpha_ni_syscall
...@@ -1150,3 +1150,4 @@ sys_call_table: ...@@ -1150,3 +1150,4 @@ sys_call_table:
.quad sys_setresgid .quad sys_setresgid
.quad sys_getresgid .quad sys_getresgid
.quad sys_ni_syscall /* sys_dipc */ .quad sys_ni_syscall /* sys_dipc */
.quad sys_shmctl
...@@ -31,6 +31,9 @@ ...@@ -31,6 +31,9 @@
#include <linux/shm.h> #include <linux/shm.h>
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/file.h> #include <linux/file.h>
#include <linux/types.h>
#include <linux/ipc.h>
#include <linux/shm.h>
#include <asm/fpu.h> #include <asm/fpu.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -38,6 +41,7 @@ ...@@ -38,6 +41,7 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/sysinfo.h> #include <asm/sysinfo.h>
#include <asm/hwrpb.h> #include <asm/hwrpb.h>
#include <asm/processor.h>
extern int do_mount(kdev_t, const char *, const char *, char *, int, void *); extern int do_mount(kdev_t, const char *, const char *, char *, int, void *);
extern int do_pipe(int *); extern int do_pipe(int *);
...@@ -1442,3 +1446,103 @@ asmlinkage int sys_old_adjtimex(struct timex32 *txc_p) ...@@ -1442,3 +1446,103 @@ asmlinkage int sys_old_adjtimex(struct timex32 *txc_p)
return ret; return ret;
} }
struct shmid_ds_old {
struct ipc_perm shm_perm; /* operation perms */
int shm_segsz; /* size of segment (bytes) */
__kernel_time_t shm_atime; /* last attach time */
__kernel_time_t shm_dtime; /* last detach time */
__kernel_time_t shm_ctime; /* last change time */
__kernel_ipc_pid_t shm_cpid; /* pid of creator */
__kernel_ipc_pid_t shm_lpid; /* pid of last operator */
unsigned short shm_nattch; /* no. of current attaches */
unsigned short shm_unused; /* compatibility */
void *shm_unused2; /* ditto - used by DIPC */
void *shm_unused3; /* unused */
};
struct shminfo_old {
int shmmax;
int shmmin;
int shmmni;
int shmseg;
int shmall;
};
asmlinkage long sys_shmctlold(int shmid, int cmd, struct shmid_ds_old *buf)
{
struct shmid_ds arg;
long ret;
mm_segment_t old_fs;
if (cmd == IPC_SET) {
struct shmid_ds_old tbuf;
if(copy_from_user (&tbuf, buf, sizeof(*buf)))
return -EFAULT;
arg.shm_perm = tbuf.shm_perm;
arg.shm_segsz = tbuf.shm_segsz;
arg.shm_atime = tbuf.shm_atime;
arg.shm_dtime = tbuf.shm_dtime;
arg.shm_ctime = tbuf.shm_ctime;
arg.shm_cpid = tbuf.shm_cpid;
arg.shm_lpid = tbuf.shm_lpid;
arg.shm_nattch = tbuf.shm_nattch;
arg.shm_unused = tbuf.shm_unused;
arg.shm_unused2 = tbuf.shm_unused2;
arg.shm_unused3 = tbuf.shm_unused3;
}
old_fs = get_fs ();
set_fs (KERNEL_DS);
ret = sys_shmctl(shmid, cmd, &arg);
set_fs (old_fs);
if (ret < 0)
return(ret);
switch(cmd) {
case IPC_INFO:
{
struct shminfo *tbuf = (struct shminfo *) &arg;
struct shminfo_old shminfo_oldst;
shminfo_oldst.shmmax = (tbuf->shmmax > INT_MAX ?
INT_MAX : tbuf->shmmax);
shminfo_oldst.shmmin = tbuf->shmmin;
shminfo_oldst.shmmni = tbuf->shmmni;
shminfo_oldst.shmseg = tbuf->shmseg;
shminfo_oldst.shmall = tbuf->shmall;
if (copy_to_user(buf, &shminfo_oldst,
sizeof(struct shminfo_old)))
return -EFAULT;
return(ret);
}
case SHM_INFO:
{
struct shm_info *tbuf = (struct shm_info *) &arg;
if (copy_to_user (buf, tbuf, sizeof(struct shm_info)))
return -EFAULT;
return(ret);
}
case SHM_STAT:
case IPC_STAT:
{
struct shmid_ds_old tbuf;
tbuf.shm_perm = arg.shm_perm;
tbuf.shm_segsz = arg.shm_segsz;
tbuf.shm_atime = arg.shm_atime;
tbuf.shm_dtime = arg.shm_dtime;
tbuf.shm_ctime = arg.shm_ctime;
tbuf.shm_cpid = arg.shm_cpid;
tbuf.shm_lpid = arg.shm_lpid;
tbuf.shm_nattch = arg.shm_nattch;
tbuf.shm_unused = arg.shm_unused;
tbuf.shm_unused2 = arg.shm_unused2;
tbuf.shm_unused3 = arg.shm_unused3;
if (copy_to_user (buf, &tbuf, sizeof(tbuf)))
return -EFAULT;
return(ret);
}
}
return(ret);
}
...@@ -145,6 +145,8 @@ if [ "$CONFIG_NET" = "y" ]; then ...@@ -145,6 +145,8 @@ if [ "$CONFIG_NET" = "y" ]; then
source net/Config.in source net/Config.in
fi fi
source drivers/telephony/Config.in
mainmenu_option next_comment mainmenu_option next_comment
comment 'SCSI support' comment 'SCSI support'
......
...@@ -11,7 +11,7 @@ SUB_DIRS := block char net parport sound misc ...@@ -11,7 +11,7 @@ SUB_DIRS := block char net parport sound misc
MOD_SUB_DIRS := $(SUB_DIRS) MOD_SUB_DIRS := $(SUB_DIRS)
ALL_SUB_DIRS := $(SUB_DIRS) pci sgi scsi sbus cdrom isdn pnp i2o \ ALL_SUB_DIRS := $(SUB_DIRS) pci sgi scsi sbus cdrom isdn pnp i2o \
macintosh video dio zorro fc4 usb \ macintosh video dio zorro fc4 usb \
nubus tc ap1000 atm pcmcia i2c nubus tc ap1000 atm pcmcia i2c telephony
ifdef CONFIG_DIO ifdef CONFIG_DIO
SUB_DIRS += dio SUB_DIRS += dio
...@@ -66,6 +66,15 @@ else ...@@ -66,6 +66,15 @@ else
endif endif
endif endif
ifeq ($(CONFIG_PHONE),y)
SUB_DIRS += telephony
MOD_SUB_DIRS += telephony
else
ifeq ($(CONFIG_PHONE),m)
MOD_SUB_DIRS += telephony
endif
endif
ifdef CONFIG_SGI ifdef CONFIG_SGI
SUB_DIRS += sgi SUB_DIRS += sgi
MOD_SUB_DIRS += sgi MOD_SUB_DIRS += sgi
......
...@@ -129,7 +129,7 @@ comment 'Video For Linux' ...@@ -129,7 +129,7 @@ comment 'Video For Linux'
tristate 'Video For Linux' CONFIG_VIDEO_DEV tristate 'Video For Linux' CONFIG_VIDEO_DEV
if [ "$CONFIG_VIDEO_DEV" != "n" ]; then if [ "$CONFIG_VIDEO_DEV" != "n" ]; then
dep_tristate ' I2C on parallel port' CONFIG_I2C_PARPORT $CONFIG_PARPORT dep_tristate ' I2C on parallel port' CONFIG_I2C_PARPORT $CONFIG_PARPORT
comment 'Radio/Video Adapters' comment 'Radio Adapters'
dep_tristate ' ADS Cadet AM/FM Tuner' CONFIG_RADIO_CADET $CONFIG_VIDEO_DEV dep_tristate ' ADS Cadet AM/FM Tuner' CONFIG_RADIO_CADET $CONFIG_VIDEO_DEV
dep_tristate ' AIMSlab RadioTrack (aka RadioReveal) support' CONFIG_RADIO_RTRACK $CONFIG_VIDEO_DEV dep_tristate ' AIMSlab RadioTrack (aka RadioReveal) support' CONFIG_RADIO_RTRACK $CONFIG_VIDEO_DEV
if [ "$CONFIG_RADIO_RTRACK" = "y" ]; then if [ "$CONFIG_RADIO_RTRACK" = "y" ]; then
...@@ -143,37 +143,15 @@ if [ "$CONFIG_VIDEO_DEV" != "n" ]; then ...@@ -143,37 +143,15 @@ if [ "$CONFIG_VIDEO_DEV" != "n" ]; then
if [ "$CONFIG_RADIO_AZTECH" = "y" ]; then if [ "$CONFIG_RADIO_AZTECH" = "y" ]; then
hex ' Aztech/Packard Bell I/O port (0x350 or 0x358)' CONFIG_RADIO_AZTECH_PORT 350 hex ' Aztech/Packard Bell I/O port (0x350 or 0x358)' CONFIG_RADIO_AZTECH_PORT 350
fi fi
if [ "$CONFIG_PCI" != "n" ]; then
dep_tristate ' BT848 Video For Linux' CONFIG_VIDEO_BT848 $CONFIG_VIDEO_DEV
fi
dep_tristate ' GemTek Radio Card support' CONFIG_RADIO_GEMTEK $CONFIG_VIDEO_DEV dep_tristate ' GemTek Radio Card support' CONFIG_RADIO_GEMTEK $CONFIG_VIDEO_DEV
if [ "$CONFIG_RADIO_GEMTEK" = "y" ]; then if [ "$CONFIG_RADIO_GEMTEK" = "y" ]; then
hex ' GemTek i/o port (0x20c, 0x30c, 0x24c or 0x34c)' CONFIG_RADIO_GEMTEK_PORT 34c hex ' GemTek i/o port (0x20c, 0x30c, 0x24c or 0x34c)' CONFIG_RADIO_GEMTEK_PORT 34c
fi fi
dep_tristate ' Mediavision Pro Movie Studio Video For Linux' CONFIG_VIDEO_PMS $CONFIG_VIDEO_DEV
dep_tristate ' Miro PCM20 Radio' CONFIG_RADIO_MIROPCM20 $CONFIG_VIDEO_DEV dep_tristate ' Miro PCM20 Radio' CONFIG_RADIO_MIROPCM20 $CONFIG_VIDEO_DEV
if [ "$CONFIG_PMAC" = "y" ]; then
dep_tristate ' PlanB Video-In on PowerMac' CONFIG_VIDEO_PLANB $CONFIG_VIDEO_DEV
fi
if [ "$CONFIG_PARPORT" != "n" ]; then
dep_tristate ' Quickcam BW Video For Linux' CONFIG_VIDEO_BWQCAM $CONFIG_VIDEO_DEV $CONFIG_PARPORT
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
dep_tristate ' QuickCam Colour Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_CQCAM $CONFIG_VIDEO_DEV $CONFIG_PARPORT
fi
fi
dep_tristate ' SAA5249 Teletext processor' CONFIG_VIDEO_SAA5249 $CONFIG_VIDEO_DEV
dep_tristate ' SF16FMI Radio' CONFIG_RADIO_SF16FMI $CONFIG_VIDEO_DEV dep_tristate ' SF16FMI Radio' CONFIG_RADIO_SF16FMI $CONFIG_VIDEO_DEV
if [ "$CONFIG_RADIO_SF16FMI" = "y" ]; then if [ "$CONFIG_RADIO_SF16FMI" = "y" ]; then
hex ' SF16FMI I/O port (0x284 or 0x384)' CONFIG_RADIO_SF16FMI_PORT 284 hex ' SF16FMI I/O port (0x284 or 0x384)' CONFIG_RADIO_SF16FMI_PORT 284
fi fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
if [ "$CONFIG_SGI" = "y" ]; then
dep_tristate ' SGI Vino Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_VINO $CONFIG_VIDEO_DEV
fi
fi
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
dep_tristate ' Stradis 4:2:2 MPEG-2 video driver (EXPERIMENTAL)' CONFIG_VIDEO_STRADIS $CONFIG_VIDEO_DEV
fi
dep_tristate ' TerraTec ActiveRadio ISA Standalone' CONFIG_RADIO_TERRATEC $CONFIG_VIDEO_DEV dep_tristate ' TerraTec ActiveRadio ISA Standalone' CONFIG_RADIO_TERRATEC $CONFIG_VIDEO_DEV
if [ "$CONFIG_RADIO_TERRATEC" = "y" ]; then if [ "$CONFIG_RADIO_TERRATEC" = "y" ]; then
hex ' Terratec i/o port (normally 0x590)' CONFIG_RADIO_TERRATEC_PORT 590 hex ' Terratec i/o port (normally 0x590)' CONFIG_RADIO_TERRATEC_PORT 590
...@@ -196,9 +174,25 @@ if [ "$CONFIG_VIDEO_DEV" != "n" ]; then ...@@ -196,9 +174,25 @@ if [ "$CONFIG_VIDEO_DEV" != "n" ]; then
if [ "$CONFIG_RADIO_ZOLTRIX" = "y" ]; then if [ "$CONFIG_RADIO_ZOLTRIX" = "y" ]; then
hex ' ZOLTRIX I/O port (0x20c or 0x30c)' CONFIG_RADIO_ZOLTRIX_PORT 20c hex ' ZOLTRIX I/O port (0x20c or 0x30c)' CONFIG_RADIO_ZOLTRIX_PORT 20c
fi fi
dep_tristate ' Zoran ZR36057/36060 support' CONFIG_VIDEO_ZORAN $CONFIG_VIDEO_DEV $CONFIG_PCI comment 'Video Adapters'
dep_tristate ' BT848 Video For Linux' CONFIG_VIDEO_BT848 $CONFIG_VIDEO_DEV $CONFIG_PCI
dep_tristate ' Mediavision Pro Movie Studio Video For Linux' CONFIG_VIDEO_PMS $CONFIG_VIDEO_DEV
if [ "$CONFIG_PARPORT" != "n" ]; then
dep_tristate ' Quickcam BW Video For Linux' CONFIG_VIDEO_BWQCAM $CONFIG_VIDEO_DEV $CONFIG_PARPORT
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
dep_tristate ' QuickCam Colour Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_CQCAM $CONFIG_VIDEO_DEV $CONFIG_PARPORT
fi
fi
dep_tristate ' SAA5249 Teletext processor' CONFIG_VIDEO_SAA5249 $CONFIG_VIDEO_DEV
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
if [ "$CONFIG_SGI" = "y" ]; then
dep_tristate ' SGI Vino Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_VINO $CONFIG_VIDEO_DEV $CONFIG_SGI
fi
dep_tristate ' Stradis 4:2:2 MPEG-2 video driver (EXPERIMENTAL)' CONFIG_VIDEO_STRADIS $CONFIG_VIDEO_DEV $CONFIG_PCI
fi
dep_tristate ' Zoran ZR36057/36060 Video For Linux' CONFIG_VIDEO_ZORAN $CONFIG_VIDEO_DEV $CONFIG_PCI
dep_tristate ' Include support for Iomega Buz' CONFIG_VIDEO_BUZ $CONFIG_VIDEO_ZORAN dep_tristate ' Include support for Iomega Buz' CONFIG_VIDEO_BUZ $CONFIG_VIDEO_ZORAN
dep_tristate ' Zoran ZR36120/36125 support' CONFIG_VIDEO_ZR36120 $CONFIG_VIDEO_DEV $CONFIG_PCI dep_tristate ' Zoran ZR36120/36125 Video For Linux' CONFIG_VIDEO_ZR36120 $CONFIG_VIDEO_DEV $CONFIG_PCI
fi fi
endmenu endmenu
......
This diff is collapsed.
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#ifndef _BTTV_H_ #ifndef _BTTV_H_
#define _BTTV_H_ #define _BTTV_H_
#define BTTV_VERSION_CODE 0x00070a #define BTTV_VERSION_CODE 0x00070b
#include <linux/types.h> #include <linux/types.h>
#include <linux/wait.h> #include <linux/wait.h>
......
...@@ -3166,8 +3166,6 @@ static int zr36057_init(int i) ...@@ -3166,8 +3166,6 @@ static int zr36057_init(int i)
mdelay(10); mdelay(10);
zr36060_reset(zr); zr36060_reset(zr);
mdelay(10); mdelay(10);
zr36060_sleep(zr, 1);
mdelay(10);
/* display codec revision */ /* display codec revision */
if ((rev=zr36060_read_8(zr, 0x022)) == 0x33) { if ((rev=zr36060_read_8(zr, 0x022)) == 0x33) {
...@@ -3204,8 +3202,6 @@ static int zr36057_init(int i) ...@@ -3204,8 +3202,6 @@ static int zr36057_init(int i)
udelay(3000); udelay(3000);
zr36060_reset(zr); zr36060_reset(zr);
udelay(3000); udelay(3000);
zr36060_sleep(zr, 1);
udelay(3000);
/* display codec revision */ /* display codec revision */
if ((rev=zr36060_read_8(zr, 0x022)) == 0x33) { if ((rev=zr36060_read_8(zr, 0x022)) == 0x33) {
...@@ -3213,8 +3209,8 @@ static int zr36057_init(int i) ...@@ -3213,8 +3209,8 @@ static int zr36057_init(int i)
zr->name, zr36060_read_8(zr, 0x023)); zr->name, zr36060_read_8(zr, 0x023));
} else { } else {
printk(KERN_ERR "%s: Zoran ZR36060 not found (rev=%d)\n", zr->name, rev); printk(KERN_ERR "%s: Zoran ZR36060 not found (rev=%d)\n", zr->name, rev);
// kfree((void *) zr->stat_com); kfree((void *) zr->stat_com);
// return -1; return -1;
} }
break; break;
} }
......
...@@ -61,6 +61,9 @@ extern void adbdev_init(void); ...@@ -61,6 +61,9 @@ extern void adbdev_init(void);
#ifdef CONFIG_USB #ifdef CONFIG_USB
extern void usb_init(void); extern void usb_init(void);
#endif #endif
#ifdef CONFIG_PHONE
extern void telephony_init(void);
#endif
static ssize_t do_write_mem(struct file * file, void *p, unsigned long realp, static ssize_t do_write_mem(struct file * file, void *p, unsigned long realp,
const char * buf, size_t count, loff_t *ppos) const char * buf, size_t count, loff_t *ppos)
...@@ -624,6 +627,9 @@ int __init chr_dev_init(void) ...@@ -624,6 +627,9 @@ int __init chr_dev_init(void)
#ifdef CONFIG_USB #ifdef CONFIG_USB
usb_init(); usb_init();
#endif #endif
#ifdef CONFIG_I2C
i2c_init_all();
#endif
#if defined (CONFIG_FB) #if defined (CONFIG_FB)
fbmem_init(); fbmem_init();
#endif #endif
...@@ -669,10 +675,6 @@ int __init chr_dev_init(void) ...@@ -669,10 +675,6 @@ int __init chr_dev_init(void)
#ifdef CONFIG_FTAPE #ifdef CONFIG_FTAPE
ftape_init(); ftape_init();
#endif #endif
#ifdef CONFIG_I2C
i2c_init_all();
#endif
#ifdef CONFIG_VIDEO_BT848 #ifdef CONFIG_VIDEO_BT848
i2c_init(); i2c_init();
#endif #endif
...@@ -682,5 +684,8 @@ int __init chr_dev_init(void) ...@@ -682,5 +684,8 @@ int __init chr_dev_init(void)
#ifdef CONFIG_VIDEO_DEV #ifdef CONFIG_VIDEO_DEV
videodev_init(); videodev_init();
#endif #endif
#ifdef CONFIG_PHONE
telephony_init();
#endif
return 0; return 0;
} }
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <linux/videodev.h> #include <linux/videodev.h>
#include "linux/video_decoder.h" #include "linux/video_decoder.h"
#define DEBUG(x...) x /* remove when no long debugging */ #define DEBUG(x...) /* remove when no long debugging */
#define SAA7110_MAX_INPUT 9 /* 6 CVBS, 3 SVHS */ #define SAA7110_MAX_INPUT 9 /* 6 CVBS, 3 SVHS */
#define SAA7110_MAX_OUTPUT 0 /* its a decoder only */ #define SAA7110_MAX_OUTPUT 0 /* its a decoder only */
...@@ -224,7 +224,7 @@ static const unsigned char initseq[] = { ...@@ -224,7 +224,7 @@ static const unsigned char initseq[] = {
else { else {
saa7110_write(decoder,0x21,0x16); saa7110_write(decoder,0x21,0x16);
saa7110_write(decoder,0x0D,0x04); saa7110_write(decoder,0x0D,0x04);
printk(KERN_INFO "%s_attach: chip version %x\n", device->name, saa7110_read(decoder)); DEBUG(printk(KERN_INFO "%s_attach: chip version %x\n", device->name, saa7110_read(decoder)));
saa7110_write(decoder,0x0D,0x06); saa7110_write(decoder,0x0D,0x06);
} }
......
...@@ -70,7 +70,6 @@ struct saa7111 { ...@@ -70,7 +70,6 @@ struct saa7111 {
static int saa7111_write(struct saa7111 *dev, unsigned char subaddr, unsigned char data) static int saa7111_write(struct saa7111 *dev, unsigned char subaddr, unsigned char data)
{ {
int ack; int ack;
unsigned long flags;
LOCK_I2C_BUS(dev->bus); LOCK_I2C_BUS(dev->bus);
i2c_start(dev->bus); i2c_start(dev->bus);
...@@ -85,9 +84,8 @@ static int saa7111_write(struct saa7111 *dev, unsigned char subaddr, unsigned ch ...@@ -85,9 +84,8 @@ static int saa7111_write(struct saa7111 *dev, unsigned char subaddr, unsigned ch
static int saa7111_write_block(struct saa7111 *dev, unsigned const char *data, unsigned int len) static int saa7111_write_block(struct saa7111 *dev, unsigned const char *data, unsigned int len)
{ {
int ack; int ack = 0;
unsigned subaddr; unsigned subaddr;
unsigned long flags;
while (len > 1) { while (len > 1) {
LOCK_I2C_BUS(dev->bus); LOCK_I2C_BUS(dev->bus);
...@@ -110,7 +108,6 @@ static int saa7111_write_block(struct saa7111 *dev, unsigned const char *data, u ...@@ -110,7 +108,6 @@ static int saa7111_write_block(struct saa7111 *dev, unsigned const char *data, u
static int saa7111_read(struct saa7111 *dev, unsigned char subaddr) static int saa7111_read(struct saa7111 *dev, unsigned char subaddr)
{ {
int data; int data;
unsigned long flags;
LOCK_I2C_BUS(dev->bus); LOCK_I2C_BUS(dev->bus);
i2c_start(dev->bus); i2c_start(dev->bus);
......
...@@ -69,7 +69,6 @@ struct saa7185 { ...@@ -69,7 +69,6 @@ struct saa7185 {
static int saa7185_write(struct saa7185 *dev, unsigned char subaddr, unsigned char data) static int saa7185_write(struct saa7185 *dev, unsigned char subaddr, unsigned char data)
{ {
int ack; int ack;
unsigned long flags;
LOCK_I2C_BUS(dev->bus); LOCK_I2C_BUS(dev->bus);
...@@ -85,9 +84,8 @@ static int saa7185_write(struct saa7185 *dev, unsigned char subaddr, unsigned ch ...@@ -85,9 +84,8 @@ static int saa7185_write(struct saa7185 *dev, unsigned char subaddr, unsigned ch
static int saa7185_write_block(struct saa7185 *dev, unsigned const char *data, unsigned int len) static int saa7185_write_block(struct saa7185 *dev, unsigned const char *data, unsigned int len)
{ {
int ack; int ack = 0;
unsigned subaddr; unsigned subaddr;
unsigned long flags;
while (len > 1) { while (len > 1) {
LOCK_I2C_BUS(dev->bus); LOCK_I2C_BUS(dev->bus);
......
...@@ -415,7 +415,7 @@ static int tda9855_command(struct i2c_client *client, ...@@ -415,7 +415,7 @@ static int tda9855_command(struct i2c_client *client,
static struct i2c_driver driver = { static struct i2c_driver driver = {
"i2c tda9855 driver", "i2c tda9855 driver",
I2C_DRIVERID_TDA9855, /* FIXME */ I2C_DRIVERID_TDA9855,
I2C_DF_NOTIFY, I2C_DF_NOTIFY,
tda9855_probe, tda9855_probe,
tda9855_detach, tda9855_detach,
......
...@@ -88,7 +88,7 @@ static struct i2c_client client_template; ...@@ -88,7 +88,7 @@ static struct i2c_client client_template;
static int tea6300_write(struct i2c_client *client, int addr, int val) static int tea6300_write(struct i2c_client *client, int addr, int val)
{ {
unsigned char buffer[2]; unsigned char buffer[2];
buffer[0] = addr; buffer[0] = addr;
buffer[1] = val; buffer[1] = val;
if (2 != i2c_master_send(client,buffer,2)) { if (2 != i2c_master_send(client,buffer,2)) {
...@@ -303,7 +303,7 @@ tea6300_command(struct i2c_client *client, unsigned int cmd, void *arg) ...@@ -303,7 +303,7 @@ tea6300_command(struct i2c_client *client, unsigned int cmd, void *arg)
static struct i2c_driver driver = { static struct i2c_driver driver = {
"i2c tea6300 driver", "i2c tea6300 driver",
I2C_DRIVERID_TEA6300, /* FIXME */ I2C_DRIVERID_TEA6300,
I2C_DF_NOTIFY, I2C_DF_NOTIFY,
tea6300_probe, tea6300_probe,
tea6300_detach, tea6300_detach,
......
...@@ -29,12 +29,16 @@ static struct i2c_client_address_data addr_data = { ...@@ -29,12 +29,16 @@ static struct i2c_client_address_data addr_data = {
}; };
static int debug = 0; /* insmod parameter */ static int debug = 0; /* insmod parameter */
static int type = -1; /* insmod parameter */ static int type = -1; /* insmod parameter */
static int addr = 0;
static int this_adap;
#define dprintk if (debug) printk #define dprintk if (debug) printk
MODULE_PARM(debug,"i"); MODULE_PARM(debug,"i");
MODULE_PARM(type,"i"); MODULE_PARM(type,"i");
MODULE_PARM(addr,"i");
struct tuner struct tuner
{ {
...@@ -164,9 +168,9 @@ static void set_tv_freq(struct i2c_client *c, int freq) ...@@ -164,9 +168,9 @@ static void set_tv_freq(struct i2c_client *c, int freq)
else else
config = tun->UHF; config = tun->UHF;
#if 0 // Fix colorstandard mode change #if 1 // Fix colorstandard mode change
if (t->type == TUNER_PHILIPS_SECAM if (t->type == TUNER_PHILIPS_SECAM
&& t->std == V4L2_STANDARD_DDD ) /*&& t->std == V4L2_STANDARD_DDD*/ )
config |= tun->mode; config |= tun->mode;
else else
config &= ~tun->mode; config &= ~tun->mode;
...@@ -255,6 +259,10 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, ...@@ -255,6 +259,10 @@ static int tuner_attach(struct i2c_adapter *adap, int addr,
struct tuner *t; struct tuner *t;
struct i2c_client *client; struct i2c_client *client;
if (this_adap > 0)
return -1;
this_adap++;
client_template.adapter = adap; client_template.adapter = adap;
client_template.addr = addr; client_template.addr = addr;
...@@ -283,6 +291,11 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, ...@@ -283,6 +291,11 @@ static int tuner_attach(struct i2c_adapter *adap, int addr,
static int tuner_probe(struct i2c_adapter *adap) static int tuner_probe(struct i2c_adapter *adap)
{ {
if (0 != addr) {
normal_i2c_range[0] = addr;
normal_i2c_range[1] = addr;
}
this_adap = 0;
if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848)) if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848))
return i2c_probe(adap, &addr_data, tuner_attach); return i2c_probe(adap, &addr_data, tuner_attach);
return 0; return 0;
......
...@@ -54,9 +54,6 @@ extern int init_planbs(struct video_init *); ...@@ -54,9 +54,6 @@ extern int init_planbs(struct video_init *);
#ifdef CONFIG_VIDEO_ZORAN #ifdef CONFIG_VIDEO_ZORAN
extern int init_zoran_cards(struct video_init *); extern int init_zoran_cards(struct video_init *);
#endif #endif
#ifdef CONFIG_VIDEO_ZR36120
extern int init_zr36120_cards(struct video_init *);
#endif
static struct video_init video_init_list[]={ static struct video_init video_init_list[]={
#ifdef CONFIG_VIDEO_BT848 #ifdef CONFIG_VIDEO_BT848
...@@ -74,9 +71,6 @@ static struct video_init video_init_list[]={ ...@@ -74,9 +71,6 @@ static struct video_init video_init_list[]={
#endif #endif
#ifdef CONFIG_VIDEO_ZORAN #ifdef CONFIG_VIDEO_ZORAN
{"zoran", init_zoran_cards}, {"zoran", init_zoran_cards},
#endif
#ifdef CONFIG_VIDEO_ZR36120
{"zr36120", init_zr36120_cards},
#endif #endif
{"end", NULL} {"end", NULL}
}; };
......
This diff is collapsed.
...@@ -43,12 +43,11 @@ ...@@ -43,12 +43,11 @@
extern struct i2c_bus zoran_i2c_bus_template; extern struct i2c_bus zoran_i2c_bus_template;
#define ZORAN_MAX_FBUFFERS 2 #define ZORAN_MAX_FBUFFERS 2
#define ZORAN_MAX_FBUFFER 0x0A2000 #define ZORAN_MAX_FBUFFER (768*576*2)
#define ZORAN_MAX_FBUFSIZE (ZORAN_MAX_FBUFFERS*ZORAN_MAX_FBUFFER) #define ZORAN_MAX_FBUFSIZE (ZORAN_MAX_FBUFFERS*ZORAN_MAX_FBUFFER)
/* external declarations */ #define ZORAN_VBI_BUFFERS 2
extern unsigned long zoran_alloc_memory(void); #define ZORAN_VBI_BUFSIZE (22*1024*2)
extern void zoran_free_memory(void);
struct tvcard { struct tvcard {
char* name; /* name of the cardtype */ char* name; /* name of the cardtype */
...@@ -70,76 +69,84 @@ struct tvcard { ...@@ -70,76 +69,84 @@ struct tvcard {
#define SVHS(x) ((x)|IS_SVHS) #define SVHS(x) ((x)|IS_SVHS)
struct vidinfo { struct vidinfo {
int status; struct vidinfo* next; /* next active buffer */
#define FBUFFER_UNUSED 0 uint kindof;
#define FBUFFER_GRABBING 1 #define FBUFFER_OVERLAY 0
#define FBUFFER_DONE 2 #define FBUFFER_GRAB 1
int x,y; #define FBUFFER_VBI 2
int w,h; uint status;
int bpl; #define FBUFFER_FREE 0
int bpp; /* should be calculated */ #define FBUFFER_BUSY 1
int format; #define FBUFFER_DONE 2
ulong vidadr; /* physical video address */ ulong fieldnr; /* # of field, not framer! */
ulong* overlay; uint x,y;
int w,h; /* w,h can be negative! */
uint format; /* index in palette2fmt[] */
uint bpp; /* lookup from palette2fmt[] */
uint bpl; /* calc: width * bpp */
ulong busadr; /* bus addr for DMA engine */
char* memadr; /* kernel addr for making copies */
ulong* overlay; /* kernel addr of overlay mask */
}; };
struct zoran struct zoran
{ {
struct video_device video_dev; struct video_device video_dev;
#define CARD ztv->video_dev.name #define CARD_DEBUG KERN_DEBUG "%s(%lu): "
struct i2c_bus i2c; #define CARD_INFO KERN_INFO "%s(%lu): "
struct video_picture picture; /* Current picture params */ #define CARD_ERR KERN_ERR "%s(%lu): "
struct video_audio audio_dev; /* Current audio params */ #define CARD ztv->video_dev.name,ztv->fieldnr
/* zoran chip specific details */ /* zoran chip specific details */
struct pci_dev* dev; /* ptr to PCI device */ struct i2c_bus i2c; /* i2c registration data */
ushort id; /* chip id */ struct pci_dev* dev; /* ptr to PCI device */
unsigned char revision; /* chip revision */ ulong zoran_adr; /* bus address of IO memory */
int zoran_adr; /* bus address of IO memory */ char* zoran_mem; /* kernel address of IO memory */
char* zoran_mem; /* pointer to mapped IO memory */ struct tvcard* card; /* the cardtype */
uint norm; /* 0=PAL, 1=NTSC, 2=SECAM */
uint tuner_freq; /* Current freq in kHz */
struct video_picture picture; /* Current picture params */
/* videocard details */ /* videocard details */
int swidth; /* screen width */ uint swidth; /* screen width */
int sheight; /* screen height */ uint sheight; /* screen height */
int depth; /* depth in bits */ uint depth; /* depth in bits */
/* channel details */
int norm; /* 0=PAL, 1=NTSC, 2=SECAM */
struct tvcard* card; /* the cardtype */
int tuner_freq; /* in Hz */
/* State details */ /* State details */
struct vidinfo overinfo; /* overlay data */ char* fbuffer; /* framebuffers for mmap */
struct vidinfo grabinfo[ZORAN_MAX_FBUFFERS]; /* grabbing data */ struct vidinfo overinfo; /* overlay data */
struct vidinfo readinfo; /* reading data */ struct vidinfo grabinfo[ZORAN_MAX_FBUFFERS]; /* grabbing data*/
wait_queue_head_t grabq; /* grabbers queue */
/* VBI details */
struct video_device vbi_dev;
struct vidinfo readinfo[2]; /* VBI data - flip buffers */
wait_queue_head_t vbiq; /* vbi queue */
/* maintenance data */ /* maintenance data */
char* fbuffer; /* framebuffers for mmap */ int have_decoder; /* did we detect a mux? */
int user; /* # users */ int have_tuner; /* did we detect a tuner? */
int have_decoder; /* did we detect a mux? */ int users; /* howmany video/vbi open? */
int have_tuner; /* did we detect a tuner? */ int tuner_type; /* tuner type, when found */
int tuner_type; /* tuner type, when found */ int running; /* are we rolling? */
int running;
wait_queue_head_t grabq; /* waiting capturers */
wait_queue_head_t readq; /* waiting readers */
rwlock_t lock; rwlock_t lock;
int state; /* what is requested of us? */ int state; /* what is requested of us? */
#define STATE_READ 0 #define STATE_OVERLAY 0
#define STATE_GRAB 1 #define STATE_VBI 1
#define STATE_OVERLAY 2 struct vidinfo* workqueue; /* buffers to grab, head is active */
int prevstate; ulong fieldnr; /* #field, ticked every VSYNC */
int lastframe; ulong lastfieldnr; /* #field, ticked every GRAB */
int interlace; /* calculated */ int vidInterlace; /* calculated */
int vidXshift; /* calculated */ int vidXshift; /* calculated */
int vidWidth; /* calculated */ uint vidWidth; /* calculated */
int vidHeight; /* calculated */ uint vidHeight; /* calculated */
}; };
#define zrwrite(dat,adr) writel((dat),(char *) (ztv->zoran_mem+(adr))) #define zrwrite(dat,adr) writel((dat),(char *) (ztv->zoran_mem+(adr)))
#define zrread(adr) readl(ztv->zoran_mem+(adr)) #define zrread(adr) readl(ztv->zoran_mem+(adr))
#if !defined(PDEBUG) || (PDEBUG == 0) #if PDEBUG == 0
#define zrand(dat,adr) zrwrite((dat) & zrread(adr), adr) #define zrand(dat,adr) zrwrite((dat) & zrread(adr), adr)
#define zror(dat,adr) zrwrite((dat) | zrread(adr), adr) #define zror(dat,adr) zrwrite((dat) | zrread(adr), adr)
#define zraor(dat,mask,adr) zrwrite( ((dat)&~(mask)) | ((mask)&zrread(adr)), adr) #define zraor(dat,mask,adr) zrwrite( ((dat)&~(mask)) | ((mask)&zrread(adr)), adr)
......
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
#include <asm/io.h> #include <asm/io.h>
#include <linux/version.h> #include <linux/version.h>
#include <linux/video_decoder.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include "linux/video_decoder.h"
#include "tuner.h" #include "tuner.h"
#include "zr36120.h" #include "zr36120.h"
...@@ -59,23 +59,38 @@ static ...@@ -59,23 +59,38 @@ static
void attach_inform(struct i2c_bus *bus, int id) void attach_inform(struct i2c_bus *bus, int id)
{ {
struct zoran *ztv = (struct zoran*)bus->data; struct zoran *ztv = (struct zoran*)bus->data;
struct video_decoder_capability dc;
int rv;
switch (id) { switch (id) {
case I2C_DRIVERID_VIDEODECODER: case I2C_DRIVERID_VIDEODECODER:
ztv->have_decoder = 1; DEBUG(printk(CARD_INFO "decoder attached\n",CARD));
DEBUG(printk(KERN_INFO "%s: decoder attached\n",CARD));
/* fetch the capabilites of the decoder */
rv = i2c_control_device(&ztv->i2c, I2C_DRIVERID_VIDEODECODER, DECODER_GET_CAPABILITIES, &dc);
if (rv) {
DEBUG(printk(CARD_DEBUG "decoder is not V4L aware!\n",CARD));
break;
}
DEBUG(printk(CARD_DEBUG "capabilities %d %d %d\n",CARD,dc.flags,dc.inputs,dc.outputs));
/* Test if the decoder can de VBI transfers */
if (dc.flags & 16 /*VIDEO_DECODER_VBI*/)
ztv->have_decoder = 2;
else
ztv->have_decoder = 1;
break; break;
case I2C_DRIVERID_TUNER: case I2C_DRIVERID_TUNER:
ztv->have_tuner = 1; ztv->have_tuner = 1;
DEBUG(printk(KERN_INFO "%s: tuner attached\n",CARD)); DEBUG(printk(CARD_INFO "tuner attached\n",CARD));
if (ztv->tuner_type >= 0) if (ztv->tuner_type >= 0)
{ {
if (i2c_control_device(&ztv->i2c,I2C_DRIVERID_TUNER,TUNER_SET_TYPE,&ztv->tuner_type)<0) if (i2c_control_device(&ztv->i2c,I2C_DRIVERID_TUNER,TUNER_SET_TYPE,&ztv->tuner_type)<0)
DEBUG(printk(KERN_INFO "%s: attach_inform; tuner wont be set to type %d\n",CARD,ztv->tuner_type)); DEBUG(printk(CARD_INFO "attach_inform; tuner wont be set to type %d\n",CARD,ztv->tuner_type));
} }
break; break;
default: default:
DEBUG(printk(KERN_INFO "%s: attach_inform; unknown device id=%d\n",CARD,id)); DEBUG(printk(CARD_INFO "attach_inform; unknown device id=%d\n",CARD,id));
break; break;
} }
} }
...@@ -88,14 +103,14 @@ void detach_inform(struct i2c_bus *bus, int id) ...@@ -88,14 +103,14 @@ void detach_inform(struct i2c_bus *bus, int id)
switch (id) { switch (id) {
case I2C_DRIVERID_VIDEODECODER: case I2C_DRIVERID_VIDEODECODER:
ztv->have_decoder = 0; ztv->have_decoder = 0;
DEBUG(printk(KERN_INFO "%s: decoder detached\n",CARD)); DEBUG(printk(CARD_INFO "decoder detached\n",CARD));
break; break;
case I2C_DRIVERID_TUNER: case I2C_DRIVERID_TUNER:
ztv->have_tuner = 0; ztv->have_tuner = 0;
DEBUG(printk(KERN_INFO "%s: tuner detached\n",CARD)); DEBUG(printk(CARD_INFO "tuner detached\n",CARD));
break; break;
default: default:
DEBUG(printk(KERN_INFO "%s: detach_inform; unknown device id=%d\n",CARD,id)); DEBUG(printk(CARD_INFO "detach_inform; unknown device id=%d\n",CARD,id));
break; break;
} }
} }
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/wrapper.h> #include <linux/wrapper.h>
#include <linux/slab.h>
#include <asm/io.h> #include <asm/io.h>
#ifdef CONFIG_BIGPHYS_AREA #ifdef CONFIG_BIGPHYS_AREA
#include <linux/bigphysarea.h> #include <linux/bigphysarea.h>
...@@ -30,62 +31,21 @@ ...@@ -30,62 +31,21 @@
#include "zr36120.h" #include "zr36120.h"
#include "zr36120_mem.h" #include "zr36120_mem.h"
/* ----------------------------------------------------------------------- */ /*******************************/
/* Memory functions */ /* Memory management functions */
/* shamelessly stolen and adapted from bttv.c */ /*******************************/
/* ----------------------------------------------------------------------- */
/* inline int __get_order(unsigned long size)
* convert virtual user memory address to physical address
* (virt_to_phys only works for kmalloced kernel memory)
*/
inline unsigned long uvirt_to_phys(unsigned long adr)
{
pgd_t *pgd;
pmd_t *pmd;
pte_t *ptep, pte;
pgd = pgd_offset(current->mm, adr);
if (pgd_none(*pgd))
return 0;
pmd = pmd_offset(pgd, adr);
if (pmd_none(*pmd))
return 0;
ptep = pte_offset(pmd, adr/*&(~PGDIR_MASK)*/);
pte = *ptep;
/* Note; page_address will panic for us if the page is high */
if(pte_present(pte))
return page_address(pte_page(pte))|(adr&(PAGE_SIZE-1));
return 0;
}
/*
* vmalloced address to physical address
*/
inline unsigned long kvirt_to_phys(unsigned long adr)
{
return uvirt_to_phys(VMALLOC_VMADDR(adr));
}
/*
* vmalloced address to bus address
*/
inline unsigned long kvirt_to_bus(unsigned long adr)
{ {
return virt_to_bus(phys_to_virt(kvirt_to_phys(adr))); int order = 0;
}
inline int order(unsigned long size)
{
int ordr = 0;
size = (size+PAGE_SIZE-1)/PAGE_SIZE; size = (size+PAGE_SIZE-1)/PAGE_SIZE;
while (size) { while (size) {
size /= 2; size /= 2;
ordr++; order++;
} }
return ordr; return order;
} }
void* bmalloc(unsigned long size) void* bmalloc(unsigned long size)
{ {
void* mem; void* mem;
...@@ -96,7 +56,7 @@ void* bmalloc(unsigned long size) ...@@ -96,7 +56,7 @@ void* bmalloc(unsigned long size)
* The following function got a lot of memory at boottime, * The following function got a lot of memory at boottime,
* so we know its always there... * so we know its always there...
*/ */
mem = (void*)__get_free_pages(GFP_USER,order(size)); mem = (void*)__get_free_pages(GFP_USER|GFP_DMA,__get_order(size));
#endif #endif
if (mem) { if (mem) {
unsigned long adr = (unsigned long)mem; unsigned long adr = (unsigned long)mem;
...@@ -122,7 +82,7 @@ void bfree(void* mem, unsigned long size) ...@@ -122,7 +82,7 @@ void bfree(void* mem, unsigned long size)
#ifdef CONFIG_BIGPHYS_AREA #ifdef CONFIG_BIGPHYS_AREA
bigphysarea_free_pages(mem); bigphysarea_free_pages(mem);
#else #else
free_pages((unsigned long)mem,order(size)); free_pages((unsigned long)mem,__get_order(size));
#endif #endif
} }
} }
extern inline unsigned long uvirt_to_phys(unsigned long adr);
/* vmalloced address to physical address */
extern inline unsigned long kvirt_to_phys(unsigned long adr)
{ return uvirt_to_phys(VMALLOC_VMADDR(adr)); }
/* vmalloced address to bus address */
extern inline unsigned long kvirt_to_bus(unsigned long adr)
{ return virt_to_bus(phys_to_virt(kvirt_to_phys(adr))); }
/* always vmalloced memory - not always continuous! */
void* rvmalloc(unsigned long size);
void rvfree(void* mem, unsigned long size);
/* either kmalloc() or bigphysarea() alloced memory - continuous */ /* either kmalloc() or bigphysarea() alloced memory - continuous */
void* bmalloc(unsigned long size); void* bmalloc(unsigned long size);
void bfree(void* mem, unsigned long size); void bfree(void* mem, unsigned long size);
...@@ -21,10 +21,7 @@ ...@@ -21,10 +21,7 @@
/* With some changes from Kysti Mlkki <kmalkki@cc.hut.fi> and even /* With some changes from Kysti Mlkki <kmalkki@cc.hut.fi> and even
Frodo Looijaard <frodol@dds.nl> */ Frodo Looijaard <frodol@dds.nl> */
/* $Id: i2c-algo-bit.c,v 1.21 1999/12/21 23:45:58 frodo Exp $ */
/*
static char alg_rcsid[] = "$Id: i2c-algo-bit.c,v 1.20 1999/11/12 11:26:20 frodo Exp $";
*/
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
/* With some changes from Kysti Mlkki <kmalkki@cc.hut.fi> and even /* With some changes from Kysti Mlkki <kmalkki@cc.hut.fi> and even
Frodo Looijaard <frodol@dds.nl> */ Frodo Looijaard <frodol@dds.nl> */
/* $Id: i2c-algo-pcf.c,v 1.15 1999/12/21 23:45:58 frodo Exp $ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/delay.h> #include <linux/delay.h>
......
...@@ -16,12 +16,12 @@ ...@@ -16,12 +16,12 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#define RCSID "$Id: i2c-core.c,v 1.42 1999/11/30 20:06:42 frodo Exp $"
/* ------------------------------------------------------------------------- */
/* With some changes from Kysti Mlkki <kmalkki@cc.hut.fi>. /* With some changes from Kysti Mlkki <kmalkki@cc.hut.fi>.
All SMBus-related things are written by Frodo Looijaard <frodol@dds.nl> */ All SMBus-related things are written by Frodo Looijaard <frodol@dds.nl> */
/* $Id: i2c-core.c,v 1.44 1999/12/21 23:45:58 frodo Exp $ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -451,12 +451,23 @@ int i2c_del_driver(struct i2c_driver *driver) ...@@ -451,12 +451,23 @@ int i2c_del_driver(struct i2c_driver *driver)
return 0; return 0;
} }
int i2c_check_addr (struct i2c_adapter *adapter, int addr)
{
int i;
for (i = 0; i < I2C_CLIENT_MAX ; i++)
if (adapter->clients[i] && (adapter->clients[i]->addr == addr))
return -EBUSY;
return 0;
}
int i2c_attach_client(struct i2c_client *client) int i2c_attach_client(struct i2c_client *client)
{ {
struct i2c_adapter *adapter = client->adapter; struct i2c_adapter *adapter = client->adapter;
int i; int i;
if (i2c_check_addr(client->adapter,client->addr))
return -EBUSY;
for (i = 0; i < I2C_CLIENT_MAX; i++) for (i = 0; i < I2C_CLIENT_MAX; i++)
if (NULL == adapter->clients[i]) if (NULL == adapter->clients[i])
break; break;
...@@ -855,6 +866,10 @@ int i2c_probe(struct i2c_adapter *adapter, ...@@ -855,6 +866,10 @@ int i2c_probe(struct i2c_adapter *adapter,
addr <= 0x7f; addr <= 0x7f;
addr++) { addr++) {
/* Skip if already in use */
if (i2c_check_addr(adapter,addr))
continue;
/* If it is in one of the force entries, we don't do any detection /* If it is in one of the force entries, we don't do any detection
at all */ at all */
found = 0; found = 0;
...@@ -1311,6 +1326,7 @@ EXPORT_SYMBOL(i2c_attach_client); ...@@ -1311,6 +1326,7 @@ EXPORT_SYMBOL(i2c_attach_client);
EXPORT_SYMBOL(i2c_detach_client); EXPORT_SYMBOL(i2c_detach_client);
EXPORT_SYMBOL(i2c_inc_use_client); EXPORT_SYMBOL(i2c_inc_use_client);
EXPORT_SYMBOL(i2c_dec_use_client); EXPORT_SYMBOL(i2c_dec_use_client);
EXPORT_SYMBOL(i2c_check_addr);
EXPORT_SYMBOL(i2c_master_send); EXPORT_SYMBOL(i2c_master_send);
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
But I have used so much of his original code and ideas that it seems But I have used so much of his original code and ideas that it seems
only fair to recognize him as co-author -- Frodo */ only fair to recognize him as co-author -- Frodo */
/* $Id: i2c-dev.c,v 1.18 1999/12/21 23:45:58 frodo Exp $ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/fs.h> #include <linux/fs.h>
...@@ -277,8 +279,11 @@ int i2cdev_ioctl (struct inode *inode, struct file *file, unsigned int cmd, ...@@ -277,8 +279,11 @@ int i2cdev_ioctl (struct inode *inode, struct file *file, unsigned int cmd,
switch ( cmd ) { switch ( cmd ) {
case I2C_SLAVE: case I2C_SLAVE:
case I2C_SLAVE_FORCE:
if ((arg > 0x3ff) || (((client->flags & I2C_M_TEN) == 0) && arg > 0x7f)) if ((arg > 0x3ff) || (((client->flags & I2C_M_TEN) == 0) && arg > 0x7f))
return -EINVAL; return -EINVAL;
if ((cmd == I2C_SLAVE) && i2c_check_addr(client->adapter,arg))
return -EBUSY;
client->addr = arg; client->addr = arg;
return 0; return 0;
case I2C_TENBIT: case I2C_TENBIT:
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
/* With some changes from Kysti Mlkki <kmalkki@cc.hut.fi> and even /* With some changes from Kysti Mlkki <kmalkki@cc.hut.fi> and even
Frodo Looijaard <frodol@dds.nl> */ Frodo Looijaard <frodol@dds.nl> */
/* $Id: i2c-elektor.c,v 1.13 1999/12/21 23:45:58 frodo Exp $ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/module.h> #include <linux/module.h>
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* ------------------------------------------------------------------------- /* -------------------------------------------------------------------------
static char rcsid[] = "$Id: i2c-elv.c,v 1.11 1999/10/08 14:25:11 frodo Exp $";
------------------------------------------------------------------------- */
/* With some changes from Kysti Mlkki <kmalkki@cc.hut.fi> and even /* With some changes from Kysti Mlkki <kmalkki@cc.hut.fi> and even
Frodo Looijaard <frodol@dds.nl> */ Frodo Looijaard <frodol@dds.nl> */
/* $Id: i2c-elv.c,v 1.12 1999/12/21 23:45:58 frodo Exp $ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/delay.h> #include <linux/delay.h>
......
...@@ -18,10 +18,11 @@ ...@@ -18,10 +18,11 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */
/* $Id: i2c-pcf8584.h,v 1.1 1999/07/18 14:01:33 frodo Exp $ */
/* With some changes from Frodo Looijaard <frodol@dds.nl> */ /* With some changes from Frodo Looijaard <frodol@dds.nl> */
/* $Id: i2c-pcf8584.h,v 1.2 1999/12/21 23:45:58 frodo Exp $ */
#ifndef I2C_PCF8584_H #ifndef I2C_PCF8584_H
#define I2C_PCF8584_H 1 #define I2C_PCF8584_H 1
......
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* ------------------------------------------------------------------------- /* -------------------------------------------------------------------------
static char rcsid[] = "$Id: i2c-philips-par.c,v 1.11 1999/10/08 14:25:11 frodo Exp $";
------------------------------------------------------------------------- */
/* With some changes from Kysti Mlkki <kmalkki@cc.hut.fi> and even /* With some changes from Kysti Mlkki <kmalkki@cc.hut.fi> and even
Frodo Looijaard <frodol@dds.nl> */ Frodo Looijaard <frodol@dds.nl> */
/* $Id: i2c-philips-par.c,v 1.12 1999/12/21 23:45:58 frodo Exp $ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/module.h> #include <linux/module.h>
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* ------------------------------------------------------------------------- /* -------------------------------------------------------------------------
static char rcsid[] = "$Id: i2c-velleman.c,v 1.13 1999/10/08 14:25:11 frodo Exp $";
------------------------------------------------------------------------- */ /* $Id: i2c-velleman.c,v 1.14 1999/12/21 23:45:58 frodo Exp $ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/ioport.h> #include <linux/ioport.h>
......
This diff is collapsed.
This diff is collapsed.
...@@ -747,7 +747,7 @@ static char irqrmap[] = {-1,-1,0,1,-1,2,-1,-1,-1,0,3,4,-1,-1,-1,-1}; ...@@ -747,7 +747,7 @@ static char irqrmap[] = {-1,-1,0,1,-1,2,-1,-1,-1,0,3,4,-1,-1,-1,-1};
static char irqrmap2[] = {-1,-1,4,0,1,2,-1,3,-1,4,5,6,7,-1,-1,-1}; static char irqrmap2[] = {-1,-1,4,0,1,2,-1,3,-1,4,5,6,7,-1,-1,-1};
static int eepro_grab_irq(struct net_device *dev) static int eepro_grab_irq(struct net_device *dev)
{ {
int irqlist[] = { 3, 4, 5, 7, 9, 10, 11, 12 }; int irqlist[] = { 3, 4, 5, 7, 9, 10, 11, 12, 0 };
int *irqp = irqlist, temp_reg, ioaddr = dev->base_addr; int *irqp = irqlist, temp_reg, ioaddr = dev->base_addr;
outb(BANK1_SELECT, ioaddr); /* be CAREFUL, BANK 1 now */ outb(BANK1_SELECT, ioaddr); /* be CAREFUL, BANK 1 now */
......
/* eth16i.c An ICL EtherTeam 16i and 32 EISA ethernet driver for Linux /* eth16i.c An ICL EtherTeam 16i and 32 EISA ethernet driver for Linux
Written 1994-1998 by Mika Kuoppala Written 1994-1999 by Mika Kuoppala
Copyright (C) 1994-1998 by Mika Kuoppala Copyright (C) 1994-1999 by Mika Kuoppala
Based on skeleton.c and heavily on at1700.c by Donald Becker Based on skeleton.c and heavily on at1700.c by Donald Becker
This software may be used and distributed according to the terms This software may be used and distributed according to the terms
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
(Uses true 32 bit transfers rather than 16i compability mode) (Uses true 32 bit transfers rather than 16i compability mode)
Example Module usage: Example Module usage:
insmod eth16i.o ioaddr=0x2a0 mediatype=bnc insmod eth16i.o io=0x2a0 mediatype=bnc
mediatype can be one of the following: bnc,tp,dix,auto,eprom mediatype can be one of the following: bnc,tp,dix,auto,eprom
...@@ -118,6 +118,12 @@ ...@@ -118,6 +118,12 @@
Now more shallow reset is made on Now more shallow reset is made on
close. close.
0.34 29.06-99 Fixed one bad #ifdef.
Changed ioaddr -> io for consistency
0.35 01.07-99 transmit,-receive bytes were never
updated in stats.
Bugs: Bugs:
In some cases the media interface autoprobing code doesn't find In some cases the media interface autoprobing code doesn't find
the correct interface type. In this case you can the correct interface type. In this case you can
...@@ -137,7 +143,7 @@ ...@@ -137,7 +143,7 @@
*/ */
static char *version = static char *version =
"eth16i.c: v0.33 10-09-98 Mika Kuoppala (miku@iki.fi)\n"; "eth16i.c: v0.35 01-Jul-1999 Mika Kuoppala (miku@iki.fi)\n";
#include <linux/module.h> #include <linux/module.h>
...@@ -400,7 +406,8 @@ struct eth16i_local { ...@@ -400,7 +406,8 @@ struct eth16i_local {
unsigned short tx_queue_len; unsigned short tx_queue_len;
unsigned int tx_buf_size; unsigned int tx_buf_size;
unsigned long open_time; unsigned long open_time;
unsigned long tx_buffered_packets; unsigned long tx_buffered_packets;
unsigned long tx_buffered_bytes;
unsigned long col_16; unsigned long col_16;
}; };
...@@ -1147,9 +1154,9 @@ static int eth16i_tx(struct sk_buff *skb, struct net_device *dev) ...@@ -1147,9 +1154,9 @@ static int eth16i_tx(struct sk_buff *skb, struct net_device *dev)
} }
lp->tx_buffered_packets++; lp->tx_buffered_packets++;
lp->tx_buffered_bytes = length;
lp->tx_queue++; lp->tx_queue++;
lp->tx_queue_len += length + 2; lp->tx_queue_len += length + 2;
} }
lp->tx_buf_busy = 0; lp->tx_buf_busy = 0;
...@@ -1260,6 +1267,7 @@ static void eth16i_rx(struct net_device *dev) ...@@ -1260,6 +1267,7 @@ static void eth16i_rx(struct net_device *dev)
skb->protocol=eth_type_trans(skb, dev); skb->protocol=eth_type_trans(skb, dev);
netif_rx(skb); netif_rx(skb);
lp->stats.rx_packets++; lp->stats.rx_packets++;
lp->stats.rx_bytes += pkt_len;
if( eth16i_debug > 5 ) { if( eth16i_debug > 5 ) {
int i; int i;
...@@ -1368,6 +1376,7 @@ static void eth16i_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1368,6 +1376,7 @@ static void eth16i_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if(status & TX_DONE) { /* The transmit has been done */ if(status & TX_DONE) { /* The transmit has been done */
lp->stats.tx_packets = lp->tx_buffered_packets; lp->stats.tx_packets = lp->tx_buffered_packets;
lp->stats.tx_bytes += lp->tx_buffered_bytes;
lp->col_16 = 0; lp->col_16 = 0;
if(lp->tx_queue) { /* Is there still packets ? */ if(lp->tx_queue) { /* Is there still packets ? */
...@@ -1500,7 +1509,7 @@ static struct net_device dev_eth16i[MAX_ETH16I_CARDS] = { ...@@ -1500,7 +1509,7 @@ static struct net_device dev_eth16i[MAX_ETH16I_CARDS] = {
}, },
}; };
static int ioaddr[MAX_ETH16I_CARDS] = { 0, }; static int io[MAX_ETH16I_CARDS] = { 0, };
#if 0 #if 0
static int irq[MAX_ETH16I_CARDS] = { 0, }; static int irq[MAX_ETH16I_CARDS] = { 0, };
#endif #endif
...@@ -1511,8 +1520,8 @@ static int debug = -1; ...@@ -1511,8 +1520,8 @@ static int debug = -1;
MODULE_AUTHOR("Mika Kuoppala <miku@iki.fi>"); MODULE_AUTHOR("Mika Kuoppala <miku@iki.fi>");
MODULE_DESCRIPTION("ICL EtherTeam 16i/32 driver"); MODULE_DESCRIPTION("ICL EtherTeam 16i/32 driver");
MODULE_PARM(ioaddr, "1-" __MODULE_STRING(MAX_ETH16I_CARDS) "i"); MODULE_PARM(io, "1-" __MODULE_STRING(MAX_ETH16I_CARDS) "i");
MODULE_PARM_DESC(ioaddr, "eth16i io base address"); MODULE_PARM_DESC(io, "eth16i io base address");
#if 0 #if 0
MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_ETH16I_CARDS) "i"); MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_ETH16I_CARDS) "i");
...@@ -1536,7 +1545,7 @@ int init_module(void) ...@@ -1536,7 +1545,7 @@ int init_module(void)
dev->name = namelist + (NAMELEN*this_dev); dev->name = namelist + (NAMELEN*this_dev);
dev->irq = 0; /* irq[this_dev]; */ dev->irq = 0; /* irq[this_dev]; */
dev->base_addr = ioaddr[this_dev]; dev->base_addr = io[this_dev];
dev->init = eth16i_probe; dev->init = eth16i_probe;
if(debug != -1) if(debug != -1)
...@@ -1547,7 +1556,7 @@ int init_module(void) ...@@ -1547,7 +1556,7 @@ int init_module(void)
dev->if_port = eth16i_parse_mediatype(mediatype[this_dev]); dev->if_port = eth16i_parse_mediatype(mediatype[this_dev]);
if(ioaddr[this_dev] == 0) if(io[this_dev] == 0)
{ {
if(this_dev != 0) break; /* Only autoprobe 1st one */ if(this_dev != 0) break; /* Only autoprobe 1st one */
...@@ -1557,7 +1566,7 @@ int init_module(void) ...@@ -1557,7 +1566,7 @@ int init_module(void)
if(register_netdev(dev) != 0) if(register_netdev(dev) != 0)
{ {
printk(KERN_WARNING "eth16i.c No Eth16i card found (i/o = 0x%x).\n", printk(KERN_WARNING "eth16i.c No Eth16i card found (i/o = 0x%x).\n",
ioaddr[this_dev]); io[this_dev]);
if(found != 0) return 0; if(found != 0) return 0;
return -ENXIO; return -ENXIO;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Status: Experimental. * Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no> * Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Sun Aug 3 13:49:59 1997 * Created at: Sun Aug 3 13:49:59 1997
* Modified at: Thu Dec 16 00:47:08 1999 * Modified at: Tue Dec 21 21:51:23 1999
* Modified by: Dag Brattli <dagb@cs.uit.no> * Modified by: Dag Brattli <dagb@cs.uit.no>
* Sources: serial.c by Linus Torvalds * Sources: serial.c by Linus Torvalds
* *
...@@ -218,9 +218,6 @@ irport_open(int i, unsigned int iobase, unsigned int irq) ...@@ -218,9 +218,6 @@ irport_open(int i, unsigned int iobase, unsigned int irq)
ERROR(__FUNCTION__ "(), dev_alloc() failed!\n"); ERROR(__FUNCTION__ "(), dev_alloc() failed!\n");
return NULL; return NULL;
} }
/* dev_alloc doesn't clear the struct */
memset(((__u8*)dev)+sizeof(char*),0,sizeof(struct net_device)-sizeof(char*));
self->netdev = dev; self->netdev = dev;
/* May be overridden by piggyback drivers */ /* May be overridden by piggyback drivers */
...@@ -266,8 +263,6 @@ int irport_close(struct irport_cb *self) ...@@ -266,8 +263,6 @@ int irport_close(struct irport_cb *self)
rtnl_lock(); rtnl_lock();
unregister_netdevice(self->netdev); unregister_netdevice(self->netdev);
rtnl_unlock(); rtnl_unlock();
/* Must free the old-style 2.2.x device */
kfree(self->netdev);
} }
/* Release the IO-port that this driver is using */ /* Release the IO-port that this driver is using */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Status: Experimental. * Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no> * Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Tue Dec 9 21:18:38 1997 * Created at: Tue Dec 9 21:18:38 1997
* Modified at: Thu Dec 16 09:37:47 1999 * Modified at: Tue Dec 21 21:50:59 1999
* Modified by: Dag Brattli <dagb@cs.uit.no> * Modified by: Dag Brattli <dagb@cs.uit.no>
* Sources: slip.c by Laurence Culhane, <loz@holmes.demon.co.uk> * Sources: slip.c by Laurence Culhane, <loz@holmes.demon.co.uk>
* Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> * Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
...@@ -233,8 +233,6 @@ static int irtty_open(struct tty_struct *tty) ...@@ -233,8 +233,6 @@ static int irtty_open(struct tty_struct *tty)
ERROR(__FUNCTION__ "(), dev_alloc() failed!\n"); ERROR(__FUNCTION__ "(), dev_alloc() failed!\n");
return -ENOMEM; return -ENOMEM;
} }
/* dev_alloc doesn't clear the struct */
memset(((__u8*)dev)+sizeof(char*),0,sizeof(struct net_device)-sizeof(char*));
dev->priv = (void *) self; dev->priv = (void *) self;
self->netdev = dev; self->netdev = dev;
...@@ -286,8 +284,6 @@ static void irtty_close(struct tty_struct *tty) ...@@ -286,8 +284,6 @@ static void irtty_close(struct tty_struct *tty)
rtnl_lock(); rtnl_lock();
unregister_netdevice(self->netdev); unregister_netdevice(self->netdev);
rtnl_unlock(); rtnl_unlock();
/* Must free the old-style 2.2.x device */
kfree(self->netdev);
} }
/* We are not using any dongle anymore! */ /* We are not using any dongle anymore! */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Status: Experimental. * Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no> * Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Sat Nov 7 21:43:15 1998 * Created at: Sat Nov 7 21:43:15 1998
* Modified at: Thu Dec 16 00:54:27 1999 * Modified at: Tue Dec 21 21:51:54 1999
* Modified by: Dag Brattli <dagb@cs.uit.no> * Modified by: Dag Brattli <dagb@cs.uit.no>
* *
* Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no> * Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>
...@@ -113,7 +113,6 @@ static int pc87108_pio_write(int iobase, __u8 *buf, int len, int fifo_size); ...@@ -113,7 +113,6 @@ static int pc87108_pio_write(int iobase, __u8 *buf, int len, int fifo_size);
static void pc87108_dma_write(struct pc87108 *self, int iobase); static void pc87108_dma_write(struct pc87108 *self, int iobase);
static void pc87108_change_speed(struct pc87108 *self, __u32 baud); static void pc87108_change_speed(struct pc87108 *self, __u32 baud);
static void pc87108_interrupt(int irq, void *dev_id, struct pt_regs *regs); static void pc87108_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static void pc87108_wait_until_sent(struct pc87108 *self);
static int pc87108_is_receiving(struct pc87108 *self); static int pc87108_is_receiving(struct pc87108 *self);
static int pc87108_read_dongle_id (int iobase); static int pc87108_read_dongle_id (int iobase);
static void pc87108_init_dongle_interface (int iobase, int dongle_id); static void pc87108_init_dongle_interface (int iobase, int dongle_id);
...@@ -257,9 +256,6 @@ static int pc87108_open(int i, unsigned int iobase, unsigned int board_addr, ...@@ -257,9 +256,6 @@ static int pc87108_open(int i, unsigned int iobase, unsigned int board_addr,
ERROR(__FUNCTION__ "(), dev_alloc() failed!\n"); ERROR(__FUNCTION__ "(), dev_alloc() failed!\n");
return -ENOMEM; return -ENOMEM;
} }
/* dev_alloc doesn't clear the struct, so lets do a little hack */
memset(((__u8*)dev)+sizeof(char*),0,sizeof(struct net_device)-sizeof(char*));
dev->priv = (void *) self; dev->priv = (void *) self;
self->netdev = dev; self->netdev = dev;
...@@ -308,8 +304,6 @@ static int pc87108_close(struct pc87108 *self) ...@@ -308,8 +304,6 @@ static int pc87108_close(struct pc87108 *self)
rtnl_lock(); rtnl_lock();
unregister_netdevice(self->netdev); unregister_netdevice(self->netdev);
rtnl_unlock(); rtnl_unlock();
/* Must free the old-style 2.2.x device */
kfree(self->netdev);
} }
/* Release the PORT that this driver is using */ /* Release the PORT that this driver is using */
...@@ -666,7 +660,7 @@ static void pc87108_change_speed(struct pc87108 *self, __u32 speed) ...@@ -666,7 +660,7 @@ static void pc87108_change_speed(struct pc87108 *self, __u32 speed)
__u8 bank; __u8 bank;
int iobase; int iobase;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(2, __FUNCTION__ "(), speed=%d\n", speed);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
...@@ -819,11 +813,11 @@ static int pc87108_hard_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -819,11 +813,11 @@ static int pc87108_hard_xmit(struct sk_buff *skb, struct net_device *dev)
pc87108_dma_write(self, iobase); pc87108_dma_write(self, iobase);
} }
} else { } else {
self->tx_buff.data = self->tx_buff.head;
self->tx_buff.len = async_wrap_skb(skb, self->tx_buff.data, self->tx_buff.len = async_wrap_skb(skb, self->tx_buff.data,
self->tx_buff.truesize); self->tx_buff.truesize);
self->tx_buff.data = self->tx_buff.head;
/* Add interrupt on tx low level (will fire immediately) */ /* Add interrupt on tx low level (will fire immediately) */
switch_bank(iobase, BANK0); switch_bank(iobase, BANK0);
outb(IER_TXLDL_IE, iobase+IER); outb(IER_TXLDL_IE, iobase+IER);
...@@ -992,12 +986,13 @@ static int pc87108_dma_receive(struct pc87108 *self) ...@@ -992,12 +986,13 @@ static int pc87108_dma_receive(struct pc87108 *self)
switch_bank(iobase, BANK0); switch_bank(iobase, BANK0);
outb(inb(iobase+MCR) & ~MCR_DMA_EN, iobase+MCR); outb(inb(iobase+MCR) & ~MCR_DMA_EN, iobase+MCR);
self->rx_buff.data = self->rx_buff.head;
setup_dma(self->io.dma, self->rx_buff.data, setup_dma(self->io.dma, self->rx_buff.data,
self->rx_buff.truesize, DMA_MODE_READ); self->rx_buff.truesize, DMA_MODE_READ);
/* driver->media_busy = FALSE; */ /* driver->media_busy = FALSE; */
self->io.direction = IO_RECV; self->io.direction = IO_RECV;
self->rx_buff.data = self->rx_buff.head;
/* Reset Rx FIFO. This will also flush the ST_FIFO */ /* Reset Rx FIFO. This will also flush the ST_FIFO */
outb(FCR_RXTH|FCR_TXTH|FCR_RXSR|FCR_FIFO_EN, iobase+FCR); outb(FCR_RXTH|FCR_TXTH|FCR_RXSR|FCR_FIFO_EN, iobase+FCR);
...@@ -1163,9 +1158,7 @@ static void pc87108_pio_receive(struct pc87108 *self) ...@@ -1163,9 +1158,7 @@ static void pc87108_pio_receive(struct pc87108 *self)
/* Receive all characters in Rx FIFO */ /* Receive all characters in Rx FIFO */
do { do {
byte = inb(iobase+RXD); byte = inb(iobase+RXD);
async_unwrap_char(self->netdev, &self->stats, &self->rx_buff, async_unwrap_char(self->netdev, &self->stats, &self->rx_buff, byte);
byte);
} while (inb(iobase+LSR) & LSR_RXDA); /* Data available */ } while (inb(iobase+LSR) & LSR_RXDA); /* Data available */
} }
...@@ -1215,7 +1208,14 @@ static __u8 pc87108_sir_interrupt(struct pc87108 *self, int eir) ...@@ -1215,7 +1208,14 @@ static __u8 pc87108_sir_interrupt(struct pc87108 *self, int eir)
} }
/* Check if transmission has completed */ /* Check if transmission has completed */
if (eir & EIR_TXEMP_EV) { if (eir & EIR_TXEMP_EV) {
/* Check if we need to change the speed? */
if (self->new_speed) {
IRDA_DEBUG(2, __FUNCTION__
"(), Changing speed!\n");
pc87108_change_speed(self, self->new_speed);
self->new_speed = 0;
}
/* Turn around and get ready to receive some data */ /* Turn around and get ready to receive some data */
self->io.direction = IO_RECV; self->io.direction = IO_RECV;
new_ier |= IER_RXHDL_IE; new_ier |= IER_RXHDL_IE;
...@@ -1352,19 +1352,6 @@ static void pc87108_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1352,19 +1352,6 @@ static void pc87108_interrupt(int irq, void *dev_id, struct pt_regs *regs)
dev->interrupt = 0; dev->interrupt = 0;
} }
/*
* Function pc87108_wait_until_sent (self)
*
* This function should put the current thread to sleep until all data
* have been sent, so it is safe to f.eks. change the speed.
*/
static void pc87108_wait_until_sent(struct pc87108 *self)
{
/* Just delay 60 ms */
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(MSECS_TO_JIFFIES(60));
}
/* /*
* Function pc87108_is_receiving (self) * Function pc87108_is_receiving (self)
* *
......
...@@ -702,8 +702,6 @@ toshoboe_close (struct toshoboe_cb *self) ...@@ -702,8 +702,6 @@ toshoboe_close (struct toshoboe_cb *self)
rtnl_lock(); rtnl_lock();
unregister_netdevice(self->netdev); unregister_netdevice(self->netdev);
rtnl_unlock(); rtnl_unlock();
/* Must free the old-style 2.2.x device */
kfree(self->netdev);
} }
kfree (self->taskfilebuf); kfree (self->taskfilebuf);
...@@ -872,8 +870,6 @@ toshoboe_open (struct pci_dev *pci_dev) ...@@ -872,8 +870,6 @@ toshoboe_open (struct pci_dev *pci_dev)
ERROR(__FUNCTION__ "(), dev_alloc() failed!\n"); ERROR(__FUNCTION__ "(), dev_alloc() failed!\n");
return -ENOMEM; return -ENOMEM;
} }
/* dev_alloc doesn't clear the struct, so lets do a little hack */
memset(((__u8*)dev)+sizeof(char*),0,sizeof(struct net_device)-sizeof(char*));
dev->priv = (void *) self; dev->priv = (void *) self;
self->netdev = dev; self->netdev = dev;
......
This diff is collapsed.
...@@ -1221,7 +1221,7 @@ static void set_rx_mode(struct net_device *net_dev) ...@@ -1221,7 +1221,7 @@ static void set_rx_mode(struct net_device *net_dev)
/* update Multicast Hash Table in Receive Filter */ /* update Multicast Hash Table in Receive Filter */
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
+ /* why plus 0x04 ??, That makes the correct value for hash table. */ /* why plus 0x04 ??, That makes the correct value for hash table. */
outl((u32)(0x00000004+i) << RFADDR_shift, ioaddr + rfcr); outl((u32)(0x00000004+i) << RFADDR_shift, ioaddr + rfcr);
outl(mc_filter[i], ioaddr + rfdr); outl(mc_filter[i], ioaddr + rfdr);
} }
......
This diff is collapsed.
...@@ -13,7 +13,7 @@ MIX_OBJS := ...@@ -13,7 +13,7 @@ MIX_OBJS :=
MOD_LIST_NAME := SCSI_MODULES MOD_LIST_NAME := SCSI_MODULES
SCSI_SRCS = $(wildcard $(L_OBJS:%.o=%.c)) SCSI_SRCS = $(wildcard $(L_OBJS:%.o=%.c))
CFLAGS_aha152x.o = -DDEBUG_AHA152X -DAUTOCONF CFLAGS_aha152x.o = -DAHA152X_STAT -DAUTOCONF
CFLAGS_gdth.o = # -DDEBUG_GDTH=2 -D__SERIAL__ -D__COM2__ -DGDTH_STATISTICS CFLAGS_gdth.o = # -DDEBUG_GDTH=2 -D__SERIAL__ -D__COM2__ -DGDTH_STATISTICS
CFLAGS_seagate.o = -DARBITRATE -DPARITY -DSEAGATE_USE_ASM CFLAGS_seagate.o = -DARBITRATE -DPARITY -DSEAGATE_USE_ASM
......
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.
...@@ -265,6 +265,7 @@ static struct dev_info device_list[] = ...@@ -265,6 +265,7 @@ static struct dev_info device_list[] =
{"YAMAHA", "CDR102", "1.00", BLIST_NOLUN}, /* Locks up if polled for lun != 0 {"YAMAHA", "CDR102", "1.00", BLIST_NOLUN}, /* Locks up if polled for lun != 0
* extra reset */ * extra reset */
{"RELISYS", "Scorpio", "*", BLIST_NOLUN}, /* responds to all LUN */ {"RELISYS", "Scorpio", "*", BLIST_NOLUN}, /* responds to all LUN */
{"MICROTEK", "ScanMaker II", "5.61", BLIST_NOLUN}, /* responds to all LUN */
/* /*
* Other types of devices that have special flags. * Other types of devices that have special flags.
......
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