diff options
Diffstat (limited to 'arch/m68k/include')
-rw-r--r-- | arch/m68k/include/asm/fec.h | 21 | ||||
-rw-r--r-- | arch/m68k/include/asm/fsl_mcdmafec.h | 23 | ||||
-rw-r--r-- | arch/m68k/include/asm/immap.h | 42 |
3 files changed, 28 insertions, 58 deletions
diff --git a/arch/m68k/include/asm/fec.h b/arch/m68k/include/asm/fec.h index 5742829c6d..cdb8119d3e 100644 --- a/arch/m68k/include/asm/fec.h +++ b/arch/m68k/include/asm/fec.h @@ -95,11 +95,12 @@ struct fec_info_s { int phyname_init; cbd_t *rxbd; /* Rx BD */ cbd_t *txbd; /* Tx BD */ - uint rxIdx; - uint txIdx; + uint rx_idx; + uint tx_idx; char *txbuf; int initialized; - struct fec_info_s *next; + int to_loop; + struct mii_dev *bus; }; #ifdef CONFIG_MCFFEC @@ -336,12 +337,22 @@ typedef struct fec { #define FEC_RESET_DELAY 100 #define FEC_RX_TOUT 100 -int fecpin_setclear(struct eth_device *dev, int setclear); +#ifdef CONFIG_MCF547x_8x +typedef struct fec_info_dma fec_info_t; +#define FEC_T fecdma_t +#else +typedef struct fec_info_s fec_info_t; +#define FEC_T fec_t +#endif + +int fecpin_setclear(fec_info_t *info, int setclear); +int mii_discover_phy(fec_info_t *info); +int fec_get_base_addr(int fec_idx, u32 *fec_iobase); +int fec_get_mii_base(int fec_idx, u32 *mii_base); #ifdef CONFIG_SYS_DISCOVER_PHY void __mii_init(void); uint mii_send(uint mii_cmd); -int mii_discover_phy(struct eth_device *dev); int mcffec_miiphy_read(struct mii_dev *bus, int addr, int devad, int reg); int mcffec_miiphy_write(struct mii_dev *bus, int addr, int devad, int reg, u16 value); diff --git a/arch/m68k/include/asm/fsl_mcdmafec.h b/arch/m68k/include/asm/fsl_mcdmafec.h index c283ad4a95..de6c548faf 100644 --- a/arch/m68k/include/asm/fsl_mcdmafec.h +++ b/arch/m68k/include/asm/fsl_mcdmafec.h @@ -72,20 +72,21 @@ struct fec_info_dma { int phyname_init; cbd_t *rxbd; /* Rx BD */ cbd_t *txbd; /* Tx BD */ - uint rxIdx; - uint txIdx; + uint rx_idx; + uint tx_idx; char *txbuf; int initialized; struct fec_info_dma *next; - - u16 rxTask; /* DMA receive Task Number */ - u16 txTask; /* DMA Transmit Task Number */ - u16 rxPri; /* DMA Receive Priority */ - u16 txPri; /* DMA Transmit Priority */ - u16 rxInit; /* DMA Receive Initiator */ - u16 txInit; /* DMA Transmit Initiator */ - u16 usedTbdIdx; /* next transmit BD to clean */ - u16 cleanTbdNum; /* the number of available transmit BDs */ + u16 rx_task; /* DMA receive Task Number */ + u16 tx_task; /* DMA Transmit Task Number */ + u16 rx_pri; /* DMA Receive Priority */ + u16 tx_pri; /* DMA Transmit Priority */ + u16 rx_init; /* DMA Receive Initiator */ + u16 tx_init; /* DMA Transmit Initiator */ + u16 used_tbd_idx; /* next transmit BD to clean */ + u16 clean_tbd_num; /* the number of available transmit BDs */ + int to_loop; + struct mii_dev *bus; }; /* Bit definitions and macros for IEVENT */ diff --git a/arch/m68k/include/asm/immap.h b/arch/m68k/include/asm/immap.h index 80fa25769b..9e84fb9d26 100644 --- a/arch/m68k/include/asm/immap.h +++ b/arch/m68k/include/asm/immap.h @@ -28,12 +28,6 @@ #define CONFIG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8) #endif -#ifdef CONFIG_MCFPIT -#define CONFIG_SYS_UDELAY_BASE (MMAP_PIT0) -#define CONFIG_SYS_PIT_BASE (MMAP_PIT1) -#define CONFIG_SYS_PIT_PRESCALE (6) -#endif - #define CONFIG_SYS_INTR_BASE (MMAP_INTC0) #define CONFIG_SYS_NUM_IRQS (128) #endif /* CONFIG_M520x */ @@ -62,12 +56,6 @@ #define CONFIG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8) #endif -#ifdef CONFIG_MCFPIT -#define CONFIG_SYS_UDELAY_BASE (MMAP_PIT0) -#define CONFIG_SYS_PIT_BASE (MMAP_PIT1) -#define CONFIG_SYS_PIT_PRESCALE (6) -#endif - #define CONFIG_SYS_INTR_BASE (MMAP_INTC0) #define CONFIG_SYS_NUM_IRQS (128) #endif /* CONFIG_M52277 */ @@ -91,12 +79,6 @@ #define CONFIG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8) #endif -#ifdef CONFIG_MCFPIT -#define CONFIG_SYS_UDELAY_BASE (MMAP_PIT0) -#define CONFIG_SYS_PIT_BASE (MMAP_PIT1) -#define CONFIG_SYS_PIT_PRESCALE (6) -#endif - #define CONFIG_SYS_INTR_BASE (MMAP_INTC0) #define CONFIG_SYS_NUM_IRQS (128) #endif /* CONFIG_M5235 */ @@ -285,12 +267,6 @@ #define CONFIG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8) #endif -#ifdef CONFIG_MCFPIT -#define CONFIG_SYS_UDELAY_BASE (MMAP_PIT0) -#define CONFIG_SYS_PIT_BASE (MMAP_PIT1) -#define CONFIG_SYS_PIT_PRESCALE (6) -#endif - #define CONFIG_SYS_INTR_BASE (MMAP_INTC0) #define CONFIG_SYS_NUM_IRQS (128) #endif /* CONFIG_M5301x */ @@ -315,12 +291,6 @@ #define CONFIG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8) #endif -#ifdef CONFIG_MCFPIT -#define CONFIG_SYS_UDELAY_BASE (MMAP_PIT0) -#define CONFIG_SYS_PIT_BASE (MMAP_PIT1) -#define CONFIG_SYS_PIT_PRESCALE (6) -#endif - #define CONFIG_SYS_INTR_BASE (MMAP_INTC0) #define CONFIG_SYS_NUM_IRQS (128) #endif /* CONFIG_M5329 && CONFIG_M5373 */ @@ -355,12 +325,6 @@ #define CONFIG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8) #endif -#ifdef CONFIG_MCFPIT -#define CONFIG_SYS_UDELAY_BASE (MMAP_PIT0) -#define CONFIG_SYS_PIT_BASE (MMAP_PIT1) -#define CONFIG_SYS_PIT_PRESCALE (6) -#endif - #define CONFIG_SYS_INTR_BASE (MMAP_INTC0) #define CONFIG_SYS_NUM_IRQS (192) @@ -391,12 +355,6 @@ #define CONFIG_SYS_TIMER_PRESCALER (((gd->bus_clk / 1000000) - 1) << 8) #endif -#ifdef CONFIG_MCFPIT -#define CONFIG_SYS_UDELAY_BASE (MMAP_PIT0) -#define CONFIG_SYS_PIT_BASE (MMAP_PIT1) -#define CONFIG_SYS_PIT_PRESCALE (6) -#endif - #define CONFIG_SYS_INTR_BASE (MMAP_INTC0) #define CONFIG_SYS_NUM_IRQS (128) |