Improved alchemy board support, including board differentiation required for
PCI idsel and irq routing (later). Various cleanup/rototilling to remove hardcoded pb1000 references. Reviewed by simonb@, and derived from changes reviewed by matt@ and tsutsui@
This commit is contained in:
parent
e67db332d1
commit
017c98158d
61
sys/arch/evbmips/alchemy/board.h
Normal file
61
sys/arch/evbmips/alchemy/board.h
Normal file
@ -0,0 +1,61 @@
|
||||
/* $NetBSD: board.h,v 1.1 2006/02/08 09:04:01 gdamore Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 Itronix Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by Garrett D'Amore for Itronix Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of Itronix Inc. may not be used to endorse
|
||||
* or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _EVBMIPS_ALCHEMY_BOARD_H
|
||||
#define _EVBMIPS_ALCHEMY_BOARD_H
|
||||
|
||||
#include <dev/pci/pcivar.h>
|
||||
|
||||
struct alchemy_board {
|
||||
const char *ab_name;
|
||||
const struct obiodev *ab_devices;
|
||||
void (*ab_init)(void);
|
||||
int (*ab_pci_intr_map)(struct pci_attach_args *,
|
||||
pci_intr_handle_t *);
|
||||
|
||||
/*
|
||||
* XXX: csb250 (and perhaps others) will require pci_idsel
|
||||
* entry point
|
||||
*
|
||||
* XXX: almost certainly some PCMCIA logic will have to be
|
||||
* added
|
||||
*
|
||||
* XXX: some boards have hardware reset better than yamon, and
|
||||
* power management interfaces -- maybe we should add hooks
|
||||
* here
|
||||
*/
|
||||
};
|
||||
|
||||
const struct alchemy_board *board_info(void);
|
||||
|
||||
#endif /* _EVBMIPS_ALCHEMY_BOARD_H */
|
127
sys/arch/evbmips/alchemy/dbau1500.c
Normal file
127
sys/arch/evbmips/alchemy/dbau1500.c
Normal file
@ -0,0 +1,127 @@
|
||||
/* $NetBSD: dbau1500.c,v 1.1 2006/02/08 09:04:01 gdamore Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 Itronix Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by Garrett D'Amore for Itronix Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of Itronix Inc. may not be used to endorse
|
||||
* or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: dbau1500.c,v 1.1 2006/02/08 09:04:01 gdamore Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <machine/bus.h>
|
||||
#include <machine/locore.h>
|
||||
#include <evbmips/alchemy/obiovar.h>
|
||||
#include <evbmips/alchemy/board.h>
|
||||
#include <evbmips/alchemy/dbau1500reg.h>
|
||||
|
||||
static void dbau1500_init(void);
|
||||
static int dbau1500_pci_intr_map(struct pci_attach_args *,
|
||||
pci_intr_handle_t *);
|
||||
|
||||
static const struct obiodev dbau1500_devices[] = {
|
||||
#if 0
|
||||
{ "aupcmcia", -1, -1 },
|
||||
{ "auaudio", -1, -1 },
|
||||
#endif
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
static struct alchemy_board dbau1500_info = {
|
||||
"AMD Alchemy DBAu1500",
|
||||
dbau1500_devices,
|
||||
dbau1500_init,
|
||||
dbau1500_pci_intr_map,
|
||||
};
|
||||
|
||||
const struct alchemy_board *
|
||||
board_info(void)
|
||||
{
|
||||
|
||||
return &dbau1500_info;
|
||||
}
|
||||
|
||||
void
|
||||
dbau1500_init(void)
|
||||
{
|
||||
uint32_t whoami;
|
||||
|
||||
if (MIPS_PRID_COPTS(cpu_id) != MIPS_AU1500)
|
||||
panic("dbau1500: CPU not an AU1500!");
|
||||
|
||||
/* check the whoami register for a match */
|
||||
whoami = *((volatile uint32_t *)DBAU1500_WHOAMI);
|
||||
|
||||
if (DBAU1500_WHOAMI_BOARD(whoami) != DBAU1500_WHOAMI_DBAU1500)
|
||||
panic("dbau1500: WHOAMI (%x) not DBAu1500!", whoami);
|
||||
|
||||
printf("DBAu1500 (zinfandel), CPLDv%d, ",
|
||||
DBAU1500_WHOAMI_CPLD(whoami));
|
||||
|
||||
if (DBAU1500_WHOAMI_DAUGHTER(whoami) != 0xf)
|
||||
printf("daughtercard 0x%x\n",
|
||||
DBAU1500_WHOAMI_DAUGHTER(whoami));
|
||||
else
|
||||
printf("no daughtercard\n");
|
||||
|
||||
/* leave console and clocks alone -- YAMON should have got it right! */
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
dbau1500_pci_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp)
|
||||
{
|
||||
/*
|
||||
* This platform has PCI slot and IDE interrupts mapped
|
||||
* identically. So we just need to look at which of the four
|
||||
* PCI interrupts it is.
|
||||
*/
|
||||
|
||||
switch (pa->pa_intrpin) {
|
||||
case 0:
|
||||
/* not used */
|
||||
return 1;
|
||||
case 1:
|
||||
*ihp = 1;
|
||||
break;
|
||||
case 2:
|
||||
*ihp = 2;
|
||||
break;
|
||||
case 3:
|
||||
*ihp = 4;
|
||||
break;
|
||||
case 4:
|
||||
*ihp = 5;
|
||||
break;
|
||||
default:
|
||||
printf("pci: bad interrupt pin %d\n", pa->pa_intrpin);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
20
sys/arch/evbmips/alchemy/dbau1500reg.h
Normal file
20
sys/arch/evbmips/alchemy/dbau1500reg.h
Normal file
@ -0,0 +1,20 @@
|
||||
/* $NetBSD: dbau1500reg.h,v 1.1 2006/02/08 09:04:01 gdamore Exp $ */
|
||||
|
||||
/*
|
||||
* Board-specific registers for DBAu1550.
|
||||
*/
|
||||
|
||||
#define DBAU1500_WHOAMI 0xAE000000
|
||||
#define DBAU1500_WHOAMI_BOARD_MASK 0x00000f00
|
||||
#define DBAU1500_WHOAMI_DBAU1500 0x6
|
||||
|
||||
#define DBAU1500_WHOAMI_BOARD(x) (((x) >> 8) & 0x7)
|
||||
#define DBAU1500_WHOAMI_CPLD(x) (((x) >> 4) & 0xf)
|
||||
#define DBAU1500_WHOAMI_DAUGHTER(x) ((x) & 0xf)
|
||||
|
||||
#define DBAU1500_BCSR 0xAE000004
|
||||
#define DBAU1500_BCSR_SWAPBOOT 0x20000000
|
||||
#define DBAU1500_BCSR_PCMCIA1_INSERTED 0x00000020
|
||||
#define DBAU1500_BCSR_PCMCIA0_INSERTED 0x00000010
|
||||
#define DBAU1500_BCSR_PCMCIA1_VS 0x0000000c
|
||||
#define DBAU1500_BCSR_PCMCIA0_VS 0x00000003
|
134
sys/arch/evbmips/alchemy/dbau1550.c
Normal file
134
sys/arch/evbmips/alchemy/dbau1550.c
Normal file
@ -0,0 +1,134 @@
|
||||
/* $NetBSD: dbau1550.c,v 1.1 2006/02/08 09:04:01 gdamore Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 Itronix Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by Garrett D'Amore for Itronix Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of Itronix Inc. may not be used to endorse
|
||||
* or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: dbau1550.c,v 1.1 2006/02/08 09:04:01 gdamore Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <machine/bus.h>
|
||||
#include <machine/locore.h>
|
||||
#include <evbmips/alchemy/obiovar.h>
|
||||
#include <evbmips/alchemy/board.h>
|
||||
#include <evbmips/alchemy/dbau1550reg.h>
|
||||
|
||||
static void dbau1550_init(void);
|
||||
static int dbau1550_pci_intr_map(struct pci_attach_args *,
|
||||
pci_intr_handle_t *);
|
||||
|
||||
static const struct obiodev dbau1550_devices[] = {
|
||||
#if 0
|
||||
{ "aupcmcia", -1, -1 },
|
||||
{ "aupsc", -1, -1 },
|
||||
{ "aupsc", -1, -1 },
|
||||
{ "aupsc", -1, -1 },
|
||||
#endif
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
static struct alchemy_board dbau1550_info = {
|
||||
"AMD Alchemy DBAu1550",
|
||||
dbau1550_devices,
|
||||
dbau1550_init,
|
||||
dbau1550_pci_intr_map,
|
||||
};
|
||||
|
||||
const struct alchemy_board *
|
||||
board_info(void)
|
||||
{
|
||||
|
||||
return &dbau1550_info;
|
||||
}
|
||||
|
||||
void
|
||||
dbau1550_init(void)
|
||||
{
|
||||
uint32_t whoami;
|
||||
|
||||
if (MIPS_PRID_COPTS(cpu_id) != MIPS_AU1550)
|
||||
panic("dbau1550: CPU not Au1550");
|
||||
|
||||
/* check the whoami register for a match */
|
||||
whoami = *((volatile uint32_t *)DBAU1550_WHOAMI);
|
||||
|
||||
if (DBAU1550_WHOAMI_BOARD(whoami) != DBAU1550_WHOAMI_DBAU1550_REV1)
|
||||
panic("dbau1550: WHOAMI (%x) not DBAu1550!", whoami);
|
||||
|
||||
printf("DBAu1550 (cabernet), CPLDv%d, ",
|
||||
DBAU1550_WHOAMI_CPLD(whoami));
|
||||
|
||||
if (DBAU1550_WHOAMI_DAUGHTER(whoami) != 0xf)
|
||||
printf("daughtercard 0x%x\n",
|
||||
DBAU1550_WHOAMI_DAUGHTER(whoami));
|
||||
else
|
||||
printf("no daughtercard\n");
|
||||
|
||||
/* leave console and clocks alone -- YAMON should have got it right! */
|
||||
}
|
||||
|
||||
int
|
||||
dbau1550_pci_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp)
|
||||
{
|
||||
/*
|
||||
* This platform has one onboard PCI IDE controller, and two
|
||||
* PCI expansion slots.
|
||||
*/
|
||||
static const int irqmap[3/*device*/][4/*pin*/] = {
|
||||
{ 5, -1, -1, -1 }, /* 11: IDE */
|
||||
{ 2, 5, 6, 1 }, /* 12: PCI Slot 2 */
|
||||
{ 1, 2, 5, 6 }, /* 13: PCI Slot 3 */
|
||||
};
|
||||
int pin, dev, irq;
|
||||
|
||||
/* if interrupt pin not used... */
|
||||
if ((pin = pa->pa_intrpin) == 0)
|
||||
return 1;
|
||||
|
||||
if (pin > 4) {
|
||||
printf("pci: bad interrupt pin %d\n", pin);
|
||||
return 1;
|
||||
}
|
||||
|
||||
pci_decompose_tag(pa->pa_pc, pa->pa_intrtag, NULL, &dev, NULL);
|
||||
if ((dev < 11) || (dev > 13)) {
|
||||
printf("pci: bad device %d\n", dev);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((irq = irqmap[dev - 11][pin - 1]) == -1) {
|
||||
printf("pci: no IRQ routing for device %d pin %d\n", dev, pin);
|
||||
return 1;
|
||||
}
|
||||
|
||||
*ihp = irq;
|
||||
return 0;
|
||||
}
|
28
sys/arch/evbmips/alchemy/dbau1550reg.h
Normal file
28
sys/arch/evbmips/alchemy/dbau1550reg.h
Normal file
@ -0,0 +1,28 @@
|
||||
/* $NetBSD: dbau1550reg.h,v 1.1 2006/02/08 09:04:01 gdamore Exp $ */
|
||||
|
||||
/*
|
||||
* Board-specific registers for DBAu1550.
|
||||
*/
|
||||
|
||||
#define DBAU1550_WHOAMI 0xAF000000
|
||||
#define DBAU1550_WHOAMI_BOARD_MASK 0x00000f00
|
||||
#define DBAU1550_WHOAMI_PB1500_REV1 0x1
|
||||
#define DBAU1550_WHOAMI_PB1500_REV2 0x2
|
||||
#define DBAU1550_WHOAMI_PB1100 0x3
|
||||
#define DBAU1550_WHOAMI_DBAU1000 0x4
|
||||
#define DBAU1550_WHOAMI_DBAU1100 0x5
|
||||
#define DBAU1550_WHOAMI_DBAU1500 0x6
|
||||
#define DBAU1550_WHOAMI_DBAU1550_REV1 0x7
|
||||
#define DBAU1550_WHOAMI_PB1550_DDR 0x8
|
||||
#define DBAU1550_WHOAMI_PB1550_SDR 0x9
|
||||
|
||||
#define DBAU1550_WHOAMI_BOARD(x) (((x) >> 8) & 0xf)
|
||||
#define DBAU1550_WHOAMI_CPLD(x) (((x) >> 4) & 0xf)
|
||||
#define DBAU1550_WHOAMI_DAUGHTER(x) ((x) & 0xf)
|
||||
|
||||
#define DBAU1550_BCSR 0xAF000004
|
||||
#define DBAU1550_BCSR_SWAPBOOT 0x20000000
|
||||
#define DBAU1550_BCSR_PCMCIA1_INSERTED 0x00000020
|
||||
#define DBAU1550_BCSR_PCMCIA0_INSERTED 0x00000010
|
||||
#define DBAU1550_BCSR_PCMCIA1_VS 0x0000000c
|
||||
#define DBAU1550_BCSR_PCMCIA0_VS 0x00000003
|
98
sys/arch/evbmips/alchemy/genericbd.c
Normal file
98
sys/arch/evbmips/alchemy/genericbd.c
Normal file
@ -0,0 +1,98 @@
|
||||
/* $NetBSD: genericbd.c,v 1.1 2006/02/08 09:04:01 gdamore Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 Itronix Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by Garrett D'Amore for Itronix Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of Itronix Inc. may not be used to endorse
|
||||
* or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: genericbd.c,v 1.1 2006/02/08 09:04:01 gdamore Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <machine/bus.h>
|
||||
#include <machine/locore.h>
|
||||
#include <evbmips/alchemy/obiovar.h>
|
||||
#include <evbmips/alchemy/board.h>
|
||||
|
||||
static void genericbd_init(void);
|
||||
|
||||
/*
|
||||
* Generically, we have no OBIO devices.
|
||||
*/
|
||||
static const struct obiodev genericbd_devices[] = {
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
static struct alchemy_board genericbd_info = {
|
||||
NULL,
|
||||
genericbd_devices,
|
||||
genericbd_init,
|
||||
NULL, /* no PCI */
|
||||
};
|
||||
|
||||
/*
|
||||
* XXX: A cleaner way would be to get this from the cpu table in the MIPS
|
||||
* CPU handler code (or even better, have *that* code fill in cpu_model.)
|
||||
*/
|
||||
static struct {
|
||||
int id;
|
||||
const char *name;
|
||||
} cpus[] = {
|
||||
{ MIPS_AU1000, "Generic Alchemy Au1000" },
|
||||
{ MIPS_AU1100, "Generic Alchemy Au1100" },
|
||||
{ MIPS_AU1500, "Generic Alchemy Au1500" },
|
||||
{ MIPS_AU1550, "Generic Alchemy Au1550" },
|
||||
{ 0, NULL },
|
||||
};
|
||||
|
||||
const struct alchemy_board *
|
||||
board_info(void)
|
||||
{
|
||||
/* at least try to report the correct processor name */
|
||||
if (genericbd_info.ab_name == NULL) {
|
||||
int i;
|
||||
for (i = 0; cpus[i].name; i++) {
|
||||
if (cpus[i].id == MIPS_PRID_COPTS(cpu_id)) {
|
||||
genericbd_info.ab_name = cpus[i].name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (genericbd_info.ab_name == NULL)
|
||||
genericbd_info.ab_name = "Unknown Alchemy";
|
||||
}
|
||||
|
||||
return &genericbd_info;
|
||||
}
|
||||
|
||||
void
|
||||
genericbd_init(void)
|
||||
{
|
||||
|
||||
/* leave console and clocks alone -- YAMON should have got it right! */
|
||||
}
|
@ -1,5 +1,35 @@
|
||||
/* $NetBSD: machdep.c,v 1.23 2006/01/27 23:05:16 gdamore Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.24 2006/02/08 09:04:01 gdamore Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 Itronix Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Portions written by Garrett D'Amore for Itronix Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of Itronix Inc. may not be used to endorse
|
||||
* or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ITRONIX INC. ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ITRONIX INC. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -77,7 +107,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.23 2006/01/27 23:05:16 gdamore Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.24 2006/02/08 09:04:01 gdamore Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -115,7 +145,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.23 2006/01/27 23:05:16 gdamore Exp $")
|
||||
#include <mips/locore.h>
|
||||
#include <machine/yamon.h>
|
||||
|
||||
#include <evbmips/alchemy/pb1000var.h>
|
||||
#include <evbmips/alchemy/board.h>
|
||||
#include <mips/alchemy/include/aureg.h>
|
||||
#include <mips/alchemy/include/auvar.h>
|
||||
#include <mips/alchemy/include/aubusvar.h>
|
||||
@ -149,29 +179,32 @@ int mem_cluster_cnt;
|
||||
phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX];
|
||||
|
||||
yamon_env_var *yamon_envp;
|
||||
struct pb1000_config pb1000_configuration;
|
||||
struct mips_bus_space alchemy_cpuregt;
|
||||
|
||||
void mach_init(int, char **, yamon_env_var *, u_long); /* XXX */
|
||||
|
||||
void
|
||||
mach_init(int argc, char **argv, yamon_env_var *envp, u_long memsize)
|
||||
{
|
||||
struct pb1000_config *pbc = &pb1000_configuration;
|
||||
bus_space_handle_t sh;
|
||||
caddr_t kernend;
|
||||
const char *cp;
|
||||
u_long first, last;
|
||||
caddr_t v;
|
||||
int freqok, howto, i;
|
||||
const struct alchemy_board *board;
|
||||
|
||||
extern char edata[], end[]; /* XXX */
|
||||
|
||||
board = board_info();
|
||||
KASSERT(board != NULL);
|
||||
|
||||
/* clear the BSS segment */
|
||||
kernend = (caddr_t)mips_round_page(end);
|
||||
memset(edata, 0, kernend - (caddr_t)edata);
|
||||
|
||||
/* set CPU model info for sysctl_hw */
|
||||
strcpy(cpu_model, "Alchemy Semiconductor Pb1000");
|
||||
strcpy(cpu_model, board->ab_name);
|
||||
|
||||
/* save the yamon environment pointer */
|
||||
yamon_envp = envp;
|
||||
@ -203,18 +236,23 @@ mach_init(int argc, char **argv, yamon_env_var *envp, u_long memsize)
|
||||
/*
|
||||
* Initialize bus space tags.
|
||||
*/
|
||||
au_cpureg_bus_mem_init(&pbc->pc_cpuregt, pbc);
|
||||
aubus_st = &pbc->pc_cpuregt; /* XXX: for aubus.c */
|
||||
au_cpureg_bus_mem_init(&alchemy_cpuregt, &alchemy_cpuregt);
|
||||
aubus_st = &alchemy_cpuregt;
|
||||
|
||||
/*
|
||||
* Calibrate the timer if YAMON failed to tell us.
|
||||
*/
|
||||
if (!freqok) {
|
||||
bus_space_map(&pbc->pc_cpuregt, PC_BASE, PC_SIZE, 0, &sh);
|
||||
au_cal_timers(&pbc->pc_cpuregt, sh);
|
||||
bus_space_unmap(&pbc->pc_cpuregt, sh, PC_SIZE);
|
||||
bus_space_map(aubus_st, PC_BASE, PC_SIZE, 0, &sh);
|
||||
au_cal_timers(aubus_st, sh);
|
||||
bus_space_unmap(aubus_st, sh, PC_SIZE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform board-specific initialization.
|
||||
*/
|
||||
board->ab_init();
|
||||
|
||||
/*
|
||||
* Bring up the console.
|
||||
*/
|
||||
@ -232,9 +270,11 @@ mach_init(int argc, char **argv, yamon_env_var *envp, u_long memsize)
|
||||
aucomcnrate = strtoul(cp, NULL, 0);
|
||||
|
||||
if (aucomcnrate == 0) {
|
||||
panic("pb1000: The `modetty0' YAMON variable not set. "
|
||||
"Either set it to the speed of the console and try again, "
|
||||
"or build a kernel with the `CONSPEED' option.");
|
||||
printf("FATAL: `modetty0' YAMON variable not set. Set it\n");
|
||||
printf(" to the speed of the console and try again.\n");
|
||||
printf(" Or, build a kernel with the `CONSPEED' "
|
||||
"option.\n");
|
||||
panic("mach_init");
|
||||
}
|
||||
#endif /* CONSPEED */
|
||||
|
||||
@ -244,12 +284,12 @@ mach_init(int argc, char **argv, yamon_env_var *envp, u_long memsize)
|
||||
* character time = (1000000 / (defaultrate / 10))
|
||||
*/
|
||||
delay(160000000 / aucomcnrate);
|
||||
if (aucomcnattach(&pbc->pc_cpuregt, UART0_BASE, aucomcnrate,
|
||||
if (aucomcnattach(aubus_st, UART0_BASE, aucomcnrate,
|
||||
curcpu()->ci_cpu_freq / 4, COM_TYPE_AU1x00,
|
||||
(TTYDEF_CFLAG & ~(CSIZE | PARENB)) | CS8) != 0)
|
||||
panic("pb1000: unable to initialize serial console");
|
||||
panic("mach_init: unable to initialize serial console");
|
||||
#else
|
||||
panic("pb1000: not configured to use serial console");
|
||||
panic("mach_init: not configured to use serial console");
|
||||
#endif /* NAUCOM > 0 */
|
||||
|
||||
/*
|
||||
@ -293,7 +333,7 @@ mach_init(int argc, char **argv, yamon_env_var *envp, u_long memsize)
|
||||
printf(" the amount of memory (in MB) and try again.\n");
|
||||
printf(" Or, build a kernel with the `MEMSIZE' "
|
||||
"option.\n");
|
||||
panic("pb1000_init");
|
||||
panic("mach_init");
|
||||
}
|
||||
}
|
||||
#endif /* MEMSIZE */
|
||||
@ -466,3 +506,17 @@ cpu_reboot(int howto, char *bootstr)
|
||||
/* spin forever */ ; /* XXX */
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* add this when we add PCI support */
|
||||
int
|
||||
machdep_pci_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp)
|
||||
{
|
||||
struct alchemy_board *board;
|
||||
|
||||
board = board_info();
|
||||
if (board->ab_pci_intr_map != NULL)
|
||||
return (board->ab_pci_intr_map(pa, ihp));
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pb1000_obio.c,v 1.9 2005/12/11 12:17:11 christos Exp $ */
|
||||
/* $NetBSD: obio.c,v 1.1 2006/02/08 09:04:01 gdamore Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002 Wasabi Systems, Inc.
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pb1000_obio.c,v 1.9 2005/12/11 12:17:11 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.1 2006/02/08 09:04:01 gdamore Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -47,8 +47,8 @@ __KERNEL_RCSID(0, "$NetBSD: pb1000_obio.c,v 1.9 2005/12/11 12:17:11 christos Exp
|
||||
#include <mips/cache.h>
|
||||
#include <mips/cpuregs.h>
|
||||
|
||||
#include <evbmips/alchemy/pb1000reg.h>
|
||||
#include <evbmips/alchemy/pb1000_obiovar.h>
|
||||
#include <evbmips/alchemy/board.h>
|
||||
#include <evbmips/alchemy/obiovar.h>
|
||||
|
||||
#include "locators.h"
|
||||
|
||||
@ -62,20 +62,7 @@ CFATTACH_DECL(obio, sizeof(struct device),
|
||||
obio_match, obio_attach, NULL, NULL);
|
||||
|
||||
/* There can be only one. */
|
||||
int obio_found;
|
||||
|
||||
struct obiodev {
|
||||
const char *od_name;
|
||||
bus_addr_t od_addr;
|
||||
int od_irq;
|
||||
};
|
||||
|
||||
struct obiodev obiodevs[] = {
|
||||
{ "pcmcia", -1, -1 },
|
||||
{ "lcd", -1, -1 },
|
||||
{ "flash", -1, -1 },
|
||||
{ NULL, 0, 0 },
|
||||
};
|
||||
static int obio_found = 0;
|
||||
|
||||
static int
|
||||
obio_match(struct device *parent, struct cfdata *match, void *aux)
|
||||
@ -91,12 +78,14 @@ static void
|
||||
obio_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct obio_attach_args oa;
|
||||
struct obiodev *od;
|
||||
const struct obiodev *od;
|
||||
const struct alchemy_board *board;
|
||||
|
||||
obio_found = 1;
|
||||
printf("\n");
|
||||
|
||||
for (od = obiodevs; od->od_name != NULL; od++) {
|
||||
board = board_info();
|
||||
for (od = board->ab_devices; od->od_name != NULL; od++) {
|
||||
oa.oba_name = od->od_name;
|
||||
oa.oba_addr = od->od_addr;
|
||||
oa.oba_irq = od->od_irq;
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pb1000_obiovar.h,v 1.1 2002/07/29 16:22:58 simonb Exp $ */
|
||||
/* $NetBSD: obiovar.h,v 1.1 2006/02/08 09:04:01 gdamore Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002 Wasabi Systems, Inc.
|
||||
@ -35,8 +35,8 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _PB1000_OBIOVAR_H_
|
||||
#define _PB1000_OBIOVAR_H_
|
||||
#ifndef _EVBMIPS_ALCHEMY_OBIOVAR_H_
|
||||
#define _EVBMIPS_ALCHEMY_OBIOVAR_H_
|
||||
|
||||
struct obio_attach_args {
|
||||
const char *oba_name; /* name of device */
|
||||
@ -45,6 +45,10 @@ struct obio_attach_args {
|
||||
int oba_irq; /* CPLD interrupt bit # */
|
||||
};
|
||||
|
||||
// extern struct bus_space obio_bs_tag;
|
||||
struct obiodev {
|
||||
const char *od_name;
|
||||
bus_addr_t od_addr;
|
||||
int od_irq;
|
||||
};
|
||||
|
||||
#endif /* _PB1000_OBIOVAR_H_ */
|
||||
#endif /* _EVBMIPS_ALCHEMY_OBIOVAR_H_ */
|
@ -1,47 +0,0 @@
|
||||
/* $NetBSD: pb1000var.h,v 1.2 2006/02/07 18:57:12 gdamore Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Jason R. Thorpe.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <machine/bus.h>
|
||||
|
||||
#include <mips/alchemy/include/auvar.h>
|
||||
#include <mips/alchemy/include/aubusvar.h>
|
||||
|
||||
struct pb1000_config {
|
||||
struct mips_bus_space pc_cpuregt;
|
||||
};
|
||||
|
@ -1,11 +1,11 @@
|
||||
# $NetBSD: ALCHEMY,v 1.3 2006/02/06 23:48:55 simonb Exp $
|
||||
# $NetBSD: ALCHEMY,v 1.4 2006/02/08 09:04:01 gdamore Exp $
|
||||
#
|
||||
# Kernel config for the Alchemy Semiconductor (AMD) PB1000, PB1500,
|
||||
# DBAu1000 and DBAu1500 evaluation boards.
|
||||
|
||||
include "arch/evbmips/conf/std.pb1000"
|
||||
include "arch/evbmips/conf/std.alchemy"
|
||||
|
||||
#ident "ALCHEMY-$Revision: 1.3 $"
|
||||
#ident "ALCHEMY-$Revision: 1.4 $"
|
||||
|
||||
maxusers 32
|
||||
|
||||
@ -21,6 +21,9 @@ options ALCHEMY_AU1100
|
||||
options ALCHEMY_AU1500
|
||||
options ALCHEMY_AU1550
|
||||
|
||||
# Board support
|
||||
options ALCHEMY_GENERIC
|
||||
|
||||
#options LOCKDEBUG
|
||||
options SOSEND_LOAN
|
||||
options SOSEND_COUNTERS
|
||||
|
265
sys/arch/evbmips/conf/DBAU1500
Normal file
265
sys/arch/evbmips/conf/DBAU1500
Normal file
@ -0,0 +1,265 @@
|
||||
# $NetBSD: DBAU1500,v 1.1 2006/02/08 09:04:01 gdamore Exp $
|
||||
#
|
||||
# Kernel config for the AMD Alchemy DBAu1500 evaluation board.
|
||||
|
||||
include "arch/evbmips/conf/std.alchemy"
|
||||
|
||||
#ident "DBAU1500-$Revision: 1.1 $"
|
||||
|
||||
maxusers 32
|
||||
|
||||
options MIPS32
|
||||
options NOFPU # No FPU
|
||||
options SOFTFLOAT # emulate FPU insn
|
||||
#options CONSPEED=115200 # YAMON default
|
||||
options HZ=512 # for profiling
|
||||
|
||||
# CPU and Board support
|
||||
options ALCHEMY_AU1500
|
||||
options ALCHEMY_DBAU1500
|
||||
|
||||
#options LOCKDEBUG
|
||||
options SOSEND_LOAN
|
||||
options SOSEND_COUNTERS
|
||||
options INET_CSUM_COUNTERS
|
||||
options TCP_CSUM_COUNTERS
|
||||
options UDP_CSUM_COUNTERS
|
||||
options TCP_OUTPUT_COUNTERS
|
||||
|
||||
# Standard system options
|
||||
options KTRACE # system call tracing support
|
||||
options SYSVMSG # System V message queues
|
||||
options SYSVSEM # System V semaphores
|
||||
options SYSVSHM # System V shared memory
|
||||
#options SHMMAXPGS=1024 # 1024 pages is the default
|
||||
#options LKM # loadable kernel modules
|
||||
options NTP # network time protocol
|
||||
|
||||
# Debugging options
|
||||
options DIAGNOSTIC # extra kernel sanity checking
|
||||
options DEBUG # extra kernel debugging support
|
||||
#options KMEMSTATS # kernel memory statistics (vmstat -m)
|
||||
options DDB # kernel dynamic debugger
|
||||
options DDB_HISTORY_SIZE=100 # enable history editing in DDB
|
||||
makeoptions DEBUG="-g" # compile full symbol table
|
||||
options SYMTAB_SPACE=180000 # size for embedded symbol table
|
||||
|
||||
# Compatibility options
|
||||
#options COMPAT_43 # compatibility with 4.3BSD binaries
|
||||
#options COMPAT_09 # NetBSD 0.9 binary compatibility
|
||||
#options COMPAT_10 # NetBSD 1.0 binary compatibility
|
||||
#options COMPAT_11 # NetBSD 1.1 binary compatibility
|
||||
#options COMPAT_12 # NetBSD 1.2 binary compatibility
|
||||
#options COMPAT_13 # NetBSD 1.3 binary compatibility
|
||||
#options COMPAT_14 # NetBSD 1.4 binary compatibility
|
||||
options COMPAT_16 # NetBSD 1.6 binary compatibility
|
||||
options COMPAT_20 # NetBSD 2.0 binary compatibility
|
||||
options COMPAT_30 # NetBSD 3.0 compatibility.
|
||||
#options EXEC_ECOFF # exec ECOFF binaries
|
||||
#options COMPAT_ULTRIX # binary compatibility with Ultrix
|
||||
options COMPAT_BSDPTY # /dev/[pt]ty?? ptys.
|
||||
|
||||
# File systems
|
||||
file-system FFS # Berkeley Fast Filesystem
|
||||
file-system MFS # memory-based filesystem
|
||||
#file-system EXT2FS # second extended file system (linux)
|
||||
file-system NFS # Sun NFS-compatible filesystem client
|
||||
#file-system KERNFS # kernel data-structure filesystem
|
||||
#file-system NULLFS # NULL layered filesystem
|
||||
#file-system OVERLAY # overlay file system
|
||||
file-system FDESC # user file descriptor filesystem
|
||||
#file-system UMAPFS # uid/gid remapping filesystem
|
||||
#file-system LFS # Log-based filesystem (still experimental)
|
||||
#file-system PORTAL # portal filesystem (still experimental)
|
||||
#file-system PROCFS # /proc
|
||||
#file-system CD9660 # ISO 9660 + Rock Ridge file system
|
||||
#file-system UNION # union file system
|
||||
#file-system MSDOSFS # MS-DOS FAT filesystem(s).
|
||||
#file-system CODA # Coda File System; also needs vcoda (below)
|
||||
#file-system PTYFS # /dev/pts/N support
|
||||
|
||||
# File system options
|
||||
#options NFSSERVER # Sun NFS-compatible filesystem server
|
||||
#options QUOTA # FFS quotas
|
||||
#options FFS_EI # FFS Endian Independant support
|
||||
#options SOFTDEP # FFS soft updates support.
|
||||
options FFS_NO_SNAPSHOT # No FFS snapshot support
|
||||
#options EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
|
||||
# immutable) behave as system flags.
|
||||
|
||||
# Networking options
|
||||
#options GATEWAY # IP packet forwarding
|
||||
options INET # Internet protocols
|
||||
#options INET6 # IPV6
|
||||
#options IPSEC # IP security
|
||||
#options IPSEC_ESP # IP security (encryption part; define w/IPSEC)
|
||||
#options IPSEC_NAT_T # IPsec NAT traversal (NAT-T)
|
||||
#options IPSEC_DEBUG # debug for IP security
|
||||
#options MROUTING # packet forwarding of multicast packets
|
||||
#options PIM # Protocol Independent Multicast
|
||||
#options NS # Xerox NS networking
|
||||
#options NSIP # Xerox NS tunneling over IP
|
||||
#options ISO,TPIP # OSI networking
|
||||
#options EON # OSI tunneling over IP
|
||||
#options CCITT,LLC,HDLC # X.25
|
||||
#options NETATALK # AppleTalk (over Ethernet) protocol
|
||||
#options PPP_BSDCOMP # BSD-Compress compression support for PPP
|
||||
#options PPP_DEFLATE # Deflate compression support for PPP
|
||||
#options PPP_FILTER # Active filter support for PPP (requires bpf)
|
||||
#options PFIL_HOOKS # pfil(9) packet filter hooks
|
||||
options IPFILTER_LOG # ipmon(8) log support
|
||||
|
||||
# Compatibility with 4.2BSD implementation of TCP/IP. Not recommended.
|
||||
#options TCP_COMPAT_42
|
||||
|
||||
# These options enable verbose messages for several subsystems.
|
||||
# Warning, these may compile large string tables into the kernel!
|
||||
options MIIVERBOSE # verbose PHY autoconfig messages
|
||||
options PCIVERBOSE # verbose PCI device autoconfig messages
|
||||
#options PCI_CONFIG_DUMP # verbosely dump PCI config space
|
||||
options SCSIVERBOSE # human readable SCSI error messages
|
||||
options USBVERBOSE # verbose USB device autoconfig messages
|
||||
|
||||
options NFS_BOOT_DHCP
|
||||
|
||||
# Pretty much only one device to use for the root file system.
|
||||
config netbsd root on ? type ?
|
||||
config netbsd-aumac0 root on aumac0 type nfs
|
||||
|
||||
mainbus0 at root
|
||||
|
||||
cpu0 at mainbus?
|
||||
|
||||
aubus0 at mainbus?
|
||||
|
||||
# no RTC! fake with one of the programmable clocks
|
||||
aurtc* at aubus? addr ?
|
||||
|
||||
# UARTs
|
||||
aucom* at aubus? addr ?
|
||||
|
||||
# Ethernet MACs
|
||||
aumac* at aubus? addr ?
|
||||
options AUMAC_EVENT_COUNTERS
|
||||
|
||||
# MII/PHY support
|
||||
amhphy* at mii? phy ? # AMD 79c901 Ethernet PHYs
|
||||
bmtphy* at mii? phy ? # Broadcom BCM5201/BCM5202 PHYs
|
||||
sqphy* at mii? phy ? # Seeq 80220/80221/80223 PHYs
|
||||
acphy* at mii? phy ? # AMD/Altima AC101 PHYs
|
||||
|
||||
# USB
|
||||
ohci* at aubus? addr ? # USB Open Host Controller
|
||||
|
||||
# USB bus support
|
||||
usb* at ohci?
|
||||
|
||||
# USB Hubs
|
||||
uhub* at usb?
|
||||
uhub* at uhub? port ? configuration ? interface ?
|
||||
|
||||
# USB HID device
|
||||
uhidev* at uhub? port ? configuration ? interface ?
|
||||
|
||||
# USB Mice
|
||||
ums* at uhidev? reportid ?
|
||||
wsmouse* at ums? mux 0
|
||||
|
||||
# USB Keyboards
|
||||
ukbd* at uhidev? reportid ?
|
||||
wskbd* at ukbd? console ? mux 1
|
||||
|
||||
# USB serial adpater
|
||||
ucycom* at uhidev? reportid ?
|
||||
|
||||
# USB Generic HID devices
|
||||
uhid* at uhidev? reportid ?
|
||||
|
||||
# USB Printer
|
||||
ulpt* at uhub? port ? configuration ? interface ?
|
||||
|
||||
# USB Modem
|
||||
umodem* at uhub? port ? configuration ?
|
||||
ucom* at umodem?
|
||||
|
||||
# USB Mass Storage
|
||||
umass* at uhub? port ? configuration ? interface ?
|
||||
scsibus* at scsi?
|
||||
sd* at scsibus? target ? lun ?
|
||||
|
||||
# USB audio
|
||||
#uaudio* at uhub? port ? configuration ?
|
||||
|
||||
# USB MIDI
|
||||
#umidi* at uhub? port ? configuration ?
|
||||
|
||||
# USB IrDA
|
||||
# USB-IrDA bridge spec
|
||||
#uirda* at uhub? port ? configuration ? interface ?
|
||||
#irframe* at uirda?
|
||||
|
||||
# Kyocera AIR-EDGE PHONE
|
||||
#ukyopon* at uhub? port ?
|
||||
#ucom* at ukyopon? portno ?
|
||||
|
||||
# USB Generic driver
|
||||
ugen* at uhub? port ?
|
||||
|
||||
# Audio support
|
||||
auaudio* at aubus? addr ? # STAC9745 audio codec
|
||||
audio* at auaudio?
|
||||
|
||||
# On-board devices
|
||||
obio* at mainbus?
|
||||
|
||||
aupcmcia* at obio? addr ?
|
||||
pcmcia* at aupcmcia?
|
||||
|
||||
#pbpci* at obio? addr ?
|
||||
#pci* at pbpci?
|
||||
|
||||
#flash* at obio? addr ?
|
||||
#lcd* at obio? addr ?
|
||||
|
||||
#pchb* at pci? dev ? function ?
|
||||
#pcib* at pci? dev ? function ?
|
||||
|
||||
# PCMCIA devices
|
||||
wi* at pcmcia? function ? # Lucent WaveLan IEEE (802.11)
|
||||
|
||||
# Pseudo-devices
|
||||
|
||||
# Disk/mass storage pseudo-devices
|
||||
#pseudo-device ccd 4 # concatenated disk devices
|
||||
#pseudo-device raid 4 # RAIDframe disk driver
|
||||
#options RAID_AUTOCONFIG # auto-configuration of RAID
|
||||
#pseudo-device fss 4 # file system snapshot device
|
||||
#pseudo-device md 1 # memory disk device (ramdisk)
|
||||
pseudo-device vnd # disk-like interface to files
|
||||
|
||||
# Network pseudo-devices
|
||||
pseudo-device bpfilter # Berkeley packet filter
|
||||
pseudo-device ipfilter # IP filter (firewall) and NAT
|
||||
pseudo-device loop # network loopback
|
||||
#pseudo-device ppp # Point-to-Point Protocol
|
||||
#pseudo-device sl # Serial Line IP
|
||||
#pseudo-device strip # Starmode Radio IP (Metricom)
|
||||
#pseudo-device tun # network tunneling over tty
|
||||
#pseudo-device tap # virtual Ethernet
|
||||
#pseudo-device gre # generic L3 over IP tunnel
|
||||
#pseudo-device ipip 2 # RFC 2003 IP Encapsulation
|
||||
#pseudo-device gif # RFC1933 tunnel
|
||||
#pseudo-device faith # IPv[46] tcp relay translation
|
||||
#pseudo-device stf # 6to4 IPv6 over IPv4 encapsulation
|
||||
pseudo-device vlan # IEEE 802.1q encapsulation
|
||||
pseudo-device bridge # simple inter-network bridging
|
||||
|
||||
# Miscellaneous pseudo-devices
|
||||
pseudo-device pty # pseudo-terminals
|
||||
#pseudo-device sequencer 1 # MIDI sequencer
|
||||
# rnd works; RND_COM does not on port i386 yet.
|
||||
pseudo-device rnd # /dev/random & kernel generator
|
||||
#options RND_COM # use "com" randomness (BROKEN)
|
||||
|
||||
# A pseudo device needed for Coda # also needs CODA (above)
|
||||
#pseudo-device vcoda 4 # coda minicache <-> venus comm.
|
265
sys/arch/evbmips/conf/DBAU1550
Normal file
265
sys/arch/evbmips/conf/DBAU1550
Normal file
@ -0,0 +1,265 @@
|
||||
# $NetBSD: DBAU1550,v 1.1 2006/02/08 09:04:01 gdamore Exp $
|
||||
#
|
||||
# Kernel config for the AMD Alchemy DBAu1550 evaluation board.
|
||||
|
||||
include "arch/evbmips/conf/std.alchemy"
|
||||
|
||||
#ident "DBAU1550-$Revision: 1.1 $"
|
||||
|
||||
maxusers 32
|
||||
|
||||
options MIPS32
|
||||
options NOFPU # No FPU
|
||||
options SOFTFLOAT # emulate FPU insn
|
||||
#options CONSPEED=115200 # YAMON default
|
||||
options HZ=512 # for profiling
|
||||
|
||||
# CPU and Board support
|
||||
options ALCHEMY_AU1550
|
||||
options ALCHEMY_DBAU1550
|
||||
|
||||
#options LOCKDEBUG
|
||||
options SOSEND_LOAN
|
||||
options SOSEND_COUNTERS
|
||||
options INET_CSUM_COUNTERS
|
||||
options TCP_CSUM_COUNTERS
|
||||
options UDP_CSUM_COUNTERS
|
||||
options TCP_OUTPUT_COUNTERS
|
||||
|
||||
# Standard system options
|
||||
options KTRACE # system call tracing support
|
||||
options SYSVMSG # System V message queues
|
||||
options SYSVSEM # System V semaphores
|
||||
options SYSVSHM # System V shared memory
|
||||
#options SHMMAXPGS=1024 # 1024 pages is the default
|
||||
#options LKM # loadable kernel modules
|
||||
options NTP # network time protocol
|
||||
|
||||
# Debugging options
|
||||
options DIAGNOSTIC # extra kernel sanity checking
|
||||
options DEBUG # extra kernel debugging support
|
||||
#options KMEMSTATS # kernel memory statistics (vmstat -m)
|
||||
options DDB # kernel dynamic debugger
|
||||
options DDB_HISTORY_SIZE=100 # enable history editing in DDB
|
||||
makeoptions DEBUG="-g" # compile full symbol table
|
||||
options SYMTAB_SPACE=180000 # size for embedded symbol table
|
||||
|
||||
# Compatibility options
|
||||
#options COMPAT_43 # compatibility with 4.3BSD binaries
|
||||
#options COMPAT_09 # NetBSD 0.9 binary compatibility
|
||||
#options COMPAT_10 # NetBSD 1.0 binary compatibility
|
||||
#options COMPAT_11 # NetBSD 1.1 binary compatibility
|
||||
#options COMPAT_12 # NetBSD 1.2 binary compatibility
|
||||
#options COMPAT_13 # NetBSD 1.3 binary compatibility
|
||||
#options COMPAT_14 # NetBSD 1.4 binary compatibility
|
||||
options COMPAT_16 # NetBSD 1.6 binary compatibility
|
||||
options COMPAT_20 # NetBSD 2.0 binary compatibility
|
||||
options COMPAT_30 # NetBSD 3.0 compatibility.
|
||||
#options EXEC_ECOFF # exec ECOFF binaries
|
||||
#options COMPAT_ULTRIX # binary compatibility with Ultrix
|
||||
options COMPAT_BSDPTY # /dev/[pt]ty?? ptys.
|
||||
|
||||
# File systems
|
||||
file-system FFS # Berkeley Fast Filesystem
|
||||
file-system MFS # memory-based filesystem
|
||||
#file-system EXT2FS # second extended file system (linux)
|
||||
file-system NFS # Sun NFS-compatible filesystem client
|
||||
#file-system KERNFS # kernel data-structure filesystem
|
||||
#file-system NULLFS # NULL layered filesystem
|
||||
#file-system OVERLAY # overlay file system
|
||||
file-system FDESC # user file descriptor filesystem
|
||||
#file-system UMAPFS # uid/gid remapping filesystem
|
||||
#file-system LFS # Log-based filesystem (still experimental)
|
||||
#file-system PORTAL # portal filesystem (still experimental)
|
||||
#file-system PROCFS # /proc
|
||||
#file-system CD9660 # ISO 9660 + Rock Ridge file system
|
||||
#file-system UNION # union file system
|
||||
#file-system MSDOSFS # MS-DOS FAT filesystem(s).
|
||||
#file-system CODA # Coda File System; also needs vcoda (below)
|
||||
#file-system PTYFS # /dev/pts/N support
|
||||
|
||||
# File system options
|
||||
#options NFSSERVER # Sun NFS-compatible filesystem server
|
||||
#options QUOTA # FFS quotas
|
||||
#options FFS_EI # FFS Endian Independant support
|
||||
#options SOFTDEP # FFS soft updates support.
|
||||
options FFS_NO_SNAPSHOT # No FFS snapshot support
|
||||
#options EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
|
||||
# immutable) behave as system flags.
|
||||
|
||||
# Networking options
|
||||
#options GATEWAY # IP packet forwarding
|
||||
options INET # Internet protocols
|
||||
#options INET6 # IPV6
|
||||
#options IPSEC # IP security
|
||||
#options IPSEC_ESP # IP security (encryption part; define w/IPSEC)
|
||||
#options IPSEC_NAT_T # IPsec NAT traversal (NAT-T)
|
||||
#options IPSEC_DEBUG # debug for IP security
|
||||
#options MROUTING # packet forwarding of multicast packets
|
||||
#options PIM # Protocol Independent Multicast
|
||||
#options NS # Xerox NS networking
|
||||
#options NSIP # Xerox NS tunneling over IP
|
||||
#options ISO,TPIP # OSI networking
|
||||
#options EON # OSI tunneling over IP
|
||||
#options CCITT,LLC,HDLC # X.25
|
||||
#options NETATALK # AppleTalk (over Ethernet) protocol
|
||||
#options PPP_BSDCOMP # BSD-Compress compression support for PPP
|
||||
#options PPP_DEFLATE # Deflate compression support for PPP
|
||||
#options PPP_FILTER # Active filter support for PPP (requires bpf)
|
||||
#options PFIL_HOOKS # pfil(9) packet filter hooks
|
||||
options IPFILTER_LOG # ipmon(8) log support
|
||||
|
||||
# Compatibility with 4.2BSD implementation of TCP/IP. Not recommended.
|
||||
#options TCP_COMPAT_42
|
||||
|
||||
# These options enable verbose messages for several subsystems.
|
||||
# Warning, these may compile large string tables into the kernel!
|
||||
options MIIVERBOSE # verbose PHY autoconfig messages
|
||||
options PCIVERBOSE # verbose PCI device autoconfig messages
|
||||
#options PCI_CONFIG_DUMP # verbosely dump PCI config space
|
||||
options SCSIVERBOSE # human readable SCSI error messages
|
||||
options USBVERBOSE # verbose USB device autoconfig messages
|
||||
|
||||
options NFS_BOOT_DHCP
|
||||
|
||||
# Pretty much only one device to use for the root file system.
|
||||
config netbsd root on ? type ?
|
||||
config netbsd-aumac0 root on aumac0 type nfs
|
||||
|
||||
mainbus0 at root
|
||||
|
||||
cpu0 at mainbus?
|
||||
|
||||
aubus0 at mainbus?
|
||||
|
||||
# no RTC! fake with one of the programmable clocks
|
||||
aurtc* at aubus? addr ?
|
||||
|
||||
# UARTs
|
||||
aucom* at aubus? addr ?
|
||||
|
||||
# Ethernet MACs
|
||||
aumac* at aubus? addr ?
|
||||
options AUMAC_EVENT_COUNTERS
|
||||
|
||||
# MII/PHY support
|
||||
amhphy* at mii? phy ? # AMD 79c901 Ethernet PHYs
|
||||
bmtphy* at mii? phy ? # Broadcom BCM5201/BCM5202 PHYs
|
||||
sqphy* at mii? phy ? # Seeq 80220/80221/80223 PHYs
|
||||
acphy* at mii? phy ? # AMD/Altima AC101 PHYs
|
||||
|
||||
# USB
|
||||
ohci* at aubus? addr ? # USB Open Host Controller
|
||||
|
||||
# USB bus support
|
||||
usb* at ohci?
|
||||
|
||||
# USB Hubs
|
||||
uhub* at usb?
|
||||
uhub* at uhub? port ? configuration ? interface ?
|
||||
|
||||
# USB HID device
|
||||
uhidev* at uhub? port ? configuration ? interface ?
|
||||
|
||||
# USB Mice
|
||||
ums* at uhidev? reportid ?
|
||||
wsmouse* at ums? mux 0
|
||||
|
||||
# USB Keyboards
|
||||
ukbd* at uhidev? reportid ?
|
||||
wskbd* at ukbd? console ? mux 1
|
||||
|
||||
# USB serial adpater
|
||||
ucycom* at uhidev? reportid ?
|
||||
|
||||
# USB Generic HID devices
|
||||
uhid* at uhidev? reportid ?
|
||||
|
||||
# USB Printer
|
||||
ulpt* at uhub? port ? configuration ? interface ?
|
||||
|
||||
# USB Modem
|
||||
umodem* at uhub? port ? configuration ?
|
||||
ucom* at umodem?
|
||||
|
||||
# USB Mass Storage
|
||||
umass* at uhub? port ? configuration ? interface ?
|
||||
scsibus* at scsi?
|
||||
sd* at scsibus? target ? lun ?
|
||||
|
||||
# USB audio
|
||||
#uaudio* at uhub? port ? configuration ?
|
||||
|
||||
# USB MIDI
|
||||
#umidi* at uhub? port ? configuration ?
|
||||
|
||||
# USB IrDA
|
||||
# USB-IrDA bridge spec
|
||||
#uirda* at uhub? port ? configuration ? interface ?
|
||||
#irframe* at uirda?
|
||||
|
||||
# Kyocera AIR-EDGE PHONE
|
||||
#ukyopon* at uhub? port ?
|
||||
#ucom* at ukyopon? portno ?
|
||||
|
||||
# USB Generic driver
|
||||
ugen* at uhub? port ?
|
||||
|
||||
# Audio support
|
||||
auaudio* at aubus? addr ? # STAC9745 audio codec
|
||||
audio* at auaudio?
|
||||
|
||||
# On-board devices
|
||||
obio* at mainbus?
|
||||
|
||||
aupcmcia* at obio? addr ?
|
||||
pcmcia* at aupcmcia?
|
||||
|
||||
#pbpci* at obio? addr ?
|
||||
#pci* at pbpci?
|
||||
|
||||
#flash* at obio? addr ?
|
||||
#lcd* at obio? addr ?
|
||||
|
||||
#pchb* at pci? dev ? function ?
|
||||
#pcib* at pci? dev ? function ?
|
||||
|
||||
# PCMCIA devices
|
||||
wi* at pcmcia? function ? # Lucent WaveLan IEEE (802.11)
|
||||
|
||||
# Pseudo-devices
|
||||
|
||||
# Disk/mass storage pseudo-devices
|
||||
#pseudo-device ccd 4 # concatenated disk devices
|
||||
#pseudo-device raid 4 # RAIDframe disk driver
|
||||
#options RAID_AUTOCONFIG # auto-configuration of RAID
|
||||
#pseudo-device fss 4 # file system snapshot device
|
||||
#pseudo-device md 1 # memory disk device (ramdisk)
|
||||
pseudo-device vnd # disk-like interface to files
|
||||
|
||||
# Network pseudo-devices
|
||||
pseudo-device bpfilter # Berkeley packet filter
|
||||
pseudo-device ipfilter # IP filter (firewall) and NAT
|
||||
pseudo-device loop # network loopback
|
||||
#pseudo-device ppp # Point-to-Point Protocol
|
||||
#pseudo-device sl # Serial Line IP
|
||||
#pseudo-device strip # Starmode Radio IP (Metricom)
|
||||
#pseudo-device tun # network tunneling over tty
|
||||
#pseudo-device tap # virtual Ethernet
|
||||
#pseudo-device gre # generic L3 over IP tunnel
|
||||
#pseudo-device ipip 2 # RFC 2003 IP Encapsulation
|
||||
#pseudo-device gif # RFC1933 tunnel
|
||||
#pseudo-device faith # IPv[46] tcp relay translation
|
||||
#pseudo-device stf # 6to4 IPv6 over IPv4 encapsulation
|
||||
pseudo-device vlan # IEEE 802.1q encapsulation
|
||||
pseudo-device bridge # simple inter-network bridging
|
||||
|
||||
# Miscellaneous pseudo-devices
|
||||
pseudo-device pty # pseudo-terminals
|
||||
#pseudo-device sequencer 1 # MIDI sequencer
|
||||
# rnd works; RND_COM does not on port i386 yet.
|
||||
pseudo-device rnd # /dev/random & kernel generator
|
||||
#options RND_COM # use "com" randomness (BROKEN)
|
||||
|
||||
# A pseudo device needed for Coda # also needs CODA (above)
|
||||
#pseudo-device vcoda 4 # coda minicache <-> venus comm.
|
@ -1,10 +1,19 @@
|
||||
# $NetBSD: files.pb1000,v 1.10 2006/02/07 18:57:12 gdamore Exp $
|
||||
# $NetBSD: files.alchemy,v 1.1 2006/02/08 09:04:01 gdamore Exp $
|
||||
|
||||
# Platform support - select just one, please
|
||||
defflag opt_alchemy.h ALCHEMY_GENERIC
|
||||
ALCHEMY_DBAU1550
|
||||
ALCHEMY_DBAU1500
|
||||
|
||||
file arch/evbmips/alchemy/mach_intr.c
|
||||
|
||||
file arch/evbmips/alchemy/autoconf.c
|
||||
file arch/evbmips/alchemy/machdep.c
|
||||
|
||||
file arch/evbmips/alchemy/genericbd.c alchemy_generic
|
||||
file arch/evbmips/alchemy/dbau1500.c alchemy_dbau1500
|
||||
file arch/evbmips/alchemy/dbau1550.c alchemy_dbau1550
|
||||
|
||||
file arch/mips/mips/bus_dma.c
|
||||
file arch/evbmips/evbmips/clock.c
|
||||
file arch/evbmips/evbmips/disksubr.c
|
||||
@ -13,6 +22,7 @@ file arch/evbmips/evbmips/yamon.c
|
||||
|
||||
file arch/mips/mips/softintr.c
|
||||
|
||||
|
||||
# System bus
|
||||
device mainbus { }
|
||||
attach mainbus at root
|
||||
@ -22,11 +32,10 @@ device cpu
|
||||
attach cpu at mainbus
|
||||
file arch/evbmips/alchemy/cpu.c cpu
|
||||
|
||||
# Pb1000 on-board devices
|
||||
# Alchemy on-board devices
|
||||
device obio { [addr=-1] }
|
||||
attach obio at mainbus
|
||||
file arch/evbmips/alchemy/pb1000_obio.c obio
|
||||
#file arch/evbmips/alchemy/pb1000_obio_space.c obio
|
||||
file arch/evbmips/alchemy/obio.c obio
|
||||
|
||||
device aupcmcia: pcmciabus
|
||||
attach aupcmcia at obio
|
@ -1,18 +1,15 @@
|
||||
# $NetBSD: std.pb1000,v 1.3 2005/12/11 12:17:11 christos Exp $
|
||||
# $NetBSD: std.alchemy,v 1.1 2006/02/08 09:04:01 gdamore Exp $
|
||||
|
||||
machine evbmips mips
|
||||
include "conf/std" # MI standard options
|
||||
|
||||
options MIPS3_ENABLE_CLOCK_INTR
|
||||
|
||||
# Platform support
|
||||
options ALCHEMY_PB1000
|
||||
|
||||
options EXEC_ELF32 # exec ELF32 binaries
|
||||
options EXEC_SCRIPT # exec #! scripts
|
||||
|
||||
makeoptions DEFTEXTADDR="0x800a0000"
|
||||
makeoptions BOARDTYPE="pb1000"
|
||||
makeoptions BOARDTYPE="alchemy"
|
||||
|
||||
include "arch/evbmips/conf/files.pb1000"
|
||||
include "arch/evbmips/conf/files.alchemy"
|
||||
include "arch/mips/conf/files.alchemy"
|
Loading…
Reference in New Issue
Block a user