Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283572
b: refs/heads/master
c: eda2030
h: refs/heads/master
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Dec 9, 2011
1 parent a6f7b55 commit c96808d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 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: d4775356bb39eaa305844cc6cc4c267236535956
refs/heads/master: eda2030a5b60bb818f062adacbcfb6fd2d366fb9
9 changes: 7 additions & 2 deletions trunk/drivers/sh/clk/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ static int clk_establish_mapping(struct clk *clk)
*/
if (!clk->parent) {
clk->mapping = &dummy_mapping;
return 0;
goto out;
}

/*
Expand Down Expand Up @@ -384,6 +384,9 @@ static int clk_establish_mapping(struct clk *clk)
}

clk->mapping = mapping;
out:
clk->mapped_reg = clk->mapping->base;
clk->mapped_reg += (phys_addr_t)clk->enable_reg - clk->mapping->phys;
return 0;
}

Expand All @@ -402,10 +405,12 @@ static void clk_teardown_mapping(struct clk *clk)

/* Nothing to do */
if (mapping == &dummy_mapping)
return;
goto out;

kref_put(&mapping->ref, clk_destroy_mapping);
clk->mapping = NULL;
out:
clk->mapped_reg = NULL;
}

int clk_register(struct clk *clk)
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/sh_clk.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ struct clk {

void __iomem *enable_reg;
unsigned int enable_bit;
void __iomem *mapped_reg;

unsigned long arch_flags;
void *priv;
Expand Down

0 comments on commit c96808d

Please sign in to comment.