Update coding style of ATA driver.

This commit is contained in:
Jonas 'Sortie' Termansen 2012-10-17 11:33:47 +02:00
parent c9b3002e43
commit 4f60d028ef
2 changed files with 358 additions and 355 deletions

View File

@ -33,8 +33,8 @@
// TODO: Use the PCI to detect ATA devices instead of relying on them being on
// standard locations.
namespace Sortix
{
namespace Sortix {
const uint16_t PRIMARY_BUS_OFFSET = 0x1F0;
const uint16_t SECONDARY_BUS_OFFSET = 0x170;
const uint16_t DATA = 0x0;
@ -60,8 +60,8 @@ namespace Sortix
const uint8_t CTL_NO_INTERRUPT = (1<<1);
const uint8_t CTL_RESET = (1<<2);
namespace ATA
{
namespace ATA {
void DetectDrive(unsigned busid, ATABus* bus, unsigned driveid)
{
unsigned ataid = busid*2 + driveid;
@ -96,7 +96,8 @@ namespace Sortix
}
return new ATABus(portoffset, altport);
}
}
} // namespace ATA
void Wait400NSecs(uint16_t iobase)
{
@ -361,5 +362,5 @@ namespace Sortix
bus->SelectDrive(driveid);
CPU::OutPortB(iobase + COMMAND, CTL_NO_INTERRUPT);
}
}
} // namespace Sortix

View File

@ -27,8 +27,8 @@
#include <sortix/kernel/kthread.h>
namespace Sortix
{
namespace Sortix {
class ATABus;
class ATADrive;
@ -81,11 +81,13 @@ namespace Sortix
};
namespace ATA
{
namespace ATA {
void Init();
ATABus* CreateBus(uint16_t portoffset, uint16_t altport);
}
}
} // namespace ATA
} // namespace Sortix
#endif