17 #include <linux/ptrace.h>
20 #include <asm/reboot.h>
21 #include <asm/traps.h>
30 static void __init tx4938_wdr_init(
void)
34 pr_warning(
"Watchdog reset detected at 0x%lx\n",
47 static void tx4938_machine_restart(
char *
command)
50 pr_emerg(
"Rebooting (with %s watchdog reset)...\n",
52 "external" :
"internal");
60 pr_emerg(
"Rebooting (with internal watchdog reset)...\n");
69 static int tx4938_be_handler(
struct pt_regs *
regs,
int is_fixup)
73 pr_err(
"%cBE exception at %#lx\n", data ?
'D' :
'I', regs->
cp0_epc);
74 pr_err(
"ccfg:%llx, toea:%llx\n",
83 static void __init tx4938_be_init(
void)
88 static struct resource tx4938_sdram_resource[4];
89 static struct resource tx4938_sram_resource;
91 #define TX4938_SRAM_SIZE 0x800
97 unsigned int cpuclk = 0;
105 for (i = 0; i < 8; i++) {
199 printk(
KERN_INFO "%s -- %dMHz(M%dMHz) CRIR:%08x CCFG:%llx PCFG:%llx\n",
201 (cpuclk + 500000) / 1000000,
208 for (i = 0; i < 4; i++) {
211 if (!((
__u32)cr & 0x00000400))
213 base = (
unsigned long)(cr >> 49) << 21;
214 size = (((
unsigned long)(cr >> 33) & 0x7fff) + 1) << 21;
215 printk(
" CR%d:%016llx", i, (
unsigned long long)cr);
216 tx4938_sdram_resource[
i].name =
"SDRAM";
217 tx4938_sdram_resource[
i].start = base;
218 tx4938_sdram_resource[
i].end = base + size - 1;
228 tx4938_sram_resource.name =
"SRAM";
229 tx4938_sram_resource.start =
232 tx4938_sram_resource.end =
294 unsigned int ch_mask = 0;
298 for (i = 0; i < 2; i++) {
299 if ((1 << i) & ch_mask)
303 i, sclk, (1 << i) & cts_mask);
363 for (i = 0; i < 8; i++) {
366 if ((ebccr & 0x00f00008) == 0x00e00008)
372 res[0].
start = ((ebccr >> 48) << 20) + 0x10000;
373 res[0].
end = res[0].
start + 0x20000 - 1;
409 for (i = 0; i < 2; i++) {
410 plat_data.
memcpy_chan = i ? memcpy_chan1 : memcpy_chan0;
430 if (tx4938_sram_resource.start)
434 static void __init tx4938_stop_unused_modules(
void)
451 if (!(pcfg & TX4938_PCFG_SEL2) ||
481 static int __init tx4938_late_init(
void)
485 tx4938_stop_unused_modules();