Commit 3b1d5e1d authored by David S. Miller's avatar David S. Miller

Merge nuts.ninka.net:/home/davem/src/BK/network-2.5

into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents dcee68e7 d7b7a72d
...@@ -52,7 +52,7 @@ loaded as a module, only the IRQ and transceiver setting may be overridden. ...@@ -52,7 +52,7 @@ loaded as a module, only the IRQ and transceiver setting may be overridden.
For example, setting two cards to 10base2/IRQ10 and AUI/IRQ11 is done by using For example, setting two cards to 10base2/IRQ10 and AUI/IRQ11 is done by using
the xcvr and irq module options: the xcvr and irq module options:
options 3c509 xcvr=3,3 irq=10,11 options 3c509 xcvr=3,1 irq=10,11
(2) Full-duplex mode (2) Full-duplex mode
......
...@@ -22,7 +22,7 @@ bttv.o ...@@ -22,7 +22,7 @@ bttv.o
card=20 - CEI Raffles Card card=20 - CEI Raffles Card
card=21 - Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50 card=21 - Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50
card=22 - Askey CPH050/ Phoebe Tv Master + FM card=22 - Askey CPH050/ Phoebe Tv Master + FM
card=23 - Modular Technology MM205 PCTV, bt878 card=23 - Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878
card=24 - Askey CPH05X/06X (bt878) [many vendors] card=24 - Askey CPH05X/06X (bt878) [many vendors]
card=25 - Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar card=25 - Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar
card=26 - Hauppauge WinCam newer (bt878) card=26 - Hauppauge WinCam newer (bt878)
...@@ -39,7 +39,7 @@ bttv.o ...@@ -39,7 +39,7 @@ bttv.o
card=37 - Prolink PixelView PlayTV pro card=37 - Prolink PixelView PlayTV pro
card=38 - Askey CPH06X TView99 card=38 - Askey CPH06X TView99
card=39 - Pinnacle PCTV Studio/Rave card=39 - Pinnacle PCTV Studio/Rave
card=40 - STB TV PCI FM, Gateway P/N 6000704 (bt878) card=40 - STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100
card=41 - AVerMedia TVPhone 98 card=41 - AVerMedia TVPhone 98
card=42 - ProVideo PV951 card=42 - ProVideo PV951
card=43 - Little OnAir TV card=43 - Little OnAir TV
...@@ -81,11 +81,27 @@ bttv.o ...@@ -81,11 +81,27 @@ bttv.o
card=79 - DSP Design TCVIDEO card=79 - DSP Design TCVIDEO
card=80 - Hauppauge WinTV PVR card=80 - Hauppauge WinTV PVR
card=81 - GV-BCTV5/PCI card=81 - GV-BCTV5/PCI
card=82 - Osprey 100/150 (878)
card=83 - Osprey 100/150 (848)
card=84 - Osprey 101 (848)
card=85 - Osprey 101/151
card=86 - Osprey 101/151 w/ svid
card=87 - Osprey 200/201/250/251
card=88 - Osprey 200/250
card=89 - Osprey 210/220
card=90 - Osprey 500
card=91 - Osprey 540
card=92 - Osprey 2000
card=93 - IDS Eagle
card=94 - Pinnacle PCTV Sat
card=95 - Formac ProTV II
card=96 - MachTV
card=97 - Euresys Picolo
tuner.o tuner.o
type=0 - Temic PAL (4002 FH5) type=0 - Temic PAL (4002 FH5)
type=1 - Philips PAL_I (FI1246 and compatibles) type=1 - Philips PAL_I (FI1246 and compatibles)
type=2 - Philips NTSC (FI1236 and compatibles) type=2 - Philips NTSC (FI1236,FM1236 and compatibles)
type=3 - Philips (SECAM+PAL_BG) (FI1216MF, FM1216MF, FR1216MF) type=3 - Philips (SECAM+PAL_BG) (FI1216MF, FM1216MF, FR1216MF)
type=4 - NoTuner type=4 - NoTuner
type=5 - Philips PAL_BG (FI1216 and compatibles) type=5 - Philips PAL_BG (FI1216 and compatibles)
......
...@@ -179,7 +179,8 @@ Lifeview Flyvideo Series: ...@@ -179,7 +179,8 @@ Lifeview Flyvideo Series:
has not yet been seen (perhaps it was the german name for LR90 [stereo]). has not yet been seen (perhaps it was the german name for LR90 [stereo]).
These cards are sold by many OEMs too. These cards are sold by many OEMs too.
FlyVideo A2 = LR90 Rev.F (w/Remote, w/o FM, stereo TV by tda9821) {Germany} FlyVideo A2 (Elta 8680)= LR90 Rev.F (w/Remote, w/o FM, stereo TV by tda9821) {Germany}
Lifeview 3000 (Elta 8681) as sold by Plus(April 2002), Germany = LR138 w/ saa7134
Typhoon TV card series: Typhoon TV card series:
...@@ -397,6 +398,8 @@ AVerMedia ...@@ -397,6 +398,8 @@ AVerMedia
AVerTV98 mit Fernbedienung (BT-878 chip) AVerTV98 mit Fernbedienung (BT-878 chip)
AVerTV/FM98 (BT-878 chip) AVerTV/FM98 (BT-878 chip)
VDOmate (www.averm.com.cn) = M168U ?
Aimslab Aimslab
------- -------
Video Highway or "Video Highway TR200" (ISA) Video Highway or "Video Highway TR200" (ISA)
...@@ -413,7 +416,8 @@ Lifetec/Medion/Tevion/Aldi ...@@ -413,7 +416,8 @@ Lifetec/Medion/Tevion/Aldi
LT9306/MD9306 = CPH061 LT9306/MD9306 = CPH061
LT9415/MD9415 = LR90 Rev.F or Rev.G LT9415/MD9415 = LR90 Rev.F or Rev.G
MD9592 = Avermedia TVphone98 (PCI_ID=1461:0003), PCB-Rev=M168II-B (w/TDA9873H) MD9592 = Avermedia TVphone98 (PCI_ID=1461:0003), PCB-Rev=M168II-B (w/TDA9873H)
MD9717 = KNC One (Rev D4, saa7134) MD9717 = KNC One (Rev D4, saa7134, FM1216 MK2 tuner)
MD5044 = KNC One (Rev D4, saa7134, FM1216ME MK3 tuner)
Modular Technologies (www.modulartech.com) UK Modular Technologies (www.modulartech.com) UK
--------------------------------------------- ---------------------------------------------
...@@ -481,7 +485,8 @@ Pinnacle ...@@ -481,7 +485,8 @@ Pinnacle
Studio PCTV Pro (Bt878 stereo w/ FM) Studio PCTV Pro (Bt878 stereo w/ FM)
Pinnacle PCTV (Bt878, MT2032) Pinnacle PCTV (Bt878, MT2032)
Pinnacle PCTV Pro (Bt878, MT2032) Pinnacle PCTV Pro (Bt878, MT2032)
Pinncale PCTV Sat (bt878a, HM1821/1221) Pinncale PCTV Sat (bt878a, HM1821/1221) ["Conexant CX24110 with CX24108 tuner, aka HM1221/HM1811"]
Pinnacle PCTV Sat XE
M(J)PEG capture and playback: M(J)PEG capture and playback:
DC1+ (ISA) DC1+ (ISA)
...@@ -654,9 +659,9 @@ Hauppauge ...@@ -654,9 +659,9 @@ Hauppauge
WinTV PVR 450 WinTV PVR 450
US models US models
990 WinTV-PVR-350 (249USD) 990 WinTV-PVR-350 (249USD) (iTVC15 chipset + radio)
980 WinTV-PVR-250 (149USD) 980 WinTV-PVR-250 (149USD) (iTVC15 chipset)
880 WinTV-PVR-PCI (199USD) 880 WinTV-PVR-PCI (199USD) (KFIR chipset + bt878)
881 WinTV-PVR-USB 881 WinTV-PVR-USB
190 WinTV-GO 190 WinTV-GO
191 WinTV-GO-FM 191 WinTV-GO-FM
...@@ -697,11 +702,40 @@ Hauppauge ...@@ -697,11 +702,40 @@ Hauppauge
566 WinTV USB (UK) 566 WinTV USB (UK)
573 WinTV USB FM 573 WinTV USB FM
429 Impact VCB (bt848) 429 Impact VCB (bt848)
600 USB Libe (Video-In 1x Comp, 1xSVHS) 600 USB Live (Video-In 1x Comp, 1xSVHS)
542 WinTV Nova 542 WinTV Nova
717 WinTV DVB-S 717 WinTV DVB-S
909 Nova-t PCI 909 Nova-t PCI
893 Nova-t USB (Duplicate entry) 893 Nova-t USB (Duplicate entry)
802 MyTV
804 MyView
809 MyVideo
872 MyTV2Go FM
546 WinTV Nova-S CI
543 WinTV Nova
907 Nova-S USB
908 Nova-T USB
717 WinTV Nexus-S
157 DEC3000-s Standalone + USB
Spain
685 WinTV-Go
690 WinTV-PrimioFM
416 WinTV-PCI Nicam Estereo
677 WinTV-PCI-FM
699 WinTV-Theater
683 WinTV-USB
678 WinTV-USB-FM
983 WinTV-PVR-250
883 WinTV-PVR-PCI
993 WinTV-PVR-350
893 WinTV-PVR-USB
728 WinTV-DVB-C PCI
832 MyTV2Go
869 MyTV2Go-FM
805 MyVideo (USB)
Matrix-Vision Matrix-Vision
...@@ -713,6 +747,7 @@ Matrix-Vision ...@@ -713,6 +747,7 @@ Matrix-Vision
Conceptronic (.net) Conceptronic (.net)
------------ ------------
TVCON FM, TV card w/ FM = CPH05x TVCON FM, TV card w/ FM = CPH05x
TVCON = CPH06x
BestData BestData
-------- --------
...@@ -747,11 +782,22 @@ Teppro (www.itcteppro.com.tw) ...@@ -747,11 +782,22 @@ Teppro (www.itcteppro.com.tw)
Kworld (www.kworld.com.tw) Kworld (www.kworld.com.tw)
-------------------------- --------------------------
KWORLD KW-TV878RF-Pro TV Capture with FM Radio PC TV Station
KWORLD KW-TV878R-Pro TV KWORLD KW-TV878R TV (no radio)
KWORLD KW-TVL878RF (low profile) KWORLD KW-TV878RF TV (w/ radio)
KWORLD KW-TV878R TV Capture (No FM Radio)
KWORLD KW-TV878RF TV KWORLD KW-TVL878RF (low profile)
KWORLD KW-TV713XRF (saa7134)
MPEG TV Station (same cards as above plus WinDVR Software MPEG en/decoder)
KWORLD KW-TV878R -Pro TV (no Radio)
KWORLD KW-TV878RF-Pro TV (w/ Radio)
KWORLD KW-TV878R -Ultra TV (no Radio)
KWORLD KW-TV878RF-Ultra TV (w/ Radio)
JTT/ Justy Corp.http://www.justy.co.jp/ (www.jtt.com.jp website down) JTT/ Justy Corp.http://www.justy.co.jp/ (www.jtt.com.jp website down)
--------------------------------------------------------------------- ---------------------------------------------------------------------
...@@ -793,7 +839,7 @@ Satelco www.citycom-gmbh.de, www.satelco.de ...@@ -793,7 +839,7 @@ Satelco www.citycom-gmbh.de, www.satelco.de
TV-FM =KNC1 saa7134 TV-FM =KNC1 saa7134
Standard PCI (DVB-S) = Technotrend Budget Standard PCI (DVB-S) = Technotrend Budget
Standard PCI (DVB-S) w/ CI Standard PCI (DVB-S) w/ CI
Satelco Hoghend PCI (DVB-S) = Technotrend Premium Satelco Highend PCI (DVB-S) = Technotrend Premium
Sensoray www.sensoray.com Sensoray www.sensoray.com
...@@ -879,3 +925,37 @@ www.pacecom.co.uk website closed ...@@ -879,3 +925,37 @@ www.pacecom.co.uk website closed
Mercury www.kobian.com (UK and FR) Mercury www.kobian.com (UK and FR)
LR50 LR50
LR138RBG-Rx == LR138 LR138RBG-Rx == LR138
TEC sound (package and manuals don't have any other manufacturer info) TecSound
Though educated googling found: www.techmakers.com
TV-Mate = Zoltrix VP-8482
Lorenzen www.lorenzen.de
--------
SL DVB-S PCI = Technotrend Budget PCI (su1278 or bsru version)
Origo (.uk) www.origo2000.com
PC TV Card = LR50
I/O Magic www.iomagic.com
---------
PC PVR - Desktop TV Personal Video Recorder DR-PCTV100 = Pinnacle ROB2D-51009464 4.0 + Cyberlink PowerVCR II
Arowana
-------
TV-Karte / Poso Power TV (?) = Zoltrix VP-8482 (?)
iTVC15 boards:
-------------
kuroutoshikou.com ITVC15
yuan.com MPG160 PCI TV (Internal PCI MPEG2 encoder card plus TV-tuner)
Asus www.asuscom.com
Asus TV Tuner Card 880 NTSC (low profile, cx23880)
Asus TV (saa7134)
Hoontech
--------
http://www.hoontech.com/korean/download/down_driver_list03.html
HART Vision 848 (H-ART Vision 848)
HART Vision 878 (H-Art Vision 878)
...@@ -79,10 +79,11 @@ mux. ...@@ -79,10 +79,11 @@ mux.
What you have to do is figure out the correct values for gpiomask and 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 from values used by the windows driver. A tool to do this is available
ftp://telepresence.dmem.strath.ac.uk/pub/bt848/winutil, but it does'nt from ftp://telepresence.dmem.strath.ac.uk/pub/bt848/winutil, but it
work with bt878 boards according to some reports I received. Another does'nt work with bt878 boards according to some reports I received.
one is available from http://www.kki.net.pl/~borgx/bTV.html. Another one with bt878 suport is available from
http://btwincap.sourceforge.net/Files/btspy2.00.zip
You might also dig around in the *.ini files of the Windows applications. You might also dig around in the *.ini files of the Windows applications.
You can have a look at the board to see which of the gpio pins are You can have a look at the board to see which of the gpio pins are
......
...@@ -57,7 +57,7 @@ static void iomd_get_next_sg(struct scatterlist *sg, dma_t *dma) ...@@ -57,7 +57,7 @@ static void iomd_get_next_sg(struct scatterlist *sg, dma_t *dma)
if (end > PAGE_SIZE) if (end > PAGE_SIZE)
end = PAGE_SIZE; end = PAGE_SIZE;
if (offset + (int) TRANSFER_SIZE > end) if (offset + TRANSFER_SIZE >= end)
flags |= DMA_END_L; flags |= DMA_END_L;
sg->length = end - TRANSFER_SIZE; sg->length = end - TRANSFER_SIZE;
...@@ -95,27 +95,31 @@ static irqreturn_t iomd_dma_handle(int irq, void *dev_id, struct pt_regs *regs) ...@@ -95,27 +95,31 @@ static irqreturn_t iomd_dma_handle(int irq, void *dev_id, struct pt_regs *regs)
if (!(status & DMA_ST_INT)) if (!(status & DMA_ST_INT))
return IRQ_HANDLED; return IRQ_HANDLED;
if (status & DMA_ST_OFL && !dma->sg) if ((dma->state ^ status) & DMA_ST_AB)
break; iomd_get_next_sg(&dma->cur_sg, dma);
iomd_get_next_sg(&dma->cur_sg, dma);
switch (status & (DMA_ST_OFL | DMA_ST_AB)) { switch (status & (DMA_ST_OFL | DMA_ST_AB)) {
case DMA_ST_OFL: /* OIA */ case DMA_ST_OFL: /* OIA */
case DMA_ST_AB: /* .IB */ case DMA_ST_AB: /* .IB */
iomd_writel(dma->cur_sg.dma_address, base + CURA); iomd_writel(dma->cur_sg.dma_address, base + CURA);
iomd_writel(dma->cur_sg.length, base + ENDA); iomd_writel(dma->cur_sg.length, base + ENDA);
dma->state = DMA_ST_AB;
break; break;
case DMA_ST_OFL | DMA_ST_AB: /* OIB */ case DMA_ST_OFL | DMA_ST_AB: /* OIB */
case 0: /* .IA */ case 0: /* .IA */
iomd_writel(dma->cur_sg.dma_address, base + CURB); iomd_writel(dma->cur_sg.dma_address, base + CURB);
iomd_writel(dma->cur_sg.length, base + ENDB); iomd_writel(dma->cur_sg.length, base + ENDB);
dma->state = 0;
break; break;
} }
if (status & DMA_ST_OFL &&
dma->cur_sg.length == (DMA_END_S|DMA_END_L))
break;
} while (1); } while (1);
iomd_writeb(0, dma->dma_base + CR); dma->state = ~DMA_ST_AB;
disable_irq(irq); disable_irq(irq);
return IRQ_HANDLED; return IRQ_HANDLED;
...@@ -152,6 +156,7 @@ static void iomd_enable_dma(dmach_t channel, dma_t *dma) ...@@ -152,6 +156,7 @@ static void iomd_enable_dma(dmach_t channel, dma_t *dma)
} }
iomd_writeb(DMA_CR_C, dma_base + CR); iomd_writeb(DMA_CR_C, dma_base + CR);
dma->state = DMA_ST_AB;
} }
if (dma->dma_mode == DMA_MODE_READ) if (dma->dma_mode == DMA_MODE_READ)
...@@ -165,13 +170,11 @@ static void iomd_disable_dma(dmach_t channel, dma_t *dma) ...@@ -165,13 +170,11 @@ static void iomd_disable_dma(dmach_t channel, dma_t *dma)
{ {
unsigned long dma_base = dma->dma_base; unsigned long dma_base = dma->dma_base;
unsigned long flags; unsigned long flags;
unsigned int ctrl;
local_irq_save(flags); local_irq_save(flags);
ctrl = iomd_readb(dma_base + CR); if (dma->state != ~DMA_ST_AB)
if (ctrl & DMA_CR_E)
disable_irq(dma->dma_irq); disable_irq(dma->dma_irq);
iomd_writeb(ctrl & ~DMA_CR_E, dma_base + CR); iomd_writeb(0, dma_base + CR);
local_irq_restore(flags); local_irq_restore(flags);
} }
......
...@@ -17,7 +17,8 @@ obj-$(CONFIG_MCA) += mca.o ...@@ -17,7 +17,8 @@ obj-$(CONFIG_MCA) += mca.o
obj-$(CONFIG_X86_MSR) += msr.o obj-$(CONFIG_X86_MSR) += msr.o
obj-$(CONFIG_X86_CPUID) += cpuid.o obj-$(CONFIG_X86_CPUID) += cpuid.o
obj-$(CONFIG_MICROCODE) += microcode.o obj-$(CONFIG_MICROCODE) += microcode.o
obj-$(CONFIG_APM) += apm.o suspend.o obj-$(CONFIG_PM) += suspend.o
obj-$(CONFIG_APM) += apm.o
obj-$(CONFIG_X86_SMP) += smp.o smpboot.o obj-$(CONFIG_X86_SMP) += smp.o smpboot.o
obj-$(CONFIG_X86_TRAMPOLINE) += trampoline.o obj-$(CONFIG_X86_TRAMPOLINE) += trampoline.o
obj-$(CONFIG_X86_MPPARSE) += mpparse.o obj-$(CONFIG_X86_MPPARSE) += mpparse.o
......
...@@ -212,7 +212,6 @@ __asm__(".align 4\n" ...@@ -212,7 +212,6 @@ __asm__(".align 4\n"
*/ */
int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
{ {
struct task_struct *p;
struct pt_regs regs; struct pt_regs regs;
memset(&regs, 0, sizeof(regs)); memset(&regs, 0, sizeof(regs));
...@@ -228,8 +227,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) ...@@ -228,8 +227,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
regs.eflags = 0x286; regs.eflags = 0x286;
/* Ok, create the new process.. */ /* Ok, create the new process.. */
p = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL); return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
/* /*
...@@ -518,15 +516,11 @@ struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct ...@@ -518,15 +516,11 @@ struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct
asmlinkage int sys_fork(struct pt_regs regs) asmlinkage int sys_fork(struct pt_regs regs)
{ {
struct task_struct *p; return do_fork(SIGCHLD, regs.esp, &regs, 0, NULL, NULL);
p = do_fork(SIGCHLD, regs.esp, &regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
asmlinkage int sys_clone(struct pt_regs regs) asmlinkage int sys_clone(struct pt_regs regs)
{ {
struct task_struct *p;
unsigned long clone_flags; unsigned long clone_flags;
unsigned long newsp; unsigned long newsp;
int __user *parent_tidptr, *child_tidptr; int __user *parent_tidptr, *child_tidptr;
...@@ -537,8 +531,7 @@ asmlinkage int sys_clone(struct pt_regs regs) ...@@ -537,8 +531,7 @@ asmlinkage int sys_clone(struct pt_regs regs)
child_tidptr = (int __user *)regs.edi; child_tidptr = (int __user *)regs.edi;
if (!newsp) if (!newsp)
newsp = regs.esp; newsp = regs.esp;
p = do_fork(clone_flags & ~CLONE_IDLETASK, newsp, &regs, 0, parent_tidptr, child_tidptr); return do_fork(clone_flags & ~CLONE_IDLETASK, newsp, &regs, 0, parent_tidptr, child_tidptr);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
/* /*
...@@ -553,10 +546,7 @@ asmlinkage int sys_clone(struct pt_regs regs) ...@@ -553,10 +546,7 @@ asmlinkage int sys_clone(struct pt_regs regs)
*/ */
asmlinkage int sys_vfork(struct pt_regs regs) asmlinkage int sys_vfork(struct pt_regs regs)
{ {
struct task_struct *p; return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, &regs, 0, NULL, NULL);
p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, &regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
/* /*
......
...@@ -493,7 +493,7 @@ static struct task_struct * __init fork_by_hand(void) ...@@ -493,7 +493,7 @@ static struct task_struct * __init fork_by_hand(void)
* don't care about the eip and regs settings since * don't care about the eip and regs settings since
* we'll never reschedule the forked task. * we'll never reschedule the forked task.
*/ */
return do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL); return copy_process(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL);
} }
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
...@@ -793,6 +793,7 @@ static int __init do_boot_cpu(int apicid) ...@@ -793,6 +793,7 @@ static int __init do_boot_cpu(int apicid)
idle = fork_by_hand(); idle = fork_by_hand();
if (IS_ERR(idle)) if (IS_ERR(idle))
panic("failed fork for CPU %d", cpu); panic("failed fork for CPU %d", cpu);
wake_up_forked_process(idle);
/* /*
* We remove it from the pidhash and the runqueue * We remove it from the pidhash and the runqueue
...@@ -935,7 +936,7 @@ int cpu_sibling_map[NR_CPUS] __cacheline_aligned; ...@@ -935,7 +936,7 @@ int cpu_sibling_map[NR_CPUS] __cacheline_aligned;
static void __init smp_boot_cpus(unsigned int max_cpus) static void __init smp_boot_cpus(unsigned int max_cpus)
{ {
int apicid, cpu, bit; int apicid, cpu, bit, kicked;
/* /*
* Setup boot CPU information * Setup boot CPU information
...@@ -1018,7 +1019,8 @@ static void __init smp_boot_cpus(unsigned int max_cpus) ...@@ -1018,7 +1019,8 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
*/ */
Dprintk("CPU present map: %lx\n", phys_cpu_present_map); Dprintk("CPU present map: %lx\n", phys_cpu_present_map);
for (bit = 0; bit < NR_CPUS; bit++) { kicked = 1;
for (bit = 0; kicked < NR_CPUS && bit < BITS_PER_LONG; bit++) {
apicid = cpu_present_to_apicid(bit); apicid = cpu_present_to_apicid(bit);
/* /*
* Don't even attempt to start the boot CPU! * Don't even attempt to start the boot CPU!
...@@ -1034,6 +1036,8 @@ static void __init smp_boot_cpus(unsigned int max_cpus) ...@@ -1034,6 +1036,8 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
if (do_boot_cpu(apicid)) if (do_boot_cpu(apicid))
printk("CPU #%d not responding - cannot use it.\n", printk("CPU #%d not responding - cannot use it.\n",
apicid); apicid);
else
++kicked;
} }
/* /*
......
...@@ -130,3 +130,6 @@ static void fix_processor_context(void) ...@@ -130,3 +130,6 @@ static void fix_processor_context(void)
} }
} }
EXPORT_SYMBOL(save_processor_state);
EXPORT_SYMBOL(restore_processor_state);
...@@ -7,6 +7,12 @@ ...@@ -7,6 +7,12 @@
#include <asm/page.h> #include <asm/page.h>
.data .data
.align 4
.globl saved_context_eax, saved_context_ebx
.globl saved_context_ecx, saved_context_edx
.globl saved_context_esp, saved_context_ebp
.globl saved_context_esi, saved_context_edi
.globl saved_context_eflags
saved_context_eax: saved_context_eax:
.long 0 .long 0
saved_context_ebx: saved_context_ebx:
......
...@@ -247,7 +247,7 @@ static unsigned long smp_commenced_mask = 0; ...@@ -247,7 +247,7 @@ static unsigned long smp_commenced_mask = 0;
/* This is for the new dynamic CPU boot code */ /* This is for the new dynamic CPU boot code */
volatile unsigned long cpu_callin_map = 0; volatile unsigned long cpu_callin_map = 0;
unsigned long cpu_callout_map = 0; volatile unsigned long cpu_callout_map = 0;
/* The per processor IRQ masks (these are usually kept in sync) */ /* The per processor IRQ masks (these are usually kept in sync) */
static __u16 vic_irq_mask[NR_CPUS] __cacheline_aligned; static __u16 vic_irq_mask[NR_CPUS] __cacheline_aligned;
...@@ -531,7 +531,7 @@ fork_by_hand(void) ...@@ -531,7 +531,7 @@ fork_by_hand(void)
struct pt_regs regs; struct pt_regs regs;
/* don't care about the eip and regs settings since we'll /* don't care about the eip and regs settings since we'll
* never reschedule the forked task. */ * never reschedule the forked task. */
return do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL); return copy_process(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL);
} }
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/rtc.h> #include <linux/rtc.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/i2c-algo-bit.h> #include <linux/i2c-algo-bit.h>
#include <linux/fs.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -306,7 +307,7 @@ static struct i2c_adapter ioc_ops = { ...@@ -306,7 +307,7 @@ static struct i2c_adapter ioc_ops = {
.id = I2C_HW_B_IOC, .id = I2C_HW_B_IOC,
.algo_data = &ioc_data, .algo_data = &ioc_data,
.client_register = ioc_client_reg, .client_register = ioc_client_reg,
.client_unregister = ioc_client_unreg .client_unregister = ioc_client_unreg,
.dev = { .dev = {
.name = "IOC/IOMD", .name = "IOC/IOMD",
}, },
......
...@@ -34,7 +34,7 @@ static struct i2c_client_address_data addr_data = { ...@@ -34,7 +34,7 @@ static struct i2c_client_address_data addr_data = {
.force = ignore, .force = ignore,
}; };
#define DAT(x) ((unsigned int)(x->data)) #define DAT(x) ((unsigned int)(x->dev.driver_data))
static int static int
pcf8583_attach(struct i2c_adapter *adap, int addr, unsigned short flags, pcf8583_attach(struct i2c_adapter *adap, int addr, unsigned short flags,
...@@ -51,13 +51,13 @@ pcf8583_attach(struct i2c_adapter *adap, int addr, unsigned short flags, ...@@ -51,13 +51,13 @@ pcf8583_attach(struct i2c_adapter *adap, int addr, unsigned short flags,
if (!c) if (!c)
return -ENOMEM; return -ENOMEM;
strcpy(c->name, "PCF8583"); strcpy(c->dev.name, "PCF8583");
c->id = pcf8583_driver.id; c->id = pcf8583_driver.id;
c->flags = 0; c->flags = 0;
c->addr = addr; c->addr = addr;
c->adapter = adap; c->adapter = adap;
c->driver = &pcf8583_driver; c->driver = &pcf8583_driver;
c->data = NULL; c->dev.driver_data = NULL;
if (i2c_transfer(c->adapter, msgs, 2) == 2) if (i2c_transfer(c->adapter, msgs, 2) == 2)
DAT(c) = buf[0]; DAT(c) = buf[0];
......
...@@ -102,7 +102,7 @@ static int DAC960_ioctl(struct inode *inode, struct file *file, ...@@ -102,7 +102,7 @@ static int DAC960_ioctl(struct inode *inode, struct file *file,
int drive_nr = (int)disk->private_data; int drive_nr = (int)disk->private_data;
struct hd_geometry g, *loc = (struct hd_geometry *)arg; struct hd_geometry g, *loc = (struct hd_geometry *)arg;
if (file->f_flags & O_NONBLOCK) if (file && (file->f_flags & O_NONBLOCK))
return DAC960_UserIOCTL(inode, file, cmd, arg); return DAC960_UserIOCTL(inode, file, cmd, arg);
if (cmd != HDIO_GETGEO || !loc) if (cmd != HDIO_GETGEO || !loc)
......
...@@ -25,7 +25,7 @@ struct button_callback { ...@@ -25,7 +25,7 @@ struct button_callback {
/* Function prototypes: */ /* Function prototypes: */
static void button_sequence_finished (unsigned long parameters); static void button_sequence_finished (unsigned long parameters);
static void button_handler (int irq, void *dev_id, struct pt_regs *regs); static irqreturn_t button_handler (int irq, void *dev_id, struct pt_regs *regs);
static int button_read (struct file *filp, char *buffer, static int button_read (struct file *filp, char *buffer,
size_t count, loff_t *ppos); size_t count, loff_t *ppos);
int button_init (void); int button_init (void);
......
This diff is collapsed.
...@@ -20,8 +20,6 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id) ...@@ -20,8 +20,6 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
hw_regs_t hw; hw_regs_t hw;
int i, ret; int i, ret;
ecard_claim(ec);
memset(&hw, 0, sizeof(hw)); memset(&hw, 0, sizeof(hw));
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
...@@ -49,7 +47,6 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id) ...@@ -49,7 +47,6 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
static void __devexit rapide_remove(struct expansion_card *ec) static void __devexit rapide_remove(struct expansion_card *ec)
{ {
/* need to do more */ /* need to do more */
ecard_release(ec);
} }
static struct ecard_id rapide_ids[] = { static struct ecard_id rapide_ids[] = {
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
printk(KERN_ERR fmt, ## args) printk(KERN_ERR fmt, ## args)
static char version[] __devinitdata = static char version[] __devinitdata =
"$Rev: 918 $ Ben Collins <bcollins@debian.org>"; "$Rev: 931 $ Ben Collins <bcollins@debian.org>";
/* Our ieee1394 highlevel driver */ /* Our ieee1394 highlevel driver */
#define ETHER1394_DRIVER_NAME "ether1394" #define ETHER1394_DRIVER_NAME "ether1394"
......
...@@ -32,7 +32,6 @@ void hpsb_iso_shutdown(struct hpsb_iso *iso) ...@@ -32,7 +32,6 @@ void hpsb_iso_shutdown(struct hpsb_iso *iso)
} }
dma_region_free(&iso->data_buf); dma_region_free(&iso->data_buf);
kfree(iso->infos);
kfree(iso); kfree(iso);
} }
...@@ -70,14 +69,11 @@ static struct hpsb_iso* hpsb_iso_common_init(struct hpsb_host *host, enum hpsb_i ...@@ -70,14 +69,11 @@ static struct hpsb_iso* hpsb_iso_common_init(struct hpsb_host *host, enum hpsb_i
/* allocate and write the struct hpsb_iso */ /* allocate and write the struct hpsb_iso */
iso = kmalloc(sizeof(*iso), SLAB_KERNEL); iso = kmalloc(sizeof(*iso) + buf_packets * sizeof(struct hpsb_iso_packet_info), GFP_KERNEL);
if(!iso) if(!iso)
return NULL; return NULL;
/* allocate ringbuffer of packet descriptors */ iso->infos = (struct hpsb_iso_packet_info *)(iso + 1);
iso->infos = kmalloc(buf_packets * sizeof(struct hpsb_iso_packet_info), SLAB_KERNEL);
if(!iso->infos)
return NULL;
iso->type = type; iso->type = type;
iso->host = host; iso->host = host;
......
...@@ -79,9 +79,6 @@ struct hpsb_iso { ...@@ -79,9 +79,6 @@ struct hpsb_iso {
/* size of data_buf, in bytes (always a multiple of PAGE_SIZE) */ /* size of data_buf, in bytes (always a multiple of PAGE_SIZE) */
unsigned int buf_size; unsigned int buf_size;
/* ringbuffer of packet descriptors in regular kernel memory */
struct hpsb_iso_packet_info *infos;
/* # of packets in the ringbuffer */ /* # of packets in the ringbuffer */
unsigned int buf_packets; unsigned int buf_packets;
...@@ -118,6 +115,11 @@ struct hpsb_iso { ...@@ -118,6 +115,11 @@ struct hpsb_iso {
/* cycle at which next packet will be transmitted, /* cycle at which next packet will be transmitted,
-1 if not known */ -1 if not known */
int xmit_cycle; int xmit_cycle;
/* ringbuffer of packet descriptors in regular kernel memory
* XXX Keep this last, since we use over-allocated memory from
* this entry to fill this field. */
struct hpsb_iso_packet_info *infos;
}; };
/* functions available to high-level drivers (e.g. raw1394) */ /* functions available to high-level drivers (e.g. raw1394) */
......
...@@ -164,7 +164,7 @@ printk(level "%s: " fmt "\n" , OHCI1394_DRIVER_NAME , ## args) ...@@ -164,7 +164,7 @@ printk(level "%s: " fmt "\n" , OHCI1394_DRIVER_NAME , ## args)
printk(level "%s_%d: " fmt "\n" , OHCI1394_DRIVER_NAME, card , ## args) printk(level "%s_%d: " fmt "\n" , OHCI1394_DRIVER_NAME, card , ## args)
static char version[] __devinitdata = static char version[] __devinitdata =
"$Rev: 921 $ Ben Collins <bcollins@debian.org>"; "$Rev: 931 $ Ben Collins <bcollins@debian.org>";
/* Module Parameters */ /* Module Parameters */
static int phys_dma = 1; static int phys_dma = 1;
...@@ -2446,7 +2446,7 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id, ...@@ -2446,7 +2446,7 @@ static irqreturn_t ohci_irq_handler(int irq, void *dev_id,
reg_write(ohci,OHCI1394_PhyReqFilterLoSet, 0x00000000); reg_write(ohci,OHCI1394_PhyReqFilterLoSet, 0x00000000);
} }
DBGMSG(ohci->id, "PhyReqFilter=%08x%08x\n", DBGMSG(ohci->id, "PhyReqFilter=%08x%08x",
reg_read(ohci,OHCI1394_PhyReqFilterHiSet), reg_read(ohci,OHCI1394_PhyReqFilterHiSet),
reg_read(ohci,OHCI1394_PhyReqFilterLoSet)); reg_read(ohci,OHCI1394_PhyReqFilterLoSet));
...@@ -3165,7 +3165,7 @@ static void ohci_init_config_rom(struct ti_ohci *ohci) ...@@ -3165,7 +3165,7 @@ static void ohci_init_config_rom(struct ti_ohci *ohci)
struct config_rom_ptr cr; struct config_rom_ptr cr;
memset(&cr, 0, sizeof(cr)); memset(&cr, 0, sizeof(cr));
memset(ohci->csr_config_rom_cpu, 0, sizeof (ohci->csr_config_rom_cpu)); memset(ohci->csr_config_rom_cpu, 0, sizeof(*ohci->csr_config_rom_cpu));
cr.data = ohci->csr_config_rom_cpu; cr.data = ohci->csr_config_rom_cpu;
......
This diff is collapsed.
...@@ -384,7 +384,6 @@ struct scsi_id_instance_data { ...@@ -384,7 +384,6 @@ struct scsi_id_instance_data {
/* /*
* Values pulled from the device's unit directory * Values pulled from the device's unit directory
*/ */
struct unit_directory *ud;
u32 sbp2_command_set_spec_id; u32 sbp2_command_set_spec_id;
u32 sbp2_command_set; u32 sbp2_command_set;
u32 sbp2_unit_characteristics; u32 sbp2_unit_characteristics;
...@@ -403,6 +402,8 @@ struct scsi_id_instance_data { ...@@ -403,6 +402,8 @@ struct scsi_id_instance_data {
struct list_head sbp2_command_orb_inuse; struct list_head sbp2_command_orb_inuse;
struct list_head sbp2_command_orb_completed; struct list_head sbp2_command_orb_completed;
struct list_head list;
/* Node entry, as retrieved from NodeMgr entries */ /* Node entry, as retrieved from NodeMgr entries */
struct node_entry *ne; struct node_entry *ne;
...@@ -413,6 +414,13 @@ struct scsi_id_instance_data { ...@@ -413,6 +414,13 @@ struct scsi_id_instance_data {
u32 workarounds; u32 workarounds;
}; };
/* Describes a per-ud scsi_id group */
struct scsi_id_group {
struct list_head scsi_id_list;
};
/* /*
* Sbp2 host data structure (one per sbp2 host) * Sbp2 host data structure (one per sbp2 host)
*/ */
...@@ -464,8 +472,9 @@ static int sbp2_probe(struct device *dev); ...@@ -464,8 +472,9 @@ static int sbp2_probe(struct device *dev);
static int sbp2_remove(struct device *dev); static int sbp2_remove(struct device *dev);
static void sbp2_update(struct unit_directory *ud); static void sbp2_update(struct unit_directory *ud);
static int sbp2_start_device(struct sbp2scsi_host_info *hi, static int sbp2_start_ud(struct sbp2scsi_host_info *hi,
struct unit_directory *ud); struct unit_directory *ud);
static int sbp2_start_device(struct scsi_id_instance_data *scsi_id);
static void sbp2_remove_device(struct scsi_id_instance_data *scsi_id); static void sbp2_remove_device(struct scsi_id_instance_data *scsi_id);
#ifdef CONFIG_IEEE1394_SBP2_PHYS_DMA #ifdef CONFIG_IEEE1394_SBP2_PHYS_DMA
...@@ -499,7 +508,8 @@ static int sbp2_send_command(struct scsi_id_instance_data *scsi_id, ...@@ -499,7 +508,8 @@ static int sbp2_send_command(struct scsi_id_instance_data *scsi_id,
static unsigned int sbp2_status_to_sense_data(unchar *sbp2_status, unchar *sense_data); static unsigned int sbp2_status_to_sense_data(unchar *sbp2_status, unchar *sense_data);
static void sbp2_check_sbp2_command(struct scsi_id_instance_data *scsi_id, unchar *cmd); static void sbp2_check_sbp2_command(struct scsi_id_instance_data *scsi_id, unchar *cmd);
static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id, Scsi_Cmnd *SCpnt); static void sbp2_check_sbp2_response(struct scsi_id_instance_data *scsi_id, Scsi_Cmnd *SCpnt);
static void sbp2_parse_unit_directory(struct scsi_id_instance_data *scsi_id); static void sbp2_parse_unit_directory(struct scsi_id_group *scsi_group,
struct unit_directory *ud);
static int sbp2_set_busy_timeout(struct scsi_id_instance_data *scsi_id); static int sbp2_set_busy_timeout(struct scsi_id_instance_data *scsi_id);
static int sbp2_max_speed_and_size(struct scsi_id_instance_data *scsi_id); static int sbp2_max_speed_and_size(struct scsi_id_instance_data *scsi_id);
......
...@@ -347,7 +347,6 @@ static struct sa1111_driver ps2_driver = { ...@@ -347,7 +347,6 @@ static struct sa1111_driver ps2_driver = {
.drv = { .drv = {
.name = "sa1111-ps2", .name = "sa1111-ps2",
.bus = &sa1111_bus_type, .bus = &sa1111_bus_type,
.devclass = &input_devclass,
.probe = ps2_probe, .probe = ps2_probe,
.remove = ps2_remove, .remove = ps2_remove,
.suspend = ps2_suspend, .suspend = ps2_suspend,
......
...@@ -116,7 +116,7 @@ diva_strace_library_interface_t* DivaSTraceLibraryCreateInstance (int Adapter, ...@@ -116,7 +116,7 @@ diva_strace_library_interface_t* DivaSTraceLibraryCreateInstance (int Adapter,
} }
pmem += sizeof(*pLib); pmem += sizeof(*pLib);
memset (pLib, 0x00, sizeof(pLib)); memset(pLib, 0x00, sizeof(*pLib));
pLib->Adapter = Adapter; pLib->Adapter = Adapter;
......
...@@ -1115,7 +1115,6 @@ int __init dm_interface_init(void) ...@@ -1115,7 +1115,6 @@ int __init dm_interface_init(void)
DM_DRIVER_EMAIL); DM_DRIVER_EMAIL);
return 0; return 0;
failed:
if (misc_deregister(&_dm_misc) < 0) if (misc_deregister(&_dm_misc) < 0)
DMERR("misc_deregister failed for control device"); DMERR("misc_deregister failed for control device");
dm_hash_exit(); dm_hash_exit();
......
This diff is collapsed.
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
static char name_mute[] = "mute"; static char name_mute[] = "mute";
static char name_radio[] = "Radio"; static char name_radio[] = "Radio";
static char name_tv[] = "Television"; static char name_tv[] = "Television";
static char name_tv_mono[] = "TV (mono only)";
static char name_comp1[] = "Composite1"; static char name_comp1[] = "Composite1";
static char name_comp2[] = "Composite2"; static char name_comp2[] = "Composite2";
static char name_svideo[] = "S-Video"; static char name_svideo[] = "S-Video";
...@@ -61,6 +62,11 @@ struct saa7134_board saa7134_boards[] = { ...@@ -61,6 +62,11 @@ struct saa7134_board saa7134_boards[] = {
.vmux = 1, .vmux = 1,
.amux = TV, .amux = TV,
.tv = 1, .tv = 1,
},{
.name = name_tv_mono,
.vmux = 1,
.amux = LINE2,
.tv = 1,
}}, }},
}, },
[SAA7134_BOARD_FLYVIDEO3000] = { [SAA7134_BOARD_FLYVIDEO3000] = {
...@@ -68,27 +74,39 @@ struct saa7134_board saa7134_boards[] = { ...@@ -68,27 +74,39 @@ struct saa7134_board saa7134_boards[] = {
.name = "LifeView FlyVIDEO3000", .name = "LifeView FlyVIDEO3000",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_PAL, .tuner_type = TUNER_PHILIPS_PAL,
.gpiomask = 0xe000,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
.amux = TV, .amux = TV,
.gpio = 0x8000,
.tv = 1,
},{
.name = name_tv_mono,
.vmux = 1,
.amux = LINE2,
.gpio = 0x0000,
.tv = 1, .tv = 1,
},{ },{
.name = name_comp1, .name = name_comp1,
.vmux = 0, .vmux = 0,
.amux = LINE1, .amux = LINE2,
.gpio = 0x4000,
},{ },{
.name = name_comp2, .name = name_comp2,
.vmux = 3, .vmux = 3,
.amux = LINE1, .amux = LINE2,
.gpio = 0x4000,
},{ },{
.name = name_svideo, .name = name_svideo,
.vmux = 8, .vmux = 8,
.amux = LINE1, .amux = LINE2,
.gpio = 0x4000,
}}, }},
.radio = { .radio = {
.name = name_radio, .name = name_radio,
.amux = LINE2, .amux = LINE2,
.gpio = 0x2000,
}, },
}, },
[SAA7134_BOARD_FLYVIDEO2000] = { [SAA7134_BOARD_FLYVIDEO2000] = {
...@@ -96,7 +114,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -96,7 +114,7 @@ struct saa7134_board saa7134_boards[] = {
.name = "LifeView FlyVIDEO2000", .name = "LifeView FlyVIDEO2000",
.audio_clock = 0x00200000, .audio_clock = 0x00200000,
.tuner_type = TUNER_LG_PAL_NEW_TAPC, .tuner_type = TUNER_LG_PAL_NEW_TAPC,
.gpiomask = 0x6000, .gpiomask = 0xe000,
.inputs = {{ .inputs = {{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
...@@ -122,10 +140,12 @@ struct saa7134_board saa7134_boards[] = { ...@@ -122,10 +140,12 @@ struct saa7134_board saa7134_boards[] = {
.radio = { .radio = {
.name = name_radio, .name = name_radio,
.amux = LINE2, .amux = LINE2,
.gpio = 0x2000,
}, },
.mute = { .mute = {
.name = name_mute, .name = name_mute,
.amux = LINE1, .amux = LINE2,
.gpio = 0x8000,
}, },
}, },
[SAA7134_BOARD_EMPRESS] = { [SAA7134_BOARD_EMPRESS] = {
...@@ -190,7 +210,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -190,7 +210,7 @@ struct saa7134_board saa7134_boards[] = {
.tv = 1, .tv = 1,
},{ },{
/* workaround for problems with normal TV sound */ /* workaround for problems with normal TV sound */
.name = "TV (mono only)", .name = name_tv_mono,
.vmux = 1, .vmux = 1,
.amux = LINE2, .amux = LINE2,
.tv = 1, .tv = 1,
...@@ -269,6 +289,12 @@ struct saa7134_board saa7134_boards[] = { ...@@ -269,6 +289,12 @@ struct saa7134_board saa7134_boards[] = {
.vmux = 1, .vmux = 1,
.amux = TV, .amux = TV,
.tv = 1, .tv = 1,
},{
/* workaround for problems with normal TV sound */
.name = name_tv_mono,
.vmux = 1,
.amux = LINE2,
.tv = 1,
},{ },{
.name = name_comp1, .name = name_comp1,
.vmux = 0, .vmux = 0,
...@@ -302,7 +328,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -302,7 +328,7 @@ struct saa7134_board saa7134_boards[] = {
},{ },{
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
.amux = TV, .amux = LINE2,
.tv = 1, .tv = 1,
}}, }},
}, },
...@@ -332,7 +358,6 @@ struct saa7134_board saa7134_boards[] = { ...@@ -332,7 +358,6 @@ struct saa7134_board saa7134_boards[] = {
.name = name_radio, .name = name_radio,
.amux = LINE2, .amux = LINE2,
}, },
}, },
[SAA7134_BOARD_MD7134] = { [SAA7134_BOARD_MD7134] = {
.name = "Medion 7134", .name = "Medion 7134",
...@@ -343,7 +368,7 @@ struct saa7134_board saa7134_boards[] = { ...@@ -343,7 +368,7 @@ struct saa7134_board saa7134_boards[] = {
.name = name_tv, .name = name_tv,
.vmux = 1, .vmux = 1,
.amux = LINE2, .amux = LINE2,
.tv = 1, .tv = 1,
},{ },{
.name = name_comp1, .name = name_comp1,
.vmux = 0, .vmux = 0,
...@@ -361,9 +386,67 @@ struct saa7134_board saa7134_boards[] = { ...@@ -361,9 +386,67 @@ struct saa7134_board saa7134_boards[] = {
.name = name_radio, .name = name_radio,
.amux = LINE2, .amux = LINE2,
}, },
}, },
[SAA7134_BOARD_TYPHOON_90031] = {
.name = "Typhoon TV+Radio 90031",
.audio_clock = 0x00200000,
.tuner_type = TUNER_PHILIPS_PAL,
.inputs = {{
.name = name_tv,
.vmux = 1,
.amux = TV,
.tv = 1,
},{
.name = name_comp1,
.vmux = 3,
.amux = LINE1,
},{
.name = name_svideo,
.vmux = 8,
.amux = LINE1,
}},
.radio = {
.name = name_radio,
.amux = LINE2,
},
},
[SAA7134_BOARD_ELSA] = {
.name = "ELSA EX-VISION 300TV",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_HITACHI_NTSC,
.inputs = {{
.name = name_svideo,
.vmux = 8,
.amux = LINE1,
},{
.name = name_comp1,
.vmux = 0,
.amux = LINE1,
},{
.name = name_tv,
.vmux = 4,
.amux = LINE2,
.tv = 1,
}},
},
[SAA7134_BOARD_ELSA_500TV] = {
.name = "ELSA EX-VISION 500TV",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_HITACHI_NTSC,
.inputs = {{
.name = name_svideo,
.vmux = 7,
.amux = LINE1,
},{
.name = name_tv,
.vmux = 8,
.amux = TV,
.tv = 1,
}},
},
}; };
const int saa7134_bcount = (sizeof(saa7134_boards)/sizeof(struct saa7134_board)); const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
/* PCI ids + subsystem IDs */ /* PCI ids + subsystem IDs */
...@@ -375,6 +458,12 @@ struct pci_device_id __devinitdata saa7134_pci_tbl[] = { ...@@ -375,6 +458,12 @@ struct pci_device_id __devinitdata saa7134_pci_tbl[] = {
.subvendor = PCI_VENDOR_ID_PHILIPS, .subvendor = PCI_VENDOR_ID_PHILIPS,
.subdevice = 0x2001, .subdevice = 0x2001,
.driver_data = SAA7134_BOARD_PROTEUS_PRO, .driver_data = SAA7134_BOARD_PROTEUS_PRO,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = PCI_VENDOR_ID_PHILIPS,
.subdevice = 0x2001,
.driver_data = SAA7134_BOARD_PROTEUS_PRO,
},{ },{
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7134, .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
...@@ -405,6 +494,12 @@ struct pci_device_id __devinitdata saa7134_pci_tbl[] = { ...@@ -405,6 +494,12 @@ struct pci_device_id __devinitdata saa7134_pci_tbl[] = {
.subvendor = 0x5168, .subvendor = 0x5168,
.subdevice = 0x0138, .subdevice = 0x0138,
.driver_data = SAA7134_BOARD_FLYVIDEO3000, .driver_data = SAA7134_BOARD_FLYVIDEO3000,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7130,
.subvendor = 0x5168,
.subdevice = 0x0138,
.driver_data = SAA7134_BOARD_FLYVIDEO2000,
},{ },{
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7134, .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
...@@ -412,6 +507,18 @@ struct pci_device_id __devinitdata saa7134_pci_tbl[] = { ...@@ -412,6 +507,18 @@ struct pci_device_id __devinitdata saa7134_pci_tbl[] = {
.subdevice = 0x0003, .subdevice = 0x0003,
.driver_data = SAA7134_BOARD_MD7134, .driver_data = SAA7134_BOARD_MD7134,
},{ },{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7130,
.subvendor = 0x1048,
.subdevice = 0x226b,
.driver_data = SAA7134_BOARD_ELSA,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7130,
.subvendor = 0x1048,
.subdevice = 0x226b,
.driver_data = SAA7134_BOARD_ELSA_500TV,
},{
/* --- boards without eeprom + subsystem ID --- */ /* --- boards without eeprom + subsystem ID --- */
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
...@@ -433,18 +540,91 @@ struct pci_device_id __devinitdata saa7134_pci_tbl[] = { ...@@ -433,18 +540,91 @@ struct pci_device_id __devinitdata saa7134_pci_tbl[] = {
.subvendor = PCI_ANY_ID, .subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID, .subdevice = PCI_ANY_ID,
.driver_data = SAA7134_BOARD_UNKNOWN, .driver_data = SAA7134_BOARD_UNKNOWN,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = SAA7134_BOARD_UNKNOWN,
},{ },{
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7134, .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
.subvendor = PCI_ANY_ID, .subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID, .subdevice = PCI_ANY_ID,
.driver_data = SAA7134_BOARD_UNKNOWN, .driver_data = SAA7134_BOARD_UNKNOWN,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7135,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = SAA7134_BOARD_UNKNOWN,
},{ },{
/* --- end of list --- */ /* --- end of list --- */
} }
}; };
MODULE_DEVICE_TABLE(pci, saa7134_pci_tbl); MODULE_DEVICE_TABLE(pci, saa7134_pci_tbl);
/* ----------------------------------------------------------- */
/* flyvideo tweaks */
#if 0
static struct {
char *model;
int tuner_type;
} fly_list[0x20] = {
/* default catch ... */
[ 0 ... 0x1f ] = {
.model = "UNKNOWN",
.tuner_type = TUNER_ABSENT,
},
/* ... the ones known so far */
[ 0x05 ] = {
.model = "PAL-BG",
.tuner_type = TUNER_LG_PAL_NEW_TAPC,
},
[ 0x10 ] = {
.model = "PAL-BG / PAL-DK",
.tuner_type = TUNER_PHILIPS_PAL,
},
[ 0x15 ] = {
.model = "NTSC",
.tuner_type = TUNER_ABSENT /* FIXME */,
},
};
#endif
static void board_flyvideo(struct saa7134_dev *dev)
{
u32 value;
int index;
saa_writel(SAA7134_GPIO_GPMODE0 >> 2, 0);
value = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2);
#if 0
index = (value & 0x1f00) >> 8;
printk(KERN_INFO "%s: flyvideo: gpio is 0x%x [model=%s,tuner=%d]\n",
dev->name, value, fly_list[index].model,
fly_list[index].tuner_type);
dev->tuner_type = fly_list[index].tuner_type;
#else
printk(KERN_INFO "%s: flyvideo: gpio is 0x%x\n",
dev->name, value);
#endif
}
/* ----------------------------------------------------------- */
int saa7134_board_init(struct saa7134_dev *dev)
{
switch (dev->board) {
case SAA7134_BOARD_FLYVIDEO2000:
case SAA7134_BOARD_FLYVIDEO3000:
board_flyvideo(dev);
break;
}
return 0;
}
/* ----------------------------------------------------------- */ /* ----------------------------------------------------------- */
/* /*
* Local variables: * Local variables:
......
This diff is collapsed.
...@@ -153,10 +153,7 @@ static int i2c_is_busy_wait(struct saa7134_dev *dev) ...@@ -153,10 +153,7 @@ static int i2c_is_busy_wait(struct saa7134_dev *dev)
status = i2c_get_status(dev); status = i2c_get_status(dev);
if (!i2c_is_busy(status)) if (!i2c_is_busy(status))
break; break;
if (need_resched()) saa_wait(I2C_WAIT_DELAY);
schedule();
else
udelay(I2C_WAIT_DELAY);
} }
if (I2C_WAIT_RETRY == count) if (I2C_WAIT_RETRY == count)
return FALSE; return FALSE;
...@@ -318,7 +315,7 @@ static u32 functionality(struct i2c_adapter *adap) ...@@ -318,7 +315,7 @@ static u32 functionality(struct i2c_adapter *adap)
static int attach_inform(struct i2c_client *client) static int attach_inform(struct i2c_client *client)
{ {
struct saa7134_dev *dev = client->adapter->algo_data; struct saa7134_dev *dev = client->adapter->algo_data;
int tuner = card(dev).tuner_type; int tuner = dev->tuner_type;
saa7134_i2c_call_clients(dev,TUNER_SET_TYPE,&tuner); saa7134_i2c_call_clients(dev,TUNER_SET_TYPE,&tuner);
return 0; return 0;
...@@ -334,9 +331,9 @@ static struct i2c_algorithm saa7134_algo = { ...@@ -334,9 +331,9 @@ static struct i2c_algorithm saa7134_algo = {
static struct i2c_adapter saa7134_adap_template = { static struct i2c_adapter saa7134_adap_template = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.class = I2C_ADAP_CLASS_TV_ANALOG,
I2C_DEVNAME("saa7134"), I2C_DEVNAME("saa7134"),
.id = I2C_ALGO_SAA7134, .id = I2C_ALGO_SAA7134,
.class = I2C_ADAP_CLASS_TV_ANALOG,
.algo = &saa7134_algo, .algo = &saa7134_algo,
.client_register = attach_inform, .client_register = attach_inform,
}; };
......
...@@ -94,8 +94,9 @@ static int dsp_buffer_free(struct saa7134_dev *dev) ...@@ -94,8 +94,9 @@ static int dsp_buffer_free(struct saa7134_dev *dev)
static int dsp_rec_start(struct saa7134_dev *dev) static int dsp_rec_start(struct saa7134_dev *dev)
{ {
int err, fmt, bswap, wswap; int err, bswap, sign;
unsigned long control,flags; u32 fmt, control;
unsigned long flags;
/* prepare buffer */ /* prepare buffer */
if (0 != (err = videobuf_dma_pci_map(dev->pci,&dev->oss.dma))) if (0 != (err = videobuf_dma_pci_map(dev->pci,&dev->oss.dma)))
...@@ -110,45 +111,60 @@ static int dsp_rec_start(struct saa7134_dev *dev) ...@@ -110,45 +111,60 @@ static int dsp_rec_start(struct saa7134_dev *dev)
/* sample format */ /* sample format */
switch (dev->oss.afmt) { switch (dev->oss.afmt) {
case AFMT_U8: fmt = 0x00; break; case AFMT_U8:
case AFMT_S8: fmt = 0x00 | 0x04; break; case AFMT_S8: fmt = 0x00; break;
case AFMT_U16_LE: case AFMT_U16_LE:
case AFMT_U16_BE: fmt = 0x01; break; case AFMT_U16_BE:
case AFMT_S16_LE: case AFMT_S16_LE:
case AFMT_S16_BE: fmt = 0x01 | 0x04; break; case AFMT_S16_BE: fmt = 0x01; break;
/* 4front API specs mention these ones,
the (2.4.15) kernel header hasn't them ... */
#ifdef AFMT_S32_LE
case AFMT_S32_LE:
case AFMT_S32_BE: fmt = 0x02 | 0x04; break;
#endif
default: default:
err = -EINVAL; err = -EINVAL;
goto fail2; goto fail2;
} }
switch (dev->oss.afmt) {
case AFMT_S8:
case AFMT_S16_LE:
case AFMT_S16_BE: sign = 1; break;
default: sign = 0; break;
}
switch (dev->oss.afmt) { switch (dev->oss.afmt) {
case AFMT_U16_BE: case AFMT_U16_BE:
case AFMT_S16_BE: bswap = 1; wswap = 0; break; case AFMT_S16_BE: bswap = 1; break;
#ifdef AFMT_S32_LE default: bswap = 0; break;
case AFMT_S32_BE: bswap = 1; wswap = 1; break;
#endif
default: bswap = 0; wswap = 0; break;
} }
if (1 == dev->oss.channels) switch (dev->pci->device) {
fmt |= (1 << 3); case PCI_DEVICE_ID_PHILIPS_SAA7134:
if (2 == dev->oss.channels) if (1 == dev->oss.channels)
fmt |= (3 << 3); fmt |= (1 << 3);
fmt |= (TV == dev->oss.input) ? 0xc0 : 0x80; if (2 == dev->oss.channels)
fmt |= (3 << 3);
saa_writeb(SAA7134_NUM_SAMPLES0, (dev->oss.blksize & 0x0000ff)); if (sign)
saa_writeb(SAA7134_NUM_SAMPLES1, (dev->oss.blksize & 0x00ff00) >> 8); fmt |= 0x04;
saa_writeb(SAA7134_NUM_SAMPLES2, (dev->oss.blksize & 0xff0000) >> 16); fmt |= (TV == dev->oss.input) ? 0xc0 : 0x80;
saa_writeb(SAA7134_AUDIO_FORMAT_CTRL, fmt);
dprintk("rec_start: afmt=%d ch=%d => fmt=0x%x swap=%c%c\n", saa_writeb(SAA7134_NUM_SAMPLES0, (dev->oss.blksize & 0x0000ff));
saa_writeb(SAA7134_NUM_SAMPLES1, (dev->oss.blksize & 0x00ff00) >> 8);
saa_writeb(SAA7134_NUM_SAMPLES2, (dev->oss.blksize & 0xff0000) >> 16);
saa_writeb(SAA7134_AUDIO_FORMAT_CTRL, fmt);
break;
case PCI_DEVICE_ID_PHILIPS_SAA7133:
case PCI_DEVICE_ID_PHILIPS_SAA7135:
if (1 == dev->oss.channels)
fmt |= (1 << 4);
if (2 == dev->oss.channels)
fmt |= (2 << 4);
if (!sign)
fmt |= 0x04;
saa_writel(0x588 >> 2, dev->oss.blksize);
saa_writel(0x58c >> 2, 0x543210 | (fmt << 24));
break;
}
dprintk("rec_start: afmt=%d ch=%d => fmt=0x%x swap=%c\n",
dev->oss.afmt, dev->oss.channels, fmt, dev->oss.afmt, dev->oss.channels, fmt,
bswap ? 'b' : '-', wswap ? 'w' : '-'); bswap ? 'b' : '-');
/* dma: setup channel 6 (= AUDIO) */ /* dma: setup channel 6 (= AUDIO) */
control = SAA7134_RS_CONTROL_BURST_16 | control = SAA7134_RS_CONTROL_BURST_16 |
...@@ -156,8 +172,6 @@ static int dsp_rec_start(struct saa7134_dev *dev) ...@@ -156,8 +172,6 @@ static int dsp_rec_start(struct saa7134_dev *dev)
(dev->oss.pt.dma >> 12); (dev->oss.pt.dma >> 12);
if (bswap) if (bswap)
control |= SAA7134_RS_CONTROL_BSWAP; control |= SAA7134_RS_CONTROL_BSWAP;
if (wswap)
control |= SAA7134_RS_CONTROL_WSWAP;
saa_writel(SAA7134_RS_BA1(6),0); saa_writel(SAA7134_RS_BA1(6),0);
saa_writel(SAA7134_RS_BA2(6),dev->oss.blksize); saa_writel(SAA7134_RS_BA2(6),dev->oss.blksize);
saa_writel(SAA7134_RS_PITCH(6),0); saa_writel(SAA7134_RS_PITCH(6),0);
...@@ -201,7 +215,7 @@ static int dsp_rec_stop(struct saa7134_dev *dev) ...@@ -201,7 +215,7 @@ static int dsp_rec_stop(struct saa7134_dev *dev)
static int dsp_open(struct inode *inode, struct file *file) static int dsp_open(struct inode *inode, struct file *file)
{ {
unsigned int minor = minor(inode->i_rdev); int minor = minor(inode->i_rdev);
struct saa7134_dev *h,*dev = NULL; struct saa7134_dev *h,*dev = NULL;
struct list_head *list; struct list_head *list;
int err; int err;
...@@ -259,7 +273,8 @@ static ssize_t dsp_read(struct file *file, char *buffer, ...@@ -259,7 +273,8 @@ static ssize_t dsp_read(struct file *file, char *buffer,
{ {
struct saa7134_dev *dev = file->private_data; struct saa7134_dev *dev = file->private_data;
DECLARE_WAITQUEUE(wait, current); DECLARE_WAITQUEUE(wait, current);
int bytes,err,ret = 0; unsigned int bytes;
int err,ret = 0;
add_wait_queue(&dev->oss.wq, &wait); add_wait_queue(&dev->oss.wq, &wait);
down(&dev->oss.lock); down(&dev->oss.lock);
...@@ -390,10 +405,6 @@ static int dsp_ioctl(struct inode *inode, struct file *file, ...@@ -390,10 +405,6 @@ static int dsp_ioctl(struct inode *inode, struct file *file,
case AFMT_U16_BE: case AFMT_U16_BE:
case AFMT_S16_LE: case AFMT_S16_LE:
case AFMT_S16_BE: case AFMT_S16_BE:
#ifdef AFMT_S32_LE
case AFMT_S32_LE:
case AFMT_S32_BE:
#endif
down(&dev->oss.lock); down(&dev->oss.lock);
dev->oss.afmt = val; dev->oss.afmt = val;
if (dev->oss.recording) { if (dev->oss.recording) {
...@@ -416,11 +427,6 @@ static int dsp_ioctl(struct inode *inode, struct file *file, ...@@ -416,11 +427,6 @@ static int dsp_ioctl(struct inode *inode, struct file *file,
case AFMT_S16_LE: case AFMT_S16_LE:
case AFMT_S16_BE: case AFMT_S16_BE:
return put_user(16, (int*)arg); return put_user(16, (int*)arg);
#ifdef AFMT_S32_LE
case AFMT_S32_LE:
case AFMT_S32_BE:
return put_user(20, (int*)arg);
#endif
default: default:
return -EINVAL; return -EINVAL;
} }
...@@ -499,14 +505,10 @@ struct file_operations saa7134_dsp_fops = { ...@@ -499,14 +505,10 @@ struct file_operations saa7134_dsp_fops = {
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
static int static int
mixer_recsrc(struct saa7134_dev *dev, enum saa7134_audio_in src) mixer_recsrc_7134(struct saa7134_dev *dev)
{ {
static const char *iname[] = { "Oops", "TV", "LINE1", "LINE2" };
int analog_io,rate; int analog_io,rate;
dev->oss.count++;
dev->oss.input = src;
dprintk("mixer input = %s\n",iname[dev->oss.input]);
switch (dev->oss.input) { switch (dev->oss.input) {
case TV: case TV:
saa_andorb(SAA7134_AUDIO_FORMAT_CTRL, 0xc0, 0xc0); saa_andorb(SAA7134_AUDIO_FORMAT_CTRL, 0xc0, 0xc0);
...@@ -525,27 +527,78 @@ mixer_recsrc(struct saa7134_dev *dev, enum saa7134_audio_in src) ...@@ -525,27 +527,78 @@ mixer_recsrc(struct saa7134_dev *dev, enum saa7134_audio_in src)
} }
static int static int
mixer_level(struct saa7134_dev *dev, enum saa7134_audio_in src, int level) mixer_recsrc_7133(struct saa7134_dev *dev)
{ {
switch (src) { u32 value = 0xbbbbbb;
switch (dev->oss.input) {
case TV: case TV:
/* nothing */ value = 0xbbbb10; /* MAIN */
break; break;
case LINE1: case LINE1:
saa_andorb(SAA7134_ANALOG_IO_SELECT, 0x10, value = 0xbbbb32; /* AUX1 */
(100 == level) ? 0x00 : 0x10);
break; break;
case LINE2: case LINE2:
saa_andorb(SAA7134_ANALOG_IO_SELECT, 0x20, value = 0xbbbb54; /* AUX2 */
(100 == level) ? 0x00 : 0x20);
break; break;
} }
saa_dsp_writel(dev, 0x46c >> 2, value);
return 0; return 0;
} }
static int
mixer_recsrc(struct saa7134_dev *dev, enum saa7134_audio_in src)
{
static const char *iname[] = { "Oops", "TV", "LINE1", "LINE2" };
dev->oss.count++;
dev->oss.input = src;
dprintk("mixer input = %s\n",iname[dev->oss.input]);
switch (dev->pci->device) {
case PCI_DEVICE_ID_PHILIPS_SAA7134:
mixer_recsrc_7134(dev);
break;
case PCI_DEVICE_ID_PHILIPS_SAA7133:
case PCI_DEVICE_ID_PHILIPS_SAA7135:
mixer_recsrc_7133(dev);
break;
}
return 0;
}
static int
mixer_level(struct saa7134_dev *dev, enum saa7134_audio_in src, int level)
{
switch (dev->pci->device) {
case PCI_DEVICE_ID_PHILIPS_SAA7134:
switch (src) {
case TV:
/* nothing */
break;
case LINE1:
saa_andorb(SAA7134_ANALOG_IO_SELECT, 0x10,
(100 == level) ? 0x00 : 0x10);
break;
case LINE2:
saa_andorb(SAA7134_ANALOG_IO_SELECT, 0x20,
(100 == level) ? 0x00 : 0x20);
break;
}
break;
case PCI_DEVICE_ID_PHILIPS_SAA7133:
case PCI_DEVICE_ID_PHILIPS_SAA7135:
/* nothing */
break;
}
return 0;
}
/* ------------------------------------------------------------------ */
static int mixer_open(struct inode *inode, struct file *file) static int mixer_open(struct inode *inode, struct file *file)
{ {
unsigned int minor = minor(inode->i_rdev); int minor = minor(inode->i_rdev);
struct saa7134_dev *h,*dev = NULL; struct saa7134_dev *h,*dev = NULL;
struct list_head *list; struct list_head *list;
...@@ -681,13 +734,20 @@ struct file_operations saa7134_mixer_fops = { ...@@ -681,13 +734,20 @@ struct file_operations saa7134_mixer_fops = {
int saa7134_oss_init(struct saa7134_dev *dev) int saa7134_oss_init(struct saa7134_dev *dev)
{ {
/* general */
init_MUTEX(&dev->oss.lock); init_MUTEX(&dev->oss.lock);
init_waitqueue_head(&dev->oss.wq); init_waitqueue_head(&dev->oss.wq);
dev->oss.line1 = 50;
dev->oss.line2 = 50; switch (dev->pci->device) {
mixer_level(dev,LINE1,dev->oss.line1); case PCI_DEVICE_ID_PHILIPS_SAA7133:
mixer_level(dev,LINE2,dev->oss.line2); case PCI_DEVICE_ID_PHILIPS_SAA7135:
saa_writel(0x588 >> 2, 0x00000fff);
saa_writel(0x58c >> 2, 0x00543210);
saa_dsp_writel(dev, 0x46c >> 2, 0xbbbbbb);
break;
}
/* dsp */
dev->oss.rate = 32000; dev->oss.rate = 32000;
if (oss_rate) if (oss_rate)
dev->oss.rate = oss_rate; dev->oss.rate = oss_rate;
...@@ -695,7 +755,13 @@ int saa7134_oss_init(struct saa7134_dev *dev) ...@@ -695,7 +755,13 @@ int saa7134_oss_init(struct saa7134_dev *dev)
dev->oss.rate = saa7134_boards[dev->board].i2s_rate; dev->oss.rate = saa7134_boards[dev->board].i2s_rate;
dev->oss.rate = (dev->oss.rate > 40000) ? 48000 : 32000; dev->oss.rate = (dev->oss.rate > 40000) ? 48000 : 32000;
/* mixer */
dev->oss.line1 = 50;
dev->oss.line2 = 50;
mixer_level(dev,LINE1,dev->oss.line1);
mixer_level(dev,LINE2,dev->oss.line2);
mixer_recsrc(dev, (dev->oss.rate == 32000) ? TV : LINE2); mixer_recsrc(dev, (dev->oss.rate == 32000) ? TV : LINE2);
return 0; return 0;
} }
...@@ -710,7 +776,7 @@ void saa7134_irq_oss_done(struct saa7134_dev *dev, unsigned long status) ...@@ -710,7 +776,7 @@ void saa7134_irq_oss_done(struct saa7134_dev *dev, unsigned long status)
int next_blk, reg = 0; int next_blk, reg = 0;
spin_lock(&dev->slock); spin_lock(&dev->slock);
if (-1 == dev->oss.dma_blk) { if (UNSET == dev->oss.dma_blk) {
dprintk("irq: recording stopped%s\n",""); dprintk("irq: recording stopped%s\n","");
goto done; goto done;
} }
......
...@@ -9,9 +9,15 @@ ...@@ -9,9 +9,15 @@
#ifndef PCI_DEVICE_ID_PHILIPS_SAA7130 #ifndef PCI_DEVICE_ID_PHILIPS_SAA7130
# define PCI_DEVICE_ID_PHILIPS_SAA7130 0x7130 # define PCI_DEVICE_ID_PHILIPS_SAA7130 0x7130
#endif #endif
#ifndef PCI_DEVICE_ID_PHILIPS_SAA7133
# define PCI_DEVICE_ID_PHILIPS_SAA7133 0x7133
#endif
#ifndef PCI_DEVICE_ID_PHILIPS_SAA7134 #ifndef PCI_DEVICE_ID_PHILIPS_SAA7134
# define PCI_DEVICE_ID_PHILIPS_SAA7134 0x7134 # define PCI_DEVICE_ID_PHILIPS_SAA7134 0x7134
#endif #endif
#ifndef PCI_DEVICE_ID_PHILIPS_SAA7135
# define PCI_DEVICE_ID_PHILIPS_SAA7135 0x7135
#endif
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
/* /*
...@@ -329,6 +335,13 @@ ...@@ -329,6 +335,13 @@
/* test modes */ /* test modes */
#define SAA7134_SPECIAL_MODE 0x1d0 #define SAA7134_SPECIAL_MODE 0x1d0
/* audio -- saa7133 + saa7135 only */
#define SAA7135_DSP_RWSTATE 0x580
#define SAA7135_DSP_RWSTATE_ERR (1 << 3)
#define SAA7135_DSP_RWSTATE_IDA (1 << 2)
#define SAA7135_DSP_RWSTATE_RDB (1 << 1)
#define SAA7135_DSP_RWSTATE_WRR (1 << 0)
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
/* /*
* Local variables: * Local variables:
......
...@@ -52,8 +52,9 @@ static int buffer_activate(struct saa7134_dev *dev, ...@@ -52,8 +52,9 @@ static int buffer_activate(struct saa7134_dev *dev,
{ {
u32 control; u32 control;
dprintk("buffer_activate [%p]\n",buf); dprintk("buffer_activate [%p]",buf);
buf->vb.state = STATE_ACTIVE; buf->vb.state = STATE_ACTIVE;
buf->top_seen = 0;
/* dma: setup channel 5 (= TS) */ /* dma: setup channel 5 (= TS) */
control = SAA7134_RS_CONTROL_BURST_16 | control = SAA7134_RS_CONTROL_BURST_16 |
...@@ -63,11 +64,11 @@ static int buffer_activate(struct saa7134_dev *dev, ...@@ -63,11 +64,11 @@ static int buffer_activate(struct saa7134_dev *dev,
if (NULL == next) if (NULL == next)
next = buf; next = buf;
if (V4L2_FIELD_TOP == buf->vb.field) { if (V4L2_FIELD_TOP == buf->vb.field) {
dprintk("[top] buf=%p next=%p",buf,next); dprintk("- [top] buf=%p next=%p\n",buf,next);
saa_writel(SAA7134_RS_BA1(5),saa7134_buffer_base(buf)); saa_writel(SAA7134_RS_BA1(5),saa7134_buffer_base(buf));
saa_writel(SAA7134_RS_BA2(5),saa7134_buffer_base(next)); saa_writel(SAA7134_RS_BA2(5),saa7134_buffer_base(next));
} else { } else {
dprintk("[bottom] buf=%p next=%p",buf,next); dprintk("- [bottom] buf=%p next=%p\n",buf,next);
saa_writel(SAA7134_RS_BA1(5),saa7134_buffer_base(next)); saa_writel(SAA7134_RS_BA1(5),saa7134_buffer_base(next));
saa_writel(SAA7134_RS_BA2(5),saa7134_buffer_base(buf)); saa_writel(SAA7134_RS_BA2(5),saa7134_buffer_base(buf));
} }
...@@ -86,8 +87,11 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb, ...@@ -86,8 +87,11 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,
{ {
struct saa7134_dev *dev = file->private_data; struct saa7134_dev *dev = file->private_data;
struct saa7134_buf *buf = (struct saa7134_buf *)vb; struct saa7134_buf *buf = (struct saa7134_buf *)vb;
int lines, llength, size, err; unsigned int lines, llength, size;
int err;
dprintk("buffer_prepare [%p,%s]\n",buf,v4l2_field_names[field]);
llength = TS_PACKET_SIZE; llength = TS_PACKET_SIZE;
lines = TS_NR_PACKETS; lines = TS_NR_PACKETS;
...@@ -116,7 +120,6 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb, ...@@ -116,7 +120,6 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,
goto oops; goto oops;
} }
buf->vb.state = STATE_PREPARED; buf->vb.state = STATE_PREPARED;
buf->top_seen = 0;
buf->activate = buffer_activate; buf->activate = buffer_activate;
buf->vb.field = field; buf->vb.field = field;
return 0; return 0;
...@@ -163,7 +166,7 @@ static struct videobuf_queue_ops ts_qops = { ...@@ -163,7 +166,7 @@ static struct videobuf_queue_ops ts_qops = {
static int ts_open(struct inode *inode, struct file *file) static int ts_open(struct inode *inode, struct file *file)
{ {
unsigned int minor = minor(inode->i_rdev); int minor = minor(inode->i_rdev);
struct saa7134_dev *h,*dev = NULL; struct saa7134_dev *h,*dev = NULL;
struct list_head *list; struct list_head *list;
int err; int err;
...@@ -414,6 +417,7 @@ int saa7134_ts_init(struct saa7134_dev *dev) ...@@ -414,6 +417,7 @@ int saa7134_ts_init(struct saa7134_dev *dev)
dev->ts_q.timeout.function = saa7134_buffer_timeout; dev->ts_q.timeout.function = saa7134_buffer_timeout;
dev->ts_q.timeout.data = (unsigned long)(&dev->ts_q); dev->ts_q.timeout.data = (unsigned long)(&dev->ts_q);
dev->ts_q.dev = dev; dev->ts_q.dev = dev;
dev->ts_q.need_two = 1;
videobuf_queue_init(&dev->ts.ts, &ts_qops, dev->pci, &dev->slock, videobuf_queue_init(&dev->ts.ts, &ts_qops, dev->pci, &dev->slock,
V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_BUF_TYPE_VIDEO_CAPTURE,
V4L2_FIELD_ALTERNATE, V4L2_FIELD_ALTERNATE,
...@@ -445,7 +449,7 @@ void saa7134_irq_ts_done(struct saa7134_dev *dev, unsigned long status) ...@@ -445,7 +449,7 @@ void saa7134_irq_ts_done(struct saa7134_dev *dev, unsigned long status)
spin_lock(&dev->slock); spin_lock(&dev->slock);
if (dev->ts_q.curr) { if (dev->ts_q.curr) {
field = dev->video_q.curr->vb.field; field = dev->ts_q.curr->vb.field;
if (field == V4L2_FIELD_TOP) { if (field == V4L2_FIELD_TOP) {
if ((status & 0x100000) != 0x100000) if ((status & 0x100000) != 0x100000)
goto done; goto done;
......
...@@ -85,6 +85,7 @@ static int buffer_activate(struct saa7134_dev *dev, ...@@ -85,6 +85,7 @@ static int buffer_activate(struct saa7134_dev *dev,
dprintk("buffer_activate [%p]\n",buf); dprintk("buffer_activate [%p]\n",buf);
buf->vb.state = STATE_ACTIVE; buf->vb.state = STATE_ACTIVE;
buf->top_seen = 0;
task_init(dev,buf,TASK_A); task_init(dev,buf,TASK_A);
task_init(dev,buf,TASK_B); task_init(dev,buf,TASK_B);
...@@ -119,7 +120,8 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb, ...@@ -119,7 +120,8 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,
struct saa7134_dev *dev = fh->dev; struct saa7134_dev *dev = fh->dev;
struct saa7134_buf *buf = (struct saa7134_buf *)vb; struct saa7134_buf *buf = (struct saa7134_buf *)vb;
struct saa7134_tvnorm *norm = dev->tvnorm; struct saa7134_tvnorm *norm = dev->tvnorm;
int lines, llength, size, err; unsigned int lines, llength, size;
int err;
lines = norm->vbi_v_stop - norm->vbi_v_start +1; lines = norm->vbi_v_stop - norm->vbi_v_start +1;
if (lines > VBI_LINE_COUNT) if (lines > VBI_LINE_COUNT)
...@@ -155,7 +157,6 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb, ...@@ -155,7 +157,6 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,
goto oops; goto oops;
} }
buf->vb.state = STATE_PREPARED; buf->vb.state = STATE_PREPARED;
buf->top_seen = 0;
buf->activate = buffer_activate; buf->activate = buffer_activate;
buf->vb.field = field; buf->vb.field = field;
return 0; return 0;
...@@ -166,7 +167,7 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb, ...@@ -166,7 +167,7 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,
} }
static int static int
buffer_setup(struct file *file, int *count, int *size) buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
{ {
struct saa7134_fh *fh = file->private_data; struct saa7134_fh *fh = file->private_data;
struct saa7134_dev *dev = fh->dev; struct saa7134_dev *dev = fh->dev;
...@@ -241,7 +242,7 @@ void saa7134_irq_vbi_done(struct saa7134_dev *dev, unsigned long status) ...@@ -241,7 +242,7 @@ void saa7134_irq_vbi_done(struct saa7134_dev *dev, unsigned long status)
if (dev->vbi_q.curr) { if (dev->vbi_q.curr) {
dev->vbi_fieldcount++; dev->vbi_fieldcount++;
/* make sure we have seen both fields */ /* make sure we have seen both fields */
if ((status & 0x10) == 0x10) { if ((status & 0x10) == 0x00) {
dev->vbi_q.curr->top_seen = 1; dev->vbi_q.curr->top_seen = 1;
goto done; goto done;
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -330,8 +330,6 @@ static int tda7432_attach(struct i2c_adapter *adap, int addr, int kind) ...@@ -330,8 +330,6 @@ static int tda7432_attach(struct i2c_adapter *adap, int addr, int kind)
i2c_set_clientdata(client, t); i2c_set_clientdata(client, t);
do_tda7432_init(client); do_tda7432_init(client);
MOD_INC_USE_COUNT;
strncpy(client->dev.name, "TDA7432", DEVICE_NAME_SIZE);
printk(KERN_INFO "tda7432: init\n"); printk(KERN_INFO "tda7432: init\n");
i2c_attach_client(client); i2c_attach_client(client);
...@@ -347,13 +345,12 @@ static int tda7432_probe(struct i2c_adapter *adap) ...@@ -347,13 +345,12 @@ static int tda7432_probe(struct i2c_adapter *adap)
static int tda7432_detach(struct i2c_client *client) static int tda7432_detach(struct i2c_client *client)
{ {
struct tda7432 *t = i2c_get_clientdata(client); struct tda7432 *t = i2c_get_clientdata(client);
do_tda7432_init(client); do_tda7432_init(client);
i2c_detach_client(client); i2c_detach_client(client);
kfree(t); kfree(t);
MOD_DEC_USE_COUNT;
return 0; return 0;
} }
...@@ -525,11 +522,9 @@ static struct i2c_driver driver = { ...@@ -525,11 +522,9 @@ static struct i2c_driver driver = {
static struct i2c_client client_template = static struct i2c_client client_template =
{ {
.id = -1, I2C_DEVNAME("tda7432"),
.driver = &driver, .id = -1,
.dev = { .driver = &driver,
.name = "tda7432",
},
}; };
static int tda7432_init(void) static int tda7432_init(void)
......
...@@ -161,7 +161,8 @@ static void tda9875_set(struct i2c_client *client) ...@@ -161,7 +161,8 @@ static void tda9875_set(struct i2c_client *client)
struct tda9875 *tda = i2c_get_clientdata(client); struct tda9875 *tda = i2c_get_clientdata(client);
unsigned char a; unsigned char a;
dprintk(KERN_DEBUG "tda9875_set(%04x,%04x,%04x,%04x)\n",tda->lvol,tda->rvol,tda->bass,tda->treble); dprintk(KERN_DEBUG "tda9875_set(%04x,%04x,%04x,%04x)\n",
tda->lvol,tda->rvol,tda->bass,tda->treble);
a = tda->lvol & 0xff; a = tda->lvol & 0xff;
...@@ -263,8 +264,6 @@ static int tda9875_attach(struct i2c_adapter *adap, int addr, int kind) ...@@ -263,8 +264,6 @@ static int tda9875_attach(struct i2c_adapter *adap, int addr, int kind)
} }
do_tda9875_init(client); do_tda9875_init(client);
MOD_INC_USE_COUNT;
strncpy(client->dev.name, "TDA9875", DEVICE_NAME_SIZE);
printk(KERN_INFO "tda9875: init\n"); printk(KERN_INFO "tda9875: init\n");
i2c_attach_client(client); i2c_attach_client(client);
...@@ -280,13 +279,12 @@ static int tda9875_probe(struct i2c_adapter *adap) ...@@ -280,13 +279,12 @@ static int tda9875_probe(struct i2c_adapter *adap)
static int tda9875_detach(struct i2c_client *client) static int tda9875_detach(struct i2c_client *client)
{ {
struct tda9875 *t = i2c_get_clientdata(client); struct tda9875 *t = i2c_get_clientdata(client);
do_tda9875_init(client); do_tda9875_init(client);
i2c_detach_client(client); i2c_detach_client(client);
kfree(t); kfree(t);
MOD_DEC_USE_COUNT;
return 0; return 0;
} }
...@@ -395,11 +393,9 @@ static struct i2c_driver driver = { ...@@ -395,11 +393,9 @@ static struct i2c_driver driver = {
static struct i2c_client client_template = static struct i2c_client client_template =
{ {
.id = -1, I2C_DEVNAME("tda9875"),
.driver = &driver, .id = -1,
.dev = { .driver = &driver,
.name = "tda9875",
},
}; };
static int tda9875_init(void) static int tda9875_init(void)
......
...@@ -293,8 +293,6 @@ static int tda9887_configure(struct tda9887 *t) ...@@ -293,8 +293,6 @@ static int tda9887_configure(struct tda9887 *t)
unsigned char *buf = NULL; unsigned char *buf = NULL;
int rc; int rc;
printk("tda9887_configure\n");
if (t->radio) { if (t->radio) {
dprintk("tda9885/6/7: FM Radio mode\n"); dprintk("tda9885/6/7: FM Radio mode\n");
buf = buf_fm_stereo; buf = buf_fm_stereo;
...@@ -358,11 +356,11 @@ static int tda9887_attach(struct i2c_adapter *adap, int addr, int kind) ...@@ -358,11 +356,11 @@ static int tda9887_attach(struct i2c_adapter *adap, int addr, int kind)
return -ENOMEM; return -ENOMEM;
memset(t,0,sizeof(*t)); memset(t,0,sizeof(*t));
t->client = client_template; t->client = client_template;
i2c_set_clientdata(&t->client, t);
t->pinnacle_id = -1; t->pinnacle_id = -1;
t->tvnorm=VIDEO_MODE_PAL;
i2c_set_clientdata(&t->client, t);
i2c_attach_client(&t->client); i2c_attach_client(&t->client);
MOD_INC_USE_COUNT;
return 0; return 0;
} }
...@@ -379,7 +377,6 @@ static int tda9887_detach(struct i2c_client *client) ...@@ -379,7 +377,6 @@ static int tda9887_detach(struct i2c_client *client)
i2c_detach_client(client); i2c_detach_client(client);
kfree(t); kfree(t);
MOD_DEC_USE_COUNT;
return 0; return 0;
} }
...@@ -404,6 +401,7 @@ tda9887_command(struct i2c_client *client, unsigned int cmd, void *arg) ...@@ -404,6 +401,7 @@ tda9887_command(struct i2c_client *client, unsigned int cmd, void *arg)
int *i = arg; int *i = arg;
t->pinnacle_id = *i; t->pinnacle_id = *i;
tda9887_miro(t);
break; break;
} }
/* --- v4l ioctls --- */ /* --- v4l ioctls --- */
......
This diff is collapsed.
This diff is collapsed.
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
#define I2C_TDA8425 0x82 #define I2C_TDA8425 0x82
#define I2C_TDA9840 0x84 #define I2C_TDA9840 0x84 /* also used by TA8874Z */
#define I2C_TDA985x_L 0xb4 /* also used by 9873 */ #define I2C_TDA985x_L 0xb4 /* also used by 9873 */
#define I2C_TDA985x_H 0xb6 #define I2C_TDA985x_H 0xb6
#define I2C_TDA9874 0xb0 /* also used by 9875 */ #define I2C_TDA9874 0xb0 /* also used by 9875 */
......
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.
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include "../../net/8390.h" #include "../8390.h"
#define NET_DEBUG 0 #define NET_DEBUG 0
#define DEBUG_INIT 2 #define DEBUG_INIT 2
......
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