linux/drivers/ide/ide-generic.c
<<
>>
Prefs
   1/*
   2 * generic/default IDE host driver
   3 *
   4 * Copyright (C) 2004, 2008-2009 Bartlomiej Zolnierkiewicz
   5 * This code was split off from ide.c.  See it for original copyrights.
   6 *
   7 * May be copied or modified under the terms of the GNU General Public License.
   8 */
   9
  10#include <linux/kernel.h>
  11#include <linux/init.h>
  12#include <linux/module.h>
  13#include <linux/ide.h>
  14#include <linux/pci_ids.h>
  15
  16/* FIXME: convert arm and m32r to use ide_platform host driver */
  17#ifdef CONFIG_ARM
  18#include <
  v2.6.16.5454" v2.6." id="L15" class="line" name="L15">  15
   2CONFIG_ARM
  18#i2clude &l2;linux/init.hirq.h|include/asm-avr32/i68knh|include/asm-black68knh|include/asm-blsm-cr68knh|include/asm-bsm-frv/ir68knh|include/asm-bneric68knh|include/asm-b-h8368knh|include/asm-bsm-i386/68knh|include/asm-bia64/i68knh|include/asm-b32r/i68knh|include/asm-b38k/i68knh|include/asm-b68kno68knh|include/asm-b6sm-m.6.23.8"
	  >
  v2.6.232.c#1L10"-asm-
  v2.6.232.c#1L10"-asm|include/asm-b38k/i68kc/irq.hclude/asm-b38k/i68kcq.h|incclude/asm-b38k/i68kcincclude/asm-b38k/i68k|inclclude/asm-b38k/i68k|hlclude/asm-b38k/i68k|h|include/asm-b38k/i68k/irq.hclude/asm-b38k/i68k/irq.|include/asm-b38k/i68ku|include/asm-black68k386/include/asm-black68kx|include/asm-b32r/i68kL12" idclude/asm-b32r/i68kLe="v2.clude/54"
	  >
  v2.6.16.clude/ptio4;>54" v2.6." id="L15" class="line" name=22">   2  12#include <  12#include <CONFIGDRV_NAME href="driveM32DRV_NAMEde/l         convert arm string">"an>
line" n"e-generic.c#L2" id="L2" class="line" name="L2L15">  12
  12/* 2IXME:>"> interne20ef">CONFIGprobe_mask href="driveM32probe_maskXME:54" v2.6." id="L15" class="line" name=2L17">  12#ifdef CONFIGrs/ide_irqam href="driveM32rs/ide_irqamy be(rne20ef">CONFIGprobe_mask href="driveM32probe_maskXME:, int, 0)54" v2.6." id="L15" class="line" name=2L18">  12#include <CONFIGMODULE_Pe-g_DESC href="driveM32MODULE_Pe-g_DESCy be(rne20ef">CONFIGprobe_mask href="driveM32probe_maskXME:,  convert arm string">"probe mask>
  12
   2 _plivestructerne20ef">CONFIGan>
CONFIGan>
line" n
  13#i2clude &l2;CONFIGdriv_flags href="driveM32driv_flagsde/l             = rne20ef">CONFIG"dr_HFLAG_NO_DMA href="driveM32"dr_HFLAG_NO_DMAXME:,ic.c#L10" id="L10" class="line" name=32">   2<3/a>CONFIGchasm"texref="driveM32chasm"tde/l                = rne20ef">CONFIGan>
line" n href="driveM32an>
line" nXME:,ic.c#L10" id="L10" class="line" name=33">   3  13#include <  13
CONFIG_ARM
  13/* 36XME:>"> _plives="sref">CONFIGu6CONFIGlegacy_bases href="driveM32legacy_basesXME:[] = { 0x1f0 }54" v2.6." id="L15" class="line" name=3L17">  13#ifdef  _pliveinterne20ef">CONFIGlegacy_54CONFIG"RQ_HARDDISK href="driveM32"RQ_HARDDISKXME:e}54" v2.6." id="L15" class="line" name=3L18">  13#include <CONFIGx2ke &d href="driveM32x2ke &dy be(rne20ef">CONFIG/ide/idPLATde-g700UTa href="drivers/ide/idPLATde-g700UTy be) ||ss="sref">CONFIGx2ke &d href="driveM32x2ke &dy be(rne20ef">CONFIG/ide/idPLATdeAPPI2a href="drivers/ide/idPLATdeAPPI2y be) ||s\4" v2.6." id="L15" class="line" name=3L15">  13
CONFIGx2ke &d href="driveM32x2ke &dy be(rne20ef">CONFIG/ide/idPLATdOPSPUTa href="drivers/ide/idPLATdOPSPUTy be)ic.c#L4" id="L4" class="line" name="L4">   2 _plives="sref">CONFIGu6CONFIGlegacy_bases href="driveM32legacy_basesXME:[] = { 0x1f0 }54" v2.6." id="L15" class="line" name=4L18">  14#i2clude &l2; _pliveinterne20ef">CONFIGlegacy_54CONFIGPLD_"RQ_CFIREQ href="driveM32PLD_"RQ_CFIREQXME:e}54" v2.6." id="L15" class="line" name=42">   2<4/a>CONFIGx2ke &d href="driveM32x2ke &dy be(rne20ef">CONFIG/ide/idPLATdeAPPI3a href="drivers/ide/idPLATdeAPPI3y be)ic.c#L4" id="L4" class="line" name="L43">   3<4/a> _plives="sref">CONFIGu6CONFIGlegacy_bases href="driveM32legacy_basesXME:[] = { 0x1f0, 0x170 }54" v2.6." id="L15" class="line" name=44">   4 _pliveinterne20ef">CONFIGlegacy_54CONFIGPLD_"RQ_CFIREQ href="driveM32PLD_"RQ_CFIREQXME:, rne20ef">CONFIGPLD_"RQ_"drIREQ href="driveM32PLD_"RQ_"drIREQXME:e}54" v2.6." id="L15" class="line" name=4L15">  14
CONFIGx2ke &d href="driveM32x2ke &dy be(rne20ef">CONFIG/ide/idALPHA href="driveM32/ide/idALPHAy be)ic.c#L4" id="L4" class="line" name="L4L16">  14/* 46XME:>"> _plives="sref">CONFIGu6CONFIGlegacy_bases href="driveM32legacy_basesXME:[] = { 0x1f0, 0x170, 0x1e8, 0x168e}54" v2.6." id="L15" class="line" name=4L17">  14#ifdef  _pliveinterne20ef">CONFIGlegacy_54  14#include <  14
 _plives="sref">CONFIGu6CONFIGlegacy_bases href="driveM32legacy_basesXME:[] = { 0x1f0, 0x170, 0x1e8, 0x168, 0x1e0, 0x160 }54" v2.6." id="L15" class="line" name=5">   2 _pliveinterne20ef">CONFIGlegacy_54  15#i2clude &l2;   2<5/a>   3<5/a> void rne20ef">CONFIGan>
line" n
check_ers/legacy_5obases href="driveM32an>
line" n
check_ers/legacy_5obasesy be(inte*rne20ef">CONFIGprimary href="driveM32primaryXME:, inte*rne20ef">CONFIGse_pldary href="driveM32se_pldaryy be)ic.c#L4" id="L4" class="line" name="L54">   4<5/a>   5CONFIG_ARM  15/* 56de/l        structerne20ef">CONFIGers/dev href="driveM32prs/devde/l *rne20ef">CONFIGp href="driveM32pde/l = rne20ef">CONFIGNULL href="driveM32NULLXME:54" v2.6." id="L15" class="line" name=5L17">  15#ifdef CONFIGu6CONFIGval/a>  15#include <  15
CONFIGfor_each_ers/dev href="driveM32for_each_ers/devy be(rne20ef">CONFIGp href="driveM32pde/l) {ic.c#L10" id="L10" class="line" name=6">   2CONFIGprs/resource_>rtexref="driveM32prs/resource_>rty be(rne20ef">CONFIGp href="driveM32pde/l, 0) == 0x1f0)ic.c#L4" id="L4" class="line" name="L6L18">  16#i2clude &l2;CONFIGprimary href="driveM32primaryXME: = 154" v2.6." id="L15" class="line" name=62">   2<6/a>CONFIGprs/resource_>rtexref="driveM32prs/resource_>rty be(rne20ef">CONFIGp href="driveM32pde/l, 2) == 0x170)ic.c#L4" id="L4" class="line" name="L63">   3<6/a>CONFIGse_pldary href="driveM32se_pldaryy be = 154" v2.6." id="L15" class="line" name=64">   4<6/a>   5<6/a>   6/* 66de/l                ias(rne20ef">CONFIGp href="driveM32pde/l-4;>5s="sref">CONFIGv.c#or/a>CONFIGPCI_VENDOR_"d_CYRIX href="driveM32PCI_VENDOR_"d_CYRIXy be &&ic.c#L17" id="L17" class="line" name=6L17">  16#ifdef CONFIGp href="driveM32pde/l-4;>5s="sref">CONFIGdevice href="driveM32x2vicey be == rne20ef">CONFIGPCI_DEVICE_"d_CYRIX_550#incluiveM32PCI_DEVICE_"d_CYRIX_550  16#include <CONFIGp href="driveM32pde/l-4;>5s="sref">CONFIGdevice href="driveM32x2vicey be == rne20ef">CONFIGPCI_DEVICE_"d_CYRIX_552#incluiveM32PCI_DEVICE_"d_CYRIX_55lude/l))ic.c#L4" id="L4" class="line" name="L6L15">  16
CONFIGprimary href="driveM32primaryXME: = *rne20ef">CONFIGse_pldary href="driveM32se_pldaryy be = 154" v2.6." id="L15" class="line" name=7">   2  17#i2clude &l2;   2<7/a>CONFIGp href="driveM32pde/l-4;>5s="sref">CONFIGv.c#or/a>CONFIGPCI_VENDOR_"d_INTEL href="driveM32PCI_VENDOR_"d_INTELy be &&ic.c#L17" id="L17" class="line" name=73">   3<7/a>CONFIGp href="driveM32pde/l-4;>5s="sref">CONFIGdevice href="driveM32x2vicey be == rne20ef">CONFIGPCI_DEVICE_"d_INTEL_82371MX href="driveM32PCI_DEVICE_"d_INTEL_82371MXde/l) {ic.c#L10" id="L10" class="line" name=74">   4<7/a>CONFIGprs/read="e8fig_word href="driveM32prs/read="e8fig_wordy be(rne20ef">CONFIGp href="driveM32pde/l, 0x6C, &s="sref">CONFIGval/a>   5<7/a>CONFIGval/a>   6<7/a>/* 76de/l                                 convert arm and m32r to ATA    7CONFIGval/a>  17#include <CONFIGse_pldary href="driveM32se_pldaryy be = 154" v2.6." id="L15" class="line" name=7L15">  17
   2CONFIGprimary href="driveM32primaryXME: = 154" v2.6." id="L15" class="line" name=8L18">  18#i2clude &l2;   2<8/a>   3<8/a>   4<8/a>   5<8/a>   6<8/a>/* 86eneric.c#L10" id="L10" class="line" name=87">   7<8/a> interne20ef">CONFIG__/ide href="driveM32__/ideXME:es="sref">CONFIGan>
line" n
/ide href="driveM32an>
line" n
/idey be(void)ic.c#L17" id="L17" class="line" name=88">   8  18
CONFIGan>
hw href="driveM32an>
hwXME:es="sref">CONFIGhw href="driveM32hwXME:, *rne20ef">CONFIGhws href="driveM32dwsXME:[] = { &s="sref">CONFIGhw href="driveM32hwXME: }54" v2.6." id="L15" class="line" name=9">   2CONFIGao_addr/a>  19#i2clude &l2;CONFIGi/a>CONFIGrn href="driveM32rcXME: = 0, rne20ef">CONFIGprimary href="driveM32primaryXME: = 0, rne20ef">CONFIGse_pldary href="driveM32se_pldaryy be = 054" v2.6." id="L15" class="line" name=92">   2<9/a>   3<9/a>CONFIGan>
line" n
check_ers/legacy_5obases href="driveM32an>
line" n
check_ers/legacy_5obasesy be(&s="sref">CONFIGprimary href="driveM32primaryXME:, &s="sref">CONFIGse_pldary href="driveM32se_pldaryy be)54" v2.6." id="L15" class="line" name=94">   4<9/a>   5<9/a>CONFIGprobe_mask href="driveM32probe_maskXME:) {ic.c#L10" id="L10" class="line" name=96">   6<9/a>/* 96de/l                s="sref">CONFIGprintk href="driveM32printky be(rne20ef">CONFIGKERN_INFO href="driveM32KERN_INFOXME:es="sref">CONFIGDRV_NAME href="driveM32DRV_NAMEde/l  convert arm string">": please/   7<9/a>"rs/ide irqameter>
   8<9/a>   9
CONFIGprimary href="driveM32primaryXME: == 0)ic.c#L17" id="L17" class="line" name=10L10">  10<#include <CONFIGprobe_mask href="driveM32probe_maskXME: |= 0x154" v2.6." id="L15" class="line" name="0L11">  110#include <  120#include <CONFIGse_pldary href="driveM32se_pldaryy be == 0)ic.c#L17" id="L17" class="line" name=10L13">  130#include <CONFIGprobe_mask href="driveM32probe_maskXME: |= 0x254" v2.6." id="L15" class="line" name="0L14">  140#include <  150
CONFIGprintk href="driveM32printky be(rne20ef">CONFIGKERN_INFO href="driveM32KERN_INFOXME:es="sref">CONFIGDRV_NAME href="driveM32DRV_NAMEde/l  convert arm string">": en
  160"upon/  170#ifdef   180#include <CONFIGi/a>CONFIGi/a>CONFIGARRAY_SIZE href="driveM32ARRAY_SIZEy be(rne20ef">CONFIGlegacy_bases href="driveM32legacy_basesXME:)5erne20ef">CONFIGi/a>  150
CONFIGao_addr/a>CONFIGlegacy_bases href="driveM32legacy_basesXME:[rne20ef">CONFIGi/a>  100#include <  11<#include <CONFIGprobe_mask href="driveM32probe_maskXME: & (1t.2" .2" erne20ef">CONFIGi/a>CONFIGao_addr/a>  122#include <CONFIGrequest_region href="driveM32request_regiony be(rne20ef">CONFIGao_addr/a>CONFIGDRV_NAME href="driveM32DRV_NAMEde/l)) {ic.c#L10" id="L10" class="line" name=1"L13">  133#include <CONFIGprintk href="driveM32printky be(rne20ef">CONFIGKERN_ERa href="driveM32KERN_ERade/l  convert arm string">"%s: I/Oiresource 0x%lX-0x%lX "e-generic.c#L2" id="L2" class="line" name="L1"L14">  144#include <"not free.\n"e-gener,ic.c#L10" id="L10" class="line" name=1"L15">  155
CONFIGDRV_NAME href="driveM32DRV_NAMEde/l, s="sref">CONFIGao_addr/a>CONFIGao_addr/a>  166/*116de/l                                 ne20ef">CONFIGrn href="driveM32rcXME: = - ne20ef">CONFIGEBUSY href="driveM32EBUSYXME:54" v2.6." id="L15" class="line" name=1"L17">  177#ifdef   188#include <  155
   2CONFIGrequest_region href="driveM32request_regiony be(rne20ef">CONFIGao_addr/a>CONFIGDRV_NAME href="driveM32DRV_NAMEde/l)) {ic.c#L10" id="L10" class="line" name=1"L18">  118#i2clude &l2;CONFIGprintk href="driveM32printky be(rne20ef">CONFIGKERN_ERa href="driveM32KERN_ERade/l  convert arm string">"%s: I/Oiresource 0x%lX "e-generic.c#L2" id="L2" class="line" name="L122">   2<1//a>"not free.\n"e-gener,ic.c#L10" id="L10" class="line" name=12L13">  112#include <CONFIGDRV_NAME href="driveM32DRV_NAMEde/l, s="sref">CONFIGao_addr/a>  112#include <CONFIGrelease_region href="driveM32release_regiony be(rne20ef">CONFIGao_addr/a>  152
CONFIGrn href="driveM32rcXME: = - ne20ef">CONFIGEBUSY href="driveM32EBUSYXME:54" v2.6." id="L15" class="line" name=12L16">  112/*126de/l                                "e8/inue54" v2.6." id="L15" class="line" name=12L17">  112#ifdef   112#include <  112
CONFIGmemm"texref="driveM32memm"ty be(&s="sref">CONFIGhw href="driveM32hwXME:, 0, sizeof(rne20ef">CONFIGhw href="driveM32hwXME:))54" v2.6." id="L15" class="line" name=13">   2CONFIGan>
std
/ide
CONFIGhw href="driveM32hwXME:, s="sref">CONFIGao_addr/a>CONFIGao_addr/a>  113#i2clude &l2;CONFIG_ARM   2<13/a>CONFIGhw href="driveM32hwXME:.rne20ef">CONFIGirq/a>CONFIGisa_54<_to_vector/a>CONFIGlegacy_54CONFIGi/a>  13<#include <  113#include <CONFIGhw href="driveM32hwXME:.rne20ef">CONFIGirq/a>CONFIGlegacy_54CONFIGi/a>  153
  113/*136de/l                         ne20ef">CONFIGrn href="driveM32rcXME: = rne20ef">CONFIGan>
hriv_add href="driveM32an>
hriv_addy be(&s="sref">CONFIGin>
line" n
CONFIGhws href="driveM32dwsXME:, 1, s="sref">CONFIGNULL href="driveM32NULLXME:)54" v2.6." id="L15" class="line" name=13L17">  113#ifdef CONFIGrn href="driveM32rcXME:) {ic.c#L10" id="L10" class="line" name=13L18">  113#include <CONFIGrelease_region href="driveM32release_regiony be(rne20ef">CONFIGao_addr/a>  113
CONFIGrelease_region href="driveM32release_regiony be(rne20ef">CONFIGao_addr/a>   2  114#i2clude &l2;   2<14/a>  134/a>   4<1//a>CONFIGrn href="driveM32rcXME:54" v2.6." id="L15" class="line" name=14L15">  154
  114/*14<_to_vector/*5" class=34clas7." id="L15" class="line" name=13L15">duest_region href="driveM32request_reg">CONFIGhw href=ame="comment4eNiregion 2"32r14">/*14<_to_ve9b97e99span c     4d="L15E:[]  = { 14, 15, 11, 101 }54"1v2.6."ommen14">/*14<_driveM3LICENSener,ic.c#L10" idriveM3LICENSess="coce 0x%lX "e-generGPLgeneric.c#L2" id="L2" class="line" name="L10L16">  16 riversuF1IXME:es="sref">CONFIGleg1acy_b1ses hr

  :es="srfooter">
Theide-generiLXR software byic.c#="L2" clahttp://      forge.net/proj   s/lxr">LXR pan u="l     rnpng" expL16 riveri"lin

  :es="srsubfooter">
1xr.lers/.no kindly-geneedpbyi="L2" clahttp://www.redpill-lerpro.noreRedpill Lerpro AS    rnprovi hreof LeruxiveM3ultgenernd opL1as?res serass=s since 1995.
  /bodyor>/htmlal