Date: Fri, 19 Jun 2020 18:14:45 +0000 (UTC) From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362402 - stable/12/sys/dev/mmc Message-ID: <202006191814.05JIEj5q056625@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: manu Date: Fri Jun 19 18:14:45 2020 New Revision: 362402 URL: https://svnweb.freebsd.org/changeset/base/362402 Log: MFC r360007: Revert r359965 This cause board without a cd-gpio to not schedule a card detection. Modified: stable/12/sys/dev/mmc/mmc_fdt_helpers.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mmc/mmc_fdt_helpers.c ============================================================================== --- stable/12/sys/dev/mmc/mmc_fdt_helpers.c Fri Jun 19 18:10:39 2020 (r362401) +++ stable/12/sys/dev/mmc/mmc_fdt_helpers.c Fri Jun 19 18:14:45 2020 (r362402) @@ -217,7 +217,7 @@ cd_card_task(void *arg, int pending __unused) /* * Card detect setup. */ -static bool +static void cd_setup(struct mmc_fdt_helper *helper, phandle_t node) { int pincaps; @@ -237,7 +237,7 @@ cd_setup(struct mmc_fdt_helper *helper, phandle_t node helper->cd_disabled = true; if (bootverbose) device_printf(dev, "Non-removable media\n"); - return (false); + return; } /* @@ -250,14 +250,14 @@ cd_setup(struct mmc_fdt_helper *helper, phandle_t node */ if (gpio_pin_get_by_ofw_property(dev, node, "cd-gpios", &helper->cd_pin)) - return (false); + return; if (gpio_pin_getcaps(helper->cd_pin, &pincaps) != 0 || !(pincaps & GPIO_PIN_INPUT)) { device_printf(dev, "Cannot read card-detect gpio pin; " "setting card-always-present flag.\n"); helper->cd_disabled = true; - return (false); + return; } /* @@ -314,8 +314,6 @@ without_interrupts: device_get_nameunit(helper->cd_pin->dev), helper->cd_pin->pin, cd_mode_str); } - - return (true); } /* @@ -357,16 +355,14 @@ mmc_fdt_gpio_setup(device_t dev, phandle_t node, struc helper->dev = dev; helper->cd_handler = handler; + cd_setup(helper, node); wp_setup(helper, node); - if (cd_setup(helper, node)) { - /* - * Schedule a card detection - */ - taskqueue_enqueue_timeout_sbt(taskqueue_swi_giant, - &helper->cd_delayed_task, mstosbt(500), 0, C_PREL(2)); - } - + /* + * Schedule a card detection + */ + taskqueue_enqueue_timeout_sbt(taskqueue_swi_giant, + &helper->cd_delayed_task, mstosbt(500), 0, C_PREL(2)); return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006191814.05JIEj5q056625>