From patchwork Mon Oct 19 15:02:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 7437731 Return-Path: X-Original-To: patchwork-linux-omap@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 464509F302 for ; Mon, 19 Oct 2015 15:02:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 72A1520656 for ; Mon, 19 Oct 2015 15:02:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7ADA4206D0 for ; Mon, 19 Oct 2015 15:02:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753901AbbJSPCY (ORCPT ); Mon, 19 Oct 2015 11:02:24 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:33719 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753885AbbJSPCW (ORCPT ); Mon, 19 Oct 2015 11:02:22 -0400 Received: by wijp11 with SMTP id p11so10533270wij.0 for ; Mon, 19 Oct 2015 08:02:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:organization:message-id:date :user-agent:mime-version:content-type:content-transfer-encoding; bh=Fn15c1IJx16qsaB1f7eQtpGTXtvYrm15qt8dcXgEKYc=; b=V5UlBo+1oUfyk7Lmji7v5xADAvUMwrnX+SRRJ97ancS9ykKAGu0PvOr+COWvbIrV0G qXe6ZpQwdeNcOcBQhHywam/lVzWTaW8EKUJobGHT8lbFZDfQ9jInxM9PDiTN9EcDjRyW bJamxBL65DsS1GOHdzWaPq2EYbUqRp+9YhJbd2gPIGQAV74a9xB4YpPDY4VDiNbQrSm5 mfEH3OfBXDWe7ViLH5JmyDUAbo6CKvlDUCqDgBTXrfo5d/k7RaJROrn40VUxB7Eg/QNZ byZn3ihxpq6SOmpYXgt/lD2Vkj0Z/ZbkZVvYay8W9bx6L8ZGQXn27fgJVBblYokcHMpR Akqg== X-Gm-Message-State: ALoCoQl/9C8zn84hLHqZhSO1LUPe//mQ0BOredjxD4NtJeGHdN7XZAVsPzB6VdULZA0AJoiT6xLQ X-Received: by 10.194.246.102 with SMTP id xv6mr34176728wjc.58.1445266941615; Mon, 19 Oct 2015 08:02:21 -0700 (PDT) Received: from [192.168.2.52] (cag06-6-78-235-100-105.fbx.proxad.net. [78.235.100.105]) by smtp.gmail.com with ESMTPSA id ry1sm40684554wjb.24.2015.10.19.08.02.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Oct 2015 08:02:20 -0700 (PDT) From: Neil Armstrong To: Thierry Reding , Tony Lindgren , linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, Grant Erickson , NeilBrown , Joachim Eastwood Subject: [RFC PATCH v2 3/3] arm: plat-omap: Add PWM dmtimer platform data quirks Organization: Baylibre Message-ID: <562505F3.3000508@baylibre.com> Date: Mon, 19 Oct 2015 17:02:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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(+) diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index ea56397..647dec5 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 #include @@ -453,6 +455,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(). @@ -506,6 +526,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),