public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andes <uboot@andestech.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 3/4] cosmetic: atcpit100_timer: Use device api to get platdata
Date: Tue, 28 Nov 2017 10:38:53 +0800	[thread overview]
Message-ID: <1511836734-17775-4-git-send-email-uboot@andestech.com> (raw)
In-Reply-To: <1511836734-17775-1-git-send-email-uboot@andestech.com>

From: Rick Chen <rickchen36@gmail.com>

Use dev_get_platdata to get private platdata.

Signed-off-by: rick <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
---
 drivers/timer/atcpit100_timer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/timer/atcpit100_timer.c b/drivers/timer/atcpit100_timer.c
index d5146dd..963f978 100644
--- a/drivers/timer/atcpit100_timer.c
+++ b/drivers/timer/atcpit100_timer.c
@@ -73,7 +73,7 @@ struct atcpit_timer_platdata {
 
 static int atcpit_timer_get_count(struct udevice *dev, u64 *count)
 {
-	struct atcpit_timer_platdata *plat = dev->platdata;
+	struct atcpit_timer_platdata *plat = dev_get_platdata(dev);
 	u32 val;
 	val = ~(REG32_TMR(CH_CNT(1))+0xffffffff);
 	*count = timer_conv_64(val);
@@ -82,7 +82,7 @@ static int atcpit_timer_get_count(struct udevice *dev, u64 *count)
 
 static int atcpit_timer_probe(struct udevice *dev)
 {
-	struct atcpit_timer_platdata *plat = dev->platdata;
+	struct atcpit_timer_platdata *plat = dev_get_platdata(dev);
 	REG32_TMR(CH_REL(1)) = 0xffffffff;
 	REG32_TMR(CH_CTL(1)) = APB_CLK|TMR_32;
 	REG32_TMR(CH_EN) |= CH_TMR_EN(1 , 0);
-- 
2.7.4

  parent reply	other threads:[~2017-11-28  2:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-28  2:38 [U-Boot] [PATCH v3 0/4] Rename AE3XX timer to ATCPIT100 Andes
2017-11-28  2:38 ` [U-Boot] [PATCH v3 1/4] ae3xx: timer: Rename AE3XX " Andes
2017-11-28  2:38 ` [U-Boot] [PATCH v3 2/4] cosmetic: atcpit100_timer: Rename function name as atcpit100 Andes
2017-11-28  2:38 ` Andes [this message]
2017-11-28  2:38 ` [U-Boot] [PATCH v3 4/4] dt-bindings: timer: Add andestech atcpit100 timer Andes
  -- strict thread matches above, loose matches on Subject: below --
2017-11-28  2:29 [U-Boot] [PATCH v3 0/4] Rename AE3XX timer to ATCPIT100 Rick Chen
2017-11-28  2:29 ` [U-Boot] [PATCH v3 3/4] cosmetic: atcpit100_timer: Use device api to get platdata Rick Chen
2017-11-28  5:00   ` Simon Glass
2017-11-28  2:20 [U-Boot] [PATCH v3 0/4] Rename AE3XX timer to ATCPIT100 Rick Chen
2017-11-28  2:20 ` [U-Boot] [PATCH v3 3/4] cosmetic: atcpit100_timer: Use device api to get platdata Rick Chen

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=1511836734-17775-4-git-send-email-uboot@andestech.com \
    --to=uboot@andestech.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox