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: 488580 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 29E371400A0 for ; Fri, 26 Jun 2015 08:41:02 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751557AbbFYWlB (ORCPT ); Thu, 25 Jun 2015 18:41:01 -0400 Received: from mail-la0-f43.google.com ([209.85.215.43]:32957 "EHLO mail-la0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750993AbbFYWlA (ORCPT ); Thu, 25 Jun 2015 18:41:00 -0400 Received: by laka10 with SMTP id a10so53605810lak.0 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=i9MYbmHwCw0bW02cfQJzPQGeOhCUzUaBeprumJqozg/BQuOAwwJ7SugUr3Yjt0lSNs ccWxdr0D1na6OsnXM/9Co+/M6pNggEoinORq55ApBmsX5RYqVN1cn+otW+HYH1c1UqhJ EqZJG/oKfCx80EHf3GFNOkmzbyH3Msc9RcjTI6ZNd0GRoef3e/CoBK87DIIc0MpqI6QG l890CAivPHCioQ0Eas+76QLBHRBa/u4K/ezJ+aFYQEvSKJsQt7dME4sy21b1XMXkCj/s 5k+aJX5Hymi906N92iTAGN6SWXlFaC5Ggjch9U9RuqdqSQOIpkoO/TFxX27bJtwq/bEx x2zQ== X-Gm-Message-State: ALoCoQlEn/K008eZkl3tTSw60k5EHriq88ifsnlpA84gge3so6uMD+60kSwYvwoUWdThPNmd66cV 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-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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-gpio" 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, \