net: designware: Export various functions/struct to allow subclassing
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Wed, 11 Jan 2017 10:46:07 +0000 (11:46 +0100)
committerSimon Glass <sjg@chromium.org>
Thu, 12 Jan 2017 03:23:50 +0000 (20:23 -0700)
To allow other DM drivers to subclass the designware driver various
functions and structures need to be exported. Export these.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Romain Perier <romain.perier@collabora.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/designware.c
drivers/net/designware.h

index 9e6d7261844323827039cc2ad7c4bf0b0d2cd3ec..6ef36bc8cbea7734178188537a793b30573acebb 100644 (file)
@@ -628,7 +628,7 @@ static int designware_eth_bind(struct udevice *dev)
        return 0;
 }
 
-static int designware_eth_probe(struct udevice *dev)
+int designware_eth_probe(struct udevice *dev)
 {
        struct eth_pdata *pdata = dev_get_platdata(dev);
        struct dw_eth_dev *priv = dev_get_priv(dev);
@@ -678,7 +678,7 @@ static int designware_eth_remove(struct udevice *dev)
        return 0;
 }
 
-static const struct eth_ops designware_eth_ops = {
+const struct eth_ops designware_eth_ops = {
        .start                  = designware_eth_start,
        .send                   = designware_eth_send,
        .recv                   = designware_eth_recv,
@@ -687,7 +687,7 @@ static const struct eth_ops designware_eth_ops = {
        .write_hwaddr           = designware_eth_write_hwaddr,
 };
 
-static int designware_eth_ofdata_to_platdata(struct udevice *dev)
+int designware_eth_ofdata_to_platdata(struct udevice *dev)
 {
        struct dw_eth_pdata *dw_pdata = dev_get_platdata(dev);
 #ifdef CONFIG_DM_GPIO
index d345c5b0c3ec100bd0715e57f54b8b7c3024621a..087ebef297105ec139b069931b0f96b9fbab87c7 100644 (file)
@@ -245,6 +245,10 @@ struct dw_eth_dev {
 };
 
 #ifdef CONFIG_DM_ETH
+int designware_eth_ofdata_to_platdata(struct udevice *dev);
+int designware_eth_probe(struct udevice *dev);
+extern const struct eth_ops designware_eth_ops;
+
 struct dw_eth_pdata {
        struct eth_pdata eth_pdata;
        u32 reset_delays[3];