Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9a7f260 authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'pxa-for-4.3-v2' of https://github.com/rjarzmik/linux into next/soc

This is the pxa changes for v4.3 cycle.

There is mostly one evolution on the dma side, to enable cooperation
of the legacy pxa DMA API, and the new dmaengine API.
Once all drivers using DMA are converted, the legacy DMA API should
be removed.

* tag 'pxa-for-4.3-v2' of https://github.com/rjarzmik/linux

:
  ARM: pxa: Use setup_timer
  ARM: pxa: Use module_platform_driver
  ARM: pxa: transition to dmaengine phase 1

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents d7018b15 6d6db340
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#include <linux/platform_data/camera-pxa.h>
#include <mach/audio.h>
#include <mach/hardware.h>
#include <linux/platform_data/mmp_dma.h>
#include <linux/platform_data/mtd-nand-pxa3xx.h>

#include "devices.h"
@@ -1193,3 +1194,39 @@ void __init pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info)
	pd->dev.platform_data = info;
	platform_device_add(pd);
}

static struct mmp_dma_platdata pxa_dma_pdata = {
	.dma_channels	= 0,
};

static struct resource pxa_dma_resource[] = {
	[0] = {
		.start	= 0x40000000,
		.end	= 0x4000ffff,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= IRQ_DMA,
		.end	= IRQ_DMA,
		.flags	= IORESOURCE_IRQ,
	},
};

static u64 pxadma_dmamask = 0xffffffffUL;

static struct platform_device pxa2xx_pxa_dma = {
	.name		= "pxa-dma",
	.id		= 0,
	.dev		= {
		.dma_mask = &pxadma_dmamask,
		.coherent_dma_mask = 0xffffffff,
	},
	.num_resources	= ARRAY_SIZE(pxa_dma_resource),
	.resource	= pxa_dma_resource,
};

void __init pxa2xx_set_dmac_info(int nb_channels)
{
	pxa_dma_pdata.dma_channels = nb_channels;
	pxa_register_device(&pxa2xx_pxa_dma, &pxa_dma_pdata);
}
+1 −0
Original line number Diff line number Diff line
@@ -206,6 +206,7 @@ static int __init pxa25x_init(void)
		register_syscore_ops(&pxa_irq_syscore_ops);
		register_syscore_ops(&pxa2xx_mfp_syscore_ops);

		pxa2xx_set_dmac_info(16);
		pxa_register_device(&pxa25x_device_gpio, &pxa25x_gpio_info);
		ret = platform_add_devices(pxa25x_devices,
					   ARRAY_SIZE(pxa25x_devices));
+1 −0
Original line number Diff line number Diff line
@@ -310,6 +310,7 @@ static int __init pxa27x_init(void)
		if (!of_have_populated_dt()) {
			pxa_register_device(&pxa27x_device_gpio,
					    &pxa27x_gpio_info);
			pxa2xx_set_dmac_info(32);
			ret = platform_add_devices(devices,
						   ARRAY_SIZE(devices));
		}
+1 −0
Original line number Diff line number Diff line
@@ -431,6 +431,7 @@ static int __init pxa3xx_init(void)
		if (of_have_populated_dt())
			return 0;

		pxa2xx_set_dmac_info(32);
		ret = platform_add_devices(devices, ARRAY_SIZE(devices));
		if (ret)
			return ret;
+2 −4
Original line number Diff line number Diff line
@@ -841,11 +841,9 @@ static int sharpsl_pm_probe(struct platform_device *pdev)
	sharpsl_pm.charge_mode = CHRG_OFF;
	sharpsl_pm.flags = 0;

	init_timer(&sharpsl_pm.ac_timer);
	sharpsl_pm.ac_timer.function = sharpsl_ac_timer;
	setup_timer(&sharpsl_pm.ac_timer, sharpsl_ac_timer, 0UL);

	init_timer(&sharpsl_pm.chrg_full_timer);
	sharpsl_pm.chrg_full_timer.function = sharpsl_chrg_full_timer;
	setup_timer(&sharpsl_pm.chrg_full_timer, sharpsl_chrg_full_timer, 0UL);

	led_trigger_register_simple("sharpsl-charge", &sharpsl_charge_led_trigger);

Loading