Kshitij Sisodia | a1256e3 | 2022-02-23 14:40:45 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2022 Arm Limited. All rights reserved. |
| 3 | * SPDX-License-Identifier: Apache-2.0 |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
| 17 | |
| 18 | #include "platform_drivers.h" |
| 19 | |
| 20 | #include "uart_stdout.h" |
| 21 | #include <string.h> |
| 22 | |
| 23 | int platform_init(void) |
| 24 | { |
| 25 | SystemCoreClockUpdate(); /* From start up code */ |
| 26 | |
| 27 | /* UART init - will enable valid use of printf (stdout |
| 28 | * re-directed at this UART (UART0) */ |
| 29 | UartStdOutInit(); |
| 30 | |
| 31 | info("%s: complete\n", __FUNCTION__); |
| 32 | |
| 33 | /** TODO: Add ARM NPU and TA init here */ |
| 34 | return 0; |
| 35 | } |
| 36 | |
| 37 | void platform_release(void) |
| 38 | { |
| 39 | __disable_irq(); |
| 40 | } |
| 41 | |
| 42 | void platform_name(char* name, size_t size) |
| 43 | { |
| 44 | strncpy(name, DESIGN_NAME, size); |
| 45 | } |