From patchwork Wed May 21 11:20:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 30529 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 52C7920671 for ; Wed, 21 May 2014 11:21:55 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id ma3sf5599098pbc.11 for ; Wed, 21 May 2014 04:21:54 -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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=/zYT3jNOQL+qKThZ3/F9P5sSuBIjioryVjwsGj8tvms=; b=fmFoMs6VF6lrkXs7Q8Rzs23sPLbbdDBQaDXR8zfW+VHpZfGjS5hZxCdKrKqK+cP/aq L3loRIZ4i+KBaDvw+/q0XDU5LOZ3ClnLhZu5F+j0RwaLc+/Y22OsNFCO2BjQZr4AHxir 5+HP6Yf81QvErh83cHmPbKJoTsgwcbrCjWY83AKJzQXfYv2Nvsc884H2EVngXMv4uoQy //T605NJuELM727sE8jTlRfuUKSmYNDJGz2MuYhe9scP5H9OGqY+zu1znXQYXHd6L/WB yD8O69yEPuaIT3Q27Amu/n0DcAMYEHJ89d4neAtTGp8oSt+CWSUhmcMB4WRXzMqt33ab NX7g== X-Gm-Message-State: ALoCoQlR3OO3aYlIl0gFl4Sb/ZhEpXZhnJ3ribMEIzfInK1iICBdbjpWt1lXx8e6C0bYf+YyFoRb X-Received: by 10.66.217.170 with SMTP id oz10mr3423137pac.9.1400671314418; Wed, 21 May 2014 04:21:54 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.5 with SMTP id s5ls704259qgd.75.gmail; Wed, 21 May 2014 04:21:54 -0700 (PDT) X-Received: by 10.220.183.4 with SMTP id ce4mr57319vcb.54.1400671314214; Wed, 21 May 2014 04:21:54 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id nu8si2691699vcb.16.2014.05.21.04.21.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 May 2014 04:21:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id lc6so2285365vcb.2 for ; Wed, 21 May 2014 04:21:54 -0700 (PDT) X-Received: by 10.52.110.195 with SMTP id ic3mr61668vdb.53.1400671314071; Wed, 21 May 2014 04:21:54 -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.220.221.72 with SMTP id ib8csp104525vcb; Wed, 21 May 2014 04:21:53 -0700 (PDT) X-Received: by 10.68.134.169 with SMTP id pl9mr57677266pbb.133.1400671313010; Wed, 21 May 2014 04:21:53 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cz1si5815955pbc.239.2014.05.21.04.21.52; Wed, 21 May 2014 04:21:52 -0700 (PDT) Received-SPF: none (google.com: linux-omap-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752106AbaEULVv (ORCPT + 6 others); Wed, 21 May 2014 07:21:51 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:36784 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751033AbaEULVs (ORCPT ); Wed, 21 May 2014 07:21:48 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s4LBLIEm014280; Wed, 21 May 2014 06:21:18 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s4LBLIAK020970; Wed, 21 May 2014 06:21:18 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Wed, 21 May 2014 06:21:17 -0500 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s4LBLAAW018495; Wed, 21 May 2014 06:21:14 -0500 From: Roger Quadros To: , CC: , , , , , , , , , , , Roger Quadros Subject: [RFC PATCH 01/16] ARM: OMAP2+: gpmc: Add platform data Date: Wed, 21 May 2014 14:20:49 +0300 Message-ID: <1400671264-10702-2-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1400671264-10702-1-git-send-email-rogerq@ti.com> References: <1400671264-10702-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@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.220.171 as permitted sender) smtp.mail=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 --- arch/arm/mach-omap2/gpmc.h | 4 +--- include/linux/platform_data/gpmc-omap.h | 37 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 include/linux/platform_data/gpmc-omap.h diff --git a/arch/arm/mach-omap2/gpmc.h b/arch/arm/mach-omap2/gpmc.h index 707f6d5..c476712 100644 --- a/arch/arm/mach-omap2/gpmc.h +++ b/arch/arm/mach-omap2/gpmc.h @@ -12,9 +12,7 @@ #define __OMAP2_GPMC_H #include - -/* Maximum Number of Chip Selects */ -#define GPMC_CS_NUM 8 +#include #define GPMC_CS_CONFIG1 0x00 #define GPMC_CS_CONFIG2 0x04 diff --git a/include/linux/platform_data/gpmc-omap.h b/include/linux/platform_data/gpmc-omap.h new file mode 100644 index 0000000..bff352f --- /dev/null +++ b/include/linux/platform_data/gpmc-omap.h @@ -0,0 +1,37 @@ +/* + * 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 + +enum gpmc_omap_type { + GPMC_OMAP_TYPE_NOR, + GPMC_OMAP_TYPE_NAND, + GPMC_OMAP_TYPE_ONENAND, + GPMC_OMAP_TYPE_GENERIC, +}; + +/* Data for each chip select */ +struct gpmc_omap_cs_data { + bool valid; /* data is valid */ + enum gpmc_omap_type type; + 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 */