2 *****************************************************************************
4 * This file is part of the coreboot project.
6 * Copyright (C) 2012 Advanced Micro Devices, Inc.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 2 of the License.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 * ***************************************************************************
24 #ifndef _SB800_CIMX_SPI_H_
25 #define _SB800_CIMX_SPI_H_
27 void execute_command(volatile u8 * spi_address);
28 void wait4command_complete(volatile u8 * spi_address);
29 void reset_internal_fifo_pointer(volatile u8 * spi_address);
30 u8 read_spi_status(volatile u8 * spi_address);
31 void wait4flashpart_ready(volatile u8 * spi_address);
32 void write_spi_status(volatile u8 * spi_address, u8 status);
33 void read_spi_id(volatile u8 * spi_address);
34 void spi_write_enable(volatile u8 * spi_address);
35 void sector_erase_spi(volatile u8 * spi_address, u32 address);
36 void chip_erase_spi(volatile u8 * spi_address);
37 void byte_program(volatile u8 * spi_address, u32 address, u32 data);
38 void dword_noneAAI_program(volatile u8 * spi_address, u32 address, u32 data);
39 void dword_program(volatile u8 * spi_address, u32 address, u32 data);
40 void direct_byte_program(volatile u8 * spi_address, volatile u32 * address, u32 data);