diff options
Diffstat (limited to 'drivers/memory/tegra20-mc.c')
-rw-r--r-- | drivers/memory/tegra20-mc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/memory/tegra20-mc.c b/drivers/memory/tegra20-mc.c index 3ed49c1c2b9..e6764bb41cb 100644 --- a/drivers/memory/tegra20-mc.c +++ b/drivers/memory/tegra20-mc.c | |||
@@ -57,7 +57,7 @@ static inline u32 mc_readl(struct tegra20_mc *mc, u32 offs) | |||
57 | 57 | ||
58 | if (offs < 0x24) | 58 | if (offs < 0x24) |
59 | val = readl(mc->regs[0] + offs); | 59 | val = readl(mc->regs[0] + offs); |
60 | if (offs < 0x400) | 60 | else if (offs < 0x400) |
61 | val = readl(mc->regs[1] + offs - 0x3c); | 61 | val = readl(mc->regs[1] + offs - 0x3c); |
62 | 62 | ||
63 | return val; | 63 | return val; |
@@ -65,14 +65,10 @@ static inline u32 mc_readl(struct tegra20_mc *mc, u32 offs) | |||
65 | 65 | ||
66 | static inline void mc_writel(struct tegra20_mc *mc, u32 val, u32 offs) | 66 | static inline void mc_writel(struct tegra20_mc *mc, u32 val, u32 offs) |
67 | { | 67 | { |
68 | if (offs < 0x24) { | 68 | if (offs < 0x24) |
69 | writel(val, mc->regs[0] + offs); | 69 | writel(val, mc->regs[0] + offs); |
70 | return; | 70 | else if (offs < 0x400) |
71 | } | ||
72 | if (offs < 0x400) { | ||
73 | writel(val, mc->regs[1] + offs - 0x3c); | 71 | writel(val, mc->regs[1] + offs - 0x3c); |
74 | return; | ||
75 | } | ||
76 | } | 72 | } |
77 | 73 | ||
78 | static const char * const tegra20_mc_client[] = { | 74 | static const char * const tegra20_mc_client[] = { |