From patchwork Tue Aug 7 08:07:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Liu X-Patchwork-Id: 175529 X-Patchwork-Delegate: vapier@gentoo.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 0214E2C007C for ; Tue, 7 Aug 2012 18:24:41 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9A79328245; Tue, 7 Aug 2012 10:24:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 gixTAz4shIMX; Tue, 7 Aug 2012 10:24:07 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AFFC028250; Tue, 7 Aug 2012 10:23:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B722C28229 for ; Tue, 7 Aug 2012 10:23:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 b2nj9hNVDMnB for ; Tue, 7 Aug 2012 10:23:00 +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 am1outboundpool.messaging.microsoft.com (am1ehsobe003.messaging.microsoft.com [213.199.154.206]) by theia.denx.de (Postfix) with ESMTPS id 8158B281F1 for ; Tue, 7 Aug 2012 10:22:53 +0200 (CEST) Received: from mail96-am1-R.bigfish.com (10.3.201.234) by AM1EHSOBE008.bigfish.com (10.3.204.28) with Microsoft SMTP Server id 14.1.225.23; Tue, 7 Aug 2012 08:07:43 +0000 Received: from mail96-am1 (localhost [127.0.0.1]) by mail96-am1-R.bigfish.com (Postfix) with ESMTP id BE84B2600C1; Tue, 7 Aug 2012 08:07:43 +0000 (UTC) X-Forefront-Antispam-Report: CIP:137.71.25.55; KIP:(null); UIP:(null); IPV:NLI; H:nwd2mta1.analog.com; RD:nwd2mail10.analog.com; EFVD:NLI X-SpamScore: 8 X-BigFish: VS8(zzzz1202hzz8275bhz2ei87h2a8h668h839hd24he5bhe96h107ahff4o) Received-SPF: neutral (mail96-am1: 137.71.25.55 is neither permitted nor denied by domain of gmail.com) client-ip=137.71.25.55; envelope-from=lliubbo@gmail.com; helo=nwd2mta1.analog.com ; 1.analog.com ; X-FB-DOMAIN-IP-MATCH: fail Received: from mail96-am1 (localhost.localdomain [127.0.0.1]) by mail96-am1 (MessageSwitch) id 1344326861439504_13954; Tue, 7 Aug 2012 08:07:41 +0000 (UTC) Received: from AM1EHSMHS019.bigfish.com (unknown [10.3.201.241]) by mail96-am1.bigfish.com (Postfix) with ESMTP id 6917E200052; Tue, 7 Aug 2012 08:07:41 +0000 (UTC) Received: from nwd2mta1.analog.com (137.71.25.55) by AM1EHSMHS019.bigfish.com (10.3.207.157) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 7 Aug 2012 08:07:41 +0000 Received: from NWD2HUBCAS1.ad.analog.com (nwd2hubcas1.ad.analog.com [10.64.73.29]) by nwd2mta1.analog.com (8.13.8/8.13.8) with ESMTP id q777rdd8029108 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 7 Aug 2012 03:53:40 -0400 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS1.ad.analog.com (10.64.73.29) with Microsoft SMTP Server id 8.3.83.0; Tue, 7 Aug 2012 04:07:39 -0400 Received: from linux.site ([10.99.22.20]) by zeus.spd.analog.com (8.14.5/8.14.5) with ESMTP id q7787cQC031414; Tue, 7 Aug 2012 04:07:39 -0400 Received: from bob-OptiPlex-760.analog.com (unknown [10.99.24.84]) by linux.site (Postfix) with ESMTP id 1499942858B3; Mon, 6 Aug 2012 18:33:25 -0600 (MDT) From: Bob Liu To: , , Date: Tue, 7 Aug 2012 16:07:44 +0800 Message-ID: <1344326875-348-5-git-send-email-lliubbo@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1344326875-348-1-git-send-email-lliubbo@gmail.com> References: <1344326875-348-1-git-send-email-lliubbo@gmail.com> MIME-Version: 1.0 Cc: u-boot-devel@blackfin.uclinux.org Subject: [U-Boot] [PATCH 05/16] Blackfin: Paraflash: add support for bf609-ezkit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Add paraflash support for bf609-ezkit to board file. Signed-off-by: Bob Liu --- arch/blackfin/include/asm/mach-bf609/portmux.h | 1 + board/bf609-ezkit/bf609-ezkit.c | 8 +++--- include/configs/bf609-ezkit.h | 35 +++++++++++++++++++----- include/configs/bfin_adi_common.h | 4 ++- 4 files changed, 36 insertions(+), 12 deletions(-) diff --git a/arch/blackfin/include/asm/mach-bf609/portmux.h b/arch/blackfin/include/asm/mach-bf609/portmux.h index 1cf6fd8..757570f 100644 --- a/arch/blackfin/include/asm/mach-bf609/portmux.h +++ b/arch/blackfin/include/asm/mach-bf609/portmux.h @@ -241,6 +241,7 @@ #define P_A23 (P_DEFINED | P_IDENT(GPIO_PB8) | P_FUNCT(0)) #define P_A24 (P_DEFINED | P_IDENT(GPIO_PB10) | P_FUNCT(0)) #define P_A25 (P_DEFINED | P_IDENT(GPIO_PB11) | P_FUNCT(0)) +#define P_NORCK (P_DEFINED | P_IDENT(GPIO_PB0) | P_FUNCT(0)) #define P_AMS1 (P_DEFINED | P_IDENT(GPIO_PB1) | P_FUNCT(0)) #define P_AMS2 (P_DEFINED | P_IDENT(GPIO_PB4) | P_FUNCT(0)) diff --git a/board/bf609-ezkit/bf609-ezkit.c b/board/bf609-ezkit/bf609-ezkit.c index 398a6b0..d701c36 100644 --- a/board/bf609-ezkit/bf609-ezkit.c +++ b/board/bf609-ezkit/bf609-ezkit.c @@ -22,11 +22,11 @@ int checkboard(void) int board_early_init_f(void) { static const unsigned short pins[] = { - P_A4, P_A5, P_A6, P_A7, P_A8, P_A9, P_A10, P_A11, P_A12, P_A13, - P_A14, P_A15, P_A16, P_A17, P_A18, P_A19, P_A20, P_A21, P_A22, - P_A23, P_A24, P_A25, P_AMS1, P_ABE0, P_ABE1, 0, + P_A3, P_A4, P_A5, P_A6, P_A7, P_A8, P_A9, P_A10, P_A11, P_A12, + P_A13, P_A14, P_A15, P_A16, P_A17, P_A18, P_A19, P_A20, P_A21, + P_A22, P_A23, P_A24, P_A25, P_NORCK, 0, }; - peripheral_request_list(pins, "smc"); + peripheral_request_list(pins, "smc0"); return 0; } diff --git a/include/configs/bf609-ezkit.h b/include/configs/bf609-ezkit.h index 4dcfeca..91b0cf3 100644 --- a/include/configs/bf609-ezkit.h +++ b/include/configs/bf609-ezkit.h @@ -68,9 +68,9 @@ #define CONFIG_MEM_SIZE 128 #define CONFIG_SMC_GCTL_VAL 0x00000010 -#define CONFIG_SMC_B1CTL_VAL 0x01002001 -#define CONFIG_SMC_B1TIM_VAL 0x08070977 -#define CONFIG_SMC_B1ETIM_VAL 0x00092231 +#define CONFIG_SMC_B0CTL_VAL 0x01007011 +#define CONFIG_SMC_B0TIM_VAL 0x08170977 +#define CONFIG_SMC_B0ETIM_VAL 0x00092231 #define CONFIG_SYS_MONITOR_LEN (512 * 1024) #define CONFIG_SYS_MALLOC_LEN (256 * 1024) @@ -107,14 +107,35 @@ #define CONFIG_SYS_FLASH_PROTECTION #define CONFIG_SYS_MAX_FLASH_BANKS 1 #define CONFIG_SYS_MAX_FLASH_SECT 131 +#define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS /* * Env Storage Settings */ -#define CONFIG_ENV_IS_NOWHERE -#define CONFIG_ENV_SIZE 0x600 -#undef CONFIG_CMD_EXPORTENV -#undef CONFIG_CMD_IMPORTENV +#if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER) +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_ENV_OFFSET 0x10000 +#define CONFIG_ENV_SIZE 0x2000 +#define CONFIG_ENV_SECT_SIZE 0x10000 +#define CONFIG_ENV_IS_EMBEDDED_IN_LDR +#elif (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_NAND) +#define CONFIG_ENV_IS_IN_NAND +#define CONFIG_ENV_OFFSET 0x60000 +#define CONFIG_ENV_SIZE 0x20000 +#else +#define CONFIG_ENV_IS_IN_FLASH +#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET) +#define CONFIG_ENV_OFFSET 0x8000 +#define CONFIG_ENV_SIZE 0x8000 +#define CONFIG_ENV_SECT_SIZE 0x8000 +#define CONFIG_ENV_IS_EMBEDDED_IN_LDR +#define UBOOT_ENV_UPDATE \ + "protect off 0xB0000000 +$(filesize);" \ + "erase 0xB0000000 +$(filesize);" \ + "cp.b $(loadaddr) 0xB0000000 $(filesize)" +#endif + +#define FLASHBOOT_ENV_SETTINGS "flashboot=bootm 0xB0100000\0" /* * SDH Settings diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h index 5cec778..164e8ca 100644 --- a/include/configs/bfin_adi_common.h +++ b/include/configs/bfin_adi_common.h @@ -195,10 +195,12 @@ "nand erase 0 0x40000;" \ "nand write $(loadaddr) 0 0x40000" # else -# define UBOOT_ENV_UPDATE \ +# ifndef UBOOT_ENV_UPDATE +# define UBOOT_ENV_UPDATE \ "protect off 0x20000000 +$(filesize);" \ "erase 0x20000000 +$(filesize);" \ "cp.b $(loadaddr) 0x20000000 $(filesize)" +# endif # endif # ifdef CONFIG_NETCONSOLE # define NETCONSOLE_ENV \