From patchwork Tue Jun 14 06:26:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Tietz X-Patchwork-Id: 635434 X-Patchwork-Delegate: trini@ti.com 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 3rTZz50KC7z9t1W for ; Wed, 15 Jun 2016 02:36:17 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3D76CA75A9; Tue, 14 Jun 2016 18:36:15 +0200 (CEST) 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 7H5qCax89LMR; Tue, 14 Jun 2016 18:36:15 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 95D60A75AA; Tue, 14 Jun 2016 18:31:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ED2B7A751B for ; Tue, 14 Jun 2016 08:36:38 +0200 (CEST) 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 eanhWMvMpHtn for ; Tue, 14 Jun 2016 08:36:24 +0200 (CEST) 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.moses.super-online.de (moses.super-online.de [5.9.156.4]) by theia.denx.de (Postfix) with ESMTPS id 713EBA74F1 for ; Tue, 14 Jun 2016 08:36:01 +0200 (CEST) Received: by mail.moses.super-online.de (Postfix, from userid 303) id 5884C2840884; Tue, 14 Jun 2016 08:27:02 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on moses.super-online.de X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 Received: from mail.moses.super-online.de (localhost [127.0.0.1]) by mail.moses.super-online.de (Postfix) with ESMTP id E7254284087E for ; Tue, 14 Jun 2016 08:26:58 +0200 (CEST) Received: from lightning.dresden.micronet24.de (dresden.micronet24.de [89.247.133.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: web53p1) by mail.moses.super-online.de (Postfix) with ESMTPSA id A50DB284087A for ; Tue, 14 Jun 2016 08:26:58 +0200 (CEST) Received: from obelix.dresden.micronet24.de ([192.168.0.14]) by lightning.dresden.micronet24.de with esmtp (Exim 4.84_2) (envelope-from ) id 1bChoP-0007eu-Ow for u-boot@lists.denx.de; Tue, 14 Jun 2016 08:26:57 +0200 Received: from localhost ([::1] helo=obelix.dresden.micronet24.de) by obelix.dresden.micronet24.de with esmtp (Exim 4.84_2) (envelope-from ) id 1bChoP-00059g-MD for u-boot@lists.denx.de; Tue, 14 Jun 2016 08:26:57 +0200 Mime-Version: 1.0 From: Benjamin Tietz To: u-boot@lists.denx.de Date: Tue, 14 Jun 2016 08:26:57 +0200 Message-ID: <20160614062657.19763.19764.stgit@obelix.dresden.micronet24.de> In-Reply-To: <20160614062627.19763.81538.stgit@obelix.dresden.micronet24.de> References: <20160614062627.19763.81538.stgit@obelix.dresden.micronet24.de> User-Agent: StGit/0.17.1-dirty X-SA-Exim-Connect-IP: 192.168.0.14 X-SA-Exim-Mail-From: uboot@dresden.micronet24.de X-SA-Exim-Scanned: No (on lightning.dresden.micronet24.de); SAEximRunCond expanded to false X-Virus-Scanned: ClamAV SMTP VirusScan X-Mailman-Approved-At: Tue, 14 Jun 2016 18:26:04 +0200 Subject: [U-Boot] [PATCH1/3] stm32: gpio: fix otype access 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" the GPIOx_OTYPER register has only one bit for every pin. --- drivers/gpio/stm32_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) the GPIOx_OTYPER register has only one bit for every pin. --- drivers/gpio/stm32_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/stm32_gpio.c b/drivers/gpio/stm32_gpio.c index 50f86d3..2457211 100644 --- a/drivers/gpio/stm32_gpio.c +++ b/drivers/gpio/stm32_gpio.c @@ -66,7 +66,7 @@ int stm32_gpio_config(const struct stm32_gpio_dsc *dsc, i = dsc->pin * 2; clrsetbits_le32(&gpio_regs->moder, 0x3 << i, ctl->mode << i); - clrsetbits_le32(&gpio_regs->otyper, 0x3 << i, ctl->otype << i); + clrsetbits_le32(&gpio_regs->otyper, 0x1 << dsc->pin, ctl->otype << dsc->pin); clrsetbits_le32(&gpio_regs->ospeedr, 0x3 << i, ctl->speed << i); clrsetbits_le32(&gpio_regs->pupdr, 0x3 << i, ctl->pupd << i);