start main_menu

#############
#  SYMBOLS  #
#############
symbols

DUMMY			'DUMMY'
ARCH_ARM		'ARM'
ARCH_TEST		'TEST'

arm_cpu_type		'ARM Processor Type'
ARM_CPU_ARM920T		'ARM920T Not supported yet'
ARM_CPU_ARM925		'ARM925 Not supported yet'
ARM_CPU_ARM926		'ARM926EJ-S'

arm_subarch_type	'ARM Architecture Family'
ARM_SUBARCH_V5		'ARM V5 Architecture'
ARM_SUBARCH_V6		'ARM V6 Architecture, Unsupported yet'

arm_platform_type	'ARM Platform Type'
ARM_PLATFORM_EB		'Realview EB Platform, Unsupported yet'
ARM_PLATFORM_AB926	'Versatile AB926 Platform, Unsupported yet'
ARM_PLATFORM_PB926	'Versatile PB926 Platform'

DRIVER_UART_PL011	'ARM UART Primecell driver PL011'
DRIVER_TIMER_SP804	'ARM Dual Timer Primecell driver SP804'
DRIVER_IRQCTRL_PL190	'ARM Vectored Interrupt Controller PL190'

main_menu		'Codezero Microkernel Configurator'
arm_menu		'ARM Architecture Configuration'
drivers_menu		'Platform Drivers'
arch_type		'Main architecture'
#############
#  CHOICES  #
#############
choices arch_type
	ARCH_TEST
	ARCH_ARM
	default ARCH_ARM

choices arm_subarch_type
	ARM_SUBARCH_V5
	ARM_SUBARCH_V6
	default ARM_SUBARCH_V5

choices arm_cpu_type
        ARM_CPU_ARM920T
	ARM_CPU_ARM926
	ARM_CPU_ARM925
        default ARM_CPU_ARM926

choices arm_platform_type
        ARM_PLATFORM_EB
	ARM_PLATFORM_AB926
	ARM_PLATFORM_PB926
        default ARM_PLATFORM_PB926

#############
#   MENUS   #
#############
menu drivers_menu
	DRIVER_UART_PL011
	DRIVER_TIMER_SP804
	DRIVER_IRQCTRL_PL190
menu arm_menu
	arm_cpu_type
	arm_subarch_type
	arm_platform_type
	drivers_menu

menu main_menu
	arch_type
	arm_menu
	DUMMY
#############
#   RULES   #
#############

# NOTE: Unlike menus, choices dont take { sym } model of visibility
# dependencies. Instead, a choice symbol is declared in a menu, and
# suppress statement is used to make sym visible, instead of a
# { sym } model under the choices.
unless ARCH_ARM suppress arm_menu
unless ARM_PLATFORM_PB926 suppress DRIVER_UART_PL011
unless ARM_PLATFORM_PB926 suppress DRIVER_TIMER_SP804
unless ARM_PLATFORM_PB926 suppress DRIVER_IRQCTRL_PL190
default DRIVER_UART_PL011 from y
default DRIVER_TIMER_SP804 from y
default DRIVER_IRQCTRL_PL190 from y
# USELESS!! This doesnt force it to define invisible symbols as says in the manual.
#when ARCH_TEST save SUBARCH_TEST PLATFORM_TEST
#derive SUBARCH_TEST from ARCH_TEST
#derive PLATFORM_TEST from ARCH_TEST
