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

Commit e51d0f0a authored by Shawn Guo's avatar Shawn Guo
Browse files

dma: imx-dma: remove cpu_is_xxx by using platform_device_id



It changes the driver to use platform_device_id rather than cpu_is_xxx
to determine the controller type, and updates the platform code
accordingly.

As the result, mach/hardware.h inclusion gets removed from the driver.

Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Tested-by: default avatarJavier Martin <javier.martin@vista-silicon.com>
Cc: Vinod Koul <vinod.koul@linux.intel.com>
parent 73930eb3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -83,7 +83,8 @@ int __init mx1_clocks_init(unsigned long fref)
			pr_err("imx1 clk %d: register failed with %ld\n",
				i, PTR_ERR(clk[i]));

	clk_register_clkdev(clk[dma_gate], "ahb", "imx-dma");
	clk_register_clkdev(clk[dma_gate], "ahb", "imx1-dma");
	clk_register_clkdev(clk[hclk], "ipg", "imx1-dma");
	clk_register_clkdev(clk[csi_gate], NULL, "mx1-camera.0");
	clk_register_clkdev(clk[mma_gate], "mma", NULL);
	clk_register_clkdev(clk[usbd_gate], NULL, "imx_udc.0");
+2 −2
Original line number Diff line number Diff line
@@ -163,8 +163,8 @@ int __init mx21_clocks_init(unsigned long lref, unsigned long href)
	clk_register_clkdev(clk[usb_gate], "per", "imx21-hcd.0");
	clk_register_clkdev(clk[usb_hclk_gate], "ahb", "imx21-hcd.0");
	clk_register_clkdev(clk[nfc_gate], NULL, "imx21-nand.0");
	clk_register_clkdev(clk[dma_hclk_gate], "ahb", "imx-dma");
	clk_register_clkdev(clk[dma_gate], "ipg", "imx-dma");
	clk_register_clkdev(clk[dma_hclk_gate], "ahb", "imx21-dma");
	clk_register_clkdev(clk[dma_gate], "ipg", "imx21-dma");
	clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
	clk_register_clkdev(clk[i2c_gate], NULL, "imx21-i2c.0");
	clk_register_clkdev(clk[kpp_gate], NULL, "mxc-keypad");
+2 −2
Original line number Diff line number Diff line
@@ -242,8 +242,8 @@ int __init mx27_clocks_init(unsigned long fref)
	clk_register_clkdev(clk[nfc_baud_gate], NULL, "imx27-nand.0");
	clk_register_clkdev(clk[vpu_baud_gate], "per", "coda-imx27.0");
	clk_register_clkdev(clk[vpu_ahb_gate], "ahb", "coda-imx27.0");
	clk_register_clkdev(clk[dma_ahb_gate], "ahb", "imx-dma");
	clk_register_clkdev(clk[dma_ipg_gate], "ipg", "imx-dma");
	clk_register_clkdev(clk[dma_ahb_gate], "ahb", "imx27-dma");
	clk_register_clkdev(clk[dma_ipg_gate], "ipg", "imx27-dma");
	clk_register_clkdev(clk[fec_ipg_gate], "ipg", "imx27-fec.0");
	clk_register_clkdev(clk[fec_ahb_gate], "ahb", "imx27-fec.0");
	clk_register_clkdev(clk[wdog_ipg_gate], NULL, "imx2-wdt.0");
+1 −1
Original line number Diff line number Diff line
@@ -329,7 +329,7 @@ struct platform_device *__init imx_add_spi_imx(
		const struct imx_spi_imx_data *data,
		const struct spi_imx_master *pdata);

struct platform_device *imx_add_imx_dma(resource_size_t iobase,
struct platform_device *imx_add_imx_dma(char *name, resource_size_t iobase,
					int irq, int irq_err);
struct platform_device *imx_add_imx_sdma(char *name,
	resource_size_t iobase, int irq, struct sdma_platform_data *pdata);
+2 −2
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
 */
#include "devices-common.h"

struct platform_device __init __maybe_unused *imx_add_imx_dma(
struct platform_device __init __maybe_unused *imx_add_imx_dma(char *name,
	resource_size_t iobase, int irq, int irq_err)
{
	struct resource res[] = {
@@ -28,7 +28,7 @@ struct platform_device __init __maybe_unused *imx_add_imx_dma(
	};

	return platform_device_register_resndata(&mxc_ahb_bus,
			"imx-dma", -1, res, ARRAY_SIZE(res), NULL, 0);
			name, -1, res, ARRAY_SIZE(res), NULL, 0);
}

struct platform_device __init __maybe_unused *imx_add_imx_sdma(char *name,
Loading