summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-05-04usb: gadget: add isochronous support to gadget zeroPaul Zimmerman4-65/+387
Add two isochronous endpoints to the gadget zero source/sink function. They are enabled by selecting alternate interface 1, so by default they are not enabled. Module parameters for setting all the isoc endpoint characteristics are also provided. Signed-off-by: Pratyush Anand <pratyush.anand@st.com> Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: add a sparse endian notationDan Carpenter1-1/+1
The original code works fine, but Sparse complains because it isn't annotated properly. drivers/usb/gadget/composite.c:793:26: warning: incorrect type in assignment (different base types) drivers/usb/gadget/composite.c:793:26: expected unsigned short [unsigned] [usertype] language devel/drivers/usb/gadget/composite.c:793:26: got restricted __le16 [usertype] <noident> devel/drivers/usb/gadget/composite.c:795:29: warning: restricted __le16 degrades to integer drivers/usb/gadget/composite.c:798:24: warning: incorrect type in assignment (different base types) drivers/usb/gadget/composite.c:798:24: expected restricted __le16 [usertype] <noident> devel/drivers/usb/gadget/composite.c:798:24: got unsigned short [unsigned] [usertype] language Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: r8a66597-udc: add support for set_selfpoweredShimoda, Yoshihiro2-1/+15
The previous code always set to USB_DEVICE_SELF_POWERED in GET_STATUS. So, this patch adds set_selfpowered(). Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Include i.MX processors in the USB_FSL_USB2 help textFabio Estevam1-1/+1
USB_FSL_USB2 driver can be used on PowerPC and i.MX processors. Include i.MX processors in the USB_FSL_USB2 help text. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: fsl_udc_core: dTD's next dtd pointer need to be updated once ↵Peter Chen1-0/+2
written dTD's next dtd pointer need to be updated once CPU writes it, or this request may not be handled by controller, then host will get NAK from device forever. This problem occurs when there is a request is handling, we need to add a new request to dTD list, if this new request is added before the current one is finished, the new request is intended to added as next dtd pointer at current dTD, but without wmb(), the dTD's next dtd pointer may not be updated when the controller reads it. In that case, the controller will still get Terminate Bit is 1 at dTD's next dtd pointer, that means there is no next request, then this new request is missed by controller. CC: <stable@vger.kernel.org> Signed-off-by: Peter Chen <peter.chen@freescale.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: composite: prevent a memory leak when configuration bind failsYongsul Oh1-0/+13
In some USB composite gadget drivers, the configuration's bind function called by the usb_add_config() calls multiple bind config functions. (for example cdc2 configuration bind function in the cdc_do_config() of the cdc2.c has two functionality bind config functions. - the ecm_bind_config() & the acm_bind_config()) In each functionality bind config function, new instance is allocated and finally added by the usb_add_function(). So if an error occurred during the second functionality bind config (for example an error occurred at the acm_bind_config() after succeeding of the ecm_bind_function()), the instance created by the acm_bind_config() cannot be freed creating a memory leak. This patch fixes this issue. Signed-off-by: Yongsul Oh <yongsul96.oh@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: f_mass_storage: remove deprecated fsg_add()Michal Nazarewicz1-7/+0
There are no in-tree fsg_add() users and it has been deprecated since 2.6.35 [1dc90985d1: fsg_add() renamed to fsg_bind_config()] so out-of-tree users had more then enough time to convert. Removing. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: renesas_usbhs: gadget: add support for set_selfpoweredShimoda, Yoshihiro1-1/+18
The previous code always set to USB_DEVICE_SELF_POWERED in GET_STATUS. So, this patch adds set_selfpowered(). Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: dummy_hcd: allow to free requests on disabled endpointsSebastian Andrzej Siewior1-5/+3
ep->desc is set to NULL on endpoint disable. That means once an endpoint is disabled it is not possible to free requests. In my target gadget I first disable endpoints to make sure I have no requests on the fly and then free frequests. On dummy I am leaking memory here. Since I can't imagine a reason why it should be a bad thing, lets allow to free requests on disabled endpoints. On removal of composite the ep0 request is removed so lets allow that here as well. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: make g_printer use compositeSebastian Andrzej Siewior1-350/+97
This patch converts the g_printer to make use of the compoiste framework for descriptor parsing instead of its own implementation of it. This gadget contains now one function which is the printer gadget. Compile tested only. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: remove DUALSPEED from printerSebastian Andrzej Siewior1-24/+1
This patch removes the DUALSPEED macro and makes the HS (and FS) case the default. This is one little step before composite can be used for descriptor management. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: imx_udc: convert to new style start/stopSebastian Andrzej Siewior1-37/+16
This patches converts the driver into the new style start/stop interface. As a result the driver no longer uses the static global controller variable in start/stop code. I kept the gloval controller variable because it keeps init simple. Compile tested only. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: fsl_qe_udc: remove not implemented callbacksSebastian Andrzej Siewior1-42/+0
All of this callbacks which I remove here are not implemented and return an error code. The gadget code returns an error code if a callback is missing so there is no need to implement this twice. Cc: Li Yang <leoli@freescale.com> Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: fsl_qe_udc: convert to new style start/stopSebastian Andrzej Siewior1-170/+140
This patches converts the driver into the new style start/stop interface. As a result the driver no longer uses the static global udc_conroller variable. Compile tested only. Cc: Li Yang <leoli@freescale.com> Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: atmel_usba_udc: convert to newstyle start/stop interfaceSebastian Andrzej Siewior1-40/+12
This patches converts the driver into the new style start/stop interface. As a result the driver no longer uses the static global the_udc variable in start/stop functions. I kept the the_udc variable since it makes the init code a little simpler. Someone with hardware might want to look if it possible to move the vbus irq/toggle_bias code into ->pullup(). Compile tested only. Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: at91_udc: convert to new style start/stop interfaceSebastian Andrzej Siewior1-46/+14
This patches converts the driver into the new style start/stop interface. As a result the driver no longer uses the static global controller variable in start/stop functions. I kept the controller variable since it makes the init code a little simpler. Compile tested only. Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update s3c-hsudc to use usb_endpoint_descriptor inside the ↵Ido Shayevitz1-6/+3
struct usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update pch_udc to use usb_endpoint_descriptor inside the struct ↵Ido Shayevitz1-9/+7
usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update s3c2410_udc to use usb_endpoint_descriptor inside the ↵Ido Shayevitz2-9/+6
struct usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update r8a66597-udc to use usb_endpoint_descriptor inside the ↵Ido Shayevitz2-8/+8
struct usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update pxa25x_udc to use usb_endpoint_descriptor inside the ↵Ido Shayevitz2-15/+12
struct usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update omap_udc to use usb_endpoint_descriptor inside the ↵Ido Shayevitz2-11/+9
struct usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update mv_udc to use usb_endpoint_descriptor inside the struct ↵Ido Shayevitz2-11/+9
usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update m66592-udc to use usb_endpoint_descriptor inside the ↵Ido Shayevitz2-6/+6
struct usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update langwell_udc to use usb_endpoint_descriptor inside the ↵Ido Shayevitz2-19/+17
struct usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update goku_udc to use usb_endpoint_descriptor inside the ↵Ido Shayevitz2-11/+10
struct usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update fusb300_udc to use usb_endpoint_descriptor inside the ↵Ido Shayevitz2-3/+2
struct usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update fsl_udc_core to use usb_endpoint_descriptor inside the ↵Ido Shayevitz2-14/+12
struct usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update fsl_qe_udc to use usb_endpoint_descriptor inside the ↵Ido Shayevitz2-11/+9
struct usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update atmel_usba_udc to use usb_endpoint_descriptor inside the ↵Ido Shayevitz2-13/+12
struct usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update at91_udc to use usb_endpoint_descriptor inside the ↵Ido Shayevitz2-11/+7
struct usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update amd5536udc to use usb_endpoint_descriptor inside the ↵Ido Shayevitz2-8/+6
struct usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: dwc3: Update dwc3 udc to use usb_endpoint_descriptor inside the struct ↵Ido Shayevitz3-21/+19
usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: Update ci13xxx_udc to use usb_endpoint_descriptor inside the ↵Ido Shayevitz2-9/+7
struct usb_ep Remove redundant pointer to struct usb_endpoint_descriptor. Signed-off-by: Ido Shayevitz <idos@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-05-04usb: gadget: use module_pci_driverAxel Lin5-72/+5
This patch converts the drivers in drivers/usb/gadget/* to use module_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Thomas Dahlmann <dahlmann.thomas@arcor.de> Cc: Xiaochen Shen <xiaochen.shen@intel.com> Cc: Pavankumar Kondeti <pkondeti@codeaurora.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-04-21Linux 3.4-rc4v3.4-rc4Linus Torvalds1-1/+1
2012-04-21sparc32,leon: add notify_cpu_starting()Yong Zhang1-0/+3
Otherwise cpu_active_mask will not set, which lead to other issue. Signed-off-by: Yong Zhang <yong.zhang0@gmail.com> Signed-off-by: Konrad Eisele <konrad@gaisler.com> Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-21Merge tag 'fixes-for-linus' of ↵Linus Torvalds28-161/+80
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull "ARM: SoC fixes" from Olof Johansson: * at91, ux500, imx, omap and bcmring: - at91 fixes for =m driver build issues, irqdomain fixes and config dependency fixes - ux500 kconfig dependency fixes and a smp wakeup bugfix - imx idle bugfix and build fix due to irq domain changes - omap uart pinmux fixes, softreset regression revert and misc fixes - bcmring build error regression fix * ux500 and imx had some small defconfig updates in this branch * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (27 commits) ARM: bcmring: fix UART declarations ARM: imx: Fix imx5 idle logic bug ARM: imx27-dt: Fix build due to removal of irq_domain_add_simple() ARM: imx_v4_v5_defconfig: Add support for CONFIG_REGULATOR_FIXED_VOLTAGE ARM: OMAP1: DMTIMER: fix broken timer clock source selection ARM: OMAP: serial: Fix the ocp smart idlemode handling bug ARM: OMAP2+: UART: Fix incorrect population of default uart pads ARM: OMAP: sram: fix BUG in dpll code for !PM case dmaengine: Kconfig: fix Atmel at_hdmac entry USB: gadget/at91_udc: add gpio_to_irq() function to vbus interrupt USB: ohci-at91: change annotations for probe/remove functions leds-atmel-pwm.c: Make pwmled_probe() __devinit ARM: at91: fix at91sam9261ek Ethernet dm9000 irq ARM: at91: fix rm9200ek flash size ARM: at91: remove empty at91_init_serial function ARM: at91: fix typo in at91_pmc_base assembly declaration ARM: at91: Export at91_matrix_base ARM: at91: Export at91_pmc_base ARM: at91: Export at91_ramc_base ARM: at91: Export at91_st_base ...
2012-04-21Merge tag 'mmc-fixes-for-3.4-rc4' of ↵Linus Torvalds10-81/+86
git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc Pull MMC fixes from Chris Ball: - Build fix for omap_hsmmc with OF against 3.4-rc1. - Fix CONFIG_MMC_UNSAFE_RESUME semantics regression against 3.3, which broke hotplug card detection when UNSAFE_RESUME is set. - Fix a race condition in omap_hsmmc with runtime PM. - Fix two libertas SDIO-powered-resume regressions. - Small fixes for discard/sanitize, dw_mmc, cd-gpio and esdhc-imx. * tag 'mmc-fixes-for-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: mmc: core: Do not pre-claim host in suspend mmc: dw_mmc: prevent NULL dereference for dma_ops mmc: unbreak sdhci-esdhc-imx on i.MX25 mmc: cd-gpio: Include header to pickup exported symbol prototypes mmc: sdhci: refine non-removable card checking for card detection mmc: dw_mmc: Fix switch from DMA to PIO mmc: remove MMC bus legacy suspend/resume method mmc: omap_hsmmc: Get rid of of_have_populated_dt() usage mmc: omap_hsmmc: build fix for CONFIG_OF=y and CONFIG_MMC_OMAP_HS=m mmc: fixes for eMMC v4.5 sanitize operation mmc: fixes for eMMC v4.5 discard operation
2012-04-21Merge branch 'v4l_for_linus' of ↵Linus Torvalds9-12/+71
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - Fixes a regression at DVB core when switching from DVB-S2 to DVB-S on Kaffeine (Fedora 16 Bugzilla #812895); - Fixes a mutex unlock at an error condition at drx-k; - Fix winbond-cir set mode; - mt9m032: Fix a compilation breakage with some random Kconfig; - mt9m032: fix two dead locks; - xc5000: don't require an special firmware (that won't be provided by the vendor) just because the xtal frequency is different; - V4L DocBook: fix some typos at multi-plane formats description. * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] xc5000: support 32MHz & 31.875MHz xtal using the 41.024.5 firmware [media] V4L: mt9m032: fix compilation breakage [media] V4L: DocBook: Fix typos in the multi-plane formats description [media] V4L: mt9m032: fix two dead-locks [media] rc-core: set mode for winbond-cir [media] drxk: Does not unlock mutex if sanity check failed in scu_command() [media] dvb_frontend: Fix a regression when switching back to DVB-S
2012-04-21Merge tag 'mfd-for-linus-3.4' of ↵Linus Torvalds20-238/+276
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 Pull MFD fixes from Samuel Ortiz: "We have 3 build fixes, a OMAP USB host PHY reset fix and the twl6040 conversion to an i2c driver. The latter may not sound like a fix but the twl6040 MFD driver won't probe without it, triggering an OMAP4 audio regression." * tag 'mfd-for-linus-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: mfd: Fix modular builds of rc5t583 regulator support mfd: Fix asic3_gpio_to_irq ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issue mfd: Convert twl6040 to i2c driver, and separate it from twl core mfd : Fix dbx500 compilation error
2012-04-21kill mm argument of vm_munmap()Al Viro8-11/+12
it's always current->mm Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-21perfmon: kill some helpers and argumentsAl Viro1-9/+4
pfm_vm_munmap() is simply vm_munmap() and pfm_remove_smpl_mapping() always get current as the first argument. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-21aio: don't bother with unmapping when aio_free_ring() is coming from exit_aio()Al Viro1-1/+14
... since exit_mmap() is coming and it will munmap() everything anyway. In all other cases aio_free_ring() has ctx->mm == current->mm; moreover, all other callers of vm_munmap() have mm == current->mm, so this will allow us to get rid of mm argument of vm_munmap(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-20mmc: core: Do not pre-claim host in suspendUlf Hansson1-35/+20
Since SDIO drivers may want to do some SDIO operations in their suspend callback functions, we must not keep the host claimed when calling them. Daniel Drake reported that libertas_sdio encountered a deadlock in its suspend function. Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com> Tested-by: Daniel Drake <dsd@laptop.org> [stable@: please apply to 3.2-stable and 3.3-stable] Cc: stable <stable@vger.kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-20mmc: dw_mmc: prevent NULL dereference for dma_opsJaehoon Chung1-1/+2
Now, dma_ops is assumed that use the IDMAC. But if dma_ops is assigned the pdata->dma_ops, we didn't ensure that callback function is defined. If the callback isn't defined, then we should run in PIO mode. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-20mmc: unbreak sdhci-esdhc-imx on i.MX25Eric Bénard1-2/+1
This was broken by me in 37865fe91582582a6f6c00652f6a2b1ff71f8a78 ("mmc: sdhci-esdhc-imx: fix timeout on i.MX's sdhci") where more extensive tests would have shown that read or write of data to the card were failing (even if the partition table was correctly read). Signed-off-by: Eric Bénard <eric@eukrea.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Cc: stable <stable@vger.kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-20mmc: cd-gpio: Include header to pickup exported symbol prototypesH Hartley Sweeten1-0/+1
Include the linux/mmc/cd-gpio.h header to pickup the prototypes for the two exported symbols. This quiets the sparse warnings: warning: symbol 'mmc_cd_gpio_request' was not declared. Should it be static? warning: symbol 'mmc_cd_gpio_free' was not declared. Should it be static? Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-20mmc: sdhci: refine non-removable card checking for card detectionDaniel Drake1-1/+1
Commit c79396c191bc19 ("mmc: sdhci: prevent card detection activity for non-removable cards") disables card detection where the cards are marked as non-removable. This makes sense, but the implementation detail of calling mmc_card_is_removable() causes some problems, because mmc_card_is_removable() is overloaded with CONFIG_MMC_UNSAFE_RESUME semantics. In the OLPC XO case, we need CONFIG_MMC_UNSAFE_RESUME because our root filesystem is stored on SD, but we also have external SD card slots where we want automatic card detection. Refine the check to only apply to hosts marked as MMC_CAP_NONREMOVABLE, which is defined to mean that the card is *really* nonremovable. This could be revisited in future if we find a way to improve CONFIG_MMC_UNSAFE_RESUME semantics. Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Chuanxiao Dong <chuanxiao.dong@intel.com> [stable@: please apply to 3.3-stable] Cc: stable <stable@vger.kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-04-20mmc: dw_mmc: Fix switch from DMA to PIOSeungwon Jeon1-1/+3
When dw_mci_pre_dma_transfer returns failure in some reasons, dw_mci_submit_data will prepare to switch the PIO mode from DMA. After switching to PIO mode, DMA(IDMAC in particular) is still enabled. This makes the corruption in handling interrupt and the driver lock-up. Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> Acked-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>