From patchwork Fri Jan 22 16:15:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 8091231 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 624449F1C0 for ; Fri, 22 Jan 2016 16:17:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8E1F52042A for ; Fri, 22 Jan 2016 16:17:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B030120328 for ; Fri, 22 Jan 2016 16:17:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aMeNy-0000dC-KF; Fri, 22 Jan 2016 16:16:30 +0000 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aMeNt-0000OA-Rr for linux-arm-kernel@lists.infradead.org; Fri, 22 Jan 2016 16:16:27 +0000 Received: by mail-wm0-x22d.google.com with SMTP id r129so219542826wmr.0 for ; Fri, 22 Jan 2016 08:16:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DLGluoPBfYRH7Tux/tyu9bLI8GIE/k8uWpuc09ZSO0g=; b=CzE3UqPOc5wGqM7WHJkx1xllhVwI8gBEk2xskDhLZ5jBDR+0HE4e5UQzLrrXkXvPYz 0V/I6k0DzMiG+H70SLDzWLLcBxvQcV474I8tBJ4RJd864xN3HyQIvd6qM7tbtz3wxu2Y B/LMCAi7TYAFuX2egF8l0vYkcCrhOi483fMYMSU3bvCBtO6qFgtPK5uHr51Cg1R2QNXy FqLTVyOo6NkAiO0BL2NUG0PlZEnsj+TbRtdWwlMvMvZtNuYHQ0YdEfGJsVAQaAB3FPLO eeRaEsR2kc4H2AtqZPPtw+Fy5tQXWSQascvFMaSm5O1BSowPhupspm3ztUrWkxeMWPGf AB8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DLGluoPBfYRH7Tux/tyu9bLI8GIE/k8uWpuc09ZSO0g=; b=lENBcn943+m0VBlJ6oz1fpa0KlOie+msvpqMhFs+FXhp53gJKdzwXJ7CdxawlRA+bZ HwYM24qTw/S/WhdyL2VRvReb7s6CIPfomV+w9ueJMH6o++4iiD1gCwbs+q8P/dWBn9N2 csnqnlIbE2/Aem+ezK7VLxt1pSzPWg4NaZpG/2ebIA37jmtTtb7vzrdMY2uXkMjKau2m 86OHCP2yMFNCj5f7rP5aRGCxT7L+U+UXEAtj7GnzWsvYYr7S8y7Km2t+evRj8vfJYkUz sbn6vaR4QTJjVwZ+3Z5RzI8pqMAw4RrqSq3h3beDPFumGxJeqA8orxVyHNQfqAVgpasy v0Sg== X-Gm-Message-State: AG10YOROuGlapJBXGKn125mYwF1HMjv0w1FwS7sANYZxReek2HbpYwZrcpu+MmvH7TJeGByf X-Received: by 10.194.202.135 with SMTP id ki7mr4608976wjc.81.1453479363843; Fri, 22 Jan 2016 08:16:03 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id ll9sm4696212wjc.29.2016.01.22.08.16.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Jan 2016 08:16:01 -0800 (PST) From: Neil Armstrong To: thierry.reding@gmail.com, tony@atomide.com, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: [PATCH repost] arm: plat-omap: Add PWM dmtimer platform data quirks Date: Fri, 22 Jan 2016 17:15:51 +0100 Message-Id: <1453479351-21825-1-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <20151130183707.GK2517@atomide.com> References: <20151130183707.GK2517@atomide.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160122_081626_064510_C436FE04 X-CRM114-Status: GOOD ( 11.04 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In order to set the currently platform dependent dmtimer functions pointers as platform data for the pwm-omap-dmtimer platform driver, add it to plat-omap auxdata_lookup table. Suggested-by: Tony Lindgren Signed-off-by: Neil Armstrong --- arch/arm/mach-omap2/pdata-quirks.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) Tony, Thierry, The previous patches are now upstream, here is a repost of the patch re-tested against mainline. Ref: http://lkml.kernel.org/r/56374592.4060201@baylibre.com Patchset: http://lkml.kernel.org/r/5620ED2C.1090107@baylibre.com Neil diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index e781e4f..a935d28 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include "common.h" #include "common-board-devices.h" @@ -449,6 +451,24 @@ void omap_auxdata_legacy_init(struct device *dev) dev->platform_data = &twl_gpio_auxdata; } +/* Dual mode timer PWM callbacks platdata */ +#if IS_ENABLED(CONFIG_OMAP_DM_TIMER) +struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = { + .request_by_node = omap_dm_timer_request_by_node, + .free = omap_dm_timer_free, + .enable = omap_dm_timer_enable, + .disable = omap_dm_timer_disable, + .get_fclk = omap_dm_timer_get_fclk, + .start = omap_dm_timer_start, + .stop = omap_dm_timer_stop, + .set_load = omap_dm_timer_set_load, + .set_match = omap_dm_timer_set_match, + .set_pwm = omap_dm_timer_set_pwm, + .set_prescaler = omap_dm_timer_set_prescaler, + .write_counter = omap_dm_timer_write_counter, +}; +#endif + /* * Few boards still need auxdata populated before we populate * the dev entries in of_platform_populate(). @@ -502,6 +522,9 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3", &wkup_m3_data), #endif +#if IS_ENABLED(CONFIG_OMAP_DM_TIMER) + OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata), +#endif #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu", &omap4_iommu_pdata),