config XENO_DRIVERS_CAN_MSCAN
	depends on XENO_DRIVERS_CAN && (PPC_MPC52xx || PPC_MPC512x)
	tristate "MSCAN driver for MPC52xx and MPC512x"
	default n
	help

	This driver is for the MSCAN on the MPC5200 and MPC512x processor
	from Freescale.

config XENO_DRIVERS_CAN_MSCAN_OLD
	depends on XENO_DRIVERS_CAN_MSCAN && PPC_MPC52xx
	bool "Use old MSCAN driver for old kernel version"
	default n
	help

	For backward compatibility with older kernel versions, you may
	want to select the old MSCAN driver for the MPC5200.

if XENO_DRIVERS_CAN_MSCAN_OLD

config XENO_DRIVERS_CAN_MSCAN_1
	depends on XENO_DRIVERS_CAN_MSCAN
	bool "Enable CAN 1"
	default y

config XENO_DRIVERS_CAN_MSCAN_2
	depends on XENO_DRIVERS_CAN_MSCAN
	bool "Enable CAN 2"
	default y

config XENO_DRIVERS_CAN_MSCAN_CLOCK
	depends on XENO_DRIVERS_CAN_MSCAN
	int "Clock Frequency in Hz"
	default 66000000
	help

	The MSCAN driver selects the oscillator clock (SYS_XTAL_IN) as clock
	source for MSCAN, which is typically 33 MHz. Due to a hardware bug on
	the MPC5200 Rev. A chips, the IP bus clock (IP_CLK) is used instead,
	which is typically 66 or 132 MHz.

choice
	depends on XENO_DRIVERS_CAN_MSCAN
	prompt "Pin Configuration"
	default XENO_DRIVERS_CAN_MSCAN_PRE
	help

config XENO_DRIVERS_CAN_MSCAN_PRE
	bool "Use pre-configured CAN routing"

config XENO_DRIVERS_CAN_MSCAN_ALT
	bool "CAN 1 on I2C1 pins, CAN 2 on TMR01 pins"

config XENO_DRIVERS_CAN_MSCAN_PSC2
	bool "CAN 1 and 2 on PSC2 pins"

endchoice

endif

