diff options
author | Marvin Borner | 2021-05-23 14:30:07 +0200 |
---|---|---|
committer | Marvin Borner | 2021-05-23 14:34:52 +0200 |
commit | 33fd97e19a12535c02b1cf6804cb854a279e040c (patch) | |
tree | 0ea00a9b60b35e42830eb3b13887fea2d356d655 /kernel/inc/drivers | |
parent | 0bf64a113f3d3baa110b362fd6a215ef29182671 (diff) |
Cleanup, linting, formatting
Diffstat (limited to 'kernel/inc/drivers')
-rw-r--r-- | kernel/inc/drivers/cpu.h | 2 | ||||
-rw-r--r-- | kernel/inc/drivers/pci.h | 4 | ||||
-rw-r--r-- | kernel/inc/drivers/rtl8139.h | 36 |
3 files changed, 3 insertions, 39 deletions
diff --git a/kernel/inc/drivers/cpu.h b/kernel/inc/drivers/cpu.h index 7ac6074..75e0495 100644 --- a/kernel/inc/drivers/cpu.h +++ b/kernel/inc/drivers/cpu.h @@ -5,7 +5,7 @@ #include <def.h> -static inline void spinlock(u32 *ptr) +UNUSED_FUNC static inline void spinlock(u32 *ptr) { u32 prev; do diff --git a/kernel/inc/drivers/pci.h b/kernel/inc/drivers/pci.h index 9429f29..ac288c6 100644 --- a/kernel/inc/drivers/pci.h +++ b/kernel/inc/drivers/pci.h @@ -76,14 +76,14 @@ static inline u8 pci_extract_func(u32 device) return (u8)(device); } -static inline u32 pci_get_addr(u32 device, int field) +UNUSED_FUNC static inline u32 pci_get_addr(u32 device, int field) { return 0x80000000 | (u32)(pci_extract_bus(device) << 16) | (u32)(pci_extract_slot(device) << 11) | (u32)(pci_extract_func(device) << 8) | ((field)&0xFC); } -static inline u32 pci_box_device(int bus, int slot, int func) +UNUSED_FUNC static inline u32 pci_box_device(int bus, int slot, int func) { return (u32)((bus << 16) | (slot << 8) | func); } diff --git a/kernel/inc/drivers/rtl8139.h b/kernel/inc/drivers/rtl8139.h deleted file mode 100644 index 0d748af..0000000 --- a/kernel/inc/drivers/rtl8139.h +++ /dev/null @@ -1,36 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner - -#ifndef RTL8139_H -#define RTL8139_H - -#include <def.h> - -#define RX_BUF_SIZE 0x2000 - -#define RTL8139_VENDOR_ID 0x10ec -#define RTL8139_DEVICE_ID 0x8139 - -#define RTL_ROK (1 << 0) -#define RTL_TOK (1 << 2) - -#define RTL_PORT_MAC 0x00 -#define RTL_PORT_MAR 0x08 -#define RTL_PORT_TXSTAT 0x10 -#define RTL_PORT_TXBUF 0x20 -#define RTL_PORT_RBSTART 0x30 -#define RTL_PORT_CMD 0x37 -#define RTL_PORT_RXPTR 0x38 -#define RTL_PORT_RXADDR 0x3A -#define RTL_PORT_IMR 0x3C -#define RTL_PORT_ISR 0x3E -#define RTL_PORT_TCR 0x40 -#define RTL_PORT_RCR 0x44 -#define RTL_PORT_RXMISS 0x4C -#define RTL_PORT_CONFIG 0x52 - -int rtl8139_install(void); -int rtl8139_installed(void); -void rtl8139_send_packet(void *data, u32 len) NONNULL; -u8 *rtl8139_get_mac(void); - -#endif |