summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-03-11 10:49:50 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-03-11 10:49:50 +0100
commit034d4ddcb6dfc7f72cb5076807e93a7bb7e4636b (patch)
treea8912608d1b8f1614e58c94f67e0b9f1801018e6 /drivers
parent7991fe1b8eb057c6d7acc5c91f10108c1ee10a52 (diff)
parent092479d7da288479eb99362b4e852948b1de6de9 (diff)
downloadbarebox-034d4ddcb6dfc7f72cb5076807e93a7bb7e4636b.tar.gz
barebox-034d4ddcb6dfc7f72cb5076807e93a7bb7e4636b.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'drivers')
-rw-r--r--drivers/eeprom/at25.c1
-rw-r--r--drivers/gpio/Kconfig14
-rw-r--r--drivers/net/ep93xx.c22
-rw-r--r--drivers/net/ep93xx.h2
-rw-r--r--drivers/usb/host/ehci-hcd.c21
5 files changed, 26 insertions, 34 deletions
diff --git a/drivers/eeprom/at25.c b/drivers/eeprom/at25.c
index 3e75b56519..9f054d00b4 100644
--- a/drivers/eeprom/at25.c
+++ b/drivers/eeprom/at25.c
@@ -356,6 +356,7 @@ static int at25_probe(struct device_d *dev)
dev_dbg(dev, "%s probed\n", at25->cdev.name);
devfs_create(&at25->cdev);
+ of_parse_partitions(&at25->cdev, dev->device_node);
return 0;
fail:
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index d839d7a426..ab919c95f5 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -87,17 +87,17 @@ config GPIO_PCA953X
SMBus I/O expanders, made mostly by NXP or TI. Compatible
models include:
- 4 bits: pca9536, pca9537
+ 4 bits: pca9536, pca9537
- 8 bits: max7310, max7315, pca6107, pca9534, pca9538, pca9554,
- pca9556, pca9557, pca9574, tca6408, xra1202
+ 8 bits: max7310, max7315, pca6107, pca9534, pca9538, pca9554,
+ pca9556, pca9557, pca9574, tca6408, xra1202
- 16 bits: max7312, max7313, pca9535, pca9539, pca9555, pca9575,
- tca6416
+ 16 bits: max7312, max7313, pca9535, pca9539, pca9555, pca9575,
+ tca6416
- 24 bits: tca6424
+ 24 bits: tca6424
- 40 bits: pca9505, pca9698
+ 40 bits: pca9505, pca9698
config GPIO_PL061
bool "PrimeCell PL061 GPIO support"
diff --git a/drivers/net/ep93xx.c b/drivers/net/ep93xx.c
index 90c12fce75..0acb9b692f 100644
--- a/drivers/net/ep93xx.c
+++ b/drivers/net/ep93xx.c
@@ -38,6 +38,7 @@
#include <linux/types.h>
#include <mach/ep93xx-regs.h>
#include <linux/phy.h>
+#include <net/ep93xx_eth.h>
#include "ep93xx.h"
#define EP93XX_MAX_PKT_SIZE 1536
@@ -203,8 +204,8 @@ static int ep93xx_eth_open(struct eth_device *edev)
pr_debug("+ep93xx_eth_open\n");
- ret = phy_device_connect(edev, &priv->miibus, 0, NULL,
- 0, PHY_INTERFACE_MODE_NA);
+ ret = phy_device_connect(edev, &priv->miibus, priv->phy_addr, NULL,
+ 0, priv->interface);
if (ret)
return ret;
@@ -482,6 +483,7 @@ static int ep93xx_eth_set_ethaddr(struct eth_device *edev,
static int ep93xx_eth_probe(struct device_d *dev)
{
+ struct ep93xx_eth_platform_data *pdata = (struct ep93xx_eth_platform_data *)dev->platform_data;
struct eth_device *edev;
struct ep93xx_eth_priv *priv;
int ret = -1;
@@ -504,6 +506,14 @@ static int ep93xx_eth_probe(struct device_d *dev)
edev->set_ethaddr = ep93xx_eth_set_ethaddr;
edev->parent = dev;
+ if (pdata) {
+ priv->interface = pdata->xcv_type;
+ priv->phy_addr = pdata->phy_addr;
+ } else {
+ priv->interface = PHY_INTERFACE_MODE_NA;
+ priv->phy_addr = 0;
+ }
+
priv->miibus.read = ep93xx_phy_read;
priv->miibus.write = ep93xx_phy_write;
priv->miibus.parent = dev;
@@ -589,14 +599,12 @@ static int ep93xx_phy_read(struct mii_bus *bus, int phy_addr, int phy_reg)
pr_debug("+ep93xx_phy_read\n");
/*
- * Save the current SelfCTL register value. Set MAC to suppress
+ * Save the current SelfCTL register value. Set MAC to send
* preamble bits. Wait for any previous MII command to complete
* before issuing the new command.
*/
self_ctl = readl(&regs->selfctl);
-#if defined(CONFIG_MII_SUPPRESS_PREAMBLE) /* TODO */
writel(self_ctl & ~(1 << 8), &regs->selfctl);
-#endif /* defined(CONFIG_MII_SUPPRESS_PREAMBLE) */
while (readl(&regs->miists) & MIISTS_BUSY)
; /* noop */
@@ -632,14 +640,12 @@ static int ep93xx_phy_write(struct mii_bus *bus, int phy_addr,
pr_debug("+ep93xx_phy_write\n");
/*
- * Save the current SelfCTL register value. Set MAC to suppress
+ * Save the current SelfCTL register value. Set MAC to send
* preamble bits. Wait for any previous MII command to complete
* before issuing the new command.
*/
self_ctl = readl(&regs->selfctl);
-#if defined(CONFIG_MII_SUPPRESS_PREAMBLE) /* TODO */
writel(self_ctl & ~(1 << 8), &regs->selfctl);
-#endif /* defined(CONFIG_MII_SUPPRESS_PREAMBLE) */
while (readl(&regs->miists) & MIISTS_BUSY)
; /* noop */
diff --git a/drivers/net/ep93xx.h b/drivers/net/ep93xx.h
index 89451b8a5f..32ae57f9f2 100644
--- a/drivers/net/ep93xx.h
+++ b/drivers/net/ep93xx.h
@@ -137,6 +137,8 @@ struct ep93xx_eth_priv {
struct tx_descriptor_queue tx_dq;
struct tx_status_queue tx_sq;
+ int phy_addr;
+ phy_interface_t interface;
struct mii_bus miibus;
};
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 8ea26e3591..b0bf9225ec 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1005,7 +1005,7 @@ static struct int_queue *ehci_create_int_queue(struct usb_device *dev,
struct usb_host *host = dev->host;
struct ehci_priv *ehci = to_ehci(host);
struct int_queue *result = NULL;
- uint32_t i, toggle;
+ uint32_t i;
struct QH *list = ehci->periodic_queue;
/*
@@ -1057,8 +1057,6 @@ static struct int_queue *ehci_create_int_queue(struct usb_device *dev,
memset(result->first, 0, sizeof(struct QH) * queuesize);
memset(result->tds, 0, sizeof(struct qTD) * queuesize);
- toggle = usb_gettoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe));
-
for (i = 0; i < queuesize; i++) {
struct QH *qh = result->first + i;
struct qTD *td = result->tds + i;
@@ -1073,7 +1071,6 @@ static struct int_queue *ehci_create_int_queue(struct usb_device *dev,
qh->qh_endpt1 =
cpu_to_hc32((0 << 28) | /* No NAK reload (ehci 4.9) */
(usb_maxpacket(dev, pipe) << 16) | /* MPS */
- (1 << 14) |
QH_ENDPT1_EPS(ehci_encode_speed(dev->speed)) |
(usb_pipeendpoint(pipe) << 8) | /* Endpoint Number */
(usb_pipedevice(pipe) << 0));
@@ -1092,7 +1089,6 @@ static struct int_queue *ehci_create_int_queue(struct usb_device *dev,
"communication direction is '%s'\n",
usb_pipein(pipe) ? "in" : "out");
td->qt_token = cpu_to_hc32(
- QT_TOKEN_DT(toggle) |
(elementsize << 16) |
((usb_pipein(pipe) ? 1 : 0) << 8) | /* IN/OUT token */
0x80); /* active */
@@ -1108,7 +1104,6 @@ static struct int_queue *ehci_create_int_queue(struct usb_device *dev,
cpu_to_hc32((td->qt_buffer[0] + 0x4000) & ~0xfff);
*buf = buffer + i * elementsize;
- toggle ^= 1;
}
if (ehci->periodic_schedules > 0) {
@@ -1144,8 +1139,7 @@ static void *ehci_poll_int_queue(struct usb_device *dev,
{
struct QH *cur = queue->current;
struct qTD *cur_td;
- uint32_t token, toggle;
- unsigned long pipe = queue->pipe;
+ uint32_t token;
/* depleted queue */
if (cur == NULL) {
@@ -1162,9 +1156,6 @@ static void *ehci_poll_int_queue(struct usb_device *dev,
return NULL;
}
- toggle = QT_TOKEN_GET_DT(token);
- usb_settoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe), toggle);
-
if (!(cur->qh_link & QH_LINK_TERMINATE))
queue->current++;
else
@@ -1183,7 +1174,6 @@ static int ehci_destroy_int_queue(struct usb_device *dev,
struct usb_host *host = dev->host;
struct ehci_priv *ehci = to_ehci(host);
struct QH *cur = ehci->periodic_queue;
- uint64_t start;
if (disable_periodic(ehci) < 0) {
dev_err(&dev->dev,
@@ -1192,7 +1182,6 @@ static int ehci_destroy_int_queue(struct usb_device *dev,
}
ehci->periodic_schedules--;
- start = get_time_ns();
while (!(cur->qh_link & cpu_to_hc32(QH_LINK_TERMINATE))) {
dev_dbg(&dev->dev,
"considering %p, with qh_link %x\n",
@@ -1205,12 +1194,6 @@ static int ehci_destroy_int_queue(struct usb_device *dev,
break;
}
cur = NEXT_QH(cur);
- if (is_timeout_non_interruptible(start, 500 * MSECOND)) {
- dev_err(&dev->dev,
- "Timeout destroying interrupt endpoint queue\n");
- result = -ETIMEDOUT;
- goto out;
- }
}
if (ehci->periodic_schedules > 0) {