From patchwork Mon Oct 8 06:46:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Wu X-Patchwork-Id: 1564091 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 29F6D3FC1A for ; Mon, 8 Oct 2012 06:50:27 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TL78g-00049y-0S; Mon, 08 Oct 2012 06:48:30 +0000 Received: from bombadil.infradead.org ([2001:4830:2446:ff00:4687:fcff:fea6:5117]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TL78c-00049q-OV; Mon, 08 Oct 2012 06:48:26 +0000 Received: from newsmtp5.atmel.com ([204.2.163.5] helo=sjogate2.atmel.com) by bombadil.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TL78a-00038Q-9s; Mon, 08 Oct 2012 06:48:25 +0000 Received: from penbh01.corp.atmel.com ([10.168.5.31]) by sjogate2.atmel.com (8.13.6/8.13.6) with ESMTP id q986h88d000958; Sun, 7 Oct 2012 23:43:10 -0700 (PDT) Received: from penmb01.corp.atmel.com ([10.168.5.33]) by penbh01.corp.atmel.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 8 Oct 2012 14:48:04 +0800 Received: from shaarm01.corp.atmel.com ([10.217.6.34]) by penmb01.corp.atmel.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 8 Oct 2012 14:48:03 +0800 From: Josh Wu To: linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, dedekind1@gmail.com Subject: [PATCH] MTD: atmel_nand: fix compile error when use avr32-atstk1006_defconfig Date: Mon, 8 Oct 2012 14:46:49 +0800 Message-Id: <1349678809-12092-1-git-send-email-josh.wu@atmel.com> X-Mailer: git-send-email 1.7.9.5 X-OriginalArrivalTime: 08 Oct 2012 06:48:03.0568 (UTC) FILETIME=[DD673F00:01CDA520] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121008_024824_674197_A84BBC34 X-CRM114-Status: UNSURE ( 9.07 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.0 (----) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-4.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -2.1 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: fengguang.wu@intel.com, egtvedt@samfundet.no, Josh Wu , hskinnemoen@gmail.com 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: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org fixed the following compile error when use avr32 config: drivers/mtd/nand/atmel_nand.c: In function 'pmecc_err_location': drivers/mtd/nand/atmel_nand.c:639: error: implicit declaration of function 'writel_relaxed' Since in ARCH avr32, there is no macro "writel_relaxed" defined. In this patch we use macro "writel" instead. Signed-off-by: Josh Wu --- drivers/mtd/nand/atmel_nand_ecc.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mtd/nand/atmel_nand_ecc.h b/drivers/mtd/nand/atmel_nand_ecc.h index 8a1e9a6..e87af84 100644 --- a/drivers/mtd/nand/atmel_nand_ecc.h +++ b/drivers/mtd/nand/atmel_nand_ecc.h @@ -129,8 +129,13 @@ #define pmerrloc_writel(addr, reg, value) \ writel((value), (addr) + ATMEL_PMERRLOC_##reg) +#if defined(CONFIG_ARCH_AT91) #define pmerrloc_writel_sigma_relaxed(addr, n, value) \ writel_relaxed((value), (addr) + ATMEL_PMERRLOC_SIGMAx + ((n) * 4)) +#elif defined(CONFIG_AVR32) +#define pmerrloc_writel_sigma_relaxed(addr, n, value) \ + writel((value), (addr) + ATMEL_PMERRLOC_SIGMAx + ((n) * 4)) +#endif #define pmerrloc_readl_sigma_relaxed(addr, n) \ readl_relaxed((addr) + ATMEL_PMERRLOC_SIGMAx + ((n) * 4))