From patchwork Thu Jan 9 08:52:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1017 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 92E243F042 for ; Thu, 9 Jan 2020 09:52:38 +0100 (CET) Received: by mail-pj1-f70.google.com with SMTP id 14sf1225123pjo.3 for ; Thu, 09 Jan 2020 00:52:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1578559956; cv=pass; d=google.com; s=arc-20160816; b=F86XDnzryKFCcjs3ocBPxuhnJ2AlpRAnV4rUrs4UXImO9XaXt7XYZ64rWeQHgPXVZZ m3qGOgc0wOGCk/1112h3ySFeMYkHQp7EKOGxgzagROXSWHXIi4TNdDJHR14a2QJbyRCo d5vLrnaW6816iT22YofOTlhMMl6SR1Jn1OajXvJ8TvuJysSHhNMQTxX+Sz/FivYDFoy1 wJxBWuDi46ZfAsPNDEjbIYVrgPsbhpNCwd/8NF351EPNt1Bv1NX7dlhPHtRcGTket6yR DK7tkG4BJHlS1ZmFwlIBYQyn83+3LDyMrHPEX856rYNAzS6c+wi6qnGn5E8DRHURipY0 mZAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=l3bxXibSiG6Cx3ciiJBMPeI9L9Gnj0BydKMve+XZggE=; b=hDS4B6WUS9oCcPvg9zG4n1wRItB0KjasFL3oMPh093uWkk0ihdKwzb33/i3cACHPZq yWsVfw9dHorGb48JsUboCgIEQilVQvnEhMxVgDqkbFJD1R+v+xtbI0By5G91b3KxyrvR 2D8lAwOsPqrJHHo6BJ4+1GNLMhzfXijj5IvtZUAwYcYBWPmhdJI5J9MxMzvBPrkTfbPI xCbKm6FwMK2PU3CgFa6ccws3MTuKe39d49IfpRWzJjOh3mCj/j2QWAGk6YUII7tv5UW3 nkDwhi3Wlt2wyL8OOYqh/SsIP3lhOwnnAG+tfBU3KIMRxpU5/J8vp2hIa3W29gm8R/mt 1hEg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="easbO/zm"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=l3bxXibSiG6Cx3ciiJBMPeI9L9Gnj0BydKMve+XZggE=; b=ISOZ2a7RWwEAK+a0LOMJ4THRNxh69LvRGhXOCO7bX/RI9PUzTsG5gsPlLAUmS353aU q2VzpeZ/iKj5OzDsv/Eac7s1VVCGsH9FF4RCIrtkC0ua0N0/N/lxrXpDHNOdXg0t3iKl rdTOhxHHwtcF8BRasU94lSdaW6cVslQ4EQOSs= 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:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=l3bxXibSiG6Cx3ciiJBMPeI9L9Gnj0BydKMve+XZggE=; b=NE2T+ZG9LWHLamHsznfsTU+mdjv0gdUM3bWysioecTvpznwso74WdHPi/zS4igCSBY wtYLSacELW6tNISqgSm0gczUNOWapJmpTybJugH9W+Kgo4TZ7vhVXN48FWfMhBrfr7Uy 8tpRgChIrzhU5TSA4B3oITepjwctBc7vQ+0Cn2MDEmIbBLugfPucRJcCxlg/A0GOGacU zSE7Ay6nKEXmn3R/q9zxj5iQTQjGN3ppF0wLpdC9qxH19pW1iEXIIaVu88ecKzuI5utG 51IQDWBkDGaGwEFbH7oTTG6Bs0A6X2oNtubeFSzZ5Q5++bMvin9ZEIOc6jJfOopkX4HE myog== X-Gm-Message-State: APjAAAV0nhJmBHiCQCdNkxcktjB3iPxCoUXQcWr7o1hfYwCs6euOMKG9 s0gb3yV05h0+mpFhy0wqMYGBqyRo X-Google-Smtp-Source: APXvYqx+mZZQbw0DnYx5iYUEQwMdCa/6fFku21q/cLZNzUogDKm356s6/EAERAzeH41z/DVlXA/RdQ== X-Received: by 2002:a62:197:: with SMTP id 145mr10114344pfb.188.1578559956299; Thu, 09 Jan 2020 00:52:36 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:d352:: with SMTP id i18ls455619pjx.4.canary-gmail; Thu, 09 Jan 2020 00:52:36 -0800 (PST) X-Received: by 2002:a17:902:64:: with SMTP id 91mr10557272pla.307.1578559955760; Thu, 09 Jan 2020 00:52:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578559955; cv=none; d=google.com; s=arc-20160816; b=XqfN/8kjUxZF8BNLeXbV/C8sA5DANnrqcGad06dsfTMHtBumveSLhWXJIm/VeokCfB 27JL/Y/yZB88mkALHpElbDDIzKy+MtndJll+vcuDMsxO0D6I2VK3ke7N8SSiLeOjP4NJ NbVXknpTjKG5raR4P5oK7z619FCrnoQIDn9FOmwaGQfCAsTi5oafLa7a2JteJw9xVnDz iwi3kL4t92MjwmrGFbWRk919Acq+5YnU+A9wppn7/wS8lC3qc09Oq+3P0r9Fudah0UdX EMuW8ltIJs69NIpvJdAfvWuVczHNVhNdpMl0cpvBboecj3dyCZv/jC4BHxjofBq9LCDv 34Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=+G2wTQjYnk77KB6rEiwLgDcyPxGw48Lq2j8/Bllx3Bs=; b=BkmklVj4phYwLNlQcbvcQxQ+t9fMKBC3EEt2OolGoBVEGkzsvp44Ib6IGOXywEYkRR EVWGwPEDoieDd5QV9frf+nES/7UABtcSznXp/rDkMfTDnOfcPE2jfIAgzJUneMaGoXAU 7fJ/SkmMWBD3/G5GmIPX4B+lVyWP5zAtTAvIBqjJJDjz51mqp0auewEOU3sBo/g7iDMQ PFy/6pj8xJiltQAyt3D2on9b+He2NVntT3HZ5QCNWGQ9XvrYM+OY0Ldp4m0xmcNhyYP3 Ham6LFQ8odwbBVE9Idb2zn/QZzT6rRfJlEpiQekXslNWWgR71uYGhwy6393Fisw42Gdd mAFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="easbO/zm"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id o9sor6595338plk.51.2020.01.09.00.52.34 for (Google Transport Security); Thu, 09 Jan 2020 00:52:34 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:b087:: with SMTP id p7mr10899975plr.10.1578559954467; Thu, 09 Jan 2020 00:52:34 -0800 (PST) Received: from localhost.localdomain ([2405:201:c809:c7d5:d888:9871:544a:b516]) by smtp.gmail.com with ESMTPSA id o17sm2139121pjq.1.2020.01.09.00.52.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jan 2020 00:52:33 -0800 (PST) From: Jagan Teki To: Kever Yang , Simon Glass , Philipp Tomsich Cc: u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v4 0/8] rk3399: Add redundant boot support Date: Thu, 9 Jan 2020 14:22:14 +0530 Message-Id: <20200109085222.22670-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="easbO/zm"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Boot redundancy is one of the key criteria for switch recovery or golden partition based on the bootcount value, which indeed very much needed in production systems on the fields. This is v4 patchset support redundant boot on Rockchip rk3399. Changes for v4: - fixed compilation issue - add wdt kconfig option - tested wdt and bootcount Changes for v3: - rework of cru.h to include rk3288 - rebase on master Changes for v2: - Handle TPL build for watchdog, if TPL won't enable - Fix comments for dw_wdt driver-model comments from Andy - Add Kconfig items for WDT_TPL - Support WDT on TPL as well - Use SYS_SOC for cpu-info Any inputs? Jagan. Jagan Teki (8): rockchip: Add cpu-info rockchip: rk3399: Enable DISPLAY_CPUINFO arm: rockchip: Add common cru.h rockchip: Add common reset cause rockchip: rk3399: Add bootcount support watchdog: kconfig: Enable designware for rk3399 [DO NOT MERGE] roc-rk3399-pc: Enable watchdog [DO NOT MERGE] roc-rk3399-pc: Enable bootcount arch/arm/include/asm/arch-rockchip/clock.h | 4 +- arch/arm/include/asm/arch-rockchip/cru.h | 30 +++++++++ .../include/asm/arch-rockchip/cru_rk3288.h | 20 ++---- .../include/asm/arch-rockchip/cru_rk3399.h | 11 ++-- arch/arm/mach-rockchip/Kconfig | 2 + arch/arm/mach-rockchip/Makefile | 1 + arch/arm/mach-rockchip/cpu-info.c | 65 +++++++++++++++++++ arch/arm/mach-rockchip/rk3288/clk_rk3288.c | 2 +- arch/arm/mach-rockchip/rk3288/rk3288.c | 41 +----------- arch/arm/mach-rockchip/rk3399/Kconfig | 10 +++ arch/arm/mach-rockchip/rk3399/clk_rk3399.c | 2 +- arch/arm/mach-rockchip/rk3399/rk3399.c | 2 +- configs/evb-rk3288_defconfig | 1 - configs/evb-rk3399_defconfig | 1 - configs/ficus-rk3399_defconfig | 1 - configs/firefly-rk3288_defconfig | 1 - configs/firefly-rk3399_defconfig | 1 - configs/khadas-edge-captain-rk3399_defconfig | 1 - configs/khadas-edge-rk3399_defconfig | 1 - configs/khadas-edge-v-rk3399_defconfig | 1 - configs/leez-rk3399_defconfig | 1 - configs/miqi-rk3288_defconfig | 1 - configs/nanopc-t4-rk3399_defconfig | 1 - configs/nanopi-m4-rk3399_defconfig | 1 - configs/nanopi-neo4-rk3399_defconfig | 1 - configs/orangepi-rk3399_defconfig | 1 - configs/phycore-rk3288_defconfig | 1 - configs/popmetal-rk3288_defconfig | 1 - configs/puma-rk3399_defconfig | 1 - configs/roc-pc-rk3399_defconfig | 3 +- configs/rock-pi-4-rk3399_defconfig | 1 - configs/rock960-rk3399_defconfig | 1 - configs/rockpro64-rk3399_defconfig | 1 - configs/tinker-rk3288_defconfig | 1 - configs/tinker-s-rk3288_defconfig | 1 - configs/vyasa-rk3288_defconfig | 1 - drivers/clk/rockchip/clk_rk3288.c | 42 ++++++------ drivers/clk/rockchip/clk_rk3399.c | 36 +++++----- drivers/ram/rockchip/sdram_rk3288.c | 10 +-- drivers/ram/rockchip/sdram_rk3399.c | 10 +-- drivers/video/rockchip/rk3288_mipi.c | 2 +- drivers/video/rockchip/rk3399_mipi.c | 2 +- drivers/video/rockchip/rk_mipi.c | 2 +- drivers/watchdog/Kconfig | 1 + include/configs/rk3399_common.h | 5 +- 45 files changed, 182 insertions(+), 144 deletions(-) create mode 100644 arch/arm/include/asm/arch-rockchip/cru.h create mode 100644 arch/arm/mach-rockchip/cpu-info.c