summaryrefslogtreecommitdiff
path: root/drivers/net/mvpp2.c
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-02-15 13:08:59 (GMT)
committerStefan Roese <sr@denx.de>2017-03-29 05:40:39 (GMT)
commit16a9898d80d3a3975034126aef8b38611a8ddf3b (patch)
tree66638d83e10a435e5a3b8e4493b70272bcb3b298 /drivers/net/mvpp2.c
parentcfa414aefd530bba4dd5105c77615104c96367bf (diff)
downloadu-boot-16a9898d80d3a3975034126aef8b38611a8ddf3b.tar.xz
net: mvpp2: add hw_version field in "struct mvpp2"
In preparation to the introduction for the support of PPv2.2 in the mvpp2 driver, this commit adds a hw_version field to the struct mvpp2, and uses the .data field of the DT match table to fill it in. Having the MVPP21 and MVPP22 definitions available will allow to start adding the necessary conditional code to support PPv2.2. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net/mvpp2.c')
-rw-r--r--drivers/net/mvpp2.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index d199eaf..9683439 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -707,6 +707,9 @@ struct mvpp2 {
/* Tclk value */
u32 tclk;
+ /* HW version */
+ enum { MVPP21, MVPP22 } hw_version;
+
struct mii_dev *bus;
};
@@ -4132,6 +4135,9 @@ static int mvpp2_base_probe(struct udevice *dev)
u32 size = 0;
int i;
+ /* Save hw-version */
+ priv->hw_version = dev_get_driver_data(dev);
+
/*
* U-Boot special buffer handling:
*
@@ -4234,7 +4240,10 @@ static int mvpp2_base_bind(struct udevice *parent)
}
static const struct udevice_id mvpp2_ids[] = {
- { .compatible = "marvell,armada-375-pp2" },
+ {
+ .compatible = "marvell,armada-375-pp2",
+ .data = MVPP21,
+ },
{ }
};