aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-5.4/701-net-0229-enetc-Initialize-SerDes-for-SGMII-and-SXGMII-protoco.patch
blob: 5458141e9f66472c3fe3db6f095285786812e860 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
From 6943ed031ee75f13a950e293f92db68ea2ec2786 Mon Sep 17 00:00:00 2001
From: Claudiu Manoil <claudiu.manoil@nxp.com>
Date: Wed, 14 Aug 2019 14:34:47 +0300
Subject: [PATCH] enetc: Initialize SerDes for SGMII and SXGMII protocols

ENETC has ethernet MACs capable of SGMII and SXGMII but
in order to use these protocols some serdes configurations
need to be performed.
The serdes is configurable via an internal MDIO bus
connected to an internal PCS device, all reads/writes are
performed at address 0.
This patch basically removes the dependecy on a bootloader
regarding serdes initialization.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
---
 drivers/net/ethernet/freescale/enetc/enetc_hw.h   | 17 +++++++
 drivers/net/ethernet/freescale/enetc/enetc_mdio.c | 24 +++++++++
 drivers/net/ethernet/freescale/enetc/enetc_pf.c   | 59 +++++++++++++++++++++++
 drivers/net/ethernet/freescale/enetc/enetc_pf.h   |  2 +
 4 files changed, 102 insertions(+)

--- a/drivers/net/ethernet/freescale/enetc/enetc_hw.h
+++ b/drivers/net/ethernet/freescale/enetc/enetc_hw.h
@@ -223,6 +223,23 @@ enum enetc_bdr_type {TX, RX};
 #define ENETC_PM0_MAXFRM	0x8014
 #define ENETC_SET_TX_MTU(val)	((val) << 16)
 #define ENETC_SET_MAXFRM(val)	((val) & 0xffff)
+
+#define ENETC_PM_IMDIO_BASE	0x8030
+/* PCS registers */
+#define ENETC_PCS_CR			0x0
+#define ENETC_PCS_CR_RESET_AN		0x1200
+#define ENETC_PCS_CR_DEF_VAL		0x0140
+#define ENETC_PCS_CR_LANE_RESET		0x8000
+#define ENETC_PCS_DEV_ABILITY		0x04
+#define ENETC_PCS_DEV_ABILITY_SGMII	0x4001
+#define ENETC_PCS_DEV_ABILITY_SXGMII	0x5001
+#define ENETC_PCS_LINK_TIMER1		0x12
+#define ENETC_PCS_LINK_TIMER1_VAL	0x06a0
+#define ENETC_PCS_LINK_TIMER2		0x13
+#define ENETC_PCS_LINK_TIMER2_VAL	0x0003
+#define ENETC_PCS_IF_MODE		0x14
+#define ENETC_PCS_IF_MODE_SGMII_AN	0x0003
+
 #define ENETC_PM0_IF_MODE	0x8300
 #define ENETC_PMO_IFM_RG	BIT(2)
 #define ENETC_PM0_IFM_RLP	(BIT(5) | BIT(11))
--- a/drivers/net/ethernet/freescale/enetc/enetc_mdio.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_mdio.c
@@ -200,3 +200,27 @@ void enetc_mdio_remove(struct enetc_pf *
 	if (pf->mdio)
 		mdiobus_unregister(pf->mdio);
 }
+
+int enetc_imdio_init(struct enetc_pf *pf)
+{
+	struct device *dev = &pf->si->pdev->dev;
+	struct enetc_mdio_priv *mdio_priv;
+	struct mii_bus *bus;
+
+	bus = devm_mdiobus_alloc_size(dev, sizeof(*mdio_priv));
+	if (!bus)
+		return -ENOMEM;
+
+	bus->name = "FSL ENETC internal MDIO Bus";
+	bus->read = enetc_mdio_read;
+	bus->write = enetc_mdio_write;
+	bus->parent = dev;
+	mdio_priv = bus->priv;
+	mdio_priv->hw = &pf->si->hw;
+	mdio_priv->mdio_base = ENETC_PM_IMDIO_BASE;
+	snprintf(bus->id, MII_BUS_ID_SIZE, "%s", dev_name(dev));
+
+	pf->imdio = bus;
+
+	return 0;
+}
--- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c
@@ -852,6 +852,61 @@ static int enetc_init_port_rss_memory(st
 	return err;
 }
 
+static void enetc_configure_sgmii(struct mii_bus *imdio)
+{
+	/* Set to SGMII mode, use AN */
+	imdio->write(imdio, 0, ENETC_PCS_IF_MODE,
+		     ENETC_PCS_IF_MODE_SGMII_AN);
+
+	/* Dev ability - SGMII */
+	imdio->write(imdio, 0, ENETC_PCS_DEV_ABILITY,
+		     ENETC_PCS_DEV_ABILITY_SGMII);
+
+	/* Adjust link timer for SGMII */
+	imdio->write(imdio, 0, ENETC_PCS_LINK_TIMER1,
+		     ENETC_PCS_LINK_TIMER1_VAL);
+	imdio->write(imdio, 0, ENETC_PCS_LINK_TIMER2,
+		     ENETC_PCS_LINK_TIMER2_VAL);
+
+	/* restart PCS AN */
+	imdio->write(imdio, 0, ENETC_PCS_CR,
+		     ENETC_PCS_CR_RESET_AN | ENETC_PCS_CR_DEF_VAL);
+}
+
+static void enetc_configure_sxgmii(struct mii_bus *imdio)
+{
+	/* Dev ability - SXGMII */
+	imdio->write(imdio, 0, MII_ADDR_C45 | (MDIO_MMD_VEND2 << 16) |
+		     ENETC_PCS_DEV_ABILITY, ENETC_PCS_DEV_ABILITY_SXGMII);
+
+	/* Restart PCS AN */
+	imdio->write(imdio, 0, MII_ADDR_C45 | (MDIO_MMD_VEND2 << 16) |
+		     ENETC_PCS_CR,
+		     ENETC_PCS_CR_LANE_RESET | ENETC_PCS_CR_RESET_AN);
+}
+
+static int enetc_configure_serdes(struct enetc_ndev_priv *priv)
+{
+	struct enetc_pf *pf = enetc_si_priv(priv->si);
+	int err;
+
+	if (priv->if_mode != PHY_INTERFACE_MODE_SGMII &&
+	    priv->if_mode != PHY_INTERFACE_MODE_XGMII)
+		return 0;
+
+	err = enetc_imdio_init(pf);
+	if (err)
+		return err;
+
+	if (priv->if_mode == PHY_INTERFACE_MODE_SGMII)
+		enetc_configure_sgmii(pf->imdio);
+
+	if (priv->if_mode == PHY_INTERFACE_MODE_XGMII)
+		enetc_configure_sxgmii(pf->imdio);
+
+	return 0;
+}
+
 static int enetc_pf_probe(struct pci_dev *pdev,
 			  const struct pci_device_id *ent)
 {
@@ -928,6 +983,10 @@ static int enetc_pf_probe(struct pci_dev
 	if (err)
 		dev_warn(&pdev->dev, "Fallback to PHY-less operation\n");
 
+	err = enetc_configure_serdes(priv);
+	if (err)
+		dev_warn(&pdev->dev, "Attempted serdes config but failed\n");
+
 	err = register_netdev(ndev);
 	if (err)
 		goto err_reg_netdev;
--- a/drivers/net/ethernet/freescale/enetc/enetc_pf.h
+++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.h
@@ -44,6 +44,7 @@ struct enetc_pf {
 	DECLARE_BITMAP(active_vlans, VLAN_N_VID);
 
 	struct mii_bus *mdio; /* saved for cleanup */
+	struct mii_bus *imdio;
 };
 
 int enetc_msg_psi_init(struct enetc_pf *pf);
@@ -53,3 +54,4 @@ void enetc_msg_handle_rxmsg(struct enetc
 /* MDIO */
 int enetc_mdio_probe(struct enetc_pf *pf);
 void enetc_mdio_remove(struct enetc_pf *pf);
+int enetc_imdio_init(struct enetc_pf *pf);
ref='#n597'>597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782
#
# For a description of the syntax of this configuration file,
# see scripts/kbuild/config-language.txt.
#

menu "Coreutils"

config BUSYBOX_CONFIG_BASENAME
	bool "basename"
	default y
	help
	  basename is used to strip the directory and suffix from filenames,
	  leaving just the filename itself.  Enable this option if you wish
	  to enable the 'basename' utility.

config BUSYBOX_CONFIG_CAL
	bool "cal"
	default n
	help
	  cal is used to display a monthly calender.

config BUSYBOX_CONFIG_CAT
	bool "cat"
	default y
	help
	  cat is used to concatenate files and print them to the standard
	  output.  Enable this option if you wish to enable the 'cat' utility.

config BUSYBOX_CONFIG_CATV
	bool "catv"
	default n
	help
	  Display nonprinting characters as escape sequences (like some
	  implementations' cat -v option).

config BUSYBOX_CONFIG_CHGRP
	bool "chgrp"
	default y
	help
	  chgrp is used to change the group ownership of files.

config BUSYBOX_CONFIG_CHMOD
	bool "chmod"
	default y
	help
	  chmod is used to change the access permission of files.

config BUSYBOX_CONFIG_CHOWN
	bool "chown"
	default y
	help
	  chown is used to change the user and/or group ownership
	  of files.

config BUSYBOX_CONFIG_CHROOT
	bool "chroot"
	default y
	help
	  chroot is used to change the root directory and run a command.
	  The default command is `/bin/sh'.

config BUSYBOX_CONFIG_CKSUM
	bool "cksum"
	default n
	help
	  cksum is used to calculate the CRC32 checksum of a file.

config BUSYBOX_CONFIG_CMP
	bool "cmp"
	default n
	help
	  cmp is used to compare two files and returns the result
	  to standard output.

config BUSYBOX_CONFIG_COMM
	bool "comm"
	default n
	help
	  comm is used to compare two files line by line and return
	  a three-column output.

config BUSYBOX_CONFIG_CP
	bool "cp"
	default y
	help
	  cp is used to copy files and directories.

config BUSYBOX_CONFIG_CUT
	bool "cut"
	default y
	help
	  cut is used to print selected parts of lines from
	  each file to stdout.

config BUSYBOX_CONFIG_DATE
	bool "date"
	default y
	help
	  date is used to set the system date or display the
	  current time in the given format.

config BUSYBOX_CONFIG_FEATURE_DATE_ISOFMT
	bool "Enable ISO date format output (-I)"
	default y
	depends on BUSYBOX_CONFIG_DATE
	help
	  Enable option (-I) to output an ISO-8601 compliant
	  date/time string.

config BUSYBOX_CONFIG_DD
	bool "dd"
	default y
	help
	  dd copies a file (from standard input to standard output,
	  by default) using specific input and output blocksizes,
	  while optionally performing conversions on it.

config BUSYBOX_CONFIG_FEATURE_DD_SIGNAL_HANDLING
	bool "Enable DD signal handling for status reporting"
	default y
	depends on BUSYBOX_CONFIG_DD
	help
	  sending a SIGUSR1 signal to a running `dd' process makes it
	  print to standard error the number of records read and written
	  so far, then to resume copying.

	  $ dd if=/dev/zero of=/dev/null& pid=$! $ kill -USR1 $pid; sleep 1; kill $pid
	  10899206+0 records in 10899206+0 records out

config BUSYBOX_CONFIG_FEATURE_DD_IBS_OBS
	bool "Enable ibs, obs and conv options"
	default n
	depends on BUSYBOX_CONFIG_DD
	help
	  Enables support for writing a certain number of bytes in and out,
	  at a time, and performing conversions on the data stream.

config BUSYBOX_CONFIG_DF
	bool "df"
	default y
	help
	  df reports the amount of disk space used and available
	  on filesystems.

config BUSYBOX_CONFIG_DIFF
	bool "diff"
	default n
	help
	  diff compares two files or directories and outputs the
	  differences between them in a form that can be given to
	  the patch command.

config BUSYBOX_CONFIG_FEATURE_DIFF_BINARY
	bool "Enable checks for binary files"
	default n
	depends on BUSYBOX_CONFIG_DIFF
	help
	  This option enables support for checking for binary files
	  before a comparison is carried out.

config BUSYBOX_CONFIG_FEATURE_DIFF_DIR
	bool "Enable directory support"
	default n
	depends on BUSYBOX_CONFIG_DIFF
	help
	  This option enables support for directory and subdirectory
	  comparison.

config BUSYBOX_CONFIG_FEATURE_DIFF_MINIMAL
	bool "Enable -d option to find smaller sets of changes"
	default n
	depends on BUSYBOX_CONFIG_DIFF
	help
	  Enabling this option allows the use of -d to make diff
	  try hard to find the smallest possible set of changes.

config BUSYBOX_CONFIG_DIRNAME
	bool "dirname"
	default y
	help
	  dirname is used to strip a non-directory suffix from
	  a file name.

config BUSYBOX_CONFIG_DOS2UNIX
	bool "dos2unix/unix2dos"
	default n
	help
	  dos2unix is used to convert a text file from DOS format to
	  UNIX format, and vice versa.

config BUSYBOX_CONFIG_UNIX2DOS
	bool
	default n
	depends on BUSYBOX_CONFIG_DOS2UNIX
	help
	  unix2dos is used to convert a text file from UNIX format to
	  DOS format, and vice versa.

config BUSYBOX_CONFIG_DU
	bool "du (default blocksize of 512 bytes)"
	default y
	help
	  du is used to report the amount of disk space used
	  for specified files.

config BUSYBOX_CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
	bool "Use a default blocksize of 1024 bytes (1K)"
	default y
	depends on BUSYBOX_CONFIG_DU
	help
	  Use a blocksize of (1K) instead of the default 512b.

config BUSYBOX_CONFIG_ECHO
	bool "echo (basic SuSv3 version taking no options)"
	default y
	help
	  echo is used to print a specified string to stdout.

# this entry also appears in shell/Config.in, next to the echo builtin
config BUSYBOX_CONFIG_FEATURE_FANCY_ECHO
	bool "Enable echo options (-n and -e)"
	default y
	depends on BUSYBOX_CONFIG_ECHO
	help
	  This adds options (-n and -e) to echo.

config BUSYBOX_CONFIG_ENV
	bool "env"
	default y
	help
	  env is used to set an environment variable and run
	  a command; without options it displays the current
	  environment.

config BUSYBOX_CONFIG_FEATURE_ENV_LONG_OPTIONS
	bool "Enable long options"
	default n
	depends on BUSYBOX_CONFIG_ENV && BUSYBOX_CONFIG_GETOPT_LONG
	help
	  Support long options for the env applet.

config BUSYBOX_CONFIG_EXPR
	bool "expr"
	default y
	help
	  expr is used to calculate numbers and print the result
	  to standard output.

config BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64
	bool "Extend Posix numbers support to 64 bit"
	default n
	depends on BUSYBOX_CONFIG_EXPR
	help
	  Enable 64-bit math support in the expr applet.  This will make
	  the applet slightly larger, but will allow computation with very
	  large numbers.

config BUSYBOX_CONFIG_FALSE
	bool "false"
	default y
	help
	  false returns an exit code of FALSE (1).

config BUSYBOX_CONFIG_FOLD
	bool "fold"
	default n
	help
	  Wrap text to fit a specific width.

config BUSYBOX_CONFIG_HEAD
	bool "head"
	default y
	help
	  head is used to print the first specified number of lines
	  from files.

config BUSYBOX_CONFIG_FEATURE_FANCY_HEAD
	bool "Enable head options (-c, -q, and -v)"
	default y
	depends on BUSYBOX_CONFIG_HEAD
	help
	  This enables the head options (-c, -q, and -v).

config BUSYBOX_CONFIG_HOSTID
	bool "hostid"
	default y
	help
	  hostid prints the numeric identifier (in hexadecimal) for
	  the current host.

config BUSYBOX_CONFIG_ID
	bool "id"
	default y
	help
	  id displays the current user and group ID names.

config BUSYBOX_CONFIG_INSTALL
	bool "install"
	default n
	help
	  Copy files and set attributes.

config BUSYBOX_CONFIG_FEATURE_INSTALL_LONG_OPTIONS
	bool "Enable long options"
	default n
	depends on BUSYBOX_CONFIG_INSTALL && BUSYBOX_CONFIG_GETOPT_LONG
	help
	  Support long options for the install applet.

config BUSYBOX_CONFIG_LENGTH
	bool "length"
	default y
	help
	  length is used to print out the length of a specified string.

config BUSYBOX_CONFIG_LN
	bool "ln"
	default y
	help
	  ln is used to create hard or soft links between files.

config BUSYBOX_CONFIG_LOGNAME
	bool "logname"
	default n
	help
	  logname is used to print the current user's login name.

config BUSYBOX_CONFIG_LS
	bool "ls"
	default y
	help
	  ls is used to list the contents of directories.

config BUSYBOX_CONFIG_FEATURE_LS_FILETYPES
	bool "Enable filetyping options (-p and -F)"
	default y
	depends on BUSYBOX_CONFIG_LS
	help
	  Enable the ls options (-p and -F).

config BUSYBOX_CONFIG_FEATURE_LS_FOLLOWLINKS
	bool "Enable symlinks dereferencing (-L)"
	default y
	depends on BUSYBOX_CONFIG_LS
	help
	  Enable the ls option (-L).

config BUSYBOX_CONFIG_FEATURE_LS_RECURSIVE
	bool "Enable recursion (-R)"
	default y
	depends on BUSYBOX_CONFIG_LS
	help
	  Enable the ls option (-R).

config BUSYBOX_CONFIG_FEATURE_LS_SORTFILES
	bool "Sort the file names"
	default y
	depends on BUSYBOX_CONFIG_LS
	help
	  Allow ls to sort file names alphabetically.

config BUSYBOX_CONFIG_FEATURE_LS_TIMESTAMPS
	bool "Show file timestamps"
	default y
	depends on BUSYBOX_CONFIG_LS
	help
	  Allow ls to display timestamps for files.

config BUSYBOX_CONFIG_FEATURE_LS_USERNAME
	bool "Show username/groupnames"
	default y
	depends on BUSYBOX_CONFIG_LS
	help
	  Allow ls to display username/groupname for files.

config BUSYBOX_CONFIG_FEATURE_LS_COLOR
	bool "Allow use of color to identify file types"
	default y
	depends on BUSYBOX_CONFIG_LS && BUSYBOX_CONFIG_GETOPT_LONG
	help
	  This enables the --color option to ls.

config BUSYBOX_CONFIG_FEATURE_LS_COLOR_IS_DEFAULT
	bool "Produce colored ls output by default"
	default y
	depends on BUSYBOX_CONFIG_FEATURE_LS_COLOR
	help
	  Saying yes here will turn coloring on by default,
	  even if no "--color" option is given to the ls command.
	  This is not recommended, since the colors are not
	  configurable, and the output may not be legible on
	  many output screens.

config BUSYBOX_CONFIG_MD5SUM
	bool "md5sum"
	default y
	help
	  md5sum is used to print or check MD5 checksums.

config BUSYBOX_CONFIG_MKDIR
	bool "mkdir"
	default y
	help
	  mkdir is used to create directories with the specified names.

config BUSYBOX_CONFIG_FEATURE_MKDIR_LONG_OPTIONS
	bool "Enable long options"
	default n
	depends on BUSYBOX_CONFIG_MKDIR && BUSYBOX_CONFIG_GETOPT_LONG
	help
	  Support long options for the mkdir applet.

config BUSYBOX_CONFIG_MKFIFO
	bool "mkfifo"
	default y
	help
	  mkfifo is used to create FIFOs (named pipes).
	  The `mknod' program can also create FIFOs.

config BUSYBOX_CONFIG_MKNOD
	bool "mknod"
	default y
	help
	  mknod is used to create FIFOs or block/character special
	  files with the specified names.

config BUSYBOX_CONFIG_MV
	bool "mv"
	default y
	help
	  mv is used to move or rename files or directories.

config BUSYBOX_CONFIG_FEATURE_MV_LONG_OPTIONS
	bool "Enable long options"
	default n
	depends on BUSYBOX_CONFIG_MV && BUSYBOX_CONFIG_GETOPT_LONG
	help
	  Support long options for the mv applet.

config BUSYBOX_CONFIG_NICE
	bool "nice"
	default n
	help
	  nice runs a program with modified scheduling priority.

config BUSYBOX_CONFIG_NOHUP
	bool "nohup"
	default n
	help
	  run a command immune to hangups, with output to a non-tty.

config BUSYBOX_CONFIG_OD
	bool "od"
	default n
	help
	  od is used to dump binary files in octal and other formats.

config BUSYBOX_CONFIG_PRINTENV
	bool "printenv"
	default n
	help
	  printenv is used to print all or part of environment.

config BUSYBOX_CONFIG_PRINTF
	bool "printf"
	default y
	help
	  printf is used to format and print specified strings.
	  It's similar to `echo' except it has more options.

config BUSYBOX_CONFIG_PWD
	bool "pwd"
	default y
	help
	  pwd is used to print the current directory.

config BUSYBOX_CONFIG_REALPATH
	bool "realpath"
	default n
	help
	  Return the canonicalized absolute pathname.
	  This isn't provided by GNU shellutils, but where else does it belong.

config BUSYBOX_CONFIG_RM
	bool "rm"
	default y
	help
	  rm is used to remove files or directories.

config BUSYBOX_CONFIG_RMDIR
	bool "rmdir"
	default y
	help
	  rmdir is used to remove empty directories.

config BUSYBOX_CONFIG_SEQ
	bool "seq"
	default y
	help
	  print a sequence of numbers

config BUSYBOX_CONFIG_SHA1SUM
	bool "sha1sum"
	default n
	help
	  Compute and check SHA1 message digest

config BUSYBOX_CONFIG_SLEEP
	bool "sleep (single integer arg with no suffix)"
	default y
	help
	  sleep is used to pause for a specified number of seconds,

config BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP
	bool "Enable multiple integer args and optional time suffixes"
	default y
	depends on BUSYBOX_CONFIG_SLEEP
	help
	  Allow sleep to pause for specified minutes, hours, and days.

config BUSYBOX_CONFIG_SORT
	bool "sort"
	default y
	help
	  sort is used to sort lines of text in specified files.

config BUSYBOX_CONFIG_FEATURE_SORT_BIG
	bool "full SuSv3 compliant sort (Support -ktcsbdfiozgM)"
	default n
	depends on BUSYBOX_CONFIG_SORT
	help
	  Without this, sort only supports  -r, -u, and an integer version
	  of -n.  Selecting this adds sort keys, floating point support, and
	  more.  This adds a little over 3k to a nonstatic build on x86.

	  The SuSv3 sort standard is available at:
	  http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html

config BUSYBOX_CONFIG_STAT
	bool "stat"
	default n
	help
	  display file or filesystem status.

config BUSYBOX_CONFIG_FEATURE_STAT_FORMAT
	bool "Enable custom formats (-c)"
	default n
	depends on BUSYBOX_CONFIG_STAT
	help
	  Without this, stat will not support the '-c format' option where
	  users can pass a custom format string for output.  This adds about
	  7k to a nonstatic build on amd64.

config BUSYBOX_CONFIG_STTY
	bool "stty"
	default n
	help
	  stty is used to change and print terminal line settings.

config BUSYBOX_CONFIG_SUM
	bool "sum"
	default n
	help
	  checksum and count the blocks in a file

config BUSYBOX_CONFIG_SYNC
	bool "sync"
	default y
	help
	  sync is used to flush filesystem buffers.

config BUSYBOX_CONFIG_TAIL
	bool "tail"
	default y
	help
	  tail is used to print the last specified number of lines
	  from files.

config BUSYBOX_CONFIG_FEATURE_FANCY_TAIL
	bool "Enable extra tail options (-q, -s, and -v)"
	default y
	depends on BUSYBOX_CONFIG_TAIL
	help
	  The options (-q, -s, and -v) are provided by GNU tail, but
	  are not specific in the SUSv3 standard.

config BUSYBOX_CONFIG_TEE
	bool "tee"
	default y
	help
	  tee is used to read from standard input and write
	  to standard output and files.

config BUSYBOX_CONFIG_FEATURE_TEE_USE_BLOCK_IO
	bool "Enable block i/o (larger/faster) instead of byte i/o."
	default y
	depends on BUSYBOX_CONFIG_TEE
	help
	  Enable this option for a faster tee, at expense of size.

config BUSYBOX_CONFIG_TEST
	bool "test"
	default y
	help
	  test is used to check file types and compare values,
	  returning an appropriate exit code.  The bash shell
	  has test built in, ash can build it in optionally.

config BUSYBOX_CONFIG_FEATURE_TEST_64
	bool "Extend test to 64 bit"
	default n
	depends on BUSYBOX_CONFIG_TEST
	help
	  Enable 64-bit support in test.

config BUSYBOX_CONFIG_TOUCH
	bool "touch"
	default y
	help
	  touch is used to create or change the access and/or
	  modification timestamp of specified files.

config BUSYBOX_CONFIG_TR
	bool "tr"
	default y
	help
	  tr is used to squeeze, and/or delete characters from standard
	  input, writing to standard output.

config BUSYBOX_CONFIG_FEATURE_TR_CLASSES
	bool "Enable character classes (such as [:upper:])"
	default n
	depends on BUSYBOX_CONFIG_TR
	help
	  Enable character classes, enabling commands such as:
	  tr [:upper:] [:lower:] to convert input into lowercase.

config BUSYBOX_CONFIG_FEATURE_TR_EQUIV
	bool "Enable equivalence classes"
	default n
	depends on BUSYBOX_CONFIG_TR
	help
	  Enable equivalence classes, which essentially add the enclosed
	  character to the current set. For instance, tr [=a=] xyz would
	  replace all instances of 'a' with 'xyz'. This option is mainly
	  useful for cases when no other way of expressing a character
	  is possible.

config BUSYBOX_CONFIG_TRUE
	bool "true"
	default y
	help
	  true returns an exit code of TRUE (0).

config BUSYBOX_CONFIG_TTY
	bool "tty"
	default n
	help
	  tty is used to print the name of the current terminal to
	  standard output.

config BUSYBOX_CONFIG_UNAME
	bool "uname"
	default y
	help
	  uname is used to print system information.

config BUSYBOX_CONFIG_UNIQ
	bool "uniq"
	default y
	help
	  uniq is used to remove duplicate lines from a sorted file.

config BUSYBOX_CONFIG_USLEEP
	bool "usleep"
	default n
	help
	  usleep is used to pause for a specified number of microseconds.

config BUSYBOX_CONFIG_UUDECODE
	bool "uudecode"
	default n
	help
	  uudecode is used to decode a uuencoded file.

config BUSYBOX_CONFIG_UUENCODE
	bool "uuencode"
	default n
	help
	  uuencode is used to uuencode a file.

config BUSYBOX_CONFIG_WATCH
	bool "watch"
	default n
	select BUSYBOX_CONFIG_DATE
	help
	  watch is used to execute a program periodically, showing
	  output to the screen.

config BUSYBOX_CONFIG_WC
	bool "wc"
	default y
	help
	  wc is used to print the number of bytes, words, and lines,
	  in specified files.

config BUSYBOX_CONFIG_FEATURE_WC_LARGE
	bool "Support very large files in wc"
	default n
	depends on BUSYBOX_CONFIG_WC
	help
	  Use "unsigned long long" in wc for count variables

config BUSYBOX_CONFIG_WHO
	bool "who"
	default n
	select BUSYBOX_CONFIG_FEATURE_UTMP
	help
	  who is used to show who is logged on.

config BUSYBOX_CONFIG_WHOAMI
	bool "whoami"
	default n
	help
	  whoami is used to print the username of the current
	  user id (same as id -un).

config BUSYBOX_CONFIG_YES
	bool "yes"
	default y
	help
	  yes is used to repeatedly output a specific string, or
	  the default string `y'.

comment "Common options for cp and mv"
	depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV

config BUSYBOX_CONFIG_FEATURE_PRESERVE_HARDLINKS
	bool "Preserve hard links"
	default y
	depends on BUSYBOX_CONFIG_CP || BUSYBOX_CONFIG_MV
	help
	  Allow cp and mv to preserve hard links.

comment "Common options for ls, more and telnet"
	depends on BUSYBOX_CONFIG_LS || BUSYBOX_CONFIG_MORE || BUSYBOX_CONFIG_TELNET

config BUSYBOX_CONFIG_FEATURE_AUTOWIDTH
	bool "Calculate terminal & column widths"
	default y
	depends on BUSYBOX_CONFIG_LS || BUSYBOX_CONFIG_MORE || BUSYBOX_CONFIG_TELNET
	help
	  This option allows utilities such as 'ls', 'more' and 'telnet'
	  to determine the width of the screen, which can allow them to
	  display additional text or avoid wrapping text onto the next line.
	  If you leave this disabled, your utilities will be especially
	  primitive and will be unable to determine the current screen width.

comment "Common options for df, du, ls"
	depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS

config BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE
	bool "Support for human readable output (example 13k, 23M, 235G)"
	default y
	depends on BUSYBOX_CONFIG_DF || BUSYBOX_CONFIG_DU || BUSYBOX_CONFIG_LS
	help
	  Allow df, du, and ls to have human readable output.

comment "Common options for md5sum, sha1sum"
	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM

config BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
	bool "Enable -c, -s and -w options"
	default y
	depends on BUSYBOX_CONFIG_MD5SUM || BUSYBOX_CONFIG_SHA1SUM
	help
	  Enabling the -c options allows files to be checked
	  against pre-calculated hash values.

	  -s and -w are useful options when verifying checksums.

endmenu