summaryrefslogtreecommitdiff
path: root/Kernel/Devices/PATAChannel.h
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2020-03-01 20:47:11 +0200
committerAndreas Kling <kling@serenityos.org>2020-03-02 22:23:39 +0100
commit19aa53e1f96745b1f3a90c94f8d24c92e68d4372 (patch)
treed4fd4d04ab415a81120db15ec9f6dbb1f352fdc7 /Kernel/Devices/PATAChannel.h
parent15dfca4a7938427f175f416aa70cdb5490e638f9 (diff)
downloadserenity-19aa53e1f96745b1f3a90c94f8d24c92e68d4372.zip
Kernel: Use IOAddress class in PATAChannel class
This change make the code a bit more readable. Also, kprintf() calls are replaced with klog() calls.
Diffstat (limited to 'Kernel/Devices/PATAChannel.h')
-rw-r--r--Kernel/Devices/PATAChannel.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Kernel/Devices/PATAChannel.h b/Kernel/Devices/PATAChannel.h
index ba8264ab5f..902c9bad68 100644
--- a/Kernel/Devices/PATAChannel.h
+++ b/Kernel/Devices/PATAChannel.h
@@ -43,6 +43,7 @@
#include <Kernel/PCI/Device.h>
#include <Kernel/VM/PhysicalPage.h>
#include <Kernel/WaitQueue.h>
+#include <LibBareMetal/IO.h>
#include <LibBareMetal/Memory/PhysicalAddress.h>
namespace Kernel {
@@ -86,8 +87,8 @@ private:
// Data members
u8 m_channel_number { 0 }; // Channel number. 0 = master, 1 = slave
- u16 m_io_base { 0x1F0 };
- u16 m_control_base { 0 };
+ IOAddress m_io_base;
+ IOAddress m_control_base;
volatile u8 m_device_error { 0 };
WaitQueue m_irq_queue;
@@ -95,7 +96,7 @@ private:
PhysicalRegionDescriptor& prdt() { return *reinterpret_cast<PhysicalRegionDescriptor*>(m_prdt_page->paddr().offset(0xc0000000).as_ptr()); }
RefPtr<PhysicalPage> m_prdt_page;
RefPtr<PhysicalPage> m_dma_buffer_page;
- u16 m_bus_master_base { 0 };
+ IOAddress m_bus_master_base;
Lockable<bool> m_dma_enabled;
RefPtr<PATADiskDevice> m_master;