From patchwork Thu Jun 25 22:40:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 6677791 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0EAA6C05AC for ; Thu, 25 Jun 2015 22:41:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0870E20711 for ; Thu, 25 Jun 2015 22:41:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 04D8B20351 for ; Thu, 25 Jun 2015 22:41:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751589AbbFYWlB (ORCPT ); Thu, 25 Jun 2015 18:41:01 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:33953 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751426AbbFYWlA (ORCPT ); Thu, 25 Jun 2015 18:41:00 -0400 Received: by lbnk3 with SMTP id k3so54220309lbn.1 for ; Thu, 25 Jun 2015 15:40:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=hbXnh52B/dYAT6ucVRFW1qu5MDrXgz8x9dnEuwMfzcU=; b=fXOXAqvJq1YFbVoZJ0m+cFTpgNPzDgiUIEezPDD6IvCTjhX3LH+cNIbIobJbNxYCGa b1I5NpnDHMtvEYWJio4Vu0YC+mSGz+fPt/B5ZkXUAVAk1Q9sDYCJFiz5G0odWYgfbtV0 IQBfSE/cKHSQ1JEB3s2zhlTc2+L71eTCq3hhz6RIdYzt9L52U7/CXnbwcHMZLuRRYmMT sf1FT+ia3InEwthURIhcQEeACicHtkgA9HUuMrp3i32ly5BW2kk68elKL+BIU6fR0t99 3PGfhazw0Evskz2wwiuPQ+LAO63ljGPzFMec9T7Og3BlyLrl2vK7AWE4UUA/RjM01hsw wNaQ== X-Gm-Message-State: ALoCoQkFdc5zO8B+KG5jmAnlj27Xnb8YDd89yXX2dGs1yX3XblnFofSUzdxO8kTpiENjKqySrHiK X-Received: by 10.112.42.50 with SMTP id k18mr18519332lbl.76.1435272058983; Thu, 25 Jun 2015 15:40:58 -0700 (PDT) Received: from wasted.cogentembedded.com (ppp85-141-193-152.pppoe.mtu-net.ru. [85.141.193.152]) by mx.google.com with ESMTPSA id jl4sm7587157lbc.14.2015.06.25.15.40.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jun 2015 15:40:58 -0700 (PDT) From: Sergei Shtylyov To: linus.walleij@linaro.org, linux-sh@vger.kernel.org, laurent.pinchart@ideasonboard.com, linux-gpio@vger.kernel.org Subject: [PATCH v3 1/3] sh-pfc: fix sparse GPIOs for R-Car SoCs Date: Fri, 26 Jun 2015 01:40:56 +0300 Message-ID: <2925145.E3lLFJfWJW@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.7 (Linux/4.0.5-200.fc21.x86_64; KDE/4.14.9; x86_64; ; ) In-Reply-To: <1460630.GxHT4lRd7u@wasted.cogentembedded.com> References: <1460630.GxHT4lRd7u@wasted.cogentembedded.com> MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 PFC driver causes the kernel to hang on the R-Car gen2 SoC based boards when the CPU_ALL_PORT() macro is fixed to reflect the reality, i.e. when the GPIO space becomes actually sparse. This happens because the _GP_GPIO() macro includes an indexed initializer which causes the "holes" (array entries filled with all 0s) between the groups of the existing GPIOs; and the driver can't cope with that. There seems to be no reason to use the indexed initializer, so we can remove the index specifier and so avoid the "holes". Signed-off-by: Sergei Shtylyov Acked-by: Laurent Pinchart Tested-by: Geert Uytterhoeven --- Changes in version 3: - new patch. drivers/pinctrl/sh-pfc/sh_pfc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-pinctrl/drivers/pinctrl/sh-pfc/sh_pfc.h =================================================================== --- linux-pinctrl.orig/drivers/pinctrl/sh-pfc/sh_pfc.h +++ linux-pinctrl/drivers/pinctrl/sh-pfc/sh_pfc.h @@ -224,7 +224,7 @@ struct sh_pfc_soc_info { /* PINMUX_GPIO_GP_ALL - Expand to a list of sh_pfc_pin entries */ #define _GP_GPIO(bank, _pin, _name, sfx) \ - [(bank * 32) + _pin] = { \ + { \ .pin = (bank * 32) + _pin, \ .name = __stringify(_name), \ .enum_id = _name##_DATA, \