summaryrefslogtreecommitdiff
path: root/src/southbridge/intel/i82801gx/ide.c
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2020-05-21 09:04:16 +0200
committerPatrick Georgi <pgeorgi@google.com>2020-05-26 15:12:19 +0000
commitae22fe293fc97a9f6b0fbf52230277b2a4332cda (patch)
treecae4d7cb79e527ba92b8a3ce1022c14693e77a4b /src/southbridge/intel/i82801gx/ide.c
parent2f2191a3d0876fb90ab0c5f09e1c802b0a89b83e (diff)
sb/intel/i82801gx: Use macro instead of numbers
Change-Id: Ide6516937ea79c35cd54127ed2823352a1cac6d4 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41611 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/southbridge/intel/i82801gx/ide.c')
-rw-r--r--src/southbridge/intel/i82801gx/ide.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/southbridge/intel/i82801gx/ide.c b/src/southbridge/intel/i82801gx/ide.c
index f1ccd0f295..5c4c96d8c8 100644
--- a/src/southbridge/intel/i82801gx/ide.c
+++ b/src/southbridge/intel/i82801gx/ide.c
@@ -40,10 +40,10 @@ static void ide_init(struct device *dev)
if (enable_primary) {
/* Enable primary IDE interface. */
ideTimingConfig |= IDE_DECODE_ENABLE;
- ideTimingConfig |= (2 << 12); // ISP = 3 clocks
- ideTimingConfig |= (3 << 8); // RCT = 1 clock
- ideTimingConfig |= (1 << 1); // IE0
- ideTimingConfig |= (1 << 0); // TIME0
+ ideTimingConfig |= IDE_ISP_3_CLOCKS;
+ ideTimingConfig |= IDE_RCT_1_CLOCKS;
+ ideTimingConfig |= IDE_IE0;
+ ideTimingConfig |= IDE_TIME0; // TIME0
printk(BIOS_DEBUG, " IDE0");
}
pci_write_config16(dev, IDE_TIM_PRI, ideTimingConfig);
@@ -54,10 +54,10 @@ static void ide_init(struct device *dev)
if (enable_secondary) {
/* Enable secondary IDE interface. */
ideTimingConfig |= IDE_DECODE_ENABLE;
- ideTimingConfig |= (2 << 12); // ISP = 3 clocks
- ideTimingConfig |= (3 << 8); // RCT = 1 clock
- ideTimingConfig |= (1 << 1); // IE0
- ideTimingConfig |= (1 << 0); // TIME0
+ ideTimingConfig |= IDE_ISP_3_CLOCKS;
+ ideTimingConfig |= IDE_RCT_1_CLOCKS;
+ ideTimingConfig |= IDE_IE0;
+ ideTimingConfig |= IDE_TIME0;
printk(BIOS_DEBUG, " IDE1");
}
pci_write_config16(dev, IDE_TIM_SEC, ideTimingConfig);