3 * Rich Ireland, Enterasys Networks, rireland@enterasys.com.
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26 #include <asm/processor.h>
29 int write_bat (ppc_bat_t bat
, unsigned long upper
, unsigned long lower
)
33 mtspr (IBAT0L
, lower
);
34 mtspr (IBAT0U
, upper
);
38 mtspr (IBAT1L
, lower
);
39 mtspr (IBAT1U
, upper
);
43 mtspr (IBAT2L
, lower
);
44 mtspr (IBAT2U
, upper
);
48 mtspr (IBAT3L
, lower
);
49 mtspr (IBAT3U
, upper
);
53 mtspr (DBAT0L
, lower
);
54 mtspr (DBAT0U
, upper
);
58 mtspr (DBAT1L
, lower
);
59 mtspr (DBAT1U
, upper
);
63 mtspr (DBAT2L
, lower
);
64 mtspr (DBAT2U
, upper
);
68 mtspr (DBAT3L
, lower
);
69 mtspr (DBAT3U
, upper
);
79 int read_bat (ppc_bat_t bat
, unsigned long *upper
, unsigned long *lower
)
81 unsigned long register u
;
82 unsigned long register l
;