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: 8091181 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8741DBEEE5 for ; Fri, 22 Jan 2016 16:16:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 74878203F7 for ; Fri, 22 Jan 2016 16:16:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5944C20328 for ; Fri, 22 Jan 2016 16:16:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753191AbcAVQQH (ORCPT ); Fri, 22 Jan 2016 11:16:07 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:36874 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751250AbcAVQQG (ORCPT ); Fri, 22 Jan 2016 11:16:06 -0500 Received: by mail-wm0-f51.google.com with SMTP id n5so139933538wmn.0 for ; Fri, 22 Jan 2016 08:16:04 -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=bPIUHzqHP3s3ojLFV+IlzlS86SMghroX81dCB6n7tvGNY6VKWcFTLX4GXpRl4KPX73 naIIm3+lT5PlioeVwad9TcHRfynNCuftay15lBY44Iin3yqcqQRFCcZElOnBrPvIanoP wgnZJeGAaKbRhCexLEscAXByU+19mjC/mBySQoZZw5Ml5JyywI9My86AioehfOvVOBRg Yzv0yWaV4T1zjsGd/XBUi9sH7JmMMtM596yCiqZsIFmVs9ZklsnIiSj78F8rxgkPVT30 rL9YCGQ9Hr02BpSA5/MUIaUPzyjqj2MjuoRBOQE9CdYh5ulPb5BgigCfvLEv15upc/xs ZSOA== X-Gm-Message-State: AG10YOQ3MLBEnWHVIAViG1EpGpB1snVBEyAdR4xeKBkJkNlDg01VpijsNe8c2NBSk1Pn8owf 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 Cc: Neil Armstrong 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> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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),