This commit is contained in:
刘可亮
2024-10-30 16:50:31 +08:00
parent 0ef85b55da
commit 661e71562d
458 changed files with 46555 additions and 12133 deletions

View File

@@ -19,7 +19,7 @@ extern "C" {
/* Luban-Lite version information */
#define LL_VERSION 1 /**< major version number */
#define LL_SUBVERSION 1 /**< minor version number */
#define LL_REVISION 0 /**< revise version number */
#define LL_REVISION 1 /**< revise version number */
typedef __signed__ char s8;
typedef unsigned char u8;
@@ -384,6 +384,9 @@ typedef enum {
#endif
#ifdef AIC_DRAM_CMA_EN
MEM_DRAM_CMA,
#endif
#ifdef AIC_BOOTLOADER
MEM_RESERVED,
#endif
MAX_MEM_REGION,
} aic_mem_region_t;

View File

@@ -1,12 +1,37 @@
/*
* Copyright (c) 2020-2021 Artinchip Technology Co., Ltd
* Copyright (c) 2022-2024, ArtInChip Technology Co., Ltd
*
* SPDX-License-Identifier: Apache-2.0
*
* Authors: Wu Dehuang <dehuang.wu@artinchip.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <aic_common.h>
#include <boot_param.h>
#include <private_param.h>
char private_params_stash[1024];
void reloc_private_params(void)
{
void *res_addr;
int i;
res_addr = aic_get_boot_resource();
if (res_addr) {
for (i = 0; i < sizeof(private_params_stash); i += 4) {
memcpy(&private_params_stash[i], res_addr, 4);
if (*(u32 *)res_addr == DATA_SECT_TYPE_END)
break;
res_addr += 4;
}
aic_set_boot_resource(private_params_stash);
}
}
static u32 *find_section(void *start, u32 type)
{
u32 *p = start, data_type, data_len;

View File

@@ -21,45 +21,31 @@
#include <of.h>
#endif
extern const int aic_gpio_groups_list[];
int list_pinmux(int argc, char *argv[])
{
unsigned int group, pin, func, i;
unsigned int group, pin, func, i, j;
pin_name_t pin_name, pin_name_max;
for (i = 0; i < GPIO_GROUP_MAX; i++)
{
switch (i)
{
case PA_GROUP:
case PB_GROUP:
case PC_GROUP:
case PD_GROUP:
case PE_GROUP:
#ifndef AIC_CHIP_D12X
case PF_GROUP:
case PG_GROUP:
case PO_GROUP:
#endif
pin_name = PA_BASE + i * GPIO_GROUP_SIZE;
pin_name_max = pin_name + GPIO_GROUP_SIZE;
for (i = 0, j = 0; i < GPIO_GROUP_MAX && j < aic_gpio_group_size; i++) {
if (i == aic_gpio_groups_list[j]) {
pin_name = PA_BASE + i * GPIO_GROUP_SIZE;
pin_name_max = pin_name + GPIO_GROUP_SIZE;
while (pin_name < pin_name_max)
{
group = GPIO_GROUP(pin_name);
pin = GPIO_GROUP_PIN(pin_name);
func = 0;
while (pin_name < pin_name_max) {
group = GPIO_GROUP(pin_name);
pin = GPIO_GROUP_PIN(pin_name);
func = 0;
hal_gpio_get_func(group, pin, &func);
if (func)
{
printf("P%c%d: function: %d\n", group + 'A', pin, func);
}
hal_gpio_get_func(group, pin, &func);
if (func)
printf("P%c%u: function: %u\n", group + 'A', pin, func);
pin_name++;
}
break;
default:
break;
pin_name++;
}
j++;
}
}