RE: [PATCH v1 1/2] Bluetooth: btintel_pcie: Add handshake between driver and firmware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luiz,

Thanks for the comments.

>-----Original Message-----
>From: Luiz Augusto von Dentz <luiz.dentz@xxxxxxxxx>
>Sent: Tuesday, October 1, 2024 8:03 PM
>To: K, Kiran <kiran.k@xxxxxxxxx>
>Cc: linux-bluetooth@xxxxxxxxxxxxxxx; Srivatsa, Ravishankar
><ravishankar.srivatsa@xxxxxxxxx>; Tumkur Narayan, Chethan
><chethan.tumkur.narayan@xxxxxxxxx>; Devegowda, Chandrashekar
><chandrashekar.devegowda@xxxxxxxxx>
>Subject: Re: [PATCH v1 1/2] Bluetooth: btintel_pcie: Add handshake between
>driver and firmware
>
>Hi Kiran,
>
>On Tue, Oct 1, 2024 at 6:29 AM Kiran K <kiran.k@xxxxxxxxx> wrote:
>>
>> The following handshake mechanism needs be followed after firmware
>> download is completed to bring the firmware to running state.
>>
>> After firmware fragments of Operational image are downloaded and
>> secure sends result of the image succeeds,
>>
>> 1. Driver sends HCI Intel reset with boot option #1 to switch FW image.
>> 2. FW sends Alive GP[0] MSIx
>> 3. Driver enables data path (doorbell 0x460 for RBDs, etc...) 4.
>> Driver gets Bootup event from firmware 5. Driver performs D0 entry to
>> device (WRITE to IPC_Sleep_Control =0x0) 6. FW sends Alive GP[0] MSIx
>> 7. Device host interface is fully set for BT protocol stack operation.
>> 8. Driver may optionally get debug event with ID 0x97 which can be
>> dropped
>
>We should probably start versioning the boot sequence from the very
>beginning, 

Ack. I will start adding the version information as comments in code.

I also wonder if we should promote the use usage of something like
>the hci_init_stage_sync for such use cases so one can clearly define each step
>separately as a function which makes it very simple to reuse them in different
>init stage (operational vs intermediate).
>

I wonder this might more complexity in handling both USB and PCIE transport as most of the firmware download code is shared between them.

>> For Intermediate loadger image, all the above steps are applicable
>> expcept #5 and #6.
>>
>> On HCI_OP_RESET, firmware raises alive interrupt. Driver needs to wait
>> for it before passing control over to bluetooth stack.
>>
>> Co-developed-by: Devegowda Chandrashekar
>> <chandrashekar.devegowda@xxxxxxxxx>
>> Signed-off-by: Devegowda Chandrashekar
>> <chandrashekar.devegowda@xxxxxxxxx>
>> Signed-off-by: Kiran K <kiran.k@xxxxxxxxx>
>> ---
>>  drivers/bluetooth/btintel.c      |  56 ++++++-
>>  drivers/bluetooth/btintel.h      |   7 +
>>  drivers/bluetooth/btintel_pcie.c | 262
>> ++++++++++++++++++++++++++++++-  drivers/bluetooth/btintel_pcie.h |
>> 16 +-
>>  4 files changed, 329 insertions(+), 12 deletions(-)
>>

Thanks,
Kiran





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux