mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 15:11:50 +00:00
0dfc86b317
The device tree should describe the chips (or chip-like subblocks) in the system, but it generally does not describe individual registers -- it should identify, rather than describe, a programming interface. This has not been the case with the QorIQ clockgen nodes. The knowledge of what each bit setting of CLKCnCSR means is encoded in three places (binding, pll node, and mux node), and the last also needs to know which options are valid on a particular chip. All three of these locations are considered stable ABI, making it difficult to fix mistakes (of which I have found several), much less refactor the abstraction to be able to address problems, limitations, or new chips. Under the current binding, a pll clock specifier of 2 means that the PLL is divided by 4 -- and the driver implements this, unless there happen to be four clock-output-names rather than 3, in which case it interprets it as PLL divided by 3. This does not appear in the binding documentation at all. That hack is now considered stable ABI. The current device tree nodes contain errors, such as saying that T1040 can set a core clock to PLL/4 when only PLL and PLL/2 are options. The current binding also ignores some restrictions on clock selection, such as p5020's requirement that if a core uses the "wrong" PLL, that PLL must be clocked lower than the "correct" PLL and be at most 80% of the rated CPU frequency. Possibly because of the lack of the ability to express such nuance in the binding, some valid options are omitted from the device trees, such as the ability on p4080 to run cores 0-3 from PLL3 and cores 4-7 from PLL1 (again, only if they are at most 80% of rated CPU frequency). This omission, combined with excessive caution in the cpufreq driver (addressed in a subsequent patch), means that currently on a 1500 MHz p4080 with typical PLL configuration, cpufreq can lower the frequency to 1200 MHz on half the CPUs and do nothing on the others. With this patchset, all CPUs can be lowered to 1200 MHz on a rev2 p4080, and on a rev3 p4080 half can be lowered to 750 MHz and the other half to 600 MHz. The current binding only deals with CPU clocks. To describe FMan in the device tree, we need to describe its clock. Some chips have additional muxes that work like the CPU muxes, but are not described in the device tree. Others require inspecting the Reset Control Word to determine which PLL is used. Rather than continue to extend this mess, replace it. Have the driver bind to the chip-specific clockgen compatible, and keep the detailed description of quirky chip variations in the driver, where it can be easily fixed, refactored, and extended. Older device trees will continue to work (including a workaround for old ls1021a device trees that are missing compatible and reg in the clockgen node, which even the old binding required). The pll/mux details in old device trees will be ignored, but "clocks" properties pointing at the old nodes will still work, and be directed at the corresponding new clock. Signed-off-by: Scott Wood <scottwood@freescale.com> Acked-by: Stephen Boyd <sboyd@codeaurora.org> |
||
---|---|---|
.. | ||
ABI | ||
accounting | ||
acpi | ||
aoe | ||
arm | ||
arm64 | ||
auxdisplay | ||
backlight | ||
blackfin | ||
block | ||
blockdev | ||
bus-devices | ||
cdrom | ||
cgroups | ||
cma | ||
connector | ||
console | ||
cpu-freq | ||
cpuidle | ||
cris | ||
crypto | ||
development-process | ||
device-mapper | ||
devicetree | ||
dmaengine | ||
DocBook | ||
driver-model | ||
dvb | ||
early-userspace | ||
EDID | ||
extcon | ||
fault-injection | ||
fb | ||
features | ||
filesystems | ||
firmware_class | ||
fmc | ||
frv | ||
gpio | ||
hid | ||
hwmon | ||
i2c | ||
ia64 | ||
ide | ||
infiniband | ||
input | ||
ioctl | ||
isdn | ||
ja_JP | ||
kbuild | ||
kdump | ||
ko_KR | ||
laptops | ||
leds | ||
locking | ||
m68k | ||
memory-devices | ||
metag | ||
mic | ||
mips | ||
misc-devices | ||
mmc | ||
mn10300 | ||
mtd | ||
namespaces | ||
netlabel | ||
networking | ||
nfc | ||
nios2 | ||
nvdimm | ||
nvmem | ||
parisc | ||
PCI | ||
pcmcia | ||
phy | ||
platform | ||
power | ||
powerpc | ||
pps | ||
prctl | ||
pti | ||
ptp | ||
rapidio | ||
RCU | ||
s390 | ||
scheduler | ||
scsi | ||
security | ||
serial | ||
sh | ||
sound | ||
spi | ||
sysctl | ||
target | ||
thermal | ||
timers | ||
tpm | ||
trace | ||
usb | ||
vDSO | ||
video4linux | ||
virtual | ||
vm | ||
w1 | ||
watchdog | ||
wimax | ||
x86 | ||
xtensa | ||
zh_CN | ||
00-INDEX | ||
adding-syscalls.txt | ||
applying-patches.txt | ||
assoc_array.txt | ||
atomic_ops.txt | ||
bad_memory.txt | ||
basic_profiling.txt | ||
bcache.txt | ||
binfmt_misc.txt | ||
braille-console.txt | ||
bt8xxgpio.txt | ||
btmrvl.txt | ||
BUG-HUNTING | ||
bus-virt-phys-mapping.txt | ||
cachetlb.txt | ||
Changes | ||
circular-buffers.txt | ||
clk.txt | ||
coccinelle.txt | ||
CodeOfConflict | ||
CodingStyle | ||
cpu-hotplug.txt | ||
cpu-load.txt | ||
cputopology.txt | ||
crc32.txt | ||
dcdbas.txt | ||
debugging-modules.txt | ||
debugging-via-ohci1394.txt | ||
dell_rbu.txt | ||
devices.txt | ||
digsig.txt | ||
DMA-API-HOWTO.txt | ||
DMA-API.txt | ||
DMA-attributes.txt | ||
dma-buf-sharing.txt | ||
DMA-ISA-LPC.txt | ||
dontdiff | ||
dynamic-debug-howto.txt | ||
edac.txt | ||
efi-stub.txt | ||
eisa.txt | ||
email-clients.txt | ||
flexible-arrays.txt | ||
futex-requeue-pi.txt | ||
gcov.txt | ||
gdb-kernel-debugging.txt | ||
highuid.txt | ||
HOWTO | ||
hsi.txt | ||
hw_random.txt | ||
hwspinlock.txt | ||
init.txt | ||
initrd.txt | ||
intel_txt.txt | ||
Intel-IOMMU.txt | ||
io_ordering.txt | ||
io-mapping.txt | ||
iostats.txt | ||
IPMI.txt | ||
IRQ-affinity.txt | ||
IRQ-domain.txt | ||
IRQ.txt | ||
irqflags-tracing.txt | ||
isapnp.txt | ||
java.txt | ||
kasan.txt | ||
kernel-doc-nano-HOWTO.txt | ||
kernel-docs.txt | ||
kernel-parameters.txt | ||
kernel-per-CPU-kthreads.txt | ||
kmemcheck.txt | ||
kmemleak.txt | ||
kobject.txt | ||
kprobes.txt | ||
kref.txt | ||
kselftest.txt | ||
ldm.txt | ||
local_ops.txt | ||
lockup-watchdogs.txt | ||
logo.gif | ||
logo.txt | ||
lzo.txt | ||
magic-number.txt | ||
mailbox.txt | ||
Makefile | ||
ManagementStyle | ||
md-cluster.txt | ||
md.txt | ||
media-framework.txt | ||
memory-barriers.txt | ||
memory-hotplug.txt | ||
men-chameleon-bus.txt | ||
module-signing.txt | ||
mono.txt | ||
nommu-mmap.txt | ||
ntb.txt | ||
numastat.txt | ||
oops-tracing.txt | ||
padata.txt | ||
parport-lowlevel.txt | ||
parport.txt | ||
percpu-rw-semaphore.txt | ||
phy.txt | ||
pi-futex.txt | ||
pinctrl.txt | ||
pnp.txt | ||
preempt-locking.txt | ||
printk-formats.txt | ||
pwm.txt | ||
ramoops.txt | ||
rbtree.txt | ||
remoteproc.txt | ||
rfkill.txt | ||
robust-futex-ABI.txt | ||
robust-futexes.txt | ||
rpmsg.txt | ||
rtc.txt | ||
SAK.txt | ||
SecurityBugs | ||
serial-console.txt | ||
sgi-ioc4.txt | ||
SM501.txt | ||
smsc_ece1099.txt | ||
sparse.txt | ||
stable_api_nonsense.txt | ||
stable_kernel_rules.txt | ||
static-keys.txt | ||
SubmitChecklist | ||
SubmittingDrivers | ||
SubmittingPatches | ||
svga.txt | ||
sysfs-rules.txt | ||
sysrq.txt | ||
this_cpu_ops.txt | ||
unaligned-memory-access.txt | ||
unicode.txt | ||
unshare.txt | ||
vfio.txt | ||
VGA-softcursor.txt | ||
vgaarbiter.txt | ||
video-output.txt | ||
vme_api.txt | ||
volatile-considered-harmful.txt | ||
workqueue.txt | ||
xillybus.txt | ||
xz.txt | ||
zorro.txt |