blob: 89381cf7a5b86754964cdaa203b56183e62bc0bf [file] [log] [blame]
Travis Geiselbrecht1d0df692008-09-01 02:26:09 -07001/*
2 * Copyright (c) 2008 Travis Geiselbrecht
3 *
Sundarajan Srinivasan66951e52014-03-28 16:43:06 -07004 * Copyright (c) 2014, The Linux Foundation. All rights reserved.
5 *
Travis Geiselbrecht1d0df692008-09-01 02:26:09 -07006 * 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#include <err.h>
26#include <debug.h>
27#include <platform.h>
Amol Jadi02ca2ee2013-03-15 16:06:34 -070028#include <boot_stats.h>
Sundarajan Srinivasan66951e52014-03-28 16:43:06 -070029#include <platform/iomap.h>
Travis Geiselbrecht1d0df692008-09-01 02:26:09 -070030
Amol Jadi4421e652011-06-16 15:00:48 -070031/*
Travis Geiselbrecht1d0df692008-09-01 02:26:09 -070032 * default implementations of these routines, if the platform code
33 * chooses not to implement.
34 */
Deepa Dinamani20cb9e52012-10-18 12:20:47 -070035__WEAK int platform_use_identity_mmu_mappings(void)
36{
37 return 1;
38}
Travis Geiselbrecht1d0df692008-09-01 02:26:09 -070039
40__WEAK void platform_init_mmu_mappings(void)
41{
42}
43
Deepa Dinamani20cb9e52012-10-18 12:20:47 -070044__WEAK addr_t platform_get_virt_to_phys_mapping(addr_t virt_addr)
45{
46 ASSERT(platform_use_identity_mmu_mappings());
47
48 return virt_addr;
49}
50
51__WEAK addr_t platform_get_phys_to_virt_mapping(addr_t phys_addr)
52{
53 ASSERT(platform_use_identity_mmu_mappings());
54
55 return phys_addr;
56}
57
Travis Geiselbrecht1d0df692008-09-01 02:26:09 -070058__WEAK void platform_early_init(void)
59{
60}
61
62__WEAK void platform_init(void)
63{
64}
65
Chandan Uddaraju24120502009-12-12 19:17:04 -080066__WEAK void display_init(void)
67{
68}
Shashank Mittal23b8f422010-04-16 19:27:21 -070069
Shashank Mittalc648e712010-10-06 18:37:42 -070070__WEAK void display_shutdown(void)
71{
72}
73
Chandan Uddaraju14e57eb2010-06-28 12:11:06 -070074__WEAK void platform_config_interleaved_mode_gpios(void)
75{
76}
Shashank Mittaled177732011-05-06 19:12:59 -070077
78__WEAK void uart_clock_init(void)
79{
80}
81
Amol Jadi4421e652011-06-16 15:00:48 -070082__WEAK void platform_uninit(void)
83{
84}
Shashank Mittalcd98d472011-08-02 14:29:24 -070085
86__WEAK int image_verify(unsigned char * image_ptr,
87 unsigned char * signature_ptr,
88 unsigned int image_size,
89 unsigned hash_type)
90{
91 return 0;
92}
Deepa Dinamani5e5c21a2012-02-16 18:59:57 -080093
Pavel Nedev36c23372013-03-19 15:38:53 +020094__WEAK void ce_clock_init(void)
Deepa Dinamani5e5c21a2012-02-16 18:59:57 -080095{
96}
Amol Jadi02ca2ee2013-03-15 16:06:34 -070097
sundarajan srinivasancaab0f42013-05-10 14:21:30 -070098__WEAK addr_t get_bs_info_addr()
Amol Jadi02ca2ee2013-03-15 16:06:34 -070099{
Unnati Gandhi148bb192014-07-17 15:07:44 +0530100 return 0;
sundarajan srinivasancaab0f42013-05-10 14:21:30 -0700101}
102
103__WEAK uint32_t platform_get_sclk_count(void)
104{
105 return 0;
Amol Jadi02ca2ee2013-03-15 16:06:34 -0700106}
Channagoud Kadabid60a3032013-08-20 15:31:32 -0700107
Unnati Gandhi148bb192014-07-17 15:07:44 +0530108__WEAK void clock_config_cdc(uint32_t slot)
Channagoud Kadabid60a3032013-08-20 15:31:32 -0700109{
Unnati Gandhi148bb192014-07-17 15:07:44 +0530110
Channagoud Kadabid60a3032013-08-20 15:31:32 -0700111}
Sundarajan Srinivasan66951e52014-03-28 16:43:06 -0700112
113__WEAK uint32_t platform_get_smem_base_addr()
114{
115 return (uint32_t)MSM_SHARED_BASE;
116}