Standby AFE Clock, if use_afeck is 0. Don't stop AFE Clock, if PERSONA boots

on serial console.
This commit is contained in:
kiyohara 2010-05-13 18:07:40 +00:00
parent b2368e5383
commit 19163bd05e
3 changed files with 19 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: hd64461.c,v 1.22 2009/04/05 00:56:20 uwe Exp $ */
/* $NetBSD: hd64461.c,v 1.23 2010/05/13 18:07:40 kiyohara Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hd64461.c,v 1.22 2009/04/05 00:56:20 uwe Exp $");
__KERNEL_RCSID(0, "$NetBSD: hd64461.c,v 1.23 2010/05/13 18:07:40 kiyohara Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -59,6 +59,8 @@ STATIC const struct hd64461_module {
#endif
};
int use_afeck = 0;
STATIC int hd64461_match(device_t, cfdata_t, void *);
STATIC void hd64461_attach(device_t, device_t, void *);
STATIC int hd64461_print(void *, const char *);
@ -109,10 +111,11 @@ hd64461_attach(device_t parent, device_t self, void *aux)
stbcr |= HD64461_SYSSTBCR_STM0ST | HD64461_SYSSTBCR_STM1ST;
/* no drivers for FIR and AFE */
stbcr |= HD64461_SYSSTBCR_SIRST
| HD64461_SYSSTBCR_SAFEST
| HD64461_SYSSTBCR_SAFECKE_IST
| HD64461_SYSSTBCR_SAFECKE_OST;
stbcr |= HD64461_SYSSTBCR_SIRST | HD64461_SYSSTBCR_SAFEST;
if (!use_afeck)
stbcr |=
HD64461_SYSSTBCR_SAFECKE_IST | HD64461_SYSSTBCR_SAFECKE_OST;
hd64461_reg_write_2(HD64461_SYSSTBCR_REG16, stbcr);

View File

@ -1,4 +1,4 @@
/* $NetBSD: hd64461uart.c,v 1.25 2010/05/12 18:22:36 kiyohara Exp $ */
/* $NetBSD: hd64461uart.c,v 1.26 2010/05/13 18:07:40 kiyohara Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hd64461uart.c,v 1.25 2010/05/12 18:22:36 kiyohara Exp $");
__KERNEL_RCSID(0, "$NetBSD: hd64461uart.c,v 1.26 2010/05/13 18:07:40 kiyohara Exp $");
#include "opt_kgdb.h"
@ -116,6 +116,9 @@ hd64461uartcninit(struct consdev *cp)
COM_TYPE_NORMAL, CONMODE);
hd64461uart_chip.console = 1;
/* Don't stop to suply AFECK */
if (platid_match(&platid, &platid_mask_MACH_HITACHI_PERSONA))
use_afeck = 1;
}
#ifdef KGDB
@ -137,6 +140,8 @@ hd64461uart_kgdb_init(void)
return 1;
}
if (platid_match(&platid, &platid_mask_MACH_HITACHI_PERSONA))
use_afeck = 1;
return 0;
}
#endif /* KGDB */

View File

@ -1,4 +1,4 @@
/* $NetBSD: hd64461var.h,v 1.4 2008/04/28 20:23:22 martin Exp $ */
/* $NetBSD: hd64461var.h,v 1.5 2010/05/13 18:07:40 kiyohara Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@ -59,6 +59,8 @@ struct hd64461_attach_args {
enum hd64461_module_id ha_module_id;
};
extern int use_afeck;
/*
* Interrupt staff.
*/