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: sun8i_emac: Use consistent clock bitfield definitions
[oweals/u-boot.git]
/
drivers
/
spi
/
designware_spi.c
diff --git
a/drivers/spi/designware_spi.c
b/drivers/spi/designware_spi.c
index 91e613e9cd65374c0220814421d407a3bcd17041..c9b14f90292ec2898dce6471385d6ac390b7138a 100644
(file)
--- a/
drivers/spi/designware_spi.c
+++ b/
drivers/spi/designware_spi.c
@@
-10,6
+10,7
@@
*/
#include <common.h>
*/
#include <common.h>
+#include <log.h>
#include <asm-generic/gpio.h>
#include <clk.h>
#include <dm.h>
#include <asm-generic/gpio.h>
#include <clk.h>
#include <dm.h>
@@
-18,6
+19,8
@@
#include <spi.h>
#include <fdtdec.h>
#include <reset.h>
#include <spi.h>
#include <fdtdec.h>
#include <reset.h>
+#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <linux/compat.h>
#include <linux/iopoll.h>
#include <asm/io.h>
#include <linux/compat.h>
#include <linux/iopoll.h>
#include <asm/io.h>
@@
-126,7
+129,7
@@
static inline void dw_write(struct dw_spi_priv *priv, u32 offset, u32 val)
static int request_gpio_cs(struct udevice *bus)
{
static int request_gpio_cs(struct udevice *bus)
{
-#if
defined(CONFIG_
DM_GPIO) && !defined(CONFIG_SPL_BUILD)
+#if
CONFIG_IS_ENABLED(
DM_GPIO) && !defined(CONFIG_SPL_BUILD)
struct dw_spi_priv *priv = dev_get_priv(bus);
int ret;
struct dw_spi_priv *priv = dev_get_priv(bus);
int ret;
@@
-373,7
+376,7
@@
static int poll_transfer(struct dw_spi_priv *priv)
*/
__weak void external_cs_manage(struct udevice *dev, bool on)
{
*/
__weak void external_cs_manage(struct udevice *dev, bool on)
{
-#if
defined(CONFIG_
DM_GPIO) && !defined(CONFIG_SPL_BUILD)
+#if
CONFIG_IS_ENABLED(
DM_GPIO) && !defined(CONFIG_SPL_BUILD)
struct dw_spi_priv *priv = dev_get_priv(dev->parent);
if (!dm_gpio_is_valid(&priv->cs_gpio))
struct dw_spi_priv *priv = dev_get_priv(dev->parent);
if (!dm_gpio_is_valid(&priv->cs_gpio))