From patchwork Fri Jul 5 08:40:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 18266 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f200.google.com (mail-ye0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2BA3225CAB for ; Fri, 5 Jul 2013 08:55:49 +0000 (UTC) Received: by mail-ye0-f200.google.com with SMTP id r9sf2247011yen.3 for ; Fri, 05 Jul 2013 01:55:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=qduOoucRhqXefjh5rNMhrgc2mRFRPGkSJE6RtOP1ViU=; b=DeQDObc2rGcxL+DzZOksp9lipl7vvI+stc4UyLDRjbwdR3DnfoKEp2WR/nr/Jnksm4 NgNZk8UWKDinbUSsd0Yp/EIi+KNx6JdqbG1X1fEHLmfj6TURM8TgcSug+apuZoqY5QM7 gjJbOYW3iMB93aepAREOHnrE7xQNzlkdX18kLQMEj+E+yCkvoypgajaV2nk3kIyglod6 Rfc+EzQot3ZWLYfa+HBiQDCKbahNNDceMBr3ZLatIwuqKdwBFnBw8MazV29aWanfKSNV +Yd6pne5rnjUcaMawRgs8l5O9RJXPeC93tjU54CwiWYE/YZC+0CnBigJ06mxRCDZikUZ e7zg== X-Received: by 10.224.86.200 with SMTP id t8mr11771591qal.0.1373014548315; Fri, 05 Jul 2013 01:55:48 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.0.132 with SMTP id 4ls952167qee.90.gmail; Fri, 05 Jul 2013 01:55:48 -0700 (PDT) X-Received: by 10.58.182.103 with SMTP id ed7mr6047872vec.70.1373014548176; Fri, 05 Jul 2013 01:55:48 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id b1si1982700veg.137.2013.07.05.01.55.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Jul 2013 01:55:48 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id pa12so1620449veb.11 for ; Fri, 05 Jul 2013 01:55:48 -0700 (PDT) X-Received: by 10.220.70.76 with SMTP id c12mr5909613vcj.8.1373014547996; Fri, 05 Jul 2013 01:55:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.149.77 with SMTP id s13csp44470vcv; Fri, 5 Jul 2013 01:55:47 -0700 (PDT) X-Received: by 10.68.115.131 with SMTP id jo3mr8890284pbb.133.1373014546480; Fri, 05 Jul 2013 01:55:46 -0700 (PDT) Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by mx.google.com with ESMTPS id gu1si2732786pac.202.2013.07.05.01.55.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Jul 2013 01:55:46 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.53 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.160.53; Received: by mail-pb0-f53.google.com with SMTP id xb12so1945064pbc.40 for ; Fri, 05 Jul 2013 01:55:46 -0700 (PDT) X-Received: by 10.66.2.164 with SMTP id 4mr10545908pav.55.1373014546019; Fri, 05 Jul 2013 01:55:46 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id v20sm7354378paj.4.2013.07.05.01.55.43 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Jul 2013 01:55:45 -0700 (PDT) From: Tushar Behera To: u-boot@lists.denx.de Cc: patches@linaro.org, Simon Glass Subject: [PATCH] common: board_f: Fix build error when CONFIG_TRACE is not defined Date: Fri, 5 Jul 2013 14:10:20 +0530 Message-Id: <1373013620-13812-1-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQnf8n5b3URiG1QGcFinSVmVjQn/ZDVXWiPfVLgo9nyqxHDoqaPkR09E6VJj2ct2jhamQbTs X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , When CONFIG_TRACE is not defined, definition of trace_early_init is not compiled and we get following error. common/libcommon.o:(.data.init_sequence_f+0xc): undefined reference to `trace_early_init' While at it, also define reserve_trace only if CONFIG_TRACE is defined. CC: Simon Glass Signed-off-by: Tushar Behera --- common/board_f.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index ab4242a..a685368 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -501,17 +501,17 @@ static int reserve_lcd(void) } #endif /* CONFIG_LCD */ +#ifdef CONFIG_TRACE static int reserve_trace(void) { -#ifdef CONFIG_TRACE gd->relocaddr -= CONFIG_TRACE_BUFFER_SIZE; gd->trace_buff = map_sysmem(gd->relocaddr, CONFIG_TRACE_BUFFER_SIZE); debug("Reserving %dk for trace data at: %08lx\n", CONFIG_TRACE_BUFFER_SIZE >> 10, gd->relocaddr); -#endif return 0; } +#endif #if defined(CONFIG_VIDEO) && (!defined(CONFIG_PPC) || defined(CONFIG_8xx)) \ && !defined(CONFIG_ARM) && !defined(CONFIG_X86) @@ -833,7 +833,9 @@ static init_fnc_t init_sequence_f[] = { #endif setup_mon_len, setup_fdt, +#ifdef CONFIG_TRACE trace_early_init, +#endif #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) /* TODO: can this go into arch_cpu_init()? */ probecpu, @@ -977,7 +979,9 @@ static init_fnc_t init_sequence_f[] = { #ifdef CONFIG_LCD reserve_lcd, #endif +#ifdef CONFIG_TRACE reserve_trace, +#endif /* TODO: Why the dependency on CONFIG_8xx? */ #if defined(CONFIG_VIDEO) && (!defined(CONFIG_PPC) || defined(CONFIG_8xx)) \ && !defined(CONFIG_ARM) && !defined(CONFIG_X86)