forked from luck/tmp_suning_uos_patched
Versatile cleanups for the v4.7 series:
- Dynamically detect and print HBI numbers in SoC sysfs - Hide the unused "pmu_device" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJXAi3IAAoJEEEQszewGV1z8IoQAMVpeZ5689bgHREtAK1IlA68 KIh5Ydhkpic2QvkxaBPSxuU6PYlvQuG6RPDdfpxN+J3sskqK7kOzJkxzEbvVz/SH e1mJnDvvRYa+yg62/u1aBEafR+uaLBKL0FaD+nLs/BkO6J6Zb2qISqdZiKzfgbce BM1fRmx2+MmmIZ11VW0LFMOzTY05WKAmwyVmUEzC+rBXWIOIxIdqZWGEbaNSd0+M Wi07AGhK1Hxxxaj1Fm2Or4xequYd33FAk8/iHNAL1BUccHa2gShDrsBp3DbXChbP Y8AVsd5Lc+e9SW1/ZzAOudWpGqxLe7/TdjVbOMjXUqfDfNpadug2HI06G5rAM/dN abOSCm0CV65RSSdWuWKFl7v26sM4V7+w+XH5pXGU4zEwUyofIHsezzX+ZM8voHk2 yxwXfXsKDvShgaqHtKbnKh5ouZorc68OmVuMoa3y/ei4Fr8JMZ+aEF9gfoLCAYx8 xnba3zeT4MbgewvnRGkhuv9N/VpWeNIPVpFlBpM+tNVfVx8zKccO6uKiaycq6oFc N+qwTbDD5H6jflNInaBX9OlWx6bKjGnD0YGxq6oamjrbayOyl8Txf2OBE+mYUS28 r4222jx5tTIfOAipLOlfMyORumdrOhk19azSmzUvxxZOkfHcix6hs8mfgoyfzfZa eki0IeVNIVWaHnnIi9xk =ZmNC -----END PGP SIGNATURE----- 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>
This commit is contained in:
commit
4b051f925c
|
@ -248,6 +248,7 @@ static struct resource realview_pbx_isp1761_resources[] = {
|
|||
},
|
||||
};
|
||||
|
||||
#ifdef CONFIG_CACHE_L2X0
|
||||
static struct resource pmu_resources[] = {
|
||||
[0] = {
|
||||
.start = IRQ_PBX_PMU_CPU0,
|
||||
|
@ -277,6 +278,7 @@ static struct platform_device pmu_device = {
|
|||
.num_resources = ARRAY_SIZE(pmu_resources),
|
||||
.resource = pmu_resources,
|
||||
};
|
||||
#endif
|
||||
|
||||
static void __init gic_init_irq(void)
|
||||
{
|
||||
|
|
|
@ -31,18 +31,6 @@ static const struct of_device_id realview_soc_of_match[] = {
|
|||
|
||||
static u32 realview_coreid;
|
||||
|
||||
static const char *realview_board_str(u32 id)
|
||||
{
|
||||
switch ((id >> 16) & 0xfff) {
|
||||
case 0x0147:
|
||||
return "HBI-0147";
|
||||
case 0x0159:
|
||||
return "HBI-0159";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
static const char *realview_arch_str(u32 id)
|
||||
{
|
||||
switch ((id >> 8) & 0xf) {
|
||||
|
@ -69,7 +57,7 @@ static ssize_t realview_get_board(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return sprintf(buf, "%s\n", realview_board_str(realview_coreid));
|
||||
return sprintf(buf, "HBI-%03x\n", ((realview_coreid >> 16) & 0xfff));
|
||||
}
|
||||
|
||||
static struct device_attribute realview_board_attr =
|
||||
|
@ -133,8 +121,9 @@ static int realview_soc_probe(struct platform_device *pdev)
|
|||
device_create_file(soc_device_to_device(soc_dev), &realview_arch_attr);
|
||||
device_create_file(soc_device_to_device(soc_dev), &realview_build_attr);
|
||||
|
||||
dev_info(&pdev->dev, "RealView Syscon Core ID: 0x%08x\n",
|
||||
realview_coreid);
|
||||
dev_info(&pdev->dev, "RealView Syscon Core ID: 0x%08x, HBI-%03x\n",
|
||||
realview_coreid,
|
||||
((realview_coreid >> 16) & 0xfff));
|
||||
/* FIXME: add attributes for SoC to sysfs */
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user