summaryrefslogtreecommitdiff
path: root/Kernel/Devices
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-04 11:04:50 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-04 11:06:10 +0200
commit8cbb38a237df5756ba9ad0ee331b212b7dde9263 (patch)
tree16a61cb54832d0b26662a994a7716d9f55415293 /Kernel/Devices
parentdeb31645aa25db3cfd6b490a76ff7fdc900602ba (diff)
downloadserenity-8cbb38a237df5756ba9ad0ee331b212b7dde9263.zip
Kernel: Remove unused gunk from PATADiskDevice
Diffstat (limited to 'Kernel/Devices')
-rw-r--r--Kernel/Devices/PATADiskDevice.cpp81
-rw-r--r--Kernel/Devices/PATADiskDevice.h7
2 files changed, 4 insertions, 84 deletions
diff --git a/Kernel/Devices/PATADiskDevice.cpp b/Kernel/Devices/PATADiskDevice.cpp
index 778bbcaf12..8c017e5d7a 100644
--- a/Kernel/Devices/PATADiskDevice.cpp
+++ b/Kernel/Devices/PATADiskDevice.cpp
@@ -1,82 +1,5 @@
-#include "PATADiskDevice.h"
-#include <Kernel/Arch/i386/PIC.h>
-#include <Kernel/FileSystem/ProcFS.h>
-#include <Kernel/IO.h>
-#include <Kernel/Process.h>
-#include <Kernel/StdLib.h>
-#include <Kernel/VM/MemoryManager.h>
-
-//#define DISK_DEBUG
-
-#define IRQ_FIXED_DISK 14
-
-#define ATA_SR_BSY 0x80
-#define ATA_SR_DRDY 0x40
-#define ATA_SR_DF 0x20
-#define ATA_SR_DSC 0x10
-#define ATA_SR_DRQ 0x08
-#define ATA_SR_CORR 0x04
-#define ATA_SR_IDX 0x02
-#define ATA_SR_ERR 0x01
-
-#define ATA_ER_BBK 0x80
-#define ATA_ER_UNC 0x40
-#define ATA_ER_MC 0x20
-#define ATA_ER_IDNF 0x10
-#define ATA_ER_MCR 0x08
-#define ATA_ER_ABRT 0x04
-#define ATA_ER_TK0NF 0x02
-#define ATA_ER_AMNF 0x01
-
-#define ATA_CMD_READ_PIO 0x20
-#define ATA_CMD_READ_PIO_EXT 0x24
-#define ATA_CMD_READ_DMA 0xC8
-#define ATA_CMD_READ_DMA_EXT 0x25
-#define ATA_CMD_WRITE_PIO 0x30
-#define ATA_CMD_WRITE_PIO_EXT 0x34
-#define ATA_CMD_WRITE_DMA 0xCA
-#define ATA_CMD_WRITE_DMA_EXT 0x35
-#define ATA_CMD_CACHE_FLUSH 0xE7
-#define ATA_CMD_CACHE_FLUSH_EXT 0xEA
-#define ATA_CMD_PACKET 0xA0
-#define ATA_CMD_IDENTIFY_PACKET 0xA1
-#define ATA_CMD_IDENTIFY 0xEC
-
-#define ATAPI_CMD_READ 0xA8
-#define ATAPI_CMD_EJECT 0x1B
-
-#define ATA_IDENT_DEVICETYPE 0
-#define ATA_IDENT_CYLINDERS 2
-#define ATA_IDENT_HEADS 6
-#define ATA_IDENT_SECTORS 12
-#define ATA_IDENT_SERIAL 20
-#define ATA_IDENT_MODEL 54
-#define ATA_IDENT_CAPABILITIES 98
-#define ATA_IDENT_FIELDVALID 106
-#define ATA_IDENT_MAX_LBA 120
-#define ATA_IDENT_COMMANDSETS 164
-#define ATA_IDENT_MAX_LBA_EXT 200
-
-#define IDE_ATA 0x00
-#define IDE_ATAPI 0x01
-
-#define ATA_REG_DATA 0x00
-#define ATA_REG_ERROR 0x01
-#define ATA_REG_FEATURES 0x01
-#define ATA_REG_SECCOUNT0 0x02
-#define ATA_REG_LBA0 0x03
-#define ATA_REG_LBA1 0x04
-#define ATA_REG_LBA2 0x05
-#define ATA_REG_HDDEVSEL 0x06
-#define ATA_REG_COMMAND 0x07
-#define ATA_REG_STATUS 0x07
-#define ATA_REG_SECCOUNT1 0x08
-#define ATA_REG_LBA3 0x09
-#define ATA_REG_LBA4 0x0A
-#define ATA_REG_LBA5 0x0B
-#define ATA_REG_CONTROL 0x0C
-#define ATA_REG_ALTSTATUS 0x0C
-#define ATA_REG_DEVADDRESS 0x0D
+#include <Kernel/Devices/PATAChannel.h>
+#include <Kernel/Devices/PATADiskDevice.h>
NonnullRefPtr<PATADiskDevice> PATADiskDevice::create(PATAChannel& channel, DriveType type, int major, int minor)
{
diff --git a/Kernel/Devices/PATADiskDevice.h b/Kernel/Devices/PATADiskDevice.h
index 8b191ad87b..0dbf1b4afe 100644
--- a/Kernel/Devices/PATADiskDevice.h
+++ b/Kernel/Devices/PATADiskDevice.h
@@ -4,14 +4,11 @@
//
#pragma once
-#include <AK/RefPtr.h>
#include <Kernel/Devices/DiskDevice.h>
-#include <Kernel/Devices/PATAChannel.h>
#include <Kernel/IRQHandler.h>
#include <Kernel/Lock.h>
-#include <Kernel/PCI.h>
-#include <Kernel/VM/PhysicalAddress.h>
-#include <Kernel/VM/PhysicalPage.h>
+
+class PATAChannel;
class PATADiskDevice final : public DiskDevice {
AK_MAKE_ETERNAL