mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:47:35 +00:00
Kernel: Rename PCI::DeviceController => PCI::Device
Now that the old PCI::Device was removed, we can complete the PCI changes by making the PCI::DeviceController to be named PCI::Device. Really the entire purpose and the distinction between the two was about interrupts, but since this is no longer a problem, just rename it to simplify things further.
This commit is contained in:
parent
7b9c3439ec
commit
aacb1f0bf4
30 changed files with 50 additions and 54 deletions
|
@ -255,8 +255,7 @@ class MMIOAccess;
|
|||
class WindowedMMIOAccess;
|
||||
class IOAccess;
|
||||
class MMIOSegment;
|
||||
class DeviceController;
|
||||
|
||||
class Device;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <Kernel/Bus/PCI/DeviceController.h>
|
||||
#include <Kernel/Bus/PCI/Device.h>
|
||||
|
||||
namespace Kernel {
|
||||
namespace PCI {
|
||||
|
||||
DeviceController::DeviceController(Address address)
|
||||
Device::Device(Address address)
|
||||
: m_pci_address(address)
|
||||
{
|
||||
}
|
||||
|
||||
bool DeviceController::is_msi_capable() const
|
||||
bool Device::is_msi_capable() const
|
||||
{
|
||||
for (const auto& capability : PCI::get_physical_id(pci_address()).capabilities()) {
|
||||
if (capability.id() == PCI_CAPABILITY_MSI)
|
||||
|
@ -22,7 +22,7 @@ bool DeviceController::is_msi_capable() const
|
|||
}
|
||||
return false;
|
||||
}
|
||||
bool DeviceController::is_msix_capable() const
|
||||
bool Device::is_msix_capable() const
|
||||
{
|
||||
for (const auto& capability : PCI::get_physical_id(pci_address()).capabilities()) {
|
||||
if (capability.id() == PCI_CAPABILITY_MSIX)
|
||||
|
@ -31,28 +31,28 @@ bool DeviceController::is_msix_capable() const
|
|||
return false;
|
||||
}
|
||||
|
||||
void DeviceController::enable_pin_based_interrupts() const
|
||||
void Device::enable_pin_based_interrupts() const
|
||||
{
|
||||
PCI::enable_interrupt_line(pci_address());
|
||||
}
|
||||
void DeviceController::disable_pin_based_interrupts() const
|
||||
void Device::disable_pin_based_interrupts() const
|
||||
{
|
||||
PCI::disable_interrupt_line(pci_address());
|
||||
}
|
||||
|
||||
void DeviceController::enable_message_signalled_interrupts()
|
||||
void Device::enable_message_signalled_interrupts()
|
||||
{
|
||||
TODO();
|
||||
}
|
||||
void DeviceController::disable_message_signalled_interrupts()
|
||||
void Device::disable_message_signalled_interrupts()
|
||||
{
|
||||
TODO();
|
||||
}
|
||||
void DeviceController::enable_extended_message_signalled_interrupts()
|
||||
void Device::enable_extended_message_signalled_interrupts()
|
||||
{
|
||||
TODO();
|
||||
}
|
||||
void DeviceController::disable_extended_message_signalled_interrupts()
|
||||
void Device::disable_extended_message_signalled_interrupts()
|
||||
{
|
||||
TODO();
|
||||
}
|
|
@ -10,11 +10,11 @@
|
|||
#include <Kernel/Bus/PCI/Definitions.h>
|
||||
|
||||
namespace Kernel {
|
||||
class PCI::DeviceController {
|
||||
class PCI::Device {
|
||||
public:
|
||||
Address pci_address() const { return m_pci_address; };
|
||||
|
||||
virtual ~DeviceController() = default;
|
||||
virtual ~Device() = default;
|
||||
void enable_pin_based_interrupts() const;
|
||||
void disable_pin_based_interrupts() const;
|
||||
|
||||
|
@ -28,7 +28,7 @@ public:
|
|||
void disable_extended_message_signalled_interrupts();
|
||||
|
||||
protected:
|
||||
explicit DeviceController(Address pci_address);
|
||||
explicit Device(Address pci_address);
|
||||
|
||||
private:
|
||||
Address m_pci_address;
|
|
@ -92,7 +92,7 @@ KResult UHCIController::initialize()
|
|||
}
|
||||
|
||||
UNMAP_AFTER_INIT UHCIController::UHCIController(PCI::Address address)
|
||||
: PCI::DeviceController(address)
|
||||
: PCI::Device(address)
|
||||
, IRQHandler(PCI::get_interrupt_line(address))
|
||||
, m_io_base(PCI::get_BAR4(pci_address()) & ~1)
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <AK/Platform.h>
|
||||
|
||||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <Kernel/Bus/PCI/DeviceController.h>
|
||||
#include <Kernel/Bus/PCI/Device.h>
|
||||
#include <Kernel/Bus/USB/UHCI/UHCIDescriptorPool.h>
|
||||
#include <Kernel/Bus/USB/UHCI/UHCIDescriptorTypes.h>
|
||||
#include <Kernel/Bus/USB/UHCI/UHCIRootHub.h>
|
||||
|
@ -25,7 +25,7 @@ namespace Kernel::USB {
|
|||
|
||||
class UHCIController final
|
||||
: public USBController
|
||||
, public PCI::DeviceController
|
||||
, public PCI::Device
|
||||
, public IRQHandler {
|
||||
|
||||
static constexpr u8 MAXIMUM_NUMBER_OF_TDS = 128; // Upper pool limit. This consumes the second page we have allocated
|
||||
|
|
|
@ -44,7 +44,7 @@ UNMAP_AFTER_INIT void VirtIO::detect()
|
|||
}
|
||||
|
||||
UNMAP_AFTER_INIT VirtIODevice::VirtIODevice(PCI::Address address, String class_name)
|
||||
: PCI::DeviceController(address)
|
||||
: PCI::Device(address)
|
||||
, IRQHandler(PCI::get_interrupt_line(address))
|
||||
, m_class_name(move(class_name))
|
||||
, m_io_base(IOAddress(PCI::get_BAR0(pci_address()) & ~1))
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <AK/NonnullOwnPtrVector.h>
|
||||
#include <Kernel/Bus/PCI/Access.h>
|
||||
#include <Kernel/Bus/PCI/DeviceController.h>
|
||||
#include <Kernel/Bus/PCI/Device.h>
|
||||
#include <Kernel/Bus/VirtIO/VirtIOQueue.h>
|
||||
#include <Kernel/IO.h>
|
||||
#include <Kernel/Interrupts/IRQHandler.h>
|
||||
|
@ -85,7 +85,7 @@ public:
|
|||
};
|
||||
|
||||
class VirtIODevice
|
||||
: public PCI::DeviceController
|
||||
: public PCI::Device
|
||||
, public IRQHandler {
|
||||
public:
|
||||
virtual ~VirtIODevice() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue