projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net: Move CONFIG_RTL8139 to Kconfig
[oweals/u-boot.git]
/
drivers
/
spi
/
altera_spi.c
diff --git
a/drivers/spi/altera_spi.c
b/drivers/spi/altera_spi.c
index ff3512a0f6f73892843165a4c3b6e62932bbb5e3..eb1ba27accfc25ef4f7678917c2b7071654dd722 100644
(file)
--- a/
drivers/spi/altera_spi.c
+++ b/
drivers/spi/altera_spi.c
@@
-11,14
+11,17
@@
#include <dm.h>
#include <errno.h>
#include <malloc.h>
#include <dm.h>
#include <errno.h>
#include <malloc.h>
-#include <spi.h>
#include <fdtdec.h>
#include <fdtdec.h>
+#include <spi.h>
#include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
#include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
+#define ALTERA_SPI_STATUS_RRDY_MSK BIT(7)
+#define ALTERA_SPI_CONTROL_SSO_MSK BIT(10)
+
#ifndef CONFIG_ALTERA_SPI_IDLE_VAL
#ifndef CONFIG_ALTERA_SPI_IDLE_VAL
-#define CONFIG_ALTERA_SPI_IDLE_VAL 0xff
+#define CONFIG_ALTERA_SPI_IDLE_VAL
0xff
#endif
struct altera_spi_regs {
#endif
struct altera_spi_regs {
@@
-38,9
+41,6
@@
struct altera_spi_priv {
struct altera_spi_regs *regs;
};
struct altera_spi_regs *regs;
};
-#define ALTERA_SPI_STATUS_RRDY_MSK (1 << 7)
-#define ALTERA_SPI_CONTROL_SSO_MSK (1 << 10)
-
static void spi_cs_activate(struct udevice *dev, uint cs)
{
struct udevice *bus = dev->parent;
static void spi_cs_activate(struct udevice *dev, uint cs)
{
struct udevice *bus = dev->parent;
@@
-174,8
+174,9
@@
static int altera_spi_ofdata_to_platdata(struct udevice *bus)
{
struct altera_spi_platdata *plat = dev_get_platdata(bus);
{
struct altera_spi_platdata *plat = dev_get_platdata(bus);
- plat->regs = ioremap(dev_get_addr(bus),
- sizeof(struct altera_spi_regs));
+ plat->regs = map_physmem(dev_get_addr(bus),
+ sizeof(struct altera_spi_regs),
+ MAP_NOCACHE);
return 0;
}
return 0;
}
@@
-193,8
+194,8
@@
static const struct dm_spi_ops altera_spi_ops = {
};
static const struct udevice_id altera_spi_ids[] = {
};
static const struct udevice_id altera_spi_ids[] = {
- { .compatible = "altr,spi-1.0"
,
},
- {
}
+ { .compatible = "altr,spi-1.0" },
+ {}
};
U_BOOT_DRIVER(altera_spi) = {
};
U_BOOT_DRIVER(altera_spi) = {