mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
Use 'unsigned int' instead of 'unsigned'.
Make udelay() use 'unsigned int' instead of 'int'. Fix interface of log2(), the current implementation takes an 'unsigned int' and returns an 'int'. Purely cosmetic fix in the license header (consistency reasons). Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@231 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
9d63d2a039
commit
2df5e3a407
3 changed files with 10 additions and 10 deletions
|
@ -20,9 +20,9 @@
|
|||
|
||||
#include <arch/io.h>
|
||||
|
||||
void udelay(int usecs)
|
||||
void udelay(unsigned int usecs)
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
for (i = 0; i < usecs; i++)
|
||||
outb(i & 0xff, 0x80);
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* Written by Stefan Reinauer <stepan@coresystems.de> for coresystems GmbH.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -21,10 +21,10 @@
|
|||
#ifndef LIB_H
|
||||
#define LIB_H
|
||||
|
||||
unsigned long log2(unsigned long x);
|
||||
int log2(unsigned int n);
|
||||
|
||||
void udelay(unsigned usecs);
|
||||
void mdelay(unsigned msecs);
|
||||
void delay(unsigned secs);
|
||||
void udelay(unsigned int usecs);
|
||||
void mdelay(unsigned int msecs);
|
||||
void delay(unsigned int secs);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -20,14 +20,14 @@
|
|||
|
||||
#include <lib.h>
|
||||
|
||||
void mdelay(unsigned msecs)
|
||||
void mdelay(unsigned int msecs)
|
||||
{
|
||||
unsigned int i;
|
||||
for (i = 0; i < msecs; i++) {
|
||||
udelay(1000);
|
||||
}
|
||||
}
|
||||
void delay(unsigned secs)
|
||||
void delay(unsigned int secs)
|
||||
{
|
||||
unsigned int i;
|
||||
for (i = 0; i < secs; i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue