From patchwork Fri Sep 18 14:53:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 53892 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id 237FD218E3 for ; Fri, 18 Sep 2015 14:55:19 +0000 (UTC) Received: by lbot4 with SMTP id t4sf17967259lbo.0 for ; Fri, 18 Sep 2015 07:55:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=JoooKbDlJrIQLqHbolsTpu2LACW9WZWZtduX5McZYrA=; b=baff1HE8Im0H3RhgMGGvG8F3TAekS6v91nf+pkF+GF9qBQ7PMVIl85lDC+UV00KJVQ 4aVCekHtininLDKR1+9D3UJDFiJ82i1dhMR433ju++IefcKFG+t5+p/AgfGTLAUU9As7 YU3S6RukaCK9rR1FOmxPK3/NjqkRRq9nZTmob+JsrsAKwUGBwFTloHKWlfUkf++QhsFu FN3WbnMbZOj5qllg5pf2BIcJy3lQ6rRvuIvIvSOAAWeZ4RsXeSotIvdCESbx5cL2tTq/ mTtqA9za2j7Fg4wLO8jKvRrfAGKJ/alCDFNlAMtZ8vS8M1ccA3wwC1FqI4a48/DBTRhq jCQA== X-Gm-Message-State: ALoCoQlhE3Ep63OM5hOC/FsRDsh00+9vV1Gfj3si5s1pOaMcO89/QVMtwENe7p1rWhkSKNgEtKwG X-Received: by 10.152.26.5 with SMTP id h5mr988214lag.5.1442588116917; Fri, 18 Sep 2015 07:55:16 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.20.134 with SMTP id n6ls214338lae.104.gmail; Fri, 18 Sep 2015 07:55:16 -0700 (PDT) X-Received: by 10.112.132.74 with SMTP id os10mr3383558lbb.40.1442588116785; Fri, 18 Sep 2015 07:55:16 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id wq7si6234358lbc.105.2015.09.18.07.55.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Sep 2015 07:55:16 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by lahg1 with SMTP id g1so32475366lah.1 for ; Fri, 18 Sep 2015 07:55:16 -0700 (PDT) X-Received: by 10.112.130.70 with SMTP id oc6mr3463442lbb.32.1442588116463; Fri, 18 Sep 2015 07:55:16 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp343933lbq; Fri, 18 Sep 2015 07:55:15 -0700 (PDT) X-Received: by 10.107.35.16 with SMTP id j16mr15500081ioj.167.1442588115374; Fri, 18 Sep 2015 07:55:15 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o74si7096206ioi.203.2015.09.18.07.55.15; Fri, 18 Sep 2015 07:55:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752624AbbIROzN (ORCPT + 7 others); Fri, 18 Sep 2015 10:55:13 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:42097 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751596AbbIROzM (ORCPT ); Fri, 18 Sep 2015 10:55:12 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id t8IEsmc1001164; Fri, 18 Sep 2015 09:54:48 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8IEsl45008152; Fri, 18 Sep 2015 09:54:47 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Fri, 18 Sep 2015 09:54:47 -0500 Received: from rockdesk.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8IEseAH002598; Fri, 18 Sep 2015 09:54:44 -0500 From: Roger Quadros To: CC: , , , , , , , , , , Roger Quadros Subject: [PATCH v3 01/27] ARM: OMAP2+: gpmc: Add platform data Date: Fri, 18 Sep 2015 17:53:23 +0300 Message-ID: <1442588029-13769-2-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1442588029-13769-1-git-send-email-rogerq@ti.com> References: <1442588029-13769-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: rogerq@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add a platform data structure for GPMC. It contains all the necessary platform information that needs to be passed from platform init code to GPMC driver. Signed-off-by: Roger Quadros --- include/linux/omap-gpmc.h | 3 +-- include/linux/platform_data/gpmc-omap.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 include/linux/platform_data/gpmc-omap.h diff --git a/include/linux/omap-gpmc.h b/include/linux/omap-gpmc.h index 7dee0014..5c79190 100644 --- a/include/linux/omap-gpmc.h +++ b/include/linux/omap-gpmc.h @@ -7,8 +7,7 @@ * option) any later version. */ -/* Maximum Number of Chip Selects */ -#define GPMC_CS_NUM 8 +#include #define GPMC_CONFIG_WP 0x00000005 diff --git a/include/linux/platform_data/gpmc-omap.h b/include/linux/platform_data/gpmc-omap.h new file mode 100644 index 0000000..d32d9de --- /dev/null +++ b/include/linux/platform_data/gpmc-omap.h @@ -0,0 +1,30 @@ +/* + * OMAP GPMC Platform data + * + * Copyright (C) 2014 Texas Instruments, Inc. - http://www.ti.com + * Roger Quadros + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + */ + +#ifndef _GPMC_OMAP_H_ +#define _GPMC_OMAP_H_ + +/* Maximum Number of Chip Selects */ +#define GPMC_CS_NUM 8 + +/* Data for each chip select */ +struct gpmc_omap_cs_data { + bool valid; /* data is valid */ + bool is_nand; /* device within this CS is NAND */ + struct platform_device *pdev; /* device within this CS region */ + unsigned pdata_size; +}; + +struct gpmc_omap_platform_data { + struct gpmc_omap_cs_data cs[GPMC_CS_NUM]; +}; + +#endif /* _GPMC_OMAP_H */