aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2016-04-13 16:51:14 -0400
committerOlof Johansson <olof@lixom.net>2016-04-13 16:51:14 -0400
commit4b051f925c3a924ccb6e56f1768140d7f726db7b (patch)
tree05deb0da6fe707b0e07ec526315639505a9bd104
parentbf16200689118d19de1b8d2a3c314fc21f5dc7bb (diff)
parent7fbbe38aa11816ef15844238e8eb3164b887d265 (diff)
Merge tag 'versatile-cleanup-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/cleanup
Versatile cleanups for the v4.7 series: - Dynamically detect and print HBI numbers in SoC sysfs - Hide the unused "pmu_device" * tag 'versatile-cleanup-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: realview: hide unused 'pmu_device' object soc: versatile: dynamically detect RealView HBI numbers Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r--arch/arm/mach-realview/realview_pbx.c2
-rw-r--r--drivers/soc/versatile/soc-realview.c19
2 files changed, 6 insertions, 15 deletions
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index b9f0757787ac..be1cec5fe3ad 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -248,6 +248,7 @@ static struct resource realview_pbx_isp1761_resources[] = {
248 }, 248 },
249}; 249};
250 250
251#ifdef CONFIG_CACHE_L2X0
251static struct resource pmu_resources[] = { 252static struct resource pmu_resources[] = {
252 [0] = { 253 [0] = {
253 .start = IRQ_PBX_PMU_CPU0, 254 .start = IRQ_PBX_PMU_CPU0,
@@ -277,6 +278,7 @@ static struct platform_device pmu_device = {
277 .num_resources = ARRAY_SIZE(pmu_resources), 278 .num_resources = ARRAY_SIZE(pmu_resources),
278 .resource = pmu_resources, 279 .resource = pmu_resources,
279}; 280};
281#endif
280 282
281static void __init gic_init_irq(void) 283static void __init gic_init_irq(void)
282{ 284{
diff --git a/drivers/soc/versatile/soc-realview.c b/drivers/soc/versatile/soc-realview.c
index c337764de867..282e371378ce 100644
--- a/drivers/soc/versatile/soc-realview.c
+++ b/drivers/soc/versatile/soc-realview.c
@@ -31,18 +31,6 @@ static const struct of_device_id realview_soc_of_match[] = {
31 31
32static u32 realview_coreid; 32static u32 realview_coreid;
33 33
34static const char *realview_board_str(u32 id)
35{
36 switch ((id >> 16) & 0xfff) {
37 case 0x0147:
38 return "HBI-0147";
39 case 0x0159:
40 return "HBI-0159";
41 default:
42 return "Unknown";
43 }
44}
45
46static const char *realview_arch_str(u32 id) 34static const char *realview_arch_str(u32 id)
47{ 35{
48 switch ((id >> 8) & 0xf) { 36 switch ((id >> 8) & 0xf) {
@@ -69,7 +57,7 @@ static ssize_t realview_get_board(struct device *dev,
69 struct device_attribute *attr, 57 struct device_attribute *attr,
70 char *buf) 58 char *buf)
71{ 59{
72 return sprintf(buf, "%s\n", realview_board_str(realview_coreid)); 60 return sprintf(buf, "HBI-%03x\n", ((realview_coreid >> 16) & 0xfff));
73} 61}
74 62
75static struct device_attribute realview_board_attr = 63static struct device_attribute realview_board_attr =
@@ -133,8 +121,9 @@ static int realview_soc_probe(struct platform_device *pdev)
133 device_create_file(soc_device_to_device(soc_dev), &realview_arch_attr); 121 device_create_file(soc_device_to_device(soc_dev), &realview_arch_attr);
134 device_create_file(soc_device_to_device(soc_dev), &realview_build_attr); 122 device_create_file(soc_device_to_device(soc_dev), &realview_build_attr);
135 123
136 dev_info(&pdev->dev, "RealView Syscon Core ID: 0x%08x\n", 124 dev_info(&pdev->dev, "RealView Syscon Core ID: 0x%08x, HBI-%03x\n",
137 realview_coreid); 125 realview_coreid,
126 ((realview_coreid >> 16) & 0xfff));
138 /* FIXME: add attributes for SoC to sysfs */ 127 /* FIXME: add attributes for SoC to sysfs */
139 return 0; 128 return 0;
140} 129}