From patchwork Mon Dec 4 22:22:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 120610 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp1434683edb; Mon, 4 Dec 2017 14:23:27 -0800 (PST) X-Google-Smtp-Source: AGs4zMY5Hh42NCJztWZ331XajTc0c+pV2TP6UHnupkMhlPMRANd2qBQvAWuAovrTMP7vDSD0Q8aJ X-Received: by 10.84.141.36 with SMTP id 33mr16072325plu.247.1512426207591; Mon, 04 Dec 2017 14:23:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512426207; cv=none; d=google.com; s=arc-20160816; b=OsInKQrBoyESlCU1cJEk1yAlg528gevR+gH8fjdoyZFohDhMlemfPbsuR0CZPdoBYp VY9+HuDIu0B94U+8HKisixl0JnegALIyVyr0oqRNEIO7XMJOhsDgY3eJhgAqiMWMF0oa +DHzuSJj3tIebysFJ7w5hykj0BD5vPVnkxkdusYIQYpaYGyl4RmXC0WZcBRJMWc1l0q8 xpYUpFftnM2e1vs3AYIxSx2tm3cyf1AU+bP+P9f/IetV8yCybm/8faAv4kaS5DJ0rCkW G0FiRq11XXF2RRZWrIcpzfMYKGYTgdLa3HoepzoMWbgXeezbh0e542YvEgIwfmhaI5sN PDLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=4Ro3ffv7VF9mCxq5D+hYEkTZjfa8thf84Ezj4kshH7o=; b=nJYaaC8ySdXpkut8IDT0hawSn0ywYejBgAVgXEXwKghglyGp2pcIFTzK357iybejiw qc/wgC02NAUguuSRGhGgi/oX68iFLBEKvWTQh0yxtM1n9VURMNmEKIkB+rJsfv+wb7tD l5jqKgZVJlJrjuHDN/UqBh298l7YdJH9QDpzedDgA56V8Fa7Y6wYwwI4pChN583eFbCb y7ed6KWOPJBbUAc+sQhyPWHYC3goRjNRl1Aq9ktD3ojxSQ1bOPnoQkHWKDrep4Xrho2D 0kLSGIYIRAdym0QxgunjgyBjsEehw8kGt7mhSqqQHz4qNAeGIunAoxMlcMu3zNguxZxr fsjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=LKwfkmUX; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id b193si10054894pga.103.2017.12.04.14.23.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Dec 2017 14:23:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=LKwfkmUX; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 96AB220356243; Mon, 4 Dec 2017 14:18:46 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::244; helo=mail-wm0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8D23B20356241 for ; Mon, 4 Dec 2017 14:18:45 -0800 (PST) Received: by mail-wm0-x244.google.com with SMTP id 9so8619511wme.4 for ; Mon, 04 Dec 2017 14:23:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PcH5C8yYFMCpbEWU9+802UyXgLBBJy4g1DSeg01KgBY=; b=LKwfkmUXbH64XB+u7jdtF/oVeL61djaMo9YIecJsh/2YbSMOLAOrpDK/afmiSgwR8W 8HScZqu6qaLQaSo5Uitmti5nqLIYs2t2TLINxFb/ZlGRB1ydBwXmx1M54eSAhkhjWn66 /oahpFXF/d5MTnKak9H+Y6Rbsd3phLNaxZZ+s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PcH5C8yYFMCpbEWU9+802UyXgLBBJy4g1DSeg01KgBY=; b=kH6rPnnoPB8E+voNobfO3qgn/OkePUVFdUHuzYjO/4ECn4wg/h7BcqYqOthfuMhJk0 FmU9yZhKdMFABMlbHImaKRCrmxn/7AswJ0xCJDkmGUwM0poG74RJhwkO791N0R5JOu7I 9o1Uh5/H0kwTPIUXGRGB5/UYXawHJ7vYqk7e6Dz+3z79ntq/GrCJ1z1fpPLYMPs7Qgjc 6GoyNSLi+LTytijmL891+9fzZx7OcaN8deRs2dEjwGD5UPg21hK0Lh98f6ifwrmuhFSS 2368snJONwC/q2H8OVEOlEXJ+41jZydhqQpVWogU8O3n2+oLhDLwVbYRbii/GePe1IY7 zJxQ== X-Gm-Message-State: AJaThX4tHNuwyzY0+SSjkkGd4IY+I8fGXcrnnal++/FoEjTsck/wh8u8 TkRvA1Bbn4lg9HlvTbR1HsPUYBHl01Y= X-Received: by 10.28.47.66 with SMTP id v63mr7985834wmv.144.1512426194056; Mon, 04 Dec 2017 14:23:14 -0800 (PST) Received: from localhost.localdomain ([105.150.171.234]) by smtp.gmail.com with ESMTPSA id x133sm5667961wmd.44.2017.12.04.14.23.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Dec 2017 14:23:13 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 4 Dec 2017 22:22:39 +0000 Message-Id: <20171204222243.15950-10-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171204222243.15950-1-ard.biesheuvel@linaro.org> References: <20171204222243.15950-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v2 09/13] ArmPlatformPkg: remove unused PL35x driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" No platform uses this so remove it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by-if-no-comments-by-15-Dec: Leif Lindholm --- ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.S | 60 ---------------- ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.asm | 62 ---------------- ArmPlatformPkg/Drivers/PL35xSmc/PL35xSmc.inf | 29 -------- ArmPlatformPkg/Include/Drivers/PL35xSmc.h | 75 -------------------- 4 files changed, 226 deletions(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.S b/ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.S deleted file mode 100644 index a26a4d43770e..000000000000 --- a/ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.S +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (c) 2011-2012, ARM Limited. All rights reserved. -# -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# - -#include -#include -#include -#include - -.text - -#Maintain 8 byte alignment -.align 3 - -GCC_ASM_EXPORT(PL35xSmcInitialize) -GCC_ASM_EXPORT(PL35xSmcSetRefresh) - -// IN r1 Smc Base Address -// IN r2 Smc Configuration Start Address -// IN r3 Smc Configuration End Address -// NOTE: This code is been called before any stack has been setup. It means some registers -// could be overwritten (case of 'r0') -ASM_PFX(PL35xSmcInitialize): - // While (SmcConfigurationStart < SmcConfigurationEnd) - cmp r2, r3 - blxge lr - - // Write to set_cycle register(holding register for NOR 1 cycle register or NAND cycle register) - ldr r0, [r2, #0x4] - str r0, [r1, #PL350_SMC_SET_CYCLES_OFFSET] - - // Write to set_opmode register(holding register for NOR 1 opomode register or NAND opmode register) - ldr r0, [r2, #0x8] - str r0, [r1, #PL350_SMC_SET_OPMODE_OFFSET] - - // Write to direct_cmd register so that the NOR 1 registers(set-cycles and opmode) are updated with holding registers - ldr r0, =PL350_SMC_DIRECT_CMD_ADDR_CMD_UPDATE - ldr r4, [r2, #0x0] - orr r0, r0, r4 - str r0, [r1, #PL350_SMC_DIRECT_CMD_OFFSET] - - add r2, #0xC - b ASM_PFX(PL35xSmcInitialize) - -// IN r1 Smc Base Address -// IN r2 Smc Refresh Period 0 -// IN r3 Smc Refresh Period 1 -ASM_PFX(PL35xSmcSetRefresh): - str r2, [r1, #PL350_SMC_REFRESH_0_OFFSET] - str r3, [r1, #PL350_SMC_REFRESH_1_OFFSET] - blx lr diff --git a/ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.asm b/ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.asm deleted file mode 100644 index 661b0688c85c..000000000000 --- a/ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.asm +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) 2011-2012, ARM Limited. All rights reserved. -// -// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the BSD License -// which accompanies this distribution. The full text of the license may be found at -// http://opensource.org/licenses/bsd-license.php -// -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -// -// - -#include -#include -#include -#include - - INCLUDE AsmMacroIoLib.inc - - EXPORT PL35xSmcInitialize - EXPORT PL35xSmcSetRefresh - - PRESERVE8 - AREA ModuleInitializeSMC, CODE, READONLY - -// IN r1 Smc Base Address -// IN r2 Smc Configuration Start Address -// IN r3 Smc Configuration End Address -// NOTE: This code is been called before any stack has been setup. It means some registers -// could be overwritten (case of 'r0') -PL35xSmcInitialize - // While (SmcConfigurationStart < SmcConfigurationEnd) - cmp r2, r3 - blxge lr - - // Write to set_cycle register(holding register for NOR 1 cycle register or NAND cycle register) - ldr r0, [r2, #0x4] - str r0, [r1, #PL350_SMC_SET_CYCLES_OFFSET] - - // Write to set_opmode register(holding register for NOR 1 opomode register or NAND opmode register) - ldr r0, [r2, #0x8] - str r0, [r1, #PL350_SMC_SET_OPMODE_OFFSET] - - // Write to direct_cmd register so that the NOR 1 registers(set-cycles and opmode) are updated with holding registers - ldr r0, =PL350_SMC_DIRECT_CMD_ADDR_CMD_UPDATE - ldr r4, [r2, #0x0] - orr r0, r0, r4 - str r0, [r1, #PL350_SMC_DIRECT_CMD_OFFSET] - - add r2, #0xC - b PL35xSmcInitialize - -// IN r1 Smc Base Address -// IN r2 Smc Refresh Period 0 -// IN r3 Smc Refresh Period 1 -PL35xSmcSetRefresh - str r2, [r1, #PL350_SMC_REFRESH_0_OFFSET] - str r3, [r1, #PL350_SMC_REFRESH_1_OFFSET] - blx lr - - END diff --git a/ArmPlatformPkg/Drivers/PL35xSmc/PL35xSmc.inf b/ArmPlatformPkg/Drivers/PL35xSmc/PL35xSmc.inf deleted file mode 100644 index 2eee5ab5056f..000000000000 --- a/ArmPlatformPkg/Drivers/PL35xSmc/PL35xSmc.inf +++ /dev/null @@ -1,29 +0,0 @@ -#/* @file -# Copyright (c) 2011, ARM Limited. All rights reserved. -# -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -#*/ - -[Defines] - INF_VERSION = 0x00010005 - BASE_NAME = PL35xSmc - FILE_GUID = 10952220-aa32-11df-a438-0002a5d5c51b - MODULE_TYPE = SEC - VERSION_STRING = 1.0 - LIBRARY_CLASS = PL35xSmcLib - -[Sources.common] - InitializeSMC.asm | RVCT - InitializeSMC.S | GCC - -[Packages] - ArmPkg/ArmPkg.dec - ArmPlatformPkg/ArmPlatformPkg.dec - MdePkg/MdePkg.dec diff --git a/ArmPlatformPkg/Include/Drivers/PL35xSmc.h b/ArmPlatformPkg/Include/Drivers/PL35xSmc.h deleted file mode 100644 index 750f5088b6de..000000000000 --- a/ArmPlatformPkg/Include/Drivers/PL35xSmc.h +++ /dev/null @@ -1,75 +0,0 @@ -/** @file -* -* Copyright (c) 2011-2012, ARM Limited. All rights reserved. -* -* This program and the accompanying materials -* are licensed and made available under the terms and conditions of the BSD License -* which accompanies this distribution. The full text of the license may be found at -* http://opensource.org/licenses/bsd-license.php -* -* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -* -**/ - -#ifndef PL35xSMC_H_ -#define PL35xSMC_H_ - -#define PL350_SMC_DIRECT_CMD_OFFSET 0x10 -#define PL350_SMC_SET_CYCLES_OFFSET 0x14 -#define PL350_SMC_SET_OPMODE_OFFSET 0x18 -#define PL350_SMC_REFRESH_0_OFFSET 0x20 -#define PL350_SMC_REFRESH_1_OFFSET 0x24 - -#define PL350_SMC_DIRECT_CMD_ADDR(addr) ((addr) & 0xFFFFF) -#define PL350_SMC_DIRECT_CMD_ADDR_SET_CRE (1 << 20) -#define PL350_SMC_DIRECT_CMD_ADDR_CMD_MODE_UPDATE (3 << 21) -#define PL350_SMC_DIRECT_CMD_ADDR_CMD_UPDATE (2 << 21) -#define PL350_SMC_DIRECT_CMD_ADDR_CMD_MODE (1 << 21) -#define PL350_SMC_DIRECT_CMD_ADDR_CMD_UPDATE_AXI (0 << 21) -#define PL350_SMC_DIRECT_CMD_ADDR_CS_INTERF(interf,chip) (((interf) << 25) | ((chip) << 23)) -#define PL350_SMC_DIRECT_CMD_ADDR_CS(ChipSelect) (((ChipSelect) & 0x7) << 23) - -#define PL350_SMC_SET_OPMODE_MEM_WIDTH_8 (0 << 0) -#define PL350_SMC_SET_OPMODE_MEM_WIDTH_16 (1 << 0) -#define PL350_SMC_SET_OPMODE_MEM_WIDTH_32 (2 << 0) -#define PL350_SMC_SET_OPMODE_SET_RD_SYNC (1 << 2) -#define PL350_SMC_SET_OPMODE_SET_RD_BURST_LENGTH_1 (0 << 3) -#define PL350_SMC_SET_OPMODE_SET_RD_BURST_LENGTH_4 (1 << 3) -#define PL350_SMC_SET_OPMODE_SET_RD_BURST_LENGTH_8 (2 << 3) -#define PL350_SMC_SET_OPMODE_SET_RD_BURST_LENGTH_16 (3 << 3) -#define PL350_SMC_SET_OPMODE_SET_RD_BURST_LENGTH_32 (4 << 3) -#define PL350_SMC_SET_OPMODE_SET_RD_BURST_LENGTH_CONT (5 << 3) -#define PL350_SMC_SET_OPMODE_SET_WR_SYNC (1 << 6) -#define PL350_SMC_SET_OPMODE_SET_WR_BURST_LENGTH_1 (0 << 7) -#define PL350_SMC_SET_OPMODE_SET_WR_BURST_LENGTH_4 (1 << 7) -#define PL350_SMC_SET_OPMODE_SET_WR_BURST_LENGTH_8 (2 << 7) -#define PL350_SMC_SET_OPMODE_SET_WR_BURST_LENGTH_16 (3 << 7) -#define PL350_SMC_SET_OPMODE_SET_WR_BURST_LENGTH_32 (4 << 7) -#define PL350_SMC_SET_OPMODE_SET_WR_BURST_LENGTH_CONT (5 << 7) -#define PL350_SMC_SET_OPMODE_SET_BAA (1 << 10) -#define PL350_SMC_SET_OPMODE_SET_ADV (1 << 11) -#define PL350_SMC_SET_OPMODE_SET_BLS (1 << 12) -#define PL350_SMC_SET_OPMODE_SET_BURST_ALIGN_ANY (0 << 13) -#define PL350_SMC_SET_OPMODE_SET_BURST_ALIGN_32 (1 << 13) -#define PL350_SMC_SET_OPMODE_SET_BURST_ALIGN_64 (2 << 13) -#define PL350_SMC_SET_OPMODE_SET_BURST_ALIGN_128 (3 << 13) -#define PL350_SMC_SET_OPMODE_SET_BURST_ALIGN_256 (4 << 13) - -#define PL350_SMC_SET_CYCLE_NAND_T_RC(t) (((t) & 0xF) << 0) -#define PL350_SMC_SET_CYCLE_NAND_T_WC(t) (((t) & 0xF) << 4) -#define PL350_SMC_SET_CYCLE_NAND_T_REA(t) (((t) & 0x7) << 8) -#define PL350_SMC_SET_CYCLE_NAND_T_WP(t) (((t) & 0x7) << 11) -#define PL350_SMC_SET_CYCLE_NAND_T_CLR(t) (((t) & 0x7) << 14) -#define PL350_SMC_SET_CYCLE_NAND_T_AR(t) (((t) & 0x7) << 17) -#define PL350_SMC_SET_CYCLE_NAND_T_RR(t) (((t) & 0x7) << 20) - -#define PL350_SMC_SET_CYCLE_SRAM_T_RC(t) (((t) & 0xF) << 0) -#define PL350_SMC_SET_CYCLE_SRAM_T_WC(t) (((t) & 0xF) << 4) -#define PL350_SMC_SET_CYCLE_SRAM_T_CEOE(t) (((t) & 0x7) << 8) -#define PL350_SMC_SET_CYCLE_SRAM_T_WP(t) (((t) & 0x7) << 11) -#define PL350_SMC_SET_CYCLE_SRAM_T_PC(t) (((t) & 0x7) << 14) -#define PL350_SMC_SET_CYCLE_SRAM_T_TR(t) (((t) & 0x7) << 17) -#define PL350_SMC_SET_CYCLE_SRAM_WE_TIME (1 << 20) - -#endif