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] [PATCH v2 06/10] rockchip: rk3288: use grf structure to access soc_con2
Date: Fri, 29 Mar 2019 09:09:03 +0800	[thread overview]
Message-ID: <20190329010907.11006-7-kever.yang@rock-chips.com> (raw)
In-Reply-To: <20190329010907.11006-1-kever.yang@rock-chips.com>

Prefer to use structure to access register if we can.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

 arch/arm/mach-rockchip/rk3288/rk3288.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c
index af3a465cc3..987fae544c 100644
--- a/arch/arm/mach-rockchip/rk3288/rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/rk3288.c
@@ -4,15 +4,17 @@
  */
 #include <asm/io.h>
 #include <asm/arch-rockchip/hardware.h>
+#include <asm/arch-rockchip/grf_rk3288.h>
 
-#define GRF_SOC_CON2 0xff77024c
+#define GRF_BASE	0xff770000
 
 int arch_cpu_init(void)
 {
 	/* We do some SoC one time setting here. */
+	struct rk3288_grf * const grf = (void *)GRF_BASE;
 
 	/* Use rkpwm by default */
-	rk_setreg(GRF_SOC_CON2, 1 << 0);
+	rk_setreg(&grf->soc_con2, 1 << 0);
 
 	return 0;
 }
-- 
2.20.1

  parent reply	other threads:[~2019-03-29  1:09 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-29  1:08 [U-Boot] [PATCH v2 00/10] rockchip: enable board_debug_uart_init for all soc Kever Yang
2019-03-29  1:08 ` [U-Boot] [PATCH v2 01/10] rockchip: enable DEBUG_UART_BOARD_INIT by default Kever Yang
2019-04-28 20:27   ` Philipp Tomsich
2019-05-01 13:06   ` Philipp Tomsich
2019-03-29  1:08 ` [U-Boot] [PATCH v2 02/10] rockchip; kylin-rk3036: enabl DEBUG UART Kever Yang
2019-04-28 20:28   ` Philipp Tomsich
2019-05-01 13:06   ` Philipp Tomsich
2019-03-29  1:09 ` [U-Boot] [PATCH v2 03/10] rockchip: rk3036: add board_debug_uart_init() Kever Yang
2019-03-29 10:10   ` Jack Mitchell
2019-03-29 11:03     ` Kever Yang
2019-04-28 20:28   ` Philipp Tomsich
2019-05-01 13:06   ` Philipp Tomsich
2019-03-29  1:09 ` [U-Boot] [PATCH v2 04/10] rockchip: rk3188: " Kever Yang
2019-04-28 20:28   ` Philipp Tomsich
2019-05-01 13:06   ` Philipp Tomsich
2019-03-29  1:09 ` [U-Boot] [PATCH v2 05/10] rockchip: rk322x: move board_debug_uart_init() to rk322x.c Kever Yang
2019-04-28 20:28   ` Philipp Tomsich
2019-05-01 13:06   ` Philipp Tomsich
2019-03-29  1:09 ` Kever Yang [this message]
2019-04-28 20:28   ` [U-Boot] [PATCH v2 06/10] rockchip: rk3288: use grf structure to access soc_con2 Philipp Tomsich
2019-05-01 13:06   ` Philipp Tomsich
2019-03-29  1:09 ` [U-Boot] [PATCH v2 07/10] rockchip: rk3288: add board_debug_uart_init() Kever Yang
2019-04-28 20:28   ` Philipp Tomsich
2019-05-01 13:06   ` Philipp Tomsich
2019-03-29  1:09 ` [U-Boot] [PATCH v2 08/10] rockchip: rk3368: move board_debug_uart_init() to rk3368.c Kever Yang
2019-04-28 20:28   ` Philipp Tomsich
2019-04-29  9:22   ` Andy Yan
2019-05-01 13:06   ` Philipp Tomsich
2019-03-29  1:09 ` [U-Boot] [PATCH v2 09/10] rockchip: rk3399: use grf structure to access reg Kever Yang
2019-04-28 20:28   ` Philipp Tomsich
2019-04-29  9:23   ` Andy Yan
2019-05-01 13:06   ` Philipp Tomsich
2019-03-29  1:09 ` [U-Boot] [PATCH v2 10/10] rockchip: rk3399: add board_debug_uart_init() Kever Yang
2019-03-29 10:12   ` Jack Mitchell
2019-03-29 11:01     ` Kever Yang
2019-04-28 20:28   ` Philipp Tomsich
2019-05-01 13:06   ` 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=20190329010907.11006-7-kever.yang@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.