sunxi: driver refresh for 3.13
[openwrt/svn-archive/archive.git] / target / linux / sunxi / patches-3.13 / 230-dt-sunxi-change-emac-to-new-compats.patch
1 From 4dae1686782d52084893421b89ff1aa61e223aaf Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime.ripard@free-electrons.com>
3 Date: Sun, 2 Feb 2014 14:49:11 +0100
4 Subject: [PATCH] net: ethernet: sunxi: Add new compatibles
5
6 The Allwinner A10 compatibles were following a slightly different compatible
7 patterns than the rest of the SoCs for historical reasons. Add compatibles
8 matching the other pattern to the ethernet driver for consistency, and keep the
9 older one for backward compatibility.
10
11 Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
12 Signed-off-by: David S. Miller <davem@davemloft.net>
13 ---
14 Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt | 5 +++--
15 drivers/net/ethernet/allwinner/sun4i-emac.c | 3 +++
16 2 files changed, 6 insertions(+), 2 deletions(-)
17
18 diff --git a/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt b/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt
19 index b90bfcd..863d5b81 100644
20 --- a/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt
21 +++ b/Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt
22 @@ -1,7 +1,8 @@
23 * Allwinner EMAC ethernet controller
24
25 Required properties:
26 -- compatible: should be "allwinner,sun4i-emac".
27 +- compatible: should be "allwinner,sun4i-a10-emac" (Deprecated:
28 + "allwinner,sun4i-emac")
29 - reg: address and length of the register set for the device.
30 - interrupts: interrupt for the device
31 - phy: A phandle to a phy node defining the PHY address (as the reg
32 @@ -14,7 +15,7 @@ Optional properties:
33 Example:
34
35 emac: ethernet@01c0b000 {
36 - compatible = "allwinner,sun4i-emac";
37 + compatible = "allwinner,sun4i-a10-emac";
38 reg = <0x01c0b000 0x1000>;
39 interrupts = <55>;
40 clocks = <&ahb_gates 17>;
41 diff --git a/drivers/net/ethernet/allwinner/sun4i-emac.c b/drivers/net/ethernet/allwinner/sun4i-emac.c
42 index 0cc2143..511f6ee 100644
43 --- a/drivers/net/ethernet/allwinner/sun4i-emac.c
44 +++ b/drivers/net/ethernet/allwinner/sun4i-emac.c
45 @@ -929,6 +929,9 @@ static int emac_resume(struct platform_device *dev)
46 }
47
48 static const struct of_device_id emac_of_match[] = {
49 + {.compatible = "allwinner,sun4i-a10-emac",},
50 +
51 + /* Deprecated */
52 {.compatible = "allwinner,sun4i-emac",},
53 {},
54 };
55 --
56 1.8.5.5
57