From patchwork Mon May 12 18:16:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joachim Eastwood X-Patchwork-Id: 4160561 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6655B9F387 for ; Mon, 12 May 2014 18:16:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 941C6202B4 for ; Mon, 12 May 2014 18:16:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B2FF52018A for ; Mon, 12 May 2014 18:16:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753260AbaELSQt (ORCPT ); Mon, 12 May 2014 14:16:49 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:60096 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751616AbaELSQs (ORCPT ); Mon, 12 May 2014 14:16:48 -0400 Received: by mail-la0-f52.google.com with SMTP id gl10so2171565lab.25 for ; Mon, 12 May 2014 11:16:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=rtcfGa5YkBC0arhbo2oBXaUOLhhRRjQ3Q2lAtg0LNvg=; b=ChVAqXwgyqsQ99FFDFZPV44TXLXqhFQQqpEqewwjoobYMvxXVy/GwNEdE7cY/jUzR5 hxDHSc0L/gIxiDZcGu5zr5tzQPQFiW6VfgA7AHiOMO0Hn2kHLgT1VMPVZ0R12sH9bUv0 3KDaxM5mzRum77HWW28IzJmoxnT/AdB06ecac32mlj/weov6rMQp+5sz138uTCQFI6Za 4RdxsaBzieXVSOnFp/Apgvw7w9fzP2+TjZPiw/aUnVJA5IWajuDTKzbqlxIqgpvjGxCI DJ3fsCZnJSdb+86woya5mkglSSjVK2qKTwa8vdV9s41UcNGDXGgg0VM3/JluU4KbSyd7 dTkw== X-Received: by 10.112.149.231 with SMTP id ud7mr2808169lbb.42.1399918607112; Mon, 12 May 2014 11:16:47 -0700 (PDT) Received: from localhost.localdomain ([90.149.48.183]) by mx.google.com with ESMTPSA id zx3sm14523796lbc.2.2014.05.12.11.16.44 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 May 2014 11:16:45 -0700 (PDT) From: Joachim Eastwood To: tony@atomide.com Cc: linux-omap@vger.kernel.org, Joachim Eastwood Subject: [PATCH] ARM: dts: Change IOPAD macro's for OMAP4/5 Date: Mon, 12 May 2014 20:16:27 +0200 Message-Id: <1399918587-20170-1-git-send-email-manabian@gmail.com> X-Mailer: git-send-email 1.8.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=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 The OMAP4/5 TRMs primarily list address offsets from the padconf physical address (which is not driver base address) and not always the absolute physical address for padconf registers like some other OMAP TRMs. So create a new macro to use this offset and to avoid confusion between different OMAP parts. Signed-off-by: Joachim Eastwood --- include/dt-bindings/pinctrl/omap.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/include/dt-bindings/pinctrl/omap.h b/include/dt-bindings/pinctrl/omap.h index b04528cd033c..827e80964a35 100644 --- a/include/dt-bindings/pinctrl/omap.h +++ b/include/dt-bindings/pinctrl/omap.h @@ -62,12 +62,17 @@ #define OMAP3630_CORE2_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x25a0) (val) #define OMAP3_WKUP_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x2a00) (val) #define AM33XX_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) -#define OMAP4_CORE_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0040) (val) -#define OMAP4_WKUP_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0xe040) (val) #define AM4372_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x0800) (val) -#define OMAP5_CORE_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x2840) (val) -#define OMAP5_WKUP_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0xc840) (val) #define DRA7XX_CORE_IOPAD(pa, val) OMAP_IOPAD_OFFSET((pa), 0x3400) (val) +/* + * Macros to allow using the offset from the padconf physical address + * instead of the offset from padconf base. + */ +#define OMAP_PADCONF_OFFSET(offset, base_offset) ((offset) - (base_offset)) + +#define OMAP4_IOPAD(offset, val) OMAP_PADCONF_OFFSET((offset), 0x0040) (val) +#define OMAP5_IOPAD(offset, val) OMAP_PADCONF_OFFSET((offset), 0x0040) (val) + #endif