spl: Ensure all SPL symbols in Kconfig have some SPL dependency

Tighten up symbol dependencies in a number of places.  Ensure that a SPL
specific option has at least a direct dependency on SPL.  In places
where it's clear that we depend on something more specific, use that
dependency instead.  This means in a very small number of places we can
drop redundant dependencies.

Reported-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 2c20dc7..0af53a6 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -29,6 +29,7 @@
 
 config SPL_POWER_LEGACY
 	bool "Legacy power support in SPL"
+	depends on SPL && !SPL_DM_PMIC
 	default y if POWER_LEGACY
 	help
 	  Note: This is a legacy option. Use SPL_DM_PMIC instead.
diff --git a/drivers/power/acpi_pmc/Kconfig b/drivers/power/acpi_pmc/Kconfig
index 355d161..629acb0 100644
--- a/drivers/power/acpi_pmc/Kconfig
+++ b/drivers/power/acpi_pmc/Kconfig
@@ -8,6 +8,7 @@
 
 config SPL_ACPI_PMC
 	bool "Power Manager (x86 PMC) support in SPL"
+	depends on SPL
 	default y if ACPI_PMC
 	help
 	  Enable support for an x86-style power-management controller which
diff --git a/drivers/power/regulator/Kconfig b/drivers/power/regulator/Kconfig
index d6cea8e..c519e06 100644
--- a/drivers/power/regulator/Kconfig
+++ b/drivers/power/regulator/Kconfig
@@ -55,7 +55,7 @@
 
 config SPL_DM_REGULATOR_BD71837
 	bool "Enable Driver Model for ROHM BD71837/BD71847 regulators in SPL"
-	depends on DM_REGULATOR_BD71837
+	depends on DM_REGULATOR_BD71837 && SPL
 	help
 	This config enables implementation of driver-model regulator uclass
 	features for regulators on ROHM BD71837 and BD71847 in SPL.
@@ -70,7 +70,7 @@
 
 config SPL_DM_REGULATOR_PCA9450
 	bool "Enable Driver Model for NXP PCA9450 regulators in SPL"
-	depends on DM_REGULATOR_PCA9450
+	depends on DM_REGULATOR_PCA9450 && SPL
 	help
 	This config enables implementation of driver-model regulator uclass
 	features for regulators on ROHM PCA9450 in SPL.
@@ -115,7 +115,7 @@
 
 config SPL_REGULATOR_PWM
 	bool "Enable Driver for PWM regulators in SPL"
-	depends on REGULATOR_PWM
+	depends on REGULATOR_PWM && SPL
 	help
 	  This config enables implementation of driver-model regulator uclass
 	  features for PWM regulators in SPL.
@@ -163,7 +163,7 @@
 
 config SPL_DM_REGULATOR_FIXED
 	bool "Enable Driver Model for REGULATOR Fixed value in SPL"
-	depends on DM_REGULATOR_FIXED
+	depends on DM_REGULATOR_FIXED && SPL
 	select SPL_DM_REGULATOR_COMMON
 	---help---
 	This config enables implementation of driver-model regulator uclass
@@ -345,7 +345,7 @@
 
 config SPL_DM_REGULATOR_PALMAS
 	bool "Enable driver for PALMAS PMIC regulators"
-       depends on SPL_PMIC_PALMAS
+	depends on SPL_PMIC_PALMAS
 	help
 	This enables implementation of driver-model regulator uclass
 	features for REGULATOR PALMAS and the family of PALMAS PMICs.
@@ -353,7 +353,7 @@
 
 config SPL_DM_REGULATOR_LP87565
 	bool "Enable driver for LP87565 PMIC regulators"
-       depends on SPL_PMIC_LP87565
+	depends on SPL_PMIC_LP87565
 	help
 	This enables implementation of driver-model regulator uclass
 	features for REGULATOR LP87565 and the family of LP87565 PMICs.