feat: Raspberry Pi 4/400 Bluetooth over mini UART (H4, Broadcom patchram, firmware mailbox BT_ON); move BT stack to Drivers/Bluetooth
This commit is contained in:
1 parent
808e1d66fd
commit
ffee9002a6
38 files changed
+2176
-141
No files matched your search
@@ -19,7 +19,8 @@
|
||||
#include <Drivers/Net/Wifi/Wifi.hpp>
|
||||
#include <Drivers/Audio/IntelHda.hpp>
|
||||
#include <Drivers/USB/Xhci.hpp>
|
||||
#include <Drivers/USB/Bluetooth/Bluetooth.hpp>
|
||||
#include <Drivers/Bluetooth/Bluetooth.hpp>
|
||||
#include <Drivers/Serial/BtUart.hpp>
|
||||
#include <Drivers/USB/HidKeyboard.hpp>
|
||||
|
||||
using namespace Kt;
|
||||
@@ -58,7 +59,10 @@ namespace Timekeeping {
|
||||
// desktop may never enter idle. Force one bounded idle-context
|
||||
// pass for USB immediately, and for network RX at most every
|
||||
// 10 ms (important for E1000E's polling fallback).
|
||||
bool usbWork = Drivers::USB::Xhci::HasDeferredWork();
|
||||
// UART Bluetooth (Raspberry Pi) has no xHCI behind it: its
|
||||
// received bytes wait in the UART ring for the same pass.
|
||||
bool usbWork = Drivers::USB::Xhci::HasDeferredWork() ||
|
||||
Drivers::Serial::BtUart::HasRxData();
|
||||
bool audioWork = Drivers::Audio::IntelHda::HasDeferredWork();
|
||||
bool netWork = Drivers::Net::E1000::HasDeferredWork() ||
|
||||
Drivers::Net::E1000E::HasDeferredWork();
|
||||
@@ -185,9 +189,9 @@ namespace Timekeeping {
|
||||
// Cheap no-op unless an adapter is waiting; self-claiming, and safe
|
||||
// to preempt (the scheduler saves/resumes the idle context).
|
||||
bool bluetoothWork = usbWork ||
|
||||
Drivers::USB::Bluetooth::HasDeferredWork();
|
||||
Drivers::Bluetooth::HasDeferredWork();
|
||||
if (bluetoothWork)
|
||||
Drivers::USB::Bluetooth::ServiceDeferredInit();
|
||||
Drivers::Bluetooth::ServiceDeferredInit();
|
||||
|
||||
// Service Bluetooth inbound traffic (the headset's SDP/AVRCP queries,
|
||||
// AVDTP commands, ACL flow-control credits) whenever a core idles.
|
||||
@@ -197,7 +201,7 @@ namespace Timekeeping {
|
||||
// queries never answered). Self-serializing and a cheap no-op when
|
||||
// the adapter is down.
|
||||
if (bluetoothWork)
|
||||
Drivers::USB::Bluetooth::ServiceEvents();
|
||||
Drivers::Bluetooth::ServiceEvents();
|
||||
|
||||
// Wi-Fi mirrors the Bluetooth split: the firmware load needs the
|
||||
// ramdisk, and the RX/notification ring must be drained outside hard
|
||||
|
||||
Reference in new issue
Block a user