diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2010-10-14 03:00:42 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-10-25 03:06:50 -0400 |
commit | 6c29e71c61d8d35060594d89f33c13e0da469d7c (patch) | |
tree | c032890facf7444c9a94670ae35580b33fb0affb /arch/arm | |
parent | 5112267e3f9af59e1439707cfe347cc8111d407a (diff) |
ARM: S5PV210: Add init code of audio to Goni and Auqila board
This patch add initialization code of audio and I2S platform drivers
to Goni and Aquila board.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-s5pv210/mach-aquila.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/mach-goni.c | 11 |
2 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c index b0974929dec7..cd441ef35bec 100644 --- a/arch/arm/mach-s5pv210/mach-aquila.c +++ b/arch/arm/mach-s5pv210/mach-aquila.c | |||
@@ -507,8 +507,31 @@ static struct platform_device *aquila_devices[] __initdata = { | |||
507 | &s5p_device_fimc0, | 507 | &s5p_device_fimc0, |
508 | &s5p_device_fimc1, | 508 | &s5p_device_fimc1, |
509 | &s5p_device_fimc2, | 509 | &s5p_device_fimc2, |
510 | &s5pv210_device_iis0, | ||
510 | }; | 511 | }; |
511 | 512 | ||
513 | static void __init aquila_sound_init(void) | ||
514 | { | ||
515 | unsigned int gpio; | ||
516 | |||
517 | /* CODEC_XTAL_EN | ||
518 | * | ||
519 | * The Aquila board have a oscillator which provide main clock | ||
520 | * to WM8994 codec. The oscillator provide 24MHz clock to WM8994 | ||
521 | * clock. Set gpio setting of "CODEC_XTAL_EN" to enable a oscillator. | ||
522 | * */ | ||
523 | gpio = S5PV210_GPH3(2); /* XEINT_26 */ | ||
524 | gpio_request(gpio, "CODEC_XTAL_EN"); | ||
525 | s3c_gpio_cfgpin(gpio, S3C_GPIO_OUTPUT); | ||
526 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
527 | |||
528 | /* Ths main clock of WM8994 codec uses the output of CLKOUT pin. | ||
529 | * The CLKOUT[9:8] set to 0x3(XUSBXTI) of 0xE010E000(OTHERS) | ||
530 | * because it needs 24MHz clock to operate WM8994 codec. | ||
531 | */ | ||
532 | __raw_writel(__raw_readl(S5P_OTHERS) | (0x3 << 8), S5P_OTHERS); | ||
533 | } | ||
534 | |||
512 | static void __init aquila_map_io(void) | 535 | static void __init aquila_map_io(void) |
513 | { | 536 | { |
514 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | 537 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); |
@@ -530,6 +553,7 @@ static void __init aquila_machine_init(void) | |||
530 | s3c_fimc_setname(2, "s5p-fimc"); | 553 | s3c_fimc_setname(2, "s5p-fimc"); |
531 | 554 | ||
532 | /* SOUND */ | 555 | /* SOUND */ |
556 | aquila_sound_init(); | ||
533 | i2c_register_board_info(AP_I2C_GPIO_BUS_5, i2c_gpio5_devs, | 557 | i2c_register_board_info(AP_I2C_GPIO_BUS_5, i2c_gpio5_devs, |
534 | ARRAY_SIZE(i2c_gpio5_devs)); | 558 | ARRAY_SIZE(i2c_gpio5_devs)); |
535 | 559 | ||
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index 54d80f3fd5d0..a857446f153e 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c | |||
@@ -676,12 +676,22 @@ static struct platform_device *goni_devices[] __initdata = { | |||
676 | &s3c_device_hsmmc0, | 676 | &s3c_device_hsmmc0, |
677 | &s3c_device_hsmmc1, | 677 | &s3c_device_hsmmc1, |
678 | &s3c_device_hsmmc2, | 678 | &s3c_device_hsmmc2, |
679 | &s5pv210_device_iis0, | ||
679 | &s3c_device_usb_hsotg, | 680 | &s3c_device_usb_hsotg, |
680 | &samsung_device_keypad, | 681 | &samsung_device_keypad, |
681 | &s3c_device_i2c1, | 682 | &s3c_device_i2c1, |
682 | &s3c_device_i2c2, | 683 | &s3c_device_i2c2, |
683 | }; | 684 | }; |
684 | 685 | ||
686 | static void __init goni_sound_init(void) | ||
687 | { | ||
688 | /* Ths main clock of WM8994 codec uses the output of CLKOUT pin. | ||
689 | * The CLKOUT[9:8] set to 0x3(XUSBXTI) of 0xE010E000(OTHERS) | ||
690 | * because it needs 24MHz clock to operate WM8994 codec. | ||
691 | */ | ||
692 | __raw_writel(__raw_readl(S5P_OTHERS) | (0x3 << 8), S5P_OTHERS); | ||
693 | } | ||
694 | |||
685 | static void __init goni_map_io(void) | 695 | static void __init goni_map_io(void) |
686 | { | 696 | { |
687 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | 697 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); |
@@ -713,6 +723,7 @@ static void __init goni_machine_init(void) | |||
713 | goni_setup_sdhci(); | 723 | goni_setup_sdhci(); |
714 | 724 | ||
715 | /* SOUND */ | 725 | /* SOUND */ |
726 | goni_sound_init(); | ||
716 | i2c_register_board_info(AP_I2C_GPIO_BUS_5, i2c_gpio5_devs, | 727 | i2c_register_board_info(AP_I2C_GPIO_BUS_5, i2c_gpio5_devs, |
717 | ARRAY_SIZE(i2c_gpio5_devs)); | 728 | ARRAY_SIZE(i2c_gpio5_devs)); |
718 | 729 | ||