1*2be45b66SKalle Valo /* 2*2be45b66SKalle Valo * Copyright (C) 2007, David Kilroy 3*2be45b66SKalle Valo * 4*2be45b66SKalle Valo * The contents of this file are subject to the Mozilla Public License 5*2be45b66SKalle Valo * Version 1.1 (the "License"); you may not use this file except in 6*2be45b66SKalle Valo * compliance with the License. You may obtain a copy of the License 7*2be45b66SKalle Valo * at http://www.mozilla.org/MPL/ 8*2be45b66SKalle Valo * 9*2be45b66SKalle Valo * Software distributed under the License is distributed on an "AS IS" 10*2be45b66SKalle Valo * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 11*2be45b66SKalle Valo * the License for the specific language governing rights and 12*2be45b66SKalle Valo * limitations under the License. 13*2be45b66SKalle Valo * 14*2be45b66SKalle Valo * Alternatively, the contents of this file may be used under the 15*2be45b66SKalle Valo * terms of the GNU General Public License version 2 (the "GPL"), in 16*2be45b66SKalle Valo * which case the provisions of the GPL are applicable instead of the 17*2be45b66SKalle Valo * above. If you wish to allow the use of your version of this file 18*2be45b66SKalle Valo * only under the terms of the GPL and not to allow others to use your 19*2be45b66SKalle Valo * version of this file under the MPL, indicate your decision by 20*2be45b66SKalle Valo * deleting the provisions above and replace them with the notice and 21*2be45b66SKalle Valo * other provisions required by the GPL. If you do not delete the 22*2be45b66SKalle Valo * provisions above, a recipient may use your version of this file 23*2be45b66SKalle Valo * under either the MPL or the GPL. 24*2be45b66SKalle Valo */ 25*2be45b66SKalle Valo #ifndef _HERMES_DLD_H 26*2be45b66SKalle Valo #define _HERMES_DLD_H 27*2be45b66SKalle Valo 28*2be45b66SKalle Valo #include "hermes.h" 29*2be45b66SKalle Valo 30*2be45b66SKalle Valo int hermesi_program_init(struct hermes *hw, u32 offset); 31*2be45b66SKalle Valo int hermesi_program_end(struct hermes *hw); 32*2be45b66SKalle Valo int hermes_program(struct hermes *hw, const char *first_block, const void *end); 33*2be45b66SKalle Valo 34*2be45b66SKalle Valo int hermes_read_pda(struct hermes *hw, 35*2be45b66SKalle Valo __le16 *pda, 36*2be45b66SKalle Valo u32 pda_addr, 37*2be45b66SKalle Valo u16 pda_len, 38*2be45b66SKalle Valo int use_eeprom); 39*2be45b66SKalle Valo int hermes_apply_pda(struct hermes *hw, 40*2be45b66SKalle Valo const char *first_pdr, 41*2be45b66SKalle Valo const void *pdr_end, 42*2be45b66SKalle Valo const __le16 *pda, 43*2be45b66SKalle Valo const void *pda_end); 44*2be45b66SKalle Valo int hermes_apply_pda_with_defaults(struct hermes *hw, 45*2be45b66SKalle Valo const char *first_pdr, 46*2be45b66SKalle Valo const void *pdr_end, 47*2be45b66SKalle Valo const __le16 *pda, 48*2be45b66SKalle Valo const void *pda_end); 49*2be45b66SKalle Valo 50*2be45b66SKalle Valo size_t hermes_blocks_length(const char *first_block, const void *end); 51*2be45b66SKalle Valo 52*2be45b66SKalle Valo #endif /* _HERMES_DLD_H */ 53