From patchwork Wed Jun 11 08:56:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 31715 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 02AB121134 for ; Wed, 11 Jun 2014 08:57:40 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id us18sf24340231veb.2 for ; Wed, 11 Jun 2014 01:57:40 -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=GWowILB7c4+Fy2RVtqJNe88uH5KENJ+5ktvxQaY3p0U=; b=ALemFYyckdJgqCiwDVA8HE9EXKQ7MHZzSg2meQGqmMPCX4j4qcORW3l2zcrlChb1rx 4cfTvBUqQ6f71Y09U3xwquWb+TtZc9ozqybQluSJZ0gIf/dcyEdBY5+TsLn3ZOjMvVpe nm5ajh8yeGWCuPWgfSPhF90c7pCNugYvzZA7o4Y8UFetQZx4Ss5j+i4ar/CsEn83Z1dI IIvsp5l8W/F44VPdsLT7u4igkPl2CxDiQwCLon4Tuc7wwMCvglDeqVfObjRxvPto8T5k t8Hk4e3K3fEg3bOLNZBh1+k02hMaqt0HhjHJhPvUh7HFfJoeGf9PXeTvQ3Bx/lwCLTMV 2ACQ== X-Gm-Message-State: ALoCoQldT0I296O2dyvc2sopf+XienAc8k/ctmo5SMTlEX5nkGZRG0Yn4hVD1pKP66dgSjF+LOQ8 X-Received: by 10.236.31.40 with SMTP id l28mr718264yha.34.1402477060808; Wed, 11 Jun 2014 01:57:40 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.41.243 with SMTP id z106ls106024qgz.54.gmail; Wed, 11 Jun 2014 01:57:40 -0700 (PDT) X-Received: by 10.58.46.141 with SMTP id v13mr38125064vem.18.1402477060664; Wed, 11 Jun 2014 01:57:40 -0700 (PDT) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id kd4si14023082veb.67.2014.06.11.01.57.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Jun 2014 01:57:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.174 as permitted sender) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id us18so8148526veb.19 for ; Wed, 11 Jun 2014 01:57:40 -0700 (PDT) X-Received: by 10.58.196.231 with SMTP id ip7mr515821vec.47.1402477060531; Wed, 11 Jun 2014 01:57:40 -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.221.54.6 with SMTP id vs6csp286403vcb; Wed, 11 Jun 2014 01:57:40 -0700 (PDT) X-Received: by 10.66.159.34 with SMTP id wz2mr11654425pab.96.1402477059617; Wed, 11 Jun 2014 01:57:39 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cl5si5866891pad.108.2014.06.11.01.57.39; Wed, 11 Jun 2014 01:57:39 -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 S1753993AbaFKI5c (ORCPT + 6 others); Wed, 11 Jun 2014 04:57:32 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:56259 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751238AbaFKI5a (ORCPT ); Wed, 11 Jun 2014 04:57:30 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s5B8uxgF027159; Wed, 11 Jun 2014 03:56:59 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5B8uxre020348; Wed, 11 Jun 2014 03:56:59 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Wed, 11 Jun 2014 03:56:59 -0500 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5B8uiSb020510; Wed, 11 Jun 2014 03:56:55 -0500 From: Roger Quadros To: , , CC: , , , , , , , , , Roger Quadros Subject: [PATCH 03/36] ARM: OMAP2+: gpmc: Add platform data Date: Wed, 11 Jun 2014 11:56:08 +0300 Message-ID: <1402477001-31132-4-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1402477001-31132-1-git-send-email-rogerq@ti.com> References: <1402477001-31132-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.128.174 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 | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 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..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 */