aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorThomas Abraham <thomas.abraham@linaro.org>2011-10-24 08:01:03 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-12-22 20:07:07 -0500
commit66fdb29d370436ca43a0637f831a2b4d92b243ca (patch)
tree2e858f07c2302e47f3b7609d567acb3101279ef2 /arch
parentfca3de6ab9bfc6f3b5beebd8f9792357c4e4d441 (diff)
ARM: EXYNOS: Add a alias for pdma clocks
PDMA controllers when instantiated from device tree are registered using amba_device_register(). The registration process enables clock to the controllers to read the peripheral id of the PDMA amba device. In case of Exynos4, the clocks to the PDMA controllers are named as 'dma' but amba_device_register() looks up the clock using the name 'apb_pclk'. Hence, alias clocks with name 'apb_pclk' clock are created for clocks with name 'dma'. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-exynos/clock.c35
1 files changed, 25 insertions, 10 deletions
diff --git a/arch/arm/mach-exynos/clock.c b/arch/arm/mach-exynos/clock.c
index fe1851914dac..7dee8694486a 100644
--- a/arch/arm/mach-exynos/clock.c
+++ b/arch/arm/mach-exynos/clock.c
@@ -553,16 +553,6 @@ static struct clk init_clocks_off[] = {
553 .enable = exynos4_clk_dac_ctrl, 553 .enable = exynos4_clk_dac_ctrl,
554 .ctrlbit = (1 << 0), 554 .ctrlbit = (1 << 0),
555 }, { 555 }, {
556 .name = "dma",
557 .devname = "dma-pl330.0",
558 .enable = exynos4_clk_ip_fsys_ctrl,
559 .ctrlbit = (1 << 0),
560 }, {
561 .name = "dma",
562 .devname = "dma-pl330.1",
563 .enable = exynos4_clk_ip_fsys_ctrl,
564 .ctrlbit = (1 << 1),
565 }, {
566 .name = "adc", 556 .name = "adc",
567 .enable = exynos4_clk_ip_peril_ctrl, 557 .enable = exynos4_clk_ip_peril_ctrl,
568 .ctrlbit = (1 << 15), 558 .ctrlbit = (1 << 15),
@@ -778,6 +768,20 @@ static struct clk init_clocks[] = {
778 } 768 }
779}; 769};
780 770
771static struct clk clk_pdma0 = {
772 .name = "dma",
773 .devname = "dma-pl330.0",
774 .enable = exynos4_clk_ip_fsys_ctrl,
775 .ctrlbit = (1 << 0),
776};
777
778static struct clk clk_pdma1 = {
779 .name = "dma",
780 .devname = "dma-pl330.1",
781 .enable = exynos4_clk_ip_fsys_ctrl,
782 .ctrlbit = (1 << 1),
783};
784
781struct clk *clkset_group_list[] = { 785struct clk *clkset_group_list[] = {
782 [0] = &clk_ext_xtal_mux, 786 [0] = &clk_ext_xtal_mux,
783 [1] = &clk_xusbxti, 787 [1] = &clk_xusbxti,
@@ -1279,6 +1283,11 @@ static struct clksrc_clk *sysclks[] = {
1279 &clk_mout_mfc1, 1283 &clk_mout_mfc1,
1280}; 1284};
1281 1285
1286static struct clk *clk_cdev[] = {
1287 &clk_pdma0,
1288 &clk_pdma1,
1289};
1290
1282static struct clksrc_clk *clksrc_cdev[] = { 1291static struct clksrc_clk *clksrc_cdev[] = {
1283 &clk_sclk_uart0, 1292 &clk_sclk_uart0,
1284 &clk_sclk_uart1, 1293 &clk_sclk_uart1,
@@ -1291,6 +1300,8 @@ static struct clk_lookup exynos4_clk_lookup[] = {
1291 CLKDEV_INIT("exynos4210-uart.1", "clk_uart_baud0", &clk_sclk_uart1.clk), 1300 CLKDEV_INIT("exynos4210-uart.1", "clk_uart_baud0", &clk_sclk_uart1.clk),
1292 CLKDEV_INIT("exynos4210-uart.2", "clk_uart_baud0", &clk_sclk_uart2.clk), 1301 CLKDEV_INIT("exynos4210-uart.2", "clk_uart_baud0", &clk_sclk_uart2.clk),
1293 CLKDEV_INIT("exynos4210-uart.3", "clk_uart_baud0", &clk_sclk_uart3.clk), 1302 CLKDEV_INIT("exynos4210-uart.3", "clk_uart_baud0", &clk_sclk_uart3.clk),
1303 CLKDEV_INIT("dma-pl330.0", "apb_pclk", &clk_pdma0),
1304 CLKDEV_INIT("dma-pl330.1", "apb_pclk", &clk_pdma1),
1294}; 1305};
1295 1306
1296static int xtal_rate; 1307static int xtal_rate;
@@ -1506,6 +1517,10 @@ void __init exynos4_register_clocks(void)
1506 s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); 1517 s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs));
1507 s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); 1518 s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks));
1508 1519
1520 s3c24xx_register_clocks(clk_cdev, ARRAY_SIZE(clk_cdev));
1521 for (ptr = 0; ptr < ARRAY_SIZE(clk_cdev); ptr++)
1522 s3c_disable_clocks(clk_cdev[ptr], 1);
1523
1509 s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); 1524 s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
1510 s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); 1525 s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
1511 clkdev_add_table(exynos4_clk_lookup, ARRAY_SIZE(exynos4_clk_lookup)); 1526 clkdev_add_table(exynos4_clk_lookup, ARRAY_SIZE(exynos4_clk_lookup));