Lines Matching +full:serial +full:- +full:shift +full:- +full:bits

34 /* Register definitions for TI 113X PCI-to-CardBus bridges */
166 #define ti_sysctl(socket) ((socket)->private[0])
167 #define ti_cardctl(socket) ((socket)->private[1])
168 #define ti_devctl(socket) ((socket)->private[2])
169 #define ti_diag(socket) ((socket)->private[3])
170 #define ti_mfunc(socket) ((socket)->private[4])
171 #define ene_test_c9(socket) ((socket)->private[5])
184 if (socket->dev->vendor == PCI_VENDOR_ID_ENE) in ti_save_state()
196 if (socket->dev->vendor == PCI_VENDOR_ID_ENE) in ti_restore_state()
224 * itself about this - do we need to force func0, if so we need
232 int shift = 0; in ti1250_zoom_video() local
240 if(PCI_FUNC(socket->dev->devfn)==1) in ti1250_zoom_video()
241 shift = 1; in ti1250_zoom_video()
246 reg |= shift<<6; /* Favour our socket */ in ti1250_zoom_video()
247 reg |= 1<<shift; /* Socket zoom video on */ in ti1250_zoom_video()
252 reg |= (1^shift)<<6; /* Favour other socket */ in ti1250_zoom_video()
253 reg &= ~(1<<shift); /* Socket zoon video off */ in ti1250_zoom_video()
261 if(socket->dev->vendor == PCI_VENDOR_ID_TI) in ti_set_zv()
263 switch(socket->dev->device) in ti_set_zv()
270 socket->socket.zoom_video = ti_zoom_video; in ti_set_zv()
276 socket->socket.zoom_video = ti1250_zoom_video; in ti_set_zv()
283 * Generic TI init - TI has an extension for the
287 * - override: disable the PCI CSC interrupt. This makes
290 * - init: set the interrupt to match our PCI state.
299 if (socket->dev->irq) in ti_init()
321 int isa_irq = -1; in ti113x_use_isa_irq()
336 socket->cb_irq = isa_irq; in ti113x_use_isa_irq()
344 dev_info(&socket->dev->dev, in ti113x_use_isa_irq()
355 if (socket->dev->irq) in ti113x_override()
375 dev_info(&socket->dev->dev, "TI: mfunc 0x%08x, devctl 0x%02x\n", in ti12xx_irqroute_func0()
388 * find the right setting (all serial or parallel) in ti12xx_irqroute_func0()
390 dev_info(&socket->dev->dev, in ti12xx_irqroute_func0()
393 /* for serial PCI make sure MFUNC3 is set to IRQSER */ in ti12xx_irqroute_func0()
395 switch (socket->dev->device) { in ti12xx_irqroute_func0()
415 dev_info(&socket->dev->dev, in ti12xx_irqroute_func0()
416 "TI: all-serial interrupts ok\n"); in ti12xx_irqroute_func0()
425 if (pci_irq_status == -1) in ti12xx_irqroute_func0()
430 /* serial PCI interrupts not working fall back to parallel */ in ti12xx_irqroute_func0()
431 dev_info(&socket->dev->dev, in ti12xx_irqroute_func0()
434 devctl |= TI113X_DCR_IMODE_SERIAL; /* serial ISA could be right */ in ti12xx_irqroute_func0()
439 switch (socket->dev->device) { in ti12xx_irqroute_func0()
463 dev_info(&socket->dev->dev, "TI: parallel PCI interrupts ok\n"); in ti12xx_irqroute_func0()
474 socket->cb_irq = 0; in ti12xx_irqroute_func0()
475 dev_info(&socket->dev->dev, in ti12xx_irqroute_func0()
487 func0 = pci_get_slot(socket->dev->bus, socket->dev->devfn & ~0x07); in ti12xx_align_irqs()
492 *old_irq = socket->cb_irq; in ti12xx_align_irqs()
493 socket->cb_irq = socket->dev->irq = func0->irq; in ti12xx_align_irqs()
533 socket->cb_irq = socket->dev->irq = old_irq; in ti12xx_untie_interrupts()
538 * only touches MFUNC for INTB routing. all other bits are taken
548 dev_info(&socket->dev->dev, "TI: mfunc 0x%08x, devctl 0x%02x\n", in ti12xx_irqroute_func1()
568 dev_info(&socket->dev->dev, in ti12xx_irqroute_func1()
571 /* if all serial: set INTRTIE, probe again */ in ti12xx_irqroute_func1()
578 dev_info(&socket->dev->dev, in ti12xx_irqroute_func1()
579 "TI: all-serial interrupts, tied ok\n"); in ti12xx_irqroute_func1()
590 switch (socket->dev->device) { in ti12xx_irqroute_func1()
616 dev_info(&socket->dev->dev, in ti12xx_irqroute_func1()
624 if (pci_irq_status == -1) in ti12xx_irqroute_func1()
632 dev_info(&socket->dev->dev, in ti12xx_irqroute_func1()
643 socket->cb_irq = 0; in ti12xx_irqroute_func1()
644 dev_info(&socket->dev->dev, in ti12xx_irqroute_func1()
650 /* Returns true value if the second slot of a two-slot controller is empty */
660 /* catch the two-slot controllers */ in ti12xx_2nd_slot_empty()
661 switch (socket->dev->device) { in ti12xx_2nd_slot_empty()
700 /* single-slot controllers have the 2nd slot empty always :) */ in ti12xx_2nd_slot_empty()
706 devfn = socket->dev->devfn & ~0x07; in ti12xx_2nd_slot_empty()
707 func = pci_get_slot(socket->dev->bus, in ti12xx_2nd_slot_empty()
708 (socket->dev->devfn & 0x07) ? devfn : devfn | 0x01); in ti12xx_2nd_slot_empty()
718 if (socket->dev->device != func->device) in ti12xx_2nd_slot_empty()
726 yenta_get_status(&slot2->socket, &state); in ti12xx_2nd_slot_empty()
759 * all serial/tied: only disable when modparm set. always doing it in ti12xx_power_hook()
761 * interrupts for both both slots on 2-slot controllers in ti12xx_power_hook()
767 switch (socket->dev->device) { in ti12xx_power_hook()
789 if ((PCI_FUNC(socket->dev->devfn) == 0) || in ti12xx_power_hook()
793 switch (socket->dev->device) { in ti12xx_power_hook()
816 switch (socket->dev->device) { in ti12xx_power_hook()
848 if (disable_clkrun && PCI_FUNC(socket->dev->devfn) == 0) { in ti12xx_override()
849 dev_info(&socket->dev->dev, "Disabling CLKRUN feature\n"); in ti12xx_override()
853 dev_info(&socket->dev->dev, in ti12xx_override()
865 dev_info(&socket->dev->dev, "Using %s to route CSC interrupts to PCI\n", in ti12xx_override()
867 dev_info(&socket->dev->dev, "Routing CardBus interrupts to %s\n", in ti12xx_override()
871 if (PCI_FUNC(socket->dev->devfn) == 0) in ti12xx_override()
877 socket->socket.power_hook = ti12xx_power_hook; in ti12xx_override()
889 if (socket->cb_irq) in ti1250_override()
893 dev_info(&socket->dev->dev, in ti1250_override()
894 "adjusting diagnostic: %02x -> %02x\n", in ti1250_override()
911 * set/clear various test bits:
913 * - mask (u8) defines what bits to change
914 * - bits (u8) is the values to change them to
915 * -> it's
916 * current = (current & ~mask) | bits
919 #define DEVID(_vend,_dev,_subvend,_subdev,mask,bits) { \ argument
924 .driver_data = ((mask) << 8 | (bits)), \
941 u8 test_c9, old_c9, mask, bits; in ene_tune_bridge() local
943 list_for_each_entry(dev, &bus->devices, bus_list) { in ene_tune_bridge()
951 mask = (id->driver_data >> 8) & 0xFF; in ene_tune_bridge()
952 bits = id->driver_data & 0xFF; in ene_tune_bridge()
954 test_c9 = (test_c9 & ~mask) | bits; in ene_tune_bridge()
960 dev_info(&socket->dev->dev, in ene_tune_bridge()
961 "EnE: changing testregister 0xC9, %02x -> %02x\n", in ene_tune_bridge()
969 socket->socket.tune_bridge = ene_tune_bridge; in ene_override()