allwinner: Export sunxi_private.h

So far we have a sunxi_private.h header file in the common code directory.
This holds the prototypes of various functions we share in *common*
code. However we will need some of those in the platform specific code
parts as well, and want to introduce new functions shared across the
whole platform port.

So move the sunxi_private.h file into the common/include directory, so
that it becomes visible to all parts of the platform code.
Fix up the existing #includes and add missing ones, also add the
sunxi_read_soc_id() prototype here.

This will be used in follow up patches.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
This commit is contained in:
Andre Przywara 2018-10-14 12:02:02 +01:00
parent f953c30fe5
commit 4ec1a2399c
8 changed files with 17 additions and 17 deletions

View File

@ -4,19 +4,19 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __SUNXI_PRIVATE_H__
#define __SUNXI_PRIVATE_H__
#ifndef SUNXI_PRIVATE_H
#define SUNXI_PRIVATE_H
void sunxi_configure_mmu_el3(int flags);
void sunxi_cpu_off(unsigned int cluster, unsigned int core);
void sunxi_cpu_on(unsigned int cluster, unsigned int core);
void sunxi_cpu_off(unsigned int cluster, unsigned int core);
void sunxi_disable_secondary_cpus(unsigned int primary_cpu);
void __dead2 sunxi_power_down(void);
int sunxi_pmic_setup(uint16_t socid);
void sunxi_security_setup(void);
uint16_t sunxi_read_soc_id(void);
void sunxi_pmic_setup(uint16_t socid);
void sunxi_security_setup(void);
void __dead2 sunxi_power_down(void);
#endif /* __SUNXI_PRIVATE_H__ */
#endif /* SUNXI_PRIVATE_H */

View File

@ -14,9 +14,9 @@
#include <platform_def.h>
#include <sunxi_def.h>
#include <sunxi_mmap.h>
#include <sunxi_private.h>
#include <uart_16550.h>
#include "sunxi_private.h"
static entry_point_info_t bl32_image_ep_info;
static entry_point_info_t bl33_image_ep_info;

View File

@ -8,10 +8,9 @@
#include <platform.h>
#include <platform_def.h>
#include <sunxi_def.h>
#include <sunxi_private.h>
#include <xlat_tables_v2.h>
#include "sunxi_private.h"
static mmap_region_t sunxi_mmap[PLATFORM_MMAP_REGIONS + 1] = {
MAP_REGION_FLAT(SUNXI_SRAM_BASE, SUNXI_SRAM_SIZE,
MT_MEMORY | MT_RW | MT_SECURE),

View File

@ -9,10 +9,9 @@
#include <platform_def.h>
#include <sunxi_mmap.h>
#include <sunxi_cpucfg.h>
#include <sunxi_private.h>
#include <utils_def.h>
#include "sunxi_private.h"
static void sunxi_cpu_disable_power(unsigned int cluster, unsigned int core)
{
if (mmio_read_32(SUNXI_CPU_POWER_CLAMP_REG(cluster, core)) == 0xff)

View File

@ -13,15 +13,14 @@
#include <platform.h>
#include <platform_def.h>
#include <psci.h>
#include <sunxi_mmap.h>
#include <sunxi_cpucfg.h>
#include <sunxi_mmap.h>
#include <sunxi_private.h>
#define SUNXI_WDOG0_CTRL_REG (SUNXI_WDOG_BASE + 0x0010)
#define SUNXI_WDOG0_CFG_REG (SUNXI_WDOG_BASE + 0x0014)
#define SUNXI_WDOG0_MODE_REG (SUNXI_WDOG_BASE + 0x0018)
#include "sunxi_private.h"
#define mpidr_is_valid(mpidr) ( \
MPIDR_AFFLVL3_VAL(mpidr) == 0 && \
MPIDR_AFFLVL2_VAL(mpidr) == 0 && \

View File

@ -7,6 +7,7 @@
#include <debug.h>
#include <mmio.h>
#include <sunxi_mmap.h>
#include <sunxi_private.h>
#ifdef SUNXI_SPC_BASE
#define SPC_DECPORT_STA_REG(p) (SUNXI_SPC_BASE + ((p) * 0x0c) + 0x4)

View File

@ -13,6 +13,7 @@
#include <platform_def.h>
#include <sunxi_def.h>
#include <sunxi_mmap.h>
#include <sunxi_private.h>
static enum pmic_type {
GENERIC_H5,

View File

@ -13,6 +13,7 @@
#include <mentor/mi2cv.h>
#include <string.h>
#include <sunxi_mmap.h>
#include <sunxi_private.h>
#define AXP805_ADDR 0x36
#define AXP805_ID 0x03