watchdog: Refactor main Kconfig file
This patch refactors the main Kconfig file in order to align it with the Zephyr code style and to make sure that each Kconfig configuration portion is easily identifiable. Change-Id: Ib226aaa9a98e9b08a47d9d1c329f18f4f6936620 Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
This commit is contained in:
parent
64c69d585f
commit
b41c0159a8
3 changed files with 62 additions and 42 deletions
|
@ -24,37 +24,11 @@ menuconfig WATCHDOG
|
||||||
prompt "Watchdog Support"
|
prompt "Watchdog Support"
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Include support for watchdogs.
|
Include support for watchdogs.
|
||||||
|
|
||||||
if WATCHDOG
|
if WATCHDOG
|
||||||
config WDT_QMSI
|
|
||||||
bool "QMSI Watchdog driver"
|
|
||||||
default n
|
|
||||||
help
|
|
||||||
This option enables the QMSI watchdog driver.
|
|
||||||
|
|
||||||
This driver is simply a shim driver based on the watchdog
|
source "drivers/watchdog/Kconfig.qmsi"
|
||||||
driver provided by the QMSI BSP.
|
|
||||||
|
|
||||||
config WDT_0_NAME
|
|
||||||
string "Watchdog driver instance name"
|
|
||||||
default "WATCHDOG_0"
|
|
||||||
help
|
|
||||||
Watchdog driver instance name
|
|
||||||
|
|
||||||
config WDT_0_IRQ_PRI
|
|
||||||
int "Interrupt priority"
|
|
||||||
depends on WDT_QMSI
|
|
||||||
help
|
|
||||||
Watchdog interrupt priority
|
|
||||||
|
|
||||||
config WDT_QMSI_API_REENTRANCY
|
|
||||||
bool
|
|
||||||
prompt "WDT shim driver API reentrancy"
|
|
||||||
depends on WDT_QMSI
|
|
||||||
default n
|
|
||||||
help
|
|
||||||
Enable support for WDT shim driver API reentrancy.
|
|
||||||
|
|
||||||
source "drivers/watchdog/Kconfig.stm32"
|
source "drivers/watchdog/Kconfig.stm32"
|
||||||
|
|
||||||
|
|
46
drivers/watchdog/Kconfig.qmsi
Normal file
46
drivers/watchdog/Kconfig.qmsi
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
# Kconfig - Watchdog configuration options for QMSI WDT
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Copyright (c) 2015 Intel Corporation
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
config WDT_QMSI
|
||||||
|
bool "QMSI Watchdog driver"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
This option enables the QMSI watchdog driver.
|
||||||
|
This driver is simply a shim driver based on the watchdog
|
||||||
|
driver provided by the QMSI BSP.
|
||||||
|
|
||||||
|
config WDT_0_NAME
|
||||||
|
string "Watchdog driver instance name"
|
||||||
|
default "WATCHDOG_0"
|
||||||
|
depends on WDT_QMSI
|
||||||
|
help
|
||||||
|
Watchdog driver instance name
|
||||||
|
|
||||||
|
config WDT_0_IRQ_PRI
|
||||||
|
int "Interrupt priority"
|
||||||
|
depends on WDT_QMSI
|
||||||
|
help
|
||||||
|
Watchdog interrupt priority
|
||||||
|
|
||||||
|
config WDT_QMSI_API_REENTRANCY
|
||||||
|
bool
|
||||||
|
prompt "WDT shim driver API reentrancy"
|
||||||
|
depends on WDT_QMSI
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable support for WDT shim driver API reentrancy.
|
|
@ -20,7 +20,7 @@ if SOC_FAMILY_STM32
|
||||||
config IWDG_STM32
|
config IWDG_STM32
|
||||||
bool "Independent Watchdog (IWDG) Driver for STM32 family of MCUs"
|
bool "Independent Watchdog (IWDG) Driver for STM32 family of MCUs"
|
||||||
help
|
help
|
||||||
Enable IWDG driver for STM32 line of MCUs
|
Enable IWDG driver for STM32 line of MCUs
|
||||||
|
|
||||||
config IWDG_STM32_PRESCALER
|
config IWDG_STM32_PRESCALER
|
||||||
int "Prescaler divider for clock feeding the IWDG"
|
int "Prescaler divider for clock feeding the IWDG"
|
||||||
|
@ -28,11 +28,11 @@ config IWDG_STM32_PRESCALER
|
||||||
default 4
|
default 4
|
||||||
range 4 256
|
range 4 256
|
||||||
help
|
help
|
||||||
Set the prescaler divider for the clock feeding the Independent
|
Set the prescaler divider for the clock feeding the Independent
|
||||||
Watchdog. Higher values indicate that the watchdog will need to
|
Watchdog. Higher values indicate that the watchdog will need to
|
||||||
be reloaded more frequently. Allowed values: 4, 8, 16, 32, 64,
|
be reloaded more frequently. Allowed values: 4, 8, 16, 32, 64,
|
||||||
128, 256. This setting combined with reload counter defines the
|
128, 256. This setting combined with reload counter defines the
|
||||||
watchdog countdown time.
|
watchdog countdown time.
|
||||||
|
|
||||||
config IWDG_STM32_RELOAD_COUNTER
|
config IWDG_STM32_RELOAD_COUNTER
|
||||||
int "Value for IWDG counter"
|
int "Value for IWDG counter"
|
||||||
|
@ -40,25 +40,25 @@ config IWDG_STM32_RELOAD_COUNTER
|
||||||
default 2048
|
default 2048
|
||||||
range 0 4095
|
range 0 4095
|
||||||
help
|
help
|
||||||
Configure the value to be loaded into the watchdog's counter each
|
Configure the value to be loaded into the watchdog's counter each
|
||||||
time a reload operation is performed. This value combined with
|
time a reload operation is performed. This value combined with
|
||||||
prescaler setting defines the watchdog countdown time.
|
prescaler setting defines the watchdog countdown time.
|
||||||
|
|
||||||
config IWDG_STM32_START_AT_BOOT
|
config IWDG_STM32_START_AT_BOOT
|
||||||
bool "Start IWDG during boot"
|
bool "Start IWDG during boot"
|
||||||
depends on IWDG_STM32
|
depends on IWDG_STM32
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Enable this setting to allow IWDG to be automatically started
|
Enable this setting to allow IWDG to be automatically started
|
||||||
during device initialization. Note that once IWDG is started
|
during device initialization. Note that once IWDG is started
|
||||||
it must be reloaded before the counter reaches 0, otherwise
|
it must be reloaded before the counter reaches 0, otherwise
|
||||||
the MCU will be reset.
|
the MCU will be reset.
|
||||||
|
|
||||||
config IWDG_STM32_DEVICE_NAME
|
config IWDG_STM32_DEVICE_NAME
|
||||||
string "Device name for Independent Watchdog (IWDG)"
|
string "Device name for Independent Watchdog (IWDG)"
|
||||||
depends on IWDG_STM32
|
depends on IWDG_STM32
|
||||||
default "IWDG"
|
default "IWDG"
|
||||||
help
|
help
|
||||||
Set the name used by IWDG device during registration.
|
Set the name used by IWDG device during registration.
|
||||||
|
|
||||||
endif # SOC_FAMILY_STM32
|
endif # SOC_FAMILY_STM32
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue