1. 27 11月, 2014 4 次提交
    • A
      Mailbox: Add support for Platform Communication Channel · 86c22f8c
      Ashwin Chaugule 提交于
      ACPI 5.0+ spec defines a generic mode of communication
      between the OS and a platform such as the BMC. This medium
      (PCC) is typically used by CPPC (ACPI CPU Performance management),
      RAS (ACPI reliability protocol) and MPST (ACPI Memory power
      states).
      
      This patch adds PCC support as a Mailbox Controller. As of
      ACPI v5.1 there is no provision for clients to lookup mailbox
      controllers in a way that Linux expects. e.g. in DT the clients
      can list the mailboxes they can associate with in the DT binding
      and then provide a unique index to lookup a channel within a mailbox.
      Since the ACPI spec doesn't have anything similar, we introduce a
      mailbox controller specific API so that when the client calls it,
      we know to lookup in the context of a specific controller. This
      also helps in keeping a consistent interface across DT and ACPI
      for such drivers.
      
      This patch implements basic PCC support using the ACPI v5.1
      structures. IRQ mode support will be provided as follow up patches.
      Signed-off-by: NAshwin Chaugule <ashwin.chaugule@linaro.org>
      Reviewed-by: NMark Brown <broonie@kernel.org>
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org>
      86c22f8c
    • S
      mailbox/omap: adapt to the new mailbox framework · 8841a66a
      Suman Anna 提交于
      The OMAP mailbox driver and its existing clients (remoteproc
      for OMAP4+) are adapted to use the generic mailbox framework.
      
      The main changes for the adaptation are:
        - The tasklet used for Tx is replaced with the state machine from
          the generic mailbox framework. The workqueue used for processing
          the received messages stays intact for minimizing the effects on
          the OMAP mailbox clients.
        - The existing exported client API, omap_mbox_get, omap_mbox_put and
          omap_mbox_send_msg are deleted, as the framework provides equivalent
          functionality. A OMAP-specific omap_mbox_request_channel is added
          though to support non-DT way of requesting mailboxes.
        - The OMAP mailbox driver is integrated with the mailbox framework
          through the proper implementations of mbox_chan_ops, except for
          .last_tx_done and .peek_data. The OMAP mailbox driver does not need
          these ops, as it is completely interrupt driven.
        - The OMAP mailbox driver uses a custom of_xlate controller ops that
          allows phandles for the pargs specifier instead of indexing to avoid
          any channel registration order dependencies.
        - The new framework does not support multiple clients operating on a
          single channel, so the reference counting logic is simplified.
        - The remoteproc driver (current client) is adapted to use the new API.
          The notifier callbacks used within this client is replaced with the
          regular callbacks from the newer framework.
        - The exported OMAP mailbox API are limited to omap_mbox_save_ctx,
          omap_mbox_restore_ctx, omap_mbox_enable_irq & omap_mbox_disable_irq,
          with the signature modified to take in the new mbox_chan handle instead
          of the OMAP specific omap_mbox handle. The first 2 will be removed when
          the OMAP mailbox driver is adapted to runtime_pm. The other exported
          API omap_mbox_request_channel will be removed once existing legacy
          users are converted to DT.
      Signed-off-by: NSuman Anna <s-anna@ti.com>
      Cc: Ohad Ben-Cohen <ohad@wizery.com>
      Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org>
      8841a66a
    • S
      mailbox: add tx_prepare client callback · 97b0c7bd
      Sudeep Holla 提交于
      If the mailbox controller expects the payload is in place before
      initiating the transmit, then it's impossible to reuse the list
      maintained by core mailbox code currently. Maintaining another list
      for sending the message in the controller seems totally unnecessary
      as core mailbox library already provides that feature.
      
      This patch introduces tx_prepare callback in mbox_client which
      can be used by the core mailbox library before initiating the
      transaction through mbox->ops->send_data. The client driver can
      implement this callback to ensure the payload is copied to the
      shared memory.
      Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org>
      97b0c7bd
    • A
      mailbox: Don't unnecessarily re-arm the polling timer · 52a49306
      Andrew Bresticker 提交于
      poll_txdone() will unconditionally re-arm the polling timer if there was
      an active request, even if the active request completed and no other
      requests were submitted.  This is fixed by:
       - only re-arming the timer if the controller reported that the current
         transmission has not completed, and,
       - moving the call to poll_txdone() into msg_submit() so that the
         controller gets polled (and the timer re-armed, if necessary) whenever
         a new message is submitted.
      Signed-off-by: NAndrew Bresticker <abrestic@chromium.org>
      Reviewed-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org>
      52a49306
  2. 03 11月, 2014 7 次提交
  3. 01 11月, 2014 10 次提交
  4. 31 10月, 2014 19 次提交