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

Commit 6e8887f6 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

ARM: SPEAr13xx: Pass generic DW DMAC platform data from DT



This replaces an earlier patch from Viresh Kumar to move
the spear platform over to the generic DMA binding. This
version is now based on the merged multiplatform capable
spear platform, rather than the separate spear13xx/3xx/6xx
directories.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Vinod Koul <vinod.koul@linux.intel.com>
Cc: devicetree-discuss@lists.ozlabs.org
Cc: Shiraz Hashim <shiraz.hashim@st.com>
Cc: spear-devel@list.st.com
parent 1ef865bb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -113,6 +113,9 @@
				reg = <0xb4100000 0x1000>;
				interrupts = <0 105 0x4>;
				status = "disabled";
				dmas = <&dwdma0 0x600 0 0 1>, /* 0xC << 11 */
					<&dwdma0 0x680 0 1 0>; /* 0xD << 7 */
				dma-names = "tx", "rx";
			};

			thermal@e07008c4 {
+24 −1
Original line number Diff line number Diff line
@@ -98,13 +98,24 @@
			reg = <0xb2800000 0x1000>;
			interrupts = <0 29 0x4>;
			status = "disabled";
			dmas = <&dwdma0 0 0 0 0>;
			dma-names = "data";
		};

		dma@ea800000 {
		dwdma0: dma@ea800000 {
			compatible = "snps,dma-spear1340";
			reg = <0xea800000 0x1000>;
			interrupts = <0 19 0x4>;
			status = "disabled";

			dma-channels = <8>;
			#dma-cells = <3>;
			dma-requests = <32>;
			chan_allocation_order = <1>;
			chan_priority = <1>;
			block_size = <0xfff>;
			dma-masters = <2>;
			data_width = <3 3 0 0>;
		};

		dma@eb000000 {
@@ -112,6 +123,15 @@
			reg = <0xeb000000 0x1000>;
			interrupts = <0 59 0x4>;
			status = "disabled";

			dma-requests = <32>;
			dma-channels = <8>;
			dma-masters = <2>;
			#dma-cells = <3>;
			chan_allocation_order = <1>;
			chan_priority = <1>;
			block_size = <0xfff>;
			data_width = <3 3 0 0>;
		};

		fsmc: flash@b0000000 {
@@ -261,6 +281,9 @@
				#size-cells = <0>;
				interrupts = <0 31 0x4>;
				status = "disabled";
				dmas = <&dwdma0 0x2000 0 0 0>, /* 0x4 << 11 */
					<&dwdma0 0x0280 0 0 0>;  /* 0x5 << 7 */
				dma-names = "tx", "rx";
			};

			rtc@e0580000 {
+0 −5
Original line number Diff line number Diff line
@@ -22,11 +22,6 @@ extern void spear13xx_timer_init(void);
extern void spear3xx_timer_init(void);
extern struct pl022_ssp_controller pl022_plat_data;
extern struct pl08x_platform_data pl080_plat_data;
extern struct dw_dma_platform_data dmac_plat_data;
extern struct dw_dma_slave cf_dma_priv;
extern struct dw_dma_slave nand_read_dma_priv;
extern struct dw_dma_slave nand_write_dma_priv;
bool dw_dma_filter(struct dma_chan *chan, void *slave);

void __init spear_setup_of_timer(void);
void __init spear3xx_clk_init(void __iomem *misc_base,
+0 −2
Original line number Diff line number Diff line
@@ -82,8 +82,6 @@
#define VA_L2CC_BASE				IOMEM(UL(0xFB000000))

/* others */
#define DMAC0_BASE				UL(0xEA800000)
#define DMAC1_BASE				UL(0xEB000000)
#define MCIF_CF_BASE				UL(0xB2800000)

/* Debug uart for linux, will be used for debug and uncompress messages */
+1 −29
Original line number Diff line number Diff line
@@ -23,40 +23,12 @@
#include <mach/spear.h>

/* Base addresses */
#define SPEAR1310_SSP1_BASE			UL(0x5D400000)
#define SPEAR1310_SATA0_BASE			UL(0xB1000000)
#define SPEAR1310_SATA1_BASE			UL(0xB1800000)
#define SPEAR1310_SATA2_BASE			UL(0xB4000000)

#define SPEAR1310_RAS_GRP1_BASE			UL(0xD8000000)
#define VA_SPEAR1310_RAS_GRP1_BASE		UL(0xFA000000)

static struct arasan_cf_pdata cf_pdata = {
	.cf_if_clk = CF_IF_CLK_166M,
	.quirk = CF_BROKEN_UDMA,
	.dma_priv = &cf_dma_priv,
};

/* ssp device registration */
static struct pl022_ssp_controller ssp1_plat_data = {
	.enable_dma = 0,
};

/* Add SPEAr1310 auxdata to pass platform data */
static struct of_dev_auxdata spear1310_auxdata_lookup[] __initdata = {
	OF_DEV_AUXDATA("arasan,cf-spear1340", MCIF_CF_BASE, NULL, &cf_pdata),
	OF_DEV_AUXDATA("snps,dma-spear1340", DMAC0_BASE, NULL, &dmac_plat_data),
	OF_DEV_AUXDATA("snps,dma-spear1340", DMAC1_BASE, NULL, &dmac_plat_data),
	OF_DEV_AUXDATA("arm,pl022", SSP_BASE, NULL, &pl022_plat_data),

	OF_DEV_AUXDATA("arm,pl022", SPEAR1310_SSP1_BASE, NULL, &ssp1_plat_data),
	{}
};

static void __init spear1310_dt_init(void)
{
	of_platform_populate(NULL, of_default_bus_match_table,
			spear1310_auxdata_lookup, NULL);
	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}

static const char * const spear1310_dt_board_compat[] = {
Loading