From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754630AbcFUGJW (ORCPT ); Tue, 21 Jun 2016 02:09:22 -0400 Received: from regular1.263xmail.com ([211.150.99.134]:33696 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751485AbcFUGJU (ORCPT ); Tue, 21 Jun 2016 02:09:20 -0400 X-263anti-spam: KSV:0;BIG:0;ABS:1;DNS:0;ATT:0;SPF:S; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ADDR-CHECKED: 0 X-RL-SENDER: andy.yan@rock-chips.com X-FST-TO: richard@nod.at X-SENDER-IP: 121.15.173.1 X-LOGIN-NAME: andy.yan@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH v9 3/4] ARM: dts: rockchip: add syscon-reboot-mode DT node To: Bjorn Andersson References: <1466404490-3315-1-git-send-email-andy.yan@rock-chips.com> <1466404769-3534-1-git-send-email-andy.yan@rock-chips.com> <20160620215545.GE1256@tuxbot> Cc: robh+dt@kernel.org, heiko@sntech.de, john.stultz@linaro.org, arnd@arndb.de, k.kozlowski@samsung.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alexandre.belloni@free-electrons.com, dbaryshkov@gmail.com, sre@kernel.org, matthias.bgg@gmail.com, linux-pm@vger.kernel.org, mbrugger@suse.com, lorenzo.pieralisi@arm.com, moritz.fischer@ettus.com, richard@nod.at From: Andy Yan Message-ID: <5768D9F2.4000309@rock-chips.com> Date: Tue, 21 Jun 2016 14:08:50 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160620215545.GE1256@tuxbot> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bjorn: On 2016年06月21日 05:55, Bjorn Andersson wrote: > On Sun 19 Jun 23:39 PDT 2016, Andy Yan wrote: > >> Rockchip platform use a SYSCON mapped register store >> the reboot mode magic value for bootloader to use when >> system reboot. So add syscon-reboot-mode driver DT node >> for rk3xxx/rk3036/rk3288 based platform >> >> Reviewed-by: Matthias Brugger >> Signed-off-by: Andy Yan >> > [..] >> diff --git a/include/dt-bindings/soc/rockchip_boot-mode.h b/include/dt-bindings/soc/rockchip_boot-mode.h >> new file mode 100644 >> index 0000000..ae7c867 >> --- /dev/null >> +++ b/include/dt-bindings/soc/rockchip_boot-mode.h >> @@ -0,0 +1,15 @@ >> +#ifndef __ROCKCHIP_BOOT_MODE_H >> +#define __ROCKCHIP_BOOT_MODE_H >> + >> +/*high 24 bits is tag, low 8 bits is type*/ >> +#define REBOOT_FLAG 0x5242C300 >> +/* normal boot */ >> +#define BOOT_NORMAL (REBOOT_FLAG + 0) >> +/* enter bootloader rockusb mode */ >> +#define BOOT_BL_DOWNLOAD (REBOOT_FLAG + 1) >> +/* enter recovery */ >> +#define BOOT_RECOVERY (REBOOT_FLAG + 3) >> + /* enter fastboot mode */ >> +#define BOOT_FASTBOOT (REBOOT_FLAG + 9) > The names of these defines are too generic for being in a header file. > You should likely make them include "ROCKCHIP" and "BOOT_MODE". > > Regards, > Bjorn > > > I have already named this file as rockchip_boot-mode.h, I thinks this is enough to declare it. And I also check some header files like qcom,gsbi.h, thermal/theraml_exynos.h, they also don't have include some flag like QCOM or EXYNOS.