mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/pl111/pl111_debugfs.c:33:5: warning: no previous prototype for ‘pl111_debugfs_regs’ [-Wmissing-prototypes] Cc: Eric Anholt <eric@anholt.net> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20201116174112.1833368-24-lee.jones@linaro.org
		
			
				
	
	
		
			59 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			59 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
// SPDX-License-Identifier: GPL-2.0-only
 | 
						|
/*
 | 
						|
 *  Copyright © 2017 Broadcom
 | 
						|
 */
 | 
						|
 | 
						|
#include <linux/seq_file.h>
 | 
						|
 | 
						|
#include <drm/drm_debugfs.h>
 | 
						|
#include <drm/drm_file.h>
 | 
						|
 | 
						|
#include "pl111_drm.h"
 | 
						|
 | 
						|
#define REGDEF(reg) { reg, #reg }
 | 
						|
static const struct {
 | 
						|
	u32 reg;
 | 
						|
	const char *name;
 | 
						|
} pl111_reg_defs[] = {
 | 
						|
	REGDEF(CLCD_TIM0),
 | 
						|
	REGDEF(CLCD_TIM1),
 | 
						|
	REGDEF(CLCD_TIM2),
 | 
						|
	REGDEF(CLCD_TIM3),
 | 
						|
	REGDEF(CLCD_UBAS),
 | 
						|
	REGDEF(CLCD_LBAS),
 | 
						|
	REGDEF(CLCD_PL111_CNTL),
 | 
						|
	REGDEF(CLCD_PL111_IENB),
 | 
						|
	REGDEF(CLCD_PL111_RIS),
 | 
						|
	REGDEF(CLCD_PL111_MIS),
 | 
						|
	REGDEF(CLCD_PL111_ICR),
 | 
						|
	REGDEF(CLCD_PL111_UCUR),
 | 
						|
	REGDEF(CLCD_PL111_LCUR),
 | 
						|
};
 | 
						|
 | 
						|
static int pl111_debugfs_regs(struct seq_file *m, void *unused)
 | 
						|
{
 | 
						|
	struct drm_info_node *node = (struct drm_info_node *)m->private;
 | 
						|
	struct drm_device *dev = node->minor->dev;
 | 
						|
	struct pl111_drm_dev_private *priv = dev->dev_private;
 | 
						|
	int i;
 | 
						|
 | 
						|
	for (i = 0; i < ARRAY_SIZE(pl111_reg_defs); i++) {
 | 
						|
		seq_printf(m, "%s (0x%04x): 0x%08x\n",
 | 
						|
			   pl111_reg_defs[i].name, pl111_reg_defs[i].reg,
 | 
						|
			   readl(priv->regs + pl111_reg_defs[i].reg));
 | 
						|
	}
 | 
						|
 | 
						|
	return 0;
 | 
						|
}
 | 
						|
 | 
						|
static const struct drm_info_list pl111_debugfs_list[] = {
 | 
						|
	{"regs", pl111_debugfs_regs, 0},
 | 
						|
};
 | 
						|
 | 
						|
void
 | 
						|
pl111_debugfs_init(struct drm_minor *minor)
 | 
						|
{
 | 
						|
	drm_debugfs_create_files(pl111_debugfs_list,
 | 
						|
				 ARRAY_SIZE(pl111_debugfs_list),
 | 
						|
				 minor->debugfs_root, minor);
 | 
						|
}
 |