From patchwork Thu Jan 11 19:33:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 859258 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="erbtnvAn"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zHbf26nVsz9s4q for ; Fri, 12 Jan 2018 06:33:46 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 71675C21EEC; Thu, 11 Jan 2018 19:33:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 7E091C21E33; Thu, 11 Jan 2018 19:33:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E320AC21E33; Thu, 11 Jan 2018 19:33:38 +0000 (UTC) Received: from mail-it0-f68.google.com (mail-it0-f68.google.com [209.85.214.68]) by lists.denx.de (Postfix) with ESMTPS id 3DAC3C21DC1 for ; Thu, 11 Jan 2018 19:33:38 +0000 (UTC) Received: by mail-it0-f68.google.com with SMTP id f190so6391524ita.5 for ; Thu, 11 Jan 2018 11:33:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=UyVU1FtQNT1PYuOCbwizpCQe4Xf0+WLEO+z/frXafEg=; b=erbtnvAnoLvoBbvKrEHkNswzkjpFM/tHODHlRjQzfLfiJIyzoO2WnJ0hwYyUDQ2S13 siC06t1S+LNKdwA+5HlRxNFotCEm8CWrxeeg7thCFDhk1kTb3gz8A/3S2itxlXfk3LSq +iM4N9JDxWBd7q8ruFLxTo8IkM3btGa4C+EOaMQrlHJorMM0jSnpz7pXpmfwKL106s3s 6Mnd4D6C1PRMNJWt5UEq+k0I5/Fnw4A/nVN7om8bwglJfWJrEdg1PgrkC7x/mTvRIXfy lKpB22XF2sOlUobTJ/9qngFg2syeG7JHeXARcYsNTHEVI/nMNi7qFLB4QnwD/ywei5pr xNUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UyVU1FtQNT1PYuOCbwizpCQe4Xf0+WLEO+z/frXafEg=; b=dxAPaegGZPjKsiWH6nnWfsam0IddkzeMymeiKvz3TsOsbgU8osMbKEhszk2vj8nkBC Bo7R9Neesf2Fq21/sK4Xce1eiENzBWs6e+ygEW11t/RQY0GTujacN/Gi0blnvyPEFDNK BcMWm0PAsAiB3emA6Yjm3pg3asnoCIDelx6bKUiN1CJm9y5iBPxlU5VFcgLQToUTtkih xpSff+3V3rP1pmbIBcnIZEIzKIf8MD00MN52nSnDzRAk8BlaYcOA9rP1DMCNwwYEipZK tPGZwn3F5QgZJE2kUD5ytNlBYtJBsy0sPR1jllx3m1D6wrc7tAAB19AhkVxyrv31FwzD V6/A== X-Gm-Message-State: AKwxytdYiksj5a5iQD2nANVgceHkXiyxNI0Rn3SpRrCMewGVHkApSL3n Gkazxf6BkWoUHHo8wsEaKCo= X-Google-Smtp-Source: ACJfBov9+S55GimGnoKN+thZ7coUOSAwfELCrIDvaz2Asbzzd4pWOorD9wVAbTAwu/F9kG2UP6QdDw== X-Received: by 10.36.224.139 with SMTP id c133mr2528315ith.39.1515699216531; Thu, 11 Jan 2018 11:33:36 -0800 (PST) Received: from ubuntu16.lan (c-73-65-120-235.hsd1.mn.comcast.net. [73.65.120.235]) by smtp.gmail.com with ESMTPSA id o39sm11968456ioi.1.2018.01.11.11.33.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Jan 2018 11:33:35 -0800 (PST) From: Adam Ford To: adam.ford@logicpd.com Date: Thu, 11 Jan 2018 13:33:13 -0600 Message-Id: <1515699193-10191-1-git-send-email-aford173@gmail.com> X-Mailer: git-send-email 2.7.4 Cc: David Lechner , =?utf-8?q?Christoph_R=C3=BCdisse?= =?utf-8?q?r?= , Manfred Rudigier , u-boot@lists.denx.de, Peter Howard Subject: [U-Boot] [PATCH V2] Convert CONFIG_SYS_DV_CLKMODE et al to Kconfig X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This converts the following to Kconfig: CONFIG_SYS_DV_CLKMODE CONFIG_SYS_DA850_PLL0_POSTDIV CONFIG_SYS_DA850_PLL0_PLLDIV1 CONFIG_SYS_DA850_PLL0_PLLDIV2 CONFIG_SYS_DA850_PLL0_PLLDIV3 CONFIG_SYS_DA850_PLL0_PLLDIV4 CONFIG_SYS_DA850_PLL0_PLLDIV5 CONFIG_SYS_DA850_PLL0_PLLDIV7 CONFIG_SYS_DA850_PLL1_POSTDIV CONFIG_SYS_DA850_PLL1_PLLDIV1 CONFIG_SYS_DA850_PLL1_PLLDIV2 CONFIG_SYS_DA850_PLL1_PLLDIV3 Signed-off-by: Adam Ford --- Changes in V2: Expand Kconfig help definitions to give a small explanation of options V1: This patch is a continuation of Convert CONFIG_SOC_DA8XX et al This also showed warnings when used with the legoev3_defconfig, however it seems like the ev3 board was defining things in the header it didn't need since it doesn't seem to be building da850_lowlevel.c. I don't have the hardware to test that board. arch/arm/mach-davinci/Kconfig | 85 ++++++++++++++++++++++++++++++++++++++++- configs/omapl138_lcdk_defconfig | 1 + include/configs/calimain.h | 13 ------- include/configs/da850evm.h | 13 ------- include/configs/ipam390.h | 13 ------- include/configs/legoev3.h | 13 ------- include/configs/omapl138_lcdk.h | 13 ------- scripts/config_whitelist.txt | 12 ------ 8 files changed, 85 insertions(+), 78 deletions(-) diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index ae9c0fd..a6818a8 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -24,7 +24,7 @@ config TARGET_EA20 config TARGET_OMAPL138_LCDK bool "OMAPL138 LCDK" - select SOC_DA8XX + select SOC_DA850 select SUPPORT_SPL config TARGET_CALIMAIN @@ -63,6 +63,89 @@ config SOC_DA8XX config MACH_DAVINCI_DA850_EVM bool +if SYS_DA850_PLL_INIT +comment "DA850 PLL Initialization Parameters" + +config SYS_DV_CLKMODE + int "SYS_DV_CLKMODE" + default 0 if SOC_DA850 + help + Set PLLCTL Clock Mode bit as External Clock or On Chip oscillator + +config SYS_DA850_PLL0_POSTDIV + int "SYS_DA850_PLL0_POSTDIV" + default 1 if SOC_DA850 + help + Value written to PLL1, POSTDIV register + +config SYS_DA850_PLL0_PLLDIV1 + hex "SYS_DA850_PLL0_PLLDIV1" + default 0x8000 if SOC_DA850 + help + Value written to PLL0, PLLDIV1 register + +config SYS_DA850_PLL0_PLLDIV2 + hex "SYS_DA850_PLL0_PLLDIV2" + default 0x8001 if SOC_DA850 + help + Value written to PLL0, PLLDIV2 register + +config SYS_DA850_PLL0_PLLDIV3 + hex "SYS_DA850_PLL0_PLLDIV3" + default 0x8002 if SOC_DA850 + help + Value written to PLL0, PLLDIV3 register + +config SYS_DA850_PLL0_PLLDIV4 + hex "SYS_DA850_PLL0_PLLDIV4" + default 0x8003 if SOC_DA850 + help + Value written to PLL0, PLLDIV4 register + +config SYS_DA850_PLL0_PLLDIV5 + hex "SYS_DA850_PLL0_PLLDIV5" + default 0x8002 if SOC_DA850 + help + Value written to PLL0, PLLDIV5 register + +config SYS_DA850_PLL0_PLLDIV7 + hex "SYS_DA850_PLL0_PLLDIV7" + default 0x8005 if SOC_DA850 + help + Value written to PLL0, PLLDIV7 register + +config SYS_DA850_PLL1_POSTDIV + hex "SYS_DA850_PLL1_POSTDIV" + default 1 if SOC_DA850 + help + Value written to PLL1, POSTDIV register + +config SYS_DA850_PLL1_PLLDIV1 + hex "SYS_DA850_PLL1_PLLDIV1" + default 0x8000 if SOC_DA850 + help + Value written to PLL1, DIV1 register + +config SYS_DA850_PLL1_PLLDIV2 + hex "SYS_DA850_PLL1_PLLDIV2" + default 0x8001 if SOC_DA850 + help + Value written to PLL1, DIV2 register + +config SYS_DA850_PLL1_PLLDIV3 + hex "SYS_DA850_PLL1_PLLDIV3" + default 0x8002 if SOC_DA850 + help + Value written to PLL1, DIV3 register + +config SYS_DA850_PLL1_PLLM + int "SYS_DA850_PLL1_PLLM" + default 21 if SOC_DA850 + help + Value written to PLL1 multiplier + +endif + source "board/Barix/ipam390/Kconfig" source "board/davinci/da8xxevm/Kconfig" source "board/davinci/ea20/Kconfig" diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index 8d6b12f..2498126 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -1,6 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_DAVINCI=y CONFIG_TARGET_OMAPL138_LCDK=y +CONFIG_SYS_DA850_PLL1_PLLDIV3=0x8003 CONFIG_TI_COMMON_CMD_OPTIONS=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y diff --git a/include/configs/calimain.h b/include/configs/calimain.h index 7dfc1fa..8605487 100644 --- a/include/configs/calimain.h +++ b/include/configs/calimain.h @@ -39,20 +39,7 @@ /* * PLL configuration */ -#define CONFIG_SYS_DV_CLKMODE 0 -#define CONFIG_SYS_DA850_PLL0_POSTDIV 1 -#define CONFIG_SYS_DA850_PLL0_PLLDIV1 0x8000 -#define CONFIG_SYS_DA850_PLL0_PLLDIV2 0x8001 -#define CONFIG_SYS_DA850_PLL0_PLLDIV3 0x8002 -#define CONFIG_SYS_DA850_PLL0_PLLDIV4 0x8003 -#define CONFIG_SYS_DA850_PLL0_PLLDIV5 0x8002 #define CONFIG_SYS_DA850_PLL0_PLLDIV6 CONFIG_SYS_DA850_PLL0_PLLDIV1 -#define CONFIG_SYS_DA850_PLL0_PLLDIV7 0x8005 - -#define CONFIG_SYS_DA850_PLL1_POSTDIV 1 -#define CONFIG_SYS_DA850_PLL1_PLLDIV1 0x8000 -#define CONFIG_SYS_DA850_PLL1_PLLDIV2 0x8001 -#define CONFIG_SYS_DA850_PLL1_PLLDIV3 0x8002 #define CONFIG_SYS_DA850_PLL0_PLLM \ ((calimain_get_osc_freq() == 25000000) ? 23 : 24) diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h index 5159a6f..a356871 100644 --- a/include/configs/da850evm.h +++ b/include/configs/da850evm.h @@ -74,20 +74,7 @@ /* * PLL configuration */ -#define CONFIG_SYS_DV_CLKMODE 0 -#define CONFIG_SYS_DA850_PLL0_POSTDIV 1 -#define CONFIG_SYS_DA850_PLL0_PLLDIV1 0x8000 -#define CONFIG_SYS_DA850_PLL0_PLLDIV2 0x8001 -#define CONFIG_SYS_DA850_PLL0_PLLDIV3 0x8002 -#define CONFIG_SYS_DA850_PLL0_PLLDIV4 0x8003 -#define CONFIG_SYS_DA850_PLL0_PLLDIV5 0x8002 #define CONFIG_SYS_DA850_PLL0_PLLDIV6 CONFIG_SYS_DA850_PLL0_PLLDIV1 -#define CONFIG_SYS_DA850_PLL0_PLLDIV7 0x8005 - -#define CONFIG_SYS_DA850_PLL1_POSTDIV 1 -#define CONFIG_SYS_DA850_PLL1_PLLDIV1 0x8000 -#define CONFIG_SYS_DA850_PLL1_PLLDIV2 0x8001 -#define CONFIG_SYS_DA850_PLL1_PLLDIV3 0x8002 #define CONFIG_SYS_DA850_PLL0_PLLM 24 #define CONFIG_SYS_DA850_PLL1_PLLM 21 diff --git a/include/configs/ipam390.h b/include/configs/ipam390.h index 618bf72..e66c008 100644 --- a/include/configs/ipam390.h +++ b/include/configs/ipam390.h @@ -56,20 +56,7 @@ /* * PLL configuration */ -#define CONFIG_SYS_DV_CLKMODE 0 -#define CONFIG_SYS_DA850_PLL0_POSTDIV 1 -#define CONFIG_SYS_DA850_PLL0_PLLDIV1 0x8000 -#define CONFIG_SYS_DA850_PLL0_PLLDIV2 0x8001 -#define CONFIG_SYS_DA850_PLL0_PLLDIV3 0x8002 -#define CONFIG_SYS_DA850_PLL0_PLLDIV4 0x8003 -#define CONFIG_SYS_DA850_PLL0_PLLDIV5 0x8002 #define CONFIG_SYS_DA850_PLL0_PLLDIV6 CONFIG_SYS_DA850_PLL0_PLLDIV1 -#define CONFIG_SYS_DA850_PLL0_PLLDIV7 0x8005 - -#define CONFIG_SYS_DA850_PLL1_POSTDIV 1 -#define CONFIG_SYS_DA850_PLL1_PLLDIV1 0x8000 -#define CONFIG_SYS_DA850_PLL1_PLLDIV2 0x8001 -#define CONFIG_SYS_DA850_PLL1_PLLDIV3 0x8002 #define CONFIG_SYS_DA850_PLL0_PLLM 24 #define CONFIG_SYS_DA850_PLL1_PLLM 24 diff --git a/include/configs/legoev3.h b/include/configs/legoev3.h index 105429b..26376a8 100644 --- a/include/configs/legoev3.h +++ b/include/configs/legoev3.h @@ -52,20 +52,7 @@ /* * PLL configuration */ -#define CONFIG_SYS_DV_CLKMODE 0 -#define CONFIG_SYS_DA850_PLL0_POSTDIV 1 -#define CONFIG_SYS_DA850_PLL0_PLLDIV1 0x8000 -#define CONFIG_SYS_DA850_PLL0_PLLDIV2 0x8001 -#define CONFIG_SYS_DA850_PLL0_PLLDIV3 0x8002 -#define CONFIG_SYS_DA850_PLL0_PLLDIV4 0x8003 -#define CONFIG_SYS_DA850_PLL0_PLLDIV5 0x8002 #define CONFIG_SYS_DA850_PLL0_PLLDIV6 CONFIG_SYS_DA850_PLL0_PLLDIV1 -#define CONFIG_SYS_DA850_PLL0_PLLDIV7 0x8005 - -#define CONFIG_SYS_DA850_PLL1_POSTDIV 1 -#define CONFIG_SYS_DA850_PLL1_PLLDIV1 0x8000 -#define CONFIG_SYS_DA850_PLL1_PLLDIV2 0x8001 -#define CONFIG_SYS_DA850_PLL1_PLLDIV3 0x8002 #define CONFIG_SYS_DA850_PLL0_PLLM 24 #define CONFIG_SYS_DA850_PLL1_PLLM 21 diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index 570322e..1ad176e 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -58,20 +58,7 @@ /* * PLL configuration */ -#define CONFIG_SYS_DV_CLKMODE 0 -#define CONFIG_SYS_DA850_PLL0_POSTDIV 1 -#define CONFIG_SYS_DA850_PLL0_PLLDIV1 0x8000 -#define CONFIG_SYS_DA850_PLL0_PLLDIV2 0x8001 -#define CONFIG_SYS_DA850_PLL0_PLLDIV3 0x8002 -#define CONFIG_SYS_DA850_PLL0_PLLDIV4 0x8003 -#define CONFIG_SYS_DA850_PLL0_PLLDIV5 0x8002 #define CONFIG_SYS_DA850_PLL0_PLLDIV6 CONFIG_SYS_DA850_PLL0_PLLDIV1 -#define CONFIG_SYS_DA850_PLL0_PLLDIV7 0x8005 - -#define CONFIG_SYS_DA850_PLL1_POSTDIV 1 -#define CONFIG_SYS_DA850_PLL1_PLLDIV1 0x8000 -#define CONFIG_SYS_DA850_PLL1_PLLDIV2 0x8001 -#define CONFIG_SYS_DA850_PLL1_PLLDIV3 0x8003 #define CONFIG_SYS_DA850_PLL0_PLLM 37 #define CONFIG_SYS_DA850_PLL1_PLLM 21 diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 7e99a7a..c9955a3 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -2478,21 +2478,10 @@ CONFIG_SYS_DA850_DDR2_SDBCR2 CONFIG_SYS_DA850_DDR2_SDRCR CONFIG_SYS_DA850_DDR2_SDTIMR CONFIG_SYS_DA850_DDR2_SDTIMR2 -CONFIG_SYS_DA850_PLL0_PLLDIV1 -CONFIG_SYS_DA850_PLL0_PLLDIV2 -CONFIG_SYS_DA850_PLL0_PLLDIV3 -CONFIG_SYS_DA850_PLL0_PLLDIV4 -CONFIG_SYS_DA850_PLL0_PLLDIV5 CONFIG_SYS_DA850_PLL0_PLLDIV6 -CONFIG_SYS_DA850_PLL0_PLLDIV7 CONFIG_SYS_DA850_PLL0_PLLM -CONFIG_SYS_DA850_PLL0_POSTDIV CONFIG_SYS_DA850_PLL0_PREDIV -CONFIG_SYS_DA850_PLL1_PLLDIV1 -CONFIG_SYS_DA850_PLL1_PLLDIV2 -CONFIG_SYS_DA850_PLL1_PLLDIV3 CONFIG_SYS_DA850_PLL1_PLLM -CONFIG_SYS_DA850_PLL1_POSTDIV CONFIG_SYS_DA850_SYSCFG_SUSPSRC CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT CONFIG_SYS_DAVINCI_I2C_SLAVE @@ -2735,7 +2724,6 @@ CONFIG_SYS_DSPI_CTAR4 CONFIG_SYS_DSPI_CTAR5 CONFIG_SYS_DSPI_CTAR6 CONFIG_SYS_DSPI_CTAR7 -CONFIG_SYS_DV_CLKMODE CONFIG_SYS_DV_NOR_BOOT_CFG CONFIG_SYS_EBI_CFGR_VAL CONFIG_SYS_EBI_CSA_VAL