diff --git a/Makefile b/Makefile index 77731edbe1417e025e4776afae7174103b05c13d..20c9bab03e23c715842d133439f5d24749676c25 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ OBJS = jedec.o stm50flw0x0x.o w39v080fa.o sharplhf00l04.o w29ee011.o \ sst28sf040.o am29f040b.o mx29f002.o m29f400bt.o pm29f002.o w39v040c.o \ w49f002u.o 82802ab.o pm49fl00x.o sst49lf040.o en29f002a.o m29f002.o \ sst49lfxxxc.o sst_fwhub.o flashchips.o layout.o spi.o \ - flashrom.o print.o physmap.o internal.o udelay.o + flashrom.o print.o udelay.o all: pciutils features dep $(PROGRAM) @@ -168,7 +168,7 @@ endif ifeq ($(NEED_PCI), yes) FEATURE_CFLAGS += -D'NEED_PCI=1' -OBJS += pcidev.o +OBJS += pcidev.o physmap.o internal.o endif ifeq ($(CONFIG_PRINT_WIKI), yes) diff --git a/flash.h b/flash.h index fc3dff8f06540945c81d8a6fe2a06d611df88554..feac98e9f911fee7810c5231b8e087bdb4d180a2 100644 --- a/flash.h +++ b/flash.h @@ -277,6 +277,7 @@ extern const struct board_info laptops_bad[]; /* udelay.c */ void myusec_delay(int usecs); void myusec_calibrate_delay(void); +void internal_delay(int usecs); #if NEED_PCI == 1 /* pcidev.c */ @@ -365,7 +366,6 @@ void mmio_writel(uint32_t val, void *addr); uint8_t mmio_readb(void *addr); uint16_t mmio_readw(void *addr); uint32_t mmio_readl(void *addr); -void internal_delay(int usecs); int noop_shutdown(void); void *fallback_map(const char *descr, unsigned long phys_addr, size_t len); void fallback_unmap(void *virt_addr, size_t len); diff --git a/internal.c b/internal.c index 69624a0d4d4bcab3d3564427347664f513063b97..98a846399ebf69942765e34f7431d9cb13279d42 100644 --- a/internal.c +++ b/internal.c @@ -248,18 +248,6 @@ uint32_t mmio_readl(void *addr) return *(volatile uint32_t *) addr; } -void internal_delay(int usecs) -{ - /* If the delay is >1 s, use usleep because timing does not need to - * be so precise. - */ - if (usecs > 1000000) { - usleep(usecs); - } else { - myusec_delay(usecs); - } -} - /* No-op shutdown() for programmers which don't need special handling */ int noop_shutdown(void) { diff --git a/udelay.c b/udelay.c index 9a0ab365b8c62251503bcd692484dd20fade70fb..f61d793c6bdc01fc39e668f024f0b49967bc01bc 100644 --- a/udelay.c +++ b/udelay.c @@ -63,3 +63,16 @@ void myusec_calibrate_delay(void) (unsigned long)micro, timeusec); printf("OK.\n"); } + +void internal_delay(int usecs) +{ + /* If the delay is >1 s, use usleep because timing does not need to + * be so precise. + */ + if (usecs > 1000000) { + usleep(usecs); + } else { + myusec_delay(usecs); + } +} +