diff options
author | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2014-10-31 12:37:49 +1100 |
---|---|---|
committer | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2014-11-07 12:49:35 +0100 |
commit | 2014111786cbbac34535844356c2655529bc28ae (patch) | |
tree | 7b705af7c4603d590247da8d72979e16f035ed53 | |
parent | e81b1f1699a030a0095216ccc4bd152c422e019b (diff) |
drivers/net/ne2k.c: Collect headers and defines to top of file
Change-Id: I2ffb0dd9fe400132f6d430f115f962b5f8578efa
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/7292
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
-rw-r--r-- | src/drivers/net/ne2k.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/drivers/net/ne2k.c b/src/drivers/net/ne2k.c index b678d799c3..250baf7877 100644 --- a/src/drivers/net/ne2k.c +++ b/src/drivers/net/ne2k.c @@ -27,6 +27,21 @@ SMC8416 PIO support added by Andrew Bettison (andrewb@zip.com.au) on 4/3/02 */ +#include <arch/io.h> +#include <console/console.h> +#include <console/ne2k.h> +#include <delay.h> +#include <device/device.h> +#include <device/pci.h> +#include <device/pci_ids.h> +#include <device/pci_ops.h> +#include <stdlib.h> +#include <string.h> +#include <ip_checksum.h> + +#include "ns8390.h" + + #define ETH_ALEN 6 /* Size of Ethernet address */ #define ETH_HLEN 14 /* Size of ethernet header */ #define ETH_ZLEN 60 /* Minimum packet */ @@ -34,15 +49,11 @@ SMC8416 PIO support added by Andrew Bettison (andrewb@zip.com.au) on 4/3/02 #define ETH_DATA_ALIGN 2 /* Amount needed to align the data after an ethernet header */ #define ETH_MAX_MTU (ETH_FRAME_LEN-ETH_HLEN) -#include "ns8390.h" -#include <ip_checksum.h> -#include <console/ne2k.h> -#include <arch/io.h> - #define MEM_SIZE MEM_32768 #define TX_START 64 #define RX_START (64 + D8390_TXBUF_SIZE) + static unsigned int get_count(unsigned int eth_nic_base) { unsigned int ret; @@ -415,17 +426,6 @@ int ne2k_init(unsigned int eth_nic_base) { #else -#include <delay.h> -#include <stdlib.h> -#include <string.h> -#include <arch/io.h> - -#include <console/console.h> -#include <device/device.h> -#include <device/pci.h> -#include <device/pci_ids.h> -#include <device/pci_ops.h> - static void read_resources(struct device *dev) { struct resource *res; @@ -455,4 +455,4 @@ static const struct pci_driver ne2k_driver __pci_driver = { .device = 0x8029, }; -#endif +#endif /* __PRE_RAM__ */ |