1. 16 Mar, 2016 1 commit
    • Arnd Bergmann's avatar
      mailbox: rockchip: avoid 64-bit division · c5a9d1f3
      Arnd Bergmann authored
      The newly added rockchip mailbox driver causes a bug in
      the ARM allyesconfig build because of a division of a resource_size_t
      variable that may be 64 bit wide:
      
      drivers/mailbox/built-in.o: In function `rockchip_mbox_probe':
      :(.text+0x6614): undefined reference to `__aeabi_uldivmod'
      
      This adds a cast to size_t, which turns it into a 32-bit division
      in this case. This is safe because we know that we cannot possibly
      map a resource that is longer than what a pointer contains, and
      in practice it will be very short instead.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
      c5a9d1f3
  2. 11 Mar, 2016 1 commit
    • Caesar Wang's avatar
      mailbox: rockchip: Add Rockchip mailbox driver · f70ed3b5
      Caesar Wang authored
      This driver is found on RK3368 SoCs.
      
      The Mailbox module is a simple APB peripheral that allows both
      the Cortex-A53 MCU system to communicate by writing operation to
      generate interrupt.
      The registers are accessible by both CPU via APB interface.
      
      The Mailbox has the following main features:
      
      1) Support dual-core system: Cortex-A53 and MCU.
      2) Support APB interface.
      3) Support four mailbox elements, each element includes one data word,
         one command word register and one flag bit that can represent
         one interrupt.
      4) Four interrupts to Cortex-A53.
      5) Four interrupts to MCU.
      6) Provide 32 lock registers for software to use to indicate whether
         mailbox is occupied.
      
      [Jassi: Removed unused variable buf_base]
      Signed-off-by: default avatarCaesar Wang <wxt@rock-chips.com>
      Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
      f70ed3b5