@@ -51,11 +51,11 @@ enum reset_type {
51
51
52
52
struct at91_reset {
53
53
void __iomem * rstc_base ;
54
+ void __iomem * ramc_base [2 ];
54
55
};
55
56
56
57
static struct at91_reset reset ;
57
58
58
- static void __iomem * at91_ramc_base [2 ];
59
59
static struct clk * sclk ;
60
60
61
61
/*
@@ -81,7 +81,7 @@ static int at91sam9260_restart(struct notifier_block *this, unsigned long mode,
81
81
82
82
"b .\n\t"
83
83
:
84
- : "r" (at91_ramc_base [0 ]),
84
+ : "r" (reset . ramc_base [0 ]),
85
85
"r" (reset .rstc_base ),
86
86
"r" (1 ),
87
87
"r" cpu_to_le32 (AT91_SDRAMC_LPCB_POWER_DOWN ),
@@ -123,8 +123,8 @@ static int at91sam9g45_restart(struct notifier_block *this, unsigned long mode,
123
123
124
124
" b .\n\t"
125
125
:
126
- : "r" (at91_ramc_base [0 ]),
127
- "r" (at91_ramc_base [1 ]),
126
+ : "r" (reset . ramc_base [0 ]),
127
+ "r" (reset . ramc_base [1 ]),
128
128
"r" (reset .rstc_base ),
129
129
"r" (1 ),
130
130
"r" cpu_to_le32 (AT91_DDRSDRC_LPCB_POWER_DOWN ),
@@ -225,8 +225,8 @@ static int __init at91_reset_probe(struct platform_device *pdev)
225
225
if (!of_device_is_compatible (pdev -> dev .of_node , "atmel,sama5d3-rstc" )) {
226
226
/* we need to shutdown the ddr controller, so get ramc base */
227
227
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 ]) {
230
230
dev_err (& pdev -> dev , "Could not map ram controller address\n" );
231
231
of_node_put (np );
232
232
return - ENODEV ;
0 commit comments