aboutsummaryrefslogtreecommitdiff
path: root/include/plat
diff options
context:
space:
mode:
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-10-10 11:14:44 +0100
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-10-10 11:14:44 +0100
commitaa7877c4bf68fa6ad6813323f659b82355acaab5 (patch)
tree7d575519c0c9536d062fc5cf3cc0cbe426f17060 /include/plat
parent3d3619c6dfcfd79685b92eb1190fbb1968a7d217 (diff)
downloadtrusted-firmware-a-aa7877c4bf68fa6ad6813323f659b82355acaab5.tar.gz
plat/arm: Move norflash driver to drivers/ folder
This way it can be reused by other platforms if needed. Note that this driver is designed to work with the Versatile Express NOR flash of Juno and FVP. In said platforms, the memory is organized as an interleaved memory of two chips with a 16 bit word. Any platform that wishes to reuse it with a different configuration will need to modify the driver so that it is more generic. Change-Id: Ic721758425864e0cf42b7b9b04bf0d9513b6022e Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'include/plat')
-rw-r--r--include/plat/arm/board/common/drivers/norflash.h46
1 files changed, 0 insertions, 46 deletions
diff --git a/include/plat/arm/board/common/drivers/norflash.h b/include/plat/arm/board/common/drivers/norflash.h
deleted file mode 100644
index 5763b36df1..0000000000
--- a/include/plat/arm/board/common/drivers/norflash.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef __NORFLASH_H_
-#define __NORFLASH_H_
-
-#include <stdint.h>
-
-/* First bus cycle */
-#define NOR_CMD_READ_ARRAY 0xFF
-#define NOR_CMD_READ_ID_CODE 0x90
-#define NOR_CMD_READ_QUERY 0x98
-#define NOR_CMD_READ_STATUS_REG 0x70
-#define NOR_CMD_CLEAR_STATUS_REG 0x50
-#define NOR_CMD_WRITE_TO_BUFFER 0xE8
-#define NOR_CMD_WORD_PROGRAM 0x40
-#define NOR_CMD_BLOCK_ERASE 0x20
-#define NOR_CMD_LOCK_UNLOCK 0x60
-#define NOR_CMD_BLOCK_ERASE_ACK 0xD0
-
-/* Second bus cycle */
-#define NOR_LOCK_BLOCK 0x01
-#define NOR_UNLOCK_BLOCK 0xD0
-
-/* Status register bits */
-#define NOR_DWS (1 << 7)
-#define NOR_ESS (1 << 6)
-#define NOR_ES (1 << 5)
-#define NOR_PS (1 << 4)
-#define NOR_VPPS (1 << 3)
-#define NOR_PSS (1 << 2)
-#define NOR_BLS (1 << 1)
-#define NOR_BWS (1 << 0)
-
-/* Public API */
-void nor_send_cmd(uintptr_t base_addr, unsigned long cmd);
-int nor_word_program(uintptr_t base_addr, unsigned long data);
-int nor_lock(uintptr_t base_addr);
-int nor_unlock(uintptr_t base_addr);
-int nor_erase(uintptr_t base_addr);
-
-#endif /* __NORFLASH_H_ */
-