1. 27 11月, 2012 1 次提交
    • A
      can: c_can: Add d_can raminit support · 52cde85a
      AnilKumar Ch 提交于
      Add D_CAN raminit support to C_CAN driver to enable D_CAN RAM,
      which holds all the message objects during transmission or
      receiving of data. This initialization/de-initialization should
      be done in synchronous with D_CAN clock.
      
      In case of AM335X-EVM (current user of D_CAN driver) message RAM is
      controlled through control module register for both instances. So
      control module register details is required to initialization or
      de-initialization of message RAM according to instance number.
      
      Control module memory resource is obtained from D_CAN dt node and
      instance number obtained from device tree aliases node.
      
      This patch was tested on AM335x-EVM along with pinctrl data addition
      patch, d_can dt aliases addition and control module data addition.
      pinctrl data addition is not added to am335x-evm.dts (only supports
      CPLD profile#0) because d_can1 is supported under CPLD profile#1.
      Signed-off-by: NAnilKumar Ch <anilkumar@ti.com>
      [mkl: fix instance for non DT in probe, cleaned up raminit]
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      52cde85a
  2. 27 9月, 2012 1 次提交
    • A
      can: c_can: fix segfault during rmmod · c523530c
      AnilKumar Ch 提交于
      This patch fixes an oops which occurs during unloading the driver.
      unregister_c_can_dev() is doing c_can/d_can module interrupts disable, which
      requires module clock enable. c_can/d_can interrupts enable/disable is handled
      properly in c_can_start and c_can_stop, so removing from
      unregister_c_can_dev().
      
      The problem was triggered by adding runtime PM support to the c_can driver by
      this commit:
      
      4cdd34b2 can: c_can: Add runtime PM support to Bosch C_CAN/D_CAN controller
      Signed-off-by: NAnilKumar Ch <anilkumar@ti.com>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      c523530c
  3. 22 9月, 2012 5 次提交
  4. 31 7月, 2012 1 次提交
  5. 20 7月, 2012 1 次提交
  6. 21 6月, 2012 1 次提交
  7. 20 6月, 2012 1 次提交
  8. 16 6月, 2012 1 次提交
  9. 07 6月, 2012 2 次提交
    • A
      can: c_can: Add support for Bosch D_CAN controller · 69927fcc
      AnilKumar Ch 提交于
      This patch adds the support for D_CAN controller driver to the existing
      C_CAN driver.
      
      Bosch D_CAN controller is a full-CAN implementation which is compliant
      to CAN protocol version 2.0 part A and B. Bosch D_CAN user manual can be
      obtained from: http://www.semiconductors.bosch.de/media/en/pdf/
      ipmodules_1/can/d_can_users_manual_111.pdf
      
      A new array is added for accessing the d_can registers, according to d_can
      controller register space.
      
      Current D_CAN implementation has following limitations, this is done
      to avoid large changes to the C_CAN driver.
      1. Message objects are limited to 32, 16 for RX and 16 for TX. C_CAN IP
         supports upto 32 message objects but in case of D_CAN we can configure
         upto 128 message objects.
      2. Using two 16bit reads/writes for accessing the 32bit D_CAN registers.
      3. These patches have been tested on little endian machine, there might
         be some hidden endian-related issues due to the nature of the accesses
         (32-bit registers accessed as 2 16-bit registers). However, I do not
         have a big-endian D_CAN implementation to confirm.
      Signed-off-by: NAnilKumar Ch <anilkumar@ti.com>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      69927fcc
    • A
      can: c_can: Move overlay structure to array with offset as index · 33f81009
      AnilKumar Ch 提交于
      c_can uses overlay structure for accessing c_can module registers.
      With this kind of implementation it is difficult to add one more ip
      which is similar to c_can in functionality but different register
      offsets.
      
      This patch changes the overlay structure implementation to an array
      with register offset as index. This way we can overcome the above
      limitation.
      Signed-off-by: NAnilKumar Ch <anilkumar@ti.com>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      33f81009
  10. 04 6月, 2012 3 次提交
    • A
      can: c_can: fix race condition in c_can_open() · f461f27a
      AnilKumar Ch 提交于
      Fix the issue of C_CAN interrupts getting disabled forever when canconfig
      utility is used multiple times. According to NAPI usage we disable all
      the hardware interrupts in ISR and re-enable them in poll(). Current
      implementation calls napi_enable() after hardware interrupts are enabled.
      If we get any interrupts between these two steps then we do not process
      those interrupts because napi is not enabled. Mostly these interrupts
      come because of STATUS is not 0x7 or ERROR interrupts. If napi_enable()
      happens before HW interrupts enabled then c_can_poll() function will be
      called eventual re-enabling.
      
      This patch moves the napi_enable() call before interrupts enabled.
      
      Cc: stable@kernel.org # 2.6.39+
      Signed-off-by: NAnilKumar Ch <anilkumar@ti.com>
      Acked-by: NWolfgang Grandegger <wg@grandegger.com>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      f461f27a
    • A
      can: c_can: fix an interrupt thrash issue with c_can driver · 148c87c8
      AnilKumar Ch 提交于
      This patch fixes an interrupt thrash issue with c_can driver.
      
      In c_can_isr() function interrupts are disabled and enabled only in
      c_can_poll() function. c_can_isr() & c_can_poll() both read the
      irqstatus flag. However, irqstatus is always read as 0 in c_can_poll()
      because all C_CAN interrupts are disabled in c_can_isr(). This causes
      all interrupts to be re-enabled in c_can_poll() which in turn causes
      another interrupt since the event is not really handled. This keeps
      happening causing a flood of interrupts.
      
      To fix this, read the irqstatus register in isr and use the same cached
      value in the poll function.
      
      Cc: stable@kernel.org # 2.6.39+
      Signed-off-by: NAnilKumar Ch <anilkumar@ti.com>
      Acked-by: NWolfgang Grandegger <wg@grandegger.com>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      148c87c8
    • A
      can: c_can: fix "BUG! echo_skb is occupied!" during transmit · 617cacce
      AnilKumar Ch 提交于
      This patch fixes an issue with transmit routine, which causes
      "can_put_echo_skb: BUG! echo_skb is occupied!" message when
      using "cansequence -p" on D_CAN controller.
      
      In c_can driver, while transmitting packets tx_echo flag holds
      the no of can frames put for transmission into the hardware.
      
      As the comment above c_can_do_tx() indicates, if we find any packet
      which is not transmitted then we should stop looking for more.
      In the current implementation this is not taken care of causing the
      said message.
      
      Also, fix the condition used to find if the packet is transmitted
      or not. Current code skips the first tx message object and ends up
      checking one extra invalid object.
      
      While at it, fix the comment on top of c_can_do_tx() to use the
      terminology "packet" instead of "package" since it is more
      standard.
      
      Cc: stable@kernel.org # 2.6.39+
      Signed-off-by: NAnilKumar Ch <anilkumar@ti.com>
      Acked-by: NWolfgang Grandegger <wg@grandegger.com>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      617cacce
  11. 29 11月, 2011 1 次提交
  12. 24 7月, 2011 1 次提交
  13. 24 6月, 2011 1 次提交
  14. 20 6月, 2011 1 次提交
  15. 31 3月, 2011 1 次提交
  16. 28 3月, 2011 3 次提交
  17. 22 3月, 2011 1 次提交
  18. 14 2月, 2011 1 次提交