mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
For some files:
indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs *.[ch] (trivial) Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@65 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
aecc25a2e1
commit
110c9f7e1c
8 changed files with 32 additions and 34 deletions
|
@ -11,8 +11,8 @@ void set_boot_successful(void);
|
|||
|
||||
void boot_successful(void);
|
||||
|
||||
#endif /* ASSEMBLY */
|
||||
#endif /* ASSEMBLY */
|
||||
|
||||
#define RTC_BOOT_BYTE 48
|
||||
|
||||
#endif /* PART_FALLBACK_BOOT_H */
|
||||
#endif /* PART_FALLBACK_BOOT_H */
|
||||
|
|
|
@ -36,4 +36,3 @@ struct mem_file {
|
|||
void *start;
|
||||
int len;
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ extern void *memmove(void *dest, const void *src, size_t n);
|
|||
extern void *memset(void *s, int c, size_t n);
|
||||
extern int memcmp(const void *s1, const void *s2, size_t n);
|
||||
|
||||
extern int sprintf(char * buf, const char *fmt, ...);
|
||||
extern int sprintf(char *buf, const char *fmt, ...);
|
||||
|
||||
// yes, linux has fancy ones. We don't care. This stuff gets used
|
||||
// hardly at all. And the pain of including those files is just too high.
|
||||
|
@ -18,10 +18,10 @@ extern int sprintf(char * buf, const char *fmt, ...);
|
|||
|
||||
//extern inline int strlen(char *src) { int i = 0; while (*src++) i++; return i;}
|
||||
|
||||
static inline size_t strnlen(const char *src, size_t max)
|
||||
{
|
||||
static inline size_t strnlen(const char *src, size_t max)
|
||||
{
|
||||
size_t i = 0;
|
||||
while((*src++) && (i < max)) {
|
||||
while ((*src++) && (i < max)) {
|
||||
i++;
|
||||
}
|
||||
return i;
|
||||
|
@ -30,7 +30,7 @@ static inline size_t strnlen(const char *src, size_t max)
|
|||
static inline size_t strlen(const char *src)
|
||||
{
|
||||
size_t i = 0;
|
||||
while(*src++) {
|
||||
while (*src++) {
|
||||
i++;
|
||||
}
|
||||
return i;
|
||||
|
@ -40,13 +40,13 @@ static inline char *strchr(const char *s, int c)
|
|||
{
|
||||
for (; *s; s++) {
|
||||
if (*s == c)
|
||||
return (char *) s;
|
||||
}
|
||||
return (char *)s;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline char *strdup(const char *s)
|
||||
{
|
||||
{
|
||||
size_t sz = strlen(s) + 1;
|
||||
char *d = malloc(sz);
|
||||
memcpy(d, s, sz);
|
||||
|
@ -71,7 +71,7 @@ static inline char *strncpy(char *to, const char *from, int count)
|
|||
}
|
||||
|
||||
static inline int strcmp(const char *s1, const char *s2)
|
||||
{
|
||||
{
|
||||
int r;
|
||||
|
||||
while ((r = (*s1 - *s2)) == 0 && *s1) {
|
||||
|
@ -79,13 +79,17 @@ static inline int strcmp(const char *s1, const char *s2)
|
|||
s2++;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int isspace(int c)
|
||||
{
|
||||
switch (c) {
|
||||
case ' ': case '\f': case '\n':
|
||||
case '\r': case '\t': case '\v':
|
||||
case ' ':
|
||||
case '\f':
|
||||
case '\n':
|
||||
case '\r':
|
||||
case '\t':
|
||||
case '\v':
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
|
@ -100,8 +104,7 @@ static inline int isdigit(int c)
|
|||
static inline int isxdigit(int c)
|
||||
{
|
||||
return ((c >= '0' && c <= '9') ||
|
||||
(c >= 'a' && c <= 'f') ||
|
||||
(c >= 'A' && c <= 'F'));
|
||||
(c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'));
|
||||
}
|
||||
|
||||
static inline int isupper(int c)
|
||||
|
@ -116,15 +119,15 @@ static inline int islower(int c)
|
|||
|
||||
static inline int toupper(int c)
|
||||
{
|
||||
if (islower(c))
|
||||
c -= 'a'-'A';
|
||||
return c;
|
||||
if (islower(c))
|
||||
c -= 'a' - 'A';
|
||||
return c;
|
||||
}
|
||||
|
||||
static inline int tolower(int c)
|
||||
{
|
||||
if (isupper(c))
|
||||
c -= 'A'-'a';
|
||||
return c;
|
||||
if (isupper(c))
|
||||
c -= 'A' - 'a';
|
||||
return c;
|
||||
}
|
||||
#endif /* STRING_H */
|
||||
#endif /* STRING_H */
|
||||
|
|
|
@ -12,4 +12,4 @@ void uart8250_tx_byte(unsigned base_port, unsigned char data);
|
|||
void uart8250_init(unsigned base_port, unsigned divisor, unsigned lcs);
|
||||
void init_uart8250(unsigned base_port, struct uart8250 *uart);
|
||||
|
||||
#endif /* UART8250_H */
|
||||
#endif /* UART8250_H */
|
||||
|
|
|
@ -3,4 +3,3 @@ extern struct chip_operations mainboard_emulation_qemu_i386_ops;
|
|||
struct mainboard_emulation_qemu_i386_config {
|
||||
int nothing;
|
||||
};
|
||||
|
||||
|
|
|
@ -30,9 +30,7 @@ int main(void)
|
|||
{
|
||||
printk(BIOS_INFO, "RAM init code started\n");
|
||||
|
||||
die ("Nothing to do.");
|
||||
die("Nothing to do.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -25,4 +25,3 @@
|
|||
struct chip_operations mainboard_emulation_qemu_i386_ops = {
|
||||
.name = "QEMU Mainboard"
|
||||
};
|
||||
|
||||
|
|
|
@ -22,17 +22,17 @@
|
|||
|
||||
/*
|
||||
*/
|
||||
void udelay(int usecs)
|
||||
void udelay(int usecs)
|
||||
{
|
||||
int i;
|
||||
for(i = 0; i < usecs; i++)
|
||||
outb(i&0xff, 0x80);
|
||||
for (i = 0; i < usecs; i++)
|
||||
outb(i & 0xff, 0x80);
|
||||
}
|
||||
|
||||
void setup_before_car(void)
|
||||
{
|
||||
outb(5, 0x80);
|
||||
|
||||
|
||||
//uart_init();
|
||||
//console_init();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue