1. 02 10月, 2012 1 次提交
    • W
      flexcan: disable bus error interrupts for the i.MX28 · 4f72e5f0
      Wolfgang Grandegger 提交于
      Due to a bug in most Flexcan cores, the bus error interrupt needs
      to be enabled. Otherwise we don't get any error warning or passive
      interrupts. This is _not_ necessary for the i.MX28 and this patch
      disables bus error interrupts if "berr-reporting" is not requested.
      This avoids bus error flooding, which might harm, especially on
      low-end systems.
      
      To handle such quirks of the Flexcan cores, a hardware feature flag
      has been introduced, also replacing the "hw_ver" variable. So far
      nobody could tell what Flexcan core version is available on what
      Freescale SOC, apart from the i.MX6Q and P1010, and which bugs or
      features are present on the various "hw_rev".
      
      CC: Hui Wang <jason77.wang@gmail.com>
      CC: Shawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NWolfgang Grandegger <wg@grandegger.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4f72e5f0
  2. 20 7月, 2012 2 次提交
    • S
      can: flexcan: add 2nd clock to support imx53 and newer · 3d42a379
      Steffen Trumtrar 提交于
      This patch adds support for a second clock to the flexcan driver. On
      modern freescale ARM cores like the imx53 and imx6q two clocks ("ipg"
      and "per") must be enabled in order to access the CAN core.
      
      In the original driver, the clock was requested without specifying the
      connection id, further all mainline ARM archs with flexcan support
      (imx28, imx25, imx35) register their flexcan clock without a
      connection id, too.
      
      This patch first renames the existing clk variable to clk_ipg and
      converts it to devm for easier error handling. The connection id "ipg"
      is added to the devm_clk_get() call. Then a second clock "per" is
      requested. As all archs don't specify a connection id, both clk_get
      return the same clock. This ensures compatibility to existing flexcan
      support and adds support for imx53 at the same time.
      
      After this patch hits mainline, the archs may give their existing
      flexcan clock the "ipg" connection id and implement a dummy "per"
      clock.
      
      This patch has been tested on imx28 (unmodified clk tree) and on imx53
      with a seperate "ipg" and "per" clock.
      
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NSteffen Trumtrar <s.trumtrar@pengutronix.de>
      Acked-by: NHui Wang <jason77.wang@gmail.com>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      3d42a379
    • M
      can: mark bittiming_const pointer in struct can_priv as const · 194b9a4c
      Marc Kleine-Budde 提交于
      This patch marks the bittiming_const pointer as in the struct can_pric as
      "const". This allows us to mark the struct can_bittiming_const in the CAN
      drivers as "const", too.
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      194b9a4c
  3. 17 7月, 2012 1 次提交
  4. 03 7月, 2012 1 次提交
    • H
      can: flexcan: add hardware controller version support · 30c1e672
      Hui Wang 提交于
      At least in the i.MX series, the flexcan contrller divides into ver_3
      and ver_10, current driver is for ver_3 controller.
      
      i.MX6 has ver_10 controller, it has more reigsters than ver_3 has.
      The rxfgmask (Rx FIFO Global Mask) register is one of the new added.
      Its reset value is 0xffffffff, this means ID Filter Table must be
      checked when receive a packet, but the driver is designed to accept
      everything during the chip start, we need to clear this register to
      follow this design.
      
      Use the data entry of the struct of_device_id to point chip specific
      info, we can set hardware version for each platform.
      
      Cc: linux-can@vger.kernel.org
      Cc: Marc Kleine-Budde <mkl@pengutronix.de>
      Cc: Wolfgang Grandegger <wg@grandegger.com>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NHui Wang <jason77.wang@gmail.com>
      [mkl: add id_table support]
      Tested-by: NHui Wang <jason77.wang@gmail.com>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      30c1e672
  5. 02 7月, 2012 1 次提交
  6. 27 6月, 2012 1 次提交
  7. 24 5月, 2012 1 次提交
  8. 12 5月, 2012 1 次提交
  9. 03 2月, 2012 3 次提交
  10. 28 12月, 2011 1 次提交
  11. 29 11月, 2011 1 次提交
  12. 18 8月, 2011 4 次提交
  13. 02 6月, 2011 1 次提交
    • J
      drivers/net/can/flexcan.c: add missing clk_put · 2e4ceec4
      Julia Lawall 提交于
      The failed_get label is used after the call to clk_get has succeeded, so it
      should be moved up above the call to clk_put.
      
      The failed_req labels doesn't do anything different than failed_get, so
      delete it.
      
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r exists@
      expression e1,e2;
      statement S;
      @@
      
      e1 = clk_get@p1(...);
      ... when != e1 = e2
          when != clk_put(e1)
          when any
      if (...) { ... when != clk_put(e1)
                     when != if (...) { ... clk_put(e1) ... }
      * return@p3 ...;
       } else S
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e4ceec4
  14. 27 10月, 2010 1 次提交
  15. 23 7月, 2010 1 次提交