summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/clk.h12
-rw-r--r--include/configs/devkit3250.h5
-rw-r--r--include/configs/work_92105.h5
-rw-r--r--include/generic-phy.h9
-rw-r--r--include/linux/iopoll.h16
5 files changed, 26 insertions, 21 deletions
diff --git a/include/clk.h b/include/clk.h
index 60c4b7d075f..c6a2713f624 100644
--- a/include/clk.h
+++ b/include/clk.h
@@ -93,7 +93,7 @@ int clk_get_by_index_platdata(struct udevice *dev, int index,
struct phandle_1_arg *cells, struct clk *clk);
/**
- * clock_get_by_index - Get/request a clock by integer index.
+ * clk_get_by_index - Get/request a clock by integer index.
*
* This looks up and requests a clock. The index is relative to the client
* device; each device is assumed to have n clocks associated with it somehow,
@@ -110,7 +110,7 @@ int clk_get_by_index_platdata(struct udevice *dev, int index,
int clk_get_by_index(struct udevice *dev, int index, struct clk *clk);
/**
- * clock_get_by_index_nodev - Get/request a clock by integer index
+ * clk_get_by_index_nodev - Get/request a clock by integer index
* without a device.
*
* This is a version of clk_get_by_index() that does not use a device.
@@ -124,7 +124,7 @@ int clk_get_by_index(struct udevice *dev, int index, struct clk *clk);
int clk_get_by_index_nodev(ofnode node, int index, struct clk *clk);
/**
- * clock_get_bulk - Get/request all clocks of a device.
+ * clk_get_bulk - Get/request all clocks of a device.
*
* This looks up and requests all clocks of the client device; each device is
* assumed to have n clocks associated with it somehow, and this function finds
@@ -139,7 +139,7 @@ int clk_get_by_index_nodev(ofnode node, int index, struct clk *clk);
int clk_get_bulk(struct udevice *dev, struct clk_bulk *bulk);
/**
- * clock_get_by_name - Get/request a clock by name.
+ * clk_get_by_name - Get/request a clock by name.
*
* This looks up and requests a clock. The name is relative to the client
* device; each device is assumed to have n clocks associated with it somehow,
@@ -169,7 +169,7 @@ int clk_get_by_name(struct udevice *dev, const char *name, struct clk *clk);
int clk_get_by_name_nodev(ofnode node, const char *name, struct clk *clk);
/**
- * clock_get_optional_nodev - Get/request an optinonal clock by name
+ * clk_get_optional_nodev - Get/request an optinonal clock by name
* without a device.
* @node: The client ofnode.
* @name: The name of the clock to request.
@@ -331,7 +331,7 @@ static inline int clk_release_bulk(struct clk_bulk *bulk)
int clk_request(struct udevice *dev, struct clk *clk);
/**
- * clock_free - Free a previously requested clock.
+ * clk_free - Free a previously requested clock.
*
* @clock: A clock struct that was previously successfully requested by
* clk_request/get_by_*().
diff --git a/include/configs/devkit3250.h b/include/configs/devkit3250.h
index f1f2be0797b..4471a12f34d 100644
--- a/include/configs/devkit3250.h
+++ b/include/configs/devkit3250.h
@@ -55,11 +55,6 @@
#define CONFIG_LPC32XX_GPIO
/*
- * SSP/SPI
- */
-#define CONFIG_LPC32XX_SSP_TIMEOUT 100000
-
-/*
* Ethernet
*/
#define CONFIG_RMII
diff --git a/include/configs/work_92105.h b/include/configs/work_92105.h
index 421384d9ba5..93c8d64b147 100644
--- a/include/configs/work_92105.h
+++ b/include/configs/work_92105.h
@@ -105,11 +105,6 @@
#define CONFIG_LPC32XX_GPIO
/*
- * SSP/SPI/DISPLAY
- */
-
-#define CONFIG_LPC32XX_SSP_TIMEOUT 100000
-/*
* Environment
*/
diff --git a/include/generic-phy.h b/include/generic-phy.h
index 55629ae0b41..5ab34cda03d 100644
--- a/include/generic-phy.h
+++ b/include/generic-phy.h
@@ -213,12 +213,15 @@ int generic_phy_get_by_index(struct udevice *user, int index,
struct phy *phy);
/**
- * generic_phy_get_by_node() - Get a PHY device by integer index on ofnode
+ * generic_phy_get_by_index_nodev() - Get a PHY device by integer index
+ * without a device
*
- * @node: the device node
+ * @node: The client ofnode.
* @index: The index in the list of available PHYs
* @phy: A pointer to the PHY port
*
+ * This is a version of generic_phy_get_by_index() that does not use a device.
+ *
* This looks up a PHY device for a client device based on its ofnode and on
* its position in the list of the possible PHYs.
*
@@ -237,7 +240,7 @@ int generic_phy_get_by_index(struct udevice *user, int index,
*
* @return 0 if OK, or a negative error code
*/
-int generic_phy_get_by_node(ofnode node, int index, struct phy *phy);
+int generic_phy_get_by_index_nodev(ofnode node, int index, struct phy *phy);
/**
* generic_phy_get_by_name() - Get a PHY device by its name.
diff --git a/include/linux/iopoll.h b/include/linux/iopoll.h
index ab0ae1969a4..30cdea0cdc1 100644
--- a/include/linux/iopoll.h
+++ b/include/linux/iopoll.h
@@ -6,16 +6,18 @@
#ifndef _LINUX_IOPOLL_H
#define _LINUX_IOPOLL_H
+#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/io.h>
#include <time.h>
/**
- * readx_poll_timeout - Periodically poll an address until a condition is met or a timeout occurs
+ * read_poll_timeout - Periodically poll an address until a condition is met or a timeout occurs
* @op: accessor function (takes @addr as its only argument)
* @addr: Address to poll
* @val: Variable to read the value into
* @cond: Break condition (usually involving @val)
+ * @sleep_us: Maximum time to sleep in us
* @timeout_us: Timeout in us, 0 means never timeout
*
* Returns 0 on success and -ETIMEDOUT upon a timeout. In either
@@ -24,7 +26,7 @@
* When available, you'll probably want to use one of the specialized
* macros defined below rather than this macro directly.
*/
-#define readx_poll_timeout(op, addr, val, cond, timeout_us) \
+#define read_poll_timeout(op, addr, val, cond, sleep_us, timeout_us) \
({ \
unsigned long timeout = timer_get_us() + timeout_us; \
for (;;) { \
@@ -35,10 +37,20 @@
(val) = op(addr); \
break; \
} \
+ if (sleep_us) \
+ udelay(sleep_us); \
} \
(cond) ? 0 : -ETIMEDOUT; \
})
+#define readx_poll_sleep_timeout(op, addr, val, cond, sleep_us, timeout_us) \
+ read_poll_timeout(op, addr, val, cond, sleep_us, timeout_us)
+
+#define readl_poll_sleep_timeout(addr, val, cond, sleep_us, timeout_us) \
+ readx_poll_sleep_timeout(readl, addr, val, cond, sleep_us, timeout_us)
+
+#define readx_poll_timeout(op, addr, val, cond, timeout_us) \
+ read_poll_timeout(op, addr, val, cond, false, timeout_us)
#define readb_poll_timeout(addr, val, cond, timeout_us) \
readx_poll_timeout(readb, addr, val, cond, timeout_us)