commit: http://blackfin.uclinux.org/git/?p=linux-kernel;a=commitdiff;h=c1e28e30dfe27ebcc9394e8da0684b4f1847414b branch: http://blackfin.uclinux.org/git/?p=linux-kernel;a=shortlog;h=refs/heads/trunk
Without marco BLACKFIN in these place, ethernet also work fine. Signed-off-by: Bob Liu <[email protected]> --- drivers/net/ethernet/stmicro/stmmac/dwmac100.h | 17 +++++------------ .../net/ethernet/stmicro/stmmac/dwmac100_core.c | 3 --- drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c | 6 ------ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 +------- 4 files changed, 6 insertions(+), 28 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac100.h b/drivers/net/ethernet/stmicro/stmmac/dwmac100.h index 473ac61..805e610 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac100.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac100.h @@ -53,17 +53,6 @@ #define MAC_VLAN2 0x00000024 /* VLAN2 Tag */ #endif -#ifdef CONFIG_BLACKFIN -/* MAC_FRAME_FILTER defines */ -#define MAC_FRAME_FILTER_RA 0x80000000 -#define MAC_FRAME_FILTER_PR 0x00000001 -#define MAC_FRAME_FILTER_HMC 0x00000004 -#define MAC_FRAME_FILTER_PM 0x00000010 - -#define MAC_FRAME_FILTER_INIT (MAC_FRAME_FILTER_RA | MAC_FRAME_FILTER_PR |\ - MAC_FRAME_FILTER_HMC | MAC_FRAME_FILTER_PM) -#endif - /* MAC CTRL defines */ #define MAC_CONTROL_RA 0x80000000 /* Receive All Mode */ #define MAC_CONTROL_BLE 0x40000000 /* Endian Mode */ @@ -121,7 +110,11 @@ #define DMA_BUS_MODE_DSL_SHIFT 2 /* (in DWORDS) */ #define DMA_BUS_MODE_BAR_BUS 0x00000002 /* Bar-Bus Arbitration */ #define DMA_BUS_MODE_SFT_RESET 0x00000001 /* Software Reset */ -#define DMA_BUS_MODE_DEFAULT 0x00000000 +#ifdef CONFIG_STMMAC_IEEE1588 +#define DMA_BUS_MODE_DEFAULT 0x00000080 +#else +#define DMA_BUS_MODE_DEFAULT 0x00000000 +#endif /* DMA Control register defines */ #define DMA_CONTROL_SF 0x00200000 /* Store And Forward */ diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c index a9eefa3..4f97b2f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c @@ -35,9 +35,6 @@ static void dwmac100_core_init(void __iomem *ioaddr) { u32 value = readl(ioaddr + MAC_CONTROL); -#ifdef CONFIG_BLACKFIN - writel(MAC_FRAME_FILTER_INIT, ioaddr + MAC_FRAME_FILTER); -#endif writel((value | MAC_CORE_INIT), ioaddr + MAC_CONTROL); #ifdef STMMAC_VLAN_TAG_USED diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c index 6a10c39..adcc193 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c @@ -50,15 +50,9 @@ static int dwmac100_dma_init(void __iomem *ioaddr, int pbl, u32 dma_tx, if (limit < 0) return -EBUSY; -#ifdef CONFIG_BLACKFIN - writel(DMA_AXI_BUS_BLEN4 | DMA_AXI_BUS_UNDEF, ioaddr + DMA_AXI_BUS); - writel(DMA_BUS_MODE_DEFAULT | (pbl << DMA_BUS_MODE_PBL_SHIFT) | (1 << 7), - ioaddr + DMA_BUS_MODE); -#else /* Enable Application Access by writing to DMA CSR0 */ writel(DMA_BUS_MODE_DEFAULT | (pbl << DMA_BUS_MODE_PBL_SHIFT), ioaddr + DMA_BUS_MODE); -#endif /* Mask interrupts by writing to CSR7 */ writel(DMA_INTR_DEFAULT_MASK, ioaddr + DMA_INTR_ENA); diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 7237493..6053e94 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -74,11 +74,7 @@ #define TX_DBG(fmt, args...) do { } while (0) #endif -#ifdef CONFIG_BLACKFIN -#define STMMAC_ALIGN(x) (x) -#else #define STMMAC_ALIGN(x) L1_CACHE_ALIGN(x) -#endif #define JUMBO_LEN 9000 @@ -92,7 +88,7 @@ static int debug = -1; /* -1: default, 0: no output, 16: all */ module_param(debug, int, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(debug, "Message Level (0: no output, 16: all)"); -int phyaddr = 1; +int phyaddr = -1; module_param(phyaddr, int, S_IRUGO); MODULE_PARM_DESC(phyaddr, "Physical device address"); @@ -1523,10 +1519,8 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit) frame_len = priv->hw->desc->get_rx_frame_len(p); /* ACS is set; GMAC core strips PAD/FCS for IEEE 802.3 * Type frames (LLC/LLC-SNAP) */ -#ifndef CONFIG_BLACKFIN if (unlikely(status != llc_snap)) frame_len -= ETH_FCS_LEN; -#endif #ifdef STMMAC_RX_DEBUG if (frame_len > ETH_FRAME_LEN) pr_debug("\tRX frame size %d, COE status: %d\n",
_______________________________________________ Linux-kernel-commits mailing list [email protected] https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits
