| 
									
										
										
										
											2010-03-08 21:45:19 +09:00
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											2010-11-17 10:04:33 +01:00
										 |  |  |  *  Copyright (C) 2010 Paul Mundt <lethal@linux-sh.org> | 
					
						
							| 
									
										
										
										
											2010-03-08 21:45:19 +09:00
										 |  |  |  * | 
					
						
							|  |  |  |  * 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. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-17 10:04:33 +01:00
										 |  |  | #ifndef __CLKDEV__H_
 | 
					
						
							|  |  |  | #define __CLKDEV__H_
 | 
					
						
							| 
									
										
										
										
											2010-03-08 21:45:19 +09:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-17 10:04:33 +01:00
										 |  |  | #include <linux/bootmem.h>
 | 
					
						
							|  |  |  | #include <linux/mm.h>
 | 
					
						
							|  |  |  | #include <linux/slab.h>
 | 
					
						
							| 
									
										
										
										
											2010-03-08 21:45:19 +09:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-17 10:04:33 +01:00
										 |  |  | #include <asm/clock.h>
 | 
					
						
							| 
									
										
										
										
											2010-03-08 21:45:19 +09:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-17 10:04:33 +01:00
										 |  |  | static inline struct clk_lookup_alloc *__clkdev_alloc(size_t size) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	if (!slab_is_available()) | 
					
						
							|  |  |  | 		return alloc_bootmem_low_pages(size); | 
					
						
							|  |  |  | 	else | 
					
						
							|  |  |  | 		return kzalloc(size, GFP_KERNEL); | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2010-03-08 21:45:19 +09:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-17 10:04:33 +01:00
										 |  |  | #define __clk_put(clk)
 | 
					
						
							|  |  |  | #define __clk_get(clk) ({ 1; })
 | 
					
						
							| 
									
										
										
										
											2010-03-08 21:45:19 +09:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-17 10:04:33 +01:00
										 |  |  | #endif /* __CLKDEV_H__ */
 |