summaryrefslogtreecommitdiff
path: root/firmware/drivers/ata.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/ata.c')
-rw-r--r--firmware/drivers/ata.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 88633f0ec9..adc720eaf8 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -1268,7 +1268,7 @@ static int set_multiple_mode(int sectors)
1268#ifdef HAVE_ATA_DMA 1268#ifdef HAVE_ATA_DMA
1269static int get_best_mode(unsigned short identword, int max, int modetype) 1269static int get_best_mode(unsigned short identword, int max, int modetype)
1270{ 1270{
1271 unsigned short testbit = 1u << max; 1271 unsigned short testbit = BIT_N(max);
1272 1272
1273 while (1) { 1273 while (1) {
1274 if (identword & testbit) 1274 if (identword & testbit)
@@ -1335,7 +1335,7 @@ static int set_features(void)
1335 } 1335 }
1336 1336
1337 for (i=0; i < (int)(sizeof(features)/sizeof(features[0])); i++) { 1337 for (i=0; i < (int)(sizeof(features)/sizeof(features[0])); i++) {
1338 if (identify_info[features[i].id_word] & (1u << features[i].id_bit)) { 1338 if (identify_info[features[i].id_word] & BIT_N(features[i].id_bit)) {
1339 SET_REG(ATA_FEATURE, features[i].subcommand); 1339 SET_REG(ATA_FEATURE, features[i].subcommand);
1340 SET_REG(ATA_NSECTOR, features[i].parameter); 1340 SET_REG(ATA_NSECTOR, features[i].parameter);
1341 SET_REG(ATA_COMMAND, CMD_SET_FEATURES); 1341 SET_REG(ATA_COMMAND, CMD_SET_FEATURES);
@@ -1461,7 +1461,7 @@ int ata_init(void)
1461#ifdef MAX_PHYS_SECTOR_SIZE 1461#ifdef MAX_PHYS_SECTOR_SIZE
1462 /* Find out the physical sector size */ 1462 /* Find out the physical sector size */
1463 if((identify_info[106] & 0xe000) == 0x6000) 1463 if((identify_info[106] & 0xe000) == 0x6000)
1464 phys_sector_mult = 1 << (identify_info[106] & 0x000f); 1464 phys_sector_mult = BIT_N(identify_info[106] & 0x000f);
1465 else 1465 else
1466 phys_sector_mult = 1; 1466 phys_sector_mult = 1;
1467 1467