arch/arm/samv7: enforce compilation error for incompatible configuration options

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2024-05-22 14:27:26 +02:00 committed by Xiang Xiao
parent 357f8093ac
commit d144a2a80b
24 changed files with 28 additions and 17 deletions

View File

@ -42,6 +42,11 @@
* Pre-processor Definitions
****************************************************************************/
#if defined(CONFIG_SAMV7_JTAG_FULL_ENABLE) && defined(CONFIG_SAMV7_USART1)
# error CONFIG_SAMV7_JTAG_FULL_ENABLE is incompatible with CONFIG_SAMV7_USART1.
# error The SYSIO Pin4 must be bound to PB4 to use USART1
#endif
#if !defined(CONFIG_SAMV7_ERASE_ENABLE) || \
!defined(CONFIG_SAMV7_JTAG_FULL_ENABLE)
# if defined(CONFIG_SAMV7_ERASE_DISABLE)
@ -51,7 +56,7 @@
# endif
# if defined(CONFIG_SAMV7_JTAG_DISABLE)
# define SYSIO_BITS (MATRIX_CCFG_SYSIO_SYSIO4 | MATRIX_CCFG_SYSIO_SYSIO5 | \
MATRIX_CCFG_SYSIO_SYSIO6 | MATRIX_CCFG_SYSIO_SYSIO7)
MATRIX_CCFG_SYSIO_SYSIO6 | MATRIX_CCFG_SYSIO_SYSIO7)
# endif
# if defined(CONFIG_SAMV7_JTAG_FULL_SW_ENABLE)
# define SYSIO_BITS MATRIX_CCFG_SYSIO_SYSIO4

View File

@ -241,9 +241,6 @@ void sam_lowsetup(void)
uint64_t divb3;
uint32_t intpart;
uint32_t fracpart;
#endif
#if (defined(HAVE_SERIAL_CONSOLE) && !defined(CONFIG_SUPPRESS_UART_CONFIG)) || \
defined(CONFIG_SAMV7_USART1)
uint32_t regval;
#endif
@ -322,19 +319,6 @@ void sam_lowsetup(void)
sam_configgpio(GPIO_USART1_RTS);
# endif
/* To use the USART1 as an USART, the SYSIO Pin4 must be bound to PB4
* instead of TDI
*/
# if defined(CONFIG_SAMV7_JTAG_FULL_ENABLE)
# warning CONFIG_SAMV7_JTAG_FULL_ENABLE is incompatible with CONFIG_SAMV7_USART1.
# warning The SYSIO Pin4 must be bound to PB4 to use USART1
# endif
regval = getreg32(SAM_MATRIX_CCFG_SYSIO);
regval |= MATRIX_CCFG_SYSIO_SYSIO4;
putreg32(regval, SAM_MATRIX_CCFG_SYSIO);
#endif
#ifdef CONFIG_USART2_SERIALDRIVER

View File

@ -69,6 +69,7 @@ CONFIG_SAMV7_GPIOA_IRQ=y
CONFIG_SAMV7_GPIOC_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_HSMCI0=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_SDRAMC=y
CONFIG_SAMV7_SDRAMSIZE=2097152
CONFIG_SAMV7_TC0=y

View File

@ -62,6 +62,7 @@ CONFIG_SAMV7_GPIOA_IRQ=y
CONFIG_SAMV7_GPIOC_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_HSMCI0=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_MCAN0=y
CONFIG_SAMV7_SDRAMC=y
CONFIG_SAMV7_SDRAMSIZE=2097152

View File

@ -63,6 +63,7 @@ CONFIG_SAMV7_GPIOA_IRQ=y
CONFIG_SAMV7_GPIOC_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_HSMCI0=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_SDRAMC=y
CONFIG_SAMV7_SDRAMSIZE=2097152
CONFIG_SAMV7_TWIHS0=y

View File

@ -61,6 +61,7 @@ CONFIG_SAMV7_GPIOA_IRQ=y
CONFIG_SAMV7_GPIOC_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_HSMCI0=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_SDRAMC=y
CONFIG_SAMV7_SDRAMSIZE=2097152
CONFIG_SAMV7_TWIHS0=y

View File

@ -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ONFIG_SAMV7_TWIHS0=y

View File

@ -67,6 +67,7 @@ CONFIG_SAMV7_GPIOB_IRQ=y
CONFIG_SAMV7_GPIOD_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_HSMCI0=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_SDRAMC=y
CONFIG_SAMV7_SDRAMSIZE=2097152
CONFIG_SAMV7_TWIHS0=y

View File

@ -48,6 +48,7 @@ CONFIG_SAMV7_GPIOA_IRQ=y
CONFIG_SAMV7_GPIOB_IRQ=y
CONFIG_SAMV7_GPIOD_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_SYSTEMRESET=y
CONFIG_SAMV7_USART1=y
CONFIG_SAMV7_XDMAC=y

View File

@ -48,6 +48,7 @@ CONFIG_SAMV7_GPIOA_IRQ=y
CONFIG_SAMV7_GPIOB_IRQ=y
CONFIG_SAMV7_GPIOD_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_SYSTEMRESET=y
CONFIG_SAMV7_USART1=y
CONFIG_SAMV7_XDMAC=y

View File

@ -48,6 +48,7 @@ CONFIG_SAMV7_GPIOA_IRQ=y
CONFIG_SAMV7_GPIOB_IRQ=y
CONFIG_SAMV7_GPIOD_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_SYSTEMRESET=y
CONFIG_SAMV7_USART1=y
CONFIG_SAMV7_XDMAC=y

View File

@ -102,6 +102,7 @@ CONFIG_SAMV7_GPIOB_IRQ=y
CONFIG_SAMV7_GPIOD_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_HSMCI0=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_SYSTEMRESET=y
CONFIG_SAMV7_TWIHS0=y
CONFIG_SAMV7_USART1=y

View File

@ -54,6 +54,7 @@ CONFIG_SAMV7_GPIOA_IRQ=y
CONFIG_SAMV7_GPIOB_IRQ=y
CONFIG_SAMV7_GPIOD_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_USART1=y
CONFIG_SAMV7_XDMAC=y
CONFIG_SCHED_HPWORK=y

View File

@ -116,6 +116,7 @@ CONFIG_SAMV7_GPIOB_IRQ=y
CONFIG_SAMV7_GPIOD_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_HSMCI0=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_SPI0=y
CONFIG_SAMV7_USART1=y
CONFIG_SAMV7_XDMAC=y

View File

@ -75,6 +75,7 @@ CONFIG_SAMV7_GPIOB_IRQ=y
CONFIG_SAMV7_GPIOD_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_HSMCI0=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_SMC=y
CONFIG_SAMV7_TWIHS0=y
CONFIG_SAMV7_USART1=y

View File

@ -92,6 +92,7 @@ CONFIG_SAMV7_GPIOB_IRQ=y
CONFIG_SAMV7_GPIOD_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_HSMCI0=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_TWIHS0=y
CONFIG_SAMV7_USART1=y
CONFIG_SAMV7_XDMAC=y

View File

@ -64,6 +64,7 @@ CONFIG_SAMV7_GPIOB_IRQ=y
CONFIG_SAMV7_GPIOD_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_HSMCI0=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_SDRAMC=y
CONFIG_SAMV7_SDRAMSIZE=2097152
CONFIG_SAMV7_TWIHS0=y

View File

@ -110,6 +110,7 @@ CONFIG_SAMV7_GPIOB_IRQ=y
CONFIG_SAMV7_GPIOD_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_HSMCI0=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_SMC=y
CONFIG_SAMV7_TWIHS0=y
CONFIG_SAMV7_USART1=y

View File

@ -102,6 +102,7 @@ CONFIG_SAMV7_GPIOB_IRQ=y
CONFIG_SAMV7_GPIOD_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_HSMCI0=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_TWIHS0=y
CONFIG_SAMV7_USART1=y
CONFIG_SAMV7_XDMAC=y

View File

@ -132,6 +132,7 @@ CONFIG_SAMV7_GPIOB_IRQ=y
CONFIG_SAMV7_GPIOD_IRQ=y
CONFIG_SAMV7_GPIO_IRQ=y
CONFIG_SAMV7_HSMCI0=y
CONFIG_SAMV7_JTAG_FULL_SW_ENABLE=y
CONFIG_SAMV7_TWIHS0=y
CONFIG_SAMV7_USART1=y
CONFIG_SAMV7_XDMAC=y