1*314929b4SCyril Bur /* Copyright 2016 IBM 2*314929b4SCyril Bur * 3*314929b4SCyril Bur * Licensed under the Apache License, Version 2.0 (the "License"); 4*314929b4SCyril Bur * you may not use this file except in compliance with the License. 5*314929b4SCyril Bur * You may obtain a copy of the License at 6*314929b4SCyril Bur * 7*314929b4SCyril Bur * http://www.apache.org/licenses/LICENSE-2.0 8*314929b4SCyril Bur * 9*314929b4SCyril Bur * Unless required by applicable law or agreed to in writing, software 10*314929b4SCyril Bur * distributed under the License is distributed on an "AS IS" BASIS, 11*314929b4SCyril Bur * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*314929b4SCyril Bur * See the License for the specific language governing permissions and 13*314929b4SCyril Bur * limitations under the License. 14*314929b4SCyril Bur * 15*314929b4SCyril Bur */ 16*314929b4SCyril Bur 17*314929b4SCyril Bur #ifndef PREFIX 18*314929b4SCyril Bur #define PREFIX "" 19*314929b4SCyril Bur #endif 20*314929b4SCyril Bur 21*314929b4SCyril Bur enum { 22*314929b4SCyril Bur MBOX_LOG_NONE = 0, 23*314929b4SCyril Bur MBOX_LOG_VERBOSE = 1, 24*314929b4SCyril Bur MBOX_LOG_DEBUG = 2 25*314929b4SCyril Bur } verbosity; 26*314929b4SCyril Bur 27*314929b4SCyril Bur void (*mbox_vlog)(int p, const char *fmt, va_list args); 28*314929b4SCyril Bur 29*314929b4SCyril Bur void mbox_log_console(int p, const char *fmt, va_list args); 30*314929b4SCyril Bur 31*314929b4SCyril Bur __attribute__((format(printf, 2, 3))) 32*314929b4SCyril Bur void mbox_log(int p, const char *fmt, ...); 33*314929b4SCyril Bur 34*314929b4SCyril Bur uint16_t get_u16(uint8_t *ptr); 35*314929b4SCyril Bur 36*314929b4SCyril Bur void put_u16(uint8_t *ptr, uint16_t val); 37*314929b4SCyril Bur 38*314929b4SCyril Bur uint32_t get_u32(uint8_t *ptr); 39*314929b4SCyril Bur 40*314929b4SCyril Bur void put_u32(uint8_t *ptr, uint32_t val); 41*314929b4SCyril Bur 42*314929b4SCyril Bur char *get_dev_mtd(void); 43