summaryrefslogtreecommitdiff
path: root/bsp/phytium/libraries/standalone/drivers/sata/fsata/fsata_g.c
blob: dc90afa636877c4c0b532f9fb9d4fea363cf8fd3 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
 * Copyright : (C) 2022 Phytium Information Technology, Inc.
 * All Rights Reserved.
 *
 * This program is OPEN SOURCE software: you can redistribute it and/or modify it
 * under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd,
 * either version 1.0 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the Phytium Public License for more details.
 *
 *
 * FilePath: fsata_g.c
 * Date: 2022-02-10 14:55:11
 * LastEditTime: 2022-02-18 09:03:08
 * Description:  This files is for static config of sata ctrl
 *
 * Modify History:
 *  Ver   Who        Date         Changes
 * ----- ------     --------    --------------------------------------
 */

#include "fparameters.h"
#include "fsata.h"
#include "sdkconfig.h"

/************************** Constant Definitions *****************************/

/**************************** Type Definitions *******************************/

/***************** Macros (Inline Functions) Definitions *********************/

/************************** Function Prototypes ******************************/

/************************** Variable Definitions *****************************/


/* configs of pcie ahci ctrl */
const FSataConfig FSataPcieConfigTbl[PLAT_AHCI_HOST_MAX_COUNT] =
{
    [0] =
    {
        .base_addr = AHCI_BASE_0,
        .instance_name = "sata0",
        .irq_num = AHCI_IRQ_0     /* Irq number */

    },
    [1] =
    {
        .base_addr = AHCI_BASE_1,
        .instance_name = "sata1",
        .irq_num = AHCI_IRQ_1     /* Irq number */

    },
    [2] =
    {
        .base_addr = AHCI_BASE_2,
        .instance_name = "sata2",
        .irq_num = AHCI_IRQ_2     /* Irq number */

    },
    [3] =
    {
        .base_addr = AHCI_BASE_3,
        .instance_name = "sata3",
        .irq_num = AHCI_IRQ_3     /* Irq number */

    },
    [4] =
    {
        .base_addr = AHCI_BASE_4,
        .instance_name = "sata4",
        .irq_num = AHCI_IRQ_4     /* Irq number */

    },
};

#if defined(CONFIG_TARGET_E2000)

/* configs of controller ahci ctrl */
const FSataConfig FSataControllerConfigTbl[FSATA_INSTANCE_NUM] =
{
    [0] =
    {
        .instance_id = FSATA_INSTANCE_0,
        .base_addr = FSATA0_BASEADDR,
        .instance_name = "sata0",
        .irq_num = FSATA0_IRQNUM     /* Irq number */

    },
    [1] =
    {
        .instance_id = FSATA_INSTANCE_1,
        .base_addr = FSATA1_BASEADDR,
        .instance_name = "sata1",
        .irq_num = FSATA1_IRQNUM     /* Irq number */

    },

};

#endif