Message ID | 20210114032957.483086-13-sjg@chromium.org |
---|---|
State | Accepted |
Commit | 60868632f6d89f71aca547df01a075149ad96357 |
Delegated to: | Tom Rini |
Headers | show |
Series | Various minor clean-ups and improvements | expand |
On 1/14/21 12:29 PM, Simon Glass wrote: > At present if an eMMC part is in the system, the ACPI table generated > will include information about that, as well as the SD card. We only need > to include the SD card, since it has a card-detect GPIO. Use a different > compatible string for each option, and add code only for the SD card. > > Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Best Regards, Jaehoon Chung > --- > > drivers/mmc/pci_mmc.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/pci_mmc.c b/drivers/mmc/pci_mmc.c > index c71c495d581..6517d8268b2 100644 > --- a/drivers/mmc/pci_mmc.c > +++ b/drivers/mmc/pci_mmc.c > @@ -17,6 +17,12 @@ > #include <asm-generic/gpio.h> > #include <dm/acpi.h> > > +/* Type of MMC device */ > +enum { > + TYPE_SD, > + TYPE_EMMC, > +}; > + > struct pci_mmc_plat { > struct mmc_config cfg; > struct mmc mmc; > @@ -77,6 +83,8 @@ static int pci_mmc_acpi_fill_ssdt(const struct udevice *dev, > > if (!dev_has_ofnode(dev)) > return 0; > + if (dev_get_driver_data(dev) == TYPE_EMMC) > + return 0; > > ret = gpio_get_acpi(&priv->cd_gpio, &gpio); > if (ret) > @@ -120,7 +128,8 @@ struct acpi_ops pci_mmc_acpi_ops = { > }; > > static const struct udevice_id pci_mmc_match[] = { > - { .compatible = "intel,apl-sd" }, > + { .compatible = "intel,apl-sd", .data = TYPE_SD }, > + { .compatible = "intel,apl-emmc", .data = TYPE_EMMC }, > { } > }; > >
On Wed, Jan 13, 2021 at 08:29:52PM -0700, Simon Glass wrote: > At present if an eMMC part is in the system, the ACPI table generated > will include information about that, as well as the SD card. We only need > to include the SD card, since it has a card-detect GPIO. Use a different > compatible string for each option, and add code only for the SD card. > > Signed-off-by: Simon Glass <sjg@chromium.org> > Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Applied to u-boot/master, thanks!
diff --git a/drivers/mmc/pci_mmc.c b/drivers/mmc/pci_mmc.c index c71c495d581..6517d8268b2 100644 --- a/drivers/mmc/pci_mmc.c +++ b/drivers/mmc/pci_mmc.c @@ -17,6 +17,12 @@ #include <asm-generic/gpio.h> #include <dm/acpi.h> +/* Type of MMC device */ +enum { + TYPE_SD, + TYPE_EMMC, +}; + struct pci_mmc_plat { struct mmc_config cfg; struct mmc mmc; @@ -77,6 +83,8 @@ static int pci_mmc_acpi_fill_ssdt(const struct udevice *dev, if (!dev_has_ofnode(dev)) return 0; + if (dev_get_driver_data(dev) == TYPE_EMMC) + return 0; ret = gpio_get_acpi(&priv->cd_gpio, &gpio); if (ret) @@ -120,7 +128,8 @@ struct acpi_ops pci_mmc_acpi_ops = { }; static const struct udevice_id pci_mmc_match[] = { - { .compatible = "intel,apl-sd" }, + { .compatible = "intel,apl-sd", .data = TYPE_SD }, + { .compatible = "intel,apl-emmc", .data = TYPE_EMMC }, { } };
At present if an eMMC part is in the system, the ACPI table generated will include information about that, as well as the SD card. We only need to include the SD card, since it has a card-detect GPIO. Use a different compatible string for each option, and add code only for the SD card. Signed-off-by: Simon Glass <sjg@chromium.org> --- drivers/mmc/pci_mmc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)