Add a config option to exclude DebugFS support in the CCP driver.
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
         management commands in Secure Encrypted Virtualization (SEV) mode,
         along with software-based Trusted Execution Environment (TEE) to
         enable third-party trusted applications.
+
+config CRYPTO_DEV_CCP_DEBUGFS
+       bool "Enable CCP Internals in DebugFS"
+       default n
+       depends on CRYPTO_DEV_SP_CCP
+       help
+         Expose CCP device information such as operation statistics, feature
+         information, and descriptor queue contents.
 
            ccp-ops.o \
            ccp-dev-v3.o \
            ccp-dev-v5.o \
-           ccp-dmaengine.o \
-           ccp-debugfs.o
+           ccp-dmaengine.o
+ccp-$(CONFIG_CRYPTO_DEV_CCP_DEBUGFS) += ccp-debugfs.o
 ccp-$(CONFIG_PCI) += sp-pci.o
 ccp-$(CONFIG_CRYPTO_DEV_SP_PSP) += psp-dev.o
 
 
        if (ret)
                goto e_hwrng;
 
+#ifdef CONFIG_CRYPTO_DEV_CCP_DEBUGFS
        /* Set up debugfs entries */
        ccp5_debugfs_setup(ccp);
+#endif
 
        return 0;
 
        /* Remove this device from the list of available units first */
        ccp_del_device(ccp);
 
+#ifdef CONFIG_CRYPTO_DEV_CCP_DEBUGFS
        /* We're in the process of tearing down the entire driver;
         * when all the devices are gone clean up debugfs
         */
        if (ccp_present())
                ccp5_debugfs_destroy();
+#endif
 
        /* Disable and clear interrupts */
        ccp5_disable_queue_interrupts(ccp);