3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
7 /* ide.c - ide support functions */
11 #if defined(CONFIG_CMD_IDE)
18 int ata_device(int dev)
22 retval = (dev & 1) << 4;
23 if (cpci_hd_type == 2)
29 int ide_preinit (void)
37 if (CPCI750_SLAVE_TEST != 0)
39 for (l = 0; l < CONFIG_SYS_IDE_MAXBUS; l++) {
40 ide_bus_offset[l] = -ATA_STATUS;
42 devbusfn = pci_find_device (0x1103, 0x0004, 0);
46 devbusfn = pci_find_device (0x1095, 0x3114, 0);
52 ulong *ide_bus_offset_ptr;
56 ide_bus_offset_ptr = &ide_bus_offset[0];
57 pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0,
58 (u32 *)ide_bus_offset_ptr);
59 ide_bus_offset[0] &= 0xfffffffe;
60 ide_bus_offset[0] += CONFIG_SYS_PCI0_IO_SPACE;
61 ide_bus_offset_ptr = &ide_bus_offset[1];
62 pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_2,
63 (u32 *)ide_bus_offset_ptr);
64 ide_bus_offset[1] &= 0xfffffffe;
65 ide_bus_offset[1] += CONFIG_SYS_PCI0_IO_SPACE;
70 void ide_set_reset (int flag) {
74 #endif /* of CONFIG_CMDS_IDE */