lkml.org 
[lkml]   [2018]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/4] usb: musb: Move musbhsdma macro definition to musb_dma.h
    Date
    From: Min Guo <min.guo@mediatek.com>

    Because the MediaTek musb controller dose not have a
    separate DMA interrupt, these macros are required to
    access the dma registers

    Signed-off-by: Min Guo <min.guo@mediatek.com>
    ---
    drivers/usb/musb/musb_dma.h | 6 ++++++
    drivers/usb/musb/musbhsdma.c | 7 +------
    2 files changed, 7 insertions(+), 6 deletions(-)

    diff --git a/drivers/usb/musb/musb_dma.h b/drivers/usb/musb/musb_dma.h
    index 8f60271..281e75d3 100644
    --- a/drivers/usb/musb/musb_dma.h
    +++ b/drivers/usb/musb/musb_dma.h
    @@ -35,6 +35,12 @@
    * whether shared with the Inventra core or separate.
    */

    +#define MUSB_HSDMA_BASE 0x200
    +#define MUSB_HSDMA_INTR (MUSB_HSDMA_BASE + 0)
    +#define MUSB_HSDMA_CONTROL 0x4
    +#define MUSB_HSDMA_ADDRESS 0x8
    +#define MUSB_HSDMA_COUNT 0xc
    +
    #define DMA_ADDR_INVALID (~(dma_addr_t)0)

    #ifdef CONFIG_MUSB_PIO_ONLY
    diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
    index a688f7f..824adcb 100644
    --- a/drivers/usb/musb/musbhsdma.c
    +++ b/drivers/usb/musb/musbhsdma.c
    @@ -10,12 +10,7 @@
    #include <linux/platform_device.h>
    #include <linux/slab.h>
    #include "musb_core.h"
    -
    -#define MUSB_HSDMA_BASE 0x200
    -#define MUSB_HSDMA_INTR (MUSB_HSDMA_BASE + 0)
    -#define MUSB_HSDMA_CONTROL 0x4
    -#define MUSB_HSDMA_ADDRESS 0x8
    -#define MUSB_HSDMA_COUNT 0xc
    +#include "musb_dma.h"

    #define MUSB_HSDMA_CHANNEL_OFFSET(_bchannel, _offset) \
    (MUSB_HSDMA_BASE + (_bchannel << 4) + _offset)
    --
    1.9.1
    \
     
     \ /
      Last update: 2018-12-27 08:36    [W:10.185 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site