199767f8919635c4928607450d9e0abb932109ceToomas Soome/*-
199767f8919635c4928607450d9e0abb932109ceToomas Soome * Copyright (c) 2008 John Hay. All rights reserved.
199767f8919635c4928607450d9e0abb932109ceToomas Soome *
199767f8919635c4928607450d9e0abb932109ceToomas Soome * Redistribution and use in source and binary forms, with or without
199767f8919635c4928607450d9e0abb932109ceToomas Soome * modification, are permitted provided that the following conditions
199767f8919635c4928607450d9e0abb932109ceToomas Soome * are met:
199767f8919635c4928607450d9e0abb932109ceToomas Soome * 1. Redistributions of source code must retain the above copyright
199767f8919635c4928607450d9e0abb932109ceToomas Soome * notice, this list of conditions and the following disclaimer.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * 2. Redistributions in binary form must reproduce the above copyright
199767f8919635c4928607450d9e0abb932109ceToomas Soome * notice, this list of conditions and the following disclaimer in the
199767f8919635c4928607450d9e0abb932109ceToomas Soome * documentation and/or other materials provided with the distribution.
199767f8919635c4928607450d9e0abb932109ceToomas Soome *
199767f8919635c4928607450d9e0abb932109ceToomas Soome * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
199767f8919635c4928607450d9e0abb932109ceToomas Soome * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
199767f8919635c4928607450d9e0abb932109ceToomas Soome * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
199767f8919635c4928607450d9e0abb932109ceToomas Soome * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
199767f8919635c4928607450d9e0abb932109ceToomas Soome * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
199767f8919635c4928607450d9e0abb932109ceToomas Soome * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
199767f8919635c4928607450d9e0abb932109ceToomas Soome * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
199767f8919635c4928607450d9e0abb932109ceToomas Soome * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
199767f8919635c4928607450d9e0abb932109ceToomas Soome * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
199767f8919635c4928607450d9e0abb932109ceToomas Soome *
199767f8919635c4928607450d9e0abb932109ceToomas Soome * $FreeBSD$
199767f8919635c4928607450d9e0abb932109ceToomas Soome */
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef ARM_BOOT_LIB_H
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define ARM_BOOT_LIB_H
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#include <sys/cdefs.h>
199767f8919635c4928607450d9e0abb932109ceToomas Soome#include <sys/param.h>
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint main(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid DELAY(int);
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint getc(int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid putchar(int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid xputchar(int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid putstr(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid puthex8(u_int8_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid puthexlist(const u_int8_t *, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid printf(const char *fmt,...);
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid bzero(void *, size_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomechar *strcpy(char *to, const char *from);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint strcmp(const char *to, const char *from);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint p_strlen(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint p_memcmp(const char *, const char *, unsigned);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid *memchr(const void *, int, size_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid memcpy(void *to, const void *from, unsigned size);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid *memmem(const void *, size_t, const void *, size_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid p_memset(char *buffer, char value, int size);
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define strlen p_strlen
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define memcmp p_memcmp
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define memset p_memset
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomeu_int16_t swap16(u_int16_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeu_int32_t swap32(u_int32_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomeconst char *board_init(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid clr_board(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint avila_read(char*, unsigned, unsigned);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeu_int cpu_id(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif /* !ARM_BOOT_LIB_H */