From 637c74ac938f14c03c16a6ae3eb0915a65b88cbd Mon Sep 17 00:00:00 2001 From: Edwin Rijkee Date: Thu, 10 Aug 2023 23:19:09 +0200 Subject: [PATCH] Kernel: Add PCISerialDevice WCH CH351 IDs Add the device ID for PCI serial port cards that use the WCH CH351 chip. This device has been tested with real hardware where the serial debug output could succesfully be received. --- Kernel/Devices/PCISerialDevice.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Kernel/Devices/PCISerialDevice.h b/Kernel/Devices/PCISerialDevice.h index c53901648f..39062ef38f 100644 --- a/Kernel/Devices/PCISerialDevice.h +++ b/Kernel/Devices/PCISerialDevice.h @@ -30,11 +30,12 @@ private: SerialDevice::Baud baud_rate { SerialDevice::Baud::Baud38400 }; }; - static constexpr BoardDefinition board_definitions[4] = { - { { PCI::VendorID::WCH, 0x3253 }, "WCH CH382 2S"sv, 2, 0, 0xC0, 8, SerialDevice::Baud::Baud115200 }, + static constexpr BoardDefinition board_definitions[] = { { { PCI::VendorID::RedHat, 0x0002 }, "QEMU PCI 16550A"sv, 1, 0, 0, 8, SerialDevice::Baud::Baud115200 }, { { PCI::VendorID::RedHat, 0x0003 }, "QEMU PCI Dual-port 16550A"sv, 2, 0, 0, 8, SerialDevice::Baud::Baud115200 }, - { { PCI::VendorID::RedHat, 0x0004 }, "QEMU PCI Quad-port 16550A"sv, 4, 0, 0, 8, SerialDevice::Baud::Baud115200 } + { { PCI::VendorID::RedHat, 0x0004 }, "QEMU PCI Quad-port 16550A"sv, 4, 0, 0, 8, SerialDevice::Baud::Baud115200 }, + { { PCI::VendorID::WCH, 0x2273 }, "WCH CH351"sv, 2, 0, 0, 8, SerialDevice::Baud::Baud115200 }, + { { PCI::VendorID::WCH, 0x3253 }, "WCH CH382 2S"sv, 2, 0, 0xC0, 8, SerialDevice::Baud::Baud115200 } }; };