Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
dd58ffcf
Commit
dd58ffcf
authored
Mar 03, 2010
by
Dan Williams
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'coh' into dmaengine
parents
aa4d72ae
56a5d3cf
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
116 additions
and
123 deletions
+116
-123
arch/arm/mach-u300/include/mach/coh901318.h
arch/arm/mach-u300/include/mach/coh901318.h
+1
-1
drivers/dma/coh901318.c
drivers/dma/coh901318.c
+96
-88
drivers/dma/coh901318_lli.c
drivers/dma/coh901318_lli.c
+9
-14
drivers/dma/dmaengine.c
drivers/dma/dmaengine.c
+1
-0
drivers/dma/dmatest.c
drivers/dma/dmatest.c
+1
-1
drivers/dma/ioat/dma_v2.c
drivers/dma/ioat/dma_v2.c
+1
-1
drivers/dma/ipu/ipu_idmac.c
drivers/dma/ipu/ipu_idmac.c
+7
-18
No files found.
arch/arm/mach-u300/include/mach/coh901318.h
View file @
dd58ffcf
...
@@ -53,7 +53,7 @@ struct coh901318_params {
...
@@ -53,7 +53,7 @@ struct coh901318_params {
* struct coh_dma_channel - dma channel base
* struct coh_dma_channel - dma channel base
* @name: ascii name of dma channel
* @name: ascii name of dma channel
* @number: channel id number
* @number: channel id number
* @desc_nbr_max: number of preallocated descriptor
tor
s
* @desc_nbr_max: number of preallocated descriptors
* @priority_high: prio of channel, 0 low otherwise high.
* @priority_high: prio of channel, 0 low otherwise high.
* @param: configuration parameters
* @param: configuration parameters
* @dev_addr: physical address of periphal connected to channel
* @dev_addr: physical address of periphal connected to channel
...
...
drivers/dma/coh901318.c
View file @
dd58ffcf
This diff is collapsed.
Click to expand it.
drivers/dma/coh901318_lli.c
View file @
dd58ffcf
...
@@ -74,6 +74,8 @@ coh901318_lli_alloc(struct coh901318_pool *pool, unsigned int len)
...
@@ -74,6 +74,8 @@ coh901318_lli_alloc(struct coh901318_pool *pool, unsigned int len)
lli
=
head
;
lli
=
head
;
lli
->
phy_this
=
phy
;
lli
->
phy_this
=
phy
;
lli
->
link_addr
=
0x00000000
;
lli
->
virt_link_addr
=
0x00000000U
;
for
(
i
=
1
;
i
<
len
;
i
++
)
{
for
(
i
=
1
;
i
<
len
;
i
++
)
{
lli_prev
=
lli
;
lli_prev
=
lli
;
...
@@ -85,13 +87,13 @@ coh901318_lli_alloc(struct coh901318_pool *pool, unsigned int len)
...
@@ -85,13 +87,13 @@ coh901318_lli_alloc(struct coh901318_pool *pool, unsigned int len)
DEBUGFS_POOL_COUNTER_ADD
(
pool
,
1
);
DEBUGFS_POOL_COUNTER_ADD
(
pool
,
1
);
lli
->
phy_this
=
phy
;
lli
->
phy_this
=
phy
;
lli
->
link_addr
=
0x00000000
;
lli
->
virt_link_addr
=
0x00000000U
;
lli_prev
->
link_addr
=
phy
;
lli_prev
->
link_addr
=
phy
;
lli_prev
->
virt_link_addr
=
lli
;
lli_prev
->
virt_link_addr
=
lli
;
}
}
lli
->
link_addr
=
0x00000000U
;
spin_unlock
(
&
pool
->
lock
);
spin_unlock
(
&
pool
->
lock
);
return
head
;
return
head
;
...
@@ -166,8 +168,7 @@ coh901318_lli_fill_memcpy(struct coh901318_pool *pool,
...
@@ -166,8 +168,7 @@ coh901318_lli_fill_memcpy(struct coh901318_pool *pool,
lli
->
src_addr
=
src
;
lli
->
src_addr
=
src
;
lli
->
dst_addr
=
dst
;
lli
->
dst_addr
=
dst
;
/* One irq per single transfer */
return
0
;
return
1
;
}
}
int
int
...
@@ -223,8 +224,7 @@ coh901318_lli_fill_single(struct coh901318_pool *pool,
...
@@ -223,8 +224,7 @@ coh901318_lli_fill_single(struct coh901318_pool *pool,
lli
->
src_addr
=
src
;
lli
->
src_addr
=
src
;
lli
->
dst_addr
=
dst
;
lli
->
dst_addr
=
dst
;
/* One irq per single transfer */
return
0
;
return
1
;
}
}
int
int
...
@@ -240,7 +240,6 @@ coh901318_lli_fill_sg(struct coh901318_pool *pool,
...
@@ -240,7 +240,6 @@ coh901318_lli_fill_sg(struct coh901318_pool *pool,
u32
ctrl_sg
;
u32
ctrl_sg
;
dma_addr_t
src
=
0
;
dma_addr_t
src
=
0
;
dma_addr_t
dst
=
0
;
dma_addr_t
dst
=
0
;
int
nbr_of_irq
=
0
;
u32
bytes_to_transfer
;
u32
bytes_to_transfer
;
u32
elem_size
;
u32
elem_size
;
...
@@ -269,15 +268,12 @@ coh901318_lli_fill_sg(struct coh901318_pool *pool,
...
@@ -269,15 +268,12 @@ coh901318_lli_fill_sg(struct coh901318_pool *pool,
ctrl_sg
=
ctrl
?
ctrl
:
ctrl_last
;
ctrl_sg
=
ctrl
?
ctrl
:
ctrl_last
;
if
((
ctrl_sg
&
ctrl_irq_mask
))
nbr_of_irq
++
;
if
(
dir
==
DMA_TO_DEVICE
)
if
(
dir
==
DMA_TO_DEVICE
)
/* increment source address */
/* increment source address */
src
=
sg_
dma_addres
s
(
sg
);
src
=
sg_
phy
s
(
sg
);
else
else
/* increment destination address */
/* increment destination address */
dst
=
sg_
dma_addres
s
(
sg
);
dst
=
sg_
phy
s
(
sg
);
bytes_to_transfer
=
sg_dma_len
(
sg
);
bytes_to_transfer
=
sg_dma_len
(
sg
);
...
@@ -310,8 +306,7 @@ coh901318_lli_fill_sg(struct coh901318_pool *pool,
...
@@ -310,8 +306,7 @@ coh901318_lli_fill_sg(struct coh901318_pool *pool,
}
}
spin_unlock
(
&
pool
->
lock
);
spin_unlock
(
&
pool
->
lock
);
/* There can be many IRQs per sg transfer */
return
0
;
return
nbr_of_irq
;
err:
err:
spin_unlock
(
&
pool
->
lock
);
spin_unlock
(
&
pool
->
lock
);
return
-
EINVAL
;
return
-
EINVAL
;
...
...
drivers/dma/dmaengine.c
View file @
dd58ffcf
...
@@ -826,6 +826,7 @@ void dma_async_device_unregister(struct dma_device *device)
...
@@ -826,6 +826,7 @@ void dma_async_device_unregister(struct dma_device *device)
chan
->
dev
->
chan
=
NULL
;
chan
->
dev
->
chan
=
NULL
;
mutex_unlock
(
&
dma_list_mutex
);
mutex_unlock
(
&
dma_list_mutex
);
device_unregister
(
&
chan
->
dev
->
device
);
device_unregister
(
&
chan
->
dev
->
device
);
free_percpu
(
chan
->
local
);
}
}
}
}
EXPORT_SYMBOL
(
dma_async_device_unregister
);
EXPORT_SYMBOL
(
dma_async_device_unregister
);
...
...
drivers/dma/dmatest.c
View file @
dd58ffcf
...
@@ -467,7 +467,7 @@ err_srcs:
...
@@ -467,7 +467,7 @@ err_srcs:
if
(
iterations
>
0
)
if
(
iterations
>
0
)
while
(
!
kthread_should_stop
())
{
while
(
!
kthread_should_stop
())
{
DECLARE_WAIT_QUEUE_HEAD
(
wait_dmatest_exit
);
DECLARE_WAIT_QUEUE_HEAD
_ONSTACK
(
wait_dmatest_exit
);
interruptible_sleep_on
(
&
wait_dmatest_exit
);
interruptible_sleep_on
(
&
wait_dmatest_exit
);
}
}
...
...
drivers/dma/ioat/dma_v2.c
View file @
dd58ffcf
...
@@ -241,7 +241,7 @@ int ioat2_quiesce(struct ioat_chan_common *chan, unsigned long tmo)
...
@@ -241,7 +241,7 @@ int ioat2_quiesce(struct ioat_chan_common *chan, unsigned long tmo)
if
(
is_ioat_active
(
status
)
||
is_ioat_idle
(
status
))
if
(
is_ioat_active
(
status
)
||
is_ioat_idle
(
status
))
ioat_suspend
(
chan
);
ioat_suspend
(
chan
);
while
(
is_ioat_active
(
status
)
||
is_ioat_idle
(
status
))
{
while
(
is_ioat_active
(
status
)
||
is_ioat_idle
(
status
))
{
if
(
end
&&
time_after
(
jiffies
,
end
))
{
if
(
tmo
&&
time_after
(
jiffies
,
end
))
{
err
=
-
ETIMEDOUT
;
err
=
-
ETIMEDOUT
;
break
;
break
;
}
}
...
...
drivers/dma/ipu/ipu_idmac.c
View file @
dd58ffcf
...
@@ -748,12 +748,10 @@ static void ipu_select_buffer(enum ipu_channel channel, int buffer_n)
...
@@ -748,12 +748,10 @@ static void ipu_select_buffer(enum ipu_channel channel, int buffer_n)
* @buffer_n: buffer number to update.
* @buffer_n: buffer number to update.
* 0 or 1 are the only valid values.
* 0 or 1 are the only valid values.
* @phyaddr: buffer physical address.
* @phyaddr: buffer physical address.
* @return: Returns 0 on success or negative error code on failure. This
* function will fail if the buffer is set to ready.
*/
*/
/* Called under spin_lock(_irqsave)(&ichan->lock) */
/* Called under spin_lock(_irqsave)(&ichan->lock) */
static
int
ipu_update_channel_buffer
(
struct
idmac_channel
*
ichan
,
static
void
ipu_update_channel_buffer
(
struct
idmac_channel
*
ichan
,
int
buffer_n
,
dma_addr_t
phyaddr
)
int
buffer_n
,
dma_addr_t
phyaddr
)
{
{
enum
ipu_channel
channel
=
ichan
->
dma_chan
.
chan_id
;
enum
ipu_channel
channel
=
ichan
->
dma_chan
.
chan_id
;
uint32_t
reg
;
uint32_t
reg
;
...
@@ -793,8 +791,6 @@ static int ipu_update_channel_buffer(struct idmac_channel *ichan,
...
@@ -793,8 +791,6 @@ static int ipu_update_channel_buffer(struct idmac_channel *ichan,
}
}
spin_unlock_irqrestore
(
&
ipu_data
.
lock
,
flags
);
spin_unlock_irqrestore
(
&
ipu_data
.
lock
,
flags
);
return
0
;
}
}
/* Called under spin_lock_irqsave(&ichan->lock) */
/* Called under spin_lock_irqsave(&ichan->lock) */
...
@@ -803,7 +799,6 @@ static int ipu_submit_buffer(struct idmac_channel *ichan,
...
@@ -803,7 +799,6 @@ static int ipu_submit_buffer(struct idmac_channel *ichan,
{
{
unsigned
int
chan_id
=
ichan
->
dma_chan
.
chan_id
;
unsigned
int
chan_id
=
ichan
->
dma_chan
.
chan_id
;
struct
device
*
dev
=
&
ichan
->
dma_chan
.
dev
->
device
;
struct
device
*
dev
=
&
ichan
->
dma_chan
.
dev
->
device
;
int
ret
;
if
(
async_tx_test_ack
(
&
desc
->
txd
))
if
(
async_tx_test_ack
(
&
desc
->
txd
))
return
-
EINTR
;
return
-
EINTR
;
...
@@ -814,14 +809,7 @@ static int ipu_submit_buffer(struct idmac_channel *ichan,
...
@@ -814,14 +809,7 @@ static int ipu_submit_buffer(struct idmac_channel *ichan,
* could make it conditional on status >= IPU_CHANNEL_ENABLED, but
* could make it conditional on status >= IPU_CHANNEL_ENABLED, but
* doing it again shouldn't hurt either.
* doing it again shouldn't hurt either.
*/
*/
ret
=
ipu_update_channel_buffer
(
ichan
,
buf_idx
,
ipu_update_channel_buffer
(
ichan
,
buf_idx
,
sg_dma_address
(
sg
));
sg_dma_address
(
sg
));
if
(
ret
<
0
)
{
dev_err
(
dev
,
"Updating sg %p on channel 0x%x buffer %d failed!
\n
"
,
sg
,
chan_id
,
buf_idx
);
return
ret
;
}
ipu_select_buffer
(
chan_id
,
buf_idx
);
ipu_select_buffer
(
chan_id
,
buf_idx
);
dev_dbg
(
dev
,
"Updated sg %p on channel 0x%x buffer %d
\n
"
,
dev_dbg
(
dev
,
"Updated sg %p on channel 0x%x buffer %d
\n
"
,
...
@@ -1366,10 +1354,11 @@ static irqreturn_t idmac_interrupt(int irq, void *dev_id)
...
@@ -1366,10 +1354,11 @@ static irqreturn_t idmac_interrupt(int irq, void *dev_id)
if
(
likely
(
sgnew
)
&&
if
(
likely
(
sgnew
)
&&
ipu_submit_buffer
(
ichan
,
descnew
,
sgnew
,
ichan
->
active_buffer
)
<
0
)
{
ipu_submit_buffer
(
ichan
,
descnew
,
sgnew
,
ichan
->
active_buffer
)
<
0
)
{
callback
=
desc
->
txd
.
callback
;
callback
=
desc
new
->
txd
.
callback
;
callback_param
=
desc
->
txd
.
callback_param
;
callback_param
=
desc
new
->
txd
.
callback_param
;
spin_unlock
(
&
ichan
->
lock
);
spin_unlock
(
&
ichan
->
lock
);
callback
(
callback_param
);
if
(
callback
)
callback
(
callback_param
);
spin_lock
(
&
ichan
->
lock
);
spin_lock
(
&
ichan
->
lock
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment