aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-08-18 05:10:46 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-08-18 05:10:46 -0400
commit323cdfc191b7c1597dc748175062c368568d6af4 (patch)
tree7f4b242501db5498e889cc14054674ef4a7629b9 /drivers
parent5e742ad66b4a8ba6f9d729660f822676d9e405d4 (diff)
[MFD] Add SA11x0 MCP platform device support
Add platform device data for the SA11x0 MCP device. This allows platforms to customise the configuration of the SA11x0 MCP device according to their needs. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/mcp-sa11x0.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c
index 25699fa37fef..e9806fbbe696 100644
--- a/drivers/mfd/mcp-sa11x0.c
+++ b/drivers/mfd/mcp-sa11x0.c
@@ -24,6 +24,7 @@
24#include <asm/hardware.h> 24#include <asm/hardware.h>
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
26#include <asm/system.h> 26#include <asm/system.h>
27#include <asm/arch/mcp.h>
27 28
28#include <asm/arch/assabet.h> 29#include <asm/arch/assabet.h>
29 30
@@ -140,16 +141,11 @@ static struct mcp_ops mcp_sa11x0 = {
140static int mcp_sa11x0_probe(struct device *dev) 141static int mcp_sa11x0_probe(struct device *dev)
141{ 142{
142 struct platform_device *pdev = to_platform_device(dev); 143 struct platform_device *pdev = to_platform_device(dev);
144 struct mcp_plat_data *data = pdev->dev.platform_data;
143 struct mcp *mcp; 145 struct mcp *mcp;
144 int ret; 146 int ret;
145 147
146 if (!machine_is_adsbitsy() && !machine_is_assabet() && 148 if (!data)
147 !machine_is_cerf() && !machine_is_flexanet() &&
148 !machine_is_freebird() && !machine_is_graphicsclient() &&
149 !machine_is_graphicsmaster() && !machine_is_lart() &&
150 !machine_is_omnimeter() && !machine_is_pfs168() &&
151 !machine_is_shannon() && !machine_is_simpad() &&
152 !machine_is_yopy())
153 return -ENODEV; 149 return -ENODEV;
154 150
155 if (!request_mem_region(0x80060000, 0x60, "sa11x0-mcp")) 151 if (!request_mem_region(0x80060000, 0x60, "sa11x0-mcp"))
@@ -163,7 +159,7 @@ static int mcp_sa11x0_probe(struct device *dev)
163 159
164 mcp->owner = THIS_MODULE; 160 mcp->owner = THIS_MODULE;
165 mcp->ops = &mcp_sa11x0; 161 mcp->ops = &mcp_sa11x0;
166 mcp->sclk_rate = 11981000, 162 mcp->sclk_rate = data->sclk_rate;
167 mcp->dma_audio_rd = DMA_Ser4MCP0Rd; 163 mcp->dma_audio_rd = DMA_Ser4MCP0Rd;
168 mcp->dma_audio_wr = DMA_Ser4MCP0Wr; 164 mcp->dma_audio_wr = DMA_Ser4MCP0Wr;
169 mcp->dma_telco_rd = DMA_Ser4MCP1Rd; 165 mcp->dma_telco_rd = DMA_Ser4MCP1Rd;
@@ -184,9 +180,13 @@ static int mcp_sa11x0_probe(struct device *dev)
184 PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); 180 PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);
185 PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); 181 PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM);
186 182
183 /*
184 * Initialise device. Note that we initially
185 * set the sampling rate to minimum.
186 */
187 Ser4MCSR = -1; 187 Ser4MCSR = -1;
188 Ser4MCCR1 = 0; 188 Ser4MCCR1 = data->mccr1;
189 Ser4MCCR0 = 0x00007f7f | MCCR0_ADM; 189 Ser4MCCR0 = data->mccr0 | 0x7f7f;
190 190
191 /* 191 /*
192 * Calculate the read/write timeout (us) from the bit clock 192 * Calculate the read/write timeout (us) from the bit clock