diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-03 17:58:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-03 17:58:08 -0400 |
commit | 1a3f2ea336b784d7df750a7821f514f3dea69e29 (patch) | |
tree | b7c2f5c7cc841d9f7b38fbdf03219b80dba97ea2 | |
parent | e1d7e7fcf8625857de6b48975096c127e5cb1534 (diff) | |
parent | 6ba60d2195cd65d72eaf7ce3903a707c5bf20c7b (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC]: Fix O_CLOEXEC values.
[SPARC32]: Fix modular build of floppy driver.
[SOUND] CS4231 SBus: Two fixes.
[CG6]: fix memory size detection
[SPARC64]: Add missing dma_sync_single_range_for_*().
-rw-r--r-- | arch/sparc/kernel/entry.S | 7 | ||||
-rw-r--r-- | arch/sparc/kernel/irq.c | 84 | ||||
-rw-r--r-- | arch/sparc/kernel/sparc_ksyms.c | 1 | ||||
-rw-r--r-- | drivers/video/cg6.c | 5 | ||||
-rw-r--r-- | include/asm-sparc/fcntl.h | 2 | ||||
-rw-r--r-- | include/asm-sparc/floppy.h | 20 | ||||
-rw-r--r-- | include/asm-sparc/irq.h | 7 | ||||
-rw-r--r-- | include/asm-sparc64/dma-mapping.h | 19 | ||||
-rw-r--r-- | include/asm-sparc64/fcntl.h | 2 | ||||
-rw-r--r-- | sound/sparc/cs4231.c | 42 |
10 files changed, 105 insertions, 84 deletions
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index eac38388f5fd..88d2cefd01be 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S | |||
@@ -1,7 +1,6 @@ | |||
1 | /* $Id: entry.S,v 1.170 2001/11/13 00:57:05 davem Exp $ | 1 | /* arch/sparc/kernel/entry.S: Sparc trap low-level entry points. |
2 | * arch/sparc/kernel/entry.S: Sparc trap low-level entry points. | ||
3 | * | 2 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net) |
5 | * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) |
6 | * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) | 5 | * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) |
7 | * Copyright (C) 1996-1999 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 6 | * Copyright (C) 1996-1999 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
@@ -129,7 +128,7 @@ trap_low: | |||
129 | RESTORE_ALL | 128 | RESTORE_ALL |
130 | #endif | 129 | #endif |
131 | 130 | ||
132 | #ifdef CONFIG_BLK_DEV_FD | 131 | #if defined(CONFIG_BLK_DEV_FD) || defined(CONFIG_BLK_DEV_FD_MODULE) |
133 | .text | 132 | .text |
134 | .align 4 | 133 | .align 4 |
135 | .globl floppy_hardint | 134 | .globl floppy_hardint |
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c index 75b2240ad0f9..b76dc03fc318 100644 --- a/arch/sparc/kernel/irq.c +++ b/arch/sparc/kernel/irq.c | |||
@@ -351,34 +351,14 @@ void handler_irq(int irq, struct pt_regs * regs) | |||
351 | set_irq_regs(old_regs); | 351 | set_irq_regs(old_regs); |
352 | } | 352 | } |
353 | 353 | ||
354 | #ifdef CONFIG_BLK_DEV_FD | 354 | #if defined(CONFIG_BLK_DEV_FD) || defined(CONFIG_BLK_DEV_FD_MODULE) |
355 | extern void floppy_interrupt(int irq, void *dev_id); | ||
356 | |||
357 | void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs) | ||
358 | { | ||
359 | struct pt_regs *old_regs; | ||
360 | int cpu = smp_processor_id(); | ||
361 | |||
362 | old_regs = set_irq_regs(regs); | ||
363 | disable_pil_irq(irq); | ||
364 | irq_enter(); | ||
365 | kstat_cpu(cpu).irqs[irq]++; | ||
366 | floppy_interrupt(irq, dev_id); | ||
367 | irq_exit(); | ||
368 | enable_pil_irq(irq); | ||
369 | set_irq_regs(old_regs); | ||
370 | // XXX Eek, it's totally changed with preempt_count() and such | ||
371 | // if (softirq_pending(cpu)) | ||
372 | // do_softirq(); | ||
373 | } | ||
374 | #endif | ||
375 | 355 | ||
376 | /* Fast IRQs on the Sparc can only have one routine attached to them, | 356 | /* Fast IRQs on the Sparc can only have one routine attached to them, |
377 | * thus no sharing possible. | 357 | * thus no sharing possible. |
378 | */ | 358 | */ |
379 | int request_fast_irq(unsigned int irq, | 359 | static int request_fast_irq(unsigned int irq, |
380 | irq_handler_t handler, | 360 | void (*handler)(void), |
381 | unsigned long irqflags, const char *devname) | 361 | unsigned long irqflags, const char *devname) |
382 | { | 362 | { |
383 | struct irqaction *action; | 363 | struct irqaction *action; |
384 | unsigned long flags; | 364 | unsigned long flags; |
@@ -457,7 +437,6 @@ int request_fast_irq(unsigned int irq, | |||
457 | */ | 437 | */ |
458 | flush_cache_all(); | 438 | flush_cache_all(); |
459 | 439 | ||
460 | action->handler = handler; | ||
461 | action->flags = irqflags; | 440 | action->flags = irqflags; |
462 | cpus_clear(action->mask); | 441 | cpus_clear(action->mask); |
463 | action->name = devname; | 442 | action->name = devname; |
@@ -475,6 +454,61 @@ out: | |||
475 | return ret; | 454 | return ret; |
476 | } | 455 | } |
477 | 456 | ||
457 | /* These variables are used to access state from the assembler | ||
458 | * interrupt handler, floppy_hardint, so we cannot put these in | ||
459 | * the floppy driver image because that would not work in the | ||
460 | * modular case. | ||
461 | */ | ||
462 | volatile unsigned char *fdc_status; | ||
463 | EXPORT_SYMBOL(fdc_status); | ||
464 | |||
465 | char *pdma_vaddr; | ||
466 | EXPORT_SYMBOL(pdma_vaddr); | ||
467 | |||
468 | unsigned long pdma_size; | ||
469 | EXPORT_SYMBOL(pdma_size); | ||
470 | |||
471 | volatile int doing_pdma; | ||
472 | EXPORT_SYMBOL(doing_pdma); | ||
473 | |||
474 | char *pdma_base; | ||
475 | EXPORT_SYMBOL(pdma_base); | ||
476 | |||
477 | unsigned long pdma_areasize; | ||
478 | EXPORT_SYMBOL(pdma_areasize); | ||
479 | |||
480 | extern void floppy_hardint(void); | ||
481 | |||
482 | static irqreturn_t (*floppy_irq_handler)(int irq, void *dev_id); | ||
483 | |||
484 | void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs) | ||
485 | { | ||
486 | struct pt_regs *old_regs; | ||
487 | int cpu = smp_processor_id(); | ||
488 | |||
489 | old_regs = set_irq_regs(regs); | ||
490 | disable_pil_irq(irq); | ||
491 | irq_enter(); | ||
492 | kstat_cpu(cpu).irqs[irq]++; | ||
493 | floppy_irq_handler(irq, dev_id); | ||
494 | irq_exit(); | ||
495 | enable_pil_irq(irq); | ||
496 | set_irq_regs(old_regs); | ||
497 | // XXX Eek, it's totally changed with preempt_count() and such | ||
498 | // if (softirq_pending(cpu)) | ||
499 | // do_softirq(); | ||
500 | } | ||
501 | |||
502 | int sparc_floppy_request_irq(int irq, unsigned long flags, | ||
503 | irqreturn_t (*irq_handler)(int irq, void *)) | ||
504 | { | ||
505 | floppy_irq_handler = irq_handler; | ||
506 | return request_fast_irq(irq, floppy_hardint, flags, "floppy"); | ||
507 | } | ||
508 | EXPORT_SYMBOL(sparc_floppy_request_irq); | ||
509 | |||
510 | #endif | ||
511 | |||
478 | int request_irq(unsigned int irq, | 512 | int request_irq(unsigned int irq, |
479 | irq_handler_t handler, | 513 | irq_handler_t handler, |
480 | unsigned long irqflags, const char * devname, void *dev_id) | 514 | unsigned long irqflags, const char * devname, void *dev_id) |
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c index 7b4abde43028..ef647acc479e 100644 --- a/arch/sparc/kernel/sparc_ksyms.c +++ b/arch/sparc/kernel/sparc_ksyms.c | |||
@@ -143,7 +143,6 @@ EXPORT_SYMBOL(mstk48t02_regs); | |||
143 | EXPORT_SYMBOL(set_auxio); | 143 | EXPORT_SYMBOL(set_auxio); |
144 | EXPORT_SYMBOL(get_auxio); | 144 | EXPORT_SYMBOL(get_auxio); |
145 | #endif | 145 | #endif |
146 | EXPORT_SYMBOL(request_fast_irq); | ||
147 | EXPORT_SYMBOL(io_remap_pfn_range); | 146 | EXPORT_SYMBOL(io_remap_pfn_range); |
148 | /* P3: iounit_xxx may be needed, sun4d users */ | 147 | /* P3: iounit_xxx may be needed, sun4d users */ |
149 | /* EXPORT_SYMBOL(iounit_map_dma_init); */ | 148 | /* EXPORT_SYMBOL(iounit_map_dma_init); */ |
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c index 87c747123538..ee9046db9c7d 100644 --- a/drivers/video/cg6.c +++ b/drivers/video/cg6.c | |||
@@ -677,6 +677,7 @@ static int __devinit cg6_probe(struct of_device *op, const struct of_device_id * | |||
677 | struct fb_info *info; | 677 | struct fb_info *info; |
678 | struct cg6_par *par; | 678 | struct cg6_par *par; |
679 | int linebytes, err; | 679 | int linebytes, err; |
680 | int dblbuf; | ||
680 | 681 | ||
681 | info = framebuffer_alloc(sizeof(struct cg6_par), &op->dev); | 682 | info = framebuffer_alloc(sizeof(struct cg6_par), &op->dev); |
682 | 683 | ||
@@ -698,7 +699,9 @@ static int __devinit cg6_probe(struct of_device *op, const struct of_device_id * | |||
698 | linebytes = of_getintprop_default(dp, "linebytes", | 699 | linebytes = of_getintprop_default(dp, "linebytes", |
699 | info->var.xres); | 700 | info->var.xres); |
700 | par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); | 701 | par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); |
701 | if (of_find_property(dp, "dblbuf", NULL)) | 702 | |
703 | dblbuf = of_getintprop_default(dp, "dblbuf", 0); | ||
704 | if (dblbuf) | ||
702 | par->fbsize *= 4; | 705 | par->fbsize *= 4; |
703 | 706 | ||
704 | par->fbc = of_ioremap(&op->resource[0], CG6_FBC_OFFSET, | 707 | par->fbc = of_ioremap(&op->resource[0], CG6_FBC_OFFSET, |
diff --git a/include/asm-sparc/fcntl.h b/include/asm-sparc/fcntl.h index 5db60b5ae7b0..7bbdfc77accd 100644 --- a/include/asm-sparc/fcntl.h +++ b/include/asm-sparc/fcntl.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #define O_LARGEFILE 0x40000 | 16 | #define O_LARGEFILE 0x40000 |
17 | #define O_DIRECT 0x100000 /* direct disk access hint */ | 17 | #define O_DIRECT 0x100000 /* direct disk access hint */ |
18 | #define O_NOATIME 0x200000 | 18 | #define O_NOATIME 0x200000 |
19 | #define O_CLOEXEC 0x400000 | ||
19 | 20 | ||
20 | #define F_GETOWN 5 /* for sockets. */ | 21 | #define F_GETOWN 5 /* for sockets. */ |
21 | #define F_SETOWN 6 /* for sockets. */ | 22 | #define F_SETOWN 6 /* for sockets. */ |
@@ -31,6 +32,5 @@ | |||
31 | #define __ARCH_FLOCK_PAD short __unused; | 32 | #define __ARCH_FLOCK_PAD short __unused; |
32 | #define __ARCH_FLOCK64_PAD short __unused; | 33 | #define __ARCH_FLOCK64_PAD short __unused; |
33 | 34 | ||
34 | #include <asm-generic/fcntl.h> | ||
35 | 35 | ||
36 | #endif | 36 | #endif |
diff --git a/include/asm-sparc/floppy.h b/include/asm-sparc/floppy.h index 28ce2b9c3da8..acd06d8ff70a 100644 --- a/include/asm-sparc/floppy.h +++ b/include/asm-sparc/floppy.h | |||
@@ -48,7 +48,7 @@ struct sun_flpy_controller { | |||
48 | 48 | ||
49 | /* You'll only ever find one controller on a SparcStation anyways. */ | 49 | /* You'll only ever find one controller on a SparcStation anyways. */ |
50 | static struct sun_flpy_controller *sun_fdc = NULL; | 50 | static struct sun_flpy_controller *sun_fdc = NULL; |
51 | volatile unsigned char *fdc_status; | 51 | extern volatile unsigned char *fdc_status; |
52 | 52 | ||
53 | struct sun_floppy_ops { | 53 | struct sun_floppy_ops { |
54 | unsigned char (*fd_inb)(int port); | 54 | unsigned char (*fd_inb)(int port); |
@@ -225,13 +225,13 @@ static void sun_82077_fd_outb(unsigned char value, int port) | |||
225 | * underruns. If non-zero, doing_pdma encodes the direction of | 225 | * underruns. If non-zero, doing_pdma encodes the direction of |
226 | * the transfer for debugging. 1=read 2=write | 226 | * the transfer for debugging. 1=read 2=write |
227 | */ | 227 | */ |
228 | char *pdma_vaddr; | 228 | extern char *pdma_vaddr; |
229 | unsigned long pdma_size; | 229 | extern unsigned long pdma_size; |
230 | volatile int doing_pdma = 0; | 230 | extern volatile int doing_pdma; |
231 | 231 | ||
232 | /* This is software state */ | 232 | /* This is software state */ |
233 | char *pdma_base = NULL; | 233 | extern char *pdma_base; |
234 | unsigned long pdma_areasize; | 234 | extern unsigned long pdma_areasize; |
235 | 235 | ||
236 | /* Common routines to all controller types on the Sparc. */ | 236 | /* Common routines to all controller types on the Sparc. */ |
237 | static __inline__ void virtual_dma_init(void) | 237 | static __inline__ void virtual_dma_init(void) |
@@ -281,7 +281,8 @@ static __inline__ void sun_fd_enable_dma(void) | |||
281 | } | 281 | } |
282 | 282 | ||
283 | /* Our low-level entry point in arch/sparc/kernel/entry.S */ | 283 | /* Our low-level entry point in arch/sparc/kernel/entry.S */ |
284 | irqreturn_t floppy_hardint(int irq, void *unused); | 284 | extern int sparc_floppy_request_irq(int irq, unsigned long flags, |
285 | irqreturn_t (*irq_handler)(int irq, void *)); | ||
285 | 286 | ||
286 | static int sun_fd_request_irq(void) | 287 | static int sun_fd_request_irq(void) |
287 | { | 288 | { |
@@ -290,8 +291,9 @@ static int sun_fd_request_irq(void) | |||
290 | 291 | ||
291 | if(!once) { | 292 | if(!once) { |
292 | once = 1; | 293 | once = 1; |
293 | error = request_fast_irq(FLOPPY_IRQ, floppy_hardint, | 294 | error = sparc_floppy_request_irq(FLOPPY_IRQ, |
294 | IRQF_DISABLED, "floppy"); | 295 | IRQF_DISABLED, |
296 | floppy_interrupt); | ||
295 | return ((error == 0) ? 0 : -1); | 297 | return ((error == 0) ? 0 : -1); |
296 | } else return 0; | 298 | } else return 0; |
297 | } | 299 | } |
diff --git a/include/asm-sparc/irq.h b/include/asm-sparc/irq.h index 61fb99643afd..fe205cc444b8 100644 --- a/include/asm-sparc/irq.h +++ b/include/asm-sparc/irq.h | |||
@@ -1,7 +1,6 @@ | |||
1 | /* $Id: irq.h,v 1.32 2000/08/26 02:42:28 anton Exp $ | 1 | /* irq.h: IRQ registers on the Sparc. |
2 | * irq.h: IRQ registers on the Sparc. | ||
3 | * | 2 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net) |
5 | */ | 4 | */ |
6 | 5 | ||
7 | #ifndef _SPARC_IRQ_H | 6 | #ifndef _SPARC_IRQ_H |
@@ -13,6 +12,4 @@ | |||
13 | 12 | ||
14 | #define irq_canonicalize(irq) (irq) | 13 | #define irq_canonicalize(irq) (irq) |
15 | 14 | ||
16 | extern int request_fast_irq(unsigned int irq, irq_handler_t handler, unsigned long flags, __const__ char *devname); | ||
17 | |||
18 | #endif | 15 | #endif |
diff --git a/include/asm-sparc64/dma-mapping.h b/include/asm-sparc64/dma-mapping.h index a72a5f271f31..1fc655452b81 100644 --- a/include/asm-sparc64/dma-mapping.h +++ b/include/asm-sparc64/dma-mapping.h | |||
@@ -108,6 +108,25 @@ static inline void dma_sync_single_for_device(struct device *dev, | |||
108 | dma_ops->sync_single_for_device(dev, dma_handle, size, direction); | 108 | dma_ops->sync_single_for_device(dev, dma_handle, size, direction); |
109 | } | 109 | } |
110 | 110 | ||
111 | static inline void dma_sync_single_range_for_cpu(struct device *dev, | ||
112 | dma_addr_t dma_handle, | ||
113 | unsigned long offset, | ||
114 | size_t size, | ||
115 | enum dma_data_direction direction) | ||
116 | { | ||
117 | dma_sync_single_for_cpu(dev, dma_handle+offset, size, direction); | ||
118 | } | ||
119 | |||
120 | static inline void dma_sync_single_range_for_device(struct device *dev, | ||
121 | dma_addr_t dma_handle, | ||
122 | unsigned long offset, | ||
123 | size_t size, | ||
124 | enum dma_data_direction direction) | ||
125 | { | ||
126 | dma_sync_single_for_device(dev, dma_handle+offset, size, direction); | ||
127 | } | ||
128 | |||
129 | |||
111 | static inline void dma_sync_sg_for_cpu(struct device *dev, | 130 | static inline void dma_sync_sg_for_cpu(struct device *dev, |
112 | struct scatterlist *sg, int nelems, | 131 | struct scatterlist *sg, int nelems, |
113 | enum dma_data_direction direction) | 132 | enum dma_data_direction direction) |
diff --git a/include/asm-sparc64/fcntl.h b/include/asm-sparc64/fcntl.h index b2aecf0054bd..111f6b3b8925 100644 --- a/include/asm-sparc64/fcntl.h +++ b/include/asm-sparc64/fcntl.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #define O_LARGEFILE 0x40000 | 16 | #define O_LARGEFILE 0x40000 |
17 | #define O_DIRECT 0x100000 /* direct disk access hint */ | 17 | #define O_DIRECT 0x100000 /* direct disk access hint */ |
18 | #define O_NOATIME 0x200000 | 18 | #define O_NOATIME 0x200000 |
19 | 19 | #define O_CLOEXEC 0x400000 | |
20 | 20 | ||
21 | #define F_GETOWN 5 /* for sockets. */ | 21 | #define F_GETOWN 5 /* for sockets. */ |
22 | #define F_SETOWN 6 /* for sockets. */ | 22 | #define F_SETOWN 6 /* for sockets. */ |
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index dca0344cc1bc..f2950cab74a6 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c | |||
@@ -74,7 +74,6 @@ struct cs4231_dma_control { | |||
74 | void (*enable)(struct cs4231_dma_control *dma_cont, int on); | 74 | void (*enable)(struct cs4231_dma_control *dma_cont, int on); |
75 | int (*request)(struct cs4231_dma_control *dma_cont, dma_addr_t bus_addr, size_t len); | 75 | int (*request)(struct cs4231_dma_control *dma_cont, dma_addr_t bus_addr, size_t len); |
76 | unsigned int (*address)(struct cs4231_dma_control *dma_cont); | 76 | unsigned int (*address)(struct cs4231_dma_control *dma_cont); |
77 | void (*reset)(struct snd_cs4231 *chip); | ||
78 | void (*preallocate)(struct snd_cs4231 *chip, struct snd_pcm *pcm); | 77 | void (*preallocate)(struct snd_cs4231 *chip, struct snd_pcm *pcm); |
79 | #ifdef EBUS_SUPPORT | 78 | #ifdef EBUS_SUPPORT |
80 | struct ebus_dma_info ebus_info; | 79 | struct ebus_dma_info ebus_info; |
@@ -1214,10 +1213,6 @@ static int __init snd_cs4231_probe(struct snd_cs4231 *chip) | |||
1214 | 1213 | ||
1215 | spin_lock_irqsave(&chip->lock, flags); | 1214 | spin_lock_irqsave(&chip->lock, flags); |
1216 | 1215 | ||
1217 | |||
1218 | /* Reset DMA engine (sbus only). */ | ||
1219 | chip->p_dma.reset(chip); | ||
1220 | |||
1221 | __cs4231_readb(chip, CS4231P(chip, STATUS)); /* clear any pendings IRQ */ | 1216 | __cs4231_readb(chip, CS4231P(chip, STATUS)); /* clear any pendings IRQ */ |
1222 | __cs4231_writeb(chip, 0, CS4231P(chip, STATUS)); | 1217 | __cs4231_writeb(chip, 0, CS4231P(chip, STATUS)); |
1223 | mb(); | 1218 | mb(); |
@@ -1861,14 +1856,13 @@ static void sbus_dma_enable(struct cs4231_dma_control *dma_cont, int on) | |||
1861 | if (!on) { | 1856 | if (!on) { |
1862 | sbus_writel(0, base->regs + base->dir + APCNC); | 1857 | sbus_writel(0, base->regs + base->dir + APCNC); |
1863 | sbus_writel(0, base->regs + base->dir + APCNVA); | 1858 | sbus_writel(0, base->regs + base->dir + APCNVA); |
1864 | sbus_writel(0, base->regs + base->dir + APCC); | 1859 | if ( base->dir == APC_PLAY ) { |
1865 | sbus_writel(0, base->regs + base->dir + APCVA); | 1860 | sbus_writel(0, base->regs + base->dir + APCC); |
1861 | sbus_writel(0, base->regs + base->dir + APCVA); | ||
1862 | } | ||
1866 | 1863 | ||
1867 | /* ACK any APC interrupts. */ | 1864 | udelay(1200); |
1868 | csr = sbus_readl(base->regs + APCCSR); | ||
1869 | sbus_writel(csr, base->regs + APCCSR); | ||
1870 | } | 1865 | } |
1871 | udelay(1000); | ||
1872 | csr = sbus_readl(base->regs + APCCSR); | 1866 | csr = sbus_readl(base->regs + APCCSR); |
1873 | shift = 0; | 1867 | shift = 0; |
1874 | if ( base->dir == APC_PLAY ) | 1868 | if ( base->dir == APC_PLAY ) |
@@ -1894,23 +1888,6 @@ static unsigned int sbus_dma_addr(struct cs4231_dma_control *dma_cont) | |||
1894 | return sbus_readl(base->regs + base->dir + APCVA); | 1888 | return sbus_readl(base->regs + base->dir + APCVA); |
1895 | } | 1889 | } |
1896 | 1890 | ||
1897 | static void sbus_dma_reset(struct snd_cs4231 *chip) | ||
1898 | { | ||
1899 | sbus_writel(APC_CHIP_RESET, chip->port + APCCSR); | ||
1900 | sbus_writel(0x00, chip->port + APCCSR); | ||
1901 | sbus_writel(sbus_readl(chip->port + APCCSR) | APC_CDC_RESET, | ||
1902 | chip->port + APCCSR); | ||
1903 | |||
1904 | udelay(20); | ||
1905 | |||
1906 | sbus_writel(sbus_readl(chip->port + APCCSR) & ~APC_CDC_RESET, | ||
1907 | chip->port + APCCSR); | ||
1908 | sbus_writel(sbus_readl(chip->port + APCCSR) | (APC_XINT_ENA | | ||
1909 | APC_XINT_PENA | | ||
1910 | APC_XINT_CENA), | ||
1911 | chip->port + APCCSR); | ||
1912 | } | ||
1913 | |||
1914 | static void sbus_dma_preallocate(struct snd_cs4231 *chip, struct snd_pcm *pcm) | 1891 | static void sbus_dma_preallocate(struct snd_cs4231 *chip, struct snd_pcm *pcm) |
1915 | { | 1892 | { |
1916 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_SBUS, | 1893 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_SBUS, |
@@ -1986,14 +1963,12 @@ static int __init snd_cs4231_sbus_create(struct snd_card *card, | |||
1986 | chip->p_dma.enable = sbus_dma_enable; | 1963 | chip->p_dma.enable = sbus_dma_enable; |
1987 | chip->p_dma.request = sbus_dma_request; | 1964 | chip->p_dma.request = sbus_dma_request; |
1988 | chip->p_dma.address = sbus_dma_addr; | 1965 | chip->p_dma.address = sbus_dma_addr; |
1989 | chip->p_dma.reset = sbus_dma_reset; | ||
1990 | chip->p_dma.preallocate = sbus_dma_preallocate; | 1966 | chip->p_dma.preallocate = sbus_dma_preallocate; |
1991 | 1967 | ||
1992 | chip->c_dma.prepare = sbus_dma_prepare; | 1968 | chip->c_dma.prepare = sbus_dma_prepare; |
1993 | chip->c_dma.enable = sbus_dma_enable; | 1969 | chip->c_dma.enable = sbus_dma_enable; |
1994 | chip->c_dma.request = sbus_dma_request; | 1970 | chip->c_dma.request = sbus_dma_request; |
1995 | chip->c_dma.address = sbus_dma_addr; | 1971 | chip->c_dma.address = sbus_dma_addr; |
1996 | chip->c_dma.reset = sbus_dma_reset; | ||
1997 | chip->c_dma.preallocate = sbus_dma_preallocate; | 1972 | chip->c_dma.preallocate = sbus_dma_preallocate; |
1998 | 1973 | ||
1999 | if (request_irq(sdev->irqs[0], snd_cs4231_sbus_interrupt, | 1974 | if (request_irq(sdev->irqs[0], snd_cs4231_sbus_interrupt, |
@@ -2087,11 +2062,6 @@ static unsigned int _ebus_dma_addr(struct cs4231_dma_control *dma_cont) | |||
2087 | return ebus_dma_addr(&dma_cont->ebus_info); | 2062 | return ebus_dma_addr(&dma_cont->ebus_info); |
2088 | } | 2063 | } |
2089 | 2064 | ||
2090 | static void _ebus_dma_reset(struct snd_cs4231 *chip) | ||
2091 | { | ||
2092 | return; | ||
2093 | } | ||
2094 | |||
2095 | static void _ebus_dma_preallocate(struct snd_cs4231 *chip, struct snd_pcm *pcm) | 2065 | static void _ebus_dma_preallocate(struct snd_cs4231 *chip, struct snd_pcm *pcm) |
2096 | { | 2066 | { |
2097 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, | 2067 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, |
@@ -2171,14 +2141,12 @@ static int __init snd_cs4231_ebus_create(struct snd_card *card, | |||
2171 | chip->p_dma.enable = _ebus_dma_enable; | 2141 | chip->p_dma.enable = _ebus_dma_enable; |
2172 | chip->p_dma.request = _ebus_dma_request; | 2142 | chip->p_dma.request = _ebus_dma_request; |
2173 | chip->p_dma.address = _ebus_dma_addr; | 2143 | chip->p_dma.address = _ebus_dma_addr; |
2174 | chip->p_dma.reset = _ebus_dma_reset; | ||
2175 | chip->p_dma.preallocate = _ebus_dma_preallocate; | 2144 | chip->p_dma.preallocate = _ebus_dma_preallocate; |
2176 | 2145 | ||
2177 | chip->c_dma.prepare = _ebus_dma_prepare; | 2146 | chip->c_dma.prepare = _ebus_dma_prepare; |
2178 | chip->c_dma.enable = _ebus_dma_enable; | 2147 | chip->c_dma.enable = _ebus_dma_enable; |
2179 | chip->c_dma.request = _ebus_dma_request; | 2148 | chip->c_dma.request = _ebus_dma_request; |
2180 | chip->c_dma.address = _ebus_dma_addr; | 2149 | chip->c_dma.address = _ebus_dma_addr; |
2181 | chip->c_dma.reset = _ebus_dma_reset; | ||
2182 | chip->c_dma.preallocate = _ebus_dma_preallocate; | 2150 | chip->c_dma.preallocate = _ebus_dma_preallocate; |
2183 | 2151 | ||
2184 | chip->port = ioremap(edev->resource[0].start, 0x10); | 2152 | chip->port = ioremap(edev->resource[0].start, 0x10); |