From patchwork Tue Nov 28 02:20:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rick Chen X-Patchwork-Id: 841949 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="q/r+LWPe"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3ym86w5ySGz9sNx for ; Tue, 28 Nov 2017 14:20:08 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 80637C21DDB; Tue, 28 Nov 2017 03:19:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 303ECC21DD0; Tue, 28 Nov 2017 03:18:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 84FC7C21D56; Tue, 28 Nov 2017 02:44:51 +0000 (UTC) Received: from mail-pl0-f67.google.com (mail-pl0-f67.google.com [209.85.160.67]) by lists.denx.de (Postfix) with ESMTPS id E66F1C21C29 for ; Tue, 28 Nov 2017 02:44:50 +0000 (UTC) Received: by mail-pl0-f67.google.com with SMTP id s10so9755274plj.5 for ; Mon, 27 Nov 2017 18:44:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Xg4TFMDyq7PCp+08uH18rchY/4UdD5bh4fS6AbhgZKY=; b=q/r+LWPesEkmGaLtN9tbn2ErXFyPC6qCpRPsgOh4LPLi2/Qjiqe3KiuQVIqTIOop3N uYO47ubf3/2YbjfOw050f4dsUAJCsbln9XkfWlqpXiAxAr8lq5xnesgSvZfei4C4s0ab MC61Ba++aHnKdJ2ZrPLS7sCj+bklJ0NzCSjupYaFZQDFRUlhvOSyCcDlKXL1FvNlvb3K 7R69iJb6TTuNU+4V5EmDT6mHbntCmU+E2qavhkydrTKBxlOHzaeeWxzJQrswtunrXSiU hxx9kheQ7LfxJ1ENI6uB+gvMHog68sqgBwNwq42n+RZ10Ep6DS7Oi918oRYAnOPaVMuh fsxA== 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:in-reply-to :references; bh=Xg4TFMDyq7PCp+08uH18rchY/4UdD5bh4fS6AbhgZKY=; b=emd8E5q82aejgDB0h7nAGd9YpOayQtypuwJ8FZDjGcJpmtE2KBetxQecj1N4vfzhCE O12RLtrKkUk+c7Rb/XuYBUudadFHb2To4DVlmXJJGTikAQUfW8jgREkEGP1PLko/KbU5 P+McwwSCf9KjPM1hXR07fpgJuY+pDU0XYBqFeBwPSq3eWGS7G8L5qPzV09rL01lWHA4+ KFR0y5D8TugH2BH22UcUCOx47htJJHQ+U4YUZyoSDEZx0K0cHd+M5kFWmPQ+WpGBXfTx DsR0LnnM7qsNFkymo4r+XdKvvOkLkf9eEyMNQ4zX+pG6/lzC/JkAXFF13Ocw+n/Stggw h5bw== X-Gm-Message-State: AJaThX6k72mI+FdLmWxeTg0vAxggx8iAC8xr9lACnH10tZfs9/RWPiRh sPpKhBIqufoiTKB7bMPx+r4VJw== X-Google-Smtp-Source: AGs4zMaV/95KcfhcoT3/oCaMHpjXYDNtVWMVeAZyj+7b6vh/AU464ryoaBe1cGHo7qakPjQ/z4ItUA== X-Received: by 10.84.168.101 with SMTP id e92mr27810696plb.34.1511837089575; Mon, 27 Nov 2017 18:44:49 -0800 (PST) Received: from app09.andestech.com ([118.163.51.199]) by smtp.gmail.com with ESMTPSA id o88sm50500034pfj.175.2017.11.27.18.44.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Nov 2017 18:44:49 -0800 (PST) From: Rick Chen To: u-boot@lists.denx.de, wd@denx.de, dzu@denx.de, sjg@chromium.org Date: Tue, 28 Nov 2017 10:20:05 +0800 Message-Id: <1511835607-17682-3-git-send-email-rickchen36@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1511835607-17682-1-git-send-email-rickchen36@gmail.com> References: <1511835607-17682-1-git-send-email-rickchen36@gmail.com> X-Mailman-Approved-At: Tue, 28 Nov 2017 03:18:32 +0000 Subject: [U-Boot] [PATCH v3 2/4] cosmetic: atcpit100_timer: Rename function name as atcpit100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Integrate function and struct name as atcpit100 will be more reasonable. Signed-off-by: rick Signed-off-by: Rick Chen Reviewed-by: Simon Glass --- drivers/timer/atcpit100_timer.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/timer/atcpit100_timer.c b/drivers/timer/atcpit100_timer.c index b710c28..d5146dd 100644 --- a/drivers/timer/atcpit100_timer.c +++ b/drivers/timer/atcpit100_timer.c @@ -67,51 +67,51 @@ struct atctmr_timer_regs { u32 int_mask; /* 0x38 */ }; -struct atftmr_timer_platdata { +struct atcpit_timer_platdata { u32 *regs; }; -static int atftmr_timer_get_count(struct udevice *dev, u64 *count) +static int atcpit_timer_get_count(struct udevice *dev, u64 *count) { - struct atftmr_timer_platdata *plat = dev->platdata; + struct atcpit_timer_platdata *plat = dev->platdata; u32 val; val = ~(REG32_TMR(CH_CNT(1))+0xffffffff); *count = timer_conv_64(val); return 0; } -static int atctmr_timer_probe(struct udevice *dev) +static int atcpit_timer_probe(struct udevice *dev) { - struct atftmr_timer_platdata *plat = dev->platdata; + struct atcpit_timer_platdata *plat = dev->platdata; REG32_TMR(CH_REL(1)) = 0xffffffff; REG32_TMR(CH_CTL(1)) = APB_CLK|TMR_32; REG32_TMR(CH_EN) |= CH_TMR_EN(1 , 0); return 0; } -static int atctme_timer_ofdata_to_platdata(struct udevice *dev) +static int atcpit_timer_ofdata_to_platdata(struct udevice *dev) { - struct atftmr_timer_platdata *plat = dev_get_platdata(dev); + struct atcpit_timer_platdata *plat = dev_get_platdata(dev); plat->regs = map_physmem(devfdt_get_addr(dev) , 0x100 , MAP_NOCACHE); return 0; } -static const struct timer_ops ag101p_timer_ops = { - .get_count = atftmr_timer_get_count, +static const struct timer_ops atcpit_timer_ops = { + .get_count = atcpit_timer_get_count, }; -static const struct udevice_id ag101p_timer_ids[] = { +static const struct udevice_id atcpit_timer_ids[] = { { .compatible = "andestech,atcpit100" }, {} }; -U_BOOT_DRIVER(altera_timer) = { - .name = "ae3xx_timer", +U_BOOT_DRIVER(atcpit100_timer) = { + .name = "atcpit100_timer", .id = UCLASS_TIMER, - .of_match = ag101p_timer_ids, - .ofdata_to_platdata = atctme_timer_ofdata_to_platdata, - .platdata_auto_alloc_size = sizeof(struct atftmr_timer_platdata), - .probe = atctmr_timer_probe, - .ops = &ag101p_timer_ops, + .of_match = atcpit_timer_ids, + .ofdata_to_platdata = atcpit_timer_ofdata_to_platdata, + .platdata_auto_alloc_size = sizeof(struct atcpit_timer_platdata), + .probe = atcpit_timer_probe, + .ops = &atcpit_timer_ops, .flags = DM_FLAG_PRE_RELOC, };