From 8281dc1ed8cc99aeb34808fd34e97ca8c7b11093 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 28 Jun 2018 13:10:02 -0600 Subject: [PATCH] arch/arm/src/lpc11 and lpc17 and several README.tst files in configs/: Fix scopy of nameing. CONFIG_CANx_DIVISOR->CONFIG_LPC17_CANx_DIVISOR, for example. --- arch/arm/src/lpc17xx/Kconfig | 4 ++-- arch/arm/src/lpc17xx/lpc17_can.c | 34 +++++++++++++-------------- arch/arm/src/lpc43xx/lpc43_can.c | 2 +- configs/bambino-200e/README.txt | 6 ----- configs/lincoln60/README.txt | 12 +++++----- configs/lpc4330-xplorer/README.txt | 6 ----- configs/lpc4337-ws/README.txt | 6 ----- configs/lpc4357-evb/README.txt | 6 ----- configs/lpc4370-link2/README.txt | 6 ----- configs/lpcxpresso-lpc1115/README.txt | 9 +++---- configs/lpcxpresso-lpc1768/README.txt | 12 +++++----- configs/mbed/README.txt | 12 +++++----- configs/mcb1700/README.txt | 12 +++++----- configs/olimex-lpc1766stk/README.txt | 12 +++++----- configs/zkit-arm-1769/README.txt | 12 +++++----- 15 files changed, 61 insertions(+), 90 deletions(-) diff --git a/arch/arm/src/lpc17xx/Kconfig b/arch/arm/src/lpc17xx/Kconfig index c963f82bc0a..a24f900ad4a 100644 --- a/arch/arm/src/lpc17xx/Kconfig +++ b/arch/arm/src/lpc17xx/Kconfig @@ -556,7 +556,7 @@ config CAN2_BAUD ---help--- CAN2 BAUD rate. Required if LPC17_CAN2 is defined. -config CAN1_DIVISOR +config LPC17_CAN1_DIVISOR int "CAN1 CCLK divisor" depends on LPC17_CAN1 default 4 @@ -564,7 +564,7 @@ config CAN1_DIVISOR CAN1 is clocked at CCLK divided by this number. (the CCLK frequency is divided by this number to get the CAN clock). Options = {1,2,4,6}. Default: 4. -config CAN2_DIVISOR +config LPC17_CAN2_DIVISOR int "CAN2 CCLK divisor" depends on LPC17_CAN2 default 4 diff --git a/arch/arm/src/lpc17xx/lpc17_can.c b/arch/arm/src/lpc17xx/lpc17_can.c index d7e8fcc461b..ffdba8d1aed 100644 --- a/arch/arm/src/lpc17xx/lpc17_can.c +++ b/arch/arm/src/lpc17xx/lpc17_can.c @@ -84,22 +84,22 @@ /* If no divsor is provided, use a divisor of 4 */ -# ifndef CONFIG_CAN1_DIVISOR -# define CONFIG_CAN1_DIVISOR 4 +# ifndef CONFIG_LPC17_CAN1_DIVISOR +# define CONFIG_LPC17_CAN1_DIVISOR 4 # endif /* Get the SYSCON_PCLKSEL value for CAN1 the implements this divisor */ -# if CONFIG_CAN1_DIVISOR == 1 +# if CONFIG_LPC17_CAN1_DIVISOR == 1 # define CAN1_CCLK_DIVISOR SYSCON_PCLKSEL_CCLK -# elif CONFIG_CAN1_DIVISOR == 2 +# elif CONFIG_LPC17_CAN1_DIVISOR == 2 # define CAN1_CCLK_DIVISOR SYSCON_PCLKSEL_CCLK2 -# elif CONFIG_CAN1_DIVISOR == 4 +# elif CONFIG_LPC17_CAN1_DIVISOR == 4 # define CAN1_CCLK_DIVISOR SYSCON_PCLKSEL_CCLK4 -# elif CONFIG_CAN1_DIVISOR == 6 +# elif CONFIG_LPC17_CAN1_DIVISOR == 6 # define CAN1_CCLK_DIVISOR SYSCON_PCLKSEL_CCLK6 # else -# error "Unsupported value of CONFIG_CAN1_DIVISOR" +# error "Unsupported value of CONFIG_LPC17_CAN1_DIVISOR" # endif #endif @@ -113,22 +113,22 @@ /* If no divsor is provided, use a divisor of 4 */ -# ifndef CONFIG_CAN2_DIVISOR -# define CONFIG_CAN2_DIVISOR 4 +# ifndef CONFIG_LPC17_CAN2_DIVISOR +# define CONFIG_LPC17_CAN2_DIVISOR 4 # endif /* Get the SYSCON_PCLKSEL value for CAN2 the implements this divisor */ -# if CONFIG_CAN2_DIVISOR == 1 +# if CONFIG_LPC17_CAN2_DIVISOR == 1 # define CAN2_CCLK_DIVISOR SYSCON_PCLKSEL_CCLK -# elif CONFIG_CAN2_DIVISOR == 2 +# elif CONFIG_LPC17_CAN2_DIVISOR == 2 # define CAN2_CCLK_DIVISOR SYSCON_PCLKSEL_CCLK2 -# elif CONFIG_CAN2_DIVISOR == 4 +# elif CONFIG_LPC17_CAN2_DIVISOR == 4 # define CAN2_CCLK_DIVISOR SYSCON_PCLKSEL_CCLK4 -# elif CONFIG_CAN2_DIVISOR == 6 +# elif CONFIG_LPC17_CAN2_DIVISOR == 6 # define CAN2_CCLK_DIVISOR SYSCON_PCLKSEL_CCLK6 # else -# error "Unsupported value of CONFIG_CAN2_DIVISOR" +# error "Unsupported value of CONFIG_LPC17_CAN2_DIVISOR" # endif #endif @@ -245,7 +245,7 @@ static const struct can_ops_s g_canops = static struct up_dev_s g_can1priv = { .port = 1, - .divisor = CONFIG_CAN1_DIVISOR, + .divisor = CONFIG_LPC17_CAN1_DIVISOR, .baud = CONFIG_CAN1_BAUD, .base = LPC17_CAN1_BASE, }; @@ -261,7 +261,7 @@ static struct can_dev_s g_can1dev = static struct up_dev_s g_can2priv = { .port = 2, - .divisor = CONFIG_CAN2_DIVISOR, + .divisor = CONFIG_LPC17_CAN2_DIVISOR, .baud = CONFIG_CAN2_BAUD, .base = LPC17_CAN2_BASE, }; @@ -1107,7 +1107,7 @@ static int can12_interrupt(int irq, void *context, FAR void *arg) * Tq = brp * Tcan * * Where: - * Tcan is the period of the APB clock (PCLK = CCLK / CONFIG_CAN1_DIVISOR). + * Tcan is the period of the APB clock (PCLK = CCLK / CONFIG_LPC17_CAN1_DIVISOR). * * Input Parameters: * priv - A reference to the CAN block status diff --git a/arch/arm/src/lpc43xx/lpc43_can.c b/arch/arm/src/lpc43xx/lpc43_can.c index 7013ffd6dd6..19cc3164a5a 100644 --- a/arch/arm/src/lpc43xx/lpc43_can.c +++ b/arch/arm/src/lpc43xx/lpc43_can.c @@ -1150,7 +1150,7 @@ static void can_setuprxobj(struct up_dev_s *priv) * Tq = brp * Tcan * * Where: - * Tcan is the period of the APB clock (PCLK = CCLK / CONFIG_CAN1_DIVISOR). + * Tcan is the period of the APB clock. * * Input Parameters: * priv - A reference to the CAN block status diff --git a/configs/bambino-200e/README.txt b/configs/bambino-200e/README.txt index b7e910fe8ef..6c61ef030e1 100644 --- a/configs/bambino-200e/README.txt +++ b/configs/bambino-200e/README.txt @@ -300,12 +300,6 @@ Bambino-200e Configuration Options Standard 11-bit IDs. CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC43_CAN1 is defined. CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC43_CAN2 is defined. - CONFIG_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. - CONFIG_CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 CONFIG_CAN_TSEG2 = the number of CAN time quanta in segment 2. Default: 7 diff --git a/configs/lincoln60/README.txt b/configs/lincoln60/README.txt index 23f147c7c3b..34d12d0cd0f 100644 --- a/configs/lincoln60/README.txt +++ b/configs/lincoln60/README.txt @@ -171,12 +171,12 @@ Lincoln 60 Configuration Options Standard 11-bit IDs. CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC17_CAN1 is defined. CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC17_CAN2 is defined. - CONFIG_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. - CONFIG_CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. + CONFIG_LPC17_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this + number. (the CCLK frequency is divided by this number to get the CAN + clock). Options = {1,2,4,6}. Default: 4. + CONFIG_LPC17_CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this + number. (the CCLK frequency is divided by this number to get the CAN + clock). Options = {1,2,4,6}. Default: 4. CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 CONFIG_CAN_TSEG2 = the number of CAN time quanta in segment 2. Default: 7 diff --git a/configs/lpc4330-xplorer/README.txt b/configs/lpc4330-xplorer/README.txt index 5df4aef27ed..489cf5dc2e0 100644 --- a/configs/lpc4330-xplorer/README.txt +++ b/configs/lpc4330-xplorer/README.txt @@ -552,12 +552,6 @@ LPC4330-Xplorer Configuration Options Standard 11-bit IDs. CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC43_CAN1 is defined. CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC43_CAN2 is defined. - CONFIG_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. - CONFIG_CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 CONFIG_CAN_TSEG2 = the number of CAN time quanta in segment 2. Default: 7 diff --git a/configs/lpc4337-ws/README.txt b/configs/lpc4337-ws/README.txt index 1c23730012e..5009d9f5d01 100644 --- a/configs/lpc4337-ws/README.txt +++ b/configs/lpc4337-ws/README.txt @@ -591,12 +591,6 @@ LPC4337-ws Configuration Options Standard 11-bit IDs. CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC43_CAN1 is defined. CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC43_CAN2 is defined. - CONFIG_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. - CONFIG_CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 CONFIG_CAN_TSEG2 = the number of CAN time quanta in segment 2. Default: 7 diff --git a/configs/lpc4357-evb/README.txt b/configs/lpc4357-evb/README.txt index a3d0d52f06c..fe5814bfc29 100644 --- a/configs/lpc4357-evb/README.txt +++ b/configs/lpc4357-evb/README.txt @@ -588,12 +588,6 @@ LPC4357-EVB Configuration Options Standard 11-bit IDs. CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC43_CAN1 is defined. CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC43_CAN2 is defined. - CONFIG_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. - CONFIG_CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 CONFIG_CAN_TSEG2 = the number of CAN time quanta in segment 2. Default: 7 diff --git a/configs/lpc4370-link2/README.txt b/configs/lpc4370-link2/README.txt index 2e5f72744e5..6b3204126d3 100644 --- a/configs/lpc4370-link2/README.txt +++ b/configs/lpc4370-link2/README.txt @@ -591,12 +591,6 @@ LPC4370-Link2 Configuration Options Standard 11-bit IDs. CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC43_CAN1 is defined. CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC43_CAN2 is defined. - CONFIG_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. - CONFIG_CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 CONFIG_CAN_TSEG2 = the number of CAN time quanta in segment 2. Default: 7 diff --git a/configs/lpcxpresso-lpc1115/README.txt b/configs/lpcxpresso-lpc1115/README.txt index e168415e2af..55658f29a81 100644 --- a/configs/lpcxpresso-lpc1115/README.txt +++ b/configs/lpcxpresso-lpc1115/README.txt @@ -496,10 +496,11 @@ LPCXpresso Configuration Options CONFIG_CAN_EXTID - Enables support for the 29-bit extended ID. Default Standard 11-bit IDs. - CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC11_CAN1 is defined. - CONFIG_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. + CONFIG_LPC11_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC11_CAN1 + is defined. + CONFIG_LPC11_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this + number. (the CCLK frequency is divided by this number to get the CAN + clock). Options = {1,2,4,6}. Default: 4. CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 Configurations diff --git a/configs/lpcxpresso-lpc1768/README.txt b/configs/lpcxpresso-lpc1768/README.txt index 9f8f4271a10..089c98a41e5 100644 --- a/configs/lpcxpresso-lpc1768/README.txt +++ b/configs/lpcxpresso-lpc1768/README.txt @@ -489,12 +489,12 @@ LPCXpresso Configuration Options Standard 11-bit IDs. CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC17_CAN1 is defined. CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC17_CAN2 is defined. - CONFIG_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. - CONFIG_CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. + CONFIG_LPC17_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this + number. (the CCLK frequency is divided by this number to get the CAN + clock). Options = {1,2,4,6}. Default: 4. + CONFIG_LPC17_CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this + number. (the CCLK frequency is divided by this number to get the CAN + clock). Options = {1,2,4,6}. Default: 4. CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 CONFIG_CAN_TSEG2 = the number of CAN time quanta in segment 2. Default: 7 diff --git a/configs/mbed/README.txt b/configs/mbed/README.txt index 736941b24c9..d8afdaa3a9c 100644 --- a/configs/mbed/README.txt +++ b/configs/mbed/README.txt @@ -134,12 +134,12 @@ mbed Configuration Options Standard 11-bit IDs. CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC17_CAN1 is defined. CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC17_CAN2 is defined. - CONFIG_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. - CONFIG_CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. + CONFIG_LPC17_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this + number. (the CCLK frequency is divided by this number to get the CAN + clock). Options = {1,2,4,6}. Default: 4. + CONFIG_LPC17CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this + number. (the CCLK frequency is divided by this number to get the CAN + clock). Options = {1,2,4,6}. Default: 4. CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 CONFIG_CAN_TSEG2 = the number of CAN time quanta in segment 2. Default: 7 diff --git a/configs/mcb1700/README.txt b/configs/mcb1700/README.txt index b0e34a9ed8c..93b6f3f8aa2 100644 --- a/configs/mcb1700/README.txt +++ b/configs/mcb1700/README.txt @@ -135,12 +135,12 @@ mcb1700 Configuration Options Standard 11-bit IDs. CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC17_CAN1 is defined. CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC17_CAN2 is defined. - CONFIG_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. - CONFIG_CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. + CONFIG_LPC17_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this + number. (the CCLK frequency is divided by this number to get the CAN + clock). Options = {1,2,4,6}. Default: 4. + CONFIG_LPC17CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this + number. (the CCLK frequency is divided by this number to get the CAN + clock). Options = {1,2,4,6}. Default: 4. CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 CONFIG_CAN_TSEG2 = the number of CAN time quanta in segment 2. Default: 7 diff --git a/configs/olimex-lpc1766stk/README.txt b/configs/olimex-lpc1766stk/README.txt index 70585d6fce7..fb613076e32 100644 --- a/configs/olimex-lpc1766stk/README.txt +++ b/configs/olimex-lpc1766stk/README.txt @@ -572,12 +572,12 @@ Olimex LPC1766-STK Configuration Options Standard 11-bit IDs. CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC17_CAN1 is defined. CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC17_CAN2 is defined. - CONFIG_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. - CONFIG_CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. + CONFIG_LPC17_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this + number. (the CCLK frequency is divided by this number to get the CAN + clock). Options = {1,2,4,6}. Default: 4. + CONFIG_LPC17CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this + number. (the CCLK frequency is divided by this number to get the CAN + clock). Options = {1,2,4,6}. Default: 4. CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 CONFIG_CAN_TSEG2 - the number of CAN time quanta in segment 2. Default: 7 diff --git a/configs/zkit-arm-1769/README.txt b/configs/zkit-arm-1769/README.txt index e9a8794d5e2..9523c212790 100644 --- a/configs/zkit-arm-1769/README.txt +++ b/configs/zkit-arm-1769/README.txt @@ -300,12 +300,12 @@ ZKit-ARM Configuration Options Standard 11-bit IDs. CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC17_CAN1 is defined. CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC17_CAN2 is defined. - CONFIG_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. - CONFIG_CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this number. - (the CCLK frequency is divided by this number to get the CAN clock). - Options = {1,2,4,6}. Default: 4. + CONFIG_LPC17_CAN1_DIVISOR - CAN1 is clocked at CCLK divided by this + number. (the CCLK frequency is divided by this number to get the CAN + clock). Options = {1,2,4,6}. Default: 4. + CONFIG_LPC17CAN2_DIVISOR - CAN2 is clocked at CCLK divided by this + number. (the CCLK frequency is divided by this number to get the CAN + clock). Options = {1,2,4,6}. Default: 4. CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 CONFIG_CAN_TSEG2 = the number of CAN time quanta in segment 2. Default: 7