Changeset 39619 in vbox for trunk/src/VBox/Devices/PC/BIOS-new
- Timestamp:
- Dec 14, 2011 5:36:18 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS-new/ahci.c
r39610 r39619 141 141 142 142 /** Returns the absolute register offset from a given port and port register. */ 143 #define AHCI_PORT_REG(port, reg) ( (uint32_t)(AHCI_HBA_SIZE + (port) * AHCI_PORT_SIZE + (reg)))143 #define AHCI_PORT_REG(port, reg) (AHCI_HBA_SIZE + (port) * AHCI_PORT_SIZE + (reg)) 144 144 145 145 #define AHCI_REG_IDX 0 … … 147 147 148 148 /** Writes the given value to a AHCI register. */ 149 #define AHCI_WRITE_REG(iobase, reg, val) 150 outpd((iobase) + AHCI_REG_IDX, (uint32_t)(reg)); \151 outpd((iobase) + AHCI_REG_DATA, (uint32_t)(val))149 #define AHCI_WRITE_REG(iobase, reg, val) \ 150 outpd((iobase) + AHCI_REG_IDX, reg); \ 151 outpd((iobase) + AHCI_REG_DATA, val) 152 152 153 153 /** Reads from a AHCI register. */ 154 #define AHCI_READ_REG(iobase, reg, val) 155 outpd((iobase) + AHCI_REG_IDX, (uint32_t)(reg)); \154 #define AHCI_READ_REG(iobase, reg, val) \ 155 outpd((iobase) + AHCI_REG_IDX, reg); \ 156 156 (val) = inpd((iobase) + AHCI_REG_DATA) 157 157 … … 224 224 * Sets a given set of bits in a register. 225 225 */ 226 static void ahci_ctrl_set_bits(uint16_t iobase, uint 32_t reg, uint32_t mask)226 static void ahci_ctrl_set_bits(uint16_t iobase, uint16_t reg, uint32_t mask) 227 227 { 228 228 outpd(iobase + AHCI_REG_IDX, reg); … … 233 233 * Clears a given set of bits in a register. 234 234 */ 235 static void ahci_ctrl_clear_bits(uint16_t iobase, uint 32_t reg, uint32_t mask)235 static void ahci_ctrl_clear_bits(uint16_t iobase, uint16_t reg, uint32_t mask) 236 236 { 237 237 outpd(iobase + AHCI_REG_IDX, reg); … … 243 243 * for a register. 244 244 */ 245 static uint8_t ahci_ctrl_is_bit_set(uint16_t iobase, uint 32_t reg, uint32_t mask)245 static uint8_t ahci_ctrl_is_bit_set(uint16_t iobase, uint16_t reg, uint32_t mask) 246 246 { 247 247 outpd(iobase + AHCI_REG_IDX, reg);
Note:
See TracChangeset
for help on using the changeset viewer.