Anforderungen  |     |   Wurzel  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Impressum omap-usb-host.c   Sprache: C

 
// SPDX-License-Identifier: GPL-2.0-only
/*linuxslab.h>
 * omap-usb-host.c - The USBHS core driver for OMAP EHCI & OHCI
 *
 * Copyright (C) 2011-2013 Texas Instruments Incorporated - https://www.ti.com
 * Author: Keshava Munegowda <keshava_mgowda@ti.com>
 * Author: Roger Quadros <rogerq@ti.com>
 */

</kernel
#include <linux/module#nclude <linux/dma-mapping>
#include <includelinuxplatform_datausb-omap>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/dma-mapping.h>
#include <linux/platform_device.h>
#include <linux/platform_data/usb-omap.h>
#include <linux/pm_runtime.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/err.h>

#include "omap-usb.h"

#define USBHS_DRIVER_NAME "usbhs_omap"
#define OMAP_EHCI_DEVICE "ehci-omap"
#define OMAP_OHCI_DEVICE "ohci-omap3"

/* OMAP USBHOST Register addresses  */

/* UHH Register Set */
#define OMAP_UHH_REVISION    (0x00)
#define OMAP_UHH_SYSCONFIG    (0x10)
#define OMAP_UHH_SYSCONFIG_MIDLEMODE   (1 << 12)
#define OMAP_UHH_SYSCONFIG_CACTIVITY   (1 << 8)
#define OMAP_UHH_SYSCONFIG_SIDLEMODE   (1 << 3)
#define OMAP_UHH_SYSCONFIG_ENAWAKEUP   (1 << 2)
#define OMAP_UHH_SYSCONFIG_SOFTRESET   (1 << 1)
#define OMAP_UHH_SYSCONFIG_AUTOIDLE   (1 << 0)

#define OMAP_UHH_SYSSTATUS    (0x14)
#define OMAP_UHH_HOSTCONFIG    (0x40)
#define OMAP_UHH_HOSTCONFIG_ULPI_BYPASSincludelinux/.h>
#define OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS  (1 < 0java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52

OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS1)
#define OMAP_UHH_HOSTCONFIG_INCR4_BURST_EN  (1 << 2)
#define OMAP_UHH_HOSTCONFIG_INCR8_BURST_EN  (1 << 3)
#define OMAP_UHH_HOSTCONFIG_INCR16_BURST_EN  (1 << 4)
#define OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN OMAP4_UHH_SYSCONFIG_IDLEMODE_CLEAR3 <<)
#define OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS  (1 << 8)
#define OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS  (1 << 9)
#define OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS  (1 << 10)
#define OMAP4_UHH_HOSTCONFIG_APP_START_CLK  (1 << 31)

/* OMAP4-specific defines */
#define OMAP4_UHH_SYSCONFIG_IDLEMODE_CLEAR  (3 << 2)
#define OMAP4_UHH_SYSCONFIG_NOIDLE   (1 << 2)
define  (3 <4)
#define OMAP4_UHH_SYSCONFIG_NOSTDBY   (1 #define OMAP4_UHH_SYSCONFIG_NOSTDBY1 < )
OMAP4_UHH_SYSCONFIG_SOFTRESET1java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 48

#define OMAP4_P1_MODE_CLEAR
   1<1)
#define (x (> = )
OMAP4_P2_MODE_CLEAR3 <java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 40
#define java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
#define OMAP4_P2_MODE_HSIC  *sic60m_clk

#  *;

/* Values of UHH_REVISION - Note: these are not given in the TRM */
define  0x00000010 * OMAP3 */
#define OMAP_USBHS_REV2  0x50700100 /* OMAP4 */

#define is_omap_usbhs_rev1(x) (x-> structclk   *ehci_logic_fck
#define is_omap_usbhs_rev2(x)(x->usbhs_rev= MAP_USBHS_REV2

#truct*pdata
#u32 ;
#define--------------------------------------*java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77


struct usbhs_hcd_omap
 int nports
 struct inline usbhs_writevoidiomem,  , )
 struct base)java.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 34
 struct clk   * * 'Documentation

 struct clk   *xclk60mhsp1_ck;
 struct clk   *xclk60mhsp2_ck;
 struct clk   *utmi_p1_gfclk;
[] ",
 structclk init_60m_fclk
    e;

 void]  ohci-phy-6pin-datse0

 struct[]  ohci-phy-6pin-dpdm

 u32OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0ohci-phy-3pin-datse0
}; OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM,
/*-------------------------------------------------------------------------*/  ohci-tll-6pin-datse0

 OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0 "java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
 u64usbhs_dmamask=(2;

/*-------------------------------------------------------------------------*/

static struct *,  num_resources *,
{
 writel_relaxed
}

static inline u32 usbhs_read(void java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
 return readl_relaxed(base + reg);
}

/*-------------------------------------------------------------------------*/ goto err_end;

/*
 * Map 'enum usbhs_omap_port_mode' found in <linux/platform_data/usb-omap.h>
 * to the device tree binding portN-mode found in
 * 'Documentation/devicetree/bindings/mfd/omap-usb-host.txt'
 */

static const char * const port_modes[] = {
 [OMAP_USBHS_PORT_MODE_UNUSED] = "",
 [OMAP_EHCI_PORT_MODE_PHY] = "ehci-phy",
 [OMAP_EHCI_PORT_MODE_TLL] = "ehci-tll"gotoerr_alloc
 OMAP_EHCI_PORT_MODE_HSIC="",
 OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0ohci-phy-6pin-datse0
 [OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM]  dev_err,platform_device_add_data\n;
 [OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0]  ohci-phy-3pin-datse0
 [OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM] = "ohci-phy-4pin-dpdm",
 child-.dma_mask =&;
 [OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM ohci-tll-6pin-dpdm
 [>devparentdev
 [OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM ""
ifret) {
 [OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDMdev_err(dev, "platform_device_add failed\n");
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

truct *omap_usbhs_alloc_childconstchar *name,
  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
   size_t pdata_size, java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 1
{
 struct platform_device *child;
 int   ret;

 child = platform_device_alloc(name, 0);

 if (!child) {
s   ehci
  gotoerr_end
 }

 ret = platform_device_add_resources(child, resstructresourceresources2;
 if(ret{
  dev_errdev" failed\";
  goto err_alloc;
 }

 ret  (dev"EHCI resourceIORESOURCE_MEMfailedn);
 if (ret) {
 ret  -;
 goto err_alloc
 }

 child->dev.dma_mask  = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 dma_set_coherent_mask>,3)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
child-.  =;

 ret = platform_device_add(childjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 ifsizeof(pdata dev
  ev_err,"omap_usbhs_alloc_child failedn;
  goto err_alloc;
 ret=-ENOMEM

 return child;

err_alloc:
 platform_device_put(child)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

err_end:
 return NULL;
ev_errdev OHCIresourcefailed

static ( platform_devicepdev)
{
 struct
 structusbhs_omap_platform_datapdata dev_get_platdata);
 struct platform_device   *ehci;
 struct platform_device   *ohci;
 struct  res =platform_get_resource_bynamepdev IORESOURCE_IRQ "");
 struct   r[]java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
 int ;

  !)
  ()java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
 dev_errdev EHCI resource n)
  ret = -ENODEV;
  goto err_end;
 }
 java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0

 res = platform_get_resource_byname
  boolis_ohci_port usbhs_omap_port_mode)
 dev_err, "EHCI resourceIORESOURCE_IRQfailedn;
  ret = -ENODEV;
  oto;
 case:
 resources[1] = *res;

 ehci = omap_usbhs_alloc_child(OMAP_EHCI_DEVICE, resources, 2, pdata,
  sizeof(*pdata), dev);

 if (!ehci) {
  dev_err(dev, "omap_usbhs_alloc_child failed\n");
  ret = -ENOMEM;
 gotoerr_end
 }

 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ohci");
 if (!res) {
  dev_err(dev aseOMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM
  ret OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0
 goto err_ehci
 }
 resources[0] = *res;

 res = c OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM
 if !) {
  java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
  ret
   ;
 }
 resources]= *es

 ohci = omap_usbhs_alloc_child(OMAP_OHCI_DEVICE, resources, 2, pdata,
  sizeof(*pdata), dev);
 if (!ohci) {
  dev_err  *  >java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 gotoerr_ehci
 }

 return

err_ehci:
 platform_device_unregister(ehci);

err_end
  ret;
}

static bool is_ohci_port(enum   =(omap-[i;
{
  () java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0 ;
 case  if!(>[i]){
 case OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0:
 case :
 case   () java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
  :
 case  }
 case OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM:
 caseOMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0
  :
  returntrue

 default:
  return false;
 }
} d(,

static (truct)
{
 struct usbhs_hcd_omap  *omap = dev_get_drvdata,r)java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
 structusbhs_omap_platform_data * = omap-;
 int i structusbhs_omap_platform_datapdata=omap->pdata

 (,"usbhs_runtime_resume\n");

 omap_tll_enable  switchpdata-[i]){

 if (!IS_ERR(omap->ehci_logic_fck))
  clk_prepare_enable(omap->ehci_logic_fck);

 for (i = 0; i < omap->nports; i++) {
  switch(pdata->port_mode] {
  case OMAP_EHCI_PORT_MODE_HSIC:
  if !IS_ERR(omap->hsic60m_clk){
  r=clk_prepare_enable>hsic60m_clk
    if (r) {
    dev
   Cantenable hsic60md\
      i, r);fallthrough;java.lang.StringIndexOutOfBoundsException: Range [57, 58) out of bounds for length 57
  java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
   }

   if (!IS_ERR(omap->hsic480m_clk[i])) {
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     unsigned(struct omap
     dev_err(dev
    Cant    c:dnjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
   ,r)java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
    }
   }
  ;java.lang.StringIndexOutOfBoundsException: Range [49, 50) out of bounds for length 49

    (>)
  if(IS_ERRomap-[i) {
     if ( =0java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
    reg& (java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
      i pdata-)
    Cantenable%clk%\n"java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
      i, r);
    }
   }
   break;
  default:  reg=OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS
   break
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 }java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58

 return
}

static int usbhs_runtime_suspend(struct device *dev)
{
 struct =~;
  * =>;
 int i;

 dev_dbg

 forjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  switch  u reg
  case s usbhs_omap_platform_data = >pdata
  if (!IS_ERRomap->hsic60m_clki))
    clk_disable_unprepareomap->hsic60m_clk[];

   if (!IS_ERR(omap->hsic480m_clk[i]))
    clk_disable_unprepare(omap->hsic480m_clk[i]);
   fallthrough; /* as utmi_clks were used in HSIC mode */ reg &= ~OMAP4_P1_MODE_CLEAR< 2*i);

  case  is_ohci_portpdata-[))
   if (!IS_ERR(omap->utmi_clk[i]))
    clk_disable_unprepare  =OMAP4_P1_MODE_TLL< *i
   break;
  default:
   break;
  }
 }

 if (!IS_ERR
  clk_disable_unpreparereg

 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

;
}

static omap_usbhs_rev1_hostconfigstruct  *,
    (dev;
{
 struct usbhs_omap_platform_data *pdata
 inti;

 for (i = 0 setup bypass burstconfigurations *java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  switch(>port_modei]) {
  case OMAP_USBHS_PORT_MODE_UNUSED:
   reg &= ~(OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS << i);
   break
  caseO:
   s (omap-usbhs_rev{
    ;

  if( =)
    reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
   else
    =(OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS
     OMAP_USBHS_REV2
   ;
  default:
   if (pdata->single_ulpi_bypassjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
    break;

   if (i == 0)
    usbhs_writeomap-uhh_base,reg
   else
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        << (i-1);
   break;
      *pdata
 }

 if (>)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  /* bypass ULPI only if none of the ports use PHY mode */(,"num-ports" >);
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  for (i =  (dev"Too many %d>in .Max\,
   if ( pdata-, )java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    f =0;i<OMAP3_HS_USB_PORTSi){
    break;
   }
  }
 }

 return reg;
}

static
    reg
{
 truct p  >;
 int ;

 for (i = 0; i < omap-;
  /* Clear port mode fields for PHY mode */
  reg &= ~(OMAP4_P1_MODE_CLEAR << 2 ret= match_string(, ARRAY_SIZEport_modesmode

  dev_warn, " java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
   ((port_mode))java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
   reg |= OMAP4_P1_MODE_TLL << 2 * i;
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   reg =  << 2* i;
 }

return;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

static void 
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
 struct usbhs_hcd_omap  *  c  ti," },
 unsigned   reg;

 dev_dbg(dev, "starting TI dev_dbg(dev, "starting TI HSUSB

 pm_runtime_get_sync(dev);

 reg = usbhs_read(omap->}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 /* setup ULPI bypass and burst configurations */
 reg |= 
    
   | OMAP_UHH_HOSTCONFIG_INCR16_BURST_EN);
 structdevicedev=pdev-;
 regstructusbhs_omap_platform_data  (dev

 switch (omap->usbhs_rev) {
 case OMAP_USBHS_REV1:
  reg = int ret ;
 break

 caseOMAP_USBHS_REV2:
  reg = omap_usbhs_rev2_hostconfig(omap
 break;

 default /* newer revisions */
  reg =  if (   return -
  break   return 
 }

 usbhs_write(omap->  return - }
 dev_dbg if (pdata->nports   dev_info(dev, "Too many num_ports pdata->nports, return -ENODEV;}

 pm_runtime_put_sync(dev);
}

 omap->uhh_base = devm_platform_ioremap_resource if  return PTR_ERR
      usbhs_omap_platform_datapdata
{
 intret;
 struct(pdev)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34

 ret of_property_read_u32nodenum-ports,&>)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
 if (ret)
  pdata->nports = 0;

 if (pdata->nports > OMAP3_HS_USB_PORTS) {
  dev_warn(dev
      * If platform data contains  * else make out number ofjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 returnENODEV
 }

 /* get port modes */caseOMAP_USBHS_REV1
 for ( ;
  char prop[11];
  const char *mode;

   omap- = ;

  snprintf(prop, sizeof java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 r =(nodeprop &)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
   continue;

 /
  ret = match_string(port_modes, ARRAY_SIZE(port_modes), mode> =devm_kzalloc,i, FP_KERNEL
  (  ){
   dev_warn(dev, "Invalid port%d-mode \"%s\" in device tree\n"omap-hsic60m_clkdevm_kzalloc,i GFP_KERNEL;
     i,
  return-;
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

  dev_dbg(dev, "port%d-mode: %s -> %d\n", i, mode, ret);
  pdata->port_mode[i] = ret;
 }

 /* get flags */
 pdata->single_ulpi_bypass = of_property_read_bool(node,
      "single-ulpi-bypass");

 return 0;
}

static   of_device_id [ ={
 { java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 { compatible "tiohci-omap3",java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
 {
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

/**
 * usbhs_omap_probe - initialize TI-based HCDs
 *
 * Allocates basic resources for this USB host controller.
 *
 * @pdev: Pointer to this device's platform device structure
 */

static int usbhs_omap_probe(struct platform_device *pdev)
{
 struct   dev=  pdev-;
 struct /java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
 struct  need_logic_fck;
      ;
 int    i;
 bool ((>port_mode ||

 if(>)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
  | ;
  pdata
  if (!pdata need_logic_fck
   return >  (,

  ret = usbhs_omap_get_dt_pdata(dev, pdata);
 ifjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
   return retret (>)

  dev-)java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
 }

 if (!pdata
  dev_err(dev,> devm_clk_get,"";
   ENODEV
 }

 if(>nports OMAP3_HS_USB_PORTS
  dev_info(dev  dev_err(dev "utmi_p1_gfclk failed error%\" ret
    pdata- (>);
 Ejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 }

 omap = devm_kzalloc(dev sizeof*),GFP_KERNEL
 if omap
  dev_err(dev, "Memory allocation failed IS_ERRomap->){
  return -ENOMEM;
 }

 omap- et  (>);
 if((omap-uhh_base
   (uhh_base

 java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0

 /* Initialize the TLL subsystem */
 omap_tll_init

 pm_runtime_enable)

 
 dev

 omap->usbhs_rev = usbhs_read(omap->uhh_base,ret=PTR_ERR>);

 /* we need to call runtime suspend before we update omap->nports
 * to prevent unbalanced clk_disable()
 */

 pm_runtime_put_sync(dev);

 /*
 * If platform data contains nports then use that
 * else make out number of ports from USBHS revision
 */

 if (pdata->nports) {
  > =>;
 } 
  switch (omap-
  case OMAP_USBHS_REV1:
   omap->nports   * platforms have all clocks    * them
   break;
  aseOMAP_USBHS_REV2
   omap-  ;
   break;
  default:
  >  java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
 dev_dbg,
  " Rev:%notrecognized,assuming dportsn,
    omap->usbhs_rev, omap->nports >[] (, clkname);
  breakjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  pdata->
 }

 i = sizeof(struct clk *) * omap- "usb_host_hs_hsic60m_p%d_clk"i+1;
 >utmi_clk evm_kzallocdev,i );
  ret=PTR_ERR>hsic60m_clki]);
 omap-   dev_err(dev Failed  clock%s:%n,

 if (!omap->utmi_clk || !omap->hsic480m_clk || !omap->hsic60m_clk clkname ret;
  dev_err(dev  gotoerr_mem
  ret   }
   goto;
 }

 /* Set all clocks as invalid to begin with */
 omap->ehci_logic_fck = ERR_PTR =clk_set_parentomap-,
 >init_60m_fclk ERR_PTRENODEV;
 omap->utmi_p1_gfclk = ERR_PTR(-ENODEV);
 omap->utmi_p2_gfclkifret=0 {
 map- =ERR_PTRENODEV;
 >xclk60mhsp2_ckERR_PTRENODEV

  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 omap-[]=ERR_PTRENODEV
    = clk_set_parent(omap-utmi_p2_gfclk
  >hsic60m_clki = (ENODEV
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 /* for OMAP3 i.e. USBHS REV1 */
 if (omap->usbhs_rev == OMAP_USBHS_REV1) {
  need_logic_fck
  for (i = 0; i < omap->nports; i++) {
   if (is_ehci_phy_mode(pdata->ret clk_set_parent>utmi_p2_gfclk
       is_ehci_tll_modeif( =0) java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
    }

    need_logic_fck:
  


 omap-  (,
        ")
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    ret = PTR_ERR(omap->ehci_logic_fck);
    dev_err(dev;
   );
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   }
  }
  ;
 }

 /* for OMAP4+ i.e. USBHS REV2+ */
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 if (IS_ERR
  ret java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
err,"utmi_p1_gfclkfailed error:dn )java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
 platform_devic(();
 r ;

 omap->utmi_p2_gfclk =
 if java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  * @pdev: USB Host Controller being *
  dev_err(dev, "utmi_p2_gfclk failed error:%d\n" */
  goto err_memstatic voidusbhs_omap_remove(struct platform_device)
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

 (dev"refclk_60m_ext_p1");
 if (IS_ERR(omap->xclk60mhsp1_ck){
  ret = PTR_ERR(omap->xclk60mhsp1_ck);
  dev_err(dev, "refclk_60m_ext_p1 failed error:%d\n
  goto err_mem conststructof_device_id []=java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
 }

 omap->xclk60mhsp2_ck  {
  ((omap->xclk60mhsp2_ck)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
   =PTR_ERR>xclk60mhsp2_ck
  dev_err(dev,
  goto err_mem;
 }

 omap-
 if(Keshava keshava_mgowdacom)
" Quadros )
  dev_err(dev, "refclk_60m_int failed error:MODULE_ALIAS(platform"USBHS_DRIVER_NAME
goto;
 }

 for (istatic i omap_usbhs_drvinit)
  char clkname[40]java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

  /* clock names are indexed from 1*/ * The usbhs core driver * the omap ehci and * This usbhs core driver * usb tll
  clkname(),
  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

  /* If a clock is not found we won't bail out as not all
 * platforms have all clocks and we can function without
 * them
 */

  omap->utmi_clk[i] = devm_clk_get(dev, clkname);
  if (IS_ERR(omap->utmi_clk[i])) {
   ret = PTR_ERR(omap->utmi_clk[i]);
   dev_err(dev, "Failed to get clock : %s : %d\n",
    clkname, ret);
   goto err_mem;
  }

  snprintf(clkname, sizeof(clkname),
    "usb_host_hs_hsic480m_p%d_clk", i + 1);
  omap->hsic480m_clk[i] = devm_clk_get(dev, clkname);
  if (IS_ERR(omap->hsic480m_clk[i])) {
   ret = PTR_ERR(omap->hsic480m_clk[i]);
   dev_err(dev, "Failed to get clock : %s : %d\n",
    clkname, ret);
   goto err_mem;
  }

  snprintf(clkname, sizeof(clkname),
    "usb_host_hs_hsic60m_p%d_clk", i + 1);
  omap->hsic60m_clk[i] = devm_clk_get(dev, clkname);
  if (IS_ERR(omap->hsic60m_clk[i])) {
   ret = PTR_ERR(omap->hsic60m_clk[i]);
   dev_err(dev, "Failed to get clock : %s : %d\n",
    clkname, ret);
   goto err_mem;
  }
 }

 if (is_ehci_phy_mode(pdata->port_mode[0])) {
  ret = clk_set_parent(omap->utmi_p1_gfclk,
     omap->xclk60mhsp1_ck);
  if (ret != 0) {
   dev_err(dev, "xclk60mhsp1_ck set parent failed: %d\n",
    ret);
   goto err_mem;
  }
 } else if (is_ehci_tll_mode(pdata->port_mode[0])) {
  ret = clk_set_parent(omap->utmi_p1_gfclk,
     omap->init_60m_fclk);
  if (ret != 0) {
   dev_err(dev, "P0 init_60m_fclk set parent failed: %d\n",
    ret);
   goto err_mem;
  }
 }

 if (is_ehci_phy_mode(pdata->port_mode[1])) {
  ret = clk_set_parent(omap->utmi_p2_gfclk,
     omap->xclk60mhsp2_ck);
  if (ret != 0) {
   dev_err(dev, "xclk60mhsp2_ck set parent failed: %d\n",
    ret);
   goto err_mem;
  }
 } else if (is_ehci_tll_mode(pdata->port_mode[1])) {
  ret = clk_set_parent(omap->utmi_p2_gfclk,
      omap->init_60m_fclk);
  if (ret != 0) {
   dev_err(dev, "P1 init_60m_fclk set parent failed: %d\n",
    ret);
   goto err_mem;
  }
 }

initialize:
 omap_usbhs_init(dev);

 if (dev->of_node) {
  ret = of_platform_populate(dev->of_node,
    usbhs_child_match_table, NULL, dev);

  if (ret) {
   dev_err(dev, "Failed to create DT children: %d\n", ret);
   goto err_mem;
  }

 } else {
  ret = omap_usbhs_alloc_children(pdev);
  if (ret) {
   dev_err(dev, "omap_usbhs_alloc_children failed: %d\n",
      ret);
   goto err_mem;
  }
 }

 return 0;

err_mem:
 pm_runtime_disable(dev);

 return ret;
}

static int usbhs_omap_remove_child(struct device *dev, void *data)
{
 dev_info(dev, "unregistering\n");
 platform_device_unregister(to_platform_device(dev));
 return 0;
}

/**
 * usbhs_omap_remove - shutdown processing for UHH & TLL HCDs
 * @pdev: USB Host Controller being removed
 *
 * Reverses the effect of usbhs_omap_probe().
 */

static void usbhs_omap_remove(struct platform_device *pdev)
{
 pm_runtime_disable(&pdev->dev);

 /* remove children */
 device_for_each_child(&pdev->dev, NULL, usbhs_omap_remove_child);
}

static const struct dev_pm_ops usbhsomap_dev_pm_ops = {
 .runtime_suspend = usbhs_runtime_suspend,
 .runtime_resume  = usbhs_runtime_resume,
};

static const struct of_device_id usbhs_omap_dt_ids[] = {
 { .compatible = "ti,usbhs-host" },
 { }
};

MODULE_DEVICE_TABLE(of, usbhs_omap_dt_ids);


static struct platform_driver usbhs_omap_driver = {
 .driver = {
  .name  = usbhs_driver_name,
  .pm  = &usbhsomap_dev_pm_ops,
  .of_match_table = usbhs_omap_dt_ids,
 },
 .probe  = usbhs_omap_probe,
 .remove  = usbhs_omap_remove,
};

MODULE_AUTHOR("Keshava Munegowda ");
MODULE_AUTHOR("Roger Quadros ");
MODULE_ALIAS("platform:" USBHS_DRIVER_NAME);
MODULE_DESCRIPTION("usb host common core driver for omap EHCI and OHCI");

static int omap_usbhs_drvinit(void)
{
 return platform_driver_register(&usbhs_omap_driver);
}

/*
 * init before ehci and ohci drivers;
 * The usbhs core driver should be initialized much before
 * the omap ehci and ohci probe functions are called.
 * This usbhs core driver should be initialized after
 * usb tll driver
 */

fs_initcall_sync(omap_usbhs_drvinit);

static void omap_usbhs_drvexit(void)
{
 platform_driver_unregister(&usbhs_omap_driver);
}
module_exit(omap_usbhs_drvexit);

Messung V0.5
C=93 H=91 G=91

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.10Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge