08 Dec, 2016

1 commit


03 May, 2016

1 commit

  • On some arm-based platforms, we need to configure platform specific
    parameters by device tree node and also define our node as a child
    node of parent SDIO host controller.
    This patch parses these parameters from device tree. It includes
    calibration data download to firmware, wakeup pin configured to firmware,
    and soc specific wake up gpio, which will be set as wakeup interrupt pin.

    Signed-off-by: Xinming Hu
    Signed-off-by: Amitkumar Karwar
    Signed-off-by: Marcel Holtmann

    Xinming Hu
     

06 Jan, 2016

1 commit

  • Usually when driver sends data to firmware it receives TX_DONE
    (DN_LD_HOST_INT_STATUS) interrupt from firmware right away.
    It's also observed that some times the fireware could delay
    sending DN_LD_HOST_INT_STATUS interrupt. If driver sends data to
    firmware during suspend processing and the TX_DONE interrupt is
    delayed, it may come back at wrong time when SDIO host driver is
    in the middle of suspending.

    Block any data from stack while suspending. Also skip sending
    data that are already in driver tx_queue.

    Don't purge the skb queue on suspend to avoid intermittent music
    after system resumes from S3.

    Signed-off-by: Chin-Ran Lo
    Signed-off-by: Amitkumar Karwar
    Signed-off-by: Marcel Holtmann

    Chin-Ran Lo
     

27 Jul, 2015

1 commit


14 Feb, 2015

1 commit


08 Jan, 2015

1 commit


06 Jan, 2015

1 commit


04 Dec, 2014

1 commit

  • 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
    Signed-off-by: Cathy Luo
    Signed-off-by: Avinash Patil
    Reviewed-by: Johannes Berg
    Reviewed-by: Marcel Holtmann
    Signed-off-by: Amitkumar Karwar
    Signed-off-by: Marcel Holtmann

    Xinming Hu
     

19 Jul, 2014

1 commit


03 Jul, 2014

3 commits

  • This patch fixes the following sparse warning caused by a missing
    declaration in the header file:

    drivers/bluetooth/btmrvl_main.c:218:5: warning: symbol 'btmrvl_pscan_window_reporting' was not declared. Should it be static?

    Signed-off-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann

    Johan Hedberg
     
  • After BT_CMD_HOST_SLEEP_ENABLE command finishes, driver should
    wait until getting BT_EVENT_HOST_SLEEP_ENABLE event to complete
    suspend procedure.
    Without this patch the suspend handler would return success
    earlier. By the time when the BT_EVENT_HOST_SLEEP_ENABLE event
    comes in the controller driver could have already turned off the
    bus clock. This causes kernel crash or system reboot eventually.

    Cc: # 3.13+
    Signed-off-by: Chin-Ran Lo
    Signed-off-by: Jeff CF Chen
    Signed-off-by: Amitkumar Karwar
    Signed-off-by: Bing Zhao
    Signed-off-by: Marcel Holtmann

    Chin-Ran Lo
     
  • A vendor specific command is sent to firmware during
    initialization to enable this feature. This command is for
    SD8897 only.

    Signed-off-by: Bing Zhao
    Signed-off-by: Marcel Holtmann

    Bing Zhao
     

24 Apr, 2014

1 commit


29 Mar, 2014

1 commit


04 Dec, 2013

3 commits

  • The device tree property can define the cal-data in proper order.
    There is no need to swap the bytes in driver.
    Also remove the redundant cal-data memory copy after removing the
    byte swapping.

    Cc: Mike Frysinger
    Cc: Amitkumar Karwar
    Signed-off-by: Bing Zhao
    Signed-off-by: Hyuckjoo Lee
    Signed-off-by: Marcel Holtmann

    Bing Zhao
     
  • Some ARM versions of Chromebook need to download a new calibration
    data from host driver to firmware. They do have EEPROM but still
    need a piece of new calibration data in test mode.

    The cal-data is platform dependent. It's simpler and more feasible
    to use device tree based cal-data instead of configuration file
    based cal-data.

    This patch remove configuration file based cal-data downloading
    and replace it using cal-data from device tree.

    When CONFIG_OF is not selected, or the specific property is not
    present in the device tree, the calibration downloading will not
    happen.

    Cc: Mike Frysinger
    Cc: Amitkumar Karwar
    Signed-off-by: Bing Zhao
    Signed-off-by: Hyuckjoo Lee
    Signed-off-by: Marcel Holtmann

    Bing Zhao
     
  • Replace ogf/ocf and its packing with 16-bit opcodes.

    Signed-off-by: Bing Zhao
    Signed-off-by: Amitkumar Karwar
    Signed-off-by: Marcel Holtmann

    Bing Zhao
     

02 Oct, 2013

2 commits


19 Jun, 2012

1 commit


09 May, 2012

2 commits

  • Host sleep is activated using already configured host sleep
    parameters in suspend handler and it is cancelled in resume
    handler.

    Signed-off-by: Amitkumar Karwar
    Signed-off-by: Bing Zhao
    Acked-by: Marcel Holtmann
    Signed-off-by: Gustavo Padovan

    Amitkumar Karwar
     
  • Currently debugfs commands "hscfgcmd" and "gpiogap" are provided
    for host sleep configuration. But if user doesn't configure host
    sleep parameters using these commands, host sleep activation is
    failed during suspend (support for suspend and resume handlers is
    added in next patch).

    Default host sleep configuration is done during driver initialisation
    in this patch.

    Signed-off-by: Amitkumar Karwar
    Signed-off-by: Bing Zhao
    Signed-off-by: Gustavo Padovan

    Amitkumar Karwar
     

22 Jul, 2010

2 commits

  • Use the __packed annotation instead of the __attribute__((packed)).

    Signed-off-by: Gustavo F. Padovan
    Signed-off-by: Marcel Holtmann

    Gustavo F. Padovan
     
  • When driver is sending a command or data and the firmware is also
    sending a sleep event, sometimes it is observed that driver will
    continue to send the command/data to firmware right after processing
    sleep event. Once sleep event is processed driver is not supposed to
    send anything because firmware is in sleep state after that. Previously
    interrupt processing was done in SDIO interrupt callback handler.
    Now it is done in btmrvl driver main thread to solve the
    cross-sending properly.

    Signed-off-by: Amitkumar Karwar
    Signed-off-by: Bing Zhao
    Signed-off-by: Marcel Holtmann

    Amitkumar Karwar
     

10 May, 2010

3 commits


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

04 Dec, 2009

1 commit


23 Aug, 2009

4 commits