mmc: pic32: Refresh PIC32 MMC driver
authorJohn Robertson <john.robertson@simiatec.com>
Tue, 1 Sep 2020 02:55:14 +0000 (02:55 +0000)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tue, 22 Sep 2020 22:08:52 +0000 (00:08 +0200)
commit6978db36aa6daa31f3ac12e699f5c6a540ff2cd0
tree39d39fd50303e13f993cdc4c725f5b22c307f75a
parent5949f36f083515e2bb55f1a9c9110b287fbab587
mmc: pic32: Refresh PIC32 MMC driver

The existing driver is not compatible with the Driver Model.

This patch makes the necessary changes while also removing obsolescent
calls/properties as follows:

- fdtdec_* calls replaced with dev_read_* equivalents;
- 'clock-freq-min-max' property replaced by querying the frequency of
  the source clock 'base_clk';
- The card detect erratum workaround is applied during probe rather than
  overriding get_cd.

The card detect workaround (Microchip ref. DS80000736E, erratum #15) is
not always needed and can be disabled using a vendor specific DT
property.

Signed-off-by: John Robertson <john.robertson@simiatec.com>
drivers/mmc/pic32_sdhci.c