diff options
Diffstat (limited to 'arch/arm/mach-tegra/tegra.c')
-rw-r--r-- | arch/arm/mach-tegra/tegra.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c index 27232c901a22..84deeab23ee7 100644 --- a/arch/arm/mach-tegra/tegra.c +++ b/arch/arm/mach-tegra/tegra.c | |||
@@ -33,6 +33,8 @@ | |||
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <linux/i2c.h> | 34 | #include <linux/i2c.h> |
35 | #include <linux/i2c-tegra.h> | 35 | #include <linux/i2c-tegra.h> |
36 | #include <linux/slab.h> | ||
37 | #include <linux/sys_soc.h> | ||
36 | #include <linux/usb/tegra_usb_phy.h> | 38 | #include <linux/usb/tegra_usb_phy.h> |
37 | 39 | ||
38 | #include <asm/mach-types.h> | 40 | #include <asm/mach-types.h> |
@@ -42,6 +44,7 @@ | |||
42 | 44 | ||
43 | #include "board.h" | 45 | #include "board.h" |
44 | #include "common.h" | 46 | #include "common.h" |
47 | #include "fuse.h" | ||
45 | #include "iomap.h" | 48 | #include "iomap.h" |
46 | 49 | ||
47 | static struct tegra_ehci_platform_data tegra_ehci1_pdata = { | 50 | static struct tegra_ehci_platform_data tegra_ehci1_pdata = { |
@@ -80,12 +83,36 @@ static struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { | |||
80 | 83 | ||
81 | static void __init tegra_dt_init(void) | 84 | static void __init tegra_dt_init(void) |
82 | { | 85 | { |
86 | struct soc_device_attribute *soc_dev_attr; | ||
87 | struct soc_device *soc_dev; | ||
88 | struct device *parent = NULL; | ||
89 | |||
90 | soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); | ||
91 | if (!soc_dev_attr) | ||
92 | goto out; | ||
93 | |||
94 | soc_dev_attr->family = kasprintf(GFP_KERNEL, "Tegra"); | ||
95 | soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%d", tegra_revision); | ||
96 | soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "%d", tegra_chip_id); | ||
97 | |||
98 | soc_dev = soc_device_register(soc_dev_attr); | ||
99 | if (IS_ERR(soc_dev)) { | ||
100 | kfree(soc_dev_attr->family); | ||
101 | kfree(soc_dev_attr->revision); | ||
102 | kfree(soc_dev_attr->soc_id); | ||
103 | kfree(soc_dev_attr); | ||
104 | goto out; | ||
105 | } | ||
106 | |||
107 | parent = soc_device_to_device(soc_dev); | ||
108 | |||
83 | /* | 109 | /* |
84 | * Finished with the static registrations now; fill in the missing | 110 | * Finished with the static registrations now; fill in the missing |
85 | * devices | 111 | * devices |
86 | */ | 112 | */ |
113 | out: | ||
87 | of_platform_populate(NULL, of_default_bus_match_table, | 114 | of_platform_populate(NULL, of_default_bus_match_table, |
88 | tegra20_auxdata_lookup, NULL); | 115 | tegra20_auxdata_lookup, parent); |
89 | } | 116 | } |
90 | 117 | ||
91 | static void __init trimslice_init(void) | 118 | static void __init trimslice_init(void) |