Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | drivers/ata/pata_macio.c | static int pata_macio_resume(struct macio_dev *mdev) {
struct ata_host *host = macio_get_drvdata(mdev);
return pata_macio_do_resume(host->private_data);
}
#endif
#ifdef CONFIG_PMAC_MEDIABAY | [
0,
0
] |
Linux Kernel | drivers/ata/pata_macio.c |
static void pata_macio_pci_detach(struct pci_dev *pdev) {
struct ata_host *host = pci_get_drvdata(pdev);
ata_host_detach(host);
}
#ifdef CONFIG_PM_SLEEP | [
0,
0
] |
Linux Kernel | drivers/ata/pata_marvell.c | static int marvell_pre_reset(struct ata_link *link, unsigned long deadline) {
struct ata_port *ap = link->ap;
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
if (pdev->device == 0x6145 && ap->port_no == 0 && !marvell_pata_active(pdev))
return -ENOENT;
return ata_sff_prereset(link, deadline);
} | [
1,
0
] |
Linux Kernel | drivers/ata/pata_marvell.c | static int marvell_cable_detect(struct ata_port *ap) {
switch (ap->port_no) {
case 0:
if (!ap->ioaddr.bmdma_addr)
return ATA_CBL_PATA_UNK;
if (ioread8(ap->ioaddr.bmdma_addr + 1) & 1)
return ATA_CBL_PATA40;
return ATA_CBL_PATA80;
case 1: /* Legacy SATA port */
return ATA_CBL_SATA;
}
... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_mpc52xx.c |
static void mpc52xx_ata_apply_timings(struct mpc52xx_ata_priv *priv,
int device) {
struct mpc52xx_ata __iomem *regs = priv->ata_regs;
struct mpc52xx_ata_timings *timing = &priv->timings[device];
out_be32(®s->pio1, timing->pio1);
out_be32(®s->pio2, timing->pio2);
o... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_mpc52xx.c | static int mpc52xx_ata_hw_init(struct mpc52xx_ata_priv *priv) {
struct mpc52xx_ata __iomem *regs = priv->ata_regs;
int tslot;
out_be32(®s->share_cnt, 0);
/* Configure and reset host */
out_be32(®s->config, MPC52xx_ATA_HOSTCONF_IE | MPC52xx_ATA_HOSTCONF_IORDY |
MPC52xx_ATA... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_mpc52xx.c | static void mpc52xx_ata_set_piomode(struct ata_port *ap,
struct ata_device *adev) {
struct mpc52xx_ata_priv *priv = ap->host->private_data;
int pio, rv;
pio = adev->pio_mode - XFER_PIO_0;
rv = mpc52xx_ata_compute_pio_timings(priv, adev->devno, pio);
if (rv) {
dev_err... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_mpc52xx.c | static void mpc52xx_bmdma_stop(struct ata_queued_cmd *qc) {
struct ata_port *ap = qc->ap;
struct mpc52xx_ata_priv *priv = ap->host->private_data;
bcom_disable(priv->dmatsk);
bcom_ata_reset_bd(priv->dmatsk);
priv->waiting_for_dma = 0;
if (in_8(&priv->ata_regs->fifo_status) & MPC52xx_ATA_FIFOSTAT_ERROR)
... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_mpc52xx.c | static int mpc52xx_ata_init_one(struct device *dev,
struct mpc52xx_ata_priv *priv,
unsigned long raw_ata_regs, int mwdma_mask,
int udma_mask) {
struct ata_host *host;
struct ata_port *ap;
struct ata_ioports *aio;
ho... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_mpc52xx.c | static int mpc52xx_ata_suspend(struct platform_device *op, pm_message_t state) {
struct ata_host *host = platform_get_drvdata(op);
ata_host_suspend(host, state);
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_ninja32.c | static void ninja32_program(void __iomem *base) {
iowrite8(0x05, base + 0x01);
iowrite8(0xBE, base + 0x02); /* Burst, ?? setup */
iowrite8(0x01, base + 0x03); /* Unknown */
iowrite8(0x20, base + 0x04); /* WAIT0 */
iowrite8(0x8f, base + 0x05); /* Unknown */
iowrite8(0xa4, base + 0x1c); /* Unknown */
iowrit... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_ninja32.c | static int ninja32_init_one(struct pci_dev *dev,
const struct pci_device_id *id) {
struct ata_host *host;
struct ata_port *ap;
void __iomem *base;
int rc;
host = ata_host_alloc(&dev->dev, 1);
if (!host)
return -ENOMEM;
ap = host->ports[0];
rc = pcim_enable_device(dev);
... | [
1,
1
] |
Linux Kernel | drivers/ata/pata_ninja32.c | static int ninja32_reinit_one(struct pci_dev *pdev) {
struct ata_host *host = pci_get_drvdata(pdev);
int rc;
rc = ata_pci_device_do_resume(pdev);
if (rc)
return rc;
ninja32_program(host->iomap[0]);
ata_host_resume(host);
return 0;
}
#endif | [
0,
0
] |
Linux Kernel | drivers/ata/pata_ns87410.c | static unsigned int ns87410_qc_issue(struct ata_queued_cmd *qc) {
struct ata_port *ap = qc->ap;
struct ata_device *adev = qc->dev;
if (adev->pio_mode && adev != ap->private_data)
ns87410_set_piomode(ap, adev);
return ata_sff_qc_issue(qc);
} | [
1,
0
] |
Linux Kernel | drivers/ata/pata_ns87410.c |
static int ns87410_init_one(struct pci_dev *dev,
const struct pci_device_id *id) {
static const struct ata_port_info info = {.flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = ATA_PIO3,
.port_ops = &ns87410_por... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_ns87415.c | static void ns87415_bmdma_setup(struct ata_queued_cmd *qc) {
struct ata_port *ap = qc->ap;
unsigned int rw = (qc->tf.flags & ATA_TFLAG_WRITE);
u8 dmactl;
mb(); /* make sure PRD table writes are visible to controller */
iowrite32(ap->bmdma_prd_dma, ap->ioaddr.bmdma_addr + ATA_DMA_TABLE_OFS);
/* specify dat... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_ns87415.c | static void ns87415_bmdma_start(struct ata_queued_cmd *qc) {
ns87415_set_mode(qc->ap, qc->dev, qc->dev->dma_mode);
ata_bmdma_start(qc);
} | [
1,
1
] |
Linux Kernel | drivers/ata/pata_ns87415.c | static int ns87415_check_atapi_dma(struct ata_queued_cmd *qc) {
return -EOPNOTSUPP;
}
#if defined(CONFIG_SUPERIO) | [
0,
0
] |
Linux Kernel | drivers/ata/pata_ns87415.c | static int ns87415_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent) {
static const struct ata_port_info info = {
.flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = ATA_PIO4,
.mwdma_mask = ATA_MWDMA2,
.port_ops = &ns87415_pata_ops,
};
const struct ata_port_... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_ns87415.c | static int ns87415_reinit_one(struct pci_dev *pdev) {
struct ata_host *host = pci_get_drvdata(pdev);
int rc;
rc = ata_pci_device_do_resume(pdev);
if (rc)
return rc;
ns87415_fixup(pdev);
ata_host_resume(host);
return 0;
}
#endif | [
0,
0
] |
Linux Kernel | drivers/ata/pata_octeon_cf.c | static void octeon_cf_tf_read16(struct ata_port *ap, struct ata_taskfile *tf) {
u16 blob;
void __iomem *base = ap->ioaddr.data_addr;
blob = __raw_readw(base + 0xc);
tf->error = blob >> 8;
blob = __raw_readw(base + 2);
tf->nsect = blob & 0xff;
tf->lbal = blob >> 8;
blob = __raw_readw(base + 4);
tf-... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_octeon_cf.c | static int octeon_cf_softreset16(struct ata_link *link, unsigned int *classes,
unsigned long deadline) {
struct ata_port *ap = link->ap;
void __iomem *base = ap->ioaddr.data_addr;
int rc;
u8 err;
__raw_writew(ap->ctl, base + 0xe);
udelay(20);
__raw_writew(ap->ctl | ATA_SR... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_octeon_cf.c |
static void octeon_cf_ata_port_noaction(struct ata_port *ap) {} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_octeon_cf.c | static enum hrtimer_restart octeon_cf_delayed_finish(struct hrtimer *hrt) {
struct octeon_cf_port *cf_port =
container_of(hrt, struct octeon_cf_port, delayed_finish);
struct ata_port *ap = cf_port->ap;
struct ata_host *host = ap->host;
struct ata_queued_cmd *qc;
unsigned long flags;
u8 status;
enum ... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_octeon_cf.c | static void octeon_cf_dev_config(struct ata_device *dev) {
dev->max_sectors = min(dev->max_sectors, 4095U);
} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_octeon_cf.c | static unsigned int octeon_cf_qc_issue(struct ata_queued_cmd *qc) {
struct ata_port *ap = qc->ap;
switch (qc->tf.protocol) {
case ATA_PROT_DMA:
WARN_ON(qc->tf.flags & ATA_TFLAG_POLLING);
trace_ata_tf_load(ap, &qc->tf);
ap->ops->sff_tf_load(ap, &qc->tf);
trace_ata_bmdma_setup(ap, &qc->tf, qc->tag... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_oldpiix.c | static int oldpiix_pre_reset(struct ata_link *link, unsigned long deadline) {
struct ata_port *ap = link->ap;
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
static const struct pci_bits oldpiix_enable_bits[] = {
{0x41U, 1U, 0x80UL, 0x80UL}, {0x43U, 1U, 0x80UL, 0x80UL}, /* port 1 */
};
if (!pci_test_... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_optidma.c | static void optidma_unlock(struct ata_port *ap) {
void __iomem *regio = ap->ioaddr.cmd_addr;
ioread16(regio + 1);
ioread16(regio + 1);
iowrite8(3, regio + 2);
} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_optidma.c | static void optidma_set_pio_mode(struct ata_port *ap, struct ata_device *adev) {
optidma_mode_setup(ap, adev, adev->pio_mode);
} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_pdc2027x.c | static inline void __iomem *
dev_mmio(struct ata_port *ap, struct ata_device *adev, unsigned int offset) {
u8 adj = (adev->devno) ? 0x08 : 0x00;
return port_mmio(ap, offset) + adj;
} | [
1,
0
] |
Linux Kernel | drivers/ata/pata_pdc2027x.c | static int pdc2027x_cable_detect(struct ata_port *ap) {
u32 cgcr;
cgcr = ioread32(port_mmio(ap, PDC_GLOBAL_CTL));
if (cgcr & (1 << 26))
goto cbl40;
ata_port_dbg(ap, "No cable or 80-conductor cable\n");
return ATA_CBL_PATA80;
cbl40:
ata_port_info(ap, DRV_NAME ":40-conductor cable detected\n");
retur... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_pdc2027x.c | static long pdc_read_counter(struct ata_host *host) {
void __iomem *mmio_base = host->iomap[PDC_MMIO_BAR];
long counter;
int retry = 1;
u32 bccrl, bccrh, bccrlv, bccrhv;
retry:
bccrl = ioread32(mmio_base + PDC_BYTE_COUNT) & 0x7fff;
bccrh = ioread32(mmio_base + PDC_BYTE_COUNT + 0x100) & 0x7fff;
bccrlv = ... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_pdc2027x.c | static long pdc_detect_pll_input_clock(struct ata_host *host) {
void __iomem *mmio_base = host->iomap[PDC_MMIO_BAR];
u32 scr;
long start_count, end_count;
ktime_t start_time, end_time;
long pll_clock, usec_elapsed;
scr = ioread32(mmio_base + PDC_SYS_CTL);
dev_dbg(host->dev, "scr[%X]\n", scr);
iowrite32... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_pdc202xx_old.c |
static void pdc202xx_exec_command(struct ata_port *ap,
const struct ata_taskfile *tf) {
iowrite8(tf->command, ap->ioaddr.command_addr);
ndelay(400);
} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_pdc202xx_old.c | static void pdc202xx_set_dmamode(struct ata_port *ap, struct ata_device *adev) {
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
int port = 0x60 + 8 * ap->port_no + 4 * adev->devno;
static u8 udma_timing[6][2] = {{0x60, 0x03}, {0x40, 0x02},
{0x20, 0x01}, {0x40, 0x02}, /* 66 Mhz ... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_pdc202xx_old.c | static void pdc2026x_bmdma_start(struct ata_queued_cmd *qc) {
struct ata_port *ap = qc->ap;
struct ata_device *adev = qc->dev;
struct ata_taskfile *tf = &qc->tf;
int sel66 = ap->port_no ? 0x08 : 0x02;
void __iomem *master = ap->host->ports[0]->ioaddr.bmdma_addr;
void __iomem *clock = master + 0x11;
void ... | [
1,
1
] |
Linux Kernel | drivers/ata/pata_pdc202xx_old.c | static void pdc2026x_bmdma_stop(struct ata_queued_cmd *qc) {
struct ata_port *ap = qc->ap;
struct ata_device *adev = qc->dev;
struct ata_taskfile *tf = &qc->tf;
int sel66 = ap->port_no ? 0x08 : 0x02;
void __iomem *master = ap->host->ports[0]->ioaddr.bmdma_addr;
void __iomem *clock = master + 0x11;
void ... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_pdc202xx_old.c | static void pdc2026x_dev_config(struct ata_device *adev) {
adev->max_sectors = 256;
} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_pdc202xx_old.c | static int pdc2026x_check_atapi_dma(struct ata_queued_cmd *qc) { return 1; } | [
0,
0
] |
Linux Kernel | drivers/ata/pata_piccolo.c | static void tosh_set_dmamode(struct ata_port *ap, struct ata_device *adev) {
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
u32 conf;
pci_read_config_dword(pdev, 0x5C, &conf);
conf &= 0x78FFE088;
if (adev->dma_mode >= XFER_UDMA_0) {
int udma = adev->dma_mode - XFER_UDMA_0;
conf |= 0x80000000;
c... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_piccolo.c | static int ata_tosh_init_one(struct pci_dev *dev,
const struct pci_device_id *id) {
static const struct ata_port_info info = {.flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = ATA_PIO5,
.mwdma_mask = ATA_MWDMA... | [
0,
1
] |
Linux Kernel | drivers/ata/pata_platform.c | static int pata_platform_set_mode(struct ata_link *link,
struct ata_device **unused) {
struct ata_device *dev;
ata_for_each_dev(dev, link, ENABLED) {
dev->pio_mode = dev->xfer_mode = XFER_PIO_0;
dev->xfer_shift = ATA_SHIFT_PIO;
dev->flags |= ATA_DFLAG_PIO;
ata_dev... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_pxa.c | static void pxa_bmdma_stop(struct ata_queued_cmd *qc) {
struct pata_pxa_data *pd = qc->ap->private_data;
enum dma_status status;
status = dmaengine_tx_status(pd->dma_chan, pd->dma_cookie, NULL);
if (status != DMA_ERROR && status != DMA_COMPLETE &&
wait_for_completion_timeout(&pd->dma_done, HZ))
ata_d... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_pxa.c | static unsigned char pxa_bmdma_status(struct ata_port *ap) {
struct pata_pxa_data *pd = ap->private_data;
unsigned char ret = ATA_DMA_INTR;
struct dma_tx_state state;
enum dma_status status;
status = dmaengine_tx_status(pd->dma_chan, pd->dma_cookie, &state);
if (status != DMA_COMPLETE)
ret |= ATA_DMA_E... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_rz1000.c | static int rz1000_fifo_disable(struct pci_dev *pdev) {
u16 reg;
if (pci_read_config_word(pdev, 0x40, ®) != 0)
return -1;
reg &= 0xDFFF;
if (pci_write_config_word(pdev, 0x40, reg) != 0)
return -1;
dev_info(&pdev->dev, "disabled chipset readahead.\n");
return 0;
} | [
1,
0
] |
Linux Kernel | drivers/ata/pata_rz1000.c | static int rz1000_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent) {
static const struct ata_port_info info = {.flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = ATA_PIO4,
.port_ops = &rz1000_port_... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_samsung_cf.c |
static void pata_s3c_set_endian(void __iomem *s3c_ide_regbase, u8 mode) {
u32 reg = readl(s3c_ide_regbase + S3C_ATA_CFG);
reg = mode ? (reg & ~S3C_ATA_CFG_SWAP) : (reg | S3C_ATA_CFG_SWAP);
writel(reg, s3c_ide_regbase + S3C_ATA_CFG);
} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_samsung_cf.c | static void pata_s3c_cfg_mode(void __iomem *s3c_ide_sfrbase) {
writel(readl(s3c_ide_sfrbase + S3C_CFATA_MUX) | S3C_CFATA_MUX_TRUEIDE,
s3c_ide_sfrbase + S3C_CFATA_MUX);
} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_samsung_cf.c | static int wait_for_host_ready(struct s3c_ide_info *info) {
ulong timeout;
void __iomem *fifo_reg = info->ide_addr + info->fifo_status_reg;
timeout = jiffies + msecs_to_jiffies(20);
while (time_before(jiffies, timeout)) {
if ((readl(fifo_reg) >> 28) == 0)
return 0;
}
return -EBUSY;
} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_samsung_cf.c | static void pata_s3c_tf_load(struct ata_port *ap,
const struct ata_taskfile *tf) {
struct ata_ioports *ioaddr = &ap->ioaddr;
unsigned int is_addr = tf->flags & ATA_TFLAG_ISADDR;
if (tf->ctl != ap->last_ctl) {
ata_outb(ap->host, tf->ctl, ioaddr->ctl_addr);
ap->last_ctl = tf->c... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_samsung_cf.c | static void pata_s3c_exec_command(struct ata_port *ap,
const struct ata_taskfile *tf) {
ata_outb(ap->host, tf->command, ap->ioaddr.command_addr);
ata_sff_pause(ap);
} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_samsung_cf.c | static u8 pata_s3c_check_altstatus(struct ata_port *ap) {
return ata_inb(ap->host, ap->ioaddr.altstatus_addr);
} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_samsung_cf.c | static int pata_s3c_softreset(struct ata_link *link, unsigned int *classes,
unsigned long deadline) {
struct ata_port *ap = link->ap;
unsigned int devmask = 0;
int rc;
u8 err;
if (pata_s3c_devchk(ap, 0))
devmask |= (1 << 0);
/* select device 0 again */
pata_s3c_dev_sele... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_samsung_cf.c | static void pata_s3c_set_devctl(struct ata_port *ap, u8 ctl) {
ata_outb(ap->host, ctl, ap->ioaddr.ctl_addr);
} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_samsung_cf.c |
static irqreturn_t pata_s3c_irq(int irq, void *dev_instance) {
struct ata_host *host = dev_instance;
struct s3c_ide_info *info = host->private_data;
u32 reg;
reg = readl(info->ide_addr + S3C_ATA_IRQ);
writel(reg, info->ide_addr + S3C_ATA_IRQ);
return ata_sff_interrupt(irq, dev_instance);
} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_sc1200.c | static unsigned int sc1200_qc_issue(struct ata_queued_cmd *qc) {
struct ata_port *ap = qc->ap;
struct ata_device *adev = qc->dev;
struct ata_device *prev = ap->private_data;
if (ata_dma_enabled(adev) && adev != prev && prev != NULL) {
/* Maybe, but do the channels match MWDMA/UDMA ? */
if ((ata_using_u... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_sc1200.c | static int sc1200_qc_defer(struct ata_queued_cmd *qc) {
struct ata_host *host = qc->ap->host;
struct ata_port *alt = host->ports[1 ^ qc->ap->port_no];
int rc;
rc = ata_std_qc_defer(qc);
if (rc != 0)
return rc;
/* Now apply serialization rules. Only allow a command if the
other channel state machi... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_sch.c | static void sch_set_piomode(struct ata_port *ap, struct ata_device *adev) {
unsigned int pio = adev->pio_mode - XFER_PIO_0;
struct pci_dev *dev = to_pci_dev(ap->host->dev);
unsigned int port = adev->devno ? D1TIM : D0TIM;
unsigned int data;
pci_read_config_dword(dev, port, &data);
/* set PIO mode */
dat... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_sch.c | static void sch_set_dmamode(struct ata_port *ap, struct ata_device *adev) {
unsigned int dma_mode = adev->dma_mode;
struct pci_dev *dev = to_pci_dev(ap->host->dev);
unsigned int port = adev->devno ? D1TIM : D0TIM;
unsigned int data;
pci_read_config_dword(dev, port, &data);
if (dma_mode >= XFER_UDMA_0) {
... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_sch.c | static int sch_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) {
const struct ata_port_info *ppi[] = {&sch_port_info, NULL};
ata_print_version_once(&pdev->dev, DRV_VERSION);
return ata_pci_bmdma_init_one(pdev, ppi, &sch_sht, NULL, 0);
} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_serverworks.c | static int oem_cable(struct ata_port *ap) {
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
if (pdev->subsystem_device & (1 << (ap->port_no + 14)))
return ATA_CBL_PATA80;
return ATA_CBL_PATA40;
} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_serverworks.c | static void serverworks_set_piomode(struct ata_port *ap,
struct ata_device *adev) {
static const u8 pio_mode[] = {0x5d, 0x47, 0x34, 0x22, 0x20};
int offset = 1 + 2 * ap->port_no - adev->devno;
int devbits = (2 * ap->port_no + adev->devno) * 4;
u16 csb5_pio;
struct pci_dev *... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_serverworks.c | static int serverworks_fixup_osb4(struct pci_dev *pdev) {
u32 reg;
struct pci_dev *isa_dev = pci_get_device(
PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4, NULL);
if (isa_dev) {
pci_read_config_dword(isa_dev, 0x64, ®);
reg &= ~0x00002000;
if (!(reg & 0x00004000))
dev_info(&p... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_serverworks.c | static int serverworks_reinit_one(struct pci_dev *pdev) {
struct ata_host *host = pci_get_drvdata(pdev);
int rc;
rc = ata_pci_device_do_resume(pdev);
if (rc)
return rc;
(void)serverworks_fixup(pdev);
ata_host_resume(host);
return 0;
}
#endif | [
0,
0
] |
Linux Kernel | drivers/ata/pata_sil680.c | static int sil680_seldev(struct ata_port *ap, struct ata_device *adev, int r) {
return 0xA0 + (ap->port_no << 4) + r + (adev->devno << 1);
} | [
1,
0
] |
Linux Kernel | drivers/ata/pata_sil680.c | static void sil680_set_piomode(struct ata_port *ap, struct ata_device *adev) {
static const u16 speed_p[5] = {0x328A, 0x2283, 0x1104, 0x10C3, 0x10C1};
static const u16 speed_t[5] = {0x328A, 0x2283, 0x1281, 0x10C3, 0x10C1};
int tfaddr = sil680_selreg(ap, 0x02);
int addr = sil680_seldev(ap, adev, 0x04);
int ad... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_sil680.c | static void sil680_set_dmamode(struct ata_port *ap, struct ata_device *adev) {
static const u8 ultra_table[2][7] = {
{0x0C, 0x07, 0x05, 0x04, 0x02, 0x01, 0xFF},
{0x0F, 0x0B, 0x07, 0x05, 0x03, 0x02, 0x01}, /* 133Mhz */
};
static const u16 dma_table[3] = {0x2208, 0x10C2, 0x10C1};
struct pci_dev *pdev... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_sis.c | static int sis_pre_reset(struct ata_link *link, unsigned long deadline) {
static const struct pci_bits sis_enable_bits[] = {
{0x4aU, 1U, 0x02UL, 0x02UL}, {0x4aU, 1U, 0x04UL, 0x04UL}, /* port 1 */
};
struct ata_port *ap = link->ap;
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
if (!pci_test_config_... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_sis.c | static void sis_100_set_piomode(struct ata_port *ap, struct ata_device *adev) {
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
int port = sis_old_port_base(adev);
int speed = adev->pio_mode - XFER_PIO_0;
static const u8 actrec[] = {0x00, 0x67, 0x44, 0x33, 0x31};
sis_set_fifo(ap, adev);
pci_write_confi... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_sis.c | static void sis_133_set_piomode(struct ata_port *ap, struct ata_device *adev) {
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
int port;
u32 t1;
int speed = adev->pio_mode - XFER_PIO_0;
static const u32 timing133[] = {0x28269000, 0x0C266000, 0x04263000,
0x0C0A3000, 0x0509... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_sis.c | static void sis_old_set_dmamode(struct ata_port *ap, struct ata_device *adev) {
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
int speed = adev->dma_mode - XFER_MW_DMA_0;
int drive_pci = sis_old_port_base(adev);
u16 timing;
static const u16 mwdma_bits[] = {0x008, 0x302, 0x301};
static const u16 udma_bit... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_sis.c | static void sis_100_set_dmamode(struct ata_port *ap, struct ata_device *adev) {
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
int speed = adev->dma_mode - XFER_MW_DMA_0;
int drive_pci = sis_old_port_base(adev);
u8 timing;
static const u8 udma_bits[] = {0x8B, 0x87, 0x85, 0x83, 0x82, 0x81};
pci_read_con... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_sis.c | static void sis_133_set_dmamode(struct ata_port *ap, struct ata_device *adev) {
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
int port;
u32 t1;
port = sis_port_base(adev);
pci_read_config_dword(pdev, port, &t1);
if (adev->dma_mode < XFER_UDMA_0) {
static const u32 timing_u100[] = {0x19154000, 0x0... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_sis.c | static unsigned int sis_133_mode_filter(struct ata_device *adev,
unsigned int mask) {
struct ata_port *ap = adev->link->ap;
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
int port = sis_port_base(adev);
u32 t1;
pci_read_config_dword(pdev, port, &t1);
if (!(t1 & 0... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_sl82c105.c | static void sl82c105_reset_engine(struct ata_port *ap) {
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
u16 val;
pci_read_config_word(pdev, 0x7E, &val);
pci_write_config_word(pdev, 0x7E, val | 4);
pci_write_config_word(pdev, 0x7E, val & ~4);
} | [
0,
0
] |
Linux Kernel | drivers/ata/pata_sl82c105.c | static int sl82c105_bridge_revision(struct pci_dev *pdev) {
struct pci_dev *bridge;
bridge = pci_get_slot(pdev->bus, PCI_DEVFN(PCI_SLOT(pdev->devfn), 0));
if (!bridge)
return -1;
/*
* Make sure it is a Winbond 553 and is an ISA bridge.
*/
if (bridge->vendor != PCI_VENDOR_ID_WINBOND ||
bridge... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_triflex.c | static int triflex_prereset(struct ata_link *link, unsigned long deadline) {
static const struct pci_bits triflex_enable_bits[] = {{0x80, 1, 0x01, 0x01},
{0x80, 1, 0x02, 0x02}};
struct ata_port *ap = link->ap;
struct pci_dev *pdev = to_pci_dev(ap->host->dev... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_triflex.c | static void triflex_load_timing(struct ata_port *ap, struct ata_device *adev,
int speed) {
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
u32 timing = 0;
u32 triflex_timing, old_triflex_timing;
int channel_offset = ap->port_no ? 0x74 : 0x70;
unsigned int is_slave = (adev->de... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_triflex.c | static void triflex_bmdma_stop(struct ata_queued_cmd *qc) {
ata_bmdma_stop(qc);
triflex_load_timing(qc->ap, qc->dev, qc->dev->pio_mode);
} | [
1,
0
] |
Linux Kernel | drivers/ata/pata_triflex.c |
static int triflex_init_one(struct pci_dev *dev,
const struct pci_device_id *id) {
static const struct ata_port_info info = {.flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = ATA_PIO4,
.mwdma_mask = ATA_MWDMA2... | [
0,
0
] |
Linux Kernel | drivers/ata/pata_via.c |
static void via_set_piomode(struct ata_port *ap, struct ata_device *adev) {
const struct via_isa_bridge *config = ap->host->private_data;
int set_ast = (config->flags & VIA_BAD_AST) ? 0 : 1;
via_do_set_mode(ap, adev, adev->pio_mode, set_ast, config->udma_mask);
} | [
1,
0
] |
Linux Kernel | drivers/ata/pata_via.c |
static int via_port_start(struct ata_port *ap) {
struct via_port *vp;
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
int ret = ata_bmdma_port_start(ap);
if (ret < 0)
return ret;
vp = devm_kzalloc(&pdev->dev, sizeof(struct via_port), GFP_KERNEL);
if (vp == NULL)
return -ENOMEM;
ap->private_da... | [
1,
0
] |
Linux Kernel | drivers/ata/pata_via.c | static int via_reinit_one(struct pci_dev *pdev) {
struct ata_host *host = pci_get_drvdata(pdev);
int rc;
rc = ata_pci_device_do_resume(pdev);
if (rc)
return rc;
via_fixup(pdev, host->private_data);
ata_host_resume(host);
return 0;
}
#endif | [
0,
0
] |
Linux Kernel | drivers/ata/pdc_adma.c | static void adma_reset_engine(struct ata_port *ap) {
void __iomem *chan = ADMA_PORT_REGS(ap);
writew(aPIOMD4 | aNIEN | aRSTADM, chan + ADMA_CONTROL);
udelay(2);
writew(aPIOMD4, chan + ADMA_CONTROL);
udelay(2);
} | [
1,
0
] |
Linux Kernel | drivers/ata/pdc_adma.c | static inline void adma_enter_reg_mode(struct ata_port *ap) {
void __iomem *chan = ADMA_PORT_REGS(ap);
writew(aPIOMD4, chan + ADMA_CONTROL);
readb(chan + ADMA_STATUS);
} | [
0,
0
] |
Linux Kernel | drivers/ata/pdc_adma.c |
static void adma_thaw(struct ata_port *ap) { adma_reinit_engine(ap); } | [
0,
0
] |
Linux Kernel | drivers/ata/pdc_adma.c |
static inline unsigned int adma_intr_pkt(struct ata_host *host) {
unsigned int handled = 0, port_no;
for (port_no = 0; port_no < host->n_ports; ++port_no) {
struct ata_port *ap = host->ports[port_no];
struct adma_port_priv *pp;
struct ata_queued_cmd *qc;
void __iomem *chan = ADMA_PORT_REGS(ap);
... | [
1,
0
] |
Linux Kernel | drivers/ata/pdc_adma.c | static inline unsigned int adma_intr_mmio(struct ata_host *host) {
unsigned int handled = 0, port_no;
for (port_no = 0; port_no < host->n_ports; ++port_no) {
struct ata_port *ap = host->ports[port_no];
struct adma_port_priv *pp = ap->private_data;
struct ata_queued_cmd *qc;
if (!pp || pp->state !=... | [
1,
0
] |
Linux Kernel | drivers/ata/pdc_adma.c | static int adma_port_start(struct ata_port *ap) {
struct device *dev = ap->host->dev;
struct adma_port_priv *pp;
adma_enter_reg_mode(ap);
pp = devm_kzalloc(dev, sizeof(*pp), GFP_KERNEL);
if (!pp)
return -ENOMEM;
pp->pkt = dmam_alloc_coherent(dev, ADMA_PKT_BYTES, &pp->pkt_dma, GFP_KERNEL);
if (!pp->pk... | [
1,
0
] |
Linux Kernel | drivers/ata/pdc_adma.c | static void adma_host_init(struct ata_host *host, unsigned int chip_id) {
unsigned int port_no;
writeb(7, host->iomap[ADMA_MMIO_BAR] + ADMA_MODE_LOCK);
/* reset the ADMA logic */
for (port_no = 0; port_no < ADMA_PORTS; ++port_no)
adma_reset_engine(host->ports[port_no]);
} | [
0,
0
] |
Linux Kernel | drivers/ata/sata_dwc_460ex.c | static int sata_dwc_dma_get_channel_old(struct sata_dwc_device_port *hsdevp) {
struct sata_dwc_device *hsdev = hsdevp->hsdev;
struct dw_dma_slave *dws = &sata_dwc_dma_dws;
struct device *dev = hsdev->dev;
dma_cap_mask_t mask;
dws->dma_dev = dev;
dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
hsdev... | [
0,
0
] |
Linux Kernel | drivers/ata/sata_dwc_460ex.c | static int sata_dwc_dma_init_old(struct platform_device *pdev,
struct sata_dwc_device *hsdev) {
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
hsdev->dma = devm_kzalloc(dev, sizeof(*hsdev->dma), GFP_KERNEL);
if (!hsdev->dma)
return -ENOMEM;
hsdev... | [
1,
0
] |
Linux Kernel | drivers/ata/sata_dwc_460ex.c | static struct dma_async_tx_descriptor *
dma_dwc_xfer_setup(struct ata_queued_cmd *qc) {
struct ata_port *ap = qc->ap;
struct sata_dwc_device_port *hsdevp = HSDEVP_FROM_AP(ap);
struct sata_dwc_device *hsdev = HSDEV_FROM_AP(ap);
struct dma_slave_config sconf;
struct dma_async_tx_descriptor *desc;
if (qc->dma... | [
0,
0
] |
Linux Kernel | drivers/ata/sata_dwc_460ex.c |
static u32 qcmd_tag_to_mask(u8 tag) { return 0x00000001 << (tag & 0x1f); } | [
0,
0
] |
Linux Kernel | drivers/ata/sata_dwc_460ex.c |
static int sata_dwc_dma_get_channel(struct sata_dwc_device_port *hsdevp) {
struct sata_dwc_device *hsdev = hsdevp->hsdev;
struct device *dev = hsdev->dev;
#ifdef CONFIG_SATA_DWC_OLD_DMA
if (!of_find_property(dev->of_node, "dmas", NULL))
return sata_dwc_dma_get_channel_old(hsdevp);
#endif
hsdevp->chan = d... | [
0,
0
] |
Linux Kernel | drivers/ata/sata_dwc_460ex.c |
static unsigned int sata_dwc_qc_issue(struct ata_queued_cmd *qc) {
u32 sactive;
u8 tag = qc->hw_tag;
struct ata_port *ap = qc->ap;
struct sata_dwc_device_port *hsdevp = HSDEVP_FROM_AP(ap);
if (!ata_is_ncq(qc->tf.protocol))
tag = 0;
if (ata_is_dma(qc->tf.protocol)) {
hsdevp->desc[tag] = dma_dwc_xf... | [
0,
0
] |
Linux Kernel | drivers/ata/sata_dwc_460ex.c |
static void sata_dwc_error_handler(struct ata_port *ap) {
ata_sff_error_handler(ap);
} | [
0,
0
] |
Linux Kernel | drivers/ata/sata_dwc_460ex.c | static int sata_dwc_remove(struct platform_device *ofdev) {
struct device *dev = &ofdev->dev;
struct ata_host *host = dev_get_drvdata(dev);
struct sata_dwc_device *hsdev = host->private_data;
ata_host_detach(host);
phy_exit(hsdev->phy);
#ifdef CONFIG_SATA_DWC_OLD_DMA
sata_dwc_dma_exit_old(hsdev);
#endif... | [
0,
0
] |
Linux Kernel | drivers/ata/sata_fsl.c |
static void fsl_sata_set_irq_coalescing(struct ata_host *host,
unsigned int count,
unsigned int ticks) {
struct sata_fsl_host_priv *host_priv = host->private_data;
void __iomem *hcr_base = host_priv->hcr_base;
unsigned long flags;
... | [
1,
0
] |
Linux Kernel | drivers/ata/sata_fsl.c |
static ssize_t fsl_sata_intr_coalescing_show(struct device *dev,
struct device_attribute *attr,
char *buf) {
return sysfs_emit(buf, "%u %u\n", intr_coalescing_count,
intr_coalescing_ticks);
} | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.