summaryrefslogtreecommitdiff
path: root/bsp/nuvoton/numaker-iot-m467/board/fal_cfg.h
blob: c9073b33ffa9b59b5016a90d1c0ba861abbbc630 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**************************************************************************//**
*
* @copyright (C) 2020 Nuvoton Technology Corp. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date            Author       Notes
* 2022-4-1        Wayne        First version
*
******************************************************************************/

#ifndef _FAL_CFG_H_
#define _FAL_CFG_H_

#include <rtconfig.h>
#include <board.h>

/* ===================== Flash device Configuration ========================= */
#if defined(FAL_PART_HAS_TABLE_CFG)

#if defined(BSP_USING_FMC)
    extern const struct fal_flash_dev Onchip_aprom_flash;
    extern const struct fal_flash_dev Onchip_ldrom_flash;
#endif

#if defined(FAL_USING_SFUD_PORT)
    extern struct fal_flash_dev nor_flash0;
#endif

#if defined(BSP_USING_FMC) && defined(FAL_USING_SFUD_PORT)
#define FAL_FLASH_DEV_TABLE         \
{                                   \
    &Onchip_aprom_flash,            \
      &Onchip_ldrom_flash,            \
    &nor_flash0,                    \
}
#elif defined(BSP_USING_FMC)
#define FAL_FLASH_DEV_TABLE         \
{                                   \
    &Onchip_aprom_flash,            \
      &Onchip_ldrom_flash,            \
    &nor_flash0,                    \
}
#elif defined(FAL_USING_SFUD_PORT)
#define FAL_FLASH_DEV_TABLE         \
{                                   \
    &nor_flash0,                    \
}
#else
#define FAL_FLASH_DEV_TABLE         \
{                                   \
}
#endif

#define FAL_PART_TABLE                                                        \
{                                                                             \
    {FAL_PART_MAGIC_WORD,   "filesystem",     FAL_USING_NOR_FLASH_DEV_NAME,    0,   4*1024*1024, 0},  \
    {FAL_PART_MAGIC_WORD,        "ldrom",     "OnChip_LDROM",                  0,        0x1000, 0},  \
    {FAL_PART_MAGIC_WORD,        "aprom",     "OnChip_APROM",            0x60000,       0x20000, 0},  \
}

#endif /* FAL_PART_HAS_TABLE_CFG */

#endif /* _FAL_CFG_H_ */