X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Ftsec.h;h=72f34851ad19e4fda2eb76e11d9f3792a05dd947;hb=c56289ddafce3d1ec442fb18064f136c2c47d0bb;hp=e99a7fa8782f9db5826f44d5d884167fcd1e0f0b;hpb=9a1d64809d51ddae40fe7802da18e8069f11cb43;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/tsec.h b/include/tsec.h index e99a7fa..72f3485 100644 --- a/include/tsec.h +++ b/include/tsec.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * tsec.h * @@ -7,8 +8,6 @@ * (C) Copyright 2003, Motorola, Inc. * maintained by Xianghua Xiao (x.xiao@motorola.com) * author Andy Fleming - * - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef __TSEC_H @@ -18,17 +17,19 @@ #include #include +#define TSEC_MDIO_REGS_OFFSET 0x520 + #ifndef CONFIG_DM_ETH #ifdef CONFIG_ARCH_LS1021A #define TSEC_SIZE 0x40000 #define TSEC_MDIO_OFFSET 0x40000 #else -#define TSEC_SIZE 0x01000 +#define TSEC_SIZE 0x01000 #define TSEC_MDIO_OFFSET 0x01000 #endif -#define CONFIG_SYS_MDIO_BASE_ADDR (MDIO_BASE_ADDR + 0x520) +#define CONFIG_SYS_MDIO_BASE_ADDR (MDIO_BASE_ADDR + TSEC_MDIO_REGS_OFFSET) #define TSEC_GET_REGS(num, offset) \ (struct tsec __iomem *)\ @@ -121,6 +122,8 @@ #define ECNTRL_REDUCED_MII_MODE 0x00000004 #define ECNTRL_SGMII_MODE 0x00000002 +#define RCTRL_PROM 0x00000008 + #ifndef CONFIG_SYS_TBIPA_VALUE # define CONFIG_SYS_TBIPA_VALUE 0x1f #endif @@ -393,6 +396,10 @@ struct tsec { #define TX_BUF_CNT 2 +struct tsec_data { + u32 mdio_regs_off; +}; + struct tsec_private { struct txbd8 __iomem txbd[TX_BUF_CNT]; struct rxbd8 __iomem rxbd[PKTBUFSRX]; @@ -425,8 +432,9 @@ struct tsec_info_struct { }; #ifndef CONFIG_DM_ETH -int tsec_standard_init(bd_t *bis); -int tsec_eth_init(bd_t *bis, struct tsec_info_struct *tsec_info, int num); +int tsec_standard_init(struct bd_info *bis); +int tsec_eth_init(struct bd_info *bis, struct tsec_info_struct *tsec_info, + int num); #endif #endif /* __TSEC_H */