1 /* 2 * Copyright (c) 2018 Arm Limited 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /** 18 * \file gfc100_process_specific_api.h 19 * 20 * \brief Header file for the process specific part of the 21 * GFC100 flash controller 22 */ 23 24 #ifndef __GFC100_PROCESS_SPEC_API_H__ 25 #define __GFC100_PROCESS_SPEC_API_H__ 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif 30 31 #include <stdint.h> 32 33 /** 34 * \brief Sets timing parameters on the process specific part 35 * 36 * \param[in] reg_map_base Process specific register map base 37 * \param[in] sys_clk System clock in Hz 38 */ 39 void gfc100_proc_spec_set_eflash_timing(uint32_t reg_map_base, 40 uint32_t sys_clk); 41 42 /** 43 * \brief Gets flash memory size 44 * 45 * \param[in] reg_map_base Process specific register map base 46 * 47 * \return Returns the size of the flash memory 48 */ 49 uint32_t gfc100_proc_spec_get_eflash_size(uint32_t reg_map_base); 50 51 /** 52 * \brief Gets flash page size 53 * 54 * \param[in] reg_map_base Process specific register map base 55 * 56 * \return Returns the page size of the flash memory 57 */ 58 uint32_t gfc100_proc_spec_get_eflash_page_size(uint32_t reg_map_base); 59 60 /** 61 * \brief Gets word width of the process specific part 62 * 63 * \param[in] reg_map_base Process specific register map base 64 * 65 * \return Returns word width of the process specific part 66 */ 67 uint32_t gfc100_proc_spec_get_eflash_word_width(uint32_t reg_map_base); 68 69 /** 70 * \brief Gets number of info pages 71 * 72 * \param[in] reg_map_base Process specific register map base 73 * 74 * \return Returns the number of info pages from the extended area 75 */ 76 uint32_t gfc100_proc_spec_get_num_of_info_pages(uint32_t reg_map_base); 77 78 /** 79 * \brief Gets process specific error bits 80 * 81 * \param[in] reg_map_base Process specific register map base 82 * 83 * \return Returns the error bits specified by the process specific part 84 * of the controller. 85 */ 86 uint32_t gfc100_proc_spec_get_error_cause(uint32_t reg_map_base); 87 88 #ifdef __cplusplus 89 } 90 #endif 91 92 #endif /* __GFC100_PROCESS_SPEC_API_H__ */ 93 94