From patchwork Fri May 4 18:23:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 8401 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 4658723EAB for ; Fri, 4 May 2012 18:23:47 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id F3E36A18068 for ; Fri, 4 May 2012 18:23:46 +0000 (UTC) Received: by yhpp61 with SMTP id p61so3849454yhp.11 for ; Fri, 04 May 2012 11:23:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=cwVdLTra9b5gngIexVr3hUTj+vokF7NYv3Mb1u7LqvE=; b=S/kpWejAqIDjW+rhh/BPd2bFSBJnQPuipgpwFD3O8Y0w8QfuLkTMaGfVACmZ/RymiD 3KRSwZt+VjyIahVqwpU1EbANs+iHXhnsbZ3STUhbEsZysDZpjPxdoX4qyg05ErSOv2k4 JjMgrXMnsOaigt/Cp2qSLqK1mNy5ObeU6YirHZpINBXvCuW3GJMjVmB4H2EFZiAgeJ3U mNfKxNf4WGy/lmx86oWJvBlbKbv2qeHO/6pHH1ny8zXQvesrz48rwi5eSu9TSloMpJof MyK3YbJgtkFmj6dHXrKrcBmQ7AUAK/BupZszH1wi6NVvIgVhBRj1CP4OJliatCmeWQe8 /mhA== Received: by 10.50.10.225 with SMTP id l1mr3771829igb.1.1336155826219; Fri, 04 May 2012 11:23:46 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.137.198 with SMTP id x6csp106254ibt; Fri, 4 May 2012 11:23:45 -0700 (PDT) Received: by 10.180.8.231 with SMTP id u7mr15235097wia.9.1336155825044; Fri, 04 May 2012 11:23:45 -0700 (PDT) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id m48si10975900wee.2.2012.05.04.11.23.44 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 May 2012 11:23:45 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wg0-f50.google.com with SMTP id ds12so2965025wgb.31 for ; Fri, 04 May 2012 11:23:44 -0700 (PDT) Received: by 10.180.105.198 with SMTP id go6mr15179985wib.19.1336155824517; Fri, 04 May 2012 11:23:44 -0700 (PDT) Received: from localhost.localdomain ([89.192.128.60]) by mx.google.com with ESMTPS id fn2sm17590123wib.0.2012.05.04.11.23.41 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 May 2012 11:23:43 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, grant.likely@secretlab.ca, cjb@laptop.org, ben-linux@fluff.org, linux-i2c@vger.kernel.org, broonie@opensource.wolfsonmicro.com, sameo@linux.intel.com, Lee Jones Subject: [PATCH 02/15] ARM: ux500: Remove unused i2c platform_data initialisation code Date: Fri, 4 May 2012 19:23:12 +0100 Message-Id: <1336155805-18554-3-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1336155805-18554-1-git-send-email-lee.jones@linaro.org> References: <1336155805-18554-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQndKAXDVanp3Swj1nGypEDhmuSrGwz1RxJ3WErqYXAguTKpG1QqBQnr5FjeS1DuWEMj+B8a Now that u5500 is obsolete, u8500 is the only user of the Nomadik i2c driver. As such there is no requirement to differentiate between initialisation values. By the time a new SoC is released, almost all of the ux500 platform will be DT:ed, so we can make decisions based on the compatible property instead. Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500.c | 39 ++++-------------------------------- drivers/i2c/busses/i2c-nomadik.c | 3 +-- 2 files changed, 5 insertions(+), 37 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index af4910d..215d212 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -330,43 +330,12 @@ static struct i2c_board_info __initdata mop500_i2c2_devices[] = { }, }; -#define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, t_out, _sm) \ -static struct nmk_i2c_controller u8500_i2c##id##_data = { \ - /* \ - * slave data setup time, which is \ - * 250 ns,100ns,10ns which is 14,6,2 \ - * respectively for a 48 Mhz \ - * i2c clock \ - */ \ - .slsu = _slsu, \ - /* Tx FIFO threshold */ \ - .tft = _tft, \ - /* Rx FIFO threshold */ \ - .rft = _rft, \ - /* std. mode operation */ \ - .clk_freq = clk, \ - /* Slave response timeout(ms) */\ - .timeout = t_out, \ - .sm = _sm, \ -} - -/* - * The board uses 4 i2c controllers, initialize all of - * them with slave data setup time of 250 ns, - * Tx & Rx FIFO threshold values as 8 and standard - * mode of operation - */ -U8500_I2C_CONTROLLER(0, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST); -U8500_I2C_CONTROLLER(1, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST); -U8500_I2C_CONTROLLER(2, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST); -U8500_I2C_CONTROLLER(3, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST); - static void __init mop500_i2c_init(struct device *parent) { - db8500_add_i2c0(parent, &u8500_i2c0_data); - db8500_add_i2c1(parent, &u8500_i2c1_data); - db8500_add_i2c2(parent, &u8500_i2c2_data); - db8500_add_i2c3(parent, &u8500_i2c3_data); + db8500_add_i2c0(parent, NULL); + db8500_add_i2c1(parent, NULL); + db8500_add_i2c2(parent, NULL); + db8500_add_i2c3(parent, NULL); } static struct gpio_keys_button mop500_gpio_keys[] = { diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c index 8803467..a89af68 100644 --- a/drivers/i2c/busses/i2c-nomadik.c +++ b/drivers/i2c/busses/i2c-nomadik.c @@ -1007,8 +1007,7 @@ static int __devinit nmk_i2c_probe(struct platform_device *pdev) adap->owner = THIS_MODULE; adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; adap->algo = &nmk_i2c_algo; - adap->timeout = pdata->timeout ? msecs_to_jiffies(pdata->timeout) : - msecs_to_jiffies(20000); + adap->timeout = msecs_to_jiffies(pdata->timeout); snprintf(adap->name, sizeof(adap->name), "Nomadik I2C%d at %lx", pdev->id, (unsigned long)res->start);