moveconfig: Allow querying board configuration

It is useful to be able to find out which boards define a particular
option, or combination of options. This is not as easy as grepping the
defconfig files since many options are implied by others.

Add a -f option to the moveconfig tool to permit this. Update the
documentation to cover this, including a better title for the doc page.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/doc/develop/moveconfig.rst b/doc/develop/moveconfig.rst
index dcd4d92..2f53ea5 100644
--- a/doc/develop/moveconfig.rst
+++ b/doc/develop/moveconfig.rst
@@ -1,7 +1,7 @@
 .. SPDX-License-Identifier: GPL-2.0+
 
-moveconfig
-==========
+moveconfig - Migrating and querying CONFIG options
+==================================================
 
 Since Kconfig was introduced to U-Boot, we have worked on moving
 config options from headers to Kconfig (defconfig).
@@ -129,6 +129,24 @@
        ./tools/moveconfig.py -Cy CONFIG_CMD_FPGAD -d -
 
 
+Finding boards with particular CONFIG combinations
+--------------------------------------------------
+
+You can use `moveconfig.py` to figure out which boards have a CONFIG enabled, or
+which do not. To use it, first build a database::
+
+    ./tools/moveconfig.py -b
+
+Then you can run queries using the `-f` flag followed by a list of CONFIG terms.
+Each term is CONFIG name, with or without a tilde (~) prefix. The tool searches
+for boards which match the CONFIG name, or do not match if tilde is used. For
+example, to find boards which enabled CONFIG_SCSI but not CONFIG_BLK::
+
+    tools/moveconfig.py -f SCSI ~BLK
+    3 matches
+    pg_wcom_seli8_defconfig highbank_defconfig pg_wcom_expu1_defconfig
+
+
 Finding implied CONFIGs
 -----------------------
 
@@ -235,6 +253,9 @@
   Specify a file containing a list of defconfigs to move.  The defconfig
   files can be given with shell-style wildcards. Use '-' to read from stdin.
 
+ -f, --find
+   Find boards with a given config combination
+
  -n, --dry-run
    Perform a trial run that does not make any changes.  It is useful to
    see what is going to happen before one actually runs it.