From 9dd537e67122faab11d887844cfc0ccb4a0bf092 Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Tue, 28 Jul 2009 15:11:01 +0900 Subject: [PATCH] s5pc1xx: usb: fix compile error Signed-off-by: Minkyu Kang --- cpu/arm_cortexa8/s5pc1xx/usb-hs-otg.c | 12 ++++++++++++ cpu/arm_cortexa8/s5pc1xx/usb-hs-otg.h | 7 ++----- cpu/arm_cortexa8/s5pc1xx/usb_downloader.c | 8 ++++---- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/cpu/arm_cortexa8/s5pc1xx/usb-hs-otg.c b/cpu/arm_cortexa8/s5pc1xx/usb-hs-otg.c index 5e90bb5..1e81749 100644 --- a/cpu/arm_cortexa8/s5pc1xx/usb-hs-otg.c +++ b/cpu/arm_cortexa8/s5pc1xx/usb-hs-otg.c @@ -337,6 +337,18 @@ void s5p_usb_init_phy(void) udelay(20); } +int s5p_usb_detect_irq(void) +{ + u32 status; + status = s5pc1xx_otg_read_reg(OTG_GINTSTS); + return (status & 0x800c3810); +} + +void s5p_usb_clear_irq(void) +{ + s5pc1xx_otg_write_reg(0xffffffff, OTG_GINTSTS); +} + void s5p_usb_core_soft_reset(void) { u32 tmp; diff --git a/cpu/arm_cortexa8/s5pc1xx/usb-hs-otg.h b/cpu/arm_cortexa8/s5pc1xx/usb-hs-otg.h index 72314be..670be59 100644 --- a/cpu/arm_cortexa8/s5pc1xx/usb-hs-otg.h +++ b/cpu/arm_cortexa8/s5pc1xx/usb-hs-otg.h @@ -27,11 +27,6 @@ #include #include -#define S5P_USBD_DETECT_IRQ() (readl(S5P_OTG_GINTSTS) & 0x800c3810) -#define S5P_USBD_CLEAR_IRQ() do { \ - writel(0xFFFFFFFF, (S5P_OTG_GINTSTS)); \ - } while (0) - #define make_word_c(w) __constant_cpu_to_le16(w) #define make_word(w) __cpu_to_le16(w) @@ -271,6 +266,8 @@ int s5p_usbc_activate(void); void s5p_usb_stop(void); void s5p_udc_int_hndlr(void); void s5p_usb_tx(char *tx_data, int tx_size); +int s5p_usb_detect_irq(void); +void s5p_usb_clear_irq(void); /* in usbd-otg-hs.c */ extern unsigned int s5p_usbd_dn_addr; diff --git a/cpu/arm_cortexa8/s5pc1xx/usb_downloader.c b/cpu/arm_cortexa8/s5pc1xx/usb_downloader.c index 5d556b6..c9cf8e6 100644 --- a/cpu/arm_cortexa8/s5pc1xx/usb_downloader.c +++ b/cpu/arm_cortexa8/s5pc1xx/usb_downloader.c @@ -97,9 +97,9 @@ void usb_init(void) otg.speed ? "Full" : "High"); while (!s5p_usb_connected) { - if (S5P_USBD_DETECT_IRQ()) { + if (s5p_usb_detect_irq()) { s5p_udc_int_hndlr(); - S5P_USBD_CLEAR_IRQ(); + s5p_usb_clear_irq(); } } @@ -114,9 +114,9 @@ void usb_init(void) int usb_receive_packet(void) { while (1) { - if (S5P_USBD_DETECT_IRQ()) { + if (s5p_usb_detect_irq()) { s5p_udc_int_hndlr(); - S5P_USBD_CLEAR_IRQ(); + s5p_usb_clear_irq(); } if (s5p_receive_done) { -- 2.7.4