Commit 1329d98d authored by Ralf Bächle's avatar Ralf Bächle Committed by Linus Torvalds

[PATCH] mips: NEC DDB board updates

Update the code for the NEC DDB family.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a810bef0
...@@ -403,6 +403,7 @@ config DDB5074 ...@@ -403,6 +403,7 @@ config DDB5074
select HAVE_STD_PC_SERIAL_PORT select HAVE_STD_PC_SERIAL_PORT
select HW_HAS_PCI select HW_HAS_PCI
select IRQ_CPU select IRQ_CPU
select I8259
select ISA select ISA
help help
This enables support for the VR5000-based NEC DDB Vrc-5074 This enables support for the VR5000-based NEC DDB Vrc-5074
...@@ -414,6 +415,7 @@ config DDB5476 ...@@ -414,6 +415,7 @@ config DDB5476
select HAVE_STD_PC_SERIAL_PORT select HAVE_STD_PC_SERIAL_PORT
select HW_HAS_PCI select HW_HAS_PCI
select IRQ_CPU select IRQ_CPU
select I8259
select ISA select ISA
help help
This enables support for the R5432-based NEC DDB Vrc-5476 This enables support for the R5432-based NEC DDB Vrc-5476
...@@ -427,6 +429,7 @@ config DDB5477 ...@@ -427,6 +429,7 @@ config DDB5477
bool "Support for NEC DDB Vrc-5477" bool "Support for NEC DDB Vrc-5477"
select DMA_NONCOHERENT select DMA_NONCOHERENT
select HW_HAS_PCI select HW_HAS_PCI
select I8259
select IRQ_CPU select IRQ_CPU
help help
This enables support for the R5432-based NEC DDB Vrc-5477, This enables support for the R5432-based NEC DDB Vrc-5477,
......
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Linux kernel version: 2.6.10-rc2 # Linux kernel version: 2.6.11-rc2
# Sun Nov 21 14:11:57 2004 # Wed Jan 26 02:49:02 2005
# #
CONFIG_MIPS=y CONFIG_MIPS=y
# CONFIG_MIPS64 is not set # CONFIG_MIPS64 is not set
...@@ -79,6 +79,7 @@ CONFIG_DDB5476=y ...@@ -79,6 +79,7 @@ CONFIG_DDB5476=y
# CONFIG_SNI_RM200_PCI is not set # CONFIG_SNI_RM200_PCI is not set
# CONFIG_TOSHIBA_RBTX4927 is not set # CONFIG_TOSHIBA_RBTX4927 is not set
CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_HAVE_DEC_LOCK=y CONFIG_HAVE_DEC_LOCK=y
CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NONCOHERENT=y
CONFIG_I8259=y CONFIG_I8259=y
...@@ -86,7 +87,6 @@ CONFIG_CPU_LITTLE_ENDIAN=y ...@@ -86,7 +87,6 @@ CONFIG_CPU_LITTLE_ENDIAN=y
CONFIG_IRQ_CPU=y CONFIG_IRQ_CPU=y
CONFIG_DDB5XXX_COMMON=y CONFIG_DDB5XXX_COMMON=y
CONFIG_MIPS_L1_CACHE_SHIFT=5 CONFIG_MIPS_L1_CACHE_SHIFT=5
CONFIG_FB=y
CONFIG_HAVE_STD_PC_SERIAL_PORT=y CONFIG_HAVE_STD_PC_SERIAL_PORT=y
# #
...@@ -129,6 +129,21 @@ CONFIG_PCI_NAMES=y ...@@ -129,6 +129,21 @@ CONFIG_PCI_NAMES=y
CONFIG_ISA=y CONFIG_ISA=y
CONFIG_MMU=y CONFIG_MMU=y
#
# PCCARD (PCMCIA/CardBus) support
#
# CONFIG_PCCARD is not set
#
# PC-card bridges
#
CONFIG_PCMCIA_PROBE=y
#
# PCI Hotplug Support
#
# CONFIG_HOTPLUG_PCI is not set
# #
# Executable file formats # Executable file formats
# #
...@@ -145,6 +160,7 @@ CONFIG_TRAD_SIGNALS=y ...@@ -145,6 +160,7 @@ CONFIG_TRAD_SIGNALS=y
# #
CONFIG_STANDALONE=y CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FW_LOADER is not set
# #
# Memory Technology Devices (MTD) # Memory Technology Devices (MTD)
...@@ -170,10 +186,12 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y ...@@ -170,10 +186,12 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
# CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_RAM is not set # CONFIG_BLK_DEV_RAM is not set
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_INITRAMFS_SOURCE="" CONFIG_INITRAMFS_SOURCE=""
# CONFIG_LBD is not set # CONFIG_LBD is not set
CONFIG_CDROM_PKTCDVD=y CONFIG_CDROM_PKTCDVD=y
...@@ -187,6 +205,7 @@ CONFIG_IOSCHED_NOOP=y ...@@ -187,6 +205,7 @@ CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y CONFIG_IOSCHED_CFQ=y
CONFIG_ATA_OVER_ETH=y
# #
# ATA/ATAPI/MFM/RLL support # ATA/ATAPI/MFM/RLL support
...@@ -424,6 +443,7 @@ CONFIG_SERIO=y ...@@ -424,6 +443,7 @@ CONFIG_SERIO=y
CONFIG_SERIO_SERPORT=y CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PCIPS2 is not set # CONFIG_SERIO_PCIPS2 is not set
# CONFIG_SERIO_LIBPS2 is not set
CONFIG_SERIO_RAW=y CONFIG_SERIO_RAW=y
# #
...@@ -478,7 +498,6 @@ CONFIG_LEGACY_PTY_COUNT=256 ...@@ -478,7 +498,6 @@ CONFIG_LEGACY_PTY_COUNT=256
# #
# Ftape, the floppy tape device driver # Ftape, the floppy tape device driver
# #
# CONFIG_AGP is not set
# CONFIG_DRM is not set # CONFIG_DRM is not set
# CONFIG_RAW_DRIVER is not set # CONFIG_RAW_DRIVER is not set
...@@ -509,6 +528,7 @@ CONFIG_LEGACY_PTY_COUNT=256 ...@@ -509,6 +528,7 @@ CONFIG_LEGACY_PTY_COUNT=256
# #
# Graphics support # Graphics support
# #
CONFIG_FB=y
# CONFIG_FB_MODE_HELPERS is not set # CONFIG_FB_MODE_HELPERS is not set
# CONFIG_FB_TILEBLITTING is not set # CONFIG_FB_TILEBLITTING is not set
# CONFIG_FB_CIRRUS is not set # CONFIG_FB_CIRRUS is not set
...@@ -544,6 +564,7 @@ CONFIG_DUMMY_CONSOLE=y ...@@ -544,6 +564,7 @@ CONFIG_DUMMY_CONSOLE=y
# Logo configuration # Logo configuration
# #
# CONFIG_LOGO is not set # CONFIG_LOGO is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
# #
# Sound # Sound
...@@ -557,11 +578,25 @@ CONFIG_DUMMY_CONSOLE=y ...@@ -557,11 +578,25 @@ CONFIG_DUMMY_CONSOLE=y
CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_OHCI=y
#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
#
# #
# USB Gadget Support # USB Gadget Support
# #
# CONFIG_USB_GADGET is not set # CONFIG_USB_GADGET is not set
#
# MMC/SD Card support
#
# CONFIG_MMC is not set
#
# InfiniBand support
#
# CONFIG_INFINIBAND is not set
# #
# File systems # File systems
# #
...@@ -653,6 +688,11 @@ CONFIG_MSDOS_PARTITION=y ...@@ -653,6 +688,11 @@ CONFIG_MSDOS_PARTITION=y
# #
# CONFIG_NLS is not set # CONFIG_NLS is not set
#
# Profiling support
#
# CONFIG_PROFILING is not set
# #
# Kernel hacking # Kernel hacking
# #
...@@ -672,6 +712,10 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y ...@@ -672,6 +712,10 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
# #
# CONFIG_CRYPTO is not set # CONFIG_CRYPTO is not set
#
# Hardware crypto devices
#
# #
# Library routines # Library routines
# #
......
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Linux kernel version: 2.6.10-rc2 # Linux kernel version: 2.6.11-rc2
# Sun Nov 21 14:11:58 2004 # Wed Jan 26 02:49:02 2005
# #
CONFIG_MIPS=y CONFIG_MIPS=y
# CONFIG_MIPS64 is not set # CONFIG_MIPS64 is not set
...@@ -80,6 +80,7 @@ CONFIG_DDB5477_BUS_FREQUENCY=0 ...@@ -80,6 +80,7 @@ CONFIG_DDB5477_BUS_FREQUENCY=0
# CONFIG_SNI_RM200_PCI is not set # CONFIG_SNI_RM200_PCI is not set
# CONFIG_TOSHIBA_RBTX4927 is not set # CONFIG_TOSHIBA_RBTX4927 is not set
CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_HAVE_DEC_LOCK=y CONFIG_HAVE_DEC_LOCK=y
CONFIG_DMA_NONCOHERENT=y CONFIG_DMA_NONCOHERENT=y
CONFIG_I8259=y CONFIG_I8259=y
...@@ -87,7 +88,6 @@ CONFIG_CPU_LITTLE_ENDIAN=y ...@@ -87,7 +88,6 @@ CONFIG_CPU_LITTLE_ENDIAN=y
CONFIG_IRQ_CPU=y CONFIG_IRQ_CPU=y
CONFIG_DDB5XXX_COMMON=y CONFIG_DDB5XXX_COMMON=y
CONFIG_MIPS_L1_CACHE_SHIFT=5 CONFIG_MIPS_L1_CACHE_SHIFT=5
# CONFIG_FB is not set
# #
# CPU selection # CPU selection
...@@ -128,6 +128,20 @@ CONFIG_PCI_LEGACY_PROC=y ...@@ -128,6 +128,20 @@ CONFIG_PCI_LEGACY_PROC=y
CONFIG_PCI_NAMES=y CONFIG_PCI_NAMES=y
CONFIG_MMU=y CONFIG_MMU=y
#
# PCCARD (PCMCIA/CardBus) support
#
# CONFIG_PCCARD is not set
#
# PC-card bridges
#
#
# PCI Hotplug Support
#
# CONFIG_HOTPLUG_PCI is not set
# #
# Executable file formats # Executable file formats
# #
...@@ -144,6 +158,7 @@ CONFIG_TRAD_SIGNALS=y ...@@ -144,6 +158,7 @@ CONFIG_TRAD_SIGNALS=y
# #
CONFIG_STANDALONE=y CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_FW_LOADER is not set
# #
# Memory Technology Devices (MTD) # Memory Technology Devices (MTD)
...@@ -167,10 +182,12 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y ...@@ -167,10 +182,12 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
# CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_RAM is not set # CONFIG_BLK_DEV_RAM is not set
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_INITRAMFS_SOURCE="" CONFIG_INITRAMFS_SOURCE=""
# CONFIG_LBD is not set # CONFIG_LBD is not set
CONFIG_CDROM_PKTCDVD=y CONFIG_CDROM_PKTCDVD=y
...@@ -184,6 +201,7 @@ CONFIG_IOSCHED_NOOP=y ...@@ -184,6 +201,7 @@ CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y CONFIG_IOSCHED_CFQ=y
CONFIG_ATA_OVER_ETH=y
# #
# ATA/ATAPI/MFM/RLL support # ATA/ATAPI/MFM/RLL support
...@@ -406,6 +424,7 @@ CONFIG_SERIO=y ...@@ -406,6 +424,7 @@ CONFIG_SERIO=y
CONFIG_SERIO_SERPORT=y CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PCIPS2 is not set # CONFIG_SERIO_PCIPS2 is not set
# CONFIG_SERIO_LIBPS2 is not set
CONFIG_SERIO_RAW=y CONFIG_SERIO_RAW=y
# #
...@@ -460,7 +479,6 @@ CONFIG_LEGACY_PTY_COUNT=256 ...@@ -460,7 +479,6 @@ CONFIG_LEGACY_PTY_COUNT=256
# #
# Ftape, the floppy tape device driver # Ftape, the floppy tape device driver
# #
# CONFIG_AGP is not set
# CONFIG_DRM is not set # CONFIG_DRM is not set
# CONFIG_RAW_DRIVER is not set # CONFIG_RAW_DRIVER is not set
...@@ -491,12 +509,14 @@ CONFIG_LEGACY_PTY_COUNT=256 ...@@ -491,12 +509,14 @@ CONFIG_LEGACY_PTY_COUNT=256
# #
# Graphics support # Graphics support
# #
# CONFIG_FB is not set
# #
# Console display driver support # Console display driver support
# #
# CONFIG_VGA_CONSOLE is not set # CONFIG_VGA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y CONFIG_DUMMY_CONSOLE=y
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
# #
# Sound # Sound
...@@ -510,11 +530,25 @@ CONFIG_DUMMY_CONSOLE=y ...@@ -510,11 +530,25 @@ CONFIG_DUMMY_CONSOLE=y
CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_OHCI=y
#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
#
# #
# USB Gadget Support # USB Gadget Support
# #
# CONFIG_USB_GADGET is not set # CONFIG_USB_GADGET is not set
#
# MMC/SD Card support
#
# CONFIG_MMC is not set
#
# InfiniBand support
#
# CONFIG_INFINIBAND is not set
# #
# File systems # File systems
# #
...@@ -608,6 +642,11 @@ CONFIG_MSDOS_PARTITION=y ...@@ -608,6 +642,11 @@ CONFIG_MSDOS_PARTITION=y
# #
# CONFIG_NLS is not set # CONFIG_NLS is not set
#
# Profiling support
#
# CONFIG_PROFILING is not set
# #
# Kernel hacking # Kernel hacking
# #
...@@ -627,6 +666,10 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y ...@@ -627,6 +666,10 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
# #
# CONFIG_CRYPTO is not set # CONFIG_CRYPTO is not set
#
# Hardware crypto devices
#
# #
# Library routines # Library routines
# #
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
* Copyright (C) 2000 Geert Uytterhoeven <geert@sonycom.com> * Copyright (C) 2000 Geert Uytterhoeven <geert@sonycom.com>
* Sony Software Development Center Europe (SDCE), Brussels * Sony Software Development Center Europe (SDCE), Brussels
*/ */
#include <linux/config.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/signal.h> #include <linux/signal.h>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
* Copyright (C) 2000 Geert Uytterhoeven <geert@sonycom.com> * Copyright (C) 2000 Geert Uytterhoeven <geert@sonycom.com>
* Sony Software Development Center Europe (SDCE), Brussels * Sony Software Development Center Europe (SDCE), Brussels
*/ */
#include <linux/config.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kbd_ll.h> #include <linux/kbd_ll.h>
#include <linux/kernel.h> #include <linux/kernel.h>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
* Copyright (C) 2000 Geert Uytterhoeven <geert@sonycom.com> * Copyright (C) 2000 Geert Uytterhoeven <geert@sonycom.com>
* Sony Software Development Center Europe (SDCE), Brussels * Sony Software Development Center Europe (SDCE), Brussels
*/ */
#include <linux/config.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kbd_ll.h> #include <linux/kbd_ll.h>
#include <linux/kernel.h> #include <linux/kernel.h>
......
...@@ -1031,6 +1031,7 @@ ...@@ -1031,6 +1031,7 @@
#define PCI_DEVICE_ID_AL_M1523 0x1523 #define PCI_DEVICE_ID_AL_M1523 0x1523
#define PCI_DEVICE_ID_AL_M1531 0x1531 #define PCI_DEVICE_ID_AL_M1531 0x1531
#define PCI_DEVICE_ID_AL_M1533 0x1533 #define PCI_DEVICE_ID_AL_M1533 0x1533
#define PCI_DEVICE_ID_AL_M1535 0x1535
#define PCI_DEVICE_ID_AL_M1541 0x1541 #define PCI_DEVICE_ID_AL_M1541 0x1541
#define PCI_DEVICE_ID_AL_M1543 0x1543 #define PCI_DEVICE_ID_AL_M1543 0x1543
#define PCI_DEVICE_ID_AL_M1563 0x1563 #define PCI_DEVICE_ID_AL_M1563 0x1563
......
...@@ -78,7 +78,6 @@ ...@@ -78,7 +78,6 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/ac97_codec.h> #include <linux/ac97_codec.h>
#include <linux/interrupt.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -396,10 +395,47 @@ static void set_dac_rate(struct vrc5477_ac97_state *s, unsigned rate) ...@@ -396,10 +395,47 @@ static void set_dac_rate(struct vrc5477_ac97_state *s, unsigned rate)
} }
} }
static int ac97_codec_not_present(struct ac97_codec *codec)
{
struct vrc5477_ac97_state *s =
(struct vrc5477_ac97_state *)codec->private_data;
unsigned long flags;
unsigned short count = 0xffff;
spin_lock_irqsave(&s->lock, flags);
/* wait until we can access codec registers */
do {
if (!(inl(s->io + VRC5477_CODEC_WR) & 0x80000000))
break;
} while (--count);
if (count == 0) {
spin_unlock_irqrestore(&s->lock, flags);
return -1;
}
/* write 0 to reset */
outl((AC97_RESET << 16) | 0, s->io + VRC5477_CODEC_WR);
/* test whether we get a response from ac97 chip */
count = 0xffff;
do {
if (!(inl(s->io + VRC5477_CODEC_WR) & 0x80000000))
break;
} while (--count);
if (count == 0) {
spin_unlock_irqrestore(&s->lock, flags);
return -1;
}
spin_unlock_irqrestore(&s->lock, flags);
return 0;
}
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
static inline void extern inline void
stop_dac(struct vrc5477_ac97_state *s) stop_dac(struct vrc5477_ac97_state *s)
{ {
struct dmabuf* db = &s->dma_dac; struct dmabuf* db = &s->dma_dac;
...@@ -517,7 +553,7 @@ static void start_dac(struct vrc5477_ac97_state *s) ...@@ -517,7 +553,7 @@ static void start_dac(struct vrc5477_ac97_state *s)
spin_unlock_irqrestore(&s->lock, flags); spin_unlock_irqrestore(&s->lock, flags);
} }
static inline void stop_adc(struct vrc5477_ac97_state *s) extern inline void stop_adc(struct vrc5477_ac97_state *s)
{ {
struct dmabuf* db = &s->dma_adc; struct dmabuf* db = &s->dma_adc;
unsigned long flags; unsigned long flags;
...@@ -616,7 +652,7 @@ static void start_adc(struct vrc5477_ac97_state *s) ...@@ -616,7 +652,7 @@ static void start_adc(struct vrc5477_ac97_state *s)
#define DMABUF_DEFAULTORDER (16-PAGE_SHIFT) #define DMABUF_DEFAULTORDER (16-PAGE_SHIFT)
#define DMABUF_MINORDER 1 #define DMABUF_MINORDER 1
static inline void dealloc_dmabuf(struct vrc5477_ac97_state *s, extern inline void dealloc_dmabuf(struct vrc5477_ac97_state *s,
struct dmabuf *db) struct dmabuf *db)
{ {
if (db->lbuf) { if (db->lbuf) {
...@@ -1858,6 +1894,13 @@ static int __devinit vrc5477_ac97_probe(struct pci_dev *pcidev, ...@@ -1858,6 +1894,13 @@ static int __devinit vrc5477_ac97_probe(struct pci_dev *pcidev,
} }
/* test if get response from ac97, if not return */
if (ac97_codec_not_present(&(s->codec))) {
printk(KERN_ERR PFX "no ac97 codec\n");
goto err_region;
}
if (!request_region(s->io, pci_resource_len(pcidev,0), if (!request_region(s->io, pci_resource_len(pcidev,0),
VRC5477_AC97_MODULE_NAME)) { VRC5477_AC97_MODULE_NAME)) {
printk(KERN_ERR PFX "io ports %#lx->%#lx in use\n", printk(KERN_ERR PFX "io ports %#lx->%#lx in use\n",
...@@ -1973,7 +2016,7 @@ static void __devexit vrc5477_ac97_remove(struct pci_dev *dev) ...@@ -1973,7 +2016,7 @@ static void __devexit vrc5477_ac97_remove(struct pci_dev *dev)
remove_proc_entry(VRC5477_AC97_MODULE_NAME, NULL); remove_proc_entry(VRC5477_AC97_MODULE_NAME, NULL);
#endif /* VRC5477_AC97_DEBUG */ #endif /* VRC5477_AC97_DEBUG */
synchronize_irq(s->irq); synchronize_irq();
free_irq(s->irq, s); free_irq(s->irq, s);
release_region(s->io, pci_resource_len(dev,0)); release_region(s->io, pci_resource_len(dev,0));
unregister_sound_dsp(s->dev_audio); unregister_sound_dsp(s->dev_audio);
...@@ -1996,7 +2039,7 @@ static struct pci_driver vrc5477_ac97_driver = { ...@@ -1996,7 +2039,7 @@ static struct pci_driver vrc5477_ac97_driver = {
.name = VRC5477_AC97_MODULE_NAME, .name = VRC5477_AC97_MODULE_NAME,
.id_table = id_table, .id_table = id_table,
.probe = vrc5477_ac97_probe, .probe = vrc5477_ac97_probe,
.remove = __devexit_p(vrc5477_ac97_remove), .remove = __devexit_p(vrc5477_ac97_remove)
}; };
static int __init init_vrc5477_ac97(void) static int __init init_vrc5477_ac97(void)
......
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