[PATCH 16/74] ST SPEAr: adding support for synopsis i2c designware
From: Jean-Christophe PLAGNIOL-VILLARD <hidden>
Date: 2010-09-06 23:12:27
quoted hunk ↗ jump to hunk
diff --git a/arch/arm/mach-spear3xx/clock.c b/arch/arm/mach-spear3xx/clock.c index 147d0a3..ae6c244 100644 --- a/arch/arm/mach-spear3xx/clock.c +++ b/arch/arm/mach-spear3xx/clock.c@@ -460,6 +460,15 @@ static struct clk gpio_clk = { static struct clk dummy_apb_pclk; +#ifdef CONFIG_MACH_SPEAR320 +/* i2c1 clock */ +static struct clk i2c1_clk = { + .flags = ALWAYS_ENABLED, + .pclk = &ahb_clk, + .recalc = &follow_parent, +}; +#endif + /* array of all spear 3xx clock lookups */ static struct clk_lookup spear_clk_lookups[] = { { .con_id = "apb_pclk", .clk = &dummy_apb_pclk},@@ -491,7 +500,7 @@ static struct clk_lookup spear_clk_lookups[] = { { .dev_id = "clcd", .clk = &clcd_clk}, /* clock derived from ahb clk */ { .con_id = "apb_clk", .clk = &apb_clk}, - { .dev_id = "i2c", .clk = &i2c_clk}, + { .dev_id = "i2c_designware.0", .clk = &i2c_clk}, { .dev_id = "dma", .clk = &dma_clk}, { .dev_id = "jpeg", .clk = &jpeg_clk}, { .dev_id = "gmac", .clk = &gmac_clk},@@ -501,6 +510,9 @@ static struct clk_lookup spear_clk_lookups[] = { { .dev_id = "adc", .clk = &adc_clk}, { .dev_id = "ssp", .clk = &ssp_clk}, { .dev_id = "gpio", .clk = &gpio_clk}, +#ifdef CONFIG_MACH_SPEAR320 + { .dev_id = "i2c_designware.1", .clk = &i2c1_clk}, +#endif
how about split this file in 2 one for 320 and one for 310 so we can avoid all this ifdef Best Regards, J.