]> Git Repo - J-u-boot.git/blame - drivers/ufs/ufs-pci.c
Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""
[J-u-boot.git] / drivers / ufs / ufs-pci.c
CommitLineData
2ec7d657
BM
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2023 tinylab.org
4 * Author: Bin Meng <[email protected]>
5 */
6
d678a59d 7#include <common.h>
2ec7d657
BM
8#include <dm.h>
9#include <errno.h>
10#include <pci.h>
11#include <ufs.h>
12#include <dm/device_compat.h>
13#include "ufs.h"
14
15static int ufs_pci_bind(struct udevice *dev)
16{
17 struct udevice *scsi_dev;
18
19 return ufs_scsi_bind(dev, &scsi_dev);
20}
21
22static int ufs_pci_probe(struct udevice *dev)
23{
24 int err;
25
26 err = ufshcd_probe(dev, NULL);
27 if (err)
28 dev_err(dev, "%s failed (ret=%d)\n", __func__, err);
29
30 return err;
31}
32
33U_BOOT_DRIVER(ufs_pci) = {
34 .name = "ufs_pci",
35 .id = UCLASS_UFS,
36 .bind = ufs_pci_bind,
37 .probe = ufs_pci_probe,
38};
39
40static struct pci_device_id ufs_supported[] = {
41 { PCI_DEVICE(PCI_VENDOR_ID_REDHAT, PCI_DEVICE_ID_REDHAT_UFS) },
42 {},
43};
44
45U_BOOT_PCI_DEVICE(ufs_pci, ufs_supported);
This page took 0.049904 seconds and 4 git commands to generate.