Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm/gumstix Call pxa2x0_clkman_config() instead ...
details: https://anonhg.NetBSD.org/src/rev/7545cfe25be2
branches: trunk
changeset: 749555:7545cfe25be2
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Wed Dec 02 13:10:09 2009 +0000
description:
Call pxa2x0_clkman_config() instead of ioreg_write().
diffstat:
sys/arch/evbarm/gumstix/gumstix_machdep.c | 34 +++++++++++-------------------
1 files changed, 13 insertions(+), 21 deletions(-)
diffs (105 lines):
diff -r c116fd685d4f -r 7545cfe25be2 sys/arch/evbarm/gumstix/gumstix_machdep.c
--- a/sys/arch/evbarm/gumstix/gumstix_machdep.c Wed Dec 02 13:05:09 2009 +0000
+++ b/sys/arch/evbarm/gumstix/gumstix_machdep.c Wed Dec 02 13:10:09 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gumstix_machdep.c,v 1.20 2009/11/27 03:23:06 rmind Exp $ */
+/* $NetBSD: gumstix_machdep.c,v 1.21 2009/12/02 13:10:09 kiyohara Exp $ */
/*
* Copyright (C) 2005, 2006, 2007 WIDE Project and SOUM Corporation.
* All rights reserved.
@@ -498,6 +498,8 @@
/* configure GPIOs. */
gxio_config_pin();
+ pxa2x0_clkman_bootstrap(GUMSTIX_CLKMAN_VBASE);
+
consinit();
#ifdef KGDB
kgdb_port_init();
@@ -1021,10 +1023,6 @@
consinit(void)
{
static int consinit_called = 0;
-#if defined(FFUARTCONSOLE) || defined(STUARTCONSOLE) || \
- defined(BTUARTCONSOLE) || defined(HWUARTCONSOLE)
- uint32_t ckenreg = ioreg_read(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN);
-#endif
if (consinit_called != 0)
return;
@@ -1042,9 +1040,7 @@
{
if (0 == comcnattach(&pxa2x0_a4x_bs_tag, PXA2X0_FFUART_BASE,
comcnspeed, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comcnmode)) {
- ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN,
- ckenreg|CKEN_FFUART);
-
+ pxa2x0_clkman_config(CKEN_FFUART, 1);
return;
}
}
@@ -1059,8 +1055,7 @@
{
if (0 == comcnattach(&pxa2x0_a4x_bs_tag, PXA2X0_STUART_BASE,
comcnspeed, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comcnmode)) {
- ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN,
- ckenreg|CKEN_STUART);
+ pxa2x0_clkman_config(CKEN_STUART, 1);
return;
}
}
@@ -1075,8 +1070,7 @@
{
if (0 == comcnattach(&pxa2x0_a4x_bs_tag, PXA2X0_BTUART_BASE,
comcnspeed, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comcnmode)) {
- ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN,
- ckenreg|CKEN_BTUART);
+ pxa2x0_clkman_config(CKEN_BTUART, 1);
return;
}
}
@@ -1091,8 +1085,7 @@
{
if (0 == comcnattach(&pxa2x0_a4x_bs_tag, PXA2X0_HWUART_BASE,
comcnspeed, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comcnmode)) {
- ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN,
- ckenreg|CKEN_HWUART);
+ pxa2x0_clkman_config(CKEN_HWUART, 1);
return;
}
}
@@ -1111,28 +1104,27 @@
{
#if (NCOM > 0) && defined(COM_PXA2X0)
paddr_t paddr = 0;
- uint32_t ckenreg = ioreg_read(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN);
+ int cken = 0;
if (0 == strcmp(kgdb_devname, "ffuart")) {
paddr = PXA2X0_FFUART_BASE;
- ckenreg |= CKEN_FFUART;
+ cken = CKEN_FFUART;
} else if (0 == strcmp(kgdb_devname, "stuart")) {
paddr = PXA2X0_STUART_BASE;
- ckenreg |= CKEN_STUART;
+ cken = CKEN_STUART;
} else if (0 == strcmp(kgdb_devname, "btuart")) {
paddr = PXA2X0_BTUART_BASE;
- ckenreg |= CKEN_BTUART;
+ cken = CKEN_BTUART;
} else if (0 == strcmp(kgdb_devname, "hwuart")) {
paddr = PXA2X0_HWUART_BASE;
- ckenreg |= CKEN_HWUART;
+ cken = CKEN_HWUART;
}
if (paddr &&
0 == com_kgdb_attach(&pxa2x0_a4x_bs_tag, paddr,
kgdb_devrate, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comkgdbmode)) {
- ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN, ckenreg);
-
+ pxa2x0_clkman_config(cken, 1);
}
#endif
Home |
Main Index |
Thread Index |
Old Index