aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-12-13 03:28:43 -0500
committerTakashi Iwai <tiwai@suse.de>2010-12-13 03:28:43 -0500
commit20aeeb356ba2e8daa99b5942c528ae2b3ea28433 (patch)
treed2cebc7039954851998d592123899f5627def7a9 /arch/sh/boards
parent07a9e2b2fbdda631eeff54e4b8ebcaaea71be538 (diff)
parent5b84ba26a9672e615897234fa5efd3eea2d6b295 (diff)
Merge branch 'topic/workq-update' into topic/asoc
Conflicts: sound/soc/codecs/wm8350.c sound/soc/codecs/wm8753.c sound/soc/sh/fsi.c sound/soc/soc-core.c
Diffstat (limited to 'arch/sh/boards')
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c34
-rw-r--r--arch/sh/boards/mach-se/7724/setup.c47
2 files changed, 11 insertions, 70 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index 2eaeb9e59585..f48c492a68d3 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -720,32 +720,6 @@ static struct platform_device camera_devices[] = {
720}; 720};
721 721
722/* FSI */ 722/* FSI */
723/*
724 * FSI-B use external clock which came from da7210.
725 * So, we should change parent of fsi
726 */
727#define FCLKBCR 0xa415000c
728static void fsimck_init(struct clk *clk)
729{
730 u32 status = __raw_readl(clk->enable_reg);
731
732 /* use external clock */
733 status &= ~0x000000ff;
734 status |= 0x00000080;
735
736 __raw_writel(status, clk->enable_reg);
737}
738
739static struct clk_ops fsimck_clk_ops = {
740 .init = fsimck_init,
741};
742
743static struct clk fsimckb_clk = {
744 .ops = &fsimck_clk_ops,
745 .enable_reg = (void __iomem *)FCLKBCR,
746 .rate = 0, /* unknown */
747};
748
749static struct sh_fsi_platform_info fsi_info = { 723static struct sh_fsi_platform_info fsi_info = {
750 .portb_flags = SH_FSI_BRS_INV | 724 .portb_flags = SH_FSI_BRS_INV |
751 SH_FSI_OUT_SLAVE_MODE | 725 SH_FSI_OUT_SLAVE_MODE |
@@ -1264,10 +1238,10 @@ static int __init arch_setup(void)
1264 /* change parent of FSI B */ 1238 /* change parent of FSI B */
1265 clk = clk_get(NULL, "fsib_clk"); 1239 clk = clk_get(NULL, "fsib_clk");
1266 if (!IS_ERR(clk)) { 1240 if (!IS_ERR(clk)) {
1267 clk_register(&fsimckb_clk); 1241 /* 48kHz dummy clock was used to make sure 1/1 divide */
1268 clk_set_parent(clk, &fsimckb_clk); 1242 clk_set_rate(&sh7724_fsimckb_clk, 48000);
1269 clk_set_rate(clk, 11000); 1243 clk_set_parent(clk, &sh7724_fsimckb_clk);
1270 clk_set_rate(&fsimckb_clk, 11000); 1244 clk_set_rate(clk, 48000);
1271 clk_put(clk); 1245 clk_put(clk);
1272 } 1246 }
1273 1247
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
index dff89d0fa20f..b710757c33c3 100644
--- a/arch/sh/boards/mach-se/7724/setup.c
+++ b/arch/sh/boards/mach-se/7724/setup.c
@@ -283,31 +283,6 @@ static struct platform_device ceu1_device = {
283}; 283};
284 284
285/* FSI */ 285/* FSI */
286/*
287 * FSI-A use external clock which came from ak464x.
288 * So, we should change parent of fsi
289 */
290#define FCLKACR 0xa4150008
291static void fsimck_init(struct clk *clk)
292{
293 u32 status = __raw_readl(clk->enable_reg);
294
295 /* use external clock */
296 status &= ~0x000000ff;
297 status |= 0x00000080;
298 __raw_writel(status, clk->enable_reg);
299}
300
301static struct clk_ops fsimck_clk_ops = {
302 .init = fsimck_init,
303};
304
305static struct clk fsimcka_clk = {
306 .ops = &fsimck_clk_ops,
307 .enable_reg = (void __iomem *)FCLKACR,
308 .rate = 0, /* unknown */
309};
310
311/* change J20, J21, J22 pin to 1-2 connection to use slave mode */ 286/* change J20, J21, J22 pin to 1-2 connection to use slave mode */
312static struct sh_fsi_platform_info fsi_info = { 287static struct sh_fsi_platform_info fsi_info = {
313 .porta_flags = SH_FSI_BRS_INV | 288 .porta_flags = SH_FSI_BRS_INV |
@@ -857,37 +832,29 @@ static int __init devices_setup(void)
857 gpio_request(GPIO_FN_KEYOUT0, NULL); 832 gpio_request(GPIO_FN_KEYOUT0, NULL);
858 833
859 /* enable FSI */ 834 /* enable FSI */
860 gpio_request(GPIO_FN_FSIMCKB, NULL);
861 gpio_request(GPIO_FN_FSIMCKA, NULL); 835 gpio_request(GPIO_FN_FSIMCKA, NULL);
836 gpio_request(GPIO_FN_FSIIASD, NULL);
862 gpio_request(GPIO_FN_FSIOASD, NULL); 837 gpio_request(GPIO_FN_FSIOASD, NULL);
863 gpio_request(GPIO_FN_FSIIABCK, NULL); 838 gpio_request(GPIO_FN_FSIIABCK, NULL);
864 gpio_request(GPIO_FN_FSIIALRCK, NULL); 839 gpio_request(GPIO_FN_FSIIALRCK, NULL);
865 gpio_request(GPIO_FN_FSIOABCK, NULL); 840 gpio_request(GPIO_FN_FSIOABCK, NULL);
866 gpio_request(GPIO_FN_FSIOALRCK, NULL); 841 gpio_request(GPIO_FN_FSIOALRCK, NULL);
867 gpio_request(GPIO_FN_CLKAUDIOAO, NULL); 842 gpio_request(GPIO_FN_CLKAUDIOAO, NULL);
868 gpio_request(GPIO_FN_FSIIBSD, NULL);
869 gpio_request(GPIO_FN_FSIOBSD, NULL);
870 gpio_request(GPIO_FN_FSIIBBCK, NULL);
871 gpio_request(GPIO_FN_FSIIBLRCK, NULL);
872 gpio_request(GPIO_FN_FSIOBBCK, NULL);
873 gpio_request(GPIO_FN_FSIOBLRCK, NULL);
874 gpio_request(GPIO_FN_CLKAUDIOBO, NULL);
875 gpio_request(GPIO_FN_FSIIASD, NULL);
876 843
877 /* set SPU2 clock to 83.4 MHz */ 844 /* set SPU2 clock to 83.4 MHz */
878 clk = clk_get(NULL, "spu_clk"); 845 clk = clk_get(NULL, "spu_clk");
879 if (clk) { 846 if (!IS_ERR(clk)) {
880 clk_set_rate(clk, clk_round_rate(clk, 83333333)); 847 clk_set_rate(clk, clk_round_rate(clk, 83333333));
881 clk_put(clk); 848 clk_put(clk);
882 } 849 }
883 850
884 /* change parent of FSI A */ 851 /* change parent of FSI A */
885 clk = clk_get(NULL, "fsia_clk"); 852 clk = clk_get(NULL, "fsia_clk");
886 if (clk) { 853 if (!IS_ERR(clk)) {
887 clk_register(&fsimcka_clk); 854 /* 48kHz dummy clock was used to make sure 1/1 divide */
888 clk_set_parent(clk, &fsimcka_clk); 855 clk_set_rate(&sh7724_fsimcka_clk, 48000);
889 clk_set_rate(clk, 11000); 856 clk_set_parent(clk, &sh7724_fsimcka_clk);
890 clk_set_rate(&fsimcka_clk, 11000); 857 clk_set_rate(clk, 48000);
891 clk_put(clk); 858 clk_put(clk);
892 } 859 }
893 860