devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Sperl <kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Geert Uytterhoeven
	<geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Lee Jones <lee-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Eric Anholt <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>,
	Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	Michael Turquette
	<mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
	Remi Pommarel <repk-lovNVp52yxIDGOk2Oe9MvA@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	linux-clk <linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	ALSA Development Mailing List
	<alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org>,
	Jaroslav Kysela <perex-/Fr2/VpizcU@public.gmane.org>,
	Takashi Iwai <tiwai-IBi9RG/b67k@public.gmane.org>,
	Matthias Reichl <hias-vtPv7MOkFPkAvxtiuMwx3w@public.gmane.org>,
	lFlorian Meier <florian.meier-oZ8rN/sblLk@public.gmane.org>
Subject: Re: [PATCH 2/5] clk: bcm2835: enable management of PCM clock
Date: Mon, 11 Jan 2016 14:53:36 +0100	[thread overview]
Message-ID: <A156F37A-76CF-4ECF-8C85-162A71877EC5@martin.sperl.org> (raw)
In-Reply-To: <4412078.STjb1rKkbV@wuerfel>


> On 11.01.2016, at 14:38, Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> wrote:
> 
> On Sunday 10 January 2016 13:17:17 Martin Sperl wrote:
>> 
>> What you propose is a major change to the clock framework, so I would
>> hope that Eric (the original author of this clock-driver) would address
>> it.
>> 
>> Maybe someone has a better idea for a pattern to use to achieve 
>> the required while maintaining “synchronization” between defines
>> inside the dt-binding and the driver.
> 
> It's funny to look at the register list:
> 
> #define CM_VPUCTL               0x008
> #define CM_VPUDIV               0x00c
> #define CM_SYSCTL               0x010
> #define CM_SYSDIV               0x014
> #define CM_PERIACTL             0x018
> #define CM_PERIADIV             0x01c
> #define CM_PERIICTL             0x020
> #define CM_PERIIDIV             0x024
> #define CM_H264CTL              0x028
> #define CM_H264DIV              0x02c
> 
> This one seems completely regular, there is always a pair of CTL and DIV
> registers, so I would have guessed that we could just take the index
> of that to completely avoid the need for the header file and just have
> a lookup table of each index.
> 
> I can see two possible ways forward:
> 
> a) deprecate the existing binding and write a new simpler driver to
>   replace it with one that does not need the header. We probably need
>   to keep both drivers around indefinitely though to deal with people
>   that have their own dtb files, so this is a bit awkward.
I was thinking about this as well, but am concerned about the dt-changes.

Also initialization order may be an issue, so I have avoided that.

> b) look at all the holes in the table and define new numbers for them
>   now, then remove the count as the driver can simply hardcode the
>   maximum number as it knows it will never change.
There are clocks for most of them - See my patch I sent some time ago.

Right now I have got a working version with the following patches:
817176d clk: bcm2835: add missing clocks
8f74701 clk: bcm2835: enable management of PCM clock
62a7d94 clk: bcm2835: move to a different initialization scheme.

There is one more thing that I would like to do before submitting those
as a patch-set: enable the fractual divider, because right now
we calculate the fractual divider value correctly, but we do not set
the flag to enable it, so we are actually running too fast most
of the times...


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-01-11 13:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-09  9:25 [PATCH 0/5] ASOC: bcm2835: move bcm2835-i2s to use clock framework kernel
     [not found] ` <1452331558-2520-1-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2016-01-09  9:25   ` [PATCH 1/5] ASoC: bcm2835: cleanup includes by ordering them alphabetically kernel-TqfNSX0MhmxHKSADF0wUEw
2016-01-09  9:25 ` [PATCH 2/5] clk: bcm2835: enable management of PCM clock kernel
2016-01-09 20:56   ` Arnd Bergmann
2016-01-10  9:30     ` Geert Uytterhoeven
2016-01-10 10:55       ` Martin Sperl
2016-01-10 11:58         ` Mark Brown
2016-01-10 12:17           ` Martin Sperl
2016-01-10 12:30             ` Remi Pommarel
2016-01-10 13:02             ` Geert Uytterhoeven
2016-01-10 18:01               ` Martin Sperl
2016-01-10 18:56                 ` Geert Uytterhoeven
2016-01-10 19:07                   ` Martin Sperl
     [not found]                     ` <93C244A0-20B7-4E21-A183-E09F83CFE035-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2016-01-10 19:13                       ` Geert Uytterhoeven
2016-01-11 13:38             ` Arnd Bergmann
2016-01-11 13:53               ` Martin Sperl [this message]
2016-01-09  9:25 ` [PATCH 3/5] ASoC: bcm2835: move to use the clock framework kernel
2016-01-09  9:25 ` [PATCH 4/5] ARM: bcm2835: I2S: use new register-range and " kernel
2016-01-09  9:25 ` [PATCH 5/5] dt-bindings: bsm2835: fix bindings documentation to use new " kernel
2016-01-09 22:45   ` Rob Herring
2016-01-10 11:05     ` Martin Sperl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A156F37A-76CF-4ECF-8C85-162A71877EC5@martin.sperl.org \
    --to=kernel-tqfnsx0mhmxhksadf0wuew@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org \
    --cc=florian.meier-oZ8rN/sblLk@public.gmane.org \
    --cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \
    --cc=hias-vtPv7MOkFPkAvxtiuMwx3w@public.gmane.org \
    --cc=lee-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
    --cc=linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
    --cc=perex-/Fr2/VpizcU@public.gmane.org \
    --cc=repk-lovNVp52yxIDGOk2Oe9MvA@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=tiwai-IBi9RG/b67k@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).