From patchwork Thu Nov 7 09:42:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 178796 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp765417ilf; Thu, 7 Nov 2019 01:42:51 -0800 (PST) X-Google-Smtp-Source: APXvYqzU+El9sux66FG/34lb/cRaq+K8w63TjRkXiTS7K21qUVpulXGeoRnYWUVUSqxNgo6w3tQj X-Received: by 2002:aa7:cdc6:: with SMTP id h6mr2411143edw.15.1573119771339; Thu, 07 Nov 2019 01:42:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573119771; cv=none; d=google.com; s=arc-20160816; b=uYZ2WokQX4ZmBKAqAQAC4baEbVN4ILjw3gUBj0EzrN/PMqPYQAOyer5zZB1AN/JyBm 4kG2YCJpCUehO4mLer8DmoRqesWasu/KY8RWU2kZNvFZryLvKg9/d3jetd4nczGgou83 Y2wvHTCYDl24qJEveXtLJ69XWi8qTqmRjrjIJL9uG3GGPocLC2HR/uTz81TUwUFIYyZY bfjABub0UpJ2OroBkqm7Ih/jCH5rE/w4UI5iQGZIFRa1/XVqQp2dPk+BNQku4Iy3xzLk 6pNs4SGGoNfiQjKY8FwYBZ6RNDK8LhKRFeM0D08YIPtYFqfntmEg0kLKr12mKjyMwAIL S+vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HMBhz2B2078XSHXGAaUjrkWUH2c5KSmST4NY/8p2sHM=; b=tITQE/D0qAD5kuRHoe3wAU3GKgYr8M16E/Y18jJRLeyiIn2m9FjsfVPHOUokdeI67s 0TZwZBMew03ZBdC7QA4TRldRlfRsG9eoIU/+jXoPuQcSy1QwkHDD+oYjb0io1Ld0z2Ot tL1aoQMaJ9bwFlsXYSWKa56ucSQotsxTlwqrKcmZwj561zpUCNPlXVRCuvSHV8bMAGa8 X2aBm3R90pGiWYQmpt41d+0OcJ5IslvM1MCN6RdFjTDNVt3VoQtoM3LGUwIf1QLIOahe Cw1ti9/mGkaBsK1HRl9NIpYa9camLLMo/zh6SoRPtp751EEKlNwowd/FSd3XZ2H8730V 9rNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=O8Y0nqqI; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a55si1018768edc.13.2019.11.07.01.42.51; Thu, 07 Nov 2019 01:42:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=O8Y0nqqI; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387903AbfKGJmt (ORCPT + 8 others); Thu, 7 Nov 2019 04:42:49 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:39176 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387839AbfKGJmt (ORCPT ); Thu, 7 Nov 2019 04:42:49 -0500 Received: by mail-pg1-f196.google.com with SMTP id 29so1761978pgm.6; Thu, 07 Nov 2019 01:42:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HMBhz2B2078XSHXGAaUjrkWUH2c5KSmST4NY/8p2sHM=; b=O8Y0nqqI4MAp9WMFEj00Ci1LhFjCLXkg82eKAgOJAZ/OtcQizSy8FlqZoHU+ojQKUo I7BqH0keVDSgJ+lWooX0CQANBV6WIAbV/wZqSrOS2MKz1AdzAIidQOIo817h4Gq4iPpy 4YGjqDzXQ0kH1Pn5KtvH4S5UiqMOPNb3yFMv9qn0Pqu8or4LicWXVHYSdxctdutOQUL8 UJGLO7fCS+m2RRwg8sASoDJh7qxbDIRu0XnKC3sdTkdtgND1kplk39kKayfo4PbYLlYi Vn8cilrjBCvIdV/KBuO+1CsICSimfGw4CXIxdlokF8xLcs0D8SlbGrzCWnEv8b95G9Gp IJwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=HMBhz2B2078XSHXGAaUjrkWUH2c5KSmST4NY/8p2sHM=; b=JtcXmm8R38tCGOIHv7HeAKngdVQrUt2HDVKQJ19QKxdnwY9qdvnvsfoOsAw3VEz/rt 9XSQbzni5eulC15rGxU/4KHKJ3vuTNXTRC1qHn75/7YuTwcc8YFqBuRzItAEbcMamaI5 1+VJzqQvVkPL70ICZNm3I1v2ijXOMyZWZDxVG/1ZBb/Z3pY8pFg4ETz6Fz7l3a2jf9eW mYij4RSsCRd1DJOjTP898AjHM9x9JbHnuPOZvAszyNAdja2yg46th1yQD5N5nSbk+Fnf hBm50Z971se0so6dOAr2zN5txaLkW/el2s9zor+I9kyMO0BkEmmyq+IGMHLVmcogBhGO Lycg== X-Gm-Message-State: APjAAAUoIDw6+8hfc/z753/U1vKtMJ4aIpRBBoEtyxDm3Xawb9lECCo4 TrxAzfyFQwD0i4QJtmG0K9w= X-Received: by 2002:a63:5946:: with SMTP id j6mr3284812pgm.214.1573119767378; Thu, 07 Nov 2019 01:42:47 -0800 (PST) Received: from voyager.lan ([45.124.203.14]) by smtp.gmail.com with ESMTPSA id 12sm1958195pfp.79.2019.11.07.01.42.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2019 01:42:46 -0800 (PST) From: Joel Stanley To: Daniel Lezcano , Rob Herring Cc: =?utf-8?q?C=C3=A9dric_Le_Goater?= , Thomas Gleixner , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Linus Walleij , Andrew Jeffery Subject: [PATCH v2 2/4] clocksource: fttmr010: Set interrupt and shutdown Date: Thu, 7 Nov 2019 20:12:16 +1030 Message-Id: <20191107094218.13210-3-joel@jms.id.au> X-Mailer: git-send-email 2.24.0.rc1 In-Reply-To: <20191107094218.13210-1-joel@jms.id.au> References: <20191107094218.13210-1-joel@jms.id.au> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org In preparation for supporting the ast2600, pass the shutdown and interrupt functions to the common init callback. Reviewed-by: Cédric Le Goater Reviewed-by: Linus Walleij Signed-off-by: Joel Stanley -- v2: call parameter 'irq_handler' instead of 'handler' --- drivers/clocksource/timer-fttmr010.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) -- 2.24.0.rc1 diff --git a/drivers/clocksource/timer-fttmr010.c b/drivers/clocksource/timer-fttmr010.c index c2d30eb9dc72..7c20a3debd96 100644 --- a/drivers/clocksource/timer-fttmr010.c +++ b/drivers/clocksource/timer-fttmr010.c @@ -244,7 +244,10 @@ static irqreturn_t fttmr010_timer_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -static int __init fttmr010_common_init(struct device_node *np, bool is_aspeed) +static int __init fttmr010_common_init(struct device_node *np, + bool is_aspeed, + int (*timer_shutdown)(struct clock_event_device *), + irq_handler_t irq_handler) { struct fttmr010 *fttmr010; int irq; @@ -345,7 +348,7 @@ static int __init fttmr010_common_init(struct device_node *np, bool is_aspeed) fttmr010->tick_rate); } - fttmr010->timer_shutdown = fttmr010_timer_shutdown; + fttmr010->timer_shutdown = timer_shutdown; /* * Setup clockevent timer (interrupt-driven) on timer 1. @@ -354,7 +357,7 @@ static int __init fttmr010_common_init(struct device_node *np, bool is_aspeed) writel(0, fttmr010->base + TIMER1_LOAD); writel(0, fttmr010->base + TIMER1_MATCH1); writel(0, fttmr010->base + TIMER1_MATCH2); - ret = request_irq(irq, fttmr010_timer_interrupt, IRQF_TIMER, + ret = request_irq(irq, irq_handler, IRQF_TIMER, "FTTMR010-TIMER1", &fttmr010->clkevt); if (ret) { pr_err("FTTMR010-TIMER1 no IRQ\n"); @@ -403,12 +406,16 @@ static int __init fttmr010_common_init(struct device_node *np, bool is_aspeed) static __init int aspeed_timer_init(struct device_node *np) { - return fttmr010_common_init(np, true); + return fttmr010_common_init(np, true, + fttmr010_timer_shutdown, + fttmr010_timer_interrupt); } static __init int fttmr010_timer_init(struct device_node *np) { - return fttmr010_common_init(np, false); + return fttmr010_common_init(np, false, + fttmr010_timer_shutdown, + fttmr010_timer_interrupt); } TIMER_OF_DECLARE(fttmr010, "faraday,fttmr010", fttmr010_timer_init); From patchwork Thu Nov 7 09:42:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 178798 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp765622ilf; Thu, 7 Nov 2019 01:43:02 -0800 (PST) X-Google-Smtp-Source: APXvYqyG9VKpMXrluMBY6+S1bblmIUk3hZVCj5d32u9L8V8YwvLu5YTrN0BZrPwozsSz48IyBZh3 X-Received: by 2002:a17:906:4bd4:: with SMTP id x20mr2102119ejv.200.1573119782346; Thu, 07 Nov 2019 01:43:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573119782; cv=none; d=google.com; s=arc-20160816; b=KSRGexMsZ609WhmJuOXnFmMlEgD5h4xJ57S3sp9YlERwYDEcCBzMaSxaRVzPBzY9F6 7nalCUV//aAFXuXxwCJ7fp2ulz6mFxv2Kqsz4nY9epGPECHG+b+mq3epZLEQOT8FGi99 2IECEQCV3ttSLZwwrtwjbpi9Thl3CIGazHvaTjyvCmCAlhZ2bCN2O8Pg2iOQ4y30wY9G 3RiN9QGGgngMYpolEPtlyYYWJhwY4hWxeN3ilF5hzxId426IvsP84mqaPza128tGC7hq tgHl6fO+6rog9EO4JYL6W3ybkD8ayzXSN+LxIgWUAfBl6HPI2Gckv3zENgEn7fRltaXl yJdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=itXp/vDqhHYMcsOhBE4Lb6epcLCaR4BGpG1zslxBhRk=; b=BZISYsos2OdlCQP/eIGRmtSyy08Qrou1YwVbW9gNO+ipXy6FjmXuaZNKaiukCkvIZG bcE7kQnvpC7xgj70euY0Tv22x6SW6qY5yQcLyYjxk0t0wIJoYuovGH+9Dlun8LzsiGKH 9b0mxJAsdMIqp0wLAzGZZm5px8G9vxSg4lodZBIfUojFO61SN/j/blYgJeMp1Dylz8rJ fxFrBFK85tOZWlks8dHvnCQDqIWgbfjZhA0RIk3oI+wrqCDQNuH/PRCmFeE5uCBtMQJC q40kD2NScSgGCKH1ArDsXpdLAt7E/wyLVEd6x1ay16jD7jdN4evpHeqPRCD9OXrsnPJ1 llCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Cc5v9DBG; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g17si959617edq.176.2019.11.07.01.43.02; Thu, 07 Nov 2019 01:43:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Cc5v9DBG; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387687AbfKGJm7 (ORCPT + 8 others); Thu, 7 Nov 2019 04:42:59 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:39167 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387839AbfKGJm5 (ORCPT ); Thu, 7 Nov 2019 04:42:57 -0500 Received: by mail-pf1-f194.google.com with SMTP id x28so2253370pfo.6; Thu, 07 Nov 2019 01:42:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=itXp/vDqhHYMcsOhBE4Lb6epcLCaR4BGpG1zslxBhRk=; b=Cc5v9DBGGv59y4S5c7w3BAKGlgux8FvfqN7hYf4ErrnQ/We+woYIxx5te3ucWu4ZoF 8q185rdwW1WrKPUnqYS5uY1Et35kDRkfXWNvHJ3KV1+PCM4Wnb09IuDnqiS7ejLJ4JoV 2vFvRKGcV8wbe2AIehLT/qKg8b+ezul2JWl+eJNAOI3x1U9MsZPaM/rBFysw3h7SoSMg Sw+hLVcPw9jkCSN6F85LL/ZgZi4EeuNoHU3iOav8gK3XC66q7dHi1+On1UJe3jokRkuL Oed+oKFyi/ftKSfooSXTn870ExZNskTVnaRveBNVX8TKF7uWVbP9+utF2oabuUGl5d8P 939w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=itXp/vDqhHYMcsOhBE4Lb6epcLCaR4BGpG1zslxBhRk=; b=IhIQsgclnR8SE/SmuoXiILwKQfZRdJAtW/IIgiAOWYdyK/92A3ujJrPKRpo7U2N7gl 3uO1+aU5fCuZ5M4OhYJVcBwm36Z1Y8JU8Vpcw7VDOe101zM8DuSoA3YdPCdj+zkVbM+R jWaodWiKu1oxGPBOYDIKmXx695kWA07WKhLvO03RizvPlpxqv1CGCRg5hZt1POjHlkcW 9VnKZV6+EAr7sPIah6IpyvSjzQZzYZK+ttXlD1ZqgmdSeeVblGBgjoUWu1/kZeLTLC4h whwc0r6eY9amU251Tr20uYNhE4imv/BBOz8lyBw7Un2bEttIzQ+qJ15JV8qhVp5eAEUT 9Aqw== X-Gm-Message-State: APjAAAXmkM7xp+xMPCZ9T8rBeZjZAXErRAAaX6KQMlFlkgV8BMHQSPji Eg24gP7Kk+66gAdHVAqKWrE= X-Received: by 2002:a63:2506:: with SMTP id l6mr3355808pgl.131.1573119776554; Thu, 07 Nov 2019 01:42:56 -0800 (PST) Received: from voyager.lan ([45.124.203.14]) by smtp.gmail.com with ESMTPSA id 12sm1958195pfp.79.2019.11.07.01.42.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2019 01:42:55 -0800 (PST) From: Joel Stanley To: Daniel Lezcano , Rob Herring Cc: =?utf-8?q?C=C3=A9dric_Le_Goater?= , Thomas Gleixner , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Linus Walleij , Andrew Jeffery , Rob Herring Subject: [PATCH v2 4/4] dt-bindings: fttmr010: Add ast2600 compatible Date: Thu, 7 Nov 2019 20:12:18 +1030 Message-Id: <20191107094218.13210-5-joel@jms.id.au> X-Mailer: git-send-email 2.24.0.rc1 In-Reply-To: <20191107094218.13210-1-joel@jms.id.au> References: <20191107094218.13210-1-joel@jms.id.au> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The ast2600 contains a fttmr010 derivative. Reviewed-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Joel Stanley --- Documentation/devicetree/bindings/timer/faraday,fttmr010.txt | 1 + 1 file changed, 1 insertion(+) -- 2.24.0.rc1 diff --git a/Documentation/devicetree/bindings/timer/faraday,fttmr010.txt b/Documentation/devicetree/bindings/timer/faraday,fttmr010.txt index 195792270414..3cb2f4c98d64 100644 --- a/Documentation/devicetree/bindings/timer/faraday,fttmr010.txt +++ b/Documentation/devicetree/bindings/timer/faraday,fttmr010.txt @@ -11,6 +11,7 @@ Required properties: "moxa,moxart-timer", "faraday,fttmr010" "aspeed,ast2400-timer" "aspeed,ast2500-timer" + "aspeed,ast2600-timer" - reg : Should contain registers location and length - interrupts : Should contain the three timer interrupts usually with