Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
writel(value, otg_base + offset);
}
writel(value, otg_base + offset);
}
-void s5p_usb_init_phy(void)
+static void s5p_usb_init_phy(void)
{
if (cpu_is_s5pc110()) {
s5pc1xx_phy_write_reg(0xA0, OTG_PHYPWR);
{
if (cpu_is_s5pc110()) {
s5pc1xx_phy_write_reg(0xA0, OTG_PHYPWR);
s5pc1xx_otg_write_reg(0xffffffff, OTG_GINTSTS);
}
s5pc1xx_otg_write_reg(0xffffffff, OTG_GINTSTS);
}
-void s5p_usb_core_soft_reset(void)
+static void s5p_usb_core_soft_reset(void)
} while (!(tmp & AHB_MASTER_IDLE));
}
} while (!(tmp & AHB_MASTER_IDLE));
}
-void s5p_usb_wait_cable_insert(void)
+static void s5p_usb_wait_cable_insert(void)
{
u32 tmp;
int ucFirst = 1;
{
u32 tmp;
int ucFirst = 1;
-void s5p_usb_init_core(void)
+static void s5p_usb_init_core(void)
{
s5pc1xx_otg_write_reg(PTXFE_HALF | NPTXFE_HALF | MODE_SLAVE |
BURST_SINGLE | GBL_INT_UNMASK, OTG_GAHBCFG);
{
s5pc1xx_otg_write_reg(PTXFE_HALF | NPTXFE_HALF | MODE_SLAVE |
BURST_SINGLE | GBL_INT_UNMASK, OTG_GAHBCFG);
-void s5p_usb_check_current_mode(u8 *pucMode)
+static void s5p_usb_check_current_mode(u8 *pucMode)
-void s5p_usb_soft_disconnect(int set)
+static void s5p_usb_soft_disconnect(int set)
s5pc1xx_otg_write_reg(tmp, OTG_DCTL);
}
s5pc1xx_otg_write_reg(tmp, OTG_DCTL);
}
-void s5p_usb_init_device(void)
+static void s5p_usb_init_device(void)
{
s5pc1xx_otg_write_reg(1 << 18 | otg.speed << 0, OTG_DCFG);
{
s5pc1xx_otg_write_reg(1 << 18 | otg.speed << 0, OTG_DCFG);
-void s5p_usb_set_inep_xfersize(EP_TYPE type, u32 pktcnt, u32 xfersize)
+static void s5p_usb_set_inep_xfersize(EP_TYPE type, u32 pktcnt, u32 xfersize)
{
if (type == EP_TYPE_CONTROL) {
s5pc1xx_otg_write_reg((pktcnt << 19) | (xfersize << 0),
{
if (type == EP_TYPE_CONTROL) {
s5pc1xx_otg_write_reg((pktcnt << 19) | (xfersize << 0),
-void s5p_usb_set_outep_xfersize(EP_TYPE type, u32 pktcnt, u32 xfersize)
+static void s5p_usb_set_outep_xfersize(EP_TYPE type, u32 pktcnt, u32 xfersize)
{
if (type == EP_TYPE_CONTROL) {
s5pc1xx_otg_write_reg((1 << 29) | (pktcnt << 19) |
{
if (type == EP_TYPE_CONTROL) {
s5pc1xx_otg_write_reg((1 << 29) | (pktcnt << 19) |
}
/* works on both aligned and unaligned buffers */
}
/* works on both aligned and unaligned buffers */
-void s5p_usb_write_ep0_fifo(u8 *buf, int num)
+static void s5p_usb_write_ep0_fifo(u8 *buf, int num)
{
int i;
u32 Wr_Data = 0;
{
int i;
u32 Wr_Data = 0;
-void s5p_usb_get_desc(void)
+static void s5p_usb_get_desc(void)
{
switch (otg.dev_req.wValue_H) {
case DEVICE_DESCRIPTOR:
{
switch (otg.dev_req.wValue_H) {
case DEVICE_DESCRIPTOR:
-void s5p_usb_clear_feature(void)
+static void s5p_usb_clear_feature(void)
{
switch (otg.dev_req.bmRequestType) {
case DEVICE_RECIPIENT:
{
switch (otg.dev_req.bmRequestType) {
case DEVICE_RECIPIENT:
otg.ep0_state = EP0_STATE_INIT;
}
otg.ep0_state = EP0_STATE_INIT;
}
-void s5p_usb_set_feature(void)
+static void s5p_usb_set_feature(void)
{
switch (otg.dev_req.bmRequestType) {
case DEVICE_RECIPIENT:
{
switch (otg.dev_req.bmRequestType) {
case DEVICE_RECIPIENT:
otg.ep0_state = EP0_STATE_INIT;
}
otg.ep0_state = EP0_STATE_INIT;
}
-void s5p_usb_get_status(void)
+static void s5p_usb_get_status(void)
{
switch (otg.dev_req.bmRequestType) {
case (0x80): /*device */
{
switch (otg.dev_req.bmRequestType) {
case (0x80): /*device */
-void s5p_usb_ep0_int_hndlr(void)
+static void s5p_usb_ep0_int_hndlr(void)
{
u16 i;
u32 buf[2] = {0x0000, };
{
u16 i;
u32 buf[2] = {0x0000, };
-void s5p_usb_set_otherspeed_conf_desc(u32 length)
+static void s5p_usb_set_otherspeed_conf_desc(u32 length)
{
/* Standard device descriptor */
if (length == 9) {
{
/* Standard device descriptor */
if (length == 9) {
otg.ep0_state = EP0_STATE_INIT;
}
otg.ep0_state = EP0_STATE_INIT;
}
-void s5p_usb_transfer_ep0(void)
+static void s5p_usb_transfer_ep0(void)
{
switch (otg.ep0_state) {
case EP0_STATE_INIT:
{
switch (otg.ep0_state) {
case EP0_STATE_INIT:
-void s5p_usb_rx(u32 fifo_cnt_byte)
+static void s5p_usb_rx(u32 fifo_cnt_byte)
{
if (otg.op_mode == USB_CPU) {
s5p_usb_read_out_fifo((u8 *)otg.dn_ptr, fifo_cnt_byte);
{
if (otg.op_mode == USB_CPU) {
s5p_usb_read_out_fifo((u8 *)otg.dn_ptr, fifo_cnt_byte);
-void s5p_usb_int_bulkout(u32 fifo_cnt_byte)
+static void s5p_usb_int_bulkout(u32 fifo_cnt_byte)
{
s5p_usb_rx(fifo_cnt_byte);
}
{
s5p_usb_rx(fifo_cnt_byte);
}
-void s5p_usb_dma_in_done(void)
+static void s5p_usb_dma_in_done(void)
-void s5p_usb_dma_out_done(void)
+static void s5p_usb_dma_out_done(void)
-void s5p_usb_set_all_outep_nak(void)
+static void s5p_usb_set_all_outep_nak(void)
-void s5p_usb_clear_all_outep_nak(void)
+static void s5p_usb_clear_all_outep_nak(void)
-void s5p_usb_set_max_pktsize(USB_SPEED speed)
+static void s5p_usb_set_max_pktsize(USB_SPEED speed)
{
otg.speed = USB_HIGH;
otg.ctrl_max_pktsize = HS_CTRL_PKT_SIZE;
{
otg.speed = USB_HIGH;
otg.ctrl_max_pktsize = HS_CTRL_PKT_SIZE;
otg.bulkout_max_pktsize = HS_BULK_PKT_SIZE;
}
otg.bulkout_max_pktsize = HS_BULK_PKT_SIZE;
}
-void s5p_usb_set_endpoint(void)
+static void s5p_usb_set_endpoint(void)
{
/* Unmask OTG_DAINT source */
s5pc1xx_otg_write_reg(0xff, OTG_DIEPINT0);
{
/* Unmask OTG_DAINT source */
s5pc1xx_otg_write_reg(0xff, OTG_DIEPINT0);
-void s5p_usb_set_descriptors(void)
+static void s5p_usb_set_descriptors(void)
{
#if defined (CONFIG_SAMSUNG_USB)
otg.desc.dev.bLength = DEVICE_DESC_SIZE;
{
#if defined (CONFIG_SAMSUNG_USB)
otg.desc.dev.bLength = DEVICE_DESC_SIZE;
otg.desc.ep2.bInterval = 0x0;
}
otg.desc.ep2.bInterval = 0x0;
}
-void s5p_usb_check_speed(USB_SPEED *speed)
+static void s5p_usb_check_speed(USB_SPEED *speed)
*speed = (USB_SPEED)((status & 0x6) >> 1);
}
*speed = (USB_SPEED)((status & 0x6) >> 1);
}
-int s5p_usb_check_setconf(void)
+static int s5p_usb_check_setconf(void)
{
return otg.set_config;
}
{
return otg.set_config;
}
-void s5p_usb_set_opmode(USB_OPMODE mode)
+static void s5p_usb_set_opmode(USB_OPMODE mode)
otg.bulkin_max_pktsize << 0, OTG_DIEPCTL_IN);
}
otg.bulkin_max_pktsize << 0, OTG_DIEPCTL_IN);
}
-void s5p_usb_reset(void)
+static void s5p_usb_reset(void)
{
s5p_usb_set_all_outep_nak();
{
s5p_usb_set_all_outep_nak();
-int s5p_usb_set_init(void)
+static int s5p_usb_set_init(void)
-void s5p_usb_pkt_receive(void)
+static void s5p_usb_pkt_receive(void)
{
u32 rx_status;
u32 fifo_cnt_byte;
{
u32 rx_status;
u32 fifo_cnt_byte;
-void s5p_usb_transfer(void)
+static void s5p_usb_transfer(void)
{
u32 ep_int;
u32 check_dma;
{
u32 ep_int;
u32 check_dma;