From patchwork Mon Jul 22 11:59:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kever Yang X-Patchwork-Id: 1134865 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rock-chips.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tQiKFGzM"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45sh0H6Zh4z9s00 for ; Mon, 22 Jul 2019 22:35:27 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 6F300C21FB2; Mon, 22 Jul 2019 12:35:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3D3ACC21F07; Mon, 22 Jul 2019 12:04:06 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1B752C21F04; Mon, 22 Jul 2019 12:04:05 +0000 (UTC) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by lists.denx.de (Postfix) with ESMTPS id 11514C21DD3 for ; Mon, 22 Jul 2019 12:00:02 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id g2so17274881pfq.0 for ; Mon, 22 Jul 2019 05:00:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=8OpYG+PnRakn9I7WzNBUmLjHXTQ+jOlqfuMDSpPdLOk=; b=tQiKFGzMXECTBoOSaHpOzMp+T8lzAZrRdo8h7Y0DNSI5I8P3sf5uCLCVbr/0ujA3j2 DX0DI40MghnGCDTICBlB2sjLXVz+fT89MGh70FghZWopiXjpthYRzkHQDsDLj+NT5zHz AJv+A67OnW605gicFE5tyRTLCXVc91yjqpHJIt2nQPZ3Xezsmc4oaEcsqPvcSu7c/bfu CDqlv24lu+Rg64YxMeyQMYa7XqQDIHWsvfGCBQDGOSOexwnCMzwb1jpDlyqDvwKAOFA+ 825Xatx9jJabwkR5ivn6wPt9K/bR2uO4GDUkwtYtqFuf3ItQqTSG/RACqBByjztHGizG tTOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=8OpYG+PnRakn9I7WzNBUmLjHXTQ+jOlqfuMDSpPdLOk=; b=EicAner2X41oWzA5nSzB8vs+e6C6bdRy8tSr79qM58TUb5kkdFlA7CmHFkB1hKWv8u FYQRIzHnxYZSEq9sGR57VuICqw2LW4fqK//UBiWmSZfSTy4PkJtxvN3NzztoqyhI2+CD hcWbZcnAOqRs7T9UGCKR8XxSVe73xNQYdKa59ib5oASzTbNKgVmWapXmV4DkKRRpHBud GEMbLzsEOCfjUb8rK3xH96Ourmnol2ROgzHZIR6BSioPbW/KFpMozAw8vD2H272l9JDs FB7sn0YIgpsRSUh348D2WI5VjL2aq7ForB23ICv1IWIF2SuDOzbXwdT6qWltQSmkj3yP qLVw== X-Gm-Message-State: APjAAAX3j/ViZ9ld3vfn4NrK0o30xQPz4hQjJ64CfdRz7KYcu87hkWVA xD+W+rmcDwoQB7YLl6iJR/z+U7+q X-Google-Smtp-Source: APXvYqygTOMpS85fMCBojyX2Z6ZG0zc8uO/tSCgpp0J7l/QcnJsWB4aRle+9SyA5pfipj/w+/TGmew== X-Received: by 2002:a63:4c46:: with SMTP id m6mr73069445pgl.59.1563796800621; Mon, 22 Jul 2019 05:00:00 -0700 (PDT) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id u134sm37621218pfc.19.2019.07.22.04.59.58 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 22 Jul 2019 05:00:00 -0700 (PDT) From: Kever Yang To: u-boot@lists.denx.de Date: Mon, 22 Jul 2019 19:59:10 +0800 Message-Id: <20190722115942.24962-4-kever.yang@rock-chips.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190722115942.24962-1-kever.yang@rock-chips.com> References: <20190722115942.24962-1-kever.yang@rock-chips.com> Subject: [U-Boot] [PATCH 03/35] rockchip: intruduce common BROM_BOOTSOURCE_ID_ADDR X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" The boot source from BootRom is store at a fix offset of IRAM, update to use the common macro instead of rk3399 specific one. Signed-off-by: Kever Yang --- arch/arm/include/asm/arch-rockchip/bootrom.h | 2 +- arch/arm/mach-rockchip/rk3399-board-spl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/arch-rockchip/bootrom.h b/arch/arm/include/asm/arch-rockchip/bootrom.h index d67f43f09c..3499227e29 100644 --- a/arch/arm/include/asm/arch-rockchip/bootrom.h +++ b/arch/arm/include/asm/arch-rockchip/bootrom.h @@ -55,6 +55,6 @@ enum { /** * Locations of the boot-device identifier in SRAM */ -#define RK3399_BROM_BOOTSOURCE_ID_ADDR 0xff8c0010 +#define BROM_BOOTSOURCE_ID_ADDR (CONFIG_IRAM_BASE + 0x10) #endif diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c b/arch/arm/mach-rockchip/rk3399-board-spl.c index 7154d8e5d0..3624c8ea65 100644 --- a/arch/arm/mach-rockchip/rk3399-board-spl.c +++ b/arch/arm/mach-rockchip/rk3399-board-spl.c @@ -35,7 +35,7 @@ static const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = { const char *board_spl_was_booted_from(void) { - u32 bootdevice_brom_id = readl(RK3399_BROM_BOOTSOURCE_ID_ADDR); + u32 bootdevice_brom_id = readl(BROM_BOOTSOURCE_ID_ADDR); const char *bootdevice_ofpath = NULL; if (bootdevice_brom_id < ARRAY_SIZE(boot_devices))