From patchwork Tue Nov 22 11:01:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Fritz X-Patchwork-Id: 697642 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3tNMwm4Tsmz9snk for ; Tue, 22 Nov 2016 22:01:44 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=googlemail.com header.i=@googlemail.com header.b="aj5fBbdl"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1F589A7558; Tue, 22 Nov 2016 12:01:43 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZUFfg7OUMWn0; Tue, 22 Nov 2016 12:01:43 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BE0944BD3D; Tue, 22 Nov 2016 12:01:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 83A094BD3D for ; Tue, 22 Nov 2016 12:01:39 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BbLcsOQ1mrvf for ; Tue, 22 Nov 2016 12:01:39 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-qt0-f193.google.com (mail-qt0-f193.google.com [209.85.216.193]) by theia.denx.de (Postfix) with ESMTPS id 263F14BA29 for ; Tue, 22 Nov 2016 12:01:35 +0100 (CET) Received: by mail-qt0-f193.google.com with SMTP id n6so1474716qtd.0 for ; Tue, 22 Nov 2016 03:01:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=SDwwNFFINABJCXUEr601Ro/O8hvDElzZyEq0DwOstPk=; b=aj5fBbdl0SdDdm535/oXOeUAh0+OOcrb4muNJqDECIZfNTPBL834pY17fKZVdYUrVq JHz45rwRYZq87OqvOFGDAkiQy4ICTydM7u+3ILlIBC/NPQNu8/e5ZKcXEIOus8mKghx1 tVF1wfl6SP7hwScdz5oHxzXrFZEy3KWZ7bAnV7IwRQiMCQ5Ur0cwK5OBMedeIUq6ZnIz XUlzPs1FU1hgv2AJZdT7SBulQthIOCHPFBsXqAeBdqNRsZcwS+IyRhYgZiMp3tfGOu55 tLZPd0ty1VpeV+8nIkXJQosMMO4n85NqkzksmwPXSJrt+Ql4aQ2xUBKc21HkRaO3fV5N M10Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=SDwwNFFINABJCXUEr601Ro/O8hvDElzZyEq0DwOstPk=; b=iJH9Row/+85kN2yIHmyFJ4+tvt5MagGOeFKQijR6PjVwodQPB7nwKkg/7/wUl3+ciS b2MilLAxOujKWPSc/eiKl/eEAc+SPy9QVGEqcaNhClyTHxUO/RGmjCtiFu72y1EhWTns 5RILJNY3BrrRJcMpWAxc1oBXD1ct186o2z5kf8BNitrAxvnm2swo6Bes4y4JCnYW3tBt uK/XChZ/MgvA6jx48yCT8o2zYzwq4v6R04UZBUHEJpKXTYENnNfi3RtdpbxQwXNCT+uT 28xFAEe5vfTiQ3c1ZAWkffMUPJlkxGj3HN/sz91yOcQHzounq+2LXymDlZK4EZ9oTY+F LMPQ== X-Gm-Message-State: AKaTC03Cy2SzJtkJ8egbJtRnNu2KNBrhT/gMh3bUVOHQ5dIAk81FeG1B+9z1vgcUYvMSJQ== X-Received: by 10.25.24.159 with SMTP id 31mr4431847lfy.101.1479812494024; Tue, 22 Nov 2016 03:01:34 -0800 (PST) Received: from lovely (anon-37-121.vpn.ipredator.se. [46.246.37.121]) by smtp.gmail.com with ESMTPSA id c78sm2130196lfc.39.2016.11.22.03.01.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Nov 2016 03:01:33 -0800 (PST) Date: Tue, 22 Nov 2016 12:01:28 +0100 From: Christoph Fritz To: Stefano Babic Message-ID: <20161122110128.GB15909@lovely> References: <1476291708.17741.11.camel@googlemail.com> <2aa22e43-49e8-73ab-0709-3a0a699a3e91@denx.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2aa22e43-49e8-73ab-0709-3a0a699a3e91@denx.de> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2] pwm: imx: increase support up to PWM8 for i.MX6SX X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch increases supported PWMs from previously PWM4 now up to PWM8 if i.MX6SX is in use. Signed-off-by: Christoph Fritz --- drivers/pwm/pwm-imx-util.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-imx-util.c b/drivers/pwm/pwm-imx-util.c index 285564a..534dd8e 100644 --- a/drivers/pwm/pwm-imx-util.c +++ b/drivers/pwm/pwm-imx-util.c @@ -15,7 +15,7 @@ #include #include -/* pwm_id from 0..3 */ +/* pwm_id from 0..7 */ struct pwm_regs *pwm_id_to_reg(int pwm_id) { switch (pwm_id) { @@ -27,6 +27,16 @@ struct pwm_regs *pwm_id_to_reg(int pwm_id) return (struct pwm_regs *)PWM3_BASE_ADDR; case 3: return (struct pwm_regs *)PWM4_BASE_ADDR; +#ifdef CONFIG_MX6SX + case 4: + return (struct pwm_regs *)PWM5_BASE_ADDR; + case 5: + return (struct pwm_regs *)PWM6_BASE_ADDR; + case 6: + return (struct pwm_regs *)PWM7_BASE_ADDR; + case 7: + return (struct pwm_regs *)PWM8_BASE_ADDR; +#endif default: printf("unknown pwm_id: %d\n", pwm_id); break;