Lines Matching refs:mantis
30 static int read_eeprom_byte(struct mantis_pci *mantis, u8 *data, u8 length) in read_eeprom_byte() argument
47 err = i2c_transfer(&mantis->adapter, msg, 2); in read_eeprom_byte()
59 static int get_mac_address(struct mantis_pci *mantis) in get_mac_address() argument
63 mantis->mac_address[0] = 0x08; in get_mac_address()
64 err = read_eeprom_byte(mantis, &mantis->mac_address[0], 6); in get_mac_address()
71 " MAC Address=[%pM]\n", mantis->mac_address); in get_mac_address()
84 static void mantis_load_config(struct mantis_pci *mantis) in mantis_load_config() argument
86 switch (mantis->subsystem_device) { in mantis_load_config()
88 mantis->hwconfig = &vp1033_mantis_config; in mantis_load_config()
91 mantis->hwconfig = &vp1034_mantis_config; in mantis_load_config()
95 mantis->hwconfig = &vp1041_mantis_config; in mantis_load_config()
98 mantis->hwconfig = &vp2033_mantis_config; in mantis_load_config()
103 mantis->hwconfig = &vp2040_mantis_config; in mantis_load_config()
106 mantis->hwconfig = &vp3030_mantis_config; in mantis_load_config()
109 mantis->hwconfig = &unknown_device; in mantis_load_config()
114 int mantis_core_init(struct mantis_pci *mantis) in mantis_core_init() argument
118 mantis_load_config(mantis); in mantis_core_init()
120 mantis->hwconfig->model_name, mantis->hwconfig->dev_type, in mantis_core_init()
121 mantis->pdev->bus->number, PCI_SLOT(mantis->pdev->devfn), PCI_FUNC(mantis->pdev->devfn)); in mantis_core_init()
123 mantis->revision, in mantis_core_init()
124 mantis->subsystem_vendor, mantis->subsystem_device); in mantis_core_init()
127 mantis->pdev->irq, mantis->latency, in mantis_core_init()
128 mantis->mantis_addr, mantis->mantis_mmio); in mantis_core_init()
130 err = mantis_i2c_init(mantis); in mantis_core_init()
135 err = get_mac_address(mantis); in mantis_core_init()
140 err = mantis_dma_init(mantis); in mantis_core_init()
145 err = mantis_dvb_init(mantis); in mantis_core_init()
150 err = mantis_uart_init(mantis); in mantis_core_init()
159 int mantis_core_exit(struct mantis_pci *mantis) in mantis_core_exit() argument
161 mantis_dma_stop(mantis); in mantis_core_exit()
164 mantis_uart_exit(mantis); in mantis_core_exit()
167 if (mantis_dma_exit(mantis) < 0) in mantis_core_exit()
169 if (mantis_dvb_exit(mantis) < 0) in mantis_core_exit()
171 if (mantis_i2c_exit(mantis) < 0) in mantis_core_exit()
178 void gpio_set_bits(struct mantis_pci *mantis, u32 bitpos, u8 value) in gpio_set_bits() argument
184 mantis->gpio_status = cur | (1 << bitpos); in gpio_set_bits()
186 mantis->gpio_status = cur & (~(1 << bitpos)); in gpio_set_bits()
188 mmwrite(mantis->gpio_status, MANTIS_GPIF_ADDR); in gpio_set_bits()
194 void mantis_set_direction(struct mantis_pci *mantis, int direction) in mantis_set_direction() argument