[peter.chen-usb:for-usb-next 20/30] drivers/usb/cdns3/drd.c:382:32: sparse: sparse: incorrect type in assignment (different address spaces)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git for-usb-next
head:   94e0623337a6d52721e3a842cbfe7196e9f34144
commit: e89eb2bc2ed451edebf7767490416987e9f06d99 [20/30] usb: cdns3: Refactoring names in reusable code
config: parisc-randconfig-s031-20201209 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-179-ga00755aa-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git/commit/?id=e89eb2bc2ed451edebf7767490416987e9f06d99
        git remote add peter.chen-usb https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
        git fetch --no-tags peter.chen-usb for-usb-next
        git checkout e89eb2bc2ed451edebf7767490416987e9f06d99
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


"sparse warnings: (new ones prefixed by >>)"
   drivers/usb/cdns3/drd.c:42:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [noderef] [usertype] __iomem *override_reg @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:42:38: sparse:     expected unsigned int [noderef] [usertype] __iomem *override_reg
   drivers/usb/cdns3/drd.c:42:38: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:44:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [noderef] [usertype] __iomem *override_reg @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:44:38: sparse:     expected unsigned int [noderef] [usertype] __iomem *override_reg
   drivers/usb/cdns3/drd.c:44:38: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:46:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [noderef] [usertype] __iomem *override_reg @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:46:38: sparse:     expected unsigned int [noderef] [usertype] __iomem *override_reg
   drivers/usb/cdns3/drd.c:46:38: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:65:50: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:65:50: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:65:50: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:67:50: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:67:50: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:67:50: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:90:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:90:25: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:90:25: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:100:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:100:30: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:100:30: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:133:24: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:133:24: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:133:24: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:143:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:143:48: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:143:48: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:159:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:159:21: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:159:21: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:167:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:167:15: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:167:15: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:167:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:167:15: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:167:15: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:187:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:187:21: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:187:21: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:190:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:190:9: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:190:9: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:190:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:190:9: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:190:9: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:209:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:209:47: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:209:47: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:218:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:218:15: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:218:15: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:218:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:218:15: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:218:15: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:245:21: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:245:21: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:245:21: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:247:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:247:9: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:247:9: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:247:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:247:9: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:247:9: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:266:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:266:25: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:266:25: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:335:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:335:26: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:335:26: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:354:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:354:25: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:354:25: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:377:27: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct cdns3_otg_legacy_regs *otg_v0_regs @@     got void [noderef] __iomem *[assigned] regs @@
   drivers/usb/cdns3/drd.c:377:27: sparse:     expected struct cdns3_otg_legacy_regs *otg_v0_regs
   drivers/usb/cdns3/drd.c:377:27: sparse:     got void [noderef] __iomem *[assigned] regs
   drivers/usb/cdns3/drd.c:378:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:378:25: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:378:25: sparse:     got restricted __le32 *
>> drivers/usb/cdns3/drd.c:382:32: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct cdns_otg_common_regs *otg_regs @@     got void [noderef] __iomem *[assigned] regs @@
   drivers/usb/cdns3/drd.c:382:32: sparse:     expected struct cdns_otg_common_regs *otg_regs
   drivers/usb/cdns3/drd.c:382:32: sparse:     got void [noderef] __iomem *[assigned] regs
   drivers/usb/cdns3/drd.c:385:32: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:385:32: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:385:32: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:386:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:386:17: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:386:17: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:390:35: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct cdns3_otg_regs *otg_v1_regs @@     got void [noderef] __iomem *[assigned] regs @@
   drivers/usb/cdns3/drd.c:390:35: sparse:     expected struct cdns3_otg_regs *otg_v1_regs
   drivers/usb/cdns3/drd.c:390:35: sparse:     got void [noderef] __iomem *[assigned] regs
   drivers/usb/cdns3/drd.c:391:38: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct cdnsp_otg_regs *otg_cdnsp_regs @@     got void [noderef] __iomem *[assigned] regs @@
   drivers/usb/cdns3/drd.c:391:38: sparse:     expected struct cdnsp_otg_regs *otg_cdnsp_regs
   drivers/usb/cdns3/drd.c:391:38: sparse:     got void [noderef] __iomem *[assigned] regs
   drivers/usb/cdns3/drd.c:395:41: sparse: sparse: restricted __le32 degrades to integer
   drivers/usb/cdns3/drd.c:402:40: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:402:40: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:402:40: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:406:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:406:17: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:406:17: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:406:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:406:17: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:406:17: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:411:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:411:17: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:411:17: sparse:     got restricted __le32 *
   drivers/usb/cdns3/drd.c:440:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got restricted __le32 * @@
   drivers/usb/cdns3/drd.c:440:28: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/usb/cdns3/drd.c:440:28: sparse:     got restricted __le32 *

vim +382 drivers/usb/cdns3/drd.c

7733f6c32e36ff Pawel Laszczak 2019-08-26  357  
e89eb2bc2ed451 Pawel Laszczak 2020-12-07  358  int cdns_drd_init(struct cdns *cdns)
7733f6c32e36ff Pawel Laszczak 2019-08-26  359  {
7733f6c32e36ff Pawel Laszczak 2019-08-26  360  	void __iomem *regs;
7733f6c32e36ff Pawel Laszczak 2019-08-26  361  	u32 state;
27afe166127521 Pawel Laszczak 2020-07-13  362  	int ret;
7733f6c32e36ff Pawel Laszczak 2019-08-26  363  
7733f6c32e36ff Pawel Laszczak 2019-08-26  364  	regs = devm_ioremap_resource(cdns->dev, &cdns->otg_res);
7733f6c32e36ff Pawel Laszczak 2019-08-26  365  	if (IS_ERR(regs))
7733f6c32e36ff Pawel Laszczak 2019-08-26  366  		return PTR_ERR(regs);
7733f6c32e36ff Pawel Laszczak 2019-08-26  367  
7733f6c32e36ff Pawel Laszczak 2019-08-26  368  	/* Detection of DRD version. Controller has been released
21f969177b7ea3 Pawel Laszczak 2020-12-07  369  	 * in three versions. All are very similar and are software compatible,
21f969177b7ea3 Pawel Laszczak 2020-12-07  370  	 * but they have same changes in register maps.
21f969177b7ea3 Pawel Laszczak 2020-12-07  371  	 * The first register in oldest version is command register and it's
21f969177b7ea3 Pawel Laszczak 2020-12-07  372  	 * read only. Driver should read 0 from it. On the other hand, in v1
21f969177b7ea3 Pawel Laszczak 2020-12-07  373  	 * and v2 the first register contains device ID number which is not
21f969177b7ea3 Pawel Laszczak 2020-12-07  374  	 * set to 0. Driver uses this fact to detect the proper version of
7733f6c32e36ff Pawel Laszczak 2019-08-26  375  	 * controller.
7733f6c32e36ff Pawel Laszczak 2019-08-26  376  	 */
7733f6c32e36ff Pawel Laszczak 2019-08-26  377  	cdns->otg_v0_regs = regs;
7733f6c32e36ff Pawel Laszczak 2019-08-26  378  	if (!readl(&cdns->otg_v0_regs->cmd)) {
7733f6c32e36ff Pawel Laszczak 2019-08-26  379  		cdns->version  = CDNS3_CONTROLLER_V0;
7733f6c32e36ff Pawel Laszczak 2019-08-26  380  		cdns->otg_v1_regs = NULL;
21f969177b7ea3 Pawel Laszczak 2020-12-07  381  		cdns->otg_cdnsp_regs = NULL;
7733f6c32e36ff Pawel Laszczak 2019-08-26 @382  		cdns->otg_regs = regs;
e89eb2bc2ed451 Pawel Laszczak 2020-12-07  383  		cdns->otg_irq_regs = (struct cdns_otg_irq_regs *)
21f969177b7ea3 Pawel Laszczak 2020-12-07  384  				     &cdns->otg_v0_regs->ien;
7733f6c32e36ff Pawel Laszczak 2019-08-26  385  		writel(1, &cdns->otg_v0_regs->simulate);
eed6ed6e7085b8 Peter Chen     2020-03-31  386  		dev_dbg(cdns->dev, "DRD version v0 (%08x)\n",
7733f6c32e36ff Pawel Laszczak 2019-08-26  387  			 readl(&cdns->otg_v0_regs->version));
7733f6c32e36ff Pawel Laszczak 2019-08-26  388  	} else {
7733f6c32e36ff Pawel Laszczak 2019-08-26  389  		cdns->otg_v0_regs = NULL;
7733f6c32e36ff Pawel Laszczak 2019-08-26  390  		cdns->otg_v1_regs = regs;
21f969177b7ea3 Pawel Laszczak 2020-12-07  391  		cdns->otg_cdnsp_regs = regs;
21f969177b7ea3 Pawel Laszczak 2020-12-07  392  
7733f6c32e36ff Pawel Laszczak 2019-08-26  393  		cdns->otg_regs = (void *)&cdns->otg_v1_regs->cmd;
21f969177b7ea3 Pawel Laszczak 2020-12-07  394  
21f969177b7ea3 Pawel Laszczak 2020-12-07  395  		if (cdns->otg_cdnsp_regs->did == OTG_CDNSP_DID) {
e89eb2bc2ed451 Pawel Laszczak 2020-12-07  396  			cdns->otg_irq_regs = (struct cdns_otg_irq_regs *)
21f969177b7ea3 Pawel Laszczak 2020-12-07  397  					      &cdns->otg_cdnsp_regs->ien;
21f969177b7ea3 Pawel Laszczak 2020-12-07  398  			cdns->version  = CDNSP_CONTROLLER_V2;
21f969177b7ea3 Pawel Laszczak 2020-12-07  399  		} else {
e89eb2bc2ed451 Pawel Laszczak 2020-12-07  400  			cdns->otg_irq_regs = (struct cdns_otg_irq_regs *)
21f969177b7ea3 Pawel Laszczak 2020-12-07  401  					      &cdns->otg_v1_regs->ien;
7733f6c32e36ff Pawel Laszczak 2019-08-26  402  			writel(1, &cdns->otg_v1_regs->simulate);
21f969177b7ea3 Pawel Laszczak 2020-12-07  403  			cdns->version  = CDNS3_CONTROLLER_V1;
21f969177b7ea3 Pawel Laszczak 2020-12-07  404  		}
21f969177b7ea3 Pawel Laszczak 2020-12-07  405  
eed6ed6e7085b8 Peter Chen     2020-03-31  406  		dev_dbg(cdns->dev, "DRD version v1 (ID: %08x, rev: %08x)\n",
7733f6c32e36ff Pawel Laszczak 2019-08-26  407  			 readl(&cdns->otg_v1_regs->did),
7733f6c32e36ff Pawel Laszczak 2019-08-26  408  			 readl(&cdns->otg_v1_regs->rid));
7733f6c32e36ff Pawel Laszczak 2019-08-26  409  	}
7733f6c32e36ff Pawel Laszczak 2019-08-26  410  
7733f6c32e36ff Pawel Laszczak 2019-08-26  411  	state = OTGSTS_STRAP(readl(&cdns->otg_regs->sts));
7733f6c32e36ff Pawel Laszczak 2019-08-26  412  
7733f6c32e36ff Pawel Laszczak 2019-08-26  413  	/* Update dr_mode according to STRAP configuration. */
7733f6c32e36ff Pawel Laszczak 2019-08-26  414  	cdns->dr_mode = USB_DR_MODE_OTG;
21f969177b7ea3 Pawel Laszczak 2020-12-07  415  
21f969177b7ea3 Pawel Laszczak 2020-12-07  416  	if ((cdns->version == CDNSP_CONTROLLER_V2 &&
21f969177b7ea3 Pawel Laszczak 2020-12-07  417  	     state == OTGSTS_CDNSP_STRAP_HOST) ||
21f969177b7ea3 Pawel Laszczak 2020-12-07  418  	    (cdns->version != CDNSP_CONTROLLER_V2 &&
21f969177b7ea3 Pawel Laszczak 2020-12-07  419  	     state == OTGSTS_STRAP_HOST)) {
7733f6c32e36ff Pawel Laszczak 2019-08-26  420  		dev_dbg(cdns->dev, "Controller strapped to HOST\n");
7733f6c32e36ff Pawel Laszczak 2019-08-26  421  		cdns->dr_mode = USB_DR_MODE_HOST;
21f969177b7ea3 Pawel Laszczak 2020-12-07  422  	} else if ((cdns->version == CDNSP_CONTROLLER_V2 &&
21f969177b7ea3 Pawel Laszczak 2020-12-07  423  		    state == OTGSTS_CDNSP_STRAP_GADGET) ||
21f969177b7ea3 Pawel Laszczak 2020-12-07  424  		   (cdns->version != CDNSP_CONTROLLER_V2 &&
21f969177b7ea3 Pawel Laszczak 2020-12-07  425  		    state == OTGSTS_STRAP_GADGET)) {
7733f6c32e36ff Pawel Laszczak 2019-08-26  426  		dev_dbg(cdns->dev, "Controller strapped to PERIPHERAL\n");
7733f6c32e36ff Pawel Laszczak 2019-08-26  427  		cdns->dr_mode = USB_DR_MODE_PERIPHERAL;
7733f6c32e36ff Pawel Laszczak 2019-08-26  428  	}
7733f6c32e36ff Pawel Laszczak 2019-08-26  429  
7733f6c32e36ff Pawel Laszczak 2019-08-26  430  	ret = devm_request_threaded_irq(cdns->dev, cdns->otg_irq,
e89eb2bc2ed451 Pawel Laszczak 2020-12-07  431  					cdns_drd_irq,
e89eb2bc2ed451 Pawel Laszczak 2020-12-07  432  					cdns_drd_thread_irq,
7733f6c32e36ff Pawel Laszczak 2019-08-26  433  					IRQF_SHARED,
7733f6c32e36ff Pawel Laszczak 2019-08-26  434  					dev_name(cdns->dev), cdns);
7733f6c32e36ff Pawel Laszczak 2019-08-26  435  	if (ret) {
7733f6c32e36ff Pawel Laszczak 2019-08-26  436  		dev_err(cdns->dev, "couldn't get otg_irq\n");
7733f6c32e36ff Pawel Laszczak 2019-08-26  437  		return ret;
7733f6c32e36ff Pawel Laszczak 2019-08-26  438  	}
7733f6c32e36ff Pawel Laszczak 2019-08-26  439  
7733f6c32e36ff Pawel Laszczak 2019-08-26  440  	state = readl(&cdns->otg_regs->sts);
ecf4f823fb7050 Pawel Laszczak 2020-07-13  441  	if (OTGSTS_OTG_NRDY(state)) {
7733f6c32e36ff Pawel Laszczak 2019-08-26  442  		dev_err(cdns->dev, "Cadence USB3 OTG device not ready\n");
7733f6c32e36ff Pawel Laszczak 2019-08-26  443  		return -ENODEV;
7733f6c32e36ff Pawel Laszczak 2019-08-26  444  	}
7733f6c32e36ff Pawel Laszczak 2019-08-26  445  
27afe166127521 Pawel Laszczak 2020-07-13  446  	return 0;
7733f6c32e36ff Pawel Laszczak 2019-08-26  447  }
7733f6c32e36ff Pawel Laszczak 2019-08-26  448  

:::::: The code at line 382 was first introduced by commit
:::::: 7733f6c32e36ff9d7adadf40001039bf219b1cbe usb: cdns3: Add Cadence USB3 DRD Driver

:::::: TO: Pawel Laszczak <pawell@xxxxxxxxxxx>
:::::: CC: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux