Lines Matching +full:probe +full:- +full:reset

1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Driver for PowerPC 4xx on-chip ethernet controller, TAH support.
29 mutex_lock(&dev->lock); in tah_attach()
30 /* Reset has been done at probe() time... nothing else to do for now */ in tah_attach()
31 ++dev->users; in tah_attach()
32 mutex_unlock(&dev->lock); in tah_attach()
41 mutex_lock(&dev->lock); in tah_detach()
42 --dev->users; in tah_detach()
43 mutex_unlock(&dev->lock); in tah_detach()
49 struct tah_regs __iomem *p = dev->base; in tah_reset()
52 /* Reset TAH */ in tah_reset()
53 out_be32(&p->mr, TAH_MR_SR); in tah_reset()
55 while ((in_be32(&p->mr) & TAH_MR_SR) && n) in tah_reset()
56 --n; in tah_reset()
59 printk(KERN_ERR "%pOF: reset timeout\n", ofdev->dev.of_node); in tah_reset()
62 out_be32(&p->mr, in tah_reset()
79 hdr->version = 0; in tah_dump_regs()
80 hdr->index = 0; /* for now, are there chips with more than one in tah_dump_regs()
84 memcpy_fromio(regs, dev->base, sizeof(struct tah_regs)); in tah_dump_regs()
93 dev = devm_kzalloc(&ofdev->dev, sizeof(struct tah_instance), in tah_probe()
96 return -ENOMEM; in tah_probe()
98 err = devm_mutex_init(&ofdev->dev, &dev->lock); in tah_probe()
102 dev->ofdev = ofdev; in tah_probe()
104 dev->base = devm_platform_ioremap_resource(ofdev, 0); in tah_probe()
105 if (IS_ERR(dev->base)) { in tah_probe()
106 dev_err(&ofdev->dev, "can't map device registers"); in tah_probe()
107 return PTR_ERR(dev->base); in tah_probe()
115 printk(KERN_INFO "TAH %pOF initialized\n", ofdev->dev.of_node); in tah_probe()
135 .name = "emac-tah",
138 .probe = tah_probe,