All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kever Yang <kever.yang@rock-chips.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, 02/36] rockchip: add common MACRO to enable sys arch timer
Date: Mon, 2 Apr 2018 09:41:37 +0800	[thread overview]
Message-ID: <e149f05d-fe4b-556b-3387-c3891353f49e@rock-chips.com> (raw)
In-Reply-To: <alpine.OSX.2.21.1804012247490.30208@vpn-10-11-0-14.lan>



On 04/02/2018 04:51 AM, Philipp Tomsich wrote:
>
>
> On Tue, 27 Mar 2018, Kever Yang wrote:
>
>> All rockchip SoCs can use ARM arch timer, let's enable it in
>> common header file
>
> Please provide a commit message that is more descriptive of what
> actually happens... i.e. that COUNTER_FREQUENCY gets moved to a common
> header.

Well, will add this info.
> It would be great to document why this will always remain 24M.

All the setting in header file for Rockchip is 24M, doesn't it already a
common code and we should re-use it in common file?

>
>> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
>> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
>
> See below for requested changes.
>
>> ---
>>
>> include/configs/rk3368_common.h   | 2 --
>> include/configs/rk3399_common.h   | 2 --
>> include/configs/rockchip-common.h | 4 ++++
>> 3 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/include/configs/rk3368_common.h
>> b/include/configs/rk3368_common.h
>> index 10f643f..a7fe4ca 100644
>> --- a/include/configs/rk3368_common.h
>> +++ b/include/configs/rk3368_common.h
>> @@ -22,8 +22,6 @@
>> #define CONFIG_SYS_CBSIZE        1024
>> #define CONFIG_SKIP_LOWLEVEL_INIT
>>
>> -#define COUNTER_FREQUENCY               24000000
>> -
>> #define CONFIG_SYS_NS16550_MEM32
>>
>> #define CONFIG_SYS_INIT_SP_ADDR        0x00300000
>> diff --git a/include/configs/rk3399_common.h
>> b/include/configs/rk3399_common.h
>> index d700bf2..fe8c675 100644
>> --- a/include/configs/rk3399_common.h
>> +++ b/include/configs/rk3399_common.h
>> @@ -17,8 +17,6 @@
>> #define CONFIG_SPL_SPI_LOAD
>> #endif
>>
>> -#define COUNTER_FREQUENCY               24000000
>> -
>> #define CONFIG_SYS_NS16550_MEM32
>>
>> #define CONFIG_SYS_INIT_SP_ADDR        0x00300000
>> diff --git a/include/configs/rockchip-common.h
>> b/include/configs/rockchip-common.h
>> index 26d41b5..24651ce 100644
>> --- a/include/configs/rockchip-common.h
>> +++ b/include/configs/rockchip-common.h
>> @@ -8,6 +8,10 @@
>> #define _ROCKCHIP_COMMON_H_
>> #include <linux/sizes.h>
>>
>> +#define COUNTER_FREQUENCY               24000000
>
> Is this really safe for all past, current and future SOCs (after all:
> you are putting this into 'rockchip-common.h'?

Rockchip timer always have a option of 24M, it may not default in SoC value,
we need to select to use 24M in this case.
>
>> +#define CONFIG_SYS_ARCH_TIMER
>
> I don't agree with putting this here, as the CONFIG_SYS_ARCH_TIMER
> definition is only used on ARMv7, but this file is also included by
> ARMv8 SOCs.

Does this setting break anything in ARMv8?
I don't think we need to add a rockchip_common_armv7.h,
at least we can add macro for the definition is used for CONFIG_ARM64 or
not.

Thanks,
- Kever
>
>> +#define CONFIG_SYS_HZ_CLOCK    24000000
>
> You might want to have this refer back to COUNTER_FREQUENCY.
>
>> +
>> #ifndef CONFIG_SPL_BUILD
>>
>> /* First try to boot from SD (index 0), then eMMC (index 1) */
>>
>

  reply	other threads:[~2018-04-02  1:41 UTC|newest]

Thread overview: 138+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-27  9:28 [U-Boot] [PATCH 00/36] rockchip: clean up board file for rockchip SoCs Kever Yang
2018-03-27  9:28 ` [U-Boot] [PATCH 01/36] rockchip: rk3288: move configure_l2ctlr back to rk3288 Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 20:47   ` Philipp Tomsich
2018-04-02  1:27     ` Kever Yang
2018-03-27  9:28 ` [U-Boot] [PATCH 02/36] rockchip: add common MACRO to enable sys arch timer Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 20:51   ` Philipp Tomsich
2018-04-02  1:41     ` Kever Yang [this message]
2018-03-27  9:28 ` [U-Boot] [PATCH 03/36] rockchip: enable SYS_NS16550 for all SoCs by default Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 20:53   ` Philipp Tomsich
2018-03-27  9:28 ` [U-Boot] [PATCH 04/36] rockchip: defconfig: remove CONFIG_SYS_NS16550 Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 20:55   ` Philipp Tomsich
2018-03-27  9:28 ` [U-Boot] [PATCH 05/36] rockchip: add STIMER_BASE for all SoCs Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot,05/36] " Philipp Tomsich
2018-04-01 20:58   ` Philipp Tomsich
2018-04-02  1:53     ` Kever Yang
2019-03-28  8:21   ` [U-Boot] [PATCH 05/36] " Kever Yang
2019-03-29  1:02   ` [U-Boot] [RFC] simple address definition method for early TPL/SPL Kever Yang
2019-03-29 14:52     ` Kever Yang
2018-03-27  9:29 ` [U-Boot] [PATCH 06/36] rockchip: add IRAM_START_ADDR for all SoCs Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:00   ` Philipp Tomsich
2018-04-02  1:55     ` Kever Yang
2018-03-27  9:29 ` [U-Boot] [PATCH 07/36] rockchip: rk3328: add BOOT_MODE_REG for rk3328 Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:01   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 08/36] rockchip: rk322x: remove use rockchip timer as sys timer Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:03   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 09/36] rockchip: rk322x: sdram: use common udelay instead of rockchip_udelay Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 20:40   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 10/36] rockchip: rk322x: prepare to use common board file Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:06   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 11/36] rockchip: defconfig enable sysreset for rk3229 spl Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 20:40   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 12/36] rockchip: rk3036: sdram: use udelay instead of rockchip_udelay Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:44   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 13/36] rockchip: rk3036: remove sys timer Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot,13/36] " Philipp Tomsich
2018-04-01 20:40   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 14/36] rockchip: rk3036: prepare to use commong board file Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:44   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 15/36] rockchip: declare sdram_init() in common header Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:45   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 16/36] rockchip: sdram-common: add api to pass dram info to trust os Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:43   ` Philipp Tomsich
2018-04-02  2:29     ` Kever Yang
2018-03-27  9:29 ` [U-Boot] [PATCH 17/36] rockchip: sdram_common: add common dram_init_banksize Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:50   ` Philipp Tomsich
2018-04-02  2:40     ` Kever Yang
2018-03-27  9:29 ` [U-Boot] [PATCH 18/36] rockchip: rk3188: remove rockchip timer as sys timer Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-02  9:38     ` Artturi Alm
2018-04-02  9:51       ` Dr. Philipp Tomsich
2018-04-05 13:16         ` Heiko Stuebner
2018-04-01 21:50   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 19/36] rockchip: rk3188: prepare to use common board file Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 20/36] rockchip: rk3128: remove rockchip timer as systimer Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 21/36] rockchip: rk3128: prepare use common board file Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:51   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 22/36] rockchip: dts: rk3288: update spl-boot-order Kever Yang
2018-03-27 11:55   ` Peter Robinson
2018-03-28  3:13     ` Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 20:40   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 23/36] rockchip: rk3288: remove rockchip timer for sys timer Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 24/36] armv8: add timer_get_boot_us() for generic timer Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:53   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 25/36] rockchip: rk3288: prepare to use common board file Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 26/36] rockchip: rk1108: remove rockchip timer for sys timer Kever Yang
2018-03-27 11:33   ` Andy Yan
2018-03-27 15:57   ` Dr. Philipp Tomsich
2018-03-27 16:07   ` Alexander Kochetkov
2018-03-27 16:21     ` Alexander Kochetkov
2018-03-28  2:33       ` Kever Yang
2018-03-30 17:13         ` Alexander Kochetkov
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 27/36] rockchip: rv1108: prepare to use common board file Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 28/36] rockchip: rk3328: " Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 29/36] rockchip: rk3368: " Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:37   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 30/36] rockchip: lion-rk3368: remove rockchip timer Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:34   ` Philipp Tomsich
2018-04-02  3:19     ` Kever Yang
2018-03-27  9:29 ` [U-Boot] [PATCH 31/36] rockchip: rk3399: prepare to use common board file Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:59   ` Philipp Tomsich
2018-04-02  3:22     ` Kever Yang
2018-03-27  9:29 ` [U-Boot] [PATCH 32/36] rockchip: remove rk_timer Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot,32/36] " Philipp Tomsich
2018-04-01 20:40   ` Philipp Tomsich
2019-03-29  8:35   ` [U-Boot] [PATCH 32/36] " Alexander Kochetkov
2019-03-29 11:13     ` Kever Yang
2018-03-27  9:29 ` [U-Boot] [PATCH 33/36] rockchip: dts: rk3399-firefly: enable uart2 in spl Kever Yang
2018-03-27 11:49   ` Peter Robinson
2018-03-28  2:28     ` Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:38   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 34/36] rockchip: spl-boot-order: do not enable with OF_PLATDATA Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 20:40   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 35/36] rockchip: declear boot_devices in bootrom.h Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:09   ` Philipp Tomsich
2018-03-27  9:29 ` [U-Boot] [PATCH 36/36] rockchip: add common board file for rockchip platform Kever Yang
2018-04-01 20:21   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-01 21:28   ` Philipp Tomsich
2018-04-08  1:45     ` Kever Yang
2018-04-08 22:35       ` Tom Rini
2018-04-09  7:49         ` Dr. Philipp Tomsich
2018-04-10  6:54         ` Kever Yang
2018-04-10 12:32           ` Tom Rini
2018-04-10 12:38             ` Dr. Philipp Tomsich
2018-04-09  7:57       ` Dr. Philipp Tomsich
2018-04-13  7:51       ` Kever Yang
2018-04-13 13:11         ` Tom Rini
2018-04-13 13:32         ` Dr. Philipp Tomsich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e149f05d-fe4b-556b-3387-c3891353f49e@rock-chips.com \
    --to=kever.yang@rock-chips.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.