blob: 280bd796787b8b6e4efc8aedfa4fb40f30dcd6ab [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/******************************************************************************
2 *
3 * (C)Copyright 2014 Marvell Hefei Branch. All Rights Reserved.
4 *
5 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MARVELL.
6 * The copyright notice above does not evidence any actual or intended
7 * publication of such source code.
8 * This Module contains Proprietary Information of Marvell and should be
9 * treated as Confidential.
10 * The information in this file is provided for the exclusive use of the
11 * licensees of Marvell.
12 * Such users have the right to use, modify, and incorporate this code into
13 * products for purposes authorized by the license agreement provided they
14 * include this notice and the associated copyright notice with any such
15 * product.
16 * The information in this file is provided "AS IS" without warranty.
17 *
18 ******************************************************************************/
19
20#ifndef __SPINOR_EXTENED_H__
21#define __SPINOR_EXTENED_H__
22
23#include "Typedef.h"
24#include "predefines.h"
25#include "spi.h"
26#include "Errors.h"
27#include "PlatformConfig.h"
28#include "xllp_dmac.h"
29#include "SPINOR.h"
30
31
32// commands
33#define SPINOR_ENABLE_4BYTE_MODE 0xB7
34#define SPINOR_DISABLE_4BYTE_MODE 0xE9
35#define SPINOR_READ_STATUS_CMD0 0x35
36#define SPINOR_READ_STATUS_CMD1 0x70
37#define SPINOR_READ_4Bytes_CMD0 0x03
38#define SPINOR_READ_4Bytes_CMD1 0x13
39#define SPINOR_PROGRAM_4Bytes_CMD0 0x02
40#define SPINOR_PROGRAM_4Bytes_CMD1 0x12
41#define SPINOR_SECTOR_ERASE_4Bytes_CMD0 0xD8
42#define SPINOR_SECTOR_ERASE_4Bytes_CMD1 0xDC
43
44
45// functions
46UINT_T SPINOR_Extend_Read(UINT_T FlashOffset, UINT_T Buffer, UINT_T Size);
47UINT_T SPINOR_Extend_Write(UINT_T Address, UINT_T Buffer, UINT_T Size);
48UINT_T SPINOR_Extend_Erase(UINT_T Address, UINT_T Size);
49
50#endif
51