#include <stdint.h>
#include <gpxe/api.h>
#include <config/ioapi.h>
#include <gpxe/uaccess.h>
#include <gpxe/efi/efi_io.h>
#include <bits/io.h>
Go to the source code of this file.
Defines | |
| #define | IOAPI_INLINE(_subsys, _api_func) SINGLE_API_INLINE ( IOAPI_PREFIX_ ## _subsys, _api_func ) |
| Calculate static inline I/O API function name. | |
| #define | PROVIDE_IOAPI(_subsys, _api_func, _func) PROVIDE_SINGLE_API ( IOAPI_PREFIX_ ## _subsys, _api_func, _func ) |
| Provide an I/O API implementation. | |
| #define | PROVIDE_IOAPI_INLINE(_subsys, _api_func) PROVIDE_SINGLE_API_INLINE ( IOAPI_PREFIX_ ## _subsys, _api_func ) |
| Provide a static inline I/O API implementation. | |
| #define | IOAPI_READ(_func, _type, io_addr, _prefix, _ndigits) |
| Wrap an I/O read. | |
| #define | IOAPI_WRITE(_func, _type, data, io_addr, _prefix, _ndigits) |
| Wrap an I/O write. | |
| #define | IOAPI_READS(_func, _type, io_addr, data, count, _prefix, _ndigits) |
| Wrap an I/O string read. | |
| #define | IOAPI_WRITES(_func, _type, io_addr, data, count, _prefix, _ndigits) |
| Wrap an I/O string write. | |
| #define | readb(io_addr) IOAPI_READ ( readb, uint8_t, io_addr, "MEM", 2 ) |
| #define | readw(io_addr) IOAPI_READ ( readw, uint16_t, io_addr, "MEM", 4 ) |
| #define | readl(io_addr) IOAPI_READ ( readl, uint32_t, io_addr, "MEM", 8 ) |
| #define | readq(io_addr) IOAPI_READ ( readq, uint64_t, io_addr, "MEM", 16 ) |
| #define | writeb(data, io_addr) IOAPI_WRITE ( writeb, uint8_t, data, io_addr, "MEM", 2 ) |
| #define | writew(data, io_addr) IOAPI_WRITE ( writew, uint16_t, data, io_addr, "MEM", 4 ) |
| #define | writel(data, io_addr) IOAPI_WRITE ( writel, uint32_t, data, io_addr, "MEM", 8 ) |
| #define | writeq(data, io_addr) IOAPI_WRITE ( writeq, uint64_t, data, io_addr, "MEM", 16 ) |
| #define | inb(io_addr) IOAPI_READ ( inb, uint8_t, io_addr, "IO", 2 ) |
| #define | inw(io_addr) IOAPI_READ ( inw, uint16_t, io_addr, "IO", 4 ) |
| #define | inl(io_addr) IOAPI_READ ( inl, uint32_t, io_addr, "IO", 8 ) |
| #define | outb(data, io_addr) IOAPI_WRITE ( outb, uint8_t, data, io_addr, "IO", 2 ) |
| #define | outw(data, io_addr) IOAPI_WRITE ( outw, uint16_t, data, io_addr, "IO", 4 ) |
| #define | outl(data, io_addr) IOAPI_WRITE ( outl, uint32_t, data, io_addr, "IO", 8 ) |
| #define | insb(io_addr, data, count) IOAPI_READS ( insb, uint8_t, io_addr, data, count, "IO", 2 ) |
| #define | insw(io_addr, data, count) IOAPI_READS ( insw, uint16_t, io_addr, data, count, "IO", 4 ) |
| #define | insl(io_addr, data, count) IOAPI_READS ( insl, uint32_t, io_addr, data, count, "IO", 8 ) |
| #define | outsb(io_addr, data, count) IOAPI_WRITES ( outsb, uint8_t, io_addr, data, count, "IO", 2 ) |
| #define | outsw(io_addr, data, count) IOAPI_WRITES ( outsw, uint16_t, io_addr, data, count, "IO", 4 ) |
| #define | outsl(io_addr, data, count) IOAPI_WRITES ( outsl, uint32_t, io_addr, data, count, "IO", 8 ) |
| #define | INX_P(_func, _type, io_addr) |
| Read value from I/O-mapped device, slowly. | |
| #define | inb_p(io_addr) INX_P ( inb, uint8_t, io_addr ) |
| Read byte from I/O-mapped device. | |
| #define | inw_p(io_addr) INX_P ( inw, uint16_t, io_addr ) |
| Read 16-bit word from I/O-mapped device. | |
| #define | inl_p(io_addr) INX_P ( inl, uint32_t, io_addr ) |
| Read 32-bit dword from I/O-mapped device. | |
| #define | OUTX_P(_func, data, io_addr) |
| Write value to I/O-mapped device, slowly. | |
| #define | outb_p(data, io_addr) OUTX_P ( outb, data, io_addr ) |
| Write byte to I/O-mapped device, slowly. | |
| #define | outw_p(data, io_addr) OUTX_P ( outw, data, io_addr ) |
| Write 16-bit word to I/O-mapped device, slowly. | |
| #define | outl_p(data, io_addr) OUTX_P ( outl, data, io_addr ) |
| Write 32-bit dword to I/O-mapped device, slowly. | |
| #define | rmb() mb() |
| #define | wmb() mb() |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER) | |
| unsigned long | phys_to_bus (unsigned long phys_addr) |
| Convert physical address to a bus address. | |
| unsigned long | bus_to_phys (unsigned long bus_addr) |
| Convert bus address to a physical address. | |
| static __always_inline unsigned long | virt_to_bus (volatile const void *addr) |
| Convert virtual address to a bus address. | |
| static __always_inline void * | bus_to_virt (unsigned long bus_addr) |
| Convert bus address to a virtual address. | |
| void * | ioremap (unsigned long bus_addr, size_t len) |
| Map bus address as an I/O address. | |
| void | iounmap (volatile const void *io_addr) |
| Unmap I/O address. | |
| unsigned long | io_to_bus (volatile const void *io_addr) |
| Convert I/O address to bus address (for debug only). | |
| uint8_t | readb (volatile uint8_t *io_addr) |
| Read byte from memory-mapped device. | |
| uint16_t | readw (volatile uint16_t *io_addr) |
| Read 16-bit word from memory-mapped device. | |
| uint32_t | readl (volatile uint32_t *io_addr) |
| Read 32-bit dword from memory-mapped device. | |
| uint64_t | readq (volatile uint64_t *io_addr) |
| Read 64-bit qword from memory-mapped device. | |
| void | writeb (uint8_t data, volatile uint8_t *io_addr) |
| Write byte to memory-mapped device. | |
| void | writew (uint16_t data, volatile uint16_t *io_addr) |
| Write 16-bit word to memory-mapped device. | |
| void | writel (uint32_t data, volatile uint32_t *io_addr) |
| Write 32-bit dword to memory-mapped device. | |
| void | writeq (uint64_t data, volatile uint64_t *io_addr) |
| Write 64-bit qword to memory-mapped device. | |
| uint8_t | inb (volatile uint8_t *io_addr) |
| Read byte from I/O-mapped device. | |
| uint16_t | inw (volatile uint16_t *io_addr) |
| Read 16-bit word from I/O-mapped device. | |
| uint32_t | inl (volatile uint32_t *io_addr) |
| Read 32-bit dword from I/O-mapped device. | |
| void | outb (uint8_t data, volatile uint8_t *io_addr) |
| Write byte to I/O-mapped device. | |
| void | outw (uint16_t data, volatile uint16_t *io_addr) |
| Write 16-bit word to I/O-mapped device. | |
| void | outl (uint32_t data, volatile uint32_t *io_addr) |
| Write 32-bit dword to I/O-mapped device. | |
| void | insb (volatile uint8_t *io_addr, uint8_t *data, unsigned int count) |
| Read bytes from I/O-mapped device. | |
| void | insw (volatile uint16_t *io_addr, uint16_t *data, unsigned int count) |
| Read 16-bit words from I/O-mapped device. | |
| void | insl (volatile uint32_t *io_addr, uint32_t *data, unsigned int count) |
| Read 32-bit words from I/O-mapped device. | |
| void | outsb (volatile uint8_t *io_addr, const uint8_t *data, unsigned int count) |
| Write bytes to I/O-mapped device. | |
| void | outsw (volatile uint16_t *io_addr, const uint16_t *data, unsigned int count) |
| Write 16-bit words to I/O-mapped device. | |
| void | outsl (volatile uint32_t *io_addr, const uint32_t *data, unsigned int count) |
| Write 32-bit words to I/O-mapped device. | |
| void | iodelay (void) |
| Slow down I/O. | |
| void | mb (void) |
| Memory barrier. | |
The I/O API provides methods for reading from and writing to memory-mapped and I/O-mapped devices.
The standard methods (readl()/writel() etc.) do not strictly check the type of the address parameter; this is because traditional usage does not necessarily provide the correct pointer type. For example, code written for ISA devices at fixed I/O addresses (such as the keyboard controller) tend to use plain integer constants for the address parameter.
Definition in file io.h.
| #define IOAPI_INLINE | ( | _subsys, | |||
| _api_func | ) | SINGLE_API_INLINE ( IOAPI_PREFIX_ ## _subsys, _api_func ) |
| #define PROVIDE_IOAPI | ( | _subsys, | |||
| _api_func, | |||||
| _func | ) | PROVIDE_SINGLE_API ( IOAPI_PREFIX_ ## _subsys, _api_func, _func ) |
| #define PROVIDE_IOAPI_INLINE | ( | _subsys, | |||
| _api_func | ) | PROVIDE_SINGLE_API_INLINE ( IOAPI_PREFIX_ ## _subsys, _api_func ) |
| #define IOAPI_READ | ( | _func, | |||
| _type, | |||||
| io_addr, | |||||
| _prefix, | |||||
| _ndigits | ) |
Value:
( { \
volatile _type *_io_addr = \
( ( volatile _type * ) ( intptr_t ) (io_addr) ); \
_type _data = _func ( _io_addr ); \
DBGIO ( "[" _prefix " %08lx] => %0" #_ndigits "llx\n", \
io_to_bus ( _io_addr ), ( unsigned long long ) _data ); \
_data; } )
| _func | I/O API function | |
| _type | Data type | |
| io_addr | I/O address | |
| _prefix | Prefix for address in debug message | |
| _ndigits | Number of hex digits for this data type |
| #define IOAPI_WRITE | ( | _func, | |||
| _type, | |||||
| data, | |||||
| io_addr, | |||||
| _prefix, | |||||
| _ndigits | ) |
Value:
do { \ volatile _type *_io_addr = \ ( ( volatile _type * ) ( intptr_t ) (io_addr) ); \ _type _data = (data); \ DBGIO ( "[" _prefix " %08lx] <= %0" #_ndigits "llx\n", \ io_to_bus ( _io_addr ), ( unsigned long long ) _data ); \ _func ( _data, _io_addr ); \ } while ( 0 )
| _func | I/O API function | |
| _type | Data type | |
| data | Value to write | |
| io_addr | I/O address | |
| _prefix | Prefix for address in debug message | |
| _ndigits | Number of hex digits for this data type |
| #define IOAPI_READS | ( | _func, | |||
| _type, | |||||
| io_addr, | |||||
| data, | |||||
| count, | |||||
| _prefix, | |||||
| _ndigits | ) |
Value:
do { \ volatile _type *_io_addr = \ ( ( volatile _type * ) ( intptr_t ) (io_addr) ); \ void *_data_void = (data); /* Check data is a pointer */ \ _type * _data = ( ( _type * ) _data_void ); \ const _type * _dbg_data = _data; \ unsigned int _count = (count); \ unsigned int _dbg_count = _count; \ _func ( _io_addr, _data, _count ); \ DBGIO ( "[" _prefix " %08lx] =>", io_to_bus ( _io_addr ) ); \ while ( _dbg_count-- ) { \ DBGIO ( " %0" #_ndigits "llx", \ ( ( unsigned long long ) *(_dbg_data++) ) ); \ } \ DBGIO ( "\n" ); \ } while ( 0 )
| _func | I/O API function | |
| _type | Data type | |
| io_addr | I/O address | |
| data | Data buffer | |
| count | Number of elements to read | |
| _prefix | Prefix for address in debug message | |
| _ndigits | Number of hex digits for this data type |
| #define IOAPI_WRITES | ( | _func, | |||
| _type, | |||||
| io_addr, | |||||
| data, | |||||
| count, | |||||
| _prefix, | |||||
| _ndigits | ) |
Value:
do { \ volatile _type *_io_addr = \ ( ( volatile _type * ) ( intptr_t ) (io_addr) ); \ const void *_data_void = (data); /* Check data is a pointer */ \ const _type * _data = ( ( const _type * ) _data_void ); \ const _type * _dbg_data = _data; \ unsigned int _count = (count); \ unsigned int _dbg_count = _count; \ DBGIO ( "[" _prefix " %08lx] <=", io_to_bus ( _io_addr ) ); \ while ( _dbg_count-- ) { \ DBGIO ( " %0" #_ndigits "llx", \ ( ( unsigned long long ) *(_dbg_data++) ) ); \ } \ DBGIO ( "\n" ); \ _func ( _io_addr, _data, _count ); \ } while ( 0 )
| _func | I/O API function | |
| _type | Data type | |
| io_addr | I/O address | |
| data | Data buffer | |
| count | Number of elements to write | |
| _prefix | Prefix for address in debug message | |
| _ndigits | Number of hex digits for this data type |
| #define readb | ( | io_addr | ) | IOAPI_READ ( readb, uint8_t, io_addr, "MEM", 2 ) |
| #define readw | ( | io_addr | ) | IOAPI_READ ( readw, uint16_t, io_addr, "MEM", 4 ) |
| #define readl | ( | io_addr | ) | IOAPI_READ ( readl, uint32_t, io_addr, "MEM", 8 ) |
| #define readq | ( | io_addr | ) | IOAPI_READ ( readq, uint64_t, io_addr, "MEM", 16 ) |
Definition at line 252 of file io.h.
Referenced by __vxge_hw_device_host_info_get(), __vxge_hw_device_reg_addr_get(), __vxge_hw_device_register_poll(), __vxge_hw_device_toc_get(), __vxge_hw_kdfc_swapper_set(), __vxge_hw_legacy_swapper_set(), __vxge_hw_vpath_addr_get(), __vxge_hw_vpath_alarm_process(), __vxge_hw_vpath_card_info_get(), __vxge_hw_vpath_func_id_get(), __vxge_hw_vpath_fw_ver_get(), __vxge_hw_vpath_initialize(), __vxge_hw_vpath_kdfc_configure(), __vxge_hw_vpath_mac_configure(), __vxge_hw_vpath_mgmt_read(), __vxge_hw_vpath_pci_read(), __vxge_hw_vpath_prc_configure(), __vxge_hw_vpath_swapper_set(), __vxge_hw_vpath_tim_configure(), vxge_hw_device_begin_irq(), vxge_hw_device_hw_info_get(), vxge_hw_device_intr_enable(), vxge_hw_get_func_mode(), vxge_hw_set_fw_api(), vxge_hw_vpath_intr_enable(), vxge_hw_vpath_mtu_set(), vxge_hw_vpath_rx_doorbell_init(), vxge_hw_vpath_set_zero_rx_frm_len(), and vxge_hw_vpath_strip_fcs_check().
| #define writeb | ( | data, | |||
| io_addr | ) | IOAPI_WRITE ( writeb, uint8_t, data, io_addr, "MEM", 2 ) |
| #define writew | ( | data, | |||
| io_addr | ) | IOAPI_WRITE ( writew, uint16_t, data, io_addr, "MEM", 4 ) |
| #define writel | ( | data, | |||
| io_addr | ) | IOAPI_WRITE ( writel, uint32_t, data, io_addr, "MEM", 8 ) |
| #define writeq | ( | data, | |||
| io_addr | ) | IOAPI_WRITE ( writeq, uint64_t, data, io_addr, "MEM", 16 ) |
Definition at line 291 of file io.h.
Referenced by __vxge_hw_kdfc_swapper_set(), __vxge_hw_legacy_swapper_set(), __vxge_hw_non_offload_db_post(), __vxge_hw_read_rts_ds(), __vxge_hw_vpath_alarm_process(), __vxge_hw_vpath_initialize(), __vxge_hw_vpath_kdfc_configure(), __vxge_hw_vpath_mac_configure(), __vxge_hw_vpath_pci_read(), __vxge_hw_vpath_prc_configure(), __vxge_hw_vpath_swapper_set(), __vxge_hw_vpath_tim_configure(), vxge_hw_device_clear_tx_rx(), vxge_hw_device_hw_info_get(), vxge_hw_device_intr_disable(), vxge_hw_device_intr_enable(), vxge_hw_set_fw_api(), vxge_hw_vpath_doorbell_rx(), vxge_hw_vpath_intr_disable(), vxge_hw_vpath_intr_enable(), vxge_hw_vpath_mtu_set(), vxge_hw_vpath_rx_doorbell_init(), and vxge_hw_vpath_set_zero_rx_frm_len().
| #define inb | ( | io_addr | ) | IOAPI_READ ( inb, uint8_t, io_addr, "IO", 2 ) |
Definition at line 301 of file io.h.
Referenced by eepro_poll(), eepro_probe1(), eepro_reset(), empty_8042(), enable_multicast(), eth_pio_read(), eth_pio_write(), eth_probe(), gateA20_set(), get_scancode(), ifec_scb_cmd_wait(), isapnp_read_data(), load_timer2(), m80x_read_tick(), MIIDelay(), mtd_probe(), natsemi_spi_read_bit(), natsemi_spi_write_bit(), ne_poll(), ne_probe(), ne_probe1(), ns8390_poll(), ns8390_transmit(), pcnet32_probe(), read_eeprom(), ReadMII(), reload_eeprom(), rhine_irq(), rhine_poll(), rhine_probe1(), rhine_transmit(), rtl818x_ioread8(), rtl_spi_read_bit(), rtl_spi_write_bit(), sis190_get_mac_addr_from_apc(), sis630e_get_mac_addr(), smc9000_transmit(), t509_enable(), t509_find_id_port(), t509_poll(), t509_transmit(), t515_poll(), t515_reset(), t515_transmit(), t595_poll(), t595_reset(), t595_transmit(), timer2_running(), TLan_DioRead8(), vp_get(), vp_get_status(), vp_reset(), and WriteMII().
| #define inw | ( | io_addr | ) | IOAPI_READ ( inw, uint16_t, io_addr, "IO", 4 ) |
Definition at line 310 of file io.h.
Referenced by a3c90x_hw_start(), a3c90x_internal_IssueCommand(), a3c90x_internal_ReadEeprom(), a3c90x_internal_WaitForEeprom(), a3c90x_poll(), check_duplex(), corkscrew_probe1(), cs89x0_poll(), cs89x0_probe_addr(), eepro_poll(), eepro_transmit(), eeprom_read(), eisabus_probe(), epic100_probe(), eth_pio_read(), get_e(), hfa384x_getreg(), ifec_check_ru_status(), ifec_net_close(), ifec_net_poll(), ifec_net_transmit(), ifec_refill_rx_ring(), ifec_reset(), ifec_spi_read_bit(), ifec_spi_write_bit(), ifec_tx_wake(), init_media(), mii_read(), natsemi_reset(), pcnet32_wio_check(), pcnet32_wio_read_bcr(), pcnet32_wio_read_csr(), pcnet32_wio_read_rap(), pcnet32_wio_reset(), phy_read(), pnic_command_quiet(), ReadMII(), readreg(), rhine_irq(), rhine_poll(), rhine_probe1(), rhine_reset(), rtl818x_ioread16(), rtl_init_eeprom(), rtl_poll(), sis635_get_mac_addr(), smc9000_poll(), smc9000_probe(), smc9000_probe_addr(), smc9000_transmit(), smc_read_phy_register(), smc_write_phy_register(), sundance_irq(), sundance_poll(), sundance_probe(), sundance_reset(), t509_id_read_eeprom(), t509_poll(), t509_transmit(), t515_poll(), t515_probe(), t515_reset(), t515_transmit(), t595_poll(), t595_transmit(), t5x9_disable(), t5x9_probe(), TLan_DioRead16(), tlan_poll(), tlan_transmit(), vp_find_vq(), vxgetlink(), and WriteMII().
| #define inl | ( | io_addr | ) | IOAPI_READ ( inl, uint32_t, io_addr, "IO", 8 ) |
Definition at line 319 of file io.h.
Referenced by a3c90x_hw_start(), a3c90x_process_tx_packets(), a3c90x_transmit(), corkscrew_probe1(), davicom_disable(), davicom_probe(), davicom_reset(), getlinkstatus(), getlinktype(), ifec_mdio_read(), ifec_mdio_write(), init_media(), m80x_send_cmd_to_phy(), mdio_read(), mdio_write(), mii_read(), mtd_probe(), natsemi_open(), natsemi_poll(), natsemi_reset(), pcnet32_dwio_check(), pcnet32_dwio_read_bcr(), pcnet32_dwio_read_csr(), pcnet32_dwio_read_rap(), pcnet32_dwio_reset(), phy_read_1bit(), pnic_do_nway(), read_eeprom(), read_srom_word(), rtl818x_ioread32(), select_media(), set_rx_mode(), sis635_get_mac_addr(), sis900_check_mode(), sis900_disable(), sis900_init(), sis900_init_rxd(), sis900_init_rxfilter(), sis900_init_txd(), sis900_mdio_read(), sis900_poll(), sis900_probe(), sis900_read_eeprom(), sis900_reset(), sis900_transmit(), sis96x_get_mac_addr(), start_link(), sundance_probe(), sundance_reset(), t515_probe(), t515_reset(), TLan_DioRead32(), tlan_probe(), TLan_ResetAdapter(), tulip_disable(), tulip_probe(), tulip_reset(), tulip_transmit(), vp_find_vq(), vp_get_features(), vxgetlink(), and vxsetlink().
| #define outb | ( | data, | |||
| io_addr | ) | IOAPI_WRITE ( outb, uint8_t, data, io_addr, "IO", 2 ) |
Definition at line 328 of file io.h.
Referenced by a3c90x_hw_start(), a3c90x_poll(), cs89x0_reset(), eepro_disable(), eepro_poll(), eepro_reset(), eepro_transmit(), efi_iodelay(), eisa_device_enabled(), eisabus_probe(), enable_multicast(), eth_pio_read(), eth_pio_write(), eth_probe(), eth_rx_overrun(), gateA20_set(), ifec_scb_cmd(), ifec_tx_wake(), isapnp_write_address(), isapnp_write_data(), load_timer2(), m80x_read_tick(), natsemi_spi_write_bit(), ne_poll(), ne_probe(), ne_probe1(), ne_reset(), ne_transmit(), ns8390_poll(), ns8390_reset(), ns8390_transmit(), read_eeprom(), ReadMII(), reload_eeprom(), rhine_disable(), rhine_poll(), rhine_probe1(), rhine_reset(), rhine_transmit(), rtl818x_iowrite8(), rtl_open(), rtl_reset(), rtl_spi_write_bit(), send_nonspecific_eoi(), send_specific_eoi(), set_rx_mode(), sis190_get_mac_addr_from_apc(), sis630e_get_mac_addr(), sundance_reset(), t509_activate(), t509_deactivate_and_reset_tag(), t509_enable(), t509_find_id_port(), t509_global_reset(), t509_load_eeprom_word(), t509_reset_tag(), t509_select_tag(), t509_send_id_sequence(), t509_set_id_port(), t509_set_tag(), t509_transmit(), t509_wait_for_id_sequence(), t515_reset(), t515_transmit(), t595_reset(), t595_transmit(), TLan_DioWrite8(), TLan_FinishReset(), vp_reset(), vp_set_status(), and WriteMII().
| #define outw | ( | data, | |||
| io_addr | ) | IOAPI_WRITE ( outw, uint16_t, data, io_addr, "IO", 4 ) |
Definition at line 338 of file io.h.
Referenced by a3c90x_close(), a3c90x_hw_start(), a3c90x_internal_IssueCommand(), a3c90x_internal_ReadEeprom(), a3c90x_remove(), a3c90x_reset(), check_duplex(), corkscrew_probe1(), cs89x0_probe(), cs89x0_probe_addr(), cs89x0_reset(), cs89x0_transmit(), dm9132_id_table(), eepro_poll(), eepro_reset(), eepro_transmit(), eeprom_read(), eth_pio_write(), get_e(), hfa384x_setreg(), ifec_net_close(), ifec_net_irq(), ifec_net_poll(), ifec_spi_write_bit(), natsemi_open(), natsemi_reset(), nway_start(), pcnet32_wio_check(), pcnet32_wio_read_bcr(), pcnet32_wio_read_csr(), pcnet32_wio_write_bcr(), pcnet32_wio_write_csr(), pcnet32_wio_write_rap(), phy_write(), pnic_command_quiet(), readreg(), rhine_disable(), rhine_irq(), rhine_poll(), rhine_probe1(), rhine_reset(), rtl818x_iowrite16(), rtl_irq(), rtl_poll(), send_test_pkt(), set_rx_mode(), smc_phy_configure(), smc_read_phy_register(), smc_write_phy_register(), sundance_disable(), sundance_irq(), sundance_poll(), sundance_probe(), sundance_reset(), sundance_transmit(), t509_enable(), t509_poll(), t509_transmit(), t515_disable(), t515_poll(), t515_probe(), t515_reset(), t515_transmit(), t595_disable(), t595_poll(), t595_probe(), t595_reset(), t595_transmit(), t5x9_disable(), t5x9_probe(), TLan_DioRead16(), TLan_DioRead32(), TLan_DioRead8(), TLan_DioWrite16(), TLan_DioWrite32(), TLan_DioWrite8(), TLan_EeReceiveByte(), TLan_EeSendByte(), TLan_EeSendStart(), TLan_MiiReadReg(), TLan_MiiSendData(), TLan_MiiSync(), TLan_MiiWriteReg(), tlan_poll(), tlan_probe(), TLan_ResetAdapter(), vp_del_vq(), vp_find_vq(), vp_notify(), vxsetlink(), WriteMII(), and writereg().
| #define outl | ( | data, | |||
| io_addr | ) | IOAPI_WRITE ( outl, uint32_t, data, io_addr, "IO", 8 ) |
Definition at line 348 of file io.h.
Referenced by a3c90x_hw_start(), a3c90x_open(), a3c90x_transmit(), davicom_disable(), davicom_media_chk(), davicom_probe(), davicom_reset(), davicom_transmit(), dmfe_descriptor_init(), dmfe_disable(), dmfe_init_dm910x(), dmfe_transmit(), epic100_disable(), epic100_open(), epic100_poll(), epic100_probe(), epic100_transmit(), ifec_mdio_read(), ifec_mdio_write(), ifec_reset(), ifec_scb_cmd(), ifec_tx_wake(), init_media(), m80x_send_cmd_to_phy(), mdio_read(), mdio_write(), mii_read(), mtd_disable(), mtd_poll(), mtd_probe(), mtd_reset(), mtd_transmit(), natsemi_irq(), natsemi_open(), natsemi_poll(), natsemi_reset(), natsemi_transmit(), nway_start(), pcidirect_prepare(), pcnet32_dwio_check(), pcnet32_dwio_read_bcr(), pcnet32_dwio_read_csr(), pcnet32_dwio_write_bcr(), pcnet32_dwio_write_csr(), pcnet32_dwio_write_rap(), phy_read_1bit(), phy_write_1bit(), pnic_do_nway(), read_eeprom(), read_srom_word(), rhine_reset(), rtl818x_iowrite32(), rtl_open(), rtl_transmit(), select_media(), send_filter_frame(), set_rx_mode(), sis635_get_mac_addr(), sis900_check_mode(), sis900_disable(), sis900_init(), sis900_init_rxd(), sis900_init_rxfilter(), sis900_init_txd(), sis900_irq(), sis900_mdio_idle(), sis900_mdio_read(), sis900_mdio_reset(), sis900_poll(), sis900_probe(), sis900_read_eeprom(), sis900_reset(), sis900_set_rx_mode(), sis900_transmit(), sis96x_get_mac_addr(), start_link(), sundance_reset(), sundance_transmit(), t515_reset(), TLan_DioWrite32(), tlan_disable(), TLan_FinishReset(), tlan_poll(), TLan_ResetAdapter(), tlan_transmit(), tulip_disable(), tulip_probe(), tulip_reset(), tulip_transmit(), update_cr6(), vp_del_vq(), vp_find_vq(), vp_set_features(), and vxsetlink().
| #define insb | ( | io_addr, | |||
| data, | |||||
| count | ) | IOAPI_READS ( insb, uint8_t, io_addr, data, count, "IO", 2 ) |
| #define insw | ( | io_addr, | |||
| data, | |||||
| count | ) | IOAPI_READS ( insw, uint16_t, io_addr, data, count, "IO", 4 ) |
Definition at line 370 of file io.h.
Referenced by cs89x0_poll(), eepro_poll(), smc9000_poll(), t509_poll(), t515_poll(), and t595_poll().
| #define insl | ( | io_addr, | |||
| data, | |||||
| count | ) | IOAPI_READS ( insl, uint32_t, io_addr, data, count, "IO", 8 ) |
| #define outsb | ( | io_addr, | |||
| data, | |||||
| count | ) | IOAPI_WRITES ( outsb, uint8_t, io_addr, data, count, "IO", 2 ) |
| #define outsw | ( | io_addr, | |||
| data, | |||||
| count | ) | IOAPI_WRITES ( outsw, uint16_t, io_addr, data, count, "IO", 4 ) |
Definition at line 405 of file io.h.
Referenced by cs89x0_transmit(), eepro_transmit(), send_test_pkt(), smc9000_transmit(), t509_transmit(), t515_transmit(), and t595_transmit().
| #define outsl | ( | io_addr, | |||
| data, | |||||
| count | ) | IOAPI_WRITES ( outsl, uint32_t, io_addr, data, count, "IO", 8 ) |
| #define INX_P | ( | _func, | |||
| _type, | |||||
| io_addr | ) |
| #define inb_p | ( | io_addr | ) | INX_P ( inb, uint8_t, io_addr ) |
Read byte from I/O-mapped device.
| io_addr | I/O address |
| data | Value read |
Definition at line 444 of file io.h.
Referenced by empty_8042(), and mcabus_probe().
| #define inw_p | ( | io_addr | ) | INX_P ( inw, uint16_t, io_addr ) |
| #define inl_p | ( | io_addr | ) | INX_P ( inl, uint32_t, io_addr ) |
| #define OUTX_P | ( | _func, | |||
| data, | |||||
| io_addr | ) |
| #define outb_p | ( | data, | |||
| io_addr | ) | OUTX_P ( outb, data, io_addr ) |
Write byte to I/O-mapped device, slowly.
| data | Value to write | |
| io_addr | I/O address |
Definition at line 480 of file io.h.
Referenced by mcabus_probe().
| #define outw_p | ( | data, | |||
| io_addr | ) | OUTX_P ( outw, data, io_addr ) |
| #define outl_p | ( | data, | |||
| io_addr | ) | OUTX_P ( outl, data, io_addr ) |
| #define rmb | ( | ) | mb() |
Definition at line 503 of file io.h.
Referenced by bnx2_poll(), myri10ge_command(), myri10ge_interrupt_handler(), skge_rx_done(), sky2_status_intr(), and velocity_poll().
| #define wmb | ( | ) | mb() |
Definition at line 504 of file io.h.
Referenced by __vxge_hw_kdfc_swapper_set(), __vxge_hw_legacy_swapper_set(), __vxge_hw_non_offload_db_post(), __vxge_hw_pio_mem_write64(), __vxge_hw_read_rts_ds(), __vxge_hw_vpath_kdfc_configure(), __vxge_hw_vpath_pci_read(), __vxge_hw_vpath_swapper_set(), alloc_rx(), amd8111e_init_rx_ring(), amd8111e_poll(), amd8111e_transmit(), atl1e_read_phy_reg(), atl1e_reset_hw(), atl1e_tx_queue(), atl1e_write_phy_reg(), b44_transmit(), bnx2_poll(), bnx2_transmit(), clear_b0_fpga_memories(), e1000_transmit(), falcon_read(), falcon_write(), falcon_write_sram(), forcedeth_poll(), forcedeth_transmit(), mtnic_cmd(), mtnic_process_rx_cq(), mtnic_process_tx_cq(), mtnic_transmit(), myri10ge_command(), myri10ge_interrupt_handler(), myri10ge_net_poll(), myri10ge_net_transmit(), myri10ge_post_receive(), phantom_poll(), phantom_post_cds(), phantom_post_rds(), sis190_give_to_asic(), sis190_make_unusable_by_asic(), sis190_transmit(), skge_poll(), skge_rx_reuse(), skge_rx_setup(), skge_up(), skge_xmit_frame(), sky2_put_idx(), sky2_rx_stop(), velocity_give_many_rx_descs(), vring_add_buf(), vring_detach(), vring_get_buf(), vring_kick(), vring_more_used(), vxge_hw_device_hw_info_get(), vxge_hw_set_fw_api(), vxge_hw_vpath_doorbell_rx(), and vxge_open().
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
| unsigned long phys_to_bus | ( | unsigned long | phys_addr | ) |
Convert physical address to a bus address.
| phys_addr | Physical address |
| bus_addr | Bus address |
Referenced by virt_to_bus().
| unsigned long bus_to_phys | ( | unsigned long | bus_addr | ) |
Convert bus address to a physical address.
| bus_addr | Bus address |
| phys_addr | Physical address |
Referenced by bus_to_virt().
| static __always_inline unsigned long virt_to_bus | ( | volatile const void * | addr | ) | [inline, static] |
Convert virtual address to a bus address.
| addr | Virtual address |
| bus_addr | Bus address |
Definition at line 178 of file io.h.
References phys_to_bus(), and virt_to_phys().
Referenced by __vxge_hw_vpath_prc_configure(), a3c90x_open(), a3c90x_prepare_rx_desc(), a3c90x_process_tx_packets(), a3c90x_setup_rx_ring(), a3c90x_transmit(), amd8111e_init_rx_ring(), amd8111e_poll(), amd8111e_start(), amd8111e_transmit(), arbel_cmd(), arbel_complete(), arbel_create_cq(), arbel_create_qp(), arbel_create_recv_wq(), arbel_create_send_wq(), arbel_post_recv(), arbel_post_send(), ath5k_desc_alloc(), ath5k_rx_iob_alloc(), ath5k_txbuf_setup(), atl1e_setup_ring_resources(), atl1e_tx_map(), bnx2_alloc_mem(), bnx2_init_rx_ring(), bnx2_transmit(), davicom_init_chain(), davicom_reset(), dmfe_descriptor_init(), e1000_configure_rx(), e1000_configure_tx(), e1000_refill_rx_ring(), e1000_setup_tx_resources(), e1000_transmit(), e1000e_configure_rx(), e1000e_configure_tx(), e1000e_process_tx_packets(), e1000e_refill_rx_ring(), e1000e_setup_tx_resources(), e1000e_transmit(), epic100_init_ring(), falcon_alloc_special_buffer(), falcon_build_rx_desc(), falcon_build_tx_desc(), falcon_init_resources(), hermon_cmd(), hermon_fill_mlx_send_wqe(), hermon_fill_rc_send_wqe(), hermon_fill_ud_send_wqe(), hermon_post_recv(), ifec_net_open(), ifec_net_transmit(), ifec_refill_rx_ring(), ifec_reprime_ru(), ifec_tx_setup(), ifec_tx_wake(), igb_configure_rx(), igb_configure_tx(), igb_process_tx_packets(), igb_refill_rx_ring(), igb_setup_tx_resources(), igb_transmit(), init_ring(), linda_create_recv_wq(), linda_init_send(), linda_post_recv(), mtd_reset(), mtd_transmit(), mtnic_alloc_aligned(), mtnic_alloc_iobuf(), mtnic_map_cmd(), mtnic_transmit(), myri10ge_command(), myri10ge_net_open(), myri10ge_net_transmit(), myri10ge_post_receive(), natsemi_open(), natsemi_transmit(), pcnet32_probe(), pcnet32_reset(), phantom_create_rx_ctx(), phantom_create_tx_ctx(), phantom_issue_buf_cmd(), phantom_poll(), phantom_post_cds(), phantom_post_rds(), phantom_refill_rx_ring(), phantom_transmit(), rhine_init_ring(), rhine_reset(), rtl8169_populate_rx_descriptor(), rtl8169_process_rx_packets(), rtl8169_process_tx_packets(), rtl8169_setup_rx_resources(), rtl8169_setup_tx_resources(), rtl8169_transmit(), rtl818x_handle_rx(), rtl818x_init_rx_ring(), rtl818x_init_tx_ring(), rtl818x_tx(), rtl_open(), rtl_set_rx_tx_desc_registers(), rtl_transmit(), sis190_alloc_rx_iob(), sis190_open(), sis190_transmit(), sis900_init_rxd(), sis900_init_txd(), sis900_poll(), sis900_transmit(), skge_rx_setup(), skge_up(), skge_xmit_frame(), sky2_probe(), sky2_rx_map_iob(), sky2_up(), sky2_xmit_frame(), tg3_init_rings(), tg3_setup_hw(), tg3_transmit(), TLan_FinishReset(), TLan_ResetLists(), velocity_init_rings(), velocity_open(), velocity_transmit(), vxge_hw_fifo_txdl_buffer_set(), vxge_hw_fifo_txdl_post(), vxge_hw_ring_replenish(), vxge_hw_ring_rxd_1b_set(), and w89c840_reset().
00178 { 00179 return phys_to_bus ( virt_to_phys ( addr ) ); 00180 }
| static __always_inline void* bus_to_virt | ( | unsigned long | bus_addr | ) | [inline, static] |
Convert bus address to a virtual address.
| bus_addr | Bus address |
| addr | Virtual address |
Definition at line 190 of file io.h.
References bus_to_phys(), and phys_to_virt().
Referenced by atl1e_probe(), bnx2_poll(), eth_probe(), ne_poll(), ns8390_poll(), ns8390_transmit(), prism2_find_plx(), rhine_reset(), tg3_poll(), and velocity_poll().
00190 { 00191 return phys_to_virt ( bus_to_phys ( bus_addr ) ); 00192 }
| void* ioremap | ( | unsigned long | bus_addr, | |
| size_t | len | |||
| ) |
Map bus address as an I/O address.
| bus_addr | Bus address | |
| len | Length of region |
| io_addr | I/O address |
Referenced by amd8111e_probe(), arbel_probe(), arbel_start_firmware(), ath5k_probe(), b44_probe(), bnx2_init_board(), e1000_probe(), e1000e_probe(), efab_probe(), forcedeth_probe(), hermon_probe(), igb_probe(), linda_probe(), mtnic_alloc_cmdif(), mtnic_alloc_eq(), mtnic_alloc_ring(), mtnic_reset(), ns83820_probe(), phantom_map_crb(), prism2_pci_probe(), rtl8169_probe(), sis190_init_board(), skge_probe(), sky2_probe(), tg3_probe(), velocity_probe(), and vxge_probe().
| void iounmap | ( | volatile const void * | io_addr | ) |
Unmap I/O address.
| io_addr | I/O address |
Referenced by amd8111e_disable(), ath5k_probe(), ath5k_remove(), b44_probe(), b44_remove(), bnx2_disable(), e1000_probe(), e1000_remove(), e1000e_probe(), e1000e_remove(), efab_probe(), efab_remove(), igb_probe(), igb_remove(), mtnic_alloc_eq(), mtnic_close(), mtnic_disable(), mtnic_init_card(), mtnic_open(), mtnic_reset(), sis190_probe(), sis190_remove(), skge_probe(), skge_remove(), sky2_probe(), sky2_remove(), tg3_disable(), tg3_probe(), vxge_probe(), and vxge_remove().
| unsigned long io_to_bus | ( | volatile const void * | io_addr | ) |
Convert I/O address to bus address (for debug only).
| io_addr | I/O address |
| bus_addr | Bus address |
Read 16-bit word from memory-mapped device.
| io_addr | I/O address |
| data | Value read |
Read 32-bit dword from memory-mapped device.
| io_addr | I/O address |
| data | Value read |
Read 64-bit qword from memory-mapped device.
| io_addr | I/O address |
| data | Value read |
Read 16-bit word from I/O-mapped device.
| io_addr | I/O address |
| data | Value read |
Read 32-bit dword from I/O-mapped device.
| io_addr | I/O address |
| data | Value read |
Read bytes from I/O-mapped device.
| io_addr | I/O address | |
| data | Data buffer | |
| count | Number of bytes to read |
Read 16-bit words from I/O-mapped device.
| io_addr | I/O address | |
| data | Data buffer | |
| count | Number of words to read |
Read 32-bit words from I/O-mapped device.
| io_addr | I/O address | |
| data | Data buffer | |
| count | Number of words to read |
Write bytes to I/O-mapped device.
| io_addr | I/O address | |
| data | Data buffer | |
| count | Number of bytes to write |
Write 16-bit words to I/O-mapped device.
| io_addr | I/O address | |
| data | Data buffer | |
| count | Number of words to write |
Write 32-bit words to I/O-mapped device.
| io_addr | I/O address | |
| data | Data buffer | |
| count | Number of words to write |
| void iodelay | ( | void | ) |
| void mb | ( | void | ) |
1.5.7.1