Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
2ef2e60d
Commit
2ef2e60d
authored
Oct 25, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'spi/topic/atmel' into spi-next
parents
c55b869a
543c954d
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
71 additions
and
73 deletions
+71
-73
drivers/spi/spi-atmel.c
drivers/spi/spi-atmel.c
+25
-25
drivers/spi/spi-bfin-sport.c
drivers/spi/spi-bfin-sport.c
+1
-1
drivers/spi/spi-bfin5xx.c
drivers/spi/spi-bfin5xx.c
+11
-10
drivers/spi/spi-dw.c
drivers/spi/spi-dw.c
+2
-2
drivers/spi/spi-ep93xx.c
drivers/spi/spi-ep93xx.c
+2
-2
drivers/spi/spi-fsl-cpm.c
drivers/spi/spi-fsl-cpm.c
+1
-1
drivers/spi/spi-fsl-espi.c
drivers/spi/spi-fsl-espi.c
+2
-2
drivers/spi/spi-mpc52xx-psc.c
drivers/spi/spi-mpc52xx-psc.c
+2
-2
drivers/spi/spi-omap2-mcspi.c
drivers/spi/spi-omap2-mcspi.c
+2
-2
drivers/spi/spi-pxa2xx.c
drivers/spi/spi-pxa2xx.c
+16
-20
drivers/spi/spi-topcliff-pch.c
drivers/spi/spi-topcliff-pch.c
+7
-6
No files found.
drivers/spi/spi-atmel.c
View file @
2ef2e60d
...
@@ -170,18 +170,18 @@
...
@@ -170,18 +170,18 @@
/* Bit manipulation macros */
/* Bit manipulation macros */
#define SPI_BIT(name) \
#define SPI_BIT(name) \
(1 << SPI_##name##_OFFSET)
(1 << SPI_##name##_OFFSET)
#define SPI_BF(name,value) \
#define SPI_BF(name,
value) \
(((value) & ((1 << SPI_##name##_SIZE) - 1)) << SPI_##name##_OFFSET)
(((value) & ((1 << SPI_##name##_SIZE) - 1)) << SPI_##name##_OFFSET)
#define SPI_BFEXT(name,value) \
#define SPI_BFEXT(name,
value) \
(((value) >> SPI_##name##_OFFSET) & ((1 << SPI_##name##_SIZE) - 1))
(((value) >> SPI_##name##_OFFSET) & ((1 << SPI_##name##_SIZE) - 1))
#define SPI_BFINS(name,
value,
old) \
#define SPI_BFINS(name,
value,
old) \
(
((old) & ~(((1 << SPI_##name##_SIZE) - 1) << SPI_##name##_OFFSET)) \
(((old) & ~(((1 << SPI_##name##_SIZE) - 1) << SPI_##name##_OFFSET)) \
| SPI_BF(name,value))
| SPI_BF(name,
value))
/* Register access macros */
/* Register access macros */
#define spi_readl(port,reg) \
#define spi_readl(port,
reg) \
__raw_readl((port)->regs + SPI_##reg)
__raw_readl((port)->regs + SPI_##reg)
#define spi_writel(port,
reg,
value) \
#define spi_writel(port,
reg,
value) \
__raw_writel((value), (port)->regs + SPI_##reg)
__raw_writel((value), (port)->regs + SPI_##reg)
/* use PIO for small transfers, avoiding DMA setup/teardown overhead and
/* use PIO for small transfers, avoiding DMA setup/teardown overhead and
...
@@ -1401,8 +1401,8 @@ static int atmel_spi_transfer(struct spi_device *spi, struct spi_message *msg)
...
@@ -1401,8 +1401,8 @@ static int atmel_spi_transfer(struct spi_device *spi, struct spi_message *msg)
asd
=
spi
->
controller_state
;
asd
=
spi
->
controller_state
;
bits
=
(
asd
->
csr
>>
4
)
&
0xf
;
bits
=
(
asd
->
csr
>>
4
)
&
0xf
;
if
(
bits
!=
xfer
->
bits_per_word
-
8
)
{
if
(
bits
!=
xfer
->
bits_per_word
-
8
)
{
dev_dbg
(
&
spi
->
dev
,
"you can't yet change "
dev_dbg
(
&
spi
->
dev
,
"
bits_per_word in transfers
\n
"
);
"you can't yet change
bits_per_word in transfers
\n
"
);
return
-
ENOPROTOOPT
;
return
-
ENOPROTOOPT
;
}
}
}
}
...
@@ -1516,7 +1516,7 @@ static int atmel_spi_probe(struct platform_device *pdev)
...
@@ -1516,7 +1516,7 @@ static int atmel_spi_probe(struct platform_device *pdev)
/* setup spi core then atmel-specific driver state */
/* setup spi core then atmel-specific driver state */
ret
=
-
ENOMEM
;
ret
=
-
ENOMEM
;
master
=
spi_alloc_master
(
&
pdev
->
dev
,
sizeof
*
as
);
master
=
spi_alloc_master
(
&
pdev
->
dev
,
sizeof
(
*
as
)
);
if
(
!
master
)
if
(
!
master
)
goto
out_free
;
goto
out_free
;
...
@@ -1546,9 +1546,11 @@ static int atmel_spi_probe(struct platform_device *pdev)
...
@@ -1546,9 +1546,11 @@ static int atmel_spi_probe(struct platform_device *pdev)
INIT_LIST_HEAD
(
&
as
->
queue
);
INIT_LIST_HEAD
(
&
as
->
queue
);
as
->
pdev
=
pdev
;
as
->
pdev
=
pdev
;
as
->
regs
=
ioremap
(
regs
->
start
,
resource_size
(
regs
));
as
->
regs
=
devm_ioremap_resource
(
&
pdev
->
dev
,
regs
);
if
(
!
as
->
regs
)
if
(
IS_ERR
(
as
->
regs
))
{
ret
=
PTR_ERR
(
as
->
regs
);
goto
out_free_buffer
;
goto
out_free_buffer
;
}
as
->
phybase
=
regs
->
start
;
as
->
phybase
=
regs
->
start
;
as
->
irq
=
irq
;
as
->
irq
=
irq
;
as
->
clk
=
clk
;
as
->
clk
=
clk
;
...
@@ -1617,7 +1619,6 @@ static int atmel_spi_probe(struct platform_device *pdev)
...
@@ -1617,7 +1619,6 @@ static int atmel_spi_probe(struct platform_device *pdev)
out_free_irq:
out_free_irq:
free_irq
(
irq
,
master
);
free_irq
(
irq
,
master
);
out_unmap_regs:
out_unmap_regs:
iounmap
(
as
->
regs
);
out_free_buffer:
out_free_buffer:
if
(
!
as
->
use_pdc
)
if
(
!
as
->
use_pdc
)
tasklet_kill
(
&
as
->
tasklet
);
tasklet_kill
(
&
as
->
tasklet
);
...
@@ -1669,36 +1670,36 @@ static int atmel_spi_remove(struct platform_device *pdev)
...
@@ -1669,36 +1670,36 @@ static int atmel_spi_remove(struct platform_device *pdev)
clk_disable_unprepare
(
as
->
clk
);
clk_disable_unprepare
(
as
->
clk
);
clk_put
(
as
->
clk
);
clk_put
(
as
->
clk
);
free_irq
(
as
->
irq
,
master
);
free_irq
(
as
->
irq
,
master
);
iounmap
(
as
->
regs
);
spi_unregister_master
(
master
);
spi_unregister_master
(
master
);
return
0
;
return
0
;
}
}
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static
int
atmel_spi_suspend
(
struct
device
*
dev
)
static
int
atmel_spi_suspend
(
struct
platform_device
*
pdev
,
pm_message_t
mesg
)
{
{
struct
spi_master
*
master
=
platform_get_drvdata
(
p
dev
);
struct
spi_master
*
master
=
dev_get_drvdata
(
dev
);
struct
atmel_spi
*
as
=
spi_master_get_devdata
(
master
);
struct
atmel_spi
*
as
=
spi_master_get_devdata
(
master
);
clk_disable_unprepare
(
as
->
clk
);
clk_disable_unprepare
(
as
->
clk
);
return
0
;
return
0
;
}
}
static
int
atmel_spi_resume
(
struct
platform_device
*
p
dev
)
static
int
atmel_spi_resume
(
struct
device
*
dev
)
{
{
struct
spi_master
*
master
=
platform_get_drvdata
(
p
dev
);
struct
spi_master
*
master
=
dev_get_drvdata
(
dev
);
struct
atmel_spi
*
as
=
spi_master_get_devdata
(
master
);
struct
atmel_spi
*
as
=
spi_master_get_devdata
(
master
);
return
clk_prepare_enable
(
as
->
clk
);
clk_prepare_enable
(
as
->
clk
);
return
0
;
return
0
;
}
}
static
SIMPLE_DEV_PM_OPS
(
atmel_spi_pm_ops
,
atmel_spi_suspend
,
atmel_spi_resume
);
#define ATMEL_SPI_PM_OPS (&atmel_spi_pm_ops)
#else
#else
#define atmel_spi_suspend NULL
#define ATMEL_SPI_PM_OPS NULL
#define atmel_spi_resume NULL
#endif
#endif
#if defined(CONFIG_OF)
#if defined(CONFIG_OF)
...
@@ -1714,10 +1715,9 @@ static struct platform_driver atmel_spi_driver = {
...
@@ -1714,10 +1715,9 @@ static struct platform_driver atmel_spi_driver = {
.
driver
=
{
.
driver
=
{
.
name
=
"atmel_spi"
,
.
name
=
"atmel_spi"
,
.
owner
=
THIS_MODULE
,
.
owner
=
THIS_MODULE
,
.
pm
=
ATMEL_SPI_PM_OPS
,
.
of_match_table
=
of_match_ptr
(
atmel_spi_dt_ids
),
.
of_match_table
=
of_match_ptr
(
atmel_spi_dt_ids
),
},
},
.
suspend
=
atmel_spi_suspend
,
.
resume
=
atmel_spi_resume
,
.
probe
=
atmel_spi_probe
,
.
probe
=
atmel_spi_probe
,
.
remove
=
atmel_spi_remove
,
.
remove
=
atmel_spi_remove
,
};
};
...
...
drivers/spi/spi-bfin-sport.c
View file @
2ef2e60d
...
@@ -592,7 +592,7 @@ bfin_sport_spi_setup(struct spi_device *spi)
...
@@ -592,7 +592,7 @@ bfin_sport_spi_setup(struct spi_device *spi)
*/
*/
if
(
chip_info
->
ctl_reg
||
chip_info
->
enable_dma
)
{
if
(
chip_info
->
ctl_reg
||
chip_info
->
enable_dma
)
{
ret
=
-
EINVAL
;
ret
=
-
EINVAL
;
dev_err
(
&
spi
->
dev
,
"don't set ctl_reg/enable_dma fields"
);
dev_err
(
&
spi
->
dev
,
"don't set ctl_reg/enable_dma fields
\n
"
);
goto
error
;
goto
error
;
}
}
chip
->
cs_chg_udelay
=
chip_info
->
cs_chg_udelay
;
chip
->
cs_chg_udelay
=
chip_info
->
cs_chg_udelay
;
...
...
drivers/spi/spi-bfin5xx.c
View file @
2ef2e60d
...
@@ -524,7 +524,7 @@ static irqreturn_t bfin_spi_dma_irq_handler(int irq, void *dev_id)
...
@@ -524,7 +524,7 @@ static irqreturn_t bfin_spi_dma_irq_handler(int irq, void *dev_id)
timeout
=
jiffies
+
HZ
;
timeout
=
jiffies
+
HZ
;
while
(
!
(
bfin_read
(
&
drv_data
->
regs
->
stat
)
&
BIT_STAT_SPIF
))
while
(
!
(
bfin_read
(
&
drv_data
->
regs
->
stat
)
&
BIT_STAT_SPIF
))
if
(
!
time_before
(
jiffies
,
timeout
))
{
if
(
!
time_before
(
jiffies
,
timeout
))
{
dev_warn
(
&
drv_data
->
pdev
->
dev
,
"timeout waiting for SPIF"
);
dev_warn
(
&
drv_data
->
pdev
->
dev
,
"timeout waiting for SPIF
\n
"
);
break
;
break
;
}
else
}
else
cpu_relax
();
cpu_relax
();
...
@@ -913,8 +913,9 @@ static void bfin_spi_pump_messages(struct work_struct *work)
...
@@ -913,8 +913,9 @@ static void bfin_spi_pump_messages(struct work_struct *work)
drv_data
->
cur_transfer
=
list_entry
(
drv_data
->
cur_msg
->
transfers
.
next
,
drv_data
->
cur_transfer
=
list_entry
(
drv_data
->
cur_msg
->
transfers
.
next
,
struct
spi_transfer
,
transfer_list
);
struct
spi_transfer
,
transfer_list
);
dev_dbg
(
&
drv_data
->
pdev
->
dev
,
"got a message to pump, "
dev_dbg
(
&
drv_data
->
pdev
->
dev
,
"state is set to: baud %d, flag 0x%x, ctl 0x%x
\n
"
,
"got a message to pump, state is set to: baud "
"%d, flag 0x%x, ctl 0x%x
\n
"
,
drv_data
->
cur_chip
->
baud
,
drv_data
->
cur_chip
->
flag
,
drv_data
->
cur_chip
->
baud
,
drv_data
->
cur_chip
->
flag
,
drv_data
->
cur_chip
->
ctl_reg
);
drv_data
->
cur_chip
->
ctl_reg
);
...
@@ -1013,8 +1014,8 @@ static int bfin_spi_setup(struct spi_device *spi)
...
@@ -1013,8 +1014,8 @@ static int bfin_spi_setup(struct spi_device *spi)
* but let's assume (for now) they do.
* but let's assume (for now) they do.
*/
*/
if
(
chip_info
->
ctl_reg
&
~
bfin_ctl_reg
)
{
if
(
chip_info
->
ctl_reg
&
~
bfin_ctl_reg
)
{
dev_err
(
&
spi
->
dev
,
"do not set bits in ctl_reg "
dev_err
(
&
spi
->
dev
,
"that the SPI framework manages
\n
"
);
"
do not set bits in ctl_reg
that the SPI framework manages
\n
"
);
goto
error
;
goto
error
;
}
}
chip
->
enable_dma
=
chip_info
->
enable_dma
!=
0
chip
->
enable_dma
=
chip_info
->
enable_dma
!=
0
...
@@ -1050,17 +1051,17 @@ static int bfin_spi_setup(struct spi_device *spi)
...
@@ -1050,17 +1051,17 @@ static int bfin_spi_setup(struct spi_device *spi)
chip
->
chip_select_num
=
spi
->
chip_select
;
chip
->
chip_select_num
=
spi
->
chip_select
;
if
(
chip
->
chip_select_num
<
MAX_CTRL_CS
)
{
if
(
chip
->
chip_select_num
<
MAX_CTRL_CS
)
{
if
(
!
(
spi
->
mode
&
SPI_CPHA
))
if
(
!
(
spi
->
mode
&
SPI_CPHA
))
dev_warn
(
&
spi
->
dev
,
"Warning: SPI CPHA not set:"
dev_warn
(
&
spi
->
dev
,
" Slave Select not under software control!
\n
"
"
Warning: SPI CPHA not set:
Slave Select not under software control!
\n
"
"
See Documentation/blackfin/bfin-spi-notes.txt
"
);
"
See Documentation/blackfin/bfin-spi-notes.txt
\n
"
);
chip
->
flag
=
(
1
<<
spi
->
chip_select
)
<<
8
;
chip
->
flag
=
(
1
<<
spi
->
chip_select
)
<<
8
;
}
else
}
else
chip
->
cs_gpio
=
chip
->
chip_select_num
-
MAX_CTRL_CS
;
chip
->
cs_gpio
=
chip
->
chip_select_num
-
MAX_CTRL_CS
;
if
(
chip
->
enable_dma
&&
chip
->
pio_interrupt
)
{
if
(
chip
->
enable_dma
&&
chip
->
pio_interrupt
)
{
dev_err
(
&
spi
->
dev
,
"enable_dma is set, "
dev_err
(
&
spi
->
dev
,
"
do not set pio_interrupt
\n
"
);
"enable_dma is set,
do not set pio_interrupt
\n
"
);
goto
error
;
goto
error
;
}
}
/*
/*
...
...
drivers/spi/spi-dw.c
View file @
2ef2e60d
...
@@ -870,8 +870,8 @@ void dw_spi_remove_host(struct dw_spi *dws)
...
@@ -870,8 +870,8 @@ void dw_spi_remove_host(struct dw_spi *dws)
/* Remove the queue */
/* Remove the queue */
status
=
destroy_queue
(
dws
);
status
=
destroy_queue
(
dws
);
if
(
status
!=
0
)
if
(
status
!=
0
)
dev_err
(
&
dws
->
master
->
dev
,
"dw_spi_remove: workqueue will not "
dev_err
(
&
dws
->
master
->
dev
,
"complete, message memory not freed
\n
"
);
"
dw_spi_remove: workqueue will not
complete, message memory not freed
\n
"
);
if
(
dws
->
dma_ops
&&
dws
->
dma_ops
->
dma_exit
)
if
(
dws
->
dma_ops
&&
dws
->
dma_ops
->
dma_exit
)
dws
->
dma_ops
->
dma_exit
(
dws
);
dws
->
dma_ops
->
dma_exit
(
dws
);
...
...
drivers/spi/spi-ep93xx.c
View file @
2ef2e60d
...
@@ -330,7 +330,7 @@ static int ep93xx_spi_chip_setup(const struct ep93xx_spi *espi,
...
@@ -330,7 +330,7 @@ static int ep93xx_spi_chip_setup(const struct ep93xx_spi *espi,
dev_dbg
(
&
espi
->
pdev
->
dev
,
"setup: mode %d, cpsr %d, scr %d, dss %d
\n
"
,
dev_dbg
(
&
espi
->
pdev
->
dev
,
"setup: mode %d, cpsr %d, scr %d, dss %d
\n
"
,
chip
->
spi
->
mode
,
div_cpsr
,
div_scr
,
dss
);
chip
->
spi
->
mode
,
div_cpsr
,
div_scr
,
dss
);
dev_dbg
(
&
espi
->
pdev
->
dev
,
"setup: cr0 %#x"
,
cr0
);
dev_dbg
(
&
espi
->
pdev
->
dev
,
"setup: cr0 %#x
\n
"
,
cr0
);
ep93xx_spi_write_u8
(
espi
,
SSPCPSR
,
div_cpsr
);
ep93xx_spi_write_u8
(
espi
,
SSPCPSR
,
div_cpsr
);
ep93xx_spi_write_u16
(
espi
,
SSPCR0
,
cr0
);
ep93xx_spi_write_u16
(
espi
,
SSPCR0
,
cr0
);
...
@@ -509,7 +509,7 @@ ep93xx_spi_dma_prepare(struct ep93xx_spi *espi, enum dma_transfer_direction dir)
...
@@ -509,7 +509,7 @@ ep93xx_spi_dma_prepare(struct ep93xx_spi *espi, enum dma_transfer_direction dir)
}
}
if
(
WARN_ON
(
len
))
{
if
(
WARN_ON
(
len
))
{
dev_warn
(
&
espi
->
pdev
->
dev
,
"len = %zu expected 0!"
,
len
);
dev_warn
(
&
espi
->
pdev
->
dev
,
"len = %zu expected 0!
\n
"
,
len
);
return
ERR_PTR
(
-
EINVAL
);
return
ERR_PTR
(
-
EINVAL
);
}
}
...
...
drivers/spi/spi-fsl-cpm.c
View file @
2ef2e60d
...
@@ -299,7 +299,7 @@ int fsl_spi_cpm_init(struct mpc8xxx_spi *mspi)
...
@@ -299,7 +299,7 @@ int fsl_spi_cpm_init(struct mpc8xxx_spi *mspi)
switch
(
mspi
->
subblock
)
{
switch
(
mspi
->
subblock
)
{
default:
default:
dev_warn
(
dev
,
"cell-index unspecified, assuming SPI1"
);
dev_warn
(
dev
,
"cell-index unspecified, assuming SPI1
\n
"
);
/* fall through */
/* fall through */
case
0
:
case
0
:
mspi
->
subblock
=
QE_CR_SUBBLOCK_SPI1
;
mspi
->
subblock
=
QE_CR_SUBBLOCK_SPI1
;
...
...
drivers/spi/spi-fsl-espi.c
View file @
2ef2e60d
...
@@ -289,8 +289,8 @@ static void fsl_espi_do_trans(struct spi_message *m,
...
@@ -289,8 +289,8 @@ static void fsl_espi_do_trans(struct spi_message *m,
if
((
first
->
bits_per_word
!=
t
->
bits_per_word
)
||
if
((
first
->
bits_per_word
!=
t
->
bits_per_word
)
||
(
first
->
speed_hz
!=
t
->
speed_hz
))
{
(
first
->
speed_hz
!=
t
->
speed_hz
))
{
espi_trans
->
status
=
-
EINVAL
;
espi_trans
->
status
=
-
EINVAL
;
dev_err
(
mspi
->
dev
,
"bits_per_word/speed_hz should be"
dev_err
(
mspi
->
dev
,
"
same for the same SPI transfer
\n
"
);
"bits_per_word/speed_hz should be
same for the same SPI transfer
\n
"
);
return
;
return
;
}
}
...
...
drivers/spi/spi-mpc52xx-psc.c
View file @
2ef2e60d
...
@@ -383,8 +383,8 @@ static int mpc52xx_psc_spi_do_probe(struct device *dev, u32 regaddr,
...
@@ -383,8 +383,8 @@ static int mpc52xx_psc_spi_do_probe(struct device *dev, u32 regaddr,
mps
->
irq
=
irq
;
mps
->
irq
=
irq
;
if
(
pdata
==
NULL
)
{
if
(
pdata
==
NULL
)
{
dev_warn
(
dev
,
"probe called without platform data, no "
dev_warn
(
dev
,
"
cs_control function will be called
\n
"
);
"probe called without platform data, no
cs_control function will be called
\n
"
);
mps
->
cs_control
=
NULL
;
mps
->
cs_control
=
NULL
;
mps
->
sysclk
=
0
;
mps
->
sysclk
=
0
;
master
->
bus_num
=
bus_num
;
master
->
bus_num
=
bus_num
;
...
...
drivers/spi/spi-omap2-mcspi.c
View file @
2ef2e60d
...
@@ -504,7 +504,7 @@ omap2_mcspi_rx_dma(struct spi_device *spi, struct spi_transfer *xfer,
...
@@ -504,7 +504,7 @@ omap2_mcspi_rx_dma(struct spi_device *spi, struct spi_transfer *xfer,
((
u32
*
)
xfer
->
rx_buf
)[
elements
++
]
=
w
;
((
u32
*
)
xfer
->
rx_buf
)[
elements
++
]
=
w
;
}
else
{
}
else
{
int
bytes_per_word
=
mcspi_bytes_per_word
(
word_len
);
int
bytes_per_word
=
mcspi_bytes_per_word
(
word_len
);
dev_err
(
&
spi
->
dev
,
"DMA RX penultimate word empty"
);
dev_err
(
&
spi
->
dev
,
"DMA RX penultimate word empty
\n
"
);
count
-=
(
bytes_per_word
<<
1
);
count
-=
(
bytes_per_word
<<
1
);
omap2_mcspi_set_enable
(
spi
,
1
);
omap2_mcspi_set_enable
(
spi
,
1
);
return
count
;
return
count
;
...
@@ -522,7 +522,7 @@ omap2_mcspi_rx_dma(struct spi_device *spi, struct spi_transfer *xfer,
...
@@ -522,7 +522,7 @@ omap2_mcspi_rx_dma(struct spi_device *spi, struct spi_transfer *xfer,
else
/* word_len <= 32 */
else
/* word_len <= 32 */
((
u32
*
)
xfer
->
rx_buf
)[
elements
]
=
w
;
((
u32
*
)
xfer
->
rx_buf
)[
elements
]
=
w
;
}
else
{
}
else
{
dev_err
(
&
spi
->
dev
,
"DMA RX last word empty"
);
dev_err
(
&
spi
->
dev
,
"DMA RX last word empty
\n
"
);
count
-=
mcspi_bytes_per_word
(
word_len
);
count
-=
mcspi_bytes_per_word
(
word_len
);
}
}
omap2_mcspi_set_enable
(
spi
,
1
);
omap2_mcspi_set_enable
(
spi
,
1
);
...
...
drivers/spi/spi-pxa2xx.c
View file @
2ef2e60d
...
@@ -573,8 +573,8 @@ static irqreturn_t ssp_int(int irq, void *dev_id)
...
@@ -573,8 +573,8 @@ static irqreturn_t ssp_int(int irq, void *dev_id)
write_SSTO
(
0
,
reg
);
write_SSTO
(
0
,
reg
);
write_SSSR_CS
(
drv_data
,
drv_data
->
clear_sr
);
write_SSSR_CS
(
drv_data
,
drv_data
->
clear_sr
);
dev_err
(
&
drv_data
->
pdev
->
dev
,
"bad message state "
dev_err
(
&
drv_data
->
pdev
->
dev
,
"in interrupt handler
\n
"
);
"
bad message state
in interrupt handler
\n
"
);
/* Never fail */
/* Never fail */
return
IRQ_HANDLED
;
return
IRQ_HANDLED
;
...
@@ -651,8 +651,8 @@ static void pump_transfers(unsigned long data)
...
@@ -651,8 +651,8 @@ static void pump_transfers(unsigned long data)
if
(
message
->
is_dma_mapped
if
(
message
->
is_dma_mapped
||
transfer
->
rx_dma
||
transfer
->
tx_dma
)
{
||
transfer
->
rx_dma
||
transfer
->
tx_dma
)
{
dev_err
(
&
drv_data
->
pdev
->
dev
,
dev_err
(
&
drv_data
->
pdev
->
dev
,
"pump_transfers: mapped transfer length "
"pump_transfers: mapped transfer length
of
"
"
of
%u is greater than %d
\n
"
,
"%u is greater than %d
\n
"
,
transfer
->
len
,
MAX_DMA_LEN
);
transfer
->
len
,
MAX_DMA_LEN
);
message
->
status
=
-
EINVAL
;
message
->
status
=
-
EINVAL
;
giveback
(
drv_data
);
giveback
(
drv_data
);
...
@@ -660,9 +660,8 @@ static void pump_transfers(unsigned long data)
...
@@ -660,9 +660,8 @@ static void pump_transfers(unsigned long data)
}
}
/* warn ... we force this to PIO mode */
/* warn ... we force this to PIO mode */
if
(
printk_ratelimit
())
dev_warn_ratelimited
(
&
message
->
spi
->
dev
,
dev_warn
(
&
message
->
spi
->
dev
,
"pump_transfers: "
"pump_transfers: DMA disabled for transfer length %ld "
"DMA disabled for transfer length %ld "
"greater than %d
\n
"
,
"greater than %d
\n
"
,
(
long
)
drv_data
->
len
,
MAX_DMA_LEN
);
(
long
)
drv_data
->
len
,
MAX_DMA_LEN
);
}
}
...
@@ -726,11 +725,8 @@ static void pump_transfers(unsigned long data)
...
@@ -726,11 +725,8 @@ static void pump_transfers(unsigned long data)
message
->
spi
,
message
->
spi
,
bits
,
&
dma_burst
,
bits
,
&
dma_burst
,
&
dma_thresh
))
&
dma_thresh
))
if
(
printk_ratelimit
())
dev_warn_ratelimited
(
&
message
->
spi
->
dev
,
dev_warn
(
&
message
->
spi
->
dev
,
"pump_transfers: DMA burst size reduced to match bits_per_word
\n
"
);
"pump_transfers: "
"DMA burst size reduced to "
"match bits_per_word
\n
"
);
}
}
cr0
=
clk_div
cr0
=
clk_div
...
@@ -854,8 +850,8 @@ static int setup_cs(struct spi_device *spi, struct chip_data *chip,
...
@@ -854,8 +850,8 @@ static int setup_cs(struct spi_device *spi, struct chip_data *chip,
if
(
gpio_is_valid
(
chip_info
->
gpio_cs
))
{
if
(
gpio_is_valid
(
chip_info
->
gpio_cs
))
{
err
=
gpio_request
(
chip_info
->
gpio_cs
,
"SPI_CS"
);
err
=
gpio_request
(
chip_info
->
gpio_cs
,
"SPI_CS"
);
if
(
err
)
{
if
(
err
)
{
dev_err
(
&
spi
->
dev
,
"failed to request chip select
"
dev_err
(
&
spi
->
dev
,
"failed to request chip select
GPIO%d
\n
"
,
"GPIO%d
\n
"
,
chip_info
->
gpio_cs
);
chip_info
->
gpio_cs
);
return
err
;
return
err
;
}
}
...
@@ -899,8 +895,8 @@ static int setup(struct spi_device *spi)
...
@@ -899,8 +895,8 @@ static int setup(struct spi_device *spi)
if
(
drv_data
->
ssp_type
==
CE4100_SSP
)
{
if
(
drv_data
->
ssp_type
==
CE4100_SSP
)
{
if
(
spi
->
chip_select
>
4
)
{
if
(
spi
->
chip_select
>
4
)
{
dev_err
(
&
spi
->
dev
,
"failed setup: "
dev_err
(
&
spi
->
dev
,
"
cs number must not be > 4.
\n
"
);
"failed setup:
cs number must not be > 4.
\n
"
);
kfree
(
chip
);
kfree
(
chip
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
@@ -956,8 +952,8 @@ static int setup(struct spi_device *spi)
...
@@ -956,8 +952,8 @@ static int setup(struct spi_device *spi)
spi
->
bits_per_word
,
spi
->
bits_per_word
,
&
chip
->
dma_burst_size
,
&
chip
->
dma_burst_size
,
&
chip
->
dma_threshold
))
{
&
chip
->
dma_threshold
))
{
dev_warn
(
&
spi
->
dev
,
"in setup: DMA burst size reduced "
dev_warn
(
&
spi
->
dev
,
"
to match bits_per_word
\n
"
);
"in setup: DMA burst size reduced
to match bits_per_word
\n
"
);
}
}
}
}
...
...
drivers/spi/spi-topcliff-pch.c
View file @
2ef2e60d
...
@@ -506,8 +506,8 @@ static int pch_spi_transfer(struct spi_device *pspi, struct spi_message *pmsg)
...
@@ -506,8 +506,8 @@ static int pch_spi_transfer(struct spi_device *pspi, struct spi_message *pmsg)
goto
err_out
;
goto
err_out
;
}
}
dev_dbg
(
&
pspi
->
dev
,
"%s Transfer List not empty. "
dev_dbg
(
&
pspi
->
dev
,
"Transfer Speed is set.
\n
"
,
__func__
);
"
%s Transfer List not empty.
Transfer Speed is set.
\n
"
,
__func__
);
spin_lock_irqsave
(
&
data
->
lock
,
flags
);
spin_lock_irqsave
(
&
data
->
lock
,
flags
);
/* validate Tx/Rx buffers and Transfer length */
/* validate Tx/Rx buffers and Transfer length */
...
@@ -526,8 +526,9 @@ static int pch_spi_transfer(struct spi_device *pspi, struct spi_message *pmsg)
...
@@ -526,8 +526,9 @@ static int pch_spi_transfer(struct spi_device *pspi, struct spi_message *pmsg)
goto
err_return_spinlock
;
goto
err_return_spinlock
;
}
}
dev_dbg
(
&
pspi
->
dev
,
"%s Tx/Rx buffer valid. Transfer length"
dev_dbg
(
&
pspi
->
dev
,
" valid
\n
"
,
__func__
);
"%s Tx/Rx buffer valid. Transfer length valid
\n
"
,
__func__
);
/* if baud rate has been specified validate the same */
/* if baud rate has been specified validate the same */
if
(
transfer
->
speed_hz
>
PCH_MAX_BAUDRATE
)
if
(
transfer
->
speed_hz
>
PCH_MAX_BAUDRATE
)
...
@@ -1181,8 +1182,8 @@ static void pch_spi_process_messages(struct work_struct *pwork)
...
@@ -1181,8 +1182,8 @@ static void pch_spi_process_messages(struct work_struct *pwork)
spin_lock
(
&
data
->
lock
);
spin_lock
(
&
data
->
lock
);
/* check if suspend has been initiated;if yes flush queue */
/* check if suspend has been initiated;if yes flush queue */
if
(
data
->
board_dat
->
suspend_sts
||
(
data
->
status
==
STATUS_EXITING
))
{
if
(
data
->
board_dat
->
suspend_sts
||
(
data
->
status
==
STATUS_EXITING
))
{
dev_dbg
(
&
data
->
master
->
dev
,
"%s suspend/remove initiated,"
dev_dbg
(
&
data
->
master
->
dev
,
"flushing queue
\n
"
,
__func__
);
"
%s suspend/remove initiated,
flushing queue
\n
"
,
__func__
);
list_for_each_entry_safe
(
pmsg
,
tmp
,
data
->
queue
.
next
,
queue
)
{
list_for_each_entry_safe
(
pmsg
,
tmp
,
data
->
queue
.
next
,
queue
)
{
pmsg
->
status
=
-
EIO
;
pmsg
->
status
=
-
EIO
;
...
...
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