Lines Matching +full:data +full:- +full:shift
2 * Generic SH-4 / SH-4A PCIC operations (SH7751, SH7780).
4 * Copyright (C) 2002 - 2009 Paul Mundt
14 #include "pci-sh4.h"
20 (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3))
28 struct pci_channel *chan = bus->sysdata; in sh4_pci_read()
30 u32 data; in sh4_pci_read() local
38 data = pci_read_reg(chan, SH4_PCIPDR); in sh4_pci_read()
43 *val = (data >> ((where & 3) << 3)) & 0xff; in sh4_pci_read()
46 *val = (data >> ((where & 2) << 3)) & 0xffff; in sh4_pci_read()
49 *val = data; in sh4_pci_read()
66 struct pci_channel *chan = bus->sysdata; in sh4_pci_write()
68 int shift; in sh4_pci_write() local
69 u32 data; in sh4_pci_write() local
73 data = pci_read_reg(chan, SH4_PCIPDR); in sh4_pci_write()
78 shift = (where & 3) << 3; in sh4_pci_write()
79 data &= ~(0xff << shift); in sh4_pci_write()
80 data |= ((val & 0xff) << shift); in sh4_pci_write()
83 shift = (where & 2) << 3; in sh4_pci_write()
84 data &= ~(0xffff << shift); in sh4_pci_write()
85 data |= ((val & 0xffff) << shift); in sh4_pci_write()
88 data = val; in sh4_pci_write()
94 pci_write_reg(chan, data, SH4_PCIPDR); in sh4_pci_write()