mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
smbus_delay() performs its own inb(0x80). We can use the generic
udelay() instead which does the same, and achieve better abstraction. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://coreboot.org/repository/coreboot-v3@799 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
755b36f42e
commit
358403335f
2 changed files with 2 additions and 3 deletions
|
@ -69,7 +69,7 @@ static void smbus_init(void)
|
||||||
*/
|
*/
|
||||||
static void smbus_delay(void)
|
static void smbus_delay(void)
|
||||||
{
|
{
|
||||||
/* inb(0x80); */
|
/* udelay(1); */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -39,8 +39,7 @@
|
||||||
|
|
||||||
static inline void smbus_delay(void)
|
static inline void smbus_delay(void)
|
||||||
{
|
{
|
||||||
/* let's hope this is not optimized out */
|
udelay(1);
|
||||||
(void) inb(0x80);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_smbus_recv_byte(u16 smbus_io_base, u8 device);
|
int do_smbus_recv_byte(u16 smbus_io_base, u8 device);
|
||||||
|
|
Loading…
Add table
Reference in a new issue