if ARCH_MSM

choice
	prompt "MSM SoC Type"
	default ARCH_MSM7X00A

config ARCH_MSM7X01A
	bool "MSM7x00A / MSM7x01A"
	select ARCH_MSM_ARM11
	select CPU_V6

config ARCH_MSM7X27
	bool "MSM7x27"
	select ARCH_MSM_ARM11
	select CPU_V6

config ARCH_MSM7X30
	bool "MSM7x30"
	select ARCH_MSM_SCORPION
	select CPU_V7

config ARCH_QSD8X50
	bool "QSD8X50"
	select ARCH_MSM_SCORPION
	select CPU_V7
	select EMULATE_DOMAIN_MANAGER_V7
	select VERIFY_PERMISSION_FAULT

config ARCH_MSM7X25
	bool "MSM7x25"
	select ARCH_MSM_ARM11
	select CPU_V6

endchoice

config  ARCH_MSM_ARM11
	bool
config  ARCH_MSM_SCORPION
	bool


menu "MSM Board Selection"

config MACH_HALIBUT
	depends on ARCH_MSM7X01A
	depends on MSM_STACKED_MEMORY
	default y
	bool "Halibut Board (QCT SURF7201A)"
	help
	  Support for the Qualcomm SURF7201A eval board.

config MACH_MSM7201A_SURF
	depends on ARCH_MSM7X01A
	depends on MSM_STACKED_MEMORY
	default y
	bool "MSM7201A SURF"
	help
	  Support for the Qualcomm MSM7201A SURF eval board.

config MACH_MSM7201A_FFA
	depends on ARCH_MSM7X01A
	depends on MSM_STACKED_MEMORY
	default y
	bool "MSM7201A FFA"
	help
	  Support for the Qualcomm MSM7201A FFA eval board.

config MACH_TROUT
	depends on ARCH_MSM7X01A
	depends on MSM_STACKED_MEMORY
	default y
	bool "Trout (HTC Dream, T-Mobile G1, Google ADP1)"
	help
	 Select this to support HTC Dream, T-Mobile G1, Google ADP1.

config MACH_SAPPHIRE
	depends on ARCH_MSM7X01A
	depends on MSM_STACKED_MEMORY
	default y
	bool "Sapphire"

config MACH_MSM7X27_SURF
	depends on ARCH_MSM7X27
	depends on !MSM_STACKED_MEMORY
	default y
	bool "MSM7x27 SURF"
	help
	  Support for the Qualcomm MSM7x27 SURF eval board.

config MACH_MSM7X27_FFA
	depends on ARCH_MSM7X27
	depends on !MSM_STACKED_MEMORY
	default y
	bool "MSM7x27 FFA"
	help
	  Support for the Qualcomm MSM7x27 FFA eval board.

config MACH_MSM7X30_SURF
       depends on ARCH_MSM7X30
       depends on !MSM_STACKED_MEMORY
       default y
       bool "MSM7x30 SURF"
       help
         Support for the Qualcomm MSM7x30 SURF eval board.

config MACH_MSM7X30_FFA
       depends on ARCH_MSM7X30
       depends on !MSM_STACKED_MEMORY
       default y
       bool "MSM7x30 FFA"
       help
         Support for the Qualcomm MSM7x30 FFA eval board.

config MACH_SAPPHIRE
	depends on ARCH_MSM7X01A
	default n
	bool "Sapphire"

config MACH_QSD8X50_SURF
	depends on ARCH_QSD8X50
	depends on MSM_STACKED_MEMORY
	default y
	bool "QSD8x50 SURF"
	help
	  Support for the Qualcomm QSD8x50 SURF eval board.

config MACH_QSD8X50_FFA
	depends on ARCH_QSD8X50
	depends on MSM_STACKED_MEMORY
	default y
	bool "QSD8x50 FFA"
	help
	  Support for the Qualcomm QSD8x50 FFA eval board.

config MACH_QSD8X50_COMET
	depends on ARCH_QSD8X50
	depends on MSM_STACKED_MEMORY
	default n
	bool "QSD8x50 Comet"
	help
	  Support for the Qualcomm Comet eval board.

config MACH_DECKARD
	depends on ARCH_QSD8X50
	depends on MSM_STACKED_MEMORY
	default n
	bool "SHARP DECKARD"
	help
	  Support for the Sharp Deckard.

config MACH_MSM7X25_SURF
	depends on ARCH_MSM7X25
	depends on !MSM_STACKED_MEMORY
	default y
	bool "MSM7x25 SURF"
	help
	  Support for the Qualcomm MSM7x25 SURF eval board.

config MACH_MSM7X25_FFA
	depends on ARCH_MSM7X25
	depends on !MSM_STACKED_MEMORY
	default y
	bool "MSM7x25 FFA"
	help
	  Support for the Qualcomm MSM7x25 FFA eval board.

endmenu

config MSM_STACKED_MEMORY
	bool "Stacked Memory"
	default y
	help
	  This option is used to indicate the presence of on-die stacked
	  memory.  When present this memory bank is used for a high speed
	  shared memory interface.  When not present regular RAM is used.

config KERNEL_PMEM_SMI_REGION
	bool "Enable in-kernel PMEM region for SMI"
	default n
	depends on ARCH_QSD8X50 && !PMEM_GPU0
	help
	   Enable the in-kernel PMEM alloator to use SMI memory.

config PMEM_GPU0
	bool "Enable PMEM GPU0 region"
	default y
	depends on ARCH_QSD8X50 && ANDROID_PMEM
	help
	  Enable the PMEM GPU0 device

config MSM_DEBUG_UART
	int
	default 1 if MSM_DEBUG_UART1
	default 2 if MSM_DEBUG_UART2
	default 3 if MSM_DEBUG_UART3

choice
	prompt "Debug UART"

	default MSM_DEBUG_UART_NONE

	config MSM_DEBUG_UART_NONE
		bool "None"

	config MSM_DEBUG_UART1
		bool "UART1"

	config MSM_DEBUG_UART2
		bool "UART2"

	config MSM_DEBUG_UART3
		bool "UART3"
endchoice

config CACHE_FLUSH_RANGE_LIMIT
	hex "Cache flush range limit"
	default 0x40000
	help
	  When flushing a cache range larger then this (hex) limit, flush the
	  entire cache instead. Flushing a large range can be slower than
	  flushing, then refilling, the entire cache.

choice
	prompt "Default Timer"
	default MSM7X00A_USE_GP_TIMER

	config MSM7X00A_USE_GP_TIMER
		bool "GP Timer"
	help
	  Low resolution timer that allows power collapse from idle.

	config MSM7X00A_USE_DG_TIMER
		bool "DG Timer"
	help
	  High resolution timer.
endchoice	  

choice
	prompt "Suspend sleep mode"
	default MSM7X00A_SLEEP_MODE_POWER_COLLAPSE_SUSPEND
	help
	  Allows overriding the sleep mode used. Leave at power
	  collapse suspend unless the arm9 image has problems.

	config MSM7X00A_SLEEP_MODE_POWER_COLLAPSE_SUSPEND
		bool "Power collapse suspend"
	help
	  Lowest sleep state. Returns through reset vector.

	config MSM7X00A_SLEEP_MODE_POWER_COLLAPSE
		bool "Power collapse"
	help
	  Sleep state that returns through reset vector.

	config MSM7X00A_SLEEP_MODE_APPS_SLEEP
		bool "Apps Sleep"

	config MSM7X00A_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT
		bool "Ramp down cpu clock and wait for interrupt"

	config MSM7X00A_SLEEP_WAIT_FOR_INTERRUPT
		bool "Wait for interrupt"
endchoice	  

config MSM7X00A_SLEEP_MODE
	int
	default 0 if MSM7X00A_SLEEP_MODE_POWER_COLLAPSE_SUSPEND
	default 1 if MSM7X00A_SLEEP_MODE_POWER_COLLAPSE
	default 2 if MSM7X00A_SLEEP_MODE_APPS_SLEEP
	default 3 if MSM7X00A_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT
	default 4 if MSM7X00A_SLEEP_WAIT_FOR_INTERRUPT

choice
	prompt "Idle sleep mode"
	default MSM7X00A_IDLE_SLEEP_MODE_POWER_COLLAPSE
	help
	  Allows overriding the sleep mode used from idle. Leave at power
	  collapse suspend unless the arm9 image has problems.

	config MSM7X00A_IDLE_SLEEP_MODE_POWER_COLLAPSE_SUSPEND
		bool "Power collapse suspend"
	help
	  Lowest sleep state. Returns through reset vector.

	config MSM7X00A_IDLE_SLEEP_MODE_POWER_COLLAPSE
		bool "Power collapse"
	help
	  Sleep state that returns through reset vector.

	config MSM7X00A_IDLE_SLEEP_MODE_APPS_SLEEP
		bool "Apps Sleep"

	config MSM7X00A_IDLE_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT
		bool "Ramp down cpu clock and wait for interrupt"

	config MSM7X00A_IDLE_SLEEP_WAIT_FOR_INTERRUPT
		bool "Wait for interrupt"
endchoice	  

config MSM7X00A_IDLE_SLEEP_MODE
	int
	default 0 if MSM7X00A_IDLE_SLEEP_MODE_POWER_COLLAPSE_SUSPEND
	default 1 if MSM7X00A_IDLE_SLEEP_MODE_POWER_COLLAPSE
	default 2 if MSM7X00A_IDLE_SLEEP_MODE_APPS_SLEEP
	default 3 if MSM7X00A_IDLE_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT
	default 4 if MSM7X00A_IDLE_SLEEP_WAIT_FOR_INTERRUPT

config MSM7X00A_IDLE_SLEEP_MIN_TIME
	int "Minimum idle time before sleep"
	default 20000000
	help
	  Minimum idle time in nanoseconds before entering low power mode.

config MSM7X00A_IDLE_SPIN_TIME
	int "Idle spin time before cpu ramp down"
	default 80000
	help
	  Spin time in nanoseconds before ramping down cpu clock and entering
	  any low power state.

menuconfig MSM_IDLE_STATS
	bool "Collect idle statistics"
	default y
	help
	  Collect idle statistics and export them in proc/msm_pm_stats.

if MSM_IDLE_STATS

config MSM_IDLE_STATS_FIRST_BUCKET
	int "First bucket time"
	default 62500
	help
	  Upper time limit in nanoseconds of first bucket.

config MSM_IDLE_STATS_BUCKET_SHIFT
	int "Bucket shift"
	default 2

config MSM_IDLE_STATS_BUCKET_COUNT
	int "Bucket count"
	default 10

config MSM_SUSPEND_STATS_FIRST_BUCKET
	int "First bucket time for suspend"
	default 1000000000
	help
	  Upper time limit in nanoseconds of first bucket of the
	  histogram.  This is for collecting statistics on suspend.

endif # MSM_IDLE_STATS

config MSM_JTAG_V7
	depends on CPU_V7
	default y if DEBUG_KERNEL
        bool "JTAG debug support"
	help
          Add additional support for JTAG kernel debugging.

config HTC_HEADSET
	tristate "HTC 2 Wire detection driver"
	default n
	help
	 Provides support for detecting HTC 2 wire devices, such as wired
	 headset, on the trout platform. Can be used with the msm serial
	 debugger, but not with serial console.

config TROUT_BATTCHG
	depends on MACH_TROUT && POWER_SUPPLY
	default y
	bool "Trout battery / charger driver"

config HTC_PWRSINK
	depends on MSM_SMD
	default n
	bool "HTC Power Sink Driver"

config QSD_SVS
	bool "QSD Static Voltage Scaling"
	depends on (MACH_QSD8X50_SURF || MACH_QSD8X50_FFA || MACH_QSD8X50_COMET)
	default y
	select TPS65023
	help
	  Enables static voltage scaling using the TPS65023 PMIC.

config QSD_PMIC_DEFAULT_DCDC1
	int "PMIC default output voltage"
	depends on (MACH_QSD8X50_SURF || MACH_QSD8X50_FFA || MACH_QSD8X50_COMET)
	default 1250
	help
	  This is the PMIC voltage at Linux kernel boot.

config MSM_FIQ_SUPPORT
	default y
	bool "Enable installation of an FIQ handler."

config MSM_SERIAL_DEBUGGER
	select MSM_FIQ_SUPPORT
	select KERNEL_DEBUGGER_CORE
	default n
	bool "FIQ Mode Serial Debugger"
	help
	  The FIQ serial debugger can accept commands even when the
	  kernel is unresponsive due to being stuck with interrupts
	  disabled.  Depends on the kernel debugger core in drivers/misc.

config MSM_SERIAL_DEBUGGER_CONSOLE
	depends on MSM_SERIAL_DEBUGGER
	default n
	bool "Console on FIQ Serial Debugger port"
	help
	  Enables a console so that printk messages are displayed on
	  the debugger serial port as the occur.

config MSM_SMD
	default y
	bool "MSM Shared Memory Driver (SMD)"
	help
	  Support for the shared memory interface between the apps
	  processor and the baseband processor.  Provides access to
	  the "shared heap", as well as virtual serial channels
	  used to communicate with various services on the baseband
	  processor.

choice
	prompt "MSM Shared memory interface version"
	depends on MSM_SMD
	default MSM_SMD_PKG3 if ARCH_MSM_ARM11
	default MSM_SMD_PKG4 if ARCH_MSM_SCORPION

	config MSM_SMD_PKG3
	  bool "Package 3"

	config MSM_SMD_PKG4
	  bool "Package 4"
endchoice

config MSM_SMD_DEBUG
	depends on MSM_SMD
	default y
	bool "MSM SMD debug support"
	help
	  Support for debugging the SMD for communication
	  between the ARM9 and ARM11

config MSM_N_WAY_SMD
	depends on (MSM_SMD && (ARCH_MSM_SCORPION || ARCH_MSM7X27))
	default y
	bool "MSM N-WAY SMD support"
	help
	  Supports APPS-QDSP SMD communication along with
	  normal APPS-MODEM SMD communication.

config MSM_N_WAY_SMSM
	depends on (MSM_SMD && (ARCH_MSM_SCORPION || ARCH_MSM7X27))
	default y
	bool "MSM N-WAY SMSM support"
	help
	  Supports APPS-QDSP SMSM communication along with
	  normal APPS-MODEM SMSM communication.

config MSM_RESET_MODEM
	tristate "Reset Modem Driver"
	depends on MSM_SMD
	default m
	help
	  Allows the user to reset the modem through a device node.

config MSM_SMD_LOGGING
	depends on MSM_SMD
	default y
	bool "MSM Shared Memory Logger"
	help
	  This option exposes the shared memory logger at /dev/smem_log
	  and a debugfs node named smem_log.

	  If in doubt, say yes.

config MSM_SMD_NMEA
	bool "NMEA GPS Driver"
	depends on MSM_SMD
	default y
	help
	  Enable this to support the NMEA GPS device.

	  If in doubt, say yes.

config MSM_SMD_TTY
	bool "SMD TTY Driver"
	depends on MSM_SMD
	default y
	help
	  Provides TTY interfaces to interact with the modem.

	  If in doubt, say yes.

config MSM_SMD_QMI
	bool "SMD QMI Driver"
	depends on MSM_SMD
	default y
	help
	  Manages network data connections.

	  If in doubt, say yes.

config MSM_SMD_CTL
	bool "SMD Control Driver"
	depends on MSM_SMD
	default y
	help
	  Provides a binary SMD non-muxed control port interface.

	  If in doubt, say yes.

config MSM_ONCRPCROUTER
	depends on MSM_SMD
	default y
	bool "MSM ONCRPC router support"
	help
	  Support for the MSM ONCRPC router for communication between
	  the ARM9 and ARM11

config MSM_ONCRPCROUTER_DEBUG
	depends on MSM_ONCRPCROUTER
	default y
	bool "MSM debug ONCRPC router support"
	help
	  Support for debugging the ONCRPC router for communication
	  between the ARM9 and ARM11

config MSM_RPCSERVERS
	depends on MSM_ONCRPCROUTER
	select RTC_HCTOSYS
	default y
	bool "Kernel side RPC server bundle"
	help
	  none

config MSM_RPC_PING
	depends on MSM_ONCRPCROUTER && DEBUG_FS
	default m
	bool "MSM rpc ping"
	help
	  Implements MSM rpc ping test module.

config MSM_RPC_OEM_RAPI
	depends on MSM_ONCRPCROUTER
	default m
	bool "MSM oem rapi"
	help
	  Implements MSM oem rapi client module.

config MSM_RPCSERVER_HANDSET
	depends on MSM_ONCRPCROUTER
	default y
	bool "Handset events RPC server"
	help
	  Support for receiving handset events like headset detect,
	  headset switch and clamshell state.

config MSM_DALRPC
	bool "DAL RPC support"
	depends on ARCH_MSM_SCORPION
	default y
	help
	  Supports RPC calls to DAL devices on remote processor cores.

config MSM_DALRPC_TEST
	tristate "DAL RPC test module"
	depends on (MSM_DALRPC && DEBUG_FS)
	default m
	help
	  Exercises DAL RPC calls to QDSP6.

config MSM_CPU_FREQ_SCREEN
	depends on (HAS_EARLYSUSPEND && !CPU_FREQ_MSM)
	default n
	bool "Enable simple cpu frequency scaling"
	help
	 Simple cpufreq scaling based on screen ON/OFF.

if MSM_CPU_FREQ_SCREEN

config MSM_CPU_FREQ_SCREEN_OFF
	int "Screen off cpu frequency"
	default 245760

config MSM_CPU_FREQ_SCREEN_ON
	int "Screen on cpu frequency"
	default 384000

endif # MSM_CPU_FREQ_SCREEN

if CPU_FREQ_MSM

config MSM_CPU_FREQ_SET_MIN_MAX
	bool "Set Min/Max CPU frequencies."
	default n
	help
	  Allow setting min and max CPU frequencies. Sysfs can be used
	  to override these values.

config MSM_CPU_FREQ_MAX
	int "Max CPU Frequency"
	depends on MSM_CPU_FREQ_SET_MIN_MAX
	default 384000

config MSM_CPU_FREQ_MIN
	int "Min CPU Frequency"
	depends on MSM_CPU_FREQ_SET_MIN_MAX
	default 245760

endif # CPU_FREQ_MSM

config MSM_HW3D
	tristate "MSM Hardware 3D Register Driver"
	depends on ANDROID_PMEM
	default y
	help
	  Provides access to registers needed by the userspace OpenGL|ES
	  library.

config MSM_ADSP
	tristate "MSM ADSP driver"
	depends on ANDROID_PMEM
	default y
	help
	  Provides access to registers needed by the userspace aDSP library.

config MSM_ADSP_REPORT_EVENTS
	bool "Report modem events from the DSP"
	default y
	depends on MSM_ADSP
	help
	  Normally, only messages from the aDSP are reported to userspace.
	  With this option, we report events from the aDSP as well.

config MSM7KV2_AUDIO
	bool "MSM7K v2 audio"
	depends on (ARCH_MSM7X30 && MSM_ADSP)
	default y
	help
	  Enables QDSP5V2-based audio drivers for audio playbacks and
	  voice call.

config MSM_VREG_SWITCH_INVERTED
	bool "Reverse vreg switch polarity"
	default n
	help
	  Reverses the enable and disable for vreg switch.

config MSM_DMA_TEST
	tristate "MSM DMA test module"
	default m
	help
	  Intended to be compiled as a module.  Provides a device node
	  and ioctls for testing the MSM dma system.

config WIFI_CONTROL_FUNC
	bool "Enable WiFi control function abstraction"
	help
	  Enables Power/Reset/Carddetect function abstraction
	
config WIFI_MEM_PREALLOC
	depends on WIFI_CONTROL_FUNC
	bool "Preallocate memory for WiFi buffers"
	help
	  Preallocates memory buffers for WiFi driver

config QSD_AUDIO
	bool "QSD audio"
	depends on ARCH_MSM_SCORPION && MSM_DALRPC && ANDROID_PMEM
	default y
	help
	  Provides PCM, MP3, and AAC audio playback.

config AUDIO_AAC_PLUS
	depends on (MSM_ADSP || QSD_AUDIO)
	bool "AAC+ Audio"
	default y
	help
	  Provides AAC+ decoding

config AUDIO_ENHANCED_AAC_PLUS
	depends on AUDIO_AAC_PLUS
	bool "Enhanced AAC+ Audio"
	default y
	help
	  Provides Enhanced AAC+ decoding

config SURF_FFA_GPIO_KEYPAD
	bool "MSM SURF/FFA GPIO keypad"
	depends on INPUT_GPIO = "y"
	default y
	help
	  Select if the GPIO keypad is attached.

config CLOCK_BASED_SLEEP_LIMIT
	default y
	bool "Set sleep limitation based on clock usage"
	help
	  The application processor checks for enabled clocks and
	  decides accordingly the sleep limitation which it informs
	  the modem to use.

config MSM_ADM_OFF_AT_POWER_COLLAPSE
	bool "Turn off ADM clock during power collapse"
	default n
	help
	  The application processor turns off the ADM clock before
	  entering power collapse and turns it back on after exiting
	  power collapse.

config MSM_SLEEP_TIME_OVERRIDE
	bool "Allow overriding suspend/sleep time with PM module parameter"
	default y
	help
	  Enable the module parameter sleep_time_override. Specified
	  in units of seconds, it overwrites the normal sleep time of
	  suspend. The feature is required for automated power management
	  testing.

choice
	prompt "Power management timeout action"
	default MSM_PM_TIMEOUT_HALT
	help
	  Selects the Application Processor's action when Power Management
	  times out waiting for Modem's handshake.

	config MSM_PM_TIMEOUT_HALT
		bool "Halt the Application Processor"

	config MSM_PM_TIMEOUT_RESET_MODEM
		bool "Reset the Modem Processor"

	config MSM_PM_TIMEOUT_RESET_CHIP
		bool "Reset the entire chip"
endchoice

endif
