aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <sebastian@breakpoint.cc>2010-04-27 18:53:50 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-27 18:53:50 -0400
commitfa12abd7d3fbaa9f86f97baeb445cb71189ae1d1 (patch)
tree6117e9c138e6d31d577395c5a9a2835158248473 /drivers
parent05fceb4ad7e8bf809a2a97061d6273d27d1a8449 (diff)
net/sb1250: remove CONFIG_SIBYTE_STANDALONE
CONFIG_SIBYTE_STANDALONE is gone since v2.6.31-rc1 ("MIPS: Sibyte: Remove standalone kernel support") This is a missing piece. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/sb1250-mac.c144
1 files changed, 0 insertions, 144 deletions
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c
index 332031747a23..6ed92d62af22 100644
--- a/drivers/net/sb1250-mac.c
+++ b/drivers/net/sb1250-mac.c
@@ -48,23 +48,6 @@
48#include <asm/io.h> 48#include <asm/io.h>
49#include <asm/processor.h> /* Processor type for cache alignment. */ 49#include <asm/processor.h> /* Processor type for cache alignment. */
50 50
51/* This is only here until the firmware is ready. In that case,
52 the firmware leaves the ethernet address in the register for us. */
53#ifdef CONFIG_SIBYTE_STANDALONE
54#define SBMAC_ETH0_HWADDR "40:00:00:00:01:00"
55#define SBMAC_ETH1_HWADDR "40:00:00:00:01:01"
56#define SBMAC_ETH2_HWADDR "40:00:00:00:01:02"
57#define SBMAC_ETH3_HWADDR "40:00:00:00:01:03"
58#endif
59
60
61/* These identify the driver base version and may not be removed. */
62#if 0
63static char version1[] __initdata =
64"sb1250-mac.c:1.00 1/11/2001 Written by Mitch Lichtenberg\n";
65#endif
66
67
68/* Operational parameters that usually are not changed. */ 51/* Operational parameters that usually are not changed. */
69 52
70#define CONFIG_SBMAC_COALESCE 53#define CONFIG_SBMAC_COALESCE
@@ -2182,85 +2165,6 @@ static void sbmac_setmulti(struct sbmac_softc *sc)
2182 } 2165 }
2183} 2166}
2184 2167
2185#if defined(SBMAC_ETH0_HWADDR) || defined(SBMAC_ETH1_HWADDR) || defined(SBMAC_ETH2_HWADDR) || defined(SBMAC_ETH3_HWADDR)
2186/**********************************************************************
2187 * SBMAC_PARSE_XDIGIT(str)
2188 *
2189 * Parse a hex digit, returning its value
2190 *
2191 * Input parameters:
2192 * str - character
2193 *
2194 * Return value:
2195 * hex value, or -1 if invalid
2196 ********************************************************************* */
2197
2198static int sbmac_parse_xdigit(char str)
2199{
2200 int digit;
2201
2202 if ((str >= '0') && (str <= '9'))
2203 digit = str - '0';
2204 else if ((str >= 'a') && (str <= 'f'))
2205 digit = str - 'a' + 10;
2206 else if ((str >= 'A') && (str <= 'F'))
2207 digit = str - 'A' + 10;
2208 else
2209 return -1;
2210
2211 return digit;
2212}
2213
2214/**********************************************************************
2215 * SBMAC_PARSE_HWADDR(str,hwaddr)
2216 *
2217 * Convert a string in the form xx:xx:xx:xx:xx:xx into a 6-byte
2218 * Ethernet address.
2219 *
2220 * Input parameters:
2221 * str - string
2222 * hwaddr - pointer to hardware address
2223 *
2224 * Return value:
2225 * 0 if ok, else -1
2226 ********************************************************************* */
2227
2228static int sbmac_parse_hwaddr(char *str, unsigned char *hwaddr)
2229{
2230 int digit1,digit2;
2231 int idx = 6;
2232
2233 while (*str && (idx > 0)) {
2234 digit1 = sbmac_parse_xdigit(*str);
2235 if (digit1 < 0)
2236 return -1;
2237 str++;
2238 if (!*str)
2239 return -1;
2240
2241 if ((*str == ':') || (*str == '-')) {
2242 digit2 = digit1;
2243 digit1 = 0;
2244 }
2245 else {
2246 digit2 = sbmac_parse_xdigit(*str);
2247 if (digit2 < 0)
2248 return -1;
2249 str++;
2250 }
2251
2252 *hwaddr++ = (digit1 << 4) | digit2;
2253 idx--;
2254
2255 if (*str == '-')
2256 str++;
2257 if (*str == ':')
2258 str++;
2259 }
2260 return 0;
2261}
2262#endif
2263
2264static int sb1250_change_mtu(struct net_device *_dev, int new_mtu) 2168static int sb1250_change_mtu(struct net_device *_dev, int new_mtu)
2265{ 2169{
2266 if (new_mtu > ENET_PACKET_SIZE) 2170 if (new_mtu > ENET_PACKET_SIZE)
@@ -2770,36 +2674,6 @@ static int __exit sbmac_remove(struct platform_device *pldev)
2770static struct platform_device **sbmac_pldev; 2674static struct platform_device **sbmac_pldev;
2771static int sbmac_max_units; 2675static int sbmac_max_units;
2772 2676
2773#if defined(SBMAC_ETH0_HWADDR) || defined(SBMAC_ETH1_HWADDR) || defined(SBMAC_ETH2_HWADDR) || defined(SBMAC_ETH3_HWADDR)
2774static void __init sbmac_setup_hwaddr(int idx, char *addr)
2775{
2776 void __iomem *sbm_base;
2777 unsigned long start, end;
2778 uint8_t eaddr[6];
2779 uint64_t val;
2780
2781 if (idx >= sbmac_max_units)
2782 return;
2783
2784 start = A_MAC_CHANNEL_BASE(idx);
2785 end = A_MAC_CHANNEL_BASE(idx + 1) - 1;
2786
2787 sbm_base = ioremap_nocache(start, end - start + 1);
2788 if (!sbm_base) {
2789 printk(KERN_ERR "%s: unable to map device registers\n",
2790 sbmac_string);
2791 return;
2792 }
2793
2794 sbmac_parse_hwaddr(addr, eaddr);
2795 val = sbmac_addr2reg(eaddr);
2796 __raw_writeq(val, sbm_base + R_MAC_ETHERNET_ADDR);
2797 val = __raw_readq(sbm_base + R_MAC_ETHERNET_ADDR);
2798
2799 iounmap(sbm_base);
2800}
2801#endif
2802
2803static int __init sbmac_platform_probe_one(int idx) 2677static int __init sbmac_platform_probe_one(int idx)
2804{ 2678{
2805 struct platform_device *pldev; 2679 struct platform_device *pldev;
@@ -2876,24 +2750,6 @@ static void __init sbmac_platform_probe(void)
2876 return; /* none */ 2750 return; /* none */
2877 } 2751 }
2878 2752
2879 /*
2880 * For bringup when not using the firmware, we can pre-fill
2881 * the MAC addresses using the environment variables
2882 * specified in this file (or maybe from the config file?)
2883 */
2884#ifdef SBMAC_ETH0_HWADDR
2885 sbmac_setup_hwaddr(0, SBMAC_ETH0_HWADDR);
2886#endif
2887#ifdef SBMAC_ETH1_HWADDR
2888 sbmac_setup_hwaddr(1, SBMAC_ETH1_HWADDR);
2889#endif
2890#ifdef SBMAC_ETH2_HWADDR
2891 sbmac_setup_hwaddr(2, SBMAC_ETH2_HWADDR);
2892#endif
2893#ifdef SBMAC_ETH3_HWADDR
2894 sbmac_setup_hwaddr(3, SBMAC_ETH3_HWADDR);
2895#endif
2896
2897 sbmac_pldev = kcalloc(sbmac_max_units, sizeof(*sbmac_pldev), 2753 sbmac_pldev = kcalloc(sbmac_max_units, sizeof(*sbmac_pldev),
2898 GFP_KERNEL); 2754 GFP_KERNEL);
2899 if (!sbmac_pldev) { 2755 if (!sbmac_pldev) {