aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-spear/spear1340.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-01-28 16:48:47 -0500
committerArnd Bergmann <arnd@arndb.de>2013-03-12 13:02:06 -0400
commit6e8887f60f6038e822462ff815b30074af62b847 (patch)
treea8df11ca5021d06e213d29a1dbc06599a3ce0d15 /arch/arm/mach-spear/spear1340.c
parent1ef865bb4578a42d1a2ac9c0a854d9da4f8e048e (diff)
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: Arnd 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
Diffstat (limited to 'arch/arm/mach-spear/spear1340.c')
-rw-r--r--arch/arm/mach-spear/spear1340.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/arch/arm/mach-spear/spear1340.c b/arch/arm/mach-spear/spear1340.c
index 75e38644bbfb..a04a7fe76f71 100644
--- a/arch/arm/mach-spear/spear1340.c
+++ b/arch/arm/mach-spear/spear1340.c
@@ -16,18 +16,16 @@
16#include <linux/ahci_platform.h> 16#include <linux/ahci_platform.h>
17#include <linux/amba/serial.h> 17#include <linux/amba/serial.h>
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/dw_dmac.h>
20#include <linux/of_platform.h> 19#include <linux/of_platform.h>
21#include <linux/irqchip.h> 20#include <linux/irqchip.h>
22#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
23#include "generic.h" 22#include "generic.h"
24#include <mach/spear.h> 23#include <mach/spear.h>
25 24
26#include "spear13xx-dma.h" 25/* FIXME: Move SATA PHY code into a standalone driver */
27 26
28/* Base addresses */ 27/* Base addresses */
29#define SPEAR1340_SATA_BASE UL(0xB1000000) 28#define SPEAR1340_SATA_BASE UL(0xB1000000)
30#define SPEAR1340_UART1_BASE UL(0xB4100000)
31 29
32/* Power Management Registers */ 30/* Power Management Registers */
33#define SPEAR1340_PCM_CFG (VA_MISC_BASE + 0x100) 31#define SPEAR1340_PCM_CFG (VA_MISC_BASE + 0x100)
@@ -79,28 +77,6 @@
79 (SPEAR1340_MIPHY_OSC_BYPASS_EXT | \ 77 (SPEAR1340_MIPHY_OSC_BYPASS_EXT | \
80 SPEAR1340_MIPHY_PLL_RATIO_TOP(25)) 78 SPEAR1340_MIPHY_PLL_RATIO_TOP(25))
81 79
82static struct dw_dma_slave uart1_dma_param[] = {
83 {
84 /* Tx */
85 .cfg_hi = DWC_CFGH_DST_PER(SPEAR1340_DMA_REQ_UART1_TX),
86 .cfg_lo = 0,
87 .src_master = DMA_MASTER_MEMORY,
88 .dst_master = SPEAR1340_DMA_MASTER_UART1,
89 }, {
90 /* Rx */
91 .cfg_hi = DWC_CFGH_SRC_PER(SPEAR1340_DMA_REQ_UART1_RX),
92 .cfg_lo = 0,
93 .src_master = SPEAR1340_DMA_MASTER_UART1,
94 .dst_master = DMA_MASTER_MEMORY,
95 }
96};
97
98static struct amba_pl011_data uart1_data = {
99 .dma_filter = dw_dma_filter,
100 .dma_tx_param = &uart1_dma_param[0],
101 .dma_rx_param = &uart1_dma_param[1],
102};
103
104/* SATA device registration */ 80/* SATA device registration */
105static int sata_miphy_init(struct device *dev, void __iomem *addr) 81static int sata_miphy_init(struct device *dev, void __iomem *addr)
106{ 82{
@@ -159,14 +135,8 @@ static struct ahci_platform_data sata_pdata = {
159 135
160/* Add SPEAr1340 auxdata to pass platform data */ 136/* Add SPEAr1340 auxdata to pass platform data */
161static struct of_dev_auxdata spear1340_auxdata_lookup[] __initdata = { 137static struct of_dev_auxdata spear1340_auxdata_lookup[] __initdata = {
162 OF_DEV_AUXDATA("arasan,cf-spear1340", MCIF_CF_BASE, NULL, &cf_dma_priv),
163 OF_DEV_AUXDATA("snps,dma-spear1340", DMAC0_BASE, NULL, &dmac_plat_data),
164 OF_DEV_AUXDATA("snps,dma-spear1340", DMAC1_BASE, NULL, &dmac_plat_data),
165 OF_DEV_AUXDATA("arm,pl022", SSP_BASE, NULL, &pl022_plat_data),
166
167 OF_DEV_AUXDATA("snps,spear-ahci", SPEAR1340_SATA_BASE, NULL, 138 OF_DEV_AUXDATA("snps,spear-ahci", SPEAR1340_SATA_BASE, NULL,
168 &sata_pdata), 139 &sata_pdata),
169 OF_DEV_AUXDATA("arm,pl011", SPEAR1340_UART1_BASE, NULL, &uart1_data),
170 {} 140 {}
171}; 141};
172 142