From patchwork Mon Jul 23 05:03:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Voss, Nikolaus" X-Patchwork-Id: 1226361 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 04B3F3FD4F for ; Mon, 23 Jul 2012 05:07:25 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1StAo7-0000Wo-K0; Mon, 23 Jul 2012 05:03:47 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1StAnz-0000Wj-FP for linux-arm-kernel@merlin.infradead.org; Mon, 23 Jul 2012 05:03:39 +0000 Received: from portal.weinmann.de ([62.8.140.122]) by casper.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1StAnw-0003C2-Ak for linux-arm-kernel@lists.infradead.org; Mon, 23 Jul 2012 05:03:37 +0000 From: "Voss, Nikolaus" To: "'Stefano Salati'" Date: Mon, 23 Jul 2012 07:03:11 +0200 Subject: RE: Build error with [PATCH v10 3/4] drivers/i2c/busses/i2c-at91.c Thread-Topic: Build error with [PATCH v10 3/4] drivers/i2c/busses/i2c-at91.c Thread-Index: Ac1nH+PIcJsmgaE+QB6/p67e7XYCCwBbeg/A Message-ID: References: In-Reply-To: Accept-Language: en-US, de-DE Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, de-DE MIME-Version: 1.0 X-OriginalId: qfq6N53CYm008014 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20120723_060336_589847_91016CD2 X-CRM114-Status: GOOD ( 12.84 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: "'linux-kernel@vger.kernel.org'" , "'linux-arm-kernel@lists.infradead.org'" , "'linux-i2c@vger.kernel.org'" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hi Stefano, Stefano Salati wrote on 2012-07-21: > I did as you suggested, I manage to compile but get a waterfall of errors > while booting the image (file attached). > > I applied all the patches (manually so to better understand what was being > done), apart from this one: https://lkml.org/lkml/2012/4/20/112 > as the file I'd patch is completely different (apart from the fact that my > file is "at91sam9x5.c" I've checked also those you mention in the patch to > take inspiration and are completely different as well). I attached > at91sam9x5.c to explain better. your at91sam9x5.c is quite out of date. If you can, you should use a more recent kernel. If not, try to add the following to the file: +static struct clk_lookup periph_clocks_lookups[] = { + CLKDEV_CON_DEV_ID(NULL, "at91_i2c.0", &twi0_clk), + CLKDEV_CON_DEV_ID(NULL, "at91_i2c.1", &twi1_clk), + CLKDEV_CON_DEV_ID(NULL, "at91_i2c.2", &twi2_clk), +}; and in at91sam9x5_register_clocks(): for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) clk_register(periph_clocks[i]); + clkdev_add_table(periph_clocks_lookups, + ARRAY_SIZE(periph_clocks_lookups)); if (cpu_is_at91sam9g25() || cpu_is_at91sam9x25()) clk_register(&usart3_clk); For a recent kernel, it should be: diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c index 13c8cae..bfdd429 100644 --- a/arch/arm/mach-at91/at91sam9x5.c +++ b/arch/arm/mach-at91/at91sam9x5.c @@ -225,6 +225,9 @@ static struct clk_lookup periph_clocks_lookups[] = { CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb0_clk), CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma0_clk), CLKDEV_CON_DEV_ID("dma_clk", "ffffee00.dma-controller", &dma1_clk), + CLKDEV_CON_DEV_ID(NULL, "at91_i2c.0", &twi0_clk), + CLKDEV_CON_DEV_ID(NULL, "at91_i2c.1", &twi1_clk), + CLKDEV_CON_DEV_ID(NULL, "at91_i2c.2", &twi2_clk), CLKDEV_CON_ID("pioA", &pioAB_clk), CLKDEV_CON_ID("pioB", &pioAB_clk), CLKDEV_CON_ID("pioC", &pioCD_clk),