[PATCH 2/5] clk: bcm2835: enable management of PCM clock
Arnd Bergmann
arnd at arndb.de
Mon Jan 11 05:38:03 PST 2016
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.
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.
Arnd
More information about the linux-arm-kernel
mailing list