mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-07-31 07:13:44 +09:00
powerpc/t4240: Fix SerDes protocol arrays with const prefix
Protocols are constants. Fix arrays with const prefix. Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
This commit is contained in:
parent
615f0cba58
commit
924859ac23
@ -31,7 +31,7 @@ struct serdes_config {
|
|||||||
u8 lanes[SRDS_MAX_LANES];
|
u8 lanes[SRDS_MAX_LANES];
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct serdes_config serdes1_cfg_tbl[] = {
|
static const struct serdes_config serdes1_cfg_tbl[] = {
|
||||||
/* SerDes 1 */
|
/* SerDes 1 */
|
||||||
{1, {XAUI_FM1_MAC9, XAUI_FM1_MAC9,
|
{1, {XAUI_FM1_MAC9, XAUI_FM1_MAC9,
|
||||||
XAUI_FM1_MAC9, XAUI_FM1_MAC9,
|
XAUI_FM1_MAC9, XAUI_FM1_MAC9,
|
||||||
@ -66,7 +66,7 @@ static struct serdes_config serdes1_cfg_tbl[] = {
|
|||||||
NONE, NONE, QSGMII_FM1_A, NONE}},
|
NONE, NONE, QSGMII_FM1_A, NONE}},
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
static struct serdes_config serdes2_cfg_tbl[] = {
|
static const struct serdes_config serdes2_cfg_tbl[] = {
|
||||||
/* SerDes 2 */
|
/* SerDes 2 */
|
||||||
{1, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
{1, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
||||||
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
||||||
@ -150,7 +150,7 @@ static struct serdes_config serdes2_cfg_tbl[] = {
|
|||||||
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4}},
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4}},
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
static struct serdes_config serdes3_cfg_tbl[] = {
|
static const struct serdes_config serdes3_cfg_tbl[] = {
|
||||||
/* SerDes 3 */
|
/* SerDes 3 */
|
||||||
{2, {PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1}},
|
{2, {PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1}},
|
||||||
{4, {PCIE1, PCIE1, PCIE1, PCIE1, PCIE2, PCIE2, PCIE2, PCIE2}},
|
{4, {PCIE1, PCIE1, PCIE1, PCIE1, PCIE2, PCIE2, PCIE2, PCIE2}},
|
||||||
@ -174,7 +174,7 @@ static struct serdes_config serdes3_cfg_tbl[] = {
|
|||||||
SRIO1, SRIO1, SRIO1, SRIO1}},
|
SRIO1, SRIO1, SRIO1, SRIO1}},
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
static struct serdes_config serdes4_cfg_tbl[] = {
|
static const struct serdes_config serdes4_cfg_tbl[] = {
|
||||||
/* SerDes 4 */
|
/* SerDes 4 */
|
||||||
{2, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE3, PCIE3, PCIE3, PCIE3}},
|
{2, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE3, PCIE3, PCIE3, PCIE3}},
|
||||||
{4, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE4, PCIE4, PCIE4, PCIE4}},
|
{4, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE4, PCIE4, PCIE4, PCIE4}},
|
||||||
@ -187,7 +187,7 @@ static struct serdes_config serdes4_cfg_tbl[] = {
|
|||||||
{18, {PCIE3, PCIE3, PCIE3, PCIE3, AURORA, AURORA, AURORA, AURORA}},
|
{18, {PCIE3, PCIE3, PCIE3, PCIE3, AURORA, AURORA, AURORA, AURORA}},
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
static struct serdes_config *serdes_cfg_tbl[] = {
|
static const struct serdes_config *serdes_cfg_tbl[] = {
|
||||||
serdes1_cfg_tbl,
|
serdes1_cfg_tbl,
|
||||||
serdes2_cfg_tbl,
|
serdes2_cfg_tbl,
|
||||||
serdes3_cfg_tbl,
|
serdes3_cfg_tbl,
|
||||||
@ -196,7 +196,7 @@ static struct serdes_config *serdes_cfg_tbl[] = {
|
|||||||
|
|
||||||
enum srds_prtcl serdes_get_prtcl(int serdes, int cfg, int lane)
|
enum srds_prtcl serdes_get_prtcl(int serdes, int cfg, int lane)
|
||||||
{
|
{
|
||||||
struct serdes_config *ptr;
|
const struct serdes_config *ptr;
|
||||||
|
|
||||||
if (serdes >= ARRAY_SIZE(serdes_cfg_tbl))
|
if (serdes >= ARRAY_SIZE(serdes_cfg_tbl))
|
||||||
return 0;
|
return 0;
|
||||||
@ -213,7 +213,7 @@ enum srds_prtcl serdes_get_prtcl(int serdes, int cfg, int lane)
|
|||||||
int is_serdes_prtcl_valid(int serdes, u32 prtcl)
|
int is_serdes_prtcl_valid(int serdes, u32 prtcl)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct serdes_config *ptr;
|
const struct serdes_config *ptr;
|
||||||
|
|
||||||
if (serdes >= ARRAY_SIZE(serdes_cfg_tbl))
|
if (serdes >= ARRAY_SIZE(serdes_cfg_tbl))
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user