summaryrefslogtreecommitdiffstats
path: root/drivers/mci/atmel_mci.c
Commit message (Collapse)AuthorAgeFilesLines
* driver: Attach info callback to device, not to driverSascha Hauer2013-05-301-5/+3
| | | | | | | | Since the info is device specific and not driver specific, attach the callback to the device. This makes it possible to have a info callback for a device which does not have a driver attached. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* MCI: atmel: Fix possible null pointer dereferenceAlexander Shiyan2013-04-301-1/+3
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Use new device_platform_driver() macro for driversAlexander Shiyan2013-02-131-7/+1
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mci'Sascha Hauer2013-02-041-6/+14
|\ | | | | | | | | Conflicts: drivers/mci/atmel_mci.c
| * mci atmel: implement card_present callbackSascha Hauer2013-01-201-6/+15
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | atmel_mci: gpio: request and configure card detectJean-Christophe PLAGNIOL-VILLARD2013-01-251-2/+25
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | atmel_mci: drop board host capsJean-Christophe PLAGNIOL-VILLARD2013-01-251-1/+0
| | | | | | | | | | | | | | as it's handle by detecting the IP version and bus with Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | atmel_mci: update the SD/SDIO Card Register at request timeJean-Christophe PLAGNIOL-VILLARD2013-01-251-5/+11
| | | | | | | | | | | | | | as we need to reset the IP Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | atmel_mci: support the SD highspeed since IP version 0x300Jean-Christophe PLAGNIOL-VILLARD2013-01-251-0/+24
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | atmel_mci: after a software timeout the IP need to be resetJean-Christophe PLAGNIOL-VILLARD2013-01-251-1/+4
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | atmel_mci: on version 0x0 we need to reset the IP at each requestJean-Christophe PLAGNIOL-VILLARD2013-01-251-0/+10
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | atmel_mci: rwproof is only needed up to IP version 0x200Jean-Christophe PLAGNIOL-VILLARD2013-01-251-1/+9
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | atmel_mci: fix host initJean-Christophe PLAGNIOL-VILLARD2013-01-251-8/+6
| | | | | | | | | | | | | | | | disable interrupt and reset the IP at the probe set timout at the host init Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | atmel_mci: version 0x5xx of the IP have a different clk divJean-Christophe PLAGNIOL-VILLARD2013-01-251-18/+47
| | | | | | | | | | | | | | so detect and support it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | atmel_mci: detect IP versionJean-Christophe PLAGNIOL-VILLARD2013-01-251-0/+32
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | atmel_mci: use linux regs defineJean-Christophe PLAGNIOL-VILLARD2013-01-251-66/+55
| | | | | | | | | | | | | | to simplify sync and share code Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | atmel_mci: rename all function to start with atmciJean-Christophe PLAGNIOL-VILLARD2013-01-251-47/+46
| | | | | | | | | | | | | | | | to be consistent and have a unique naming convention be in sync with the kernel too Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | atmel_mci: rename atmel_mci_readl/writel to atmci_readl/writelJean-Christophe PLAGNIOL-VILLARD2013-01-251-22/+21
| | | | | | | | | | | | | | | | to be consistent with the kernel This also reduce the ligne length Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | atmel_mci: rename atmel_mci_host tp atmel_mciJean-Christophe PLAGNIOL-VILLARD2013-01-251-21/+21
|/ | | | | | | to be consistent with the kernel Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* switch all platform_bus device/driver registering to ↵Jean-Christophe PLAGNIOL-VILLARD2012-10-041-1/+1
| | | | | | | | platform_driver/device_register now register_driver and register_device are for bus only usage. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* mci: remove unused device argument from set_iosSascha Hauer2012-02-091-2/+1
| | | | | | This argmuent is unused in all drivers, so remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci core: replace discrete ios values with struct iosSascha Hauer2012-02-091-8/+10
| | | | | | | As we'll need more arguments to set_ios over time put them in a struct mci_ios like the kernel does. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* atmel/mci: fix slot_b supportJean-Christophe PLAGNIOL-VILLARD2012-01-161-1/+3
| | | | | | | | | | | | | | in commit commit f60f6c58e atmel_mci: check for device id we use to address the right slot the driver use the dev_id to detect the slot which is wrong on 9263 as we have 2 devices with 2 slots use slot_b paramter to specify the slot as done in linux Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* atmel_mci: check for device id we use to address the right slotMichael Grzeschik2011-12-071-0/+2
| | | | | | | | We have to check which sd card slot we use. The registered mmc_id is the the correct parameter for this. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce io.hSascha Hauer2011-09-221-1/+1
| | | | | | | To allow for some generic io accessors introduce io.h and use this instead of asm/io.h throughout the tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* atmel_mci: handle clk_get error correctlyHubert Feurstein2011-09-121-2/+3
| | | | | | Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: parent fixupsSascha Hauer2011-08-171-0/+1
| | | | | | | Make the mci host a child of the hardware device and the disk a child of the mci host. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* atmel/drivers: switch to dev_request_mem_regionJean-Christophe PLAGNIOL-VILLARD2011-07-201-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* atmel_mci: switch to "struct resource"Jean-Christophe PLAGNIOL-VILLARD2011-07-181-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* atmel-mci: fix initialization of 8bit-bus-width-mode for at91sam9g45Hubert Feurstein2011-06-221-2/+2
| | | | | | | | | When the bus_width was set to 8, then only one data-line has been initialized. Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* atmel-mci: fix wrong pointer castHubert Feurstein2011-06-221-1/+1
| | | | | Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: add Atmel AT91 MCI driverHubert Feurstein2011-06-161-0/+494
The driver supports push and pull transfers. Tested on at91sam9m10 SoC. Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>