From 55e21bf0457c335bdd230e350db4a52d81f6f2e2 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 27 Feb 2015 16:20:28 -0600 Subject: [PATCH] PIC32MZ: Correct a few more DEVCFG issues --- arch/mips/src/pic32mz/Kconfig | 13 +++++++------ arch/mips/src/pic32mz/pic32mz-config.h | 6 +++--- audio/Kconfig | 2 +- configs/pic32mz-starterkit/nsh/defconfig | 8 ++++---- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/arch/mips/src/pic32mz/Kconfig b/arch/mips/src/pic32mz/Kconfig index 437960f386..22eeb34dc5 100644 --- a/arch/mips/src/pic32mz/Kconfig +++ b/arch/mips/src/pic32mz/Kconfig @@ -340,8 +340,8 @@ menu "Device Configuration 0 (DEVCFG0)" config PIC32MZ_DEBUGGER_ENABLE bool "Background debugger enable" - default y if CONFIG_DEBUG - default n if !CONFIG_DEBUG + default y if DEBUG + default n if !DEBUG ---help--- Background Debugger Enable @@ -359,8 +359,8 @@ config PIC32MZ_ICESEL_CH2 config PIC32MZ_TRACE_ENABLE bool "Trace enable" - default y if CONFIG_DEBUG - default n if !CONFIG_DEBUG + default y if DEBUG + default n if !DEBUG ---help--- Trace Enable @@ -368,7 +368,7 @@ endmenu menu "Device Configuration 1 (DEVCFG1)" -config CONFIG_PIC32MZ_OSCIOFNC +config PIC32MZ_OSCIOFNC int "CLKO Enable" default 1 range 0 1 @@ -434,7 +434,8 @@ config PIC32MZ_FETHIO config PIC32MZ_FUSBIDIO int "USB USBID selection" - default 1 + default 0 if !PIC32MZ_ETHERNET + default 1 if PIC32MZ_ETHERNET range 0 1 ---help--- USB USBID selection diff --git a/arch/mips/src/pic32mz/pic32mz-config.h b/arch/mips/src/pic32mz/pic32mz-config.h index ab6c9ce746..c348ddc891 100644 --- a/arch/mips/src/pic32mz/pic32mz-config.h +++ b/arch/mips/src/pic32mz/pic32mz-config.h @@ -176,9 +176,9 @@ #ifndef CONFIG_PIC32MZ_FUSBIDIO /* USB USBID selection: 0=GPIO 1=USB */ # ifdef CONFIG_PIC32MZ_USB -# define CONFIG_PIC32MZ_FUSBIDIO 0 /* USBID pin is controlled by the IOPORT configuration */ -# else # define CONFIG_PIC32MZ_FUSBIDIO 1 /* USBID pin is controlled by the USB module */ +# else +# define CONFIG_PIC32MZ_FUSBIDIO 0 /* USBID pin is controlled by the IOPORT configuration */ # endif #endif @@ -230,7 +230,7 @@ #undef CONFIG_PIC32MZ_PLLMULT #if BOARD_PLL_MULT >= 1 && BOARD_PLL_MULT <= 128 -# define CONFIG_PIC32MZ_PLLMULT ((BOARD_PLL_MULT-1) << DEVCFG2_FPLLIDIV_SHIFT) +# define CONFIG_PIC32MZ_PLLMULT ((BOARD_PLL_MULT-1) << DEVCFG2_FPLLMULT_SHIFT) #else # error "Unsupported BOARD_PLL_MULT" #endif diff --git a/audio/Kconfig b/audio/Kconfig index e68e828825..cbf51b87ea 100644 --- a/audio/Kconfig +++ b/audio/Kconfig @@ -215,7 +215,7 @@ endif # These are here as placeholders of what could be added -if CONFIG_AUDIO_PLANNED +if AUDIO_PLANNED config AUDIO_MIXER bool "Planned - Enable support for the software based Audio Mixer" diff --git a/configs/pic32mz-starterkit/nsh/defconfig b/configs/pic32mz-starterkit/nsh/defconfig index 37ce95473c..42109198ab 100644 --- a/configs/pic32mz-starterkit/nsh/defconfig +++ b/configs/pic32mz-starterkit/nsh/defconfig @@ -159,19 +159,19 @@ CONFIG_PIC32MZ_ICESEL_CH2=y # # Device Configuration 1 (DEVCFG1) # -CONFIG_CONFIG_PIC32MZ_OSCIOFNC=1 +CONFIG_PIC32MZ_OSCIOFNC=1 # CONFIG_PIC32MZ_WDTENABLE is not set # # Device Configuration 3 (DEVCFG3) # CONFIG_PIC32MZ_USERID=0x584e -CONFIG_PIC32MZ_FMIIEN=0 +CONFIG_PIC32MZ_FMIIEN=1 CONFIG_PIC32MZ_PGL1WAY=0 CONFIG_PIC32MZ_PMDL1WAY=0 CONFIG_PIC32MZ_IOL1WAY=0 -CONFIG_PIC32MZ_FETHIO=0 -CONFIG_PIC32MZ_FUSBIDIO=1 +CONFIG_PIC32MZ_FETHIO=1 +CONFIG_PIC32MZ_FUSBIDIO=0 # # Architecture Options