[coreboot-gerrit] Patch set updated for coreboot: 9f25a61 southbridge/amd/pi: Rework the SATA config menu

Dave Frodin (dave.frodin@se-eng.com) gerrit at coreboot.org
Thu Jan 22 16:53:14 CET 2015


Dave Frodin (dave.frodin at se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8253

-gerrit

commit 9f25a61c53071b3fef9d401f8d945caf29de6143
Author: Dave Frodin <dave.frodin at se-eng.com>
Date:   Wed Jan 21 07:56:38 2015 -0700

    southbridge/amd/pi: Rework the SATA config menu
    
    This change creates a config variable for each of the
    Hudson SATA modes to allow easier decoding of the
    various mode. These changes will be needed later when
    a hudson/bolton based board is added.
    
    Change-Id: I0d6374bd5f3befeaf4cc6cc0d069112a7e71da15
    Signed-off-by: Dave Frodin <dave.frodin at se-eng.com>
---
 src/southbridge/amd/pi/hudson/Kconfig | 91 +++++++++++++++++++++--------------
 1 file changed, 54 insertions(+), 37 deletions(-)

diff --git a/src/southbridge/amd/pi/hudson/Kconfig b/src/southbridge/amd/pi/hudson/Kconfig
index 9d1010f..a7d666d 100644
--- a/src/southbridge/amd/pi/hudson/Kconfig
+++ b/src/southbridge/amd/pi/hudson/Kconfig
@@ -128,49 +128,66 @@ config AMD_PUBKEY_FILE
 	string "AMD public Key"
 	default "3rdparty/southbridge/amd/avalon/PSP/AmdPubKey.bin" if CPU_AMD_PI_00730F01
 
-config HUDSON_SATA_MODE
-	int "SATA Mode"
-	default 0
-	range 0 6
+choice
+	prompt "SATA Mode"
+	default HUDSON_SATA_IDE
 	help
 	  Select the mode in which SATA should be driven. NATIVE AHCI, or RAID.
 	  The default is NATIVE.
-	  0: NATIVE mode does not require a ROM.
-	  1: RAID mode must have the two ROM files.
-	  2: AHCI may work with or without AHCI ROM. It depends on the payload support.
-	     For example, seabios does not require the AHCI ROM.
-	  3: LEGACY IDE
-	  4: IDE to AHCI
-	  5: AHCI7804: ROM Required, and AMD driver required in the OS.
-	  6: IDE to AHCI7804: ROM Required, and AMD driver required in the OS.
-
-comment "NATIVE"
-	depends on HUDSON_SATA_MODE = 0
 
-comment "RAID"
-	depends on HUDSON_SATA_MODE = 1
+config HUDSON_SATA_IDE
+	bool "NATIVE"
+	help
+	  NATIVE is the default mode and does not require a ROM.
 
-comment "AHCI"
-	depends on HUDSON_SATA_MODE = 2
+config HUDSON_SATA_RAID
+	bool "RAID"
+	help
+	  Hudson RAID mode must have the two required ROM files.
 
-comment "LEGACY IDE"
-	depends on HUDSON_SATA_MODE = 3
+config HUDSON_SATA_AHCI
+	bool "AHCI"
+	help
+	  AHCI may work with or without AHCI ROM. It depends on the payload support.
+	  For example, seabios does not require the AHCI ROM.
 
-comment "IDE to AHCI"
-	depends on HUDSON_SATA_MODE = 4
+config HUDSON_SATA_LEGACY_IDE
+	bool "LEGACY IDE"
+	help
+	  TODO
 
-comment "AHCI7804"
-	depends on HUDSON_SATA_MODE = 5
+config HUDSON_SATA_IDE2AHCI
+	bool "IDE to AHCI"
+	help
+	  TODO
 
-comment "IDE to AHCI7804"
-	depends on HUDSON_SATA_MODE = 6
+config HUDSON_SATA_AHCI7804
+	bool "AHCI7804"
+	help
+	  AHCI ROM Required, and AMD driver required in the OS.
 
-if HUDSON_SATA_MODE = 2 || HUDSON_SATA_MODE = 5
+config HUDSON_SATA_IDE2AHCI7804
+	bool "IDE to AHCI7804"
+	help
+	  AHCI ROM Required, and AMD driver required in the OS.
+endchoice
 
+config HUDSON_SATA_MODE
+	int
+	depends on (HUDSON_SATA_IDE || HUDSON_SATA_RAID || HUDSON_SATA_AHCI)
+	default "0" if HUDSON_SATA_IDE
+	default "1" if HUDSON_SATA_RAID
+	default "2" if HUDSON_SATA_AHCI
+	default "3" if HUDSON_SATA_LEGACY_IDE
+	default "4" if HUDSON_SATA_IDE2AHCI
+	default "5" if HUDSON_SATA_AHCI7804
+	default "6" if HUDSON_SATA_IDE2AHCI7804
+
+if HUDSON_SATA_AHCI || HUDSON_SATA_AHCI7804
 config AHCI_ROM_ID
-	string  "AHCI device PCI IDs"
-	default "1022,7801" if HUDSON_SATA_MODE = 2
-	default "1022,7804" if HUDSON_SATA_MODE = 5
+	string "AHCI device PCI IDs"
+	default "1022,7801" if HUDSON_SATA_AHCI
+	default "1022,7804" if HUDSON_SATA_AHCI7804
 
 config HUDSON_AHCI_ROM
 	bool "Add a AHCI ROM"
@@ -179,11 +196,9 @@ config AHCI_ROM_FILE
 	string "AHCI ROM path and filename"
 	depends on HUDSON_AHCI_ROM
 	default "src/southbridge/amd/pi/hudson/ahci.bin"
+endif # HUDSON_SATA_AHCI || HUDSON_SATA_AHCI7804
 
-endif
-
-if HUDSON_SATA_MODE = 1
-
+if HUDSON_SATA_RAID
 config RAID_ROM_ID
 	string "RAID device PCI IDs"
 	default "1022,7802"
@@ -192,21 +207,23 @@ config RAID_ROM_ID
 
 config RAID_ROM_FILE
 	string "RAID ROM path and filename"
+	depends on HUDSON_SATA_RAID
 	default "src/southbridge/amd/pi/hudson/raid.bin"
 
 config RAID_MISC_ROM_FILE
 	string "RAID Misc ROM path and filename"
 	default "src/southbridge/amd/pi/hudson/misc.bin"
+	depends on HUDSON_SATA_RAID
 
 config RAID_MISC_ROM_POSITION
 	hex "RAID Misc ROM Position"
 	default 0xFFF00000
+	depends on HUDSON_SATA_RAID
 	help
 	  The RAID ROM requires that the MISC ROM is located between the range
 	  0xFFF0_0000 to 0xFFF0_FFFF. Also, it must 1K bytes aligned.
 	  The CONFIG_ROM_SIZE must be larger than 0x100000.
-
-endif
+endif # HUDSON_SATA_RAID
 
 config HUDSON_LEGACY_FREE
 	bool "System is legacy free"



More information about the coreboot-gerrit mailing list