Furquan Shaikh | 732b83e | 2014-06-09 13:20:04 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright 2014 Google Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 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. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | #include <arch/exception.h> |
| 21 | #include <arch/hlt.h> |
| 22 | #include <bootblock_common.h> |
| 23 | #include <cbfs.h> |
| 24 | #include <console/console.h> |
| 25 | #include <soc/clock.h> |
| 26 | #include <soc/nvidia/tegra/apbmisc.h> |
| 27 | |
| 28 | #include "pinmux.h" |
| 29 | #include "power.h" |
| 30 | |
| 31 | void main(void) |
| 32 | { |
| 33 | // enable pinmux clamp inputs |
| 34 | clamp_tristate_inputs(); |
| 35 | |
| 36 | // enable JTAG at the earliest stage |
| 37 | enable_jtag(); |
| 38 | |
| 39 | clock_early_uart(); |
| 40 | |
| 41 | // Serial out, tristate off. |
| 42 | pinmux_set_config(PINMUX_KB_ROW9_INDEX, PINMUX_KB_ROW9_FUNC_UA3); |
| 43 | // Serial in, tristate_on. |
| 44 | pinmux_set_config(PINMUX_KB_ROW10_INDEX, PINMUX_KB_ROW10_FUNC_UA3 | |
| 45 | PINMUX_PULL_UP | |
| 46 | PINMUX_INPUT_ENABLE); |
| 47 | // Mux some pins away from uart A. |
| 48 | pinmux_set_config(PINMUX_UART2_CTS_N_INDEX, |
| 49 | PINMUX_UART2_CTS_N_FUNC_UB3 | |
| 50 | PINMUX_INPUT_ENABLE); |
| 51 | pinmux_set_config(PINMUX_UART2_RTS_N_INDEX, |
| 52 | PINMUX_UART2_RTS_N_FUNC_UB3); |
| 53 | |
| 54 | if (CONFIG_BOOTBLOCK_CONSOLE) { |
| 55 | console_init(); |
| 56 | exception_init(); |
| 57 | printk(BIOS_INFO, "Tegra132: Bootblock here\n"); |
| 58 | } |
Furquan Shaikh | 29c1afc | 2014-06-24 15:24:22 -0700 | [diff] [blame^] | 59 | |
| 60 | clock_init(); |
| 61 | |
| 62 | while(1); |
Furquan Shaikh | 732b83e | 2014-06-09 13:20:04 -0700 | [diff] [blame] | 63 | } |