From c4c9fbebae6a62d538817d0ccee698adaafc5d66 Mon Sep 17 00:00:00 2001 From: Anatolij Gustschin Date: Wed, 12 Oct 2011 02:31:39 +0000 Subject: consolidate mdelay by providing a common function for all users There are several mdelay() definitions in the driver and board code. Remove them all and provide a common mdelay() in lib/time.c. Signed-off-by: Anatolij Gustschin Acked-by: Mike Frysinger --- arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c | 1 - arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c | 1 - arch/powerpc/cpu/mpc5xxx/usb_ohci.c | 1 - arch/powerpc/cpu/ppc4xx/usb_ohci.c | 1 - arch/powerpc/include/asm/4xx_pcie.h | 8 -------- 5 files changed, 12 deletions(-) (limited to 'arch') diff --git a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c index 9a0bbaeb4c9..263d2ce65d9 100644 --- a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c +++ b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c @@ -1540,7 +1540,6 @@ static int hc_start(struct ohci *ohci) writel(RH_HS_LPSC, &ohci->regs->roothub.status); #endif /* OHCI_USE_NPS */ -#define mdelay(n) ({unsigned long msec=(n); while (msec--) udelay(1000);}) /* POTPGT delay is bits 24-31, in 2 ms units. */ mdelay((roothub_a(ohci) >> 23) & 0x1fe); diff --git a/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c b/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c index 0bc2305d878..866dd6cfe4a 100644 --- a/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c +++ b/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c @@ -1448,7 +1448,6 @@ static int hc_start (ohci_t * ohci) writel (RH_HS_LPSC, &ohci->regs->roothub.status); #endif /* OHCI_USE_NPS */ -#define mdelay(n) ({unsigned long msec=(n); while (msec--) udelay(1000);}) /* POTPGT delay is bits 24-31, in 2 ms units. */ mdelay ((roothub_a (ohci) >> 23) & 0x1fe); diff --git a/arch/powerpc/cpu/mpc5xxx/usb_ohci.c b/arch/powerpc/cpu/mpc5xxx/usb_ohci.c index 7976e4df7d8..2fc1180b782 100644 --- a/arch/powerpc/cpu/mpc5xxx/usb_ohci.c +++ b/arch/powerpc/cpu/mpc5xxx/usb_ohci.c @@ -1455,7 +1455,6 @@ static int hc_start (ohci_t * ohci) writel (RH_HS_LPSC, &ohci->regs->roothub.status); #endif /* OHCI_USE_NPS */ -#define mdelay(n) ({unsigned long msec=(n); while (msec--) udelay(1000);}) /* POTPGT delay is bits 24-31, in 2 ms units. */ mdelay ((roothub_a (ohci) >> 23) & 0x1fe); diff --git a/arch/powerpc/cpu/ppc4xx/usb_ohci.c b/arch/powerpc/cpu/ppc4xx/usb_ohci.c index a9edacd330f..fe091e3fa08 100644 --- a/arch/powerpc/cpu/ppc4xx/usb_ohci.c +++ b/arch/powerpc/cpu/ppc4xx/usb_ohci.c @@ -1462,7 +1462,6 @@ static int hc_start (ohci_t * ohci) writel (RH_HS_LPSC, &ohci->regs->roothub.status); #endif /* OHCI_USE_NPS */ -#define mdelay(n) ({unsigned long msec=(n); while (msec--) udelay(1000);}) /* POTPGT delay is bits 24-31, in 2 ms units. */ mdelay ((roothub_a (ohci) >> 23) & 0x1fe); diff --git a/arch/powerpc/include/asm/4xx_pcie.h b/arch/powerpc/include/asm/4xx_pcie.h index 90e0bd98fa8..fbdc28e0a5e 100644 --- a/arch/powerpc/include/asm/4xx_pcie.h +++ b/arch/powerpc/include/asm/4xx_pcie.h @@ -389,14 +389,6 @@ static inline int is_end_point(int port) return 0; } -static inline void mdelay(int n) -{ - u32 ms = n; - - while (ms--) - udelay(1000); -} - #if defined(PCIE0_SDR) static inline u32 sdr_base(int port) { -- cgit v1.2.3