Commit 36304b06 authored by Li Jun's avatar Li Jun Committed by Greg Kroah-Hartman

usb: chipidea: export interrupt enable and status register read functions

This patch moves usb interrupt enable and status register read functions
from udc driver to core driver to use them in all ci drivers.
Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
Acked-by: default avatarPeter Chen <peter.chen@freescale.com>
Signed-off-by: default avatarLi Jun <b47624@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0c33bf78
...@@ -319,6 +319,10 @@ static inline u32 hw_test_and_write(struct ci_hdrc *ci, enum ci_hw_regs reg, ...@@ -319,6 +319,10 @@ static inline u32 hw_test_and_write(struct ci_hdrc *ci, enum ci_hw_regs reg,
return (val & mask) >> __ffs(mask); return (val & mask) >> __ffs(mask);
} }
u32 hw_read_intr_enable(struct ci_hdrc *ci);
u32 hw_read_intr_status(struct ci_hdrc *ci);
int hw_device_reset(struct ci_hdrc *ci, u32 mode); int hw_device_reset(struct ci_hdrc *ci, u32 mode);
int hw_port_test_set(struct ci_hdrc *ci, u8 mode); int hw_port_test_set(struct ci_hdrc *ci, u8 mode);
......
...@@ -139,6 +139,26 @@ static int hw_alloc_regmap(struct ci_hdrc *ci, bool is_lpm) ...@@ -139,6 +139,26 @@ static int hw_alloc_regmap(struct ci_hdrc *ci, bool is_lpm)
return 0; return 0;
} }
/**
* hw_read_intr_enable: returns interrupt enable register
*
* This function returns register data
*/
u32 hw_read_intr_enable(struct ci_hdrc *ci)
{
return hw_read(ci, OP_USBINTR, ~0);
}
/**
* hw_read_intr_status: returns interrupt status register
*
* This function returns register data
*/
u32 hw_read_intr_status(struct ci_hdrc *ci)
{
return hw_read(ci, OP_USBSTS, ~0);
}
/** /**
* hw_port_test_set: writes port test mode (execute without interruption) * hw_port_test_set: writes port test mode (execute without interruption)
* @mode: new value * @mode: new value
......
...@@ -241,26 +241,6 @@ static int hw_port_is_high_speed(struct ci_hdrc *ci) ...@@ -241,26 +241,6 @@ static int hw_port_is_high_speed(struct ci_hdrc *ci)
hw_read(ci, OP_PORTSC, PORTSC_HSP); hw_read(ci, OP_PORTSC, PORTSC_HSP);
} }
/**
* hw_read_intr_enable: returns interrupt enable register
*
* This function returns register data
*/
static u32 hw_read_intr_enable(struct ci_hdrc *ci)
{
return hw_read(ci, OP_USBINTR, ~0);
}
/**
* hw_read_intr_status: returns interrupt status register
*
* This function returns register data
*/
static u32 hw_read_intr_status(struct ci_hdrc *ci)
{
return hw_read(ci, OP_USBSTS, ~0);
}
/** /**
* hw_test_and_clear_complete: test & clear complete status (execute without * hw_test_and_clear_complete: test & clear complete status (execute without
* interruption) * interruption)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment