aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2011-05-15 07:32:45 -0400
committerNicolas Pitre <nico@fluxnic.net>2011-05-16 15:08:36 -0400
commitaac7ffa3ed121846b61347028828617c5dd1ce46 (patch)
treeec2590692fef62fe4df9dc772e2552bb17e50892 /arch/arm/mach-orion5x
parent7e3819d820c9aa3536d15fe7310c054bef1f5f04 (diff)
ARM: orion: Consolidate I2C initialization.
Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Diffstat (limited to 'arch/arm/mach-orion5x')
-rw-r--r--arch/arm/mach-orion5x/common.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 0a1c7600004e..9af0b88573ae 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -169,37 +169,10 @@ void __init orion5x_eth_switch_init(struct dsa_platform_data *d, int irq)
169/***************************************************************************** 169/*****************************************************************************
170 * I2C 170 * I2C
171 ****************************************************************************/ 171 ****************************************************************************/
172static struct mv64xxx_i2c_pdata orion5x_i2c_pdata = {
173 .freq_m = 8, /* assumes 166 MHz TCLK */
174 .freq_n = 3,
175 .timeout = 1000, /* Default timeout of 1 second */
176};
177
178static struct resource orion5x_i2c_resources[] = {
179 {
180 .start = I2C_PHYS_BASE,
181 .end = I2C_PHYS_BASE + 0x1f,
182 .flags = IORESOURCE_MEM,
183 }, {
184 .start = IRQ_ORION5X_I2C,
185 .end = IRQ_ORION5X_I2C,
186 .flags = IORESOURCE_IRQ,
187 },
188};
189
190static struct platform_device orion5x_i2c = {
191 .name = MV64XXX_I2C_CTLR_NAME,
192 .id = 0,
193 .num_resources = ARRAY_SIZE(orion5x_i2c_resources),
194 .resource = orion5x_i2c_resources,
195 .dev = {
196 .platform_data = &orion5x_i2c_pdata,
197 },
198};
199
200void __init orion5x_i2c_init(void) 172void __init orion5x_i2c_init(void)
201{ 173{
202 platform_device_register(&orion5x_i2c); 174 orion_i2c_init(I2C_PHYS_BASE, IRQ_ORION5X_I2C, 8);
175
203} 176}
204 177
205 178