From patchwork Thu Jan 11 16:06:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 859191 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="k4xmbpU7"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zHW335M64z9s72 for ; Fri, 12 Jan 2018 03:06:38 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id EF9C0C21E2F; Thu, 11 Jan 2018 16:06:33 +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 BB64FC21D56; Thu, 11 Jan 2018 16:06:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D0E7CC21D56; Thu, 11 Jan 2018 16:06:28 +0000 (UTC) Received: from mail-it0-f66.google.com (mail-it0-f66.google.com [209.85.214.66]) by lists.denx.de (Postfix) with ESMTPS id 27984C21C41 for ; Thu, 11 Jan 2018 16:06:28 +0000 (UTC) Received: by mail-it0-f66.google.com with SMTP id f143so5441183itb.0 for ; Thu, 11 Jan 2018 08:06:28 -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=s6YYcqMMtMH4AJb6RRu2Ux9ZNPZDmwNxpe9+UuHc+Eg=; b=k4xmbpU7HIyAdTZEbGjblga9hof2OCKnuz8VakgVG3C7u0YvCA5cNzmIFPE8qee/Zi XEKS7beS/ZNszQEJf5yhv+9bp2126rB1CKLGysdVfKV9xc/f86mOgpLXFA8X5wtLPyrD ASc6IqFADikZvylDoiuk7WWSuXVzrrzR5Zg5eYvodDPUdKcEXBxpePdAdQ2leKtrOFzV u+IGnhhFHUDqXICFmaW+BOCxRGdSEy8XrzF6CWpfN7Qr9pqk+1fJoHBe6bYRsuDj7UNk 25V5CalT6gluR6fVjJ+wuSYI0EdeT4KgOBdWfxdA1SADuW2/PuPgDaOKr4rnR5y3jRQc DzZw== 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=s6YYcqMMtMH4AJb6RRu2Ux9ZNPZDmwNxpe9+UuHc+Eg=; b=hO5VoGmPRgzL5j24yjPBC7xZf1o3Bor1t03l5dXV/ihTq4q75s6SKh6TTKYOSDyKsH 92u8/oeNF4JFCSKrYyjVWrm1ssYOVxsVw0W7bSsAc6tY9ew2t1Lzd5g28YQA6Se+N/o4 Y09kDAMRik6S+5B6XV+RbRXjZKoCZhBaEfqert+wvx/zhzgWpdK/KN4jORU+53uVNgec kayv/JSGpiDOOVHILrJZevfT1qiM/lBr6VW2NFE9WO2+kd4p673hUR+dWwfljSG1qj+H 83gUx3HPczduCplHqQ1WC+9kYErN0qSoi0LA7sXm2/QDL69bJKYof3/hegX6l/VfSEfR 0/Ug== X-Gm-Message-State: AKGB3mL+d0YBPD3dgikkFa0IPBVV8n4ZdMgCZLgPPCiYszkaHpdjTjtv rkmj1osvMbMIW9nYqHDSxOs= X-Google-Smtp-Source: ACJfBos4sLk/b6xfvZ6d/x34/zthjnDAKc5dnFyVKZvoxwA98YZ9wGl0mW+Oebgp36XzBGNdcsN3hg== X-Received: by 10.107.202.135 with SMTP id a129mr16384649iog.150.1515686785912; Thu, 11 Jan 2018 08:06:25 -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 h25sm181041iti.31.2018.01.11.08.06.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Jan 2018 08:06:25 -0800 (PST) From: Adam Ford To: adam.ford@logicpd.com Date: Thu, 11 Jan 2018 10:06:07 -0600 Message-Id: <1515686768-22033-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] 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 --- 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 | 59 ++++++++++++++++++++++++++++++++++++++++- 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, 59 insertions(+), 78 deletions(-) diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index ae9c0fd..c9c517e 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,63 @@ 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 + +config SYS_DA850_PLL0_POSTDIV + int "SYS_DA850_PLL0_POSTDIV" + default 1 if SOC_DA850 + +config SYS_DA850_PLL0_PLLDIV1 + hex "SYS_DA850_PLL0_PLLDIV1" + default 0x8000 if SOC_DA850 + +config SYS_DA850_PLL0_PLLDIV2 + hex "SYS_DA850_PLL0_PLLDIV2" + default 0x8001 if SOC_DA850 + +config SYS_DA850_PLL0_PLLDIV3 + hex "SYS_DA850_PLL0_PLLDIV3" + default 0x8002 if SOC_DA850 + +config SYS_DA850_PLL0_PLLDIV4 + hex "SYS_DA850_PLL0_PLLDIV4" + default 0x8003 if SOC_DA850 + +config SYS_DA850_PLL0_PLLDIV5 + hex "SYS_DA850_PLL0_PLLDIV5" + default 0x8002 if SOC_DA850 + +config SYS_DA850_PLL0_PLLDIV7 + hex "SYS_DA850_PLL0_PLLDIV7" + default 0x8005 if SOC_DA850 + +config SYS_DA850_PLL1_POSTDIV + hex "SYS_DA850_PLL1_POSTDIV" + default 1 if SOC_DA850 + +config SYS_DA850_PLL1_PLLDIV1 + hex "SYS_DA850_PLL1_PLLDIV1" + default 0x8000 if SOC_DA850 + +config SYS_DA850_PLL1_PLLDIV2 + hex "SYS_DA850_PLL1_PLLDIV2" + default 0x8001 if SOC_DA850 + +config SYS_DA850_PLL1_PLLDIV3 + hex "SYS_DA850_PLL1_PLLDIV3" + default 0x8002 if SOC_DA850 + +config SYS_DA850_PLL1_PLLM + int + default 21 if SOC_DA850 + +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