Lines Matching +full:ram +full:- +full:code
5 * Uses the generic 7990.c LANCE code.
29 /* We have 32K of RAM for the init block and buffers. This places
36 #include "7990.h" /* use generic LANCE code */
41 unsigned long ram; member
46 * plus board-specific init, open and close actions.
47 * Oh, and we need to tell the generic code how to read and write LANCE registers...
69 /* Initialise the one and only on-board 7990 */
81 return ERR_PTR(-ENODEV); in mvme147lance_probe()
86 return ERR_PTR(-ENOMEM); in mvme147lance_probe()
89 sprintf(dev->name, "eth%d", unit); in mvme147lance_probe()
92 dev->base_addr = (unsigned long)MVME147_LANCE_BASE; in mvme147lance_probe()
93 dev->netdev_ops = &lance_netdev_ops; in mvme147lance_probe()
94 dev->dma = 0; in mvme147lance_probe()
98 dev->dev_addr[0] = 0x08; in mvme147lance_probe()
99 dev->dev_addr[1] = 0x00; in mvme147lance_probe()
100 dev->dev_addr[2] = 0x3e; in mvme147lance_probe()
102 dev->dev_addr[5] = address&0xff; in mvme147lance_probe()
104 dev->dev_addr[4] = address&0xff; in mvme147lance_probe()
106 dev->dev_addr[3] = address&0xff; in mvme147lance_probe()
109 dev->name, dev->base_addr, MVME147_LANCE_IRQ, in mvme147lance_probe()
110 dev->dev_addr); in mvme147lance_probe()
113 lp->ram = __get_dma_pages(GFP_ATOMIC, 3); /* 32K */ in mvme147lance_probe()
114 if (!lp->ram) { in mvme147lance_probe()
115 printk("%s: No memory for LANCE buffers\n", dev->name); in mvme147lance_probe()
117 return ERR_PTR(-ENOMEM); in mvme147lance_probe()
120 lp->lance.name = name; in mvme147lance_probe()
121 lp->lance.base = dev->base_addr; in mvme147lance_probe()
122 lp->lance.init_block = (struct lance_init_block *)(lp->ram); /* CPU addr */ in mvme147lance_probe()
123 …lp->lance.lance_init_block = (struct lance_init_block *)(lp->ram); /* LANCE addr o… in mvme147lance_probe()
124 lp->lance.busmaster_regval = LE_C3_BSWP; /* we're bigendian */ in mvme147lance_probe()
125 lp->lance.irq = MVME147_LANCE_IRQ; in mvme147lance_probe()
126 lp->lance.writerap = (writerap_t)m147lance_writerap; in mvme147lance_probe()
127 lp->lance.writerdp = (writerdp_t)m147lance_writerdp; in mvme147lance_probe()
128 lp->lance.readrdp = (readrdp_t)m147lance_readrdp; in mvme147lance_probe()
129 lp->lance.lance_log_rx_bufs = LANCE_LOG_RX_BUFFERS; in mvme147lance_probe()
130 lp->lance.lance_log_tx_bufs = LANCE_LOG_TX_BUFFERS; in mvme147lance_probe()
131 lp->lance.rx_ring_mod_mask = RX_RING_MOD_MASK; in mvme147lance_probe()
132 lp->lance.tx_ring_mod_mask = TX_RING_MOD_MASK; in mvme147lance_probe()
136 free_pages(lp->ram, 3); in mvme147lance_probe()
146 out_be16(lp->base + LANCE_RAP, value); in m147lance_writerap()
151 out_be16(lp->base + LANCE_RDP, value); in m147lance_writerdp()
156 return in_be16(lp->base + LANCE_RDP); in m147lance_readrdp()
163 status = lance_open(dev); /* call generic lance open code */ in m147lance_open()
167 m147_pcc->lan_cntrl = 0; /* clear the interrupts (if any) */ in m147lance_open()
168 m147_pcc->lan_cntrl = 0x08 | 0x04; /* Enable irq 4 */ in m147lance_open()
176 m147_pcc->lan_cntrl = 0x0; /* disable interrupts */ in m147lance_close()
187 dev_mvme147_lance = mvme147lance_probe(-1); in init_module()
195 free_pages(lp->ram, 3); in cleanup_module()