aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-armadillo800eva.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-13 14:00:00 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-13 14:00:00 -0500
commitfe504c5c745aeb767d978fbedeb94775fd4cb69c (patch)
tree5ebb384972aabf676d8137d95362333193c89f66 /arch/arm/mach-shmobile/board-armadillo800eva.c
parent698d601224824bc1a5bf17f3d86be902e2aabff0 (diff)
parentd7460f4a3d75469deb1c6c028961da69608d02d9 (diff)
Merge tag 'boards2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC board updates, take 2 from Olof Johansson: "This branch contains board updates for shmobile that had dependencies on earlier branches past the first driver branch, and thus are merged separately. Most of these are to enable audio and USB on shmobile. They contain a dependent ASoC branch that has been coordinated with Mark Brown." * tag 'boards2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: shmobile: mackerel: Add FLCTL IRQ resource ARM: shmobile: use FSI driver's audio clock on ap4evb ARM: shmobile: use FSI driver's audio clock on mackerel ARM: shmobile: use FSI driver's audio clock on armadillo800eva ARM: shmobile: mackerel: enable DMAEngine on USB Host ARM: shmobile: marzen: add USB OHCI driver support ARM: shmobile: marzen: add USB EHCI driver support ARM: shmobile: marzen: add USB phy support ASoC: fsi: add master clock control functions ASoC: fsi: care fsi_hw_start/stop() return value ASoC: fsi: fsi_set_master_clk() was called from fsi_hw_xxx() only ASoC: fsi: use devm_request_irq() ASoC: fsi: fixup channels_min/max
Diffstat (limited to 'arch/arm/mach-shmobile/board-armadillo800eva.c')
-rw-r--r--arch/arm/mach-shmobile/board-armadillo800eva.c38
1 files changed, 3 insertions, 35 deletions
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 499e6e376666..5353adf6b828 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -768,32 +768,6 @@ static struct platform_device ceu0_device = {
768}; 768};
769 769
770/* FSI */ 770/* FSI */
771static int fsi_hdmi_set_rate(struct device *dev, int rate, int enable)
772{
773 struct clk *fsib;
774 int ret;
775
776 /* it support 48KHz only */
777 if (48000 != rate)
778 return -EINVAL;
779
780 fsib = clk_get(dev, "ickb");
781 if (IS_ERR(fsib))
782 return -EINVAL;
783
784 if (enable) {
785 ret = SH_FSI_ACKMD_256 | SH_FSI_BPFMD_64;
786 clk_enable(fsib);
787 } else {
788 ret = 0;
789 clk_disable(fsib);
790 }
791
792 clk_put(fsib);
793
794 return ret;
795}
796
797static struct sh_fsi_platform_info fsi_info = { 771static struct sh_fsi_platform_info fsi_info = {
798 /* FSI-WM8978 */ 772 /* FSI-WM8978 */
799 .port_a = { 773 .port_a = {
@@ -802,8 +776,8 @@ static struct sh_fsi_platform_info fsi_info = {
802 /* FSI-HDMI */ 776 /* FSI-HDMI */
803 .port_b = { 777 .port_b = {
804 .flags = SH_FSI_FMT_SPDIF | 778 .flags = SH_FSI_FMT_SPDIF |
805 SH_FSI_ENABLE_STREAM_MODE, 779 SH_FSI_ENABLE_STREAM_MODE |
806 .set_rate = fsi_hdmi_set_rate, 780 SH_FSI_CLK_CPG,
807 .tx_id = SHDMA_SLAVE_FSIB_TX, 781 .tx_id = SHDMA_SLAVE_FSIB_TX,
808 } 782 }
809}; 783};
@@ -938,13 +912,11 @@ static void __init eva_clock_init(void)
938 struct clk *xtal1 = clk_get(NULL, "extal1"); 912 struct clk *xtal1 = clk_get(NULL, "extal1");
939 struct clk *usb24s = clk_get(NULL, "usb24s"); 913 struct clk *usb24s = clk_get(NULL, "usb24s");
940 struct clk *fsibck = clk_get(NULL, "fsibck"); 914 struct clk *fsibck = clk_get(NULL, "fsibck");
941 struct clk *fsib = clk_get(&fsi_device.dev, "ickb");
942 915
943 if (IS_ERR(system) || 916 if (IS_ERR(system) ||
944 IS_ERR(xtal1) || 917 IS_ERR(xtal1) ||
945 IS_ERR(usb24s) || 918 IS_ERR(usb24s) ||
946 IS_ERR(fsibck) || 919 IS_ERR(fsibck)) {
947 IS_ERR(fsib)) {
948 pr_err("armadillo800eva board clock init failed\n"); 920 pr_err("armadillo800eva board clock init failed\n");
949 goto clock_error; 921 goto clock_error;
950 } 922 }
@@ -956,9 +928,7 @@ static void __init eva_clock_init(void)
956 clk_set_parent(usb24s, system); 928 clk_set_parent(usb24s, system);
957 929
958 /* FSIBCK is 12.288MHz, and it is parent of FSI-B */ 930 /* FSIBCK is 12.288MHz, and it is parent of FSI-B */
959 clk_set_parent(fsib, fsibck);
960 clk_set_rate(fsibck, 12288000); 931 clk_set_rate(fsibck, 12288000);
961 clk_set_rate(fsib, 12288000);
962 932
963clock_error: 933clock_error:
964 if (!IS_ERR(system)) 934 if (!IS_ERR(system))
@@ -969,8 +939,6 @@ clock_error:
969 clk_put(usb24s); 939 clk_put(usb24s);
970 if (!IS_ERR(fsibck)) 940 if (!IS_ERR(fsibck))
971 clk_put(fsibck); 941 clk_put(fsibck);
972 if (!IS_ERR(fsib))
973 clk_put(fsib);
974} 942}
975 943
976/* 944/*