rk3026: i2s add several attempts to double confirm i2s frac effect
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-rk3188 / board-rk3188-ft.c
1 /*\r
2  *\r
3  * Copyright (C) 2013 ROCKCHIP, Inc.\r
4  *\r
5  * This software is licensed under the terms of the GNU General Public\r
6  * License version 2, as published by the Free Software Foundation, and\r
7  * may be copied, distributed, and modified under those terms.\r
8  *\r
9  * This program is distributed in the hope that it will be useful,\r
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
12  * GNU General Public License for more details.\r
13  *\r
14  */\r
15 \r
16 #include <linux/kernel.h>\r
17 #include <linux/init.h>\r
18 #include <linux/io.h>\r
19 #include <linux/delay.h>\r
20 #include <linux/clk.h>\r
21 \r
22 #include <asm/mach-types.h>\r
23 #include <asm/mach/arch.h>\r
24 \r
25 #include <mach/board.h>\r
26 #include <mach/gpio.h>\r
27 \r
28 #define FT\r
29 \r
30 #ifdef FT\r
31 #define CONSOLE_LOGLEVEL 2\r
32 #define ARM_PLL_MHZ (552)\r
33 #else\r
34 #define CONSOLE_LOGLEVEL 9\r
35 #define ARM_PLL_MHZ (816)\r
36 #endif\r
37 \r
38 static void __init machine_rk30_board_init(void)\r
39 {\r
40         console_loglevel = CONSOLE_LOGLEVEL;\r
41 }\r
42 \r
43 #define ft_printk(fmt, arg...) \\r
44         printk(KERN_EMERG fmt, ##arg)\r
45 unsigned long __init ft_test_init_arm_rate(void);\r
46 \r
47 void __init board_clock_init(void)\r
48 {\r
49         rk30_clock_data_init(periph_pll_default, codec_pll_default, RK30_CLOCKS_DEFAULT_FLAGS);\r
50         clk_set_rate(clk_get(NULL, "cpu"), ft_test_init_arm_rate());\r
51         preset_lpj = loops_per_jiffy;\r
52 }\r
53 \r
54 static void __init ft_fixup(struct machine_desc *desc, struct tag *tags,\r
55                         char **cmdline, struct meminfo *mi)\r
56 {\r
57         mi->nr_banks = 1;\r
58         mi->bank[0].start = PLAT_PHYS_OFFSET;\r
59         mi->bank[0].size = SZ_1G;\r
60 }\r
61 \r
62 MACHINE_START(RK30, "RK30board")\r
63         .boot_params    = PLAT_PHYS_OFFSET + 0x800,\r
64         .fixup          = ft_fixup,\r
65         .map_io         = rk30_map_io,\r
66         .init_irq       = rk30_init_irq,\r
67         .timer          = &rk30_timer,\r
68         .init_machine   = machine_rk30_board_init,\r
69 MACHINE_END\r
70 \r