Lines Matching +full:half +full:-

1 // SPDX-License-Identifier: GPL-2.0-only
2 /* stnic.c : A SH7750 specific part of driver for NS DP83902A ST-NIC.
18 #include <mach-se/mach/se.h>
29 #define half unsigned short macro
97 *(vhalf *) (PA_83902 + ((reg) << 1)) = ((half) (val) << 8); in STNIC_WRITE()
109 return -ENODEV; in stnic_probe()
114 return -ENOMEM; in stnic_probe()
122 dev->base_addr = 0x1000; in stnic_probe()
123 dev->irq = IRQ_STNIC; in stnic_probe()
124 dev->netdev_ops = &ei_netdev_ops; in stnic_probe()
128 err = request_irq (dev->irq, ei_interrupt, 0, DRV_NAME, dev); in stnic_probe()
130 netdev_emerg(dev, " unable to get IRQ %d.\n", dev->irq); in stnic_probe()
135 ei_status.name = dev->name; in stnic_probe()
153 ei_local->msg_enable = stnic_msg_enable; in stnic_probe()
157 free_irq(dev->irq, dev); in stnic_probe()
163 netdev_info(dev, "NS ST-NIC 83902A\n"); in stnic_probe()
186 half buf[2]; in stnic_get_hdr()
198 hdr->next = buf[0] >> 8; in stnic_get_hdr()
199 hdr->status = buf[0] & 0xff; in stnic_get_hdr()
201 hdr->count = buf[1]; in stnic_get_hdr()
203 hdr->count = ((buf[1] >> 8) & 0xff) | (buf[1] << 8); in stnic_get_hdr()
207 ring_page, hdr->status, hdr->next, hdr->count); in stnic_get_hdr()
214 The HP LAN doesn't use shared memory -- we put the packet
221 char *buf = skb->data; in stnic_block_input()
222 half val; in stnic_block_input()
244 length -= sizeof (half); in stnic_block_input()
254 STNIC_WRITE (PG0_RBCR0, 1); /* Write non-zero value */ in stnic_block_output()
270 *(vhalf *) PA_83902_IF = ((half) buf[1] << 8) | buf[0]; in stnic_block_output()
272 *(vhalf *) PA_83902_IF = ((half) buf[0] << 8) | buf[1]; in stnic_block_output()
275 buf += sizeof (half); in stnic_block_output()
276 length -= sizeof (half); in stnic_block_output()
293 free_irq(stnic_dev->irq, stnic_dev); in stnic_cleanup()