From patchwork Thu Mar 20 09:21:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 26668 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 32E66202E0 for ; Thu, 20 Mar 2014 09:22:34 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id b6sf1556405yha.0 for ; Thu, 20 Mar 2014 02:22:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=h43GaxU3auE8eLt45erMVxwWdsD+aFpobUtGQ3nOX4U=; b=J35aK4I7oMVareAyugWsPhypO/tyZeWTFowTCXGVdJxWHrxqpwCJwHIQaovygL7/lg txcg9czp6iWVKpVAIywg1PBW2yXL9lcNVujh0D2SIzJgff/8g8dN1ap7YIvly4s3u7ng 7HCw2gBCjxkktUXa+NoolfGsAynMEJ/GKPWwLDMI6PDifZ/EDHQRggK5gUrb8GDdVewu 07m/OsX035lRWg+dFA3FwgZalvxavGv1EiHtpnHqrnz+1Vo/c728simqCYM3/6yzKPkK UQ6RGdLL/Iy6APQ2Tn1p1sS9UetJ0G6Oy5iUToepZHoFN6Jtgfd9Uduh4kAWFNW1N9by yJdw== X-Gm-Message-State: ALoCoQkK3QLI7cOpTiteY+9IVj3XMneGH0dXIT8I1tY7MOE+zOMYtnnpV1gn2nBraPSR7Tm3RzYp X-Received: by 10.58.7.134 with SMTP id j6mr7508016vea.29.1395307353937; Thu, 20 Mar 2014 02:22:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.35 with SMTP id m32ls159730qgd.81.gmail; Thu, 20 Mar 2014 02:22:33 -0700 (PDT) X-Received: by 10.52.242.167 with SMTP id wr7mr3803229vdc.32.1395307353725; Thu, 20 Mar 2014 02:22:33 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id t4si294493vcz.58.2014.03.20.02.22.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Mar 2014 02:22:33 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id pa12so607837veb.1 for ; Thu, 20 Mar 2014 02:22:33 -0700 (PDT) X-Received: by 10.220.92.135 with SMTP id r7mr33372939vcm.11.1395307353627; Thu, 20 Mar 2014 02:22:33 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.78.9 with SMTP id i9csp372594vck; Thu, 20 Mar 2014 02:22:33 -0700 (PDT) X-Received: by 10.194.2.168 with SMTP id 8mr32762992wjv.8.1395307352568; Thu, 20 Mar 2014 02:22:32 -0700 (PDT) Received: from mail-we0-f180.google.com (mail-we0-f180.google.com [74.125.82.180]) by mx.google.com with ESMTPS id wu7si831915wjb.140.2014.03.20.02.22.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Mar 2014 02:22:32 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.180 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.180; Received: by mail-we0-f180.google.com with SMTP id p61so362031wes.39 for ; Thu, 20 Mar 2014 02:22:32 -0700 (PDT) X-Received: by 10.180.101.230 with SMTP id fj6mr1694548wib.27.1395307351906; Thu, 20 Mar 2014 02:22:31 -0700 (PDT) Received: from lee--X1.home (host109-148-116-196.range109-148.btcentralplus.com. [109.148.116.196]) by mx.google.com with ESMTPSA id di9sm4735120wid.6.2014.03.20.02.22.30 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Mar 2014 02:22:31 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, computersforpeace@gmail.com Cc: linux-mtd@lists.infradead.org, dwmw2@infradead.org, Angus.Clark@st.com, Lee Jones Subject: [PATCH v6 35/36] mtd: st_spi_fsm: Convert ST SPI FSM (NOR) Flash driver to new DT partitions Date: Thu, 20 Mar 2014 09:21:07 +0000 Message-Id: <1395307268-12721-36-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1395307268-12721-1-git-send-email-lee.jones@linaro.org> References: <1395307268-12721-1-git-send-email-lee.jones@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The old API expected a "partitions" property provided a phandle to a separate partitions node, which itself contained yet more nodes each representing one partition. The new API rids the requirement for the superfluous intermediary partitions node. This patch provides the added information required for automatic parsing by the core. Signed-off-by: Lee Jones --- drivers/mtd/devices/st_spi_fsm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c index dccbac0..aefd48d 100644 --- a/drivers/mtd/devices/st_spi_fsm.c +++ b/drivers/mtd/devices/st_spi_fsm.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -1997,6 +1998,7 @@ boot_device_fail: static int stfsm_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; + struct mtd_part_parser_data ppdata; struct flash_info *info; struct resource *res; struct stfsm *fsm; @@ -2006,6 +2008,7 @@ static int stfsm_probe(struct platform_device *pdev) dev_err(&pdev->dev, "No DT found\n"); return -EINVAL; } + ppdata.of_node = np; fsm = devm_kzalloc(&pdev->dev, sizeof(*fsm), GFP_KERNEL); if (!fsm) @@ -2062,6 +2065,7 @@ static int stfsm_probe(struct platform_device *pdev) return ret; } + fsm->mtd.name = info->name; fsm->mtd.dev.parent = &pdev->dev; fsm->mtd.type = MTD_NORFLASH; fsm->mtd.writesize = 4; @@ -2081,7 +2085,7 @@ static int stfsm_probe(struct platform_device *pdev) (long long)fsm->mtd.size, (long long)(fsm->mtd.size >> 20), fsm->mtd.erasesize, (fsm->mtd.erasesize >> 10)); - return mtd_device_parse_register(&fsm->mtd, NULL, NULL, NULL, 0); + return mtd_device_parse_register(&fsm->mtd, NULL, &ppdata, NULL, 0); } static int stfsm_remove(struct platform_device *pdev)