This patch splits driver code into two seperate files sdhci_xenon.c
and sdhci_xenon_fdt.c. This will allow future implementation of ACPI
discovery of sdhci on Xenon chips.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/dev/sdhci/sdhci_xenon.c | ||
---|---|---|
381 | Don't mix declarations with assignements. | |
439 | Leave above assignments intact (of course apart from extending the if). | |
482–484 | Check device_get_property consistently and compare explicitly to 0, as in the first if. | |
484 | A single assignment of val in this function will be sufficient. | |
501–502 | No need to reorder the assignments. | |
503 | Call this function after resources allocation. | |
589 | Leave above 3 lines in a common sdhci_xenon_attach(). There is no need to duplicate it for OF_ and ACPI_ cases. | |
597 | Please retain an original name - this is a cosmetic change, not related to this patch. | |
623 | No need to change order of this method. | |
sys/dev/sdhci/sdhci_xenon.h | ||
122 | Drop the ifdef - those fields are checked unconditionally and the driver will not compile for !EXT_RESOURCES case. | |
sys/dev/sdhci/sdhci_xenon_fdt.c | ||
75 | IMO there is no need to do the nested sc magic. However current one works fine, please use single sdhci_xenon_softc and move struct sdhci_fdt_gpio *gpio; there (with #ifdef FDT). | |
81 | Don't mix assignments with declarations - please revisit entire file. |
sys/dev/sdhci/sdhci_xenon_fdt.c | ||
---|---|---|
81 | This is still present in sdhci_xenon_fdt_detach and sdhci_xenon_fdt_get_card_present |
LGTM + tested on (with DT and ACPI) on: MacchiatoBin, CN913x-DB and CN913x-CEx7 Evaluation Board