1. 15 Jan, 2020 2 commits
  2. 07 Jan, 2020 4 commits
    • Rajan Vaja's avatar
      zynqmp: pm: Remove CLK_TOPSW_LSBUS from invalid clock list · 20fdf0b0
      Rajan Vaja authored
      
      
      CLK_TOPSW_LSBUS is parent of WDT clock. Clock from invalid
      clock list would not be registered to CCF framework and so
      cannot be used as parent of other clocks.
      
      WDT clock has default parent as CLK_TOPSW_LSBUS(APB clock).
      If CLK_TOPSW_LSBUS is not registered, CCF would not recognize
      that clock and hence rate of WDT clock would be calculated to
      be 0 by CCF(as parent rate is considered 0).
      
      So it is necessary to allow registration of CLK_TOPSW_LSBUS
      clock.
      Signed-off-by: default avatarRajan Vaja <rajan.vaja@xilinx.com>
      Signed-off-by: default avatarJolly Shah <jolly.shah@xilinx.com>
      Change-Id: Iceaba0f137784fc5fd666e66ffc4c143381c6ccc
      20fdf0b0
    • Mounika Grace Akula's avatar
      zynqmp: pm: Add LPD WDT clock to the pm_clock structure · b3ce966a
      Mounika Grace Akula authored
      
      
      This patch adds LPD WDT clock node to the pm_clock clocks structure list
      so that LPD WDT can be used from Linux.
      
      Also this patch removes the CLK_LPD_LSBUS from invalid clock list to
      allow the registration of this clock to CCF framework as it is the
      parent of LPD WDT.
      Signed-off-by: default avatarMounika Grace Akula <mounika.grace.akula@xilinx.com>
      Signed-off-by: default avatarJolly Shah <jolly.shah@xilinx.com>
      Change-Id: Iea065aa8150eaba4bb4b42bc6be1fd4b7fe7b403
      b3ce966a
    • Mirela Simonovic's avatar
      zynqmp: pm: Fix clock models and IDs of GEM-related clocks · 06ad9803
      Mirela Simonovic authored
      
      
      GEM-related clock models were incorrect and are fixed as follows
      (documented below for GEM0, but the same holds for any GEM ID):
      
      - CLK_GEM0_REF_UNGATED represents clock that has DIV0/1 divisors and
       the multiplexer controllable in GEM0_REF_CTRL (CRL_APB). The ID of this
       clock is newly introduced in this patch.
      
      - CLK_GEM0_REF models the clock mux that selects the reference clock
       for Tx, i.e. selects CLK_GEM0_REF_UNGATED or external Tx clock. This
       mux is controllable via GEM_CLK_CTRL (IOU_SLCR), bit GEM0_REF_SRC_SEL.
       Note that the routing of external clock to the mux is not modelled
       and is assumed to be configured by the FSBL if required, and not
       changeable at runtime. The ID of this clock is introduced in this patch.
      
      - CLK_GEM0_TX models clock with only a gate that is controlled via
       bit 25 in GEM0_REF_CTRL (CRL_APB). The parent of this clock is
       CLK_GEM0_REF. The clock ID of CLK_GEM0_TX matches the previous ID
       value of CLK_GEM0_REF. This is done in order to fix the clock models
       and incorrect binding without requiring to change device-tree (binding
       of clock IDs to GEM interface).
      
      - CLK_GEM0_RX models clock that has only gate controlled via RX_CLKACT
       bit (26) in GEM0_REF_CTRL (CRL_APB). Parent of this clock is sourced
       from external RGMII PHY (via MIO or EMIO). We do not model the whole
       clock path to the Rx gate, since this is configured by the FSBL and
       never changed at runtime (and there is no mechanism to change the
       path at runtime). The clock ID of CLK_GEM0_RX clock is equal to the
       previous ID value of CLK_GEM0_TX clock. This is done because the TX/RX
       were swapped in device tree, so by fixing the IDs this way there is no
       need for device tree fix.
      
      Rates of the external RX/TX clocks can be specified in device tree if
      needed. Right now, that's not necessary because Tx clock is sourced
      from an on-chip PLL (via CLK_GEM0_REF_UNGATED/CLK_GEM0_REF), whereas
      the Rx clock is sourced from external reference and the driver never
      attempts to get/get clock rate (only to enable it). If this changes in
      future, ATF clock model doesn't need to be changed. Instead, the clock
      rates for gem0_tx_ext and gem0_rx_ext have to be specified in device
      tree.
      Signed-off-by: default avatarMirela Simonovic <mirela.simonovic@aggios.com>
      Acked-by: default avatarWill Wong <will.wong@xilinx.com>
      Signed-off-by: default avatarJolly Shah <jolly.shah@xilinx.com>
      Change-Id: I6497d4309e92205c527bd81b3aa932f4474f5b79
      06ad9803
    • Mounika Grace Akula's avatar
      zynqmp: pm: Rename FPD WDT clock ID · fa8ae3c8
      Mounika Grace Akula authored
      
      
      This patch renames FPD WDT clock ID from CLK_WDT to CLK_FPD_WDT.
      Signed-off-by: default avatarMounika Grace Akula <mounika.grace.akula@xilinx.com>
      Signed-off-by: default avatarJolly Shah <jolly.shah@xilinx.com>
      Change-Id: I4d00a59b1dc54920115a2da55e8a06347fe2231c
      fa8ae3c8
  3. 19 Nov, 2019 1 commit
    • Justin Chadwell's avatar
      Enable -Wlogical-op always · d7b4cd41
      Justin Chadwell authored
      
      
      -Wlogical-op prevents common errors with using numerical constants where
      a boolean one is expected as well as when the operands of a logical
      operator are the same. While these are perfectly valid behavior, they
      can be a sign that something is slightly off.
      
      This patch adds this warning to gcc and it's closest equivalent to
      clang, while also fixing any warnings that enabling them causes.
      
      Change-Id: Iabadfc1e6ee0c44eef6685a23b0aed8abef8ce89
      Signed-off-by: default avatarJustin Chadwell <justin.chadwell@arm.com>
      d7b4cd41
  4. 08 Mar, 2019 1 commit
  5. 09 Jan, 2019 7 commits
  6. 04 Jan, 2019 21 commits
  7. 08 Nov, 2018 1 commit
    • Antonio Nino Diaz's avatar
      Standardise header guards across codebase · c3cf06f1
      Antonio Nino Diaz authored
      
      
      All identifiers, regardless of use, that start with two underscores are
      reserved. This means they can't be used in header guards.
      
      The style that this project is now to use the full name of the file in
      capital letters followed by 'H'. For example, for a file called
      "uart_example.h", the header guard is UART_EXAMPLE_H.
      
      The exceptions are files that are imported from other projects:
      
      - CryptoCell driver
      - dt-bindings folders
      - zlib headers
      
      Change-Id: I50561bf6c88b491ec440d0c8385c74650f3c106e
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      c3cf06f1
  8. 21 Sep, 2018 1 commit
    • Daniel Boulby's avatar
      Ensure the flow through switch statements is clear · a08a2014
      Daniel Boulby authored
      
      
      Ensure case clauses:
      *   Terminate with an unconditional break, return or goto statement.
      *   Use conditional break, return or goto statements as long as the end
          of the case clause is unreachable; such case clauses must terminate
          with assert(0) /* Unreachable */ or an unconditional  __dead2 function
          call
      *   Only fallthough when doing otherwise would result in less
          readable/maintainable code; such case clauses must terminate with a
          /* Fallthrough */ comment to make it clear this is the case and
          indicate that a fallthrough is intended.
      
      This reduces the chance of bugs appearing due to unintended flow through a
      switch statement
      
      Change-Id: I70fc2d1f4fd679042397dec12fd1982976646168
      Signed-off-by: default avatarDaniel Boulby <daniel.boulby@arm.com>
      a08a2014
  9. 04 Sep, 2018 2 commits