Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
200b0182
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
200b0182
编写于
13年前
作者:
F
Felipe Balbi
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fixes' into for-greg
上级
ce7e9065
6193d699
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
57 addition
and
33 deletion
+57
-33
drivers/usb/gadget/f_phonet.c
drivers/usb/gadget/f_phonet.c
+1
-0
drivers/usb/musb/blackfin.c
drivers/usb/musb/blackfin.c
+1
-0
drivers/usb/musb/cppi_dma.c
drivers/usb/musb/cppi_dma.c
+17
-9
drivers/usb/musb/musb_core.h
drivers/usb/musb/musb_core.h
+8
-4
drivers/usb/musb/musb_gadget.c
drivers/usb/musb/musb_gadget.c
+3
-1
drivers/usb/musb/musb_regs.h
drivers/usb/musb/musb_regs.h
+4
-2
drivers/usb/musb/tusb6010.c
drivers/usb/musb/tusb6010.c
+1
-0
drivers/usb/musb/tusb6010_omap.c
drivers/usb/musb/tusb6010_omap.c
+1
-0
drivers/usb/musb/ux500_dma.c
drivers/usb/musb/ux500_dma.c
+21
-17
未找到文件。
drivers/usb/gadget/f_phonet.c
浏览文件 @
200b0182
...
...
@@ -434,6 +434,7 @@ static int pn_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
config_ep_by_speed
(
gadget
,
f
,
fp
->
out_ep
))
{
fp
->
in_ep
->
desc
=
NULL
;
fp
->
out_ep
->
desc
=
NULL
;
spin_unlock
(
&
port
->
lock
);
return
-
EINVAL
;
}
usb_ep_enable
(
fp
->
out_ep
);
...
...
This diff is collapsed.
Click to expand it.
drivers/usb/musb/blackfin.c
浏览文件 @
200b0182
...
...
@@ -17,6 +17,7 @@
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/prefetch.h>
#include <asm/cacheflush.h>
...
...
This diff is collapsed.
Click to expand it.
drivers/usb/musb/cppi_dma.c
浏览文件 @
200b0182
...
...
@@ -226,8 +226,10 @@ static int cppi_controller_stop(struct dma_controller *c)
struct
cppi
*
controller
;
void
__iomem
*
tibase
;
int
i
;
struct
musb
*
musb
;
controller
=
container_of
(
c
,
struct
cppi
,
controller
);
musb
=
controller
->
musb
;
tibase
=
controller
->
tibase
;
/* DISABLE INDIVIDUAL CHANNEL Interrupts */
...
...
@@ -289,9 +291,11 @@ cppi_channel_allocate(struct dma_controller *c,
u8
index
;
struct
cppi_channel
*
cppi_ch
;
void
__iomem
*
tibase
;
struct
musb
*
musb
;
controller
=
container_of
(
c
,
struct
cppi
,
controller
);
tibase
=
controller
->
tibase
;
musb
=
controller
->
musb
;
/* ep0 doesn't use DMA; remember cppi indices are 0..N-1 */
index
=
ep
->
epnum
-
1
;
...
...
@@ -339,7 +343,8 @@ static void cppi_channel_release(struct dma_channel *channel)
c
=
container_of
(
channel
,
struct
cppi_channel
,
channel
);
tibase
=
c
->
controller
->
tibase
;
if
(
!
c
->
hw_ep
)
dev_dbg
(
musb
->
controller
,
"releasing idle DMA channel %p
\n
"
,
c
);
dev_dbg
(
c
->
controller
->
musb
->
controller
,
"releasing idle DMA channel %p
\n
"
,
c
);
else
if
(
!
c
->
transmit
)
core_rxirq_enable
(
tibase
,
c
->
index
+
1
);
...
...
@@ -357,10 +362,11 @@ cppi_dump_rx(int level, struct cppi_channel *c, const char *tag)
musb_ep_select
(
base
,
c
->
index
+
1
);
DBG
(
level
,
"RX DMA%d%s: %d left, csr %04x, "
"%08x H%08x S%08x C%08x, "
"B%08x L%08x %08x .. %08x"
"
\n
"
,
dev_dbg
(
c
->
controller
->
musb
->
controller
,
"RX DMA%d%s: %d left, csr %04x, "
"%08x H%08x S%08x C%08x, "
"B%08x L%08x %08x .. %08x"
"
\n
"
,
c
->
index
,
tag
,
musb_readl
(
c
->
controller
->
tibase
,
DAVINCI_RXCPPI_BUFCNT0_REG
+
4
*
c
->
index
),
...
...
@@ -387,10 +393,11 @@ cppi_dump_tx(int level, struct cppi_channel *c, const char *tag)
musb_ep_select
(
base
,
c
->
index
+
1
);
DBG
(
level
,
"TX DMA%d%s: csr %04x, "
"H%08x S%08x C%08x %08x, "
"F%08x L%08x .. %08x"
"
\n
"
,
dev_dbg
(
c
->
controller
->
musb
->
controller
,
"TX DMA%d%s: csr %04x, "
"H%08x S%08x C%08x %08x, "
"F%08x L%08x .. %08x"
"
\n
"
,
c
->
index
,
tag
,
musb_readw
(
c
->
hw_ep
->
regs
,
MUSB_TXCSR
),
...
...
@@ -1022,6 +1029,7 @@ static bool cppi_rx_scan(struct cppi *cppi, unsigned ch)
int
i
;
dma_addr_t
safe2ack
;
void
__iomem
*
regs
=
rx
->
hw_ep
->
regs
;
struct
musb
*
musb
=
cppi
->
musb
;
cppi_dump_rx
(
6
,
rx
,
"/K"
);
...
...
This diff is collapsed.
Click to expand it.
drivers/usb/musb/musb_core.h
浏览文件 @
200b0182
...
...
@@ -172,7 +172,8 @@ enum musb_g_ep0_state {
#endif
/* TUSB mapping: "flat" plus ep0 special cases */
#if defined(CONFIG_USB_MUSB_TUSB6010)
#if defined(CONFIG_USB_MUSB_TUSB6010) || \
defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
#define musb_ep_select(_mbase, _epnum) \
musb_writeb((_mbase), MUSB_INDEX, (_epnum))
#define MUSB_EP_OFFSET MUSB_TUSB_OFFSET
...
...
@@ -241,7 +242,8 @@ struct musb_hw_ep {
void
__iomem
*
fifo
;
void
__iomem
*
regs
;
#ifdef CONFIG_USB_MUSB_TUSB6010
#if defined(CONFIG_USB_MUSB_TUSB6010) || \
defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
void
__iomem
*
conf
;
#endif
...
...
@@ -258,7 +260,8 @@ struct musb_hw_ep {
struct
dma_channel
*
tx_channel
;
struct
dma_channel
*
rx_channel
;
#ifdef CONFIG_USB_MUSB_TUSB6010
#if defined(CONFIG_USB_MUSB_TUSB6010) || \
defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
/* TUSB has "asynchronous" and "synchronous" dma modes */
dma_addr_t
fifo_async
;
dma_addr_t
fifo_sync
;
...
...
@@ -356,7 +359,8 @@ struct musb {
void
__iomem
*
ctrl_base
;
void
__iomem
*
mregs
;
#ifdef CONFIG_USB_MUSB_TUSB6010
#if defined(CONFIG_USB_MUSB_TUSB6010) || \
defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
dma_addr_t
async
;
dma_addr_t
sync
;
void
__iomem
*
sync_va
;
...
...
This diff is collapsed.
Click to expand it.
drivers/usb/musb/musb_gadget.c
浏览文件 @
200b0182
...
...
@@ -1856,6 +1856,7 @@ int __init musb_gadget_setup(struct musb *musb)
return
0
;
err:
musb
->
g
.
dev
.
parent
=
NULL
;
device_unregister
(
&
musb
->
g
.
dev
);
return
status
;
}
...
...
@@ -1863,7 +1864,8 @@ int __init musb_gadget_setup(struct musb *musb)
void
musb_gadget_cleanup
(
struct
musb
*
musb
)
{
usb_del_gadget_udc
(
&
musb
->
g
);
device_unregister
(
&
musb
->
g
.
dev
);
if
(
musb
->
g
.
dev
.
parent
)
device_unregister
(
&
musb
->
g
.
dev
);
}
/*
...
...
This diff is collapsed.
Click to expand it.
drivers/usb/musb/musb_regs.h
浏览文件 @
200b0182
...
...
@@ -234,7 +234,8 @@
#define MUSB_TESTMODE 0x0F
/* 8 bit */
/* Get offset for a given FIFO from musb->mregs */
#ifdef CONFIG_USB_MUSB_TUSB6010
#if defined(CONFIG_USB_MUSB_TUSB6010) || \
defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
#define MUSB_FIFO_OFFSET(epnum) (0x200 + ((epnum) * 0x20))
#else
#define MUSB_FIFO_OFFSET(epnum) (0x20 + ((epnum) * 4))
...
...
@@ -295,7 +296,8 @@
#define MUSB_FLAT_OFFSET(_epnum, _offset) \
(0x100 + (0x10*(_epnum)) + (_offset))
#ifdef CONFIG_USB_MUSB_TUSB6010
#if defined(CONFIG_USB_MUSB_TUSB6010) || \
defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
/* TUSB6010 EP0 configuration register is special */
#define MUSB_TUSB_OFFSET(_epnum, _offset) \
(0x10 + _offset)
...
...
This diff is collapsed.
Click to expand it.
drivers/usb/musb/tusb6010.c
浏览文件 @
200b0182
...
...
@@ -18,6 +18,7 @@
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/prefetch.h>
#include <linux/usb.h>
#include <linux/irq.h>
#include <linux/platform_device.h>
...
...
This diff is collapsed.
Click to expand it.
drivers/usb/musb/tusb6010_omap.c
浏览文件 @
200b0182
...
...
@@ -20,6 +20,7 @@
#include <plat/mux.h>
#include "musb_core.h"
#include "tusb6010.h"
#define to_chdat(c) ((struct tusb_omap_dma_ch *)(c)->private_data)
...
...
This diff is collapsed.
Click to expand it.
drivers/usb/musb/ux500_dma.c
浏览文件 @
200b0182
...
...
@@ -65,7 +65,8 @@ static void ux500_tx_work(struct work_struct *data)
struct
musb
*
musb
=
hw_ep
->
musb
;
unsigned
long
flags
;
DBG
(
4
,
"DMA tx transfer done on hw_ep=%d
\n
"
,
hw_ep
->
epnum
);
dev_dbg
(
musb
->
controller
,
"DMA tx transfer done on hw_ep=%d
\n
"
,
hw_ep
->
epnum
);
spin_lock_irqsave
(
&
musb
->
lock
,
flags
);
ux500_channel
->
channel
.
actual_len
=
ux500_channel
->
cur_len
;
...
...
@@ -84,7 +85,8 @@ static void ux500_rx_work(struct work_struct *data)
struct
musb
*
musb
=
hw_ep
->
musb
;
unsigned
long
flags
;
DBG
(
4
,
"DMA rx transfer done on hw_ep=%d
\n
"
,
hw_ep
->
epnum
);
dev_dbg
(
musb
->
controller
,
"DMA rx transfer done on hw_ep=%d
\n
"
,
hw_ep
->
epnum
);
spin_lock_irqsave
(
&
musb
->
lock
,
flags
);
ux500_channel
->
channel
.
actual_len
=
ux500_channel
->
cur_len
;
...
...
@@ -116,9 +118,11 @@ static bool ux500_configure_channel(struct dma_channel *channel,
enum
dma_slave_buswidth
addr_width
;
dma_addr_t
usb_fifo_addr
=
(
MUSB_FIFO_OFFSET
(
hw_ep
->
epnum
)
+
ux500_channel
->
controller
->
phy_base
);
struct
musb
*
musb
=
ux500_channel
->
controller
->
private_data
;
DBG
(
4
,
"packet_sz=%d, mode=%d, dma_addr=0x%x, len=%d is_tx=%d
\n
"
,
packet_sz
,
mode
,
dma_addr
,
len
,
ux500_channel
->
is_tx
);
dev_dbg
(
musb
->
controller
,
"packet_sz=%d, mode=%d, dma_addr=0x%x, len=%d is_tx=%d
\n
"
,
packet_sz
,
mode
,
dma_addr
,
len
,
ux500_channel
->
is_tx
);
ux500_channel
->
cur_len
=
len
;
...
...
@@ -133,15 +137,13 @@ static bool ux500_configure_channel(struct dma_channel *channel,
DMA_SLAVE_BUSWIDTH_4_BYTES
;
slave_conf
.
direction
=
direction
;
if
(
direction
==
DMA_FROM_DEVICE
)
{
slave_conf
.
src_addr
=
usb_fifo_addr
;
slave_conf
.
src_addr_width
=
addr_width
;
slave_conf
.
src_maxburst
=
16
;
}
else
{
slave_conf
.
dst_addr
=
usb_fifo_addr
;
slave_conf
.
dst_addr_width
=
addr_width
;
slave_conf
.
dst_maxburst
=
16
;
}
slave_conf
.
src_addr
=
usb_fifo_addr
;
slave_conf
.
src_addr_width
=
addr_width
;
slave_conf
.
src_maxburst
=
16
;
slave_conf
.
dst_addr
=
usb_fifo_addr
;
slave_conf
.
dst_addr_width
=
addr_width
;
slave_conf
.
dst_maxburst
=
16
;
dma_chan
->
device
->
device_control
(
dma_chan
,
DMA_SLAVE_CONFIG
,
(
unsigned
long
)
&
slave_conf
);
...
...
@@ -166,6 +168,7 @@ static struct dma_channel *ux500_dma_channel_allocate(struct dma_controller *c,
struct
ux500_dma_controller
*
controller
=
container_of
(
c
,
struct
ux500_dma_controller
,
controller
);
struct
ux500_dma_channel
*
ux500_channel
=
NULL
;
struct
musb
*
musb
=
controller
->
private_data
;
u8
ch_num
=
hw_ep
->
epnum
-
1
;
u32
max_ch
;
...
...
@@ -192,7 +195,7 @@ static struct dma_channel *ux500_dma_channel_allocate(struct dma_controller *c,
ux500_channel
->
hw_ep
=
hw_ep
;
ux500_channel
->
is_allocated
=
1
;
DBG
(
7
,
"hw_ep=%d, is_tx=0x%x, channel=%d
\n
"
,
dev_dbg
(
musb
->
controller
,
"hw_ep=%d, is_tx=0x%x, channel=%d
\n
"
,
hw_ep
->
epnum
,
is_tx
,
ch_num
);
return
&
(
ux500_channel
->
channel
);
...
...
@@ -201,8 +204,9 @@ static struct dma_channel *ux500_dma_channel_allocate(struct dma_controller *c,
static
void
ux500_dma_channel_release
(
struct
dma_channel
*
channel
)
{
struct
ux500_dma_channel
*
ux500_channel
=
channel
->
private_data
;
struct
musb
*
musb
=
ux500_channel
->
controller
->
private_data
;
DBG
(
7
,
"channel=%d
\n
"
,
ux500_channel
->
ch_num
);
dev_dbg
(
musb
->
controller
,
"channel=%d
\n
"
,
ux500_channel
->
ch_num
);
if
(
ux500_channel
->
is_allocated
)
{
ux500_channel
->
is_allocated
=
0
;
...
...
@@ -252,8 +256,8 @@ static int ux500_dma_channel_abort(struct dma_channel *channel)
void
__iomem
*
epio
=
musb
->
endpoints
[
ux500_channel
->
hw_ep
->
epnum
].
regs
;
u16
csr
;
DBG
(
4
,
"channel=%d, is_tx=%d
\n
"
,
ux500_channel
->
ch_num
,
ux500_channel
->
is_tx
);
dev_dbg
(
musb
->
controller
,
"channel=%d, is_tx=%d
\n
"
,
ux500_channel
->
ch_num
,
ux500_channel
->
is_tx
);
if
(
channel
->
status
==
MUSB_DMA_STATUS_BUSY
)
{
if
(
ux500_channel
->
is_tx
)
{
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部