这篇教程C++ DMSG_PANIC函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中DMSG_PANIC函数的典型用法代码示例。如果您正苦于以下问题:C++ DMSG_PANIC函数的具体用法?C++ DMSG_PANIC怎么用?C++ DMSG_PANIC使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了DMSG_PANIC函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: get_usb_cfg/********************************************************************************* get_usb_cfg** Description:* void** Parameters:* void** Return value:* void** note:* void*********************************************************************************/static s32 get_usb_cfg(struct sw_hci_hcd *sw_hci){ __s32 ret = 0; /* usbc enable */ ret = script_parser_fetch(usbc_name[sw_hci->usbc_no], "usb_used", (int *)&sw_hci->used, 64); if(ret != 0) { DMSG_PANIC("ERR: get usbc2 enable failed/n"); //return -1; } /* request gpio */ ret = script_parser_fetch(usbc_name[sw_hci->usbc_no], "usb_drv_vbus_gpio", (int *)&sw_hci->drv_vbus_gpio_set, 64); if(ret != 0) { DMSG_PANIC("ERR: get usbc%d(%s) id failed/n", sw_hci->usbc_no, usbc_name[sw_hci->usbc_no]); return -1; } /* host_init_state */ ret = script_parser_fetch(usbc_name[sw_hci->usbc_no], "usb_host_init_state", (int *)&(sw_hci->host_init_state), 64); if(ret != 0) { DMSG_PANIC("ERR: script_parser_fetch host_init_state failed/n"); return -1; } return 0;}
开发者ID:panlinbing,项目名称:lichee_linux-3.0,代码行数:45,
示例2: clock_init/********************************************************************************* clock_init** Description:* void** Parameters:* void** Return value:* void** note:* void*********************************************************************************/static s32 clock_init(struct sw_hci_hcd *sw_hci, u32 ohci){ if(ohci){ /* ohci */ sw_hci->sie_clk = clk_get(NULL, "ahb_ohci0"); if (IS_ERR(sw_hci->sie_clk)){ DMSG_PANIC("ERR: get ohci%d abh clk failed./n", (sw_hci->usbc_no - 1)); goto failed; } sw_hci->ohci_gate = clk_get(NULL, "usb_ohci0"); if (IS_ERR(sw_hci->ohci_gate)){ DMSG_PANIC("ERR: get ohci%d gate clk failed./n", (sw_hci->usbc_no - 1)); goto failed; } }else{ /* ehci */ sw_hci->sie_clk = clk_get(NULL, "ahb_ehci0"); if (IS_ERR(sw_hci->sie_clk)){ DMSG_PANIC("ERR: get ehci%d abh clk failed./n", (sw_hci->usbc_no - 1)); goto failed; } } sw_hci->phy_gate = clk_get(NULL, "usb_phy1"); if (IS_ERR(sw_hci->phy_gate)){ DMSG_PANIC("ERR: get usb%d phy_gate failed./n", sw_hci->usbc_no); goto failed; } sw_hci->phy_reset = clk_get(NULL, "usb_phy1"); if (IS_ERR(sw_hci->phy_reset)){ DMSG_PANIC("ERR: get usb%d phy_reset failed./n", sw_hci->usbc_no); goto failed; } return 0;failed: if(sw_hci->sie_clk){ clk_put(sw_hci->sie_clk); sw_hci->sie_clk = NULL; } if(sw_hci->phy_gate){ clk_put(sw_hci->phy_gate); sw_hci->phy_gate = NULL; } if(sw_hci->phy_reset){ clk_put(sw_hci->phy_reset); sw_hci->phy_reset = NULL; } if(sw_hci->ohci_gate){ clk_put(sw_hci->ohci_gate); sw_hci->ohci_gate = NULL; } return -1;}
开发者ID:mantrid,项目名称:linux-allwinner,代码行数:77,
示例3: sw_ohci_hcd_suspend/********************************************************************************* sw_ohci_hcd_suspend** Description:* void** Parameters:* void** Return value:* void** note:* void*********************************************************************************/static int sw_ohci_hcd_suspend(struct device *dev){ struct sw_hci_hcd *sw_ohci = NULL; struct usb_hcd *hcd = NULL; struct ohci_hcd *ohci = NULL; unsigned long flags = 0; int rc = 0; if(dev == NULL){ DMSG_PANIC("ERR: Argment is invalid/n"); return 0; } hcd = dev_get_drvdata(dev); if(hcd == NULL){ DMSG_PANIC("ERR: hcd is null/n"); return 0; } sw_ohci = dev->platform_data; if(sw_ohci == NULL){ DMSG_PANIC("ERR: sw_ohci is null/n"); return 0; } if(sw_ohci->probe == 0){ DMSG_PANIC("ERR: sw_ohci is disable, can not suspend/n"); return 0; } ohci = hcd_to_ohci(hcd); if(ohci == NULL){ DMSG_PANIC("ERR: ohci is null/n"); return 0; } DMSG_INFO("[%s]: sw_ohci_hcd_suspend/n", sw_ohci->hci_name); /* Root hub was already suspended. Disable irq emission and * mark HW unaccessible, bail out if RH has been resumed. Use * the spinlock to properly synchronize with possible pending * RH suspend or resume activity. * * This is still racy as hcd->state is manipulated outside of * any locks =P But that will be a different fix. */ spin_lock_irqsave(&ohci->lock, flags); ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable); (void)ohci_readl(ohci, &ohci->regs->intrdisable); clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); spin_unlock_irqrestore(&ohci->lock, flags); sw_stop_ohc(sw_ohci); return rc;}
开发者ID:Michael-Pizzileo,项目名称:lichee_linux-3.0,代码行数:77,
示例4: sunxi_otg_resumestatic int sunxi_otg_resume(struct device *dev){ struct platform_device *pdev = NULL; struct sunxi_otgc *otgc = NULL; int ret; pdev = sunxi_otg_pdev; if(pdev == NULL){ DMSG_PANIC("%s, pdev is NULL/n", __func__); return 0; } otgc = platform_get_drvdata(pdev); if(otgc == NULL){ DMSG_PANIC("%s, otgc is NULL/n", __func__); return 0; } DMSG_INFO("start:%s, otgc_work_mode:%d/n", __func__, otgc_work_mode); if(otgc_work_mode == 0){ DMSG_INFO("end:%s, otgc driver is no work and no need resume/n", __func__); atomic_set(&thread_suspend_flag, 0); goto end; } sunxi_open_usb_clock(otgc); sunxi_set_mode(otgc, otgc_work_mode); switch(otgc_work_mode){ case SUNXI_GCTL_PRTCAP_HOST: sunxi_core_soft_reset(otgc->regs); sunxi_host_set_vbus(otgc, 1); break; case SUNXI_GCTL_PRTCAP_DEVICE: ret = sunxi_core_init(otgc); if (ret) { dev_err(&pdev->dev, "failed to initialize core, %s_%d/n", __func__, __LINE__); atomic_set(&thread_suspend_flag, 0); return ret; } sunxi_gadget_resume(otgc); atomic_set(&thread_suspend_flag, 0); break; default: return 0; }end: pm_runtime_disable(&pdev->dev); pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); DMSG_INFO("end: %s/n", __func__); return 0;}
开发者ID:phi-psi,项目名称:linux-3.4-sunxi,代码行数:58,
|