Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
ata_platform.h File Reference

Go to the source code of this file.

Data Structures

struct  pata_platform_info
 
struct  mv_sata_platform_data
 

Functions

int __devinit __pata_platform_probe (struct device *dev, struct resource *io_res, struct resource *ctl_res, struct resource *irq_res, unsigned int ioport_shift, int __pio_mask)
 
int __devexit __pata_platform_remove (struct device *dev)
 

Function Documentation

int __devinit __pata_platform_probe ( struct device dev,
struct resource io_res,
struct resource ctl_res,
struct resource irq_res,
unsigned int  ioport_shift,
int  __pio_mask 
)

__pata_platform_probe - attach a platform interface : device : Resource representing I/O base : Resource representing CTL base : Resource representing IRQ and its flags : I/O port shift : PIO mask

Register a platform bus IDE interface. Such interfaces are PIO and we assume do not support IRQ sharing.

Platform devices are expected to contain at least 2 resources per port:

- I/O Base (IORESOURCE_IO or IORESOURCE_MEM)
- CTL Base (IORESOURCE_IO or IORESOURCE_MEM)

and optionally:

- IRQ      (IORESOURCE_IRQ)

If the base resources are both mem types, the ioremap() is handled here. For IORESOURCE_IO, it's assumed that there's no remapping necessary.

If no IRQ resource is present, PIO polling mode is used instead.

Definition at line 101 of file pata_platform.c.

int __devexit __pata_platform_remove ( struct device dev)

__pata_platform_remove - unplug a platform interface : device

A platform bus ATA device has been unplugged. Perform the needed cleanup. Also called on module unload for any active devices.

Definition at line 188 of file pata_platform.c.