1. 13 May, 2016 18 commits
  2. 09 May, 2016 5 commits
    • David Lin's avatar
      greybus: operation: fix an inconsistent indent · c77bac08
      David Lin authored
      This patch fixes an inconsistent indent.
      
      Testing Done:
      - Build & boot
      Signed-off-by: default avatarDavid Lin <dtwlin@google.com>
      Acked-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      c77bac08
    • Viresh Kumar's avatar
      greybus: fw-download: Replace timer with delayed-work · c6cc8e73
      Viresh Kumar authored
      The timeout-handlers need to call routines that can sleep and those
      can't be called from interrupt context. The timer-handler is called in
      interrupt context and so will hit a BUG() in vmalloc.c.
      
      This patch moves away from timers to delayed-work, whose timeout handler
      gets called in process context and can call the sleep-able routines
      safely.
      
      Note that this issue wasn't hit earlier when the initial patch for
      timeouts was implemented due to some issues in the build arche_420. But
      with the new build arche_440, the BUG started crashing the phone on
      timeouts and so this fix is required.
      
      Tested on EVT 1.5 by triggering fake timeouts, by not sending
      release-firmware request for example. This is tested with build
      arche_440.
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      c6cc8e73
    • Viresh Kumar's avatar
      greybus: bootrom: Implement timeouts to detect Module failures · a956d939
      Viresh Kumar authored
      Its possible that the Module may fail to download the next stage
      firmware, or to jump into it and boot into the new personality.
      
      We have already seen examples of both of these cases on EVT 1.5.
      
      This patch implements timeouts in the bootrom bundle driver, which now
      expects the next request from the Module to be received at the AP within
      1 second of the previous request/response. The time interval can be
      increased later if required.
      
      The timeouts are added between:
      - AP_READY and FIRMWARE_SIZE operations
      - FIRMWARE_SIZE and GET_FIRMWARE operations
      - Two GET_FIRMWARE operations
      - GET_FIRMWARE and READY_TO_BOOT operations
      - READY_TO_BOOT operation and the call to the ->disconnect() event of
        the bootrom bundle (once the new hotplug request is received).
      
      The timeout for the last case is kept at 5 seconds right now (random
      value), as it may take a bit longer.
      
      Because 'bootrom->fw' can be accessed simultaneously (from timeout
      handler and incoming requests) and one of them can potentially free the
      '->fw' structure, a mutex is also added to take care of such races while
      accessing 'bootrom->fw' structure.
      
      Also note that the '!bootrom->fw' check is moved to free_firmware()
      routine.
      
      Note that this version uses delayed-work (instead of timers used in
      earlier attempt), as we need to call routines that can sleep from the
      timeout handler.
      
      Tested on EVT 1.5, by faking errors on certain requests, so that the
      bootrom doesn't send any more requests. Normal case is working just fine
      for audio and GP modules. This is tested with build arche_440.
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      a956d939
    • Jeffrey Carlyle's avatar
      greybus: svc: implement svc_intf_activate · 140026b3
      Jeffrey Carlyle authored
      With upcoming firmware changes we will switch from an SVC-driven module
      boot sequence to an AP-driven module sequence. This operation allows the
      AP to request the SVC to boot a module to which the AP has previouslt
      requested power be applied. This operation will also determine if the
      remote interface is a dummy module, UniPro-only module, or full Greybus
      module.
      
      Testing done: Tested together with "new" firmware boot sequence to
                    verify that modules are detected and booted as expected.
      Signed-off-by: default avatarJeffrey Carlyle <jcarlyle@google.com>
      Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      140026b3
    • Jeffrey Carlyle's avatar
      greybus: svc: implement svc_intf_{vsys,refclk,unipro}_{enable,disable} operations · 144763bf
      Jeffrey Carlyle authored
      Add SVC operations for fine grain control over vsys, refclk, and unipro
      port power.
      
      Testing done: used "new" firmware boot sequence to verify that modules
                    were correctly detected and booted.
      Signed-off-by: default avatarJeffrey Carlyle <jcarlyle@google.com>
      Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      144763bf
  3. 06 May, 2016 1 commit
  4. 05 May, 2016 16 commits