Skip to content

Commit 4d9ce0f

Browse files
claudiubezneasre
authored andcommitted
power: reset: at91-reset: add ramc_base[] to struct at91_reset
Add ramc_base[] to struct at91_reset. Signed-off-by: Claudiu Beznea <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent b2a1661 commit 4d9ce0f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/power/reset/at91-reset.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ enum reset_type {
5151

5252
struct at91_reset {
5353
void __iomem *rstc_base;
54+
void __iomem *ramc_base[2];
5455
};
5556

5657
static struct at91_reset reset;
5758

58-
static void __iomem *at91_ramc_base[2];
5959
static struct clk *sclk;
6060

6161
/*
@@ -81,7 +81,7 @@ static int at91sam9260_restart(struct notifier_block *this, unsigned long mode,
8181

8282
"b .\n\t"
8383
:
84-
: "r" (at91_ramc_base[0]),
84+
: "r" (reset.ramc_base[0]),
8585
"r" (reset.rstc_base),
8686
"r" (1),
8787
"r" cpu_to_le32(AT91_SDRAMC_LPCB_POWER_DOWN),
@@ -123,8 +123,8 @@ static int at91sam9g45_restart(struct notifier_block *this, unsigned long mode,
123123

124124
" b .\n\t"
125125
:
126-
: "r" (at91_ramc_base[0]),
127-
"r" (at91_ramc_base[1]),
126+
: "r" (reset.ramc_base[0]),
127+
"r" (reset.ramc_base[1]),
128128
"r" (reset.rstc_base),
129129
"r" (1),
130130
"r" cpu_to_le32(AT91_DDRSDRC_LPCB_POWER_DOWN),
@@ -225,8 +225,8 @@ static int __init at91_reset_probe(struct platform_device *pdev)
225225
if (!of_device_is_compatible(pdev->dev.of_node, "atmel,sama5d3-rstc")) {
226226
/* we need to shutdown the ddr controller, so get ramc base */
227227
for_each_matching_node(np, at91_ramc_of_match) {
228-
at91_ramc_base[idx] = of_iomap(np, 0);
229-
if (!at91_ramc_base[idx]) {
228+
reset.ramc_base[idx] = of_iomap(np, 0);
229+
if (!reset.ramc_base[idx]) {
230230
dev_err(&pdev->dev, "Could not map ram controller address\n");
231231
of_node_put(np);
232232
return -ENODEV;

0 commit comments

Comments
 (0)