From patchwork Wed Dec 8 06:20:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiangfu Liu X-Patchwork-Id: 74641 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 E8FB5B70D4 for ; Wed, 8 Dec 2010 17:24:02 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A53F428112; Wed, 8 Dec 2010 07:24:01 +0100 (CET) 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 fVEBJDdVEdOh; Wed, 8 Dec 2010 07:24:01 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 300AE28105; Wed, 8 Dec 2010 07:24:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2E89E28105 for ; Wed, 8 Dec 2010 07:23:58 +0100 (CET) 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 FcyQCDlUrW68 for ; Wed, 8 Dec 2010 07:23:56 +0100 (CET) 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 mail-pw0-f44.google.com (mail-pw0-f44.google.com [209.85.160.44]) by theia.denx.de (Postfix) with ESMTP id 05920280DF for ; Wed, 8 Dec 2010 07:23:54 +0100 (CET) Received: by pwi7 with SMTP id 7so204113pwi.3 for ; Tue, 07 Dec 2010 22:23:53 -0800 (PST) Received: by 10.142.48.12 with SMTP id v12mr2022968wfv.397.1291789433198; Tue, 07 Dec 2010 22:23:53 -0800 (PST) Received: from localhost.localdomain ([124.205.34.122]) by mx.google.com with ESMTPS id y42sm351042wfd.10.2010.12.07.22.23.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 07 Dec 2010 22:23:52 -0800 (PST) From: Xiangfu Liu To: u-boot@lists.denx.de Date: Wed, 8 Dec 2010 14:20:49 +0800 Message-Id: <1291789249-4287-8-git-send-email-xiangfu@openmobilefree.net> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1291789249-4287-7-git-send-email-xiangfu@openmobilefree.net> References: <1291789249-4287-1-git-send-email-xiangfu@openmobilefree.net> <1291789249-4287-2-git-send-email-xiangfu@openmobilefree.net> <1291789249-4287-3-git-send-email-xiangfu@openmobilefree.net> <1291789249-4287-4-git-send-email-xiangfu@openmobilefree.net> <1291789249-4287-5-git-send-email-xiangfu@openmobilefree.net> <1291789249-4287-6-git-send-email-xiangfu@openmobilefree.net> <1291789249-4287-7-git-send-email-xiangfu@openmobilefree.net> Subject: [U-Boot] [PATCH v4 7/7] modify files for ben nanonote board 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 Signed-off-by: Xiangfu Liu --- MAKEALL | 4 +++- Makefile | 10 ++++++++++ arch/mips/include/asm/global_data.h | 9 +++++++++ arch/mips/lib/board.c | 8 ++++++++ arch/mips/lib/time.c | 2 ++ 5 files changed, 32 insertions(+), 1 deletions(-) diff --git a/MAKEALL b/MAKEALL index 767d561..8631cc5 100755 --- a/MAKEALL +++ b/MAKEALL @@ -541,7 +541,9 @@ LIST_mips=" \ ## MIPS Systems (little endian) ######################################################################### -LIST_mips4kc_el="" +LIST_mips4kc_el=" \ + qi_lb60 +" LIST_mips5kc_el="" diff --git a/Makefile b/Makefile index 0685ef9..62e59e2 100644 --- a/Makefile +++ b/Makefile @@ -1176,6 +1176,16 @@ qemu_mips_config : unconfig @echo "#define CONFIG_QEMU_MIPS 1" >$(obj)include/config.h @$(MKCONFIG) -a qemu-mips mips mips qemu-mips +######################################################################### +## MIPS32 XBurst jz4740 +######################################################################### +qi_lb60_config : unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h + @echo "Compile NAND boot image for QI LB60" + @$(MKCONFIG) -a qi_lb60 mips xburst nanonote xburst + @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk + #======================================================================== # Nios #======================================================================== diff --git a/arch/mips/include/asm/global_data.h b/arch/mips/include/asm/global_data.h index 271a290..256f242 100644 --- a/arch/mips/include/asm/global_data.h +++ b/arch/mips/include/asm/global_data.h @@ -39,6 +39,15 @@ typedef struct global_data { bd_t *bd; unsigned long flags; +#if defined(CONFIG_JZSOC) + /* There are other clocks in the jz4740 */ + unsigned long cpu_clk; /* CPU core clock */ + unsigned long sys_clk; /* System bus clock */ + unsigned long per_clk; /* Peripheral bus clock */ + unsigned long mem_clk; /* Memory bus clock */ + unsigned long dev_clk; /* Device clock */ + unsigned long fb_base; /* base address of framebuffer */ +#endif unsigned long baudrate; unsigned long have_console; /* serial_init() was called */ phys_size_t ram_size; /* RAM size */ diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c index f317124..9115055 100644 --- a/arch/mips/lib/board.c +++ b/arch/mips/lib/board.c @@ -136,10 +136,18 @@ static int init_baudrate (void) * argument, and returns an integer return code, where 0 means * "continue" and != 0 means "fatal error, hang the system". */ + +#if defined(CONFIG_JZSOC) +extern int jzsoc_init(void); +#endif + typedef int (init_fnc_t) (void); init_fnc_t *init_sequence[] = { board_early_init_f, +#if defined(CONFIG_JZSOC) + jzsoc_init, /* init gpio/clocks/dram etc. */ +#endif timer_init, env_init, /* initialize environment */ #ifdef CONFIG_INCA_IP diff --git a/arch/mips/lib/time.c b/arch/mips/lib/time.c index 0e66441..653be6c 100644 --- a/arch/mips/lib/time.c +++ b/arch/mips/lib/time.c @@ -24,6 +24,7 @@ #include #include +#ifndef CONFIG_JZSOC static unsigned long timestamp; /* how many counter cycles in a jiffy */ @@ -96,3 +97,4 @@ ulong get_tbclk(void) { return CONFIG_SYS_HZ; } +#endif