Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Sep 2016 22:39:43 -0400
From:      Lee D <embaudarm@gmail.com>
To:        Oleksandr Tymoshenko <gonzo@bluezbox.com>
Cc:        Thomas Skibo <thomasskibo@yahoo.com>, freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: SD-Card driver modification for Zynq questions
Message-ID:  <CANC_bnMz6As=0FKnWTHN4_xSoWNugHJeHR9HCcAO8XMwRyhUmw@mail.gmail.com>
In-Reply-To: <9859398E-0592-4B8F-A3DA-0364970A92B4@bluezbox.com>
References:  <02E012FA-342E-4EB7-99F2-733FA7990BDD@yahoo.com> <49016789-66F8-4B34-9FA7-8E97143634AF@bluezbox.com> <A3168D37-D612-4E3C-BECB-68EE306534BB@yahoo.com> <9859398E-0592-4B8F-A3DA-0364970A92B4@bluezbox.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 28, 2016 at 5:53 PM, Oleksandr Tymoshenko <gonzo@bluezbox.com>
wrote:

>
> > On Sep 28, 2016, at 2:49 PM, Thomas Skibo <thomasskibo@yahoo.com> wrote=
:
> >
> >
> >> On Sep 28, 2016, at 2:00 PM, Oleksandr Tymoshenko <gonzo@bluezbox.com>
> wrote:
> >>
> >>
> >>> On Sep 28, 2016, at 7:16 AM, Thomas Skibo via freebsd-arm <
> freebsd-arm@freebsd.org> wrote:
> >>>
> >>>
> >>> Why not just set max-frequency to 200Mhz in the DTS file entry?
> >>
> >> From quick glance it=E2=80=99s not going to help. Slot=E2=80=99s max_c=
lk is set to that
> value but then it=E2=80=99s
> >> overwritten in sdhci_init_slot by value obtained from register.  We
> need to fix it and also
> >> add tunable for non-fdt systems.
> >
> > I checked the Zynq manual and it looks like it doesn=E2=80=99t provide =
a
> frequency in the capabilities register so sdhci_init_slot() won=E2=80=99t=
 change
> the slot=E2=80=99s max_clk.
>
> You=E2=80=99re right, I misread code, max-frequency can do the trick.  St=
ill
> tunable may be a good idea.


Setting max-frequency to an incorrect value will technically work, but it
will make many cards run much more slowly than they need to.  See my other
post.

It would be nice to have a DTS file parameter to set the max data rate of
the card.  Do you have any pointers on where I might find information on
how to do this?

I have read "FreeBSD Device Drivers: A guide for the intrepid", but it only
scratches the surface.  I've written a few drivers for my custom devices
but I think I am pretty far from being able to do any serious kernel work.
One thing I am confused about is how drivers talk to each other.  I spent a
few days trying to understand the source for the mmc and sdhci drivers but
there is a lot going on that I couldn't figure out.

Thanks,

Lee



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANC_bnMz6As=0FKnWTHN4_xSoWNugHJeHR9HCcAO8XMwRyhUmw>