From patchwork Wed Sep 19 13:22:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Afzal Mohammed X-Patchwork-Id: 1477421 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9C956DF280 for ; Wed, 19 Sep 2012 13:22:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755215Ab2ISNWV (ORCPT ); Wed, 19 Sep 2012 09:22:21 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:37163 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754872Ab2ISNWV (ORCPT ); Wed, 19 Sep 2012 09:22:21 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id q8JDMGkX004095; Wed, 19 Sep 2012 08:22:16 -0500 Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8JDMFca028517; Wed, 19 Sep 2012 18:52:15 +0530 (IST) Received: from dbdp32.itg.ti.com (172.24.170.251) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Wed, 19 Sep 2012 18:52:15 +0530 Received: from psplinux051.india.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with ESMTP id q8JDMFH6013603; Wed, 19 Sep 2012 18:52:15 +0530 From: Afzal Mohammed To: , , , , CC: Afzal Mohammed Subject: [PATCH v7 02/11] ARM: OMAP2+: nand: remove redundant rounding Date: Wed, 19 Sep 2012 18:52:14 +0530 Message-ID: <72255d13b1c355da36eb299bd397733d04b74690.1348058726.git.afzal@ti.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org gpmc_cs_set_timings() calculate ticks to be programmed by rounding time in ns to next tick value. Hence remove redundant rounding of nanosecond timing. Signed-off-by: Afzal Mohammed --- arch/arm/mach-omap2/gpmc-nand.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c index 9e9f47a..cd1dc41 100644 --- a/arch/arm/mach-omap2/gpmc-nand.c +++ b/arch/arm/mach-omap2/gpmc-nand.c @@ -50,31 +50,27 @@ static int omap2_nand_gpmc_retime(struct omap_nand_platform_data *gpmc_nand_data memset(&t, 0, sizeof(t)); t.sync_clk = gpmc_nand_data->gpmc_t->sync_clk; - t.cs_on = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->cs_on); - t.adv_on = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->adv_on); + t.cs_on = gpmc_nand_data->gpmc_t->cs_on; + t.adv_on = gpmc_nand_data->gpmc_t->adv_on; /* Read */ - t.adv_rd_off = gpmc_round_ns_to_ticks( - gpmc_nand_data->gpmc_t->adv_rd_off); + t.adv_rd_off = gpmc_nand_data->gpmc_t->adv_rd_off; t.oe_on = t.adv_on; - t.access = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->access); - t.oe_off = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->oe_off); - t.cs_rd_off = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->cs_rd_off); - t.rd_cycle = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->rd_cycle); + t.access = gpmc_nand_data->gpmc_t->access; + t.oe_off = gpmc_nand_data->gpmc_t->oe_off; + t.cs_rd_off = gpmc_nand_data->gpmc_t->cs_rd_off; + t.rd_cycle = gpmc_nand_data->gpmc_t->rd_cycle; /* Write */ - t.adv_wr_off = gpmc_round_ns_to_ticks( - gpmc_nand_data->gpmc_t->adv_wr_off); + t.adv_wr_off = gpmc_nand_data->gpmc_t->adv_wr_off; t.we_on = t.oe_on; if (cpu_is_omap34xx()) { - t.wr_data_mux_bus = gpmc_round_ns_to_ticks( - gpmc_nand_data->gpmc_t->wr_data_mux_bus); - t.wr_access = gpmc_round_ns_to_ticks( - gpmc_nand_data->gpmc_t->wr_access); + t.wr_data_mux_bus = gpmc_nand_data->gpmc_t->wr_data_mux_bus; + t.wr_access = gpmc_nand_data->gpmc_t->wr_access; } - t.we_off = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->we_off); - t.cs_wr_off = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->cs_wr_off); - t.wr_cycle = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->wr_cycle); + t.we_off = gpmc_nand_data->gpmc_t->we_off; + t.cs_wr_off = gpmc_nand_data->gpmc_t->cs_wr_off; + t.wr_cycle = gpmc_nand_data->gpmc_t->wr_cycle; /* Configure GPMC */ if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16)