[PATCH v4 3/3] mmc: sdhci-of-dwcmshc: add rockchip platform support
Jisheng Zhang
Jisheng.Zhang at synaptics.com
Fri Mar 12 09:22:23 GMT 2021
Hi
On Thu, 11 Mar 2021 15:08:03 +0800
Shawn Lin <shawn.lin at rock-chips.com> wrote:
>
> Hi Jisheng
>
> On 2021/3/11 14:59, Jisheng Zhang wrote:
> > Hi Shawn,
> >
> > On Thu, 11 Mar 2021 14:21:24 +0800 Shawn Lin <shawn.lin at rock-chips.com> wrote:
> >
> >>
> >> sdhci based synopsys MMC IP is also used on some rockchip platforms,
> >> so add a basic support here.
> >>
> >> Signed-off-by: Shawn Lin <shawn.lin at rock-chips.com>
> >> Acked-by: Adrian Hunter <adrian.hunter at intel.com>
> >> ---
> >>
> >> Changes in v4:
> >> - add comments for disabling rx invert
> >> - add tag from Adrian
> >>
> >> drivers/mmc/host/sdhci-of-dwcmshc.c | 225 ++++++++++++++++++++++++++++++++++--
> >> 1 file changed, 218 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c
> >> index 59d8d96..dabc1ec 100644
> >> --- a/drivers/mmc/host/sdhci-of-dwcmshc.c
> >> +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
> >> @@ -9,9 +9,11 @@
> >>
> >> #include <linux/clk.h>
> >> #include <linux/dma-mapping.h>
> >> +#include <linux/iopoll.h>
> >> #include <linux/kernel.h>
> >> #include <linux/module.h>
> >> #include <linux/of.h>
> >> +#include <linux/of_device.h>
> >> #include <linux/sizes.h>
> >>
> >> #include "sdhci-pltfm.h"
> >> @@ -21,11 +23,43 @@
> >> /* DWCMSHC specific Mode Select value */
> >> #define DWCMSHC_CTRL_HS400 0x7
> >>
> >> +/* Rockchip specific Registers */
> >> +#define DWCMSHC_HOST_CTRL3 0x508
> >
> > Maybe 0x500 can be read from VENDOR_PTR_R while 0x8 is the offset?
>
> It should be but we didn't add this info for this IP so we have
> to hardcode the register offset.
Per my understanding, this register always exists, so mind to double check
whether you can access the register and read out 0x500. If the vendor offset
can't be read out on your side, mind to add var such as vendor_ptr etc. then
configure it as 0x500 for RK? I believe HS400 ES support code is common
to this IP, the only difference maybe the vendor offset can be dynamically
read out while RK may need to hardcode the offset as you said.
Thanks
More information about the Linux-rockchip
mailing list