3 * Copyright (C) 2013 ROCKCHIP, Inc.
\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
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
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
22 #include <asm/mach-types.h>
\r
23 #include <asm/mach/arch.h>
\r
25 #include <mach/board.h>
\r
26 #include <mach/gpio.h>
\r
31 #define CONSOLE_LOGLEVEL 9
\r
32 #define ARM_PLL_MHZ (312)
\r
34 #define CONSOLE_LOGLEVEL 9
\r
35 #define ARM_PLL_MHZ (816)
\r
38 static void __init machine_rk2928_board_init(void)
\r
40 console_loglevel = CONSOLE_LOGLEVEL;
\r
43 #define ft_printk(fmt, arg...) \
\r
44 printk(KERN_EMERG fmt, ##arg)
\r
46 void __init board_clock_init(void)
\r
48 rk2928_clock_data_init(periph_pll_default, codec_pll_default, RK30_CLOCKS_DEFAULT_FLAGS);
\r
49 clk_set_rate(clk_get(NULL, "cpu"), ARM_PLL_MHZ * 1000 * 1000);
\r
50 preset_lpj = loops_per_jiffy;
\r
53 static void __init ft_fixup(struct machine_desc *desc, struct tag *tags,
\r
54 char **cmdline, struct meminfo *mi)
\r
57 mi->bank[0].start = PLAT_PHYS_OFFSET;
\r
58 mi->bank[0].size = SZ_512M;
\r
61 MACHINE_START(RK30, "RK30board")
\r
62 .boot_params = PLAT_PHYS_OFFSET + 0x800,
\r
64 .map_io = rk2928_map_io,
\r
65 .init_irq = rk2928_init_irq,
\r
66 .timer = &rk2928_timer,
\r
67 .init_machine = machine_rk2928_board_init,
\r