Convert BWCT and HL200 over to new board mechanism as well. The
TSC4370 config file wasn't committed to this tree, so I don't know if my changes will work on it or not.
This commit is contained in:
parent
844f052f71
commit
e8a7024ad9
66
sys/arm/at91/board_bwct.c
Normal file
66
sys/arm/at91/board_bwct.c
Normal file
@ -0,0 +1,66 @@
|
||||
/*-
|
||||
* Copyright (c) 2005-2008 Olivier Houchard. All rights reserved.
|
||||
* Copyright (c) 2005-2008 Warner Losh. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY AUTHOR 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 AUTHOR 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 <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
#include <arm/at91/at91board.h>
|
||||
#include <arm/at91/at91rm92reg.h>
|
||||
#include <arm/at91/at91_piovar.h>
|
||||
#include <arm/at91/at91_pio_rm9200.h>
|
||||
|
||||
long
|
||||
board_init(void)
|
||||
{
|
||||
/*
|
||||
* Since the USART supports RS-485 multidrop mode, it allows the
|
||||
* TX pins to float. However, for RS-232 operations, we don't want
|
||||
* these pins to float. Instead, they should be pulled up to avoid
|
||||
* mismatches. Linux does something similar when it configures the
|
||||
* TX lines. This implies that we also allow the RX lines to float
|
||||
* rather than be in the state they are left in by the boot loader.
|
||||
* Since they are input pins, I think that this is the right thing
|
||||
* to do.
|
||||
*/
|
||||
|
||||
/* PIOA's A periph: Turn USART 0 and 2's TX/RX pins */
|
||||
at91_pio_use_periph_a(AT91RM92_PIOA_BASE,
|
||||
AT91C_PA18_RXD0 | AT91C_PA22_RXD2, 0);
|
||||
at91_pio_use_periph_a(AT91RM92_PIOA_BASE,
|
||||
AT91C_PA17_TXD0 | AT91C_PA23_TXD2, 1);
|
||||
/* PIOA's B periph: Turn USART 3's TX/RX pins */
|
||||
at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA6_RXD3, 0);
|
||||
at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA5_TXD3, 1);
|
||||
/* PIOB's A periph: Turn USART 1's TX/RX pins */
|
||||
at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB21_RXD1, 0);
|
||||
at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB20_TXD1, 1);
|
||||
|
||||
/* Pin assignment */
|
||||
|
||||
return (at91_ramsize());
|
||||
}
|
63
sys/arm/at91/board_hl200.c
Normal file
63
sys/arm/at91/board_hl200.c
Normal file
@ -0,0 +1,63 @@
|
||||
/*-
|
||||
* Copyright (c) 2005-2008 Olivier Houchard. All rights reserved.
|
||||
* Copyright (c) 2005-2008 Warner Losh. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY AUTHOR 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 AUTHOR 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 <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
#include <arm/at91/at91board.h>
|
||||
#include <arm/at91/at91rm92reg.h>
|
||||
#include <arm/at91/at91_piovar.h>
|
||||
#include <arm/at91/at91_pio_rm9200.h>
|
||||
|
||||
long
|
||||
board_init(void)
|
||||
{
|
||||
/*
|
||||
* Since the USART supports RS-485 multidrop mode, it allows the
|
||||
* TX pins to float. However, for RS-232 operations, we don't want
|
||||
* these pins to float. Instead, they should be pulled up to avoid
|
||||
* mismatches. Linux does something similar when it configures the
|
||||
* TX lines. This implies that we also allow the RX lines to float
|
||||
* rather than be in the state they are left in by the boot loader.
|
||||
* Since they are input pins, I think that this is the right thing
|
||||
* to do.
|
||||
*/
|
||||
/* PIOA's A periph: Turn USART 0 and 2's TX/RX pins */
|
||||
at91_pio_use_periph_a(AT91RM92_PIOA_BASE,
|
||||
AT91C_PA18_RXD0 | AT91C_PA22_RXD2, 0);
|
||||
at91_pio_use_periph_a(AT91RM92_PIOA_BASE,
|
||||
AT91C_PA17_TXD0 | AT91C_PA23_TXD2, 1);
|
||||
/* PIOA's B periph: Turn USART 3's TX/RX pins */
|
||||
at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA6_RXD3, 0);
|
||||
at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA5_TXD3, 1);
|
||||
/* PIOB's A periph: Turn USART 1's TX/RX pins */
|
||||
at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB21_RXD1, 0);
|
||||
at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB20_TXD1, 1);
|
||||
|
||||
return (at91_ramsize());
|
||||
}
|
@ -24,8 +24,6 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "opt_at91.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
#include <sys/param.h>
|
||||
@ -49,7 +47,6 @@ board_init(void)
|
||||
* Since they are input pins, I think that this is the right thing
|
||||
* to do.
|
||||
*/
|
||||
|
||||
/* PIOA's A periph: Turn USART 0 and 2's TX/RX pins */
|
||||
at91_pio_use_periph_a(AT91RM92_PIOA_BASE,
|
||||
AT91C_PA18_RXD0 | AT91C_PA22_RXD2, 0);
|
||||
@ -58,24 +55,9 @@ board_init(void)
|
||||
/* PIOA's B periph: Turn USART 3's TX/RX pins */
|
||||
at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA6_RXD3, 0);
|
||||
at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA5_TXD3, 1);
|
||||
#ifdef AT91_TSC
|
||||
/* We're using TC0's A1 and A2 input */
|
||||
at91_pio_use_periph_b(AT91RM92_PIOA_BASE,
|
||||
AT91C_PA19_TIOA1 | AT91C_PA21_TIOA2, 0);
|
||||
#endif
|
||||
/* PIOB's A periph: Turn USART 1's TX/RX pins */
|
||||
at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB21_RXD1, 0);
|
||||
at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB20_TXD1, 1);
|
||||
|
||||
/* Pin assignment */
|
||||
#ifdef AT91_TSC
|
||||
/* Assert PA24 low -- talk to rubidium */
|
||||
at91_pio_use_gpio(AT91RM92_PIOA_BASE, AT91C_PIO_PA24);
|
||||
at91_pio_gpio_output(AT91RM92_PIOA_BASE, AT91C_PIO_PA24, 0);
|
||||
at91_pio_gpio_clear(AT91RM92_PIOA_BASE, AT91C_PIO_PA24);
|
||||
at91_pio_use_gpio(AT91RM92_PIOB_BASE,
|
||||
AT91C_PIO_PB16 | AT91C_PIO_PB17 | AT91C_PIO_PB18 | AT91C_PIO_PB19);
|
||||
#endif
|
||||
|
||||
return (at91_ramsize());
|
||||
}
|
||||
|
75
sys/arm/at91/board_tsc4370.c
Normal file
75
sys/arm/at91/board_tsc4370.c
Normal file
@ -0,0 +1,75 @@
|
||||
/*-
|
||||
* Copyright (c) 2005-2008 Olivier Houchard. All rights reserved.
|
||||
* Copyright (c) 2005-2008 Warner Losh. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY AUTHOR 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 AUTHOR 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 <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
#include <arm/at91/at91board.h>
|
||||
#include <arm/at91/at91rm92reg.h>
|
||||
#include <arm/at91/at91_piovar.h>
|
||||
#include <arm/at91/at91_pio_rm9200.h>
|
||||
|
||||
long
|
||||
board_init(void)
|
||||
{
|
||||
/*
|
||||
* Since the USART supports RS-485 multidrop mode, it allows the
|
||||
* TX pins to float. However, for RS-232 operations, we don't want
|
||||
* these pins to float. Instead, they should be pulled up to avoid
|
||||
* mismatches. Linux does something similar when it configures the
|
||||
* TX lines. This implies that we also allow the RX lines to float
|
||||
* rather than be in the state they are left in by the boot loader.
|
||||
* Since they are input pins, I think that this is the right thing
|
||||
* to do.
|
||||
*/
|
||||
|
||||
/* PIOA's A periph: Turn USART 0 and 2's TX/RX pins */
|
||||
at91_pio_use_periph_a(AT91RM92_PIOA_BASE,
|
||||
AT91C_PA18_RXD0 | AT91C_PA22_RXD2, 0);
|
||||
at91_pio_use_periph_a(AT91RM92_PIOA_BASE,
|
||||
AT91C_PA17_TXD0 | AT91C_PA23_TXD2, 1);
|
||||
/* PIOA's B periph: Turn USART 3's TX/RX pins */
|
||||
at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA6_RXD3, 0);
|
||||
at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PA5_TXD3, 1);
|
||||
/* We're using TC0's A1 and A2 input */
|
||||
at91_pio_use_periph_b(AT91RM92_PIOA_BASE,
|
||||
AT91C_PA19_TIOA1 | AT91C_PA21_TIOA2, 0);
|
||||
/* PIOB's A periph: Turn USART 1's TX/RX pins */
|
||||
at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB21_RXD1, 0);
|
||||
at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PB20_TXD1, 1);
|
||||
|
||||
/* Pin assignment */
|
||||
/* Assert PA24 low -- talk to rubidium */
|
||||
at91_pio_use_gpio(AT91RM92_PIOA_BASE, AT91C_PIO_PA24);
|
||||
at91_pio_gpio_output(AT91RM92_PIOA_BASE, AT91C_PIO_PA24, 0);
|
||||
at91_pio_gpio_clear(AT91RM92_PIOA_BASE, AT91C_PIO_PA24);
|
||||
at91_pio_use_gpio(AT91RM92_PIOB_BASE,
|
||||
AT91C_PIO_PB16 | AT91C_PIO_PB17 | AT91C_PIO_PB18 | AT91C_PIO_PB19);
|
||||
|
||||
return (at91_ramsize());
|
||||
}
|
@ -22,5 +22,7 @@ arm/at91/uart_dev_at91usart.c optional uart
|
||||
#
|
||||
# All the boards we support
|
||||
#
|
||||
arm/at91/board_bwct.c optional at91_board_bwct
|
||||
arm/at91/board_hl200.c optional at91_board_hl200
|
||||
arm/at91/board_kb920x.c optional at91_board_kb920x
|
||||
arm/at91/board_tsc4370.c optional at91_board_tsc4370
|
||||
|
10
sys/arm/at91/std.bwct
Normal file
10
sys/arm/at91/std.bwct
Normal file
@ -0,0 +1,10 @@
|
||||
#$FreeBSD$
|
||||
include "../at91/std.at91"
|
||||
|
||||
options STARTUP_PAGETABLE_ADDR=0x20800000
|
||||
makeoptions KERNPHYSADDR=0x20000000
|
||||
options KERNPHYSADDR=0x20000000
|
||||
makeoptions KERNVIRTADDR=0xc0000000
|
||||
options KERNVIRTADDR=0xc0000000
|
||||
|
||||
device at91_board_bwct
|
11
sys/arm/at91/std.hl200
Normal file
11
sys/arm/at91/std.hl200
Normal file
@ -0,0 +1,11 @@
|
||||
#$FreeBSD$
|
||||
include "../at91/std.at91"
|
||||
|
||||
options STARTUP_PAGETABLE_ADDR=0x20000000
|
||||
makeoptions KERNPHYSADDR=0x20100000
|
||||
options KERNPHYSADDR=0x20100000
|
||||
makeoptions KERNVIRTADDR=0xc0100000
|
||||
options KERNVIRTADDR=0xc0100000
|
||||
options AT91C_MASTER_CLOCK=45000000
|
||||
|
||||
device at91_board_hl200
|
@ -3,8 +3,8 @@ include "../at91/std.at91"
|
||||
|
||||
options STARTUP_PAGETABLE_ADDR=0x20800000
|
||||
makeoptions KERNPHYSADDR=0x20000000
|
||||
makeoptions KERNVIRTADDR=0xc0000000
|
||||
options KERNPHYSADDR=0x20000000
|
||||
makeoptions KERNVIRTADDR=0xc0000000
|
||||
options KERNVIRTADDR=0xc0000000
|
||||
|
||||
device at91_board_kb920x
|
||||
|
10
sys/arm/at91/std.tsc4370
Normal file
10
sys/arm/at91/std.tsc4370
Normal file
@ -0,0 +1,10 @@
|
||||
#$FreeBSD$
|
||||
include "../at91/std.at91"
|
||||
|
||||
options STARTUP_PAGETABLE_ADDR=0x20800000
|
||||
makeoptions KERNPHYSADDR=0x20000000
|
||||
makeoptions KERNVIRTADDR=0xc0000000
|
||||
options KERNPHYSADDR=0x20000000
|
||||
options KERNVIRTADDR=0xc0000000
|
||||
|
||||
device at91_board_tsc4370
|
@ -22,7 +22,7 @@ ident BWCT
|
||||
options VERBOSE_INIT_ARM
|
||||
|
||||
options AT91_BWCT
|
||||
include "../at91/std.kb920x"
|
||||
include "../at91/std.bwct"
|
||||
|
||||
#To statically compile in device wiring instead of /boot/device.hints
|
||||
#hints "hints.at91rm9200"
|
||||
|
@ -1,5 +1,4 @@
|
||||
# KB920X -- Custom kernel configuration for the KB9200, 9201 and 9202
|
||||
# AT91RM9200 based Hot-e configuration file
|
||||
# Kernel configuration for the AT91RM9200 based Hot-e configuration file
|
||||
#
|
||||
# For more information on this file, please read the handbook section on
|
||||
# Kernel Configuration Files:
|
||||
@ -20,23 +19,14 @@
|
||||
|
||||
ident HL200
|
||||
|
||||
include "../at91/std.at91"
|
||||
files "../at91/files.kb920x"
|
||||
|
||||
options STARTUP_PAGETABLE_ADDR=0x20000000
|
||||
makeoptions KERNPHYSADDR=0x20100000
|
||||
makeoptions KERNVIRTADDR=0xc0100000
|
||||
options KERNPHYSADDR=0x20100000
|
||||
options KERNVIRTADDR=0xc0100000
|
||||
include "../at91/std.hl200"
|
||||
|
||||
#To statically compile in device wiring instead of /boot/device.hints
|
||||
#hints "GENERIC.hints" #Default places to look for devices.
|
||||
hints "KB920X.hints"
|
||||
|
||||
makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||
options DDB
|
||||
options KDB
|
||||
options AT91C_MASTER_CLOCK=45000000
|
||||
|
||||
options SCHED_4BSD #4BSD scheduler
|
||||
options INET #InterNETworking
|
||||
@ -46,17 +36,17 @@ options FFS #Berkeley Fast Filesystem
|
||||
#options UFS_ACL #Support for access control lists
|
||||
#options UFS_DIRHASH #Improve performance on big directories
|
||||
#options MD_ROOT #MD is a potential root device
|
||||
#options MD_ROOT_SIZE=4096 # 3MB ram disk
|
||||
#options MD_ROOT_SIZE=4096 # 3MB ram disk
|
||||
#options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\"
|
||||
options NFSCLIENT #Network Filesystem Client
|
||||
#options NFSSERVER #Network Filesystem Server
|
||||
#options NFSLOCKD #Network Lock Manager
|
||||
options NFS_ROOT #NFS usable as /, requires NFSCLIENT
|
||||
options BOOTP_NFSROOT
|
||||
options BOOTP
|
||||
options BOOTP_NFSV3
|
||||
options BOOTP_WIRED_TO=ate0
|
||||
options BOOTP_COMPAT
|
||||
options BOOTP_NFSROOT
|
||||
options BOOTP
|
||||
options BOOTP_NFSV3
|
||||
options BOOTP_WIRED_TO=ate0
|
||||
options BOOTP_COMPAT
|
||||
|
||||
#options MSDOSFS #MSDOS Filesystem
|
||||
#options CD9660 #ISO 9660 Filesystem
|
||||
@ -124,20 +114,20 @@ device kue # Kawasaki LSI USB Ethernet
|
||||
device rue # RealTek RTL8150 USB Ethernet
|
||||
device udav
|
||||
# usb serial
|
||||
device ucom
|
||||
device uark
|
||||
device ubsa
|
||||
device ubser
|
||||
device uftdi
|
||||
device uipaq
|
||||
device uplcom
|
||||
device uvisor
|
||||
device uvscom
|
||||
device ucom
|
||||
device uark
|
||||
device ubsa
|
||||
#device ubser # not yet converted.
|
||||
device uftdi
|
||||
device uipaq
|
||||
device uplcom
|
||||
device uvisor
|
||||
device uvscom
|
||||
# SCSI peripherals
|
||||
device scbus # SCSI bus (required for SCSI)
|
||||
device da # Direct Access (disks)
|
||||
device cd # CD
|
||||
device pass # Passthrough device (direct SCSI access)
|
||||
device scbus # SCSI bus (required for SCSI)
|
||||
device da # Direct Access (disks)
|
||||
device cd # CD
|
||||
device pass # Passthrough device (direct SCSI access)
|
||||
# Wireless NIC cards
|
||||
device wlan # 802.11 support
|
||||
device wlan_wep # 802.11 WEP support
|
||||
|
Loading…
Reference in New Issue
Block a user