Travis Geiselbrecht | 1d0df69 | 2008-09-01 02:26:09 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2008 Travis Geiselbrecht |
| 3 | * |
Channagoud Kadabi | c3ecbf4 | 2013-05-08 12:54:05 -0700 | [diff] [blame] | 4 | * Copyright (c) 2013, The Linux Foundation. All rights reserved. |
| 5 | * |
Travis Geiselbrecht | 1d0df69 | 2008-09-01 02:26:09 -0700 | [diff] [blame] | 6 | * Permission is hereby granted, free of charge, to any person obtaining |
| 7 | * a copy of this software and associated documentation files |
| 8 | * (the "Software"), to deal in the Software without restriction, |
| 9 | * including without limitation the rights to use, copy, modify, merge, |
| 10 | * publish, distribute, sublicense, and/or sell copies of the Software, |
| 11 | * and to permit persons to whom the Software is furnished to do so, |
| 12 | * subject to the following conditions: |
| 13 | * |
| 14 | * The above copyright notice and this permission notice shall be |
| 15 | * included in all copies or substantial portions of the Software. |
| 16 | * |
| 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 24 | */ |
| 25 | #ifndef __TARGET_H |
| 26 | #define __TARGET_H |
| 27 | |
| 28 | /* super early platform initialization, before almost everything */ |
| 29 | void target_early_init(void); |
| 30 | |
| 31 | /* later init, after the kernel has come up */ |
| 32 | void target_init(void); |
| 33 | |
David Ng | 3679bc5 | 2010-02-09 15:43:43 -0800 | [diff] [blame] | 34 | /* get memory address for fastboot image loading */ |
| 35 | void *target_get_scratch_address(void); |
| 36 | |
Vivek Mehta | 5f1c9d4 | 2011-04-01 20:11:59 -0700 | [diff] [blame] | 37 | /* get the max allowed flash size */ |
| 38 | unsigned target_get_max_flash_size(void); |
| 39 | |
David Ng | 183a742 | 2009-12-07 14:55:21 -0800 | [diff] [blame] | 40 | /* if target is using eMMC bootup */ |
| 41 | int target_is_emmc_boot(void); |
| 42 | |
Greg Grisco | d625055 | 2011-06-29 14:40:23 -0700 | [diff] [blame] | 43 | unsigned* target_atag_mem(unsigned* ptr); |
Greg Grisco | d625055 | 2011-06-29 14:40:23 -0700 | [diff] [blame] | 44 | void target_battery_charging_enable(unsigned enable, unsigned disconnect); |
| 45 | unsigned target_pause_for_battery_charge(void); |
| 46 | unsigned target_baseband(void); |
| 47 | void target_serialno(unsigned char *buf); |
| 48 | void target_fastboot_init(void); |
Channagoud Kadabi | c3ecbf4 | 2013-05-08 12:54:05 -0700 | [diff] [blame] | 49 | struct mmc_device *target_mmc_device(); |
Greg Grisco | d625055 | 2011-06-29 14:40:23 -0700 | [diff] [blame] | 50 | |
| 51 | |
Travis Geiselbrecht | 1d0df69 | 2008-09-01 02:26:09 -0700 | [diff] [blame] | 52 | #endif |