X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbfin_mac.h;h=54ffb3830e2be000f6c7c971bbc35ecf6607220c;hb=5964dadd0371238cbc91b1c2b6b24fd7d83833d8;hp=c8a94d0c9ffbd637e1be6d6070662203697bb6ce;hpb=08e94432300e48624de6f9533412836cf852abae;p=oweals%2Fu-boot.git diff --git a/drivers/net/bfin_mac.h b/drivers/net/bfin_mac.h index c8a94d0c9f..54ffb3830e 100644 --- a/drivers/net/bfin_mac.h +++ b/drivers/net/bfin_mac.h @@ -9,29 +9,8 @@ #ifndef __BFIN_MAC_H__ #define __BFIN_MAC_H__ -#define PHYADDR 0x01 -#define NO_PHY_REGS 0x20 - -#define DEFAULT_PHY_PHYID1 0x0007 -#define DEFAULT_PHY_PHYID2 0xC0A3 -#define PHY_MODECTL 0x00 -#define PHY_MODESTAT 0x01 -#define PHY_PHYID1 0x02 -#define PHY_PHYID2 0x03 -#define PHY_ANAR 0x04 -#define PHY_ANLPAR 0x05 -#define PHY_ANER 0x06 - -#define PHY_RESET 0x8000 -#define PHY_ANEG_EN 0x1000 -#define PHY_DUPLEX 0x0100 -#define PHY_SPD_SET 0x2000 - #define RECV_BUFSIZE (0x614) -typedef volatile u32 reg32; -typedef volatile u16 reg16; - typedef struct ADI_DMA_CONFIG_REG { u16 b_DMA_EN:1; /* 0 Enabled */ u16 b_WNR:1; /* 1 Direction */ @@ -56,7 +35,10 @@ typedef struct adi_ether_frame_buffer { typedef struct dma_descriptor { struct dma_descriptor *NEXT_DESC_PTR; u32 START_ADDR; - ADI_DMA_CONFIG_REG CONFIG; + union { + u16 CONFIG_DATA; + ADI_DMA_CONFIG_REG CONFIG; + }; } DMA_DESCRIPTOR; /* 10 bytes/struct in 12 bytes */ @@ -76,14 +58,8 @@ static ADI_ETHER_BUFFER *SetupTxBuffer(int no); static int bfin_EMAC_init(struct eth_device *dev, bd_t *bd); static void bfin_EMAC_halt(struct eth_device *dev); -static int bfin_EMAC_send(struct eth_device *dev, volatile void *packet, int length); +static int bfin_EMAC_send(struct eth_device *dev, void *packet, int length); static int bfin_EMAC_recv(struct eth_device *dev); - -static void PollMdcDone(void); -static void WrPHYReg(u16 PHYAddr, u16 RegAddr, u16 Data); -static u16 RdPHYReg(u16 PHYAddr, u16 RegAddr); -static int SetupSystemRegs(int *opmode); - -static void bfin_EMAC_setup_addr(bd_t *bd); +static int bfin_EMAC_setup_addr(struct eth_device *dev); #endif