mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ARM: arm-soc: late cleanups
These are cleanups and smaller changes that either depend on earlier
feature branches or came in late during the development cycle.
We normally try to get all cleanups early, so these are the exceptions:
- A follow-up on the clocksource reworks, hopefully the last time
we need to merge clocksource subsystem changes through arm-soc.
A first set of patches was part of the original 3.10 arm-soc cleanup
series because of interdependencies with timer drivers now moved out
of arch/arm.
- Migrating the SPEAr13xx platform away from using auxdata for DMA
channel descriptions towards using information in device tree,
based on the earlier SPEAr multiplatform series
- A few follow-ups on the Atmel SAMA5 support and other changes
for Atmel at91 based on the larger at91 reworks.
- Moving the armada irqchip implementation to drivers/irqchip
- Several OMAP cleanups following up on the larger series already
merged in 3.10.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIVAwUAUYj5U2CrR//JCVInAQLNIRAAvsCtYOmXTxkRBxdtNEUUbkEjx71Se7q0
h9PR8vqlkbYwONkJ8a6j8pKq/WJDmLpHQWg/moBsvlGc6uEVBPBFhCWHs1+yGUzX
GhnJOaIKh3+651hIoXccS+/YZ16e1EAzdCM7+1QegPTldsRGkTOiwXgmR51kmPrz
6cZ8P5MFqMrWIy4XqWhOBbMDCY/An05IHMpniGIamUg2/uB921Z0wNFvDrnsg97u
DsVEwimyCJ0j7aO4TH+fkvsjoGWnIhxPtpaIm8iff6TPRI49deRb3zYpnIONm+oG
/cQrRf3BNW+aiTuRCTEjdBNGtcrYgN6CLWWjzgMhv1itSlX8swBcOhuNJRCGNQRI
v3wL4aEBxUpPGGL8erc2GIW7pe29YC2UEYI2z1X/5MEzYO589zkkG2k+/3HQVUwp
dnYpQxhjRMvh4mcodBJFRjzH1Z7agKUwtoKalAHRRH7r5gJDkpL3zLoMhYPTG5IZ
OwU+aYf+dDxh2kKW0zs8a/qL97UTHjlTRUC9LPoumvJ7LlKeDfzEn7DHUm2gggiu
dO9ye/NF/xEXoDXTl0Qp2wJ6/sbPSLyCYCIMdP/gJjWUiDDqqZ0VRaKL7vE/JWrd
NJ7k5yunX8/kRgfqgRFLDdFnPj1JeYHlmexsq4l9TPbPstoIcbw8u1v9sr8aZF+Z
agh9u4e7QU8=
=HWfp
-----END PGP SIGNATURE-----
Merge tag 'cleanup-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC late cleanups from Arnd Bergmann:
"These are cleanups and smaller changes that either depend on earlier
feature branches or came in late during the development cycle. We
normally try to get all cleanups early, so these are the exceptions:
- A follow-up on the clocksource reworks, hopefully the last time we
need to merge clocksource subsystem changes through arm-soc.
A first set of patches was part of the original 3.10 arm-soc
cleanup series because of interdependencies with timer drivers now
moved out of arch/arm.
- Migrating the SPEAr13xx platform away from using auxdata for DMA
channel descriptions towards using information in device tree,
based on the earlier SPEAr multiplatform series
- A few follow-ups on the Atmel SAMA5 support and other changes for
Atmel at91 based on the larger at91 reworks.
- Moving the armada irqchip implementation to drivers/irqchip
- Several OMAP cleanups following up on the larger series already
merged in 3.10."
* tag 'cleanup-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (50 commits)
ARM: OMAP4: change the device names in usb_bind_phy
ARM: OMAP2+: Fix mismerge for timer.c between ff931c82 and da4a686a
ARM: SPEAr: conditionalize SMP code
ARM: arch_timer: Silence debug preempt warnings
ARM: OMAP: remove unused variable
serial: amba-pl011: fix !CONFIG_DMA_ENGINE case
ata: arasan: remove the need for platform_data
ARM: at91/sama5d34ek.dts: remove not needed compatibility string
ARM: at91: dts: add MCI DMA support
ARM: at91: dts: add i2c dma support
ARM: at91: dts: set #dma-cells to the correct value
ARM: at91: suspend both memory controllers on at91sam9263
irqchip: armada-370-xp: slightly cleanup irq controller driver
irqchip: armada-370-xp: move IRQ handler to avoid forward declaration
irqchip: move IRQ driver for Armada 370/XP
ARM: mvebu: move L2 cache initialization in init_early()
devtree: add binding documentation for sp804
ARM: integrator-cp: convert use CLKSRC_OF for timer init
ARM: versatile: use OF init for sp804 timer
ARM: versatile: add versatile dtbs to dtbs target
...
This commit is contained in:
commit
1bf25e78af
79 changed files with 777 additions and 1041 deletions
|
|
@ -209,8 +209,6 @@ struct arasan_cf_dev {
|
|||
struct dma_chan *dma_chan;
|
||||
/* Mask for DMA transfers */
|
||||
dma_cap_mask_t mask;
|
||||
/* dma channel private data */
|
||||
void *dma_priv;
|
||||
/* DMA transfer work */
|
||||
struct work_struct work;
|
||||
/* DMA delayed finish work */
|
||||
|
|
@ -308,6 +306,7 @@ static void cf_card_detect(struct arasan_cf_dev *acdev, bool hotplugged)
|
|||
static int cf_init(struct arasan_cf_dev *acdev)
|
||||
{
|
||||
struct arasan_cf_pdata *pdata = dev_get_platdata(acdev->host->dev);
|
||||
unsigned int if_clk;
|
||||
unsigned long flags;
|
||||
int ret = 0;
|
||||
|
||||
|
|
@ -325,8 +324,12 @@ static int cf_init(struct arasan_cf_dev *acdev)
|
|||
|
||||
spin_lock_irqsave(&acdev->host->lock, flags);
|
||||
/* configure CF interface clock */
|
||||
writel((pdata->cf_if_clk <= CF_IF_CLK_200M) ? pdata->cf_if_clk :
|
||||
CF_IF_CLK_166M, acdev->vbase + CLK_CFG);
|
||||
/* TODO: read from device tree */
|
||||
if_clk = CF_IF_CLK_166M;
|
||||
if (pdata && pdata->cf_if_clk <= CF_IF_CLK_200M)
|
||||
if_clk = pdata->cf_if_clk;
|
||||
|
||||
writel(if_clk, acdev->vbase + CLK_CFG);
|
||||
|
||||
writel(TRUE_IDE_MODE | CFHOST_ENB, acdev->vbase + OP_MODE);
|
||||
cf_interrupt_enable(acdev, CARD_DETECT_IRQ, 1);
|
||||
|
|
@ -357,12 +360,6 @@ static void dma_callback(void *dev)
|
|||
complete(&acdev->dma_completion);
|
||||
}
|
||||
|
||||
static bool filter(struct dma_chan *chan, void *slave)
|
||||
{
|
||||
chan->private = slave;
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline void dma_complete(struct arasan_cf_dev *acdev)
|
||||
{
|
||||
struct ata_queued_cmd *qc = acdev->qc;
|
||||
|
|
@ -530,8 +527,7 @@ static void data_xfer(struct work_struct *work)
|
|||
|
||||
/* request dma channels */
|
||||
/* dma_request_channel may sleep, so calling from process context */
|
||||
acdev->dma_chan = dma_request_channel(acdev->mask, filter,
|
||||
acdev->dma_priv);
|
||||
acdev->dma_chan = dma_request_slave_channel(acdev->host->dev, "data");
|
||||
if (!acdev->dma_chan) {
|
||||
dev_err(acdev->host->dev, "Unable to get dma_chan\n");
|
||||
goto chan_request_fail;
|
||||
|
|
@ -798,6 +794,7 @@ static int arasan_cf_probe(struct platform_device *pdev)
|
|||
struct ata_host *host;
|
||||
struct ata_port *ap;
|
||||
struct resource *res;
|
||||
u32 quirk;
|
||||
irq_handler_t irq_handler = NULL;
|
||||
int ret = 0;
|
||||
|
||||
|
|
@ -817,12 +814,17 @@ static int arasan_cf_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (pdata)
|
||||
quirk = pdata->quirk;
|
||||
else
|
||||
quirk = CF_BROKEN_UDMA; /* as it is on spear1340 */
|
||||
|
||||
/* if irq is 0, support only PIO */
|
||||
acdev->irq = platform_get_irq(pdev, 0);
|
||||
if (acdev->irq)
|
||||
irq_handler = arasan_cf_interrupt;
|
||||
else
|
||||
pdata->quirk |= CF_BROKEN_MWDMA | CF_BROKEN_UDMA;
|
||||
quirk |= CF_BROKEN_MWDMA | CF_BROKEN_UDMA;
|
||||
|
||||
acdev->pbase = res->start;
|
||||
acdev->vbase = devm_ioremap_nocache(&pdev->dev, res->start,
|
||||
|
|
@ -859,17 +861,16 @@ static int arasan_cf_probe(struct platform_device *pdev)
|
|||
INIT_WORK(&acdev->work, data_xfer);
|
||||
INIT_DELAYED_WORK(&acdev->dwork, delayed_finish);
|
||||
dma_cap_set(DMA_MEMCPY, acdev->mask);
|
||||
acdev->dma_priv = pdata->dma_priv;
|
||||
|
||||
/* Handle platform specific quirks */
|
||||
if (pdata->quirk) {
|
||||
if (pdata->quirk & CF_BROKEN_PIO) {
|
||||
if (quirk) {
|
||||
if (quirk & CF_BROKEN_PIO) {
|
||||
ap->ops->set_piomode = NULL;
|
||||
ap->pio_mask = 0;
|
||||
}
|
||||
if (pdata->quirk & CF_BROKEN_MWDMA)
|
||||
if (quirk & CF_BROKEN_MWDMA)
|
||||
ap->mwdma_mask = 0;
|
||||
if (pdata->quirk & CF_BROKEN_UDMA)
|
||||
if (quirk & CF_BROKEN_UDMA)
|
||||
ap->udma_mask = 0;
|
||||
}
|
||||
ap->flags |= ATA_FLAG_PIO_POLLING | ATA_FLAG_NO_ATAPI;
|
||||
|
|
|
|||
Loading…
Reference in a new issue