diff --git a/arch/alpha/include/asm/Kbuild b/arch/alpha/include/asm/Kbuild index e423defed91e30cb68bf51863fe105caffe7f016..d97d66334e6f87fa4d3024e9a98e0517ccadc8a1 100644 --- a/arch/alpha/include/asm/Kbuild +++ b/arch/alpha/include/asm/Kbuild @@ -1,5 +1,7 @@ include include/asm-generic/Kbuild.asm +generic-y += clkdev.h + header-y += compiler.h header-y += console.h header-y += fpu.h diff --git a/arch/avr32/include/asm/Kbuild b/arch/avr32/include/asm/Kbuild index 3136628ba8d20feba7de4ed07a51261a65c4a3b2..e3ba7bca06fae732929e28a4b00be0374883de17 100644 --- a/arch/avr32/include/asm/Kbuild +++ b/arch/avr32/include/asm/Kbuild @@ -1,3 +1,5 @@ include include/asm-generic/Kbuild.asm +generic-y += clkdev.h + header-y += cachectl.h diff --git a/arch/cris/include/asm/Kbuild b/arch/cris/include/asm/Kbuild index 04d02a51c5e90a2b7dde5403f23329ece74362bc..a8eab26a1ec752e38d794c767bd96d5aac5373ae 100644 --- a/arch/cris/include/asm/Kbuild +++ b/arch/cris/include/asm/Kbuild @@ -7,3 +7,5 @@ header-y += ethernet.h header-y += etraxgpio.h header-y += rs485.h header-y += sync_serial.h + +generic-y += clkdev.h diff --git a/arch/frv/include/asm/Kbuild b/arch/frv/include/asm/Kbuild index 5be6663cfee5d921cf90c1fd2ad0cf730f238314..13cd044aabdfe43ece5b8345f291e1291e86c6e7 100644 --- a/arch/frv/include/asm/Kbuild +++ b/arch/frv/include/asm/Kbuild @@ -2,3 +2,4 @@ include include/asm-generic/Kbuild.asm header-y += registers.h header-y += termios.h +generic-y += clkdev.h diff --git a/arch/h8300/include/asm/Kbuild b/arch/h8300/include/asm/Kbuild index c68e1680da0173d5754d1a1df4944120a5239e58..0e152a93c1259a551ffa65b327ae5f9b013be3dd 100644 --- a/arch/h8300/include/asm/Kbuild +++ b/arch/h8300/include/asm/Kbuild @@ -1 +1,3 @@ include include/asm-generic/Kbuild.asm + +generic-y += clkdev.h diff --git a/arch/hexagon/include/asm/Kbuild b/arch/hexagon/include/asm/Kbuild index 06906427c0ac238484af385b31386f0f09ff3ad5..3364b6966d268b3f82fda0ae501be048b6d858c1 100644 --- a/arch/hexagon/include/asm/Kbuild +++ b/arch/hexagon/include/asm/Kbuild @@ -7,6 +7,7 @@ header-y += user.h generic-y += auxvec.h generic-y += bug.h generic-y += bugs.h +generic-y += clkdev.h generic-y += cputime.h generic-y += current.h generic-y += device.h diff --git a/arch/ia64/include/asm/Kbuild b/arch/ia64/include/asm/Kbuild index d4eb9383f5f657718fba1b5467baa4c35257eb14..58f3d14a6cd4029b18531bcd1d0224d8337f7d3e 100644 --- a/arch/ia64/include/asm/Kbuild +++ b/arch/ia64/include/asm/Kbuild @@ -13,3 +13,4 @@ header-y += ptrace_offsets.h header-y += rse.h header-y += ucontext.h header-y += ustack.h +generic-y += clkdev.h diff --git a/arch/m32r/include/asm/Kbuild b/arch/m32r/include/asm/Kbuild index c68e1680da0173d5754d1a1df4944120a5239e58..0e152a93c1259a551ffa65b327ae5f9b013be3dd 100644 --- a/arch/m32r/include/asm/Kbuild +++ b/arch/m32r/include/asm/Kbuild @@ -1 +1,3 @@ include include/asm-generic/Kbuild.asm + +generic-y += clkdev.h diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild index a74e5d95c384941583d99096bae1175634c9b4cb..bfe675f0faee5a1b6bda67ecf9bc4ac006f63f87 100644 --- a/arch/m68k/include/asm/Kbuild +++ b/arch/m68k/include/asm/Kbuild @@ -2,6 +2,7 @@ include include/asm-generic/Kbuild.asm header-y += cachectl.h generic-y += bitsperlong.h +generic-y += clkdev.h generic-y += cputime.h generic-y += device.h generic-y += emergency-restart.h diff --git a/arch/microblaze/include/asm/Kbuild b/arch/microblaze/include/asm/Kbuild index db5294c30cafef1d2cbb8f83b787edb36f812613..48510f6cec8f23f924c9bdc1781540282bcb0a7b 100644 --- a/arch/microblaze/include/asm/Kbuild +++ b/arch/microblaze/include/asm/Kbuild @@ -1,3 +1,4 @@ include include/asm-generic/Kbuild.asm header-y += elf.h +generic-y += clkdev.h diff --git a/arch/mn10300/include/asm/Kbuild b/arch/mn10300/include/asm/Kbuild index c68e1680da0173d5754d1a1df4944120a5239e58..0d20f5526dd8e99b7ba770d677bc17480f4bdb40 100644 --- a/arch/mn10300/include/asm/Kbuild +++ b/arch/mn10300/include/asm/Kbuild @@ -1 +1,3 @@ include include/asm-generic/Kbuild.asm + +generic-y += clkdev.h diff --git a/arch/openrisc/include/asm/Kbuild b/arch/openrisc/include/asm/Kbuild index 0922959663a0fd92f0799761500164042e63d74b..7140b6b26441927fa669e1a2649ee3e99f1de750 100644 --- a/arch/openrisc/include/asm/Kbuild +++ b/arch/openrisc/include/asm/Kbuild @@ -11,6 +11,7 @@ generic-y += bug.h generic-y += bugs.h generic-y += cacheflush.h generic-y += checksum.h +generic-y += clkdev.h generic-y += cmpxchg.h generic-y += cmpxchg-local.h generic-y += cputime.h diff --git a/arch/parisc/include/asm/Kbuild b/arch/parisc/include/asm/Kbuild index 4383707d9801eb7bfe2b1bb34be6bbea447be139..0587f62e5b76027291cea9dd62954d230cc38c06 100644 --- a/arch/parisc/include/asm/Kbuild +++ b/arch/parisc/include/asm/Kbuild @@ -1,4 +1,5 @@ include include/asm-generic/Kbuild.asm header-y += pdc.h +generic-y += clkdev.h generic-y += word-at-a-time.h diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild index 7e313f1ed1832a5048770ed7ac72a169ae603541..ace53dbde2cdb2dbc07aa8d3b9c6593508d02969 100644 --- a/arch/powerpc/include/asm/Kbuild +++ b/arch/powerpc/include/asm/Kbuild @@ -35,4 +35,5 @@ header-y += types.h header-y += ucontext.h header-y += unistd.h +generic-y += clkdev.h generic-y += rwsem.h diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild index 287d7bbb6d36c405a1363fbc36baf1d9b36b19fb..f18fc796beef6c24545be2f4aedb3487cb770e16 100644 --- a/arch/s390/include/asm/Kbuild +++ b/arch/s390/include/asm/Kbuild @@ -13,3 +13,5 @@ header-y += tape390.h header-y += ucontext.h header-y += vtoc.h header-y += zcrypt.h + +generic-y += clkdev.h diff --git a/arch/score/include/asm/Kbuild b/arch/score/include/asm/Kbuild index b367abd4620f64e665dea1e470d2e17826acd7d5..ec697aeefd05436f34647fa85d61293b7aa575d9 100644 --- a/arch/score/include/asm/Kbuild +++ b/arch/score/include/asm/Kbuild @@ -1,3 +1,5 @@ include include/asm-generic/Kbuild.asm header-y += + +generic-y += clkdev.h diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild index 67f83e0a0d68d47e3bebff7a365897614bfa411e..f80ff93f6f75a2c05be205167dcb2dd95f65278e 100644 --- a/arch/sparc/include/asm/Kbuild +++ b/arch/sparc/include/asm/Kbuild @@ -17,6 +17,7 @@ header-y += uctx.h header-y += utrap.h header-y += watchdog.h +generic-y += clkdev.h generic-y += div64.h generic-y += local64.h generic-y += irq_regs.h diff --git a/arch/tile/include/asm/Kbuild b/arch/tile/include/asm/Kbuild index 5bd71994452d588d4790585f76a9cd5dfd35e185..ea2e8ea3eb6135e181f6fd15b95e8c47701bf3b0 100644 --- a/arch/tile/include/asm/Kbuild +++ b/arch/tile/include/asm/Kbuild @@ -8,6 +8,7 @@ header-y += hardwall.h generic-y += bug.h generic-y += bugs.h +generic-y += clkdev.h generic-y += cputime.h generic-y += div64.h generic-y += emergency-restart.h diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild index fff24352255df0b0b448c43f11e287d5011fb836..0f6e7b32826522249f9dbd170e4f5c97cfd9a414 100644 --- a/arch/um/include/asm/Kbuild +++ b/arch/um/include/asm/Kbuild @@ -1,4 +1,4 @@ generic-y += bug.h cputime.h device.h emergency-restart.h futex.h hardirq.h generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h sections.h topology.h xor.h generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h -generic-y += switch_to.h +generic-y += switch_to.h clkdev.h diff --git a/arch/unicore32/include/asm/Kbuild b/arch/unicore32/include/asm/Kbuild index 34b789b711151edf6d86e02c8122bd2f40d0896a..123c59a06c14d8dd78ca2cfd5101acec34429f9a 100644 --- a/arch/unicore32/include/asm/Kbuild +++ b/arch/unicore32/include/asm/Kbuild @@ -4,6 +4,7 @@ generic-y += atomic.h generic-y += auxvec.h generic-y += bitsperlong.h generic-y += bugs.h +generic-y += clkdev.h generic-y += cputime.h generic-y += current.h generic-y += device.h diff --git a/arch/x86/include/asm/Kbuild b/arch/x86/include/asm/Kbuild index f9c0d3ba9e849ef6de5a43b6f32bffacfd73a1db..66e5f0ef0523ce2961a950c4657719e31c3e8db1 100644 --- a/arch/x86/include/asm/Kbuild +++ b/arch/x86/include/asm/Kbuild @@ -26,3 +26,5 @@ header-y += vsyscall.h genhdr-y += unistd_32.h genhdr-y += unistd_64.h genhdr-y += unistd_x32.h + +generic-y += clkdev.h diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild index c68e1680da0173d5754d1a1df4944120a5239e58..0d20f5526dd8e99b7ba770d677bc17480f4bdb40 100644 --- a/arch/xtensa/include/asm/Kbuild +++ b/arch/xtensa/include/asm/Kbuild @@ -1 +1,3 @@ include include/asm-generic/Kbuild.asm + +generic-y += clkdev.h diff --git a/include/asm-generic/clkdev.h b/include/asm-generic/clkdev.h new file mode 100644 index 0000000000000000000000000000000000000000..90a32a61dd214f2b61fa0bb129672b12239cb559 --- /dev/null +++ b/include/asm-generic/clkdev.h @@ -0,0 +1,28 @@ +/* + * include/asm-generic/clkdev.h + * + * Based on the ARM clkdev.h: + * Copyright (C) 2008 Russell King. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Helper for the clk API to assist looking up a struct clk. + */ +#ifndef __ASM_CLKDEV_H +#define __ASM_CLKDEV_H + +#include + +struct clk; + +static inline int __clk_get(struct clk *clk) { return 1; } +static inline void __clk_put(struct clk *clk) { } + +static inline struct clk_lookup_alloc *__clkdev_alloc(size_t size) +{ + return kzalloc(size, GFP_KERNEL); +} + +#endif