From patchwork Sun May 15 00:49:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 622318 X-Patchwork-Delegate: trini@ti.com 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 3r6lPH6lTpz9sCj for ; Sun, 15 May 2016 10:50:11 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=BCMebAej; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8A15AA766E; Sun, 15 May 2016 02:50:06 +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 3uvDWChWQeCg; Sun, 15 May 2016 02:50:06 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 47BA9A7694; Sun, 15 May 2016 02:49:59 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1D8B4A75F2 for ; Sun, 15 May 2016 02:49:53 +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 uLj_jW-lfMDO for ; Sun, 15 May 2016 02:49:53 +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 mail-ig0-f179.google.com (mail-ig0-f179.google.com [209.85.213.179]) by theia.denx.de (Postfix) with ESMTPS id A9932A7506 for ; Sun, 15 May 2016 02:49:48 +0200 (CEST) Received: by mail-ig0-f179.google.com with SMTP id bi2so34150627igb.0 for ; Sat, 14 May 2016 17:49:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=V6h1BpgbkVd38pQlBgY3F0bm/iJr9Ee1yHZQdj4dUoI=; b=BCMebAejX6cJDQzoO86/G55+cbirrgqsTO40Fubs6p2AO+69QlblfuLBSiFapk3CYu uKxN3Wl4afnYxz/zyQe2jJ85eLa+ymnf6iTvXLvcJi5KMJQPVl7KWNzEpcMepTDpcoSj kgJ7X6N6DQ2u5wxEwgXr9CXr0qYu1cjbfwkq/vss2blsKdtYArgpMZVKSkyWqpMRSLct 3cRsRCO4AQvShuCq7+ZBil/r3erOzFMwGk1BQSxC+6Di2xO3e1vhhqcLlhZtAlmLvCo1 w2vYqYcXv2fe3DTi2iMKI2iBDmQBAcHQR1LT6eEBY3f9WXuDLTZ55Ivyj6O3/XTx5AkY dxRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=V6h1BpgbkVd38pQlBgY3F0bm/iJr9Ee1yHZQdj4dUoI=; b=IaQox8v/IlYdK+m3TEemSVZzUgW2+Y74QOk31OYsgogCKvrNWetAxPeBregBEh4eMw mj5Dlg/rUSNYnmF7On9UL513K7gxZ3551Mewe+VVQ3jIbJjvQBT+YBAGAuMh25CQUSJ2 Ob5kRSnTzPQdofAX3lYPpl8N8eruxJ6l4ZJ6ypuEVFPZZv0FcqXFR7rzCXM4J3qG63wu kAXHH4dxRLANUw1RvBgrrotc9aEhQauXhL4O/5eZLQ9YkDlCTrEFhkWNM/92e6oR4J2D VJPuikurM+4YTYvaGYCzXZHgmv/oXvARBVI9nu4H16FQPU9QUAgtG3zo6FfHFV+DaHfk LnmQ== X-Gm-Message-State: AOPr4FWsuTkqFZadaicCF9nutDR7VwNcNuykdSnoLsRgyn6b6uLe2dyEjUcrkF+puMiE6QR3 X-Received: by 10.50.69.66 with SMTP id c2mr6119448igu.30.1463273387203; Sat, 14 May 2016 17:49:47 -0700 (PDT) Received: from kaki.bld.corp.google.com ([100.100.202.57]) by smtp.gmail.com with ESMTPSA id 130sm2078058iou.22.2016.05.14.17.49.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 May 2016 17:49:46 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 1A0202205E5; Sat, 14 May 2016 18:49:45 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Sat, 14 May 2016 18:49:26 -0600 Message-Id: <1463273377-11235-2-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1463273377-11235-1-git-send-email-sjg@chromium.org> References: <1463273377-11235-1-git-send-email-sjg@chromium.org> Cc: Tom Rini Subject: [U-Boot] [PATCH 01/12] openrisc: Drop the arch-specific board init X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" It is well past the deadline for conversion to generic board init. Remove the old code. Stefan, can you test this please and perhaps send a follow-up patch if needed? Signed-off-by: Simon Glass --- arch/openrisc/lib/Makefile | 1 - arch/openrisc/lib/board.c | 140 ------------------------------------- include/configs/openrisc-generic.h | 1 + 3 files changed, 1 insertion(+), 141 deletions(-) delete mode 100644 arch/openrisc/lib/board.c diff --git a/arch/openrisc/lib/Makefile b/arch/openrisc/lib/Makefile index dfa72d9..3a2f6ec 100644 --- a/arch/openrisc/lib/Makefile +++ b/arch/openrisc/lib/Makefile @@ -5,6 +5,5 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y += board.o obj-$(CONFIG_CMD_BOOTM) += bootm.o obj-y += timer.o diff --git a/arch/openrisc/lib/board.c b/arch/openrisc/lib/board.c deleted file mode 100644 index b7fbd2f..0000000 --- a/arch/openrisc/lib/board.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - * (C) Copyright 2011 - * Julius Baxter, julius@opencores.org - * - * (C) Copyright 2003, Psyent Corporation - * Scott McNutt - * - * (C) Copyright 2000-2002 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include -#include -#include -#include -#ifdef CONFIG_STATUS_LED -#include -#endif -#ifdef CONFIG_CMD_NAND -#include /* cannot even include nand.h if it isnt configured */ -#endif - -#include -#include - -DECLARE_GLOBAL_DATA_PTR; - -/* - * All attempts to come up with a "common" initialization sequence - * that works for all boards and architectures failed: some of the - * requirements are just _too_ different. To get rid of the resulting - * mess of board dependend #ifdef'ed code we now make the whole - * initialization sequence configurable to the user. - * - * The requirements for any new initalization function is simple: it - * receives a pointer to the "global data" structure as it's only - * argument, and returns an integer return code, where 0 means - * "continue" and != 0 means "fatal error, hang the system". - */ - -extern int cache_init(void); - -/* - * Initialization sequence - */ -static int (* const init_sequence[])(void) = { - cache_init, - timer_init, /* initialize timer */ - env_init, - serial_init, - console_init_f, - display_options, - checkcpu, - checkboard, -}; - - -/***********************************************************************/ -void board_init(void) -{ - bd_t *bd; - int i; - - gd = (gd_t *)CONFIG_SYS_GBL_DATA_ADDR; - - memset((void *)gd, 0, GENERATED_GBL_DATA_SIZE); - - gd->bd = (bd_t *)(gd+1); /* At end of global data */ - gd->baudrate = CONFIG_BAUDRATE; - gd->cpu_clk = CONFIG_SYS_CLK_FREQ; - - bd = gd->bd; - bd->bi_memstart = CONFIG_SYS_SDRAM_BASE; - bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE; -#ifndef CONFIG_SYS_NO_FLASH - bd->bi_flashstart = CONFIG_SYS_FLASH_BASE; -#endif -#if defined(CONFIG_SYS_SRAM_BASE) && defined(CONFIG_SYS_SRAM_SIZE) - bd->bi_sramstart = CONFIG_SYS_SRAM_BASE; - bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE; -#endif - - for (i = 0; i < ARRAY_SIZE(init_sequence); i++) { - WATCHDOG_RESET(); - if (init_sequence[i]()) - hang(); - } - - WATCHDOG_RESET(); - - /* The Malloc area is immediately below the monitor copy in RAM */ - mem_malloc_init(CONFIG_SYS_MALLOC_BASE, CONFIG_SYS_MALLOC_LEN); - -#ifndef CONFIG_SYS_NO_FLASH - WATCHDOG_RESET(); - bd->bi_flashsize = flash_init(); -#endif - -#ifdef CONFIG_CMD_NAND - puts("NAND: "); - nand_init(); -#endif - -#ifdef CONFIG_GENERIC_MMC - puts("MMC: "); - mmc_initialize(bd); -#endif - - WATCHDOG_RESET(); - env_relocate(); - - WATCHDOG_RESET(); - stdio_init(); - jumptable_init(); - console_init_r(); - - WATCHDOG_RESET(); - interrupt_init(); - -#if defined(CONFIG_BOARD_LATE_INIT) - board_late_init(); -#endif - -#if defined(CONFIG_CMD_NET) - puts("NET: "); - eth_initialize(); -#endif - - /* main_loop */ - for (;;) { - WATCHDOG_RESET(); - main_loop(); - } -} diff --git a/include/configs/openrisc-generic.h b/include/configs/openrisc-generic.h index dfb8d3a..14e44b0 100644 --- a/include/configs/openrisc-generic.h +++ b/include/configs/openrisc-generic.h @@ -10,6 +10,7 @@ /* * BOARD/CPU */ +#define CONFIG_SYS_GENERIC_BOARD #define CONFIG_SYS_CLK_FREQ 50000000 #define CONFIG_SYS_RESET_ADDR 0x00000100