mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:57:34 +00:00
Kernel/Storage: Unify all ATA devices
There's basically no real difference in software between a SATA harddisk and IDE harddisk. The difference in the implementation is for the host bus adapter protocol and registers layout. Therefore, there's no point in putting a distinction in software to these devices. This change also greatly simplifies and removes stale APIs and removes unnecessary parameters in constructor calls, which tighten things further everywhere.
This commit is contained in:
parent
9f501d7e71
commit
741c871bc1
29 changed files with 352 additions and 276 deletions
|
@ -22,7 +22,7 @@
|
|||
#include <Kernel/Sections.h>
|
||||
#include <Kernel/Storage/AHCI.h>
|
||||
#include <Kernel/Storage/AHCIPortHandler.h>
|
||||
#include <Kernel/Storage/StorageDevice.h>
|
||||
#include <Kernel/Storage/ATADevice.h>
|
||||
#include <Kernel/WaitQueue.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
@ -30,11 +30,11 @@ namespace Kernel {
|
|||
class AsyncBlockDeviceRequest;
|
||||
|
||||
class AHCIPortHandler;
|
||||
class SATADiskDevice;
|
||||
class AHCIPort : public RefCounted<AHCIPort>
|
||||
class AHCIPort
|
||||
: public RefCounted<AHCIPort>
|
||||
, public Weakable<AHCIPort> {
|
||||
friend class AHCIPortHandler;
|
||||
friend class SATADiskDevice;
|
||||
friend class AHCIController;
|
||||
|
||||
public:
|
||||
UNMAP_AFTER_INIT static NonnullRefPtr<AHCIPort> create(const AHCIPortHandler&, volatile AHCI::PortRegisters&, u32 port_index);
|
||||
|
@ -114,7 +114,7 @@ private:
|
|||
RefPtr<Memory::PhysicalPage> m_command_list_page;
|
||||
OwnPtr<Memory::Region> m_command_list_region;
|
||||
RefPtr<Memory::PhysicalPage> m_fis_receive_page;
|
||||
RefPtr<StorageDevice> m_connected_device;
|
||||
RefPtr<ATADevice> m_connected_device;
|
||||
|
||||
u32 m_port_index;
|
||||
volatile AHCI::PortRegisters& m_port_registers;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue