Re: [PATCH v4 2/2] Bluetooth: btmrvl add firmware dump support

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

 



Hi Amitkumar,

> This patch adds firmware dump support for marvell
> bluetooth chipset. Currently only SD8897 is supported.
> This is implemented based on dev_coredump, a new mechnism
> introduced in kernel 3.18rc3
> 
> Firmware dump can be trigger by
> echo 1 > /sys/kernel/debug/bluetooth/hci*/config/fw_dump
> and when the dump operation is completed, data can be read by
> cat /sys/class/devcoredump/devcd*/data
> 
> We have prepared following script to divide fw memory
> dump data into multiple files based on memory type.
> 
> [root]# cat btmrvl_split_dump_data.sh
> #!/bin/bash
> # usage: ./btmrvl_split_dump_data.sh dump_data
> 
> fw_dump_data=$1
> 
> mem_type="ITCM DTCM SQRAM APU CIU ICU MAC EXT7 EXT8 EXT9 EXT10 EXT11 EXT12 EXT13 EXTLAST"
> 
> for name in ${mem_type[@]}
> do
>         sed -n "/Start dump $name/,/End dump/p" $fw_dump_data  > tmp.$name.log
>         if [ ! -s tmp.$name.log ]
>                 then
>                         rm -rf tmp.$name.log
>                 else
>                         # Remove the describle info "Start dump" and "End dump"
>                         sed '1d' tmp.$name.log | sed '$d' > /data/$name.log
>                         if [ -s /data/$name.log ]
>                         then
>                                 echo "generate /data/$name.log"
>                         else
>                                 sed '1d' tmp.$name.log | sed '$d' > /var/$name.log
>                                 echo "generate /var/$name.log"
>                         fi
>                         rm -rf tmp.$name.log
>         fi
> done
> 
> Signed-off-by: Xinming Hu <huxm@xxxxxxxxxxx>
> Signed-off-by: Cathy Luo <cluo@xxxxxxxxxxx>
> Signed-off-by: Avinash Patil <patila@xxxxxxxxxxx>
> Reviewed-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
> Reviewed-by: Marcel Holtmann <marcel@xxxxxxxxxxxx>
> Signed-off-by: Amitkumar Karwar <akarwar@xxxxxxxxxxx>
> ---
> v4: Change if/else check to improve readability
>    Move "#include <linux/devcoredump.h>" to btmrvl_sdio.c file.
>    Don't expose debugfs entry by showing an error when the callback is
>    not defined.
>    BT_ERR/BT_INFO already takes care of newline. Remove extra "\n" in
>    the message.
> v3: Change fw_dump debugfs file permissions to write only
>    Replace kstrtol with strtobool
> v2: Add "select WANT_DEV_COREDUMP" in Kconfig
>    Use write debugfs command instead of read to trigger dump operation.
> ---
> drivers/bluetooth/Kconfig          |   1 +
> drivers/bluetooth/btmrvl_debugfs.c |  31 ++++
> drivers/bluetooth/btmrvl_drv.h     |  20 +++
> drivers/bluetooth/btmrvl_main.c    |   7 +
> drivers/bluetooth/btmrvl_sdio.c    | 300 +++++++++++++++++++++++++++++++++++++
> drivers/bluetooth/btmrvl_sdio.h    |   5 +
> 6 files changed, 364 insertions(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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