Commit fd382b8f authored by Jeff Garzik's avatar Jeff Garzik

[libata] API cleanup

Remove ->phy_config hook, everybody used pata_phy_config.  Rename
function to ata_set_mode, and directly call internally.
parent 45e79175
...@@ -125,7 +125,6 @@ static struct ata_port_operations piix_pata_ops = { ...@@ -125,7 +125,6 @@ static struct ata_port_operations piix_pata_ops = {
.exec_command = ata_exec_command_pio, .exec_command = ata_exec_command_pio,
.phy_reset = piix_pata_phy_reset, .phy_reset = piix_pata_phy_reset,
.phy_config = pata_phy_config,
.bmdma_start = ata_bmdma_start_pio, .bmdma_start = ata_bmdma_start_pio,
.fill_sg = ata_fill_sg, .fill_sg = ata_fill_sg,
...@@ -148,7 +147,6 @@ static struct ata_port_operations piix_sata_ops = { ...@@ -148,7 +147,6 @@ static struct ata_port_operations piix_sata_ops = {
.exec_command = ata_exec_command_pio, .exec_command = ata_exec_command_pio,
.phy_reset = piix_sata_phy_reset, .phy_reset = piix_sata_phy_reset,
.phy_config = pata_phy_config, /* not a typo */
.bmdma_start = ata_bmdma_start_pio, .bmdma_start = ata_bmdma_start_pio,
.fill_sg = ata_fill_sg, .fill_sg = ata_fill_sg,
......
...@@ -58,6 +58,7 @@ static void ata_host_set_pio(struct ata_port *ap); ...@@ -58,6 +58,7 @@ static void ata_host_set_pio(struct ata_port *ap);
static void ata_host_set_udma(struct ata_port *ap); static void ata_host_set_udma(struct ata_port *ap);
static void ata_dev_set_pio(struct ata_port *ap, unsigned int device); static void ata_dev_set_pio(struct ata_port *ap, unsigned int device);
static void ata_dev_set_udma(struct ata_port *ap, unsigned int device); static void ata_dev_set_udma(struct ata_port *ap, unsigned int device);
static void ata_set_mode(struct ata_port *ap);
static unsigned int ata_unique_id = 1; static unsigned int ata_unique_id = 1;
...@@ -1031,7 +1032,7 @@ static void ata_port_reset(struct ata_port *ap) ...@@ -1031,7 +1032,7 @@ static void ata_port_reset(struct ata_port *ap)
if ((!found) || (ap->flags & ATA_FLAG_PORT_DISABLED)) if ((!found) || (ap->flags & ATA_FLAG_PORT_DISABLED))
goto err_out_disable; goto err_out_disable;
ap->ops->phy_config(ap); ata_set_mode(ap);
if (ap->flags & ATA_FLAG_PORT_DISABLED) if (ap->flags & ATA_FLAG_PORT_DISABLED)
goto err_out_disable; goto err_out_disable;
...@@ -1120,13 +1121,13 @@ void ata_port_disable(struct ata_port *ap) ...@@ -1120,13 +1121,13 @@ void ata_port_disable(struct ata_port *ap)
} }
/** /**
* pata_phy_config - * ata_set_mode - Program timings and issue SET FEATURES - XFER
* @ap: * @ap: port on which timings will be programmed
* *
* LOCKING: * LOCKING:
* *
*/ */
void pata_phy_config(struct ata_port *ap) static void ata_set_mode(struct ata_port *ap)
{ {
unsigned int force_pio; unsigned int force_pio;
...@@ -3387,7 +3388,6 @@ EXPORT_SYMBOL_GPL(ata_bmdma_start_pio); ...@@ -3387,7 +3388,6 @@ EXPORT_SYMBOL_GPL(ata_bmdma_start_pio);
EXPORT_SYMBOL_GPL(ata_bmdma_start_mmio); EXPORT_SYMBOL_GPL(ata_bmdma_start_mmio);
EXPORT_SYMBOL_GPL(ata_port_probe); EXPORT_SYMBOL_GPL(ata_port_probe);
EXPORT_SYMBOL_GPL(sata_phy_reset); EXPORT_SYMBOL_GPL(sata_phy_reset);
EXPORT_SYMBOL_GPL(pata_phy_config);
EXPORT_SYMBOL_GPL(ata_bus_reset); EXPORT_SYMBOL_GPL(ata_bus_reset);
EXPORT_SYMBOL_GPL(ata_port_disable); EXPORT_SYMBOL_GPL(ata_port_disable);
EXPORT_SYMBOL_GPL(ata_pci_init_one); EXPORT_SYMBOL_GPL(ata_pci_init_one);
......
...@@ -201,7 +201,6 @@ static struct ata_port_operations pdc_sata_ops = { ...@@ -201,7 +201,6 @@ static struct ata_port_operations pdc_sata_ops = {
.check_status = ata_check_status_mmio, .check_status = ata_check_status_mmio,
.exec_command = pdc_exec_command_mmio, .exec_command = pdc_exec_command_mmio,
.phy_reset = sata_phy_reset, .phy_reset = sata_phy_reset,
.phy_config = pata_phy_config, /* not a typo */
.bmdma_start = pdc_dma_start, .bmdma_start = pdc_dma_start,
.fill_sg = pdc_fill_sg, .fill_sg = pdc_fill_sg,
.eng_timeout = pdc_eng_timeout, .eng_timeout = pdc_eng_timeout,
...@@ -219,7 +218,6 @@ static struct ata_port_operations pdc_20621_ops = { ...@@ -219,7 +218,6 @@ static struct ata_port_operations pdc_20621_ops = {
.check_status = ata_check_status_mmio, .check_status = ata_check_status_mmio,
.exec_command = pdc_exec_command_mmio, .exec_command = pdc_exec_command_mmio,
.phy_reset = pdc_20621_phy_reset, .phy_reset = pdc_20621_phy_reset,
.phy_config = pata_phy_config, /* not a typo */
.bmdma_start = pdc20621_dma_start, .bmdma_start = pdc20621_dma_start,
.fill_sg = pdc20621_fill_sg, .fill_sg = pdc20621_fill_sg,
.eng_timeout = pdc_eng_timeout, .eng_timeout = pdc_eng_timeout,
......
...@@ -124,7 +124,6 @@ static struct ata_port_operations sil_ops = { ...@@ -124,7 +124,6 @@ static struct ata_port_operations sil_ops = {
.check_status = ata_check_status_mmio, .check_status = ata_check_status_mmio,
.exec_command = ata_exec_command_mmio, .exec_command = ata_exec_command_mmio,
.phy_reset = sata_phy_reset, .phy_reset = sata_phy_reset,
.phy_config = pata_phy_config, /* not a typo */
.bmdma_start = ata_bmdma_start_mmio, .bmdma_start = ata_bmdma_start_mmio,
.fill_sg = ata_fill_sg, .fill_sg = ata_fill_sg,
.eng_timeout = ata_eng_timeout, .eng_timeout = ata_eng_timeout,
......
...@@ -226,7 +226,6 @@ static struct ata_port_operations k2_sata_ops = { ...@@ -226,7 +226,6 @@ static struct ata_port_operations k2_sata_ops = {
.check_status = k2_stat_check_status, .check_status = k2_stat_check_status,
.exec_command = ata_exec_command_mmio, .exec_command = ata_exec_command_mmio,
.phy_reset = sata_phy_reset, .phy_reset = sata_phy_reset,
.phy_config = pata_phy_config, /* not a typo */
.bmdma_start = ata_bmdma_start_mmio, .bmdma_start = ata_bmdma_start_mmio,
.fill_sg = ata_fill_sg, .fill_sg = ata_fill_sg,
.eng_timeout = ata_eng_timeout, .eng_timeout = ata_eng_timeout,
......
...@@ -97,7 +97,6 @@ static struct ata_port_operations svia_sata_ops = { ...@@ -97,7 +97,6 @@ static struct ata_port_operations svia_sata_ops = {
.exec_command = ata_exec_command_pio, .exec_command = ata_exec_command_pio,
.phy_reset = sata_phy_reset, .phy_reset = sata_phy_reset,
.phy_config = pata_phy_config, /* not a typo */
.bmdma_start = ata_bmdma_start_pio, .bmdma_start = ata_bmdma_start_pio,
.fill_sg = ata_fill_sg, .fill_sg = ata_fill_sg,
......
...@@ -207,7 +207,6 @@ static struct ata_port_operations vsc_sata_ops = { ...@@ -207,7 +207,6 @@ static struct ata_port_operations vsc_sata_ops = {
.exec_command = ata_exec_command_mmio, .exec_command = ata_exec_command_mmio,
.check_status = ata_check_status_mmio, .check_status = ata_check_status_mmio,
.phy_reset = sata_phy_reset, .phy_reset = sata_phy_reset,
.phy_config = pata_phy_config, /* not a typo */
.bmdma_start = ata_bmdma_start_mmio, .bmdma_start = ata_bmdma_start_mmio,
.fill_sg = ata_fill_sg, .fill_sg = ata_fill_sg,
.eng_timeout = ata_eng_timeout, .eng_timeout = ata_eng_timeout,
......
...@@ -362,7 +362,6 @@ struct ata_port_operations { ...@@ -362,7 +362,6 @@ struct ata_port_operations {
u8 (*check_status)(struct ata_port *ap); u8 (*check_status)(struct ata_port *ap);
void (*phy_reset) (struct ata_port *ap); void (*phy_reset) (struct ata_port *ap);
void (*phy_config) (struct ata_port *ap);
void (*bmdma_start) (struct ata_queued_cmd *qc); void (*bmdma_start) (struct ata_queued_cmd *qc);
void (*fill_sg) (struct ata_queued_cmd *qc); void (*fill_sg) (struct ata_queued_cmd *qc);
...@@ -396,7 +395,6 @@ struct pci_bits { ...@@ -396,7 +395,6 @@ struct pci_bits {
}; };
extern void ata_port_probe(struct ata_port *); extern void ata_port_probe(struct ata_port *);
extern void pata_phy_config(struct ata_port *ap);
extern void sata_phy_reset(struct ata_port *ap); extern void sata_phy_reset(struct ata_port *ap);
extern void ata_bus_reset(struct ata_port *ap); extern void ata_bus_reset(struct ata_port *ap);
extern void ata_port_disable(struct ata_port *); extern void ata_port_disable(struct ata_port *);
......
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