1. 04 Feb, 2015 2 commits
    • Roshan Pius's avatar
      usb: dwc2: Fix a bug in reading the endpoint directions from reg. · 251a17f5
      Roshan Pius authored
      According to  the DWC2 datasheet, the HWCFG1 register stores
      the configured endpoint directions for endpoints 0-15 in bit positions
      0-31.
      ==========================
      Endpoint Direction (EpDir)
      This 32-bit field uses two bits per endpoint to determine the endpoint
      direction.
      Endpoint
      Bits [31:30]: Endpoint 15 direction
      Bits [29:28]: Endpoint 14 direction
      ....
      Bits [3:2]: Endpoint 1 direction
      Bits[1:0]: Endpoint 0 direction (always BIDIR)
      ==========================
      
      The DWC2 driver is currently interpreting the contents of the register
      as directions for endpoints 1-15 which leads to an error in determining
      the configured endpoint directions in the core because the first 2 bits
      determine the direction of endpoint 0 and not 1.
      
      This is based on testing/next branch in Felipe's git.
      Signed-off-by: default avatarRoshan Pius <rpius@chromium.org>
      Acked-by: default avatarJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      251a17f5
    • Peter Chen's avatar
      staging: emxx_udc: fix the build error · 1fa2df0c
      Peter Chen authored
      Fix below build error:
      
      reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 9239d88f
        # save the attached .config to linux build tree
        make.cross ARCH=arm
      
      All error/warnings:
      
         In file included from include/linux/seqlock.h:35:0,
                          from include/linux/time.h:5,
                          from include/linux/stat.h:18,
                          from include/linux/module.h:10,
                          from drivers/staging/emxx_udc/emxx_udc.c:22:
         drivers/staging/emxx_udc/emxx_udc.c: In function 'nbu2ss_gad_set_selfpowered':
      >> drivers/staging/emxx_udc/emxx_udc.c:3129:21: error: 'udc' undeclared (first use in this function)
           spin_lock_irqsave(&udc->lock, flags);
                              ^
         include/linux/spinlock.h:215:34: note: in definition of macro 'raw_spin_lock_irqsave'
            flags = _raw_spin_lock_irqsave(lock); \
                                           ^
      >> drivers/staging/emxx_udc/emxx_udc.c:3129:2: note: in expansion of macro 'spin_lock_irqsave'
           spin_lock_irqsave(&udc->lock, flags);
           ^
         drivers/staging/emxx_udc/emxx_udc.c:3129:21: note: each undeclared identifier is reported only once for each function it appears in
           spin_lock_irqsave(&udc->lock, flags);
                              ^
         include/linux/spinlock.h:215:34: note: in definition of macro 'raw_spin_lock_irqsave'
            flags = _raw_spin_lock_irqsave(lock); \
                                           ^
      >> drivers/staging/emxx_udc/emxx_udc.c:3129:2: note: in expansion of macro 'spin_lock_irqsave'
           spin_lock_irqsave(&udc->lock, flags);
           ^
      
      vim +/udc +3129 drivers/staging/emxx_udc/emxx_udc.c
      
      33aa8d45 Magnus Damm 2014-06-06  3123
      33aa8d45 Magnus Damm 2014-06-06  3124  	if (pgadget == NULL) {
      33aa8d45 Magnus Damm 2014-06-06  3125  		ERR("%s, bad param\n", __func__);
      33aa8d45 Magnus Damm 2014-06-06  3126  		return -EINVAL;
      33aa8d45 Magnus Damm 2014-06-06  3127  	}
      33aa8d45 Magnus Damm 2014-06-06  3128
      33aa8d45 Magnus Damm 2014-06-06 @3129  	spin_lock_irqsave(&udc->lock, flags);
      9239d88f Peter Chen  2015-01-28  3130  	pgadget->is_selfpowered = (is_selfpowered != 0);
      33aa8d45 Magnus Damm 2014-06-06  3131  	spin_unlock_irqrestore(&udc->lock, flags);
      33aa8d45 Magnus Damm 2014-06-06  3132
      Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      1fa2df0c
  2. 02 Feb, 2015 2 commits
  3. 30 Jan, 2015 17 commits
  4. 29 Jan, 2015 19 commits