1 /* 1 2 * Copyright (C) 2013 Altera Corporation 3 * Copyright (C) 2011 Thomas Chou 4 * Copyright (C) 2011 Walter Goossens 5 * 6 * This file is subject to the terms and condi 7 * Public License. See the file COPYING in the 8 * archive for more details. 9 */ 10 11 #include <linux/init.h> 12 #include <linux/of_address.h> 13 #include <linux/of_fdt.h> 14 #include <linux/err.h> 15 #include <linux/slab.h> 16 #include <linux/sys_soc.h> 17 #include <linux/io.h> 18 #include <linux/clk-provider.h> 19 20 static const struct of_device_id clk_match[] _ 21 { .compatible = "fixed-clock", .data = 22 {} 23 }; 24 25 static int __init nios2_soc_device_init(void) 26 { 27 struct soc_device *soc_dev; 28 struct soc_device_attribute *soc_dev_a 29 const char *machine; 30 31 soc_dev_attr = kzalloc(sizeof(*soc_dev 32 if (soc_dev_attr) { 33 machine = of_flat_dt_get_machi 34 if (machine) 35 soc_dev_attr->machine 36 37 38 soc_dev_attr->family = "Nios I 39 40 soc_dev = soc_device_register( 41 if (IS_ERR(soc_dev)) { 42 kfree(soc_dev_attr->ma 43 kfree(soc_dev_attr); 44 } 45 } 46 47 of_clk_init(clk_match); 48 49 return 0; 50 } 51 52 device_initcall(nios2_soc_device_init); 53
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.