From patchwork Thu Oct 11 12:41:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12163 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 38F4223FB3 for ; Thu, 11 Oct 2012 12:42:35 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id B6A26A18036 for ; Thu, 11 Oct 2012 12:42:34 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so2776510iej.11 for ; Thu, 11 Oct 2012 05:42:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=Qf/GboMgoWt8iLnbXpS7+bC8yOpqpZYlNNROb58Sv44=; b=LDk+TxlGHziWNmopOUrgXmFjIX7uXXJXoUUcEy0eCpJo2KssUXR0loKL+YsBHeOkLF ASwjZ2LBa9yxfEAYYey4ayRVMP1YCqEtZ/qL6hc4TDu45NdTqv2cX4AVGM6q/7oUy6Qk a2jlNyMTGYelmh/Ffei1bbMPe960qyNfcEG1VysSvIl5Sf+tkFGPJ5tqxUYQJiDkTfQt RKlbVO1ogEHhPmhfQ5x/Tl2p2l4ZdCSrv07BHhaCFenFIrnKnCYuMw/bWfd04sSTEBnw lYZ84QIXySc/tNdQ9V7cQMj9tN0+ctVT8Fb2doFJE9j+Q85Bt8auklfwJmKI6P3EXHWh Ho/g== Received: by 10.42.145.66 with SMTP id e2mr541251icv.18.1349959354189; Thu, 11 Oct 2012 05:42:34 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp27729igt; Thu, 11 Oct 2012 05:42:33 -0700 (PDT) Received: by 10.14.194.72 with SMTP id l48mr1319282een.9.1349959352583; Thu, 11 Oct 2012 05:42:32 -0700 (PDT) Received: from eu1sys200aog113.obsmtp.com (eu1sys200aog113.obsmtp.com [207.126.144.135]) by mx.google.com with SMTP id j5si3252406eeo.86.2012.10.11.05.42.25 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Oct 2012 05:42:32 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.135 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.135; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.135 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob113.postini.com ([207.126.147.11]) with SMTP ID DSNKUHa+sGkq4b2a8vD4gjZQmrjIigicVox9@postini.com; Thu, 11 Oct 2012 12:42:32 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 99FC423C; Thu, 11 Oct 2012 12:41:50 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 45B4B44A5; Thu, 11 Oct 2012 12:41:50 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id A4CABA809D; Thu, 11 Oct 2012 14:41:44 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Thu, 11 Oct 2012 14:41:49 +0200 From: Linus Walleij To: , , Arnd Bergmann Cc: Stephen Warren , Anmar Oueja , Linus Walleij Subject: [PATCH] pinctrl/nomadik: provide stubs for legacy Nomadik Date: Thu, 11 Oct 2012 14:41:42 +0200 Message-ID: <1349959302-12151-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQk/6XmY58YfqKBX5gK63GcDcunAVTD1FzHBQeMhDVlcOvtXiDEiR2ygmzeVPhi+FFAZRX3i From: Linus Walleij The compilation of the pinctrl driver failed on the legacy Nomadik NHK8815 platform because it was not providing the PRCMU interfaces needed to support the extended alternate functions used by the ux500 series. Solve this by providing some stubs for the legacy platform, to avoid too much #ifdefs in the code per se. Theoretically this actually allows the Nomadik and Ux500 to have a single kernel image with support for the PRCM registers on the Ux500 (though they have incompatible archs, but the spirit is there). Reported-by: Arnd Bergmann Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-nomadik.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index fec9c30..f640f13 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c @@ -30,7 +30,20 @@ #include /* Since we request GPIOs from ourself */ #include +/* + * For the U8500 archs, use the PRCMU register interface, for the older + * Nomadik, provide some stubs. The functions using these will only be + * called on the U8500 series. + */ +#ifdef CONFIG_ARCH_U8500 #include +#else +static inline u32 prcmu_read(unsigned int reg) { + return 0; +} +static inline void prcmu_write(unsigned int reg, u32 value) {} +static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value) {} +#endif #include