dwmmc: cleanup cmd and locking, consistency between mmc and mmccamIn general sprinkle locking assertions and harmonized KASSERTsthroughout the upper part of the driver to document expectations.I
dwmmc: cleanup cmd and locking, consistency between mmc and mmccamIn general sprinkle locking assertions and harmonized KASSERTsthroughout the upper part of the driver to document expectations.In dwmmc_cmd_done() "cmd" should be set correctly and be used forboth MMCCAM and classic mmc rather than special-casing mmccam.In dwmmc_next_operation() place variable declarations on the topfor both cases before the first debug and lock assertion calls;then factor out common parts at the end and put both cases in thesame order.By calling dwmmc_next_operation() directly from both dwmmc_request()in the mmc case, and dwmmc_cam_request() in the mmccase (rather than)chaining calls in the latter, we avoid unlocking the sc in the mmccamcase and have a consistent call path from both; also removing themmccam #ifdef from dwmmc_request() brings more clarity.In dwmmc_next_operation() enhance the panic/error messages withsome extra information and assert that we come in with a cam pinfoon CAM_ACTIVE_INDEX.MFC after: 3 daysReviewed by: manuDifferential Revision: https://reviews.freebsd.org/D51628
show more ...
Disable HS200 on rockchip_dwmmc in attachHS200 mode requires tuning, and there is no code to perform thistuning at present. Until there is, leave HS200 mode disabled.Reviewed by: manuDifferent
Disable HS200 on rockchip_dwmmc in attachHS200 mode requires tuning, and there is no code to perform thistuning at present. Until there is, leave HS200 mode disabled.Reviewed by: manuDifferential Revision: https://reviews.freebsd.org/D49400
mmc: Use bus_topo_lock and taskqueue_bus while adding/removing child devicesSome drivers held regular mutexes across some new-bus calls; insteaddepend on bus_topo_lock to protect the relevant soft
mmc: Use bus_topo_lock and taskqueue_bus while adding/removing child devicesSome drivers held regular mutexes across some new-bus calls; insteaddepend on bus_topo_lock to protect the relevant softc members. Thisalso fixes the bus_topo_lock to be explicit in these drivers ratherthan relying on the implicit Giant from taskqueue_swi_giant. Itavoids calling sleepable routines like device_probe_and_attach from answi context.Differential Revision: https://reviews.freebsd.org/D49270
Use bus_generic_detach instead of device_delete_children in detachWhile here, check for errors from bus_generic_detach and move it tothe start of detach if necessary.Differential Revision: https
Use bus_generic_detach instead of device_delete_children in detachWhile here, check for errors from bus_generic_detach and move it tothe start of detach if necessary.Differential Revision: https://reviews.freebsd.org/D47969
newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANYSponsored by: Netflix
jh7110: enable MMC driverAdd a variant of the existing dwmmc driver, and enable it in the GENERICkernel.Sponsored by: The FreeBSD FoundationDifferential Revision: https://reviews.freebsd.org/D4
jh7110: enable MMC driverAdd a variant of the existing dwmmc driver, and enable it in the GENERICkernel.Sponsored by: The FreeBSD FoundationDifferential Revision: https://reviews.freebsd.org/D44026
dwmmc: fix a typo
regulator: Move regulator code in dev/regulatorWe've removed kernel option EXT_RESOURCES almost two years ago.While it was ok to have some code under a common 'extres' subdirectoryat first, we no
regulator: Move regulator code in dev/regulatorWe've removed kernel option EXT_RESOURCES almost two years ago.While it was ok to have some code under a common 'extres' subdirectoryat first, we now have a lot of consumer of it and we made it mandatoryso no need to have it under a cryptic name.Reviewed by: emaste, impSponsored by: Beckhoff Automation GmbH & Co. KGDifferential Revision: https://reviews.freebsd.org/D43194
hwreset: Move reset code in dev/hwresetWe've removed kernel option EXT_RESOURCES almost two years ago.While it was ok to have some code under a common 'extres' subdirectoryat first, we now have a
hwreset: Move reset code in dev/hwresetWe've removed kernel option EXT_RESOURCES almost two years ago.While it was ok to have some code under a common 'extres' subdirectoryat first, we now have a lot of consumer of it and we made it mandatoryso no need to have it under a cryptic name.Reviewed by: impSponsored by: Beckhoff Automation GmbH & Co. KGDifferential Revision: https://reviews.freebsd.org/D43192
clk: Move clock code in dev/clkWe've removed kernel option EXT_RESOURCES almost two years ago.While it was ok to have some code under a common 'extres' subdirectoryat first, we now have a lot of
clk: Move clock code in dev/clkWe've removed kernel option EXT_RESOURCES almost two years ago.While it was ok to have some code under a common 'extres' subdirectoryat first, we now have a lot of consumer of it and we made it mandatoryso no need to have it under a cryptic name.Reviewed by: mhorneSponsored by: Beckhoff Automation GmbH & Co. KGDifferential Revision: https://reviews.freebsd.org/D43191
sys: Automated cleanup of cdefs and other formattingApply the following automated changes to try to eliminateno-longer-needed sys/cdefs.h includes as well as now-emptyblank lines in a row.Remov
sys: Automated cleanup of cdefs and other formattingApply the following automated changes to try to eliminateno-longer-needed sys/cdefs.h includes as well as now-emptyblank lines in a row.Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/Remove /\n+#if.*\n#endif.*\n+/Remove /^#if.*\n#endif.*\n/Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/Sponsored by: Netflix
sys: Remove $FreeBSD$: one-line .c patternRemove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
sys: Remove $FreeBSD$: two-line .h patternRemove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
mmc: Remove unused devclass arguments to DRIVER_MODULE.
dwmmc: Make ext_resources non-optionalEXT_RESOURCES have been introduced in 12-CURRENT and all supportedreleases have it enabled in their kernel config.MFC after: 1 monthDifferential Revis
dwmmc: Make ext_resources non-optionalEXT_RESOURCES have been introduced in 12-CURRENT and all supportedreleases have it enabled in their kernel config.MFC after: 1 monthDifferential Revision: https://reviews.freebsd.org/D33822
mmc_da: implement d_dump method, sddadumpsddadump has been derived from sddastart.mmc_sim interface has grown a new method, cam_poll, to support polledoperation.mmc_sim code has been changed t
mmc_da: implement d_dump method, sddadumpsddadump has been derived from sddastart.mmc_sim interface has grown a new method, cam_poll, to support polledoperation.mmc_sim code has been changed to provide a sim_poll hook only if thecontroller implements the new method. The hooks is implemented in termsof the new mmc_sim_cam_poll method.Additionally, in-progress CCB-s now have CAM_REQ_INPROG status tosatisfy xpt_pollwait().mmc_sim_cam_poll method has been implemented in dwmmc host controller.Reviewed by: manu, mav, impMFC after: 2 weeksRelnotes: perhapsDifferential Revision: https://reviews.freebsd.org/D33843
dwmmc: Calculate the maximum transaction length correctly.We should reserve two descriptors (not MMC_SECTORS) for potentiallyunaligned (so bounced) buffer fragments, one for the starting fragment
dwmmc: Calculate the maximum transaction length correctly.We should reserve two descriptors (not MMC_SECTORS) for potentiallyunaligned (so bounced) buffer fragments, one for the starting fragmentand one for the ending fragment.Submitted by: kjopek@gmail.comMFC after: 2 weeksDifferential Revision: https://reviews.freebsd.org/D30387
dwmmc: Remove dwmmc_setup_bus call from start_cmdThere is no need to re-setup the bus before each commands.Tested-on: Rock64, RockPro64Reported by: avg
dwmmc: Properly implement power_off/power_upWrite to the PWREN register should be done in update_ios basedon the power_mode value in the ios struct.Also none of the manual (RockChip and Altera) a
dwmmc: Properly implement power_off/power_upWrite to the PWREN register should be done in update_ios basedon the power_mode value in the ios struct.Also none of the manual (RockChip and Altera) and Linux talks aboutthe needed for an inverted PWREN value so just remove this.This fixes eMMC (and possibly SD) when u-boot didn't setup the controller.Reported by: avgTested-on: Rock64, RockPro64
mmc: switch mmc_helper to device_ apiAdd generic mmc_helper which uses newly introduced device_*_propertyapi. Thanks to this change the sd/mmc drivers will be capableof parsing both DT and ACPI d
mmc: switch mmc_helper to device_ apiAdd generic mmc_helper which uses newly introduced device_*_propertyapi. Thanks to this change the sd/mmc drivers will be capableof parsing both DT and ACPI description.Ensure backward compatibility for all mmc_fdt_helper users.Reviewed by: manu, mwSponsored by: SemihalfDifferential revision: https://reviews.freebsd.org/D31598
dwmmc: Fix MMCCAM block size supportWhen using SDIO the block size if per function and most of the timenot equal to MMC_SECTOR_SIZE, fix sdio on dwmmc by setting the correctblock size in the mmc
dwmmc: Fix MMCCAM block size supportWhen using SDIO the block size if per function and most of the timenot equal to MMC_SECTOR_SIZE, fix sdio on dwmmc by setting the correctblock size in the mmc registers.MFC after: 1 monthSponsored by: Diablotin Systems
dwmmc: Add bus_generic_add_child in the methodsOtherwise sdiob cannot add it's children.Sponsored by: Diablotin SystemsDifferential Revision: https://reviews.freebsd.org/D30295
mmc: dwmmc: Call mmc_fdt_set_powerThis allow us to powerup/down the card and enabling/disabling theregulators if any.Sponsored by: Diablotin SystemsDifferential Revision: https://reviews.freebs
mmc: dwmmc: Call mmc_fdt_set_powerThis allow us to powerup/down the card and enabling/disabling theregulators if any.Sponsored by: Diablotin SystemsDifferential Revision: https://reviews.freebsd.org/D30292
dwmmc: Add \n to a debug printf
mmc: dwmmc: Convert driver to use the mmc_sim interfaceA lot more generic cam related things are done in mmc_sim so this simplifythe driver a lot.Differential Revision: https://reviews.freebsd.o
mmc: dwmmc: Convert driver to use the mmc_sim interfaceA lot more generic cam related things are done in mmc_sim so this simplifythe driver a lot.Differential Revision: https://reviews.freebsd.org/D27487Reviewed by: kibab
1234