summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-03-05 08:53:56 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-03-05 08:53:56 +0100
commitcce3ed31230cf60ddbc653b3ace1fb64e05bbddb (patch)
tree5e0ea9edfdcdf9982303d8a83d40aee41ccfe3c7 /drivers
parentdc90f050c2512ffe80c2c466295056baec0f021f (diff)
parent8d8382ec72d8a4a9ab0d53b07fd19b5248b0e8ce (diff)
downloadbarebox-cce3ed31230cf60ddbc653b3ace1fb64e05bbddb.tar.gz
barebox-cce3ed31230cf60ddbc653b3ace1fb64e05bbddb.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/spi-nor/spi-nor.c1
-rw-r--r--drivers/net/cpsw.c29
-rw-r--r--drivers/of/base.c2
-rw-r--r--drivers/of/fdt.c2
4 files changed, 13 insertions, 21 deletions
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index 5cf650c0e2..057638ec5a 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -641,6 +641,7 @@ static const struct spi_device_id spi_nor_ids[] = {
{ "w25q20cl", INFO(0xef4012, 0, 64 * 1024, 4, SECT_4K) },
{ "w25q20bw", INFO(0xef5012, 0, 64 * 1024, 4, SECT_4K) },
{ "w25q20ew", INFO(0xef6012, 0, 64 * 1024, 4, SECT_4K) },
+ { "w25q16dw", INFO(0xef6015, 0, 64 * 1024, 32, SECT_4K) },
{ "w25q32", INFO(0xef4016, 0, 64 * 1024, 64, SECT_4K) },
{ "w25q32dw", INFO(0xef6016, 0, 64 * 1024, 64, SECT_4K) },
{ "w25x64", INFO(0xef3017, 0, 64 * 1024, 128, SECT_4K) },
diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index d11ca33f70..3d3939cfae 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -761,11 +761,6 @@ static int cpsw_open(struct eth_device *edev)
dev_dbg(&slave->dev, "* %s\n", __func__);
- ret = phy_device_connect(edev, &priv->miibus, slave->phy_id,
- cpsw_adjust_link, 0, slave->phy_if);
- if (ret)
- return ret;
-
/* soft reset the controller and initialize priv */
soft_reset(priv, &priv->regs->soft_reset);
@@ -913,16 +908,11 @@ static int cpsw_slave_setup(struct cpsw_slave *slave, int slave_num,
struct eth_device *edev = &slave->edev;
struct device_d *dev = &slave->dev;
int ret;
- struct phy_device *phy;
- phy = mdiobus_scan(&priv->miibus, priv->slaves[slave_num].phy_id);
- if (IS_ERR(phy)) {
- ret = PTR_ERR(phy);
- goto err_out;
- }
+ edev->parent = dev;
- phy->dev.device_node = priv->slaves[slave_num].dev.device_node;
- ret = phy_register_device(phy);
+ ret = phy_device_connect(edev, &priv->miibus, slave->phy_id,
+ cpsw_adjust_link, 0, slave->phy_if);
if (ret)
goto err_out;
@@ -948,7 +938,6 @@ static int cpsw_slave_setup(struct cpsw_slave *slave, int slave_num,
edev->recv = cpsw_recv;
edev->get_ethaddr = cpsw_get_hwaddr;
edev->set_ethaddr = cpsw_set_hwaddr;
- edev->parent = dev;
ret = eth_register(edev);
if (ret)
@@ -957,7 +946,7 @@ static int cpsw_slave_setup(struct cpsw_slave *slave, int slave_num,
return 0;
err_register_dev:
- phy_unregister_device(phy);
+ phy_unregister_device(edev->phydev);
err_register_edev:
unregister_device(dev);
err_out:
@@ -1100,11 +1089,13 @@ static int cpsw_probe_dt(struct cpsw_priv *priv)
if (i < priv->num_slaves && !strncmp(child->name, "slave", 5)) {
struct cpsw_slave *slave = &priv->slaves[i];
- uint32_t phy_id[2];
+ uint32_t phy_id[2] = {-1, -1};
- ret = of_property_read_u32_array(child, "phy_id", phy_id, 2);
- if (ret)
- return ret;
+ if (!of_find_node_by_name(child, "fixed-link")) {
+ ret = of_property_read_u32_array(child, "phy_id", phy_id, 2);
+ if (ret)
+ return ret;
+ }
slave->dev.device_node = child;
slave->phy_id = phy_id[1];
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 152dbe7a4f..4bcc113645 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -129,7 +129,7 @@ struct property *of_find_property(const struct device_node *np,
}
EXPORT_SYMBOL(of_find_property);
-const void *of_property_get_value(struct property *pp)
+static const void *of_property_get_value(struct property *pp)
{
return pp->value ? pp->value : pp->value_const;
}
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 1edb35f3d6..92dd86e4ec 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -117,7 +117,7 @@ static int of_unflatten_reservemap(struct device_node *root,
* Parse a flat device tree binary blob and return a pointer to the
* unflattened tree.
*/
-struct device_node *__of_unflatten_dtb(const void *infdt, bool constprops)
+static struct device_node *__of_unflatten_dtb(const void *infdt, bool constprops)
{
const void *nodep; /* property node pointer */
uint32_t tag; /* tag */