1. 29 Jul, 2013 7 commits
    • Marek Vasut's avatar
      usb: mv_udc: Init mv_drv.gadget.ops statically · fe48f058
      Marek Vasut authored
      
      
      There is no need to init this field at runtime, so init it statically.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Lei Wen <leiwen@marvell.com>
      Cc: Otavio Salvador <otavio@ossystems.com.br>
      Cc: Stefano Babic <sbabic@denx.de>
      fe48f058
    • Marek Vasut's avatar
      usb: mv_udc: Remove QH_MAXNUM macro · f6463177
      Marek Vasut authored
      
      
      The QH_MAXNUM is used in absolutelly incorrect manner and is not
      even needed. Remove it and correctly replace it's occurance with
      2 * NUM_ENDPOINTS .
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Lei Wen <leiwen@marvell.com>
      Cc: Otavio Salvador <otavio@ossystems.com.br>
      Cc: Stefano Babic <sbabic@denx.de>
      f6463177
    • Marek Vasut's avatar
      usb: mv_udc: Clean up the initial variable check · d7663038
      Marek Vasut authored
      
      
      Clean up the code that checks the validity of a USB gadget driver
      in usb_gadget_register_driver(). Moreover, limit the speed of the
      driver to either FULL or HIGH, this is more precise and once we
      have xHCI support, also more correct.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Lei Wen <leiwen@marvell.com>
      Cc: Otavio Salvador <otavio@ossystems.com.br>
      Cc: Stefano Babic <sbabic@denx.de>
      d7663038
    • Marek Vasut's avatar
      usb: mv_udc: Make use of struct ehci_ctrl · be7ed253
      Marek Vasut authored
      
      
      The usb_lowlevel_init() call already fills and passes back struct
      ehci_ctrl , which readily contains correctly determined address of
      the port register block address computed from values from controller
      configuration registers. Leverage this and make use of this value
      as this makes the code mode universal, but also gets us rid of the
      CONFIG_USB_REG_BASE configuration option.
      
      Moreover, this patch cleans up the usb_gadget_register_driver() call
      a little by correcting the error handling. Note the usb_lowlevel_init()
      and mvudc_probe() are now called in reversed order, but this has no
      impact on the code.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Lei Wen <leiwen@marvell.com>
      Cc: Otavio Salvador <otavio@ossystems.com.br>
      Cc: Stefano Babic <sbabic@denx.de>
      be7ed253
    • Marek Vasut's avatar
      usb: mv_udc: Clean up the EP initialization · 2ea4b448
      Marek Vasut authored
      
      
      Move the constant values that are programmed into mv_ep.ep into
      separate static const structure so they can be memcpy()'d when
      the initialization happens.
      
      Moveover, we only every init NUM_ENDPOINTS, not 2 * NUM_ENDPOINTS,
      so fix this bug as well.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Lei Wen <leiwen@marvell.com>
      Cc: Otavio Salvador <otavio@ossystems.com.br>
      Cc: Stefano Babic <sbabic@denx.de>
      2ea4b448
    • Marek Vasut's avatar
      usb: mv_udc: Move endpoint array into driver data · 532d846f
      Marek Vasut authored
      
      
      The endpoints are operated on a per-controller basis, move the
      endpoint array into controller's private data. Also shuffle the
      struct mv_ep structure definition just above the definition of
      the struct mv_drv so they're well grouped together.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Lei Wen <leiwen@marvell.com>
      Cc: Otavio Salvador <otavio@ossystems.com.br>
      Cc: Stefano Babic <sbabic@denx.de>
      532d846f
    • Marek Vasut's avatar
      usb: mv_udc: Unbreak the mv_udc driver · a7eafcfe
      Marek Vasut authored
      
      
      The mv_udc driver is broken for a while and doesn't even compile.
      This patch fixes the issues and gets the driver into working state
      again. This driver was tested on Freescale i.MX233/i.MX28 .
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Lei Wen <leiwen@marvell.com>
      Cc: Otavio Salvador <otavio@ossystems.com.br>
      Cc: Stefano Babic <sbabic@denx.de>
      a7eafcfe
  2. 24 Jul, 2013 1 commit
  3. 11 Dec, 2011 1 commit