Chandan Nath | 98b036e | 2011-10-14 02:58:24 +0000 | [diff] [blame] | 1 | /* |
| 2 | * sys_proto.h |
| 3 | * |
| 4 | * System information header |
| 5 | * |
| 6 | * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/ |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License as |
| 10 | * published by the Free Software Foundation; either version 2 of |
| 11 | * the License, or (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | */ |
| 18 | |
| 19 | #ifndef _SYS_PROTO_H_ |
| 20 | #define _SYS_PROTO_H_ |
| 21 | |
Tom Rini | 7a24772 | 2012-07-31 10:50:01 -0700 | [diff] [blame] | 22 | /* |
| 23 | * AM335x parts define a system EEPROM that defines certain sub-fields. |
| 24 | * We use these fields to in turn see what board we are on, and what |
| 25 | * that might require us to set or not set. |
| 26 | */ |
| 27 | #define HDR_NO_OF_MAC_ADDR 3 |
| 28 | #define HDR_ETH_ALEN 6 |
| 29 | #define HDR_NAME_LEN 8 |
| 30 | |
| 31 | struct am335x_baseboard_id { |
| 32 | unsigned int magic; |
| 33 | char name[HDR_NAME_LEN]; |
| 34 | char version[4]; |
| 35 | char serial[12]; |
| 36 | char config[32]; |
| 37 | char mac_addr[HDR_NO_OF_MAC_ADDR][HDR_ETH_ALEN]; |
| 38 | }; |
| 39 | |
Chandan Nath | 98b036e | 2011-10-14 02:58:24 +0000 | [diff] [blame] | 40 | #define BOARD_REV_ID 0x0 |
Chandan Nath | 98b036e | 2011-10-14 02:58:24 +0000 | [diff] [blame] | 41 | |
| 42 | u32 get_cpu_rev(void); |
| 43 | u32 get_sysboot_value(void); |
| 44 | |
| 45 | #ifdef CONFIG_DISPLAY_CPUINFO |
| 46 | int print_cpuinfo(void); |
| 47 | #endif |
| 48 | |
Satyanarayana, Sandhya | 1178475 | 2012-08-09 18:29:57 +0000 | [diff] [blame] | 49 | extern struct ctrl_stat *cstat; |
Chandan Nath | 98b036e | 2011-10-14 02:58:24 +0000 | [diff] [blame] | 50 | u32 get_device_type(void); |
Chandan Nath | 77a73fe | 2012-01-09 20:38:59 +0000 | [diff] [blame] | 51 | void setup_clocks_for_console(void); |
Tom Rini | 034aba7 | 2012-07-03 09:20:06 -0700 | [diff] [blame] | 52 | void ddr_pll_config(unsigned int ddrpll_M); |
Tom Rini | 7a24772 | 2012-07-31 10:50:01 -0700 | [diff] [blame] | 53 | |
| 54 | /* |
| 55 | * We have three pin mux functions that must exist. We must be able to enable |
| 56 | * uart0, for initial output and i2c0 to read the main EEPROM. We then have a |
| 57 | * main pinmux function that can be overridden to enable all other pinmux that |
| 58 | * is required on the board. |
| 59 | */ |
| 60 | void enable_uart0_pin_mux(void); |
| 61 | void enable_i2c0_pin_mux(void); |
| 62 | void enable_board_pin_mux(struct am335x_baseboard_id *header); |
Chandan Nath | 98b036e | 2011-10-14 02:58:24 +0000 | [diff] [blame] | 63 | #endif |