From patchwork Wed Jun 23 12:35:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe De Muyter X-Patchwork-Id: 71789 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id A28C21524F1 for ; Wed, 23 Jun 2010 15:22:37 +0200 (CEST) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id 908E730E5E27 for ; Wed, 23 Jun 2010 15:22:37 +0200 (CEST) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.17) for (single-drop); Wed, 23 Jun 2010 15:22:37 +0200 (CEST) Received: from murder ([192.168.8.180]) by backend2 (Cyrus v2.2.12) with LMTPA; Wed, 23 Jun 2010 15:21:55 +0200 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend1.mail.m-online.net (Cyrus v2.2.12) with LMTPA; Wed, 23 Jun 2010 15:21:54 +0200 Received: from scanner-3.m-online.net (unknown [192.168.6.168]) by mail.m-online.net (Postfix) with ESMTP id D66C91C0015F; Wed, 23 Jun 2010 15:21:54 +0200 (CEST) Received: from mxin-1.m-online.net ([192.168.6.164]) by scanner-3.m-online.net (scanner-3.m-online.net [192.168.6.168]) (amavisd-new, port 10026) with ESMTP id 01083-01-2; Wed, 23 Jun 2010 15:21:54 +0200 (CEST) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-1.m-online.net (Postfix) with ESMTP id 8210046C0AA; Wed, 23 Jun 2010 15:21:53 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B49BD280E7; Wed, 23 Jun 2010 15:21:21 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q8lx25y+LChA; Wed, 23 Jun 2010 15:21:21 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 571FA280C4; Wed, 23 Jun 2010 15:21:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CFB6B2808B for ; Wed, 23 Jun 2010 15:20:59 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tRXwAH3Lfaik for ; Wed, 23 Jun 2010 15:20:56 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mailrelay008.isp.belgacom.be (mailrelay008.isp.belgacom.be [195.238.6.174]) by theia.denx.de (Postfix) with ESMTP id 0890628087 for ; Wed, 23 Jun 2010 15:20:54 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEACumIUzCTtAn/2dsb2JhbACfLHHCAIUbBA Received: from mail.macqel.be ([194.78.208.39]) by relay.skynet.be with ESMTP; 23 Jun 2010 15:20:54 +0200 Received: from localhost (localhost [127.0.0.1]) by mail.macqel.be (Postfix) with ESMTP id B7137130BDE for ; Wed, 23 Jun 2010 15:20:53 +0200 (CEST) Received: from mail.macqel.be ([127.0.0.1]) by localhost (mail.macqel.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hh9OQoDbgH6a for ; Wed, 23 Jun 2010 15:20:52 +0200 (CEST) Received: from frolo.macqel.be (frolo.macqel [10.1.40.73]) by mail.macqel.be (Postfix) with ESMTP id 7B5BF130CE7 for ; Wed, 23 Jun 2010 15:20:50 +0200 (CEST) Received: by frolo.macqel.be (Postfix, from userid 1000) id 7BA9BDF033C; Wed, 23 Jun 2010 15:20:50 +0200 (CEST) Resent-From: phdm@macqel.be Resent-Date: Wed, 23 Jun 2010 15:20:50 +0200 Resent-Message-ID: <20100623132050.GD28861@frolo.macqel> Resent-To: u-boot@lists.denx.de X-Original-To: phdm@localhost Delivered-To: phdm@localhost.macqel.be Received: from frolo (localhost [127.0.0.1]) by frolo.macqel.be (Postfix) with ESMTP id 12FF7DF026A for ; Wed, 23 Jun 2010 14:37:42 +0200 (CEST) Received: from exchserv.macqel [10.1.40.58] by frolo with IMAP (fetchmail-6.3.8) for (single-drop); Wed, 23 Jun 2010 14:37:42 +0200 (CEST) Received: from mail.macqel.be ([10.1.40.252]) by macqel.be with Microsoft SMTPSVC(6.0.3790.4675); Wed, 23 Jun 2010 14:37:25 +0200 Received: from localhost (localhost [127.0.0.1]) by mail.macqel.be (Postfix) with ESMTP id B317E130CAC; Wed, 23 Jun 2010 14:37:25 +0200 (CEST) Received: from mail.macqel.be ([127.0.0.1]) by localhost (mail.macqel.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ypuObD2vN4Gm; Wed, 23 Jun 2010 14:37:23 +0200 (CEST) Received: from frolo.macqel.be (frolo.macqel [10.1.40.73]) by mail.macqel.be (Postfix) with ESMTP id AEACB130BDE; Wed, 23 Jun 2010 14:37:23 +0200 (CEST) Received: by frolo.macqel.be (Postfix, from userid 1000) id B2FF1DF02C9; Wed, 23 Jun 2010 14:37:23 +0200 (CEST) From: Philippe De Muyter To: tsicliew@gmail.com u-boot@lists.denx.de Date: Wed, 23 Jun 2010 14:35:52 +0200 Message-Id: <1277296554-23169-2-git-send-email-phdm@macqel.be> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1277296554-23169-1-git-send-email-phdm@macqel.be> References: <1277296554-23169-1-git-send-email-phdm@macqel.be> X-OriginalArrivalTime: 23 Jun 2010 12:37:25.0904 (UTC) FILETIME=[D5C36100:01CB12D0] Cc: Philippe De Muyter Subject: [U-Boot] [PATCH 2/4] m68k: Make m548xevb config reusable for derived boards. X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Virus-Scanned: by amavisd-new at m-online.net Allow to redefine : - CONFIG_BOARD_NAME_STRING and CONFIG_HOSTNAME, - flash-model related constants : - TEXT_BASE (for loader) and CONFIG_SYS_CS0_BASE, - CONFIG_SYS_MAX_FLASH_SECT, CONFIG_ENV_OFFSET and CONFIG_ENV_SECT_SIZE, - and CONFIG_CMD_PCI. --- board/freescale/m548xevb/config.mk | 4 ++++ board/freescale/m548xevb/m548xevb.c | 5 ++++- include/configs/M5485EVB.h | 16 +++++++++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/board/freescale/m548xevb/config.mk b/board/freescale/m548xevb/config.mk index fa66b75..10d9e3e 100644 --- a/board/freescale/m548xevb/config.mk +++ b/board/freescale/m548xevb/config.mk @@ -22,4 +22,8 @@ # MA 02111-1307 USA # +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp + +ifndef TEXT_BASE TEXT_BASE = 0xFF800000 +endif diff --git a/board/freescale/m548xevb/m548xevb.c b/board/freescale/m548xevb/m548xevb.c index 4a2a5c7..771bb35 100644 --- a/board/freescale/m548xevb/m548xevb.c +++ b/board/freescale/m548xevb/m548xevb.c @@ -34,7 +34,10 @@ DECLARE_GLOBAL_DATA_PTR; int checkboard(void) { puts("Board: "); - puts("Freescale FireEngine 5485 EVB\n"); +#ifndef CONFIG_BOARD_NAME_STRING +#define CONFIG_BOARD_NAME_STRING "Freescale FireEngine 5485 EVB\n" +#endif + puts(CONFIG_BOARD_NAME_STRING); return 0; }; diff --git a/include/configs/M5485EVB.h b/include/configs/M5485EVB.h index f23b8b0..ceb3919 100644 --- a/include/configs/M5485EVB.h +++ b/include/configs/M5485EVB.h @@ -58,10 +58,12 @@ #define CONFIG_CMD_MISC #define CONFIG_CMD_MII #define CONFIG_CMD_NET +#ifndef CONFIG_NO_CMD_PCI #define CONFIG_CMD_PCI +#define CONFIG_CMD_USB +#endif #define CONFIG_CMD_PING #define CONFIG_CMD_REGINFO -#define CONFIG_CMD_USB #define CONFIG_SLTTMR @@ -149,7 +151,9 @@ #define CONFIG_BOOTDELAY 1 /* autoboot after 5 seconds */ #define CONFIG_UDP_CHECKSUM +#ifndef CONFIG_HOSTNAME #define CONFIG_HOSTNAME M548xEVB +#endif #define CONFIG_EXTRA_ENV_SETTINGS \ "netdev=eth0\0" \ "loadaddr=10000\0" \ @@ -247,7 +251,9 @@ # define CONFIG_SYS_FLASH_BASE (CONFIG_SYS_CS0_BASE) # define CONFIG_FLASH_CFI_DRIVER 1 # define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT -# define CONFIG_SYS_MAX_FLASH_SECT 137 /* max number of sectors on one chip */ +# ifndef CONFIG_SYS_MAX_FLASH_SECT +# define CONFIG_SYS_MAX_FLASH_SECT 137 /* max number of sectors on one chip */ +# endif # define CONFIG_SYS_FLASH_PROTECTION /* "Real" (hardware) sectors protection */ # define CONFIG_SYS_FLASH_USE_BUFFER_WRITE #ifdef CONFIG_SYS_NOR1SZ @@ -263,8 +269,10 @@ /* Configuration for environment * Environment is embedded in u-boot in the second sector of the flash */ -#define CONFIG_ENV_OFFSET 0x2000 +#ifndef CONFIG_ENV_OFFSET +#define CONFIG_ENV_OFFSET 0x2000 #define CONFIG_ENV_SECT_SIZE 0x2000 +#endif #define CONFIG_ENV_IS_IN_FLASH 1 /*----------------------------------------------------------------------- @@ -299,7 +307,9 @@ * CS4 - Available * CS5 - Available */ +#ifndef CONFIG_SYS_CS0_BASE #define CONFIG_SYS_CS0_BASE 0xFF800000 +#endif #define CONFIG_SYS_CS0_MASK (((CONFIG_SYS_BOOTSZ << 20) - 1) & 0xFFFF0001) #define CONFIG_SYS_CS0_CTRL 0x00101980