09 May, 2016

1 commit


26 Apr, 2016

8 commits

  • The omap_mbox_save_ctx() and omap_mbox_restore_ctx() API were
    previously provided to OMAP mailbox clients to save and restore
    the mailbox context during system suspend/resume. The save and
    restore functionality is now implemented through System PM driver
    callbacks, and there is no need for these functions, so kill these
    API.

    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Suman Anna
     
  • The OMAP mailbox driver is used by clients to communicate with remote
    processors in general. The mailbox clients are expected to have stopped
    communicating with these remote processors during a system suspend. The
    OMAP mailbox fifos are expected to not have any messages as such. Add a
    check for any pending unprocessed messages in the suspend callback, to
    detect any communication protocol issues of the mailbox clients. The
    system suspend is aborted if any messages are found.

    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Suman Anna
     
  • Support has been added to the OMAP mailbox driver to allow it
    to work across a system suspend/resume. The OMAP mailbox driver
    requires only the interrupt configuration registers to be saved
    and restored, and this is done in the suspend/resume callbacks.
    The registers need to be saved only if there are active clients
    at the time of suspend. The enabling and disabling of the mailbox
    clocks is done automatically by the omap_device layer.

    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Suman Anna
     
  • The interrupt type used for identifying the layout of the interrupt
    configuration registers between OMAP4+ SoCs and older SoCs is stored
    only in the sub-mailbox structures for easier access. Store this type
    in the the omap_mbox_device structure as well along with the other
    global variables. This is being done to facilitate the context save
    and restore of appropriate registers during system suspend/resume.

    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Suman Anna
     
  • Fix couple of checkpatch warnings of the type,
    "WARNING: Missing a blank line after declarations"

    Also, fixed a warning about a space after a typecast
    while at this.

    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Suman Anna
     
  • Remove the paragraph about writing to the Free Software
    Foundation's mailing address from the GPL license header
    as this address can change. This fixes the corresponding
    checkpatch warning.

    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Suman Anna
     
  • Fix the code formatting to use the kernel preferred style
    of using the actual variables to determize the size using
    the sizeof() operator. This fixes the corresponding checkpatch
    warning as well.

    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Suman Anna
     
  • OMAP mailbox devices can no longer be created in legacy non-DT
    mode, all the relevant code has been cleaned up. The OMAP mailbox
    driver will only support devices created from DT going forward,
    so drop the legacy platform device support from the driver.

    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Suman Anna
     

15 Apr, 2016

1 commit

  • Pull mailbox fixes from Jussi Brar:
    "Misc fixes:

    mailbox-test driver:
    - prevent memory leak and another cosmetic change

    mailbox:
    - change the returned error code

    Xgene driver:
    - return -ENOMEM instead of PTR_ERR for failed devm_kzalloc"

    * 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
    mailbox: Stop using ENOSYS for anything other than unimplemented syscalls
    mailbox: mailbox-test: Prevent memory leak
    mailbox: mailbox-test: Use more consistent format for calling copy_from_user()
    mailbox: xgene-slimpro: Fix wrong test for devm_kzalloc

    Linus Torvalds
     

12 Apr, 2016

3 commits


09 Apr, 2016

1 commit

  • * pm-cpufreq:
    cpufreq: dt: Drop stale comment
    cpufreq: intel_pstate: Documenation for structures
    cpufreq: intel_pstate: fix inconsistency in setting policy limits
    intel_pstate: Avoid extra invocation of intel_pstate_sample()
    intel_pstate: Do not set utilization update hook too early

    * pm-cpuidle:
    intel_idle: Add KBL support
    intel_idle: Add SKX support
    intel_idle: Clean up all registered devices on exit.
    intel_idle: Propagate hot plug errors.
    intel_idle: Don't overreact to a cpuidle registration failure.
    intel_idle: Setup the timer broadcast only on successful driver load.
    intel_idle: Avoid a double free of the per-CPU data.
    intel_idle: Fix dangling registration on error path.
    intel_idle: Fix deallocation order on the driver exit path.
    intel_idle: Remove redundant initialization calls.
    intel_idle: Fix a helper function's return value.
    intel_idle: remove useless return from void function.

    * acpi-cppc:
    mailbox: pcc: Don't access an unmapped memory address space

    Rafael J. Wysocki
     

08 Apr, 2016

1 commit


07 Apr, 2016

1 commit

  • The acpi_pcc_probe() may end up accessing memory outside of the PCCT
    table space causing the kernel panic(). Increment the pcct_entry
    pointer after parsing 'HW-reduced Communications Subspace' to fix
    the problem. This change also enables the parsing of subtable at
    index 0.

    Signed-off-by: Shanker Donthineni
    Acked-by: Ashwin Chaugule
    Signed-off-by: Rafael J. Wysocki

    Shanker Donthineni
     

23 Mar, 2016

1 commit


21 Mar, 2016

2 commits

  • Support for TI Message Manager Module. This hardware block manages a
    bunch of hardware queues meant for communication between processor
    entities.

    Clients sitting on top of this would manage the required protocol
    for communicating with the counterpart entities.

    For more details on TI Message Manager hardware block, see documentation
    that will is available here: http://www.ti.com/lit/ug/spruhy8/spruhy8.pdf
    Chapter 8.1(Message Manager)

    Signed-off-by: Nishanth Menon
    Signed-off-by: Jassi Brar

    Nishanth Menon
     
  • Pull mailbox updates from Jassi Brar:

    - mailbox bindings and drivers for
    * APM X-Gene
    * Hisilicon Hi6220
    * Rockchip RK3368
    platforms

    - minor fixes to the above three drivers.

    - misc cleanups of mailbox-test driver.

    * 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
    mailbox: rockchip: avoid 64-bit division
    mailbox: rockchip: Add Rockchip mailbox driver
    dt-bindings: rockchip-mailbox: Add mailbox controller document on Rockchip SoCs
    mailbox/xgene-slimpro: Checking for IS_ERR instead of NULL
    mailbox: Hi6220: add mailbox driver
    dt-bindings: mailbox: Document Hi6220 mailbox driver
    mailbox: mailbox-test: add support for separate tx/rx buffer with single channel
    mailbox: mailbox-test: use print_hex_dump_bytes to allow dynamic printk
    mailbox: mailbox-test: fix the compatible string
    mailbox: mailbox-test: rename driver as generic test driver
    Documentation: mailbox: Add APM X-Gene SLIMpro mailbox dts documentation
    mailbox: Add support for APM X-Gene platform mailbox driver

    Linus Torvalds
     

16 Mar, 2016

1 commit

  • The newly added rockchip mailbox driver causes a bug in
    the ARM allyesconfig build because of a division of a resource_size_t
    variable that may be 64 bit wide:

    drivers/mailbox/built-in.o: In function `rockchip_mbox_probe':
    :(.text+0x6614): undefined reference to `__aeabi_uldivmod'

    This adds a cast to size_t, which turns it into a 32-bit division
    in this case. This is safe because we know that we cannot possibly
    map a resource that is longer than what a pointer contains, and
    in practice it will be very short instead.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Jassi Brar

    Arnd Bergmann
     

14 Mar, 2016

1 commit

  • * acpi-processor:
    ACPI / sleep: move acpi_processor_sleep to sleep.c
    ACPI / processor : add support for ACPI0010 processor container
    ACPI / processor_idle: replace PREFIX with pr_fmt

    * acpi-cppc:
    ACPI / CPPC: use MRTT/MPAR to decide if/when a req can be sent
    ACPI / CPPC: replace writeX/readX to PCC with relaxed version
    mailbox: pcc: optimized pcc_send_data
    ACPI / CPPC: optimized cpc_read and cpc_write
    ACPI / CPPC: Optimize PCC Read Write operations

    Rafael J. Wysocki
     

11 Mar, 2016

1 commit

  • This driver is found on RK3368 SoCs.

    The Mailbox module is a simple APB peripheral that allows both
    the Cortex-A53 MCU system to communicate by writing operation to
    generate interrupt.
    The registers are accessible by both CPU via APB interface.

    The Mailbox has the following main features:

    1) Support dual-core system: Cortex-A53 and MCU.
    2) Support APB interface.
    3) Support four mailbox elements, each element includes one data word,
    one command word register and one flag bit that can represent
    one interrupt.
    4) Four interrupts to Cortex-A53.
    5) Four interrupts to MCU.
    6) Provide 32 lock registers for software to use to indicate whether
    mailbox is occupied.

    [Jassi: Removed unused variable buf_base]

    Signed-off-by: Caesar Wang
    Signed-off-by: Jassi Brar

    Caesar Wang
     

10 Mar, 2016

1 commit

  • pcc_send_data() can be invoked during the execution of performance
    critical code as in cppc_cpufreq driver. With acpi_* APIs, the
    doorbell register accessed in pcc_send_data() if present in system
    memory will be searched (in cached virt to phys addr mapping),
    mapped, read/written and then unmapped. These operations take
    significant amount of time.

    This patch maps the performance critical doorbell register
    during init and then reads/writes to it directly using the
    mapped virtual address. This patch + similar changes to CPPC
    acpi driver reduce the time per freq. transition from around
    200us to about 20us for the CPPC cpufreq driver

    Signed-off-by: Prashanth Prakash
    Acked-by: Ashwin Chaugule
    Signed-off-by: Rafael J. Wysocki

    Prakash, Prashanth
     

04 Mar, 2016

6 commits


15 Feb, 2016

1 commit


02 Feb, 2016

2 commits

  • Not every arch has io memory.
    So, unbreak the build by fixing the dependencies.

    Signed-off-by: Richard Weinberger
    Signed-off-by: Jassi Brar

    Richard Weinberger
     
  • This patch fixes the calculation of pcc_chan for non-zero id.
    After the compiler ignores the (unsigned long) cast the
    pcc_mbox_channels pointer is type-cast and then the type-cast
    offset is added which results in address outside of the range
    leading to the kernel crashing.

    We might add braces and make it:

    pcc_chan = (struct mbox_chan *)
    ((unsigned long) pcc_mbox_channels +
    (id * sizeof(*pcc_chan)));

    but let's go with array approach here and use id as index.

    Tested on Juno board.

    Signed-off-by: Alexey Klimov
    Acked-by: Sudeep Holla
    Acked-by: Ashwin Chaugule
    Signed-off-by: Jassi Brar

    Alexey Klimov
     

30 Nov, 2015

1 commit


04 Nov, 2015

1 commit


27 Oct, 2015

1 commit


23 Oct, 2015

2 commits

  • The mailbox framework controls the transmission queue and requires
    either its controller implementations or clients to run the state
    machine for the Tx queue. The OMAP mailbox controller uses a Tx-ready
    interrupt as the equivalent of a Tx-done interrupt to run this Tx
    queue state-machine.

    The WkupM3 processor on AM33xx and AM43xx SoCs is used to offload
    certain PM tasks, like doing the necessary operations for Device
    PM suspend/resume or for entering lower c-states during cpuidle.

    The CPUIdle on AM33xx requires the messages to be sent without
    having to trigger the Tx-ready interrupts, as the interrupt
    would immediately terminate the CPUIdle operation. Support for
    this has been added by introducing a DT quirk, "ti,mbox-send-noirq"
    and using it to modify the normal OMAP mailbox controller behavior
    on the sub-mailboxes used to communicate with the WkupM3 remote
    processor. This also requires the wkup_m3_ipc driver to adjust
    its mailbox usage logic to run the Tx state machine.

    NOTE:
    - AM43xx does not communicate with WkupM3 for CPU Idle, so is
    not affected by this behavior. But, it uses the same IPC driver
    for PM suspend/resume functionality, so requires the quirk as
    well, because of changes to the common wkup_m3_ipc driver.

    Signed-off-by: Dave Gerlach
    [s-anna@ti.com: revise logic and update comments/patch description]
    Signed-off-by: Suman Anna
    Signed-off-by: Jassi Brar

    Dave Gerlach
     
  • Kbuild test robot reported some Sparse warnings to the tune of:

    sparse: incorrect type in argument 6 (different address spaces)
    expected void const *buf
    got void [noderef] *mmio

    This was due to passing variables tagged with the Sparse cookie
    '__iomem' through into memcpy() and print_hex_dump() without
    adequate protection or casting. These issues were fixed in a
    previous patch suppressing the warnings, but the issue is indeed
    still present.

    This patch fixes the warnings in the correct way, i.e. by using
    the purposely authored memcpy_{from,to}io() derivatives in the
    memcpy() case and casting the memory address to (void *) and
    forcing Sparse to ignore to ignore it in the print_hex_dump()
    case [NB: This is also what the memcpy() derivatives do].

    Reported-by: Peter Griffin
    Signed-off-by: Lee Jones
    Signed-off-by: Jassi Brar

    Lee Jones
     

17 Oct, 2015

3 commits