Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324450
b: refs/heads/master
c: e5445ee
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Greg Kroah-Hartman committed Sep 26, 2012
1 parent 87dd57f commit 29f428d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1980a347a71693a41663a1780c2da869174a0025
refs/heads/master: e5445ee6a62329f6eb28b8ebd8ff4c4659ca0209
23 changes: 17 additions & 6 deletions trunk/drivers/memory/emif.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ static unsigned long irq_state;
static u32 t_ck; /* DDR clock period in ps */
static LIST_HEAD(device_list);

#ifdef CONFIG_DEBUG_FS
static void do_emif_regdump_show(struct seq_file *s, struct emif_data *emif,
struct emif_regs *regs)
{
Expand Down Expand Up @@ -166,23 +167,23 @@ static int __init_or_module emif_debugfs_init(struct emif_data *emif)
int ret;

dentry = debugfs_create_dir(dev_name(emif->dev), NULL);
if (IS_ERR(dentry)) {
ret = PTR_ERR(dentry);
if (!dentry) {
ret = -ENOMEM;
goto err0;
}
emif->debugfs_root = dentry;

dentry = debugfs_create_file("regcache_dump", S_IRUGO,
emif->debugfs_root, emif, &emif_regdump_fops);
if (IS_ERR(dentry)) {
ret = PTR_ERR(dentry);
if (!dentry) {
ret = -ENOMEM;
goto err1;
}

dentry = debugfs_create_file("mr4", S_IRUGO,
emif->debugfs_root, emif, &emif_mr4_fops);
if (IS_ERR(dentry)) {
ret = PTR_ERR(dentry);
if (!dentry) {
ret = -ENOMEM;
goto err1;
}

Expand All @@ -198,6 +199,16 @@ static void __exit emif_debugfs_exit(struct emif_data *emif)
debugfs_remove_recursive(emif->debugfs_root);
emif->debugfs_root = NULL;
}
#else
static inline int __init_or_module emif_debugfs_init(struct emif_data *emif)
{
return 0;
}

static inline void __exit emif_debugfs_exit(struct emif_data *emif)
{
}
#endif

/*
* Calculate the period of DDR clock from frequency value
Expand Down

0 comments on commit 29f428d

Please sign in to comment.