2 * arch/arm/mach-tegra/board-harmony.c
4 * Copyright (C) 2010 Google, Inc.
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
17 #include <linux/kernel.h>
18 #include <linux/init.h>
19 #include <linux/platform_device.h>
20 #include <linux/serial_8250.h>
21 #include <linux/clk.h>
22 #include <linux/dma-mapping.h>
23 #include <linux/pda_power.h>
26 #include <asm/mach-types.h>
27 #include <asm/mach/arch.h>
28 #include <asm/mach/time.h>
29 #include <asm/setup.h>
31 #include <mach/iomap.h>
32 #include <mach/irqs.h>
35 #include "board-harmony.h"
38 /* NVidia bootloader tags */
39 #define ATAG_NVIDIA 0x41000801
41 #define ATAG_NVIDIA_RM 0x1
42 #define ATAG_NVIDIA_DISPLAY 0x2
43 #define ATAG_NVIDIA_FRAMEBUFFER 0x3
44 #define ATAG_NVIDIA_CHIPSHMOO 0x4
45 #define ATAG_NVIDIA_CHIPSHMOOPHYS 0x5
46 #define ATAG_NVIDIA_PRESERVED_MEM_0 0x10000
47 #define ATAG_NVIDIA_PRESERVED_MEM_N 2
48 #define ATAG_NVIDIA_FORCE_32 0x7fffffff
56 static int __init
parse_tag_nvidia(const struct tag
*tag
)
61 __tagtable(ATAG_NVIDIA
, parse_tag_nvidia
);
63 static struct plat_serial8250_port debug_uart_platform_data
[] = {
65 .membase
= IO_ADDRESS(TEGRA_UARTD_BASE
),
66 .mapbase
= TEGRA_UARTD_BASE
,
68 .flags
= UPF_BOOT_AUTOCONF
,
77 static struct platform_device debug_uart
= {
79 .id
= PLAT8250_DEV_PLATFORM
,
81 .platform_data
= debug_uart_platform_data
,
85 static struct platform_device
*harmony_devices
[] __initdata
= {
89 static void __init
tegra_harmony_fixup(struct machine_desc
*desc
,
90 struct tag
*tags
, char **cmdline
, struct meminfo
*mi
)
93 mi
->bank
[0].start
= PHYS_OFFSET
;
94 mi
->bank
[0].size
= 448 * SZ_1M
;
95 mi
->bank
[1].start
= SZ_512M
;
96 mi
->bank
[1].size
= SZ_512M
;
99 static __initdata
struct tegra_clk_init_table harmony_clk_init_table
[] = {
100 /* name parent rate enabled */
101 { "uartd", "pll_p", 216000000, true },
105 static void __init
tegra_harmony_init(void)
109 tegra_clk_init_from_table(harmony_clk_init_table
);
111 harmony_pinmux_init();
113 platform_add_devices(harmony_devices
, ARRAY_SIZE(harmony_devices
));
116 MACHINE_START(HARMONY
, "harmony")
117 .boot_params
= 0x00000100,
118 .fixup
= tegra_harmony_fixup
,
119 .init_irq
= tegra_init_irq
,
120 .init_machine
= tegra_harmony_init
,
121 .map_io
= tegra_map_common_io
,
122 .timer
= &tegra_timer
,