aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/legacy/falconide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/legacy/falconide.c')
-rw-r--r--drivers/ide/legacy/falconide.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/drivers/ide/legacy/falconide.c b/drivers/ide/legacy/falconide.c
index 1bb2aa72cc7f..3e2c6125f031 100644
--- a/drivers/ide/legacy/falconide.c
+++ b/drivers/ide/legacy/falconide.c
@@ -66,6 +66,27 @@ static void falconide_output_data(ide_drive_t *drive, struct request *rq,
66 outsw_swapw(data_addr, buf, (len + 1) / 2); 66 outsw_swapw(data_addr, buf, (len + 1) / 2);
67} 67}
68 68
69/* Atari has a byte-swapped IDE interface */
70static const struct ide_tp_ops falconide_tp_ops = {
71 .exec_command = ide_exec_command,
72 .read_status = ide_read_status,
73 .read_altstatus = ide_read_altstatus,
74 .read_sff_dma_status = ide_read_sff_dma_status,
75
76 .set_irq = ide_set_irq,
77
78 .tf_load = ide_tf_load,
79 .tf_read = ide_tf_read,
80
81 .input_data = falconide_input_data,
82 .output_data = falconide_output_data,
83};
84
85static const struct ide_port_info falconide_port_info = {
86 .tp_ops = &falconide_tp_ops,
87 .host_flags = IDE_HFLAG_NO_DMA,
88};
89
69static void __init falconide_setup_ports(hw_regs_t *hw) 90static void __init falconide_setup_ports(hw_regs_t *hw)
70{ 91{
71 int i; 92 int i;
@@ -111,12 +132,8 @@ static int __init falconide_init(void)
111 u8 index = hwif->index; 132 u8 index = hwif->index;
112 u8 idx[4] = { index, 0xff, 0xff, 0xff }; 133 u8 idx[4] = { index, 0xff, 0xff, 0xff };
113 134
114 /* Atari has a byte-swapped IDE interface */
115 hwif->input_data = falconide_input_data;
116 hwif->output_data = falconide_output_data;
117
118 ide_get_lock(NULL, NULL); 135 ide_get_lock(NULL, NULL);
119 ide_device_add(idx, NULL, hws); 136 ide_device_add(idx, &falconide_port_info, hws);
120 ide_release_lock(); 137 ide_release_lock();
121 } 138 }
122 139