From patchwork Mon Nov 2 11:14:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 7535651 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 565309F327 for ; Mon, 2 Nov 2015 11:16:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7F31620573 for ; Mon, 2 Nov 2015 11:16:55 +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 A530920576 for ; Mon, 2 Nov 2015 11:16:54 +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 1ZtD54-00078C-3O; Mon, 02 Nov 2015 11:15:18 +0000 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZtD4m-00068D-QP for linux-arm-kernel@lists.infradead.org; Mon, 02 Nov 2015 11:15:02 +0000 Received: by wmeg8 with SMTP id g8so56002149wme.0 for ; Mon, 02 Nov 2015 03:14:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre_com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:organization:message-id:date:user-agent :mime-version:content-type:content-transfer-encoding; bh=Fn15c1IJx16qsaB1f7eQtpGTXtvYrm15qt8dcXgEKYc=; b=StQruV0tfBulLh6iulDDIomteDQf/kLubNWEQYhlHwBlyizmm6il2U91qW2NEuMw1k t2VA4ixgrbV0fxWMWUQzQywJvwExSz10mXCGqPm4BSgb/+Oz+wGQcKvgQ2h4QTfQjIiy jl7DBYaJLAiU6CPaWGfXsiT91A/Sfb9K+tt+K8olfIl67L0VB3S/G4a62mwXpQR/EFy4 tF0HwB3pSYN+bo9bzKjNJbbprJYBptbItZtZjBSajBJuqaRaa1NngFveQseJZeDuARpM Bnlx4RACSSXrsG5xE8MngERAScKmvz19PGfFmPQH/OA0zS3IdScAV0x/qx1L+ssM8EM8 nSWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:organization:message-id:date :user-agent:mime-version:content-type:content-transfer-encoding; bh=Fn15c1IJx16qsaB1f7eQtpGTXtvYrm15qt8dcXgEKYc=; b=Kof8sN7RmMfLEnkowAbxO/T/m3p/fodIqgH10Y2W2CvqBF85X53BvT9qW1rRH3vJ/Q WwKWE2frOXxs6WNAEvQo/VgKabJq5+NtDoVPIZ+wHhR4FTqR6En1ueMDLi9s5R1FjjH7 jmX+AFRVlZuzmbqWYzlqOdR+QhB0ukkZG0rC+OOkvYztJWOFgjwV5hA3EbHA0xpjqkEB jFW/PQbGoiWwStTFMLe0DwCx+qOAmMpHZzANGRkhwWhUpxmIXzBRTpHbjbrtTnkEyEec WeTFRYqik4Hc6+VFDO7Ad+rr7kCMglmZfIVZlUBbsAkt4v17+XAbV+9POusKqGaIPW/C igdg== X-Gm-Message-State: ALoCoQkNLWC1IDwgwDiYxlJ8kdK/kO2edyAIOFeL5oRFrm8kbY3Dk1D+C1KKXmt/bDR7HDeuLu7J X-Received: by 10.28.145.132 with SMTP id t126mr11773032wmd.31.1446462879404; Mon, 02 Nov 2015 03:14:39 -0800 (PST) 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 y77sm17532784wme.15.2015.11.02.03.14.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Nov 2015 03:14:36 -0800 (PST) From: Neil Armstrong Subject: [PATCH 3/3] arm: plat-omap: Add PWM dmtimer platform data quirks 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 Organization: Baylibre Message-ID: <56374592.4060201@baylibre.com> Date: Mon, 2 Nov 2015 12:14:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151102_031501_040161_36E5C55F X-CRM114-Status: GOOD ( 13.21 ) X-Spam-Score: -1.2 (-) 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: , 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, T_DKIM_INVALID, T_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),