diff options
author | Timur Tabi <timur@freescale.com> | 2012-08-29 04:07:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-30 13:29:31 -0400 |
commit | 19bcd6c618ac9356c076d711fab7046664b3860a (patch) | |
tree | 9900b03f8028f7a7b936a7aee076dd2b420468a4 /drivers/net/ethernet/freescale | |
parent | 522609f27ac3c4b031b58fee15c36689462a2919 (diff) |
net/freescale: do not export any functions from fsl_pq_mdio.c
None of the functions in fsl_pq_mdio.c are used by any other source file,
so there's no point in exporting them. Merge the header file into the
source file, make all the functions static, remove any EXPORT_SYMBOL
statements, and delete any #include "fsl_pq_mdio.h" statements.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r-- | drivers/net/ethernet/freescale/fsl_pq_mdio.c | 38 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/fsl_pq_mdio.h | 52 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/gianfar.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/ucc_geth.c | 1 |
4 files changed, 31 insertions, 61 deletions
diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.c b/drivers/net/ethernet/freescale/fsl_pq_mdio.c index 9527b28d70d1..bc19fe09a1d2 100644 --- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c +++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c | |||
@@ -45,7 +45,31 @@ | |||
45 | #include <asm/ucc.h> | 45 | #include <asm/ucc.h> |
46 | 46 | ||
47 | #include "gianfar.h" | 47 | #include "gianfar.h" |
48 | #include "fsl_pq_mdio.h" | 48 | |
49 | #define MIIMIND_BUSY 0x00000001 | ||
50 | #define MIIMIND_NOTVALID 0x00000004 | ||
51 | #define MIIMCFG_INIT_VALUE 0x00000007 | ||
52 | #define MIIMCFG_RESET 0x80000000 | ||
53 | |||
54 | #define MII_READ_COMMAND 0x00000001 | ||
55 | |||
56 | struct fsl_pq_mdio { | ||
57 | u8 res1[16]; | ||
58 | u32 ieventm; /* MDIO Interrupt event register (for etsec2)*/ | ||
59 | u32 imaskm; /* MDIO Interrupt mask register (for etsec2)*/ | ||
60 | u8 res2[4]; | ||
61 | u32 emapm; /* MDIO Event mapping register (for etsec2)*/ | ||
62 | u8 res3[1280]; | ||
63 | u32 miimcfg; /* MII management configuration reg */ | ||
64 | u32 miimcom; /* MII management command reg */ | ||
65 | u32 miimadd; /* MII management address reg */ | ||
66 | u32 miimcon; /* MII management control reg */ | ||
67 | u32 miimstat; /* MII management status reg */ | ||
68 | u32 miimind; /* MII management indication reg */ | ||
69 | u8 res4[28]; | ||
70 | u32 utbipar; /* TBI phy address reg (only on UCC) */ | ||
71 | u8 res5[2728]; | ||
72 | } __packed; | ||
49 | 73 | ||
50 | /* Number of microseconds to wait for an MII register to respond */ | 74 | /* Number of microseconds to wait for an MII register to respond */ |
51 | #define MII_TIMEOUT 1000 | 75 | #define MII_TIMEOUT 1000 |
@@ -64,7 +88,7 @@ struct fsl_pq_mdio_priv { | |||
64 | * the local mdio pins, which may not be the same as system mdio bus, used for | 88 | * the local mdio pins, which may not be the same as system mdio bus, used for |
65 | * controlling the external PHYs, for example. | 89 | * controlling the external PHYs, for example. |
66 | */ | 90 | */ |
67 | int fsl_pq_local_mdio_write(struct fsl_pq_mdio __iomem *regs, int mii_id, | 91 | static int fsl_pq_local_mdio_write(struct fsl_pq_mdio __iomem *regs, int mii_id, |
68 | int regnum, u16 value) | 92 | int regnum, u16 value) |
69 | { | 93 | { |
70 | u32 status; | 94 | u32 status; |
@@ -92,7 +116,7 @@ int fsl_pq_local_mdio_write(struct fsl_pq_mdio __iomem *regs, int mii_id, | |||
92 | * and are always tied to the local mdio pins, which may not be the | 116 | * and are always tied to the local mdio pins, which may not be the |
93 | * same as system mdio bus, used for controlling the external PHYs, for eg. | 117 | * same as system mdio bus, used for controlling the external PHYs, for eg. |
94 | */ | 118 | */ |
95 | int fsl_pq_local_mdio_read(struct fsl_pq_mdio __iomem *regs, | 119 | static int fsl_pq_local_mdio_read(struct fsl_pq_mdio __iomem *regs, |
96 | int mii_id, int regnum) | 120 | int mii_id, int regnum) |
97 | { | 121 | { |
98 | u16 value; | 122 | u16 value; |
@@ -129,7 +153,8 @@ static struct fsl_pq_mdio __iomem *fsl_pq_mdio_get_regs(struct mii_bus *bus) | |||
129 | * Write value to the PHY at mii_id at register regnum, | 153 | * Write value to the PHY at mii_id at register regnum, |
130 | * on the bus, waiting until the write is done before returning. | 154 | * on the bus, waiting until the write is done before returning. |
131 | */ | 155 | */ |
132 | int fsl_pq_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value) | 156 | static int fsl_pq_mdio_write(struct mii_bus *bus, int mii_id, int regnum, |
157 | u16 value) | ||
133 | { | 158 | { |
134 | struct fsl_pq_mdio __iomem *regs = fsl_pq_mdio_get_regs(bus); | 159 | struct fsl_pq_mdio __iomem *regs = fsl_pq_mdio_get_regs(bus); |
135 | 160 | ||
@@ -141,7 +166,7 @@ int fsl_pq_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value) | |||
141 | * Read the bus for PHY at addr mii_id, register regnum, and | 166 | * Read the bus for PHY at addr mii_id, register regnum, and |
142 | * return the value. Clears miimcom first. | 167 | * return the value. Clears miimcom first. |
143 | */ | 168 | */ |
144 | int fsl_pq_mdio_read(struct mii_bus *bus, int mii_id, int regnum) | 169 | static int fsl_pq_mdio_read(struct mii_bus *bus, int mii_id, int regnum) |
145 | { | 170 | { |
146 | struct fsl_pq_mdio __iomem *regs = fsl_pq_mdio_get_regs(bus); | 171 | struct fsl_pq_mdio __iomem *regs = fsl_pq_mdio_get_regs(bus); |
147 | 172 | ||
@@ -178,7 +203,7 @@ static int fsl_pq_mdio_reset(struct mii_bus *bus) | |||
178 | return 0; | 203 | return 0; |
179 | } | 204 | } |
180 | 205 | ||
181 | void fsl_pq_mdio_bus_name(char *name, struct device_node *np) | 206 | static void fsl_pq_mdio_bus_name(char *name, struct device_node *np) |
182 | { | 207 | { |
183 | const u32 *addr; | 208 | const u32 *addr; |
184 | u64 taddr = OF_BAD_ADDR; | 209 | u64 taddr = OF_BAD_ADDR; |
@@ -190,7 +215,6 @@ void fsl_pq_mdio_bus_name(char *name, struct device_node *np) | |||
190 | snprintf(name, MII_BUS_ID_SIZE, "%s@%llx", np->name, | 215 | snprintf(name, MII_BUS_ID_SIZE, "%s@%llx", np->name, |
191 | (unsigned long long)taddr); | 216 | (unsigned long long)taddr); |
192 | } | 217 | } |
193 | EXPORT_SYMBOL_GPL(fsl_pq_mdio_bus_name); | ||
194 | 218 | ||
195 | 219 | ||
196 | static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs, struct device_node *np) | 220 | static u32 __iomem *get_gfar_tbipa(struct fsl_pq_mdio __iomem *regs, struct device_node *np) |
diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.h b/drivers/net/ethernet/freescale/fsl_pq_mdio.h deleted file mode 100644 index bd17a2a0139b..000000000000 --- a/drivers/net/ethernet/freescale/fsl_pq_mdio.h +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | /* | ||
2 | * Freescale PowerQUICC MDIO Driver -- MII Management Bus Implementation | ||
3 | * Driver for the MDIO bus controller on Freescale PowerQUICC processors | ||
4 | * | ||
5 | * Author: Andy Fleming | ||
6 | * Modifier: Sandeep Gopalpet | ||
7 | * | ||
8 | * Copyright 2002-2004, 2008-2009 Freescale Semiconductor, Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | * | ||
15 | */ | ||
16 | #ifndef __FSL_PQ_MDIO_H | ||
17 | #define __FSL_PQ_MDIO_H | ||
18 | |||
19 | #define MIIMIND_BUSY 0x00000001 | ||
20 | #define MIIMIND_NOTVALID 0x00000004 | ||
21 | #define MIIMCFG_INIT_VALUE 0x00000007 | ||
22 | #define MIIMCFG_RESET 0x80000000 | ||
23 | |||
24 | #define MII_READ_COMMAND 0x00000001 | ||
25 | |||
26 | struct fsl_pq_mdio { | ||
27 | u8 res1[16]; | ||
28 | u32 ieventm; /* MDIO Interrupt event register (for etsec2)*/ | ||
29 | u32 imaskm; /* MDIO Interrupt mask register (for etsec2)*/ | ||
30 | u8 res2[4]; | ||
31 | u32 emapm; /* MDIO Event mapping register (for etsec2)*/ | ||
32 | u8 res3[1280]; | ||
33 | u32 miimcfg; /* MII management configuration reg */ | ||
34 | u32 miimcom; /* MII management command reg */ | ||
35 | u32 miimadd; /* MII management address reg */ | ||
36 | u32 miimcon; /* MII management control reg */ | ||
37 | u32 miimstat; /* MII management status reg */ | ||
38 | u32 miimind; /* MII management indication reg */ | ||
39 | u8 reserved[28]; /* Space holder */ | ||
40 | u32 utbipar; /* TBI phy address reg (only on UCC) */ | ||
41 | u8 res4[2728]; | ||
42 | } __packed; | ||
43 | |||
44 | int fsl_pq_mdio_read(struct mii_bus *bus, int mii_id, int regnum); | ||
45 | int fsl_pq_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value); | ||
46 | int fsl_pq_local_mdio_write(struct fsl_pq_mdio __iomem *regs, int mii_id, | ||
47 | int regnum, u16 value); | ||
48 | int fsl_pq_local_mdio_read(struct fsl_pq_mdio __iomem *regs, int mii_id, int regnum); | ||
49 | int __init fsl_pq_mdio_init(void); | ||
50 | void fsl_pq_mdio_exit(void); | ||
51 | void fsl_pq_mdio_bus_name(char *name, struct device_node *np); | ||
52 | #endif /* FSL_PQ_MDIO_H */ | ||
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index 4605f7246687..f762a7fbe51e 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c | |||
@@ -100,7 +100,6 @@ | |||
100 | #include <linux/of_net.h> | 100 | #include <linux/of_net.h> |
101 | 101 | ||
102 | #include "gianfar.h" | 102 | #include "gianfar.h" |
103 | #include "fsl_pq_mdio.h" | ||
104 | 103 | ||
105 | #define TX_TIMEOUT (1*HZ) | 104 | #define TX_TIMEOUT (1*HZ) |
106 | 105 | ||
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c index 21c6574c5f15..164288439220 100644 --- a/drivers/net/ethernet/freescale/ucc_geth.c +++ b/drivers/net/ethernet/freescale/ucc_geth.c | |||
@@ -42,7 +42,6 @@ | |||
42 | #include <asm/machdep.h> | 42 | #include <asm/machdep.h> |
43 | 43 | ||
44 | #include "ucc_geth.h" | 44 | #include "ucc_geth.h" |
45 | #include "fsl_pq_mdio.h" | ||
46 | 45 | ||
47 | #undef DEBUG | 46 | #undef DEBUG |
48 | 47 | ||