9
0
Fork 0
Commit Graph

34 Commits

Author SHA1 Message Date
Jean-Christophe PLAGNIOL-VILLARD dde9161963 atmel_mci: add devname pdata support
so we can specify the devname in the board

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-18 08:48:07 +02:00
Sascha Hauer 2302fc6076 mci: rename capabilities flags
Use MMC_CAP_ names instead of MMC_MODE_. This makes it more
clear that these are capabilities of host/card and do not refer
to the current mode. These are in line with the Linux Kernel
except for MMC_CAP_MMC_HIGHSPEED_52MHZ which could be fixed
later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-03 10:59:53 +02:00
Sascha Hauer 73b0d228e5 driver: Attach info callback to device, not to driver
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>
2013-05-30 12:18:27 +02:00
Alexander Shiyan ef3e752fa1 MCI: atmel: Fix possible null pointer dereference
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-30 09:35:55 +02:00
Alexander Shiyan 6a256321b8 Use new device_platform_driver() macro for drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 09:23:28 +01:00
Sascha Hauer 6eb49a5b1f Merge branch 'for-next/mci'
Conflicts:
	drivers/mci/atmel_mci.c
2013-02-04 15:48:58 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2c93912f34 atmel_mci: gpio: request and configure card detect
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:44 +01:00
Jean-Christophe PLAGNIOL-VILLARD 50559d2c4c atmel_mci: drop board host caps
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>
2013-01-25 19:52:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD be42bafdd0 atmel_mci: update the SD/SDIO Card Register at request time
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>
2013-01-25 19:52:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD c934d62029 atmel_mci: support the SD highspeed since IP version 0x300
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD bc33582a8a atmel_mci: after a software timeout the IP need to be reset
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD 14b2c8f15b atmel_mci: on version 0x0 we need to reset the IP at each request
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD 40a333b062 atmel_mci: rwproof is only needed up to IP version 0x200
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:18 +01:00
Jean-Christophe PLAGNIOL-VILLARD 7bd476801a atmel_mci: fix host init
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>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD 0a98283554 atmel_mci: version 0x5xx of the IP have a different clk div
so detect and support it

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD b9696a0b3f atmel_mci: detect IP version
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD f674fb3125 atmel_mci: use linux regs define
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>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD aaa55b560e atmel_mci: rename all function to start with atmci
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>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD 1f99b4ca84 atmel_mci: rename atmel_mci_readl/writel to atmci_readl/writel
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>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD cb9d84a0e1 atmel_mci: rename atmel_mci_host tp atmel_mci
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>
2013-01-25 19:52:14 +01:00
Sascha Hauer 456fae0227 mci atmel: implement card_present callback
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 10:53:30 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3c5327e660 switch all platform_bus device/driver registering to 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>
2012-10-04 15:19:12 +02:00
Sascha Hauer 0b3c58c820 mci: remove unused device argument from set_ios
This argmuent is unused in all drivers, so remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 12:44:27 +01:00
Sascha Hauer 0f9892cce8 mci core: replace discrete ios values with struct ios
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>
2012-02-09 12:40:11 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3874b16997 atmel/mci: fix slot_b support
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>
2012-01-16 09:33:41 +01:00
Michael Grzeschik f60f6c58e2 atmel_mci: check for device id we use to address the right slot
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>
2011-12-07 09:39:12 +01:00
Sascha Hauer 3ee7877a48 introduce io.h
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>
2011-09-22 19:03:05 +02:00
Hubert Feurstein 8cc995ed42 atmel_mci: handle clk_get error correctly
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>
2011-09-12 12:25:05 +02:00
Sascha Hauer c41360cd20 mci: parent fixups
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>
2011-08-17 09:36:30 +02:00
Jean-Christophe PLAGNIOL-VILLARD 358ab3eb84 atmel/drivers: switch to dev_request_mem_region
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-20 08:25:43 +02:00
Jean-Christophe PLAGNIOL-VILLARD a42dc1226b atmel_mci: switch to "struct resource"
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-07-18 07:57:50 +08:00
Hubert Feurstein c034843ada atmel-mci: fix initialization of 8bit-bus-width-mode for at91sam9g45
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>
2011-06-22 00:22:23 +02:00
Hubert Feurstein 1ecd192be8 atmel-mci: fix wrong pointer cast
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-06-22 00:22:23 +02:00
Hubert Feurstein 6cf02124b1 mci: add Atmel AT91 MCI driver
The driver supports push and pull transfers.
Tested on at91sam9m10 SoC.

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
2011-06-16 17:54:12 +02:00