projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
spi: xilinx_spi: Fix to configure CPOL, CPHA mask
[oweals/u-boot.git]
/
drivers
/
spi
/
bfin_spi6xx.c
diff --git
a/drivers/spi/bfin_spi6xx.c
b/drivers/spi/bfin_spi6xx.c
index 07b833d3a3de22b134b6d9ee4b1ffc6b422034f8..eba01d16f50d7d6f095cf87625624a7b33fd1ef7 100644
(file)
--- a/
drivers/spi/bfin_spi6xx.c
+++ b/
drivers/spi/bfin_spi6xx.c
@@
-22,6
+22,7
@@
#include <spi.h>
#include <asm/blackfin.h>
#include <spi.h>
#include <asm/blackfin.h>
+#include <asm/clock.h>
#include <asm/gpio.h>
#include <asm/portmux.h>
#include <asm/mach-common/bits/spi6xx.h>
#include <asm/gpio.h>
#include <asm/portmux.h>
#include <asm/mach-common/bits/spi6xx.h>
@@
-135,11
+136,11
@@
static const unsigned short cs_pins[][7] = {
void spi_set_speed(struct spi_slave *slave, uint hz)
{
struct bfin_spi_slave *bss = to_bfin_spi_slave(slave);
void spi_set_speed(struct spi_slave *slave, uint hz)
{
struct bfin_spi_slave *bss = to_bfin_spi_slave(slave);
- ulong
s
clk;
+ ulong clk;
u32 clock;
u32 clock;
-
sclk = get_sclk1
();
- clock =
s
clk / hz;
+
clk = get_spi_clk
();
+ clock = clk / hz;
if (clock)
clock--;
bss->clock = clock;
if (clock)
clock--;
bss->clock = clock;