[Zrouter-src-freebsd] ZRouter.org: push to FreeBSD HEAD tree

zrouter-src-freebsd at zrouter.org zrouter-src-freebsd at zrouter.org
Wed Jul 25 14:36:32 UTC 2012


details:   http://zrouter.org/hg/FreeBSD/head//rev/32bcaf443245
changeset: 510:32bcaf443245
user:      Aleksandr Rybalko <ray at ddteam.net>
date:      Wed Jul 25 17:18:25 2012 +0300
description:
Lazy update

diffstat:

 head/sys/arm/arm/bcopyinout_xscale.S           |    26 +-
 head/sys/arm/arm/bootconfig.c                  |     4 +-
 head/sys/arm/arm/busdma_machdep.c              |    73 +-
 head/sys/arm/arm/cpufunc.c                     |    36 +-
 head/sys/arm/arm/cpufunc_asm.S                 |    14 +-
 head/sys/arm/arm/cpufunc_asm_arm10.S           |     6 +-
 head/sys/arm/arm/cpufunc_asm_arm11.S           |     4 +-
 head/sys/arm/arm/cpufunc_asm_arm7tdmi.S        |     4 +-
 head/sys/arm/arm/cpufunc_asm_arm8.S            |     4 +-
 head/sys/arm/arm/cpufunc_asm_arm9.S            |     6 +-
 head/sys/arm/arm/cpufunc_asm_armv4.S           |     4 +-
 head/sys/arm/arm/cpufunc_asm_armv5.S           |     6 +-
 head/sys/arm/arm/cpufunc_asm_sa1.S             |     8 +-
 head/sys/arm/arm/cpufunc_asm_xscale.S          |     8 +-
 head/sys/arm/arm/cpufunc_asm_xscale_c3.S       |     8 +-
 head/sys/arm/arm/db_disasm.c                   |     4 +-
 head/sys/arm/arm/db_interface.c                |    14 +-
 head/sys/arm/arm/db_trace.c                    |    32 +-
 head/sys/arm/arm/disassem.c                    |     8 +-
 head/sys/arm/arm/dump_machdep.c                |     4 +-
 head/sys/arm/arm/elf_trampoline.c              |    47 +-
 head/sys/arm/arm/exception.S                   |     4 +-
 head/sys/arm/arm/gdb_machdep.c                 |    12 +-
 head/sys/arm/arm/identcpu.c                    |     9 +-
 head/sys/arm/arm/in_cksum.c                    |     4 +-
 head/sys/arm/arm/intr.c                        |     8 +-
 head/sys/arm/arm/irq_dispatch.S                |     4 +-
 head/sys/arm/arm/locore.S                      |    73 +-
 head/sys/arm/arm/machdep.c                     |   224 +-
 head/sys/arm/arm/mem.c                         |     8 +-
 head/sys/arm/arm/nexus.c                       |    12 +-
 head/sys/arm/arm/pmap.c                        |   135 +-
 head/sys/arm/arm/support.S                     |   122 +-
 head/sys/arm/arm/swtch.S                       |    12 +-
 head/sys/arm/arm/sys_machdep.c                 |     6 +-
 head/sys/arm/arm/trap.c                        |    20 +-
 head/sys/arm/arm/undefined.c                   |     6 +-
 head/sys/arm/arm/vectors.S                     |     8 +-
 head/sys/arm/arm/vm_machdep.c                  |    58 +-
 head/sys/arm/at91/at91.c                       |   117 +-
 head/sys/arm/at91/at91_machdep.c               |   320 +-
 head/sys/arm/at91/at91_mci.c                   |    55 +-
 head/sys/arm/at91/at91_mcireg.h                |     5 +-
 head/sys/arm/at91/at91_pio.c                   |     9 +-
 head/sys/arm/at91/at91_pio_rm9200.h            |   208 -
 head/sys/arm/at91/at91_pioreg.h                |     4 +-
 head/sys/arm/at91/at91_pit.c                   |   113 +-
 head/sys/arm/at91/at91_pitreg.h                |    12 +-
 head/sys/arm/at91/at91_pmc.c                   |   155 +-
 head/sys/arm/at91/at91_pmcvar.h                |     6 +-
 head/sys/arm/at91/at91_reset.S                 |    24 +-
 head/sys/arm/at91/at91_rst.c                   |    90 +-
 head/sys/arm/at91/at91_rstreg.h                |    12 +-
 head/sys/arm/at91/at91_spi.c                   |   257 +-
 head/sys/arm/at91/at91_spireg.h                |     4 +-
 head/sys/arm/at91/at91_ssc.c                   |     4 +-
 head/sys/arm/at91/at91_st.c                    |   334 +-
 head/sys/arm/at91/at91_streg.h                 |     5 +-
 head/sys/arm/at91/at91_twi.c                   |     3 +-
 head/sys/arm/at91/at91_wdtreg.h                |     4 +-
 head/sys/arm/at91/at91board.h                  |     7 +-
 head/sys/arm/at91/at91reg.h                    |    52 +-
 head/sys/arm/at91/at91rm9200.c                 |   164 +-
 head/sys/arm/at91/at91rm9200_devices.c         |   142 +
 head/sys/arm/at91/at91rm9200var.h              |    58 +
 head/sys/arm/at91/at91rm92reg.h                |   160 +-
 head/sys/arm/at91/at91sam9260.c                |   186 +-
 head/sys/arm/at91/at91sam9260reg.h             |    19 +-
 head/sys/arm/at91/at91sam9g20.c                |   171 +-
 head/sys/arm/at91/at91sam9g20reg.h             |    23 +-
 head/sys/arm/at91/at91sam9x25.c                |   201 +
 head/sys/arm/at91/at91sam9x25reg.h             |   316 +
 head/sys/arm/at91/at91soc.c                    |    51 +
 head/sys/arm/at91/at91soc.h                    |    58 +
 head/sys/arm/at91/at91var.h                    |    84 +-
 head/sys/arm/at91/board_bwct.c                 |    42 +-
 head/sys/arm/at91/board_ethernut5.c            |   149 +
 head/sys/arm/at91/board_hl200.c                |    50 +-
 head/sys/arm/at91/board_hl201.c                |     7 +-
 head/sys/arm/at91/board_kb920x.c               |    60 +-
 head/sys/arm/at91/board_qila9g20.c             |     9 +-
 head/sys/arm/at91/board_sam9260ek.c            |   149 +
 head/sys/arm/at91/board_sam9g20ek.c            |    17 +-
 head/sys/arm/at91/board_sam9x25ek.c            |   128 +
 head/sys/arm/at91/board_tsc4370.c              |    53 +-
 head/sys/arm/at91/files.at91                   |    24 +-
 head/sys/arm/at91/files.at91sam9               |    36 -
 head/sys/arm/at91/hints.at91rm9200             |    68 -
 head/sys/arm/at91/hints.at91sam9261            |    67 -
 head/sys/arm/at91/if_macb.c                    |    14 +-
 head/sys/arm/at91/std.at91                     |     7 +-
 head/sys/arm/at91/std.at91sam9                 |    10 +-
 head/sys/arm/at91/std.atmel                    |    15 +
 head/sys/arm/at91/std.ethernut5                |    11 +
 head/sys/arm/at91/std.hl200                    |     3 +-
 head/sys/arm/at91/std.hl201                    |     4 +-
 head/sys/arm/at91/std.kb920x                   |     3 +-
 head/sys/arm/at91/std.qila9g20                 |     4 +-
 head/sys/arm/at91/std.sam9260ek                |    11 +
 head/sys/arm/at91/std.sam9g20ek                |     8 +-
 head/sys/arm/at91/std.sam9x25ek                |    11 +
 head/sys/arm/at91/uart_bus_at91usart.c         |    17 +-
 head/sys/arm/at91/uart_cpu_at91rm9200usart.c   |    88 -
 head/sys/arm/at91/uart_cpu_at91usart.c         |    88 +
 head/sys/arm/at91/uart_dev_at91usart.c         |   276 +-
 head/sys/arm/conf/ATMEL                        |   168 +
 head/sys/arm/conf/AVILA                        |     6 +-
 head/sys/arm/conf/BWCT                         |     8 +-
 head/sys/arm/conf/CAMBRIA                      |     6 +-
 head/sys/arm/conf/CNS11XXNAS                   |     6 +-
 head/sys/arm/conf/CRB                          |     6 +-
 head/sys/arm/conf/DB-78XXX                     |     7 +-
 head/sys/arm/conf/DB-88F6XXX                   |     7 +-
 head/sys/arm/conf/EP80219                      |     6 +-
 head/sys/arm/conf/ETHERNUT5                    |   158 +
 head/sys/arm/conf/ETHERNUT5.hints              |    51 +
 head/sys/arm/conf/GUMSTIX                      |     6 +-
 head/sys/arm/conf/GUMSTIX-QEMU                 |    77 +-
 head/sys/arm/conf/HL200                        |     6 +-
 head/sys/arm/conf/HL201                        |     6 +-
 head/sys/arm/conf/IQ31244                      |     6 +-
 head/sys/arm/conf/KB920X                       |     9 +-
 head/sys/arm/conf/LN2410SBC                    |     6 +-
 head/sys/arm/conf/NSLU                         |     6 +-
 head/sys/arm/conf/QILA9G20                     |    14 +-
 head/sys/arm/conf/QILA9G20.hints               |     8 +-
 head/sys/arm/conf/SAM9260EK                    |   158 +
 head/sys/arm/conf/SAM9260EK.hints              |    51 +
 head/sys/arm/conf/SAM9G20EK                    |    12 +-
 head/sys/arm/conf/SAM9G20EK.hints              |     4 +-
 head/sys/arm/conf/SAM9X25EK                    |   154 +
 head/sys/arm/conf/SAM9X25EK.hints              |    10 +
 head/sys/arm/conf/SHEEVAPLUG                   |     6 +-
 head/sys/arm/conf/SIMICS                       |     6 +-
 head/sys/arm/conf/genboardid.awk               |    55 +
 head/sys/arm/conf/mach-types                   |  4146 ++++++++++++++++++++++++
 head/sys/arm/econa/econa.c                     |     4 +-
 head/sys/arm/econa/econa_machdep.c             |    44 +-
 head/sys/arm/include/_stdint.h                 |     8 +-
 head/sys/arm/include/_types.h                  |    12 +-
 head/sys/arm/include/armreg.h                  |     4 +-
 head/sys/arm/include/asmacros.h                |     4 +-
 head/sys/arm/include/atags.h                   |   129 +
 head/sys/arm/include/atomic.h                  |     3 +-
 head/sys/arm/include/blockio.h                 |     4 +-
 head/sys/arm/include/board.h                   |    62 +
 head/sys/arm/include/cpu.h                     |    22 +-
 head/sys/arm/include/cpufunc.h                 |    10 +-
 head/sys/arm/include/elf.h                     |     7 +-
 head/sys/arm/include/endian.h                  |     4 +-
 head/sys/arm/include/fdt.h                     |     5 +-
 head/sys/arm/include/fp.h                      |     4 +-
 head/sys/arm/include/frame.h                   |     6 +-
 head/sys/arm/include/ieee.h                    |     4 +-
 head/sys/arm/include/in_cksum.h                |     6 +-
 head/sys/arm/include/intr.h                    |     6 +-
 head/sys/arm/include/katelib.h                 |     4 +-
 head/sys/arm/include/kdb.h                     |     5 +-
 head/sys/arm/include/machdep.h                 |    15 +-
 head/sys/arm/include/param.h                   |    10 +-
 head/sys/arm/include/pcb.h                     |     4 +-
 head/sys/arm/include/pmap.h                    |     7 +-
 head/sys/arm/include/pmc_mdep.h                |    22 +-
 head/sys/arm/include/profile.h                 |     4 +-
 head/sys/arm/include/pte.h                     |     8 +-
 head/sys/arm/include/resource.h                |     4 +-
 head/sys/arm/include/stack.h                   |    12 +-
 head/sys/arm/include/vdso.h                    |    34 +
 head/sys/arm/include/vmparam.h                 |     4 +-
 head/sys/arm/mv/discovery/discovery.c          |    26 +-
 head/sys/arm/mv/files.mv                       |     4 +-
 head/sys/arm/mv/mv_localbus.c                  |   490 ++
 head/sys/arm/mv/mv_machdep.c                   |   128 +-
 head/sys/arm/mv/mvwin.h                        |    29 +-
 head/sys/arm/mv/std.mv                         |     3 +-
 head/sys/arm/s3c2xx0/s3c2410reg.h              |     4 +-
 head/sys/arm/s3c2xx0/s3c2440reg.h              |     4 +-
 head/sys/arm/s3c2xx0/s3c24x0.c                 |    17 +-
 head/sys/arm/s3c2xx0/s3c24x0_machdep.c         |    63 +-
 head/sys/arm/s3c2xx0/s3c24x0reg.h              |     6 +-
 head/sys/arm/sa11x0/assabet_machdep.c          |    27 +-
 head/sys/arm/sa11x0/sa11x0.c                   |    10 +-
 head/sys/arm/sa11x0/sa11x0_gpioreg.h           |     4 +-
 head/sys/arm/sa11x0/sa11x0_io_asm.S            |     6 +-
 head/sys/arm/sa11x0/sa11x0_irq.S               |     4 +-
 head/sys/arm/sa11x0/sa11x0_ost.c               |     6 +-
 head/sys/arm/sa11x0/sa11x0_ostreg.h            |     4 +-
 head/sys/arm/sa11x0/sa11x0_var.h               |     4 +-
 head/sys/arm/sa11x0/uart_dev_sa1110.c          |     8 +-
 head/sys/arm/xscale/i80321/ep80219_machdep.c   |    42 +-
 head/sys/arm/xscale/i80321/i80321.c            |     8 +-
 head/sys/arm/xscale/i80321/i80321_aau.c        |    22 +-
 head/sys/arm/xscale/i80321/i80321_dma.c        |    24 +-
 head/sys/arm/xscale/i80321/i80321_intr.h       |     4 +-
 head/sys/arm/xscale/i80321/i80321_pci.c        |    20 +-
 head/sys/arm/xscale/i80321/i80321_space.c      |     8 +-
 head/sys/arm/xscale/i80321/i80321_timer.c      |    12 +-
 head/sys/arm/xscale/i80321/i80321reg.h         |     8 +-
 head/sys/arm/xscale/i80321/iq31244_7seg.c      |     6 +-
 head/sys/arm/xscale/i80321/iq31244_machdep.c   |    41 +-
 head/sys/arm/xscale/i80321/iq80321.c           |     6 +-
 head/sys/arm/xscale/i80321/obio.c              |     4 +-
 head/sys/arm/xscale/i8134x/crb_machdep.c       |    32 +-
 head/sys/arm/xscale/i8134x/i81342.c            |     7 +-
 head/sys/arm/xscale/i8134x/i81342_mcu.c        |     4 +-
 head/sys/arm/xscale/i8134x/i81342_pci.c        |    16 +-
 head/sys/arm/xscale/i8134x/i81342_space.c      |     6 +-
 head/sys/arm/xscale/i8134x/i81342reg.h         |     6 +-
 head/sys/arm/xscale/i8134x/iq81342_7seg.c      |     6 +-
 head/sys/arm/xscale/i8134x/obio.c              |     4 +-
 head/sys/arm/xscale/i8134x/uart_cpu_i81342.c   |     4 +-
 head/sys/arm/xscale/ixp425/avila_ata.c         |     4 +-
 head/sys/arm/xscale/ixp425/avila_gpio.c        |     4 +-
 head/sys/arm/xscale/ixp425/avila_machdep.c     |    36 +-
 head/sys/arm/xscale/ixp425/cambria_exp_space.c |     4 +-
 head/sys/arm/xscale/ixp425/if_npe.c            |    12 +-
 head/sys/arm/xscale/ixp425/if_npereg.h         |    16 +-
 head/sys/arm/xscale/ixp425/ixp425.c            |    14 +-
 head/sys/arm/xscale/ixp425/ixp425_iic.c        |    10 +-
 head/sys/arm/xscale/ixp425/ixp425_npe.c        |    42 +-
 head/sys/arm/xscale/ixp425/ixp425_npereg.h     |    22 +-
 head/sys/arm/xscale/ixp425/ixp425_pci.c        |    16 +-
 head/sys/arm/xscale/ixp425/ixp425_pci_space.c  |     4 +-
 head/sys/arm/xscale/ixp425/ixp425_qmgr.c       |    48 +-
 head/sys/arm/xscale/ixp425/ixp425_qmgr.h       |    10 +-
 head/sys/arm/xscale/ixp425/ixp425reg.h         |     6 +-
 head/sys/arm/xscale/ixp425/std.ixp425          |     3 +-
 head/sys/arm/xscale/ixp425/std.ixp435          |     3 +-
 head/sys/arm/xscale/pxa/if_smc_smi.c           |     4 +-
 head/sys/arm/xscale/pxa/pxa_machdep.c          |    31 +-
 head/sys/arm/xscale/pxa/pxa_obio.c             |     3 +-
 head/sys/arm/xscale/pxa/pxareg.h               |     6 +-
 head/sys/arm/xscale/std.xscale                 |     3 +-
 233 files changed, 9872 insertions(+), 3129 deletions(-)

diffs (20751 lines):

diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/bcopyinout_xscale.S
--- a/head/sys/arm/arm/bcopyinout_xscale.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/bcopyinout_xscale.S	Wed Jul 25 17:18:25 2012 +0300
@@ -36,7 +36,7 @@
  */
 
 #include <machine/asm.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/bcopyinout_xscale.S 236991 2012-06-13 04:59:55Z imp $");
 
 	.text
 	.align	0
@@ -333,10 +333,10 @@
 	str	r6, [r1], #0x04
 	str	r7, [r1], #0x04
 .Lcopyin_bad1:
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lcopyin_bad1_loop16
 
-	adds	r2, r2, #0x10         
+	adds	r2, r2, #0x10
 	ldmeqfd	sp!, {r4-r7}
 	RETeq				/* Return now if done */
 	subs	r2, r2, #0x04
@@ -394,10 +394,10 @@
 	str	r6, [r1], #0x04
 	str	r7, [r1], #0x04
 .Lcopyin_bad2:
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lcopyin_bad2_loop16
 
-	adds	r2, r2, #0x10         
+	adds	r2, r2, #0x10
 	ldmeqfd	sp!, {r4-r7}
 	RETeq				/* Return now if done */
 	subs	r2, r2, #0x04
@@ -455,10 +455,10 @@
 	str	r6, [r1], #0x04
 	str	r7, [r1], #0x04
 .Lcopyin_bad3:
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lcopyin_bad3_loop16
 
-	adds	r2, r2, #0x10         
+	adds	r2, r2, #0x10
 	ldmeqfd	sp!, {r4-r7}
 	RETeq				/* Return now if done */
 	subs	r2, r2, #0x04
@@ -785,10 +785,10 @@
 	strt	r6, [r1], #0x04
 	strt	r7, [r1], #0x04
 .Lcopyout_bad1:
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lcopyout_bad1_loop16
 
-	adds	r2, r2, #0x10         
+	adds	r2, r2, #0x10
 	ldmeqfd	sp!, {r4-r7}
 	RETeq				/* Return now if done */
 	subs	r2, r2, #0x04
@@ -846,10 +846,10 @@
 	strt	r6, [r1], #0x04
 	strt	r7, [r1], #0x04
 .Lcopyout_bad2:
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lcopyout_bad2_loop16
 
-	adds	r2, r2, #0x10         
+	adds	r2, r2, #0x10
 	ldmeqfd	sp!, {r4-r7}
 	RETeq				/* Return now if done */
 	subs	r2, r2, #0x04
@@ -907,10 +907,10 @@
 	strt	r6, [r1], #0x04
 	strt	r7, [r1], #0x04
 .Lcopyout_bad3:
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lcopyout_bad3_loop16
 
-	adds	r2, r2, #0x10         
+	adds	r2, r2, #0x10
 	ldmeqfd	sp!, {r4-r7}
 	RETeq				/* Return now if done */
 	subs	r2, r2, #0x04
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/bootconfig.c
--- a/head/sys/arm/arm/bootconfig.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/bootconfig.c	Wed Jul 25 17:18:25 2012 +0300
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/bootconfig.c 236991 2012-06-13 04:59:55Z imp $");
 
 #include <sys/param.h>
 
@@ -46,7 +46,7 @@
 #include <machine/bootconfig.h>
 
 
-/* 
+/*
  * Function to identify and process different types of boot argument
  */
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/busdma_machdep.c
--- a/head/sys/arm/arm/busdma_machdep.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/busdma_machdep.c	Wed Jul 25 17:18:25 2012 +0300
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/arm/busdma_machdep.c 232356 2012-03-01 19:58:34Z jhb $");
+__FBSDID("$FreeBSD: head/sys/arm/arm/busdma_machdep.c 236991 2012-06-13 04:59:55Z imp $");
 
 /*
  * ARM bus dma support routines
@@ -156,7 +156,7 @@
 static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist;
 static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist;
 
-static TAILQ_HEAD(,bus_dmamap) dmamap_freelist = 
+static TAILQ_HEAD(,bus_dmamap) dmamap_freelist =
 	TAILQ_HEAD_INITIALIZER(dmamap_freelist);
 
 #define BUSDMA_STATIC_MAPS	500
@@ -210,7 +210,7 @@
 {
 	int i;
 
-	for (i = 0; i < BUSDMA_STATIC_MAPS; i++) 
+	for (i = 0; i < BUSDMA_STATIC_MAPS; i++)
 		TAILQ_INSERT_HEAD(&dmamap_freelist, &map_pool[i], freelist);
 }
 
@@ -231,7 +231,7 @@
 	int i;
 	for (i = 0; phys_avail[i] && phys_avail[i + 1]; i += 2) {
 		if ((lowaddr >= phys_avail[i] && lowaddr <= phys_avail[i + 1])
-		    || (lowaddr < phys_avail[i] && 
+		    || (lowaddr < phys_avail[i] &&
 		    highaddr > phys_avail[i]))
 			return (1);
 	}
@@ -313,7 +313,7 @@
 	return (map);
 }
 
-static __inline void 
+static __inline void
 _busdma_free_dmamap(bus_dmamap_t map)
 {
 	if (map->flags & DMAMAP_ALLOCATED)
@@ -633,7 +633,7 @@
 			*vaddr = tmpaddr;
 		} else
 			newmap->origbuffer = newmap->allocbuffer = NULL;
-	} else 
+	} else
 		newmap->origbuffer = newmap->allocbuffer = NULL;
         return (0);
 }
@@ -844,7 +844,7 @@
 		if (seg >= 0 && curaddr == lastaddr &&
 		    (segs[seg].ds_len + sgsize) <= dmat->maxsegsz &&
 		    (dmat->boundary == 0 ||
-		     (segs[seg].ds_addr & bmask) == 
+		     (segs[seg].ds_addr & bmask) ==
 		     (curaddr & bmask))) {
 			segs[seg].ds_len += sgsize;
 			goto segdone;
@@ -941,7 +941,7 @@
 		for (m = m0; m != NULL && error == 0; m = m->m_next) {
 			if (m->m_len > 0) {
 				error = bus_dmamap_load_buffer(dmat,
-				    dm_segments, map, m->m_data, m->m_len, 
+				    dm_segments, map, m->m_data, m->m_len,
 				    pmap_kernel(), flags, &lastaddr, &nsegs);
 				map->len += m->m_len;
 			}
@@ -951,7 +951,7 @@
 	}
 
 	if (error) {
-		/* 
+		/*
 		 * force "no valid mappings" on error in callback.
 		 */
 		(*callback)(callback_arg, dm_segments, 0, 0, error);
@@ -1057,7 +1057,7 @@
 	}
 
 	if (error) {
-		/* 
+		/*
 		 * force "no valid mappings" on error in callback.
 		 */
 		(*callback)(callback_arg, dm_segments, 0, 0, error);
@@ -1091,14 +1091,16 @@
 bus_dmamap_sync_buf(void *buf, int len, bus_dmasync_op_t op)
 {
 	char _tmp_cl[arm_dcache_align], _tmp_clend[arm_dcache_align];
+	register_t s;
+	int partial;
 
 	if ((op & BUS_DMASYNC_PREWRITE) && !(op & BUS_DMASYNC_PREREAD)) {
 		cpu_dcache_wb_range((vm_offset_t)buf, len);
 		cpu_l2cache_wb_range((vm_offset_t)buf, len);
 	}
+	partial = (((vm_offset_t)buf) | len) & arm_dcache_align_mask;
 	if (op & BUS_DMASYNC_PREREAD) {
-		if (!(op & BUS_DMASYNC_PREWRITE) &&
-		    ((((vm_offset_t)(buf) | len) & arm_dcache_align_mask) == 0)) {
+		if (!(op & BUS_DMASYNC_PREWRITE) && !partial) {
 			cpu_dcache_inv_range((vm_offset_t)buf, len);
 			cpu_l2cache_inv_range((vm_offset_t)buf, len);
 		} else {
@@ -1107,27 +1109,32 @@
 		}
 	}
 	if (op & BUS_DMASYNC_POSTREAD) {
-		if ((vm_offset_t)buf & arm_dcache_align_mask) {
-			memcpy(_tmp_cl, (void *)((vm_offset_t)buf & ~
-			    arm_dcache_align_mask),
-			    (vm_offset_t)buf & arm_dcache_align_mask);
-		}
-		if (((vm_offset_t)buf + len) & arm_dcache_align_mask) {
-			memcpy(_tmp_clend, (void *)((vm_offset_t)buf + len),
-			    arm_dcache_align - (((vm_offset_t)(buf) + len) &
-			   arm_dcache_align_mask));
+		if (partial) {
+			s = intr_disable();
+			if ((vm_offset_t)buf & arm_dcache_align_mask)
+				memcpy(_tmp_cl, (void *)((vm_offset_t)buf &
+				    ~arm_dcache_align_mask),
+				    (vm_offset_t)buf & arm_dcache_align_mask);
+			if (((vm_offset_t)buf + len) & arm_dcache_align_mask)
+				memcpy(_tmp_clend,
+				    (void *)((vm_offset_t)buf + len),
+				    arm_dcache_align - (((vm_offset_t)(buf) +
+				    len) & arm_dcache_align_mask));
 		}
 		cpu_dcache_inv_range((vm_offset_t)buf, len);
 		cpu_l2cache_inv_range((vm_offset_t)buf, len);
-
-		if ((vm_offset_t)buf & arm_dcache_align_mask)
-			memcpy((void *)((vm_offset_t)buf &
-			    ~arm_dcache_align_mask), _tmp_cl, 
-			    (vm_offset_t)buf & arm_dcache_align_mask);
-		if (((vm_offset_t)buf + len) & arm_dcache_align_mask)
-			memcpy((void *)((vm_offset_t)buf + len), _tmp_clend,
-			    arm_dcache_align - (((vm_offset_t)(buf) + len) &
-			   arm_dcache_align_mask));
+		if (partial) {
+			if ((vm_offset_t)buf & arm_dcache_align_mask)
+				memcpy((void *)((vm_offset_t)buf &
+				    ~arm_dcache_align_mask), _tmp_cl,
+				    (vm_offset_t)buf & arm_dcache_align_mask);
+			if (((vm_offset_t)buf + len) & arm_dcache_align_mask)
+				memcpy((void *)((vm_offset_t)buf + len),
+				    _tmp_clend, arm_dcache_align -
+				    (((vm_offset_t)(buf) + len) &
+				    arm_dcache_align_mask));
+			intr_restore(s);
+		}
 	}
 }
 
@@ -1139,7 +1146,7 @@
 	STAILQ_FOREACH(bpage, &map->bpages, links) {
 		if (op & BUS_DMASYNC_PREWRITE) {
 			bcopy((void *)bpage->datavaddr,
-			    (void *)(bpage->vaddr_nocache != 0 ? 
+			    (void *)(bpage->vaddr_nocache != 0 ?
 				     bpage->vaddr_nocache : bpage->vaddr),
 			    bpage->datacount);
 			if (bpage->vaddr_nocache == 0) {
@@ -1157,7 +1164,7 @@
 				cpu_l2cache_inv_range(bpage->vaddr,
 				    bpage->datacount);
 			}
-			bcopy((void *)(bpage->vaddr_nocache != 0 ? 
+			bcopy((void *)(bpage->vaddr_nocache != 0 ?
 	       		    bpage->vaddr_nocache : bpage->vaddr),
 			    (void *)bpage->datavaddr, bpage->datacount);
 			dmat->bounce_zone->total_bounced++;
@@ -1172,7 +1179,7 @@
 
 	STAILQ_FOREACH(bpage, &map->bpages, links) {
 		if ((vm_offset_t)buf >= bpage->datavaddr &&
-		    (vm_offset_t)buf + len <= bpage->datavaddr + 
+		    (vm_offset_t)buf + len <= bpage->datavaddr +
 		    bpage->datacount)
 			return (1);
 	}
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/cpufunc.c
--- a/head/sys/arm/arm/cpufunc.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/cpufunc.c	Wed Jul 25 17:18:25 2012 +0300
@@ -45,7 +45,7 @@
  * Created      : 30/01/97
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/cpufunc.c 236991 2012-06-13 04:59:55Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -222,7 +222,7 @@
 	arm8_context_switch,		/* context_switch	*/
 
 	arm8_setup			/* cpu setup		*/
-};          
+};
 #endif	/* CPU_ARM8 */
 
 #ifdef CPU_ARM9
@@ -328,7 +328,7 @@
 	(void *)cpufunc_nullop,         /* l2cache_wbinv_range  */
       	(void *)cpufunc_nullop,         /* l2cache_inv_range    */
 	(void *)cpufunc_nullop,         /* l2cache_wb_range     */
-				 
+
 	/* Other functions */
 
 	cpufunc_nullop,			/* flush_prefetchbuf	*/
@@ -530,7 +530,7 @@
 	sa110_context_switch,		/* context_switch	*/
 
 	sa110_setup			/* cpu setup		*/
-};          
+};
 #endif	/* CPU_SA110 */
 
 #if defined(CPU_SA1100) || defined(CPU_SA1110)
@@ -591,7 +591,7 @@
 	sa11x0_context_switch,		/* context_switch	*/
 
 	sa11x0_setup			/* cpu setup		*/
-};          
+};
 #endif	/* CPU_SA1100 || CPU_SA1110 */
 
 #ifdef CPU_IXP12X0
@@ -652,7 +652,7 @@
 	ixp12x0_context_switch,		/* context_switch	*/
 
 	ixp12x0_setup			/* cpu setup		*/
-};          
+};
 #endif	/* CPU_IXP12X0 */
 
 #if defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \
@@ -841,7 +841,7 @@
 	fa526_context_switch,		/* context_switch	*/
 
 	fa526_setup			/* cpu setup 		*/
-};          
+};
 #endif	/* CPU_FA526 || CPU_FA626TE */
 
 
@@ -1099,7 +1099,7 @@
 		cpu_reset_needs_v4_MMU_disable = 1;	/* V4 or higher */
 		get_cachetype_cp15();
 		arm10_dcache_sets_inc = 1U << arm_dcache_l2_linesize;
-		arm10_dcache_sets_max = 
+		arm10_dcache_sets_max =
 		    (1U << (arm_dcache_l2_linesize + arm_dcache_l2_nsets)) -
 		    arm10_dcache_sets_inc;
 		arm10_dcache_index_inc = 1U << (32 - arm_dcache_l2_assoc);
@@ -1353,7 +1353,7 @@
 		int loop;
 		int count;
 		int *registers = &frame->tf_r0;
-        
+
 		DFC_PRINTF(("LDM/STM\n"));
 		DFC_DISASSEMBLE(fault_pc);
 		if (fault_instruction & (1 << 21)) {
@@ -1533,7 +1533,7 @@
 				offset = fault_instruction & 0x0f;
 				if (offset == base)
 					return ABORT_FIXUP_FAILED;
-                
+
 				/*
 				 * Register offset - hard we have to
 				 * cope with shifts !
@@ -1647,8 +1647,8 @@
 static u_int
 parse_cpu_options(args, optlist, cpuctrl)
 	char *args;
-	struct cpu_option *optlist;    
-	u_int cpuctrl; 
+	struct cpu_option *optlist;
+	u_int cpuctrl;
 {
 	int integer;
 
@@ -1811,7 +1811,7 @@
 	ctrl = cpuctrl;
 	cpu_control(0xffffffff, cpuctrl);
 
-	/* Set the clock/test register */    
+	/* Set the clock/test register */
 	if (setclock)
 		arm8_clock_config(0x7f, clocktest);
 }
@@ -1891,7 +1891,7 @@
 	int cpuctrl, cpuctrlmask;
 
 	cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_SYST_ENABLE
-	    | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE 
+	    | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE
 	    | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_BPRD_ENABLE;
 	cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_SYST_ENABLE
 	    | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE
@@ -2031,7 +2031,7 @@
 /*	cpu_control(cpuctrlmask, cpuctrl);*/
 	cpu_control(0xffffffff, cpuctrl);
 
-	/* 
+	/*
 	 * enable clockswitching, note that this doesn't read or write to r0,
 	 * r0 is just to make it valid asm
 	 */
@@ -2089,7 +2089,7 @@
 		cpuctrl |= CPU_CONTROL_VECRELOC;
 	/* Clear out the cache */
 	cpu_idcache_wbinv_all();
-	/* Set the control register */    
+	/* Set the control register */
 	ctrl = cpuctrl;
 	cpu_control(0xffffffff, cpuctrl);
 }
@@ -2198,7 +2198,7 @@
 	/* Clear out the cache */
 	cpu_idcache_wbinv_all();
 
-	/* Set the control register */    
+	/* Set the control register */
 	ctrl = cpuctrl;
 	/* cpu_control(0xffffffff, cpuctrl); */
 	cpu_control(cpuctrlmask, cpuctrl);
@@ -2292,5 +2292,5 @@
 	__asm __volatile("mcr p15, 0, %0, c1, c0, 1"
 		: : "r" (auxctl));
 }
-#endif	/* CPU_XSCALE_80200 || CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 
+#endif	/* CPU_XSCALE_80200 || CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425
 	   CPU_XSCALE_80219 */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/cpufunc_asm.S
--- a/head/sys/arm/arm/cpufunc_asm.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/cpufunc_asm.S	Wed Jul 25 17:18:25 2012 +0300
@@ -34,16 +34,16 @@
  *
  * RiscBSD kernel project
  *
- * cpufunc.S 
+ * cpufunc.S
  *
  * Assembly functions for CPU / MMU / TLB specific operations
  *
  * Created      : 30/01/97
  *
  */
- 
+
 #include <machine/asm.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/cpufunc_asm.S 236991 2012-06-13 04:59:55Z imp $");
 
 	.text
 	.align	0
@@ -86,13 +86,13 @@
  * Generic functions to write the internal coprocessor registers
  *
  *
- * Currently these registers are 
+ * Currently these registers are
  *  c1 - CPU Control
  *  c3 - Domain Access Control
  *
  * All other registers are CPU architecture specific
  */
- 
+
 #if 0 /* See below. */
 ENTRY(cpufunc_control)
 	mcr	p15, 0, r0, c1, c0, 0
@@ -107,12 +107,12 @@
  * Generic functions to read/modify/write the internal coprocessor registers
  *
  *
- * Currently these registers are 
+ * Currently these registers are
  *  c1 - CPU Control
  *
  * All other registers are CPU architecture specific
  */
- 
+
 ENTRY(cpufunc_control)
 	mrc	p15, 0, r3, c1, c0, 0	/* Read the control register */
 	bic	r2, r3, r0		/* Clear bits */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/cpufunc_asm_arm10.S
--- a/head/sys/arm/arm/cpufunc_asm_arm10.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/cpufunc_asm_arm10.S	Wed Jul 25 17:18:25 2012 +0300
@@ -31,9 +31,9 @@
  * ARM10 assembly functions for CPU / MMU / TLB specific operations
  *
  */
- 
+
 #include <machine/asm.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/cpufunc_asm_arm10.S 236991 2012-06-13 04:59:55Z imp $");
 
 /*
  * Functions to set the MMU Translation Table Base register
@@ -255,7 +255,7 @@
 
 /*
  * Parameters for the cache cleaning code.  Note that the order of these
- * four variables is assumed in the code above.  Hence the reason for 
+ * four variables is assumed in the code above.  Hence the reason for
  * declaring them in the assembler file.
  */
 	.align 0
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/cpufunc_asm_arm11.S
--- a/head/sys/arm/arm/cpufunc_asm_arm11.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/cpufunc_asm_arm11.S	Wed Jul 25 17:18:25 2012 +0300
@@ -33,9 +33,9 @@
  * XXX We make no attempt at present to take advantage of the v6 memroy
  * architecture or physically tagged cache.
  */
- 
+
 #include <machine/asm.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/cpufunc_asm_arm11.S 236991 2012-06-13 04:59:55Z imp $");
 
 /*
  * Functions to set the MMU Translation Table Base register
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/cpufunc_asm_arm7tdmi.S
--- a/head/sys/arm/arm/cpufunc_asm_arm7tdmi.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/cpufunc_asm_arm7tdmi.S	Wed Jul 25 17:18:25 2012 +0300
@@ -34,9 +34,9 @@
  * ARM7TDMI assembly functions for CPU / MMU / TLB specific operations
  *
  */
- 
+
 #include <machine/asm.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/cpufunc_asm_arm7tdmi.S 236991 2012-06-13 04:59:55Z imp $");
 
 /*
  * Functions to set the MMU Translation Table Base register
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/cpufunc_asm_arm8.S
--- a/head/sys/arm/arm/cpufunc_asm_arm8.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/cpufunc_asm_arm8.S	Wed Jul 25 17:18:25 2012 +0300
@@ -35,9 +35,9 @@
  * ARM8 assembly functions for CPU / MMU / TLB specific operations
  *
  */
- 
+
 #include <machine/asm.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/cpufunc_asm_arm8.S 236991 2012-06-13 04:59:55Z imp $");
 
 ENTRY(arm8_clock_config)
 	mrc	p15, 0, r3, c15, c0, 0	/* Read the clock register */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/cpufunc_asm_arm9.S
--- a/head/sys/arm/arm/cpufunc_asm_arm9.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/cpufunc_asm_arm9.S	Wed Jul 25 17:18:25 2012 +0300
@@ -30,9 +30,9 @@
  *
  * ARM9 assembly functions for CPU / MMU / TLB specific operations
  */
- 
+
 #include <machine/asm.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/cpufunc_asm_arm9.S 236991 2012-06-13 04:59:55Z imp $");
 
 /*
  * Functions to set the MMU Translation Table Base register
@@ -242,7 +242,7 @@
 
 /*
  * Parameters for the cache cleaning code.  Note that the order of these
- * four variables is assumed in the code above.  Hence the reason for 
+ * four variables is assumed in the code above.  Hence the reason for
  * declaring them in the assembler file.
  */
 	.align 0
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/cpufunc_asm_armv4.S
--- a/head/sys/arm/arm/cpufunc_asm_armv4.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/cpufunc_asm_armv4.S	Wed Jul 25 17:18:25 2012 +0300
@@ -36,9 +36,9 @@
  * ARM9 assembly functions for CPU / MMU / TLB specific operations
  *
  */
- 
+
 #include <machine/asm.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/cpufunc_asm_armv4.S 236991 2012-06-13 04:59:55Z imp $");
 
 /*
  * TLB functions
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/cpufunc_asm_armv5.S
--- a/head/sys/arm/arm/cpufunc_asm_armv5.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/cpufunc_asm_armv5.S	Wed Jul 25 17:18:25 2012 +0300
@@ -32,9 +32,9 @@
  * These routines can be used by any core that supports the set/index
  * operations.
  */
- 
+
 #include <machine/asm.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/cpufunc_asm_armv5.S 236991 2012-06-13 04:59:55Z imp $");
 
 /*
  * Functions to set the MMU Translation Table Base register
@@ -224,7 +224,7 @@
 
 /*
  * Parameters for the cache cleaning code.  Note that the order of these
- * four variables is assumed in the code above.  Hence the reason for 
+ * four variables is assumed in the code above.  Hence the reason for
  * declaring them in the assembler file.
  */
 	.align 0
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/cpufunc_asm_sa1.S
--- a/head/sys/arm/arm/cpufunc_asm_sa1.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/cpufunc_asm_sa1.S	Wed Jul 25 17:18:25 2012 +0300
@@ -35,9 +35,9 @@
  * SA-1 assembly functions for CPU / MMU / TLB specific operations
  *
  */
- 
+
 #include <machine/asm.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/cpufunc_asm_sa1.S 236991 2012-06-13 04:59:55Z imp $");
 
 .Lblock_userspace_access:
 	.word	_C_LABEL(block_userspace_access)
@@ -58,7 +58,7 @@
 #else
 	ldr	r3, .Lblock_userspace_access
 	ldr	r2, [r3]
-	orr	r1, r2, #1 
+	orr	r1, r2, #1
 	str	r1, [r3]
 #endif
 	stmfd	sp!, {r0-r3, lr}
@@ -67,7 +67,7 @@
 	mcr	p15, 0, r0, c7, c5, 0	/* invalidate I$ and BTB */
 	mcr	p15, 0, r0, c7, c10, 4	/* drain write and fill buffer */
 
-	/* Write the TTB */ 
+	/* Write the TTB */
 	mcr	p15, 0, r0, c2, c0, 0
 
 	/* If we have updated the TTB we must flush the TLB */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/cpufunc_asm_xscale.S
--- a/head/sys/arm/arm/cpufunc_asm_xscale.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/cpufunc_asm_xscale.S	Wed Jul 25 17:18:25 2012 +0300
@@ -71,9 +71,9 @@
  *
  * XScale assembly functions for CPU / MMU / TLB specific operations
  */
- 
+
 #include <machine/asm.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/cpufunc_asm_xscale.S 236991 2012-06-13 04:59:55Z imp $");
 
 /*
  * Size of the XScale core D-cache.
@@ -138,7 +138,7 @@
 #else
 	ldr	r3, .Lblock_userspace_access
 	ldr	r2, [r3]
-	orr	r1, r2, #1 
+	orr	r1, r2, #1
 	str	r1, [r3]
 #endif
 	stmfd	sp!, {r0-r3, lr}
@@ -150,7 +150,7 @@
 
 	ldmfd	sp!, {r0-r3, lr}
 
-	/* Write the TTB */ 
+	/* Write the TTB */
 	mcr	p15, 0, r0, c2, c0, 0
 
 	/* If we have updated the TTB we must flush the TLB */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/cpufunc_asm_xscale_c3.S
--- a/head/sys/arm/arm/cpufunc_asm_xscale_c3.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/cpufunc_asm_xscale_c3.S	Wed Jul 25 17:18:25 2012 +0300
@@ -72,9 +72,9 @@
  *
  * XScale core 3 assembly functions for CPU / MMU / TLB specific operations
  */
- 
+
 #include <machine/asm.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/cpufunc_asm_xscale_c3.S 236991 2012-06-13 04:59:55Z imp $");
 
 /*
  * Size of the XScale core D-cache.
@@ -339,7 +339,7 @@
 #else
 	ldr	r3, .Lblock_userspace_access
 	ldr	r2, [r3]
-	orr	r1, r2, #1 
+	orr	r1, r2, #1
 	str	r1, [r3]
 #endif
 	stmfd	sp!, {r0-r3, lr}
@@ -354,7 +354,7 @@
 #ifdef ARM_USE_L2_CACHE
 	orr	r0, r0, #0x18	/* cache the page table in L2 */
 #endif
-	/* Write the TTB */ 
+	/* Write the TTB */
 	mcr	p15, 0, r0, c2, c0, 0
 
 	/* If we have updated the TTB we must flush the TLB */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/db_disasm.c
--- a/head/sys/arm/arm/db_disasm.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/db_disasm.c	Wed Jul 25 17:18:25 2012 +0300
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/db_disasm.c 236991 2012-06-13 04:59:55Z imp $");
 #include <sys/param.h>
 #include <machine/db_machdep.h>
 #include <ddb/ddb.h>
@@ -50,7 +50,7 @@
 static void db_disasm_printaddr(u_int);
 
 static const disasm_interface_t db_disasm_interface = {
-	db_disasm_read_word, 
+	db_disasm_read_word,
 	db_disasm_printaddr,
        	db_printf
 };
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/db_interface.c
--- a/head/sys/arm/arm/db_interface.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/db_interface.c	Wed Jul 25 17:18:25 2012 +0300
@@ -6,24 +6,24 @@
  * Mach Operating System
  * Copyright (c) 1991,1990 Carnegie Mellon University
  * All Rights Reserved.
- * 
+ *
  * Permission to use, copy, modify and distribute this software and its
  * documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
- * 
+ *
  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
+ *
  * Carnegie Mellon requests users of this software to return to
- * 
+ *
  *  Software Distribution Coordinator  or  Software.Distribution at CS.CMU.EDU
  *  School of Computer Science
  *  Carnegie Mellon University
  *  Pittsburgh PA 15213-3890
- * 
+ *
  * any improvements or extensions that they make and grant Carnegie the
  * rights to redistribute these changes.
  *
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/db_interface.c 236991 2012-06-13 04:59:55Z imp $");
 #include "opt_ddb.h"
 
 #include <sys/param.h>
@@ -325,7 +325,7 @@
 					break;
 				default:
 					break; /* XXX */
-				}	    
+				}
 					
 			}
 			return (addr + offset);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/db_trace.c
--- a/head/sys/arm/arm/db_trace.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/db_trace.c	Wed Jul 25 17:18:25 2012 +0300
@@ -7,30 +7,30 @@
  * Mach Operating System
  * Copyright (c) 1991,1990 Carnegie Mellon University
  * All Rights Reserved.
- * 
+ *
  * Permission to use, copy, modify and distribute this software and its
  * documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
- * 
+ *
  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
+ *
  * Carnegie Mellon requests users of this software to return to
- * 
+ *
  *  Software Distribution Coordinator  or  Software.Distribution at CS.CMU.EDU
  *  School of Computer Science
  *  Carnegie Mellon University
  *  Pittsburgh PA 15213-3890
- * 
+ *
  * any improvements or extensions that they make and grant Carnegie the
  * rights to redistribute these changes.
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/db_trace.c 236991 2012-06-13 04:59:55Z imp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 
@@ -55,7 +55,7 @@
  * a structure to represent them is a good idea.
  *
  * Here's the diagram from the APCS.  Increasing address is _up_ the page.
- * 
+ *
  *          save code pointer       [fp]        <- fp points to here
  *          return link value       [fp, #-4]
  *          return sp value         [fp, #-8]
@@ -72,21 +72,20 @@
  *          [saved a2 value]
  *          [saved a1 value]
  *
- * The save code pointer points twelve bytes beyond the start of the 
- * code sequence (usually a single STM) that created the stack frame.  
- * We have to disassemble it if we want to know which of the optional 
+ * The save code pointer points twelve bytes beyond the start of the
+ * code sequence (usually a single STM) that created the stack frame.
+ * We have to disassemble it if we want to know which of the optional
  * fields are actually present.
  */
 
 static void
-db_stack_trace_cmd(db_expr_t addr, db_expr_t count)
+db_stack_trace_cmd(db_expr_t addr, db_expr_t count, boolean_t kernel_only)
 {
 	u_int32_t	*frame, *lastframe;
 	c_db_sym_t sym;
 	const char *name;
 	db_expr_t value;
 	db_expr_t offset;
-	boolean_t	kernel_only = TRUE;
 	int	scp_offset;
 
 	frame = (u_int32_t *)addr;
@@ -196,8 +195,11 @@
 {
 	struct pcb *ctx;
 
-	ctx = kdb_thr_ctx(thr);
-	db_stack_trace_cmd(ctx->un_32.pcb32_r11, -1);
+	if (thr != curthread) {
+		ctx = kdb_thr_ctx(thr);
+		db_stack_trace_cmd(ctx->un_32.pcb32_r11, -1, TRUE);
+	} else
+		db_trace_self();
 	return (0);
 }
 
@@ -207,5 +209,5 @@
 	db_addr_t addr;
 
 	addr = (db_addr_t)__builtin_frame_address(0);
-	db_stack_trace_cmd(addr, -1);
+	db_stack_trace_cmd(addr, -1, FALSE);
 }
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/disassem.c
--- a/head/sys/arm/arm/disassem.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/disassem.c	Wed Jul 25 17:18:25 2012 +0300
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/disassem.c 236991 2012-06-13 04:59:55Z imp $");
 #include <sys/param.h>
 
 
@@ -131,9 +131,9 @@
     { 0x0c500000, 0x04400000, "strb",	"daW" },
     { 0x0c500000, 0x04500000, "ldrb",	"daW" },
     { 0x0e1f0000, 0x080d0000, "stm",	"YnWl" },/* separate out r13 base */
-    { 0x0e1f0000, 0x081d0000, "ldm",	"YnWl" },/* separate out r13 base */    
+    { 0x0e1f0000, 0x081d0000, "ldm",	"YnWl" },/* separate out r13 base */
     { 0x0e100000, 0x08000000, "stm",	"XnWl" },
-    { 0x0e100000, 0x08100000, "ldm",	"XnWl" },    
+    { 0x0e100000, 0x08100000, "ldm",	"XnWl" },
     { 0x0e1000f0, 0x00100090, "ldrb",	"de" },
     { 0x0e1000f0, 0x00000090, "strb",	"de" },
     { 0x0e1000f0, 0x001000d0, "ldrsb",	"de" },
@@ -329,7 +329,7 @@
 				di->di_printf("#0x%08x",
 					      (insn & 0xff) << (32 - rotate) |
 					      (insn & 0xff) >> rotate);
-			} else {  
+			} else {
 				disasm_register_shift(di, insn);
 			}
 			break;
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/dump_machdep.c
--- a/head/sys/arm/arm/dump_machdep.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/dump_machdep.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/arm/dump_machdep.c 221173 2011-04-28 16:02:05Z attilio $");
+__FBSDID("$FreeBSD: head/sys/arm/arm/dump_machdep.c 236991 2012-06-13 04:59:55Z imp $");
 
 #include "opt_watchdog.h"
 
@@ -197,7 +197,7 @@
 #ifdef SW_WATCHDOG
 		wdog_kern_pat(WD_LASTVAL);
 #endif
-		error = dump_write(di, 
+		error = dump_write(di,
 		    (void *)(pa - (pa & L1_ADDR_BITS)),0, dumplo, sz);
 		if (error)
 			break;
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/elf_trampoline.c
--- a/head/sys/arm/arm/elf_trampoline.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/elf_trampoline.c	Wed Jul 25 17:18:25 2012 +0300
@@ -30,7 +30,7 @@
 #include "opt_kernname.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/arm/elf_trampoline.c 225990 2011-10-04 16:55:53Z marcel $");
+__FBSDID("$FreeBSD: head/sys/arm/arm/elf_trampoline.c 236991 2012-06-13 04:59:55Z imp $");
 #include <machine/asm.h>
 #include <sys/param.h>
 #include <sys/elf32.h>
@@ -202,7 +202,7 @@
 			 "orr %0, %0, %1\n"
 			 "mrc p15, 0, %1, c1, c0, 0\n"
 			 "bic %1, %1, #1\n" /* Disable MMU */
-			 "orr %1, %1, #(4 | 8)\n" /* Add DC enable, 
+			 "orr %1, %1, #(4 | 8)\n" /* Add DC enable,
 						     WBUF enable */
 			 "orr %1, %1, #0x1000\n" /* Add IC enable */
 			 "orr %1, %1, #(0x800)\n" /* BPRD enable */
@@ -397,7 +397,7 @@
 #endif
 
 void *
-load_kernel(unsigned int kstart, unsigned int curaddr,unsigned int func_end, 
+load_kernel(unsigned int kstart, unsigned int curaddr,unsigned int func_end,
     int d)
 {
 	Elf32_Ehdr *eh;
@@ -436,7 +436,7 @@
 					if (phdr[j].p_type == PT_LOAD &&
 					    shdr[i].sh_offset >=
 					    phdr[j].p_offset &&
-					    (shdr[i].sh_offset + 
+					    (shdr[i].sh_offset +
 					     shdr[i].sh_size <=
 					     phdr[j].p_offset +
 					     phdr[j].p_filesz)) {
@@ -445,7 +445,7 @@
 						j = eh->e_phnum;
 					}
 				}
-				if (shdr[i].sh_offset != 0 && 
+				if (shdr[i].sh_offset != 0 &&
 				    shdr[i].sh_size != 0) {
 					symtabindex = i;
 					symstrindex = shdr[i].sh_link;
@@ -457,7 +457,7 @@
 			ssym = lastaddr;
 			if (d) {
 				memcpy((void *)func_end, (void *)(
-				    shdr[symtabindex].sh_offset + kstart), 
+				    shdr[symtabindex].sh_offset + kstart),
 				    shdr[symtabindex].sh_size);
 				memcpy((void *)(func_end +
 				    shdr[symtabindex].sh_size),
@@ -469,7 +469,7 @@
 				    sizeof(shdr[symtabindex].sh_size));
 				lastaddr += sizeof(shdr[symstrindex].sh_size);
 				lastaddr += shdr[symstrindex].sh_size;
-				lastaddr = roundup(lastaddr, 
+				lastaddr = roundup(lastaddr,
 				    sizeof(shdr[symstrindex].sh_size));
 			}
 			
@@ -488,13 +488,13 @@
 		    (void*)(kstart + phdr[i].p_offset), phdr[i].p_filesz);
 		/* Clean space from oversized segments, eg: bss. */
 		if (phdr[i].p_filesz < phdr[i].p_memsz)
-			bzero((void *)(phdr[i].p_vaddr - KERNVIRTADDR + 
+			bzero((void *)(phdr[i].p_vaddr - KERNVIRTADDR +
 			    curaddr + phdr[i].p_filesz), phdr[i].p_memsz -
 			    phdr[i].p_filesz);
 	}
 	/* Now grab the symbol tables. */
 	if (symtabindex >= 0 && symstrindex >= 0) {
-		*(Elf_Size *)lastaddr = 
+		*(Elf_Size *)lastaddr =
 		    shdr[symtabindex].sh_size;
 		lastaddr += sizeof(shdr[symtabindex].sh_size);
 		memcpy((void*)lastaddr,
@@ -511,7 +511,7 @@
 			    shdr[symtabindex].sh_size),
 		    shdr[symstrindex].sh_size);
 		lastaddr += shdr[symstrindex].sh_size;
-		lastaddr = roundup(lastaddr, 
+		lastaddr = roundup(lastaddr,
    		    sizeof(shdr[symstrindex].sh_size));
 		*(Elf_Addr *)curaddr = MAGIC_TRAMP_NUMBER;
 		*((Elf_Addr *)curaddr + 1) = ssym - curaddr + KERNVIRTADDR;
@@ -572,10 +572,10 @@
 			 "sub pc, pc, #4\n" :
 			 "=r" (tmp) : "r" (pd), "r" (domain));
 	
-	/* 
+	/*
 	 * XXX: This is the most stupid workaround I've ever wrote.
 	 * For some reason, the KB9202 won't boot the kernel unless
-	 * we access an address which is not in the 
+	 * we access an address which is not in the
 	 * 0x20000000 - 0x20ffffff range. I hope I'll understand
 	 * what's going on later.
 	 */
@@ -596,7 +596,7 @@
 	curaddr = (void*)((unsigned int)curaddr & 0xfff00000);
 #ifdef KZIP
 	if (*kernel == 0x1f && kernel[1] == 0x8b) {
-		pt_addr = (((int)&_end + KERNSIZE + 0x100) & 
+		pt_addr = (((int)&_end + KERNSIZE + 0x100) &
 		    ~(L1_TABLE_SIZE - 1)) + L1_TABLE_SIZE;
 		
 #ifdef CPU_ARM9
@@ -609,15 +609,26 @@
 		/* Gzipped kernel */
 		dst = inflate_kernel(kernel, &_end);
 		kernel = (char *)&_end;
-		altdst = 4 + load_kernel((unsigned int)kernel, 
+		altdst = 4 + load_kernel((unsigned int)kernel,
 		    (unsigned int)curaddr,
 		    (unsigned int)&func_end + 800 , 0);
 		if (altdst > dst)
 			dst = altdst;
+
+		/*
+		 * Disable MMU.  Otherwise, setup_pagetables call below
+		 * might overwrite the L1 table we are currently using.
+		 */
+		cpu_idcache_wbinv_all();
+		cpu_l2cache_wbinv_all();
+		__asm __volatile("mrc p15, 0, %0, c1, c0, 0\n"
+		  "bic %0, %0, #1\n" /* MMU_DISABLE */
+		  "mcr p15, 0, %0, c1, c0, 0\n"
+		  :"=r" (pt_addr));
 	} else
 #endif
-		dst = 4 + load_kernel((unsigned int)&kernel_start, 
-	    (unsigned int)curaddr, 
+		dst = 4 + load_kernel((unsigned int)&kernel_start,
+	    (unsigned int)curaddr,
 	    (unsigned int)&func_end, 0);
 	dst = (void *)(((vm_offset_t)dst & ~3));
 	pt_addr = ((unsigned int)dst &~(L1_TABLE_SIZE - 1)) + L1_TABLE_SIZE;
@@ -626,8 +637,8 @@
 	sp = pt_addr + L1_TABLE_SIZE + 8192;
 	sp = sp &~3;
 	dst = (void *)(sp + 4);
-	memcpy((void *)dst, (void *)&load_kernel, (unsigned int)&func_end - 
+	memcpy((void *)dst, (void *)&load_kernel, (unsigned int)&func_end -
 	    (unsigned int)&load_kernel + 800);
-	do_call(dst, kernel, dst + (unsigned int)(&func_end) - 
+	do_call(dst, kernel, dst + (unsigned int)(&func_end) -
 	    (unsigned int)(&load_kernel) + 800, sp);
 }
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/exception.S
--- a/head/sys/arm/arm/exception.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/exception.S	Wed Jul 25 17:18:25 2012 +0300
@@ -51,7 +51,7 @@
 #include <machine/asm.h>
 #include <machine/armreg.h>
 #include <machine/asmacros.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/exception.S 236991 2012-06-13 04:59:55Z imp $");
 
 	.text	
 	.align	0
@@ -189,7 +189,7 @@
  * This function uses PULLFRAMEFROMSVCANDEXIT and
  * DO_AST
  * only be called if the exception handler used PUSHFRAMEINSVC
- * 
+ *
  */
 
 exception_exit:
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/gdb_machdep.c
--- a/head/sys/arm/arm/gdb_machdep.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/gdb_machdep.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/gdb_machdep.c 236991 2012-06-13 04:59:55Z imp $");
 
 
 #include <sys/param.h>
@@ -54,8 +54,12 @@
 	*regsz = gdb_cpu_regsz(regnum);
 
 	if (kdb_thread == curthread) {
-		if (regnum < 15)
+		if (regnum < 13)
 			return (&kdb_frame->tf_r0 + regnum);
+		if (regnum == 13)
+			return (&kdb_frame->tf_svc_sp);
+		if (regnum == 14)
+			return (&kdb_frame->tf_svc_lr);
 		if (regnum == 15)
 			return (&kdb_frame->tf_pc);
 		if (regnum == 25)
@@ -70,8 +74,8 @@
 	case 12:  return (&kdb_thrctx->un_32.pcb32_r12);
 	case 13:  stacktest = kdb_thrctx->un_32.pcb32_sp + 5 * 4;
 		  return (&stacktest);
-	case 15: 
-		  /* 
+	case 15:
+		  /*
 		   * On context switch, the PC is not put in the PCB, but
 		   * we can retrieve it from the stack.
 		   */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/identcpu.c
--- a/head/sys/arm/arm/identcpu.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/identcpu.c	Wed Jul 25 17:18:25 2012 +0300
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/identcpu.c 235062 2012-05-05 17:20:12Z imp $");
 #include <sys/systm.h>
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -52,6 +52,7 @@
 #include <sys/kernel.h>
 #include <sys/sysctl.h>
 #include <machine/cpu.h>
+#include <machine/endian.h>
 
 #include <machine/cpuconf.h>
 #include <machine/md_var.h>
@@ -59,7 +60,7 @@
 char machine[] = "arm";
 
 SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD,
-        machine, 0, "Machine class");
+	machine, 0, "Machine class");
 
 static const char * const generic_steppings[16] = {
 	"rev 0",	"rev 1",	"rev 2",	"rev 3",
@@ -135,7 +136,7 @@
 };
 
 /* Steppings for PXA255/26x.
- * rev 5: PXA26x B0, rev 6: PXA255 A0  
+ * rev 5: PXA26x B0, rev 6: PXA255 A0
  */
 static const char * const pxa255_steppings[16] = {
 	"rev 0",	"rev 1",	"rev 2",	"step A-0",
@@ -455,7 +456,7 @@
 		printf("  %dKB/%dB %d-way %s Data cache\n",
 		    arm_pdcache_size / 1024,
 		    arm_pdcache_line_size, arm_pdcache_ways,
-		    wtnames[arm_pcache_type]);                
+		    wtnames[arm_pcache_type]);
 	}
 }
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/in_cksum.c
--- a/head/sys/arm/arm/in_cksum.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/in_cksum.c	Wed Jul 25 17:18:25 2012 +0300
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/in_cksum.c 236991 2012-06-13 04:59:55Z imp $");
 
 #include <sys/param.h>
 #include <sys/mbuf.h>
@@ -149,4 +149,4 @@
     	union l_util l_util;
 	REDUCE16;
 	return (~sum & 0xffff);
-}			    
+}
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/intr.c
--- a/head/sys/arm/arm/intr.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/intr.c	Wed Jul 25 17:18:25 2012 +0300
@@ -37,10 +37,10 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/intr.c 236991 2012-06-13 04:59:55Z imp $");
 #include <sys/param.h>
 #include <sys/systm.h>
-#include <sys/syslog.h> 
+#include <sys/syslog.h>
 #include <sys/malloc.h>
 #include <sys/proc.h>
 #include <sys/bus.h>
@@ -62,7 +62,7 @@
 void (*arm_post_filter)(void *) = NULL;
 
 void
-arm_setup_irqhandler(const char *name, driver_filter_t *filt, 
+arm_setup_irqhandler(const char *name, driver_filter_t *filt,
     void (*hand)(void*), void *arg, int irq, int flags, void **cookiep)
 {
 	struct intr_event *event;
@@ -78,7 +78,7 @@
 		if (error)
 			return;
 		intr_events[irq] = event;
-		last_printed += 
+		last_printed +=
 		    snprintf(intrnames + last_printed,
 		    MAXCOMLEN + 1,
 		    "irq%d: %s", irq, name);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/irq_dispatch.S
--- a/head/sys/arm/arm/irq_dispatch.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/irq_dispatch.S	Wed Jul 25 17:18:25 2012 +0300
@@ -72,7 +72,7 @@
 #include <machine/asm.h>
 #include <machine/asmacros.h>
 #include <machine/armreg.h>
-__FBSDID("$FreeBSD: head/sys/arm/arm/irq_dispatch.S 228504 2011-12-14 17:12:59Z raj $");
+__FBSDID("$FreeBSD: head/sys/arm/arm/irq_dispatch.S 236991 2012-06-13 04:59:55Z imp $");
 
 /*
  * irq_entry:
@@ -103,7 +103,7 @@
 
 	.global _C_LABEL(intrnames), _C_LABEL(sintrnames)
 	.global _C_LABEL(intrcnt), _C_LABEL(sintrcnt)
-_C_LABEL(intrnames): 
+_C_LABEL(intrnames):
 	.space NIRQ * (MAXCOMLEN + 1)
 _C_LABEL(intrcnt):
 	.space NIRQ * 4
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/locore.S
--- a/head/sys/arm/arm/locore.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/locore.S	Wed Jul 25 17:18:25 2012 +0300
@@ -37,17 +37,12 @@
 #include <machine/asm.h>
 #include <machine/armreg.h>
 #include <machine/pte.h>
-__FBSDID("$FreeBSD$");
+
+__FBSDID("$FreeBSD: head/sys/arm/arm/locore.S 236524 2012-06-03 18:34:32Z imp $");
 
 /* What size should this really be ? It is only used by initarm() */
 #define INIT_ARM_STACK_SIZE	2048
 
-/*
- * This is for kvm_mkdb, and should be the address of the beginning
- * of the kernel text segment (not necessarily the same as kernbase).
- */
-
-
 #define	CPWAIT_BRANCH							 \
 	sub	pc, pc, #4
 
@@ -56,6 +51,10 @@
 	mov	tmp, tmp		/* wait for it to complete */	;\
 	CPWAIT_BRANCH			/* branch to next insn */
 
+/*
+ * This is for kvm_mkdb, and should be the address of the beginning
+ * of the kernel text segment (not necessarily the same as kernbase).
+ */
 	.text
 	.align	0
 .globl kernbase
@@ -63,22 +62,25 @@
 .globl physaddr
 .set physaddr,PHYSADDR
 
+/*
+ * On entry for FreeBSD boot ABI:
+ *	r0 - metadata pointer or 0 (boothowto on AT91's boot2)
+ *	r1 - if (r0 == 0) then metadata pointer
+ * On entry for Linux boot ABI:
+ *	r0 - 0
+ *	r1 - machine type (passed as arg2 to initarm)
+ *	r2 - Pointer to a tagged list or dtb image (phys addr) (passed as arg1 initarm)
+ *
+ * For both types of boot we gather up the args, put them in a struct arm_boot_params
+ * structure and pass that to initarm.
+ */
 ENTRY_NP(btext)
+ASENTRY_NP(_start)
+	mov	r9, r0		/* 0 or boot mode from boot2 */
+	mov	r8, r1		/* Save Machine type */
+	mov	ip, r2		/* Save meta data */
+	mov	fp, r3		/* Future expantion */
 
-/*
- * On entry:
- *	r0 - metadata pointer or 0
- *	r1 - if (r0 == 0) then metadata pointer
- */
-ASENTRY_NP(_start)
-
-	/* Move metadata ptr to r12 (ip) */
-	mov	ip, r0
-	ldr	r0, =0
-	cmp	ip, r0
-	bne	1f
-	mov	ip, r1
-1:
 	/* Make sure interrupts are disabled. */
 	mrs	r7, cpsr
 	orr	r7, r7, #(I32_bit|F32_bit)
@@ -93,25 +95,25 @@
 	 */
 	mrc     p15, 0, r2, c1, c0, 0
 	ands	r2, r2, #CPU_CONTROL_MMU_ENABLE
-	ldreq	r8, =PHYSADDR
-	ldrne	r8, =LOADERRAMADDR
-	cmp	r7, r8
+	ldreq	r6, =PHYSADDR
+	ldrne	r6, =LOADERRAMADDR
+	cmp	r7, r6
 	bls 	flash_lower
 	cmp	r7, pc
 	bhi	from_ram
 	b	do_copy
 	
 flash_lower:
-	cmp	r8, pc
+	cmp	r6, pc
 	bls	from_ram
 do_copy:
-	ldr	r9, =KERNBASE
+	ldr	r7, =KERNBASE
 	adr	r1, _start
 	ldr	r0, Lreal_start
 	ldr	r2, Lend
 	sub	r2, r2, r0
-	sub	r0, r0, r9
-	add	r0, r0, r8
+	sub	r0, r0, r7
+	add	r0, r0, r6
 	mov	r4, r0
 	bl	memcpy
 	ldr	r0, Lram_offset
@@ -188,8 +190,14 @@
 	ldr	pc, .Lvirt_done
 
 virt_done:
-	mov	r0, ip			/* Load argument: metadata ptr */
-
+	mov	r1, #20			/* loader info size is 20 bytes also second arg */
+	subs	sp, sp, r1		/* allocate arm_boot_params struct on stack */
+	mov	r0, sp			/* loader info pointer is first arg */
+	str	r1, [r0]		/* Store length of loader info */
+	str	r9, [r0, #4]		/* Store r0 from boot loader */
+	str	r8, [r0, #8]		/* Store r1 from boot loader */
+	str	ip, [r0, #12]		/* store r2 from boot loader */
+	str	fp, [r0, #16]		/* store r3 from boot loader */
 	mov	fp, #0			/* trace back starts here */
 	bl	_C_LABEL(initarm)	/* Off we go */
 
@@ -231,11 +239,6 @@
 	.word	_end
 	.word	svcstk + INIT_ARM_STACK_SIZE
 
-#if defined(FLASHADDR) && defined(LOADERRAMADDR)
-.L_arm_memcpy:
-        .word   _C_LABEL(_arm_memcpy)
-#endif
-
 .Lvirt_done:
 	.word	virt_done
 .Lmainreturned:
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/machdep.c
--- a/head/sys/arm/arm/machdep.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/machdep.c	Wed Jul 25 17:18:25 2012 +0300
@@ -46,7 +46,7 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/arm/machdep.c 230455 2012-01-22 11:01:36Z pjd $");
+__FBSDID("$FreeBSD: head/sys/arm/arm/machdep.c 237118 2012-06-15 07:26:39Z imp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -80,6 +80,7 @@
 #include <vm/vm_pager.h>
 
 #include <machine/armreg.h>
+#include <machine/atags.h>
 #include <machine/cpu.h>
 #include <machine/machdep.h>
 #include <machine/md_var.h>
@@ -92,6 +93,8 @@
 #include <machine/vmparam.h>
 #include <machine/sysarch.h>
 
+static struct trapframe proc0_tf;
+
 uint32_t cpu_reset_address = 0;
 int cold = 1;
 vm_offset_t vector_page;
@@ -108,6 +111,20 @@
 extern vm_offset_t ksym_start, ksym_end;
 #endif
 
+#if defined(LINUX_BOOT_ABI)
+#define LBABI_MAX_BANKS	10
+
+uint32_t board_id;
+struct arm_lbabi_tag *atag_list;
+uint32_t revision;
+uint64_t serial;
+char linux_command_line[LBABI_MAX_COMMAND_LINE + 1];
+char atags[LBABI_MAX_COMMAND_LINE * 2];
+uint32_t memstart[LBABI_MAX_BANKS];
+uint32_t memsize[LBABI_MAX_BANKS];
+uint32_t membanks;
+#endif
+
 void
 sendsig(catcher, ksi, mask)
 	sig_t catcher;
@@ -139,14 +156,14 @@
 	/* Allocate and validate space for the signal handler context. */
 	if ((td->td_pflags & TDP_ALTSTACK) != 0 && !(onstack) &&
 	    SIGISMEMBER(psp->ps_sigonstack, sig)) {
-		fp = (struct sigframe *)(td->td_sigstk.ss_sp + 
+		fp = (struct sigframe *)(td->td_sigstk.ss_sp +
 		    td->td_sigstk.ss_size);
 #if defined(COMPAT_43)
 		td->td_sigstk.ss_flags |= SS_ONSTACK;
 #endif
 	} else
 		fp = (struct sigframe *)td->td_frame->tf_usr_sp;
-		 
+
 	/* make room on the stack */
 	fp--;
 	
@@ -156,7 +173,7 @@
 	get_mcontext(td, &frame.sf_uc.uc_mcontext, 0);
 	frame.sf_si = ksi->ksi_info;
 	frame.sf_uc.uc_sigmask = *mask;
-	frame.sf_uc.uc_stack.ss_flags = (td->td_pflags & TDP_ALTSTACK ) 
+	frame.sf_uc.uc_stack.ss_flags = (td->td_pflags & TDP_ALTSTACK )
 	    ? ((onstack) ? SS_ONSTACK : 0) : SS_DISABLE;
 	frame.sf_uc.uc_stack = td->td_sigstk;
 	mtx_unlock(&psp->ps_mtx);
@@ -449,7 +466,7 @@
 	 ("Didn't clear single step"));
 	p = td->td_proc;
 	PROC_UNLOCK(p);
-	error = ptrace_read_int(td, td->td_frame->tf_pc + 4, 
+	error = ptrace_read_int(td, td->td_frame->tf_pc + 4,
 	    &td->td_md.md_ptrace_instr);
 	if (error)
 		goto out;
@@ -661,10 +678,51 @@
 }
 
 /*
+ * Make a standard dump_avail array.  Can't make the phys_avail
+ * since we need to do that after we call pmap_bootstrap, but this
+ * is needed before pmap_boostrap.
+ *
+ * ARM_USE_SMALL_ALLOC uses dump_avail, so it must be filled before
+ * calling pmap_bootstrap.
+ */
+void
+arm_dump_avail_init(vm_offset_t ramsize, size_t max)
+{
+#ifdef LINUX_BOOT_ABI
+	/*
+	 * Linux boot loader passes us the actual banks of memory, so use them
+	 * to construct the dump_avail array.
+	 */
+	if (membanks > 0) 
+	{
+		int i, j;
+
+		if (max < (membanks + 1) * 2)
+			panic("dump_avail[%d] too small for %d banks\n",
+			    max, membanks);
+		for (j = 0, i = 0; i < membanks; i++) {
+			dump_avail[j++] = round_page(memstart[i]);
+			dump_avail[j++] = trunc_page(memstart[i] + memsize[i]);
+		}
+		dump_avail[j++] = 0;
+		dump_avail[j++] = 0;
+		return;
+	}
+#endif
+	if (max < 4)
+		panic("dump_avail too small\n");
+
+	dump_avail[0] = round_page(PHYSADDR);
+	dump_avail[1] = trunc_page(PHYSADDR + ramsize);
+	dump_avail[2] = 0;
+	dump_avail[3] = 0;
+}
+
+/*
  * Fake up a boot descriptor table
  */
 vm_offset_t
-fake_preload_metadata(void)
+fake_preload_metadata(struct arm_boot_params *abp __unused)
 {
 #ifdef DDB
 	vm_offset_t zstart = 0, zend = 0;
@@ -674,9 +732,9 @@
 	static uint32_t fake_preload[35];
 
 	fake_preload[i++] = MODINFO_NAME;
-	fake_preload[i++] = strlen("elf kernel") + 1;
-	strcpy((char*)&fake_preload[i++], "elf kernel");
-	i += 2;
+	fake_preload[i++] = strlen("kernel") + 1;
+	strcpy((char*)&fake_preload[i++], "kernel");
+	i += 1;
 	fake_preload[i++] = MODINFO_TYPE;
 	fake_preload[i++] = strlen("elf kernel") + 1;
 	strcpy((char*)&fake_preload[i++], "elf kernel");
@@ -709,3 +767,151 @@
 
 	return (lastaddr);
 }
+
+#if defined(LINUX_BOOT_ABI)
+vm_offset_t
+linux_parse_boot_param(struct arm_boot_params *abp)
+{
+	struct arm_lbabi_tag *walker;
+
+	/*
+	 * Linux boot ABI: r0 = 0, r1 is the board type (!= 0) and r2
+	 * is atags or dtb pointer.  If all of these aren't satisfied,
+	 * then punt.
+	 */
+	if (!(abp->abp_r0 == 0 && abp->abp_r1 != 0 && abp->abp_r2 != 0))
+		return 0;
+
+	board_id = abp->abp_r1;
+	walker = (struct arm_lbabi_tag *)
+	    (abp->abp_r2 + KERNVIRTADDR - KERNPHYSADDR);
+
+	/* xxx - Need to also look for binary device tree */
+	if (ATAG_TAG(walker) != ATAG_CORE)
+		return 0;
+
+	atag_list = walker;
+	while (ATAG_TAG(walker) != ATAG_NONE) {
+		switch (ATAG_TAG(walker)) {
+		case ATAG_CORE:
+			break;
+		case ATAG_MEM:
+			if (membanks < LBABI_MAX_BANKS) {
+				memstart[membanks] = walker->u.tag_mem.start;
+				memsize[membanks] = walker->u.tag_mem.size;
+			}
+			membanks++;
+			break;
+		case ATAG_INITRD2:
+			break;
+		case ATAG_SERIAL:
+			serial = walker->u.tag_sn.low |
+			    ((uint64_t)walker->u.tag_sn.high << 32);
+			break;
+		case ATAG_REVISION:
+			revision = walker->u.tag_rev.rev;
+			break;
+		case ATAG_CMDLINE:
+			/* XXX open question: Parse this for boothowto? */
+			bcopy(walker->u.tag_cmd.command, linux_command_line,
+			      ATAG_SIZE(walker));
+			break;
+		default:
+			break;
+		}
+		walker = ATAG_NEXT(walker);
+	}
+
+	/* Save a copy for later */
+	bcopy(atag_list, atags,
+	    (char *)walker - (char *)atag_list + ATAG_SIZE(walker));
+
+	return fake_preload_metadata(abp);
+}
+#endif
+
+#if defined(FREEBSD_BOOT_LOADER)
+vm_offset_t
+freebsd_parse_boot_param(struct arm_boot_params *abp)
+{
+	vm_offset_t lastaddr = 0;
+	void *mdp;
+	void *kmdp;
+
+	/*
+	 * Mask metadata pointer: it is supposed to be on page boundary. If
+	 * the first argument (mdp) doesn't point to a valid address the
+	 * bootloader must have passed us something else than the metadata
+	 * ptr, so we give up.  Also give up if we cannot find metadta section
+	 * the loader creates that we get all this data out of.
+	 */
+
+	if ((mdp = (void *)(abp->abp_r0 & ~PAGE_MASK)) == NULL)
+		return 0;
+	preload_metadata = mdp;
+	kmdp = preload_search_by_type("elf kernel");
+	if (kmdp == NULL)
+		return 0;
+
+	boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int);
+	kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *);
+	lastaddr = MD_FETCH(kmdp, MODINFOMD_KERNEND, vm_offset_t);
+#ifdef DDB
+	ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t);
+	ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t);
+#endif
+	preload_addr_relocate = KERNVIRTADDR - KERNPHYSADDR;
+	return lastaddr;
+}
+#endif
+
+vm_offset_t
+default_parse_boot_param(struct arm_boot_params *abp)
+{
+	vm_offset_t lastaddr;
+
+#if defined(LINUX_BOOT_ABI)
+	if ((lastaddr = linux_parse_boot_param(abp)) != 0)
+		return lastaddr;
+#endif
+#if defined(FREEBSD_BOOT_LOADER)
+	if ((lastaddr = freebsd_parse_boot_param(abp)) != 0)
+		return lastaddr;
+#endif
+	/* Fall back to hardcoded metadata. */
+	lastaddr = fake_preload_metadata(abp);
+
+	return lastaddr;
+}
+
+/*
+ * Stub version of the boot parameter parsing routine.  We are
+ * called early in initarm, before even VM has been initialized.
+ * This routine needs to preserve any data that the boot loader
+ * has passed in before the kernel starts to grow past the end
+ * of the BSS, traditionally the place boot-loaders put this data.
+ *
+ * Since this is called so early, things that depend on the vm system
+ * being setup (including access to some SoC's serial ports), about
+ * all that can be done in this routine is to copy the arguments.
+ *
+ * This is the default boot parameter parsing routine.  Individual
+ * kernels/boards can override this weak function with one of their
+ * own.  We just fake metadata...
+ */
+__weak_reference(default_parse_boot_param, parse_boot_param);
+
+/*
+ * Initialize proc0
+ */
+void
+init_proc0(vm_offset_t kstack)
+{
+	proc_linkup0(&proc0, &thread0);
+	thread0.td_kstack = kstack;
+	thread0.td_pcb = (struct pcb *)
+		(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
+	thread0.td_pcb->pcb_flags = 0;
+	thread0.td_frame = &proc0_tf;
+	pcpup->pc_curpcb = thread0.td_pcb;
+}
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/mem.c
--- a/head/sys/arm/arm/mem.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/mem.c	Wed Jul 25 17:18:25 2012 +0300
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/mem.c 236991 2012-06-13 04:59:55Z imp $");
 
 /*
  * Memory special file
@@ -101,7 +101,7 @@
 			v &= ~PAGE_MASK;
 			for (i = 0; dump_avail[i] || dump_avail[i + 1];
 			i += 2) {
-				if (v >= dump_avail[i] && 
+				if (v >= dump_avail[i] &&
 				    v < dump_avail[i + 1]) {
 					address_valid = 1;
 					break;
@@ -129,11 +129,11 @@
 			addr = trunc_page(uio->uio_offset);
 			eaddr = round_page(uio->uio_offset + c);
 
-			for (; addr < eaddr; addr += PAGE_SIZE) 
+			for (; addr < eaddr; addr += PAGE_SIZE)
 				if (pmap_extract(kernel_pmap, addr) == 0)
 					return (EFAULT);
 			if (!kernacc((caddr_t)(int)uio->uio_offset, c,
-			    uio->uio_rw == UIO_READ ? 
+			    uio->uio_rw == UIO_READ ?
 			    VM_PROT_READ : VM_PROT_WRITE))
 #ifdef ARM_USE_SMALL_ALLOC
 				if (addr <= VM_MAXUSER_ADDRESS ||
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/nexus.c
--- a/head/sys/arm/arm/nexus.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/nexus.c	Wed Jul 25 17:18:25 2012 +0300
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/arm/nexus.c 221218 2011-04-29 18:41:21Z jhb $");
+__FBSDID("$FreeBSD: head/sys/arm/arm/nexus.c 238545 2012-07-17 03:18:12Z gonzo $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -117,12 +117,16 @@
 nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags,
     driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep)
 {
+	int irq;
 
 	if ((rman_get_flags(res) & RF_SHAREABLE) == 0)
 		flags |= INTR_EXCL;
 
-	arm_setup_irqhandler(device_get_nameunit(child), 
-	    filt, intr, arg, rman_get_start(res), flags, cookiep);
+	for (irq = rman_get_start(res); irq <= rman_get_end(res); irq++) {
+		arm_setup_irqhandler(device_get_nameunit(child),
+		    filt, intr, arg, irq, flags, cookiep);
+		arm_unmask_irq(irq);
+	}
 	return (0);
 }
 
@@ -160,7 +164,7 @@
 	int retval = 0;
 
 	retval += bus_print_child_header(bus, child);
-	retval += printf(" on motherboard\n");	/* XXX "motherboard", ick */
+	retval += printf("\n");
 
 	return (retval);
 }
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/pmap.c
--- a/head/sys/arm/arm/pmap.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/pmap.c	Wed Jul 25 17:18:25 2012 +0300
@@ -140,7 +140,7 @@
 #include "opt_vm.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/arm/pmap.c 228530 2011-12-15 12:14:15Z raj $");
+__FBSDID("$FreeBSD: head/sys/arm/arm/pmap.c 236991 2012-06-13 04:59:55Z imp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
@@ -177,7 +177,7 @@
 #define dprintf printf
 
 int pmap_debug_level = 0;
-#define PMAP_INLINE 
+#define PMAP_INLINE
 #else   /* PMAP_DEBUG */
 #define PDEBUG(_lev_,_stat_) /* Nothing */
 #define dprintf(x, arg...)
@@ -852,7 +852,7 @@
  * bucket/page table in place.
  *
  * Note that if a new L2 bucket/page was allocated, the caller *must*
- * increment the bucket occupancy counter appropriately *before* 
+ * increment the bucket occupancy counter appropriately *before*
  * releasing the pmap's lock to ensure no other thread or cpu deallocates
  * the bucket/page in the meantime.
  */
@@ -903,7 +903,7 @@
 			 */
 			pm->pm_l2[L2_IDX(l1idx)] = l2;
 		}
-	} 
+	}
 
 	l2b = &l2->l2_bucket[L2_BUCKET(l1idx)];
 
@@ -1100,7 +1100,7 @@
 		
 		if ((pte & L2_S_CACHE_MASK) != pte_l2_s_cache_mode_pt) {
 			/*
-			 * Page tables must have the cache-mode set to 
+			 * Page tables must have the cache-mode set to
 			 * Write-Thru.
 			 */
 			*ptep = (pte & ~L2_S_CACHE_MASK) | pte_l2_s_cache_mode_pt;
@@ -1415,7 +1415,7 @@
  * We use `maskbits' rather than `clearbits' because we're always passing
  * constants and the latter would require an extra inversion at run-time.
  */
-static int 
+static int
 pmap_clearbit(struct vm_page *pg, u_int maskbits)
 {
 	struct l2_bucket *l2b;
@@ -1473,10 +1473,10 @@
 
 		if (maskbits & (PVF_WRITE|PVF_MOD)) {
 			if ((pv->pv_flags & PVF_NC)) {
-				/* 
+				/*
 				 * Entry is not cacheable:
 				 *
-				 * Don't turn caching on again if this is a 
+				 * Don't turn caching on again if this is a
 				 * modified emulation. This would be
 				 * inconsitent with the settings created by
 				 * pmap_fix_cache(). Otherwise, it's safe
@@ -1493,7 +1493,7 @@
 			} else
 			if (opte & L2_S_PROT_W) {
 				vm_page_dirty(pg);
-				/* 
+				/*
 				 * Entry is writable/cacheable: check if pmap
 				 * is current if it is flush it, otherwise it
 				 * won't be in the cache
@@ -1760,7 +1760,7 @@
  * => caller should hold lock on vm_page [so that attrs can be adjusted]
  * => caller should NOT adjust pmap's wire_count
  * => we return the old flags
- * 
+ *
  * Modify a physical-virtual mapping in the pv table
  */
 static u_int
@@ -1845,7 +1845,7 @@
 	/*
 	 * init the pv free list
 	 */
-	pvzone = uma_zcreate("PV ENTRY", sizeof (struct pv_entry), NULL, NULL, 
+	pvzone = uma_zcreate("PV ENTRY", sizeof (struct pv_entry), NULL, NULL,
 	    NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE);
 	/*
 	 * Now it is safe to enable pv_table recording.
@@ -1951,7 +1951,7 @@
 		vm_page_dirty(pg);
 		pv->pv_flags |= PVF_REF | PVF_MOD;
 
-		/* 
+		/*
 		 * Re-enable write permissions for the page.  No need to call
 		 * pmap_fix_cache(), since this is just a
 		 * modified-emulation fault, and the PVF_WRITE bit isn't
@@ -2249,7 +2249,7 @@
 }
 
 static void
-pmap_alloc_specials(vm_offset_t *availp, int pages, vm_offset_t *vap, 
+pmap_alloc_specials(vm_offset_t *availp, int pages, vm_offset_t *vap,
     pt_entry_t **ptep)
 {
 	vm_offset_t va = *availp;
@@ -2338,7 +2338,7 @@
 		if ((l2 = kernel_pmap->pm_l2[L2_IDX(l1idx)]) == NULL) {
 			if (l2next == PMAP_STATIC_L2_SIZE)
 				panic("pmap_bootstrap: out of static L2s");
-			kernel_pmap->pm_l2[L2_IDX(l1idx)] = l2 = 
+			kernel_pmap->pm_l2[L2_IDX(l1idx)] = l2 =
 			    &static_l2[l2next++];
 		}
 
@@ -2407,7 +2407,7 @@
 	 */
 #define SYSMAP(c, p, v, n)						\
     v = (c)va; va += ((n)*PAGE_SIZE); p = pte; pte += (n);
-    
+
 	pmap_alloc_specials(&virtual_avail, 1, &csrcp, &csrc_pte);
 	pmap_set_pt_cache_mode(kernel_l1pt, (vm_offset_t)csrc_pte);
 	pmap_alloc_specials(&virtual_avail, 1, &cdstp, &cdst_pte);
@@ -2561,7 +2561,7 @@
 		l2 = (struct l2_dtable *)nva;
 		nva += sizeof(struct l2_dtable);
 
-		if ((nva & PAGE_MASK) < (pmap_kernel_l2dtable_kva & 
+		if ((nva & PAGE_MASK) < (pmap_kernel_l2dtable_kva &
 		    PAGE_MASK)) {
 			/*
 			 * The new l2_dtable straddles a page boundary.
@@ -2809,7 +2809,7 @@
 		if (opte == 0)
 			l2b->l2b_occupancy++;
 	}
-	*pte = L2_S_PROTO | pa | L2_S_PROT(PTE_KERNEL, 
+	*pte = L2_S_PROTO | pa | L2_S_PROT(PTE_KERNEL,
 	    VM_PROT_READ | VM_PROT_WRITE);
 	if (flags & KENTER_CACHE)
 		*pte |= pte_l2_s_cache_mode;
@@ -2822,7 +2822,7 @@
 		 *
 		 * The pvzone is used to delay the recording of kernel
 		 * mappings until the VM is running.
-		 * 
+		 *
 		 * This expects the physical memory to have vm_page_array entry.
 		 */
 	if (pvzone != NULL && (m = vm_phys_paddr_to_vm_page(pa))) {
@@ -2906,7 +2906,7 @@
 		PMAP_LOCK(pmap_kernel());
 		if (pvzone != NULL && (m = vm_phys_paddr_to_vm_page(pa)) &&
 		    (pve = pmap_remove_pv(m, pmap_kernel(), va)))
-			pmap_free_pv_entry(pve); 
+			pmap_free_pv_entry(pve);
 		PMAP_UNLOCK(pmap_kernel());
 		vm_page_unlock_queues();
 		va = va & ~PAGE_MASK;
@@ -2943,7 +2943,7 @@
 	PDEBUG(1, printf("pmap_map: virt = %08x, start = %08x, end = %08x, "
 	    "prot = %d\n", (uint32_t) *virt, (uint32_t) start, (uint32_t) end,
 	    prot));
-	    
+
 	while (start < end) {
 		pmap_kenter(va, start);
 		va += PAGE_SIZE;
@@ -2987,7 +2987,7 @@
 
 	for (i = 0; i < count; i++) {
 		pmap_wb_page(m[i]);
-		pmap_kenter_internal(va, VM_PAGE_TO_PHYS(m[i]), 
+		pmap_kenter_internal(va, VM_PAGE_TO_PHYS(m[i]),
 		    KENTER_CACHE);
 		va += PAGE_SIZE;
 	}
@@ -3343,7 +3343,7 @@
 		nflags |= PVF_WIRED;
 	PDEBUG(1, printf("pmap_enter: pmap = %08x, va = %08x, m = %08x, prot = %x, "
 	    "wired = %x\n", (uint32_t) pmap, va, (uint32_t) m, prot, wired));
-	    
+
 	if (pmap == pmap_kernel()) {
 		l2b = pmap_get_l2_bucket(pmap, va);
 		if (l2b == NULL)
@@ -3365,7 +3365,7 @@
 	}
 
 	ptep = &l2b->l2b_kva[l2pte_index(va)];
-		    
+
 	opte = *ptep;
 	npte = pa;
 	oflags = 0;
@@ -3528,8 +3528,7 @@
 	if (opte == 0) {
 		l2b->l2b_occupancy++;
 		pmap->pm_stats.resident_count++;
-	} 
-
+	}
 
 	/*
 	 * If this is just a wiring change, the two PTEs will be
@@ -3545,7 +3544,7 @@
 			 * is current
 			 */
 			PTE_SYNC(ptep);
-			if (L1_IDX(va) != L1_IDX(vector_page) && 
+			if (L1_IDX(va) != L1_IDX(vector_page) &&
 			    l2pte_valid(npte)) {
 				/*
 				 * This mapping is likely to be accessed as
@@ -3650,7 +3649,7 @@
 	ptep = &l2b->l2b_kva[l2pte_index(va)];
 	pte = *ptep;
 	pg = PHYS_TO_VM_PAGE(l2pte_pa(pte));
-	if (pg) 
+	if (pg)
 		pmap_modify_pv(pg, pmap, va, PVF_WIRED, wired ? PVF_WIRED : 0);
 	vm_page_unlock_queues();
  	PMAP_UNLOCK(pmap);
@@ -3695,7 +3694,7 @@
 		 */
 		KASSERT(pm == pmap_kernel(), ("huh"));
 		/* XXX: what to do about the bits > 32 ? */
-		if (l1pd & L1_S_SUPERSEC) 
+		if (l1pd & L1_S_SUPERSEC)
 			pa = (l1pd & L1_SUP_FRAME) | (va & L1_SUP_OFFSET);
 		else
 			pa = (l1pd & L1_S_FRAME) | (va & L1_S_OFFSET);
@@ -3763,7 +3762,7 @@
 		 */
 		KASSERT(pmap == pmap_kernel(), ("huh"));
 		/* XXX: what to do about the bits > 32 ? */
-		if (l1pd & L1_S_SUPERSEC) 
+		if (l1pd & L1_S_SUPERSEC)
 			pa = (l1pd & L1_SUP_FRAME) | (va & L1_SUP_OFFSET);
 		else
 			pa = (l1pd & L1_S_FRAME) | (va & L1_S_OFFSET);
@@ -3840,7 +3839,7 @@
 		pmap_enter(pmap, vector_page,
 		    VM_PROT_READ, PHYS_TO_VM_PAGE(systempage.pv_pa),
 		    VM_PROT_READ, 1);
-	} 
+	}
 	return (1);
 }
 
@@ -4000,7 +3999,7 @@
 
 /*
  * pmap_zero_page()
- * 
+ *
  * Zero a given physical page by mapping it at a page hook point.
  * In doing the zero page op, the page we zero is mapped cachable, as with
  * StrongARM accesses to non-cached pages are non-burst making writing
@@ -4137,7 +4136,7 @@
 #endif /* ARM_MMU_XSCALE == 1 */
 
 /*
- *	pmap_zero_page zeros the specified hardware page by mapping 
+ *	pmap_zero_page zeros the specified hardware page by mapping
  *	the page into KVM and using bzero to clear its contents.
  */
 void
@@ -4148,7 +4147,7 @@
 
 
 /*
- *	pmap_zero_page_area zeros the specified hardware page by mapping 
+ *	pmap_zero_page_area zeros the specified hardware page by mapping
  *	the page into KVM and using bzero to clear its contents.
  *
  *	off and size may not cover an area beyond a single hardware page.
@@ -4162,7 +4161,7 @@
 
 
 /*
- *	pmap_zero_page_idle zeros the specified hardware page by mapping 
+ *	pmap_zero_page_idle zeros the specified hardware page by mapping
  *	the page into KVM and using bzero to clear its contents.  This
  *	is intended to be called from the vm_pagezero process only and
  *	outside of Giant.
@@ -4225,7 +4224,7 @@
 		if (npv->pv_pmap == pmap_kernel() || npv->pv_pmap == pm) {
 			flags |= npv->pv_flags;
 			/*
-			 * The page is mapped non-cacheable in 
+			 * The page is mapped non-cacheable in
 			 * this map.  No need to flush the cache.
 			 */
 			if (npv->pv_flags & PVF_NC) {
@@ -4377,7 +4376,7 @@
 	cpu_dcache_wbinv_all();
 	cpu_l2cache_wbinv_all();
 	if (_arm_memcpy && PAGE_SIZE >= _min_memcpy_size &&
-	    _arm_memcpy((void *)VM_PAGE_TO_PHYS(dst), 
+	    _arm_memcpy((void *)VM_PAGE_TO_PHYS(dst),
 	    (void *)VM_PAGE_TO_PHYS(src), PAGE_SIZE, IS_PHYSICAL) == 0)
 		return;
 #ifdef ARM_USE_SMALL_ALLOC
@@ -4524,7 +4523,7 @@
 
 	KASSERT((m->oflags & VPO_UNMANAGED) == 0,
 	    ("pmap_clear_reference: page %p is not managed", m));
-	if (m->md.pvh_attrs & PVF_REF) 
+	if (m->md.pvh_attrs & PVF_REF)
 		pmap_clearbit(m, PVF_REF);
 }
 
@@ -4557,9 +4556,59 @@
 int
 pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t *locked_pa)
 {
-	printf("pmap_mincore()\n");
-	
-	return (0);
+	struct l2_bucket *l2b;
+	pt_entry_t *ptep, pte;
+	vm_paddr_t pa;
+	vm_page_t m;
+	int val;
+	boolean_t managed;
+
+	PMAP_LOCK(pmap);
+retry:
+	l2b = pmap_get_l2_bucket(pmap, addr);
+        if (l2b == NULL) {
+                val = 0;
+                goto out;
+        }
+	ptep = &l2b->l2b_kva[l2pte_index(addr)];
+	pte = *ptep;
+	if (!l2pte_valid(pte)) {
+		val = 0;
+		goto out;
+	}
+	val = MINCORE_INCORE;
+	if (pte & L2_S_PROT_W)
+		val |= MINCORE_MODIFIED | MINCORE_MODIFIED_OTHER;
+        managed = false;
+	pa = l2pte_pa(pte);
+        m = PHYS_TO_VM_PAGE(pa);
+        if (m != NULL && !(m->oflags & VPO_UNMANAGED))
+                managed = true;
+	if (managed) {
+		/*
+		 * the ARM pmap tries to maintain a per-mapping
+		 * reference bit.  The trouble is that it's kept in
+		 * the PV entry, not the PTE, so it's costly to access
+		 * here.  You would need to acquire the page queues
+		 * lock, call pmap_find_pv(), and introduce a custom
+		 * version of vm_page_pa_tryrelock() that releases and
+		 * reacquires the page queues lock.  In the end, I
+		 * doubt it's worthwhile.  This may falsely report
+		 * the given address as referenced.
+		 */
+		if ((m->md.pvh_attrs & PVF_REF) != 0)
+			val |= MINCORE_REFERENCED | MINCORE_REFERENCED_OTHER;
+	}
+	if ((val & (MINCORE_MODIFIED_OTHER | MINCORE_REFERENCED_OTHER)) !=
+	    (MINCORE_MODIFIED_OTHER | MINCORE_REFERENCED_OTHER) && managed) {
+		/* Ensure that "PHYS_TO_VM_PAGE(pa)->object" doesn't change. */
+		if (vm_page_pa_tryrelock(pmap, pa, locked_pa))
+			goto retry;
+	} else
+out:
+		PA_UNLOCK_COND(*locked_pa);
+	PMAP_UNLOCK(pmap);
+	return (val);
 }
 
 
@@ -4660,7 +4709,7 @@
 
 	proto = L1_S_DOM(PMAP_DOMAIN_KERNEL) | L1_C_PROTO;
 
-#ifdef VERBOSE_INIT_ARM     
+#ifdef VERBOSE_INIT_ARM
 	printf("pmap_link_l2pt: pa=0x%x va=0x%x\n", l2pv->pv_pa, l2pv->pv_va);
 #endif
 
@@ -4729,7 +4778,7 @@
 {
 	pd_entry_t *pde = (pd_entry_t *) l1pt;
 	pt_entry_t *pte, f1, f2s, f2l;
-	vm_size_t resid;  
+	vm_size_t resid;
 	int i;
 
 	resid = (size + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
@@ -4737,7 +4786,7 @@
 	if (l1pt == 0)
 		panic("pmap_map_chunk: no L1 table provided");
 
-#ifdef VERBOSE_INIT_ARM     
+#ifdef VERBOSE_INIT_ARM
 	printf("pmap_map_chunk: pa=0x%x va=0x%x size=0x%x resid=0x%x "
 	    "prot=0x%x cache=%d\n", pa, va, size, resid, prot, cache);
 #endif
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/support.S
--- a/head/sys/arm/arm/support.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/support.S	Wed Jul 25 17:18:25 2012 +0300
@@ -88,7 +88,7 @@
 
 #include <machine/asm.h>
 #include <machine/asmacros.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/support.S 236991 2012-06-13 04:59:55Z imp $");
 
 #include "assym.s"
 
@@ -389,9 +389,9 @@
 
 ENTRY(bcopy)
 	/* switch the source and destination registers */
-	eor     r0, r1, r0 
-	eor     r1, r0, r1 
-	eor     r0, r1, r0 
+	eor     r0, r1, r0
+	eor     r1, r0, r1
+	eor     r0, r1, r0
 ENTRY(memmove)
 	/* Do the buffers overlap? */
 	cmp	r0, r1
@@ -420,7 +420,7 @@
 	/* We have aligned source and destination */
 	subs	r2, r2, #8
 	blt	.Lmemmove_fl12		/* less than 12 bytes (4 from above) */
-	subs	r2, r2, #0x14         
+	subs	r2, r2, #0x14
 	blt	.Lmemmove_fl32		/* less than 32 bytes (12 from above) */
 	stmdb	sp!, {r4}		/* borrow r4 */
 
@@ -431,23 +431,23 @@
 	stmia	r0!, {r3, r4, r12, lr}
 	ldmia	r1!, {r3, r4, r12, lr}
 	stmia	r0!, {r3, r4, r12, lr}
-	subs	r2, r2, #0x20         
+	subs	r2, r2, #0x20
 	bge	.Lmemmove_floop32
 
 	cmn	r2, #0x10
 	ldmgeia	r1!, {r3, r4, r12, lr}	/* blat a remaining 16 bytes */
 	stmgeia	r0!, {r3, r4, r12, lr}
-	subge	r2, r2, #0x10         
+	subge	r2, r2, #0x10
 	ldmia	sp!, {r4}		/* return r4 */
 
 .Lmemmove_fl32:
-	adds	r2, r2, #0x14         
+	adds	r2, r2, #0x14
 
 	/* blat 12 bytes at a time */
 .Lmemmove_floop12:
 	ldmgeia	r1!, {r3, r12, lr}
 	stmgeia	r0!, {r3, r12, lr}
-	subges	r2, r2, #0x0c         
+	subges	r2, r2, #0x0c
 	bge	.Lmemmove_floop12
 
 .Lmemmove_fl12:
@@ -502,9 +502,9 @@
 	cmp	r12, #2
 	bgt	.Lmemmove_fsrcul3
 	beq	.Lmemmove_fsrcul2
-	cmp	r2, #0x0c            
+	cmp	r2, #0x0c
 	blt	.Lmemmove_fsrcul1loop4
-	sub	r2, r2, #0x0c         
+	sub	r2, r2, #0x0c
 	stmdb	sp!, {r4, r5}
 
 .Lmemmove_fsrcul1loop16:
@@ -532,10 +532,10 @@
 	orr	r12, r12, lr, lsl #24
 #endif
 	stmia	r0!, {r3-r5, r12}
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lmemmove_fsrcul1loop16
 	ldmia	sp!, {r4, r5}
-	adds	r2, r2, #0x0c         
+	adds	r2, r2, #0x0c
 	blt	.Lmemmove_fsrcul1l4
 
 .Lmemmove_fsrcul1loop4:
@@ -559,9 +559,9 @@
 	b	.Lmemmove_fl4
 
 .Lmemmove_fsrcul2:
-	cmp	r2, #0x0c            
+	cmp	r2, #0x0c
 	blt	.Lmemmove_fsrcul2loop4
-	sub	r2, r2, #0x0c         
+	sub	r2, r2, #0x0c
 	stmdb	sp!, {r4, r5}
 
 .Lmemmove_fsrcul2loop16:
@@ -589,10 +589,10 @@
 	orr	r12, r12, lr, lsl #16
 #endif
 	stmia	r0!, {r3-r5, r12}
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lmemmove_fsrcul2loop16
 	ldmia	sp!, {r4, r5}
-	adds	r2, r2, #0x0c         
+	adds	r2, r2, #0x0c
 	blt	.Lmemmove_fsrcul2l4
 
 .Lmemmove_fsrcul2loop4:
@@ -616,9 +616,9 @@
 	b	.Lmemmove_fl4
 
 .Lmemmove_fsrcul3:
-	cmp	r2, #0x0c            
+	cmp	r2, #0x0c
 	blt	.Lmemmove_fsrcul3loop4
-	sub	r2, r2, #0x0c         
+	sub	r2, r2, #0x0c
 	stmdb	sp!, {r4, r5}
 
 .Lmemmove_fsrcul3loop16:
@@ -646,10 +646,10 @@
 	orr	r12, r12, lr, lsl #8
 #endif
 	stmia	r0!, {r3-r5, r12}
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lmemmove_fsrcul3loop16
 	ldmia	sp!, {r4, r5}
-	adds	r2, r2, #0x0c         
+	adds	r2, r2, #0x0c
 	blt	.Lmemmove_fsrcul3l4
 
 .Lmemmove_fsrcul3loop4:
@@ -697,18 +697,18 @@
 	stmdb	r0!, {r3, r4, r12, lr}
 	ldmdb	r1!, {r3, r4, r12, lr}
 	stmdb	r0!, {r3, r4, r12, lr}
-	subs	r2, r2, #0x20         
+	subs	r2, r2, #0x20
 	bge	.Lmemmove_bloop32
 
 .Lmemmove_bl32:
-	cmn	r2, #0x10            
+	cmn	r2, #0x10
 	ldmgedb	r1!, {r3, r4, r12, lr}	/* blat a remaining 16 bytes */
 	stmgedb	r0!, {r3, r4, r12, lr}
-	subge	r2, r2, #0x10         
-	adds	r2, r2, #0x14         
+	subge	r2, r2, #0x10
+	adds	r2, r2, #0x14
 	ldmgedb	r1!, {r3, r12, lr}	/* blat a remaining 12 bytes */
 	stmgedb	r0!, {r3, r12, lr}
-	subge	r2, r2, #0x0c         
+	subge	r2, r2, #0x0c
 	ldmia	sp!, {r4, lr}
 
 .Lmemmove_bl12:
@@ -760,9 +760,9 @@
 	cmp	r12, #2
 	blt	.Lmemmove_bsrcul1
 	beq	.Lmemmove_bsrcul2
-	cmp	r2, #0x0c            
+	cmp	r2, #0x0c
 	blt	.Lmemmove_bsrcul3loop4
-	sub	r2, r2, #0x0c         
+	sub	r2, r2, #0x0c
 	stmdb	sp!, {r4, r5, lr}
 
 .Lmemmove_bsrcul3loop16:
@@ -790,10 +790,10 @@
 	orr	r4, r4, r3, lsr #24
 #endif
 	stmdb	r0!, {r4, r5, r12, lr}
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lmemmove_bsrcul3loop16
 	ldmia	sp!, {r4, r5, lr}
-	adds	r2, r2, #0x0c         
+	adds	r2, r2, #0x0c
 	blt	.Lmemmove_bsrcul3l4
 
 .Lmemmove_bsrcul3loop4:
@@ -817,9 +817,9 @@
 	b	.Lmemmove_bl4
 
 .Lmemmove_bsrcul2:
-	cmp	r2, #0x0c            
+	cmp	r2, #0x0c
 	blt	.Lmemmove_bsrcul2loop4
-	sub	r2, r2, #0x0c         
+	sub	r2, r2, #0x0c
 	stmdb	sp!, {r4, r5, lr}
 
 .Lmemmove_bsrcul2loop16:
@@ -847,10 +847,10 @@
 	orr	r4, r4, r3, lsr #16
 #endif
 	stmdb	r0!, {r4, r5, r12, lr}
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lmemmove_bsrcul2loop16
 	ldmia	sp!, {r4, r5, lr}
-	adds	r2, r2, #0x0c         
+	adds	r2, r2, #0x0c
 	blt	.Lmemmove_bsrcul2l4
 
 .Lmemmove_bsrcul2loop4:
@@ -874,9 +874,9 @@
 	b	.Lmemmove_bl4
 
 .Lmemmove_bsrcul1:
-	cmp	r2, #0x0c            
+	cmp	r2, #0x0c
 	blt	.Lmemmove_bsrcul1loop4
-	sub	r2, r2, #0x0c         
+	sub	r2, r2, #0x0c
 	stmdb	sp!, {r4, r5, lr}
 
 .Lmemmove_bsrcul1loop32:
@@ -904,10 +904,10 @@
 	orr	r4, r4, r3, lsr #8
 #endif
 	stmdb	r0!, {r4, r5, r12, lr}
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lmemmove_bsrcul1loop32
 	ldmia	sp!, {r4, r5, lr}
-	adds	r2, r2, #0x0c         
+	adds	r2, r2, #0x0c
 	blt	.Lmemmove_bsrcul1l4
 
 .Lmemmove_bsrcul1loop4:
@@ -976,7 +976,7 @@
 	/* We have aligned source and destination */
 	subs	r2, r2, #8
 	blt	.Lmemcpy_l12		/* less than 12 bytes (4 from above) */
-	subs	r2, r2, #0x14         
+	subs	r2, r2, #0x14
 	blt	.Lmemcpy_l32		/* less than 32 bytes (12 from above) */
 	stmdb	sp!, {r4}		/* borrow r4 */
 
@@ -987,23 +987,23 @@
 	stmia	r0!, {r3, r4, r12, lr}
 	ldmia	r1!, {r3, r4, r12, lr}
 	stmia	r0!, {r3, r4, r12, lr}
-	subs	r2, r2, #0x20         
+	subs	r2, r2, #0x20
 	bge	.Lmemcpy_loop32
 
 	cmn	r2, #0x10
 	ldmgeia	r1!, {r3, r4, r12, lr}	/* blat a remaining 16 bytes */
 	stmgeia	r0!, {r3, r4, r12, lr}
-	subge	r2, r2, #0x10         
+	subge	r2, r2, #0x10
 	ldmia	sp!, {r4}		/* return r4 */
 
 .Lmemcpy_l32:
-	adds	r2, r2, #0x14         
+	adds	r2, r2, #0x14
 
 	/* blat 12 bytes at a time */
 .Lmemcpy_loop12:
 	ldmgeia	r1!, {r3, r12, lr}
 	stmgeia	r0!, {r3, r12, lr}
-	subges	r2, r2, #0x0c         
+	subges	r2, r2, #0x0c
 	bge	.Lmemcpy_loop12
 
 .Lmemcpy_l12:
@@ -1061,9 +1061,9 @@
 	cmp	r12, #2
 	bgt	.Lmemcpy_srcul3
 	beq	.Lmemcpy_srcul2
-	cmp	r2, #0x0c            
+	cmp	r2, #0x0c
 	blt	.Lmemcpy_srcul1loop4
-	sub	r2, r2, #0x0c         
+	sub	r2, r2, #0x0c
 	stmdb	sp!, {r4, r5}
 
 .Lmemcpy_srcul1loop16:
@@ -1077,10 +1077,10 @@
 	mov	r12, r12, lsr #8
 	orr	r12, r12, lr, lsl #24
 	stmia	r0!, {r3-r5, r12}
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lmemcpy_srcul1loop16
 	ldmia	sp!, {r4, r5}
-	adds	r2, r2, #0x0c         
+	adds	r2, r2, #0x0c
 	blt	.Lmemcpy_srcul1l4
 
 .Lmemcpy_srcul1loop4:
@@ -1096,9 +1096,9 @@
 	b	.Lmemcpy_l4
 
 .Lmemcpy_srcul2:
-	cmp	r2, #0x0c            
+	cmp	r2, #0x0c
 	blt	.Lmemcpy_srcul2loop4
-	sub	r2, r2, #0x0c         
+	sub	r2, r2, #0x0c
 	stmdb	sp!, {r4, r5}
 
 .Lmemcpy_srcul2loop16:
@@ -1112,10 +1112,10 @@
 	mov	r12, r12, lsr #16
 	orr	r12, r12, lr, lsl #16
 	stmia	r0!, {r3-r5, r12}
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lmemcpy_srcul2loop16
 	ldmia	sp!, {r4, r5}
-	adds	r2, r2, #0x0c         
+	adds	r2, r2, #0x0c
 	blt	.Lmemcpy_srcul2l4
 
 .Lmemcpy_srcul2loop4:
@@ -1131,9 +1131,9 @@
 	b	.Lmemcpy_l4
 
 .Lmemcpy_srcul3:
-	cmp	r2, #0x0c            
+	cmp	r2, #0x0c
 	blt	.Lmemcpy_srcul3loop4
-	sub	r2, r2, #0x0c         
+	sub	r2, r2, #0x0c
 	stmdb	sp!, {r4, r5}
 
 .Lmemcpy_srcul3loop16:
@@ -1147,10 +1147,10 @@
 	mov	r12, r12, lsr #24
 	orr	r12, r12, lr, lsl #8
 	stmia	r0!, {r3-r5, r12}
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lmemcpy_srcul3loop16
 	ldmia	sp!, {r4, r5}
-	adds	r2, r2, #0x0c         
+	adds	r2, r2, #0x0c
 	blt	.Lmemcpy_srcul3l4
 
 .Lmemcpy_srcul3loop4:
@@ -1404,10 +1404,10 @@
 	str	r6, [r3], #0x04
 	str	r7, [r3], #0x04
 .Lmemcpy_bad1:
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lmemcpy_bad1_loop16
 
-	adds	r2, r2, #0x10         
+	adds	r2, r2, #0x10
 	ldmeqfd	sp!, {r4-r7}
 	RETeq			/* Return now if done */
 	subs	r2, r2, #0x04
@@ -1465,10 +1465,10 @@
 	str	r6, [r3], #0x04
 	str	r7, [r3], #0x04
 .Lmemcpy_bad2:
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lmemcpy_bad2_loop16
 
-	adds	r2, r2, #0x10         
+	adds	r2, r2, #0x10
 	ldmeqfd	sp!, {r4-r7}
 	RETeq			/* Return now if done */
 	subs	r2, r2, #0x04
@@ -1526,10 +1526,10 @@
 	str	r6, [r3], #0x04
 	str	r7, [r3], #0x04
 .Lmemcpy_bad3:
-	subs	r2, r2, #0x10         
+	subs	r2, r2, #0x10
 	bge	.Lmemcpy_bad3_loop16
 
-	adds	r2, r2, #0x10         
+	adds	r2, r2, #0x10
 	ldmeqfd	sp!, {r4-r7}
 	RETeq			/* Return now if done */
 	subs	r2, r2, #0x04
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/swtch.S
--- a/head/sys/arm/arm/swtch.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/swtch.S	Wed Jul 25 17:18:25 2012 +0300
@@ -83,7 +83,7 @@
 #include <machine/asm.h>
 #include <machine/asmacros.h>
 #include <machine/armreg.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/swtch.S 236991 2012-06-13 04:59:55Z imp $");
 
 
 /*
@@ -262,7 +262,7 @@
 	strd	r12, [r2, #(PCB_R12)]
 #endif
 	str	pc, [r2, #(PCB_PC)]
-									   
+
 	/*
 	 * NOTE: We can now use r8-r13 until it is time to restore
 	 * them for the new process.
@@ -291,7 +291,7 @@
 
         mrs	r3, cpsr
 	/*
-	 * We can do that, since 
+	 * We can do that, since
 	 * PSR_SVC32_MODE|PSR_UND32_MODE == MSR_UND32_MODE
 	 */
 	orr	r8, r3, #(PSR_UND32_MODE)
@@ -399,7 +399,7 @@
 	movne	lr, pc
 	ldrne	pc, [r10, #CF_TLB_FLUSHID_SE]
 	/*
-	 * We can do that, since 
+	 * We can do that, since
 	 * PSR_SVC32_MODE|PSR_UND32_MODE == MSR_UND32_MODE
 	 */
 
@@ -422,7 +422,7 @@
 
         mrs	r3, cpsr
 	/*
-	 * We can do that, since 
+	 * We can do that, since
 	 * PSR_SVC32_MODE|PSR_UND32_MODE == MSR_UND32_MODE
 	 */
 	orr	r2, r3, #(PSR_UND32_MODE)
@@ -451,7 +451,7 @@
 
 #ifdef ARMFPE
 	add	r0, r7, #(USER_SIZE) & 0x00ff
-	add	r0, r0, #(USER_SIZE) & 0xff00 
+	add	r0, r0, #(USER_SIZE) & 0xff00
 	bl	_C_LABEL(arm_fpe_core_changecontext)
 #endif
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/sys_machdep.c
--- a/head/sys/arm/arm/sys_machdep.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/sys_machdep.c	Wed Jul 25 17:18:25 2012 +0300
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/arm/sys_machdep.c 226498 2011-10-18 07:39:27Z des $");
+__FBSDID("$FreeBSD: head/sys/arm/arm/sys_machdep.c 236991 2012-06-13 04:59:55Z imp $");
 
 #include "opt_capsicum.h"
 
@@ -132,10 +132,10 @@
 #endif
 
 	switch (uap->op) {
-	case ARM_SYNC_ICACHE : 
+	case ARM_SYNC_ICACHE:
 		error = arm32_sync_icache(td, uap->parms);
 		break;
-	case ARM_DRAIN_WRITEBUF : 
+	case ARM_DRAIN_WRITEBUF:
 		error = arm32_drain_writebuf(td, uap->parms);
 		break;
 	case ARM_SET_TP:
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/trap.c
--- a/head/sys/arm/arm/trap.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/trap.c	Wed Jul 25 17:18:25 2012 +0300
@@ -82,7 +82,7 @@
 #include "opt_ktrace.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/arm/trap.c 225973 2011-10-04 13:14:24Z kib $");
+__FBSDID("$FreeBSD: head/sys/arm/arm/trap.c 236991 2012-06-13 04:59:55Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -128,7 +128,7 @@
 
 #include <machine/disassem.h>
 #include <machine/machdep.h>
- 
+
 extern char fusubailout[];
 
 #ifdef DEBUG
@@ -388,7 +388,7 @@
 	 * responsible to determine if it was a write.
 	 */
 	if (IS_PERMISSION_FAULT(fsr)) {
-		ftype = VM_PROT_WRITE; 
+		ftype = VM_PROT_WRITE;
 	} else {
 		u_int insn = ReadWord(tf->tf_pc);
 
@@ -396,13 +396,13 @@
 		    ((insn & 0x0e1000b0) == 0x000000b0) ||	/* STRH/STRD */
 		    ((insn & 0x0a100000) == 0x08000000))	/* STM/CDT */
 		{
-			ftype = VM_PROT_WRITE; 
+			ftype = VM_PROT_WRITE;
 	}
 		else
 		if ((insn & 0x0fb00ff0) == 0x01000090)		/* SWP */
-			ftype = VM_PROT_READ | VM_PROT_WRITE; 
+			ftype = VM_PROT_READ | VM_PROT_WRITE;
 		else
-			ftype = VM_PROT_READ; 
+			ftype = VM_PROT_READ;
 	}
 
 	/*
@@ -734,9 +734,7 @@
 		if (__predict_true(tf->tf_spsr & F32_bit) == 0)
 			enable_interrupts(F32_bit);
 	}
-	 
 
-		       
 	/* See if the cpu state needs to be fixed up */
 	switch (prefetch_abort_fixup(tf, &ksig)) {
 	case ABORT_FIXUP_RETURN:
@@ -947,15 +945,15 @@
 	/*
 	 * Enable interrupts if they were enabled before the exception.
 	 * Since all syscalls *should* come from user mode it will always
-	 * be safe to enable them, but check anyway. 
-	 */       
+	 * be safe to enable them, but check anyway.
+	 */
 	if (td->td_md.md_spinlock_count == 0) {
 		if (__predict_true(frame->tf_spsr & I32_bit) == 0)
 			enable_interrupts(I32_bit);
 		if (__predict_true(frame->tf_spsr & F32_bit) == 0)
 			enable_interrupts(F32_bit);
 	}
-	 
+
 	syscall(td, frame, insn);
 }
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/undefined.c
--- a/head/sys/arm/arm/undefined.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/undefined.c	Wed Jul 25 17:18:25 2012 +0300
@@ -48,7 +48,7 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/undefined.c 236991 2012-06-13 04:59:55Z imp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -194,8 +194,8 @@
 
 	fault_pc = frame->tf_pc;
 
-	/* 
-	 * Get the current thread/proc structure or thread0/proc0 if there is 
+	/*
+	 * Get the current thread/proc structure or thread0/proc0 if there is
 	 * none.
 	 */
 	td = curthread == NULL ? &thread0 : curthread;
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/vectors.S
--- a/head/sys/arm/arm/vectors.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/vectors.S	Wed Jul 25 17:18:25 2012 +0300
@@ -3,7 +3,7 @@
 /*-
  * Copyright (C) 1994-1997 Mark Brinicombe
  * Copyright (C) 1994 Brini
- * All rights reserved. 
+ * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -18,10 +18,10 @@
  *	This product includes software developed by Brini.
  * 4. The name of Brini may not be used to endorse or promote products
  *    derived from this software without specific prior written permission.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY BRINI ``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. 
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  * IN NO EVENT SHALL BRINI 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;
@@ -33,7 +33,7 @@
  */
 
 #include <machine/asm.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/arm/vectors.S 236991 2012-06-13 04:59:55Z imp $");
 
 /*
  * These are the exception vectors copied down to page 0.
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/arm/vm_machdep.c
--- a/head/sys/arm/arm/vm_machdep.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/arm/vm_machdep.c	Wed Jul 25 17:18:25 2012 +0300
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/arm/vm_machdep.c 228522 2011-12-15 05:07:16Z alc $");
+__FBSDID("$FreeBSD: head/sys/arm/arm/vm_machdep.c 236991 2012-06-13 04:59:55Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -152,11 +152,11 @@
 void
 cpu_thread_swapin(struct thread *td)
 {
-}       
+}
 
-void    
+void
 cpu_thread_swapout(struct thread *td)
-{       
+{
 }
 
 /*
@@ -177,7 +177,7 @@
 		 if (sf_buf_alloc_want > 0)
 			 wakeup(&sf_buf_freelist);
 	 }
-	 mtx_unlock(&sf_buf_lock);				 
+	 mtx_unlock(&sf_buf_lock);
 #endif
 }
 
@@ -187,11 +187,11 @@
  */
 static void
 sf_buf_init(void *arg)
-{       
+{
 	struct sf_buf *sf_bufs;
 	vm_offset_t sf_base;
 	int i;
-				        
+
 	nsfbufs = NSFBUFS;
 	TUNABLE_INT_FETCH("kern.ipc.nsfbufs", &nsfbufs);
 		
@@ -204,7 +204,7 @@
 		sf_bufs[i].kva = sf_base + i * PAGE_SIZE;
 		TAILQ_INSERT_TAIL(&sf_buf_freelist, &sf_bufs[i], free_entry);
 	}
-	sf_buf_alloc_want = 0; 
+	sf_buf_alloc_want = 0;
 	mtx_init(&sf_buf_lock, "sf_buf", NULL, MTX_DEF);
 }
 #endif
@@ -246,7 +246,7 @@
 	
 
 		/*
-		 * If we got a signal, don't risk going back to sleep. 
+		 * If we got a signal, don't risk going back to sleep.
 		 */
 		if (error)
 			goto done;
@@ -319,7 +319,7 @@
 
 /*
  * Initialize machine state (pcb and trap frame) for a new thread about to
- * upcall. Put enough state in the new thread's PCB to get it to go back 
+ * upcall. Put enough state in the new thread's PCB to get it to go back
  * userret(), where we can intercept it again to set the return (upcall)
  * Address and stack, along with those from upcals that are from other sources
  * such as those generated in thread_userret() itself.
@@ -387,7 +387,7 @@
 void
 cpu_thread_alloc(struct thread *td)
 {
-	td->td_pcb = (struct pcb *)(td->td_kstack + td->td_kstack_pages * 
+	td->td_pcb = (struct pcb *)(td->td_kstack + td->td_kstack_pages *
 	    PAGE_SIZE) - 1;
 	td->td_frame = (struct trapframe *)
 	    ((u_int)td->td_kstack + USPACE_SVC_STACK_TOP - sizeof(struct pcb)) - 1;
@@ -395,7 +395,7 @@
 #ifndef CPU_XSCALE_CORE3
 	pmap_use_minicache(td->td_kstack, td->td_kstack_pages * PAGE_SIZE);
 #endif
-#endif  
+#endif
 }
 
 void
@@ -429,8 +429,8 @@
 
 /*
  * Software interrupt handler for queued VM system processing.
- */   
-void  
+ */
+void
 swi_vm(void *dummy)
 {
 	
@@ -445,14 +445,14 @@
 
 #define BITS_PER_INT	(8 * sizeof(int))
 vm_offset_t arm_nocache_startaddr;
-static int arm_nocache_allocated[ARM_NOCACHE_KVA_SIZE / (PAGE_SIZE * 
+static int arm_nocache_allocated[ARM_NOCACHE_KVA_SIZE / (PAGE_SIZE *
     BITS_PER_INT)];
 
 /*
- * Functions to map and unmap memory non-cached into KVA the kernel won't try 
+ * Functions to map and unmap memory non-cached into KVA the kernel won't try
  * to allocate. The goal is to provide uncached memory to busdma, to honor
- * BUS_DMA_COHERENT. 
- * We can allocate at most ARM_NOCACHE_KVA_SIZE bytes. 
+ * BUS_DMA_COHERENT.
+ * We can allocate at most ARM_NOCACHE_KVA_SIZE bytes.
  * The allocator is rather dummy, each page is represented by a bit in
  * a bitfield, 0 meaning the page is not allocated, 1 meaning it is.
  * As soon as it finds enough contiguous pages to satisfy the request,
@@ -465,7 +465,7 @@
 
 	size = round_page(size);
 	for (i = 0; i < ARM_NOCACHE_KVA_SIZE / PAGE_SIZE; i++) {
-		if (!(arm_nocache_allocated[i / BITS_PER_INT] & (1 << (i % 
+		if (!(arm_nocache_allocated[i / BITS_PER_INT] & (1 << (i %
 		    BITS_PER_INT)))) {
 			for (j = i; j < i + (size / (PAGE_SIZE)); j++)
 				if (arm_nocache_allocated[j / BITS_PER_INT] &
@@ -488,7 +488,7 @@
 			cpu_l2cache_wbinv_range(vaddr, PAGE_SIZE);
 			pmap_kenter_nocache(tomap, physaddr);
 			cpu_tlb_flushID_SE(vaddr);
-			arm_nocache_allocated[i / BITS_PER_INT] |= 1 << (i % 
+			arm_nocache_allocated[i / BITS_PER_INT] |= 1 << (i %
 			    BITS_PER_INT);
 		}
 		return (ret);
@@ -506,7 +506,7 @@
 	size = round_page(size);
 	i = (raddr - arm_nocache_startaddr) / (PAGE_SIZE);
 	for (; size > 0; size -= PAGE_SIZE, i++) {
-		arm_nocache_allocated[i / BITS_PER_INT] &= ~(1 << (i % 
+		arm_nocache_allocated[i / BITS_PER_INT] &= ~(1 << (i %
 		    BITS_PER_INT));
 		pmap_kremove(raddr);
 		raddr += PAGE_SIZE;
@@ -515,9 +515,9 @@
 
 #ifdef ARM_USE_SMALL_ALLOC
 
-static TAILQ_HEAD(,arm_small_page) pages_normal = 
+static TAILQ_HEAD(,arm_small_page) pages_normal =
 	TAILQ_HEAD_INITIALIZER(pages_normal);
-static TAILQ_HEAD(,arm_small_page) pages_wt = 
+static TAILQ_HEAD(,arm_small_page) pages_wt =
 	TAILQ_HEAD_INITIALIZER(pages_wt);
 static TAILQ_HEAD(,arm_small_page) free_pgdesc =
 	TAILQ_HEAD_INITIALIZER(free_pgdesc);
@@ -561,12 +561,12 @@
 	vm_offset_t to_map = 0, mapaddr;
 	int i;
 	
-	/* 
+	/*
 	 * We need to use dump_avail and not phys_avail, since we want to
 	 * map the whole memory and not just the memory available to the VM
 	 * to be able to do a pa => va association for any address.
 	 */
-	   
+
 	for (i = 0; dump_avail[i + 1]; i+= 2) {
 		to_map += (dump_avail[i + 1] & S_FRAME) + S_SIZE -
 		    (dump_avail[i] & S_FRAME);
@@ -579,10 +579,10 @@
 		while (size > 0) {
 #ifdef ARM_HAVE_SUPERSECTIONS
 			pmap_kenter_supersection(mapaddr,
-			    (dump_avail[i] & L1_SUP_FRAME) + did, 
+			    (dump_avail[i] & L1_SUP_FRAME) + did,
 			    SECTION_CACHE);
 #else
-			pmap_kenter_section(mapaddr, 
+			pmap_kenter_section(mapaddr,
 			    (dump_avail[i] & L1_S_FRAME) + did, SECTION_CACHE);
 #endif
 			mapaddr += S_SIZE;
@@ -661,7 +661,7 @@
 		if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0)
 			bzero(ret, PAGE_SIZE);
 		return (ret);
-	}    
+	}
 	TAILQ_REMOVE(head, sp, pg_list);
 	TAILQ_INSERT_HEAD(&free_pgdesc, sp, pg_list);
 	ret = sp->addr;
@@ -690,7 +690,7 @@
 			sp->addr = mem;
 			pmap_get_pde_pte(kernel_pmap, (vm_offset_t)mem, &pd,
 			    &pt);
-			if ((*pd & pte_l1_s_cache_mask) == 
+			if ((*pd & pte_l1_s_cache_mask) ==
 			    pte_l1_s_cache_mode_pt &&
 			    pte_l1_s_cache_mode_pt != pte_l1_s_cache_mode)
 				TAILQ_INSERT_HEAD(&pages_wt, sp, pg_list);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91.c
--- a/head/sys/arm/at91/at91.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/at91/at91.c 226832 2011-10-27 10:21:40Z kevlo $");
+__FBSDID("$FreeBSD: head/sys/arm/at91/at91.c 238545 2012-07-17 03:18:12Z gonzo $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -54,13 +54,7 @@
 
 extern const struct pmap_devmap at91_devmap[];
 
-uint32_t at91_chip_id;
-
-#ifdef AT91C_MASTER_CLOCK
-uint32_t at91_master_clock = AT91C_MASTER_CLOCK;
-#else
 uint32_t at91_master_clock;
-#endif
 
 static int
 at91_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags,
@@ -69,16 +63,16 @@
 	vm_paddr_t pa, endpa;
 
 	pa = trunc_page(bpa);
-	if (pa >= 0xfff00000) {
-		*bshp = pa - 0xf0000000 + 0xd0000000;
+	if (pa >= AT91_PA_BASE + 0xff00000) {
+		*bshp = pa - AT91_PA_BASE + AT91_BASE;
 		return (0);
 	}
-	if (pa >= 0xdff00000)
+	if (pa >= AT91_BASE + 0xff00000)
 		return (0);
 	endpa = round_page(bpa + size);
 
 	*bshp = (vm_offset_t)pmap_mapdev(pa, endpa - pa);
-		       
+
 	return (0);
 }
 
@@ -104,7 +98,7 @@
 }
 
 static void
-at91_barrier(void *t, bus_space_handle_t bsh, bus_size_t size, bus_size_t b, 
+at91_barrier(void *t, bus_space_handle_t bsh, bus_size_t size, bus_size_t b,
     int a)
 {
 }
@@ -248,15 +242,29 @@
 	BUS_ADD_CHILD(parent, 0, "atmelarm", 0);
 }
 
+static void
+at91_cpu_add_builtin_children(device_t dev, const struct cpu_devs *walker)
+{
+	int i;
+
+	for (i = 1; walker->name; i++, walker++) {
+		at91_add_child(dev, i, walker->name, walker->unit,
+		    walker->mem_base, walker->mem_len, walker->irq0,
+		    walker->irq1, walker->irq2);
+	}
+}
+
 static int
 at91_attach(device_t dev)
 {
 	struct at91_softc *sc = device_get_softc(dev);
 	const struct pmap_devmap *pdevmap;
+	int i;
 
 	at91_softc = sc;
 	sc->sc_st = &at91_bs_tag;
 	sc->sc_sh = AT91_BASE;
+	sc->sc_aic_sh = AT91_BASE + AT91_SYS_BASE;
 	sc->dev = dev;
 
 	sc->sc_irq_rman.rm_type = RMAN_ARRAY;
@@ -269,17 +277,40 @@
 	sc->sc_mem_rman.rm_descr = "AT91 Memory";
 	if (rman_init(&sc->sc_mem_rman) != 0)
 		panic("at91_attach: failed to set up memory rman");
-	for ( pdevmap = at91_devmap; pdevmap->pd_va != 0; pdevmap++) {
+	for (pdevmap = at91_devmap; pdevmap->pd_va != 0; pdevmap++) {
 		if (rman_manage_region(&sc->sc_mem_rman, pdevmap->pd_va,
 		    pdevmap->pd_va + pdevmap->pd_size - 1) != 0)
 			panic("at91_attach: failed to set up memory rman");
 	}
 
+	/*
+	 * Setup the interrupt table.
+	 */
+	if (soc_info.soc_data == NULL || soc_info.soc_data->soc_irq_prio == NULL)
+		panic("Interrupt priority table missing\n");
+	for (i = 0; i < 32; i++) {
+		bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR +
+		    i * 4, i);
+		/* Priority. */
+		bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SMR + i * 4,
+		    soc_info.soc_data->soc_irq_prio[i]);
+		if (i < 8)
+			bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_EOICR,
+			    1);
+	}
 
-	/* Our device list will be added automatically by the cpu device
-	 * e.g. at91rm9200.c when it is identified. To ensure that the
-	 * CPU and PMC are attached first any other "identified" devices 
-	 * call BUS_ADD_CHILD(9) with an "order" of at least 2. */
+	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SPU, 32);
+	/* No debug. */
+	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_DCR, 0);
+	/* Disable and clear all interrupts. */
+	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff);
+	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff);
+
+        /*
+         * Add this device's children...
+         */
+	at91_cpu_add_builtin_children(dev, soc_info.soc_data->soc_children);
+	soc_info.soc_data->soc_clock_init();
 
 	bus_generic_probe(dev);
 	bus_generic_attach(dev);
@@ -363,21 +394,18 @@
 
 static int
 at91_setup_intr(device_t dev, device_t child,
-    struct resource *ires, int flags, driver_filter_t *filt, 
-    driver_intr_t *intr, void *arg, void **cookiep)    
+    struct resource *ires, int flags, driver_filter_t *filt,
+    driver_intr_t *intr, void *arg, void **cookiep)
 {
-	struct at91_softc *sc = device_get_softc(dev);
 	int error;
 
-	if (rman_get_start(ires) == sc->sc_irq_system && filt == NULL)
+	if (rman_get_start(ires) == AT91_IRQ_SYSTEM && filt == NULL)
 		panic("All system interrupt ISRs must be FILTER");
 	error = BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags,
 	    filt, intr, arg, cookiep);
 	if (error)
 		return (error);
 
-	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IECR,
-	    1 << rman_get_start(ires));
 	return (0);
 }
 
@@ -387,7 +415,7 @@
 {
 	struct at91_softc *sc = device_get_softc(dev);
 
-	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 
+	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR,
 	    1 << rman_get_start(res));
 	return (BUS_TEARDOWN_INTR(device_get_parent(dev), child, res, cookie));
 }
@@ -403,7 +431,7 @@
 	if (type == SYS_RES_MEMORY) {
 		error = bus_space_map(rman_get_bustag(r),
 		    rman_get_bushandle(r), rman_get_size(r), 0, &p);
-		if (error) 
+		if (error)
 			return (error);
 		rman_set_bushandle(r, p);
 	}
@@ -438,7 +466,7 @@
 arm_mask_irq(uintptr_t nb)
 {
 	
-	bus_space_write_4(at91_softc->sc_st, 
+	bus_space_write_4(at91_softc->sc_st,
 	    at91_softc->sc_aic_sh, IC_IDCR, 1 << nb);
 }
 
@@ -464,7 +492,7 @@
 arm_unmask_irq(uintptr_t nb)
 {
 	
-	bus_space_write_4(at91_softc->sc_st, 
+	bus_space_write_4(at91_softc->sc_st,
 	at91_softc->sc_aic_sh, IC_IECR, 1 << nb);
 	bus_space_write_4(at91_softc->sc_st, at91_softc->sc_aic_sh,
 	    IC_EOICR, 0);
@@ -477,6 +505,41 @@
 	    IC_EOICR, 0);
 }
 
+void
+at91_add_child(device_t dev, int prio, const char *name, int unit,
+    bus_addr_t addr, bus_size_t size, int irq0, int irq1, int irq2)
+{
+	device_t kid;
+	struct at91_ivar *ivar;
+
+	kid = device_add_child_ordered(dev, prio, name, unit);
+	if (kid == NULL) {
+	    printf("Can't add child %s%d ordered\n", name, unit);
+	    return;
+	}
+	ivar = malloc(sizeof(*ivar), M_DEVBUF, M_NOWAIT | M_ZERO);
+	if (ivar == NULL) {
+		device_delete_child(dev, kid);
+		printf("Can't add alloc ivar\n");
+		return;
+	}
+	device_set_ivars(kid, ivar);
+	resource_list_init(&ivar->resources);
+	if (irq0 != -1) {
+		bus_set_resource(kid, SYS_RES_IRQ, 0, irq0, 1);
+		if (irq0 != AT91_IRQ_SYSTEM)
+			at91_pmc_clock_add(device_get_nameunit(kid), irq0, 0);
+	}
+	if (irq1 != 0)
+		bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1);
+	if (irq2 != 0)
+		bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1);
+	if (addr != 0 && addr < AT91_BASE) 
+		addr += AT91_BASE;
+	if (addr != 0)
+		bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size);
+}
+
 static device_method_t at91_methods[] = {
 	DEVMETHOD(device_probe, at91_probe),
 	DEVMETHOD(device_attach, at91_attach),
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_machdep.c
--- a/head/sys/arm/at91/at91_machdep.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_machdep.c	Wed Jul 25 17:18:25 2012 +0300
@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/at91/at91_machdep.c 223562 2011-06-26 10:07:48Z kevlo $");
+__FBSDID("$FreeBSD: head/sys/arm/at91/at91_machdep.c 238403 2012-07-12 19:11:37Z imp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -70,6 +70,7 @@
 #include <sys/msgbuf.h>
 #include <machine/reg.h>
 #include <machine/cpu.h>
+#include <machine/board.h>
 
 #include <vm/vm.h>
 #include <vm/pmap.h>
@@ -89,13 +90,17 @@
 
 #include <arm/at91/at91board.h>
 #include <arm/at91/at91var.h>
+#include <arm/at91/at91soc.h>
+#include <arm/at91/at91_usartreg.h>
 #include <arm/at91/at91rm92reg.h>
 #include <arm/at91/at91sam9g20reg.h>
 
-#define KERNEL_PT_SYS		0	/* Page table for mapping proc0 zero page */
+/* Page table for mapping proc0 zero page */
+#define KERNEL_PT_SYS		0
 #define KERNEL_PT_KERN		1
 #define KERNEL_PT_KERN_NUM	22
-#define KERNEL_PT_AFKERNEL	KERNEL_PT_KERN + KERNEL_PT_KERN_NUM	/* L2 table for mapping after kernel */
+/* L2 table for mapping after kernel */
+#define KERNEL_PT_AFKERNEL	KERNEL_PT_KERN + KERNEL_PT_KERN_NUM
 #define	KERNEL_PT_AFKERNEL_NUM	5
 
 /* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
@@ -112,10 +117,6 @@
 
 struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
 
-extern void *_end;
-
-extern int *end;
-
 struct pcpu __pcpu;
 struct pcpu *pcpup = &__pcpu;
 
@@ -123,7 +124,6 @@
 
 vm_paddr_t phys_avail[10];
 vm_paddr_t dump_avail[4];
-vm_offset_t physical_pages;
 
 struct pv_addr systempage;
 struct pv_addr msgbufpv;
@@ -132,11 +132,6 @@
 struct pv_addr abtstack;
 struct pv_addr kernelstack;
 
-static void *boot_arg1;
-static void *boot_arg2;
-
-static struct trapframe proc0_tf;
-
 /* Static device mappings. */
 const struct pmap_devmap at91_devmap[] = {
 	/*
@@ -155,7 +150,8 @@
 		VM_PROT_READ|VM_PROT_WRITE,
 		PTE_NOCACHE,
 	},
-	/* We can't just map the OHCI registers VA == PA, because
+	/*
+	 * We can't just map the OHCI registers VA == PA, because
 	 * AT91xx_xxx_BASE belongs to the userland address space.
 	 * We could just choose a different virtual address, but a better
 	 * solution would probably be to just use pmap_mapdev() to allocate
@@ -185,8 +181,10 @@
 		VM_PROT_READ|VM_PROT_WRITE,
 		PTE_NOCACHE,
 	},
-	/* The next two should be good for the 9260, 9261 and 9G20 since
-	 * addresses mapping is the same. */
+	/*
+	 * The next two should be good for the 9260, 9261 and 9G20 since
+	 * addresses mapping is the same.
+	 */
 	{
 		/* Internal Memory 1MB  */
 		AT91SAM9G20_OHCI_BASE,
@@ -206,12 +204,24 @@
 	{ 0, 0, 0, 0, 0, }
 };
 
+#ifdef LINUX_BOOT_ABI
+extern int membanks;
+extern int memstart[];
+extern int memsize[];
+#endif
+
 long
 at91_ramsize(void)
 {
-	uint32_t *SDRAMC = (uint32_t *)(AT91_BASE + AT91RM92_SDRAMC_BASE);
-	uint32_t cr, mr;
+	uint32_t cr, mr, *SDRAMC;
 	int banks, rows, cols, bw;
+#ifdef LINUX_BOOT_ABI
+	/*
+	 * If we found any ATAGs that were for memory, return the first bank.
+	 */
+	if (membanks > 0)
+		return (memsize[0]);
+#endif
 
 	if (at91_is_rm92()) {
 		SDRAMC = (uint32_t *)(AT91_BASE + AT91RM92_SDRAMC_BASE);
@@ -222,8 +232,10 @@
 		cols = (cr & AT91RM92_SDRAMC_CR_NC_MASK) + 8;
 		bw = (mr & AT91RM92_SDRAMC_MR_DBW_16) ? 1 : 2;
 	} else {
-		/* This should be good for the 9260, 9261 and 9G20 as addresses
-		 * and registers are the same */
+		/*
+		 * This should be good for the 9260, 9261, 9G20, 9G35 and 9X25
+		 * as addresses and registers are the same.
+		 */
 		SDRAMC = (uint32_t *)(AT91_BASE + AT91SAM9G20_SDRAMC_BASE);
 		cr = SDRAMC[AT91SAM9G20_SDRAMC_CR / 4];
 		mr = SDRAMC[AT91SAM9G20_SDRAMC_MR / 4];
@@ -236,8 +248,187 @@
 	return (1 << (cols + rows + banks + bw));
 }
 
+static const char *soc_type_name[] = {
+	[AT91_T_CAP9] = "at91cap9",
+	[AT91_T_RM9200] = "at91rm9200",
+	[AT91_T_SAM9260] = "at91sam9260",
+	[AT91_T_SAM9261] = "at91sam9261",
+	[AT91_T_SAM9263] = "at91sam9263",
+	[AT91_T_SAM9G10] = "at91sam9g10",
+	[AT91_T_SAM9G20] = "at91sam9g20",
+	[AT91_T_SAM9G45] = "at91sam9g45",
+	[AT91_T_SAM9N12] = "at91sam9n12",
+	[AT91_T_SAM9RL] = "at91sam9rl",
+	[AT91_T_SAM9X5] = "at91sam9x5",
+	[AT91_T_NONE] = "UNKNOWN"
+};
+
+static const char *soc_subtype_name[] = {
+	[AT91_ST_NONE] = "UNKNOWN",
+	[AT91_ST_RM9200_BGA] = "at91rm9200_bga",
+	[AT91_ST_RM9200_PQFP] = "at91rm9200_pqfp",
+	[AT91_ST_SAM9XE] = "at91sam9xe",
+	[AT91_ST_SAM9G45] = "at91sam9g45",
+	[AT91_ST_SAM9M10] = "at91sam9m10",
+	[AT91_ST_SAM9G46] = "at91sam9g46",
+	[AT91_ST_SAM9M11] = "at91sam9m11",
+	[AT91_ST_SAM9G15] = "at91sam9g15",
+	[AT91_ST_SAM9G25] = "at91sam9g25",
+	[AT91_ST_SAM9G35] = "at91sam9g35",
+	[AT91_ST_SAM9X25] = "at91sam9x25",
+	[AT91_ST_SAM9X35] = "at91sam9x35",
+};
+
+struct at91_soc_info soc_info;
+
+/*
+ * Read the SoC ID from the CIDR register and try to match it against the
+ * values we know.  If we find a good one, we return true.  If not, we
+ * return false.  When we find a good one, we also find the subtype
+ * and CPU family.
+ */
+static int
+at91_try_id(uint32_t dbgu_base)
+{
+	uint32_t socid;
+
+	soc_info.cidr = *(volatile uint32_t *)(AT91_BASE + dbgu_base +
+	    DBGU_C1R);
+	socid = soc_info.cidr & ~AT91_CPU_VERSION_MASK;
+
+	soc_info.type = AT91_T_NONE;
+	soc_info.subtype = AT91_ST_NONE;
+	soc_info.family = (soc_info.cidr & AT91_CPU_FAMILY_MASK) >> 20;
+	soc_info.exid = *(volatile uint32_t *)(AT91_BASE + dbgu_base +
+	    DBGU_C2R);
+
+	switch (socid) {
+	case AT91_CPU_CAP9:
+		soc_info.type = AT91_T_CAP9;
+		break;
+	case AT91_CPU_RM9200:
+		soc_info.type = AT91_T_RM9200;
+		break;
+	case AT91_CPU_SAM9XE128:
+	case AT91_CPU_SAM9XE256:
+	case AT91_CPU_SAM9XE512:
+	case AT91_CPU_SAM9260:
+		soc_info.type = AT91_T_SAM9260;
+		if (soc_info.family == AT91_FAMILY_SAM9XE)
+			soc_info.subtype = AT91_ST_SAM9XE;
+		break;
+	case AT91_CPU_SAM9261:
+		soc_info.type = AT91_T_SAM9261;
+		break;
+	case AT91_CPU_SAM9263:
+		soc_info.type = AT91_T_SAM9263;
+		break;
+	case AT91_CPU_SAM9G10:
+		soc_info.type = AT91_T_SAM9G10;
+		break;
+	case AT91_CPU_SAM9G20:
+		soc_info.type = AT91_T_SAM9G20;
+		break;
+	case AT91_CPU_SAM9G45:
+		soc_info.type = AT91_T_SAM9G45;
+		break;
+	case AT91_CPU_SAM9N12:
+		soc_info.type = AT91_T_SAM9N12;
+		break;
+	case AT91_CPU_SAM9RL64:
+		soc_info.type = AT91_T_SAM9RL;
+		break;
+	case AT91_CPU_SAM9X5:
+		soc_info.type = AT91_T_SAM9X5;
+		break;
+	default:
+		return (0);
+	}
+
+	switch (soc_info.type) {
+	case AT91_T_SAM9G45:
+		switch (soc_info.exid) {
+		case AT91_EXID_SAM9G45:
+			soc_info.subtype = AT91_ST_SAM9G45;
+			break;
+		case AT91_EXID_SAM9G46:
+			soc_info.subtype = AT91_ST_SAM9G46;
+			break;
+		case AT91_EXID_SAM9M10:
+			soc_info.subtype = AT91_ST_SAM9M10;
+			break;
+		case AT91_EXID_SAM9M11:
+			soc_info.subtype = AT91_ST_SAM9M11;
+			break;
+		}
+		break;
+	case AT91_T_SAM9X5:
+		switch (soc_info.exid) {
+		case AT91_EXID_SAM9G15:
+			soc_info.subtype = AT91_ST_SAM9G15;
+			break;
+		case AT91_EXID_SAM9G25:
+			soc_info.subtype = AT91_ST_SAM9G25;
+			break;
+		case AT91_EXID_SAM9G35:
+			soc_info.subtype = AT91_ST_SAM9G35;
+			break;
+		case AT91_EXID_SAM9X25:
+			soc_info.subtype = AT91_ST_SAM9X25;
+			break;
+		case AT91_EXID_SAM9X35:
+			soc_info.subtype = AT91_ST_SAM9X35;
+			break;
+		}
+		break;
+	default:
+		break;
+	}
+	/*
+	 * Disable interrupts in the DBGU unit...
+	 */
+	*(volatile uint32_t *)(AT91_BASE + dbgu_base + USART_IDR) = 0xffffffff;
+
+	/*
+	 * Save the name for later...
+	 */
+	snprintf(soc_info.name, sizeof(soc_info.name), "%s%s%s",
+	    soc_type_name[soc_info.type],
+	    soc_info.subtype == AT91_ST_NONE ? "" : " subtype ",
+	    soc_info.subtype == AT91_ST_NONE ? "" :
+	    soc_subtype_name[soc_info.subtype]);
+
+        /*
+         * try to get the matching CPU support.
+         */
+        soc_info.soc_data = at91_match_soc(soc_info.type, soc_info.subtype);
+        soc_info.dbgu_base = AT91_BASE + dbgu_base;
+
+	return (1);
+}
+
+static void
+at91_soc_id(void)
+{
+
+	if (!at91_try_id(AT91_DBGU0))
+		at91_try_id(AT91_DBGU1);
+}
+
+#ifdef ARM_MANY_BOARD
+/* likely belongs in arm/arm/machdep.c, but since board_init is still at91 only... */
+SET_DECLARE(arm_board_set, const struct arm_board);
+
+/* Not yet fully functional, but enough to build ATMEL config */
+static long
+board_init(void)
+{
+	return -1;
+}
+#endif
+
 void *
-initarm(void *arg, void *arg2)
+initarm(struct arm_boot_params *abp)
 {
 	struct pv_addr  kernel_l1pt;
 	struct pv_addr  dpcpu;
@@ -248,10 +439,8 @@
 	uint32_t memsize;
 	vm_offset_t lastaddr;
 
-	boot_arg1 = arg;
-	boot_arg2 = arg2;
+	lastaddr = parse_boot_param(abp);
 	set_cpufuncs();
-	lastaddr = fake_preload_metadata();
 	pcpu_init(pcpup, 0, sizeof(struct pcpu));
 	PCPU_SET(curthread, &thread0);
 
@@ -260,13 +449,13 @@
 
 	freemempos = (lastaddr + PAGE_MASK) & ~PAGE_MASK;
 	/* Define a macro to simplify memory allocation */
-#define valloc_pages(var, np)                   \
-	alloc_pages((var).pv_va, (np));         \
+#define valloc_pages(var, np)						\
+	alloc_pages((var).pv_va, (np));					\
 	(var).pv_pa = (var).pv_va + (KERNPHYSADDR - KERNVIRTADDR);
 
-#define alloc_pages(var, np)			\
-	(var) = freemempos;		\
-	freemempos += (np * PAGE_SIZE);		\
+#define alloc_pages(var, np)						\
+	(var) = freemempos;						\
+	freemempos += (np * PAGE_SIZE);					\
 	memset((char *)(var), 0, ((np) * PAGE_SIZE));
 
 	while (((freemempos - L1_TABLE_SIZE) & (L1_TABLE_SIZE - 1)) != 0)
@@ -284,7 +473,6 @@
 			    kernel_pt_table[loop].pv_va - KERNVIRTADDR +
 			    KERNPHYSADDR;
 		}
-		i++;
 	}
 	/*
 	 * Allocate a page for the system page mapped to V0x00000000
@@ -361,11 +549,15 @@
 	cpu_tlb_flushID();
 	cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2));
 
+	at91_soc_id();
+
+	/* Initialize all the clocks, so that the console can work */
+	at91_pmc_init_clock();
+
 	cninit();
 
-	/* Get chip id so device drivers know about differences */
-	at91_chip_id = *(volatile uint32_t *)
-		(AT91_BASE + AT91_DBGU_BASE + DBGU_C1R);
+	if (soc_info.soc_data == NULL)
+		printf("Warning: No soc support for %s found.\n", soc_info.name);
 
 	memsize = board_init();
 	physmem = memsize / PAGE_SIZE;
@@ -405,30 +597,13 @@
 	undefined_handler_address = (u_int)undefinedinstruction_bounce;
 	undefined_init();
 
-	proc_linkup0(&proc0, &thread0);
-	thread0.td_kstack = kernelstack.pv_va;
-	thread0.td_pcb = (struct pcb *)
-		(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
-	thread0.td_pcb->pcb_flags = 0;
-	thread0.td_frame = &proc0_tf;
-	pcpup->pc_curpcb = thread0.td_pcb;
+	init_proc0(kernelstack.pv_va);
 
 	arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
 
 	pmap_curmaxkvaddr = afterkern + L1_S_SIZE * (KERNEL_PT_KERN_NUM - 1);
-
-	/*
-	 * ARM_USE_SMALL_ALLOC uses dump_avail, so it must be filled before
-	 * calling pmap_bootstrap.
-	 */
-	dump_avail[0] = PHYSADDR;
-	dump_avail[1] = PHYSADDR + memsize;
-	dump_avail[2] = 0;
-	dump_avail[3] = 0;
-
-	pmap_bootstrap(freemempos,
-	    KERNVIRTADDR + 3 * memsize,
-	    &kernel_l1pt);
+	arm_dump_avail_init(memsize, sizeof(dump_avail)/sizeof(dump_avail[0]));
+	pmap_bootstrap(freemempos, KERNVIRTADDR + 3 * memsize, &kernel_l1pt);
 	msgbufp = (void*)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);
 	mutex_init();
@@ -447,3 +622,42 @@
 	return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -
 	    sizeof(struct pcb)));
 }
+
+/*
+ * These functions are handled elsewhere, so make them nops here.
+ */
+void
+cpu_startprofclock(void)
+{
+
+}
+
+void
+cpu_stopprofclock(void)
+{
+
+}
+
+void
+cpu_initclocks(void)
+{
+
+}
+
+void
+DELAY(int n)
+{
+
+	if (soc_info.soc_data)
+		soc_info.soc_data->soc_delay(n);
+}
+
+void
+cpu_reset(void)
+{
+
+	if (soc_info.soc_data)
+		soc_info.soc_data->soc_reset();
+	while (1)
+		continue;
+}
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_mci.c
--- a/head/sys/arm/at91/at91_mci.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_mci.c	Wed Jul 25 17:18:25 2012 +0300
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/at91/at91_mci.c 225882 2011-09-30 04:55:23Z kevlo $");
+__FBSDID("$FreeBSD: head/sys/arm/at91/at91_mci.c 238376 2012-07-11 20:17:14Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -113,6 +113,7 @@
 /* helper routines */
 static int at91_mci_activate(device_t dev);
 static void at91_mci_deactivate(device_t dev);
+static int at91_mci_is_mci1rev2xx(void);
 
 #define AT91_MCI_LOCK(_sc)		mtx_lock(&(_sc)->sc_mtx)
 #define	AT91_MCI_UNLOCK(_sc)		mtx_unlock(&(_sc)->sc_mtx)
@@ -141,16 +142,21 @@
 at91_mci_init(device_t dev)
 {
 	struct at91_mci_softc *sc = device_get_softc(dev);
+	uint32_t val;
 
 	WR4(sc, MCI_CR, MCI_CR_MCIEN);		/* Enable controller */
 	WR4(sc, MCI_IDR, 0xffffffff);		/* Turn off interrupts */
 	WR4(sc, MCI_DTOR, MCI_DTOR_DTOMUL_1M | 1);
-	WR4(sc, MCI_MR, 0x834a);	// XXX GROSS HACK FROM LINUX
+	val = MCI_MR_PDCMODE;
+	val |= 0x34a;				/* PWSDIV = 3; CLKDIV = 74 */
+	if (at91_mci_is_mci1rev2xx())
+		val |= MCI_MR_RDPROOF | MCI_MR_WRPROOF;
+	WR4(sc, MCI_MR, val);
 #ifndef  AT91_MCI_SLOT_B
 	WR4(sc, MCI_SDCR, 0);			/* SLOT A, 1 bit bus */
 #else
-	/* XXX Really should add second "unit" but nobody using using 
-	 * a two slot card that we know of. XXX */
+	/* XXX Really should add second "unit" but nobody using using
+	 * a two slot card that we know of. -- except they are... XXX */
 	WR4(sc, MCI_SDCR, 1);			/* SLOT B, 1 bit bus */
 #endif
 }
@@ -303,6 +309,23 @@
 	return;
 }
 
+static int
+at91_mci_is_mci1rev2xx(void)
+{
+
+	switch (soc_info.type) {
+	case AT91_T_SAM9260:
+	case AT91_T_SAM9263:
+	case AT91_T_CAP9:
+	case AT91_T_SAM9G10:
+	case AT91_T_SAM9G20:
+	case AT91_T_SAM9RL:
+		return(1);
+	default:
+		return (0);
+	}
+}
+
 static void
 at91_mci_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error)
 {
@@ -346,6 +369,7 @@
 static void
 at91_mci_start_cmd(struct at91_mci_softc *sc, struct mmc_command *cmd)
 {
+	size_t len;
 	uint32_t cmdr, ier = 0, mr;
 	uint32_t *src, *dst;
 	int i;
@@ -397,6 +421,7 @@
 	WR4(sc, MCI_MR, mr | (data->len << 16) | MCI_MR_PDCMODE);
 	WR4(sc, PDC_PTCR, PDC_PTCR_RXTDIS | PDC_PTCR_TXTDIS);
 	if (cmdr & MCI_CMDR_TRCMD_START) {
+		len = data->len;
 		if (cmdr & MCI_CMDR_TRDIR)
 			vaddr = cmd->data->data;
 		else {
@@ -411,6 +436,15 @@
 			vaddr = sc->bounce_buffer;
 			src = (uint32_t *)cmd->data->data;
 			dst = (uint32_t *)vaddr;
+			/*
+			 * If this is MCI1 revision 2xx controller, apply
+			 * a work-around for the "Data Write Operation and
+			 * number of bytes" erratum.
+			 */
+			if (at91_mci_is_mci1rev2xx() && data->len < 12) {
+				len = 12;
+				memset(dst, 0, 12);
+			}
 			if (sc->sc_cap & CAP_NEEDS_BYTESWAP) {
 				for (i = 0; i < data->len / 4; i++)
 					dst[i] = bswap32(src[i]);
@@ -418,7 +452,7 @@
 				memcpy(dst, src, data->len);
 		}
 		data->xfer_len = 0;
-		if (bus_dmamap_load(sc->dmatag, sc->map, vaddr, data->len,
+		if (bus_dmamap_load(sc->dmatag, sc->map, vaddr, len,
 		    at91_mci_getaddr, &paddr, 0) != 0) {
 			cmd->error = MMC_ERR_NO_MEMORY;
 			sc->req = NULL;
@@ -430,12 +464,12 @@
 		if (cmdr & MCI_CMDR_TRDIR) {
 			bus_dmamap_sync(sc->dmatag, sc->map, BUS_DMASYNC_PREREAD);
 			WR4(sc, PDC_RPR, paddr);
-			WR4(sc, PDC_RCR, data->len / 4);
+			WR4(sc, PDC_RCR, len / 4);
 			ier = MCI_SR_ENDRX;
 		} else {
 			bus_dmamap_sync(sc->dmatag, sc->map, BUS_DMASYNC_PREWRITE);
 			WR4(sc, PDC_TPR, paddr);
-			WR4(sc, PDC_TCR, data->len / 4);
+			WR4(sc, PDC_TCR, len / 4);
 			ier = MCI_SR_TXBUFE;
 		}
 	}
@@ -769,7 +803,7 @@
 	DEVMETHOD(mmcbr_acquire_host, at91_mci_acquire_host),
 	DEVMETHOD(mmcbr_release_host, at91_mci_release_host),
 
-	{0, 0},
+	DEVMETHOD_END
 };
 
 static driver_t at91_mci_driver = {
@@ -777,7 +811,8 @@
 	at91_mci_methods,
 	sizeof(struct at91_mci_softc),
 };
+
 static devclass_t at91_mci_devclass;
 
-
-DRIVER_MODULE(at91_mci, atmelarm, at91_mci_driver, at91_mci_devclass, 0, 0);
+DRIVER_MODULE(at91_mci, atmelarm, at91_mci_driver, at91_mci_devclass, NULL,
+    NULL);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_mcireg.h
--- a/head/sys/arm/at91/at91_mcireg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_mcireg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  */
 
-/* $FreeBSD$ */
+/* $FreeBSD: head/sys/arm/at91/at91_mcireg.h 234560 2012-04-22 00:43:32Z marius $ */
 
 #ifndef ARM_AT91_AT91_MCIREG_H
 #define ARM_AT91_AT91_MCIREG_H
@@ -54,6 +54,9 @@
 /* -------- MCI_MR : (MCI Offset: 0x4) MCI Mode Register --------  */
 #define	MCI_MR_CLKDIV      (0xffu <<  0) /* (MCI) Clock Divider */
 #define	MCI_MR_PWSDIV      (0x3fu <<  8) /* (MCI) Power Saving Divider */
+#define	MCI_MR_RDPROOF	(0x1u << 11)	/* (MCI) Read Proof Enable */
+#define	MCI_MR_WRPROOF	(0x1u << 12)	/* (MCI) Write Proof Enable */
+#define	MCI_MR_PDCFBYTE	(0x1u << 13)	/* (MCI) PDC Force Byte Transfer */
 #define	MCI_MR_PDCPADV     (0x1u << 14) /* (MCI) PDC Padding Value */
 #define	MCI_MR_PDCMODE     (0x1u << 15) /* (MCI) PDC Oriented Mode */
 #define	MCI_MR_BLKLEN      0x3fff0000ul /* (MCI) Data Block Length */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_pio.c
--- a/head/sys/arm/at91/at91_pio.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_pio.c	Wed Jul 25 17:18:25 2012 +0300
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/at91/at91_pio.c 234281 2012-04-14 11:29:32Z marius $");
+__FBSDID("$FreeBSD: head/sys/arm/at91/at91_pio.c 237151 2012-06-16 04:34:46Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -143,9 +143,10 @@
 	if (err)
 		goto out;
 
-	device_printf(dev, "ABSR: %#x OSR: %#x PSR:%#x ODSR: %#x\n",
-	    RD4(sc, PIO_ABSR), RD4(sc, PIO_OSR), RD4(sc, PIO_PSR),
-	    RD4(sc, PIO_ODSR));
+        if (bootverbose)
+		device_printf(dev, "ABSR: %#x OSR: %#x PSR:%#x ODSR: %#x\n",
+		    RD4(sc, PIO_ABSR), RD4(sc, PIO_OSR), RD4(sc, PIO_PSR),
+		    RD4(sc, PIO_ODSR));
 	AT91_PIO_LOCK_INIT(sc);
 
 	/*
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_pio_rm9200.h
--- a/head/sys/arm/at91/at91_pio_rm9200.h	Wed Jul 25 17:14:19 2012 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-/* $FreeBSD$ */
-
-#ifndef  ARM_AT91_AT91_PIO_RM9200_H
-#define  ARM_AT91_AT91_PIO_RM9200_H
-
-#include <arm/at91/at91_pioreg.h>
-/*
- * These defines come from an atmel file that says specifically that it
- * has no copyright.
- */
-
-//*****************************************************************************
-//               PIO DEFINITIONS FOR AT91RM9200
-//*****************************************************************************
-#define	AT91C_PA0_MISO     (AT91C_PIO_PA0) //  SPI Master In Slave
-#define	AT91C_PA0_PCK3     (AT91C_PIO_PA0) //  PMC Programmable Clock Output 3
-#define	AT91C_PA1_MOSI     (AT91C_PIO_PA1) //  SPI Master Out Slave
-#define	AT91C_PA1_PCK0     (AT91C_PIO_PA1) //  PMC Programmable Clock Output 0
-#define	AT91C_PA10_ETX1     (AT91C_PIO_PA10) //  Ethernet MAC Transmit Data 1
-#define	AT91C_PA10_MCDB1    (AT91C_PIO_PA10) //  Multimedia Card B Data 1
-#define	AT91C_PA11_ECRS_ECRSDV (AT91C_PIO_PA11) //  Ethernet MAC Carrier Sense/Carrier Sense and Data Valid
-#define	AT91C_PA11_MCDB2    (AT91C_PIO_PA11) //  Multimedia Card B Data 2
-#define	AT91C_PA12_ERX0     (AT91C_PIO_PA12) //  Ethernet MAC Receive Data 0
-#define	AT91C_PA12_MCDB3    (AT91C_PIO_PA12) //  Multimedia Card B Data 3
-#define	AT91C_PA13_ERX1     (AT91C_PIO_PA13) //  Ethernet MAC Receive Data 1
-#define	AT91C_PA13_TCLK0    (AT91C_PIO_PA13) //  Timer Counter 0 external clock input
-#define	AT91C_PA14_ERXER    (AT91C_PIO_PA14) //  Ethernet MAC Receive Error
-#define	AT91C_PA14_TCLK1    (AT91C_PIO_PA14) //  Timer Counter 1 external clock input
-#define	AT91C_PA15_EMDC     (AT91C_PIO_PA15) //  Ethernet MAC Management Data Clock
-#define	AT91C_PA15_TCLK2    (AT91C_PIO_PA15) //  Timer Counter 2 external clock input
-#define	AT91C_PA16_EMDIO    (AT91C_PIO_PA16) //  Ethernet MAC Management Data Input/Output
-#define	AT91C_PA16_IRQ6     (AT91C_PIO_PA16) //  AIC Interrupt input 6
-#define	AT91C_PA17_TXD0     (AT91C_PIO_PA17) //  USART 0 Transmit Data
-#define	AT91C_PA17_TIOA0    (AT91C_PIO_PA17) //  Timer Counter 0 Multipurpose Timer I/O Pin A
-#define	AT91C_PA18_RXD0     (AT91C_PIO_PA18) //  USART 0 Receive Data
-#define	AT91C_PA18_TIOB0    (AT91C_PIO_PA18) //  Timer Counter 0 Multipurpose Timer I/O Pin B
-#define	AT91C_PA19_SCK0     (AT91C_PIO_PA19) //  USART 0 Serial Clock
-#define	AT91C_PA19_TIOA1    (AT91C_PIO_PA19) //  Timer Counter 1 Multipurpose Timer I/O Pin A
-#define	AT91C_PA2_SPCK     (AT91C_PIO_PA2) //  SPI Serial Clock
-#define	AT91C_PA2_IRQ4     (AT91C_PIO_PA2) //  AIC Interrupt Input 4
-#define	AT91C_PA20_CTS0     (AT91C_PIO_PA20) //  USART 0 Clear To Send
-#define	AT91C_PA20_TIOB1    (AT91C_PIO_PA20) //  Timer Counter 1 Multipurpose Timer I/O Pin B
-#define	AT91C_PA21_RTS0     (AT91C_PIO_PA21) //  Usart 0 Ready To Send
-#define	AT91C_PA21_TIOA2    (AT91C_PIO_PA21) //  Timer Counter 2 Multipurpose Timer I/O Pin A
-#define	AT91C_PA22_RXD2     (AT91C_PIO_PA22) //  USART 2 Receive Data
-#define	AT91C_PA22_TIOB2    (AT91C_PIO_PA22) //  Timer Counter 2 Multipurpose Timer I/O Pin B
-#define	AT91C_PA23_TXD2     (AT91C_PIO_PA23) //  USART 2 Transmit Data
-#define	AT91C_PA23_IRQ3     (AT91C_PIO_PA23) //  Interrupt input 3
-#define	AT91C_PA24_SCK2     (AT91C_PIO_PA24) //  USART2 Serial Clock
-#define	AT91C_PA24_PCK1     (AT91C_PIO_PA24) //  PMC Programmable Clock Output 1
-#define	AT91C_PA25_TWD      (AT91C_PIO_PA25) //  TWI Two-wire Serial Data
-#define	AT91C_PA25_IRQ2     (AT91C_PIO_PA25) //  Interrupt input 2
-#define	AT91C_PA26_TWCK     (AT91C_PIO_PA26) //  TWI Two-wire Serial Clock
-#define	AT91C_PA26_IRQ1     (AT91C_PIO_PA26) //  Interrupt input 1
-#define	AT91C_PA27_MCCK     (AT91C_PIO_PA27) //  Multimedia Card Clock
-#define	AT91C_PA27_TCLK3    (AT91C_PIO_PA27) //  Timer Counter 3 External Clock Input
-#define	AT91C_PA28_MCCDA    (AT91C_PIO_PA28) //  Multimedia Card A Command
-#define	AT91C_PA28_TCLK4    (AT91C_PIO_PA28) //  Timer Counter 4 external Clock Input
-#define	AT91C_PA29_MCDA0    (AT91C_PIO_PA29) //  Multimedia Card A Data 0
-#define	AT91C_PA29_TCLK5    (AT91C_PIO_PA29) //  Timer Counter 5 external clock input
-#define	AT91C_PA3_NPCS0    (AT91C_PIO_PA3) //  SPI Peripheral Chip Select 0
-#define	AT91C_PA3_IRQ5     (AT91C_PIO_PA3) //  AIC Interrupt Input 5
-#define	AT91C_PA30_DRXD     (AT91C_PIO_PA30) //  DBGU Debug Receive Data
-#define	AT91C_PA30_CTS2     (AT91C_PIO_PA30) //  Usart 2 Clear To Send
-#define	AT91C_PA31_DTXD     (AT91C_PIO_PA31) //  DBGU Debug Transmit Data
-#define	AT91C_PA31_RTS2     (AT91C_PIO_PA31) //  USART 2 Ready To Send
-#define	AT91C_PA4_NPCS1    (AT91C_PIO_PA4) //  SPI Peripheral Chip Select 1
-#define	AT91C_PA4_PCK1     (AT91C_PIO_PA4) //  PMC Programmable Clock Output 1
-#define	AT91C_PA5_NPCS2    (AT91C_PIO_PA5) //  SPI Peripheral Chip Select 2
-#define	AT91C_PA5_TXD3     (AT91C_PIO_PA5) //  USART 3 Transmit Data
-#define	AT91C_PA6_NPCS3    (AT91C_PIO_PA6) //  SPI Peripheral Chip Select 3
-#define	AT91C_PA6_RXD3     (AT91C_PIO_PA6) //  USART 3 Receive Data
-#define	AT91C_PA7_ETXCK_EREFCK (AT91C_PIO_PA7) //  Ethernet MAC Transmit Clock/Reference Clock
-#define	AT91C_PA7_PCK2     (AT91C_PIO_PA7) //  PMC Programmable Clock 2
-#define	AT91C_PA8_ETXEN    (AT91C_PIO_PA8) //  Ethernet MAC Transmit Enable
-#define	AT91C_PA8_MCCDB    (AT91C_PIO_PA8) //  Multimedia Card B Command
-#define	AT91C_PA9_ETX0     (AT91C_PIO_PA9) //  Ethernet MAC Transmit Data 0
-#define	AT91C_PA9_MCDB0    (AT91C_PIO_PA9) //  Multimedia Card B Data 0
-#define	AT91C_PB0_TF0      (AT91C_PIO_PB0) //  SSC Transmit Frame Sync 0
-#define	AT91C_PB0_TIOB3    (AT91C_PIO_PB0) //  Timer Counter 3 Multipurpose Timer I/O Pin B
-#define	AT91C_PB1_TK0      (AT91C_PIO_PB1) //  SSC Transmit Clock 0
-#define	AT91C_PB1_CTS3     (AT91C_PIO_PB1) //  USART 3 Clear To Send
-#define	AT91C_PB10_RK1      (AT91C_PIO_PB10) //  SSC Receive Clock 1
-#define	AT91C_PB10_TIOA5    (AT91C_PIO_PB10) //  Timer Counter 5 Multipurpose Timer I/O Pin A
-#define	AT91C_PB11_RF1      (AT91C_PIO_PB11) //  SSC Receive Frame Sync 1
-#define	AT91C_PB11_TIOB5    (AT91C_PIO_PB11) //  Timer Counter 5 Multipurpose Timer I/O Pin B
-#define	AT91C_PB12_TF2      (AT91C_PIO_PB12) //  SSC Transmit Frame Sync 2
-#define	AT91C_PB12_ETX2     (AT91C_PIO_PB12) //  Ethernet MAC Transmit Data 2
-#define	AT91C_PB13_TK2      (AT91C_PIO_PB13) //  SSC Transmit Clock 2
-#define	AT91C_PB13_ETX3     (AT91C_PIO_PB13) //  Ethernet MAC Transmit Data 3
-#define	AT91C_PB14_TD2      (AT91C_PIO_PB14) //  SSC Transmit Data 2
-#define	AT91C_PB14_ETXER    (AT91C_PIO_PB14) //  Ethernet MAC Transmikt Coding Error
-#define	AT91C_PB15_RD2      (AT91C_PIO_PB15) //  SSC Receive Data 2
-#define	AT91C_PB15_ERX2     (AT91C_PIO_PB15) //  Ethernet MAC Receive Data 2
-#define	AT91C_PB16_RK2      (AT91C_PIO_PB16) //  SSC Receive Clock 2
-#define	AT91C_PB16_ERX3     (AT91C_PIO_PB16) //  Ethernet MAC Receive Data 3
-#define	AT91C_PB17_RF2      (AT91C_PIO_PB17) //  SSC Receive Frame Sync 2
-#define	AT91C_PB17_ERXDV    (AT91C_PIO_PB17) //  Ethernet MAC Receive Data Valid
-#define	AT91C_PB18_RI1      (AT91C_PIO_PB18) //  USART 1 Ring Indicator
-#define	AT91C_PB18_ECOL     (AT91C_PIO_PB18) //  Ethernet MAC Collision Detected
-#define	AT91C_PB19_DTR1     (AT91C_PIO_PB19) //  USART 1 Data Terminal ready
-#define	AT91C_PB19_ERXCK    (AT91C_PIO_PB19) //  Ethernet MAC Receive Clock
-#define	AT91C_PB2_TD0      (AT91C_PIO_PB2) //  SSC Transmit data
-#define	AT91C_PB2_SCK3     (AT91C_PIO_PB2) //  USART 3 Serial Clock
-#define	AT91C_PB20_TXD1     (AT91C_PIO_PB20) //  USART 1 Transmit Data
-#define	AT91C_PB21_RXD1     (AT91C_PIO_PB21) //  USART 1 Receive Data
-#define	AT91C_PB22_SCK1     (AT91C_PIO_PB22) //  USART1 Serial Clock
-#define	AT91C_PB23_DCD1     (AT91C_PIO_PB23) //  USART 1 Data Carrier Detect
-#define	AT91C_PB24_CTS1     (AT91C_PIO_PB24) //  USART 1 Clear To Send
-#define	AT91C_PB25_DSR1     (AT91C_PIO_PB25) //  USART 1 Data Set ready
-#define	AT91C_PB25_EF100    (AT91C_PIO_PB25) //  Ethernet MAC Force 100 Mbits/sec
-#define	AT91C_PB26_RTS1     (AT91C_PIO_PB26) //  Usart 0 Ready To Send
-#define	AT91C_PB27_PCK0     (AT91C_PIO_PB27) //  PMC Programmable Clock Output 0
-#define	AT91C_PB28_FIQ      (AT91C_PIO_PB28) //  AIC Fast Interrupt Input
-#define	AT91C_PB29_IRQ0     (AT91C_PIO_PB29) //  Interrupt input 0
-#define	AT91C_PB3_RD0      (AT91C_PIO_PB3) //  SSC Receive Data
-#define	AT91C_PB3_MCDA1    (AT91C_PIO_PB3) //  Multimedia Card A Data 1
-#define	AT91C_PB4_RK0      (AT91C_PIO_PB4) //  SSC Receive Clock
-#define	AT91C_PB4_MCDA2    (AT91C_PIO_PB4) //  Multimedia Card A Data 2
-#define	AT91C_PB5_RF0      (AT91C_PIO_PB5) //  SSC Receive Frame Sync 0
-#define	AT91C_PB5_MCDA3    (AT91C_PIO_PB5) //  Multimedia Card A Data 3
-#define	AT91C_PB6_TF1      (AT91C_PIO_PB6) //  SSC Transmit Frame Sync 1
-#define	AT91C_PB6_TIOA3    (AT91C_PIO_PB6) //  Timer Counter 4 Multipurpose Timer I/O Pin A
-#define	AT91C_PB7_TK1      (AT91C_PIO_PB7) //  SSC Transmit Clock 1
-#define	AT91C_PB7_TIOB3    (AT91C_PIO_PB7) //  Timer Counter 3 Multipurpose Timer I/O Pin B
-#define	AT91C_PB8_TD1      (AT91C_PIO_PB8) //  SSC Transmit Data 1
-#define	AT91C_PB8_TIOA4    (AT91C_PIO_PB8) //  Timer Counter 4 Multipurpose Timer I/O Pin A
-#define	AT91C_PB9_RD1      (AT91C_PIO_PB9) //  SSC Receive Data 1
-#define	AT91C_PB9_TIOB4    (AT91C_PIO_PB9) //  Timer Counter 4 Multipurpose Timer I/O Pin B
-#define	AT91C_PC0_BFCK     (AT91C_PIO_PC0) //  Burst Flash Clock
-#define	AT91C_PC1_BFRDY_SMOE (AT91C_PIO_PC1) //  Burst Flash Ready
-#define	AT91C_PC10_NCS4_CFCS (AT91C_PIO_PC10) //  Compact Flash Chip Select
-#define	AT91C_PC11_NCS5_CFCE1 (AT91C_PIO_PC11) //  Chip Select 5 / Compact Flash Chip Enable 1
-#define	AT91C_PC12_NCS6_CFCE2 (AT91C_PIO_PC12) //  Chip Select 6 / Compact Flash Chip Enable 2
-#define	AT91C_PC13_NCS7     (AT91C_PIO_PC13) //  Chip Select 7
-#define	AT91C_PC16_D16      (AT91C_PIO_PC16) //  Data Bus [16]
-#define	AT91C_PC17_D17      (AT91C_PIO_PC17) //  Data Bus [17]
-#define	AT91C_PC18_D18      (AT91C_PIO_PC18) //  Data Bus [18]
-#define	AT91C_PC19_D19      (AT91C_PIO_PC19) //  Data Bus [19]
-#define	AT91C_PC2_BFAVD    (AT91C_PIO_PC2)u //  Burst Flash Address Valid
-#define	AT91C_PC20_D20      (AT91C_PIO_PC20) //  Data Bus [20]
-#define	AT91C_PC21_D21      (AT91C_PIO_PC21) //  Data Bus [21]
-#define	AT91C_PC22_D22      (AT91C_PIO_PC22) //  Data Bus [22]
-#define	AT91C_PC23_D23      (AT91C_PIO_PC23) //  Data Bus [23]
-#define	AT91C_PC24_D24      (AT91C_PIO_PC24) //  Data Bus [24]
-#define	AT91C_PC25_D25      (AT91C_PIO_PC25) //  Data Bus [25]
-#define	AT91C_PC26_D26      (AT91C_PIO_PC26) //  Data Bus [26]
-#define	AT91C_PC27_D27      (AT91C_PIO_PC27) //  Data Bus [27]
-#define	AT91C_PC28_D28      (AT91C_PIO_PC28) //  Data Bus [28]
-#define	AT91C_PC29_D29      (AT91C_PIO_PC29) //  Data Bus [29]
-#define	AT91C_PC3_BFBAA_SMWE (AT91C_PIO_PC3) //  Burst Flash Address Advance / SmartMedia Write Enable
-#define	AT91C_PC30_D30      (AT91C_PIO_PC30) //  Data Bus [30]
-#define	AT91C_PC31_D31      (AT91C_PIO_PC31) //  Data Bus [31]
-#define	AT91C_PC4_BFOE     (AT91C_PIO_PC4) //  Burst Flash Output Enable
-#define	AT91C_PC5_BFWE     (AT91C_PIO_PC5) //  Burst Flash Write Enable
-#define	AT91C_PC6_NWAIT    (AT91C_PIO_PC6) //  NWAIT
-#define	AT91C_PC7_A23      (AT91C_PIO_PC7) //  Address Bus[23]
-#define	AT91C_PC8_A24      (AT91C_PIO_PC8) //  Address Bus[24]
-#define	AT91C_PC9_A25_CFRNW (AT91C_PIO_PC9) //  Address Bus[25] /  Compact Flash Read Not Write
-#define	AT91C_PD0_ETX0     (AT91C_PIO_PD0) //  Ethernet MAC Transmit Data 0
-#define	AT91C_PD1_ETX1     (AT91C_PIO_PD1) //  Ethernet MAC Transmit Data 1
-#define	AT91C_PD10_PCK3     (AT91C_PIO_PD10) //  PMC Programmable Clock Output 3
-#define	AT91C_PD10_TPS1     (AT91C_PIO_PD10) //  ETM ARM9 pipeline status 1
-#define	AT91C_PD11_         (AT91C_PIO_PD11) //  
-#define	AT91C_PD11_TPS2     (AT91C_PIO_PD11) //  ETM ARM9 pipeline status 2
-#define	AT91C_PD12_         (AT91C_PIO_PD12) //  
-#define	AT91C_PD12_TPK0     (AT91C_PIO_PD12) //  ETM Trace Packet 0
-#define	AT91C_PD13_         (AT91C_PIO_PD13) //  
-#define	AT91C_PD13_TPK1     (AT91C_PIO_PD13) //  ETM Trace Packet 1
-#define	AT91C_PD14_         (AT91C_PIO_PD14) //  
-#define	AT91C_PD14_TPK2     (AT91C_PIO_PD14) //  ETM Trace Packet 2
-#define	AT91C_PD15_TD0      (AT91C_PIO_PD15) //  SSC Transmit data
-#define	AT91C_PD15_TPK3     (AT91C_PIO_PD15) //  ETM Trace Packet 3
-#define	AT91C_PD16_TD1      (AT91C_PIO_PD16) //  SSC Transmit Data 1
-#define	AT91C_PD16_TPK4     (AT91C_PIO_PD16) //  ETM Trace Packet 4
-#define	AT91C_PD17_TD2      (AT91C_PIO_PD17) //  SSC Transmit Data 2
-#define	AT91C_PD17_TPK5     (AT91C_PIO_PD17) //  ETM Trace Packet 5
-#define	AT91C_PD18_NPCS1    (AT91C_PIO_PD18) //  SPI Peripheral Chip Select 1
-#define	AT91C_PD18_TPK6     (AT91C_PIO_PD18) //  ETM Trace Packet 6
-#define	AT91C_PD19_NPCS2    (AT91C_PIO_PD19) //  SPI Peripheral Chip Select 2
-#define	AT91C_PD19_TPK7     (AT91C_PIO_PD19) //  ETM Trace Packet 7
-#define	AT91C_PD2_ETX2     (AT91C_PIO_PD2) //  Ethernet MAC Transmit Data 2
-#define	AT91C_PD20_NPCS3    (AT91C_PIO_PD20) //  SPI Peripheral Chip Select 3
-#define	AT91C_PD20_TPK8     (AT91C_PIO_PD20) //  ETM Trace Packet 8
-#define	AT91C_PD21_RTS0     (AT91C_PIO_PD21) //  Usart 0 Ready To Send
-#define	AT91C_PD21_TPK9     (AT91C_PIO_PD21) //  ETM Trace Packet 9
-#define	AT91C_PD22_RTS1     (AT91C_PIO_PD22) //  Usart 0 Ready To Send
-#define	AT91C_PD22_TPK10    (AT91C_PIO_PD22) //  ETM Trace Packet 10
-#define	AT91C_PD23_RTS2     (AT91C_PIO_PD23) //  USART 2 Ready To Send
-#define	AT91C_PD23_TPK11    (AT91C_PIO_PD23) //  ETM Trace Packet 11
-#define	AT91C_PD24_RTS3     (AT91C_PIO_PD24) //  USART 3 Ready To Send
-#define	AT91C_PD24_TPK12    (AT91C_PIO_PD24) //  ETM Trace Packet 12
-#define	AT91C_PD25_DTR1     (AT91C_PIO_PD25) //  USART 1 Data Terminal ready
-#define	AT91C_PD25_TPK13    (AT91C_PIO_PD25) //  ETM Trace Packet 13
-#define	AT91C_PD26_TPK14    (AT91C_PIO_PD26) //  ETM Trace Packet 14
-#define	AT91C_PD27_TPK15    (AT91C_PIO_PD27) //  ETM Trace Packet 15
-#define	AT91C_PD3_ETX3     (AT91C_PIO_PD3) //  Ethernet MAC Transmit Data 3
-#define	AT91C_PD4_ETXEN    (AT91C_PIO_PD4) //  Ethernet MAC Transmit Enable
-#define	AT91C_PD5_ETXER    (AT91C_PIO_PD5) //  Ethernet MAC Transmikt Coding Error
-#define	AT91C_PD6_DTXD     (AT91C_PIO_PD6) //  DBGU Debug Transmit Data
-#define	AT91C_PD7_PCK0     (AT91C_PIO_PD7) //  PMC Programmable Clock Output 0
-#define	AT91C_PD7_TSYNC    (AT91C_PIO_PD7) //  ETM Synchronization signal
-#define	AT91C_PD8_PCK1     (AT91C_PIO_PD8) //  PMC Programmable Clock Output 1
-#define	AT91C_PD8_TCLK     (AT91C_PIO_PD8) //  ETM Trace Clock signal
-#define	AT91C_PD9_PCK2     (AT91C_PIO_PD9) //  PMC Programmable Clock 2
-#define	AT91C_PD9_TPS0     (AT91C_PIO_PD9) //  ETM ARM9 pipeline status 0
-
-#endif /* ARM_AT91_AT91_PIO_RM9200_H */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_pioreg.h
--- a/head/sys/arm/at91/at91_pioreg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_pioreg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -23,11 +23,12 @@
  * SUCH DAMAGE.
  */
 
-/* $FreeBSD$ */
+/* $FreeBSD: head/sys/arm/at91/at91_pioreg.h 235271 2012-05-11 14:40:25Z imp $ */
 
 #ifndef ARM_AT91_AT91_PIOREG_H
 #define ARM_AT91_AT91_PIOREG_H
 
+#ifndef ATMEL_ENV
 /* Registers */
 #define PIO_PER		0x00		/* PIO Enable Register */
 #define PIO_PDR		0x04		/* PIO Disable Register */
@@ -65,6 +66,7 @@
 #define PIO_OWDR	0xa4		/* PIO Output Write Disable Register */
 #define PIO_OWSR	0xa8		/* PIO Output Write Status Register */
 		/*	0xac		   reserved */
+#endif
 
 #define AT91C_PIO_PA0        ((unsigned int) 1 <<  0) // Pin Controlled by PA0
 #define AT91C_PIO_PA1        ((unsigned int) 1 <<  1) // Pin Controlled by PA1
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_pit.c
--- a/head/sys/arm/at91/at91_pit.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_pit.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/at91/at91_pit.c 234291 2012-04-14 17:09:38Z marius $");
+__FBSDID("$FreeBSD: head/sys/arm/at91/at91_pit.c 238370 2012-07-11 17:11:54Z imp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -48,6 +48,10 @@
 #include <arm/at91/at91var.h>
 #include <arm/at91/at91_pitreg.h>
 
+#ifndef PIT_PRESCALE
+#define PIT_PRESCALE (16)
+#endif
+
 static struct pit_softc {
 	struct resource	*mem_res;	/* Memory resource */
 	void		*intrhand;	/* Interrupt handle */
@@ -55,6 +59,8 @@
 } *sc;
 
 static uint32_t timecount = 0;
+static unsigned at91_pit_get_timecount(struct timecounter *tc);
+static int pit_intr(void *arg);
 
 static inline uint32_t
 RD4(struct pit_softc *sc, bus_size_t off)
@@ -70,15 +76,31 @@
 	bus_write_4(sc->mem_res, off, val);
 }
 
-static unsigned at91pit_get_timecount(struct timecounter *tc);
-static int pit_intr(void *arg);
+void
+at91_pit_delay(int us)
+{
+	int32_t cnt, last, piv;
+	uint64_t pit_freq;
+	const uint64_t mhz  = 1E6;
 
-#ifndef PIT_PRESCALE
-#define PIT_PRESCALE (16)
-#endif
+	last = PIT_PIV(RD4(sc, PIT_PIIR));
 
-static struct timecounter at91pit_timecounter = {
-	at91pit_get_timecount, /* get_timecount */
+	/* Max delay ~= 260s. @ 133Mhz */
+	pit_freq = at91_master_clock / PIT_PRESCALE;
+	cnt  = ((pit_freq * us) + (mhz -1)) / mhz;
+	cnt  = (cnt <= 0) ? 1 : cnt;
+
+	while (cnt > 0) {
+		piv = PIT_PIV(RD4(sc, PIT_PIIR));
+			cnt  -= piv - last ;
+		if (piv < last)
+			cnt -= PIT_PIV(~0u) - last;
+		last = piv;
+	}
+}
+
+static struct timecounter at91_pit_timecounter = {
+	at91_pit_get_timecount, /* get_timecount */
 	NULL, /* no poll_pps */
 	0xffffffff, /* counter mask */
 	0 / PIT_PRESCALE, /* frequency */
@@ -87,18 +109,15 @@
 };
 
 static int
-at91pit_probe(device_t dev)
+at91_pit_probe(device_t dev)
 {
 
-	if (at91_is_sam9() || at91_is_sam9xe()) {
-		device_set_desc(dev, "AT91SAM9 PIT");
-		return (0);
-	}
-	return (ENXIO);
+	device_set_desc(dev, "AT91SAM9 PIT");
+        return (0);
 }
 
 static int
-at91pit_attach(device_t dev)
+at91_pit_attach(device_t dev)
 {
 	void *ih;
 	int rid, err = 0;
@@ -129,8 +148,8 @@
 	err = bus_setup_intr(dev, irq, INTR_TYPE_CLK, pit_intr, NULL, NULL,
 	    &ih);
 
-	at91pit_timecounter.tc_frequency =  at91_master_clock / PIT_PRESCALE;
-	tc_init(&at91pit_timecounter);
+	at91_pit_timecounter.tc_frequency =  at91_master_clock / PIT_PRESCALE;
+	tc_init(&at91_pit_timecounter);
 
 	/* Enable the PIT here. */
 	WR4(sc, PIT_MR, PIT_PIV(at91_master_clock / PIT_PRESCALE / hz) |
@@ -139,21 +158,21 @@
 	return (err);
 }
 
-static device_method_t at91pit_methods[] = {
-	DEVMETHOD(device_probe, at91pit_probe),
-	DEVMETHOD(device_attach, at91pit_attach),
+static device_method_t at91_pit_methods[] = {
+	DEVMETHOD(device_probe, at91_pit_probe),
+	DEVMETHOD(device_attach, at91_pit_attach),
 	DEVMETHOD_END
 };
 
-static driver_t at91pit_driver = {
+static driver_t at91_pit_driver = {
 	"at91_pit",
-	at91pit_methods,
+	at91_pit_methods,
 	sizeof(struct pit_softc),
 };
 
-static devclass_t at91pit_devclass;
+static devclass_t at91_pit_devclass;
 
-DRIVER_MODULE(at91_pit, atmelarm, at91pit_driver, at91pit_devclass, NULL,
+DRIVER_MODULE(at91_pit, atmelarm, at91_pit_driver, at91_pit_devclass, NULL,
     NULL);
 
 static int
@@ -175,7 +194,7 @@
 }
 
 static unsigned
-at91pit_get_timecount(struct timecounter *tc)
+at91_pit_get_timecount(struct timecounter *tc)
 {
 	uint32_t piir, icnt;
 
@@ -183,47 +202,3 @@
 	icnt = piir >> 20;	/* Overflows */
 	return (timecount + PIT_PIV(piir) + PIT_PIV(RD4(sc, PIT_MR)) * icnt);
 }
-
-void
-DELAY(int us)
-{
-	int32_t cnt, last, piv;
-	uint64_t pit_freq;
-	const uint64_t mhz  = 1E6;
-
-	last = PIT_PIV(RD4(sc, PIT_PIIR));
-
-	/* Max delay ~= 260s. @ 133Mhz */
-	pit_freq = at91_master_clock / PIT_PRESCALE;
-	cnt  = ((pit_freq * us) + (mhz -1)) / mhz;
-	cnt  = (cnt <= 0) ? 1 : cnt;
-
-	while (cnt > 0) {
-		piv = PIT_PIV(RD4(sc, PIT_PIIR));
-			cnt  -= piv - last ;
-		if (piv < last)
-			cnt -= PIT_PIV(~0u) - last;
-		last = piv;
-	}
-}
-
-/*
- * The 3 next functions must be implement with the future PLL code.
- */
-void
-cpu_startprofclock(void)
-{
-
-}
-
-void
-cpu_stopprofclock(void)
-{
-
-}
-
-void
-cpu_initclocks(void)
-{
-
-}
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_pitreg.h
--- a/head/sys/arm/at91/at91_pitreg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_pitreg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -23,12 +23,12 @@
  * SUCH DAMAGE.
  */
 
-/* $FreeBSD$ */
+/* $FreeBSD: head/sys/arm/at91/at91_pitreg.h 238370 2012-07-11 17:11:54Z imp $ */
 
-#ifndef ARM_AT91_AT91PITREG_H
-#define ARM_AT91_AT91PITREG_H
+#ifndef ARM_AT91_AT91_PITREG_H
+#define ARM_AT91_AT91_PITREG_H
 
-#define PIT_MR		0x0 
+#define PIT_MR		0x0
 #define PIT_SR		0x4
 #define PIT_PIVR	0x8
 #define PIT_PIIR	0xc
@@ -42,4 +42,6 @@
 /* PIT_SR */
 #define PIT_PITS_DONE	1 /* interrupt done */
 
-#endif /* ARM_AT91_AT91PITREG_H */
+void at91_pit_delay(int us);
+
+#endif /* ARM_AT91_AT91_PITREG_H */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_pmc.c
--- a/head/sys/arm/at91/at91_pmc.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_pmc.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/at91/at91_pmc.c 234292 2012-04-14 17:17:55Z marius $");
+__FBSDID("$FreeBSD: head/sys/arm/at91/at91_pmc.c 236658 2012-06-06 06:19:52Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -55,13 +55,15 @@
 	bus_space_handle_t	sc_sh;
 	struct resource	*mem_res;	/* Memory resource */
 	device_t		dev;
-	unsigned int		main_clock_hz;
-	uint32_t		pllb_init;
 } *pmc_softc;
 
+static uint32_t pllb_init;
+
 MALLOC_DECLARE(M_PMC);
 MALLOC_DEFINE(M_PMC, "at91_pmc_clocks", "AT91 PMC Clock descriptors");
 
+#define AT91_PMC_BASE 0xffffc00
+
 static void at91_pmc_set_pllb_mode(struct at91_pmc_clock *, int);
 static void at91_pmc_set_sys_mode(struct at91_pmc_clock *, int);
 static void at91_pmc_set_periph_mode(struct at91_pmc_clock *, int);
@@ -147,22 +149,15 @@
 	&cpu
 };
 
-#if !defined(AT91C_MAIN_CLOCK)
-static const unsigned int at91_mainf_tbl[] = {
-	3000000, 3276800, 3686400, 3840000, 4000000,
-	4433619, 4915200, 5000000, 5242880, 6000000,
-	6144000, 6400000, 6553600, 7159090, 7372800,
-	7864320, 8000000, 9830400, 10000000, 11059200,
-	12000000, 12288000, 13560000, 14318180, 14745600,
-	16000000, 17344700, 18432000, 20000000
-};
-#define	MAINF_TBL_LEN	(sizeof(at91_mainf_tbl) / sizeof(*at91_mainf_tbl))
-#endif
-
 static inline uint32_t
 RD4(struct at91_pmc_softc *sc, bus_size_t off)
 {
 
+	if (sc == NULL) {
+		uint32_t *p = (uint32_t *)(AT91_BASE + AT91_PMC_BASE + off);
+
+		return *p;
+	}
 	return (bus_read_4(sc->mem_res, off));
 }
 
@@ -170,7 +165,12 @@
 WR4(struct at91_pmc_softc *sc, bus_size_t off, uint32_t val)
 {
 
-	bus_write_4(sc->mem_res, off, val);
+	if (sc == NULL) {
+		uint32_t *p = (uint32_t *)(AT91_BASE + AT91_PMC_BASE + off);
+
+		*p = val;
+	} else
+		bus_write_4(sc->mem_res, off, val);
 }
 
 void
@@ -181,7 +181,7 @@
 
 	if (on) {
 		on = PMC_IER_LOCKB;
-		value = sc->pllb_init;
+		value = pllb_init;
 	} else
 		value = 0;
 
@@ -401,31 +401,85 @@
 	return (0);
 }
 
-static void
-at91_pmc_init_clock(struct at91_pmc_softc *sc, unsigned int main_clock)
+#if !defined(AT91C_MAIN_CLOCK)
+static const unsigned int at91_main_clock_tbl[] = {
+	3000000, 3276800, 3686400, 3840000, 4000000,
+	4433619, 4915200, 5000000, 5242880, 6000000,
+	6144000, 6400000, 6553600, 7159090, 7372800,
+	7864320, 8000000, 9830400, 10000000, 11059200,
+	12000000, 12288000, 13560000, 14318180, 14745600,
+	16000000, 17344700, 18432000, 20000000
+};
+#define	MAIN_CLOCK_TBL_LEN	(sizeof(at91_main_clock_tbl) / sizeof(*at91_main_clock_tbl))
+#endif
+
+static unsigned int
+at91_pmc_sense_main_clock(void)
 {
+#if !defined(AT91C_MAIN_CLOCK)
+	unsigned int ckgr_val;
+	unsigned int diff, matchdiff, freq;
+	int i;
+
+	ckgr_val = (RD4(NULL, CKGR_MCFR) & CKGR_MCFR_MAINF_MASK) << 11;
+
+	/*
+	 * Clocks up to 50MHz can be connected to some models.  If
+	 * the frequency is >= 21MHz, assume that the slow clock can
+	 * measure it correctly, and that any error can be adequately
+	 * compensated for by roudning to the nearest 500Hz.  Users
+	 * with fast, or odd-ball clocks will need to set
+	 * AT91C_MAIN_CLOCK in the kernel config file.
+	 */
+	if (ckgr_val >= 21000000)
+		return ((ckgr_val + 250) / 500 * 500);
+
+	/*
+	 * Try to find the standard frequency that match best.
+	 */
+	freq = at91_main_clock_tbl[0];
+	matchdiff = abs(ckgr_val - at91_main_clock_tbl[0]);
+	for (i = 1; i < MAIN_CLOCK_TBL_LEN; i++) {
+		diff = abs(ckgr_val - at91_main_clock_tbl[i]);
+		if (diff < matchdiff) {
+			freq = at91_main_clock_tbl[i];
+			matchdiff = diff;
+		}
+	}
+	return (freq);
+#else
+	return (AT91C_MAIN_CLOCK);
+#endif
+}
+
+void
+at91_pmc_init_clock(void)
+{
+	struct at91_pmc_softc *sc = NULL;
+	unsigned int main_clock;
 	uint32_t mckr;
 	uint32_t mdiv;
 
+	main_clock = at91_pmc_sense_main_clock();
+
 	if (at91_is_sam9() || at91_is_sam9xe()) {
 		uhpck.pmc_mask = PMC_SCER_UHP_SAM9;
 		udpck.pmc_mask = PMC_SCER_UDP_SAM9;
 	}
 	mckr = RD4(sc, PMC_MCKR);
-	sc->main_clock_hz = main_clock;
 	main_ck.hz = main_clock;
 
 	at91_pmc_pll_rate(&plla, RD4(sc, CKGR_PLLAR));
 
-	if (at91_cpu_is(AT91_CPU_SAM9G45) && (mckr & PMC_MCKR_PLLADIV2))
+	if (at91_cpu_is(AT91_T_SAM9G45) && (mckr & PMC_MCKR_PLLADIV2))
 		plla.hz /= 2;
 
 	/*
 	 * Initialize the usb clock.  This sets up pllb, but disables the
 	 * actual clock.
 	 */
-	sc->pllb_init = at91_pmc_pll_calc(&pllb, 48000000 * 2) | 0x10000000;
-	at91_pmc_pll_rate(&pllb, sc->pllb_init);
+	pllb_init = at91_pmc_pll_calc(&pllb, 48000000 * 2) | 0x10000000;
+	at91_pmc_pll_rate(&pllb, pllb_init);
 
 #if 0
 	/* Turn off USB clocks */
@@ -458,16 +512,14 @@
 		mck.hz /= (1 + mdiv);
 
 	/* Only found on SAM9G20 */
-	if (at91_cpu_is(AT91_CPU_SAM9G20))
+	if (at91_cpu_is(AT91_T_SAM9G20))
 		cpu.hz /= (mckr & PMC_MCKR_PDIV) ?  2 : 1;
 
 	at91_master_clock = mck.hz;
 
-	device_printf(sc->dev,
-	    "Primary: %d Hz PLLA: %d MHz CPU: %d MHz MCK: %d MHz\n",
-	    sc->main_clock_hz,
-	    plla.hz / 1000000,
-	    cpu.hz / 1000000, mck.hz / 1000000);
+	/* These clocks refrenced by "special" names */
+	at91_pmc_clock_alias("ohci0", "ohci_clk");
+	at91_pmc_clock_alias("udp0",  "udp_clk");
 
 	/* Turn off "Progamable" clocks */
 	WR4(sc, PMC_SCDR, PMC_SCER_PCK0 | PMC_SCER_PCK1 | PMC_SCER_PCK2 |
@@ -519,36 +571,9 @@
 	return (0);
 }
 
-#if !defined(AT91C_MAIN_CLOCK)
-static unsigned int
-at91_pmc_sense_mainf(struct at91_pmc_softc *sc)
-{
-	unsigned int ckgr_val;
-	unsigned int diff, matchdiff;
-	int i, match;
-
-	ckgr_val = (RD4(sc, CKGR_MCFR) & CKGR_MCFR_MAINF_MASK) << 11;
-
-	/*
-	 * Try to find the standard frequency that match best.
-	 */
-	match = 0;
-	matchdiff = abs(ckgr_val - at91_mainf_tbl[0]);
-	for (i = 1; i < MAINF_TBL_LEN; i++) {
-		diff = abs(ckgr_val - at91_mainf_tbl[i]);
-		if (diff < matchdiff) {
-			match = i;
-			matchdiff = diff;
-		}
-	}
-	return (at91_mainf_tbl[match]);
-}
-#endif
-
 static int
 at91_pmc_attach(device_t dev)
 {
-	unsigned int mainf;
 	int err;
 
 	pmc_softc = device_get_softc(dev);
@@ -559,16 +584,16 @@
 	/*
 	 * Configure main clock frequency.
 	 */
-#if !defined(AT91C_MAIN_CLOCK)
-	mainf = at91_pmc_sense_mainf(pmc_softc);
-#else
-	mainf = AT91C_MAIN_CLOCK;
-#endif
-	at91_pmc_init_clock(pmc_softc, mainf);
+	at91_pmc_init_clock();
 
-	/* These clocks refrenced by "special" names */
-	at91_pmc_clock_alias("ohci0", "ohci_clk");
-	at91_pmc_clock_alias("udp0",  "udp_clk");
+	/*
+	 * Display info about clocks previously computed
+	 */
+	device_printf(dev,
+	    "Primary: %d Hz PLLA: %d MHz CPU: %d MHz MCK: %d MHz\n",
+	    main_ck.hz,
+	    plla.hz / 1000000,
+	    cpu.hz / 1000000, mck.hz / 1000000);
 
 	return (0);
 }
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_pmcvar.h
--- a/head/sys/arm/at91/at91_pmcvar.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_pmcvar.h	Wed Jul 25 17:18:25 2012 +0300
@@ -23,12 +23,12 @@
  * SUCH DAMAGE.
  */
 
-/* $FreeBSD$ */
+/* $FreeBSD: head/sys/arm/at91/at91_pmcvar.h 237745 2012-06-29 06:06:19Z imp $ */
 
 #ifndef ARM_AT91_AT91_PMCVAR_H
 #define ARM_AT91_AT91_PMCVAR_H
 
-struct at91_pmc_clock 
+struct at91_pmc_clock
 {
 	char		*name;
 	uint32_t	hz;
@@ -55,7 +55,7 @@
 	uint32_t	(*set_outb)(int);
 };
 
-struct at91_pmc_clock * at91_pmc_clock_add(const char *name, uint32_t irq,
+struct at91_pmc_clock *at91_pmc_clock_add(const char *name, uint32_t irq,
     struct at91_pmc_clock *parent);
 struct at91_pmc_clock *at91_pmc_clock_ref(const char *name);
 void at91_pmc_clock_deref(struct at91_pmc_clock *);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_reset.S
--- a/head/sys/arm/at91/at91_reset.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_reset.S	Wed Jul 25 17:18:25 2012 +0300
@@ -1,31 +1,31 @@
 #include <machine/asm.h>
 #include <arm/at91/at91_rstreg.h>
+#include <arm/at91/at91reg.h>
 #include <arm/at91/at91sam9g20reg.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/at91/at91_reset.S 238330 2012-07-10 02:14:50Z imp $");
 
-#define SDRAM_TR  (AT91SAM9G20_BASE + \
+#define SDRAM_TR  (AT91_BASE + \
 	AT91SAM9G20_SDRAMC_BASE + AT91SAM9G20_SDRAMC_TR)
-#define SDRAM_LPR (AT91SAM9G20_BASE + \
+#define SDRAM_LPR (AT91_BASE + \
 	AT91SAM9G20_SDRAMC_BASE + AT91SAM9G20_SDRAMC_LPR)
-#define RSTC_RCR  (AT91SAM9G20_BASE + \
+#define RSTC_RCR  (AT91_BASE + \
 	AT91SAM9G20_RSTC_BASE + RST_CR)
 
-/* 
+/*
  * From AT91SAM9G20 Datasheet errata 44:3.5:
  *
  * When User Reset occurs durring SDRAM read acces, eh SDRAM clock is turned
  * off while data are ready to be read on the data bus. The SDRAM maintains
- * the data until the clock restarts. 
- * 
- * If the User reset is programed to assert a general reset, the data
+ * the data until the clock restarts.
+ *
  * If the User reset is programed to assert a general reset, the data
  * maintained by the SDRAM leads to a data bus conflict and adversly affects
  * the boot memories connected to the EBI:
  *  + NAND Flash boot functionality, if the system boots out of internal ROM.
- *  + NOR Flash boot, if the system boots on an external memory connected to 
+ *  + NOR Flash boot, if the system boots on an external memory connected to
  *    the EBI CS0.
  *
- * Assembly code is mandatory for the following sequnce as ARM 
+ * Assembly code is mandatory for the following sequnce as ARM
  * instructions need to be piplined.
  *
  */
@@ -39,12 +39,12 @@
 
 	/* Change Refresh to block all data access */
 	ldr	r0, =SDRAM_TR
-	ldr	r1, =1 
+	ldr	r1, =1
 	str	r1, [r0]
 
 	/* Prepare power down command */
 	ldr	r0, =SDRAM_LPR
-	ldr	r1, =2 
+	ldr	r1, =2
 
 	/* Prepare proc_reset and periph reset */
 	ldr	r2, =RSTC_RCR
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_rst.c
--- a/head/sys/arm/at91/at91_rst.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_rst.c	Wed Jul 25 17:18:25 2012 +0300
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/at91/at91_rst.c 234291 2012-04-14 17:09:38Z marius $");
+__FBSDID("$FreeBSD: head/sys/arm/at91/at91_rst.c 238369 2012-07-11 17:11:07Z imp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -42,50 +42,70 @@
 #define RST_TIMEOUT (5)	/* Seconds to hold NRST for hard reset */
 #define RST_TICK (20)	/* sample NRST at hz/RST_TICK intervals */
 
-static int rst_intr(void *arg);
+static int at91_rst_intr(void *arg);
 
-static struct rst_softc {
+static struct at91_rst_softc {
 	struct resource	*mem_res;	/* Memory resource */
 	struct resource	*irq_res;	/* IRQ resource */
 	void		*intrhand;	/* Interrupt handle */
 	struct callout	tick_ch;	/* Tick callout */
 	device_t	sc_dev;
 	u_int		shutdown;	/* Shutdown in progress */
-} *rst_sc;
+} *at91_rst_sc;
 
 static inline uint32_t
-RD4(struct rst_softc *sc, bus_size_t off)
+RD4(struct at91_rst_softc *sc, bus_size_t off)
 {
 
 	return (bus_read_4(sc->mem_res, off));
 }
 
 static inline void
-WR4(struct rst_softc *sc, bus_size_t off, uint32_t val)
+WR4(struct at91_rst_softc *sc, bus_size_t off, uint32_t val)
 {
 
 	bus_write_4(sc->mem_res, off, val);
 }
 
+void cpu_reset_sam9g20(void) __attribute__((weak));
+void cpu_reset_sam9g20(void) {}
+
+void
+at91_rst_cpu_reset(void)
+{
+
+	if (at91_rst_sc) {
+		cpu_reset_sam9g20(); /* May be null */
+
+		WR4(at91_rst_sc, RST_MR,
+		    RST_MR_ERSTL(0xd) | RST_MR_URSTEN | RST_MR_KEY);
+
+		WR4(at91_rst_sc, RST_CR,
+		    RST_CR_PROCRST |
+		    RST_CR_PERRST  |
+		    RST_CR_EXTRST  |
+		    RST_CR_KEY);
+	}
+	while(1)
+		continue;
+}
+
 static int
 at91_rst_probe(device_t dev)
 {
 
-	if (at91_is_sam9() || at91_is_sam9xe()) {
-		device_set_desc(dev, "AT91SAM9 Reset Controller");
-		return (0);
-	}
-	return (ENXIO);
+	device_set_desc(dev, "AT91SAM9 Reset Controller");
+	return (0);
 }
 
 static int
 at91_rst_attach(device_t dev)
 {
-	struct rst_softc *sc;
+	struct at91_rst_softc *sc;
 	const char *cause;
 	int rid, err;
 
-	rst_sc = sc = device_get_softc(dev);
+	at91_rst_sc = sc = device_get_softc(dev);
 	sc->sc_dev = dev;
 
 	callout_init(&sc->tick_ch, 0);
@@ -109,11 +129,11 @@
 
 	/* Activate the interrupt. */
 	err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_MISC | INTR_MPSAFE,
-	    rst_intr, NULL, sc, &sc->intrhand);
+	    at91_rst_intr, NULL, sc, &sc->intrhand);
 	if (err)
 		device_printf(dev, "could not establish interrupt handler.\n");
 
-	WR4(rst_sc, RST_MR, RST_MR_ERSTL(0xd) | RST_MR_URSIEN | RST_MR_KEY);
+	WR4(at91_rst_sc, RST_MR, RST_MR_ERSTL(0xd) | RST_MR_URSIEN | RST_MR_KEY);
 
 	switch (RD4(sc, RST_SR) & RST_SR_RST_MASK) {
 		case	RST_SR_RST_POW:
@@ -137,16 +157,14 @@
 	}
 
 	device_printf(dev, "Reset cause: %s.\n", cause);
-	/* cpu_reset_addr = cpu_reset; */
-
 out:
 	return (err);
 }
 
 static void
-rst_tick(void *argp)
+at91_rst_tick(void *argp)
 {
-	struct rst_softc *sc = argp;
+	struct at91_rst_softc *sc = argp;
 
 	if (sc->shutdown++ >= RST_TIMEOUT * RST_TICK) {
 		/* User released the button in morre than RST_TIMEOUT */
@@ -157,18 +175,18 @@
 		device_printf(sc->sc_dev, "shutting down...\n");
 		shutdown_nice(0);
 	} else {
-		callout_reset(&sc->tick_ch, hz/RST_TICK, rst_tick, sc);
+		callout_reset(&sc->tick_ch, hz/RST_TICK, at91_rst_tick, sc);
 	}
 }
 
 static int
-rst_intr(void *argp)
+at91_rst_intr(void *argp)
 {
-	struct rst_softc *sc = argp;
+	struct at91_rst_softc *sc = argp;
 
 	if (RD4(sc, RST_SR) & RST_SR_URSTS) {
 		if (sc->shutdown == 0)
-			callout_reset(&sc->tick_ch, hz/RST_TICK, rst_tick, sc);
+			callout_reset(&sc->tick_ch, hz/RST_TICK, at91_rst_tick, sc);
 		return (FILTER_HANDLED);
 	}
 	return (FILTER_STRAY);
@@ -183,34 +201,10 @@
 static driver_t at91_rst_driver = {
 	"at91_rst",
 	at91_rst_methods,
-	sizeof(struct rst_softc),
+	sizeof(struct at91_rst_softc),
 };
 
 static devclass_t at91_rst_devclass;
 
 DRIVER_MODULE(at91_rst, atmelarm, at91_rst_driver, at91_rst_devclass, NULL,
     NULL);
-
-void cpu_reset_sam9g20(void) __attribute__((weak));
-void cpu_reset_sam9g20(void) {}
-
-void
-cpu_reset(void)
-{
-
-	if (rst_sc) {
-		cpu_reset_sam9g20(); /* May be null */
-
-		WR4(rst_sc, RST_MR,
-		    RST_MR_ERSTL(0xd) | RST_MR_URSTEN | RST_MR_KEY);
-
-		WR4(rst_sc, RST_CR,
-		    RST_CR_PROCRST |
-		    RST_CR_PERRST  |
-		    RST_CR_EXTRST  |
-		    RST_CR_KEY);
-	}
-
-	for(;;)
-		;
-}
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_rstreg.h
--- a/head/sys/arm/at91/at91_rstreg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_rstreg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -23,10 +23,10 @@
  * SUCH DAMAGE.
  */
 
-/* $FreeBSD$ */
+/* $FreeBSD: head/sys/arm/at91/at91_rstreg.h 238369 2012-07-11 17:11:07Z imp $ */
 
-#ifndef ARM_AT91_AT91RSTREG_H
-#define ARM_AT91_AT91RSTREG_H
+#ifndef ARM_AT91_AT91_RSTREG_H
+#define ARM_AT91_AT91_RSTREG_H
 
 #define	RST_CR		0x0	/* Control Register */
 #define	RST_SR		0x4	/* Status Register */
@@ -56,4 +56,8 @@
 #define	RST_MR_ERSTL(x)		((x)<<8) /* External reset length */	
 #define	RST_MR_KEY		(0xa5<<24)
 
-#endif /* ARM_AT91_AT91RSTREG_H */
+#ifndef __ASSEMBLER__
+void at91_rst_cpu_reset(void);
+#endif
+
+#endif /* ARM_AT91_AT91_RSTREG_H */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_spi.c
--- a/head/sys/arm/at91/at91_spi.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_spi.c	Wed Jul 25 17:18:25 2012 +0300
@@ -1,5 +1,7 @@
 /*-
- * Copyright (c) 2006 M. Warner Losh.  All rights reserved.
+ * Copyright (c) 2006 M. Warner Losh.
+ * Copyright (c) 2011-2012 Ian Lepore.
+ * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -24,24 +26,27 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/at91/at91_spi.c 225882 2011-09-30 04:55:23Z kevlo $");
+__FBSDID("$FreeBSD: head/sys/arm/at91/at91_spi.c 237239 2012-06-18 20:14:42Z marius $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/bus.h>
 #include <sys/conf.h>
 #include <sys/kernel.h>
+#include <sys/lock.h>
 #include <sys/mbuf.h>
 #include <sys/malloc.h>
 #include <sys/module.h>
-#include <sys/mutex.h>
 #include <sys/rman.h>
+#include <sys/sx.h>
+
 #include <machine/bus.h>
 
 #include <arm/at91/at91_spireg.h>
 #include <arm/at91/at91_pdcreg.h>
 
 #include <dev/spibus/spi.h>
+
 #include "spibus_if.h"
 
 struct at91_spi_softc
@@ -50,29 +55,38 @@
 	void *intrhand;			/* Interrupt handle */
 	struct resource *irq_res;	/* IRQ resource */
 	struct resource	*mem_res;	/* Memory resource */
-	bus_dma_tag_t dmatag;		/* bus dma tag for mbufs */
+	bus_dma_tag_t dmatag;		/* bus dma tag for transfers */
 	bus_dmamap_t map[4];		/* Maps for the transaction */
-	int rxdone;
+	struct sx xfer_mtx;		/* Enforce one transfer at a time */
+	uint32_t xfer_done;		/* interrupt<->mainthread signaling */
 };
 
+#define CS_TO_MR(cs)	((~(1 << (cs)) & 0x0f) << 16)
+
 static inline uint32_t
 RD4(struct at91_spi_softc *sc, bus_size_t off)
 {
-	return bus_read_4(sc->mem_res, off);
+
+	return (bus_read_4(sc->mem_res, off));
 }
 
 static inline void
 WR4(struct at91_spi_softc *sc, bus_size_t off, uint32_t val)
 {
+
 	bus_write_4(sc->mem_res, off, val);
 }
 
 /* bus entry points */
-static int at91_spi_probe(device_t dev);
 static int at91_spi_attach(device_t dev);
 static int at91_spi_detach(device_t dev);
+static int at91_spi_probe(device_t dev);
+static int at91_spi_transfer(device_t dev, device_t child,
+    struct spi_command *cmd);
 
 /* helper routines */
+static void at91_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs,
+    int error);
 static int at91_spi_activate(device_t dev);
 static void at91_spi_deactivate(device_t dev);
 static void at91_spi_intr(void *arg);
@@ -80,43 +94,63 @@
 static int
 at91_spi_probe(device_t dev)
 {
-	device_set_desc(dev, "SPI");
+
+	device_set_desc(dev, "AT91 SPI");
 	return (0);
 }
 
 static int
 at91_spi_attach(device_t dev)
 {
-	struct at91_spi_softc *sc = device_get_softc(dev);
-	int err, i;
+	struct at91_spi_softc *sc;
+	int err;
+	uint32_t csr;
+
+	sc = device_get_softc(dev);
 
 	sc->dev = dev;
+	sx_init(&sc->xfer_mtx, device_get_nameunit(dev));
+
+	/*
+	 * Allocate resources.
+	 */
 	err = at91_spi_activate(dev);
 	if (err)
 		goto out;
 
 	/*
-	 * Allocate DMA tags and maps
+	 * Set up the hardware.
 	 */
-	err = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0,
-	    BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, 2058, 1,
-	    2048, BUS_DMA_ALLOCNOW, NULL, NULL, &sc->dmatag);
-	if (err != 0)
-		goto out;
-	for (i = 0; i < 4; i++) {
-		err = bus_dmamap_create(sc->dmatag, 0,  &sc->map[i]);
-		if (err != 0)
-			goto out;
-	}
 
-	// reset the SPI
+	WR4(sc, SPI_CR, SPI_CR_SWRST);
+	/* "Software Reset must be Written Twice" erratum */
 	WR4(sc, SPI_CR, SPI_CR_SWRST);
 	WR4(sc, SPI_IDR, 0xffffffff);
 
 	WR4(sc, SPI_MR, (0xf << 24) | SPI_MR_MSTR | SPI_MR_MODFDIS |
-	    (0xE << 16));
+	    CS_TO_MR(0));
 
-	WR4(sc, SPI_CSR0, SPI_CSR_CPOL | (4 << 16) | (2 << 8));
+	/*
+	 * For now, run the bus at the slowest speed possible as otherwise we
+	 * may encounter data corruption on transmit as seen with ETHERNUT5
+	 * and AT45DB321D even though both board and slave device can take
+	 * more.
+	 * This also serves as a work-around for the "NPCSx rises if no data
+	 * data is to be transmitted" erratum.  The ideal workaround for the
+	 * latter is to take the chip select control away from the peripheral
+	 * and manage it directly as a GPIO line.  The easy solution is to
+	 * slow down the bus so dramatically that it just never gets starved
+	 * as may be seen when the OCHI controller is running and consuming
+	 * memory and APB bandwidth.
+	 * Also, currently we lack a way for lettting both the board and the
+	 * slave devices take their maximum supported SPI clocks into account.
+	 */
+	csr = SPI_CSR_CPOL | (4 << 16) | (0xff << 8);
+	WR4(sc, SPI_CSR0, csr);
+	WR4(sc, SPI_CSR1, csr);
+	WR4(sc, SPI_CSR2, csr);
+	WR4(sc, SPI_CSR3, csr);
+
 	WR4(sc, SPI_CR, SPI_CR_SPIEN);
 
 	WR4(sc, PDC_PTCR, PDC_PTCR_TXTDIS);
@@ -143,6 +177,7 @@
 static int
 at91_spi_detach(device_t dev)
 {
+
 	return (EBUSY);	/* XXX */
 }
 
@@ -150,26 +185,41 @@
 at91_spi_activate(device_t dev)
 {
 	struct at91_spi_softc *sc;
-	int rid, err = ENOMEM;
+	int err, i, rid;
 
 	sc = device_get_softc(dev);
+	err = ENOMEM;
+
 	rid = 0;
 	sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
 	    RF_ACTIVE);
 	if (sc->mem_res == NULL)
-		goto errout;
+		goto out;
+
 	rid = 0;
 	sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
 	    RF_ACTIVE);
 	if (sc->irq_res == NULL)
-		goto errout;
+		goto out;
 	err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_MISC | INTR_MPSAFE,
 	    NULL, at91_spi_intr, sc, &sc->intrhand);
 	if (err != 0)
-		goto errout;
-	return (0);
-errout:
-	at91_spi_deactivate(dev);
+		goto out;
+
+	err = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0,
+	    BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, 2048, 1,
+	    2048, BUS_DMA_ALLOCNOW, NULL, NULL, &sc->dmatag);
+	if (err != 0)
+		goto out;
+
+	for (i = 0; i < 4; i++) {
+		err = bus_dmamap_create(sc->dmatag, 0,  &sc->map[i]);
+		if (err != 0)
+			goto out;
+	}
+out:
+	if (err != 0)
+		at91_spi_deactivate(dev);
 	return (err);
 }
 
@@ -177,26 +227,37 @@
 at91_spi_deactivate(device_t dev)
 {
 	struct at91_spi_softc *sc;
+	int i;
 
 	sc = device_get_softc(dev);
+	bus_generic_detach(dev);
+
+	for (i = 0; i < 4; i++)
+		if (sc->map[i])
+			bus_dmamap_destroy(sc->dmatag, sc->map[i]);
+
+	if (sc->dmatag)
+		bus_dma_tag_destroy(sc->dmatag);
+
 	if (sc->intrhand)
 		bus_teardown_intr(dev, sc->irq_res, sc->intrhand);
-	sc->intrhand = 0;
-	bus_generic_detach(sc->dev);
-	if (sc->mem_res)
-		bus_release_resource(dev, SYS_RES_IOPORT,
-		    rman_get_rid(sc->mem_res), sc->mem_res);
-	sc->mem_res = 0;
+	sc->intrhand = NULL;
 	if (sc->irq_res)
 		bus_release_resource(dev, SYS_RES_IRQ,
 		    rman_get_rid(sc->irq_res), sc->irq_res);
-	sc->irq_res = 0;
-	return;
+	sc->irq_res = NULL;
+
+	if (sc->mem_res)
+		bus_release_resource(dev, SYS_RES_MEMORY,
+		    rman_get_rid(sc->mem_res), sc->mem_res);
+	sc->mem_res = NULL;
 }
 
 static void
-at91_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error)
+at91_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs __unused,
+    int error)
 {
+
 	if (error != 0)
 		return;
 	*(bus_addr_t *)arg = segs[0].ds_addr;
@@ -206,80 +267,130 @@
 at91_spi_transfer(device_t dev, device_t child, struct spi_command *cmd)
 {
 	struct at91_spi_softc *sc;
-	int i, j, rxdone, err, mode[4];
 	bus_addr_t addr;
+	int err, i, j, mode[4];
+
+	KASSERT(cmd->tx_cmd_sz == cmd->rx_cmd_sz,
+	    ("%s: TX/RX command sizes should be equal", __func__));
+	KASSERT(cmd->tx_data_sz == cmd->rx_data_sz,
+	    ("%s: TX/RX data sizes should be equal", __func__));
 
 	sc = device_get_softc(dev);
+	i = 0;
+
+	sx_xlock(&sc->xfer_mtx);
+
+	/*
+	 * Disable transfers while we set things up.
+	 */
 	WR4(sc, PDC_PTCR, PDC_PTCR_TXTDIS | PDC_PTCR_RXTDIS);
-	i = 0;
-	if (bus_dmamap_load(sc->dmatag, sc->map[i], cmd->tx_cmd,
-	    cmd->tx_cmd_sz, at91_getaddr, &addr, 0) != 0)
+
+#ifdef SPI_CHIPSEL_SUPPORT
+	if (cmd->cs < 0 || cmd->cs > 3) {
+		device_printf(dev,
+		    "Invalid chip select %d requested by %s\n", cmd->cs,
+		    device_get_nameunit(child));
+		err = EINVAL;
+		goto out;
+	}
+#ifdef SPI_CHIP_SELECT_HIGH_SUPPORT
+	if (at91_is_rm92() && cmd->cs == 0 &&
+	    (cmd->flags & SPI_CHIP_SELECT_HIGH) != 0) {
+		device_printf(dev,
+		    "Invalid chip select high requested by %s\n",
+		    device_get_nameunit(child));
+		err = EINVAL;
+		goto out;
+	}
+#endif
+	WR4(sc, SPI_MR, (RD4(sc, SPI_MR) & ~0x000f0000) | CS_TO_MR(cmd->cs));
+#endif
+
+	/*
+	 * Set up the TX side of the transfer.
+	 */
+	if ((err = bus_dmamap_load(sc->dmatag, sc->map[i], cmd->tx_cmd,
+	    cmd->tx_cmd_sz, at91_getaddr, &addr, 0)) != 0)
 		goto out;
 	WR4(sc, PDC_TPR, addr);
 	WR4(sc, PDC_TCR, cmd->tx_cmd_sz);
 	bus_dmamap_sync(sc->dmatag, sc->map[i], BUS_DMASYNC_PREWRITE);
 	mode[i++] = BUS_DMASYNC_POSTWRITE;
 	if (cmd->tx_data_sz > 0) {
-		if (bus_dmamap_load(sc->dmatag, sc->map[i], cmd->tx_data,
-			cmd->tx_data_sz, at91_getaddr, &addr, 0) != 0)
+		if ((err = bus_dmamap_load(sc->dmatag, sc->map[i],
+		    cmd->tx_data, cmd->tx_data_sz, at91_getaddr, &addr, 0)) !=
+		    0)
 			goto out;
 		WR4(sc, PDC_TNPR, addr);
 		WR4(sc, PDC_TNCR, cmd->tx_data_sz);
 		bus_dmamap_sync(sc->dmatag, sc->map[i], BUS_DMASYNC_PREWRITE);
 		mode[i++] = BUS_DMASYNC_POSTWRITE;
 	}
-	if (bus_dmamap_load(sc->dmatag, sc->map[i], cmd->rx_cmd,
-	    cmd->tx_cmd_sz, at91_getaddr, &addr, 0) != 0)
+
+	/*
+	 * Set up the RX side of the transfer.
+	 */
+	if ((err = bus_dmamap_load(sc->dmatag, sc->map[i], cmd->rx_cmd,
+	    cmd->rx_cmd_sz, at91_getaddr, &addr, 0)) != 0)
 		goto out;
 	WR4(sc, PDC_RPR, addr);
-	WR4(sc, PDC_RCR, cmd->tx_cmd_sz);
+	WR4(sc, PDC_RCR, cmd->rx_cmd_sz);
 	bus_dmamap_sync(sc->dmatag, sc->map[i], BUS_DMASYNC_PREREAD);
 	mode[i++] = BUS_DMASYNC_POSTREAD;
 	if (cmd->rx_data_sz > 0) {
-		if (bus_dmamap_load(sc->dmatag, sc->map[i], cmd->rx_data,
-			cmd->tx_data_sz, at91_getaddr, &addr, 0) != 0)
+		if ((err = bus_dmamap_load(sc->dmatag, sc->map[i],
+		    cmd->rx_data, cmd->rx_data_sz, at91_getaddr, &addr, 0)) !=
+		    0)
 			goto out;
 		WR4(sc, PDC_RNPR, addr);
 		WR4(sc, PDC_RNCR, cmd->rx_data_sz);
 		bus_dmamap_sync(sc->dmatag, sc->map[i], BUS_DMASYNC_PREREAD);
 		mode[i++] = BUS_DMASYNC_POSTREAD;
 	}
-	WR4(sc, SPI_IER, SPI_SR_ENDRX);
+
+	/*
+	 * Start the transfer, wait for it to complete.
+	 */
+	sc->xfer_done = 0;
+	WR4(sc, SPI_IER, SPI_SR_RXBUFF);
 	WR4(sc, PDC_PTCR, PDC_PTCR_TXTEN | PDC_PTCR_RXTEN);
+	do
+		err = tsleep(&sc->xfer_done, PCATCH | PZERO, "at91_spi", hz);
+	while (sc->xfer_done == 0 && err != EINTR);
 
-	rxdone = sc->rxdone;
-	do {
-		err = tsleep(&sc->rxdone, PCATCH | PZERO, "spi", hz);
-	} while (rxdone == sc->rxdone && err != EINTR);
+	/*
+	 * Stop the transfer and clean things up.
+	 */
 	WR4(sc, PDC_PTCR, PDC_PTCR_TXTDIS | PDC_PTCR_RXTDIS);
-	if (err == 0) {
-		for (j = 0; j < i; j++) 
+	if (err == 0)
+		for (j = 0; j < i; j++)
 			bus_dmamap_sync(sc->dmatag, sc->map[j], mode[j]);
-	}
-	for (j = 0; j < i; j++)
-		bus_dmamap_unload(sc->dmatag, sc->map[j]);
-	return (err);
 out:
 	for (j = 0; j < i; j++)
 		bus_dmamap_unload(sc->dmatag, sc->map[j]);
-	return (EIO);
+
+	sx_xunlock(&sc->xfer_mtx);
+
+	return (err);
 }
 
 static void
 at91_spi_intr(void *arg)
 {
-	struct at91_spi_softc *sc = (struct at91_spi_softc*)arg;
+	struct at91_spi_softc *sc;
 	uint32_t sr;
 
+	sc = (struct at91_spi_softc*)arg;
+
 	sr = RD4(sc, SPI_SR) & RD4(sc, SPI_IMR);
-	if (sr & SPI_SR_ENDRX) {
-		sc->rxdone++;
-		WR4(sc, SPI_IDR, SPI_SR_ENDRX);
-		wakeup(&sc->rxdone);
+	if ((sr & SPI_SR_RXBUFF) != 0) {
+		sc->xfer_done = 1;
+		WR4(sc, SPI_IDR, SPI_SR_RXBUFF);
+		wakeup(&sc->xfer_done);
 	}
-	if (sr & ~SPI_SR_ENDRX) {
+	if ((sr & ~SPI_SR_RXBUFF) != 0) {
 		device_printf(sc->dev, "Unexpected ISR %#x\n", sr);
-		WR4(sc, SPI_IDR, sr & ~SPI_SR_ENDRX);
+		WR4(sc, SPI_IDR, sr & ~SPI_SR_RXBUFF);
 	}
 }
 
@@ -293,7 +404,8 @@
 
 	/* spibus interface */
 	DEVMETHOD(spibus_transfer,	at91_spi_transfer),
-	{ 0, 0 }
+
+	DEVMETHOD_END
 };
 
 static driver_t at91_spi_driver = {
@@ -302,4 +414,5 @@
 	sizeof(struct at91_spi_softc),
 };
 
-DRIVER_MODULE(at91_spi, atmelarm, at91_spi_driver, at91_spi_devclass, 0, 0);
+DRIVER_MODULE(at91_spi, atmelarm, at91_spi_driver, at91_spi_devclass, NULL,
+    NULL);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_spireg.h
--- a/head/sys/arm/at91/at91_spireg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_spireg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -23,7 +23,7 @@
  * SUCH DAMAGE.
  */
 
-/* $FreeBSD$ */
+/* $FreeBSD: head/sys/arm/at91/at91_spireg.h 236495 2012-06-03 00:54:10Z marius $ */
 
 #ifndef ARM_AT91_AT91_SPIREG_H
 #define ARM_AT91_AT91_SPIREG_H
@@ -54,6 +54,8 @@
 #define	  SPI_SR_ENDTX		0x00020
 #define	  SPI_SR_RXBUFF		0x00040
 #define	  SPI_SR_TXBUFE		0x00080
+#define	  SPI_SR_NSSR		0x00100
+#define	  SPI_SR_TXEMPTY	0x00200
 #define	  SPI_SR_SPIENS		0x10000
 #define	SPI_IER		0x14		/* IER: Interrupt Enable Regsiter */
 #define	SPI_IDR		0x18		/* IDR: Interrupt Disable Regsiter */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_ssc.c
--- a/head/sys/arm/at91/at91_ssc.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_ssc.c	Wed Jul 25 17:18:25 2012 +0300
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/at91/at91_ssc.c 225882 2011-09-30 04:55:23Z kevlo $");
+__FBSDID("$FreeBSD: head/sys/arm/at91/at91_ssc.c 236989 2012-06-13 04:52:19Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -214,7 +214,7 @@
 	return;
 }
 
-static int 
+static int
 at91_ssc_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
 {
 	struct at91_ssc_softc *sc;
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_st.c
--- a/head/sys/arm/at91/at91_st.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_st.c	Wed Jul 25 17:18:25 2012 +0300
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/at91/at91_st.c 230133 2012-01-15 13:23:33Z uqs $");
+__FBSDID("$FreeBSD: head/sys/arm/at91/at91_st.c 238376 2012-07-11 20:17:14Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -43,23 +43,45 @@
 #include <machine/resource.h>
 #include <machine/frame.h>
 #include <machine/intr.h>
-#include <arm/at91/at91rm92reg.h>
 #include <arm/at91/at91var.h>
 #include <arm/at91/at91_streg.h>
+#include <arm/at91/at91rm92reg.h>
 
-static struct at91st_softc {
-	bus_space_tag_t		sc_st;
-	bus_space_handle_t	sc_sh;
-	device_t		sc_dev;
+static struct at91_st_softc {
+	struct resource *	sc_irq_res;
+	struct resource	*	sc_mem_res;
+	void *			sc_intrhand;
 	eventhandler_tag	sc_wet;	/* watchdog event handler tag */
 } *timer_softc;
 
-#define RD4(off) \
-	bus_space_read_4(timer_softc->sc_st, timer_softc->sc_sh, (off))
-#define WR4(off, val) \
-	bus_space_write_4(timer_softc->sc_st, timer_softc->sc_sh, (off), (val))
+static inline uint32_t
+RD4(bus_size_t off)
+{
 
-static void at91st_watchdog(void *, u_int, int *);
+	if (timer_softc == NULL) {
+		uint32_t *p = (uint32_t *)(AT91_BASE + AT91RM92_ST_BASE + off);
+
+		return *p;
+	}
+
+	return (bus_read_4(timer_softc->sc_mem_res, off));
+}
+
+static inline void
+WR4(bus_size_t off, uint32_t val)
+{
+
+	if (timer_softc == NULL) {
+		uint32_t *p = (uint32_t *)(AT91_BASE + AT91RM92_ST_BASE + off);
+
+		*p = val;
+	}
+	else
+		bus_write_4(timer_softc->sc_mem_res, off, val);
+}
+
+static void at91_st_watchdog(void *, u_int, int *);
+static void at91_st_initclocks(device_t , struct at91_st_softc *);
 
 static inline int
 st_crtr(void)
@@ -72,10 +94,10 @@
 	return (cur1);
 }
 
-static unsigned at91st_get_timecount(struct timecounter *tc);
+static unsigned at91_st_get_timecount(struct timecounter *tc);
 
-static struct timecounter at91st_timecounter = {
-	at91st_get_timecount, /* get_timecount */
+static struct timecounter at91_st_timecounter = {
+	at91_st_get_timecount, /* get_timecount */
 	NULL, /* no poll_pps */
 	0xfffffu, /* counter_mask */
 	32768, /* frequency */
@@ -84,93 +106,6 @@
 };
 
 static int
-at91st_probe(device_t dev)
-{
-
-	device_set_desc(dev, "ST");
-	return (0);
-}
-
-static int
-at91st_attach(device_t dev)
-{
-	struct at91_softc *sc = device_get_softc(device_get_parent(dev));
-
-	timer_softc = device_get_softc(dev);
-	timer_softc->sc_st = sc->sc_st;
-	timer_softc->sc_dev = dev;
-	if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91RM92_ST_BASE,
-	    AT91RM92_ST_SIZE, &timer_softc->sc_sh) != 0)
-		panic("couldn't subregion timer registers");
-	/*
-	 * Real time counter increments every clock cycle, need to set before
-	 * initializing clocks so that DELAY works.
-	 */
-	WR4(ST_RTMR, 1);
-	/* Disable all interrupts */
-	WR4(ST_IDR, 0xffffffff);
-	/* disable watchdog timer */
-	WR4(ST_WDMR, 0);
-
-	timer_softc->sc_wet = EVENTHANDLER_REGISTER(watchdog_list,
-	  at91st_watchdog, dev, 0);
-	device_printf(dev,
-	  "watchdog registered, timeout intervall max. 64 sec\n");
-	return (0);
-}
-
-static device_method_t at91st_methods[] = {
-	DEVMETHOD(device_probe, at91st_probe),
-	DEVMETHOD(device_attach, at91st_attach),
-	{0, 0},
-};
-
-static driver_t at91st_driver = {
-	"at91_st",
-	at91st_methods,
-	sizeof(struct at91st_softc),
-};
-static devclass_t at91st_devclass;
-
-DRIVER_MODULE(at91_st, atmelarm, at91st_driver, at91st_devclass, 0, 0);
-
-static unsigned
-at91st_get_timecount(struct timecounter *tc)
-{
-	return (st_crtr());
-}
-
-/*
- * t below is in a weird unit.  The watchdog is set to 2^t
- * nanoseconds.  Since our watchdog timer can't really do that too
- * well, we approximate it by assuming that the timeout interval for
- * the lsb is 2^22 ns, which is 4.194ms.  This is an overestimation of
- * the actual time (3.906ms), but close enough for watchdogging.
- * These approximations, though a violation of the spec, improve the
- * performance of the application which typically specifies things as
- * WD_TO_32SEC.  In that last case, we'd wait 32s before the wdog
- * reset.  The spec says we should wait closer to 34s, but given how
- * it is likely to be used, and the extremely coarse nature time
- * interval, I think this is the best solution.
- */
-static void
-at91st_watchdog(void *argp, u_int cmd, int *error)
-{
-	uint32_t wdog;
-	int t;
-
-	t = cmd & WD_INTERVAL;
-	if (t >= 22 && t <= 37) {
-		wdog = (1 << (t - 22)) | ST_WDMR_RSTEN;
-		*error = 0;
-	} else {
-		wdog = 0;
-	}
-	WR4(ST_WDMR, wdog);
-	WR4(ST_CR, ST_CR_WDRST);
-}
-
-static int
 clock_intr(void *arg)
 {
 	struct trapframe *fp = arg;
@@ -184,42 +119,7 @@
 }
 
 void
-cpu_initclocks(void)
-{
-	int rel_value;
-	struct resource *irq;
-	int rid = 0;
-	void *ih;
-	device_t dev = timer_softc->sc_dev;
-
-	rel_value = 32768 / hz;
-	if (rel_value < 1)
-		rel_value = 1;
-	if (32768 % hz) {
-		printf("Cannot get %d Hz clock; using %dHz\n", hz, 32768 / rel_value);
-		hz = 32768 / rel_value;
-		tick = 1000000 / hz;
-	}
-	/* Disable all interrupts. */
-	WR4(ST_IDR, 0xffffffff);
-	/* The system timer shares the system irq (1) */
-	irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 1, 1, 1,
-	  RF_ACTIVE | RF_SHAREABLE);
-	if (!irq)
-		panic("Unable to allocate irq for the system timer");
-	else
-		bus_setup_intr(dev, irq, INTR_TYPE_CLK,
-		    clock_intr, NULL, NULL, &ih);
-
-	WR4(ST_PIMR, rel_value);
-
-	/* Enable PITS interrupts. */
-	WR4(ST_IER, ST_SR_PITS);
-	tc_init(&at91st_timecounter);
-}
-
-void
-DELAY(int n)
+at91_st_delay(int n)
 {
 	uint32_t start, end, cur;
 
@@ -239,7 +139,7 @@
 }
 
 void
-cpu_reset(void)
+at91_st_cpu_reset(void)
 {
 	/*
 	 * Reset the CPU by programmig the watchdog timer to reset the
@@ -252,12 +152,162 @@
 		continue;
 }
 
-void
-cpu_startprofclock(void)
+static int
+at91_st_probe(device_t dev)
 {
+
+	device_set_desc(dev, "ST");
+	return (0);
 }
 
-void
-cpu_stopprofclock(void)
+static void
+at91_st_deactivate(device_t dev)
 {
+	struct at91_st_softc *sc = timer_softc;
+
+	if (sc->sc_intrhand)
+		bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_intrhand);
+	sc->sc_intrhand = NULL;
+
+	if (sc->sc_irq_res)
+		bus_release_resource(dev, SYS_RES_IRQ,
+		    rman_get_rid(sc->sc_irq_res), sc->sc_irq_res);
+	sc->sc_irq_res = NULL;
+
+	if (sc->sc_mem_res)
+		bus_release_resource(dev, SYS_RES_MEMORY,
+		    rman_get_rid(sc->sc_mem_res), sc->sc_mem_res);
+	sc->sc_mem_res = NULL;
 }
+
+static int
+at91_st_activate(device_t dev)
+{
+	int rid;
+	int err;
+	struct at91_st_softc *sc = timer_softc;
+
+	rid = 0;
+	sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
+	    RF_ACTIVE);
+	err = ENOMEM;
+	if (sc->sc_mem_res == NULL)
+		goto out;
+	/* Disable all interrupts */
+	WR4(ST_IDR, 0xffffffff);
+
+	/* The system timer shares the system irq (1) */
+	rid = 0;
+	sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
+	    RF_ACTIVE | RF_SHAREABLE);
+	if (sc->sc_irq_res == NULL) {
+		printf("Unable to allocate irq for the system timer");
+		goto out;
+	}
+	err = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_CLK, clock_intr,
+	    NULL, NULL, &sc->sc_intrhand);
+out:
+	if (err != 0)
+		at91_st_deactivate(dev);
+	return (err);
+}
+
+static int
+at91_st_attach(device_t dev)
+{
+	int err;
+
+	timer_softc = device_get_softc(dev);
+	err = at91_st_activate(dev);
+	if (err)
+		return err;
+
+	timer_softc->sc_wet = EVENTHANDLER_REGISTER(watchdog_list,
+	  at91_st_watchdog, dev, 0);
+
+	device_printf(dev,
+	  "watchdog registered, timeout intervall max. 64 sec\n");
+
+	at91_st_initclocks(dev, timer_softc);
+	return (0);
+}
+
+static device_method_t at91_st_methods[] = {
+	DEVMETHOD(device_probe, at91_st_probe),
+	DEVMETHOD(device_attach, at91_st_attach),
+	{0, 0},
+};
+
+static driver_t at91_st_driver = {
+	"at91_st",
+	at91_st_methods,
+	sizeof(struct at91_st_softc),
+};
+static devclass_t at91_st_devclass;
+
+DRIVER_MODULE(at91_st, atmelarm, at91_st_driver, at91_st_devclass, 0, 0);
+
+static unsigned
+at91_st_get_timecount(struct timecounter *tc)
+{
+	return (st_crtr());
+}
+
+/*
+ * t below is in a weird unit.  The watchdog is set to 2^t
+ * nanoseconds.  Since our watchdog timer can't really do that too
+ * well, we approximate it by assuming that the timeout interval for
+ * the lsb is 2^22 ns, which is 4.194ms.  This is an overestimation of
+ * the actual time (3.906ms), but close enough for watchdogging.
+ * These approximations, though a violation of the spec, improve the
+ * performance of the application which typically specifies things as
+ * WD_TO_32SEC.  In that last case, we'd wait 32s before the wdog
+ * reset.  The spec says we should wait closer to 34s, but given how
+ * it is likely to be used, and the extremely coarse nature time
+ * interval, I think this is the best solution.
+ */
+static void
+at91_st_watchdog(void *argp, u_int cmd, int *error)
+{
+	uint32_t wdog;
+	int t;
+
+	t = cmd & WD_INTERVAL;
+	if (t >= 22 && t <= 37) {
+		wdog = (1 << (t - 22)) | ST_WDMR_RSTEN;
+		*error = 0;
+	} else {
+		wdog = 0;
+	}
+	WR4(ST_WDMR, wdog);
+	WR4(ST_CR, ST_CR_WDRST);
+}
+
+static void
+at91_st_initclocks(device_t dev, struct at91_st_softc *sc)
+{
+	int rel_value;
+
+	/*
+	 * Real time counter increments every clock cycle, need to set before
+	 * initializing clocks so that DELAY works.
+	 */
+	WR4(ST_RTMR, 1);
+	/* disable watchdog timer */
+	WR4(ST_WDMR, 0);
+
+	rel_value = 32768 / hz;
+	if (rel_value < 1)
+		rel_value = 1;
+	if (32768 % hz) {
+		device_printf(dev, "Cannot get %d Hz clock; using %dHz\n", hz,
+		    32768 / rel_value);
+		hz = 32768 / rel_value;
+		tick = 1000000 / hz;
+	}
+	WR4(ST_PIMR, rel_value);
+
+	/* Enable PITS interrupts. */
+	WR4(ST_IER, ST_SR_PITS);
+	tc_init(&at91_st_timecounter);
+}
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_streg.h
--- a/head/sys/arm/at91/at91_streg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_streg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -23,7 +23,7 @@
  * SUCH DAMAGE.
  */
 
-/* $FreeBSD$ */
+/* $FreeBSD: head/sys/arm/at91/at91_streg.h 238376 2012-07-11 20:17:14Z imp $ */
 
 #ifndef ARM_AT91_AT91STREG_H
 #define ARM_AT91_AT91STREG_H
@@ -55,4 +55,7 @@
 /* ST_CRTR */
 #define ST_CRTR_MASK	0xfffff /* 20-bit counter */
 
+void at91_st_delay(int n);
+void at91_st_cpu_reset(void);
+
 #endif /* ARM_AT91_AT91STREG_H */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_twi.c
--- a/head/sys/arm/at91/at91_twi.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_twi.c	Wed Jul 25 17:18:25 2012 +0300
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/at91/at91_twi.c 234293 2012-04-14 17:27:34Z marius $");
+__FBSDID("$FreeBSD: head/sys/arm/at91/at91_twi.c 237432 2012-06-22 06:44:22Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -284,7 +284,6 @@
 	WR4(sc, TWI_CR, TWI_CR_SWRST);
 	WR4(sc, TWI_CR, TWI_CR_MSEN | TWI_CR_SVDIS);
 	WR4(sc, TWI_CWGR, sc->cwgr);
-	printf("setting cwgr to %#x\n", sc->cwgr);
 	AT91_TWI_UNLOCK(sc);
 
 	return 0;
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91_wdtreg.h
--- a/head/sys/arm/at91/at91_wdtreg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91_wdtreg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -23,8 +23,8 @@
  * SUCH DAMAGE.
  */
 
-/* 
- * $FreeBSD$
+/*
+ * $FreeBSD: head/sys/arm/at91/at91_wdtreg.h 236989 2012-06-13 04:52:19Z imp $
  */
 
 #ifndef ARM_AT91_AT91WDTREG_H
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91board.h
--- a/head/sys/arm/at91/at91board.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91board.h	Wed Jul 25 17:18:25 2012 +0300
@@ -23,7 +23,7 @@
  * SUCH DAMAGE.
  */
 
-/* $FreeBSD$ */
+/* $FreeBSD: head/sys/arm/at91/at91board.h 238189 2012-07-07 05:02:39Z imp $ */
 
 #ifndef _ARM_AT91_AT91BOARD_H_
 #define _ARM_AT91_AT91BOARD_H_
@@ -33,9 +33,4 @@
  */
 long at91_ramsize(void);
 
-/*
- * These routines are expected to be provided by the board files.
- */
-long board_init(void);
-
 #endif /* _ARM_AT91_AT91BOARD_H_ */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91reg.h
--- a/head/sys/arm/at91/at91reg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91reg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -24,7 +24,7 @@
  */
 
 /*
- * $FreeBSD: head/sys/arm/at91/at91reg.h 234291 2012-04-14 17:09:38Z marius $
+ * $FreeBSD: head/sys/arm/at91/at91reg.h 238331 2012-07-10 02:39:03Z imp $
  */
 
 #ifndef _AT91REG_H_
@@ -35,6 +35,9 @@
 /* Where builtin peripherals start in KVM */
 #define	AT91_BASE		0xd0000000
 
+/* Where builtin peripherals start PA */
+#define	AT91_PA_BASE		0xf0000000
+
 /* A few things that we count on being the same
  * throught the whole family of SOCs */
 
@@ -43,32 +46,45 @@
 #define	AT91_SYS_BASE	0xffff000
 #define	AT91_SYS_SIZE	0x1000
 
-#if defined(AT91SAM9G45) || defined(AT91SAM9263)
-#define	AT91_DBGU_BASE	0xfffee00
-#else
-#define	AT91_DBGU_BASE	0xffff200
-#endif
+#define AT91_DBGU0	0x0ffff200	/* Most */
+#define AT91_DBGU1	0x0fffee00	/* SAM9263, CAP9, and SAM9G45 */
+
 #define	AT91_DBGU_SIZE	0x200
 #define	DBGU_C1R		(64) /* Chip ID1 Register */
 #define	DBGU_C2R		(68) /* Chip ID2 Register */
 #define	DBGU_FNTR		(72) /* Force NTRST Register */
 
 #define	AT91_CPU_VERSION_MASK	0x0000001f
-#define	AT91_CPU_RM9200   	0x09290780
-#define	AT91_CPU_SAM9260  	0x019803a0
-#define	AT91_CPU_SAM9261  	0x019703a0
-#define	AT91_CPU_SAM9263  	0x019607a0
-#define	AT91_CPU_SAM9G10  	0x819903a0
-#define	AT91_CPU_SAM9G20  	0x019905a0
-#define	AT91_CPU_SAM9G45  	0x819b05a0
+#define	AT91_CPU_FAMILY_MASK    0x0ff00000
+
+#define	AT91_CPU_RM9200 	0x09290780
+#define	AT91_CPU_SAM9260	0x019803a0
+#define	AT91_CPU_SAM9261	0x019703a0
+#define	AT91_CPU_SAM9263	0x019607a0
+#define	AT91_CPU_SAM9G10	0x819903a0
+#define	AT91_CPU_SAM9G20	0x019905a0
+#define	AT91_CPU_SAM9G45	0x819b05a0
+#define	AT91_CPU_SAM9N12        0x819a07a0
+#define	AT91_CPU_SAM9RL64	0x019b03a0
+#define	AT91_CPU_SAM9X5		0x819a05a0
+
 #define	AT91_CPU_SAM9XE128	0x329973a0
 #define	AT91_CPU_SAM9XE256	0x329a93a0
 #define	AT91_CPU_SAM9XE512	0x329aa3a0
 
-#define	AT91_ARCH(chipid)	((chipid >> 20) & 0xff)
-#define	AT91_CPU(chipid)	(chipid & ~AT91_CPU_VERSION_MASK)
-#define	AT91_ARCH_SAM9		(0x19)
-#define	AT91_ARCH_SAM9XE	(0x29)
-#define	AT91_ARCH_RM92		(0x92)
+#define	AT91_CPU_CAP9           0x039a03a0
+
+#define	AT91_EXID_SAM9M11	0x00000001
+#define	AT91_EXID_SAM9M10	0x00000002
+#define	AT91_EXID_SAM9G46	0x00000003
+#define	AT91_EXID_SAM9G45	0x00000004
+
+#define	AT91_EXID_SAM9G15	0x00000000
+#define	AT91_EXID_SAM9G35	0x00000001
+#define	AT91_EXID_SAM9X35	0x00000002
+#define	AT91_EXID_SAM9G25	0x00000003
+#define	AT91_EXID_SAM9X25	0x00000004
+
+#define AT91_IRQ_SYSTEM		1
 
 #endif /* _AT91REG_H_ */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91rm9200.c
--- a/head/sys/arm/at91/at91rm9200.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91rm9200.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/at91/at91rm9200.c 238397 2012-07-12 13:45:58Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -38,20 +38,14 @@
 #include <machine/bus.h>
 
 #include <arm/at91/at91var.h>
+#include <arm/at91/at91reg.h>
 #include <arm/at91/at91rm92reg.h>
 #include <arm/at91/at91_aicreg.h>
 #include <arm/at91/at91_pmcreg.h>
+#include <arm/at91/at91_streg.h>
 #include <arm/at91/at91_pmcvar.h>
+#include <arm/at91/at91soc.h>
 
-struct at91rm92_softc {
-	device_t dev;
-	bus_space_tag_t sc_st;
-	bus_space_handle_t sc_sh;
-	bus_space_handle_t sc_sys_sh;
-	bus_space_handle_t sc_aic_sh;
-	bus_space_handle_t sc_dbg_sh;
-	bus_space_handle_t sc_matrix_sh;
-};
 /*
  * Standard priority levels for the system.  0 is lowest and 7 is highest.
  * These values are the ones Atmel uses for its Linux port, which differ
@@ -135,140 +129,29 @@
 	{	0, 0, 0, 0, 0 }
 };
 
-static void
-at91_add_child(device_t dev, int prio, const char *name, int unit,
-    bus_addr_t addr, bus_size_t size, int irq0, int irq1, int irq2)
-{
-	device_t kid;
-	struct at91_ivar *ivar;
-
-	kid = device_add_child_ordered(dev, prio, name, unit);
-	if (kid == NULL) {
-	    printf("Can't add child %s%d ordered\n", name, unit);
-	    return;
-	}
-	ivar = malloc(sizeof(*ivar), M_DEVBUF, M_NOWAIT | M_ZERO);
-	if (ivar == NULL) {
-		device_delete_child(dev, kid);
-		printf("Can't add alloc ivar\n");
-		return;
-	}
-	device_set_ivars(kid, ivar);
-	resource_list_init(&ivar->resources);
-	if (irq0 != -1) {
-		bus_set_resource(kid, SYS_RES_IRQ, 0, irq0, 1);
-		if (irq0 != AT91RM92_IRQ_SYSTEM)
-			at91_pmc_clock_add(device_get_nameunit(kid), irq0, 0);
-	}
-	if (irq1 != 0)
-		bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1);
-	if (irq2 != 0)
-		bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1);
-	if (addr != 0 && addr < AT91RM92_BASE) 
-		addr += AT91RM92_BASE;
-	if (addr != 0)
-		bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size);
-}
-
-static void
-at91_cpu_add_builtin_children(device_t dev)
-{
-	int i;
-	const struct cpu_devs *walker;
-	
-	for (i = 1, walker = at91_devs; walker->name; i++, walker++) {
-		at91_add_child(dev, i, walker->name, walker->unit,
-		    walker->mem_base, walker->mem_len, walker->irq0,
-		    walker->irq1, walker->irq2);
-	}
-}
-
 static uint32_t
 at91_pll_outb(int freq)
 {
 
 	if (freq > 155000000)
 		return (0x0000);
-	else 
+	else
 		return (0x8000);
 }
 
-static void
-at91_identify(driver_t *drv, device_t parent)
-{
-
-	if (at91_cpu_is(AT91_CPU_RM9200)) {
-		at91_add_child(parent, 0, "at91rm920", 0, 0, 0, -1, 0, 0);
-		at91_cpu_add_builtin_children(parent);
-	}
-}
-
-static int
-at91_probe(device_t dev)
-{
-
-	if (at91_cpu_is(AT91_CPU_RM9200)) {
-		device_set_desc(dev, "AT91RM9200");
-		return (0);
-	}
-	return (ENXIO);
-}
-
-static int
-at91_attach(device_t dev)
-{
-	struct at91_pmc_clock *clk;
-	struct at91rm92_softc *sc = device_get_softc(dev);
-	int i;
-
-	struct at91_softc *at91sc = device_get_softc(device_get_parent(dev));
-
-	sc->sc_st = at91sc->sc_st;
-	sc->sc_sh = at91sc->sc_sh;
-	sc->dev = dev;
-
-	if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91RM92_SYS_BASE,
-	    AT91RM92_SYS_SIZE, &sc->sc_sys_sh) != 0)
-		panic("Enable to map system registers");
-
-	if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91RM92_DBGU_BASE,
-	    AT91RM92_DBGU_SIZE, &sc->sc_dbg_sh) != 0)
-		panic("Enable to map DBGU registers");
-
-	if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91RM92_AIC_BASE,
-	    AT91RM92_AIC_SIZE, &sc->sc_aic_sh) != 0)
-		panic("Enable to map system registers");
-
-	/* XXX Hack to tell atmelarm about the AIC */
-	at91sc->sc_aic_sh = sc->sc_aic_sh;
-	at91sc->sc_irq_system = AT91RM92_IRQ_SYSTEM;
-
-	for (i = 0; i < 32; i++) {
-		bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + 
-		    i * 4, i);
-		/* Priority. */
-		bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SMR + i * 4,
-		    at91_irq_prio[i]);
-		if (i < 8)
-			bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_EOICR,
-			    1);
-	}
-
-	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SPU, 32);
-	/* No debug. */
-	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_DCR, 0);
-	/* Disable and clear all interrupts. */
-	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff);
-	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff);
-
+#if 0
+/* -- XXX are these needed? */
 	/* Disable all interrupts for RTC (0xe24 == RTC_IDR) */
 	bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0xe24, 0xffffffff);
 
 	/* Disable all interrupts for the SDRAM controller */
 	bus_space_write_4(sc->sc_st, sc->sc_sys_sh, 0xfa8, 0xffffffff);
+#endif
 
-	/* Disable all interrupts for DBGU */
-	bus_space_write_4(sc->sc_st, sc->sc_dbg_sh, 0x0c, 0xffffffff);
+static void
+at91_clock_init(void)
+{
+	struct at91_pmc_clock *clk;
 
 	/* Update USB device port clock info */
 	clk = at91_pmc_clock_ref("udpck");
@@ -304,23 +187,14 @@
 	clk->pll_div_mask  = RM9200_PLL_B_DIV_MASK;
 	clk->set_outb      = at91_pll_outb;
 	at91_pmc_clock_deref(clk);
-
-	return (0);
 }
 
-static device_method_t at91_methods[] = {
-	DEVMETHOD(device_probe, at91_probe),
-	DEVMETHOD(device_attach, at91_attach),
-	DEVMETHOD(device_identify, at91_identify),
-	{0, 0},
+static struct at91_soc_data soc_data = {
+	.soc_delay = at91_st_delay,
+	.soc_reset = at91_st_cpu_reset,
+	.soc_clock_init = at91_clock_init,
+	.soc_irq_prio = at91_irq_prio,
+	.soc_children = at91_devs,
 };
 
-static driver_t at91rm92_driver = {
-	"at91rm920",
-	at91_methods,
-	sizeof(struct at91rm92_softc),
-};
-
-static devclass_t at91rm92_devclass;
-
-DRIVER_MODULE(at91rm920, atmelarm, at91rm92_driver, at91rm92_devclass, 0, 0);
+AT91_SOC(AT91_T_RM9200, &soc_data);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91rm9200_devices.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/at91/at91rm9200_devices.c	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,142 @@
+/*-
+ * Copyright (c) 2012 M. 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: head/sys/arm/at91/at91rm9200_devices.c 238465 2012-07-15 05:41:43Z imp $");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/malloc.h>
+#include <sys/module.h>
+
+#define	_ARM32_BUS_DMA_PRIVATE
+#include <machine/bus.h>
+
+#include <arm/at91/at91var.h>
+#include <arm/at91/at91board.h>
+#include <arm/at91/at91rm92reg.h>
+#include <arm/at91/at91rm9200var.h>
+#include <arm/at91/at91_pioreg.h>
+#include <arm/at91/at91_piovar.h>
+
+/*
+ * The AT91RM9200 uses the same silicon for both the BGA and PQFP
+ * packages.  There's no documented way to detect this at runtime,
+ * so we require the board code to register what type of SoC is on the
+ * board in question.  The pinouts are not quite compatible, and we
+ * use this information to cope with the slight differences.
+ */
+void
+at91rm9200_set_subtype(enum at91_soc_subtype st)
+{
+
+	switch (st) {
+	case AT91_ST_RM9200_BGA:
+	case AT91_ST_RM9200_PQFP:
+		soc_info.subtype = st;
+		break;
+	default:
+		panic("Bad SoC subtype %d for at91rm9200_set_subtype.", st);
+		break;
+	}
+}
+
+void
+at91rm9200_config_uart(unsigned devid, unsigned unit, unsigned pinmask)
+{
+
+	/*
+	 * 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.
+	 */
+
+	/*
+	 * Current boards supported don't need the extras, but they should be
+	 * implemented.  But that should wait until the new pin api goes in.
+	 */
+	switch (devid) {
+	case AT91_ID_DBGU:
+		at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA30, 0); /* DRXD */
+		at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA31, 1); /* DTXD */
+		break;
+
+	case AT91RM9200_ID_USART0:
+		at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA17, 1); /* TXD0 */
+		at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA19, 0); /* RXD0 */
+		/* CTS PA20 */
+		/* RTS -- errata #39 PA21 */
+		break;
+
+	case AT91RM9200_ID_USART1:
+		at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PIO_PB20, 1); /* TXD1 */
+		at91_pio_use_periph_a(AT91RM92_PIOB_BASE, AT91C_PIO_PB21, 0); /* RXD1 */
+		/* RI - PB18 */
+		/* DTR - PB19 */
+		/* DCD - PB23 */
+		/* CTS - PB24 */
+		/* DSR - PB25 */
+		/* RTS - PB26 */
+		break;
+
+	case AT91RM9200_ID_USART2:
+		at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA22, 0); /* RXD2 */
+		at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA23, 1); /* TXD2 */
+		/* CTS - PA30 B periph */
+		/* RTS - PA31 B periph */
+		break;
+
+	case AT91RM9200_ID_USART3:
+		at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PIO_PA5, 1); /* TXD3 */
+		at91_pio_use_periph_b(AT91RM92_PIOA_BASE, AT91C_PIO_PA6, 0); /* RXD3 */
+		/* CTS - PB0 B periph */
+		/* RTS - PB1 B periph */
+		break;
+
+	default:
+		break;
+	}
+}
+
+void
+at91rm9200_config_mci(int has_4wire)
+{
+	/* XXX TODO chip changed GPIO, other slots, etc */
+	at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA27,  0); /* MCCK */
+	at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA28, 1);  /* MCCDA */
+	at91_pio_use_periph_a(AT91RM92_PIOA_BASE, AT91C_PIO_PA29, 1);  /* MCDA0 */
+	if (has_4wire) {
+		at91_pio_use_periph_b(AT91RM92_PIOB_BASE, AT91C_PIO_PB3, 1); /* MCDA1 */
+		at91_pio_use_periph_b(AT91RM92_PIOB_BASE, AT91C_PIO_PB4, 1); /* MCDA2 */
+		at91_pio_use_periph_b(AT91RM92_PIOB_BASE, AT91C_PIO_PB5, 1); /* MCDA3 */
+	}
+}
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91rm9200var.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/at91/at91rm9200var.h	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,58 @@
+/*-
+ * Copyright (c) 2012 M. 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.
+ */
+
+/* $FreeBSD: head/sys/arm/at91/at91rm9200var.h 238465 2012-07-15 05:41:43Z imp $ */
+
+#ifndef ARM_AT91_AT91RM9200VAR_H
+#define ARM_AT91_AT91RM9200VAR_H
+
+void at91rm9200_set_subtype(enum at91_soc_subtype st);
+
+#define AT91RM9200_ID_USART0	1
+#define AT91RM9200_ID_USART1	2
+#define AT91RM9200_ID_USART2	3
+#define AT91RM9200_ID_USART3	4
+
+/*
+ * Serial port convenience routines
+ */
+/* uart pins that are wired... */
+#define	AT91_UART_CTS	0x01
+#define	AT91_UART_RTS	0x02
+#define	AT91_UART_RI    0x04
+#define	AT91_UART_DTR	0x08
+#define AT91_UART_DCD	0x10
+#define	AT91_UART_DSR	0x20
+
+#define AT91_ID_DBGU	0
+
+void at91rm9200_config_uart(unsigned devid, unsigned unit, unsigned pinmask);
+
+/*
+ * MCI (sd/mmc card support)
+ */
+void at91rm9200_config_mci(int has_4wire);
+
+#endif /* ARM_AT91_AT91RM9200VAR_H */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91rm92reg.h
--- a/head/sys/arm/at91/at91rm92reg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91rm92reg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -23,7 +23,7 @@
  * SUCH DAMAGE.
  */
 
-/* $FreeBSD$ */
+/* $FreeBSD: head/sys/arm/at91/at91rm92reg.h 238330 2012-07-10 02:14:50Z imp $ */
 
 #ifndef AT91RM92REG_H_
 #define AT91RM92REG_H_
@@ -34,9 +34,9 @@
 #define RM9200_PLL_A_MIN_OUT_FREQ	 80000000 /*  80 MHz */
 #define RM9200_PLL_A_MAX_OUT_FREQ	180000000 /* 180 MHz */
 #define RM9200_PLL_A_MUL_SHIFT 16
-#define RM9200_PLL_A_MUL_MASK 0x7FF 
+#define RM9200_PLL_A_MUL_MASK 0x7FF
 #define RM9200_PLL_A_DIV_SHIFT 0
-#define RM9200_PLL_A_DIV_MASK 0xFF 
+#define RM9200_PLL_A_DIV_MASK 0xFF
 
 /*
  * PLL B input frequency spec sheet says it must be between 1MHz and 32MHz,
@@ -51,10 +51,11 @@
 #define RM9200_PLL_B_MIN_OUT_FREQ	 30000000 /*  30 MHz */
 #define RM9200_PLL_B_MAX_OUT_FREQ	240000000 /* 240 MHz */
 #define RM9200_PLL_B_MUL_SHIFT 16
-#define RM9200_PLL_B_MUL_MASK 0x7FF 
+#define RM9200_PLL_B_MUL_MASK 0x7FF
 #define RM9200_PLL_B_DIV_SHIFT 0
-#define RM9200_PLL_B_DIV_MASK 0xFF 
-/* 
+#define RM9200_PLL_B_DIV_MASK 0xFF
+
+/*
  * Memory map, from datasheet :
  * 0x00000000 - 0x0ffffffff : Internal Memories
  * 0x10000000 - 0x1ffffffff : Chip Select 0
@@ -69,7 +70,6 @@
  * 0xf0000000 - 0xfffffffff : Peripherals
  */
 
-#define AT91RM92_BASE		0xd0000000
 /* Usart */
 
 #define AT91RM92_USART_SIZE	0x4000
@@ -91,146 +91,6 @@
 #define AT91RM92_SYS_BASE	0xffff000
 #define AT91RM92_SYS_SIZE	0x1000
 
-#if  0
-/* Interrupt Controller */
-#define IC_SMR			(0) /* Source mode register */
-#define IC_SVR			(128) /* Source vector register */
-#define IC_IVR			(256) /* IRQ vector register */
-#define IC_FVR			(260) /* FIQ vector register */
-#define IC_ISR			(264) /* Interrupt status register */
-#define IC_IPR			(268) /* Interrupt pending register */
-#define IC_IMR			(272) /* Interrupt status register */
-#define IC_CISR			(276) /* Core interrupt status register */
-#define IC_IECR			(288) /* Interrupt enable command register */
-#define IC_IDCR			(292) /* Interrupt disable command register */
-#define IC_ICCR			(296) /* Interrupt clear command register */
-#define IC_ISCR			(300) /* Interrupt set command register */
-#define IC_EOICR		(304) /* End of interrupt command register */
-#define IC_SPU			(308) /* Spurious vector register */
-#define IC_DCR			(312) /* Debug control register */
-#define IC_FFER			(320) /* Fast forcing enable register */
-#define IC_FFDR			(324) /* Fast forcing disable register */
-#define IC_FFSR			(328) /* Fast forcing status register */
-
-
-#define PIOA_PER		(0x400) /* PIO Enable Register */
-#define PIOA_PDR		(0x400 + 4) /* PIO Disable Register */
-#define PIOA_PSR		(0x400 + 8) /* PIO status register */
-#define PIOA_OER		(0x400 + 16) /* Output enable register */
-#define PIOA_ODR		(0x400 + 20) /* Output disable register */
-#define PIOA_OSR		(0x400 + 24) /* Output status register */
-#define PIOA_IFER		(0x400 + 32) /* Input filter enable register */
-#define PIOA_IFDR		(0x400 + 36) /* Input filter disable register */
-#define PIOA_IFSR		(0x400 + 40) /* Input filter status register */
-#define PIOA_SODR		(0x400 + 48) /* Set output data register */
-#define PIOA_CODR		(0x400 + 52) /* Clear output data register */
-#define PIOA_ODSR		(0x400 + 56) /* Output data status register */
-#define PIOA_PDSR		(0x400 + 60) /* Pin data status register */
-#define PIOA_IER		(0x400 + 64) /* Interrupt enable register */
-#define PIOA_IDR		(0x400 + 68) /* Interrupt disable register */
-#define PIOA_IMR		(0x400 + 72) /* Interrupt mask register */
-#define PIOA_ISR		(0x400 + 76) /* Interrupt status register */
-#define PIOA_MDER		(0x400 + 80) /* Multi driver enable register */
-#define PIOA_MDDR		(0x400 + 84) /* Multi driver disable register */
-#define PIOA_MDSR		(0x400 + 88) /* Multi driver status register */
-#define PIOA_PPUDR		(0x400 + 96) /* Pull-up disable register */
-#define PIOA_PPUER		(0x400 + 100) /* Pull-up enable register */
-#define PIOA_PPUSR		(0x400 + 104) /* Pad pull-up status register */
-#define PIOA_ASR		(0x400 + 112) /* Select A register */
-#define PIOA_BSR		(0x400 + 116) /* Select B register */
-#define PIOA_ABSR		(0x400 + 120) /* AB Select status register */
-#define PIOA_OWER		(0x400 + 160) /* Output Write enable register */
-#define PIOA_OWDR		(0x400 + 164) /* Output write disable register */
-#define PIOA_OWSR		(0x400 + 168) /* Output write status register */
-#define PIOB_PER		(0x400) /* PIO Enable Register */
-#define PIOB_PDR		(0x600 + 4) /* PIO Disable Register */
-#define PIOB_PSR		(0x600 + 8) /* PIO status register */
-#define PIOB_OER		(0x600 + 16) /* Output enable register */
-#define PIOB_ODR		(0x600 + 20) /* Output disable register */
-#define PIOB_OSR		(0x600 + 24) /* Output status register */
-#define PIOB_IFER		(0x600 + 32) /* Input filter enable register */
-#define PIOB_IFDR		(0x600 + 36) /* Input filter disable register */
-#define PIOB_IFSR		(0x600 + 40) /* Input filter status register */
-#define PIOB_SODR		(0x600 + 48) /* Set output data register */
-#define PIOB_CODR		(0x600 + 52) /* Clear output data register */
-#define PIOB_ODSR		(0x600 + 56) /* Output data status register */
-#define PIOB_PDSR		(0x600 + 60) /* Pin data status register */
-#define PIOB_IER		(0x600 + 64) /* Interrupt enable register */
-#define PIOB_IDR		(0x600 + 68) /* Interrupt disable register */
-#define PIOB_IMR		(0x600 + 72) /* Interrupt mask register */
-#define PIOB_ISR		(0x600 + 76) /* Interrupt status register */
-#define PIOB_MDER		(0x600 + 80) /* Multi driver enable register */
-#define PIOB_MDDR		(0x600 + 84) /* Multi driver disable register */
-#define PIOB_MDSR		(0x600 + 88) /* Multi driver status register */
-#define PIOB_PPUDR		(0x600 + 96) /* Pull-up disable register */
-#define PIOB_PPUER		(0x600 + 100) /* Pull-up enable register */
-#define PIOB_PPUSR		(0x600 + 104) /* Pad pull-up status register */
-#define PIOB_ASR		(0x600 + 112) /* Select A register */
-#define PIOB_BSR		(0x600 + 116) /* Select B register */
-#define PIOB_ABSR		(0x600 + 120) /* AB Select status register */
-#define PIOB_OWER		(0x600 + 160) /* Output Write enable register */
-#define PIOB_OWDR		(0x600 + 164) /* Output write disable register */
-#define PIOB_OWSR		(0x600 + 168) /* Output write status register */
-#define PIOC_PER		(0x800) /* PIO Enable Register */
-#define PIOC_PDR		(0x800 + 4) /* PIO Disable Register */
-#define PIOC_PSR		(0x800 + 8) /* PIO status register */
-#define PIOC_OER		(0x800 + 16) /* Output enable register */
-#define PIOC_ODR		(0x800 + 20) /* Output disable register */
-#define PIOC_OSR		(0x800 + 24) /* Output status register */
-#define PIOC_IFER		(0x800 + 32) /* Input filter enable register */
-#define PIOC_IFDR		(0x800 + 36) /* Input filter disable register */
-#define PIOC_IFSR		(0x800 + 40) /* Input filter status register */
-#define PIOC_SODR		(0x800 + 48) /* Set output data register */
-#define PIOC_CODR		(0x800 + 52) /* Clear output data register */
-#define PIOC_ODSR		(0x800 + 56) /* Output data status register */
-#define PIOC_PDSR		(0x800 + 60) /* Pin data status register */
-#define PIOC_IER		(0x800 + 64) /* Interrupt enable register */
-#define PIOC_IDR		(0x800 + 68) /* Interrupt disable register */
-#define PIOC_IMR		(0x800 + 72) /* Interrupt mask register */
-#define PIOC_ISR		(0x800 + 76) /* Interrupt status register */
-#define PIOC_MDER		(0x800 + 80) /* Multi driver enable register */
-#define PIOC_MDDR		(0x800 + 84) /* Multi driver disable register */
-#define PIOC_MDSR		(0x800 + 88) /* Multi driver status register */
-#define PIOC_PPUDR		(0x800 + 96) /* Pull-up disable register */
-#define PIOC_PPUER		(0x800 + 100) /* Pull-up enable register */
-#define PIOC_PPUSR		(0x800 + 104) /* Pad pull-up status register */
-#define PIOC_ASR		(0x800 + 112) /* Select A register */
-#define PIOC_BSR		(0x800 + 116) /* Select B register */
-#define PIOC_ABSR		(0x800 + 120) /* AB Select status register */
-#define PIOC_OWER		(0x800 + 160) /* Output Write enable register */
-#define PIOC_OWDR		(0x800 + 164) /* Output write disable register */
-#define PIOC_OWSR		(0x800 + 168) /* Output write status register */
-#define PIOD_PER		(0xa00) /* PIO Enable Register */
-#define PIOD_PDR		(0xa00 + 4) /* PIO Disable Register */
-#define PIOD_PSR		(0xa00 + 8) /* PIO status register */
-#define PIOD_OER		(0xa00 + 16) /* Output enable register */
-#define PIOD_ODR		(0xa00 + 20) /* Output disable register */
-#define PIOD_OSR		(0xa00 + 24) /* Output status register */
-#define PIOD_IFER		(0xa00 + 32) /* Input filter enable register */
-#define PIOD_IFDR		(0xa00 + 36) /* Input filter disable register */
-#define PIOD_IFSR		(0xa00 + 40) /* Input filter status register */
-#define PIOD_SODR		(0xa00 + 48) /* Set output data register */
-#define PIOD_CODR		(0xa00 + 52) /* Clear output data register */
-#define PIOD_ODSR		(0xa00 + 56) /* Output data status register */
-#define PIOD_PDSR		(0xa00 + 60) /* Pin data status register */
-#define PIOD_IER		(0xa00 + 64) /* Interrupt enable register */
-#define PIOD_IDR		(0xa00 + 68) /* Interrupt disable register */
-#define PIOD_IMR		(0xa00 + 72) /* Interrupt mask register */
-#define PIOD_ISR		(0xa00 + 76) /* Interrupt status register */
-#define PIOD_MDER		(0xa00 + 80) /* Multi driver enable register */
-#define PIOD_MDDR		(0xa00 + 84) /* Multi driver disable register */
-#define PIOD_MDSR		(0xa00 + 88) /* Multi driver status register */
-#define PIOD_PPUDR		(0xa00 + 96) /* Pull-up disable register */
-#define PIOD_PPUER		(0xa00 + 100) /* Pull-up enable register */
-#define PIOD_PPUSR		(0xa00 + 104) /* Pad pull-up status register */
-#define PIOD_ASR		(0xa00 + 112) /* Select A register */
-#define PIOD_BSR		(0xa00 + 116) /* Select B register */
-#define PIOD_ABSR		(0xa00 + 120) /* AB Select status register */
-#define PIOD_OWER		(0xa00 + 160) /* Output Write enable register */
-#define PIOD_OWDR		(0xa00 + 164) /* Output write disable register */
-#define PIOD_OWSR		(0xa00 + 168) /* Output write status register */
-
-#endif
 /*
  * PIO
  */
@@ -252,7 +112,7 @@
 
 /* IRQs : */
 /*
- * 0: AIC 
+ * 0: AIC
  * 1: System peripheral (System timer, RTC, DBGU)
  * 2: PIO Controller A
  * 3: PIO Controller B
@@ -403,10 +263,6 @@
 #define	AT91RM92_CF_PA_BASE	0x51400000
 #define	AT91RM92_CF_SIZE	0x00100000
 
-#ifndef AT91C_MASTER_CLOCK
-#define AT91C_MASTER_CLOCK	60000000
-#endif
-
 /* SDRAMC */
 
 #define AT91RM92_SDRAMC_BASE	0xfffff90
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91sam9260.c
--- a/head/sys/arm/at91/at91sam9260.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91sam9260.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/at91/at91sam9260.c 234291 2012-04-14 17:09:38Z marius $");
+__FBSDID("$FreeBSD: head/sys/arm/at91/at91sam9260.c 238397 2012-07-12 13:45:58Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -38,20 +38,14 @@
 #include <machine/bus.h>
 
 #include <arm/at91/at91var.h>
+#include <arm/at91/at91reg.h>
+#include <arm/at91/at91soc.h>
 #include <arm/at91/at91_aicreg.h>
 #include <arm/at91/at91sam9260reg.h>
+#include <arm/at91/at91_pitreg.h>
 #include <arm/at91/at91_pmcreg.h>
 #include <arm/at91/at91_pmcvar.h>
-
-struct at91sam9_softc {
-	device_t dev;
-	bus_space_tag_t sc_st;
-	bus_space_handle_t sc_sh;
-	bus_space_handle_t sc_sys_sh;
-	bus_space_handle_t sc_aic_sh;
-	bus_space_handle_t sc_dbg_sh;
-	bus_space_handle_t sc_matrix_sh;
-};
+#include <arm/at91/at91_rstreg.h>
 
 /*
  * Standard priority levels for the system.  0 is lowest and 7 is highest.
@@ -128,54 +122,6 @@
 	{ 0, 0, 0, 0, 0 }
 };
 
-static void
-at91_add_child(device_t dev, int prio, const char *name, int unit,
-    bus_addr_t addr, bus_size_t size, int irq0, int irq1, int irq2)
-{
-	device_t kid;
-	struct at91_ivar *ivar;
-
-	kid = device_add_child_ordered(dev, prio, name, unit);
-	if (kid == NULL) {
-	    printf("Can't add child %s%d ordered\n", name, unit);
-	    return;
-	}
-	ivar = malloc(sizeof(*ivar), M_DEVBUF, M_NOWAIT | M_ZERO);
-	if (ivar == NULL) {
-		device_delete_child(dev, kid);
-		printf("Can't add alloc ivar\n");
-		return;
-	}
-	device_set_ivars(kid, ivar);
-	resource_list_init(&ivar->resources);
-	if (irq0 != -1) {
-		bus_set_resource(kid, SYS_RES_IRQ, 0, irq0, 1);
-		if (irq0 != AT91SAM9260_IRQ_SYSTEM)
-			at91_pmc_clock_add(device_get_nameunit(kid), irq0, 0);
-	}
-	if (irq1 != 0)
-		bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1);
-	if (irq2 != 0)
-		bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1);
-	if (addr != 0 && addr < AT91SAM9260_BASE)
-		addr += AT91SAM9260_BASE;
-	if (addr != 0)
-		bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size);
-}
-
-static void
-at91_cpu_add_builtin_children(device_t dev)
-{
-	int i;
-	const struct cpu_devs *walker;
-
-	for (i = 1, walker = at91_devs; walker->name; i++, walker++) {
-		at91_add_child(dev, i, walker->name, walker->unit,
-		    walker->mem_base, walker->mem_len, walker->irq0,
-		    walker->irq1, walker->irq2);
-	}
-}
-
 static uint32_t
 at91_pll_outa(int freq)
 {
@@ -194,106 +140,9 @@
 }
 
 static void
-at91_identify(driver_t *drv, device_t parent)
-{
-
-	switch (AT91_CPU(at91_chip_id)) {
-	case AT91_CPU_SAM9260:
-	case AT91_CPU_SAM9XE128:
-	case AT91_CPU_SAM9XE256:
-	case AT91_CPU_SAM9XE512:
-		at91_add_child(parent, 0, "at91sam9260", 0, 0, 0, -1, 0, 0);
-		at91_cpu_add_builtin_children(parent);
-		break;
-	}
-}
-
-static int
-at91_probe(device_t dev)
-{
-	const char *desc;
-
-	switch (AT91_CPU(at91_chip_id)) {
-	case AT91_CPU_SAM9260:
-		desc = "AT91SAM9260";
-		break;
-	case AT91_CPU_SAM9XE128:
-		desc = "AT91SAM9XE128";
-		break;
-	case AT91_CPU_SAM9XE256:
-		desc = "AT91SAM9XE256";
-		break;
-	case AT91_CPU_SAM9XE512:
-		desc = "AT91SAM9XE512";
-		break;
-	default:
-		return (ENXIO);
-	}
-	device_set_desc(dev, desc);
-	return (0);
-}
-
-static int
-at91_attach(device_t dev)
+at91_clock_init(void)
 {
 	struct at91_pmc_clock *clk;
-	struct at91sam9_softc *sc = device_get_softc(dev);
-	int i;
-
-	struct at91_softc *at91sc = device_get_softc(device_get_parent(dev));
-
-	sc->sc_st = at91sc->sc_st;
-	sc->sc_sh = at91sc->sc_sh;
-	sc->dev = dev;
-
-	if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9260_SYS_BASE,
-	    AT91SAM9260_SYS_SIZE, &sc->sc_sys_sh) != 0)
-		panic("Enable to map system registers");
-
-	if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9260_DBGU_BASE,
-	    AT91SAM9260_DBGU_SIZE, &sc->sc_dbg_sh) != 0)
-		panic("Enable to map DBGU registers");
-
-	if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9260_AIC_BASE,
-	    AT91SAM9260_AIC_SIZE, &sc->sc_aic_sh) != 0)
-		panic("Enable to map system registers");
-
-	/* XXX Hack to tell atmelarm about the AIC */
-	at91sc->sc_aic_sh = sc->sc_aic_sh;
-	at91sc->sc_irq_system = AT91SAM9260_IRQ_SYSTEM;
-
-	for (i = 0; i < 32; i++) {
-		bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR +
-		    i * 4, i);
-		/* Priority. */
-		bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SMR + i * 4,
-		    at91_irq_prio[i]);
-		if (i < 8)
-			bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_EOICR,
-			    1);
-	}
-
-	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SPU, 32);
-	/* No debug. */
-	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_DCR, 0);
-	/* Disable and clear all interrupts. */
-	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff);
-	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff);
-
-	/* Disable all interrupts for DBGU */
-	bus_space_write_4(sc->sc_st, sc->sc_dbg_sh, 0x0c, 0xffffffff);
-
-	if (bus_space_subregion(sc->sc_st, sc->sc_sh,
-	    AT91SAM9260_MATRIX_BASE, AT91SAM9260_MATRIX_SIZE,
-	    &sc->sc_matrix_sh) != 0)
-		panic("Enable to map matrix registers");
-
-	/* activate NAND*/
-	i = bus_space_read_4(sc->sc_st, sc->sc_matrix_sh,
-	    AT91SAM9260_EBICSA);
-	bus_space_write_4(sc->sc_st, sc->sc_matrix_sh,
-	    AT91SAM9260_EBICSA,
-	    i | AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA);
 
 	/* Update USB device port clock info */
 	clk = at91_pmc_clock_ref("udpck");
@@ -338,23 +187,14 @@
 	clk->pll_div_mask  = SAM9260_PLL_B_DIV_MASK;
 	clk->set_outb      = at91_pll_outb;
 	at91_pmc_clock_deref(clk);
-	return (0);
 }
 
-static device_method_t at91sam9260_methods[] = {
-	DEVMETHOD(device_probe, at91_probe),
-	DEVMETHOD(device_attach, at91_attach),
-	DEVMETHOD(device_identify, at91_identify),
-	DEVMETHOD_END
+static struct at91_soc_data soc_data = {
+	.soc_delay = at91_pit_delay,
+	.soc_reset = at91_rst_cpu_reset,
+	.soc_clock_init = at91_clock_init,
+	.soc_irq_prio = at91_irq_prio,
+	.soc_children = at91_devs,
 };
 
-static driver_t at91sam9260_driver = {
-	"at91sam9260",
-	at91sam9260_methods,
-	sizeof(struct at91sam9_softc),
-};
-
-static devclass_t at91sam9260_devclass;
-
-DRIVER_MODULE(at91sam9260, atmelarm, at91sam9260_driver, at91sam9260_devclass,
-    NULL, NULL);
+AT91_SOC(AT91_T_SAM9260, &soc_data);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91sam9260reg.h
--- a/head/sys/arm/at91/at91sam9260reg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91sam9260reg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -23,24 +23,20 @@
  * SUCH DAMAGE.
  */
 
-/* $FreeBSD$ */
+/* $FreeBSD: head/sys/arm/at91/at91sam9260reg.h 238332 2012-07-10 02:44:15Z imp $ */
 
 #ifndef AT91SAM9260REG_H_
 #define AT91SAM9260REG_H_
 
-#ifndef AT91SAM9260_MASTER_CLOCK
-#define AT91SAM9260_MASTER_CLOCK ((18432000 * 43)/6)
-#endif
-
 /* Chip Specific limits */
 #define SAM9260_PLL_A_MIN_IN_FREQ	  1000000 /*   1 Mhz */
 #define SAM9260_PLL_A_MAX_IN_FREQ	 32000000 /*  32 Mhz */
 #define SAM9260_PLL_A_MIN_OUT_FREQ	 80000000 /*  80 Mhz */
 #define SAM9260_PLL_A_MAX_OUT_FREQ	240000000 /* 240 Mhz */
 #define SAM9260_PLL_A_MUL_SHIFT 16
-#define SAM9260_PLL_A_MUL_MASK 0x3FF 
+#define SAM9260_PLL_A_MUL_MASK 0x3FF
 #define SAM9260_PLL_A_DIV_SHIFT 0
-#define SAM9260_PLL_A_DIV_MASK 0xFF 
+#define SAM9260_PLL_A_DIV_MASK 0xFF
 
 #define SAM9260_PLL_B_MIN_IN_FREQ	  1000000 /*   1 Mhz */
 #define SAM9260_PLL_B_MAX_IN_FREQ	  5000000 /*   5 Mhz */
@@ -49,9 +45,9 @@
 #define SAM9260_PLL_B_MUL_SHIFT 16
 #define SAM9260_PLL_B_MUL_MASK 0x3FF
 #define SAM9260_PLL_B_DIV_SHIFT 0
-#define SAM9260_PLL_B_DIV_MASK 0xFF 
+#define SAM9260_PLL_B_DIV_MASK 0xFF
 
-/* 
+/*
  * Memory map, from datasheet :
  * 0x00000000 - 0x0ffffffff : Internal Memories
  * 0x10000000 - 0x1ffffffff : Chip Select 0
@@ -76,9 +72,6 @@
 #define AT91_CHIPSELECT_7 0x80000000
 
 
-#define AT91SAM9260_BASE	0xd0000000
-                                 
-
 #define AT91SAM9260_EMAC_BASE 0xffc4000
 #define AT91SAM9260_EMAC_SIZE 0x4000
 
@@ -160,7 +153,7 @@
 #define AT91RM92_PMC_SIZE	0x100
 /* IRQs : */
 /*
- * 0: AIC 
+ * 0: AIC
  * 1: System peripheral (System timer, RTC, DBGU)
  * 2: PIO Controller A
  * 3: PIO Controller B
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91sam9g20.c
--- a/head/sys/arm/at91/at91sam9g20.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91sam9g20.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/at91/at91sam9g20.c 238397 2012-07-12 13:45:58Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -38,20 +38,14 @@
 #include <machine/bus.h>
 
 #include <arm/at91/at91var.h>
+#include <arm/at91/at91reg.h>
+#include <arm/at91/at91soc.h>
 #include <arm/at91/at91_aicreg.h>
 #include <arm/at91/at91sam9g20reg.h>
+#include <arm/at91/at91_pitreg.h>
 #include <arm/at91/at91_pmcreg.h>
 #include <arm/at91/at91_pmcvar.h>
-
-struct at91sam9_softc {
-	device_t dev;
-	bus_space_tag_t sc_st;
-	bus_space_handle_t sc_sh;
-	bus_space_handle_t sc_sys_sh;
-	bus_space_handle_t sc_aic_sh;
-	bus_space_handle_t sc_dbg_sh;
-	bus_space_handle_t sc_matrix_sh;
-};
+#include <arm/at91/at91_rstreg.h>
 
 /*
  * Standard priority levels for the system.  0 is lowest and 7 is highest.
@@ -128,54 +122,6 @@
 	{ 0, 0, 0, 0, 0 }
 };
 
-static void
-at91_add_child(device_t dev, int prio, const char *name, int unit,
-    bus_addr_t addr, bus_size_t size, int irq0, int irq1, int irq2)
-{
-	device_t kid;
-	struct at91_ivar *ivar;
-
-	kid = device_add_child_ordered(dev, prio, name, unit);
-	if (kid == NULL) {
-	    printf("Can't add child %s%d ordered\n", name, unit);
-	    return;
-	}
-	ivar = malloc(sizeof(*ivar), M_DEVBUF, M_NOWAIT | M_ZERO);
-	if (ivar == NULL) {
-		device_delete_child(dev, kid);
-		printf("Can't add alloc ivar\n");
-		return;
-	}
-	device_set_ivars(kid, ivar);
-	resource_list_init(&ivar->resources);
-	if (irq0 != -1) {
-		bus_set_resource(kid, SYS_RES_IRQ, 0, irq0, 1);
-		if (irq0 != AT91SAM9G20_IRQ_SYSTEM)
-			at91_pmc_clock_add(device_get_nameunit(kid), irq0, 0);
-	}
-	if (irq1 != 0)
-		bus_set_resource(kid, SYS_RES_IRQ, 1, irq1, 1);
-	if (irq2 != 0)
-		bus_set_resource(kid, SYS_RES_IRQ, 2, irq2, 1);
-	if (addr != 0 && addr < AT91SAM9G20_BASE) 
-		addr += AT91SAM9G20_BASE;
-	if (addr != 0)
-		bus_set_resource(kid, SYS_RES_MEMORY, 0, addr, size);
-}
-
-static void
-at91_cpu_add_builtin_children(device_t dev)
-{
-	int i;
-	const struct cpu_devs *walker;
-
-	for (i = 1, walker = at91_devs; walker->name; i++, walker++) {
-		at91_add_child(dev, i, walker->name, walker->unit,
-		    walker->mem_base, walker->mem_len, walker->irq0,
-		    walker->irq1, walker->irq2);
-	}
-}
-
 static uint32_t
 at91_pll_outa(int freq)
 {
@@ -201,92 +147,9 @@
 }
 
 static void
-at91_identify(driver_t *drv, device_t parent)
-{
-
-	if (at91_cpu_is(AT91_CPU_SAM9G20)) {
-		at91_add_child(parent, 0, "at91sam", 9, 0, 0, -1, 0, 0);
-		at91_cpu_add_builtin_children(parent);
-	}
-}
-
-static int
-at91_probe(device_t dev)
-{
-
-	if (at91_cpu_is(AT91_CPU_SAM9G20)) {
-		device_set_desc(dev, "AT91SAM9G20");
-		return (0);
-	}
-	return (ENXIO);
-}
-
-static int
-at91_attach(device_t dev)
+at91_clock_init(void)
 {
 	struct at91_pmc_clock *clk;
-	struct at91sam9_softc *sc = device_get_softc(dev);
-	int i;
-
-	struct at91_softc *at91sc = device_get_softc(device_get_parent(dev));
-
-	sc->sc_st = at91sc->sc_st;
-	sc->sc_sh = at91sc->sc_sh;
-	sc->dev = dev;
-
-	/* 
-	 * XXX These values work for the RM9200, SAM926[01], and SAM9G20
-	 * will have to fix this when we want to support anything else. XXX
-	 */
-	if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9G20_SYS_BASE,
-	    AT91SAM9G20_SYS_SIZE, &sc->sc_sys_sh) != 0)
-		panic("Enable to map system registers");
-
-	if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9G20_DBGU_BASE,
-	    AT91SAM9G20_DBGU_SIZE, &sc->sc_dbg_sh) != 0)
-		panic("Enable to map DBGU registers");
-
-	if (bus_space_subregion(sc->sc_st, sc->sc_sh, AT91SAM9G20_AIC_BASE,
-	    AT91SAM9G20_AIC_SIZE, &sc->sc_aic_sh) != 0)
-		panic("Enable to map system registers");
-
-	/* XXX Hack to tell atmelarm about the AIC */
-	at91sc->sc_aic_sh = sc->sc_aic_sh;
-	at91sc->sc_irq_system = AT91SAM9G20_IRQ_SYSTEM;
-
-	for (i = 0; i < 32; i++) {
-		bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SVR + 
-		    i * 4, i);
-		/* Priority. */
-		bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SMR + i * 4,
-		    at91_irq_prio[i]);
-		if (i < 8)
-			bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_EOICR,
-			    1);
-	}
-
-	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_SPU, 32);
-	/* No debug. */
-	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_DCR, 0);
-	/* Disable and clear all interrupts. */
-	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IDCR, 0xffffffff);
-	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_ICCR, 0xffffffff);
-
-	/* Disable all interrupts for DBGU */
-	bus_space_write_4(sc->sc_st, sc->sc_dbg_sh, 0x0c, 0xffffffff);
-
-	if (bus_space_subregion(sc->sc_st, sc->sc_sh,
-	    AT91SAM9G20_MATRIX_BASE, AT91SAM9G20_MATRIX_SIZE,
-	    &sc->sc_matrix_sh) != 0)
-		panic("Enable to map matrix registers");
-
-	/* activate NAND*/
-	i = bus_space_read_4(sc->sc_st, sc->sc_matrix_sh,
-	    AT91SAM9G20_EBICSA);
-	bus_space_write_4(sc->sc_st, sc->sc_matrix_sh,
-	    AT91SAM9G20_EBICSA, 
-	    i | AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA);
-
 
 	/* Update USB device port clock info */
 	clk = at91_pmc_clock_ref("udpck");
@@ -322,22 +185,14 @@
 	clk->pll_div_mask  = SAM9G20_PLL_B_DIV_MASK;
 	clk->set_outb      = at91_pll_outb;
 	at91_pmc_clock_deref(clk);
-	return (0);
 }
 
-static device_method_t at91_methods[] = {
-	DEVMETHOD(device_probe, at91_probe),
-	DEVMETHOD(device_attach, at91_attach),
-	DEVMETHOD(device_identify, at91_identify),
-	{0, 0},
+static struct at91_soc_data soc_data = {
+	.soc_delay = at91_pit_delay,
+	.soc_reset = at91_rst_cpu_reset,
+	.soc_clock_init = at91_clock_init,
+	.soc_irq_prio = at91_irq_prio,
+	.soc_children = at91_devs,
 };
 
-static driver_t at91sam9_driver = {
-	"at91sam",
-	at91_methods,
-	sizeof(struct at91sam9_softc),
-};
-
-static devclass_t at91sam9_devclass;
-
-DRIVER_MODULE(at91sam, atmelarm, at91sam9_driver, at91sam9_devclass, 0, 0);
+AT91_SOC(AT91_T_SAM9G20, &soc_data);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91sam9g20reg.h
--- a/head/sys/arm/at91/at91sam9g20reg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91sam9g20reg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -24,35 +24,31 @@
  * SUCH DAMAGE.
  */
 
-/* $FreeBSD$ */
+/* $FreeBSD: head/sys/arm/at91/at91sam9g20reg.h 238330 2012-07-10 02:14:50Z imp $ */
 
 #ifndef AT91SAM9G20REG_H_
 #define AT91SAM9G20REG_H_
 
-#ifndef AT91SAM9G20_MASTER_CLOCK
-#define AT91SAM9G20_MASTER_CLOCK ((18432000 * 43)/6)
-#endif
-
 /* Chip Specific limits */
 #define SAM9G20_PLL_A_MIN_IN_FREQ	  2000000 /*   2 Mhz */
 #define SAM9G20_PLL_A_MAX_IN_FREQ	 32000000 /*  32 Mhz */
 #define SAM9G20_PLL_A_MIN_OUT_FREQ	400000000 /* 400 Mhz */
 #define SAM9G20_PLL_A_MAX_OUT_FREQ	800000000 /* 800 Mhz */
 #define SAM9G20_PLL_A_MUL_SHIFT 16
-#define SAM9G20_PLL_A_MUL_MASK 0xFF 
+#define SAM9G20_PLL_A_MUL_MASK 0xFF
 #define SAM9G20_PLL_A_DIV_SHIFT 0
-#define SAM9G20_PLL_A_DIV_MASK 0xFF 
+#define SAM9G20_PLL_A_DIV_MASK 0xFF
 
 #define SAM9G20_PLL_B_MIN_IN_FREQ	  2000000 /*   2 Mhz */
 #define SAM9G20_PLL_B_MAX_IN_FREQ	 32000000 /*  32 Mhz */
 #define SAM9G20_PLL_B_MIN_OUT_FREQ	 30000000 /*  30 Mhz */
 #define SAM9G20_PLL_B_MAX_OUT_FREQ	100000000 /* 100 Mhz */
 #define SAM9G20_PLL_B_MUL_SHIFT 16
-#define SAM9G20_PLL_B_MUL_MASK 0x3F 
+#define SAM9G20_PLL_B_MUL_MASK 0x3F
 #define SAM9G20_PLL_B_DIV_SHIFT 0
-#define SAM9G20_PLL_B_DIV_MASK 0xFF 
+#define SAM9G20_PLL_B_DIV_MASK 0xFF
 
-/* 
+/*
  * Memory map, from datasheet :
  * 0x00000000 - 0x0ffffffff : Internal Memories
  * 0x10000000 - 0x1ffffffff : Chip Select 0
@@ -77,9 +73,6 @@
 #define AT91_CHIPSELECT_7 0x80000000
 
 
-#define AT91SAM9G20_BASE	0xd0000000
-                                 
-
 #define AT91SAM9G20_EMAC_BASE 0xffc4000
 #define AT91SAM9G20_EMAC_SIZE 0x4000
 
@@ -161,7 +154,7 @@
 #define AT91RM92_PMC_SIZE	0x100
 /* IRQs : */
 /*
- * 0: AIC 
+ * 0: AIC
  * 1: System peripheral (System timer, RTC, DBGU)
  * 2: PIO Controller A
  * 3: PIO Controller B
@@ -238,7 +231,7 @@
 #define AT91SAM9G20_WDT_SIZE	0x10
 
 #define AT91SAM9G20_PIT_BASE	0xffffd30
-#define AT91SAM9G20_PIT_SIZE	10
+#define AT91SAM9G20_PIT_SIZE	0x10
 
 #define AT91SAM9G20_SMC_BASE	0xfffec00
 #define AT91SAM9G20_SMC_SIZE	0x200
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91sam9x25.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/at91/at91sam9x25.c	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,201 @@
+/*-
+ * Copyright (c) 2005 Olivier Houchard.  All rights reserved.
+ * Copyright (c) 2010 Greg Ansley.  All rights reserved.
+ * Copyright (c) 2012 M. 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: head/sys/arm/at91/at91sam9x25.c 238397 2012-07-12 13:45:58Z imp $");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/kernel.h>
+#include <sys/malloc.h>
+#include <sys/module.h>
+
+#include <machine/bus.h>
+
+#include <arm/at91/at91var.h>
+#include <arm/at91/at91reg.h>
+#include <arm/at91/at91soc.h>
+#include <arm/at91/at91_aicreg.h>
+#include <arm/at91/at91sam9x25reg.h>
+#include <arm/at91/at91_pitreg.h>
+#include <arm/at91/at91_pmcreg.h>
+#include <arm/at91/at91_pmcvar.h>
+#include <arm/at91/at91_rstreg.h>
+
+/*
+ * Standard priority levels for the system.  0 is lowest and 7 is highest.
+ * These values are the ones Atmel uses for its Linux port
+ */
+static const int at91_irq_prio[32] =
+{
+	7,	/* Advanced Interrupt Controller (FIQ) */
+	7,	/* System Peripherals */
+	1,	/* Parallel IO Controller A and B */
+	1,	/* Parallel IO Controller C and D */
+	4,	/* Soft Modem */
+	5,	/* USART 0 */
+	5,	/* USART 1 */
+	5,	/* USART 2 */
+	5,	/* USART 3 */
+	6,	/* Two-Wire Interface 0 */
+	6,	/* Two-Wire Interface 1 */
+	6,	/* Two-Wire Interface 2 */
+	0,	/* Multimedia Card Interface 0 */
+	5,	/* Serial Peripheral Interface 0 */
+	5,	/* Serial Peripheral Interface 1 */
+	5,	/* UART 0 */
+	5,	/* UART 1 */
+	0,	/* Timer Counter 0, 1, 2, 3, 4 and 5 */
+	0,	/* Pulse Width Modulation Controller */
+	0,	/* ADC Controller */
+	0,	/* DMA Controller 0 */
+	0,	/* DMA Controller 1 */
+	2,	/* USB Host High Speed port */
+	2,	/* USB Device High speed port */
+	3,	/* Ethernet MAC 0 */
+	3,	/* LDC Controller or Image Sensor Interface */
+	0,	/* Multimedia Card Interface 1 */
+	3,	/* Ethernet MAC 1 */
+	4,	/* Synchronous Serial Interface */
+	4,	/* CAN Controller 0 */
+	4,	/* CAN Controller 1 */
+	0,	/* Advanced Interrupt Controller (IRQ0) */
+};
+
+#define DEVICE(_name, _id, _unit)		\
+	{					\
+		_name, _unit,			\
+		AT91SAM9X25_ ## _id ##_BASE,	\
+		AT91SAM9X25_ ## _id ## _SIZE,	\
+		AT91SAM9X25_IRQ_ ## _id		\
+	}
+
+static const struct cpu_devs at91_devs[] =
+{
+	DEVICE("at91_pmc", PMC,  0),
+	DEVICE("at91_wdt", WDT,  0),
+	DEVICE("at91_rst", RSTC, 0),
+	DEVICE("at91_pit", PIT,  0),
+	DEVICE("at91_pio", PIOA, 0),
+	DEVICE("at91_pio", PIOB, 1),
+	DEVICE("at91_pio", PIOC, 2),
+	DEVICE("at91_pio", PIOD, 3),
+	DEVICE("at91_twi", TWI0, 0),
+	DEVICE("at91_twi", TWI1, 1),
+	DEVICE("at91_twi", TWI2, 2),
+	DEVICE("at91_mci", HSMCI0, 0),
+	DEVICE("at91_mci", HSMCI1, 1),
+	DEVICE("uart", DBGU,   0),
+	DEVICE("uart", USART0, 1),
+	DEVICE("uart", USART1, 2),
+	DEVICE("uart", USART2, 3),
+	DEVICE("uart", USART3, 4),
+	DEVICE("spi",  SPI0,   0),
+	DEVICE("spi",  SPI1,   1),
+	DEVICE("macb", EMAC0,  0),
+	DEVICE("macb", EMAC1,  0),
+	DEVICE("nand", NAND,   0),
+	DEVICE("ohci", OHCI,   0),
+	DEVICE("ehci", EHCI,   0),
+	{ 0, 0, 0, 0, 0 }
+};
+
+static uint32_t
+at91_pll_outa(int freq)
+{
+
+	switch (freq / 10000000) {
+		case 747 ... 801: return ((1 << 29) | (0 << 14));
+		case 697 ... 746: return ((1 << 29) | (1 << 14));
+		case 647 ... 696: return ((1 << 29) | (2 << 14));
+		case 597 ... 646: return ((1 << 29) | (3 << 14));
+		case 547 ... 596: return ((1 << 29) | (1 << 14));
+		case 497 ... 546: return ((1 << 29) | (2 << 14));
+		case 447 ... 496: return ((1 << 29) | (3 << 14));
+		case 397 ... 446: return ((1 << 29) | (4 << 14));
+		default: return (1 << 29);
+	}
+}
+
+static uint32_t
+at91_pll_outb(int freq)
+{
+
+	return (0);
+}
+
+static void
+at91_clock_init(void)
+{
+	struct at91_pmc_clock *clk;
+
+	/* Update USB device port clock info */
+	clk = at91_pmc_clock_ref("udpck");
+	clk->pmc_mask  = PMC_SCER_UDP_SAM9;
+	at91_pmc_clock_deref(clk);
+
+	/* Update USB host port clock info */
+	clk = at91_pmc_clock_ref("uhpck");
+	clk->pmc_mask  = PMC_SCER_UHP_SAM9;
+	at91_pmc_clock_deref(clk);
+
+	/* Each SOC has different PLL contraints */
+	clk = at91_pmc_clock_ref("plla");
+	clk->pll_min_in    = SAM9X25_PLL_A_MIN_IN_FREQ;		/*   2 MHz */
+	clk->pll_max_in    = SAM9X25_PLL_A_MAX_IN_FREQ;		/*  32 MHz */
+	clk->pll_min_out   = SAM9X25_PLL_A_MIN_OUT_FREQ;	/* 400 MHz */
+	clk->pll_max_out   = SAM9X25_PLL_A_MAX_OUT_FREQ;	/* 800 MHz */
+	clk->pll_mul_shift = SAM9X25_PLL_A_MUL_SHIFT;
+	clk->pll_mul_mask  = SAM9X25_PLL_A_MUL_MASK;
+	clk->pll_div_shift = SAM9X25_PLL_A_DIV_SHIFT;
+	clk->pll_div_mask  = SAM9X25_PLL_A_DIV_MASK;
+	clk->set_outb      = at91_pll_outa;
+	at91_pmc_clock_deref(clk);
+
+	clk = at91_pmc_clock_ref("pllb");
+	clk->pll_min_in    = SAM9X25_PLL_B_MIN_IN_FREQ;		/*   2 MHz */
+	clk->pll_max_in    = SAM9X25_PLL_B_MAX_IN_FREQ;		/*  32 MHz */
+	clk->pll_min_out   = SAM9X25_PLL_B_MIN_OUT_FREQ;	/*  30 MHz */
+	clk->pll_max_out   = SAM9X25_PLL_B_MAX_OUT_FREQ;	/* 100 MHz */
+	clk->pll_mul_shift = SAM9X25_PLL_B_MUL_SHIFT;
+	clk->pll_mul_mask  = SAM9X25_PLL_B_MUL_MASK;
+	clk->pll_div_shift = SAM9X25_PLL_B_DIV_SHIFT;
+	clk->pll_div_mask  = SAM9X25_PLL_B_DIV_MASK;
+	clk->set_outb      = at91_pll_outb;
+	at91_pmc_clock_deref(clk);
+}
+
+static struct at91_soc_data soc_data = {
+	.soc_delay = at91_pit_delay,
+	.soc_reset = at91_rst_cpu_reset,
+	.soc_clock_init = at91_clock_init,
+	.soc_irq_prio = at91_irq_prio,
+	.soc_children = at91_devs,
+};
+
+AT91_SOC_SUB(AT91_T_SAM9X5, AT91_ST_SAM9X25, &soc_data);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91sam9x25reg.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/at91/at91sam9x25reg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,316 @@
+/*-
+ * Copyright (c) 2009 Sylvestre Gallon.  All rights reserved.
+ * Copyright (c) 2010 Greg Ansley.  All rights reserved.
+ * Copyright (c) 2012 M. Warener 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.
+ */
+
+/* $FreeBSD: head/sys/arm/at91/at91sam9x25reg.h 238330 2012-07-10 02:14:50Z imp $ */
+
+#ifndef AT91SAM9X25REG_H_
+#define AT91SAM9X25REG_H_
+
+#ifndef AT91SAM9X25_MASTER_CLOCK
+#define AT91SAM9X25_MASTER_CLOCK ((18432000 * 43)/6)
+#endif
+
+/* Chip Specific limits */
+#define SAM9X25_PLL_A_MIN_IN_FREQ	  2000000 /*   2 Mhz */
+#define SAM9X25_PLL_A_MAX_IN_FREQ	 32000000 /*  32 Mhz */
+#define SAM9X25_PLL_A_MIN_OUT_FREQ	400000000 /* 400 Mhz */
+#define SAM9X25_PLL_A_MAX_OUT_FREQ	800000000 /* 800 Mhz */
+#define SAM9X25_PLL_A_MUL_SHIFT 16
+#define SAM9X25_PLL_A_MUL_MASK 0xFF 
+#define SAM9X25_PLL_A_DIV_SHIFT 0
+#define SAM9X25_PLL_A_DIV_MASK 0xFF 
+
+#define SAM9X25_PLL_B_MIN_IN_FREQ	  2000000 /*   2 Mhz */
+#define SAM9X25_PLL_B_MAX_IN_FREQ	 32000000 /*  32 Mhz */
+#define SAM9X25_PLL_B_MIN_OUT_FREQ	 30000000 /*  30 Mhz */
+#define SAM9X25_PLL_B_MAX_OUT_FREQ	100000000 /* 100 Mhz */
+#define SAM9X25_PLL_B_MUL_SHIFT 16
+#define SAM9X25_PLL_B_MUL_MASK 0x3F 
+#define SAM9X25_PLL_B_DIV_SHIFT 0
+#define SAM9X25_PLL_B_DIV_MASK 0xFF 
+
+/* 
+ * Memory map, from datasheet :
+ * 0x00000000 - 0x0ffffffff : Internal Memories
+ * 0x10000000 - 0x1ffffffff : Chip Select 0
+ * 0x20000000 - 0x2ffffffff : Chip Select 1 DDR2/LPDDR/SDR/LPSDR
+ * 0x30000000 - 0x3ffffffff : Chip Select 2 
+ * 0x40000000 - 0x4ffffffff : Chip Select 3 NAND Flash
+ * 0x50000000 - 0x5ffffffff : Chip Select 4
+ * 0x60000000 - 0x6ffffffff : Chip Select 5
+ * 0x70000000 - 0xeffffffff : Undefined (Abort)
+ * 0xf0000000 - 0xfffffffff : Peripherals
+ */
+
+#define AT91_CHIPSELECT_0 0x10000000
+#define AT91_CHIPSELECT_1 0x20000000
+#define AT91_CHIPSELECT_2 0x30000000
+#define AT91_CHIPSELECT_3 0x40000000
+#define AT91_CHIPSELECT_4 0x50000000
+#define AT91_CHIPSELECT_5 0x60000000
+
+#define AT91SAM9X25_EMAC_SIZE  0x4000
+#define AT91SAM9X25_EMAC0_BASE 0x802c000
+#define AT91SAM9X25_EMAC0_SIZE AT91SAM9X25_EMAC_SIZE
+#define AT91SAM9X25_EMAC1_BASE 0x8030000
+#define AT91SAM9X25_EMAC1_SIZE AT91SAM9X25_EMAC_SIZE
+
+#define AT91SAM9X25_RSTC_BASE	0xffffe00
+#define AT91SAM9X25_RSTC_SIZE	0x10
+
+/* USART*/
+
+#define AT91SAM9X25_USART_SIZE	0x4000
+#define AT91SAM9X25_USART0_BASE	0x801c000
+#define AT91SAM9X25_USART0_PDC	0x801c100
+#define AT91SAM9X25_USART0_SIZE	AT91SAM9X25_USART_SIZE
+#define AT91SAM9X25_USART1_BASE	0x8020000
+#define AT91SAM9X25_USART1_PDC	0x8020100
+#define AT91SAM9X25_USART1_SIZE	AT91SAM9X25_USART_SIZE
+#define AT91SAM9X25_USART2_BASE	0x8024000
+#define AT91SAM9X25_USART2_PDC	0x8024100
+#define AT91SAM9X25_USART2_SIZE	AT91SAM9X25_USART_SIZE
+#define AT91SAM9X25_USART3_BASE	0x8028000
+#define AT91SAM9X25_USART3_PDC	0x8028100
+#define AT91SAM9X25_USART3_SIZE	AT91SAM9X25_USART_SIZE
+
+/*TC*/
+#define AT91SAM9X25_TC0_BASE	0x8008000
+#define AT91SAM9X25_TC0_SIZE	0x4000
+#define AT91SAM9X25_TC0C0_BASE	0x8008000
+#define AT91SAM9X25_TC0C1_BASE	0x8008040
+#define AT91SAM9X25_TC0C2_BASE	0x8008080
+
+#define AT91SAM9X25_TC1_BASE	0x800c000
+#define AT91SAM9X25_TC1_SIZE	0x4000
+
+/*SPI*/
+
+#define AT91SAM9X25_SPI0_BASE	0x0000000
+
+#define AT91SAM9X25_SPI0_SIZE	0x4000
+
+#define AT91SAM9X25_SPI1_BASE	0x0004000
+#define AT91SAM9X25_SPI1_SIZE	0x4000
+
+/* System Registers */
+#define AT91SAM9X25_SYS_BASE	0xffff000
+#define AT91SAM9X25_SYS_SIZE	0x1000
+
+#define AT91SAM9X25_MATRIX_BASE	0xfffde00
+#define AT91SAM9X25_MATRIX_SIZE	0x200
+
+#define AT91SAM9X25_DBGU_BASE	0xffff200
+#define AT91SAM9X25_DBGU_SIZE	0x200
+
+/*
+ * PIO
+ */
+#define AT91SAM9X25_PIOA_BASE	0xffff400
+#define AT91SAM9X25_PIOA_SIZE	0x200
+#define AT91SAM9X25_PIOB_BASE	0xffff600
+#define AT91SAM9X25_PIOB_SIZE	0x200
+#define AT91SAM9X25_PIOC_BASE	0xffff800
+#define AT91SAM9X25_PIOC_SIZE	0x200
+#define AT91SAM9X25_PIOD_BASE	0xffffa00
+#define AT91SAM9X25_PIOD_SIZE	0x200
+
+#define AT91RM92_PMC_BASE	0xffffc00
+#define AT91RM92_PMC_SIZE	0x100
+/* IRQs :
+ * 0: AIC 
+ * 1: System peripheral (System timer, RTC, DBGU)
+ * 2: PIO Controller A,B
+ * 3: PIO Controller C,D
+ * 4: SMD Soft Modem
+ * 5: USART 0
+ * 6: USART 1
+ * 7: USART 2
+ * 8: USART 3
+ * 9: Two-wirte interface
+ * 10: Two-wirte interface
+ * 11: Two-wirte interface
+ * 12: HSMCI Interface
+ * 13: SPI 0
+ * 14: SPI 1
+ * 15: UART0
+ * 16: UART1
+ * 17: Timer Counter 0,1
+ * 18: PWM
+ * 19: ADC
+ * 20: DMAC 0
+ * 21: DMAC 1
+ * 22: UHPHS - USB Host controller
+ * 23: UDPHS - USB Device Controller
+ * 24: EMAC0
+ * 25: LCD controller or Image Sensor Interface
+ * 26: HSMCI1
+ * 27: EMAC1
+ * 28: SSC
+ * 29: CAN0
+ * 30: CAN1
+ * 31: AIC IRQ0
+ */
+
+#define AT91SAM9X25_IRQ_AIC	0
+#define AT91SAM9X25_IRQ_SYSTEM	1
+#define AT91SAM9X25_IRQ_PIOAB	2
+#define AT91SAM9X25_IRQ_PIOCD	3
+#define AT91SAM9X25_IRQ_SMD	4
+#define AT91SAM9X25_IRQ_USART0	5
+#define AT91SAM9X25_IRQ_USART1	6
+#define AT91SAM9X25_IRQ_USART2	7
+#define AT91SAM9X25_IRQ_USART3	8
+#define AT91SAM9X25_IRQ_TWI0	9
+#define AT91SAM9X25_IRQ_TWI1	10
+#define AT91SAM9X25_IRQ_TWI2	11
+#define AT91SAM9X25_IRQ_HSMCI0	12
+#define AT91SAM9X25_IRQ_SPI0	13
+#define AT91SAM9X25_IRQ_SPI1	14
+#define AT91SAM9X25_IRQ_UART0	15
+#define AT91SAM9X25_IRQ_UART1	16
+#define AT91SAM9X25_IRQ_TC01	17
+#define AT91SAM9X25_IRQ_PWM	18
+#define AT91SAM9X25_IRQ_ADC	19
+#define AT91SAM9X25_IRQ_DMAC0	20
+#define AT91SAM9X25_IRQ_DMAC1	21
+#define AT91SAM9X25_IRQ_UHPHS	22
+#define AT91SAM9X25_IRQ_UDPHS	23
+#define AT91SAM9X25_IRQ_EMAC0	24
+#define AT91SAM9X25_IRQ_HSMCI1	26
+#define AT91SAM9X25_IRQ_EMAC1	27
+#define AT91SAM9X25_IRQ_SSC	28
+#define AT91SAM9X25_IRQ_CAN0	29
+#define AT91SAM9X25_IRQ_CAN1	30
+#define AT91SAM9X25_IRQ_AICBASE	31
+
+/* Alias */
+#define AT91SAM9X25_IRQ_DBGU 	AT91SAM9X25_IRQ_SYSTEM
+#define AT91SAM9X25_IRQ_PMC 	AT91SAM9X25_IRQ_SYSTEM
+#define AT91SAM9X25_IRQ_WDT 	AT91SAM9X25_IRQ_SYSTEM
+#define AT91SAM9X25_IRQ_PIT 	AT91SAM9X25_IRQ_SYSTEM
+#define AT91SAM9X25_IRQ_RSTC 	AT91SAM9X25_IRQ_SYSTEM
+#define AT91SAM9X25_IRQ_OHCI 	AT91SAM9X25_IRQ_UHPHS
+#define AT91SAM9X25_IRQ_EHCI 	AT91SAM9X25_IRQ_UHPHS
+#define AT91SAM9X25_IRQ_PIOA    AT91SAM9X25_IRQ_PIOAB
+#define AT91SAM9X25_IRQ_PIOB    AT91SAM9X25_IRQ_PIOAB
+#define AT91SAM9X25_IRQ_PIOC    AT91SAM9X25_IRQ_PIOCD
+#define AT91SAM9X25_IRQ_PIOD    AT91SAM9X25_IRQ_PIOCD
+#define AT91SAM9X25_IRQ_NAND 	(-1)
+
+#define AT91SAM9X25_AIC_BASE	0xffff000
+#define AT91SAM9X25_AIC_SIZE	0x200
+
+/* Timer */
+
+#define AT91SAM9X25_WDT_BASE	0xffffd40
+#define AT91SAM9X25_WDT_SIZE	0x10
+
+#define AT91SAM9X25_PIT_BASE	0xffffd30
+#define AT91SAM9X25_PIT_SIZE	0x10
+
+#define AT91SAM9X25_SMC_BASE	0xfffea00
+#define AT91SAM9X25_SMC_SIZE	0x200
+
+#define AT91SAM9X25_PMC_BASE	0xffffc00
+#define AT91SAM9X25_PMC_SIZE	0x100
+
+#define AT91SAM9X25_UDPHS_BASE	0x803c000
+#define AT91SAM9X25_UDPHS_SIZE	0x4000
+
+#define AT91SAM9X25_HSMCI_SIZE	0x4000
+#define AT91SAM9X25_HSMCI0_BASE	0x0008000
+#define AT91SAM9X25_HSMCI0_SIZE AT91SAM9X25_HSMCI_SIZE
+#define AT91SAM9X25_HSMCI1_BASE	0x000c000
+#define AT91SAM9X25_HSMCI1_SIZE AT91SAM9X25_HSMCI_SIZE
+
+#define AT91SAM9X25_TWI_SIZE	0x4000
+#define AT91SAM9X25_TWI0_BASE	0xffaC000
+#define AT91SAM9X25_TWI0_SIZE	AT91SAM9X25_TWI_SIZE
+#define AT91SAM9X25_TWI1_BASE	0xffaC000
+#define AT91SAM9X25_TWI1_SIZE	AT91SAM9X25_TWI_SIZE
+#define AT91SAM9X25_TWI2_BASE	0xffaC000
+#define AT91SAM9X25_TWI2_SIZE	AT91SAM9X25_TWI_SIZE
+
+/* XXX Needs to be carfully coordinated with
+ * other * soc's so phyical and vm address
+ * mapping are unique. XXX
+ */
+#define AT91SAM9X25_OHCI_BASE	  0xdfc00000 /* SAME as 9c40 */
+#define AT91SAM9X25_OHCI_PA_BASE  0x00600000
+#define AT91SAM9X25_OHCI_SIZE	  0x00100000
+
+#define AT91SAM9X25_EHCI_BASE	  0xdfd00000
+#define AT91SAM9X25_EHCI_PA_BASE  0x00700000
+#define AT91SAM9X25_EHCI_SIZE	  0x00100000
+
+#define AT91SAM9X25_NAND_BASE     0xe0000000
+#define AT91SAM9X25_NAND_PA_BASE  0x40000000
+#define AT91SAM9X25_NAND_SIZE     0x10000000
+
+
+/* SDRAMC */
+#define AT91SAM9X25_SDRAMC_BASE	0xfffea00               /* SAME as SMC? */
+#define AT91SAM9X25_SDRAMC_MR	0x00
+#define AT91SAM9X25_SDRAMC_MR_MODE_NORMAL	0
+#define AT91SAM9X25_SDRAMC_MR_MODE_NOP	1
+#define AT91SAM9X25_SDRAMC_MR_MODE_PRECHARGE 2
+#define AT91SAM9X25_SDRAMC_MR_MODE_LOAD_MODE_REGISTER 3
+#define AT91SAM9X25_SDRAMC_MR_MODE_REFRESH	4
+#define AT91SAM9X25_SDRAMC_TR	0x04
+#define AT91SAM9X25_SDRAMC_CR	0x08
+#define AT91SAM9X25_SDRAMC_CR_NC_8		0x0
+#define AT91SAM9X25_SDRAMC_CR_NC_9		0x1
+#define AT91SAM9X25_SDRAMC_CR_NC_10	0x2
+#define AT91SAM9X25_SDRAMC_CR_NC_11	0x3
+#define AT91SAM9X25_SDRAMC_CR_NC_MASK	0x00000003
+#define AT91SAM9X25_SDRAMC_CR_NR_11	0x0
+#define AT91SAM9X25_SDRAMC_CR_NR_12	0x4
+#define AT91SAM9X25_SDRAMC_CR_NR_13	0x8
+#define AT91SAM9X25_SDRAMC_CR_NR_RES	0xc
+#define AT91SAM9X25_SDRAMC_CR_NR_MASK	0x0000000c
+#define AT91SAM9X25_SDRAMC_CR_NB_2		0x00
+#define AT91SAM9X25_SDRAMC_CR_NB_4		0x10
+#define AT91SAM9X25_SDRAMC_CR_DBW_16		0x80
+#define AT91SAM9X25_SDRAMC_CR_NB_MASK	0x00000010
+#define AT91SAM9X25_SDRAMC_CR_NCAS_MASK	0x00000060
+#define AT91SAM9X25_SDRAMC_CR_TWR_MASK	0x00000780
+#define AT91SAM9X25_SDRAMC_CR_TRC_MASK	0x00007800
+#define AT91SAM9X25_SDRAMC_CR_TRP_MASK	0x00078000
+#define AT91SAM9X25_SDRAMC_CR_TRCD_MASK	0x00780000
+#define AT91SAM9X25_SDRAMC_CR_TRAS_MASK	0x07800000
+#define AT91SAM9X25_SDRAMC_CR_TXSR_MASK	0x78000000
+#define AT91SAM9X25_SDRAMC_HSR	0x0c
+#define AT91SAM9X25_SDRAMC_LPR	0x10
+#define AT91SAM9X25_SDRAMC_IER	0x14
+#define AT91SAM9X25_SDRAMC_IDR	0x18
+#define AT91SAM9X25_SDRAMC_IMR	0x1c
+#define AT91SAM9X25_SDRAMC_ISR	0x20
+#define AT91SAM9X25_SDRAMC_MDR	0x24
+
+#endif /* AT91SAM9X25REG_H_*/
+
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91soc.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/at91/at91soc.c	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,51 @@
+/*-
+ * Copyright (c) 2012 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: head/sys/arm/at91/at91soc.c 238376 2012-07-11 20:17:14Z imp $");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+
+#include <arm/at91/at91var.h>
+#include <arm/at91/at91soc.h>
+
+SET_DECLARE(at91_socs, const struct at91_soc);
+
+struct at91_soc_data *
+at91_match_soc(enum at91_soc_type type, enum at91_soc_subtype subtype)
+{
+	const struct at91_soc **socp;
+
+	SET_FOREACH(socp, at91_socs) {
+		if ((*socp)->soc_type != type)
+			continue;
+		if ((*socp)->soc_subtype != AT91_ST_ANY &&
+		    (*socp)->soc_subtype != subtype)
+			continue;
+		return (*socp)->soc_data;
+	}
+	return NULL;
+}
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91soc.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/at91/at91soc.h	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,58 @@
+/*-
+ * Copyright (c) 2012 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.
+ */
+
+/* $FreeBSD: head/sys/arm/at91/at91soc.h 238376 2012-07-11 20:17:14Z imp $ */
+
+#ifndef _ARM_AT91_AT91SOC_H_
+#define _ARM_AT91_AT91SOC_H_
+
+#include <sys/linker_set.h>
+
+struct at91_soc {
+	enum at91_soc_type	soc_type;	/* Family of mail type of SoC */
+	enum at91_soc_subtype 	soc_subtype;	/* More specific soc, if any */
+	struct at91_soc_data	*soc_data;
+};
+ 
+// Make varadic
+#define AT91_SOC(type, data)			\
+	static struct at91_soc this_soc = {	\
+		.soc_type = type,		\
+		.soc_subtype = AT91_ST_ANY,	\
+		.soc_data = data,		\
+	};					\
+	DATA_SET(at91_socs, this_soc);
+
+#define AT91_SOC_SUB(type, subtype, data)	\
+	static struct at91_soc this_soc = {	\
+		.soc_type = type,		\
+		.soc_subtype = subtype,		\
+		.soc_data = data,		\
+	};					\
+	DATA_SET(at91_socs, this_soc);
+
+struct at91_soc_data *at91_match_soc(enum at91_soc_type, enum at91_soc_subtype);
+
+#endif /* _ARM_AT91_AT91SOC_H_ */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/at91var.h
--- a/head/sys/arm/at91/at91var.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/at91var.h	Wed Jul 25 17:18:25 2012 +0300
@@ -23,7 +23,7 @@
  * SUCH DAMAGE.
  */
 
-/* $FreeBSD: head/sys/arm/at91/at91var.h 234291 2012-04-14 17:09:38Z marius $ */
+/* $FreeBSD: head/sys/arm/at91/at91var.h 238403 2012-07-12 19:11:37Z imp $ */
 
 #ifndef _AT91VAR_H_
 #define _AT91VAR_H_
@@ -40,7 +40,6 @@
 	bus_space_handle_t sc_aic_sh;
 	struct rman sc_irq_rman;
 	struct rman sc_mem_rman;
-	uint32_t sc_irq_system;
 };
 
 struct at91_ivar {
@@ -59,7 +58,74 @@
 	const char *parent_clk;
 };
 
-extern uint32_t at91_chip_id;
+enum at91_soc_type {
+	AT91_T_NONE = 0,
+	AT91_T_CAP9,
+	AT91_T_RM9200,
+	AT91_T_SAM9260,
+	AT91_T_SAM9261,
+	AT91_T_SAM9263,
+	AT91_T_SAM9G10,
+	AT91_T_SAM9G20,
+	AT91_T_SAM9G45,
+	AT91_T_SAM9N12,
+	AT91_T_SAM9RL,
+	AT91_T_SAM9X5,
+};
+
+enum at91_soc_subtype {
+	AT91_ST_ANY = -1,	/* Match any type */
+	AT91_ST_NONE = 0,
+	/* AT91RM9200 */
+	AT91_ST_RM9200_BGA,
+	AT91_ST_RM9200_PQFP,
+	/* AT91SAM9260 */
+	AT91_ST_SAM9XE,
+	/* AT91SAM9G45 */
+	AT91_ST_SAM9G45,
+	AT91_ST_SAM9M10,
+	AT91_ST_SAM9G46,
+	AT91_ST_SAM9M11,
+	/* AT91SAM9X5 */
+	AT91_ST_SAM9G15,
+	AT91_ST_SAM9G25,
+	AT91_ST_SAM9G35,
+	AT91_ST_SAM9X25,
+	AT91_ST_SAM9X35,
+};
+
+enum at91_soc_family {
+	AT91_FAMILY_SAM9 = 0x19,
+	AT91_FAMILY_SAM9XE = 0x29,
+	AT91_FAMILY_RM92 = 0x92,
+};
+
+#define AT91_SOC_NAME_MAX 50
+
+typedef void (*DELAY_t)(int);
+typedef void (*cpu_reset_t)(void);
+typedef void (*clk_init_t)(void);
+
+struct at91_soc_data {
+	DELAY_t		soc_delay;
+	cpu_reset_t	soc_reset;
+	clk_init_t      soc_clock_init;
+	const int	*soc_irq_prio;
+	const struct cpu_devs *soc_children;
+};
+
+struct at91_soc_info {
+	enum at91_soc_type type;
+	enum at91_soc_subtype subtype;
+	enum at91_soc_family family;
+	uint32_t cidr;
+	uint32_t exid;
+	char name[AT91_SOC_NAME_MAX];
+	uint32_t dbgu_base;
+	struct at91_soc_data *soc_data;
+};
+
+extern struct at91_soc_info soc_info;
 
 static inline int at91_is_rm92(void);
 static inline int at91_is_sam9(void);
@@ -70,31 +136,35 @@
 at91_is_rm92(void)
 {
 
-	return (AT91_ARCH(at91_chip_id) == AT91_ARCH_RM92);
+	return (soc_info.type == AT91_T_RM9200);
 }
 
 static inline int
 at91_is_sam9(void)
 {
 
-	return (AT91_ARCH(at91_chip_id) == AT91_ARCH_SAM9);
+	return (soc_info.family == AT91_FAMILY_SAM9);
 }
 
 static inline int
 at91_is_sam9xe(void)
 {
 
-	return (AT91_ARCH(at91_chip_id) == AT91_ARCH_SAM9XE);
+	return (soc_info.family == AT91_FAMILY_SAM9XE);
 }
 
 static inline int
 at91_cpu_is(u_int cpu)
 {
 
-	return (AT91_CPU(at91_chip_id) == cpu);
+	return (soc_info.type == cpu);
 }
 
+void at91_add_child(device_t dev, int prio, const char *name, int unit,
+    bus_addr_t addr, bus_size_t size, int irq0, int irq1, int irq2);
+
 extern uint32_t at91_irq_system;
 extern uint32_t at91_master_clock;
+void at91_pmc_init_clock(void);
 
 #endif /* _AT91VAR_H_ */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/board_bwct.c
--- a/head/sys/arm/at91/board_bwct.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/board_bwct.c	Wed Jul 25 17:18:25 2012 +0300
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2005-2008 Olivier Houchard.  All rights reserved.
- * Copyright (c) 2005-2008 Warner Losh.  All rights reserved.
+ * Copyright (c) 2005-2012 Warner Losh.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -25,42 +25,30 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/at91/board_bwct.c 238465 2012-07-15 05:41:43Z imp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 
+#include <machine/board.h>
 #include <arm/at91/at91board.h>
-#include <arm/at91/at91rm92reg.h>
-#include <arm/at91/at91_piovar.h>
-#include <arm/at91/at91_pio_rm9200.h>
+#include <arm/at91/at91var.h>
+#include <arm/at91/at91rm9200var.h>
 
-long
+BOARD_INIT long
 board_init(void)
 {
+
+	at91rm9200_set_subtype(AT91_ST_RM9200_BGA);
+
 	/*
-	 * 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.
+	 * I don't know anything at all about this board.
 	 */
+	at91rm9200_config_uart(AT91_ID_DBGU, 0, 0);   /* DBGU just Tx and Rx */
 
-	/* 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 */
+	at91rm9200_config_mci(0);
+	/* Configure ethernet */
 
 	return (at91_ramsize());
 }
+
+ARM_BOARD(NONE, "BWCT special");
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/board_ethernut5.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/at91/board_ethernut5.c	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,149 @@
+/*-
+ * Copyright (c) 2012 Marius Strobl <marius at FreeBSD.org>
+ * 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 THE 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 THE 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.
+ */
+
+/*
+ * Ethernut 5 board support
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: head/sys/arm/at91/board_ethernut5.c 238442 2012-07-14 06:00:37Z imp $");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <machine/board.h>
+#include <arm/at91/at91_pioreg.h>
+#include <arm/at91/at91_piovar.h>
+#include <arm/at91/at91board.h>
+#include <arm/at91/at91sam9260reg.h>
+
+BOARD_INIT long
+board_init(void)
+{
+
+	/*
+	 * DBGU
+	 */
+	/* DRXD */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB14, 0);
+	/* DTXD */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB15, 1);
+
+	/*
+	 * EMAC
+	 */
+	/* ETX0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA12, 0);
+	/* ETX1 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA13, 0);
+	/* ERX0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA14, 0);
+	/* ERX1 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA15, 0);
+	/* ETXEN */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA16, 0);
+	/* ERXDV */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA17, 0);
+	/* ERXER */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA18, 0);
+	/* ETXCK */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA19, 0);
+	/* EMDC */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA20, 0);
+	/* EMDIO */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA21, 0);
+
+	/*
+	 * MMC
+	 */
+	/* MCDA0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA6, 1);
+	/* MCCDA */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA7, 1);
+	/* MCCK */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA8, 1);
+	/* MCDA1 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA9, 1);
+	/* MCDA2 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA10, 1);
+	/* MCDA3 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA11, 1);
+
+	/*
+	 * SPI0
+	 */
+	/* MISO */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA0, 0);
+	/* MOSI */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA1, 0);
+	/* SPCK */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA2, 0);
+	/* NPCS0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA3, 0);
+
+	/*
+	 * TWI
+	 */
+	/* TWD */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA23, 1);
+	/* TWCK */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA24, 1);
+
+	/*
+	 * USART0
+	 */
+	/* TXD0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB4, 1);
+	/* RXD0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB5, 0);
+	/* DSR0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB22, 0);
+	/* DCD0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB23, 0);
+	/* DTR0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB24, 1);
+	/* RI0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB25, 0);
+	/* RTS0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB26, 1);
+	/* CTS0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB27, 0);
+
+	/*
+	 * USART2
+	 */
+	/* RTS2 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA4, 1);
+	/* CTS2 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA5, 0);
+	/* TXD2 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB8, 1);
+	/* RXD2 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB9, 0);
+
+	return (at91_ramsize());
+}
+
+ARM_BOARD(ETHERNUT5, "Ethernut 5")
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/board_hl200.c
--- a/head/sys/arm/at91/board_hl200.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/board_hl200.c	Wed Jul 25 17:18:25 2012 +0300
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2005-2008 Olivier Houchard.  All rights reserved.
- * Copyright (c) 2005-2008 Warner Losh.  All rights reserved.
+ * Copyright (c) 2005-2012 Warner Losh.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -25,39 +25,41 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/at91/board_hl200.c 238465 2012-07-15 05:41:43Z imp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 
+#include <machine/board.h>
 #include <arm/at91/at91board.h>
+#include <arm/at91/at91var.h>
 #include <arm/at91/at91rm92reg.h>
-#include <arm/at91/at91_piovar.h>
-#include <arm/at91/at91_pio_rm9200.h>
+#include <arm/at91/at91rm9200var.h>
 
-long
+BOARD_INIT long
 board_init(void)
 {
+
+	at91rm9200_set_subtype(AT91_ST_RM9200_BGA);
+
 	/*
-	 * 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.
+	 * Unsure what all is in the HOTe HL200, but I do know there's
+	 * one serial port that isn't DBGU.  There's many other peripherals
+	 * that need to be configured here.
 	 */
-	/* 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);
+	at91rm9200_config_uart(AT91_ID_DBGU, 0, 0);   /* DBGU just Tx and Rx */
+	at91rm9200_config_uart(AT91RM9200_ID_USART0, 1, 0);   /* Tx and Rx */
+
+	at91rm9200_config_mci(0);			/* HOTe HL200 unknown 1 vs 4 wire */
+
+	/* Enable CF card slot */
+	/* Enable sound thing */
+	/* Enable VGA chip */
+	/* Enable ethernet */
+	/* Enable TWI + RTC */
+	/* Enable USB Host */
+	/* Enable USB Device (gadget) */
 
 	return (at91_ramsize());
 }
+
+ARM_BOARD(NONE, "HOTe 200");
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/board_hl201.c
--- a/head/sys/arm/at91/board_hl201.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/board_hl201.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,16 +25,17 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/at91/board_hl201.c 238189 2012-07-07 05:02:39Z imp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 
+#include <machine/board.h>
 #include <arm/at91/at91board.h>
 #include <arm/at91/at91sam9g20reg.h>
 #include <arm/at91/at91_piovar.h>
 #include <arm/at91/at91_pio_sam9g20.h>
 
-long
+BOARD_INIT long
 board_init(void)
 {
 	/* Setup Ethernet Pins */
@@ -65,3 +66,5 @@
 
 	return (at91_ramsize());
 }
+
+ARM_BOARD(NONE, "HOTe 201");
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/board_kb920x.c
--- a/head/sys/arm/at91/board_kb920x.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/board_kb920x.c	Wed Jul 25 17:18:25 2012 +0300
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2005-2008 Olivier Houchard.  All rights reserved.
- * Copyright (c) 2005-2008 Warner Losh.  All rights reserved.
+ * Copyright (c) 2005-2012 Warner Losh.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -25,48 +25,42 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/at91/board_kb920x.c 238465 2012-07-15 05:41:43Z imp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 
+#include <machine/board.h>
+#include <arm/at91/at91board.h>
 #include <arm/at91/at91var.h>
-#include <arm/at91/at91board.h>
-#include <arm/at91/at91rm92reg.h>
-#include <arm/at91/at91_piovar.h>
-#include <arm/at91/at91_pio_rm9200.h>
+#include <arm/at91/at91rm9200var.h>
 
-long
+BOARD_INIT long
 board_init(void)
 {
+
+	at91rm9200_set_subtype(AT91_ST_RM9200_PQFP);
+
 	/*
-	 * 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.
+	 * Setup the serial ports.
+	 * DBGU is the main one, although jumpers can make USART0 default.
+	 * USART1 is IrDA, and USART3 is optional RS485.
 	 */
-	/* 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);
+	at91rm9200_config_uart(AT91_ID_DBGU, 0, 0);   /* DBGU just Tx and Rx */
+	at91rm9200_config_uart(AT91RM9200_ID_USART0, 1, 0);   /* Tx and Rx */
+	at91rm9200_config_uart(AT91RM9200_ID_USART1, 2, 0);   /* Tx and Rx - IRDA */
+	at91rm9200_config_uart(AT91RM9200_ID_USART3, 3,	/* Tx, Rx, CTS, RTS - RS485 */
+	    AT91_UART_CTS | AT91_UART_RTS);
 
-	/*  MMC/SD Interface */
-	at91_pio_use_periph_a(AT91RM92_PIOA_BASE,AT91C_PA27_MCCK,  0);
-	at91_pio_use_periph_a(AT91RM92_PIOA_BASE,AT91C_PA28_MCCDA, 1);
-	at91_pio_use_periph_a(AT91RM92_PIOA_BASE,AT91C_PA29_MCDA0, 1);
-	at91_pio_use_periph_b(AT91RM92_PIOB_BASE,AT91C_PB3_MCDA1, 1);
-	at91_pio_use_periph_b(AT91RM92_PIOB_BASE,AT91C_PB4_MCDA2, 1);
-	at91_pio_use_periph_b(AT91RM92_PIOB_BASE,AT91C_PB5_MCDA3, 1);
+	at91rm9200_config_mci(1);
+
+	/* CFE interface */
+	/* ethernet interface */
+	/* lcd interface */
+	/* USB host */
+	/* USB device (gadget) */
+	/* TWI */
 
 	return (at91_ramsize());
 }
+
+ARM_BOARD(KB9200, "Kwikbyte KB920x")
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/board_qila9g20.c
--- a/head/sys/arm/at91/board_qila9g20.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/board_qila9g20.c	Wed Jul 25 17:18:25 2012 +0300
@@ -24,14 +24,15 @@
  */
 
 /* Calao Systems QIL-9G20-Cxx
- * http://www.calao-systems.com 
+ * http://www.calao-systems.com
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/at91/board_qila9g20.c 238189 2012-07-07 05:02:39Z imp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 
+#include <machine/board.h>
 #include <arm/at91/at91board.h>
 #include <arm/at91/at91reg.h>
 #include <arm/at91/at91var.h>
@@ -44,7 +45,7 @@
 #define AT91SAM9G20_LED_SIZE AT91SAM9G20_PIO_SIZE
 #define AT91SAM9G20_IRQ_LED AT91SAM9G20_IRQ_PIOA
 
-long
+BOARD_INIT long
 board_init(void)
 {
 
@@ -103,3 +104,5 @@
 
 	return (at91_ramsize());
 }
+
+ARM_BOARD(QIL_A9G20, "Calico System QIL-9G20-Cxx");
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/board_sam9260ek.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/at91/board_sam9260ek.c	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,149 @@
+/*-
+ * Copyright (c) 2012 Marius Strobl <marius at FreeBSD.org>
+ * 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 THE 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 THE 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.
+ */
+
+/*
+ * Ethernut 5 board support
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: head/sys/arm/at91/board_sam9260ek.c 238443 2012-07-14 06:13:23Z imp $");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <machine/board.h>
+#include <arm/at91/at91_pioreg.h>
+#include <arm/at91/at91_piovar.h>
+#include <arm/at91/at91board.h>
+#include <arm/at91/at91sam9260reg.h>
+
+BOARD_INIT long
+board_init(void)
+{
+
+	/*
+	 * DBGU
+	 */
+	/* DRXD */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB14, 0);
+	/* DTXD */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB15, 1);
+
+	/*
+	 * EMAC
+	 */
+	/* ETX0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA12, 0);
+	/* ETX1 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA13, 0);
+	/* ERX0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA14, 0);
+	/* ERX1 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA15, 0);
+	/* ETXEN */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA16, 0);
+	/* ERXDV */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA17, 0);
+	/* ERXER */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA18, 0);
+	/* ETXCK */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA19, 0);
+	/* EMDC */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA20, 0);
+	/* EMDIO */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA21, 0);
+
+	/*
+	 * MMC
+	 */
+	/* MCDA0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA6, 1);
+	/* MCCDA */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA7, 1);
+	/* MCCK */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA8, 1);
+	/* MCDA1 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA9, 1);
+	/* MCDA2 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA10, 1);
+	/* MCDA3 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA11, 1);
+
+	/*
+	 * SPI0
+	 */
+	/* MISO */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA0, 0);
+	/* MOSI */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA1, 0);
+	/* SPCK */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA2, 0);
+	/* NPCS0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA3, 0);
+
+	/*
+	 * TWI
+	 */
+	/* TWD */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA23, 1);
+	/* TWCK */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA24, 1);
+
+	/*
+	 * USART0
+	 */
+	/* TXD0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB4, 1);
+	/* RXD0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB5, 0);
+	/* DSR0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB22, 0);
+	/* DCD0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB23, 0);
+	/* DTR0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB24, 1);
+	/* RI0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB25, 0);
+	/* RTS0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB26, 1);
+	/* CTS0 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB27, 0);
+
+	/*
+	 * USART2
+	 */
+	/* RTS2 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA4, 1);
+	/* CTS2 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOA_BASE, AT91C_PIO_PA5, 0);
+	/* TXD2 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB8, 1);
+	/* RXD2 */
+	at91_pio_use_periph_a(AT91SAM9260_PIOB_BASE, AT91C_PIO_PB9, 0);
+
+	return (at91_ramsize());
+}
+
+ARM_BOARD(AT91SAM9260EK, "Atmel SMA9260-EK")
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/board_sam9g20ek.c
--- a/head/sys/arm/at91/board_sam9g20ek.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/board_sam9g20ek.c	Wed Jul 25 17:18:25 2012 +0300
@@ -23,20 +23,17 @@
  * SUCH DAMAGE.
  */
 
-/* 
+/*
  * This board file can be used for both:
- * Atmel AT91SAM9260-B Development Card and
- * Atmel AT91SAM9G20-EK Rev. B Development Card 
- * 
- * Since the AT91SAM9260 and AT91SAM9G20 have identical memory maps and 
- * pin configurations we can use the same file for both.
+ * Atmel SAM9G20-EK Development Card
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/at91/board_sam9g20ek.c 238189 2012-07-07 05:02:39Z imp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 
+#include <machine/board.h>
 #include <arm/at91/at91board.h>
 #include <arm/at91/at91reg.h>
 #include <arm/at91/at91var.h>
@@ -45,7 +42,7 @@
 #include <arm/at91/at91_pio_sam9g20.h>
 //#include <arm/at91/at91_led.h>
 
-long
+BOARD_INIT long
 board_init(void)
 {
 	/* PIOB's A periph: Turn USART 0's TX/RX pins */
@@ -73,7 +70,7 @@
 	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA24_TWCK, 1);
 
 #if 1
-	/* 
+	/*
 	 * Turn off Clock to DataFlash, conflicts with MCI clock.
 	 */
 	at91_pio_use_gpio(AT91SAM9G20_PIOA_BASE,AT91C_PIO_PA2);
@@ -126,3 +123,5 @@
 
 	return (at91_ramsize());
 }
+
+ARM_BOARD(AT91SAM9G20, "Atmel SAM9G20-EK Development Card");
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/board_sam9x25ek.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/at91/board_sam9x25ek.c	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,128 @@
+/*-
+ * Copyright (c) 2009 Greg Ansley.  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.
+ */
+
+/* 
+ * This board file can be used for both:
+ * SAM9X26EK board
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: head/sys/arm/at91/board_sam9x25ek.c 238189 2012-07-07 05:02:39Z imp $");
+#include <sys/param.h>
+#include <sys/systm.h>
+
+#include <machine/board.h>
+#include <arm/at91/at91board.h>
+#include <arm/at91/at91reg.h>
+#include <arm/at91/at91var.h>
+#include <arm/at91/at91sam9g20reg.h>
+#include <arm/at91/at91_piovar.h>
+#include <arm/at91/at91_pio_sam9g20.h>
+//#include <arm/at91/at91_led.h>
+
+BOARD_INIT long
+board_init(void)
+{
+#if 0
+	/* PIOB's A periph: Turn USART 0's TX/RX pins */
+	at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB14_DRXD, 0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB15_DTXD, 1);
+
+	/* PIOB's A periph: Turn USART 0's TX/RX pins */
+	at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB4_TXD0, 1);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB5_RXD0, 0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB22_DSR0, 0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB23_DCD0, 0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB24_DTR0, 1);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB25_RI0, 0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB26_RTS0, 1);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB27_CTS0, 0);
+
+	/* PIOB's A periph: Turn USART 1's TX/RX pins */
+	at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB6_TXD1, 1);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB7_RXD1, 0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB28_RTS1, 1);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOB_BASE, AT91C_PB29_CTS1, 0);
+
+	/*  TWI Two-wire Serial Data */
+	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA23_TWD,  1);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA24_TWCK, 1);
+
+#if 1
+	/* 
+	 * Turn off Clock to DataFlash, conflicts with MCI clock.
+	 */
+	at91_pio_use_gpio(AT91SAM9G20_PIOA_BASE,AT91C_PIO_PA2);
+	at91_pio_gpio_input(AT91SAM9G20_PIOA_BASE,AT91C_PIO_PA2);
+
+	/* Turn off chip select to DataFlash */
+	at91_pio_gpio_output(AT91SAM9G20_PIOC_BASE,AT91C_PIO_PC11, 0);
+	at91_pio_gpio_set(AT91SAM9G20_PIOC_BASE,AT91C_PIO_PC11);
+	at91_pio_use_gpio(AT91SAM9G20_PIOC_BASE,AT91C_PIO_PC11);
+
+	/*  Multimedia Card  */
+	at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA0_MCDB0, 1);
+	at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA1_MCCDB, 1);
+	at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA3_MCDB3, 1);
+	at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA4_MCDB2, 1);
+	at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA5_MCDB1, 1);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA8_MCCK,  1);
+	at91_pio_use_gpio(AT91SAM9G20_PIOC_BASE, AT91C_PIO_PC9);
+#else
+	/* SPI0 to DataFlash */
+	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE, AT91C_PIO_PA0, 0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE, AT91C_PIO_PA1, 0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE, AT91C_PIO_PA2, 0);
+	at91_pio_use_periph_b(AT91SAM9G20_PIOC_BASE, AT91C_PIO_PC11,0);
+
+	at91_pio_gpio_input(AT91SAM9G20_PIOA_BASE,AT91C_PIO_PA8);
+	at91_pio_use_gpio(AT91SAM9G20_PIOA_BASE,AT91C_PIO_PA8);
+#endif
+
+	/* EMAC */
+	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA12_ETX0 ,  0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA13_ETX1,   0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA14_ERX0,   0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA15_ERX1,   0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA16_ETXEN,  0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA17_ERXDV,  0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA18_ERXER,  0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA19_ETXCK,  0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA20_EMDC,   0);
+	at91_pio_use_periph_a(AT91SAM9G20_PIOA_BASE,AT91C_PA21_EMDIO,  0);
+
+	at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA10_ETX2_0, 0);
+	at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA11_ETX3_0, 0);
+	at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA22_ETXER,  0);
+	at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA25_ERX2,   0);
+	at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA26_ERX3,   0);
+	at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA27_ERXCK,  0);
+	at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA28_ECRS,   0);
+	at91_pio_use_periph_b(AT91SAM9G20_PIOA_BASE,AT91C_PA29_ECOL,   0);
+#endif
+	return (at91_ramsize());
+}
+
+ARM_BOARD(AT91SAM9X5EK, "Atmel AT91SAM9x-EK Evaluation Board");
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/board_tsc4370.c
--- a/head/sys/arm/at91/board_tsc4370.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/board_tsc4370.c	Wed Jul 25 17:18:25 2012 +0300
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2005-2008 Olivier Houchard.  All rights reserved.
- * Copyright (c) 2005-2008 Warner Losh.  All rights reserved.
+ * Copyright (c) 2005-2012 Warner Losh.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -25,43 +25,38 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/at91/board_tsc4370.c 238465 2012-07-15 05:41:43Z imp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 
+#include <machine/board.h>
 #include <arm/at91/at91board.h>
+#include <arm/at91/at91var.h>
 #include <arm/at91/at91rm92reg.h>
+#include <arm/at91/at91rm9200var.h>
 #include <arm/at91/at91_piovar.h>
-#include <arm/at91/at91_pio_rm9200.h>
+#include <arm/at91/at91_pioreg.h>
 
-long
+BOARD_INIT 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);
+	at91rm9200_set_subtype(AT91_ST_RM9200_PQFP);
+
+	at91rm9200_config_uart(AT91_ID_DBGU, 0, 0);   /* DBGU just Tx and Rx */
+	at91rm9200_config_uart(AT91RM9200_ID_USART0, 1, 0);   /* Tx and Rx */
+	at91rm9200_config_uart(AT91RM9200_ID_USART1, 2, 0);   /* Tx and Rx */
+	at91rm9200_config_uart(AT91RM9200_ID_USART2, 3, 0);   /* Tx and Rx */
+	at91rm9200_config_uart(AT91RM9200_ID_USART3, 4, 0);   /* Tx and Rx */
+
+	at91rm9200_config_mci(0);			/* tsc4370 board has only 1 wire */
+							/* Newer boards may have 4 wires */
+
+	/* Configure TWI */
+	/* Configure SPI + dataflash */
+	/* Configure SSC */
+	/* Configure USB Host */
+	/* Configure FPGA attached to chip selects */
 
 	/* Pin assignment */
 	/* Assert PA24 low -- talk to rubidium */
@@ -73,3 +68,5 @@
 
 	return (at91_ramsize());
 }
+
+ARM_BOARD(NONE, "TSC4370 Controller Board");
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/files.at91
--- a/head/sys/arm/at91/files.at91	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/files.at91	Wed Jul 25 17:18:25 2012 +0300
@@ -1,4 +1,4 @@
-# $FreeBSD$
+# $FreeBSD: head/sys/arm/at91/files.at91 238443 2012-07-14 06:13:23Z imp $
 arm/arm/cpufunc_asm_arm9.S	standard
 arm/arm/irq_dispatch.S		standard
 arm/at91/at91_machdep.c		standard
@@ -8,25 +8,41 @@
 arm/at91/at91_nand.c		optional	nand
 arm/at91/at91_pio.c		standard
 arm/at91/at91_pmc.c		standard
+arm/at91/at91_pit.c		optional	at91sam9
+arm/at91/at91_reset.S		optional	at91sam9
+arm/at91/at91_rst.c		optional	at91sam9
 arm/at91/at91_rtc.c		optional	at91_rtc
 arm/at91/at91_spi.c		optional	at91_spi		\
 	dependency	"spibus_if.h"
 arm/at91/at91_ssc.c		optional	at91_ssc
-arm/at91/at91_st.c		standard
+arm/at91/at91_st.c		optional	at91rm9200
 arm/at91/at91_tc.c		optional	at91_tc
 arm/at91/at91_twi.c		optional	at91_twi
+arm/at91/at91_wdt.c		optional	at91_wdt
 arm/at91/if_ate.c		optional	ate
+arm/at91/if_macb.c		optional	macb
 arm/at91/uart_bus_at91usart.c	optional	uart
-arm/at91/uart_cpu_at91rm9200usart.c	optional	uart
+arm/at91/uart_cpu_at91usart.c	optional	uart
 arm/at91/uart_dev_at91usart.c	optional	uart
 #
 # All the "systems on a chip" we support
 #
-arm/at91/at91rm9200.c		standard
+arm/at91/at91soc.c		standard
+arm/at91/at91rm9200.c		optional	at91rm9200
+arm/at91/at91rm9200_devices.c	optional	at91rm9200
+arm/at91/at91sam9260.c		optional	at91sam9260
+arm/at91/at91sam9g20.c		optional	at91sam9g20
+arm/at91/at91sam9x25.c		optional	at91sam9x25
 #
 # All the boards we support
 #
 arm/at91/board_bwct.c		optional	at91_board_bwct
+arm/at91/board_ethernut5.c	optional	at91_board_ethernut5
 arm/at91/board_hl200.c		optional	at91_board_hl200
+arm/at91/board_hl201.c		optional	at91_board_hl201
 arm/at91/board_kb920x.c		optional	at91_board_kb920x
+arm/at91/board_qila9g20.c	optional	at91_board_qila9g20
+arm/at91/board_sam9260ek.c	optional	at91_board_sam9260ek
+arm/at91/board_sam9g20ek.c	optional	at91_board_sam9g20ek
+arm/at91/board_sam9x25ek.c	optional	at91_board_sam9x25ek
 arm/at91/board_tsc4370.c	optional	at91_board_tsc4370
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/files.at91sam9
--- a/head/sys/arm/at91/files.at91sam9	Wed Jul 25 17:14:19 2012 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-# $FreeBSD$
-arm/arm/cpufunc_asm_arm9.S	standard
-arm/arm/irq_dispatch.S		standard
-arm/at91/at91_machdep.c		standard
-arm/at91/at91.c			standard
-arm/at91/at91_mci.c		optional	at91_mci
-arm/at91/at91_nand.c		optional	nand
-arm/at91/at91_pio.c		standard
-arm/at91/at91_pmc.c		standard
-arm/at91/at91_pit.c		standard
-arm/at91/at91_reset.S		standard
-arm/at91/at91_rst.c		standard
-arm/at91/at91_spi.c		optional	at91_spi		\
-	dependency	"spibus_if.h"
-arm/at91/at91_ssc.c		optional	at91_ssc
-arm/at91/at91_tc.c		optional	at91_tc
-arm/at91/at91_twi.c		optional	at91_twi
-arm/at91/at91_wdt.c		optional	at91_wdt
-arm/at91/if_ate.c		optional	ate
-arm/at91/if_macb.c		optional	macb
-arm/at91/uart_bus_at91usart.c	optional	uart
-arm/at91/uart_cpu_at91rm9200usart.c	optional	uart
-arm/at91/uart_dev_at91usart.c	optional	uart
-dev/usb/controller/ohci_atmelarm.c	optional	ohci
-#
-# All the "systems on a chip" we support
-#
-arm/at91/at91sam9g20.c		optional	at91sam9g20
-arm/at91/at91sam9260.c		optional	at91sam9260
-#
-#
-# All the boards we support
-#
-arm/at91/board_hl201.c		optional	at91_board_hl201
-arm/at91/board_sam9g20ek.c	optional	at91_board_sam9g20ek
-arm/at91/board_qila9g20.c	optional	at91_board_qila9g20
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/hints.at91rm9200
--- a/head/sys/arm/at91/hints.at91rm9200	Wed Jul 25 17:14:19 2012 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-# $FreeBSD$
-#
-
-# These are the wiring for the at91rm9200.  These are the built-in devices
-# for that cpu.
-
-# DBGU is unit 0
-hint.uart.0.at="apb"
-hint.uart.0.maddr="0xfffff200"
-hint.uart.0.flags=0x10
-# USART0 is unit 1
-hint.uart.1.at="apb"
-hint.uart.1.maddr="0xfffc0000"
-# USART1 is unit 2
-hint.uart.2.at="apb"
-hint.uart.2.maddr="0xfffc4000"
-# USART2 is unit 3
-hint.uart.3.at="apb"
-hint.uart.3.maddr="0xfffc8000"
-# USART3 is unit 4
-hint.uart.4.at="apb"
-hint.uart.4.maddr="0xfffcc000"
-
-# SSC0
-hint.ssc.0.at="apb"
-hint.ssc.0.maddr="0xfffd0000"
-# SSC1
-hint.ssc.1.at="apb"
-hint.ssc.1.maddr="0xfffd4000"
-# SSC2
-hint.ssc.1.at="apb"
-hint.ssc.1.maddr="0xfffd8000"
-
-# TC0, TC1, TC2
-hint.tc.0.at="apb"
-hint.tc.0.maddr="0xfffa0000"
-# TC3, TC4, TC5
-hint.tc.1.at="apb"
-hint.tc.1.maddr="0xfffa4000"
-
-# USB Device
-hint.udp.0.at="apb"
-hint.udp.0.maddr="0xfffb0000"
-
-# MCI
-hint.mci.0.at="apb"
-hint.mci.0.maddr="0xfffb4000"
-
-# TWI
-hint.twi.0.at="apb"
-hint.twi.0.maddr="0xfffb8000"
-
-# EMAC
-hint.emac.0.at="apb"
-hint.emac.0.maddr="0xfffbc000"
-
-# SPI
-hint.spi.0.at="apb"
-hint.spi.0.maddr="0xfffe0000"
-
-# PMC
-hint.pmc.0.at="apb"
-hint.pmc.0.maddr="0xfffffc00"
-
-# USB host (ohci)
-#??? maybe this needs to be on asb instead of apb
-hint.ohci.at="apb"
-hint.ohci.maddr="0x00300000"
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/hints.at91sam9261
--- a/head/sys/arm/at91/hints.at91sam9261	Wed Jul 25 17:14:19 2012 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-# $FreeBSD$
-#
-
-# These are the wiring for the at91sam9261.  These are the built-in devices
-# for that cpu.
-
-# DBGU is unit 0
-hint.uart.0.at="apb"
-hint.uart.0.maddr="0xfffff200"
-hint.uart.0.flags=0x10
-# USART0 is unit 1
-hint.uart.1.at="apb"
-hint.uart.1.maddr="0xfffb0000"
-# USART1 is unit 2
-hint.uart.2.at="apb"
-hint.uart.2.maddr="0xfffb4000"
-# USART2 is unit 3
-hint.uart.3.at="apb"
-hint.uart.3.maddr="0xfffb8000"
-# USART3 is unit 4
-hint.uart.4.at="apb"
-hint.uart.4.maddr="0xfffbc000"
-
-# TC0, TC1, TC2
-hint.tc.0.at="apb"
-hint.tc.0.maddr="0xfffa0000"
-
-# USB Device
-hint.udp.0.at="apb"
-hint.udp.0.maddr="0xfffa4000"
-
-# MCI
-hint.mci.0.at="apb"
-hint.mci.0.maddr="0xfffa8000"
-
-# TWI
-hint.twi.0.at="apb"
-hint.twi.0.maddr="0xfffac000"
-
-# SSC0
-hint.ssc.0.at="apb"
-hint.ssc.0.maddr="0xfffbc000"
-# SSC1
-hint.ssc.1.at="apb"
-hint.ssc.1.maddr="0xfffc0000"
-# SSC2
-hint.ssc.1.at="apb"
-hint.ssc.1.maddr="0xfffc4000"
-
-# SPI0
-hint.spi.0.at="apb"
-hint.spi.0.maddr="0xfffc8000"
-# SSC1
-hint.spi.1.at="apb"
-hint.spi.1.maddr="0xfffcc000"
-
-# PMC
-hint.pmc.0.at="apb"
-hint.pmc.0.maddr="0xfffffc00"
-
-# USB host (ohci)
-#??? maybe this needs to be on asb instead of apb
-hint.ohci.at="apb"
-hint.ohci.maddr="0x00500000"
-# LCD controller
-hint.atlcd.at="apb"
-hint.atlcd.maddr="0x00600000"
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/if_macb.c
--- a/head/sys/arm/at91/if_macb.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/if_macb.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/at91/if_macb.c 236989 2012-06-13 04:52:19Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -730,7 +730,7 @@
 
 		m = sc->rx_desc[sc->rx_cons].buff;
 
-		bus_dmamap_sync(sc->dmatag_ring_rx, 
+		bus_dmamap_sync(sc->dmatag_ring_rx,
 		    sc->rx_desc[sc->rx_cons].dmamap, BUS_DMASYNC_POSTREAD);
 		if (macb_new_rxbuf(sc, sc->rx_cons) != 0) {
 			ifp->if_iqdrops++;
@@ -739,7 +739,7 @@
 			do  {
 				rxdesc->flags = DATA_SIZE;
 				MACB_DESC_INC(sc->rx_cons, MACB_MAX_RX_BUFFERS);
-				if ((rxdesc->flags & RD_EOF) != 0) 
+				if ((rxdesc->flags & RD_EOF) != 0)
 					break;
 				rxdesc = &(sc->desc_rx[sc->rx_cons]);
 			} while (sc->rx_cons != first);
@@ -776,7 +776,7 @@
 			if (nsegs > 1) {
 				sc->macb_cdata.rxtail->m_len = (rxbytes -
 				    ((nsegs - 1) * DATA_SIZE)) + 2;
-			} 
+			}
 
 			m = sc->macb_cdata.rxhead;
 			m->m_flags |= M_PKTHDR;
@@ -1102,7 +1102,7 @@
 	int count;
 	uint32_t multicast_filter[2];
 
-	ifp = sc->ifp;       
+	ifp = sc->ifp;
 
 	config = read_4(sc, EMAC_NCFGR);
 	
@@ -1132,7 +1132,7 @@
 		if (ifma->ifma_addr->sa_family != AF_LINK)
 			continue;
 		count++;
-		set_mac_filter(multicast_filter, 
+		set_mac_filter(multicast_filter,
 			   LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
 	}
 	if (count) {
@@ -1501,7 +1501,7 @@
 
 	mii = device_get_softc(sc->miibus);
 
-	sc->flags &= ~MACB_FLAG_LINK;       
+	sc->flags &= ~MACB_FLAG_LINK;
 
 	config = read_4(sc, EMAC_NCFGR);
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/std.at91
--- a/head/sys/arm/at91/std.at91	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/std.at91	Wed Jul 25 17:18:25 2012 +0300
@@ -1,6 +1,9 @@
-# $FreeBSD$
+# $FreeBSD: head/sys/arm/at91/std.at91 237881 2012-07-01 06:34:17Z imp $
 
-files	"../at91/files.at91"
+files		"../at91/files.at91"
 cpu		CPU_ARM9
 makeoptions	CONF_CFLAGS=-mcpu=arm9
 options 	PHYSADDR=0x20000000
+
+# For now, just do the AT91RM9200
+device		at91rm9200
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/std.at91sam9
--- a/head/sys/arm/at91/std.at91sam9	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/std.at91sam9	Wed Jul 25 17:18:25 2012 +0300
@@ -1,9 +1,9 @@
-# $FreeBSD$
+# $FreeBSD: head/sys/arm/at91/std.at91sam9 237881 2012-07-01 06:34:17Z imp $
 
-files	"../at91/files.at91sam9"
+files		"../at91/files.at91"
 cpu		CPU_ARM9
-makeoptions	CONF_CFLAGS="-mcpu=arm9"
+makeoptions	CONF_CFLAGS=-mcpu=arm9
 options 	PHYSADDR=0x20000000
 
-device		at91sam9g20
-device		at91sam9260
+# bring in the sam specific timers and such
+device		at91sam9
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/std.atmel
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/at91/std.atmel	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,15 @@
+# $FreeBSD: head/sys/arm/at91/std.atmel 237883 2012-07-01 06:56:41Z imp $
+
+files		"../at91/files.at91"
+cpu		CPU_ARM9
+makeoptions	CONF_CFLAGS=-mcpu=arm9
+options 	PHYSADDR=0x20000000
+
+# Supported SoCs for the at91 platform
+device		at91rm9200
+device		at91sam9260
+device		at91sam9g20
+device		at91sam9x25
+
+# bring in the sam specific timers and such
+device		at91sam9
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/std.ethernut5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/at91/std.ethernut5	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,11 @@
+# $FreeBSD: head/sys/arm/at91/std.ethernut5 237881 2012-07-01 06:34:17Z imp $
+include "../at91/std.at91sam9"
+
+options 	STARTUP_PAGETABLE_ADDR=0x20800000
+makeoptions	KERNPHYSADDR=0x20000000
+makeoptions	KERNVIRTADDR=0xc0000000
+options 	KERNPHYSADDR=0x20000000
+options 	KERNVIRTADDR=0xc0000000
+
+device		at91_board_ethernut5
+device		at91sam9260
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/std.hl200
--- a/head/sys/arm/at91/std.hl200	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/std.hl200	Wed Jul 25 17:18:25 2012 +0300
@@ -1,4 +1,4 @@
-#$FreeBSD$
+#$FreeBSD: head/sys/arm/at91/std.hl200 236215 2012-05-29 03:23:18Z imp $
 include "../at91/std.at91"
 
 options		STARTUP_PAGETABLE_ADDR=0x20000000
@@ -6,6 +6,5 @@
 options		KERNPHYSADDR=0x20100000	
 makeoptions	KERNVIRTADDR=0xc0100000
 options		KERNVIRTADDR=0xc0100000
-options		AT91C_MASTER_CLOCK=45000000
 
 device		at91_board_hl200
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/std.hl201
--- a/head/sys/arm/at91/std.hl201	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/std.hl201	Wed Jul 25 17:18:25 2012 +0300
@@ -1,4 +1,4 @@
-#$FreeBSD$
+#$FreeBSD: head/sys/arm/at91/std.hl201 237881 2012-07-01 06:34:17Z imp $
 include "../at91/std.at91sam9"
 
 options		STARTUP_PAGETABLE_ADDR=0x20800000
@@ -6,6 +6,6 @@
 makeoptions	KERNVIRTADDR=0xc0000000
 options		KERNPHYSADDR=0x20000000	
 options		KERNVIRTADDR=0xc0000000
-options		AT91C_MASTER_CLOCK=132000000
 
 device		at91_board_hl201
+device		at91sam9g20
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/std.kb920x
--- a/head/sys/arm/at91/std.kb920x	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/std.kb920x	Wed Jul 25 17:18:25 2012 +0300
@@ -1,4 +1,4 @@
-#$FreeBSD$
+#$FreeBSD: head/sys/arm/at91/std.kb920x 236215 2012-05-29 03:23:18Z imp $
 include "../at91/std.at91"
 
 options		STARTUP_PAGETABLE_ADDR=0x20800000
@@ -6,6 +6,5 @@
 options		KERNPHYSADDR=0x20000000	
 makeoptions	KERNVIRTADDR=0xc0000000
 options		KERNVIRTADDR=0xc0000000
-options		AT91C_MASTER_CLOCK=60000000
 
 device		at91_board_kb920x
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/std.qila9g20
--- a/head/sys/arm/at91/std.qila9g20	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/std.qila9g20	Wed Jul 25 17:18:25 2012 +0300
@@ -1,4 +1,4 @@
-#$FreeBSD$
+#$FreeBSD: head/sys/arm/at91/std.qila9g20 237881 2012-07-01 06:34:17Z imp $
 include "../at91/std.at91sam9"
 
 options		STARTUP_PAGETABLE_ADDR=0x20800000
@@ -6,6 +6,6 @@
 makeoptions	KERNVIRTADDR=0xc0000000
 options		KERNPHYSADDR=0x20000000	
 options		KERNVIRTADDR=0xc0000000
-options		AT91C_MASTER_CLOCK=((12000000*133)/12)
 
 device		at91_board_qila9g20
+device		at91sam9g20
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/std.sam9260ek
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/at91/std.sam9260ek	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,11 @@
+# $FreeBSD: head/sys/arm/at91/std.sam9260ek 238443 2012-07-14 06:13:23Z imp $
+include "../at91/std.at91sam9"
+
+options 	STARTUP_PAGETABLE_ADDR=0x20800000
+makeoptions	KERNPHYSADDR=0x20000000
+makeoptions	KERNVIRTADDR=0xc0000000
+options 	KERNPHYSADDR=0x20000000
+options 	KERNVIRTADDR=0xc0000000
+
+device		at91_board_sam9260ek
+device		at91sam9260
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/std.sam9g20ek
--- a/head/sys/arm/at91/std.sam9g20ek	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/std.sam9g20ek	Wed Jul 25 17:18:25 2012 +0300
@@ -1,4 +1,4 @@
-#$FreeBSD$
+#$FreeBSD: head/sys/arm/at91/std.sam9g20ek 237881 2012-07-01 06:34:17Z imp $
 include "../at91/std.at91sam9"
 
 options		STARTUP_PAGETABLE_ADDR=0x20800000
@@ -7,9 +7,5 @@
 options		KERNPHYSADDR=0x20000000	
 options		KERNVIRTADDR=0xc0000000
 
-#SAM9G20 w/ 18.432 Mhz Clock
-#options	AT91C_MASTER_CLOCK=((18432000*43)/6)
-#SAM9260 w/ 18.432 Mhz Clock
-#options	AT91C_MASTER_CLOCK=((18432000*97)/18)
-
 device		at91_board_sam9g20ek
+device		at91sam9g20
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/std.sam9x25ek
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/at91/std.sam9x25ek	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,11 @@
+#$FreeBSD: head/sys/arm/at91/std.sam9x25ek 237881 2012-07-01 06:34:17Z imp $
+include "../at91/std.at91sam9"
+
+options		STARTUP_PAGETABLE_ADDR=0x20800000
+makeoptions	KERNPHYSADDR=0x20000000
+makeoptions	KERNVIRTADDR=0xc0000000
+options		KERNPHYSADDR=0x20000000	
+options		KERNVIRTADDR=0xc0000000
+
+device		at91_board_sam9x25ek
+device		at91sam9x25
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/uart_bus_at91usart.c
--- a/head/sys/arm/at91/uart_bus_at91usart.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/uart_bus_at91usart.c	Wed Jul 25 17:18:25 2012 +0300
@@ -26,7 +26,7 @@
 #include "opt_uart.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/at91/uart_bus_at91usart.c 238325 2012-07-10 01:13:00Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -42,33 +42,32 @@
 #include <dev/uart/uart_bus.h>
 #include <dev/uart/uart_cpu.h>
 
-#include <arm/at91/at91rm92reg.h>
 #include <arm/at91/at91var.h>
 
 #include "uart_if.h"
 
-static int usart_at91rm92_probe(device_t dev);
+static int usart_at91_probe(device_t dev);
 
 extern struct uart_class at91_usart_class;
 
-static device_method_t usart_at91rm92_methods[] = {
+static device_method_t usart_at91_methods[] = {
 	/* Device interface */
-	DEVMETHOD(device_probe,		usart_at91rm92_probe),
+	DEVMETHOD(device_probe,		usart_at91_probe),
 	DEVMETHOD(device_attach,	uart_bus_attach),
 	DEVMETHOD(device_detach,	uart_bus_detach),
 	{ 0, 0 }
 };
 
-static driver_t usart_at91rm92_driver = {
+static driver_t usart_at91_driver = {
 	uart_driver_name,
-	usart_at91rm92_methods,
+	usart_at91_methods,
 	sizeof(struct uart_softc),
 };
 
 extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs;
 
 static int
-usart_at91rm92_probe(device_t dev)
+usart_at91_probe(device_t dev)
 {
 	struct uart_softc *sc;
 
@@ -104,4 +103,4 @@
 }
 
 
-DRIVER_MODULE(uart, atmelarm, usart_at91rm92_driver, uart_devclass, 0, 0);
+DRIVER_MODULE(uart, atmelarm, usart_at91_driver, uart_devclass, 0, 0);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/uart_cpu_at91rm9200usart.c
--- a/head/sys/arm/at91/uart_cpu_at91rm9200usart.c	Wed Jul 25 17:14:19 2012 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*-
- * Copyright (c) 2003 Marcel Moolenaar
- * Copyright (c) 2006 M. 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 "opt_uart.h"
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/bus.h>
-#include <sys/cons.h>
-#include <sys/lock.h>
-#include <sys/mutex.h>
-#include <machine/bus.h>
-
-#include <dev/uart/uart.h>
-#include <dev/uart/uart_bus.h>
-#include <dev/uart/uart_cpu.h>
-
-#include <arm/at91/at91rm92reg.h>
-#include <arm/at91/at91var.h>
-
-bus_space_tag_t uart_bus_space_io;
-bus_space_tag_t uart_bus_space_mem;
-
-extern struct uart_class at91_usart_class;
-extern struct bus_space at91_bs_tag;
-
-int
-uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2)
-{
-	return ((b1->bsh == b2->bsh && b1->bst == b2->bst) ? 1 : 0);
-}
-
-int
-uart_cpu_getdev(int devtype, struct uart_devinfo *di)
-{
-	struct uart_class *class;
-
-	class = &at91_usart_class;
-	if (class->uc_rclk == 0 && at91_master_clock != 0)
-		class->uc_rclk = at91_master_clock;
-	di->ops = uart_getops(class);
-	di->bas.chan = 0;
-	di->bas.bst = &at91_bs_tag;
-	/* 
-	 * XXX: Not pretty, but will work because we map the needed addresses
-	 * early.
-	 */
-	di->bas.bsh = AT91RM92_BASE + AT91RM92_DBGU_BASE;
-	di->baudrate = 115200;
-	di->bas.regshft = 0;
-	di->bas.rclk = 0;
-	di->databits = 8;
-	di->stopbits = 1;
-	di->parity = UART_PARITY_NONE;
-	uart_bus_space_io = &at91_bs_tag;
-	uart_bus_space_mem = NULL;
-	/* Check the environment for overrides */
-	uart_getenv(devtype, di, class);
-	return (0);
-}
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/uart_cpu_at91usart.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/at91/uart_cpu_at91usart.c	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,88 @@
+/*-
+ * Copyright (c) 2003 Marcel Moolenaar
+ * Copyright (c) 2006 M. 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 "opt_uart.h"
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: head/sys/arm/at91/uart_cpu_at91usart.c 238404 2012-07-12 19:15:38Z imp $");
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/cons.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
+#include <machine/bus.h>
+
+#include <dev/uart/uart.h>
+#include <dev/uart/uart_bus.h>
+#include <dev/uart/uart_cpu.h>
+
+#include <arm/at91/at91var.h>
+
+bus_space_tag_t uart_bus_space_io;
+bus_space_tag_t uart_bus_space_mem;
+
+extern struct uart_class at91_usart_class;
+extern struct bus_space at91_bs_tag;
+
+int
+uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2)
+{
+	return ((b1->bsh == b2->bsh && b1->bst == b2->bst) ? 1 : 0);
+}
+
+int
+uart_cpu_getdev(int devtype, struct uart_devinfo *di)
+{
+	struct uart_class *class;
+
+	class = &at91_usart_class;
+	if (class->uc_rclk == 0 && at91_master_clock != 0)
+		class->uc_rclk = at91_master_clock;
+	di->ops = uart_getops(class);
+	di->bas.chan = 0;
+	di->bas.bst = &at91_bs_tag;
+	/*
+	 * XXX: Not pretty, but will work because we map the needed addresses
+	 * early.  At least we probed this so that the console will work on
+         * all flavors of Atmel we can detect.
+	 */
+	di->bas.bsh = soc_info.dbgu_base;
+	di->baudrate = 115200;
+	di->bas.regshft = 0;
+	di->bas.rclk = 0;
+	di->databits = 8;
+	di->stopbits = 1;
+	di->parity = UART_PARITY_NONE;
+	uart_bus_space_io = &at91_bs_tag;
+	uart_bus_space_mem = NULL;
+	/* Check the environment for overrides */
+	uart_getenv(devtype, di, class);
+	return (0);
+}
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/at91/uart_dev_at91usart.c
--- a/head/sys/arm/at91/uart_dev_at91usart.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/at91/uart_dev_at91usart.c	Wed Jul 25 17:18:25 2012 +0300
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/at91/uart_dev_at91usart.c 225882 2011-09-30 04:55:23Z kevlo $");
+__FBSDID("$FreeBSD: head/sys/arm/at91/uart_dev_at91usart.c 234901 2012-05-01 20:42:03Z marius $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -40,7 +40,6 @@
 #include <dev/uart/uart.h>
 #include <dev/uart/uart_cpu.h>
 #include <dev/uart/uart_bus.h>
-#include <arm/at91/at91rm92reg.h>
 #include <arm/at91/at91_usartreg.h>
 #include <arm/at91/at91_pdcreg.h>
 #include <arm/at91/at91var.h>
@@ -55,16 +54,17 @@
  */
 struct at91_usart_rx {
 	bus_addr_t	pa;
-	uint8_t		buffer[USART_BUFFER_SIZE];
+	uint8_t		*buffer;
 	bus_dmamap_t	map;
 };
 
 struct at91_usart_softc {
 	struct uart_softc base;
-	bus_dma_tag_t dmatag;		/* bus dma tag for mbufs */
+	bus_dma_tag_t tx_tag;
 	bus_dmamap_t tx_map;
 	uint32_t flags;
-#define HAS_TIMEOUT	1	
+#define	HAS_TIMEOUT	1
+	bus_dma_tag_t rx_tag;
 	struct at91_usart_rx ping_pong[2];
 	struct at91_usart_rx *ping;
 	struct at91_usart_rx *pong;
@@ -95,7 +95,7 @@
 static void at91_usart_term(struct uart_bas *bas);
 static void at91_usart_putc(struct uart_bas *bas, int);
 static int at91_usart_rxready(struct uart_bas *bas);
-static int at91_usart_getc(struct uart_bas *bas, struct mtx *mtx);
+static int at91_usart_getc(struct uart_bas *bas, struct mtx *hwmtx);
 
 extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs;
 
@@ -106,7 +106,7 @@
 	uint32_t mr;
 
 	/*
-	 * Assume 3-write RS-232 configuration.
+	 * Assume 3-wire RS-232 configuration.
 	 * XXX Not sure how uart will present the other modes to us, so
 	 * XXX they are unimplemented.  maybe ioctl?
 	 */
@@ -209,6 +209,7 @@
 static int
 at91_usart_probe(struct uart_bas *bas)
 {
+
 	/* We know that this is always here */
 	return (0);
 }
@@ -236,6 +237,7 @@
 static void
 at91_usart_term(struct uart_bas *bas)
 {
+
 	/* XXX */
 }
 
@@ -247,7 +249,7 @@
 at91_usart_putc(struct uart_bas *bas, int c)
 {
 
-    while (!(RD4(bas, USART_CSR) & USART_CSR_TXRDY))
+	while (!(RD4(bas, USART_CSR) & USART_CSR_TXRDY))
 		continue;
 	WR4(bas, USART_THR, c);
 }
@@ -266,14 +268,18 @@
  * Block waiting for a character.
  */
 static int
-at91_usart_getc(struct uart_bas *bas, struct mtx *mtx)
+at91_usart_getc(struct uart_bas *bas, struct mtx *hwmtx)
 {
 	int c;
 
-	while (!(RD4(bas, USART_CSR) & USART_CSR_RXRDY))
-		continue;
-	c = RD4(bas, USART_RHR);
-	c &= 0xff;
+	uart_lock(hwmtx);
+	while (!(RD4(bas, USART_CSR) & USART_CSR_RXRDY)) {
+		uart_unlock(hwmtx);
+		DELAY(4);
+		uart_lock(hwmtx);
+	}
+	c = RD4(bas, USART_RHR) & 0xff;
+	uart_unlock(hwmtx);
 	return (c);
 }
 
@@ -290,7 +296,7 @@
 
 static kobj_method_t at91_usart_methods[] = {
 	KOBJMETHOD(uart_probe,		at91_usart_bus_probe),
-	KOBJMETHOD(uart_attach, 	at91_usart_bus_attach),
+	KOBJMETHOD(uart_attach,		at91_usart_bus_attach),
 	KOBJMETHOD(uart_flush,		at91_usart_bus_flush),
 	KOBJMETHOD(uart_getsig,		at91_usart_bus_getsig),
 	KOBJMETHOD(uart_ioctl,		at91_usart_bus_ioctl),
@@ -299,8 +305,8 @@
 	KOBJMETHOD(uart_receive,	at91_usart_bus_receive),
 	KOBJMETHOD(uart_setsig,		at91_usart_bus_setsig),
 	KOBJMETHOD(uart_transmit,	at91_usart_bus_transmit),
-	
-	{ 0, 0 }
+
+	KOBJMETHOD_END
 };
 
 int
@@ -316,6 +322,7 @@
 static void
 at91_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error)
 {
+
 	if (error != 0)
 		return;
 	*(bus_addr_t *)arg = segs[0].ds_addr;
@@ -344,41 +351,53 @@
 	WR4(&sc->sc_bas, USART_IDR, 0xffffffff);
 
 	/*
-	 * Allocate DMA tags and maps
+	 * Allocate transmit DMA tag and map.  We allow a transmit buffer
+	 * to be any size, but it must map to a single contiguous physical
+	 * extent.
 	 */
 	err = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0,
 	    BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
-	    USART_BUFFER_SIZE, 1, USART_BUFFER_SIZE, BUS_DMA_ALLOCNOW, NULL,
-	    NULL, &atsc->dmatag);
+	    BUS_SPACE_MAXSIZE_32BIT, 1, BUS_SPACE_MAXSIZE_32BIT, 0, NULL,
+	    NULL, &atsc->tx_tag);
 	if (err != 0)
 		goto errout;
-	err = bus_dmamap_create(atsc->dmatag, 0, &atsc->tx_map);
+	err = bus_dmamap_create(atsc->tx_tag, 0, &atsc->tx_map);
 	if (err != 0)
 		goto errout;
+
 	if (atsc->flags & HAS_TIMEOUT) {
+		/*
+		 * Allocate receive DMA tags, maps, and buffers.
+		 * The receive buffers should be aligned to arm_dcache_align,
+		 * otherwise partial cache line flushes on every receive
+		 * interrupt are pretty much guaranteed.
+		 */
+		err = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev),
+		    arm_dcache_align, 0, BUS_SPACE_MAXADDR_32BIT,
+		    BUS_SPACE_MAXADDR, NULL, NULL, sc->sc_rxfifosz, 1,
+		    sc->sc_rxfifosz, BUS_DMA_ALLOCNOW, NULL, NULL,
+		    &atsc->rx_tag);
+		if (err != 0)
+			goto errout;
 		for (i = 0; i < 2; i++) {
-			err = bus_dmamap_create(atsc->dmatag, 0,
-			    &atsc->ping_pong[i].map);
+			err = bus_dmamem_alloc(atsc->rx_tag,
+			    (void **)&atsc->ping_pong[i].buffer,
+			    BUS_DMA_NOWAIT, &atsc->ping_pong[i].map);
 			if (err != 0)
 				goto errout;
-			err = bus_dmamap_load(atsc->dmatag,
+			err = bus_dmamap_load(atsc->rx_tag,
 			    atsc->ping_pong[i].map,
 			    atsc->ping_pong[i].buffer, sc->sc_rxfifosz,
 			    at91_getaddr, &atsc->ping_pong[i].pa, 0);
 			if (err != 0)
 				goto errout;
-			bus_dmamap_sync(atsc->dmatag, atsc->ping_pong[i].map,
+			bus_dmamap_sync(atsc->rx_tag, atsc->ping_pong[i].map,
 			    BUS_DMASYNC_PREREAD);
 		}
 		atsc->ping = &atsc->ping_pong[0];
 		atsc->pong = &atsc->ping_pong[1];
 	}
 
-	/*
-	 * Prime the pump with the RX buffer.  We use two 64 byte bounce
-	 * buffers here to avoid data overflow.
-	 */
-
 	/* Turn on rx and tx */
 	cr = USART_CR_RSTSTA | USART_CR_RSTRX | USART_CR_RSTTX;
 	WR4(&sc->sc_bas, USART_CR, cr);
@@ -397,8 +416,11 @@
 		WR4(&sc->sc_bas, PDC_RNCR, sc->sc_rxfifosz);
 		WR4(&sc->sc_bas, PDC_PTCR, PDC_PTCR_RXTEN);
 
-		/* Set the receive timeout to be 1.5 character times. */
-		WR4(&sc->sc_bas, USART_RTOR, 12);
+		/*
+		 * Set the receive timeout to be 1.5 character times
+		 * assuming 8N1.
+		 */
+		WR4(&sc->sc_bas, USART_RTOR, 15);
 		WR4(&sc->sc_bas, USART_CR, USART_CR_STTTO);
 		WR4(&sc->sc_bas, USART_IER, USART_CSR_TIMEOUT |
 		    USART_CSR_RXBUFF | USART_CSR_ENDRX);
@@ -407,7 +429,6 @@
 	}
 	WR4(&sc->sc_bas, USART_IER, USART_CSR_RXBRK);
 errout:
-	// XXX bad
 	return (err);
 }
 
@@ -416,14 +437,17 @@
 {
 	bus_addr_t addr;
 	struct at91_usart_softc *atsc;
+	int err;
 
+	err = 0;
 	atsc = (struct at91_usart_softc *)sc;
-	if (bus_dmamap_load(atsc->dmatag, atsc->tx_map, sc->sc_txbuf,
-	    sc->sc_txdatasz, at91_getaddr, &addr, 0) != 0)
-		return (EAGAIN);
-	bus_dmamap_sync(atsc->dmatag, atsc->tx_map, BUS_DMASYNC_PREWRITE);
-
 	uart_lock(sc->sc_hwmtx);
+	if (bus_dmamap_load(atsc->tx_tag, atsc->tx_map, sc->sc_txbuf,
+	    sc->sc_txdatasz, at91_getaddr, &addr, 0) != 0) {
+		err = EAGAIN;
+		goto errout;
+	}
+	bus_dmamap_sync(atsc->tx_tag, atsc->tx_map, BUS_DMASYNC_PREWRITE);
 	sc->sc_txbusy = 1;
 	/*
 	 * Setup the PDC to transfer the data and interrupt us when it
@@ -433,9 +457,11 @@
 	WR4(&sc->sc_bas, PDC_TCR, sc->sc_txdatasz);
 	WR4(&sc->sc_bas, PDC_PTCR, PDC_PTCR_TXTEN);
 	WR4(&sc->sc_bas, USART_IER, USART_CSR_ENDTX);
+errout:
 	uart_unlock(sc->sc_hwmtx);
-	return (0);
+	return (err);
 }
+
 static int
 at91_usart_bus_setsig(struct uart_softc *sc, int sig)
 {
@@ -465,12 +491,14 @@
 	uart_unlock(sc->sc_hwmtx);
 	return (0);
 }
+
 static int
 at91_usart_bus_receive(struct uart_softc *sc)
 {
 
 	return (0);
 }
+
 static int
 at91_usart_bus_param(struct uart_softc *sc, int baudrate, int databits,
     int stopbits, int parity)
@@ -488,33 +516,31 @@
 	if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE)
 		kdb_alt_break(key, &sc->sc_altbrk);
 #endif
-	uart_rx_put(sc, key);	
+	uart_rx_put(sc, key);
 }
 
 static int
 at91_usart_bus_ipend(struct uart_softc *sc)
 {
-	int csr = RD4(&sc->sc_bas, USART_CSR);
-	int ipend = 0, i, len;
 	struct at91_usart_softc *atsc;
 	struct at91_usart_rx *p;
+	int i, ipend, len;
+	uint32_t csr;
 
-	atsc = (struct at91_usart_softc *)sc;	   
+	ipend = 0;
+	atsc = (struct at91_usart_softc *)sc;
+	uart_lock(sc->sc_hwmtx);
+	csr = RD4(&sc->sc_bas, USART_CSR);
 	if (csr & USART_CSR_ENDTX) {
-		bus_dmamap_sync(atsc->dmatag, atsc->tx_map,
+		bus_dmamap_sync(atsc->tx_tag, atsc->tx_map,
 		    BUS_DMASYNC_POSTWRITE);
-		bus_dmamap_unload(atsc->dmatag, atsc->tx_map);
+		bus_dmamap_unload(atsc->tx_tag, atsc->tx_map);
 	}
-	uart_lock(sc->sc_hwmtx);
-	if (csr & USART_CSR_TXRDY) {
+	if (csr & (USART_CSR_TXRDY | USART_CSR_ENDTX)) {
 		if (sc->sc_txbusy)
 			ipend |= SER_INT_TXIDLE;
-		WR4(&sc->sc_bas, USART_IDR, USART_CSR_TXRDY);
-	}
-	if (csr & USART_CSR_ENDTX) {
-		if (sc->sc_txbusy)
-			ipend |= SER_INT_TXIDLE;
-		WR4(&sc->sc_bas, USART_IDR, USART_CSR_ENDTX);
+		WR4(&sc->sc_bas, USART_IDR, csr & (USART_CSR_TXRDY |
+		    USART_CSR_ENDTX));
 	}
 
 	/*
@@ -523,90 +549,103 @@
 	 * and do all the work elsewhere.  I need to look at the CSR
 	 * bits right now and do things based on them to avoid races.
 	 */
-	if ((atsc->flags & HAS_TIMEOUT) && (csr & USART_CSR_RXBUFF)) {
-		// Have a buffer overflow.  Copy all data from both
-		// ping and pong.  Insert overflow character.  Reset
-		// ping and pong and re-enable the PDC to receive
-		// characters again.
-		bus_dmamap_sync(atsc->dmatag, atsc->ping->map,
-		    BUS_DMASYNC_POSTREAD);
-		bus_dmamap_sync(atsc->dmatag, atsc->pong->map,
-		    BUS_DMASYNC_POSTREAD);
-		for (i = 0; i < sc->sc_rxfifosz; i++)
-			at91_rx_put(sc, atsc->ping->buffer[i]);
-		for (i = 0; i < sc->sc_rxfifosz; i++)
-			at91_rx_put(sc, atsc->pong->buffer[i]);
-		uart_rx_put(sc, UART_STAT_OVERRUN);
-		csr &= ~(USART_CSR_ENDRX | USART_CSR_TIMEOUT);
-		WR4(&sc->sc_bas, PDC_RPR, atsc->ping->pa);
-		WR4(&sc->sc_bas, PDC_RCR, sc->sc_rxfifosz);
-		WR4(&sc->sc_bas, PDC_RNPR, atsc->pong->pa);
-		WR4(&sc->sc_bas, PDC_RNCR, sc->sc_rxfifosz);
-		WR4(&sc->sc_bas, PDC_PTCR, PDC_PTCR_RXTEN);
-		ipend |= SER_INT_RXREADY;
-	}
-	if ((atsc->flags & HAS_TIMEOUT) && (csr & USART_CSR_ENDRX)) {
-		// Shuffle data from 'ping' of ping pong buffer, but
-		// leave current 'pong' in place, as it has become the
-		// new 'ping'.  We need to copy data and setup the old
-		// 'ping' as the new 'pong' when we're done.
-		bus_dmamap_sync(atsc->dmatag, atsc->ping->map,
-		    BUS_DMASYNC_POSTREAD);
-		for (i = 0; i < sc->sc_rxfifosz; i++)
-			at91_rx_put(sc, atsc->ping->buffer[i]);
-		p = atsc->ping;
-		atsc->ping = atsc->pong;
-		atsc->pong = p;
-		WR4(&sc->sc_bas, PDC_RNPR, atsc->pong->pa);
-		WR4(&sc->sc_bas, PDC_RNCR, sc->sc_rxfifosz);
-		ipend |= SER_INT_RXREADY;
-	}
-	if ((atsc->flags & HAS_TIMEOUT) && (csr & USART_CSR_TIMEOUT)) {
-		// We have one partial buffer.  We need to stop the
-		// PDC, get the number of characters left and from
-		// that compute number of valid characters.  We then
-		// need to reset ping and pong and reenable the PDC.
-		// Not sure if there's a race here at fast baud rates
-		// we need to worry about.
-		WR4(&sc->sc_bas, PDC_PTCR, PDC_PTCR_RXTDIS);
-		bus_dmamap_sync(atsc->dmatag, atsc->ping->map,
-		    BUS_DMASYNC_POSTREAD);
-		len = sc->sc_rxfifosz - RD4(&sc->sc_bas, PDC_RCR);
-		for (i = 0; i < len; i++)
-			at91_rx_put(sc, atsc->ping->buffer[i]);
-		WR4(&sc->sc_bas, PDC_RPR, atsc->ping->pa);
-		WR4(&sc->sc_bas, PDC_RCR, sc->sc_rxfifosz);
-		WR4(&sc->sc_bas, USART_CR, USART_CR_STTTO);
-		WR4(&sc->sc_bas, PDC_PTCR, PDC_PTCR_RXTEN);
-		ipend |= SER_INT_RXREADY;
-	}
-	if (!(atsc->flags & HAS_TIMEOUT) && (csr & USART_CSR_RXRDY)) {
-		// We have another charater in a device that doesn't support
-		// timeouts, so we do it one character at a time.
+	if (atsc->flags & HAS_TIMEOUT) {
+		if (csr & USART_CSR_RXBUFF) {
+			/*
+			 * We have a buffer overflow.  Copy all data from both
+			 * ping and pong.  Insert overflow character.  Reset
+			 * ping and pong and re-enable the PDC to receive
+			 * characters again.
+			 */
+			bus_dmamap_sync(atsc->rx_tag, atsc->ping->map,
+			    BUS_DMASYNC_POSTREAD);
+			bus_dmamap_sync(atsc->rx_tag, atsc->pong->map,
+			    BUS_DMASYNC_POSTREAD);
+			for (i = 0; i < sc->sc_rxfifosz; i++)
+				at91_rx_put(sc, atsc->ping->buffer[i]);
+			for (i = 0; i < sc->sc_rxfifosz; i++)
+				at91_rx_put(sc, atsc->pong->buffer[i]);
+			uart_rx_put(sc, UART_STAT_OVERRUN);
+			bus_dmamap_sync(atsc->rx_tag, atsc->ping->map,
+			    BUS_DMASYNC_PREREAD);
+			bus_dmamap_sync(atsc->rx_tag, atsc->pong->map,
+			    BUS_DMASYNC_PREREAD);
+			WR4(&sc->sc_bas, PDC_RPR, atsc->ping->pa);
+			WR4(&sc->sc_bas, PDC_RCR, sc->sc_rxfifosz);
+			WR4(&sc->sc_bas, PDC_RNPR, atsc->pong->pa);
+			WR4(&sc->sc_bas, PDC_RNCR, sc->sc_rxfifosz);
+			WR4(&sc->sc_bas, PDC_PTCR, PDC_PTCR_RXTEN);
+			ipend |= SER_INT_RXREADY;
+		} else if (csr & USART_CSR_ENDRX) {
+			/*
+			 * Shuffle data from ping of ping pong buffer, but
+			 * leave current pong in place, as it has become the
+			 * new ping.  We need to copy data and setup the old
+			 * ping as the new pong when we're done.
+			 */
+			bus_dmamap_sync(atsc->rx_tag, atsc->ping->map,
+			    BUS_DMASYNC_POSTREAD);
+			for (i = 0; i < sc->sc_rxfifosz; i++)
+				at91_rx_put(sc, atsc->ping->buffer[i]);
+			p = atsc->ping;
+			atsc->ping = atsc->pong;
+			atsc->pong = p;
+			bus_dmamap_sync(atsc->rx_tag, atsc->pong->map,
+			    BUS_DMASYNC_PREREAD);
+			WR4(&sc->sc_bas, PDC_RNPR, atsc->pong->pa);
+			WR4(&sc->sc_bas, PDC_RNCR, sc->sc_rxfifosz);
+			ipend |= SER_INT_RXREADY;
+		} else if (csr & USART_CSR_TIMEOUT) {
+			/*
+			 * We have one partial buffer.  We need to stop the
+			 * PDC, get the number of characters left and from
+			 * that compute number of valid characters.  We then
+			 * need to reset ping and pong and reenable the PDC.
+			 * Not sure if there's a race here at fast baud rates
+			 * we need to worry about.
+			 */
+			WR4(&sc->sc_bas, PDC_PTCR, PDC_PTCR_RXTDIS);
+			bus_dmamap_sync(atsc->rx_tag, atsc->ping->map,
+			    BUS_DMASYNC_POSTREAD);
+			len = sc->sc_rxfifosz - RD4(&sc->sc_bas, PDC_RCR);
+			for (i = 0; i < len; i++)
+				at91_rx_put(sc, atsc->ping->buffer[i]);
+			bus_dmamap_sync(atsc->rx_tag, atsc->ping->map,
+			    BUS_DMASYNC_PREREAD);
+			WR4(&sc->sc_bas, PDC_RPR, atsc->ping->pa);
+			WR4(&sc->sc_bas, PDC_RCR, sc->sc_rxfifosz);
+			WR4(&sc->sc_bas, USART_CR, USART_CR_STTTO);
+			WR4(&sc->sc_bas, PDC_PTCR, PDC_PTCR_RXTEN);
+			ipend |= SER_INT_RXREADY;
+		}
+	} else if (csr & USART_CSR_RXRDY) {
+		/*
+		 * We have another charater in a device that doesn't support
+		 * timeouts, so we do it one character at a time.
+		 */
 		at91_rx_put(sc, RD4(&sc->sc_bas, USART_RHR) & 0xff);
 		ipend |= SER_INT_RXREADY;
 	}
 
 	if (csr & USART_CSR_RXBRK) {
-		unsigned int cr = USART_CR_RSTSTA;
-
 		ipend |= SER_INT_BREAK;
-		WR4(&sc->sc_bas, USART_CR, cr);
+		WR4(&sc->sc_bas, USART_CR, USART_CR_RSTSTA);
 	}
 	uart_unlock(sc->sc_hwmtx);
 	return (ipend);
 }
+
 static int
 at91_usart_bus_flush(struct uart_softc *sc, int what)
 {
+
 	return (0);
 }
 
 static int
 at91_usart_bus_getsig(struct uart_softc *sc)
 {
-	uint32_t new, sig;
-	uint8_t csr;
+	uint32_t csr, new, sig;
 
 	uart_lock(sc->sc_hwmtx);
 	csr = RD4(&sc->sc_bas, USART_CSR);
@@ -628,6 +667,7 @@
 static int
 at91_usart_bus_ioctl(struct uart_softc *sc, int request, intptr_t data)
 {
+
 	switch (request) {
 	case UART_IOCTL_BREAK:
 	case UART_IOCTL_IFLOW:
@@ -637,7 +677,7 @@
 		/* only if we know our master clock rate */
 		if (DEFAULT_RCLK != 0)
 			WR4(&sc->sc_bas, USART_BRGR,
-				BAUD2DIVISOR(*(int *)data));
+			    BAUD2DIVISOR(*(int *)data));
 		return (0);
 	}
 	return (EINVAL);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/ATMEL
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/conf/ATMEL	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,168 @@
+# Kernel configuration to test compile all the atmel bits with one
+# configuration.  This kernel will not (presently) boot.  Do not copy
+# it to create your own custom config file.
+#
+# $FreeBSD: head/sys/arm/conf/ATMEL 238443 2012-07-14 06:13:23Z imp $
+
+ident		ATMEL
+
+include "../at91/std.atmel"
+
+# Arbitrary values for testing purposes.
+options 	STARTUP_PAGETABLE_ADDR=0x20800000
+makeoptions	KERNPHYSADDR=0x20000000
+makeoptions	KERNVIRTADDR=0xc0000000
+options 	KERNPHYSADDR=0x20000000
+options 	KERNVIRTADDR=0xc0000000
+
+makeoptions	MODULES_OVERRIDE=""
+
+# list all boards here, but not just yet (no multiboard in mainline).
+options 	ARM_MANY_BOARD
+device		at91_board_bwct
+device		at91_board_ethernut5
+device		at91_board_hl200
+device		at91_board_hl201
+device		at91_board_kb920x
+device		at91_board_qila9g20
+device		at91_board_sam9260ek
+device		at91_board_sam9g20ek
+device		at91_board_sam9x25ek
+device		at91_board_tsc4370
+
+#makeoptions	DEBUG=-g		# Build kernel with gdb(1) debug symbols
+
+options 	SCHED_4BSD		# 4BSD scheduler
+#options 	PREEMPTION		# Enable kernel thread preemption
+options 	INET			# InterNETworking
+options 	INET6			# IPv6 communications protocols
+options 	SCTP			# Stream Control Transmission Protocol
+options 	FFS			# Berkeley Fast Filesystem
+options 	SOFTUPDATES		# Enable FFS soft updates support
+options 	UFS_ACL			# Support for access control lists
+options 	UFS_DIRHASH		# Improve performance on big directories
+options 	UFS_GJOURNAL		# Enable gjournal-based UFS journaling
+options 	MD_ROOT			# MD is a potential root device
+options 	NFSCL			# New Network Filesystem Client
+options 	NFSD			# New Network Filesystem Server
+options 	NFSLOCKD		# Network Lock Manager
+options 	NFS_ROOT		# NFS usable as /, requires NFSCL
+options 	MSDOSFS			# MSDOS Filesystem
+options 	CD9660			# ISO 9660 Filesystem
+options 	PROCFS			# Process filesystem (requires PSEUDOFS)
+options 	PSEUDOFS		# Pseudo-filesystem framework
+options 	GEOM_PART_GPT		# GUID Partition Tables.
+options 	GEOM_LABEL		# Provides labelization
+options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
+options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
+options 	COMPAT_FREEBSD7		# Compatible with FreeBSD7
+options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
+options 	KTRACE			# ktrace(1) support
+options 	STACK			# stack(9) support
+options 	SYSVSHM			# SYSV-style shared memory
+options 	SYSVMSG			# SYSV-style message queues
+options 	SYSVSEM			# SYSV-style semaphores
+options 	_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
+options 	PRINTF_BUFR_SIZE=128	# Prevent printf output being interspersed.
+#options 	HWPMC_HOOKS		# Necessary kernel hooks for hwpmc(4)
+#options 	AUDIT			# Security event auditing
+#options 	CAPABILITY_MODE		# Capsicum capability mode
+#options 	CAPABILITIES		# Capsicum capabilities
+#options 	MAC			# TrustedBSD MAC Framework
+#options 	INCLUDE_CONFIG_FILE	# Include this file in kernel
+
+# required for netbooting
+options 	BOOTP
+options 	BOOTP_COMPAT
+options 	BOOTP_NFSROOT
+options 	BOOTP_NFSV3
+options 	BOOTP_WIRED_TO=ate0
+
+# alternatively, boot from a MMC/SD memory card
+#options 	ROOTDEVNAME=\"ufs:/dev/mmcsd0a\"
+
+# kernel/memory size reduction
+options 	MUTEX_NOINLINE
+options 	NO_FFS_SNAPSHOT
+options 	NO_SWAPPING
+options 	NO_SYSCTL_DESCR
+options 	RWLOCK_NOINLINE
+
+# Debugging support.  Always need this:
+options 	KDB			# Enable kernel debugger support.
+# For minimum debugger support (stable branch) use:
+options 	KDB_TRACE		# Print a stack trace for a panic.
+# For full debugger support use this instead:
+options 	DDB			# Support DDB.
+options 	GDB			# Support remote GDB.
+#options 	DEADLKRES		# Enable the deadlock resolver
+#options 	INVARIANTS		# Enable calls of extra sanity checking
+#options 	INVARIANT_SUPPORT	# Extra sanity checks of internal structures, required by INVARIANTS
+#options 	WITNESS			# Enable checks to detect deadlocks and cycles
+#options 	WITNESS_SKIPSPIN	# Don't run witness on spinlocks for speed
+#options 	MALLOC_DEBUG_MAXZONES=8	# Separate malloc(9) zones
+
+# The `bpf' device enables the Berkeley Packet Filter.
+# Be aware of the administrative consequences of enabling this!
+# Note that 'bpf' is required for DHCP.
+device		bpf		# Berkeley packet filter
+
+# Ethernet
+device		mii		# Minimal MII support
+device		ate		# Atmel AT91 Ethernet friver
+
+# I2C
+device		at91_twi	# Atmel AT91 Two-wire Interface
+device		iic		# I2C generic I/O device driver
+device		iicbus		# I2C bus system
+device		pcf8563		# NXP PCF8563 clock/calendar
+
+# MMC/SD
+device		at91_mci	# Atmel AT91 Multimedia Card Interface
+options 	AT91_MCI_HAS_4WIRE
+device		mmc		# MMC/SD bus
+device		mmcsd		# MMC/SD memory card
+
+# DataFlash
+device		at91_spi	# Atmel AT91 Serial Peripheral Interface
+device		spibus		# SPI bus
+device		at45d		# Atmel AT45D
+device		geom_map	# GEOM partition mapping
+
+# Pseudo devices.
+device		loop		# Network loopback
+device		random		# Entropy device
+device		ether		# Ethernet support
+device		vlan		# 802.1Q VLAN support
+device		tun		# Packet tunnel.
+device		md		# Memory "disks"
+device		gif		# IPv6 and IPv4 tunneling
+device		faith		# IPv6-to-IPv4 relaying (translation)
+#device		firmware	# firmware assist module
+
+# SCSI peripherals
+device		scbus		# SCSI bus (required for ATA/SCSI)
+device		ch		# SCSI media changers
+device		da		# Direct Access (disks)
+device		sa		# Sequential Access (tape etc)
+device		cd		# CD
+device		pass		# Passthrough device (direct ATA/SCSI access)
+device		ses		# Enclosure Services (SES and SAF-TE)
+device		ctl		# CAM Target Layer
+
+# Serial (COM) ports
+device		uart		# Multi-uart driver
+options 	ALT_BREAK_TO_DEBUGGER
+
+# USB support
+options 	USB_DEBUG	# enable debug msgs
+device		ohci		# OHCI PCI->USB interface
+device		usb		# USB Bus (required)
+device		umass		# Disks/Mass storage - Requires scbus and da
+
+# watchdog
+device		at91_wdt	# Atmel AT91 Watchdog Timer
+
+device		at91_rtc
+device		at91_ssc
+#device		at91_tc		# missing?
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/AVILA
--- a/head/sys/arm/conf/AVILA	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/AVILA	Wed Jul 25 17:18:25 2012 +0300
@@ -12,11 +12,11 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/AVILA 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/AVILA 236988 2012-06-13 04:40:29Z imp $
 
 ident		AVILA
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/BWCT
--- a/head/sys/arm/conf/BWCT	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/BWCT	Wed Jul 25 17:18:25 2012 +0300
@@ -11,21 +11,19 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/BWCT 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/BWCT 237125 2012-06-15 08:01:16Z imp $
 
 ident		BWCT
 
 options 	VERBOSE_INIT_ARM
 
-options 	AT91_BWCT
 include		"../at91/std.bwct"
 
 #To statically compile in device wiring instead of /boot/device.hints
-#hints		"hints.at91rm9200"
 hints		"BWCT.hints"
 makeoptions	MODULES_OVERRIDE=""
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/CAMBRIA
--- a/head/sys/arm/conf/CAMBRIA	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/CAMBRIA	Wed Jul 25 17:18:25 2012 +0300
@@ -12,11 +12,11 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/CAMBRIA 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/CAMBRIA 236988 2012-06-13 04:40:29Z imp $
 
 ident		CAMBRIA
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/CNS11XXNAS
--- a/head/sys/arm/conf/CNS11XXNAS	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/CNS11XXNAS	Wed Jul 25 17:18:25 2012 +0300
@@ -12,11 +12,11 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/CNS11XXNAS 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/CNS11XXNAS 236988 2012-06-13 04:40:29Z imp $
 
 ident		CNS11XXNAS
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/CRB
--- a/head/sys/arm/conf/CRB	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/CRB	Wed Jul 25 17:18:25 2012 +0300
@@ -11,11 +11,11 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/CRB 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/CRB 236988 2012-06-13 04:40:29Z imp $
 
 ident		CRB
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/DB-78XXX
--- a/head/sys/arm/conf/DB-78XXX	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/DB-78XXX	Wed Jul 25 17:18:25 2012 +0300
@@ -1,7 +1,7 @@
 #
 # Custom kernel for Marvell DB-78xx boards.
 #
-# $FreeBSD: head/sys/arm/conf/DB-78XXX 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/DB-78XXX 235609 2012-05-18 14:41:14Z gber $
 #
 
 ident		DB-88F78XX
@@ -17,6 +17,7 @@
 options 	INET			#InterNETworking
 options 	INET6			#IPv6 communications protocols
 options 	FFS			#Berkeley Fast Filesystem
+options 	NANDFS			#NAND Filesystem
 options 	NFSCL			#New Network Filesystem Client
 options 	NFSLOCKD		#Network Lock Manager
 options 	NFS_ROOT		#NFS usable as /, requires NFSCL
@@ -82,6 +83,10 @@
 # SATA
 device		mvs
 
+# NAND
+device		nand
+
 # Flattened Device Tree
 options 	FDT
+options 	FDT_DTB_STATIC
 makeoptions	FDT_DTS_FILE=db78100.dts
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/DB-88F6XXX
--- a/head/sys/arm/conf/DB-88F6XXX	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/DB-88F6XXX	Wed Jul 25 17:18:25 2012 +0300
@@ -1,7 +1,7 @@
 #
 # Custom kernel for Marvell DB-88F6xxx boards.
 #
-# $FreeBSD: head/sys/arm/conf/DB-88F6XXX 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/DB-88F6XXX 235609 2012-05-18 14:41:14Z gber $
 #
 
 ident		DB-88F6XXX
@@ -17,6 +17,7 @@
 options 	INET			#InterNETworking
 options 	INET6			#IPv6 communications protocols
 options 	FFS			#Berkeley Fast Filesystem
+options 	NANDFS			#NAND Filesystem
 options 	NFSCL			#New Network Filesystem Client
 options 	NFSLOCKD		#Network Lock Manager
 options 	NFS_ROOT		#NFS usable as /, requires NFSCL
@@ -85,6 +86,10 @@
 # SATA
 device		mvs
 
+# NAND
+device		nand
+
 # Flattened Device Tree
 options 	FDT
+options 	FDT_DTB_STATIC
 makeoptions	FDT_DTS_FILE=db88f6281.dts
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/EP80219
--- a/head/sys/arm/conf/EP80219	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/EP80219	Wed Jul 25 17:18:25 2012 +0300
@@ -11,11 +11,11 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/EP80219 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/EP80219 236988 2012-06-13 04:40:29Z imp $
 
 ident		EP80219
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/ETHERNUT5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/conf/ETHERNUT5	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,158 @@
+# Kernel configuration for Ethernut 5 boards
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+#    http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD: head/sys/arm/conf/ETHERNUT5 236497 2012-06-03 01:07:55Z marius $
+
+ident		ETHERNUT5
+
+include "../at91/std.ethernut5"
+
+# To statically compile in device wiring instead of /boot/device.hints
+hints		"ETHERNUT5.hints"
+
+#makeoptions	DEBUG=-g		# Build kernel with gdb(1) debug symbols
+
+options 	SCHED_4BSD		# 4BSD scheduler
+#options 	PREEMPTION		# Enable kernel thread preemption
+options 	INET			# InterNETworking
+#options 	INET6			# IPv6 communications protocols
+#options 	SCTP			# Stream Control Transmission Protocol
+options 	FFS			# Berkeley Fast Filesystem
+options 	SOFTUPDATES		# Enable FFS soft updates support
+#options 	UFS_ACL			# Support for access control lists
+options 	UFS_DIRHASH		# Improve performance on big directories
+#options 	UFS_GJOURNAL		# Enable gjournal-based UFS journaling
+#options 	MD_ROOT			# MD is a potential root device
+options 	NFSCL			# New Network Filesystem Client
+#options 	NFSD			# New Network Filesystem Server
+options 	NFSLOCKD		# Network Lock Manager
+options 	NFS_ROOT		# NFS usable as /, requires NFSCL
+#options 	MSDOSFS			# MSDOS Filesystem
+#options 	CD9660			# ISO 9660 Filesystem
+#options 	PROCFS			# Process filesystem (requires PSEUDOFS)
+#options 	PSEUDOFS		# Pseudo-filesystem framework
+#options 	GEOM_PART_GPT		# GUID Partition Tables.
+#options 	GEOM_LABEL		# Provides labelization
+#options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
+#options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
+#options 	COMPAT_FREEBSD7		# Compatible with FreeBSD7
+options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
+options 	KTRACE			# ktrace(1) support
+#options 	STACK			# stack(9) support
+options 	SYSVSHM			# SYSV-style shared memory
+options 	SYSVMSG			# SYSV-style message queues
+options 	SYSVSEM			# SYSV-style semaphores
+options 	_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
+options 	PRINTF_BUFR_SIZE=128	# Prevent printf output being interspersed.
+#options 	HWPMC_HOOKS		# Necessary kernel hooks for hwpmc(4)
+#options 	AUDIT			# Security event auditing
+#options 	CAPABILITY_MODE		# Capsicum capability mode
+#options 	CAPABILITIES		# Capsicum capabilities
+#options 	MAC			# TrustedBSD MAC Framework
+#options 	INCLUDE_CONFIG_FILE	# Include this file in kernel
+
+# required for netbooting
+options 	BOOTP
+options 	BOOTP_COMPAT
+options 	BOOTP_NFSROOT
+options 	BOOTP_NFSV3
+options 	BOOTP_WIRED_TO=ate0
+
+# alternatively, boot from a MMC/SD memory card
+#options 	ROOTDEVNAME=\"ufs:/dev/mmcsd0a\"
+
+# kernel/memory size reduction
+options 	MUTEX_NOINLINE
+options 	NO_FFS_SNAPSHOT
+options 	NO_SWAPPING
+options 	NO_SYSCTL_DESCR
+options 	RWLOCK_NOINLINE
+
+# Debugging support.  Always need this:
+#options 	KDB			# Enable kernel debugger support.
+# For minimum debugger support (stable branch) use:
+#options 	KDB_TRACE		# Print a stack trace for a panic.
+# For full debugger support use this instead:
+#options 	DDB			# Support DDB.
+#options 	GDB			# Support remote GDB.
+#options 	DEADLKRES		# Enable the deadlock resolver
+#options 	INVARIANTS		# Enable calls of extra sanity checking
+#options 	INVARIANT_SUPPORT	# Extra sanity checks of internal structures, required by INVARIANTS
+#options 	WITNESS			# Enable checks to detect deadlocks and cycles
+#options 	WITNESS_SKIPSPIN	# Don't run witness on spinlocks for speed
+#options 	MALLOC_DEBUG_MAXZONES=8	# Separate malloc(9) zones
+
+# The `bpf' device enables the Berkeley Packet Filter.
+# Be aware of the administrative consequences of enabling this!
+# Note that 'bpf' is required for DHCP.
+device		bpf		# Berkeley packet filter
+
+# Ethernet
+device		mii		# Minimal MII support
+device		ate		# Atmel AT91 Ethernet friver
+
+# I2C
+device		at91_twi	# Atmel AT91 Two-wire Interface
+device		iic		# I2C generic I/O device driver
+device		iicbus		# I2C bus system
+device		pcf8563		# NXP PCF8563 clock/calendar
+
+# MMC/SD
+device		at91_mci	# Atmel AT91 Multimedia Card Interface
+options 	AT91_MCI_HAS_4WIRE
+device		mmc		# MMC/SD bus
+device		mmcsd		# MMC/SD memory card
+
+# DataFlash
+device		at91_spi	# Atmel AT91 Serial Peripheral Interface
+device		spibus		# SPI bus
+device		at45d		# Atmel AT45D
+device		geom_map	# GEOM partition mapping
+
+# Pseudo devices.
+device		loop		# Network loopback
+device		random		# Entropy device
+device		ether		# Ethernet support
+#device		vlan		# 802.1Q VLAN support
+#device		tun		# Packet tunnel.
+#device		md		# Memory "disks"
+#device		gif		# IPv6 and IPv4 tunneling
+#device		faith		# IPv6-to-IPv4 relaying (translation)
+#device		firmware	# firmware assist module
+
+# SCSI peripherals
+#device		scbus		# SCSI bus (required for ATA/SCSI)
+#device		ch		# SCSI media changers
+#device		da		# Direct Access (disks)
+#device		sa		# Sequential Access (tape etc)
+#device		cd		# CD
+#device		pass		# Passthrough device (direct ATA/SCSI access)
+#device		ses		# Enclosure Services (SES and SAF-TE)
+#device		ctl		# CAM Target Layer
+
+# Serial (COM) ports
+device		uart		# Multi-uart driver
+options 	ALT_BREAK_TO_DEBUGGER
+
+# USB support
+#options 	USB_DEBUG	# enable debug msgs
+device		ohci		# OHCI PCI->USB interface
+device		usb		# USB Bus (required)
+#device		umass		# Disks/Mass storage - Requires scbus and da
+
+# watchdog
+device		at91_wdt	# Atmel AT91 Watchdog Timer
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/ETHERNUT5.hints
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/conf/ETHERNUT5.hints	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,51 @@
+# $FreeBSD: head/sys/arm/conf/ETHERNUT5.hints 236191 2012-05-28 17:58:10Z marius $
+
+# Atmel AT45DB21D
+hint.at45d.0.at="spibus0"
+hint.at45d.0.addr=0x00
+# user 132 kbytes
+hint.map.0.at="flash/spi0"
+hint.map.0.start=0x00000000
+hint.map.0.end=0x00020fff
+hint.map.0.name="user"
+hint.map.0.readonly=1
+# setup 132 kbytes
+hint.map.1.at="flash/spi0"
+hint.map.1.start=0x00021000
+hint.map.1.end=0x00041fff
+hint.map.1.name="setup"
+hint.map.1.readonly=1
+# uboot 528 kbytes
+hint.map.2.at="flash/spi0"
+hint.map.2.start=0x00042000
+hint.map.2.end=0x000c5fff
+hint.map.2.name="uboot"
+hint.map.2.readonly=1
+# kernel 2640 kbytes
+hint.map.3.at="flash/spi0"
+hint.map.3.start=0x000c6000
+hint.map.3.end=0x00359fff
+hint.map.3.name="kernel"
+#hint.map.3.readonly=1
+# nutos 528 kbytes
+hint.map.4.at="flash/spi0"
+hint.map.4.start=0x0035a000
+hint.map.4.end=0x003ddfff
+hint.map.4.name="nutos"
+hint.map.4.readonly=1
+# env 132 kbytes
+hint.map.5.at="flash/spi0"
+hint.map.5.start=0x003de000
+hint.map.5.end=0x003fefff
+hint.map.5.name="env"
+hint.map.5.readonly=1
+# env 132 kbytes
+hint.map.6.at="flash/spi0"
+hint.map.6.start=0x003ff000
+hint.map.6.end=0x0041ffff
+hint.map.6.name="nutoscfg"
+hint.map.6.readonly=1
+
+# NXP PCF8563 clock/calendar
+hint.pcf8563_rtc.0.at="iicbus0"
+hint.pcf8563_rtc.0.addr=0xa2
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/GUMSTIX
--- a/head/sys/arm/conf/GUMSTIX	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/GUMSTIX	Wed Jul 25 17:18:25 2012 +0300
@@ -12,11 +12,11 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/GUMSTIX 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/GUMSTIX 236988 2012-06-13 04:40:29Z imp $
 
 ident		GUMSTIX
 cpu		CPU_XSCALE_PXA2X0
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/GUMSTIX-QEMU
--- a/head/sys/arm/conf/GUMSTIX-QEMU	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/GUMSTIX-QEMU	Wed Jul 25 17:18:25 2012 +0300
@@ -11,82 +11,15 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/GUMSTIX-QEMU 234005 2012-04-07 23:48:51Z stas $
+# $FreeBSD: head/sys/arm/conf/GUMSTIX-QEMU 236988 2012-06-13 04:40:29Z imp $
+
+include 	GUMSTIX
 
 ident		GUMSTIX-QEMU
-cpu		CPU_XSCALE_PXA2X0
-
-# This probably wants to move somewhere else.  Maybe we can create a basic
-# PXA2X0 config, then make a GUMSTIX config that includes the basic one,
-# adds the smc and smcphy devices and pulls in this hints file.
-hints		"GUMSTIX.hints"
-
-options 	PHYSADDR=0xa0000000
-options 	KERNPHYSADDR=0xa0200000	
-options 	KERNVIRTADDR=0xc0200000		# Used in ldscript.arm
-
-options 	STARTUP_PAGETABLE_ADDR=0xa0000000
-include		"../xscale/pxa/std.pxa"
-makeoptions	MODULES_OVERRIDE=""
-
-makeoptions	DEBUG=-g		#Build kernel with gdb(1) debug symbols
-options 	HZ=100
-#options 	DEVICE_POLLING
 
 options		QEMU_WORKAROUNDS
 nooptions	ARM_CACHE_LOCK_ENABLE	# QEMU does not implement this
-
-options 	SCHED_4BSD		#4BSD scheduler
-options 	INET			#InterNETworking
-#options 	INET6			#IPv6 communications protocols
-options 	FFS			#Berkeley Fast Filesystem
-options 	SOFTUPDATES		#Enable FFS soft updates support
-options 	UFS_ACL			#Support for access control lists
-options 	UFS_DIRHASH		#Improve performance on big directories
-options 	NFSCL			#New Network Filesystem Client
-#options 	NFSD			#New Network Filesystem Server
-options 	NFS_ROOT		#NFS usable as /, requires NFSCL
-#options 	MSDOSFS			#MSDOS Filesystem
-#options 	CD9660			#ISO 9660 Filesystem
-#options 	PROCFS			#Process filesystem (requires PSEUDOFS)
-options 	PSEUDOFS		#Pseudo-filesystem framework
-options 	COMPAT_43		#Compatible with BSD 4.3 [KEEP THIS!]
-options 	SCSI_DELAY=5000		#Delay (in ms) before probing SCSI
-options 	KTRACE			#ktrace(1) support
-options 	SYSVSHM			#SYSV-style shared memory
-options 	SYSVMSG			#SYSV-style message queues
-options 	SYSVSEM			#SYSV-style semaphores
-options 	_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
-options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
-options 	BOOTP
-options 	BOOTP_NFSROOT
-options 	BOOTP_WIRED_TO=smc0
-options 	BOOTP_COMPAT
-options 	BOOTP_NFSV3
-options 	BOOTP_BLOCKSIZE=4096
-options 	PREEMPTION
-device		loop
-device		ether
-device		mii
-device		mii_bitbang
-device		smc
-device		smcphy
-device		uart
-device		uart_ns8250
-
-# Debugging for use in -current
-options 	KDB
-options 	DDB			#Enable the kernel debugger
-#options 	DEADLKRES		#Enable the deadlock resolver
-#options 	INVARIANTS		#Enable calls of extra sanity checking
-#options 	INVARIANT_SUPPORT	#Extra sanity checks of internal structures, required by INVARIANTS
-#options 	WITNESS			#Enable checks to detect deadlocks and cycles
-#options 	WITNESS_SKIPSPIN	#Don't run witness on spinlocks for speed
-#options 	DIAGNOSTIC
-
-device		md
-device		random		# Entropy device
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/HL200
--- a/head/sys/arm/conf/HL200	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/HL200	Wed Jul 25 17:18:25 2012 +0300
@@ -11,11 +11,11 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/HL200 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/HL200 236988 2012-06-13 04:40:29Z imp $
 
 ident		HL200
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/HL201
--- a/head/sys/arm/conf/HL201	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/HL201	Wed Jul 25 17:18:25 2012 +0300
@@ -11,11 +11,11 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/HL201 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/HL201 236988 2012-06-13 04:40:29Z imp $
 
 ident		HL201
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/IQ31244
--- a/head/sys/arm/conf/IQ31244	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/IQ31244	Wed Jul 25 17:18:25 2012 +0300
@@ -11,11 +11,11 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/IQ31244 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/IQ31244 236988 2012-06-13 04:40:29Z imp $
 
 ident		IQ31244
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/KB920X
--- a/head/sys/arm/conf/KB920X	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/KB920X	Wed Jul 25 17:18:25 2012 +0300
@@ -12,11 +12,11 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/KB920X 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/KB920X 238335 2012-07-10 05:39:06Z imp $
 
 ident		KB920X
 
@@ -24,7 +24,7 @@
 # The AT91 platform doesn't use /boot/loader, so we have to statically wire
 # hints.
 hints		"KB920X.hints"
-#makeoptions	MODULES_OVERRIDE=""
+makeoptions	MODULES_OVERRIDE=""
 
 makeoptions	DEBUG=-g		#Build kernel with gdb(1) debug symbols
 options 	DDB
@@ -137,6 +137,7 @@
 device		wlan_ccmp	# 802.11 CCMP support
 device		wlan_tkip	# 802.11 TKIP support
 device		wlan_amrr	# AMRR transmit rate control algorithm
+
 options		IEEE80211_SUPPORT_MESH
 
 options		AH_SUPPORT_AR5416
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/LN2410SBC
--- a/head/sys/arm/conf/LN2410SBC	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/LN2410SBC	Wed Jul 25 17:18:25 2012 +0300
@@ -11,11 +11,11 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/LN2410SBC 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/LN2410SBC 236988 2012-06-13 04:40:29Z imp $
 
 machine		arm
 ident		LN2410SBC
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/NSLU
--- a/head/sys/arm/conf/NSLU	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/NSLU	Wed Jul 25 17:18:25 2012 +0300
@@ -11,11 +11,11 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/NSLU 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/NSLU 236988 2012-06-13 04:40:29Z imp $
 
 ident		NSLU
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/QILA9G20
--- a/head/sys/arm/conf/QILA9G20	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/QILA9G20	Wed Jul 25 17:18:25 2012 +0300
@@ -1,5 +1,5 @@
-# Kernel configuration for Calao Syatems QIL-A9G20 development card 
-# http://www.calao-systems.com 
+# Kernel configuration for Calao Syatems QIL-A9G20 development card
+# http://www.calao-systems.com
 #
 # For more information on this file, please read the handbook section on
 # Kernel Configuration Files:
@@ -12,11 +12,11 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/QILA9G20 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/QILA9G20 236988 2012-06-13 04:40:29Z imp $
 
 ident		QILA9G20
 
@@ -93,11 +93,11 @@
 device		at91_twi		# TWI: Two Wire Interface (EEPROM)
 device		at91_wdt		# WDT: Watchdog timer
 
-# NOTE: SPI DataFlash and mci/mmc/mmcsd have hardware 
+# NOTE: SPI DataFlash and mci/mmc/mmcsd have hardware
 # 	confilict on this card. Use one or the other.
 #       see board_sam9g20ek.c
 
-# SPI: Data Flash 
+# SPI: Data Flash
 #device		at91_spi		# SPI:
 #device		spibus
 #device		at45d			# at45db642 and maybe others
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/QILA9G20.hints
--- a/head/sys/arm/conf/QILA9G20.hints	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/QILA9G20.hints	Wed Jul 25 17:18:25 2012 +0300
@@ -1,9 +1,9 @@
-# $FreeBSD$
-# Kernel configuration hits for Calao Syatems QIL-A9G20 development card 
-# http://www.calao-systems.com 
+# $FreeBSD: head/sys/arm/conf/QILA9G20.hints 236988 2012-06-13 04:40:29Z imp $
+# Kernel configuration hits for Calao Syatems QIL-A9G20 development card
+# http://www.calao-systems.com
 
 # STMicroelctrtronics M41T94 Real-Time Clock
-# on SPI0 NPCS0 
+# on SPI0 NPCS0
 
 # STMicroelctrtronics M95640 8k x 8 EEPROM
 # on SPI0 NPCS1
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/SAM9260EK
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/conf/SAM9260EK	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,158 @@
+# Kernel configuration for Ethernut 5 boards
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+#    http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD: head/sys/arm/conf/SAM9260EK 238443 2012-07-14 06:13:23Z imp $
+
+ident		ETHERNUT5
+
+include "../at91/std.ethernut5"
+
+# To statically compile in device wiring instead of /boot/device.hints
+hints		"ETHERNUT5.hints"
+
+#makeoptions	DEBUG=-g		# Build kernel with gdb(1) debug symbols
+
+options 	SCHED_4BSD		# 4BSD scheduler
+#options 	PREEMPTION		# Enable kernel thread preemption
+options 	INET			# InterNETworking
+#options 	INET6			# IPv6 communications protocols
+#options 	SCTP			# Stream Control Transmission Protocol
+options 	FFS			# Berkeley Fast Filesystem
+options 	SOFTUPDATES		# Enable FFS soft updates support
+#options 	UFS_ACL			# Support for access control lists
+options 	UFS_DIRHASH		# Improve performance on big directories
+#options 	UFS_GJOURNAL		# Enable gjournal-based UFS journaling
+#options 	MD_ROOT			# MD is a potential root device
+options 	NFSCL			# New Network Filesystem Client
+#options 	NFSD			# New Network Filesystem Server
+options 	NFSLOCKD		# Network Lock Manager
+options 	NFS_ROOT		# NFS usable as /, requires NFSCL
+#options 	MSDOSFS			# MSDOS Filesystem
+#options 	CD9660			# ISO 9660 Filesystem
+#options 	PROCFS			# Process filesystem (requires PSEUDOFS)
+#options 	PSEUDOFS		# Pseudo-filesystem framework
+#options 	GEOM_PART_GPT		# GUID Partition Tables.
+#options 	GEOM_LABEL		# Provides labelization
+#options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
+#options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
+#options 	COMPAT_FREEBSD7		# Compatible with FreeBSD7
+options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
+options 	KTRACE			# ktrace(1) support
+#options 	STACK			# stack(9) support
+options 	SYSVSHM			# SYSV-style shared memory
+options 	SYSVMSG			# SYSV-style message queues
+options 	SYSVSEM			# SYSV-style semaphores
+options 	_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
+options 	PRINTF_BUFR_SIZE=128	# Prevent printf output being interspersed.
+#options 	HWPMC_HOOKS		# Necessary kernel hooks for hwpmc(4)
+#options 	AUDIT			# Security event auditing
+#options 	CAPABILITY_MODE		# Capsicum capability mode
+#options 	CAPABILITIES		# Capsicum capabilities
+#options 	MAC			# TrustedBSD MAC Framework
+#options 	INCLUDE_CONFIG_FILE	# Include this file in kernel
+
+# required for netbooting
+options 	BOOTP
+options 	BOOTP_COMPAT
+options 	BOOTP_NFSROOT
+options 	BOOTP_NFSV3
+options 	BOOTP_WIRED_TO=ate0
+
+# alternatively, boot from a MMC/SD memory card
+#options 	ROOTDEVNAME=\"ufs:/dev/mmcsd0a\"
+
+# kernel/memory size reduction
+options 	MUTEX_NOINLINE
+options 	NO_FFS_SNAPSHOT
+options 	NO_SWAPPING
+options 	NO_SYSCTL_DESCR
+options 	RWLOCK_NOINLINE
+
+# Debugging support.  Always need this:
+#options 	KDB			# Enable kernel debugger support.
+# For minimum debugger support (stable branch) use:
+#options 	KDB_TRACE		# Print a stack trace for a panic.
+# For full debugger support use this instead:
+#options 	DDB			# Support DDB.
+#options 	GDB			# Support remote GDB.
+#options 	DEADLKRES		# Enable the deadlock resolver
+#options 	INVARIANTS		# Enable calls of extra sanity checking
+#options 	INVARIANT_SUPPORT	# Extra sanity checks of internal structures, required by INVARIANTS
+#options 	WITNESS			# Enable checks to detect deadlocks and cycles
+#options 	WITNESS_SKIPSPIN	# Don't run witness on spinlocks for speed
+#options 	MALLOC_DEBUG_MAXZONES=8	# Separate malloc(9) zones
+
+# The `bpf' device enables the Berkeley Packet Filter.
+# Be aware of the administrative consequences of enabling this!
+# Note that 'bpf' is required for DHCP.
+device		bpf		# Berkeley packet filter
+
+# Ethernet
+device		mii		# Minimal MII support
+device		ate		# Atmel AT91 Ethernet friver
+
+# I2C
+device		at91_twi	# Atmel AT91 Two-wire Interface
+device		iic		# I2C generic I/O device driver
+device		iicbus		# I2C bus system
+device		pcf8563		# NXP PCF8563 clock/calendar
+
+# MMC/SD
+device		at91_mci	# Atmel AT91 Multimedia Card Interface
+options 	AT91_MCI_HAS_4WIRE
+device		mmc		# MMC/SD bus
+device		mmcsd		# MMC/SD memory card
+
+# DataFlash
+device		at91_spi	# Atmel AT91 Serial Peripheral Interface
+device		spibus		# SPI bus
+device		at45d		# Atmel AT45D
+device		geom_map	# GEOM partition mapping
+
+# Pseudo devices.
+device		loop		# Network loopback
+device		random		# Entropy device
+device		ether		# Ethernet support
+#device		vlan		# 802.1Q VLAN support
+#device		tun		# Packet tunnel.
+#device		md		# Memory "disks"
+#device		gif		# IPv6 and IPv4 tunneling
+#device		faith		# IPv6-to-IPv4 relaying (translation)
+#device		firmware	# firmware assist module
+
+# SCSI peripherals
+#device		scbus		# SCSI bus (required for ATA/SCSI)
+#device		ch		# SCSI media changers
+#device		da		# Direct Access (disks)
+#device		sa		# Sequential Access (tape etc)
+#device		cd		# CD
+#device		pass		# Passthrough device (direct ATA/SCSI access)
+#device		ses		# Enclosure Services (SES and SAF-TE)
+#device		ctl		# CAM Target Layer
+
+# Serial (COM) ports
+device		uart		# Multi-uart driver
+options 	ALT_BREAK_TO_DEBUGGER
+
+# USB support
+#options 	USB_DEBUG	# enable debug msgs
+device		ohci		# OHCI PCI->USB interface
+device		usb		# USB Bus (required)
+#device		umass		# Disks/Mass storage - Requires scbus and da
+
+# watchdog
+device		at91_wdt	# Atmel AT91 Watchdog Timer
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/SAM9260EK.hints
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/conf/SAM9260EK.hints	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,51 @@
+# $FreeBSD: head/sys/arm/conf/SAM9260EK.hints 238443 2012-07-14 06:13:23Z imp $
+
+# Atmel AT45DB21D
+hint.at45d.0.at="spibus0"
+hint.at45d.0.addr=0x00
+# user 132 kbytes
+hint.map.0.at="flash/spi0"
+hint.map.0.start=0x00000000
+hint.map.0.end=0x00020fff
+hint.map.0.name="user"
+hint.map.0.readonly=1
+# setup 132 kbytes
+hint.map.1.at="flash/spi0"
+hint.map.1.start=0x00021000
+hint.map.1.end=0x00041fff
+hint.map.1.name="setup"
+hint.map.1.readonly=1
+# uboot 528 kbytes
+hint.map.2.at="flash/spi0"
+hint.map.2.start=0x00042000
+hint.map.2.end=0x000c5fff
+hint.map.2.name="uboot"
+hint.map.2.readonly=1
+# kernel 2640 kbytes
+hint.map.3.at="flash/spi0"
+hint.map.3.start=0x000c6000
+hint.map.3.end=0x00359fff
+hint.map.3.name="kernel"
+#hint.map.3.readonly=1
+# nutos 528 kbytes
+hint.map.4.at="flash/spi0"
+hint.map.4.start=0x0035a000
+hint.map.4.end=0x003ddfff
+hint.map.4.name="nutos"
+hint.map.4.readonly=1
+# env 132 kbytes
+hint.map.5.at="flash/spi0"
+hint.map.5.start=0x003de000
+hint.map.5.end=0x003fefff
+hint.map.5.name="env"
+hint.map.5.readonly=1
+# env 132 kbytes
+hint.map.6.at="flash/spi0"
+hint.map.6.start=0x003ff000
+hint.map.6.end=0x0041ffff
+hint.map.6.name="nutoscfg"
+hint.map.6.readonly=1
+
+# NXP PCF8563 clock/calendar
+hint.pcf8563_rtc.0.at="iicbus0"
+hint.pcf8563_rtc.0.addr=0xa2
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/SAM9G20EK
--- a/head/sys/arm/conf/SAM9G20EK	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/SAM9G20EK	Wed Jul 25 17:18:25 2012 +0300
@@ -1,4 +1,4 @@
-# Kernel configuration for Atmel AT91SAM9G20EK Rev B. development card 
+# Kernel configuration for Atmel AT91SAM9G20EK Rev B. development card
 #
 # For more information on this file, please read the handbook section on
 # Kernel Configuration Files:
@@ -11,11 +11,11 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/SAM9G20EK 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/SAM9G20EK 236988 2012-06-13 04:40:29Z imp $
 
 ident		SAM9G20EK
 
@@ -92,11 +92,11 @@
 device		at91_twi		# TWI: Two Wire Interface (EEPROM)
 device		at91_wdt		# WDT: Watchdog timer
 
-# NOTE: SPI DataFlash and mci/mmc/mmcsd have hardware 
+# NOTE: SPI DataFlash and mci/mmc/mmcsd have hardware
 # 	confilict on this card. Use one or the other.
 #       see board_sam9g20ek.c
 
-# SPI: Data Flash 
+# SPI: Data Flash
 #device		at91_spi		# SPI:
 #device		spibus
 #device		at45d			# at45db642 and maybe others
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/SAM9G20EK.hints
--- a/head/sys/arm/conf/SAM9G20EK.hints	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/SAM9G20EK.hints	Wed Jul 25 17:18:25 2012 +0300
@@ -1,7 +1,7 @@
-# $FreeBSD$
+# $FreeBSD: head/sys/arm/conf/SAM9G20EK.hints 236988 2012-06-13 04:40:29Z imp $
 #
 
-# EEPROM 
+# EEPROM
 hint.icee.0.at="iicbus0"
 hint.icee.0.addr=0xa0
 hint.icee.0.type=16
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/SAM9X25EK
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/conf/SAM9X25EK	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,154 @@
+# Kernel configuration for Atmel AT91SAM9G20EK Rev B. development card 
+#
+# For more information on this file, please read the handbook section on
+# Kernel Configuration Files:
+#
+#    http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files. 
+# If you are in doubt as to the purpose or necessity of a line, check first 
+# in NOTES.
+#
+# $FreeBSD: head/sys/arm/conf/SAM9X25EK 237742 2012-06-29 04:18:52Z imp $
+
+# NOUNIVERSE:	disable building in make universe
+ident		SAM9X25EK
+
+include "../at91/std.sam9x25ek"
+
+#To statically compile in device wiring instead of /boot/device.hints
+hints		"SAM9G20EK.hints"
+makeoptions	MODULES_OVERRIDE=""
+
+makeoptions	DEBUG=-g		#Build kernel with gdb(1) debug symbols
+options 	DDB
+options 	KDB
+
+options 	SCHED_4BSD		#4BSD scheduler
+options 	INET			#InterNETworking
+#options 	INET6			#IPv6 communications protocols
+options 	FFS			#Berkeley Fast Filesystem
+#options 	SOFTUPDATES		#Enable FFS soft updates support
+#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 	NFSCL			#New Network Filesystem Client
+#options 	NFSD			#New Network Filesystem Server
+#options 	NFSLOCKD		#Network Lock Manager
+#options 	NFS_ROOT		#NFS usable as /, requires NFSCL
+#options 	BOOTP_NFSROOT
+#options 	BOOTP
+#options 	BOOTP_NFSV3
+#options 	BOOTP_WIRED_TO=ate0
+#options 	BOOTP_COMPAT
+
+options 	ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\"
+
+options		ALT_BREAK_TO_DEBUGGER
+
+#options 	MSDOSFS			#MSDOS Filesystem
+#options 	CD9660			#ISO 9660 Filesystem
+#options 	PROCFS			#Process filesystem (requires PSEUDOFS)
+#options 	PSEUDOFS		#Pseudo-filesystem framework
+#options 	SCSI_DELAY=5000		#Delay (in ms) before probing SCSI
+#options 	KTRACE			#ktrace(1) support
+options 	SYSVSHM			#SYSV-style shared memory
+options 	SYSVMSG			#SYSV-style message queues
+options 	SYSVSEM			#SYSV-style semaphores
+options 	_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
+#options 	SYSCTL_OMIT_DESCR
+options 	MUTEX_NOINLINE
+options 	RWLOCK_NOINLINE
+options 	NO_FFS_SNAPSHOT
+options 	NO_SWAPPING
+
+# Debugging for use in -current
+#options 	INVARIANTS		#Enable calls of extra sanity checking
+#options 	INVARIANT_SUPPORT	#Extra sanity checks of internal structures, required by INVARIANTS
+#options 	WITNESS			#Enable checks to detect deadlocks and cycles
+#options 	WITNESS_SKIPSPIN	#Don't run witness on spinlocks for speed
+#options 	DIAGNOSTIC
+
+device		random
+device		pty
+device		loop
+device		bpf
+device		ether
+device		md
+
+device		uart			# Serial Ports
+
+# Ethernet
+#device		ate		        # Ethernet Driver	
+device		macb			# Alternate Ethernet driver
+device		mii
+option 		AT91_ATE_USE_RMII
+
+#device		at91_twi		# TWI: Two Wire Interface (EEPROM)
+device		at91_wdt		# WDT: Watchdog timer
+
+# NOTE: SPI DataFlash and mci/mmc/mmcsd have hardware 
+# 	confilict on this card. Use one or the other.
+#       see board_sam9g20ek.c
+
+# SPI: Data Flash 
+#device		at91_spi		# SPI:
+#device		spibus
+#device		at45d			# at45db642 and maybe others
+
+# MMC/SD
+device		at91_mci
+device		mmc
+device		mmcsd
+#option		AT91_MCI_SLOT_B
+option		AT91_MCI_HAS_4WIRE
+
+# iic
+device		iic
+device		iicbus
+device		icee
+
+# SCSI peripherals
+device		scbus		# SCSI bus (required for SCSI)
+device		da		# Direct Access (disks)
+device		cd		# CD
+device		pass		# Passthrough device (direct SCSI access)
+
+# USB support
+#device		ohci		# OHCI localbus->USB interface
+#device		usb		# USB Bus (required)
+#device		umass		# Disks/Mass storage - Requires scbus and da
+#device		uhid		# "Human Interface Devices"
+#device		ulpt		# Printer
+#device		udbp		# USB Double Bulk Pipe devices
+
+# USB Ethernet, requires miibus
+device		miibus
+#device		aue		# ADMtek USB Ethernet
+#device		axe		# ASIX Electronics USB Ethernet
+#device		cdce		# Generic USB over Ethernet
+#device		cue		# CATC USB Ethernet
+#device		kue		# Kawasaki LSI USB Ethernet
+#device		rue		# RealTek RTL8150 USB Ethernet
+#device		udav		# Davicom DM9601E USB
+
+# USB Wireless
+#device		rum		# Ralink Technology RT2501USB wireless NICs
+#device		uath		# Atheros AR5523 wireless NICs
+#device		ural		# Ralink Technology RT2500USB wireless NICs
+#device		zyd		# ZyDAS zd1211/zd1211b wireless NICs
+
+# Wireless NIC cards
+#device		wlan		# 802.11 support
+#device		wlan_wep	# 802.11 WEP support
+#device		wlan_ccmp	# 802.11 CCMP support
+#device		wlan_tkip	# 802.11 TKIP support
+#device		wlan_amrr	# AMRR transmit rate control algorithm
+
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/SAM9X25EK.hints
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/conf/SAM9X25EK.hints	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,10 @@
+# $FreeBSD: head/sys/arm/conf/SAM9X25EK.hints 237742 2012-06-29 04:18:52Z imp $
+#
+
+# EEPROM 
+hint.icee.0.at="iicbus0"
+hint.icee.0.addr=0xa0
+hint.icee.0.type=16
+hint.icee.0.size=65536
+hint.icee.0.rd_sz=256
+hint.icee.0.wr_sz=256
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/SHEEVAPLUG
--- a/head/sys/arm/conf/SHEEVAPLUG	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/SHEEVAPLUG	Wed Jul 25 17:18:25 2012 +0300
@@ -1,7 +1,7 @@
 #
 # Custom kernel for Marvell SheevaPlug devices.
 #
-# $FreeBSD: head/sys/arm/conf/SHEEVAPLUG 233271 2012-03-21 08:38:42Z ed $
+# $FreeBSD: head/sys/arm/conf/SHEEVAPLUG 235609 2012-05-18 14:41:14Z gber $
 #
 
 ident		SHEEVAPLUG
@@ -17,6 +17,7 @@
 options 	INET			#InterNETworking
 options 	INET6			#IPv6 communications protocols
 options 	FFS			#Berkeley Fast Filesystem
+options 	NANDFS			#NAND Filesystem
 options 	NFSCL			#New Network Filesystem Client
 options 	NFSLOCKD		#Network Lock Manager
 options 	NFS_ROOT		#NFS usable as /, requires NFSCL
@@ -72,6 +73,9 @@
 device		pass
 device		da
 
+# NAND
+device		nand
+
 # Flattened Device Tree
 options 	FDT
 options		FDT_DTB_STATIC
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/SIMICS
--- a/head/sys/arm/conf/SIMICS	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/conf/SIMICS	Wed Jul 25 17:18:25 2012 +0300
@@ -11,11 +11,11 @@
 # latest information.
 #
 # An exhaustive list of options and more detailed explanations of the
-# device lines is also present in the ../../conf/NOTES and NOTES files. 
-# If you are in doubt as to the purpose or necessity of a line, check first 
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
 # in NOTES.
 #
-# $FreeBSD: head/sys/arm/conf/SIMICS 224699 2011-08-07 20:16:46Z rmacklem $
+# $FreeBSD: head/sys/arm/conf/SIMICS 236988 2012-06-13 04:40:29Z imp $
 
 ident		SIMICS
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/genboardid.awk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/conf/genboardid.awk	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,55 @@
+#!/bin/awk
+# $FreeBSD: head/sys/arm/conf/genboardid.awk 235234 2012-05-10 18:06:00Z imp $
+
+#-
+# Copyright (c) 2012 M. 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 THE 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 THE 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.
+#
+
+#
+# Generate FreeBSD's board ID's defines from Linux's
+# arm board list.
+#
+# You can grab a new copy any time with:
+# fetch -o sys/arm/conf/mach-types http://www.arm.linux.org.uk/developer/machines/download.php
+#
+BEGIN	{ nr = 0; boardid[nr] = "ARM_BOARD_ID_NONE"; num[nr++] = 0; }
+/^#/	{ next; }
+/^[     ]*$/ { next; }
+
+NF == 4 {
+    boardid[nr] = "ARM_BOARD_ID_"$3;
+    num[nr] = $4;
+    nr++
+}
+
+END	{
+    printf("/* Arm board ID file generated automatically from Linux's mach-types file. */\n\n");
+    printf("#ifndef _SYS_ARM_ARM_BOARDID_H\n");
+    printf("#define _SYS_ARM_ARM_BOARDID_H\n\n");
+    for (i = 0; i < nr; i++) {
+        printf("#define %-30s %d\n", boardid[i], num[i]);
+    }
+    printf("\n#endif /* _SYS_ARM_ARM_BOARDID_H */\n");
+}
+
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/conf/mach-types
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/conf/mach-types	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,4146 @@
+# Database of machine macros and numbers
+#
+# This file is linux/arch/arm/tools/mach-types
+#
+# Up to date versions of this file can be obtained from:
+#
+#   http://www.arm.linux.org.uk/developer/machines/download.php
+#
+# Please do not send patches to this file; it is automatically generated!
+# To add an entry into this database, please see Documentation/arm/README,
+# or visit:
+#
+#   http://www.arm.linux.org.uk/developer/machines/?action=new
+#
+# Last update: Thu May 10 18:35:23 2012
+#
+# machine_is_xxx	CONFIG_xxxx		MACH_TYPE_xxx		number
+#
+ebsa110			ARCH_EBSA110		EBSA110			0
+riscpc			ARCH_RPC		RISCPC			1
+nexuspci		ARCH_NEXUSPCI		NEXUSPCI		3
+ebsa285			ARCH_EBSA285		EBSA285			4
+netwinder		ARCH_NETWINDER		NETWINDER		5
+cats			ARCH_CATS		CATS			6
+tbox			ARCH_TBOX		TBOX			7
+co285			ARCH_CO285		CO285			8
+clps7110		ARCH_CLPS7110		CLPS7110		9
+archimedes		ARCH_ARC		ARCHIMEDES		10
+a5k			ARCH_A5K		A5K			11
+etoile			ARCH_ETOILE		ETOILE			12
+lacie_nas		ARCH_LACIE_NAS		LACIE_NAS		13
+clps7500		ARCH_CLPS7500		CLPS7500		14
+shark			ARCH_SHARK		SHARK			15
+brutus			SA1100_BRUTUS		BRUTUS			16
+personal_server		ARCH_PERSONAL_SERVER	PERSONAL_SERVER		17
+itsy			SA1100_ITSY		ITSY			18
+l7200			ARCH_L7200		L7200			19
+pleb			SA1100_PLEB		PLEB			20
+integrator		ARCH_INTEGRATOR		INTEGRATOR		21
+h3600			SA1100_H3600		H3600			22
+ixp1200			ARCH_IXP1200		IXP1200			23
+p720t			ARCH_P720T		P720T			24
+assabet			SA1100_ASSABET		ASSABET			25
+victor			SA1100_VICTOR		VICTOR			26
+lart			SA1100_LART		LART			27
+ranger			SA1100_RANGER		RANGER			28
+graphicsclient		SA1100_GRAPHICSCLIENT	GRAPHICSCLIENT		29
+xp860			SA1100_XP860		XP860			30
+cerf			SA1100_CERF		CERF			31
+nanoengine		SA1100_NANOENGINE	NANOENGINE		32
+fpic			SA1100_FPIC		FPIC			33
+extenex1		SA1100_EXTENEX1		EXTENEX1		34
+sherman			SA1100_SHERMAN		SHERMAN			35
+accelent_sa		SA1100_ACCELENT		ACCELENT_SA		36
+accelent_l7200		ARCH_L7200_ACCELENT	ACCELENT_L7200		37
+netport			SA1100_NETPORT		NETPORT			38
+pangolin		SA1100_PANGOLIN		PANGOLIN		39
+yopy			SA1100_YOPY		YOPY			40
+coolidge		SA1100_COOLIDGE		COOLIDGE		41
+huw_webpanel		SA1100_HUW_WEBPANEL	HUW_WEBPANEL		42
+spotme			ARCH_SPOTME		SPOTME			43
+freebird		ARCH_FREEBIRD		FREEBIRD		44
+ti925			ARCH_TI925		TI925			45
+riscstation		ARCH_RISCSTATION	RISCSTATION		46
+cavy			SA1100_CAVY		CAVY			47
+jornada720		SA1100_JORNADA720	JORNADA720		48
+omnimeter		SA1100_OMNIMETER	OMNIMETER		49
+edb7211			ARCH_EDB7211		EDB7211			50
+citygo			SA1100_CITYGO		CITYGO			51
+pfs168			SA1100_PFS168		PFS168			52
+spot			SA1100_SPOT		SPOT			53
+flexanet		SA1100_FLEXANET		FLEXANET		54
+webpal			ARCH_WEBPAL		WEBPAL			55
+linpda			SA1100_LINPDA		LINPDA			56
+anakin			ARCH_ANAKIN		ANAKIN			57
+mvi			SA1100_MVI		MVI			58
+jupiter			SA1100_JUPITER		JUPITER			59
+psionw			ARCH_PSIONW		PSIONW			60
+aln			SA1100_ALN		ALN			61
+epxa			ARCH_CAMELOT		CAMELOT			62
+gds2200			SA1100_GDS2200		GDS2200			63
+netbook			SA1100_PSION_SERIES7	PSION_SERIES7		64
+xfile			SA1100_XFILE		XFILE			65
+accelent_ep9312		ARCH_ACCELENT_EP9312	ACCELENT_EP9312		66
+ic200			ARCH_IC200		IC200			67
+creditlart		SA1100_CREDITLART	CREDITLART		68
+htm			SA1100_HTM		HTM			69
+iq80310			ARCH_IQ80310		IQ80310			70
+freebot			SA1100_FREEBOT		FREEBOT			71
+entel			ARCH_ENTEL		ENTEL			72
+enp3510			ARCH_ENP3510		ENP3510			73
+trizeps			SA1100_TRIZEPS		TRIZEPS			74
+nesa			SA1100_NESA		NESA			75
+venus			ARCH_VENUS		VENUS			76
+tardis			ARCH_TARDIS		TARDIS			77
+mercury			ARCH_MERCURY		MERCURY			78
+empeg			SA1100_EMPEG		EMPEG			79
+adi_evb			ARCH_I80200FCC		I80200FCC		80
+itt_cpb			SA1100_ITT_CPB		ITT_CPB			81
+svc			SA1100_SVC		SVC			82
+alpha2			SA1100_ALPHA2		ALPHA2			84
+alpha1			SA1100_ALPHA1		ALPHA1			85
+netarm			ARCH_NETARM		NETARM			86
+simpad			SA1100_SIMPAD		SIMPAD			87
+pda1			ARCH_PDA1		PDA1			88
+lubbock			ARCH_LUBBOCK		LUBBOCK			89
+aniko			ARCH_ANIKO		ANIKO			90
+clep7212		ARCH_CLEP7212		CLEP7212		91
+cs89712			ARCH_CS89712		CS89712			92
+weararm			SA1100_WEARARM		WEARARM			93
+possio_px		SA1100_POSSIO_PX	POSSIO_PX		94
+sidearm			SA1100_SIDEARM		SIDEARM			95
+stork			SA1100_STORK		STORK			96
+shannon			SA1100_SHANNON		SHANNON			97
+ace			ARCH_ACE		ACE			98
+ballyarm		SA1100_BALLYARM		BALLYARM		99
+simputer		SA1100_SIMPUTER		SIMPUTER		100
+nexterm			SA1100_NEXTERM		NEXTERM			101
+sa1100_elf		SA1100_SA1100_ELF	SA1100_ELF		102
+gator			SA1100_GATOR		GATOR			103
+granite			ARCH_GRANITE		GRANITE			104
+consus			SA1100_CONSUS		CONSUS			105
+aaed2000		ARCH_AAED2000		AAED2000		106
+cdb89712		ARCH_CDB89712		CDB89712		107
+graphicsmaster		SA1100_GRAPHICSMASTER	GRAPHICSMASTER		108
+adsbitsy		SA1100_ADSBITSY		ADSBITSY		109
+pxa_idp			ARCH_PXA_IDP		PXA_IDP			110
+plce			ARCH_PLCE		PLCE			111
+pt_system3		SA1100_PT_SYSTEM3	PT_SYSTEM3		112
+murphy			ARCH_MEDALB		MEDALB			113
+eagle			ARCH_EAGLE		EAGLE			114
+dsc21			ARCH_DSC21		DSC21			115
+dsc24			ARCH_DSC24		DSC24			116
+ti5472			ARCH_TI5472		TI5472			117
+autcpu12		ARCH_AUTCPU12		AUTCPU12		118
+uengine			ARCH_UENGINE		UENGINE			119
+bluestem		SA1100_BLUESTEM		BLUESTEM		120
+xingu8			ARCH_XINGU8		XINGU8			121
+bushstb			ARCH_BUSHSTB		BUSHSTB			122
+epsilon1		SA1100_EPSILON1		EPSILON1		123
+balloon			SA1100_BALLOON		BALLOON			124
+puppy			ARCH_PUPPY		PUPPY			125
+elroy			SA1100_ELROY		ELROY			126
+gms720			ARCH_GMS720		GMS720			127
+s24x			ARCH_S24X		S24X			128
+jtel_clep7312		ARCH_JTEL_CLEP7312	JTEL_CLEP7312		129
+cx821xx			ARCH_CX821XX		CX821XX			130
+edb7312			ARCH_EDB7312		EDB7312			131
+bsa1110			SA1100_BSA1110		BSA1110			132
+powerpin		ARCH_POWERPIN		POWERPIN		133
+openarm			ARCH_OPENARM		OPENARM			134
+whitechapel		SA1100_WHITECHAPEL	WHITECHAPEL		135
+h3100			SA1100_H3100		H3100			136
+h3800			SA1100_H3800		H3800			137
+blue_v1			ARCH_BLUE_V1		BLUE_V1			138
+pxa_cerf		ARCH_PXA_CERF		PXA_CERF		139
+arm7tevb		ARCH_ARM7TEVB		ARM7TEVB		140
+d7400			SA1100_D7400		D7400			141
+piranha			ARCH_PIRANHA		PIRANHA			142
+sbcamelot		SA1100_SBCAMELOT	SBCAMELOT		143
+kings			SA1100_KINGS		KINGS			144
+smdk2400		ARCH_SMDK2400		SMDK2400		145
+collie			SA1100_COLLIE		COLLIE			146
+idr			ARCH_IDR		IDR			147
+badge4			SA1100_BADGE4		BADGE4			148
+webnet			ARCH_WEBNET		WEBNET			149
+d7300			SA1100_D7300		D7300			150
+cep			SA1100_CEP		CEP			151
+fortunet		ARCH_FORTUNET		FORTUNET		152
+vc547x			ARCH_VC547X		VC547X			153
+filewalker		SA1100_FILEWALKER	FILEWALKER		154
+netgateway		SA1100_NETGATEWAY	NETGATEWAY		155
+symbol2800		SA1100_SYMBOL2800	SYMBOL2800		156
+suns			SA1100_SUNS		SUNS			157
+frodo			SA1100_FRODO		FRODO			158
+ms301			SA1100_MACH_TYTE_MS301	MACH_TYTE_MS301		159
+mx1ads			ARCH_MX1ADS		MX1ADS			160
+h7201			ARCH_H7201		H7201			161
+h7202			ARCH_H7202		H7202			162
+amico			ARCH_AMICO		AMICO			163
+iam			SA1100_IAM		IAM			164
+tt530			SA1100_TT530		TT530			165
+sam2400			ARCH_SAM2400		SAM2400			166
+jornada56x		SA1100_JORNADA56X	JORNADA56X		167
+active			SA1100_ACTIVE		ACTIVE			168
+iq80321			ARCH_IQ80321		IQ80321			169
+wid			SA1100_WID		WID			170
+sabinal			ARCH_SABINAL		SABINAL			171
+ixp425_matacumbe	ARCH_IXP425_MATACUMBE	IXP425_MATACUMBE	172
+miniprint		SA1100_MINIPRINT	MINIPRINT		173
+adm510x			ARCH_ADM510X		ADM510X			174
+svs200			SA1100_SVS200		SVS200			175
+atg_tcu			ARCH_ATG_TCU		ATG_TCU			176
+jornada820		SA1100_JORNADA820	JORNADA820		177
+s3c44b0			ARCH_S3C44B0		S3C44B0			178
+margis2			ARCH_MARGIS2		MARGIS2			179
+ks8695			ARCH_KS8695		KS8695			180
+brh			ARCH_BRH		BRH			181
+s3c2410			ARCH_S3C2410		S3C2410			182
+possio_px30		ARCH_POSSIO_PX30	POSSIO_PX30		183
+s3c2800			ARCH_S3C2800		S3C2800			184
+fleetwood		SA1100_FLEETWOOD	FLEETWOOD		185
+omaha			ARCH_OMAHA		OMAHA			186
+ta7			ARCH_TA7		TA7			187
+nova			SA1100_NOVA		NOVA			188
+hmk			ARCH_HMK		HMK			189
+karo			ARCH_KARO		KARO			190
+fester			SA1100_FESTER		FESTER			191
+gpi			ARCH_GPI		GPI			192
+smdk2410		ARCH_SMDK2410		SMDK2410		193
+i519			ARCH_I519		I519			194
+nexio			SA1100_NEXIO		NEXIO			195
+bitbox			SA1100_BITBOX		BITBOX			196
+g200			SA1100_G200		G200			197
+gill			SA1100_GILL		GILL			198
+pxa_mercury		ARCH_PXA_MERCURY	PXA_MERCURY		199
+ceiva			ARCH_CEIVA		CEIVA			200
+fret			SA1100_FRET		FRET			201
+emailphone		SA1100_EMAILPHONE	EMAILPHONE		202
+h3900			ARCH_H3900		H3900			203
+pxa1			ARCH_PXA1		PXA1			204
+koan369			SA1100_KOAN369		KOAN369			205
+cogent			ARCH_COGENT		COGENT			206
+esl_simputer		ARCH_ESL_SIMPUTER	ESL_SIMPUTER		207
+esl_simputer_clr	ARCH_ESL_SIMPUTER_CLR	ESL_SIMPUTER_CLR	208
+esl_simputer_bw		ARCH_ESL_SIMPUTER_BW	ESL_SIMPUTER_BW		209
+hhp_cradle		ARCH_HHP_CRADLE		HHP_CRADLE		210
+he500			ARCH_HE500		HE500			211
+inhandelf2		SA1100_INHANDELF2	INHANDELF2		212
+inhandftip		SA1100_INHANDFTIP	INHANDFTIP		213
+dnp1110			SA1100_DNP1110		DNP1110			214
+pnp1110			SA1100_PNP1110		PNP1110			215
+csb226			ARCH_CSB226		CSB226			216
+arnold			SA1100_ARNOLD		ARNOLD			217
+voiceblue		MACH_VOICEBLUE		VOICEBLUE		218
+jz8028			ARCH_JZ8028		JZ8028			219
+h5400			ARCH_H5400		H5400			220
+forte			SA1100_FORTE		FORTE			221
+acam			SA1100_ACAM		ACAM			222
+abox			SA1100_ABOX		ABOX			223
+atmel			ARCH_ATMEL		ATMEL			224
+sitsang			ARCH_SITSANG		SITSANG			225
+cpu1110lcdnet		SA1100_CPU1110LCDNET	CPU1110LCDNET		226
+mpl_vcma9		ARCH_MPL_VCMA9		MPL_VCMA9		227
+opus_a1			ARCH_OPUS_A1		OPUS_A1			228
+daytona			ARCH_DAYTONA		DAYTONA			229
+killbear		SA1100_KILLBEAR		KILLBEAR		230
+yoho			ARCH_YOHO		YOHO			231
+jasper			ARCH_JASPER		JASPER			232
+dsc25			ARCH_DSC25		DSC25			233
+omap_innovator		MACH_OMAP_INNOVATOR	OMAP_INNOVATOR		234
+mnci			ARCH_RAMSES		RAMSES			235
+s28x			ARCH_S28X		S28X			236
+mport3			ARCH_MPORT3		MPORT3			237
+pxa_eagle250		ARCH_PXA_EAGLE250	PXA_EAGLE250		238
+pdb			ARCH_PDB		PDB			239
+blue_2g			SA1100_BLUE_2G		BLUE_2G			240
+bluearch		SA1100_BLUEARCH		BLUEARCH		241
+ixdp2400		ARCH_IXDP2400		IXDP2400		242
+ixdp2800		ARCH_IXDP2800		IXDP2800		243
+explorer		SA1100_EXPLORER		EXPLORER		244
+ixdp425			ARCH_IXDP425		IXDP425			245
+chimp			ARCH_CHIMP		CHIMP			246
+stork_nest		ARCH_STORK_NEST		STORK_NEST		247
+stork_egg		ARCH_STORK_EGG		STORK_EGG		248
+wismo			SA1100_WISMO		WISMO			249
+ezlinx			ARCH_EZLINX		EZLINX			250
+at91rm9200		ARCH_AT91RM9200		AT91RM9200		251
+adtech_orion		ARCH_ADTECH_ORION	ADTECH_ORION		252
+neptune			ARCH_NEPTUNE		NEPTUNE			253
+hackkit			SA1100_HACKKIT		HACKKIT			254
+pxa_wins30		ARCH_PXA_WINS30		PXA_WINS30		255
+lavinna			SA1100_LAVINNA		LAVINNA			256
+pxa_uengine		ARCH_PXA_UENGINE	PXA_UENGINE		257
+innokom			ARCH_INNOKOM		INNOKOM			258
+bms			ARCH_BMS		BMS			259
+ixcdp1100		ARCH_IXCDP1100		IXCDP1100		260
+prpmc1100		ARCH_PRPMC1100		PRPMC1100		261
+at91rm9200dk		ARCH_AT91RM9200DK	AT91RM9200DK		262
+armstick		ARCH_ARMSTICK		ARMSTICK		263
+armonie			ARCH_ARMONIE		ARMONIE			264
+mport1			ARCH_MPORT1		MPORT1			265
+s3c5410			ARCH_S3C5410		S3C5410			266
+zcp320a			ARCH_ZCP320A		ZCP320A			267
+i_box			ARCH_I_BOX		I_BOX			268
+stlc1502		ARCH_STLC1502		STLC1502		269
+siren			ARCH_SIREN		SIREN			270
+greenlake		ARCH_GREENLAKE		GREENLAKE		271
+argus			ARCH_ARGUS		ARGUS			272
+combadge		SA1100_COMBADGE		COMBADGE		273
+rokepxa			ARCH_ROKEPXA		ROKEPXA			274
+cintegrator		ARCH_CINTEGRATOR	CINTEGRATOR		275
+guidea07		ARCH_GUIDEA07		GUIDEA07		276
+tat257			ARCH_TAT257		TAT257			277
+igp2425			ARCH_IGP2425		IGP2425			278
+bluegrama		ARCH_BLUEGRAMMA		BLUEGRAMMA		279
+ipod			ARCH_IPOD		IPOD			280
+adsbitsyx		ARCH_ADSBITSYX		ADSBITSYX		281
+trizeps2		ARCH_TRIZEPS2		TRIZEPS2		282
+viper			ARCH_VIPER		VIPER			283
+adsbitsyplus		SA1100_ADSBITSYPLUS	ADSBITSYPLUS		284
+adsagc			SA1100_ADSAGC		ADSAGC			285
+stp7312			ARCH_STP7312		STP7312			286
+nx_phnx			MACH_NX_PHNX		NX_PHNX			287
+wep_ep250		ARCH_WEP_EP250		WEP_EP250		288
+inhandelf3		ARCH_INHANDELF3		INHANDELF3		289
+adi_coyote		ARCH_ADI_COYOTE		ADI_COYOTE		290
+iyonix			ARCH_IYONIX		IYONIX			291
+damicam1		ARCH_DAMICAM_SA1110	DAMICAM_SA1110		292
+meg03			ARCH_MEG03		MEG03			293
+pxa_whitechapel		ARCH_PXA_WHITECHAPEL	PXA_WHITECHAPEL		294
+nwsc			ARCH_NWSC		NWSC			295
+nwlarm			ARCH_NWLARM		NWLARM			296
+ixp425_mguard		ARCH_IXP425_MGUARD	IXP425_MGUARD		297
+pxa_netdcu4		ARCH_PXA_NETDCU4	PXA_NETDCU4		298
+ixdp2401		ARCH_IXDP2401		IXDP2401		299
+ixdp2801		ARCH_IXDP2801		IXDP2801		300
+zodiac			ARCH_ZODIAC		ZODIAC			301
+armmodul		ARCH_ARMMODUL		ARMMODUL		302
+ketop			SA1100_KETOP		KETOP			303
+av7200			ARCH_AV7200		AV7200			304
+arch_ti925		ARCH_ARCH_TI925		ARCH_TI925		305
+acq200			ARCH_ACQ200		ACQ200			306
+pt_dafit		SA1100_PT_DAFIT		PT_DAFIT		307
+ihba			ARCH_IHBA		IHBA			308
+quinque			ARCH_QUINQUE		QUINQUE			309
+nimbraone		ARCH_NIMBRAONE		NIMBRAONE		310
+nimbra29x		ARCH_NIMBRA29X		NIMBRA29X		311
+nimbra210		ARCH_NIMBRA210		NIMBRA210		312
+hhp_d95xx		ARCH_HHP_D95XX		HHP_D95XX		313
+labarm			ARCH_LABARM		LABARM			314
+m825xx			ARCH_M825XX		M825XX			315
+m7100			SA1100_M7100		M7100			316
+nipc2			ARCH_NIPC2		NIPC2			317
+fu7202			ARCH_FU7202		FU7202			318
+adsagx			ARCH_ADSAGX		ADSAGX			319
+pxa_pooh		ARCH_PXA_POOH		PXA_POOH		320
+bandon			ARCH_BANDON		BANDON			321
+pcm7210			ARCH_PCM7210		PCM7210			322
+nms9200			ARCH_NMS9200		NMS9200			323
+logodl			ARCH_LOGODL		LOGODL			324
+m7140			SA1100_M7140		M7140			325
+korebot			ARCH_KOREBOT		KOREBOT			326
+iq31244			ARCH_IQ31244		IQ31244			327
+koan393			SA1100_KOAN393		KOAN393			328
+inhandftip3		ARCH_INHANDFTIP3	INHANDFTIP3		329
+gonzo			ARCH_GONZO		GONZO			330
+bast			ARCH_BAST		BAST			331
+scanpass		ARCH_SCANPASS		SCANPASS		332
+ep7312_pooh		ARCH_EP7312_POOH	EP7312_POOH		333
+ta7s			ARCH_TA7S		TA7S			334
+ta7v			ARCH_TA7V		TA7V			335
+icarus			SA1100_ICARUS		ICARUS			336
+h1900			ARCH_H1900		H1900			337
+gemini			SA1100_GEMINI		GEMINI			338
+axim			ARCH_AXIM		AXIM			339
+audiotron		ARCH_AUDIOTRON		AUDIOTRON		340
+h2200			ARCH_H2200		H2200			341
+loox600			ARCH_LOOX600		LOOX600			342
+niop			ARCH_NIOP		NIOP			343
+dm310			ARCH_DM310		DM310			344
+seedpxa_c2		ARCH_SEEDPXA_C2		SEEDPXA_C2		345
+ixp4xx_mguardpci	ARCH_IXP4XX_MGUARD_PCI	IXP4XX_MGUARD_PCI	346
+h1940			ARCH_H1940		H1940			347
+scorpio			ARCH_SCORPIO		SCORPIO			348
+viva			ARCH_VIVA		VIVA			349
+pxa_xcard		ARCH_PXA_XCARD		PXA_XCARD		350
+csb335			ARCH_CSB335		CSB335			351
+ixrd425			ARCH_IXRD425		IXRD425			352
+iq80315			ARCH_IQ80315		IQ80315			353
+nmp7312			ARCH_NMP7312		NMP7312			354
+cx861xx			ARCH_CX861XX		CX861XX			355
+enp2611			ARCH_ENP2611		ENP2611			356
+xda			SA1100_XDA		XDA			357
+csir_ims		ARCH_CSIR_IMS		CSIR_IMS		358
+ixp421_dnaeeth		ARCH_IXP421_DNAEETH	IXP421_DNAEETH		359
+pocketserv9200		ARCH_POCKETSERV9200	POCKETSERV9200		360
+toto			ARCH_TOTO		TOTO			361
+s3c2440			ARCH_S3C2440		S3C2440			362
+ks8695p			ARCH_KS8695P		KS8695P			363
+se4000			ARCH_SE4000		SE4000			364
+quadriceps		ARCH_QUADRICEPS		QUADRICEPS		365
+bronco			ARCH_BRONCO		BRONCO			366
+esl_wireless_tab	ARCH_ESL_WIRELESS_TAB	ESL_WIRELESS_TAB	367
+esl_sofcomp		ARCH_ESL_SOFCOMP	ESL_SOFCOMP		368
+s5c7375			ARCH_S5C7375		S5C7375			369
+spearhead		ARCH_SPEARHEAD		SPEARHEAD		370
+pantera			ARCH_PANTERA		PANTERA			371
+prayoglite		ARCH_PRAYOGLITE		PRAYOGLITE		372
+gumstix			ARCH_GUMSTIX		GUMSTIX			373
+rcube			ARCH_RCUBE		RCUBE			374
+rea_olv			ARCH_REA_OLV		REA_OLV			375
+pxa_iphone		ARCH_PXA_IPHONE		PXA_IPHONE		376
+s3c3410			ARCH_S3C3410		S3C3410			377
+espd_4510b		ARCH_ESPD_4510B		ESPD_4510B		378
+mp1x			ARCH_MP1X		MP1X			379
+at91rm9200tb		ARCH_AT91RM9200TB	AT91RM9200TB		380
+adsvgx			ARCH_ADSVGX		ADSVGX			381
+omap_h2			MACH_OMAP_H2		OMAP_H2			382
+pelee			ARCH_PELEE		PELEE			383
+e740			MACH_E740		E740			384
+iq80331			ARCH_IQ80331		IQ80331			385
+versatile_pb		ARCH_VERSATILE_PB	VERSATILE_PB		387
+kev7a400		MACH_KEV7A400		KEV7A400		388
+lpd7a400		MACH_LPD7A400		LPD7A400		389
+lpd7a404		MACH_LPD7A404		LPD7A404		390
+fujitsu_camelot		ARCH_FUJITSU_CAMELOT	FUJITSU_CAMELOT		391
+janus2m			ARCH_JANUS2M		JANUS2M			392
+embtf			MACH_EMBTF		EMBTF			393
+hpm			MACH_HPM		HPM			394
+smdk2410tk		MACH_SMDK2410TK		SMDK2410TK		395
+smdk2410aj		MACH_SMDK2410AJ		SMDK2410AJ		396
+streetracer		MACH_STREETRACER	STREETRACER		397
+eframe			MACH_EFRAME		EFRAME			398
+csb337			MACH_CSB337		CSB337			399
+pxa_lark		MACH_PXA_LARK		PXA_LARK		400
+pxa_pnp2110		MACH_PNP2110		PNP2110			401
+tcc72x			MACH_TCC72X		TCC72X			402
+altair			MACH_ALTAIR		ALTAIR			403
+kc3			MACH_KC3		KC3			404
+sinteftd		MACH_SINTEFTD		SINTEFTD		405
+mainstone		MACH_MAINSTONE		MAINSTONE		406
+aday4x			MACH_ADAY4X		ADAY4X			407
+lite300			MACH_LITE300		LITE300			408
+s5c7376			MACH_S5C7376		S5C7376			409
+mt02			MACH_MT02		MT02			410
+mport3s			MACH_MPORT3S		MPORT3S			411
+ra_alpha		MACH_RA_ALPHA		RA_ALPHA		412
+xcep			MACH_XCEP		XCEP			413
+arcom_vulcan		MACH_ARCOM_VULCAN	ARCOM_VULCAN		414
+stargate		MACH_STARGATE		STARGATE		415
+armadilloj		MACH_ARMADILLOJ		ARMADILLOJ		416
+elroy_jack		MACH_ELROY_JACK		ELROY_JACK		417
+backend			MACH_BACKEND		BACKEND			418
+s5linbox		MACH_S5LINBOX		S5LINBOX		419
+nomadik			MACH_NOMADIK		NOMADIK			420
+ia_cpu_9200		MACH_IA_CPU_9200	IA_CPU_9200		421
+at91_bja1		MACH_AT91_BJA1		AT91_BJA1		422
+corgi			MACH_CORGI		CORGI			423
+poodle			MACH_POODLE		POODLE			424
+ten			MACH_TEN		TEN			425
+roverp5p		MACH_ROVERP5P		ROVERP5P		426
+sc2700			MACH_SC2700		SC2700			427
+ex_eagle		MACH_EX_EAGLE		EX_EAGLE		428
+nx_pxa12		MACH_NX_PXA12		NX_PXA12		429
+nx_pxa5			MACH_NX_PXA5		NX_PXA5			430
+blackboard2		MACH_BLACKBOARD2	BLACKBOARD2		431
+i819			MACH_I819		I819			432
+ixmb995e		MACH_IXMB995E		IXMB995E		433
+skyrider		MACH_SKYRIDER		SKYRIDER		434
+skyhawk			MACH_SKYHAWK		SKYHAWK			435
+enterprise		MACH_ENTERPRISE		ENTERPRISE		436
+dep2410			MACH_DEP2410		DEP2410			437
+armcore			MACH_ARMCORE		ARMCORE			438
+hobbit			MACH_HOBBIT		HOBBIT			439
+h7210			MACH_H7210		H7210			440
+pxa_netdcu5		MACH_PXA_NETDCU5	PXA_NETDCU5		441
+acc			MACH_ACC		ACC			442
+esl_sarva		MACH_ESL_SARVA		ESL_SARVA		443
+xm250			MACH_XM250		XM250			444
+t6tc1xb			MACH_T6TC1XB		T6TC1XB			445
+ess710			MACH_ESS710		ESS710			446
+mx31ads			MACH_MX31ADS		MX31ADS			447
+himalaya		MACH_HIMALAYA		HIMALAYA		448
+bolfenk			MACH_BOLFENK		BOLFENK			449
+at91rm9200kr		MACH_AT91RM9200KR	AT91RM9200KR		450
+edb9312			MACH_EDB9312		EDB9312			451
+omap_generic		MACH_OMAP_GENERIC	OMAP_GENERIC		452
+aximx3			MACH_AXIMX3		AXIMX3			453
+eb67xdip		MACH_EB67XDIP		EB67XDIP		454
+webtxs			MACH_WEBTXS		WEBTXS			455
+hawk			MACH_HAWK		HAWK			456
+ccat91sbc001		MACH_CCAT91SBC001	CCAT91SBC001		457
+expresso		MACH_EXPRESSO		EXPRESSO		458
+h4000			MACH_H4000		H4000			459
+dino			MACH_DINO		DINO			460
+ml675k			MACH_ML675K		ML675K			461
+edb9301			MACH_EDB9301		EDB9301			462
+edb9315			MACH_EDB9315		EDB9315			463
+reciva_tt		MACH_RECIVA_TT		RECIVA_TT		464
+cstcb01			MACH_CSTCB01		CSTCB01			465
+cstcb1			MACH_CSTCB1		CSTCB1			466
+shadwell		MACH_SHADWELL		SHADWELL		467
+goepel263		MACH_GOEPEL263		GOEPEL263		468
+acq100			MACH_ACQ100		ACQ100			469
+mx1fs2			MACH_MX1FS2		MX1FS2			470
+hiptop_g1		MACH_HIPTOP_G1		HIPTOP_G1		471
+sparky			MACH_SPARKY		SPARKY			472
+ns9750			MACH_NS9750		NS9750			473
+phoenix			MACH_PHOENIX		PHOENIX			474
+vr1000			MACH_VR1000		VR1000			475
+deisterpxa		MACH_DEISTERPXA		DEISTERPXA		476
+bcm1160			MACH_BCM1160		BCM1160			477
+pcm022			MACH_PCM022		PCM022			478
+adsgcx			MACH_ADSGCX		ADSGCX			479
+dreadnaught		MACH_DREADNAUGHT	DREADNAUGHT		480
+dm320			MACH_DM320		DM320			481
+markov			MACH_MARKOV		MARKOV			482
+cos7a400		MACH_COS7A400		COS7A400		483
+milano			MACH_MILANO		MILANO			484
+ue9328			MACH_UE9328		UE9328			485
+uex255			MACH_UEX255		UEX255			486
+ue2410			MACH_UE2410		UE2410			487
+a620			MACH_A620		A620			488
+ocelot			MACH_OCELOT		OCELOT			489
+cheetah			MACH_CHEETAH		CHEETAH			490
+omap_perseus2		MACH_OMAP_PERSEUS2	OMAP_PERSEUS2		491
+zvue			MACH_ZVUE		ZVUE			492
+roverp1			MACH_ROVERP1		ROVERP1			493
+asidial2		MACH_ASIDIAL2		ASIDIAL2		494
+s3c24a0			MACH_S3C24A0		S3C24A0			495
+e800			MACH_E800		E800			496
+e750			MACH_E750		E750			497
+s3c5500			MACH_S3C5500		S3C5500			498
+smdk5500		MACH_SMDK5500		SMDK5500		499
+signalsync		MACH_SIGNALSYNC		SIGNALSYNC		500
+nbc			MACH_NBC		NBC			501
+kodiak			MACH_KODIAK		KODIAK			502
+netbookpro		MACH_NETBOOKPRO		NETBOOKPRO		503
+hw90200			MACH_HW90200		HW90200			504
+condor			MACH_CONDOR		CONDOR			505
+cup			MACH_CUP		CUP			506
+kite			MACH_KITE		KITE			507
+scb9328			MACH_SCB9328		SCB9328			508
+omap_h3			MACH_OMAP_H3		OMAP_H3			509
+omap_h4			MACH_OMAP_H4		OMAP_H4			510
+n10			MACH_N10		N10			511
+montejade		MACH_MONTAJADE		MONTAJADE		512
+sg560			MACH_SG560		SG560			513
+dp1000			MACH_DP1000		DP1000			514
+omap_osk		MACH_OMAP_OSK		OMAP_OSK		515
+rg100v3			MACH_RG100V3		RG100V3			516
+mx2ads			MACH_MX2ADS		MX2ADS			517
+pxa_kilo		MACH_PXA_KILO		PXA_KILO		518
+ixp4xx_eagle		MACH_IXP4XX_EAGLE	IXP4XX_EAGLE		519
+tosa			MACH_TOSA		TOSA			520
+mb2520f			MACH_MB2520F		MB2520F			521
+emc1000			MACH_EMC1000		EMC1000			522
+tidsc25			MACH_TIDSC25		TIDSC25			523
+akcpmxl			MACH_AKCPMXL		AKCPMXL			524
+av3xx			MACH_AV3XX		AV3XX			525
+avila			MACH_AVILA		AVILA			526
+pxa_mpm10		MACH_PXA_MPM10		PXA_MPM10		527
+pxa_kyanite		MACH_PXA_KYANITE	PXA_KYANITE		528
+sgold			MACH_SGOLD		SGOLD			529
+oscar			MACH_OSCAR		OSCAR			530
+epxa4usb2		MACH_EPXA4USB2		EPXA4USB2		531
+xsengine		MACH_XSENGINE		XSENGINE		532
+ip600			MACH_IP600		IP600			533
+mcan2			MACH_MCAN2		MCAN2			534
+ddi_blueridge		MACH_DDI_BLUERIDGE	DDI_BLUERIDGE		535
+skyminder		MACH_SKYMINDER		SKYMINDER		536
+lpd79520		MACH_LPD79520		LPD79520		537
+edb9302			MACH_EDB9302		EDB9302			538
+hw90340			MACH_HW90340		HW90340			539
+cip_box			MACH_CIP_BOX		CIP_BOX			540
+ivpn			MACH_IVPN		IVPN			541
+rsoc2			MACH_RSOC2		RSOC2			542
+husky			MACH_HUSKY		HUSKY			543
+boxer			MACH_BOXER		BOXER			544
+shepherd		MACH_SHEPHERD		SHEPHERD		545
+aml42800aa		MACH_AML42800AA		AML42800AA		546
+lpc2294			MACH_LPC2294		LPC2294			548
+switchgrass		MACH_SWITCHGRASS	SWITCHGRASS		549
+ens_cmu			MACH_ENS_CMU		ENS_CMU			550
+mm6_sdb			MACH_MM6_SDB		MM6_SDB			551
+saturn			MACH_SATURN		SATURN			552
+i30030evb		MACH_I30030EVB		I30030EVB		553
+mxc27530evb		MACH_MXC27530EVB	MXC27530EVB		554
+smdk2800		MACH_SMDK2800		SMDK2800		555
+mtwilson		MACH_MTWILSON		MTWILSON		556
+ziti			MACH_ZITI		ZITI			557
+grandfather		MACH_GRANDFATHER	GRANDFATHER		558
+tengine			MACH_TENGINE		TENGINE			559
+s3c2460			MACH_S3C2460		S3C2460			560
+pdm			MACH_PDM		PDM			561
+h4700			MACH_H4700		H4700			562
+h6300			MACH_H6300		H6300			563
+rz1700			MACH_RZ1700		RZ1700			564
+a716			MACH_A716		A716			565
+estk2440a		MACH_ESTK2440A		ESTK2440A		566
+atwixp425		MACH_ATWIXP425		ATWIXP425		567
+csb336			MACH_CSB336		CSB336			568
+rirm2			MACH_RIRM2		RIRM2			569
+cx23518			MACH_CX23518		CX23518			570
+cx2351x			MACH_CX2351X		CX2351X			571
+computime		MACH_COMPUTIME		COMPUTIME		572
+izarus			MACH_IZARUS		IZARUS			573
+pxa_rts			MACH_RTS		RTS			574
+se5100			MACH_SE5100		SE5100			575
+s3c2510			MACH_S3C2510		S3C2510			576
+csb437tl		MACH_CSB437TL		CSB437TL		577
+slauson			MACH_SLAUSON		SLAUSON			578
+pearlriver		MACH_PEARLRIVER		PEARLRIVER		579
+tdc_p210		MACH_TDC_P210		TDC_P210		580
+sg580			MACH_SG580		SG580			581
+wrsbcarm7		MACH_WRSBCARM7		WRSBCARM7		582
+ipd			MACH_IPD		IPD			583
+pxa_dnp2110		MACH_PXA_DNP2110	PXA_DNP2110		584
+xaeniax			MACH_XAENIAX		XAENIAX			585
+somn4250		MACH_SOMN4250		SOMN4250		586
+pleb2			MACH_PLEB2		PLEB2			587
+cornwallis		MACH_CORNWALLIS		CORNWALLIS		588
+gurney_drv		MACH_GURNEY_DRV		GURNEY_DRV		589
+chaffee			MACH_CHAFFEE		CHAFFEE			590
+rms101			MACH_RMS101		RMS101			591
+rx3715			MACH_RX3715		RX3715			592
+swift			MACH_SWIFT		SWIFT			593
+roverp7			MACH_ROVERP7		ROVERP7			594
+pr818s			MACH_PR818S		PR818S			595
+trxpro			MACH_TRXPRO		TRXPRO			596
+nslu2			MACH_NSLU2		NSLU2			597
+e400			MACH_E400		E400			598
+trab			MACH_TRAB		TRAB			599
+cmc_pu2			MACH_CMC_PU2		CMC_PU2			600
+fulcrum			MACH_FULCRUM		FULCRUM			601
+netgate42x		MACH_NETGATE42X		NETGATE42X		602
+str710			MACH_STR710		STR710			603
+ixdpg425		MACH_IXDPG425		IXDPG425		604
+tomtomgo		MACH_TOMTOMGO		TOMTOMGO		605
+versatile_ab		MACH_VERSATILE_AB	VERSATILE_AB		606
+edb9307			MACH_EDB9307		EDB9307			607
+sg565			MACH_SG565		SG565			608
+lpd79524		MACH_LPD79524		LPD79524		609
+lpd79525		MACH_LPD79525		LPD79525		610
+rms100			MACH_RMS100		RMS100			611
+kb9200			MACH_KB9200		KB9200			612
+sx1			MACH_SX1		SX1			613
+hms39c7092		MACH_HMS39C7092		HMS39C7092		614
+armadillo		MACH_ARMADILLO		ARMADILLO		615
+ipcu			MACH_IPCU		IPCU			616
+loox720			MACH_LOOX720		LOOX720			617
+ixdp465			MACH_IXDP465		IXDP465			618
+ixdp2351		MACH_IXDP2351		IXDP2351		619
+adsvix			MACH_ADSVIX		ADSVIX			620
+dm270			MACH_DM270		DM270			621
+socltplus		MACH_SOCLTPLUS		SOCLTPLUS		622
+ecia			MACH_ECIA		ECIA			623
+cm4008			MACH_CM4008		CM4008			624
+p2001			MACH_P2001		P2001			625
+twister			MACH_TWISTER		TWISTER			626
+mudshark		MACH_MUDSHARK		MUDSHARK		627
+hb2			MACH_HB2		HB2			628
+iq80332			MACH_IQ80332		IQ80332			629
+sendt			MACH_SENDT		SENDT			630
+mx2jazz			MACH_MX2JAZZ		MX2JAZZ			631
+multiio			MACH_MULTIIO		MULTIIO			632
+hrdisplay		MACH_HRDISPLAY		HRDISPLAY		633
+mxc27530ads		MACH_MXC27530ADS	MXC27530ADS		634
+trizeps3		MACH_TRIZEPS3		TRIZEPS3		635
+zefeerdza		MACH_ZEFEERDZA		ZEFEERDZA		636
+zefeerdzb		MACH_ZEFEERDZB		ZEFEERDZB		637
+zefeerdzg		MACH_ZEFEERDZG		ZEFEERDZG		638
+zefeerdzn		MACH_ZEFEERDZN		ZEFEERDZN		639
+zefeerdzq		MACH_ZEFEERDZQ		ZEFEERDZQ		640
+gtwx5715		MACH_GTWX5715		GTWX5715		641
+astro_jack		MACH_ASTRO_JACK		ASTRO_JACK		643
+tip03			MACH_TIP03		TIP03			644
+a9200ec			MACH_A9200EC		A9200EC			645
+pnx0105			MACH_PNX0105		PNX0105			646
+adcpoecpu		MACH_ADCPOECPU		ADCPOECPU		647
+csb637			MACH_CSB637		CSB637			648
+mb9200			MACH_MB9200		MB9200			650
+kulun			MACH_KULUN		KULUN			651
+snapper			MACH_SNAPPER		SNAPPER			652
+optima			MACH_OPTIMA		OPTIMA			653
+dlhsbc			MACH_DLHSBC		DLHSBC			654
+x30			MACH_X30		X30			655
+n30			MACH_N30		N30			656
+manga_ks8695		MACH_MANGA_KS8695	MANGA_KS8695		657
+ajax			MACH_AJAX		AJAX			658
+nec_mp900		MACH_NEC_MP900		NEC_MP900		659
+vvtk1000		MACH_VVTK1000		VVTK1000		661
+kafa			MACH_KAFA		KAFA			662
+vvtk3000		MACH_VVTK3000		VVTK3000		663
+pimx1			MACH_PIMX1		PIMX1			664
+ollie			MACH_OLLIE		OLLIE			665
+skymax			MACH_SKYMAX		SKYMAX			666
+jazz			MACH_JAZZ		JAZZ			667
+tel_t3			MACH_TEL_T3		TEL_T3			668
+aisino_fcr255		MACH_AISINO_FCR255	AISINO_FCR255		669
+btweb			MACH_BTWEB		BTWEB			670
+dbg_lh79520		MACH_DBG_LH79520	DBG_LH79520		671
+cm41xx			MACH_CM41XX		CM41XX			672
+ts72xx			MACH_TS72XX		TS72XX			673
+nggpxa			MACH_NGGPXA		NGGPXA			674
+csb535			MACH_CSB535		CSB535			675
+csb536			MACH_CSB536		CSB536			676
+pxa_trakpod		MACH_PXA_TRAKPOD	PXA_TRAKPOD		677
+praxis			MACH_PRAXIS		PRAXIS			678
+lh75411			MACH_LH75411		LH75411			679
+otom			MACH_OTOM		OTOM			680
+nexcoder_2440		MACH_NEXCODER_2440	NEXCODER_2440		681
+loox410			MACH_LOOX410		LOOX410			682
+westlake		MACH_WESTLAKE		WESTLAKE		683
+nsb			MACH_NSB		NSB			684
+esl_sarva_stn		MACH_ESL_SARVA_STN	ESL_SARVA_STN		685
+esl_sarva_tft		MACH_ESL_SARVA_TFT	ESL_SARVA_TFT		686
+esl_sarva_iad		MACH_ESL_SARVA_IAD	ESL_SARVA_IAD		687
+esl_sarva_acc		MACH_ESL_SARVA_ACC	ESL_SARVA_ACC		688
+typhoon			MACH_TYPHOON		TYPHOON			689
+cnav			MACH_CNAV		CNAV			690
+a730			MACH_A730		A730			691
+netstar			MACH_NETSTAR		NETSTAR			692
+supercon		MACH_PHASEFALE_SUPERCON	PHASEFALE_SUPERCON	693
+shiva1100		MACH_SHIVA1100		SHIVA1100		694
+etexsc			MACH_ETEXSC		ETEXSC			695
+ixdpg465		MACH_IXDPG465		IXDPG465		696
+a9m2410			MACH_A9M2410		A9M2410			697
+a9m2440			MACH_A9M2440		A9M2440			698
+a9m9750			MACH_A9M9750		A9M9750			699
+a9m9360			MACH_A9M9360		A9M9360			700
+unc90			MACH_UNC90		UNC90			701
+eco920			MACH_ECO920		ECO920			702
+satview			MACH_SATVIEW		SATVIEW			703
+roadrunner		MACH_ROADRUNNER		ROADRUNNER		704
+at91rm9200ek		MACH_AT91RM9200EK	AT91RM9200EK		705
+gp32			MACH_GP32		GP32			706
+gem			MACH_GEM		GEM			707
+i858			MACH_I858		I858			708
+hx2750			MACH_HX2750		HX2750			709
+mxc91131evb		MACH_MXC91131EVB	MXC91131EVB		710
+p700			MACH_P700		P700			711
+cpe			MACH_CPE		CPE			712
+spitz			MACH_SPITZ		SPITZ			713
+nimbra340		MACH_NIMBRA340		NIMBRA340		714
+lpc22xx			MACH_LPC22XX		LPC22XX			715
+omap_comet3		MACH_COMET3		COMET3			716
+omap_comet4		MACH_COMET4		COMET4			717
+csb625			MACH_CSB625		CSB625			718
+fortunet2		MACH_FORTUNET2		FORTUNET2		719
+s5h2200			MACH_S5H2200		S5H2200			720
+optorm920		MACH_OPTORM920		OPTORM920		721
+adsbitsyxb		MACH_ADSBITSYXB		ADSBITSYXB		722
+adssphere		MACH_ADSSPHERE		ADSSPHERE		723
+adsportal		MACH_ADSPORTAL		ADSPORTAL		724
+ln2410sbc		MACH_LN2410SBC		LN2410SBC		725
+cb3rufc			MACH_CB3RUFC		CB3RUFC			726
+mp2usb			MACH_MP2USB		MP2USB			727
+ntnp425c		MACH_NTNP425C		NTNP425C		728
+colibri			MACH_COLIBRI		COLIBRI			729
+pcm7220			MACH_PCM7220		PCM7220			730
+gateway7001		MACH_GATEWAY7001	GATEWAY7001		731
+pcm027			MACH_PCM027		PCM027			732
+cmpxa			MACH_CMPXA		CMPXA			733
+anubis			MACH_ANUBIS		ANUBIS			734
+ite8152			MACH_ITE8152		ITE8152			735
+lpc3xxx			MACH_LPC3XXX		LPC3XXX			736
+puppeteer		MACH_PUPPETEER		PUPPETEER		737
+e570			MACH_E570		E570			739
+x50			MACH_X50		X50			740
+recon			MACH_RECON		RECON			741
+xboardgp8		MACH_XBOARDGP8		XBOARDGP8		742
+fpic2			MACH_FPIC2		FPIC2			743
+akita			MACH_AKITA		AKITA			744
+a81			MACH_A81		A81			745
+svm_sc25x		MACH_SVM_SC25X		SVM_SC25X		746
+vt020			MACH_VADATECH020	VADATECH020		747
+tli			MACH_TLI		TLI			748
+edb9315lc		MACH_EDB9315LC		EDB9315LC		749
+passec			MACH_PASSEC		PASSEC			750
+ds_tiger		MACH_DS_TIGER		DS_TIGER		751
+e310			MACH_E310		E310			752
+e330			MACH_E330		E330			753
+rt3000			MACH_RT3000		RT3000			754
+nokia770		MACH_NOKIA770		NOKIA770		755
+pnx0106			MACH_PNX0106		PNX0106			756
+hx21xx			MACH_HX21XX		HX21XX			757
+faraday			MACH_FARADAY		FARADAY			758
+sbc9312			MACH_SBC9312		SBC9312			759
+batman			MACH_BATMAN		BATMAN			760
+jpd201			MACH_JPD201		JPD201			761
+mipsa			MACH_MIPSA		MIPSA			762
+kacom			MACH_KACOM		KACOM			763
+swarcocpu		MACH_SWARCOCPU		SWARCOCPU		764
+swarcodsl		MACH_SWARCODSL		SWARCODSL		765
+blueangel		MACH_BLUEANGEL		BLUEANGEL		766
+hairygrama		MACH_HAIRYGRAMA		HAIRYGRAMA		767
+banff			MACH_BANFF		BANFF			768
+carmeva			MACH_CARMEVA		CARMEVA			769
+sam255			MACH_SAM255		SAM255			770
+ppm10			MACH_PPM10		PPM10			771
+edb9315a		MACH_EDB9315A		EDB9315A		772
+sunset			MACH_SUNSET		SUNSET			773
+stargate2		MACH_STARGATE2		STARGATE2		774
+intelmote2		MACH_INTELMOTE2		INTELMOTE2		775
+trizeps4		MACH_TRIZEPS4		TRIZEPS4		776
+mainstone2		MACH_MAINSTONE2		MAINSTONE2		777
+ez_ixp42x		MACH_EZ_IXP42X		EZ_IXP42X		778
+tapwave_zodiac		MACH_TAPWAVE_ZODIAC	TAPWAVE_ZODIAC		779
+universalmeter		MACH_UNIVERSALMETER	UNIVERSALMETER		780
+hicoarm9		MACH_HICOARM9		HICOARM9		781
+pnx4008			MACH_PNX4008		PNX4008			782
+kws6000			MACH_KWS6000		KWS6000			783
+portux920t		MACH_PORTUX920T		PORTUX920T		784
+ez_x5			MACH_EZ_X5		EZ_X5			785
+omap_rudolph		MACH_OMAP_RUDOLPH	OMAP_RUDOLPH		786
+cpuat91			MACH_CPUAT91		CPUAT91			787
+rea9200			MACH_REA9200		REA9200			788
+acts_pune_sa1110	MACH_ACTS_PUNE_SA1110	ACTS_PUNE_SA1110	789
+ixp425			MACH_IXP425		IXP425			790
+i30030ads		MACH_I30030ADS		I30030ADS		791
+perch			MACH_PERCH		PERCH			792
+eis05r1			MACH_EIS05R1		EIS05R1			793
+pepperpad		MACH_PEPPERPAD		PEPPERPAD		794
+sb3010			MACH_SB3010		SB3010			795
+rm9200			MACH_RM9200		RM9200			796
+dma03			MACH_DMA03		DMA03			797
+road_s101		MACH_ROAD_S101		ROAD_S101		798
+iq81340sc		MACH_IQ81340SC		IQ81340SC		799
+iq_nextgen_b		MACH_IQ_NEXTGEN_B	IQ_NEXTGEN_B		800
+iq81340mc		MACH_IQ81340MC		IQ81340MC		801
+iq_nextgen_d		MACH_IQ_NEXTGEN_D	IQ_NEXTGEN_D		802
+iq_nextgen_e		MACH_IQ_NEXTGEN_E	IQ_NEXTGEN_E		803
+mallow_at91		MACH_MALLOW_AT91	MALLOW_AT91		804
+cybertracker_i		MACH_CYBERTRACKER_I	CYBERTRACKER_I		805
+gesbc931x		MACH_GESBC931X		GESBC931X		806
+centipad		MACH_CENTIPAD		CENTIPAD		807
+armsoc			MACH_ARMSOC		ARMSOC			808
+se4200			MACH_SE4200		SE4200			809
+ems197a			MACH_EMS197A		EMS197A			810
+micro9			MACH_MICRO9		MICRO9			811
+micro9l			MACH_MICRO9L		MICRO9L			812
+uc5471dsp		MACH_UC5471DSP		UC5471DSP		813
+sj5471eng		MACH_SJ5471ENG		SJ5471ENG		814
+none			MACH_CMPXA26X		CMPXA26X		815
+nc1			MACH_NC			NC			816
+omap_palmte		MACH_OMAP_PALMTE	OMAP_PALMTE		817
+ajax52x			MACH_AJAX52X		AJAX52X			818
+siriustar		MACH_SIRIUSTAR		SIRIUSTAR		819
+iodata_hdlg		MACH_IODATA_HDLG	IODATA_HDLG		820
+at91rm9200utl		MACH_AT91RM9200UTL	AT91RM9200UTL		821
+biosafe			MACH_BIOSAFE		BIOSAFE			822
+mp1000			MACH_MP1000		MP1000			823
+parsy			MACH_PARSY		PARSY			824
+ccxp270			MACH_CCXP		CCXP			825
+omap_gsample		MACH_OMAP_GSAMPLE	OMAP_GSAMPLE		826
+realview_eb		MACH_REALVIEW_EB	REALVIEW_EB		827
+samoa			MACH_SAMOA		SAMOA			828
+palmt3			MACH_PALMT3		PALMT3			829
+i878			MACH_I878		I878			830
+borzoi			MACH_BORZOI		BORZOI			831
+gecko			MACH_GECKO		GECKO			832
+ds101			MACH_DS101		DS101			833
+omap_palmtt2		MACH_OMAP_PALMTT2	OMAP_PALMTT2		834
+palmld			MACH_PALMLD		PALMLD			835
+cc9c			MACH_CC9C		CC9C			836
+sbc1670			MACH_SBC1670		SBC1670			837
+ixdp28x5		MACH_IXDP28X5		IXDP28X5		838
+omap_palmtt		MACH_OMAP_PALMTT	OMAP_PALMTT		839
+ml696k			MACH_ML696K		ML696K			840
+arcom_zeus		MACH_ARCOM_ZEUS		ARCOM_ZEUS		841
+osiris			MACH_OSIRIS		OSIRIS			842
+maestro			MACH_MAESTRO		MAESTRO			843
+palmte2			MACH_PALMTE2		PALMTE2			844
+ixbbm			MACH_IXBBM		IXBBM			845
+mx27ads			MACH_MX27ADS		MX27ADS			846
+ax8004			MACH_AX8004		AX8004			847
+at91sam9261ek		MACH_AT91SAM9261EK	AT91SAM9261EK		848
+loft			MACH_LOFT		LOFT			849
+magpie			MACH_MAGPIE		MAGPIE			850
+mx21ads			MACH_MX21ADS		MX21ADS			851
+mb87m3400		MACH_MB87M3400		MB87M3400		852
+mguard_delta		MACH_MGUARD_DELTA	MGUARD_DELTA		853
+davinci_dvdp		MACH_DAVINCI_DVDP	DAVINCI_DVDP		854
+htcuniversal		MACH_HTCUNIVERSAL	HTCUNIVERSAL		855
+tpad			MACH_TPAD		TPAD			856
+roverp3			MACH_ROVERP3		ROVERP3			857
+jornada928		MACH_JORNADA928		JORNADA928		858
+mv88fxx81		MACH_MV88FXX81		MV88FXX81		859
+stmp36xx		MACH_STMP36XX		STMP36XX		860
+sxni79524		MACH_SXNI79524		SXNI79524		861
+ams_delta		MACH_AMS_DELTA		AMS_DELTA		862
+uranium			MACH_URANIUM		URANIUM			863
+ucon			MACH_UCON		UCON			864
+nas100d			MACH_NAS100D		NAS100D			865
+l083			MACH_L083_1000		L083_1000		866
+ezx			MACH_EZX		EZX			867
+pnx5220			MACH_PNX5220		PNX5220			868
+butte			MACH_BUTTE		BUTTE			869
+srm2			MACH_SRM2		SRM2			870
+dsbr			MACH_DSBR		DSBR			871
+crystalball		MACH_CRYSTALBALL	CRYSTALBALL		872
+tinypxa27x		MACH_TINYPXA27X		TINYPXA27X		873
+herbie			MACH_HERBIE		HERBIE			874
+magician		MACH_MAGICIAN		MAGICIAN		875
+cm4002			MACH_CM4002		CM4002			876
+b4			MACH_B4			B4			877
+maui			MACH_MAUI		MAUI			878
+cybertracker_g		MACH_CYBERTRACKER_G	CYBERTRACKER_G		879
+nxdkn			MACH_NXDKN		NXDKN			880
+mio8390			MACH_MIO8390		MIO8390			881
+omi_board		MACH_OMI_BOARD		OMI_BOARD		882
+mx21civ			MACH_MX21CIV		MX21CIV			883
+mahi_cdac		MACH_MAHI_CDAC		MAHI_CDAC		884
+palmtx			MACH_PALMTX		PALMTX			885
+s3c2413			MACH_S3C2413		S3C2413			887
+samsys_ep0		MACH_SAMSYS_EP0		SAMSYS_EP0		888
+wg302v1			MACH_WG302V1		WG302V1			889
+wg302v2			MACH_WG302V2		WG302V2			890
+eb42x			MACH_EB42X		EB42X			891
+iq331es			MACH_IQ331ES		IQ331ES			892
+cosydsp			MACH_COSYDSP		COSYDSP			893
+uplat7d_proto		MACH_UPLAT7D		UPLAT7D			894
+ptdavinci		MACH_PTDAVINCI		PTDAVINCI		895
+mbus			MACH_MBUS		MBUS			896
+nadia2vb		MACH_NADIA2VB		NADIA2VB		897
+r1000			MACH_R1000		R1000			898
+hw90250			MACH_HW90250		HW90250			899
+omap_2430sdp		MACH_OMAP_2430SDP	OMAP_2430SDP		900
+davinci_evm		MACH_DAVINCI_EVM	DAVINCI_EVM		901
+omap_tornado		MACH_OMAP_TORNADO	OMAP_TORNADO		902
+olocreek		MACH_OLOCREEK		OLOCREEK		903
+palmz72			MACH_PALMZ72		PALMZ72			904
+nxdb500			MACH_NXDB500		NXDB500			905
+apf9328			MACH_APF9328		APF9328			906
+omap_wipoq		MACH_OMAP_WIPOQ		OMAP_WIPOQ		907
+omap_twip		MACH_OMAP_TWIP		OMAP_TWIP		908
+treo650			MACH_TREO650		TREO650			909
+acumen			MACH_ACUMEN		ACUMEN			910
+xp100			MACH_XP100		XP100			911
+fs2410			MACH_FS2410		FS2410			912
+pxa270_cerf		MACH_PXA270_CERF	PXA270_CERF		913
+sq2ftlpalm		MACH_SQ2FTLPALM		SQ2FTLPALM		914
+bsemserver		MACH_BSEMSERVER		BSEMSERVER		915
+netclient		MACH_NETCLIENT		NETCLIENT		916
+palmt5			MACH_PALMT5		PALMT5			917
+palmtc			MACH_PALMTC		PALMTC			918
+omap_apollon		MACH_OMAP_APOLLON	OMAP_APOLLON		919
+mxc30030evb		MACH_MXC30030EVB	MXC30030EVB		920
+rea_cpu2		MACH_REA_2D		REA_2D			921
+eti3e524		MACH_TI3E524		TI3E524			922
+ateb9200		MACH_ATEB9200		ATEB9200		923
+auckland		MACH_AUCKLAND		AUCKLAND		924
+ak3220m			MACH_AK3320M		AK3320M			925
+duramax			MACH_DURAMAX		DURAMAX			926
+n35			MACH_N35		N35			927
+pronghorn		MACH_PRONGHORN		PRONGHORN		928
+fundy			MACH_FUNDY		FUNDY			929
+logicpd_pxa270		MACH_LOGICPD_PXA270	LOGICPD_PXA270		930
+cpu777			MACH_CPU777		CPU777			931
+simicon9201		MACH_SIMICON9201	SIMICON9201		932
+leap2_hpm		MACH_LEAP2_HPM		LEAP2_HPM		933
+cm922txa10		MACH_CM922TXA10		CM922TXA10		934
+sandgate		MACH_PXA		PXA			935
+sandgate2		MACH_SANDGATE2		SANDGATE2		936
+sandgate2g		MACH_SANDGATE2G		SANDGATE2G		937
+sandgate2p		MACH_SANDGATE2P		SANDGATE2P		938
+fred_jack		MACH_FRED_JACK		FRED_JACK		939
+ttg_color1		MACH_TTG_COLOR1		TTG_COLOR1		940
+nxeb500hmi		MACH_NXEB500HMI		NXEB500HMI		941
+netdcu8			MACH_NETDCU8		NETDCU8			942
+ng_fvx538		MACH_NG_FVX538		NG_FVX538		944
+ng_fvs338		MACH_NG_FVS338		NG_FVS338		945
+pnx4103			MACH_PNX4103		PNX4103			946
+hesdb			MACH_HESDB		HESDB			947
+xsilo			MACH_XSILO		XSILO			948
+espresso		MACH_ESPRESSO		ESPRESSO		949
+emlc			MACH_EMLC		EMLC			950
+sisteron		MACH_SISTERON		SISTERON		951
+rx1950			MACH_RX1950		RX1950			952
+tsc_venus		MACH_TSC_VENUS		TSC_VENUS		953
+ds101j			MACH_DS101J		DS101J			954
+mxc30030ads		MACH_MXC30030ADS	MXC30030ADS		955
+fujitsu_wimaxsoc	MACH_FUJITSU_WIMAXSOC	FUJITSU_WIMAXSOC	956
+dualpcmodem		MACH_DUALPCMODEM	DUALPCMODEM		957
+gesbc9312		MACH_GESBC9312		GESBC9312		958
+htcapache		MACH_HTCAPACHE		HTCAPACHE		959
+ixdp435			MACH_IXDP435		IXDP435			960
+catprovt100		MACH_CATPROVT100	CATPROVT100		961
+picotux1xx		MACH_PICOTUX1XX		PICOTUX1XX		962
+picotux2xx		MACH_PICOTUX2XX		PICOTUX2XX		963
+dsmg600			MACH_DSMG600		DSMG600			964
+empc2			MACH_EMPC2		EMPC2			965
+ventura			MACH_VENTURA		VENTURA			966
+phidget_sbc		MACH_PHIDGET_SBC	PHIDGET_SBC		967
+ij3k			MACH_IJ3K		IJ3K			968
+pisgah			MACH_PISGAH		PISGAH			969
+omap_fsample		MACH_OMAP_FSAMPLE	OMAP_FSAMPLE		970
+sg720			MACH_SG720		SG720			971
+redfox			MACH_REDFOX		REDFOX			972
+mysh_ep9315_1		MACH_MYSH_EP9315_1	MYSH_EP9315_1		973
+tpf106			MACH_TPF106		TPF106			974
+at91rm9200kg		MACH_AT91RM9200KG	AT91RM9200KG		975
+rcmt2			MACH_SLEDB		SLEDB			976
+ontrack			MACH_ONTRACK		ONTRACK			977
+pm1200			MACH_PM1200		PM1200			978
+ess24562		MACH_ESS24XXX		ESS24XXX		979
+coremp7			MACH_COREMP7		COREMP7			980
+nexcoder_6446		MACH_NEXCODER_6446	NEXCODER_6446		981
+stvc8380		MACH_STVC8380		STVC8380		982
+teklynx			MACH_TEKLYNX		TEKLYNX			983
+carbonado		MACH_CARBONADO		CARBONADO		984
+sysmos_mp730		MACH_SYSMOS_MP730	SYSMOS_MP730		985
+snapper_cl15		MACH_SNAPPER_CL15	SNAPPER_CL15		986
+pgigim			MACH_PGIGIM		PGIGIM			987
+ptx9160p2		MACH_PTX9160P2		PTX9160P2		988
+dcore1			MACH_DCORE1		DCORE1			989
+victorpxa		MACH_VICTORPXA		VICTORPXA		990
+mx2dtb			MACH_MX2DTB		MX2DTB			991
+pxa_irex_er0100		MACH_PXA_IREX_ER0100	PXA_IREX_ER0100		992
+omap_palmz71		MACH_OMAP_PALMZ71	OMAP_PALMZ71		993
+bartec_deg		MACH_BARTEC_DEG		BARTEC_DEG		994
+hw50251			MACH_HW50251		HW50251			995
+ibox			MACH_IBOX		IBOX			996
+atlaslh7a404		MACH_ATLASLH7A404	ATLASLH7A404		997
+pt2026			MACH_PT2026		PT2026			998
+htcalpine		MACH_HTCALPINE		HTCALPINE		999
+bartec_vtu		MACH_BARTEC_VTU		BARTEC_VTU		1000
+vcoreii			MACH_VCOREII		VCOREII			1001
+pdnb3			MACH_PDNB3		PDNB3			1002
+htcbeetles		MACH_HTCBEETLES		HTCBEETLES		1003
+s3c6400			MACH_S3C6400		S3C6400			1004
+s3c2443			MACH_S3C2443		S3C2443			1005
+omap_ldk		MACH_OMAP_LDK		OMAP_LDK		1006
+smdk2460		MACH_SMDK2460		SMDK2460		1007
+smdk2440		MACH_SMDK2440		SMDK2440		1008
+smdk2412		MACH_SMDK2412		SMDK2412		1009
+webbox			MACH_WEBBOX		WEBBOX			1010
+cwwndp			MACH_CWWNDP		CWWNDP			1011
+i839			MACH_DRAGON		DRAGON			1012
+opendo_cpu_board	MACH_OPENDO_CPU_BOARD	OPENDO_CPU_BOARD	1013
+ccm2200			MACH_CCM2200		CCM2200			1014
+etwarm			MACH_ETWARM		ETWARM			1015
+m93030			MACH_M93030		M93030			1016
+cc7u			MACH_CC7U		CC7U			1017
+mtt_ranger		MACH_MTT_RANGER		MTT_RANGER		1018
+nexus			MACH_NEXUS		NEXUS			1019
+desman			MACH_DESMAN		DESMAN			1020
+bkde303			MACH_BKDE303		BKDE303			1021
+smdk2413		MACH_SMDK2413		SMDK2413		1022
+aml_m7200		MACH_AML_M7200		AML_M7200		1023
+aml_m5900		MACH_AML_M5900		AML_M5900		1024
+sg640			MACH_SG640		SG640			1025
+edg79524		MACH_EDG79524		EDG79524		1026
+ai2410			MACH_AI2410		AI2410			1027
+ixp465			MACH_IXP465		IXP465			1028
+balloon3		MACH_BALLOON3		BALLOON3		1029
+heins			MACH_HEINS		HEINS			1030
+mpluseva		MACH_MPLUSEVA		MPLUSEVA		1031
+rt042			MACH_RT042		RT042			1032
+cwiem			MACH_CWIEM		CWIEM			1033
+cm_x270			MACH_CM_X270		CM_X270			1034
+cm_x255			MACH_CM_X255		CM_X255			1035
+esh_at91		MACH_ESH_AT91		ESH_AT91		1036
+sandgate3		MACH_SANDGATE3		SANDGATE3		1037
+primo			MACH_PRIMO		PRIMO			1038
+gemstone		MACH_GEMSTONE		GEMSTONE		1039
+pronghorn_metro		MACH_PRONGHORNMETRO	PRONGHORNMETRO		1040
+sidewinder		MACH_SIDEWINDER		SIDEWINDER		1041
+picomod1		MACH_PICOMOD1		PICOMOD1		1042
+sg590			MACH_SG590		SG590			1043
+akai9307		MACH_AKAI9307		AKAI9307		1044
+fontaine		MACH_FONTAINE		FONTAINE		1045
+wombat			MACH_WOMBAT		WOMBAT			1046
+acq300			MACH_ACQ300		ACQ300			1047
+mod272			MACH_MOD_270		MOD_270			1048
+vmc_vc0820		MACH_VC0820		VC0820			1049
+ani_aim			MACH_ANI_AIM		ANI_AIM			1050
+jellyfish		MACH_JELLYFISH		JELLYFISH		1051
+amanita			MACH_AMANITA		AMANITA			1052
+vlink			MACH_VLINK		VLINK			1053
+dexflex			MACH_DEXFLEX		DEXFLEX			1054
+eigen_ttq		MACH_EIGEN_TTQ		EIGEN_TTQ		1055
+arcom_titan		MACH_ARCOM_TITAN	ARCOM_TITAN		1056
+tabla			MACH_TABLA		TABLA			1057
+mdirac3			MACH_MDIRAC3		MDIRAC3			1058
+mrhfbp2			MACH_MRHFBP2		MRHFBP2			1059
+at91rm9200rb		MACH_AT91RM9200RB	AT91RM9200RB		1060
+ani_apm			MACH_ANI_APM		ANI_APM			1061
+ella1			MACH_ELLA1		ELLA1			1062
+inhand_pxa27x		MACH_INHAND_PXA27X	INHAND_PXA27X		1063
+inhand_pxa25x		MACH_INHAND_PXA25X	INHAND_PXA25X		1064
+empos_xm		MACH_EMPOS_XM		EMPOS_XM		1065
+empos			MACH_EMPOS		EMPOS			1066
+empos_tiny		MACH_EMPOS_TINY		EMPOS_TINY		1067
+empos_sm		MACH_EMPOS_SM		EMPOS_SM		1068
+egret			MACH_EGRET		EGRET			1069
+ostrich			MACH_OSTRICH		OSTRICH			1070
+n50			MACH_N50		N50			1071
+ecbat91			MACH_ECBAT91		ECBAT91			1072
+stareast		MACH_STAREAST		STAREAST		1073
+dspg_dw			MACH_DSPG_DW		DSPG_DW			1074
+onearm			MACH_ONEARM		ONEARM			1075
+mrg110_6		MACH_MRG110_6		MRG110_6		1076
+wrt300nv2		MACH_WRT300NV2		WRT300NV2		1077
+xm_bulverde		MACH_XM_BULVERDE	XM_BULVERDE		1078
+msm6100			MACH_MSM6100		MSM6100			1079
+eti_b1			MACH_ETI_B1		ETI_B1			1080
+za9l_series		MACH_ZILOG_ZA9L		ZILOG_ZA9L		1081
+bit2440			MACH_BIT2440		BIT2440			1082
+nbi			MACH_NBI		NBI			1083
+smdk2443		MACH_SMDK2443		SMDK2443		1084
+vdavinci		MACH_VDAVINCI		VDAVINCI		1085
+atc6			MACH_ATC6		ATC6			1086
+multmdw			MACH_MULTMDW		MULTMDW			1087
+mba2440			MACH_MBA2440		MBA2440			1088
+ecsd			MACH_ECSD		ECSD			1089
+palmz31			MACH_PALMZ31		PALMZ31			1090
+fsg			MACH_FSG		FSG			1091
+razor101		MACH_RAZOR101		RAZOR101		1092
+opera_tdm		MACH_OPERA_TDM		OPERA_TDM		1093
+comcerto		MACH_COMCERTO		COMCERTO		1094
+tb0319			MACH_TB0319		TB0319			1095
+kws8000			MACH_KWS8000		KWS8000			1096
+b2			MACH_B2			B2			1097
+lcl54			MACH_LCL54		LCL54			1098
+at91sam9260ek		MACH_AT91SAM9260EK	AT91SAM9260EK		1099
+glantank		MACH_GLANTANK		GLANTANK		1100
+n2100			MACH_N2100		N2100			1101
+n4100			MACH_N4100		N4100			1102
+rsc4			MACH_VERTICAL_RSC4	VERTICAL_RSC4		1103
+sg8100			MACH_SG8100		SG8100			1104
+im42xx			MACH_IM42XX		IM42XX			1105
+ftxx			MACH_FTXX		FTXX			1106
+lwfusion		MACH_LWFUSION		LWFUSION		1107
+qt2410			MACH_QT2410		QT2410			1108
+kixrp435		MACH_KIXRP435		KIXRP435		1109
+ccw9c			MACH_CCW9C		CCW9C			1110
+dabhs			MACH_DABHS		DABHS			1111
+gzmx			MACH_GZMX		GZMX			1112
+ipnw100ap		MACH_IPNW100AP		IPNW100AP		1113
+cc9p9360dev		MACH_CC9P9360DEV	CC9P9360DEV		1114
+cc9p9750dev		MACH_CC9P9750DEV	CC9P9750DEV		1115
+cc9p9360val		MACH_CC9P9360VAL	CC9P9360VAL		1116
+cc9p9750val		MACH_CC9P9750VAL	CC9P9750VAL		1117
+nx70v			MACH_NX70V		NX70V			1118
+at91rm9200df		MACH_AT91RM9200DF	AT91RM9200DF		1119
+se_pilot2		MACH_SE_PILOT2		SE_PILOT2		1120
+mtcn_t800		MACH_MTCN_T800		MTCN_T800		1121
+vcmx212			MACH_VCMX212		VCMX212			1122
+lynx			MACH_LYNX		LYNX			1123
+at91sam9260id		MACH_AT91SAM9260ID	AT91SAM9260ID		1124
+hw86052			MACH_HW86052		HW86052			1125
+pilz_pmi3		MACH_PILZ_PMI3		PILZ_PMI3		1126
+edb9302a		MACH_EDB9302A		EDB9302A		1127
+edb9307a		MACH_EDB9307A		EDB9307A		1128
+ct_dfs			MACH_CT_DFS		CT_DFS			1129
+pilz_pmi4		MACH_PILZ_PMI4		PILZ_PMI4		1130
+xceednp_ixp		MACH_XCEEDNP_IXP	XCEEDNP_IXP		1131
+smdk2442b		MACH_SMDK2442B		SMDK2442B		1132
+xnode			MACH_XNODE		XNODE			1133
+aidx270			MACH_AIDX270		AIDX270			1134
+rema			MACH_REMA		REMA			1135
+bps1000			MACH_BPS1000		BPS1000			1136
+hw90350			MACH_HW90350		HW90350			1137
+omap_3430sdp		MACH_OMAP_3430SDP	OMAP_3430SDP		1138
+bluetouch		MACH_BLUETOUCH		BLUETOUCH		1139
+vstms			MACH_VSTMS		VSTMS			1140
+xsbase270		MACH_XSBASE270		XSBASE270		1141
+at91sam9260ek_cn	MACH_AT91SAM9260EK_CN	AT91SAM9260EK_CN	1142
+adsturboxb		MACH_ADSTURBOXB		ADSTURBOXB		1143
+oti4110			MACH_OTI4110		OTI4110			1144
+hme_pxa			MACH_HME_PXA		HME_PXA			1145
+deisterdca		MACH_DEISTERDCA		DEISTERDCA		1146
+ces_ssem2		MACH_CES_SSEM2		CES_SSEM2		1147
+ces_mtr			MACH_CES_MTR		CES_MTR			1148
+tds_avng_sbc		MACH_TDS_AVNG_SBC	TDS_AVNG_SBC		1149
+everest			MACH_EVEREST		EVEREST			1150
+pnx4010			MACH_PNX4010		PNX4010			1151
+oxnas			MACH_OXNAS		OXNAS			1152
+fiori			MACH_FIORI		FIORI			1153
+ml1200			MACH_ML1200		ML1200			1154
+pecos			MACH_PECOS		PECOS			1155
+nb2xxx			MACH_NB2XXX		NB2XXX			1156
+hw6900			MACH_HW6900		HW6900			1157
+cdcs_quoll		MACH_CDCS_QUOLL		CDCS_QUOLL		1158
+quicksilver		MACH_QUICKSILVER	QUICKSILVER		1159
+uplat926		MACH_UPLAT926		UPLAT926		1160
+dep2410_dep2410		MACH_DEP2410_THOMAS	DEP2410_THOMAS		1161
+dtk2410			MACH_DTK2410		DTK2410			1162
+chili			MACH_CHILI		CHILI			1163
+demeter			MACH_DEMETER		DEMETER			1164
+dionysus		MACH_DIONYSUS		DIONYSUS		1165
+as352x			MACH_AS352X		AS352X			1166
+service			MACH_SERVICE		SERVICE			1167
+cs_e9301		MACH_CS_E9301		CS_E9301		1168
+micro9m			MACH_MICRO9M		MICRO9M			1169
+ia_mospck		MACH_IA_MOSPCK		IA_MOSPCK		1170
+ql201b			MACH_QL201B		QL201B			1171
+bbm			MACH_BBM		BBM			1174
+exxx			MACH_EXXX		EXXX			1175
+wma11b			MACH_WMA11B		WMA11B			1176
+pelco_atlas		MACH_PELCO_ATLAS	PELCO_ATLAS		1177
+g500			MACH_G500		G500			1178
+bug			MACH_BUG		BUG			1179
+mx33ads			MACH_MX33ADS		MX33ADS			1180
+chub			MACH_CHUB		CHUB			1181
+neo1973_gta01		MACH_NEO1973_GTA01	NEO1973_GTA01		1182
+w90n740			MACH_W90N740		W90N740			1183
+medallion_sa2410	MACH_MEDALLION_SA2410	MEDALLION_SA2410	1184
+ia_cpu_9200_2		MACH_IA_CPU_9200_2	IA_CPU_9200_2		1185
+dimmrm9200		MACH_DIMMRM9200		DIMMRM9200		1186
+pm9261			MACH_PM9261		PM9261			1187
+ml7304			MACH_ML7304		ML7304			1189
+ucp250			MACH_UCP250		UCP250			1190
+intboard		MACH_INTBOARD		INTBOARD		1191
+gulfstream		MACH_GULFSTREAM		GULFSTREAM		1192
+labquest		MACH_LABQUEST		LABQUEST		1193
+vcmx313			MACH_VCMX313		VCMX313			1194
+urg200			MACH_URG200		URG200			1195
+cpux255lcdnet		MACH_CPUX255LCDNET	CPUX255LCDNET		1196
+netdcu9			MACH_NETDCU9		NETDCU9			1197
+netdcu10		MACH_NETDCU10		NETDCU10		1198
+dspg_dga		MACH_DSPG_DGA		DSPG_DGA		1199
+dspg_dvw		MACH_DSPG_DVW		DSPG_DVW		1200
+solos			MACH_SOLOS		SOLOS			1201
+at91sam9263ek		MACH_AT91SAM9263EK	AT91SAM9263EK		1202
+osstbox			MACH_OSSTBOX		OSSTBOX			1203
+kbat9261		MACH_KBAT9261		KBAT9261		1204
+ct1100			MACH_CT1100		CT1100			1205
+akcppxa			MACH_AKCPPXA		AKCPPXA			1206
+ochaya1020		MACH_OCHAYA1020		OCHAYA1020		1207
+hitrack			MACH_HITRACK		HITRACK			1208
+syme1			MACH_SYME1		SYME1			1209
+syhl1			MACH_SYHL1		SYHL1			1210
+empca400		MACH_EMPCA400		EMPCA400		1211
+em7210			MACH_EM7210		EM7210			1212
+htchermes		MACH_HTCHERMES		HTCHERMES		1213
+eti_c1			MACH_ETI_C1		ETI_C1			1214
+ac100			MACH_AC100		AC100			1216
+sneetch			MACH_SNEETCH		SNEETCH			1217
+studentmate		MACH_STUDENTMATE	STUDENTMATE		1218
+zir2410			MACH_ZIR2410		ZIR2410			1219
+zir2413			MACH_ZIR2413		ZIR2413			1220
+dlonip3			MACH_DLONIP3		DLONIP3			1221
+instream		MACH_INSTREAM		INSTREAM		1222
+ambarella		MACH_AMBARELLA		AMBARELLA		1223
+nevis			MACH_NEVIS		NEVIS			1224
+htc_trinity		MACH_HTC_TRINITY	HTC_TRINITY		1225
+ql202b			MACH_QL202B		QL202B			1226
+vpac270			MACH_VPAC270		VPAC270			1227
+rd129			MACH_RD129		RD129			1228
+htcwizard		MACH_HTCWIZARD		HTCWIZARD		1229
+treo680			MACH_TREO680		TREO680			1230
+tecon_tmezon		MACH_TECON_TMEZON	TECON_TMEZON		1231
+zylonite		MACH_ZYLONITE		ZYLONITE		1233
+gene1270		MACH_GENE1270		GENE1270		1234
+zir2412			MACH_ZIR2412		ZIR2412			1235
+mx31lite		MACH_MX31LITE		MX31LITE		1236
+t700wx			MACH_T700WX		T700WX			1237
+vf100			MACH_VF100		VF100			1238
+nsb2			MACH_NSB2		NSB2			1239
+nxhmi_bb		MACH_NXHMI_BB		NXHMI_BB		1240
+nxhmi_re		MACH_NXHMI_RE		NXHMI_RE		1241
+n4100pro		MACH_N4100PRO		N4100PRO		1242
+sam9260			MACH_SAM9260		SAM9260			1243
+omap_treo600		MACH_OMAP_TREO600	OMAP_TREO600		1244
+indy2410		MACH_INDY2410		INDY2410		1245
+nelt_a			MACH_NELT_A		NELT_A			1246
+n311			MACH_N311		N311			1248
+at91sam9260vgk		MACH_AT91SAM9260VGK	AT91SAM9260VGK		1249
+at91leppe		MACH_AT91LEPPE		AT91LEPPE		1250
+at91lepccn		MACH_AT91LEPCCN		AT91LEPCCN		1251
+apc7100			MACH_APC7100		APC7100			1252
+stargazer		MACH_STARGAZER		STARGAZER		1253
+sonata			MACH_SONATA		SONATA			1254
+schmoogie		MACH_SCHMOOGIE		SCHMOOGIE		1255
+aztool			MACH_AZTOOL		AZTOOL			1256
+mioa701			MACH_MIOA701		MIOA701			1257
+sxni9260		MACH_SXNI9260		SXNI9260		1258
+mxc27520evb		MACH_MXC27520EVB	MXC27520EVB		1259
+armadillo5x0		MACH_ARMADILLO5X0	ARMADILLO5X0		1260
+mb9260			MACH_MB9260		MB9260			1261
+mb9263			MACH_MB9263		MB9263			1262
+ipac9302		MACH_IPAC9302		IPAC9302		1263
+cc9p9360js		MACH_CC9P9360JS		CC9P9360JS		1264
+gallium			MACH_GALLIUM		GALLIUM			1265
+msc2410			MACH_MSC2410		MSC2410			1266
+ghi270			MACH_GHI270		GHI270			1267
+davinci_leonardo	MACH_DAVINCI_LEONARDO	DAVINCI_LEONARDO	1268
+oiab			MACH_OIAB		OIAB			1269
+smdk6400		MACH_SMDK6400		SMDK6400		1270
+nokia_n800		MACH_NOKIA_N800		NOKIA_N800		1271
+greenphone		MACH_GREENPHONE		GREENPHONE		1272
+compex42x		MACH_COMPEXWP18		COMPEXWP18		1273
+xmate			MACH_XMATE		XMATE			1274
+energizer		MACH_ENERGIZER		ENERGIZER		1275
+ime1			MACH_IME1		IME1			1276
+sweda_tms		MACH_SWEDATMS		SWEDATMS		1277
+ntnp435c		MACH_NTNP435C		NTNP435C		1278
+spectro2		MACH_SPECTRO2		SPECTRO2		1279
+h6039			MACH_H6039		H6039			1280
+ep80219			MACH_EP80219		EP80219			1281
+samoa_ii		MACH_SAMOA_II		SAMOA_II		1282
+cwmxl			MACH_CWMXL		CWMXL			1283
+as9200			MACH_AS9200		AS9200			1284
+sfx1149			MACH_SFX1149		SFX1149			1285
+navi010			MACH_NAVI010		NAVI010			1286
+multmdp			MACH_MULTMDP		MULTMDP			1287
+scb9520			MACH_SCB9520		SCB9520			1288
+htcathena		MACH_HTCATHENA		HTCATHENA		1289
+xp179			MACH_XP179		XP179			1290
+h4300			MACH_H4300		H4300			1291
+goramo_mlr		MACH_GORAMO_MLR		GORAMO_MLR		1292
+mxc30020evb		MACH_MXC30020EVB	MXC30020EVB		1293
+adsbitsyg5		MACH_ADSBITSYG5		ADSBITSYG5		1294
+adsportalplus		MACH_ADSPORTALPLUS	ADSPORTALPLUS		1295
+mmsp2plus		MACH_MMSP2PLUS		MMSP2PLUS		1296
+em_x270			MACH_EM_X270		EM_X270			1297
+tpp302			MACH_TPP302		TPP302			1298
+tpp104			MACH_TPM104		TPM104			1299
+tpm102			MACH_TPM102		TPM102			1300
+tpm109			MACH_TPM109		TPM109			1301
+fbxo1			MACH_FBXO1		FBXO1			1302
+hxd8			MACH_HXD8		HXD8			1303
+neo1973_gta02		MACH_NEO1973_GTA02	NEO1973_GTA02		1304
+emtest			MACH_EMTEST		EMTEST			1305
+ad6900			MACH_AD6900		AD6900			1306
+europa			MACH_EUROPA		EUROPA			1307
+metroconnect		MACH_METROCONNECT	METROCONNECT		1308
+ez_s2410		MACH_EZ_S2410		EZ_S2410		1309
+ez_s2440		MACH_EZ_S2440		EZ_S2440		1310
+ez_ep9312		MACH_EZ_EP9312		EZ_EP9312		1311
+ez_ep9315		MACH_EZ_EP9315		EZ_EP9315		1312
+ez_x7			MACH_EZ_X7		EZ_X7			1313
+godotdb			MACH_GODOTDB		GODOTDB			1314
+mistral			MACH_MISTRAL		MISTRAL			1315
+msm			MACH_MSM		MSM			1316
+ct5910			MACH_CT5910		CT5910			1317
+ct5912			MACH_CT5912		CT5912			1318
+argonst_mp		MACH_HYNET_INE		HYNET_INE		1319
+hynet_app		MACH_HYNET_APP		HYNET_APP		1320
+msm7200			MACH_MSM7200		MSM7200			1321
+msm7600			MACH_MSM7600		MSM7600			1322
+ceb255			MACH_CEB255		CEB255			1323
+ciel			MACH_CIEL		CIEL			1324
+slm5650			MACH_SLM5650		SLM5650			1325
+at91sam9rlek		MACH_AT91SAM9RLEK	AT91SAM9RLEK		1326
+comtech_router		MACH_COMTECH_ROUTER	COMTECH_ROUTER		1327
+sbc2410x		MACH_SBC2410X		SBC2410X		1328
+at4x0bd			MACH_AT4X0BD		AT4X0BD			1329
+cbifr			MACH_CBIFR		CBIFR			1330
+arcom_quantum		MACH_ARCOM_QUANTUM	ARCOM_QUANTUM		1331
+matrix520		MACH_MATRIX520		MATRIX520		1332
+matrix510		MACH_MATRIX510		MATRIX510		1333
+matrix500		MACH_MATRIX500		MATRIX500		1334
+m501			MACH_M501		M501			1335
+aaeon1270		MACH_AAEON1270		AAEON1270		1336
+matrix500ev		MACH_MATRIX500EV	MATRIX500EV		1337
+pac500			MACH_PAC500		PAC500			1338
+pnx8181			MACH_PNX8181		PNX8181			1339
+colibri320		MACH_COLIBRI320		COLIBRI320		1340
+aztoolbb		MACH_AZTOOLBB		AZTOOLBB		1341
+aztoolg2		MACH_AZTOOLG2		AZTOOLG2		1342
+dvlhost			MACH_DVLHOST		DVLHOST			1343
+zir9200			MACH_ZIR9200		ZIR9200			1344
+zir9260			MACH_ZIR9260		ZIR9260			1345
+cocopah			MACH_COCOPAH		COCOPAH			1346
+nds			MACH_NDS		NDS			1347
+rosencrantz		MACH_ROSENCRANTZ	ROSENCRANTZ		1348
+fttx_odsc		MACH_FTTX_ODSC		FTTX_ODSC		1349
+classe_r6904		MACH_CLASSE_R6904	CLASSE_R6904		1350
+cam60			MACH_CAM60		CAM60			1351
+mxc30031ads		MACH_MXC30031ADS	MXC30031ADS		1352
+datacall		MACH_DATACALL		DATACALL		1353
+at91eb01		MACH_AT91EB01		AT91EB01		1354
+rty			MACH_RTY		RTY			1355
+dwl2100			MACH_DWL2100		DWL2100			1356
+vinsi			MACH_VINSI		VINSI			1357
+db88f5281		MACH_DB88F5281		DB88F5281		1358
+csb726			MACH_CSB726		CSB726			1359
+tik27			MACH_TIK27		TIK27			1360
+mx_uc7420		MACH_MX_UC7420		MX_UC7420		1361
+rirm3			MACH_RIRM3		RIRM3			1362
+pelco_odyssey		MACH_PELCO_ODYSSEY	PELCO_ODYSSEY		1363
+adx_abox		MACH_ADX_ABOX		ADX_ABOX		1365
+adx_tpid		MACH_ADX_TPID		ADX_TPID		1366
+minicheck		MACH_MINICHECK		MINICHECK		1367
+idam			MACH_IDAM		IDAM			1368
+mario_mx		MACH_MARIO_MX		MARIO_MX		1369
+vi1888			MACH_VI1888		VI1888			1370
+zr4230			MACH_ZR4230		ZR4230			1371
+t1_ix_blue		MACH_T1_IX_BLUE		T1_IX_BLUE		1372
+syhq2			MACH_SYHQ2		SYHQ2			1373
+computime_r3		MACH_COMPUTIME_R3	COMPUTIME_R3		1374
+oratis			MACH_ORATIS		ORATIS			1375
+mikko			MACH_MIKKO		MIKKO			1376
+holon			MACH_HOLON		HOLON			1377
+olip8			MACH_OLIP8		OLIP8			1378
+ghi270hg		MACH_GHI270HG		GHI270HG		1379
+davinci_dm6467_evm	MACH_DAVINCI_DM6467_EVM	DAVINCI_DM6467_EVM	1380
+davinci_dm355_evm	MACH_DAVINCI_DM355_EVM	DAVINCI_DM355_EVM	1381
+blackriver		MACH_BLACKRIVER		BLACKRIVER		1383
+sandgate_wp		MACH_SANDGATEWP		SANDGATEWP		1384
+cdotbwsg		MACH_CDOTBWSG		CDOTBWSG		1385
+quark963		MACH_QUARK963		QUARK963		1386
+csb735			MACH_CSB735		CSB735			1387
+littleton		MACH_LITTLETON		LITTLETON		1388
+mio_p550		MACH_MIO_P550		MIO_P550		1389
+motion2440		MACH_MOTION2440		MOTION2440		1390
+imm500			MACH_IMM500		IMM500			1391
+homematic		MACH_HOMEMATIC		HOMEMATIC		1392
+ermine			MACH_ERMINE		ERMINE			1393
+kb9202b			MACH_KB9202B		KB9202B			1394
+hs1xx			MACH_HS1XX		HS1XX			1395
+studentmate2440		MACH_STUDENTMATE2440	STUDENTMATE2440		1396
+arvoo_l1_z1		MACH_ARVOO_L1_Z1	ARVOO_L1_Z1		1397
+dep2410k		MACH_DEP2410K		DEP2410K		1398
+xxsvideo		MACH_XXSVIDEO		XXSVIDEO		1399
+im4004			MACH_IM4004		IM4004			1400
+ochaya1050		MACH_OCHAYA1050		OCHAYA1050		1401
+lep9261			MACH_LEP9261		LEP9261			1402
+svenmeb			MACH_SVENMEB		SVENMEB			1403
+fortunet2ne		MACH_FORTUNET2NE	FORTUNET2NE		1404
+nxhx			MACH_NXHX		NXHX			1406
+realview_pb11mp		MACH_REALVIEW_PB11MP	REALVIEW_PB11MP		1407
+ids500			MACH_IDS500		IDS500			1408
+ors_n725		MACH_ORS_N725		ORS_N725		1409
+hsdarm			MACH_HSDARM		HSDARM			1410
+sha_pon003		MACH_SHA_PON003		SHA_PON003		1411
+sha_pon004		MACH_SHA_PON004		SHA_PON004		1412
+sha_pon007		MACH_SHA_PON007		SHA_PON007		1413
+sha_pon011		MACH_SHA_PON011		SHA_PON011		1414
+h6042			MACH_H6042		H6042			1415
+h6043			MACH_H6043		H6043			1416
+looxc550		MACH_LOOXC550		LOOXC550		1417
+cnty_titan		MACH_CNTY_TITAN		CNTY_TITAN		1418
+app3xx			MACH_APP3XX		APP3XX			1419
+sideoatsgrama		MACH_SIDEOATSGRAMA	SIDEOATSGRAMA		1420
+treo700p		MACH_TREO700P		TREO700P		1421
+treo700w		MACH_TREO700W		TREO700W		1422
+treo750			MACH_TREO750		TREO750			1423
+treo755p		MACH_TREO755P		TREO755P		1424
+ezreganut9200		MACH_EZREGANUT9200	EZREGANUT9200		1425
+sarge			MACH_SARGE		SARGE			1426
+a696			MACH_A696		A696			1427
+turtle1916		MACH_TURTLE		TURTLE			1428
+mx27_3ds		MACH_MX27_3DS		MX27_3DS		1430
+bishop			MACH_BISHOP		BISHOP			1431
+pxx			MACH_PXX		PXX			1432
+redwood			MACH_REDWOOD		REDWOOD			1433
+omap_2430dlp		MACH_OMAP_2430DLP	OMAP_2430DLP		1436
+omap_2430osk		MACH_OMAP_2430OSK	OMAP_2430OSK		1437
+sardine			MACH_SARDINE		SARDINE			1438
+halibut			MACH_HALIBUT		HALIBUT			1439
+trout			MACH_TROUT		TROUT			1440
+goldfish		MACH_GOLDFISH		GOLDFISH		1441
+gesbc2440		MACH_GESBC2440		GESBC2440		1442
+nomad			MACH_NOMAD		NOMAD			1443
+rosalind		MACH_ROSALIND		ROSALIND		1444
+cc9p9215		MACH_CC9P9215		CC9P9215		1445
+cc9p9210		MACH_CC9P9210		CC9P9210		1446
+cc9p9215js		MACH_CC9P9215JS		CC9P9215JS		1447
+cc9p9210js		MACH_CC9P9210JS		CC9P9210JS		1448
+nasffe			MACH_NASFFE		NASFFE			1449
+tn2x0bd			MACH_TN2X0BD		TN2X0BD			1450
+gwmpxa			MACH_GWMPXA		GWMPXA			1451
+exyplus			MACH_EXYPLUS		EXYPLUS			1452
+jadoo21			MACH_JADOO21		JADOO21			1453
+looxn560		MACH_LOOXN560		LOOXN560		1454
+bonsai			MACH_BONSAI		BONSAI			1455
+adsmilgato		MACH_ADSMILGATO		ADSMILGATO		1456
+gba			MACH_GBA		GBA			1457
+h6044			MACH_H6044		H6044			1458
+app			MACH_APP		APP			1459
+tct_hammer		MACH_TCT_HAMMER		TCT_HAMMER		1460
+herald			MACH_HERALD		HERALD			1461
+artemis			MACH_ARTEMIS		ARTEMIS			1462
+htctitan		MACH_HTCTITAN		HTCTITAN		1463
+qranium			MACH_QRANIUM		QRANIUM			1464
+adx_wsc2		MACH_ADX_WSC2		ADX_WSC2		1465
+adx_medcom		MACH_ADX_MEDCOM		ADX_MEDCOM		1466
+bboard			MACH_BBOARD		BBOARD			1467
+cambria			MACH_CAMBRIA		CAMBRIA			1468
+mt7xxx			MACH_MT7XXX		MT7XXX			1469
+matrix512		MACH_MATRIX512		MATRIX512		1470
+matrix522		MACH_MATRIX522		MATRIX522		1471
+ipac5010		MACH_IPAC5010		IPAC5010		1472
+sakura			MACH_SAKURA		SAKURA			1473
+grocx			MACH_GROCX		GROCX			1474
+pm9263			MACH_PM9263		PM9263			1475
+sim_one			MACH_SIM_ONE		SIM_ONE			1476
+acq132			MACH_ACQ132		ACQ132			1477
+datr			MACH_DATR		DATR			1478
+actux1			MACH_ACTUX1		ACTUX1			1479
+actux2			MACH_ACTUX2		ACTUX2			1480
+actux3			MACH_ACTUX3		ACTUX3			1481
+flexit			MACH_FLEXIT		FLEXIT			1482
+bh2x0bd			MACH_BH2X0BD		BH2X0BD			1483
+atb2002			MACH_ATB2002		ATB2002			1484
+xenon			MACH_XENON		XENON			1485
+fm607			MACH_FM607		FM607			1486
+matrix514		MACH_MATRIX514		MATRIX514		1487
+matrix524		MACH_MATRIX524		MATRIX524		1488
+inpod			MACH_INPOD		INPOD			1489
+jive			MACH_JIVE		JIVE			1490
+tll_mx21		MACH_TLL_MX21		TLL_MX21		1491
+sbc2800			MACH_SBC2800		SBC2800			1492
+cc7ucamry		MACH_CC7UCAMRY		CC7UCAMRY		1493
+ubisys_p9_sc15		MACH_UBISYS_P9_SC15	UBISYS_P9_SC15		1494
+ubisys_p9_ssc2d10	MACH_UBISYS_P9_SSC2D10	UBISYS_P9_SSC2D10	1495
+ubisys_p9_rcu3		MACH_UBISYS_P9_RCU3	UBISYS_P9_RCU3		1496
+aml_m8000		MACH_AML_M8000		AML_M8000		1497
+snapper_270		MACH_SNAPPER_270	SNAPPER_270		1498
+omap_bbx		MACH_OMAP_BBX		OMAP_BBX		1499
+ucn2410			MACH_UCN2410		UCN2410			1500
+sam9_l9260		MACH_SAM9_L9260		SAM9_L9260		1501
+eti_c2			MACH_ETI_C2		ETI_C2			1502
+avalanche		MACH_AVALANCHE		AVALANCHE		1503
+realview_pb1176		MACH_REALVIEW_PB1176	REALVIEW_PB1176		1504
+dp1500			MACH_DP1500		DP1500			1505
+apple_iphone		MACH_APPLE_IPHONE	APPLE_IPHONE		1506
+yl9200			MACH_YL9200		YL9200			1507
+rd88f5182		MACH_RD88F5182		RD88F5182		1508
+kurobox_pro		MACH_KUROBOX_PRO	KUROBOX_PRO		1509
+se_poet			MACH_SE_POET		SE_POET			1510
+mx31_3ds		MACH_MX31_3DS		MX31_3DS		1511
+r270			MACH_R270		R270			1512
+armour21		MACH_ARMOUR21		ARMOUR21		1513
+dt2			MACH_DT2		DT2			1514
+vt4			MACH_VT4		VT4			1515
+tyco320			MACH_TYCO320		TYCO320			1516
+adma			MACH_ADMA		ADMA			1517
+wp188			MACH_WP188		WP188			1518
+corsica			MACH_CORSICA		CORSICA			1519
+bigeye			MACH_BIGEYE		BIGEYE			1520
+tll5000			MACH_TLL5000		TLL5000			1522
+bebot			MACH_BEBOT		BEBOT			1523
+qong			MACH_QONG		QONG			1524
+tcompact		MACH_TCOMPACT		TCOMPACT		1525
+puma5			MACH_PUMA5		PUMA5			1526
+elara			MACH_ELARA		ELARA			1527
+ellington		MACH_ELLINGTON		ELLINGTON		1528
+xda_atom		MACH_XDA_ATOM		XDA_ATOM		1529
+energizer2		MACH_ENERGIZER2		ENERGIZER2		1530
+odin			MACH_ODIN		ODIN			1531
+actux4			MACH_ACTUX4		ACTUX4			1532
+esl_omap		MACH_ESL_OMAP		ESL_OMAP		1533
+omap2evm		MACH_OMAP2EVM		OMAP2EVM		1534
+omap3evm		MACH_OMAP3EVM		OMAP3EVM		1535
+adx_pcu57		MACH_ADX_PCU57		ADX_PCU57		1536
+monaco			MACH_MONACO		MONACO			1537
+levante			MACH_LEVANTE		LEVANTE			1538
+tmxipx425		MACH_TMXIPX425		TMXIPX425		1539
+leep			MACH_LEEP		LEEP			1540
+raad			MACH_RAAD		RAAD			1541
+dns323			MACH_DNS323		DNS323			1542
+ap1000			MACH_AP1000		AP1000			1543
+a9sam6432		MACH_A9SAM6432		A9SAM6432		1544
+shiny			MACH_SHINY		SHINY			1545
+omap3_beagle		MACH_OMAP3_BEAGLE	OMAP3_BEAGLE		1546
+csr_bdb2		MACH_CSR_BDB2		CSR_BDB2		1547
+nokia_n810		MACH_NOKIA_N810		NOKIA_N810		1548
+c270			MACH_C270		C270			1549
+sentry			MACH_SENTRY		SENTRY			1550
+pcm038			MACH_PCM038		PCM038			1551
+anc300			MACH_ANC300		ANC300			1552
+htckaiser		MACH_HTCKAISER		HTCKAISER		1553
+sbat100			MACH_SBAT100		SBAT100			1554
+modunorm		MACH_MODUNORM		MODUNORM		1555
+pelos_twarm		MACH_PELOS_TWARM	PELOS_TWARM		1556
+flank			MACH_FLANK		FLANK			1557
+sirloin			MACH_SIRLOIN		SIRLOIN			1558
+brisket			MACH_BRISKET		BRISKET			1559
+chuck			MACH_CHUCK		CHUCK			1560
+otter			MACH_OTTER		OTTER			1561
+davinci_ldk		MACH_DAVINCI_LDK	DAVINCI_LDK		1562
+phreedom		MACH_PHREEDOM		PHREEDOM		1563
+sg310			MACH_SG310		SG310			1564
+ts209			MACH_TS209		TS209			1565
+at91cap9adk		MACH_AT91CAP9ADK	AT91CAP9ADK		1566
+tion9315		MACH_TION9315		TION9315		1567
+mast			MACH_MAST		MAST			1568
+pfw			MACH_PFW		PFW			1569
+yl_p2440		MACH_YL_P2440		YL_P2440		1570
+zsbc32			MACH_ZSBC32		ZSBC32			1571
+omap_pace2		MACH_OMAP_PACE2		OMAP_PACE2		1572
+imx_pace2		MACH_IMX_PACE2		IMX_PACE2		1573
+mx31moboard		MACH_MX31MOBOARD	MX31MOBOARD		1574
+mx37_3ds		MACH_MX37_3DS		MX37_3DS		1575
+rcc			MACH_RCC		RCC			1576
+dmp			MACH_ARM9		ARM9			1577
+vision_ep9307		MACH_VISION_EP9307	VISION_EP9307		1578
+scly1000		MACH_SCLY1000		SCLY1000		1579
+fontel_ep		MACH_FONTEL_EP		FONTEL_EP		1580
+voiceblue3g		MACH_VOICEBLUE3G	VOICEBLUE3G		1581
+tt9200			MACH_TT9200		TT9200			1582
+digi2410		MACH_DIGI2410		DIGI2410		1583
+terastation_pro2	MACH_TERASTATION_PRO2	TERASTATION_PRO2	1584
+linkstation_pro		MACH_LINKSTATION_PRO	LINKSTATION_PRO		1585
+motorola_a780		MACH_MOTOROLA_A780	MOTOROLA_A780		1587
+motorola_e6		MACH_MOTOROLA_E6	MOTOROLA_E6		1588
+motorola_e2		MACH_MOTOROLA_E2	MOTOROLA_E2		1589
+motorola_e680		MACH_MOTOROLA_E680	MOTOROLA_E680		1590
+ur2410			MACH_UR2410		UR2410			1591
+tas9261			MACH_TAS9261		TAS9261			1592
+davinci_hermes_hd	MACH_HERMES_HD		HERMES_HD		1593
+davinci_perseo_hd	MACH_PERSEO_HD		PERSEO_HD		1594
+stargazer2		MACH_STARGAZER2		STARGAZER2		1595
+e350			MACH_E350		E350			1596
+wpcm450			MACH_WPCM450		WPCM450			1597
+cartesio		MACH_CARTESIO		CARTESIO		1598
+toybox			MACH_TOYBOX		TOYBOX			1599
+tx27			MACH_TX27		TX27			1600
+ts409			MACH_TS409		TS409			1601
+p300			MACH_P300		P300			1602
+xdacomet		MACH_XDACOMET		XDACOMET		1603
+dexflex2		MACH_DEXFLEX2		DEXFLEX2		1604
+ow			MACH_OW			OW			1605
+armebs3			MACH_ARMEBS3		ARMEBS3			1606
+u3			MACH_U3			U3			1607
+smdk2450		MACH_SMDK2450		SMDK2450		1608
+rsi_ews			MACH_RSI_EWS		RSI_EWS			1609
+tnb			MACH_TNB		TNB			1610
+toepath			MACH_TOEPATH		TOEPATH			1611
+kb9263			MACH_KB9263		KB9263			1612
+mt7108			MACH_MT7108		MT7108			1613
+smtr2440		MACH_SMTR2440		SMTR2440		1614
+manao			MACH_MANAO		MANAO			1615
+cm_x300			MACH_CM_X300		CM_X300			1616
+gulfstream_kp		MACH_GULFSTREAM_KP	GULFSTREAM_KP		1617
+lanreadyfn522		MACH_LANREADYFN522	LANREADYFN522		1618
+arma37			MACH_ARMA37		ARMA37			1619
+mendel			MACH_MENDEL		MENDEL			1620
+pelco_iliad		MACH_PELCO_ILIAD	PELCO_ILIAD		1621
+unit2p			MACH_UNIT2P		UNIT2P			1622
+inc20otter		MACH_INC20OTTER		INC20OTTER		1623
+at91sam9g20ek		MACH_AT91SAM9G20EK	AT91SAM9G20EK		1624
+sc_ge2			MACH_STORCENTER		STORCENTER		1625
+smdk6410		MACH_SMDK6410		SMDK6410		1626
+u300			MACH_U300		U300			1627
+u500			MACH_U500		U500			1628
+ds9260			MACH_DS9260		DS9260			1629
+riverrock		MACH_RIVERROCK		RIVERROCK		1630
+scibath			MACH_SCIBATH		SCIBATH			1631
+at91sam7se		MACH_AT91SAM7SE512EK	AT91SAM7SE512EK		1632
+wrt350n_v2		MACH_WRT350N_V2		WRT350N_V2		1633
+multimedia		MACH_MULTIMEDIA		MULTIMEDIA		1634
+marvin			MACH_MARVIN		MARVIN			1635
+x500			MACH_X500		X500			1636
+awlug4lcu		MACH_AWLUG4LCU		AWLUG4LCU		1637
+palermoc		MACH_PALERMOC		PALERMOC		1638
+omap_ldp		MACH_OMAP_LDP		OMAP_LDP		1639
+ip500			MACH_IP500		IP500			1640
+ase2			MACH_ASE2		ASE2			1642
+mx35evb			MACH_MX35EVB		MX35EVB			1643
+aml_m8050		MACH_AML_M8050		AML_M8050		1644
+mx35_3ds		MACH_MX35_3DS		MX35_3DS		1645
+mars			MACH_MARS		MARS			1646
+neuros_osd2		MACH_NEUROS_OSD2	NEUROS_OSD2		1647
+badger			MACH_BADGER		BADGER			1648
+trizeps4wl		MACH_TRIZEPS4WL		TRIZEPS4WL		1649
+trizeps5		MACH_TRIZEPS5		TRIZEPS5		1650
+marlin			MACH_MARLIN		MARLIN			1651
+ts78xx			MACH_TS78XX		TS78XX			1652
+hpipaq214		MACH_HPIPAQ214		HPIPAQ214		1653
+at572d940dcm		MACH_AT572D940DCM	AT572D940DCM		1654
+ne1board		MACH_NE1BOARD		NE1BOARD		1655
+zante			MACH_ZANTE		ZANTE			1656
+sffsdr			MACH_SFFSDR		SFFSDR			1657
+tw2662			MACH_TW2662		TW2662			1658
+vf10xx			MACH_VF10XX		VF10XX			1659
+zoran43xx		MACH_ZORAN43XX		ZORAN43XX		1660
+sonix926		MACH_SONIX926		SONIX926		1661
+celestialsemi		MACH_CELESTIALSEMI	CELESTIALSEMI		1662
+cc9m2443js		MACH_CC9M2443JS		CC9M2443JS		1663
+tw5334			MACH_TW5334		TW5334			1664
+omap_htcartemis		MACH_HTCARTEMIS		HTCARTEMIS		1665
+nal_hlite		MACH_NAL_HLITE		NAL_HLITE		1666
+htcvogue		MACH_HTCVOGUE		HTCVOGUE		1667
+smartweb		MACH_SMARTWEB		SMARTWEB		1668
+mv86xx			MACH_MV86XX		MV86XX			1669
+mv87xx			MACH_MV87XX		MV87XX			1670
+songyoungho		MACH_SONGYOUNGHO	SONGYOUNGHO		1671
+younghotema		MACH_YOUNGHOTEMA	YOUNGHOTEMA		1672
+pcm037			MACH_PCM037		PCM037			1673
+mmvp			MACH_MMVP		MMVP			1674
+mmap			MACH_MMAP		MMAP			1675
+ptid2410		MACH_PTID2410		PTID2410		1676
+james_926		MACH_JAMES_926		JAMES_926		1677
+fm6000			MACH_FM6000		FM6000			1678
+db88f6281_bp		MACH_DB88F6281_BP	DB88F6281_BP		1680
+rd88f6192_nas		MACH_RD88F6192_NAS	RD88F6192_NAS		1681
+rd88f6281		MACH_RD88F6281		RD88F6281		1682
+db78x00_bp		MACH_DB78X00_BP		DB78X00_BP		1683
+smdk2416		MACH_SMDK2416		SMDK2416		1685
+oce_spider_si		MACH_OCE_SPIDER_SI	OCE_SPIDER_SI		1686
+oce_spider_sk		MACH_OCE_SPIDER_SK	OCE_SPIDER_SK		1687
+rovern6			MACH_ROVERN6		ROVERN6			1688
+pelco_evolution		MACH_PELCO_EVOLUTION	PELCO_EVOLUTION		1689
+wbd111			MACH_WBD111		WBD111			1690
+elaracpe		MACH_ELARACPE		ELARACPE		1691
+mabv3			MACH_MABV3		MABV3			1692
+mv2120			MACH_MV2120		MV2120			1693
+csb737			MACH_CSB737		CSB737			1695
+mx51_3ds		MACH_MX51_3DS		MX51_3DS		1696
+g900			MACH_G900		G900			1697
+apf27			MACH_APF27		APF27			1698
+ggus2000		MACH_GGUS2000		GGUS2000		1699
+omap_2430_mimic		MACH_OMAP_2430_MIMIC	OMAP_2430_MIMIC		1700
+imx27lite		MACH_IMX27LITE		IMX27LITE		1701
+almex			MACH_ALMEX		ALMEX			1702
+control			MACH_CONTROL		CONTROL			1703
+mba2410			MACH_MBA2410		MBA2410			1704
+volcano			MACH_VOLCANO		VOLCANO			1705
+zenith			MACH_ZENITH		ZENITH			1706
+muchip			MACH_MUCHIP		MUCHIP			1707
+magellan		MACH_MAGELLAN		MAGELLAN		1708
+usb_a9260		MACH_USB_A9260		USB_A9260		1709
+usb_a9263		MACH_USB_A9263		USB_A9263		1710
+qil_a9260		MACH_QIL_A9260		QIL_A9260		1711
+cme9210			MACH_CME9210		CME9210			1712
+hczh4			MACH_HCZH4		HCZH4			1713
+spearbasic		MACH_SPEARBASIC		SPEARBASIC		1714
+dep2440			MACH_DEP2440		DEP2440			1715
+hdl_gxr			MACH_HDL_GXR		HDL_GXR			1716
+hdl_gt			MACH_HDL_GT		HDL_GT			1717
+hdl_4g			MACH_HDL_4G		HDL_4G			1718
+s3c6000			MACH_S3C6000		S3C6000			1719
+mmsp2_mdk		MACH_MMSP2_MDK		MMSP2_MDK		1720
+mpx220			MACH_MPX220		MPX220			1721
+kzm_arm11_01		MACH_KZM_ARM11_01	KZM_ARM11_01		1722
+htc_polaris		MACH_HTC_POLARIS	HTC_POLARIS		1723
+htc_kaiser		MACH_HTC_KAISER		HTC_KAISER		1724
+lg_ks20			MACH_LG_KS20		LG_KS20			1725
+hhgps			MACH_HHGPS		HHGPS			1726
+nokia_n810_wimax	MACH_NOKIA_N810_WIMAX	NOKIA_N810_WIMAX	1727
+insight			MACH_INSIGHT		INSIGHT			1728
+sapphire		MACH_SAPPHIRE		SAPPHIRE		1729
+csb637xo		MACH_CSB637XO		CSB637XO		1730
+evisiong		MACH_EVISIONG		EVISIONG		1731
+stmp37xx		MACH_STMP37XX		STMP37XX		1732
+stmp378x		MACH_STMP378X		STMP378X		1733
+tnt			MACH_TNT		TNT			1734
+tbxt			MACH_TBXT		TBXT			1735
+playmate		MACH_PLAYMATE		PLAYMATE		1736
+pns10			MACH_PNS10		PNS10			1737
+eznavi			MACH_EZNAVI		EZNAVI			1738
+ps4000			MACH_PS4000		PS4000			1739
+ezx_a780		MACH_EZX_A780		EZX_A780		1740
+ezx_e680		MACH_EZX_E680		EZX_E680		1741
+ezx_a1200		MACH_EZX_A1200		EZX_A1200		1742
+ezx_e6			MACH_EZX_E6		EZX_E6			1743
+ezx_e2			MACH_EZX_E2		EZX_E2			1744
+ezx_a910		MACH_EZX_A910		EZX_A910		1745
+cwmx31			MACH_CWMX31		CWMX31			1746
+sl2312			MACH_SL2312		SL2312			1747
+blenny			MACH_BLENNY		BLENNY			1748
+ds107			MACH_DS107		DS107			1749
+dsx07			MACH_DSX07		DSX07			1750
+picocom1		MACH_PICOCOM1		PICOCOM1		1751
+lynx_wolverine		MACH_LYNX_WOLVERINE	LYNX_WOLVERINE		1752
+ubisys_p9_sc19		MACH_UBISYS_P9_SC19	UBISYS_P9_SC19		1753
+kratos_low		MACH_KRATOS_LOW		KRATOS_LOW		1754
+m700			MACH_M700		M700			1755
+edmini_v2		MACH_EDMINI_V2		EDMINI_V2		1756
+zipit2			MACH_ZIPIT2		ZIPIT2			1757
+hslfemtocell		MACH_HSLFEMTOCELL	HSLFEMTOCELL		1758
+daintree_at91		MACH_DAINTREE_AT91	DAINTREE_AT91		1759
+sg560usb		MACH_SG560USB		SG560USB		1760
+omap3_pandora		MACH_OMAP3_PANDORA	OMAP3_PANDORA		1761
+usr8200			MACH_USR8200		USR8200			1762
+s1s65k			MACH_S1S65K		S1S65K			1763
+s2s65a			MACH_S2S65A		S2S65A			1764
+icore			MACH_ICORE		ICORE			1765
+mss2			MACH_MSS2		MSS2			1766
+belmont			MACH_BELMONT		BELMONT			1767
+asusp525		MACH_ASUSP525		ASUSP525		1768
+lb88rc8480		MACH_LB88RC8480		LB88RC8480		1769
+hipxa			MACH_HIPXA		HIPXA			1770
+mx25_3ds		MACH_MX25_3DS		MX25_3DS		1771
+m800			MACH_M800		M800			1772
+omap3530_lv_som		MACH_OMAP3530_LV_SOM	OMAP3530_LV_SOM		1773
+prima_evb		MACH_PRIMA_EVB		PRIMA_EVB		1774
+mx31bt1			MACH_MX31BT1		MX31BT1			1775
+atlas4_evb		MACH_ATLAS4_EVB		ATLAS4_EVB		1776
+mx31cicada		MACH_MX31CICADA		MX31CICADA		1777
+mi424wr			MACH_MI424WR		MI424WR			1778
+axs_ultrax		MACH_AXS_ULTRAX		AXS_ULTRAX		1779
+at572d940deb		MACH_AT572D940DEB	AT572D940DEB		1780
+davinci_da830_evm	MACH_DAVINCI_DA830_EVM	DAVINCI_DA830_EVM	1781
+ep9302			MACH_EP9302		EP9302			1782
+at572d940hfek		MACH_AT572D940HFEB	AT572D940HFEB		1783
+cybook3			MACH_CYBOOK3		CYBOOK3			1784
+wdg002			MACH_WDG002		WDG002			1785
+sg560adsl		MACH_SG560ADSL		SG560ADSL		1786
+nextio_n2800_ica	MACH_NEXTIO_N2800_ICA	NEXTIO_N2800_ICA	1787
+dove_db			MACH_DOVE_DB		DOVE_DB			1788
+vandihud		MACH_VANDIHUD		VANDIHUD		1790
+magx_e8			MACH_MAGX_E8		MAGX_E8			1791
+magx_z6			MACH_MAGX_Z6		MAGX_Z6			1792
+magx_v8			MACH_MAGX_V8		MAGX_V8			1793
+magx_u9			MACH_MAGX_U9		MAGX_U9			1794
+toughcf08		MACH_TOUGHCF08		TOUGHCF08		1795
+zw4400			MACH_ZW4400		ZW4400			1796
+marat91			MACH_MARAT91		MARAT91			1797
+overo			MACH_OVERO		OVERO			1798
+at2440evb		MACH_AT2440EVB		AT2440EVB		1799
+neocore926		MACH_NEOCORE926		NEOCORE926		1800
+wnr854t			MACH_WNR854T		WNR854T			1801
+imx27			MACH_IMX27		IMX27			1802
+moose_db		MACH_MOOSE_DB		MOOSE_DB		1803
+fab4			MACH_FAB4		FAB4			1804
+htcdiamond		MACH_HTCDIAMOND		HTCDIAMOND		1805
+fiona			MACH_FIONA		FIONA			1806
+mxc30030_x		MACH_MXC30030_X		MXC30030_X		1807
+bmp1000			MACH_BMP1000		BMP1000			1808
+logi9200		MACH_LOGI9200		LOGI9200		1809
+tqma31			MACH_TQMA31		TQMA31			1810
+ccw9p9215js		MACH_CCW9P9215JS	CCW9P9215JS		1811
+rd88f5181l_ge		MACH_RD88F5181L_GE	RD88F5181L_GE		1812
+sifmain			MACH_SIFMAIN		SIFMAIN			1813
+sam9_l9261		MACH_SAM9_L9261		SAM9_L9261		1814
+cc9m2443		MACH_CC9M2443		CC9M2443		1815
+xaria300		MACH_XARIA300		XARIA300		1816
+it9200			MACH_IT9200		IT9200			1817
+rd88f5181l_fxo		MACH_RD88F5181L_FXO	RD88F5181L_FXO		1818
+kriss_sensor		MACH_KRISS_SENSOR	KRISS_SENSOR		1819
+pilz_pmi5		MACH_PILZ_PMI5		PILZ_PMI5		1820
+jade			MACH_JADE		JADE			1821
+ks8695_softplc		MACH_KS8695_SOFTPLC	KS8695_SOFTPLC		1822
+gprisc3			MACH_GPRISC3		GPRISC3			1823
+stamp9g20		MACH_STAMP9G20		STAMP9G20		1824
+smdk6430		MACH_SMDK6430		SMDK6430		1825
+smdkc100		MACH_SMDKC100		SMDKC100		1826
+tavorevb		MACH_TAVOREVB		TAVOREVB		1827
+saar			MACH_SAAR		SAAR			1828
+deister_eyecam		MACH_DEISTER_EYECAM	DEISTER_EYECAM		1829
+at91sam9m10g45ek	MACH_AT91SAM9M10G45EK	AT91SAM9M10G45EK	1830
+linkstation_produo	MACH_LINKSTATION_PRODUO	LINKSTATION_PRODUO	1831
+hit_b0			MACH_HIT_B0		HIT_B0			1832
+adx_rmu			MACH_ADX_RMU		ADX_RMU			1833
+xg_cpe_main		MACH_XG_CPE_MAIN	XG_CPE_MAIN		1834
+edb9407a		MACH_EDB9407A		EDB9407A		1835
+dtb9608			MACH_DTB9608		DTB9608			1836
+em104v1			MACH_EM104V1		EM104V1			1837
+demo			MACH_DEMO		DEMO			1838
+logi9260		MACH_LOGI9260		LOGI9260		1839
+mx31_exm32		MACH_MX31_EXM32		MX31_EXM32		1840
+usb_a9g20		MACH_USB_A9G20		USB_A9G20		1841
+picproje2008		MACH_PICPROJE2008	PICPROJE2008		1842
+cs_e9315		MACH_CS_E9315		CS_E9315		1843
+qil_a9g20		MACH_QIL_A9G20		QIL_A9G20		1844
+sha_pon020		MACH_SHA_PON020		SHA_PON020		1845
+nad			MACH_NAD		NAD			1846
+sbc35_a9260		MACH_SBC35_A9260	SBC35_A9260		1847
+sbc35_a9g20		MACH_SBC35_A9G20	SBC35_A9G20		1848
+davinci_beginning	MACH_DAVINCI_BEGINNING	DAVINCI_BEGINNING	1849
+uwc			MACH_UWC		UWC			1850
+mxlads			MACH_MXLADS		MXLADS			1851
+htcnike			MACH_HTCNIKE		HTCNIKE			1852
+deister_pxa270		MACH_DEISTER_PXA270	DEISTER_PXA270		1853
+cme9210js		MACH_CME9210JS		CME9210JS		1854
+cc9p9360		MACH_CC9P9360		CC9P9360		1855
+mocha			MACH_MOCHA		MOCHA			1856
+wapd170ag		MACH_WAPD170AG		WAPD170AG		1857
+linkstation_mini	MACH_LINKSTATION_MINI	LINKSTATION_MINI	1858
+afeb9260		MACH_AFEB9260		AFEB9260		1859
+w90x900			MACH_W90X900		W90X900			1860
+w90x700			MACH_W90X700		W90X700			1861
+kt300ip			MACH_KT300IP		KT300IP			1862
+kt300ip_g20		MACH_KT300IP_G20	KT300IP_G20		1863
+srcm			MACH_SRCM		SRCM			1864
+wlnx_9260		MACH_WLNX_9260		WLNX_9260		1865
+openmoko_gta03		MACH_OPENMOKO_GTA03	OPENMOKO_GTA03		1866
+osprey2			MACH_OSPREY2		OSPREY2			1867
+kbio9260		MACH_KBIO9260		KBIO9260		1868
+ginza			MACH_GINZA		GINZA			1869
+a636n			MACH_A636N		A636N			1870
+imx27ipcam		MACH_IMX27IPCAM		IMX27IPCAM		1871
+nemoc			MACH_NEMOC		NEMOC			1872
+geneva			MACH_GENEVA		GENEVA			1873
+htcpharos		MACH_HTCPHAROS		HTCPHAROS		1874
+neonc			MACH_NEONC		NEONC			1875
+nas7100			MACH_NAS7100		NAS7100			1876
+teuphone		MACH_TEUPHONE		TEUPHONE		1877
+annax_eth2		MACH_ANNAX_ETH2		ANNAX_ETH2		1878
+csb733			MACH_CSB733		CSB733			1879
+bk3			MACH_BK3		BK3			1880
+omap_em32		MACH_OMAP_EM32		OMAP_EM32		1881
+et9261cp		MACH_ET9261CP		ET9261CP		1882
+jasperc			MACH_JASPERC		JASPERC			1883
+issi_arm9		MACH_ISSI_ARM9		ISSI_ARM9		1884
+ued			MACH_UED		UED			1885
+esiblade		MACH_ESIBLADE		ESIBLADE		1886
+eye02			MACH_EYE02		EYE02			1887
+imx27kbd		MACH_IMX27KBD		IMX27KBD		1888
+kixvp435		MACH_KIXVP435		KIXVP435		1890
+kixnp435		MACH_KIXNP435		KIXNP435		1891
+africa			MACH_AFRICA		AFRICA			1892
+nh233			MACH_NH233		NH233			1893
+rd88f6183ap_ge		MACH_RD88F6183AP_GE	RD88F6183AP_GE		1894
+bcm4760			MACH_BCM4760		BCM4760			1895
+eddy_v2			MACH_EDDY_V2		EDDY_V2			1896
+realview_pba8		MACH_REALVIEW_PBA8	REALVIEW_PBA8		1897
+hid_a7			MACH_HID_A7		HID_A7			1898
+hero			MACH_HERO		HERO			1899
+omap_poseidon		MACH_OMAP_POSEIDON	OMAP_POSEIDON		1900
+realview_pbx		MACH_REALVIEW_PBX	REALVIEW_PBX		1901
+micro9s			MACH_MICRO9S		MICRO9S			1902
+mako			MACH_MAKO		MAKO			1903
+xdaflame		MACH_XDAFLAME		XDAFLAME		1904
+phidget_sbc2		MACH_PHIDGET_SBC2	PHIDGET_SBC2		1905
+limestone		MACH_LIMESTONE		LIMESTONE		1906
+iprobe_c32		MACH_IPROBE_C32		IPROBE_C32		1907
+rut100			MACH_RUT100		RUT100			1908
+asusp535		MACH_ASUSP535		ASUSP535		1909
+htcraphael		MACH_HTCRAPHAEL		HTCRAPHAEL		1910
+sygdg1			MACH_SYGDG1		SYGDG1			1911
+sygdg2			MACH_SYGDG2		SYGDG2			1912
+seoul			MACH_SEOUL		SEOUL			1913
+salerno			MACH_SALERNO		SALERNO			1914
+ucn_s3c64xx		MACH_UCN_S3C64XX	UCN_S3C64XX		1915
+msm7201a		MACH_MSM7201A		MSM7201A		1916
+lpr1			MACH_LPR1		LPR1			1917
+armadillo500fx		MACH_ARMADILLO500FX	ARMADILLO500FX		1918
+g3evm			MACH_G3EVM		G3EVM			1919
+z3_dm355		MACH_Z3_DM355		Z3_DM355		1920
+w90p910evb		MACH_W90P910EVB		W90P910EVB		1921
+w90p920evb		MACH_W90P920EVB		W90P920EVB		1922
+w90p950evb		MACH_W90P950EVB		W90P950EVB		1923
+w90n960evb		MACH_W90N960EVB		W90N960EVB		1924
+camhd			MACH_CAMHD		CAMHD			1925
+mvc100			MACH_MVC100		MVC100			1926
+electrum_200		MACH_ELECTRUM_200	ELECTRUM_200		1927
+htcjade			MACH_HTCJADE		HTCJADE			1928
+memphis			MACH_MEMPHIS		MEMPHIS			1929
+imx27sbc		MACH_IMX27SBC		IMX27SBC		1930
+lextar			MACH_LEXTAR		LEXTAR			1931
+mv88f6281gtw_ge		MACH_MV88F6281GTW_GE	MV88F6281GTW_GE		1932
+ncp			MACH_NCP		NCP			1933
+z32an_series		MACH_Z32AN		Z32AN			1934
+tmq_capd		MACH_TMQ_CAPD		TMQ_CAPD		1935
+omap3_wl		MACH_OMAP3_WL		OMAP3_WL		1936
+chumby			MACH_CHUMBY		CHUMBY			1937
+atsarm9			MACH_ATSARM9		ATSARM9			1938
+davinci_dm365_evm	MACH_DAVINCI_DM365_EVM	DAVINCI_DM365_EVM	1939
+bahamas			MACH_BAHAMAS		BAHAMAS			1940
+das			MACH_DAS		DAS			1941
+minidas			MACH_MINIDAS		MINIDAS			1942
+vk1000			MACH_VK1000		VK1000			1943
+centro			MACH_CENTRO		CENTRO			1944
+ctera_2bay		MACH_CTERA_2BAY		CTERA_2BAY		1945
+edgeconnect		MACH_EDGECONNECT	EDGECONNECT		1946
+nd27000			MACH_ND27000		ND27000			1947
+cobra			MACH_GEMALTO_COBRA	GEMALTO_COBRA		1948
+ingelabs_comet		MACH_INGELABS_COMET	INGELABS_COMET		1949
+pollux_wiz		MACH_POLLUX_WIZ		POLLUX_WIZ		1950
+blackstone		MACH_BLACKSTONE		BLACKSTONE		1951
+topaz			MACH_TOPAZ		TOPAZ			1952
+aixle			MACH_AIXLE		AIXLE			1953
+mw998			MACH_MW998		MW998			1954
+nokia_rx51		MACH_NOKIA_RX51		NOKIA_RX51		1955
+vsc5605ev		MACH_VSC5605EV		VSC5605EV		1956
+nt98700dk		MACH_NT98700DK		NT98700DK		1957
+icontact		MACH_ICONTACT		ICONTACT		1958
+swarco_frcpu		MACH_SWARCO_FRCPU	SWARCO_FRCPU		1959
+swarco_scpu		MACH_SWARCO_SCPU	SWARCO_SCPU		1960
+bbox_p16		MACH_BBOX_P16		BBOX_P16		1961
+bstd			MACH_BSTD		BSTD			1962
+sbc2440ii		MACH_SBC2440II		SBC2440II		1963
+pcm034			MACH_PCM034		PCM034			1964
+neso			MACH_NESO		NESO			1965
+wlnx_9g20		MACH_WLNX_9G20		WLNX_9G20		1966
+omap_zoom2		MACH_OMAP_ZOOM2		OMAP_ZOOM2		1967
+totemnova		MACH_TOTEMNOVA		TOTEMNOVA		1968
+c5000			MACH_C5000		C5000			1969
+unipo_at91sam9263	MACH_UNIPO_AT91SAM9263	UNIPO_AT91SAM9263	1970
+ethernut5		MACH_ETHERNUT5		ETHERNUT5		1971
+arm11			MACH_ARM11		ARM11			1972
+cpuat9260		MACH_CPUAT9260		CPUAT9260		1973
+cpupxa255		MACH_CPUPXA255		CPUPXA255		1974
+eukrea_cpuimx27		MACH_EUKREA_CPUIMX27	EUKREA_CPUIMX27		1975
+cheflux			MACH_CHEFLUX		CHEFLUX			1976
+eb_cpux9k2		MACH_EB_CPUX9K2		EB_CPUX9K2		1977
+opcotec			MACH_OPCOTEC		OPCOTEC			1978
+yt			MACH_YT			YT			1979
+motoq			MACH_MOTOQ		MOTOQ			1980
+bsb1			MACH_BSB1		BSB1			1981
+acs5k			MACH_ACS5K		ACS5K			1982
+milan			MACH_MILAN		MILAN			1983
+quartzv2		MACH_QUARTZV2		QUARTZV2		1984
+rsvp			MACH_RSVP		RSVP			1985
+rmp200			MACH_RMP200		RMP200			1986
+snapper_9260		MACH_SNAPPER_9260	SNAPPER_9260		1987
+dsm320			MACH_DSM320		DSM320			1988
+adsgcm			MACH_ADSGCM		ADSGCM			1989
+ase2_400		MACH_ASE2_400		ASE2_400		1990
+pizza			MACH_PIZZA		PIZZA			1991
+spot_ngpl		MACH_SPOT_NGPL		SPOT_NGPL		1992
+armata			MACH_ARMATA		ARMATA			1993
+exeda			MACH_EXEDA		EXEDA			1994
+mx31sf005		MACH_MX31SF005		MX31SF005		1995
+f5d8231_4_v2		MACH_F5D8231_4_V2	F5D8231_4_V2		1996
+q2440			MACH_Q2440		Q2440			1997
+qq2440			MACH_QQ2440		QQ2440			1998
+mini2440		MACH_MINI2440		MINI2440		1999
+colibri300		MACH_COLIBRI300		COLIBRI300		2000
+jades			MACH_JADES		JADES			2001
+spark			MACH_SPARK		SPARK			2002
+benzina			MACH_BENZINA		BENZINA			2003
+blaze			MACH_BLAZE		BLAZE			2004
+linkstation_ls_hgl	MACH_LINKSTATION_LS_HGL	LINKSTATION_LS_HGL	2005
+htckovsky		MACH_HTCKOVSKY		HTCKOVSKY		2006
+sony_prs505		MACH_SONY_PRS505	SONY_PRS505		2007
+hanlin_v3		MACH_HANLIN_V3		HANLIN_V3		2008
+sapphira		MACH_SAPPHIRA		SAPPHIRA		2009
+dack_sda_01		MACH_DACK_SDA_01	DACK_SDA_01		2010
+armbox			MACH_ARMBOX		ARMBOX			2011
+harris_rvp		MACH_HARRIS_RVP		HARRIS_RVP		2012
+ribaldo			MACH_RIBALDO		RIBALDO			2013
+agora			MACH_AGORA		AGORA			2014
+omap3_mini		MACH_OMAP3_MINI		OMAP3_MINI		2015
+a9sam6432_b		MACH_A9SAM6432_B	A9SAM6432_B		2016
+usg2410			MACH_USG2410		USG2410			2017
+pc72052_i10_revb	MACH_PC72052_I10_REVB	PC72052_I10_REVB	2018
+mx35_exm32		MACH_MX35_EXM32		MX35_EXM32		2019
+topas910		MACH_TOPAS910		TOPAS910		2020
+hyena			MACH_HYENA		HYENA			2021
+pospax			MACH_POSPAX		POSPAX			2022
+hdl_gx			MACH_HDL_GX		HDL_GX			2023
+ctera_4bay		MACH_CTERA_4BAY		CTERA_4BAY		2024
+ctera_plug_c		MACH_CTERA_PLUG_C	CTERA_PLUG_C		2025
+crwea_plug_i		MACH_CRWEA_PLUG_I	CRWEA_PLUG_I		2026
+egauge2			MACH_EGAUGE2		EGAUGE2			2027
+didj			MACH_DIDJ		DIDJ			2028
+m_s3c2443		MACH_MEISTER		MEISTER			2029
+htcblackstone		MACH_HTCBLACKSTONE	HTCBLACKSTONE		2030
+cpuat9g20		MACH_CPUAT9G20		CPUAT9G20		2031
+smdk6440		MACH_SMDK6440		SMDK6440		2032
+omap_35xx_mvp		MACH_OMAP_35XX_MVP	OMAP_35XX_MVP		2033
+ctera_plug_i		MACH_CTERA_PLUG_I	CTERA_PLUG_I		2034
+pvg610_100		MACH_PVG610		PVG610			2035
+hprw6815		MACH_HPRW6815		HPRW6815		2036
+omap3_oswald		MACH_OMAP3_OSWALD	OMAP3_OSWALD		2037
+nas4220b		MACH_NAS4220B		NAS4220B		2038
+htcraphael_cdma		MACH_HTCRAPHAEL_CDMA	HTCRAPHAEL_CDMA		2039
+htcdiamond_cdma		MACH_HTCDIAMOND_CDMA	HTCDIAMOND_CDMA		2040
+scaler			MACH_SCALER		SCALER			2041
+zylonite2		MACH_ZYLONITE2		ZYLONITE2		2042
+aspenite		MACH_ASPENITE		ASPENITE		2043
+teton			MACH_TETON		TETON			2044
+ttc_dkb			MACH_TTC_DKB		TTC_DKB			2045
+bishop2			MACH_BISHOP2		BISHOP2			2046
+ippv5			MACH_IPPV5		IPPV5			2047
+farm926			MACH_FARM926		FARM926			2048
+mmccpu			MACH_MMCCPU		MMCCPU			2049
+sgmsfl			MACH_SGMSFL		SGMSFL			2050
+tt8000			MACH_TT8000		TT8000			2051
+zrn4300lp		MACH_ZRN4300LP		ZRN4300LP		2052
+mptc			MACH_MPTC		MPTC			2053
+h6051			MACH_H6051		H6051			2054
+pvg610_101		MACH_PVG610_101		PVG610_101		2055
+stamp9261_pc_evb	MACH_STAMP9261_PC_EVB	STAMP9261_PC_EVB	2056
+pelco_odysseus		MACH_PELCO_ODYSSEUS	PELCO_ODYSSEUS		2057
+tny_a9260		MACH_TNY_A9260		TNY_A9260		2058
+tny_a9g20		MACH_TNY_A9G20		TNY_A9G20		2059
+aesop_mp2530f		MACH_AESOP_MP2530F	AESOP_MP2530F		2060
+dx900			MACH_DX900		DX900			2061
+cpodc2			MACH_CPODC2		CPODC2			2062
+tilt_8925		MACH_TILT_8925		TILT_8925		2063
+davinci_dm357_evm	MACH_DAVINCI_DM357_EVM	DAVINCI_DM357_EVM	2064
+swordfish		MACH_SWORDFISH		SWORDFISH		2065
+corvus			MACH_CORVUS		CORVUS			2066
+taurus			MACH_TAURUS		TAURUS			2067
+axm			MACH_AXM		AXM			2068
+axc			MACH_AXC		AXC			2069
+baby			MACH_BABY		BABY			2070
+mp200			MACH_MP200		MP200			2071
+pcm043			MACH_PCM043		PCM043			2072
+hanlin_v3c		MACH_HANLIN_V3C		HANLIN_V3C		2073
+kbk9g20			MACH_KBK9G20		KBK9G20			2074
+adsturbog5		MACH_ADSTURBOG5		ADSTURBOG5		2075
+avenger_lite1		MACH_AVENGER_LITE1	AVENGER_LITE1		2076
+suc82x			MACH_SUC		SUC			2077
+at91sam7s256		MACH_AT91SAM7S256	AT91SAM7S256		2078
+mendoza			MACH_MENDOZA		MENDOZA			2079
+kira			MACH_KIRA		KIRA			2080
+mx1hbm			MACH_MX1HBM		MX1HBM			2081
+quatro43xx		MACH_QUATRO43XX		QUATRO43XX		2082
+quatro4230		MACH_QUATRO4230		QUATRO4230		2083
+nsb400			MACH_NSB400		NSB400			2084
+drp255			MACH_DRP255		DRP255			2085
+thoth			MACH_THOTH		THOTH			2086
+firestone		MACH_FIRESTONE		FIRESTONE		2087
+asusp750		MACH_ASUSP750		ASUSP750		2088
+ctera_dl		MACH_CTERA_DL		CTERA_DL		2089
+socr			MACH_SOCR		SOCR			2090
+htcoxygen		MACH_HTCOXYGEN		HTCOXYGEN		2091
+heroc			MACH_HEROC		HEROC			2092
+zeno6800		MACH_ZENO6800		ZENO6800		2093
+sc2mcs			MACH_SC2MCS		SC2MCS			2094
+gene100			MACH_GENE100		GENE100			2095
+as353x			MACH_AS353X		AS353X			2096
+sheevaplug		MACH_SHEEVAPLUG		SHEEVAPLUG		2097
+at91sam9g20		MACH_AT91SAM9G20	AT91SAM9G20		2098
+mv88f6192gtw_fe		MACH_MV88F6192GTW_FE	MV88F6192GTW_FE		2099
+cc9200			MACH_CC9200		CC9200			2100
+sm9200			MACH_SM9200		SM9200			2101
+tp9200			MACH_TP9200		TP9200			2102
+snapperdv		MACH_SNAPPERDV		SNAPPERDV		2103
+avengers_lite		MACH_AVENGERS_LITE	AVENGERS_LITE		2104
+avengers_lite1		MACH_AVENGERS_LITE1	AVENGERS_LITE1		2105
+omap3axon		MACH_OMAP3AXON		OMAP3AXON		2106
+ma8xx			MACH_MA8XX		MA8XX			2107
+mp201ek			MACH_MP201EK		MP201EK			2108
+davinci_tux		MACH_DAVINCI_TUX	DAVINCI_TUX		2109
+mpa1600			MACH_MPA1600		MPA1600			2110
+pelco_troy		MACH_PELCO_TROY		PELCO_TROY		2111
+nsb667			MACH_NSB667		NSB667			2112
+rovers5_4mpix		MACH_ROVERS5_4MPIX	ROVERS5_4MPIX		2113
+twocom			MACH_TWOCOM		TWOCOM			2114
+ubisys_p9_rcu3r2	MACH_UBISYS_P9_RCU3R2	UBISYS_P9_RCU3R2	2115
+hero_espresso		MACH_HERO_ESPRESSO	HERO_ESPRESSO		2116
+afeusb			MACH_AFEUSB		AFEUSB			2117
+t830			MACH_T830		T830			2118
+spd8020_cc		MACH_SPD8020_CC		SPD8020_CC		2119
+om_3d7k			MACH_OM_3D7K		OM_3D7K			2120
+picocom2		MACH_PICOCOM2		PICOCOM2		2121
+uwg4mx27		MACH_UWG4MX27		UWG4MX27		2122
+uwg4mx31		MACH_UWG4MX31		UWG4MX31		2123
+cherry			MACH_CHERRY		CHERRY			2124
+mx51_babbage		MACH_MX51_BABBAGE	MX51_BABBAGE		2125
+s3c2440turkiye		MACH_S3C2440TURKIYE	S3C2440TURKIYE		2126
+tx37			MACH_TX37		TX37			2127
+sbc2800_9g20		MACH_SBC2800_9G20	SBC2800_9G20		2128
+benzglb			MACH_BENZGLB		BENZGLB			2129
+benztd			MACH_BENZTD		BENZTD			2130
+cartesio_plus		MACH_CARTESIO_PLUS	CARTESIO_PLUS		2131
+solrad_g20		MACH_SOLRAD_G20		SOLRAD_G20		2132
+mx27wallace		MACH_MX27WALLACE	MX27WALLACE		2133
+fmzwebmodul		MACH_FMZWEBMODUL	FMZWEBMODUL		2134
+rd78x00_masa		MACH_RD78X00_MASA	RD78X00_MASA		2135
+smallogger		MACH_SMALLOGGER		SMALLOGGER		2136
+ccw9p9215		MACH_CCW9P9215		CCW9P9215		2137
+dm355_leopard		MACH_DM355_LEOPARD	DM355_LEOPARD		2138
+ts219			MACH_TS219		TS219			2139
+tny_a9263		MACH_TNY_A9263		TNY_A9263		2140
+apollo			MACH_APOLLO		APOLLO			2141
+at91cap9stk		MACH_AT91CAP9STK	AT91CAP9STK		2142
+spc300			MACH_SPC300		SPC300			2143
+eko			MACH_EKO		EKO			2144
+ccw9m2443		MACH_CCW9M2443		CCW9M2443		2145
+ccw9m2443js		MACH_CCW9M2443JS	CCW9M2443JS		2146
+m2m_router_device	MACH_M2M_ROUTER_DEVICE	M2M_ROUTER_DEVICE	2147
+str9104nas		MACH_STAR9104NAS	STAR9104NAS		2148
+pca100			MACH_PCA100		PCA100			2149
+z3_dm365_mod_01		MACH_Z3_DM365_MOD_01	Z3_DM365_MOD_01		2150
+hipox			MACH_HIPOX		HIPOX			2151
+omap3_piteds		MACH_OMAP3_PITEDS	OMAP3_PITEDS		2152
+bm150r			MACH_BM150R		BM150R			2153
+tbone			MACH_TBONE		TBONE			2154
+merlin			MACH_MERLIN		MERLIN			2155
+falcon			MACH_FALCON		FALCON			2156
+davinci_da850_evm	MACH_DAVINCI_DA850_EVM	DAVINCI_DA850_EVM	2157
+s5p6440			MACH_S5P6440		S5P6440			2158
+at91sam9g10ek		MACH_AT91SAM9G10EK	AT91SAM9G10EK		2159
+omap_4430sdp		MACH_OMAP_4430SDP	OMAP_4430SDP		2160
+lpc313x			MACH_LPC313X		LPC313X			2161
+magx_zn5		MACH_MAGX_ZN5		MAGX_ZN5		2162
+magx_em30		MACH_MAGX_EM30		MAGX_EM30		2163
+magx_ve66		MACH_MAGX_VE66		MAGX_VE66		2164
+meesc			MACH_MEESC		MEESC			2165
+otc570			MACH_OTC570		OTC570			2166
+bcu2412			MACH_BCU2412		BCU2412			2167
+beacon			MACH_BEACON		BEACON			2168
+actia_tgw		MACH_ACTIA_TGW		ACTIA_TGW		2169
+e4430			MACH_E4430		E4430			2170
+ql300			MACH_QL300		QL300			2171
+btmavb101		MACH_BTMAVB101		BTMAVB101		2172
+btmawb101		MACH_BTMAWB101		BTMAWB101		2173
+sq201			MACH_SQ201		SQ201			2174
+quatro45xx		MACH_QUATRO45XX		QUATRO45XX		2175
+openpad			MACH_OPENPAD		OPENPAD			2176
+tx25			MACH_TX25		TX25			2177
+omap3_torpedo		MACH_OMAP3_TORPEDO	OMAP3_TORPEDO		2178
+htcraphael_k		MACH_HTCRAPHAEL_K	HTCRAPHAEL_K		2179
+lal43			MACH_LAL43		LAL43			2181
+htcraphael_cdma500	MACH_HTCRAPHAEL_CDMA500	HTCRAPHAEL_CDMA500	2182
+anw6410			MACH_ANW6410		ANW6410			2183
+htcprophet		MACH_HTCPROPHET		HTCPROPHET		2185
+cfa_10022		MACH_CFA_10022		CFA_10022		2186
+imx27_visstrim_m10	MACH_IMX27_VISSTRIM_M10	IMX27_VISSTRIM_M10	2187
+px2imx27		MACH_PX2IMX27		PX2IMX27		2188
+stm3210e_eval		MACH_STM3210E_EVAL	STM3210E_EVAL		2189
+dvs10			MACH_DVS10		DVS10			2190
+portuxg20		MACH_PORTUXG20		PORTUXG20		2191
+arm_spv			MACH_ARM_SPV		ARM_SPV			2192
+smdkc110		MACH_SMDKC110		SMDKC110		2193
+cabespresso		MACH_CABESPRESSO	CABESPRESSO		2194
+hmc800			MACH_HMC800		HMC800			2195
+sholes			MACH_SHOLES		SHOLES			2196
+btmxc31			MACH_BTMXC31		BTMXC31			2197
+dt501			MACH_DT501		DT501			2198
+ktx			MACH_KTX		KTX			2199
+omap3517evm		MACH_OMAP3517EVM	OMAP3517EVM		2200
+netspace_v2		MACH_NETSPACE_V2	NETSPACE_V2		2201
+netspace_max_v2		MACH_NETSPACE_MAX_V2	NETSPACE_MAX_V2		2202
+d2net_v2		MACH_D2NET_V2		D2NET_V2		2203
+net2big_v2		MACH_NET2BIG_V2		NET2BIG_V2		2204
+net4big_v2		MACH_NET4BIG_V2		NET4BIG_V2		2205
+net5big_v2		MACH_NET5BIG_V2		NET5BIG_V2		2206
+endb2443		MACH_ENDB2443		ENDB2443		2207
+inetspace_v2		MACH_INETSPACE_V2	INETSPACE_V2		2208
+tros			MACH_TROS		TROS			2209
+pelco_homer		MACH_PELCO_HOMER	PELCO_HOMER		2210
+ofsp8			MACH_OFSP8		OFSP8			2211
+at91sam9g45ekes		MACH_AT91SAM9G45EKES	AT91SAM9G45EKES		2212
+guf_cupid		MACH_GUF_CUPID		GUF_CUPID		2213
+eab1r			MACH_EAB1R		EAB1R			2214
+desirec			MACH_DESIREC		DESIREC			2215
+cordoba			MACH_CORDOBA		CORDOBA			2216
+irvine			MACH_IRVINE		IRVINE			2217
+sff772			MACH_SFF772		SFF772			2218
+pelco_milano		MACH_PELCO_MILANO	PELCO_MILANO		2219
+pc7302			MACH_PC7302		PC7302			2220
+bip6000			MACH_BIP6000		BIP6000			2221
+silvermoon		MACH_SILVERMOON		SILVERMOON		2222
+vc0830			MACH_VC0830		VC0830			2223
+dt430			MACH_DT430		DT430			2224
+ji42pf			MACH_JI42PF		JI42PF			2225
+gnet_ksm		MACH_GNET_KSM		GNET_KSM		2226
+gnet_sgm		MACH_GNET_SGM		GNET_SGM		2227
+gnet_sgr		MACH_GNET_SGR		GNET_SGR		2228
+omap3_icetekevm		MACH_OMAP3_ICETEKEVM	OMAP3_ICETEKEVM		2229
+pnp			MACH_PNP		PNP			2230
+ctera_2bay_k		MACH_CTERA_2BAY_K	CTERA_2BAY_K		2231
+ctera_2bay_u		MACH_CTERA_2BAY_U	CTERA_2BAY_U		2232
+sas_c			MACH_SAS_C		SAS_C			2233
+vma2315			MACH_VMA2315		VMA2315			2234
+vcs			MACH_VCS		VCS			2235
+spear600		MACH_SPEAR600		SPEAR600		2236
+spear300		MACH_SPEAR300		SPEAR300		2237
+spear1300		MACH_SPEAR1300		SPEAR1300		2238
+lilly1131		MACH_LILLY1131		LILLY1131		2239
+arvoo_ax301		MACH_ARVOO_AX301	ARVOO_AX301		2240
+mapphone		MACH_MAPPHONE		MAPPHONE		2241
+legend			MACH_LEGEND		LEGEND			2242
+salsa			MACH_SALSA		SALSA			2243
+lounge			MACH_LOUNGE		LOUNGE			2244
+vision			MACH_VISION		VISION			2245
+vmb20			MACH_VMB20		VMB20			2246
+hy2410			MACH_HY2410		HY2410			2247
+hy9315			MACH_HY9315		HY9315			2248
+bullwinkle		MACH_BULLWINKLE		BULLWINKLE		2249
+arm_ultimator2		MACH_ARM_ULTIMATOR2	ARM_ULTIMATOR2		2250
+vs_v210			MACH_VS_V210		VS_V210			2252
+vs_v212			MACH_VS_V212		VS_V212			2253
+hmt			MACH_HMT		HMT			2254
+km_kirkwood		MACH_KM_KIRKWOOD	KM_KIRKWOOD		2255
+vesper			MACH_VESPER		VESPER			2256
+str9			MACH_STR9		STR9			2257
+omap3_wl_ff		MACH_OMAP3_WL_FF	OMAP3_WL_FF		2258
+simcom			MACH_SIMCOM		SIMCOM			2259
+mcwebio			MACH_MCWEBIO		MCWEBIO			2260
+omap3_phrazer		MACH_OMAP3_PHRAZER	OMAP3_PHRAZER		2261
+darwin			MACH_DARWIN		DARWIN			2262
+oratiscomu		MACH_ORATISCOMU		ORATISCOMU		2263
+rtsbc20			MACH_RTSBC20		RTSBC20			2264
+sgh_i780		MACH_I780		I780			2265
+gemini324		MACH_GEMINI324		GEMINI324		2266
+oratislan		MACH_ORATISLAN		ORATISLAN		2267
+oratisalog		MACH_ORATISALOG		ORATISALOG		2268
+oratismadi		MACH_ORATISMADI		ORATISMADI		2269
+oratisot16		MACH_ORATISOT16		ORATISOT16		2270
+oratisdesk		MACH_ORATISDESK		ORATISDESK		2271
+vexpress		MACH_VEXPRESS		VEXPRESS		2272
+sintexo			MACH_SINTEXO		SINTEXO			2273
+cm3389			MACH_CM3389		CM3389			2274
+omap3_cio		MACH_OMAP3_CIO		OMAP3_CIO		2275
+sgh_i900		MACH_SGH_I900		SGH_I900		2276
+bst100			MACH_BST100		BST100			2277
+passion			MACH_PASSION		PASSION			2278
+indesign_at91sam	MACH_INDESIGN_AT91SAM	INDESIGN_AT91SAM	2279
+c4_badger		MACH_C4_BADGER		C4_BADGER		2280
+c4_viper		MACH_C4_VIPER		C4_VIPER		2281
+d2net			MACH_D2NET		D2NET			2282
+bigdisk			MACH_BIGDISK		BIGDISK			2283
+notalvision		MACH_NOTALVISION	NOTALVISION		2284
+omap3_kboc		MACH_OMAP3_KBOC		OMAP3_KBOC		2285
+cyclone			MACH_CYCLONE		CYCLONE			2286
+ninja			MACH_NINJA		NINJA			2287
+at91sam9g20ek_2mmc	MACH_AT91SAM9G20EK_2MMC	AT91SAM9G20EK_2MMC	2288
+bcmring			MACH_BCMRING		BCMRING			2289
+resol_dl2		MACH_RESOL_DL2		RESOL_DL2		2290
+ifosw			MACH_IFOSW		IFOSW			2291
+htcrhodium		MACH_HTCRHODIUM		HTCRHODIUM		2292
+htctopaz		MACH_HTCTOPAZ		HTCTOPAZ		2293
+matrix504		MACH_MATRIX504		MATRIX504		2294
+mrfsa			MACH_MRFSA		MRFSA			2295
+sc_p270			MACH_SC_P270		SC_P270			2296
+atlas5_evb		MACH_ATLAS5_EVB		ATLAS5_EVB		2297
+pelco_lobox		MACH_PELCO_LOBOX	PELCO_LOBOX		2298
+dilax_pcu200		MACH_DILAX_PCU200	DILAX_PCU200		2299
+leonardo		MACH_LEONARDO		LEONARDO		2300
+zoran_approach7		MACH_ZORAN_APPROACH7	ZORAN_APPROACH7		2301
+dp6xx			MACH_DP6XX		DP6XX			2302
+bcm2153_vesper		MACH_BCM2153_VESPER	BCM2153_VESPER		2303
+mahimahi		MACH_MAHIMAHI		MAHIMAHI		2304
+clickc			MACH_CLICKC		CLICKC			2305
+zb_gateway		MACH_ZB_GATEWAY		ZB_GATEWAY		2306
+tazcard			MACH_TAZCARD		TAZCARD			2307
+tazdev			MACH_TAZDEV		TAZDEV			2308
+annax_cb_arm		MACH_ANNAX_CB_ARM	ANNAX_CB_ARM		2309
+annax_dm3		MACH_ANNAX_DM3		ANNAX_DM3		2310
+cerebric		MACH_CEREBRIC		CEREBRIC		2311
+orca			MACH_ORCA		ORCA			2312
+pc9260			MACH_PC9260		PC9260			2313
+ems285a			MACH_EMS285A		EMS285A			2314
+gec2410			MACH_GEC2410		GEC2410			2315
+gec2440			MACH_GEC2440		GEC2440			2316
+mw903			MACH_ARCH_MW903		ARCH_MW903		2317
+mw2440			MACH_MW2440		MW2440			2318
+ecac2378		MACH_ECAC2378		ECAC2378		2319
+tazkiosk		MACH_TAZKIOSK		TAZKIOSK		2320
+whiterabbit_mch		MACH_WHITERABBIT_MCH	WHITERABBIT_MCH		2321
+sbox9263		MACH_SBOX9263		SBOX9263		2322
+smdk6442		MACH_SMDK6442		SMDK6442		2324
+openrd_base		MACH_OPENRD_BASE	OPENRD_BASE		2325
+incredible		MACH_INCREDIBLE		INCREDIBLE		2326
+incrediblec		MACH_INCREDIBLEC	INCREDIBLEC		2327
+heroct			MACH_HEROCT		HEROCT			2328
+mmnet1000		MACH_MMNET1000		MMNET1000		2329
+devkit8000		MACH_DEVKIT8000		DEVKIT8000		2330
+devkit9000		MACH_DEVKIT9000		DEVKIT9000		2331
+mx31txtr		MACH_MX31TXTR		MX31TXTR		2332
+u380			MACH_U380		U380			2333
+oamp3_hualu		MACH_HUALU_BOARD	HUALU_BOARD		2334
+npcmx50			MACH_NPCMX50		NPCMX50			2335
+mx51_efikamx		MACH_MX51_EFIKAMX	MX51_EFIKAMX		2336
+mx51_lange52		MACH_MX51_LANGE52	MX51_LANGE52		2337
+riom			MACH_RIOM		RIOM			2338
+comcas			MACH_COMCAS		COMCAS			2339
+wsi_mx27		MACH_WSI_MX27		WSI_MX27		2340
+cm_t35			MACH_CM_T35		CM_T35			2341
+net2big			MACH_NET2BIG		NET2BIG			2342
+motorola_a1600		MACH_MOTOROLA_A1600	MOTOROLA_A1600		2343
+igep0020		MACH_IGEP0020		IGEP0020		2344
+igep0010		MACH_IGEP0010		IGEP0010		2345
+mv6281gtwge2		MACH_MV6281GTWGE2	MV6281GTWGE2		2346
+scat100			MACH_SCAT100		SCAT100			2347
+sanmina			MACH_SANMINA		SANMINA			2348
+momento			MACH_MOMENTO		MOMENTO			2349
+nuc9xx			MACH_NUC9XX		NUC9XX			2350
+nuc910evb		MACH_NUC910EVB		NUC910EVB		2351
+nuc920evb		MACH_NUC920EVB		NUC920EVB		2352
+nuc950evb		MACH_NUC950EVB		NUC950EVB		2353
+nuc945evb		MACH_NUC945EVB		NUC945EVB		2354
+nuc960evb		MACH_NUC960EVB		NUC960EVB		2355
+nuc932evb		MACH_NUC932EVB		NUC932EVB		2356
+nuc900			MACH_NUC900		NUC900			2357
+sd1soc			MACH_SD1SOC		SD1SOC			2358
+ln2440bc		MACH_LN2440BC		LN2440BC		2359
+rsbc			MACH_RSBC		RSBC			2360
+openrd_client		MACH_OPENRD_CLIENT	OPENRD_CLIENT		2361
+hpipaq11x		MACH_HPIPAQ11X		HPIPAQ11X		2362
+wayland			MACH_WAYLAND		WAYLAND			2363
+acnbsx102		MACH_ACNBSX102		ACNBSX102		2364
+hwat91			MACH_HWAT91		HWAT91			2365
+at91sam9263cs		MACH_AT91SAM9263CS	AT91SAM9263CS		2366
+csb732			MACH_CSB732		CSB732			2367
+u8500			MACH_U8500		U8500			2368
+huqiu			MACH_HUQIU		HUQIU			2369
+mx51_efikasb		MACH_MX51_EFIKASB	MX51_EFIKASB		2370
+pmt1g			MACH_PMT1G		PMT1G			2371
+htcelf			MACH_HTCELF		HTCELF			2372
+armadillo420		MACH_ARMADILLO420	ARMADILLO420		2373
+armadillo440		MACH_ARMADILLO440	ARMADILLO440		2374
+u_chip_dual_arm		MACH_U_CHIP_DUAL_ARM	U_CHIP_DUAL_ARM		2375
+csr_bdb3		MACH_CSR_BDB3		CSR_BDB3		2376
+dolby_cat1018		MACH_DOLBY_CAT1018	DOLBY_CAT1018		2377
+hy9307			MACH_HY9307		HY9307			2378
+aspire_easystore	MACH_A_ES		A_ES			2379
+davinci_irif		MACH_DAVINCI_IRIF	DAVINCI_IRIF		2380
+agama9263		MACH_AGAMA9263		AGAMA9263		2381
+marvell_jasper		MACH_MARVELL_JASPER	MARVELL_JASPER		2382
+flint			MACH_FLINT		FLINT			2383
+tavorevb3		MACH_TAVOREVB3		TAVOREVB3		2384
+sch_m490		MACH_SCH_M490		SCH_M490		2386
+rbl01			MACH_RBL01		RBL01			2387
+omnifi			MACH_OMNIFI		OMNIFI			2388
+otavalo			MACH_OTAVALO		OTAVALO			2389
+htc_excalibur_s620	MACH_HTC_EXCALIBUR_S620	HTC_EXCALIBUR_S620	2391
+htc_opal		MACH_HTC_OPAL		HTC_OPAL		2392
+touchbook		MACH_TOUCHBOOK		TOUCHBOOK		2393
+latte			MACH_LATTE		LATTE			2394
+xa200			MACH_XA200		XA200			2395
+nimrod			MACH_NIMROD		NIMROD			2396
+cc9p9215_3g		MACH_CC9P9215_3G	CC9P9215_3G		2397
+cc9p9215_3gjs		MACH_CC9P9215_3GJS	CC9P9215_3GJS		2398
+tk71			MACH_TK71		TK71			2399
+comham3525		MACH_COMHAM3525		COMHAM3525		2400
+mx31erebus		MACH_MX31EREBUS		MX31EREBUS		2401
+mcardmx27		MACH_MCARDMX27		MCARDMX27		2402
+paradise		MACH_PARADISE		PARADISE		2403
+tide			MACH_TIDE		TIDE			2404
+wzl2440			MACH_WZL2440		WZL2440			2405
+sdrdemo			MACH_SDRDEMO		SDRDEMO			2406
+ethercan2		MACH_ETHERCAN2		ETHERCAN2		2407
+ecmimg20		MACH_ECMIMG20		ECMIMG20		2408
+omap_dragon		MACH_OMAP_DRAGON	OMAP_DRAGON		2409
+halo			MACH_HALO		HALO			2410
+huangshan		MACH_HUANGSHAN		HUANGSHAN		2411
+vl_ma2sc		MACH_VL_MA2SC		VL_MA2SC		2412
+raumfeld_rc		MACH_RAUMFELD_RC	RAUMFELD_RC		2413
+raumfeld_connector	MACH_RAUMFELD_CONNECTOR	RAUMFELD_CONNECTOR	2414
+raumfeld_speaker	MACH_RAUMFELD_SPEAKER	RAUMFELD_SPEAKER	2415
+multibus_master		MACH_MULTIBUS_MASTER	MULTIBUS_MASTER		2416
+multibus_pbk		MACH_MULTIBUS_PBK	MULTIBUS_PBK		2417
+tnetv107x		MACH_TNETV107X		TNETV107X		2418
+snake			MACH_SNAKE		SNAKE			2419
+cwmx27			MACH_CWMX27		CWMX27			2420
+sch_m480		MACH_SCH_M480		SCH_M480		2421
+platypus		MACH_PLATYPUS		PLATYPUS		2422
+pss2			MACH_PSS2		PSS2			2423
+davinci_apm150		MACH_DAVINCI_APM150	DAVINCI_APM150		2424
+str9100			MACH_STR9100		STR9100			2425
+net5big			MACH_NET5BIG		NET5BIG			2426
+seabed9263		MACH_SEABED9263		SEABED9263		2427
+mx51_m2id		MACH_MX51_M2ID		MX51_M2ID		2428
+octvocplus_eb		MACH_OCTVOCPLUS_EB	OCTVOCPLUS_EB		2429
+klk_firefox		MACH_KLK_FIREFOX	KLK_FIREFOX		2430
+klk_wirma_module	MACH_KLK_WIRMA_MODULE	KLK_WIRMA_MODULE	2431
+klk_wirma_mmi		MACH_KLK_WIRMA_MMI	KLK_WIRMA_MMI		2432
+supersonic		MACH_SUPERSONIC		SUPERSONIC		2433
+liberty			MACH_LIBERTY		LIBERTY			2434
+mh355			MACH_MH355		MH355			2435
+pc7802			MACH_PC7802		PC7802			2436
+gnet_sgc		MACH_GNET_SGC		GNET_SGC		2437
+einstein15		MACH_EINSTEIN15		EINSTEIN15		2438
+cmpd			MACH_CMPD		CMPD			2439
+davinci_hase1		MACH_DAVINCI_HASE1	DAVINCI_HASE1		2440
+lgeincitephone		MACH_LGEINCITEPHONE	LGEINCITEPHONE		2441
+ea313x			MACH_EA313X		EA313X			2442
+fwbd_39064		MACH_FWBD_39064		FWBD_39064		2443
+fwbd_390128		MACH_FWBD_390128	FWBD_390128		2444
+pelco_moe		MACH_PELCO_MOE		PELCO_MOE		2445
+minimix27		MACH_MINIMIX27		MINIMIX27		2446
+omap3_thunder		MACH_OMAP3_THUNDER	OMAP3_THUNDER		2447
+passionc		MACH_PASSIONC		PASSIONC		2448
+mx27amata		MACH_MX27AMATA		MX27AMATA		2449
+bgat1			MACH_BGAT1		BGAT1			2450
+buzz			MACH_BUZZ		BUZZ			2451
+mb9g20			MACH_MB9G20		MB9G20			2452
+yushan			MACH_YUSHAN		YUSHAN			2453
+lizard			MACH_LIZARD		LIZARD			2454
+omap3polycom		MACH_OMAP3POLYCOM	OMAP3POLYCOM		2455
+smdkv210		MACH_SMDKV210		SMDKV210		2456
+bravo			MACH_BRAVO		BRAVO			2457
+siogentoo1		MACH_SIOGENTOO1		SIOGENTOO1		2458
+siogentoo2		MACH_SIOGENTOO2		SIOGENTOO2		2459
+sm3k			MACH_SM3K		SM3K			2460
+acer_tempo_f900		MACH_ACER_TEMPO_F900	ACER_TEMPO_F900		2461
+glittertind		MACH_GLITTERTIND	GLITTERTIND		2463
+omap_zoom3		MACH_OMAP_ZOOM3		OMAP_ZOOM3		2464
+omap_3630sdp		MACH_OMAP_3630SDP	OMAP_3630SDP		2465
+cybook2440		MACH_CYBOOK2440		CYBOOK2440		2466
+torino_s		MACH_TORINO_S		TORINO_S		2467
+havana			MACH_HAVANA		HAVANA			2468
+beaumont_11		MACH_BEAUMONT_11	BEAUMONT_11		2469
+vanguard		MACH_VANGUARD		VANGUARD		2470
+s5pc110_draco		MACH_S5PC110_DRACO	S5PC110_DRACO		2471
+cartesio_two		MACH_CARTESIO_TWO	CARTESIO_TWO		2472
+aster			MACH_ASTER		ASTER			2473
+voguesv210		MACH_VOGUESV210		VOGUESV210		2474
+acm500x			MACH_ACM500X		ACM500X			2475
+km9260			MACH_KM9260		KM9260			2476
+nideflexg1		MACH_NIDEFLEXG1		NIDEFLEXG1		2477
+ctera_plug_io		MACH_CTERA_PLUG_IO	CTERA_PLUG_IO		2478
+smartq7			MACH_SMARTQ7		SMARTQ7			2479
+at91sam9g10ek2		MACH_AT91SAM9G10EK2	AT91SAM9G10EK2		2480
+asusp527		MACH_ASUSP527		ASUSP527		2481
+at91sam9g20mpm2		MACH_AT91SAM9G20MPM2	AT91SAM9G20MPM2		2482
+topasa900		MACH_TOPASA900		TOPASA900		2483
+electrum_100		MACH_ELECTRUM_100	ELECTRUM_100		2484
+mx51grb			MACH_MX51GRB		MX51GRB			2485
+xea300			MACH_XEA300		XEA300			2486
+htcstartrek		MACH_HTCSTARTREK	HTCSTARTREK		2487
+lima			MACH_LIMA		LIMA			2488
+csb740			MACH_CSB740		CSB740			2489
+usb_s8815		MACH_USB_S8815		USB_S8815		2490
+watson_efm_plugin	MACH_WATSON_EFM_PLUGIN	WATSON_EFM_PLUGIN	2491
+milkyway		MACH_MILKYWAY		MILKYWAY		2492
+g4evm			MACH_G4EVM		G4EVM			2493
+picomod6		MACH_PICOMOD6		PICOMOD6		2494
+omapl138_hawkboard	MACH_OMAPL138_HAWKBOARD	OMAPL138_HAWKBOARD	2495
+ip6000			MACH_IP6000		IP6000			2496
+ip6010			MACH_IP6010		IP6010			2497
+utm400			MACH_UTM400		UTM400			2498
+omap3_zybex		MACH_OMAP3_ZYBEX	OMAP3_ZYBEX		2499
+wireless_space		MACH_WIRELESS_SPACE	WIRELESS_SPACE		2500
+sx560			MACH_SX560		SX560			2501
+ts41x			MACH_TS41X		TS41X			2502
+elphel10373		MACH_ELPHEL10373	ELPHEL10373		2503
+rhobot			MACH_RHOBOT		RHOBOT			2504
+mx51_refresh		MACH_MX51_REFRESH	MX51_REFRESH		2505
+ls9260			MACH_LS9260		LS9260			2506
+shank			MACH_SHANK		SHANK			2507
+qsd8x50_st1		MACH_QSD8X50_ST1	QSD8X50_ST1		2508
+at91sam9m10ekes		MACH_AT91SAM9M10EKES	AT91SAM9M10EKES		2509
+hiram			MACH_HIRAM		HIRAM			2510
+phy3250			MACH_PHY3250		PHY3250			2511
+ea3250			MACH_EA3250		EA3250			2512
+fdi3250			MACH_FDI3250		FDI3250			2513
+at91sam9263nit		MACH_AT91SAM9263NIT	AT91SAM9263NIT		2515
+ccmx51			MACH_CCMX51		CCMX51			2516
+ccmx51js		MACH_CCMX51JS		CCMX51JS		2517
+ccwmx51			MACH_CCWMX51		CCWMX51			2518
+ccwmx51js		MACH_CCWMX51JS		CCWMX51JS		2519
+mini6410		MACH_MINI6410		MINI6410		2520
+tiny6410		MACH_TINY6410		TINY6410		2521
+nano6410		MACH_NANO6410		NANO6410		2522
+at572d940hfnldb		MACH_AT572D940HFNLDB	AT572D940HFNLDB		2523
+htcleo			MACH_HTCLEO		HTCLEO			2524
+avp13			MACH_AVP13		AVP13			2525
+xxsvideod		MACH_XXSVIDEOD		XXSVIDEOD		2526
+vpnext			MACH_VPNEXT		VPNEXT			2527
+swarco_itc3		MACH_SWARCO_ITC3	SWARCO_ITC3		2528
+tx51			MACH_TX51		TX51			2529
+dolby_cat1021		MACH_DOLBY_CAT1021	DOLBY_CAT1021		2530
+mx28evk			MACH_MX28EVK		MX28EVK			2531
+phoenix260		MACH_PHOENIX260		PHOENIX260		2532
+uvaca_stork		MACH_UVACA_STORK	UVACA_STORK		2533
+smartq5			MACH_SMARTQ5		SMARTQ5			2534
+all3078			MACH_ALL3078		ALL3078			2535
+ctera_2bay_ds		MACH_CTERA_2BAY_DS	CTERA_2BAY_DS		2536
+siogentoo3		MACH_SIOGENTOO3		SIOGENTOO3		2537
+epb5000			MACH_EPB5000		EPB5000			2538
+hy9263			MACH_HY9263		HY9263			2539
+acer_tempo_m900		MACH_ACER_TEMPO_M900	ACER_TEMPO_M900		2540
+acer_tempo_dx650	MACH_ACER_TEMPO_DX900	ACER_TEMPO_DX900	2541
+acer_tempo_x960		MACH_ACER_TEMPO_X960	ACER_TEMPO_X960		2542
+acer_eten_v900		MACH_ACER_ETEN_V900	ACER_ETEN_V900		2543
+acer_eten_x900		MACH_ACER_ETEN_X900	ACER_ETEN_X900		2544
+bonnell			MACH_BONNELL		BONNELL			2545
+oht_mx27		MACH_OHT_MX27		OHT_MX27		2546
+htcquartz		MACH_HTCQUARTZ		HTCQUARTZ		2547
+davinci_dm6467tevm	MACH_DAVINCI_DM6467TEVM	DAVINCI_DM6467TEVM	2548
+c3ax03			MACH_C3AX03		C3AX03			2549
+mxt_td60		MACH_MXT_TD60		MXT_TD60		2550
+esyx			MACH_ESYX		ESYX			2551
+dove_db2		MACH_DOVE_DB2		DOVE_DB2		2552
+bulldog			MACH_BULLDOG		BULLDOG			2553
+derell_me2000		MACH_DERELL_ME2000	DERELL_ME2000		2554
+bcmring_base		MACH_BCMRING_BASE	BCMRING_BASE		2555
+bcmring_evm		MACH_BCMRING_EVM	BCMRING_EVM		2556
+bcmring_evm_jazz	MACH_BCMRING_EVM_JAZZ	BCMRING_EVM_JAZZ	2557
+bcmring_sp		MACH_BCMRING_SP		BCMRING_SP		2558
+bcmring_sv		MACH_BCMRING_SV		BCMRING_SV		2559
+bcmring_sv_jazz		MACH_BCMRING_SV_JAZZ	BCMRING_SV_JAZZ		2560
+bcmring_tablet		MACH_BCMRING_TABLET	BCMRING_TABLET		2561
+bcmring_vp		MACH_BCMRING_VP		BCMRING_VP		2562
+bcmring_evm_seikor	MACH_BCMRING_EVM_SEIKOR	BCMRING_EVM_SEIKOR	2563
+bcmring_sp_wqvga	MACH_BCMRING_SP_WQVGA	BCMRING_SP_WQVGA	2564
+bcmring_custom		MACH_BCMRING_CUSTOM	BCMRING_CUSTOM		2565
+acer_s200		MACH_ACER_S200		ACER_S200		2566
+bt270			MACH_BT270		BT270			2567
+iseo			MACH_ISEO		ISEO			2568
+cezanne			MACH_CEZANNE		CEZANNE			2569
+lucca			MACH_LUCCA		LUCCA			2570
+supersmart		MACH_SUPERSMART		SUPERSMART		2571
+arm11_board		MACH_CS_MISANO		CS_MISANO		2572
+magnolia2		MACH_MAGNOLIA2		MAGNOLIA2		2573
+emxx			MACH_EMXX		EMXX			2574
+outlaw			MACH_OUTLAW		OUTLAW			2575
+riot_bei2		MACH_RIOT_BEI2		RIOT_BEI2		2576
+riot_gx2		MACH_RIOT_VOX		RIOT_VOX		2577
+riot_x37		MACH_RIOT_X37		RIOT_X37		2578
+mega25mx		MACH_MEGA25MX		MEGA25MX		2579
+benzina2		MACH_BENZINA2		BENZINA2		2580
+ignite			MACH_IGNITE		IGNITE			2581
+foggia			MACH_FOGGIA		FOGGIA			2582
+arezzo			MACH_AREZZO		AREZZO			2583
+leica_skywalker		MACH_LEICA_SKYWALKER	LEICA_SKYWALKER		2584
+jacinto2_jamr		MACH_JACINTO2_JAMR	JACINTO2_JAMR		2585
+gts_nova		MACH_GTS_NOVA		GTS_NOVA		2586
+p3600			MACH_P3600		P3600			2587
+dlt2			MACH_DLT2		DLT2			2588
+df3120			MACH_DF3120		DF3120			2589
+ecucore_9g20		MACH_ECUCORE_9G20	ECUCORE_9G20		2590
+nautel_am35xx		MACH_NAUTEL_LPC3240	NAUTEL_LPC3240		2591
+glacier			MACH_GLACIER		GLACIER			2592
+phrazer_bulldog		MACH_PHRAZER_BULLDOG	PHRAZER_BULLDOG		2593
+omap3_bulldog		MACH_OMAP3_BULLDOG	OMAP3_BULLDOG		2594
+pca101			MACH_PCA101		PCA101			2595
+buzzc			MACH_BUZZC		BUZZC			2596
+sasie2			MACH_SASIE2		SASIE2			2597
+smartmeter_dl		MACH_SMARTMETER_DL	SMARTMETER_DL		2599
+wzl6410			MACH_WZL6410		WZL6410			2600
+wzl6410m		MACH_WZL6410M		WZL6410M		2601
+wzl6410f		MACH_WZL6410F		WZL6410F		2602
+wzl6410i		MACH_WZL6410I		WZL6410I		2603
+spacecom1		MACH_SPACECOM1		SPACECOM1		2604
+pingu920		MACH_PINGU920		PINGU920		2605
+bravoc			MACH_BRAVOC		BRAVOC			2606
+vdssw			MACH_VDSSW		VDSSW			2608
+romulus			MACH_ROMULUS		ROMULUS			2609
+omap_magic		MACH_OMAP_MAGIC		OMAP_MAGIC		2610
+eltd100			MACH_ELTD100		ELTD100			2611
+capc7117		MACH_CAPC7117		CAPC7117		2612
+swan			MACH_SWAN		SWAN			2613
+veu			MACH_VEU		VEU			2614
+rm2			MACH_RM2		RM2			2615
+tt2100			MACH_TT2100		TT2100			2616
+venice			MACH_VENICE		VENICE			2617
+pc7323			MACH_PC7323		PC7323			2618
+masp			MACH_MASP		MASP			2619
+fujitsu_tvstbsoc0	MACH_FUJITSU_TVSTBSOC	FUJITSU_TVSTBSOC	2620
+fujitsu_tvstbsoc1	MACH_FUJITSU_TVSTBSOC1	FUJITSU_TVSTBSOC1	2621
+lexikon			MACH_LEXIKON		LEXIKON			2622
+mini2440v2		MACH_MINI2440V2		MINI2440V2		2623
+icontrol		MACH_ICONTROL		ICONTROL		2624
+gplugd			MACH_GPLUGD		GPLUGD			2625
+qsd8x50a_st1_1		MACH_QSD8X50A_ST1_1	QSD8X50A_ST1_1		2626
+qsd8x50a_st1_5		MACH_QSD8X50A_ST1_5	QSD8X50A_ST1_5		2627
+bee			MACH_BEE		BEE			2628
+mx23evk			MACH_MX23EVK		MX23EVK			2629
+ap4evb			MACH_AP4EVB		AP4EVB			2630
+stockholm		MACH_STOCKHOLM		STOCKHOLM		2631
+lpc_h3131		MACH_LPC_H3131		LPC_H3131		2632
+stingray		MACH_STINGRAY		STINGRAY		2633
+kraken			MACH_KRAKEN		KRAKEN			2634
+gw2388			MACH_GW2388		GW2388			2635
+jadecpu			MACH_JADECPU		JADECPU			2636
+carlisle		MACH_CARLISLE		CARLISLE		2637
+lux_sf9			MACH_LUX_SF9		LUX_SF9			2638
+nemid_tb		MACH_NEMID_TB		NEMID_TB		2639
+terrier			MACH_TERRIER		TERRIER			2640
+turbot			MACH_TURBOT		TURBOT			2641
+sanddab			MACH_SANDDAB		SANDDAB			2642
+mx35_cicada		MACH_MX35_CICADA	MX35_CICADA		2643
+ghi2703d		MACH_GHI2703D		GHI2703D		2644
+lux_sfx9		MACH_LUX_SFX9		LUX_SFX9		2645
+lux_sf9g		MACH_LUX_SF9G		LUX_SF9G		2646
+lux_edk9		MACH_LUX_EDK9		LUX_EDK9		2647
+hw90240			MACH_HW90240		HW90240			2648
+dm365_leopard		MACH_DM365_LEOPARD	DM365_LEOPARD		2649
+mityomapl138		MACH_MITYOMAPL138	MITYOMAPL138		2650
+scat110			MACH_SCAT110		SCAT110			2651
+acer_a1			MACH_ACER_A1		ACER_A1			2652
+cmcontrol		MACH_CMCONTROL		CMCONTROL		2653
+pelco_lamar		MACH_PELCO_LAMAR	PELCO_LAMAR		2654
+rfp43			MACH_RFP43		RFP43			2655
+sk86r0301		MACH_SK86R0301		SK86R0301		2656
+ctpxa			MACH_CTPXA		CTPXA			2657
+epb_arm9_a		MACH_EPB_ARM9_A		EPB_ARM9_A		2658
+guruplug		MACH_GURUPLUG		GURUPLUG		2659
+spear310		MACH_SPEAR310		SPEAR310		2660
+spear320		MACH_SPEAR320		SPEAR320		2661
+robotx			MACH_ROBOTX		ROBOTX			2662
+lsxhl			MACH_LSXHL		LSXHL			2663
+smartlite		MACH_SMARTLITE		SMARTLITE		2664
+cws2			MACH_CWS2		CWS2			2665
+m619			MACH_M619		M619			2666
+smartview		MACH_SMARTVIEW		SMARTVIEW		2667
+lsa_salsa		MACH_LSA_SALSA		LSA_SALSA		2668
+kizbox			MACH_KIZBOX		KIZBOX			2669
+htccharmer		MACH_HTCCHARMER		HTCCHARMER		2670
+guf_neso_lt		MACH_GUF_NESO_LT	GUF_NESO_LT		2671
+pm9g45			MACH_PM9G45		PM9G45			2672
+htcpanther		MACH_HTCPANTHER		HTCPANTHER		2673
+htcpanther_cdma		MACH_HTCPANTHER_CDMA	HTCPANTHER_CDMA		2674
+reb01			MACH_REB01		REB01			2675
+aquila			MACH_AQUILA		AQUILA			2676
+spark_sls_hw2		MACH_SPARK_SLS_HW2	SPARK_SLS_HW2		2677
+esata_sheevaplug	MACH_ESATA_SHEEVAPLUG	ESATA_SHEEVAPLUG	2678
+msm7x30_surf		MACH_MSM7X30_SURF	MSM7X30_SURF		2679
+micro2440		MACH_MICRO2440		MICRO2440		2680
+am2440			MACH_AM2440		AM2440			2681
+tq2440			MACH_TQ2440		TQ2440			2682
+ea2478devkit		MACH_EA2478DEVKIT	EA2478DEVKIT		2683
+ak880x			MACH_AK880X		AK880X			2684
+cobra3530		MACH_COBRA3530		COBRA3530		2685
+pmppb			MACH_PMPPB		PMPPB			2686
+u6715			MACH_U6715		U6715			2687
+axar1500_sender		MACH_AXAR1500_SENDER	AXAR1500_SENDER		2688
+g30_dvb			MACH_G30_DVB		G30_DVB			2689
+vc088x			MACH_VC088X		VC088X			2690
+mioa702			MACH_MIOA702		MIOA702			2691
+hpmin			MACH_HPMIN		HPMIN			2692
+ak880xak		MACH_AK880XAK		AK880XAK		2693
+arm926tomap850		MACH_ARM926TOMAP850	ARM926TOMAP850		2694
+lkevm			MACH_LKEVM		LKEVM			2695
+mw6410			MACH_MW6410		MW6410			2696
+terastation_wxl		MACH_TERASTATION_WXL	TERASTATION_WXL		2697
+cpu8000e		MACH_CPU8000E		CPU8000E		2698
+tokyo			MACH_TOKYO		TOKYO			2700
+msm7201a_surf		MACH_MSM7201A_SURF	MSM7201A_SURF		2701
+msm7201a_ffa		MACH_MSM7201A_FFA	MSM7201A_FFA		2702
+msm7x25_surf		MACH_MSM7X25_SURF	MSM7X25_SURF		2703
+msm7x25_ffa		MACH_MSM7X25_FFA	MSM7X25_FFA		2704
+msm7x27_surf		MACH_MSM7X27_SURF	MSM7X27_SURF		2705
+msm7x27_ffa		MACH_MSM7X27_FFA	MSM7X27_FFA		2706
+msm7x30_ffa		MACH_MSM7X30_FFA	MSM7X30_FFA		2707
+qsd8x50_surf		MACH_QSD8X50_SURF	QSD8X50_SURF		2708
+qsd8x50_comet		MACH_QSD8X50_COMET	QSD8X50_COMET		2709
+qsd8x50_ffa		MACH_QSD8X50_FFA	QSD8X50_FFA		2710
+qsd8x50a_surf		MACH_QSD8X50A_SURF	QSD8X50A_SURF		2711
+qsd8x50a_ffa		MACH_QSD8X50A_FFA	QSD8X50A_FFA		2712
+adx_xgcp10		MACH_ADX_XGCP10		ADX_XGCP10		2713
+mcgwumts2a		MACH_MCGWUMTS2A		MCGWUMTS2A		2714
+mobikt			MACH_MOBIKT		MOBIKT			2715
+mx53_evk		MACH_MX53_EVK		MX53_EVK		2716
+igep0030		MACH_IGEP0030		IGEP0030		2717
+axell_h40_h50_ctrl	MACH_AXELL_H40_H50_CTRL	AXELL_H40_H50_CTRL	2718
+dtcommod		MACH_DTCOMMOD		DTCOMMOD		2719
+gould			MACH_GOULD		GOULD			2720
+siberia			MACH_SIBERIA		SIBERIA			2721
+sbc3530			MACH_SBC3530		SBC3530			2722
+qarm			MACH_QARM		QARM			2723
+mips			MACH_MIPS		MIPS			2724
+mx27grb			MACH_MX27GRB		MX27GRB			2725
+sbc8100			MACH_SBC8100		SBC8100			2726
+saarb			MACH_SAARB		SAARB			2727
+omap3mini		MACH_OMAP3MINI		OMAP3MINI		2728
+cnmbook7se		MACH_CNMBOOK7SE		CNMBOOK7SE		2729
+catan			MACH_CATAN		CATAN			2730
+harmony			MACH_HARMONY		HARMONY			2731
+tonga			MACH_TONGA		TONGA			2732
+cybook_orizon		MACH_CYBOOK_ORIZON	CYBOOK_ORIZON		2733
+htcrhodiumcdma		MACH_HTCRHODIUMCDMA	HTCRHODIUMCDMA		2734
+epc_g45			MACH_EPC_G45		EPC_G45			2735
+epc_lpc3250		MACH_EPC_LPC3250	EPC_LPC3250		2736
+mxc91341evb		MACH_MXC91341EVB	MXC91341EVB		2737
+rtw1000			MACH_RTW1000		RTW1000			2738
+bobcat			MACH_BOBCAT		BOBCAT			2739
+trizeps6		MACH_TRIZEPS6		TRIZEPS6		2740
+msm7x30_fluid		MACH_MSM7X30_FLUID	MSM7X30_FLUID		2741
+nedap9263		MACH_NEDAP9263		NEDAP9263		2742
+netgear_ms2110		MACH_NETGEAR_MS2110	NETGEAR_MS2110		2743
+bmx			MACH_BMX		BMX			2744
+netstream		MACH_NETSTREAM		NETSTREAM		2745
+vpnext_rcu		MACH_VPNEXT_RCU		VPNEXT_RCU		2746
+vpnext_mpu		MACH_VPNEXT_MPU		VPNEXT_MPU		2747
+bcmring_tablet_v1	MACH_BCMRING_TABLET_V1	BCMRING_TABLET_V1	2748
+sgarm10			MACH_SGARM10		SGARM10			2749
+cm_t3517		MACH_CM_T3517		CM_T3517		2750
+dig297			MACH_OMAP3_CPS		OMAP3_CPS		2751
+axar1500_receiver	MACH_AXAR1500_RECEIVER	AXAR1500_RECEIVER	2752
+wbd222			MACH_WBD222		WBD222			2753
+mt65xx			MACH_MT65XX		MT65XX			2754
+msm8x60_surf		MACH_MSM8X60_SURF	MSM8X60_SURF		2755
+msm8x60_sim		MACH_MSM8X60_SIM	MSM8X60_SIM		2756
+tcc8000_sdk		MACH_TCC8000_SDK	TCC8000_SDK		2758
+nanos			MACH_NANOS		NANOS			2759
+stamp9g10		MACH_STAMP9G10		STAMP9G10		2760
+stamp9g45		MACH_STAMP9G45		STAMP9G45		2761
+h6053			MACH_H6053		H6053			2762
+smint01			MACH_SMINT01		SMINT01			2763
+prtlvt2			MACH_PRTLVT2		PRTLVT2			2764
+ap420			MACH_AP420		AP420			2765
+davinci_dm365_fc	MACH_DAVINCI_DM365_FC	DAVINCI_DM365_FC	2767
+msm8x55_surf		MACH_MSM8X55_SURF	MSM8X55_SURF		2768
+msm8x55_ffa		MACH_MSM8X55_FFA	MSM8X55_FFA		2769
+esl_vamana		MACH_ESL_VAMANA		ESL_VAMANA		2770
+sbc35			MACH_SBC35		SBC35			2771
+mpx6446			MACH_MPX6446		MPX6446			2772
+oreo_controller		MACH_OREO_CONTROLLER	OREO_CONTROLLER		2773
+kopin_models		MACH_KOPIN_MODELS	KOPIN_MODELS		2774
+ttc_vision2		MACH_TTC_VISION2	TTC_VISION2		2775
+cns3420vb		MACH_CNS3420VB		CNS3420VB		2776
+lpc_evo			MACH_LPC2		LPC2			2777
+olympus			MACH_OLYMPUS		OLYMPUS			2778
+vortex			MACH_VORTEX		VORTEX			2779
+s5pc200			MACH_S5PC200		S5PC200			2780
+ecucore_9263		MACH_ECUCORE_9263	ECUCORE_9263		2781
+smdkc200		MACH_SMDKC200		SMDKC200		2782
+emsiso_sx27		MACH_EMSISO_SX27	EMSISO_SX27		2783
+apx_som9g45_ek		MACH_APX_SOM9G45_EK	APX_SOM9G45_EK		2784
+songshan		MACH_SONGSHAN		SONGSHAN		2785
+tianshan		MACH_TIANSHAN		TIANSHAN		2786
+vpx500			MACH_VPX500		VPX500			2787
+am3517sam		MACH_AM3517SAM		AM3517SAM		2788
+skat91_sim508		MACH_SKAT91_SIM508	SKAT91_SIM508		2789
+skat91_s3e		MACH_SKAT91_S3E		SKAT91_S3E		2790
+omap4_panda		MACH_OMAP4_PANDA	OMAP4_PANDA		2791
+df7220			MACH_DF7220		DF7220			2792
+nemini			MACH_NEMINI		NEMINI			2793
+t8200			MACH_T8200		T8200			2794
+apf51			MACH_APF51		APF51			2795
+dr_rc_unit		MACH_DR_RC_UNIT		DR_RC_UNIT		2796
+bordeaux		MACH_BORDEAUX		BORDEAUX		2797
+catania_b		MACH_CATANIA_B		CATANIA_B		2798
+mx51_ocean		MACH_MX51_OCEAN		MX51_OCEAN		2799
+ti8168evm		MACH_TI8168EVM		TI8168EVM		2800
+neocoreomap		MACH_NEOCOREOMAP	NEOCOREOMAP		2801
+withings_wbp		MACH_WITHINGS_WBP	WITHINGS_WBP		2802
+dbps			MACH_DBPS		DBPS			2803
+pcbfp0001		MACH_PCBFP0001		PCBFP0001		2805
+speedy			MACH_SPEEDY		SPEEDY			2806
+chrysaor		MACH_CHRYSAOR		CHRYSAOR		2807
+tango			MACH_TANGO		TANGO			2808
+synology_dsx11		MACH_SYNOLOGY_DSX11	SYNOLOGY_DSX11		2809
+hanlin_v3ext		MACH_HANLIN_V3EXT	HANLIN_V3EXT		2810
+hanlin_v5		MACH_HANLIN_V5		HANLIN_V5		2811
+hanlin_v3plus		MACH_HANLIN_V3PLUS	HANLIN_V3PLUS		2812
+iriver_story		MACH_IRIVER_STORY	IRIVER_STORY		2813
+irex_iliad		MACH_IREX_ILIAD		IREX_ILIAD		2814
+irex_dr1000		MACH_IREX_DR1000	IREX_DR1000		2815
+teton_bga		MACH_TETON_BGA		TETON_BGA		2816
+snapper9g45		MACH_SNAPPER9G45	SNAPPER9G45		2817
+tam3517			MACH_TAM3517		TAM3517			2818
+pdc100			MACH_PDC100		PDC100			2819
+eukrea_cpuimx25sd	MACH_EUKREA_CPUIMX25SD	EUKREA_CPUIMX25SD	2820
+eukrea_cpuimx35sd	MACH_EUKREA_CPUIMX35SD	EUKREA_CPUIMX35SD	2821
+eukrea_cpuimx51sd	MACH_EUKREA_CPUIMX51SD	EUKREA_CPUIMX51SD	2822
+eukrea_cpuimx51		MACH_EUKREA_CPUIMX51	EUKREA_CPUIMX51		2823
+p565			MACH_P565		P565			2824
+acer_a4			MACH_ACER_A4		ACER_A4			2825
+davinci_dm368_bip	MACH_DAVINCI_DM368_BIP	DAVINCI_DM368_BIP	2826
+eshare			MACH_ESHARE		ESHARE			2827
+wlbargn			MACH_WLBARGN		WLBARGN			2829
+bm170			MACH_BM170		BM170			2830
+netspace_mini_v2	MACH_NETSPACE_MINI_V2	NETSPACE_MINI_V2	2831
+netspace_plug_v2	MACH_NETSPACE_PLUG_V2	NETSPACE_PLUG_V2	2832
+siemens_l1		MACH_SIEMENS_L1		SIEMENS_L1		2833
+elv_lcu1		MACH_ELV_LCU1		ELV_LCU1		2834
+mcu1			MACH_MCU1		MCU1			2835
+omap3_tao3530		MACH_OMAP3_TAO3530	OMAP3_TAO3530		2836
+omap3_pcutouch		MACH_OMAP3_PCUTOUCH	OMAP3_PCUTOUCH		2837
+smdkc210		MACH_SMDKC210		SMDKC210		2838
+omap3_braillo		MACH_OMAP3_BRAILLO	OMAP3_BRAILLO		2839
+spyplug			MACH_SPYPLUG		SPYPLUG			2840
+ginger			MACH_GINGER		GINGER			2841
+tny_t3530		MACH_TNY_T3530		TNY_T3530		2842
+pcaal1			MACH_PCAAL1		PCAAL1			2843
+spade			MACH_SPADE		SPADE			2844
+mxc25_topaz		MACH_MXC25_TOPAZ	MXC25_TOPAZ		2845
+t5325			MACH_T5325		T5325			2846
+gw2361			MACH_GW2361		GW2361			2847
+elog			MACH_ELOG		ELOG			2848
+income			MACH_INCOME		INCOME			2849
+bcm589x			MACH_BCM589X		BCM589X			2850
+etna			MACH_ETNA		ETNA			2851
+hawks			MACH_HAWKS		HAWKS			2852
+meson			MACH_MESON		MESON			2853
+xsbase255		MACH_XSBASE255		XSBASE255		2854
+pvm2030			MACH_PVM2030		PVM2030			2855
+mioa502			MACH_MIOA502		MIOA502			2856
+vvbox_sdorig2		MACH_VVBOX_SDORIG2	VVBOX_SDORIG2		2857
+vvbox_sdlite2		MACH_VVBOX_SDLITE2	VVBOX_SDLITE2		2858
+vvbox_sdpro4		MACH_VVBOX_SDPRO4	VVBOX_SDPRO4		2859
+htc_spv_m700		MACH_HTC_SPV_M700	HTC_SPV_M700		2860
+mx257sx			MACH_MX257SX		MX257SX			2861
+goni			MACH_GONI		GONI			2862
+msm8x55_svlte_ffa	MACH_MSM8X55_SVLTE_FFA	MSM8X55_SVLTE_FFA	2863
+msm8x55_svlte_surf	MACH_MSM8X55_SVLTE_SURF	MSM8X55_SVLTE_SURF	2864
+quickstep		MACH_QUICKSTEP		QUICKSTEP		2865
+dmw96			MACH_DMW96		DMW96			2866
+hammerhead		MACH_HAMMERHEAD		HAMMERHEAD		2867
+trident			MACH_TRIDENT		TRIDENT			2868
+lightning		MACH_LIGHTNING		LIGHTNING		2869
+iconnect		MACH_ICONNECT		ICONNECT		2870
+autobot			MACH_AUTOBOT		AUTOBOT			2871
+coconut			MACH_COCONUT		COCONUT			2872
+durian			MACH_DURIAN		DURIAN			2873
+cayenne			MACH_CAYENNE		CAYENNE			2874
+fuji			MACH_FUJI		FUJI			2875
+synology_6282		MACH_SYNOLOGY_6282	SYNOLOGY_6282		2876
+em1sy			MACH_EM1SY		EM1SY			2877
+m502			MACH_M502		M502			2878
+matrix518		MACH_MATRIX518		MATRIX518		2879
+tiny_gurnard		MACH_TINY_GURNARD	TINY_GURNARD		2880
+spear1310		MACH_SPEAR1310		SPEAR1310		2881
+bv07			MACH_BV07		BV07			2882
+mxt_td61		MACH_MXT_TD61		MXT_TD61		2883
+openrd_ultimate		MACH_OPENRD_ULTIMATE	OPENRD_ULTIMATE		2884
+devixp			MACH_DEVIXP		DEVIXP			2885
+miccpt			MACH_MICCPT		MICCPT			2886
+mic256			MACH_MIC256		MIC256			2887
+as1167			MACH_AS1167		AS1167			2888
+omap3_ibiza		MACH_OMAP3_IBIZA	OMAP3_IBIZA		2889
+u5500			MACH_U5500		U5500			2890
+davinci_picto		MACH_DAVINCI_PICTO	DAVINCI_PICTO		2891
+mecha			MACH_MECHA		MECHA			2892
+bubba3			MACH_BUBBA3		BUBBA3			2893
+pupitre			MACH_PUPITRE		PUPITRE			2894
+tegra_vogue		MACH_TEGRA_VOGUE	TEGRA_VOGUE		2896
+tegra_e1165		MACH_TEGRA_E1165	TEGRA_E1165		2897
+simplenet		MACH_SIMPLENET		SIMPLENET		2898
+ec4350tbm		MACH_EC4350TBM		EC4350TBM		2899
+pec_tc			MACH_PEC_TC		PEC_TC			2900
+pec_hc2			MACH_PEC_HC2		PEC_HC2			2901
+esl_mobilis_a		MACH_ESL_MOBILIS_A	ESL_MOBILIS_A		2902
+esl_mobilis_b		MACH_ESL_MOBILIS_B	ESL_MOBILIS_B		2903
+esl_wave_a		MACH_ESL_WAVE_A		ESL_WAVE_A		2904
+esl_wave_b		MACH_ESL_WAVE_B		ESL_WAVE_B		2905
+unisense_mmm		MACH_UNISENSE_MMM	UNISENSE_MMM		2906
+blueshark		MACH_BLUESHARK		BLUESHARK		2907
+e10			MACH_E10		E10			2908
+app3k_robin		MACH_APP3K_ROBIN	APP3K_ROBIN		2909
+pov15hd			MACH_POV15HD		POV15HD			2910
+stella			MACH_STELLA		STELLA			2911
+linkstation_lschl	MACH_LINKSTATION_LSCHL	LINKSTATION_LSCHL	2913
+netwalker		MACH_NETWALKER		NETWALKER		2914
+acsx106			MACH_ACSX106		ACSX106			2915
+atlas5_c1		MACH_ATLAS5_C1		ATLAS5_C1		2916
+nsb3ast			MACH_NSB3AST		NSB3AST			2917
+gnet_slc		MACH_GNET_SLC		GNET_SLC		2918
+af4000			MACH_AF4000		AF4000			2919
+ark9431			MACH_ARK9431		ARK9431			2920
+fs_s5pc100		MACH_FS_S5PC100		FS_S5PC100		2921
+omap3505nova8		MACH_OMAP3505NOVA8	OMAP3505NOVA8		2922
+omap3621_edp1		MACH_OMAP3621_EDP1	OMAP3621_EDP1		2923
+oratisaes		MACH_ORATISAES		ORATISAES		2924
+smdkv310		MACH_SMDKV310		SMDKV310		2925
+siemens_l0		MACH_SIEMENS_L0		SIEMENS_L0		2926
+ventana			MACH_VENTANA		VENTANA			2927
+wm8505_7in_netbook	MACH_WM8505_7IN_NETBOOK	WM8505_7IN_NETBOOK	2928
+ec4350sdb		MACH_EC4350SDB		EC4350SDB		2929
+mimas			MACH_MIMAS		MIMAS			2930
+titan			MACH_TITAN		TITAN			2931
+craneboard		MACH_CRANEBOARD		CRANEBOARD		2932
+es2440			MACH_ES2440		ES2440			2933
+najay_a9263		MACH_NAJAY_A9263	NAJAY_A9263		2934
+htctornado		MACH_HTCTORNADO		HTCTORNADO		2935
+dimm_mx257		MACH_DIMM_MX257		DIMM_MX257		2936
+jigen301		MACH_JIGEN		JIGEN			2937
+smdk6450		MACH_SMDK6450		SMDK6450		2938
+meno_qng		MACH_MENO_QNG		MENO_QNG		2939
+ns2416			MACH_NS2416		NS2416			2940
+rpc353			MACH_RPC353		RPC353			2941
+tq6410			MACH_TQ6410		TQ6410			2942
+sky6410			MACH_SKY6410		SKY6410			2943
+dynasty			MACH_DYNASTY		DYNASTY			2944
+vivo			MACH_VIVO		VIVO			2945
+bury_bl7582		MACH_BURY_BL7582	BURY_BL7582		2946
+bury_bps5270		MACH_BURY_BPS5270	BURY_BPS5270		2947
+basi			MACH_BASI		BASI			2948
+tn200			MACH_TN200		TN200			2949
+c2mmi			MACH_C2MMI		C2MMI			2950
+meson_6236m		MACH_MESON_6236M	MESON_6236M		2951
+meson_8626m		MACH_MESON_8626M	MESON_8626M		2952
+tube			MACH_TUBE		TUBE			2953
+messina			MACH_MESSINA		MESSINA			2954
+mx50_arm2		MACH_MX50_ARM2		MX50_ARM2		2955
+cetus9263		MACH_CETUS9263		CETUS9263		2956
+brownstone		MACH_BROWNSTONE		BROWNSTONE		2957
+vmx25			MACH_VMX25		VMX25			2958
+vmx51			MACH_VMX51		VMX51			2959
+abacus			MACH_ABACUS		ABACUS			2960
+cm4745			MACH_CM4745		CM4745			2961
+oratislink		MACH_ORATISLINK		ORATISLINK		2962
+davinci_dm365_dvr	MACH_DAVINCI_DM365_DVR	DAVINCI_DM365_DVR	2963
+netviz			MACH_NETVIZ		NETVIZ			2964
+flexibity		MACH_FLEXIBITY		FLEXIBITY		2965
+wlan_computer		MACH_WLAN_COMPUTER	WLAN_COMPUTER		2966
+lpc24xx			MACH_LPC24XX		LPC24XX			2967
+spica			MACH_SPICA		SPICA			2968
+gpsdisplay		MACH_GPSDISPLAY		GPSDISPLAY		2969
+bipnet			MACH_BIPNET		BIPNET			2970
+overo_ctu_inertial	MACH_OVERO_CTU_INERTIAL	OVERO_CTU_INERTIAL	2971
+davinci_dm355_mmm	MACH_DAVINCI_DM355_MMM	DAVINCI_DM355_MMM	2972
+pc9260_v2		MACH_PC9260_V2		PC9260_V2		2973
+ptx7545			MACH_PTX7545		PTX7545			2974
+tm_efdc			MACH_TM_EFDC		TM_EFDC			2975
+omap3_waldo1		MACH_OMAP3_WALDO1	OMAP3_WALDO1		2977
+flyer			MACH_FLYER		FLYER			2978
+tornado3240		MACH_TORNADO3240	TORNADO3240		2979
+soli_01			MACH_SOLI_01		SOLI_01			2980
+omapl138_europalc	MACH_OMAPL138_EUROPALC	OMAPL138_EUROPALC	2981
+helios_v1		MACH_HELIOS_V1		HELIOS_V1		2982
+netspace_lite_v2	MACH_NETSPACE_LITE_V2	NETSPACE_LITE_V2	2983
+ssc			MACH_SSC		SSC			2984
+premierwave_en		MACH_PREMIERWAVE_EN	PREMIERWAVE_EN		2985
+wasabi			MACH_WASABI		WASABI			2986
+mx50_rdp		MACH_MX50_RDP		MX50_RDP		2988
+universal_c210		MACH_UNIVERSAL_C210	UNIVERSAL_C210		2989
+real6410		MACH_REAL6410		REAL6410		2990
+spx_sakura		MACH_SPX_SAKURA		SPX_SAKURA		2991
+ij3k_2440		MACH_IJ3K_2440		IJ3K_2440		2992
+omap3_bc10		MACH_OMAP3_BC10		OMAP3_BC10		2993
+thebe			MACH_THEBE		THEBE			2994
+rv082			MACH_RV082		RV082			2995
+armlguest		MACH_ARMLGUEST		ARMLGUEST		2996
+tjinc1000		MACH_TJINC1000		TJINC1000		2997
+dockstar		MACH_DOCKSTAR		DOCKSTAR		2998
+ax8008			MACH_AX8008		AX8008			2999
+gnet_sgce		MACH_GNET_SGCE		GNET_SGCE		3000
+pxwnas_500_1000		MACH_PXWNAS_500_1000	PXWNAS_500_1000		3001
+ea20			MACH_EA20		EA20			3002
+awm2			MACH_AWM2		AWM2			3003
+ti8148evm		MACH_TI8148EVM		TI8148EVM		3004
+seaboard		MACH_SEABOARD		SEABOARD		3005
+linkstation_chlv2	MACH_LINKSTATION_CHLV2	LINKSTATION_CHLV2	3006
+tera_pro2_rack		MACH_TERA_PRO2_RACK	TERA_PRO2_RACK		3007
+rubys			MACH_RUBYS		RUBYS			3008
+aquarius		MACH_AQUARIUS		AQUARIUS		3009
+mx53_ard		MACH_MX53_ARD		MX53_ARD		3010
+mx53_smd		MACH_MX53_SMD		MX53_SMD		3011
+lswxl			MACH_LSWXL		LSWXL			3012
+dove_avng_v3		MACH_DOVE_AVNG_V3	DOVE_AVNG_V3		3013
+sdi_ess_9263		MACH_SDI_ESS_9263	SDI_ESS_9263		3014
+jocpu550		MACH_JOCPU550		JOCPU550		3015
+msm8x60_rumi3		MACH_MSM8X60_RUMI3	MSM8X60_RUMI3		3016
+msm8x60_ffa		MACH_MSM8X60_FFA	MSM8X60_FFA		3017
+yanomami		MACH_YANOMAMI		YANOMAMI		3018
+gta04			MACH_GTA04		GTA04			3019
+cm_a510			MACH_CM_A510		CM_A510			3020
+omap3_rfs200		MACH_OMAP3_RFS200	OMAP3_RFS200		3021
+kx33xx			MACH_KX33XX		KX33XX			3022
+ptx7510			MACH_PTX7510		PTX7510			3023
+top9000			MACH_TOP9000		TOP9000			3024
+teenote			MACH_TEENOTE		TEENOTE			3025
+ts3			MACH_TS3		TS3			3026
+a0			MACH_A0			A0			3027
+fsm9xxx_surf		MACH_FSM9XXX_SURF	FSM9XXX_SURF		3028
+fsm9xxx_ffa		MACH_FSM9XXX_FFA	FSM9XXX_FFA		3029
+frrhwcdma60w		MACH_FRRHWCDMA60W	FRRHWCDMA60W		3030
+remus			MACH_REMUS		REMUS			3031
+at91cap7xdk		MACH_AT91CAP7XDK	AT91CAP7XDK		3032
+at91cap7stk		MACH_AT91CAP7STK	AT91CAP7STK		3033
+kt_sbc_sam9_1		MACH_KT_SBC_SAM9_1	KT_SBC_SAM9_1		3034
+armada_xp_db		MACH_ARMADA_XP_DB	ARMADA_XP_DB		3036
+spdm			MACH_SPDM		SPDM			3037
+gtib			MACH_GTIB		GTIB			3038
+dgm3240			MACH_DGM3240		DGM3240			3039
+htcmega			MACH_HTCMEGA		HTCMEGA			3041
+tricorder		MACH_TRICORDER		TRICORDER		3042
+tx28			MACH_TX28		TX28			3043
+bstbrd			MACH_BSTBRD		BSTBRD			3044
+pwb3090			MACH_PWB3090		PWB3090			3045
+idea6410		MACH_IDEA6410		IDEA6410		3046
+qbc9263			MACH_QBC9263		QBC9263			3047
+borabora		MACH_BORABORA		BORABORA		3048
+valdez			MACH_VALDEZ		VALDEZ			3049
+ls9g20			MACH_LS9G20		LS9G20			3050
+mios_v1			MACH_MIOS_V1		MIOS_V1			3051
+s5pc110_crespo		MACH_S5PC110_CRESPO	S5PC110_CRESPO		3052
+controltek9g20		MACH_CONTROLTEK9G20	CONTROLTEK9G20		3053
+tin307			MACH_TIN307		TIN307			3054
+tin510			MACH_TIN510		TIN510			3055
+ep3505			MACH_EP3517		EP3517			3056
+bluecheese		MACH_BLUECHEESE		BLUECHEESE		3057
+tem3x30			MACH_TEM3X30		TEM3X30			3058
+harvest_desoto		MACH_HARVEST_DESOTO	HARVEST_DESOTO		3059
+msm8x60_qrdc		MACH_MSM8X60_QRDC	MSM8X60_QRDC		3060
+spear900		MACH_SPEAR900		SPEAR900		3061
+pcontrol_g20		MACH_PCONTROL_G20	PCONTROL_G20		3062
+rdstor			MACH_RDSTOR		RDSTOR			3063
+usdloader		MACH_USDLOADER		USDLOADER		3064
+tsoploader		MACH_TSOPLOADER		TSOPLOADER		3065
+kronos			MACH_KRONOS		KRONOS			3066
+ffcore			MACH_FFCORE		FFCORE			3067
+mone			MACH_MONE		MONE			3068
+unit2s			MACH_UNIT2S		UNIT2S			3069
+acer_a5			MACH_ACER_A5		ACER_A5			3070
+etherpro_isp		MACH_ETHERPRO_ISP	ETHERPRO_ISP		3071
+stretchs7000		MACH_STRETCHS7000	STRETCHS7000		3072
+p87_smartsim		MACH_P87_SMARTSIM	P87_SMARTSIM		3073
+tulip			MACH_TULIP		TULIP			3074
+sunflower		MACH_SUNFLOWER		SUNFLOWER		3075
+rib			MACH_RIB		RIB			3076
+clod			MACH_CLOD		CLOD			3077
+rump			MACH_RUMP		RUMP			3078
+tenderloin		MACH_TENDERLOIN		TENDERLOIN		3079
+shortloin		MACH_SHORTLOIN		SHORTLOIN		3080
+antares			MACH_ANTARES		ANTARES			3082
+wb40n			MACH_WB40N		WB40N			3083
+herring			MACH_HERRING		HERRING			3084
+naxy400			MACH_NAXY400		NAXY400			3085
+naxy1200		MACH_NAXY1200		NAXY1200		3086
+vpr200			MACH_VPR200		VPR200			3087
+bug20			MACH_BUG20		BUG20			3088
+goflexnet		MACH_GOFLEXNET		GOFLEXNET		3089
+torbreck		MACH_TORBRECK		TORBRECK		3090
+saarb_mg1		MACH_SAARB_MG1		SAARB_MG1		3091
+callisto		MACH_CALLISTO		CALLISTO		3092
+multhsu			MACH_MULTHSU		MULTHSU			3093
+saluda			MACH_SALUDA		SALUDA			3094
+pemp_omap3_apollo	MACH_PEMP_OMAP3_APOLLO	PEMP_OMAP3_APOLLO	3095
+vc0718			MACH_VC0718		VC0718			3096
+mvblx			MACH_MVBLX		MVBLX			3097
+inhand_apeiron		MACH_INHAND_APEIRON	INHAND_APEIRON		3098
+inhand_fury		MACH_INHAND_FURY	INHAND_FURY		3099
+inhand_siren		MACH_INHAND_SIREN	INHAND_SIREN		3100
+hdnvp			MACH_HDNVP		HDNVP			3101
+softwinner		MACH_SOFTWINNER		SOFTWINNER		3102
+prima2_evb		MACH_PRIMA2_EVB		PRIMA2_EVB		3103
+nas6210			MACH_NAS6210		NAS6210			3104
+unisdev			MACH_UNISDEV		UNISDEV			3105
+sbca11			MACH_SBCA11		SBCA11			3106
+saga			MACH_SAGA		SAGA			3107
+ns_k330			MACH_NS_K330		NS_K330			3108
+tanna			MACH_TANNA		TANNA			3109
+imate8502		MACH_IMATE8502		IMATE8502		3110
+aspen			MACH_ASPEN		ASPEN			3111
+daintree_cwac		MACH_DAINTREE_CWAC	DAINTREE_CWAC		3112
+zmx25			MACH_ZMX25		ZMX25			3113
+maple1			MACH_MAPLE1		MAPLE1			3114
+qsd8x72_surf		MACH_QSD8X72_SURF	QSD8X72_SURF		3115
+qsd8x72_ffa		MACH_QSD8X72_FFA	QSD8X72_FFA		3116
+abilene			MACH_ABILENE		ABILENE			3117
+eigen_ttr		MACH_EIGEN_TTR		EIGEN_TTR		3118
+iomega_ix2_200		MACH_IOMEGA_IX2_200	IOMEGA_IX2_200		3119
+coretec_vcx7400		MACH_CORETEC_VCX7400	CORETEC_VCX7400		3120
+santiago		MACH_SANTIAGO		SANTIAGO		3121
+mx257sol		MACH_MX257SOL		MX257SOL		3122
+strasbourg		MACH_STRASBOURG		STRASBOURG		3123
+msm8x60_fluid		MACH_MSM8X60_FLUID	MSM8X60_FLUID		3124
+smartqv5		MACH_SMARTQV5		SMARTQV5		3125
+smartqv3		MACH_SMARTQV3		SMARTQV3		3126
+smartqv7		MACH_SMARTQV7		SMARTQV7		3127
+paz00			MACH_PAZ00		PAZ00			3128
+acmenetusfoxg20		MACH_ACMENETUSFOXG20	ACMENETUSFOXG20		3129
+fwbd_0404		MACH_FWBD_0404		FWBD_0404		3131
+hdgu			MACH_HDGU		HDGU			3132
+pyramid			MACH_PYRAMID		PYRAMID			3133
+epiphan			MACH_EPIPHAN		EPIPHAN			3134
+omap_bender		MACH_OMAP_BENDER	OMAP_BENDER		3135
+gurnard			MACH_GURNARD		GURNARD			3136
+gtl_it5100		MACH_GTL_IT5100		GTL_IT5100		3137
+bcm2708			MACH_BCM2708		BCM2708			3138
+mx51_ggc		MACH_MX51_GGC		MX51_GGC		3139
+sharespace		MACH_SHARESPACE		SHARESPACE		3140
+haba_knx_explorer	MACH_HABA_KNX_EXPLORER	HABA_KNX_EXPLORER	3141
+simtec_kirkmod		MACH_SIMTEC_KIRKMOD	SIMTEC_KIRKMOD		3142
+crux			MACH_CRUX		CRUX			3143
+mx51_bravo		MACH_MX51_BRAVO		MX51_BRAVO		3144
+charon			MACH_CHARON		CHARON			3145
+picocom3		MACH_PICOCOM3		PICOCOM3		3146
+picocom4		MACH_PICOCOM4		PICOCOM4		3147
+serrano			MACH_SERRANO		SERRANO			3148
+doubleshot		MACH_DOUBLESHOT		DOUBLESHOT		3149
+evsy			MACH_EVSY		EVSY			3150
+huashan			MACH_HUASHAN		HUASHAN			3151
+lausanne		MACH_LAUSANNE		LAUSANNE		3152
+emerald			MACH_EMERALD		EMERALD			3153
+tqma35			MACH_TQMA35		TQMA35			3154
+marvel			MACH_MARVEL		MARVEL			3155
+manuae			MACH_MANUAE		MANUAE			3156
+chacha			MACH_CHACHA		CHACHA			3157
+lemon			MACH_LEMON		LEMON			3158
+csc			MACH_CSC		CSC			3159
+gira_knxip_router	MACH_GIRA_KNXIP_ROUTER	GIRA_KNXIP_ROUTER	3160
+t20			MACH_T20		T20			3161
+hdmini			MACH_HDMINI		HDMINI			3162
+sciphone_g2		MACH_SCIPHONE_G2	SCIPHONE_G2		3163
+express			MACH_EXPRESS		EXPRESS			3164
+express_kt		MACH_EXPRESS_KT		EXPRESS_KT		3165
+maximasp		MACH_MAXIMASP		MAXIMASP		3166
+nitrogen_imx51		MACH_NITROGEN_IMX51	NITROGEN_IMX51		3167
+nitrogen_imx53		MACH_NITROGEN_IMX53	NITROGEN_IMX53		3168
+sunfire			MACH_SUNFIRE		SUNFIRE			3169
+arowana			MACH_AROWANA		AROWANA			3170
+tegra_daytona		MACH_TEGRA_DAYTONA	TEGRA_DAYTONA		3171
+tegra_swordfish		MACH_TEGRA_SWORDFISH	TEGRA_SWORDFISH		3172
+edison			MACH_EDISON		EDISON			3173
+svp8500v1		MACH_SVP8500V1		SVP8500V1		3174
+svp8500v2		MACH_SVP8500V2		SVP8500V2		3175
+svp5500			MACH_SVP5500		SVP5500			3176
+b5500			MACH_B5500		B5500			3177
+s5500			MACH_S5500		S5500			3178
+icon			MACH_ICON		ICON			3179
+elephant		MACH_ELEPHANT		ELEPHANT		3180
+shooter			MACH_SHOOTER		SHOOTER			3182
+spade_lte		MACH_SPADE_LTE		SPADE_LTE		3183
+philhwani		MACH_PHILHWANI		PHILHWANI		3184
+gsncomm			MACH_GSNCOMM		GSNCOMM			3185
+strasbourg_a2		MACH_STRASBOURG_A2	STRASBOURG_A2		3186
+mmm			MACH_MMM		MMM			3187
+davinci_dm365_bv	MACH_DAVINCI_DM365_BV	DAVINCI_DM365_BV	3188
+ag5evm			MACH_AG5EVM		AG5EVM			3189
+sc575plc		MACH_SC575PLC		SC575PLC		3190
+sc575hmi		MACH_SC575IPC		SC575IPC		3191
+omap3_tdm3730		MACH_OMAP3_TDM3730	OMAP3_TDM3730		3192
+top9000_eval		MACH_TOP9000_EVAL	TOP9000_EVAL		3194
+top9000_su		MACH_TOP9000_SU		TOP9000_SU		3195
+utm300			MACH_UTM300		UTM300			3196
+tsunagi			MACH_TSUNAGI		TSUNAGI			3197
+ts75xx			MACH_TS75XX		TS75XX			3198
+ts47xx			MACH_TS47XX		TS47XX			3200
+da850_k5		MACH_DA850_K5		DA850_K5		3201
+ax502			MACH_AX502		AX502			3202
+igep0032		MACH_IGEP0032		IGEP0032		3203
+antero			MACH_ANTERO		ANTERO			3204
+synergy			MACH_SYNERGY		SYNERGY			3205
+ics_if_voip		MACH_ICS_IF_VOIP	ICS_IF_VOIP		3206
+wlf_cragg_6410		MACH_WLF_CRAGG_6410	WLF_CRAGG_6410		3207
+punica			MACH_PUNICA		PUNICA			3208
+trimslice		MACH_TRIMSLICE		TRIMSLICE		3209
+mx27_wmultra		MACH_MX27_WMULTRA	MX27_WMULTRA		3210
+mackerel		MACH_MACKEREL		MACKEREL		3211
+fa9x27			MACH_FA9X27		FA9X27			3213
+ns2816tb		MACH_NS2816TB		NS2816TB		3214
+ns2816_ntpad		MACH_NS2816_NTPAD	NS2816_NTPAD		3215
+ns2816_ntnb		MACH_NS2816_NTNB	NS2816_NTNB		3216
+kaen			MACH_KAEN		KAEN			3217
+nv1000			MACH_NV1000		NV1000			3218
+nuc950ts		MACH_NUC950TS		NUC950TS		3219
+nokia_rm680		MACH_NOKIA_RM680	NOKIA_RM680		3220
+ast2200			MACH_AST2200		AST2200			3221
+lead			MACH_LEAD		LEAD			3222
+unino1			MACH_UNINO1		UNINO1			3223
+greeco			MACH_GREECO		GREECO			3224
+verdi			MACH_VERDI		VERDI			3225
+dm6446_adbox		MACH_DM6446_ADBOX	DM6446_ADBOX		3226
+quad_salsa		MACH_QUAD_SALSA		QUAD_SALSA		3227
+abb_gma_1_1		MACH_ABB_GMA_1_1	ABB_GMA_1_1		3228
+svcid			MACH_SVCID		SVCID			3229
+msm8960_sim		MACH_MSM8960_SIM	MSM8960_SIM		3230
+msm8960_rumi3		MACH_MSM8960_RUMI3	MSM8960_RUMI3		3231
+icon_g			MACH_ICON_G		ICON_G			3232
+mb3			MACH_MB3		MB3			3233
+gsia18s			MACH_GSIA18S		GSIA18S			3234
+pivicc			MACH_PIVICC		PIVICC			3235
+pcm048			MACH_PCM048		PCM048			3236
+dds			MACH_DDS		DDS			3237
+chalten_xa1		MACH_CHALTEN_XA1	CHALTEN_XA1		3238
+ts48xx			MACH_TS48XX		TS48XX			3239
+tonga2_tfttimer		MACH_TONGA2_TFTTIMER	TONGA2_TFTTIMER		3240
+whistler		MACH_WHISTLER		WHISTLER		3241
+asl_phoenix		MACH_ASL_PHOENIX	ASL_PHOENIX		3242
+at91sam9263otlite	MACH_AT91SAM9263OTLITE	AT91SAM9263OTLITE	3243
+ddplug			MACH_DDPLUG		DDPLUG			3244
+d2plug			MACH_D2PLUG		D2PLUG			3245
+kzm9d			MACH_KZM9D		KZM9D			3246
+verdi_lte		MACH_VERDI_LTE		VERDI_LTE		3247
+nanozoom		MACH_NANOZOOM		NANOZOOM		3248
+dm3730_som_lv		MACH_DM3730_SOM_LV	DM3730_SOM_LV		3249
+dm3730_torpedo		MACH_DM3730_TORPEDO	DM3730_TORPEDO		3250
+anchovy			MACH_ANCHOVY		ANCHOVY			3251
+re2rev20		MACH_RE2REV20		RE2REV20		3253
+re2rev21		MACH_RE2REV21		RE2REV21		3254
+cns21xx			MACH_CNS21XX		CNS21XX			3255
+rider			MACH_RIDER		RIDER			3257
+nsk330			MACH_NSK330		NSK330			3258
+cns2133evb		MACH_CNS2133EVB		CNS2133EVB		3259
+z3_816x_mod		MACH_Z3_816X_MOD	Z3_816X_MOD		3260
+z3_814x_mod		MACH_Z3_814X_MOD	Z3_814X_MOD		3261
+beect			MACH_BEECT		BEECT			3262
+dma_thunderbug		MACH_DMA_THUNDERBUG	DMA_THUNDERBUG		3263
+omn_at91sam9g20		MACH_OMN_AT91SAM9G20	OMN_AT91SAM9G20		3264
+mx25_e2s_uc		MACH_MX25_E2S_UC	MX25_E2S_UC		3265
+mione			MACH_MIONE		MIONE			3266
+top9000_tcu		MACH_TOP9000_TCU	TOP9000_TCU		3267
+top9000_bsl		MACH_TOP9000_BSL	TOP9000_BSL		3268
+kingdom			MACH_KINGDOM		KINGDOM			3269
+armadillo460		MACH_ARMADILLO460	ARMADILLO460		3270
+lq2			MACH_LQ2		LQ2			3271
+sweda_tms2		MACH_SWEDA_TMS2		SWEDA_TMS2		3272
+mx53_loco		MACH_MX53_LOCO		MX53_LOCO		3273
+acer_a8			MACH_ACER_A8		ACER_A8			3275
+acer_gauguin		MACH_ACER_GAUGUIN	ACER_GAUGUIN		3276
+guppy			MACH_GUPPY		GUPPY			3277
+mx61_ard		MACH_MX61_ARD		MX61_ARD		3278
+tx53			MACH_TX53		TX53			3279
+omapl138_case_a3	MACH_OMAPL138_CASE_A3	OMAPL138_CASE_A3	3280
+uemd			MACH_UEMD		UEMD			3281
+ccwmx51mut		MACH_CCWMX51MUT		CCWMX51MUT		3282
+rockhopper		MACH_ROCKHOPPER		ROCKHOPPER		3283
+encore			MACH_ENCORE		ENCORE			3284
+hkdkc100		MACH_HKDKC100		HKDKC100		3285
+ts42xx			MACH_TS42XX		TS42XX			3286
+aebl			MACH_AEBL		AEBL			3287
+wario			MACH_WARIO		WARIO			3288
+gfs_spm			MACH_GFS_SPM		GFS_SPM			3289
+cm_t3730		MACH_CM_T3730		CM_T3730		3290
+isc3			MACH_ISC3		ISC3			3291
+rascal			MACH_RASCAL		RASCAL			3292
+hrefv60			MACH_HREFV60		HREFV60			3293
+tpt_2_0			MACH_TPT_2_0		TPT_2_0			3294
+pydtd			MACH_PYRAMID_TD		PYRAMID_TD		3295
+splendor		MACH_SPLENDOR		SPLENDOR		3296
+guf_vincell		MACH_GUF_PLANET		GUF_PLANET		3297
+msm8x60_qt		MACH_MSM8X60_QT		MSM8X60_QT		3298
+htc_hd_mini		MACH_HTC_HD_MINI	HTC_HD_MINI		3299
+athene			MACH_ATHENE		ATHENE			3300
+deep_r_ek_1		MACH_DEEP_R_EK_1	DEEP_R_EK_1		3301
+vivow_ct		MACH_VIVOW_CT		VIVOW_CT		3302
+nery_1000		MACH_NERY_1000		NERY_1000		3303
+rfl109145_ssrv		MACH_RFL109145_SSRV	RFL109145_SSRV		3304
+nmh			MACH_NMH		NMH			3305
+wn802t			MACH_WN802T		WN802T			3306
+dragonet		MACH_DRAGONET		DRAGONET		3307
+geneva_b4		MACH_GENEVA_B		GENEVA_B		3308
+at91sam9263desk16l	MACH_AT91SAM9263DESK16L	AT91SAM9263DESK16L	3309
+bcmhana_sv		MACH_BCMHANA_SV		BCMHANA_SV		3310
+bcmhana_tablet		MACH_BCMHANA_TABLET	BCMHANA_TABLET		3311
+koi			MACH_KOI		KOI			3312
+ts4800			MACH_TS4800		TS4800			3313
+tqma9263		MACH_TQMA9263		TQMA9263		3314
+holiday			MACH_HOLIDAY		HOLIDAY			3315
+dma_6410		MACH_DMA6410		DMA6410			3316
+pcats_overlay		MACH_PCATS_OVERLAY	PCATS_OVERLAY		3317
+hwgw6410		MACH_HWGW6410		HWGW6410		3318
+shenzhou		MACH_SHENZHOU		SHENZHOU		3319
+cwme9210		MACH_CWME9210		CWME9210		3320
+cwme9210js		MACH_CWME9210JS		CWME9210JS		3321
+pgs_v1			MACH_PGS_SITARA		PGS_SITARA		3322
+colibri_tegra2		MACH_COLIBRI_TEGRA2	COLIBRI_TEGRA2		3323
+w21			MACH_W21		W21			3324
+polysat1		MACH_POLYSAT1		POLYSAT1		3325
+dataway			MACH_DATAWAY		DATAWAY			3326
+cobral138		MACH_COBRAL138		COBRAL138		3327
+roverpcs8		MACH_ROVERPCS8		ROVERPCS8		3328
+marvelc			MACH_MARVELC		MARVELC			3329
+navefihid		MACH_NAVEFIHID		NAVEFIHID		3330
+dm365_cv100		MACH_DM365_CV100	DM365_CV100		3331
+able			MACH_ABLE		ABLE			3332
+legacy			MACH_LEGACY		LEGACY			3333
+icong			MACH_ICONG		ICONG			3334
+rover_g8		MACH_ROVER_G8		ROVER_G8		3335
+t5388p			MACH_T5388P		T5388P			3336
+dingo			MACH_DINGO		DINGO			3337
+goflexhome		MACH_GOFLEXHOME		GOFLEXHOME		3338
+lanreadyfn511		MACH_LANREADYFN511	LANREADYFN511		3340
+omap3_baia		MACH_OMAP3_BAIA		OMAP3_BAIA		3341
+omap3smartdisplay	MACH_OMAP3SMARTDISPLAY	OMAP3SMARTDISPLAY	3342
+xilinx			MACH_XILINX		XILINX			3343
+a2f			MACH_A2F		A2F			3344
+sky25			MACH_SKY25		SKY25			3345
+ccmx53			MACH_CCMX53		CCMX53			3346
+ccmx53js		MACH_CCMX53JS		CCMX53JS		3347
+ccwmx53			MACH_CCWMX53		CCWMX53			3348
+ccwmx53js		MACH_CCWMX53JS		CCWMX53JS		3349
+frisms			MACH_FRISMS		FRISMS			3350
+msm7x27a_ffa		MACH_MSM7X27A_FFA	MSM7X27A_FFA		3351
+msm7x27a_surf		MACH_MSM7X27A_SURF	MSM7X27A_SURF		3352
+msm7x27a_rumi3		MACH_MSM7X27A_RUMI3	MSM7X27A_RUMI3		3353
+dimmsam9g20		MACH_DIMMSAM9G20	DIMMSAM9G20		3354
+dimm_imx28		MACH_DIMM_IMX28		DIMM_IMX28		3355
+amk_a4			MACH_AMK_A4		AMK_A4			3356
+gnet_sgme		MACH_GNET_SGME		GNET_SGME		3357
+shooter_u		MACH_SHOOTER_U		SHOOTER_U		3358
+vmx53			MACH_VMX53		VMX53			3359
+rhino			MACH_RHINO		RHINO			3360
+armlex4210		MACH_ARMLEX4210		ARMLEX4210		3361
+swarcoextmodem		MACH_SWARCOEXTMODEM	SWARCOEXTMODEM		3362
+snowball		MACH_SNOWBALL		SNOWBALL		3363
+pcm049			MACH_PCM049		PCM049			3364
+vigor			MACH_VIGOR		VIGOR			3365
+oslo_amundsen		MACH_OSLO_AMUNDSEN	OSLO_AMUNDSEN		3366
+gsl_diamond		MACH_GSL_DIAMOND	GSL_DIAMOND		3367
+cv2201			MACH_CV2201		CV2201			3368
+cv2202			MACH_CV2202		CV2202			3369
+cv2203			MACH_CV2203		CV2203			3370
+vit_ibox		MACH_VIT_IBOX		VIT_IBOX		3371
+dm6441_esp		MACH_DM6441_ESP		DM6441_ESP		3372
+at91sam9x5ek		MACH_AT91SAM9X5EK	AT91SAM9X5EK		3373
+libra			MACH_LIBRA		LIBRA			3374
+easycrrh		MACH_EASYCRRH		EASYCRRH		3375
+tripel			MACH_TRIPEL		TRIPEL			3376
+endian_mini		MACH_ENDIAN_MINI	ENDIAN_MINI		3377
+xilinx_ep107		MACH_XILINX_EP107	XILINX_EP107		3378
+nuri			MACH_NURI		NURI			3379
+janus			MACH_JANUS		JANUS			3380
+ddnas			MACH_DDNAS		DDNAS			3381
+tag			MACH_TAG		TAG			3382
+tagw			MACH_TAGW		TAGW			3383
+nitrogen_vm_imx51	MACH_NITROGEN_VM_IMX51	NITROGEN_VM_IMX51	3384
+viprinet		MACH_VIPRINET		VIPRINET		3385
+bockw			MACH_BOCKW		BOCKW			3386
+eva2000			MACH_EVA2000		EVA2000			3387
+steelyard		MACH_STEELYARD		STEELYARD		3388
+ea2468devkit		MACH_LPC2468OEM		LPC2468OEM		3389
+sdh001			MACH_MACH_SDH001	MACH_SDH001		3390
+fe2478mblox		MACH_LPC2478MICROBLOX	LPC2478MICROBLOX	3391
+nsslsboard		MACH_NSSLSBOARD		NSSLSBOARD		3392
+geneva_b5		MACH_GENEVA_B5		GENEVA_B5		3393
+spear1340		MACH_SPEAR1340		SPEAR1340		3394
+rexmas			MACH_REXMAS		REXMAS			3395
+msm8960_cdp		MACH_MSM8960_CDP	MSM8960_CDP		3396
+msm8960_mtp		MACH_MSM8960_MDP	MSM8960_MDP		3397
+msm8960_fluid		MACH_MSM8960_FLUID	MSM8960_FLUID		3398
+msm8960_apq		MACH_MSM8960_APQ	MSM8960_APQ		3399
+helios_v2		MACH_HELIOS_V2		HELIOS_V2		3400
+mif10p			MACH_MIF10P		MIF10P			3401
+iam28			MACH_IAM28		IAM28			3402
+picasso			MACH_PICASSO		PICASSO			3403
+mr301a			MACH_MR301A		MR301A			3404
+notle			MACH_NOTLE		NOTLE			3405
+eelx2			MACH_EELX2		EELX2			3406
+moon			MACH_MOON		MOON			3407
+ruby			MACH_RUBY		RUBY			3408
+goldengate		MACH_GOLDENGATE		GOLDENGATE		3409
+ctbu_gen2		MACH_CTBU_GEN2		CTBU_GEN2		3410
+kmp_am17_01		MACH_KMP_AM17_01	KMP_AM17_01		3411
+wtplug			MACH_WTPLUG		WTPLUG			3412
+mx27su2			MACH_MX27SU2		MX27SU2			3413
+nb31			MACH_NB31		NB31			3414
+hjsdu			MACH_HJSDU		HJSDU			3415
+td3_rev1		MACH_TD3_REV1		TD3_REV1		3416
+eag_ci4000		MACH_EAG_CI4000		EAG_CI4000		3417
+net5big_nand_v2		MACH_NET5BIG_NAND_V2	NET5BIG_NAND_V2		3418
+cpx2			MACH_CPX2		CPX2			3419
+net2big_nand_v2		MACH_NET2BIG_NAND_V2	NET2BIG_NAND_V2		3420
+ecuv5			MACH_ECUV5		ECUV5			3421
+hsgx6d			MACH_HSGX6D		HSGX6D			3422
+dawad7			MACH_DAWAD7		DAWAD7			3423
+sam9repeater		MACH_SAM9REPEATER	SAM9REPEATER		3424
+gt_i5700		MACH_GT_I5700		GT_I5700		3425
+ctera_plug_c2		MACH_CTERA_PLUG_C2	CTERA_PLUG_C2		3426
+marvelct		MACH_MARVELCT		MARVELCT		3427
+ag11005			MACH_AG11005		AG11005			3428
+omap_tabletblaze	MACH_OMAP_BLAZE		OMAP_BLAZE		3429
+vangogh			MACH_VANGOGH		VANGOGH			3430
+matrix505		MACH_MATRIX505		MATRIX505		3431
+oce_nigma		MACH_OCE_NIGMA		OCE_NIGMA		3432
+t55			MACH_T55		T55			3433
+bio3k			MACH_BIO3K		BIO3K			3434
+expressct		MACH_EXPRESSCT		EXPRESSCT		3435
+cardhu			MACH_CARDHU		CARDHU			3436
+aruba			MACH_ARUBA		ARUBA			3437
+bonaire			MACH_BONAIRE		BONAIRE			3438
+nuc700evb		MACH_NUC700EVB		NUC700EVB		3439
+nuc710evb		MACH_NUC710EVB		NUC710EVB		3440
+nuc740evb		MACH_NUC740EVB		NUC740EVB		3441
+nuc745evb		MACH_NUC745EVB		NUC745EVB		3442
+transcede		MACH_TRANSCEDE		TRANSCEDE		3443
+mora			MACH_MORA		MORA			3444
+nda_evm			MACH_NDA_EVM		NDA_EVM			3445
+timu			MACH_TIMU		TIMU			3446
+expressh		MACH_EXPRESSH		EXPRESSH		3447
+veridis_a300		MACH_VERIDIS_A300	VERIDIS_A300		3448
+dm368_leopard		MACH_DM368_LEOPARD	DM368_LEOPARD		3449
+omap_mcop		MACH_OMAP_MCOP		OMAP_MCOP		3450
+tritip			MACH_TRITIP		TRITIP			3451
+sm1k			MACH_SM1K		SM1K			3452
+monch			MACH_MONCH		MONCH			3453
+curacao			MACH_CURACAO		CURACAO			3454
+origen			MACH_ORIGEN		ORIGEN			3455
+epc10			MACH_EPC10		EPC10			3456
+sgh_i740		MACH_SGH_I740		SGH_I740		3457
+tuna			MACH_TUNA		TUNA			3458
+mx51_tulip		MACH_MX51_TULIP		MX51_TULIP		3459
+mx51_aster7		MACH_MX51_ASTER7	MX51_ASTER7		3460
+acro37xbrd		MACH_ACRO37XBRD		ACRO37XBRD		3461
+elke			MACH_ELKE		ELKE			3462
+sbc6000x		MACH_SBC6000X		SBC6000X		3463
+r1801e			MACH_R1801E		R1801E			3464
+h1600			MACH_H1600		H1600			3465
+mini210			MACH_MINI210		MINI210			3466
+mini8168		MACH_MINI8168		MINI8168		3467
+pc7308			MACH_PC7308		PC7308			3468
+ge863_pro3_evk		MACH_GE863		GE863			3469
+kmm2m01			MACH_KMM2M01		KMM2M01			3470
+mx51erebus		MACH_MX51EREBUS		MX51EREBUS		3471
+wm8650refboard		MACH_WM8650REFBOARD	WM8650REFBOARD		3472
+tuxrail			MACH_TUXRAIL		TUXRAIL			3473
+arthur			MACH_ARTHUR		ARTHUR			3474
+doorboy			MACH_DOORBOY		DOORBOY			3475
+xarina			MACH_XARINA		XARINA			3476
+roverx7			MACH_ROVERX7		ROVERX7			3477
+sdvr			MACH_SDVR		SDVR			3478
+acer_maya		MACH_ACER_MAYA		ACER_MAYA		3479
+pico			MACH_PICO		PICO			3480
+cwmx233			MACH_CWMX233		CWMX233			3481
+cwam1808		MACH_CWAM1808		CWAM1808		3482
+cwdm365			MACH_CWDM365		CWDM365			3483
+mx51_moray		MACH_MX51_MORAY		MX51_MORAY		3484
+thales_cbc		MACH_THALES_CBC		THALES_CBC		3485
+bluepoint		MACH_BLUEPOINT		BLUEPOINT		3486
+dir665			MACH_DIR665		DIR665			3487
+acmerover1		MACH_ACMEROVER1		ACMEROVER1		3488
+shooter_ct		MACH_SHOOTER_CT		SHOOTER_CT		3489
+bliss			MACH_BLISS		BLISS			3490
+blissc			MACH_BLISSC		BLISSC			3491
+thales_adc		MACH_THALES_ADC		THALES_ADC		3492
+ubisys_p9d_evp		MACH_UBISYS_P9D_EVP	UBISYS_P9D_EVP		3493
+atdgp318		MACH_ATDGP318		ATDGP318		3494
+dma210u			MACH_DMA210U		DMA210U			3495
+em_t3			MACH_EM_T3		EM_T3			3496
+htx3250			MACH_HTX3250		HTX3250			3497
+g50			MACH_G50		G50			3498
+eco5			MACH_ECO5		ECO5			3499
+wintergrasp		MACH_WINTERGRASP	WINTERGRASP		3500
+puro			MACH_PURO		PURO			3501
+shooter_k		MACH_SHOOTER_K		SHOOTER_K		3502
+nspire			MACH_NSPIRE		NSPIRE			3503
+mickxx			MACH_MICKXX		MICKXX			3504
+lxmb			MACH_LXMB		LXMB			3505
+tmdxscbp6618x		MACH_TMDXSCBP6616X	TMDXSCBP6616X		3506
+adam			MACH_ADAM		ADAM			3507
+b1004			MACH_B1004		B1004			3508
+oboea			MACH_OBOEA		OBOEA			3509
+a1015			MACH_A1015		A1015			3510
+robin_vbdt30		MACH_ROBIN_VBDT30	ROBIN_VBDT30		3511
+tegra_enterprise	MACH_TEGRA_ENTERPRISE	TEGRA_ENTERPRISE	3512
+rfl108200_mk10		MACH_RFL108200_MK10	RFL108200_MK10		3513
+rfl108300_mk16		MACH_RFL108300_MK16	RFL108300_MK16		3514
+rover_v7		MACH_ROVER_V7		ROVER_V7		3515
+miphone			MACH_MIPHONE		MIPHONE			3516
+femtobts		MACH_FEMTOBTS		FEMTOBTS		3517
+monopoli		MACH_MONOPOLI		MONOPOLI		3518
+boss			MACH_BOSS		BOSS			3519
+davinci_dm368_vtam	MACH_DAVINCI_DM368_VTAM	DAVINCI_DM368_VTAM	3520
+clcon			MACH_CLCON		CLCON			3521
+nokia_rm696		MACH_NOKIA_RM696	NOKIA_RM696		3522
+tahiti			MACH_TAHITI		TAHITI			3523
+fighter			MACH_FIGHTER		FIGHTER			3524
+sgh_i710		MACH_SGH_I710		SGH_I710		3525
+integreproscb		MACH_INTEGREPROSCB	INTEGREPROSCB		3526
+monza			MACH_MONZA		MONZA			3527
+calimain		MACH_CALIMAIN		CALIMAIN		3528
+mx6q_sabreauto		MACH_MX6Q_SABREAUTO	MX6Q_SABREAUTO		3529
+gma01x			MACH_GMA01X		GMA01X			3530
+sbc51			MACH_SBC51		SBC51			3531
+fit			MACH_FIT		FIT			3532
+steelhead		MACH_STEELHEAD		STEELHEAD		3533
+panther			MACH_PANTHER		PANTHER			3534
+msm8960_liquid		MACH_MSM8960_LIQUID	MSM8960_LIQUID		3535
+lexikonct		MACH_LEXIKONCT		LEXIKONCT		3536
+ns2816_stb		MACH_NS2816_STB		NS2816_STB		3537
+sei_mm2_lpc3250		MACH_SEI_MM2_LPC3250	SEI_MM2_LPC3250		3538
+cmimx53			MACH_CMIMX53		CMIMX53			3539
+sandwich		MACH_SANDWICH		SANDWICH		3540
+chief			MACH_CHIEF		CHIEF			3541
+pogo_e02		MACH_POGO_E02		POGO_E02		3542
+mikrap_x168		MACH_MIKRAP_X168	MIKRAP_X168		3543
+htcmozart		MACH_HTCMOZART		HTCMOZART		3544
+htcgold			MACH_HTCGOLD		HTCGOLD			3545
+mt72xx			MACH_MT72XX		MT72XX			3546
+mx51_ivy		MACH_MX51_IVY		MX51_IVY		3547
+mx51_lvd		MACH_MX51_LVD		MX51_LVD		3548
+omap3_wiser2		MACH_OMAP3_WISER2	OMAP3_WISER2		3549
+dreamplug		MACH_DREAMPLUG		DREAMPLUG		3550
+cobas_c_111		MACH_COBAS_C_111	COBAS_C_111		3551
+cobas_u_411		MACH_COBAS_U_411	COBAS_U_411		3552
+hssd			MACH_HSSD		HSSD			3553
+iom35x			MACH_IOM35X		IOM35X			3554
+psom_omap		MACH_PSOM_OMAP		PSOM_OMAP		3555
+iphone_2g		MACH_IPHONE_2G		IPHONE_2G		3556
+iphone_3g		MACH_IPHONE_3G		IPHONE_3G		3557
+ipod_touch_1g		MACH_IPOD_TOUCH_1G	IPOD_TOUCH_1G		3558
+pharos_tpc		MACH_PHAROS_TPC		PHAROS_TPC		3559
+mx53_hydra		MACH_MX53_HYDRA		MX53_HYDRA		3560
+ns2816_dev_board	MACH_NS2816_DEV_BOARD	NS2816_DEV_BOARD	3561
+iphone_3gs		MACH_IPHONE_3GS		IPHONE_3GS		3562
+iphone_4		MACH_IPHONE_4		IPHONE_4		3563
+ipod_touch_4g		MACH_IPOD_TOUCH_4G	IPOD_TOUCH_4G		3564
+dragon_e1100		MACH_DRAGON_E1100	DRAGON_E1100		3565
+topside			MACH_TOPSIDE		TOPSIDE			3566
+irisiii			MACH_IRISIII		IRISIII			3567
+deto_macarm9		MACH_DETO_MACARM9	DETO_MACARM9		3568
+eti_d1			MACH_ETI_D1		ETI_D1			3569
+som3530sdk		MACH_SOM3530SDK		SOM3530SDK		3570
+oc_engine		MACH_OC_ENGINE		OC_ENGINE		3571
+apq8064_sim		MACH_APQ8064_SIM	APQ8064_SIM		3572
+alps			MACH_ALPS		ALPS			3575
+tny_t3730		MACH_TNY_T3730		TNY_T3730		3576
+geryon_nfe		MACH_GERYON_NFE		GERYON_NFE		3577
+ns2816_ref_board	MACH_NS2816_REF_BOARD	NS2816_REF_BOARD	3578
+silverstone		MACH_SILVERSTONE	SILVERSTONE		3579
+mtt2440			MACH_MTT2440		MTT2440			3580
+ynicdb			MACH_YNICDB		YNICDB			3581
+bct			MACH_BCT		BCT			3582
+tuscan			MACH_TUSCAN		TUSCAN			3583
+xbt_sam9g45		MACH_XBT_SAM9G45	XBT_SAM9G45		3584
+enbw_cmc		MACH_ENBW_CMC		ENBW_CMC		3585
+msm8x60_dragon		MACH_APQ8060_DRAGON	APQ8060_DRAGON		3586
+ch104mx257		MACH_CH104MX257		CH104MX257		3587
+openpri			MACH_OPENPRI		OPENPRI			3588
+am335xevm		MACH_AM335XEVM		AM335XEVM		3589
+picodmb			MACH_PICODMB		PICODMB			3590
+waluigi			MACH_WALUIGI		WALUIGI			3591
+punicag7		MACH_PUNICAG7		PUNICAG7		3592
+ipad_1g			MACH_IPAD_1G		IPAD_1G			3593
+appletv_2g		MACH_APPLETV_2G		APPLETV_2G		3594
+mach_ecog45		MACH_MACH_ECOG45	MACH_ECOG45		3595
+ait_cam_enc_4xx		MACH_AIT_CAM_ENC_4XX	AIT_CAM_ENC_4XX		3596
+runnymede		MACH_RUNNYMEDE		RUNNYMEDE		3597
+play			MACH_PLAY		PLAY			3598
+hw90260			MACH_HW90260		HW90260			3599
+tagh			MACH_TAGH		TAGH			3600
+filbert			MACH_FILBERT		FILBERT			3601
+getinge_netcomv3	MACH_GETINGE_NETCOMV3	GETINGE_NETCOMV3	3602
+cw20			MACH_CW20		CW20			3603
+cinema			MACH_CINEMA		CINEMA			3604
+cinema_tea		MACH_CINEMA_TEA		CINEMA_TEA		3605
+cinema_coffee		MACH_CINEMA_COFFEE	CINEMA_COFFEE		3606
+cinema_juice		MACH_CINEMA_JUICE	CINEMA_JUICE		3607
+linux_pad		MACH_THEPAD		THEPAD			3608
+mx53_mirage2		MACH_MX53_MIRAGE2	MX53_MIRAGE2		3609
+mx53_efikasb		MACH_MX53_EFIKASB	MX53_EFIKASB		3610
+stm_b2000		MACH_STM_B2000		STM_B2000		3612
+m28evk			MACH_M28EVK		M28EVK			3613
+pda			MACH_PDA		PDA			3614
+meraki_mr58		MACH_MERAKI_MR58	MERAKI_MR58		3615
+kota2			MACH_KOTA2		KOTA2			3616
+letcool			MACH_LETCOOL		LETCOOL			3617
+mx27iat			MACH_MX27IAT		MX27IAT			3618
+apollo_td		MACH_APOLLO_TD		APOLLO_TD		3619
+arena			MACH_ARENA		ARENA			3620
+gsngateway		MACH_GSNGATEWAY		GSNGATEWAY		3621
+lf2000			MACH_LF2000		LF2000			3622
+bonito			MACH_BONITO		BONITO			3623
+asymptote		MACH_ASYMPTOTE		ASYMPTOTE		3624
+bst2brd			MACH_BST2BRD		BST2BRD			3625
+tx335s			MACH_TX335S		TX335S			3626
+pelco_tesla		MACH_PELCO_TESLA	PELCO_TESLA		3627
+rrhtestplat		MACH_RRHTESTPLAT	RRHTESTPLAT		3628
+vidtonic_pro		MACH_VIDTONIC_PRO	VIDTONIC_PRO		3629
+pl_apollo		MACH_PL_APOLLO		PL_APOLLO		3630
+pl_phoenix		MACH_PL_PHOENIX		PL_PHOENIX		3631
+m28cu3			MACH_M28CU3		M28CU3			3632
+vvbox_hd		MACH_VVBOX_HD		VVBOX_HD		3633
+coreware_sam9260_	MACH_COREWARE_SAM9260_	COREWARE_SAM9260_	3634
+marmaduke		MACH_MARMADUKE		MARMADUKE		3635
+amg_xlcore_camera	MACH_AMG_XLCORE_CAMERA	AMG_XLCORE_CAMERA	3636
+omap3_egf		MACH_OMAP3_EGF		OMAP3_EGF		3637
+smdk4212		MACH_SMDK4212		SMDK4212		3638
+dnp9200			MACH_DNP9200		DNP9200			3639
+tf101			MACH_TF101		TF101			3640
+omap3silvio		MACH_OMAP3SILVIO	OMAP3SILVIO		3641
+picasso2		MACH_PICASSO2		PICASSO2		3642
+vangogh2		MACH_VANGOGH2		VANGOGH2		3643
+olpc_xo_1_75		MACH_OLPC_XO_1_75	OLPC_XO_1_75		3644
+gx400			MACH_GX400		GX400			3645
+gs300			MACH_GS300		GS300			3646
+acer_a9			MACH_ACER_A9		ACER_A9			3647
+vivow_evm		MACH_VIVOW_EVM		VIVOW_EVM		3648
+veloce_cxq		MACH_VELOCE_CXQ		VELOCE_CXQ		3649
+veloce_cxm		MACH_VELOCE_CXM		VELOCE_CXM		3650
+p1852			MACH_P1852		P1852			3651
+naxy100			MACH_NAXY100		NAXY100			3652
+taishan			MACH_TAISHAN		TAISHAN			3653
+touchlink		MACH_TOUCHLINK		TOUCHLINK		3654
+stm32f103ze		MACH_STM32F103ZE	STM32F103ZE		3655
+mcx			MACH_MCX		MCX			3656
+stm_nmhdk_fli7610	MACH_STM_NMHDK_FLI7610	STM_NMHDK_FLI7610	3657
+top28x			MACH_TOP28X		TOP28X			3658
+okl4vp_microvisor	MACH_OKL4VP_MICROVISOR	OKL4VP_MICROVISOR	3659
+pop			MACH_POP		POP			3660
+layer			MACH_LAYER		LAYER			3661
+trondheim		MACH_TRONDHEIM		TRONDHEIM		3662
+eva			MACH_EVA		EVA			3663
+trust_taurus		MACH_TRUST_TAURUS	TRUST_TAURUS		3664
+ns2816_huashan		MACH_NS2816_HUASHAN	NS2816_HUASHAN		3665
+ns2816_yangcheng	MACH_NS2816_YANGCHENG	NS2816_YANGCHENG	3666
+p852			MACH_P852		P852			3667
+flea3			MACH_FLEA3		FLEA3			3668
+bowfin			MACH_BOWFIN		BOWFIN			3669
+mv88de3100		MACH_MV88DE3100		MV88DE3100		3670
+pia_am35x		MACH_PIA_AM35X		PIA_AM35X		3671
+cedar			MACH_CEDAR		CEDAR			3672
+picasso_e		MACH_PICASSO_E		PICASSO_E		3673
+samsung_e60		MACH_SAMSUNG_E60	SAMSUNG_E60		3674
+msm9615_cdp		MACH_MDM9615		MDM9615			3675
+sdvr_mini		MACH_SDVR_MINI		SDVR_MINI		3676
+omap3_ij3k		MACH_OMAP3_IJ3K		OMAP3_IJ3K		3677
+modasmc1		MACH_MODASMC1		MODASMC1		3678
+apq8064_rumi3		MACH_APQ8064_RUMI3	APQ8064_RUMI3		3679
+matrix506		MACH_MATRIX506		MATRIX506		3680
+msm9615_mtp		MACH_MSM9615_MTP	MSM9615_MTP		3681
+dm36x_spawndc		MACH_DM36X_SPAWNDC	DM36X_SPAWNDC		3682
+sff792			MACH_SFF792		SFF792			3683
+am335xiaevm		MACH_AM335XIAEVM	AM335XIAEVM		3684
+g3c2440			MACH_G3C2440		G3C2440			3685
+tion270			MACH_TION270		TION270			3686
+w22q7arm02		MACH_W22Q7ARM02		W22Q7ARM02		3687
+omap_cat		MACH_OMAP_CAT		OMAP_CAT		3688
+at91sam9n12ek		MACH_AT91SAM9N12EK	AT91SAM9N12EK		3689
+morrison		MACH_MORRISON		MORRISON		3690
+svdu			MACH_SVDU		SVDU			3691
+lpp01			MACH_LPP01		LPP01			3692
+ubc283			MACH_UBC283		UBC283			3693
+zeppelin		MACH_ZEPPELIN		ZEPPELIN		3694
+motus			MACH_MOTUS		MOTUS			3695
+neomainboard		MACH_NEOMAINBOARD	NEOMAINBOARD		3696
+devkit3250		MACH_DEVKIT3250		DEVKIT3250		3697
+devkit7000		MACH_DEVKIT7000		DEVKIT7000		3698
+fmc_uic			MACH_FMC_UIC		FMC_UIC			3699
+fmc_dcm			MACH_FMC_DCM		FMC_DCM			3700
+batwm			MACH_BATWM		BATWM			3701
+atlas6cb		MACH_ATLAS6CB		ATLAS6CB		3702
+quattro_f		MACH_QUATTROF		QUATTROF		3703
+quattro_u		MACH_QUATTROU		QUATTROU		3704
+blue			MACH_BLUE		BLUE			3705
+colorado		MACH_COLORADO		COLORADO		3706
+popc			MACH_POPC		POPC			3707
+promwad_jade		MACH_PROMWAD_JADE	PROMWAD_JADE		3708
+amp			MACH_AMP		AMP			3709
+gnet_amp		MACH_GNET_AMP		GNET_AMP		3710
+toques			MACH_TOQUES		TOQUES			3711
+apx4devkit		MACH_APX4DEVKIT		APX4DEVKIT		3712
+dct_storm		MACH_DCT_STORM		DCT_STORM		3713
+dm8168z3		MACH_Z3			Z3			3714
+owl			MACH_OWL		OWL			3715
+cogent_csb1741		MACH_COGENT_CSB1741	COGENT_CSB1741		3716
+omap3_kiko		MACH_OMAP3		OMAP3			3717
+adillustra610		MACH_ADILLUSTRA610	ADILLUSTRA610		3718
+ecafe_na04		MACH_ECAFE_NA04		ECAFE_NA04		3719
+popct			MACH_POPCT		POPCT			3720
+omap3_helena		MACH_OMAP3_HELENA	OMAP3_HELENA		3721
+ach			MACH_ACH		ACH			3722
+module_dtb		MACH_MODULE_DTB		MODULE_DTB		3723
+ratebox			MACH_RACKBOX		RACKBOX			3724
+oslo_elisabeth		MACH_OSLO_ELISABETH	OSLO_ELISABETH		3725
+tt01			MACH_TT01		TT01			3726
+msm8930_cdp		MACH_MSM8930_CDP	MSM8930_CDP		3727
+msm8930_mtp		MACH_MSM8930_MTP	MSM8930_MTP		3728
+msm8930_fluid		MACH_MSM8930_FLUID	MSM8930_FLUID		3729
+ltu11			MACH_LTU11		LTU11			3730
+am1808_spawnco		MACH_AM1808_SPAWNCO	AM1808_SPAWNCO		3731
+flx6410			MACH_FLX6410		FLX6410			3732
+mx6q_qsb		MACH_MX6Q_QSB		MX6Q_QSB		3733
+mx53_plt424		MACH_MX53_PLT424	MX53_PLT424		3734
+jasmine			MACH_JASMINE		JASMINE			3735
+l138_owlboard_plus	MACH_L138_OWLBOARD_PLUS	L138_OWLBOARD_PLUS	3736
+wr21			MACH_WR21		WR21			3737
+peaboy			MACH_PEABOY		PEABOY			3739
+mx28_plato		MACH_MX28_PLATO		MX28_PLATO		3740
+kacom2			MACH_KACOM2		KACOM2			3741
+slco			MACH_SLCO		SLCO			3742
+imx51pico		MACH_IMX51PICO		IMX51PICO		3743
+glink1			MACH_GLINK1		GLINK1			3744
+diamond			MACH_DIAMOND		DIAMOND			3745
+d9000			MACH_D9000		D9000			3746
+w5300e01		MACH_W5300E01		W5300E01		3747
+im6000			MACH_IM6000		IM6000			3748
+mx51_fred51		MACH_MX51_FRED51	MX51_FRED51		3749
+stm32f2			MACH_STM32F2		STM32F2			3750
+ville			MACH_VILLE		VILLE			3751
+ptip_murnau		MACH_PTIP_MURNAU	PTIP_MURNAU		3752
+ptip_classic		MACH_PTIP_CLASSIC	PTIP_CLASSIC		3753
+mx53grb			MACH_MX53GRB		MX53GRB			3754
+gagarin			MACH_GAGARIN		GAGARIN			3755
+msm7627a_qrd1		MACH_MSM7X27A_QRD1	MSM7X27A_QRD1		3756
+nas2big			MACH_NAS2BIG		NAS2BIG			3757
+superfemto		MACH_SUPERFEMTO		SUPERFEMTO		3758
+teufel			MACH_TEUFEL		TEUFEL			3759
+dinara			MACH_DINARA		DINARA			3760
+vanquish		MACH_VANQUISH		VANQUISH		3761
+zipabox1		MACH_ZIPABOX1		ZIPABOX1		3762
+u9540			MACH_U9540		U9540			3763
+jet			MACH_JET		JET			3764
+smdk4412		MACH_SMDK4412		SMDK4412		3765
+elite			MACH_ELITE		ELITE			3766
+spear320_hmi		MACH_SPEAR320_HMI	SPEAR320_HMI		3767
+ontario			MACH_ONTARIO		ONTARIO			3768
+mx6q_sabrelite		MACH_MX6Q_SABRELITE	MX6Q_SABRELITE		3769
+vc200			MACH_VC200		VC200			3770
+msm7625a_ffa		MACH_MSM7625A_FFA	MSM7625A_FFA		3771
+msm7625a_surf		MACH_MSM7625A_SURF	MSM7625A_SURF		3772
+benthossbp		MACH_BENTHOSSBP		BENTHOSSBP		3773
+smdk5210		MACH_SMDK5210		SMDK5210		3774
+empq2300		MACH_EMPQ2300		EMPQ2300		3775
+minipos			MACH_MINIPOS		MINIPOS			3776
+omap5_sevm		MACH_OMAP5_SEVM		OMAP5_SEVM		3777
+shelter			MACH_SHELTER		SHELTER			3778
+omap3_devkit8500	MACH_OMAP3_DEVKIT8500	OMAP3_DEVKIT8500	3779
+edgetd			MACH_EDGETD		EDGETD			3780
+copperyard		MACH_COPPERYARD		COPPERYARD		3781
+edge_test		MACH_EDGE		EDGE			3782
+edge_u			MACH_EDGE_U		EDGE_U			3783
+edge_td			MACH_EDGE_TD		EDGE_TD			3784
+wdss			MACH_WDSS		WDSS			3785
+dl_pb25			MACH_DL_PB25		DL_PB25			3786
+dss11			MACH_DSS11		DSS11			3787
+cpa			MACH_CPA		CPA			3788
+aptp2000		MACH_APTP2000		APTP2000		3789
+marzen			MACH_MARZEN		MARZEN			3790
+st_turbine		MACH_ST_TURBINE		ST_TURBINE		3791
+gtl_it3300		MACH_GTL_IT3300		GTL_IT3300		3792
+mx6_mule		MACH_MX6_MULE		MX6_MULE		3793
+v7pxa_dt		MACH_V7PXA_DT		V7PXA_DT		3794
+v7mmp_dt		MACH_V7MMP_DT		V7MMP_DT		3795
+dragon7			MACH_DRAGON7		DRAGON7			3796
+krome			MACH_KROME		KROME			3797
+oratisdante		MACH_ORATISDANTE	ORATISDANTE		3798
+fathom			MACH_FATHOM		FATHOM			3799
+dns325			MACH_DNS325		DNS325			3800
+sarnen			MACH_SARNEN		SARNEN			3801
+ubisys_g1		MACH_UBISYS_G1		UBISYS_G1		3802
+mx53_pf1		MACH_MX53_PF1		MX53_PF1		3803
+asanti			MACH_ASANTI		ASANTI			3804
+volta			MACH_VOLTA		VOLTA			3805
+potenza			MACH_S5P6450		S5P6450			3806
+knight			MACH_KNIGHT		KNIGHT			3807
+beaglebone		MACH_BEAGLEBONE		BEAGLEBONE		3808
+becker			MACH_BECKER		BECKER			3809
+fc360			MACH_FC360		FC360			3810
+pmi2_xls		MACH_PMI2_XLS		PMI2_XLS		3811
+taranto			MACH_TARANTO		TARANTO			3812
+plutux			MACH_PLUTUX		PLUTUX			3813
+ipmp_medcom		MACH_IPMP_MEDCOM	IPMP_MEDCOM		3814
+absolut			MACH_ABSOLUT		ABSOLUT			3815
+awpb3			MACH_AWPB3		AWPB3			3816
+nfp32xx_dt		MACH_NFP32XX_DT		NFP32XX_DT		3817
+dl_pb53			MACH_DL_PB53		DL_PB53			3818
+acu_ii			MACH_ACU_II		ACU_II			3819
+avalon			MACH_AVALON		AVALON			3820
+sphinx			MACH_SPHINX		SPHINX			3821
+titan_t			MACH_TITAN_T		TITAN_T			3822
+harvest_boris		MACH_HARVEST_BORIS	HARVEST_BORIS		3823
+mach_msm7x30_m3s	MACH_MACH_MSM7X30_M3S	MACH_MSM7X30_M3S	3824
+smdk5250		MACH_SMDK5250		SMDK5250		3825
+imxt_lite		MACH_IMXT_LITE		IMXT_LITE		3826
+imxt_std		MACH_IMXT_STD		IMXT_STD		3827
+imxt_log		MACH_IMXT_LOG		IMXT_LOG		3828
+imxt_nav		MACH_IMXT_NAV		IMXT_NAV		3829
+imxt_full		MACH_IMXT_FULL		IMXT_FULL		3830
+ag09015			MACH_AG09015		AG09015			3831
+am3517_mt_ventoux	MACH_AM3517_MT_VENTOUX	AM3517_MT_VENTOUX	3832
+dp1arm9			MACH_DP1ARM9		DP1ARM9			3833
+picasso_m		MACH_PICASSO_M		PICASSO_M		3834
+video_gadget		MACH_VIDEO_GADGET	VIDEO_GADGET		3835
+mtt_om3x		MACH_MTT_OM3X		MTT_OM3X		3836
+mx6q_arm2		MACH_MX6Q_ARM2		MX6Q_ARM2		3837
+picosam9g45		MACH_PICOSAM9G45	PICOSAM9G45		3838
+vpm_dm365		MACH_VPM_DM365		VPM_DM365		3839
+bonfire			MACH_BONFIRE		BONFIRE			3840
+mt2p2d			MACH_MT2P2D		MT2P2D			3841
+sigpda01		MACH_SIGPDA01		SIGPDA01		3842
+cn27			MACH_CN27		CN27			3843
+mx25_cwtap		MACH_MX25_CWTAP		MX25_CWTAP		3844
+apf28			MACH_APF28		APF28			3845
+pelco_maxwell		MACH_PELCO_MAXWELL	PELCO_MAXWELL		3846
+ge_phoenix		MACH_GE_PHOENIX		GE_PHOENIX		3847
+empc_a500		MACH_EMPC_A500		EMPC_A500		3848
+ims_arm9		MACH_IMS_ARM9		IMS_ARM9		3849
+mini2416		MACH_MINI2416		MINI2416		3850
+mini2450		MACH_MINI2450		MINI2450		3851
+mini310			MACH_MINI310		MINI310			3852
+spear_hurricane		MACH_SPEAR_HURRICANE	SPEAR_HURRICANE		3853
+mt7208			MACH_MT7208		MT7208			3854
+lpc178x			MACH_LPC178X		LPC178X			3855
+farleys			MACH_FARLEYS		FARLEYS			3856
+efm32gg_dk3750		MACH_EFM32GG_DK3750	EFM32GG_DK3750		3857
+zeus_board		MACH_ZEUS_BOARD		ZEUS_BOARD		3858
+cc51			MACH_CC51		CC51			3859
+fxi_c210		MACH_FXI_C210		FXI_C210		3860
+msm8627_cdp		MACH_MSM8627_CDP	MSM8627_CDP		3861
+msm8627_mtp		MACH_MSM8627_MTP	MSM8627_MTP		3862
+armadillo800eva		MACH_ARMADILLO800EVA	ARMADILLO800EVA		3863
+primou			MACH_PRIMOU		PRIMOU			3864
+primoc			MACH_PRIMOC		PRIMOC			3865
+primoct			MACH_PRIMOCT		PRIMOCT			3866
+a9500			MACH_A9500		A9500			3867
+pue_td			MACH_PULSE_TD		PULSE_TD		3868
+pluto			MACH_PLUTO		PLUTO			3869
+acfx100			MACH_ACFX100		ACFX100			3870
+msm8625_rumi3		MACH_MSM8625_RUMI3	MSM8625_RUMI3		3871
+valente			MACH_VALENTE		VALENTE			3872
+crfs_rfeye		MACH_CRFS_RFEYE		CRFS_RFEYE		3873
+rfeye			MACH_RFEYE		RFEYE			3874
+phidget_sbc3		MACH_PHIDGET_SBC3	PHIDGET_SBC3		3875
+tcw_mika		MACH_TCW_MIKA		TCW_MIKA		3876
+imx28_egf		MACH_IMX28_EGF		IMX28_EGF		3877
+valente_wx		MACH_VALENTE_WX		VALENTE_WX		3878
+huangshans		MACH_HUANGSHANS		HUANGSHANS		3879
+bosphorus1		MACH_BOSPHORUS1		BOSPHORUS1		3880
+prima			MACH_PRIMA		PRIMA			3881
+meson3_skt		MACH_M3_SKT		M3_SKT			3882
+meson3_ref		MACH_M3_REF		M3_REF			3883
+evita_ulk		MACH_EVITA_ULK		EVITA_ULK		3884
+merisc600		MACH_MERISC600		MERISC600		3885
+dolak			MACH_DOLAK		DOLAK			3886
+sbc53			MACH_SBC53		SBC53			3887
+elite_ulk		MACH_ELITE_ULK		ELITE_ULK		3888
+pov2			MACH_POV2		POV2			3889
+ipod_touch_2g		MACH_IPOD_TOUCH_2G	IPOD_TOUCH_2G		3890
+da850_pqab		MACH_DA850_PQAB		DA850_PQAB		3891
+fermi			MACH_FERMI		FERMI			3892
+ccardwmx28		MACH_CCARDWMX28		CCARDWMX28		3893
+ccardmx28		MACH_CCARDMX28		CCARDMX28		3894
+fs20_fcm2050		MACH_FS20_FCM2050	FS20_FCM2050		3895
+kinetis			MACH_KINETIS		KINETIS			3896
+kai			MACH_KAI		KAI			3897
+bcthb2			MACH_BCTHB2		BCTHB2			3898
+inels3_cu		MACH_INELS3_CU		INELS3_CU		3899
+da850_juniper		MACH_JUNIPER		JUNIPER			3900
+da850_apollo		MACH_DA850_APOLLO	DA850_APOLLO		3901
+tracnas			MACH_TRACNAS		TRACNAS			3902
+mityarm335x		MACH_MITYARM335X	MITYARM335X		3903
+xcgz7x			MACH_XCGZ7X		XCGZ7X			3904
+cubox			MACH_CUBOX		CUBOX			3905
+terminator		MACH_TERMINATOR		TERMINATOR		3906
+eye03			MACH_EYE03		EYE03			3907
+kota3			MACH_KOTA3		KOTA3			3908
+mx53_nitrogen_k		MACH_MX5		MX5			3909
+pscpe			MACH_PSCPE		PSCPE			3910
+akt1100			MACH_AKT1100		AKT1100			3911
+pcaaxl2			MACH_PCAAXL2		PCAAXL2			3912
+primodd_ct		MACH_PRIMODD_CT		PRIMODD_CT		3913
+nsbc			MACH_NSBC		NSBC			3914
+meson2_skt		MACH_MESON2_SKT		MESON2_SKT		3915
+meson2_ref		MACH_MESON2_REF		MESON2_REF		3916
+ccardwmx28js		MACH_CCARDWMX28JS	CCARDWMX28JS		3917
+ccardmx28js		MACH_CCARDMX28JS	CCARDMX28JS		3918
+indico			MACH_INDICO		INDICO			3919
+msm8960dt		MACH_MSM8960DT		MSM8960DT		3920
+primods			MACH_PRIMODS		PRIMODS			3921
+beluga_m1388		MACH_BELUGA_M1388	BELUGA_M1388		3922
+primotd			MACH_PRIMOTD		PRIMOTD			3923
+varan_master		MACH_VARAN_MASTER	VARAN_MASTER		3924
+primodd			MACH_PRIMODD		PRIMODD			3925
+jetduo			MACH_JETDUO		JETDUO			3926
+mx53_umobo		MACH_MX53_UMOBO		MX53_UMOBO		3927
+trats			MACH_TRATS		TRATS			3928
+starcraft		MACH_STARCRAFT		STARCRAFT		3929
+qseven_tegra2		MACH_QSEVEN_TEGRA2	QSEVEN_TEGRA2		3930
+lichee_sun4i_devbd	MACH_LICHEE_SUN4I_DEVBD	LICHEE_SUN4I_DEVBD	3931
+movenow			MACH_MOVENOW		MOVENOW			3932
+golf_u			MACH_GOLF_U		GOLF_U			3933
+msm7627a_evb		MACH_MSM7627A_EVB	MSM7627A_EVB		3934
+rambo			MACH_RAMBO		RAMBO			3935
+golfu			MACH_GOLFU		GOLFU			3936
+mango310		MACH_MANGO310		MANGO310		3937
+dns343			MACH_DNS343		DNS343			3938
+var_som_om44		MACH_VAR_SOM_OM44	VAR_SOM_OM44		3939
+naon			MACH_NAON		NAON			3940
+vp4000			MACH_VP4000		VP4000			3941
+impcard			MACH_IMPCARD		IMPCARD			3942
+smoovcam		MACH_SMOOVCAM		SMOOVCAM		3943
+cobham3725		MACH_COBHAM3725		COBHAM3725		3944
+cobham3730		MACH_COBHAM3730		COBHAM3730		3945
+cobham3703		MACH_COBHAM3703		COBHAM3703		3946
+quetzal			MACH_QUETZAL		QUETZAL			3947
+apq8064_cdp		MACH_APQ8064_CDP	APQ8064_CDP		3948
+apq8064_mtp		MACH_APQ8064_MTP	APQ8064_MTP		3949
+apq8064_fluid		MACH_APQ8064_FLUID	APQ8064_FLUID		3950
+apq8064_liquid		MACH_APQ8064_LIQUID	APQ8064_LIQUID		3951
+mango210		MACH_MANGO210		MANGO210		3952
+mango100		MACH_MANGO100		MANGO100		3953
+mango24			MACH_MANGO24		MANGO24			3954
+mango64			MACH_MANGO64		MANGO64			3955
+nsa320			MACH_NSA320		NSA320			3956
+elv_ccu2		MACH_ELV_CCU2		ELV_CCU2		3957
+triton_x00		MACH_TRITON_X00		TRITON_X00		3958
+triton_1500_2000	MACH_TRITON_1500_2000	TRITON_1500_2000	3959
+pogoplugv4		MACH_POGOPLUGV4		POGOPLUGV4		3960
+venus_cl		MACH_VENUS_CL		VENUS_CL		3961
+vulcano_g20		MACH_VULCANO_G20	VULCANO_G20		3962
+sgs_i9100		MACH_SGS_I9100		SGS_I9100		3963
+stsv2			MACH_STSV2		STSV2			3964
+csb1724			MACH_CSB1724		CSB1724			3965
+omapl138_lcdk		MACH_OMAPL138_LCDK	OMAPL138_LCDK		3966
+jel_dd			MACH_JEWEL_DD		JEWEL_DD		3967
+pvd_mx25		MACH_PVD_MX25		PVD_MX25		3968
+meson6_skt		MACH_MESON6_SKT		MESON6_SKT		3969
+meson6_ref		MACH_MESON6_REF		MESON6_REF		3970
+pxm			MACH_PXM		PXM			3971
+stuttgart		MACH_S3			S3			3972
+pogoplugv3		MACH_POGOPLUGV3		POGOPLUGV3		3973
+mlp89626		MACH_MLP89626		MLP89626		3974
+iomegahmndce		MACH_IOMEGAHMNDCE	IOMEGAHMNDCE		3975
+pogoplugv3pci		MACH_POGOPLUGV3PCI	POGOPLUGV3PCI		3976
+bntv250			MACH_BNTV250		BNTV250			3977
+mx53_qseven		MACH_MX53_QSEVEN	MX53_QSEVEN		3978
+gtl_it1100		MACH_GTL_IT1100		GTL_IT1100		3979
+mx6q_sabresd		MACH_MX6Q_SABRESD	MX6Q_SABRESD		3980
+mt4			MACH_MT4		MT4			3981
+jumbo_d			MACH_JUMBO_D		JUMBO_D			3982
+jumbo_i			MACH_JUMBO_I		JUMBO_I			3983
+fs20_dmp		MACH_FS20_DMP		FS20_DMP		3984
+dns320			MACH_DNS320		DNS320			3985
+mx28bacos		MACH_MX28BACOS		MX28BACOS		3986
+tl80			MACH_TL80		TL80			3987
+polatis_nic_1001	MACH_POLATIS_NIC_1001	POLATIS_NIC_1001	3988
+tely			MACH_TELY		TELY			3989
+u8520			MACH_U8520		U8520			3990
+manta			MACH_MANTA		MANTA			3991
+spear1340_lcad		MACH_SPEAR_EM_S900	SPEAR_EM_S900		3992
+mpq8064_cdp		MACH_MPQ8064_CDP	MPQ8064_CDP		3993
+mpq8064_hrd		MACH_MPQ8064_STB	MPQ8064_STB		3994
+mpq8064_dtv		MACH_MPQ8064_DTV	MPQ8064_DTV		3995
+dm368som		MACH_DM368SOM		DM368SOM		3996
+gprisb2			MACH_GPRISB2		GPRISB2			3997
+chammid			MACH_CHAMMID		CHAMMID			3998
+seoul2			MACH_SEOUL2		SEOUL2			3999
+omap4_nooktablet	MACH_OMAP4_NOOKTABLET	OMAP4_NOOKTABLET	4000
+aalto			MACH_AALTO		AALTO			4001
+metro			MACH_METRO		METRO			4002
+cydm3730		MACH_CYDM3730		CYDM3730		4003
+tqma53			MACH_TQMA53		TQMA53			4004
+msm7627a_qrd3		MACH_MSM7627A_QRD3	MSM7627A_QRD3		4005
+mx28_canby		MACH_MX28_CANBY		MX28_CANBY		4006
+tiger			MACH_TIGER		TIGER			4007
+pcats_9307_type_a	MACH_PCATS_9307_TYPE_A	PCATS_9307_TYPE_A	4008
+pcats_9307_type_o	MACH_PCATS_9307_TYPE_O	PCATS_9307_TYPE_O	4009
+pcats_9307_type_r	MACH_PCATS_9307_TYPE_R	PCATS_9307_TYPE_R	4010
+streamplug		MACH_STREAMPLUG		STREAMPLUG		4011
+icechicken_dev		MACH_ICECHICKEN_DEV	ICECHICKEN_DEV		4012
+hedgehog		MACH_HEDGEHOG		HEDGEHOG		4013
+yusend_obc		MACH_YUSEND_OBC		YUSEND_OBC		4014
+imxninja		MACH_IMXNINJA		IMXNINJA		4015
+omap4_jarod		MACH_OMAP4_JAROD	OMAP4_JAROD		4016
+eco5_pk			MACH_ECO5_PK		ECO5_PK			4017
+qj2440			MACH_QJ2440		QJ2440			4018
+mx6q_mercury		MACH_MX6Q_MERCURY	MX6Q_MERCURY		4019
+cm6810			MACH_CM6810		CM6810			4020
+omap4_torpedo		MACH_OMAP4_TORPEDO	OMAP4_TORPEDO		4021
+nsa310			MACH_NSA310		NSA310			4022
+tmx536			MACH_TMX536		TMX536			4023
+ktt20			MACH_KTT20		KTT20			4024
+dragonix		MACH_DRAGONIX		DRAGONIX		4025
+lungching		MACH_LUNGCHING		LUNGCHING		4026
+bulogics		MACH_BULOGICS		BULOGICS		4027
+mx535_sx		MACH_MX535_SX		MX535_SX		4028
+ngui3250		MACH_NGUI3250		NGUI3250		4029
+salutec_dac		MACH_SALUTEC_DAC	SALUTEC_DAC		4030
+loco			MACH_LOCO		LOCO			4031
+ctera_plug_usi		MACH_CTERA_PLUG_USI	CTERA_PLUG_USI		4032
+scepter			MACH_SCEPTER		SCEPTER			4033
+sga			MACH_SGA		SGA			4034
+p_81_j5			MACH_P_81_J5		P_81_J5			4035
+p_81_o4			MACH_P_81_O4		P_81_O4			4036
+msm8625_surf		MACH_MSM8625_SURF	MSM8625_SURF		4037
+carallon_shark		MACH_CARALLON_SHARK	CARALLON_SHARK		4038
+lsgc_icam		MACH_LSGCICAM		LSGCICAM		4039
+ordog			MACH_ORDOG		ORDOG			4040
+puente_io		MACH_PUENTE_IO		PUENTE_IO		4041
+msm8625_evb		MACH_MSM8625_EVB	MSM8625_EVB		4042
+ev_am1707		MACH_EV_AM1707		EV_AM1707		4043
+ev_am1707e2		MACH_EV_AM1707E2	EV_AM1707E2		4044
+ev_am3517e2		MACH_EV_AM3517E2	EV_AM3517E2		4045
+calabria		MACH_CALABRIA		CALABRIA		4046
+ev_imx287		MACH_EV_IMX287		EV_IMX287		4047
+erau			MACH_ERAU		ERAU			4048
+sichuan			MACH_SICHUAN		SICHUAN			4049
+sopdm			MACH_WIRMA3		WIRMA3			4050
+davinci_da850		MACH_DAVINCI_DA850	DAVINCI_DA850		4051
+omap138_trunarc		MACH_OMAP138_TRUNARC	OMAP138_TRUNARC		4052
+bcm4761			MACH_BCM4761		BCM4761			4053
+picasso_e2		MACH_PICASSO_E2		PICASSO_E2		4054
+picasso_mf		MACH_PICASSO_MF		PICASSO_MF		4055
+miro			MACH_MIRO		MIRO			4056
+at91sam9g20ewon3	MACH_AT91SAM9G20EWON3	AT91SAM9G20EWON3	4057
+yoyo			MACH_YOYO		YOYO			4058
+windjkl			MACH_WINDJKL		WINDJKL			4059
+monarudo		MACH_MONARUDO		MONARUDO		4060
+batan			MACH_BATAN		BATAN			4061
+tadao			MACH_TADAO		TADAO			4062
+baso			MACH_BASO		BASO			4063
+mahon			MACH_MAHON		MAHON			4064
+villec2			MACH_VILLEC2		VILLEC2			4065
+asi1230			MACH_ASI1230		ASI1230			4066
+alaska			MACH_ALASKA		ALASKA			4067
+swarco_shdsl2		MACH_SWARCO_SHDSL2	SWARCO_SHDSL2		4068
+oxrtu			MACH_OXRTU		OXRTU			4069
+omap5_panda		MACH_OMAP5_PANDA	OMAP5_PANDA		4070
+imx286			MACH_MX28XDI		MX28XDI			4071
+c8000			MACH_C8000		C8000			4072
+bje_display3_5		MACH_BJE_DISPLAY3_5	BJE_DISPLAY3_5		4073
+picomod7		MACH_PICOMOD7		PICOMOD7		4074
+picocom5		MACH_PICOCOM5		PICOCOM5		4075
+qblissa8		MACH_QBLISSA8		QBLISSA8		4076
+armstonea8		MACH_ARMSTONEA8		ARMSTONEA8		4077
+netdcu14		MACH_NETDCU14		NETDCU14		4078
+at91sam9x5_epiphan	MACH_AT91SAM9X5_EPIPHAN	AT91SAM9X5_EPIPHAN	4079
+p2u			MACH_P2U		P2U			4080
+doris			MACH_DORIS		DORIS			4081
+j49			MACH_J49		J49			4082
+vdss2e			MACH_VDSS2E		VDSS2E			4083
+vc300			MACH_VC300		VC300			4084
+ns115_pad_test		MACH_NS115_PAD_TEST	NS115_PAD_TEST		4085
+ns115_pad_ref		MACH_NS115_PAD_REF	NS115_PAD_REF		4086
+ns115_phone_test	MACH_NS115_PHONE_TEST	NS115_PHONE_TEST	4087
+ns115_phone_ref		MACH_NS115_PHONE_REF	NS115_PHONE_REF		4088
+golfc			MACH_GOLFC		GOLFC			4089
+xerox_olympus		MACH_XEROX_OLYMPUS	XEROX_OLYMPUS		4090
+mx6sl_arm2		MACH_MX6SL_ARM2		MX6SL_ARM2		4091
+csb1701_csb1726		MACH_CSB1701_CSB1726	CSB1701_CSB1726		4092
+at91sam9xeek		MACH_AT91SAM9XEEK	AT91SAM9XEEK		4093
+ebv210			MACH_EBV210		EBV210			4094
+msm7627a_qrd7		MACH_MSM7627A_QRD7	MSM7627A_QRD7		4095
+svthin			MACH_SVTHIN		SVTHIN			4096
+duovero			MACH_DUOVERO		DUOVERO			4097
+chupacabra		MACH_CHUPACABRA		CHUPACABRA		4098
+scorpion		MACH_SCORPION		SCORPION		4099
+davinci_he_hmi10	MACH_DAVINCI_HE_HMI10	DAVINCI_HE_HMI10	4100
+topkick			MACH_TOPKICK		TOPKICK			4101
+m3_auguestrush		MACH_M3_AUGUESTRUSH	M3_AUGUESTRUSH		4102
+ipc335x			MACH_IPC335X		IPC335X			4103
+sun4i			MACH_SUN4I		SUN4I			4104
+imx233_olinuxino	MACH_IMX233_OLINUXINO	IMX233_OLINUXINO	4105
+k2_wl			MACH_K2_WL		K2_WL			4106
+k2_ul			MACH_K2_UL		K2_UL			4107
+k2_cl			MACH_K2_CL		K2_CL			4108
+minbari_w		MACH_MINBARI_W		MINBARI_W		4109
+minbari_m		MACH_MINBARI_M		MINBARI_M		4110
+k035			MACH_K035		K035			4111
+ariel			MACH_ARIEL		ARIEL			4112
+arielsaarc		MACH_ARIELSAARC		ARIELSAARC		4113
+arieldkb		MACH_ARIELDKB		ARIELDKB		4114
+armadillo810		MACH_ARMADILLO810	ARMADILLO810		4115
+tam335x			MACH_TAM335X		TAM335X			4116
+grouper			MACH_GROUPER		GROUPER			4117
+mpcsa21_9g20		MACH_MPCSA21_9G20	MPCSA21_9G20		4118
+m6u_cpu			MACH_M6U_CPU		M6U_CPU			4119
+davinci_dp10		MACH_DAVINCI_DP10	DAVINCI_DP10		4120
+ginkgo			MACH_GINKGO		GINKGO			4121
+cgt_qmx6		MACH_CGT_QMX6		CGT_QMX6		4122
+profpga			MACH_PROFPGA		PROFPGA			4123
+acfx100oc		MACH_ACFX100OC		ACFX100OC		4124
+acfx100nb		MACH_ACFX100NB		ACFX100NB		4125
+capricorn		MACH_CAPRICORN		CAPRICORN		4126
+pisces			MACH_PISCES		PISCES			4127
+aries			MACH_ARIES		ARIES			4128
+cancer			MACH_CANCER		CANCER			4129
+leo			MACH_LEO		LEO			4130
+virgo			MACH_VIRGO		VIRGO			4131
+sagittarius		MACH_SAGITTARIUS	SAGITTARIUS		4132
+devil			MACH_DEVIL		DEVIL			4133
+ballantines		MACH_BALLANTINES	BALLANTINES		4134
+omap3_procerusvpu	MACH_OMAP3_PROCERUSVPU	OMAP3_PROCERUSVPU	4135
+my27			MACH_MY27		MY27			4136
+sun6i			MACH_SUN6I		SUN6I			4137
+sun5i			MACH_SUN5I		SUN5I			4138
+mx512_mx		MACH_MX512_MX		MX512_MX		4139
+kzm9g			MACH_KZM9G		KZM9G			4140
+vdstbn			MACH_VDSTBN		VDSTBN			4141
+cfa10036		MACH_CFA10036		CFA10036		4142
+cfa10049		MACH_CFA10049		CFA10049		4143
+pcm051			MACH_PCM051		PCM051			4144
+vybrid_vf7xx		MACH_VYBRID_VF7XX	VYBRID_VF7XX		4145
+vybrid_vf6xx		MACH_VYBRID_VF6XX	VYBRID_VF6XX		4146
+vybrid_vf5xx		MACH_VYBRID_VF5XX	VYBRID_VF5XX		4147
+vybrid_vf4xx		MACH_VYBRID_VF4XX	VYBRID_VF4XX		4148
+aria_g25		MACH_ARIA_G25		ARIA_G25		4149
+bcm21553		MACH_BCM21553		BCM21553		4150
+smdk5410		MACH_SMDK5410		SMDK5410		4151
+lpc18xx			MACH_LPC18XX		LPC18XX			4152
+oratisparty		MACH_ORATISPARTY	ORATISPARTY		4153
+qseven			MACH_QSEVEN		QSEVEN			4154
+gmv_generic		MACH_GMV_GENERIC	GMV_GENERIC		4155
+th_link_eth		MACH_TH_LINK_ETH	TH_LINK_ETH		4156
+tn_muninn		MACH_TN_MUNINN		TN_MUNINN		4157
+rampage			MACH_RAMPAGE		RAMPAGE			4158
+visstrim_mv10		MACH_VISSTRIM_MV10	VISSTRIM_MV10		4159
+monacotdu		MACH_MONACO_TDU		MONACO_TDU		4160
+monacoul		MACH_MONACO_UL		MONACO_UL		4161
+enrc2u			MACH_ENRC2_U		ENRC2_U			4162
+evitareul		MACH_EVITA_UL		EVITA_UL		4163
+mx28_wilma		MACH_MX28_WILMA		MX28_WILMA		4164
+monacou			MACH_MONACO_U		MONACO_U		4165
+msm8625_ffa		MACH_MSM8625_FFA	MSM8625_FFA		4166
+vpu101			MACH_VPU101		VPU101			4167
+operaul			MACH_OPERA_UL		OPERA_UL		4168
+baileys			MACH_BAILEYS		BAILEYS			4169
+familybox		MACH_FAMILYBOX		FAMILYBOX		4170
+ensemble_mx35		MACH_ENSEMBLE_MX35	ENSEMBLE_MX35		4171
+sc_sps_1		MACH_SC_SPS_1		SC_SPS_1		4172
+ucsimply_sam9260	MACH_UCSIMPLY_SAM9260	UCSIMPLY_SAM9260	4173
+unicorn			MACH_UNICORN		UNICORN			4174
+m9g45a			MACH_M9G45A		M9G45A			4175
+mtwebif			MACH_MTWEBIF		MTWEBIF			4176
+playstone		MACH_PLAYSTONE		PLAYSTONE		4177
+chelsea			MACH_CHELSEA		CHELSEA			4178
+bayern			MACH_BAYERN		BAYERN			4179
+mitwo			MACH_MITWO		MITWO			4180
+mx25_noah		MACH_MX25_NOAH		MX25_NOAH		4181
+stm_b2020		MACH_STM_B2020		STM_B2020		4182
+annax_src		MACH_ANNAX_SRC		ANNAX_SRC		4183
+ionics_stratus		MACH_IONICS_STRATUS	IONICS_STRATUS		4184
+hugo			MACH_HUGO		HUGO			4185
+em300			MACH_EM300		EM300			4186
+mmp3_qseven		MACH_MMP3_QSEVEN	MMP3_QSEVEN		4187
+bosphorus2		MACH_BOSPHORUS2		BOSPHORUS2		4188
+tt2200			MACH_TT2200		TT2200			4189
+ocelot3			MACH_OCELOT3		OCELOT3			4190
+tek_cobra		MACH_TEK_COBRA		TEK_COBRA		4191
+protou			MACH_PROTOU		PROTOU			4192
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/econa/econa.c
--- a/head/sys/arm/econa/econa.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/econa/econa.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/econa/econa.c 226832 2011-10-27 10:21:40Z kevlo $");
+__FBSDID("$FreeBSD: head/sys/arm/econa/econa.c 238545 2012-07-17 03:18:12Z gonzo $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -602,8 +602,6 @@
 	if (error)
 		return (error);
 
-	arm_unmask_irq(rman_get_start(ires));
-
 	return (0);
 }
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/econa/econa_machdep.c
--- a/head/sys/arm/econa/econa_machdep.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/econa/econa_machdep.c	Wed Jul 25 17:18:25 2012 +0300
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/econa/econa_machdep.c 238329 2012-07-10 01:49:50Z imp $");
 
 #define	_ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -103,10 +103,6 @@
 
 struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
 
-extern void *_end;
-
-extern int *end;
-
 struct pcpu __pcpu;
 struct pcpu *pcpup = &__pcpu;
 
@@ -114,7 +110,6 @@
 
 vm_paddr_t phys_avail[10];
 vm_paddr_t dump_avail[4];
-vm_offset_t physical_pages;
 
 struct pv_addr systempage;
 struct pv_addr msgbufpv;
@@ -123,11 +118,6 @@
 struct pv_addr abtstack;
 struct pv_addr kernelstack;
 
-static void *boot_arg1;
-static void *boot_arg2;
-
-static struct trapframe proc0_tf;
-
 /* Static device mappings. */
 static const struct pmap_devmap econa_devmap[] = {
 	{
@@ -186,7 +176,7 @@
 
 
 void *
-initarm(void *arg, void *arg2)
+initarm(struct arm_boot_params *abp)
 {
 	struct pv_addr  kernel_l1pt;
 	volatile uint32_t * ddr = (uint32_t *)0x4000000C;
@@ -198,13 +188,9 @@
 	uint32_t memsize;
 	int mem_info;
 
-
-	boot_arg1 = arg;
-	boot_arg2 = arg2;
 	boothowto = RB_VERBOSE;
-
+	lastaddr = parse_boot_param(abp);
 	set_cpufuncs();
-	lastaddr = fake_preload_metadata();
 	pcpu_init(pcpup, 0, sizeof(struct pcpu));
 	PCPU_SET(curthread, &thread0);
 
@@ -238,7 +224,6 @@
 			    kernel_pt_table[loop].pv_va - KERNVIRTADDR +
 			    KERNPHYSADDR;
 		}
-		i++;
 	}
 	/*
 	 * Allocate a page for the system page mapped to V0x00000000
@@ -347,30 +332,13 @@
 	undefined_handler_address = (u_int)undefinedinstruction_bounce;
 	undefined_init();
 
-	proc_linkup0(&proc0, &thread0);
-	thread0.td_kstack = kernelstack.pv_va;
-	thread0.td_pcb = (struct pcb *)
-		(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
-	thread0.td_pcb->pcb_flags = 0;
-	thread0.td_frame = &proc0_tf;
-	pcpup->pc_curpcb = thread0.td_pcb;
+	init_proc0(kernelstack.pv_va);
 
 	arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
 
 	pmap_curmaxkvaddr = afterkern + L1_S_SIZE * (KERNEL_PT_KERN_NUM - 1);
-
-	/*
-	 * ARM_USE_SMALL_ALLOC uses dump_avail, so it must be filled before
-	 * calling pmap_bootstrap.
-	 */
-	dump_avail[0] = PHYSADDR;
-	dump_avail[1] = PHYSADDR + memsize;
-	dump_avail[2] = 0;
-	dump_avail[3] = 0;
-
-	pmap_bootstrap(freemempos,
-	    KERNVIRTADDR + 3 * memsize,
-	    &kernel_l1pt);
+	arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0]));
+	pmap_bootstrap(freemempos, KERNVIRTADDR + 3 * memsize, &kernel_l1pt);
 
 	msgbufp = (void*)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/_stdint.h
--- a/head/sys/arm/include/_stdint.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/_stdint.h	Wed Jul 25 17:18:25 2012 +0300
@@ -27,7 +27,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/_stdint.h 237517 2012-06-24 04:15:58Z andrew $
  */
 
 #ifndef _MACHINE__STDINT_H_
@@ -149,12 +149,6 @@
 /* Limit of size_t. */
 #define	SIZE_MAX	UINT32_MAX
 
-#ifndef WCHAR_MIN /* Also possibly defined in <wchar.h> */
-/* Limits of wchar_t. */
-#define	WCHAR_MIN	INT32_MIN
-#define	WCHAR_MAX	INT32_MAX
-#endif
-
 /* Limits of wint_t. */
 #define	WINT_MIN	INT32_MIN
 #define	WINT_MAX	INT32_MAX
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/_types.h
--- a/head/sys/arm/include/_types.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/_types.h	Wed Jul 25 17:18:25 2012 +0300
@@ -33,7 +33,7 @@
  *
  *	From: @(#)ansi.h	8.2 (Berkeley) 1/4/94
  *	From: @(#)types.h	8.3 (Berkeley) 1/5/94
- * $FreeBSD: head/sys/arm/include/_types.h 230229 2012-01-16 20:17:51Z das $
+ * $FreeBSD: head/sys/arm/include/_types.h 237517 2012-06-24 04:15:58Z andrew $
  */
 
 #ifndef _MACHINE__TYPES_H_
@@ -105,6 +105,16 @@
 typedef	__uint64_t	__vm_pindex_t;
 typedef	__uint32_t	__vm_size_t;
 
+#ifdef __ARM_EABI__
+typedef	unsigned int	__wchar_t;
+#define	__WCHAR_MIN	0		/* min value for a wchar_t */
+#define	__WCHAR_MAX	__UINT_MAX	/* max value for a wchar_t */
+#else
+typedef	int		__wchar_t;
+#define	__WCHAR_MIN	__INT_MIN	/* min value for a wchar_t */
+#define	__WCHAR_MAX	__INT_MAX	/* max value for a wchar_t */
+#endif
+
 /*
  * Unusual type definitions.
  */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/armreg.h
--- a/head/sys/arm/include/armreg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/armreg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -35,7 +35,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: head/sys/arm/include/armreg.h 234337 2012-04-16 09:38:20Z andrew $
+ * $FreeBSD: head/sys/arm/include/armreg.h 236992 2012-06-13 05:02:51Z imp $
  */
 
 #ifndef MACHINE_ARMREG_H
@@ -327,7 +327,7 @@
 /*
  * ARM Instructions
  *
- *       3 3 2 2 2                              
+ *       3 3 2 2 2
  *       1 0 9 8 7                                                     0
  *      +-------+-------------------------------------------------------+
  *      | cond  |              instruction dependant                    |
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/asmacros.h
--- a/head/sys/arm/include/asmacros.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/asmacros.h	Wed Jul 25 17:18:25 2012 +0300
@@ -34,7 +34,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: head/sys/arm/include/asmacros.h 226443 2011-10-16 17:59:28Z cognet $
+ * $FreeBSD: head/sys/arm/include/asmacros.h 236992 2012-06-13 05:02:51Z imp $
  */
 
 #ifndef	_MACHINE_ASMACROS_H_
@@ -92,7 +92,7 @@
  * This should only be used if the processor is not currently in SVC32
  * mode. The processor mode is switched to SVC mode and the trap frame is
  * stored. The SVC lr field is used to store the previous value of
- * lr in SVC mode.  
+ * lr in SVC mode.
  *
  * NOTE: r13 and r14 are stored separately as a work around for the
  * SA110 rev 2 STM^ bug
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/atags.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/include/atags.h	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,129 @@
+/*-
+ * Copyright (c) 2012 M. 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 THE 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 THE 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.
+ *
+ * $FreeBSD: head/sys/arm/include/atags.h 237069 2012-06-14 14:38:55Z imp $
+ */
+
+#ifndef	__MACHINE_ATAGS_H__
+#define __MACHINE_ATAGS_H__
+
+/*
+ * Linux boot ABI compatable ATAG definitions.  All these structures
+ * assume tight packing, but since they are all uint32_t's, I've not
+ * bothered to do the usual alignment dance.
+ */
+
+#define	LBABI_MAX_COMMAND_LINE  1024
+
+struct arm_lbabi_header
+{
+	uint32_t	size;		/* Size of this node, including header */
+	uint32_t	tag;		/* Node type */
+};
+
+#define	ATAG_NONE       0x00000000	/* End of atags list */
+#define	ATAG_CORE	0x54410001	/* List must start with ATAG_CORE */
+#define	ATAG_MEM	0x54410002	/* Multiple ATAG_MEM nodes possible */
+#define	ATAG_VIDEOTEXT	0x54410003	/* Video parameters */
+#define	ATAG_RAMDISK	0x54410004	/* Describes the ramdisk parameters */
+#define	ATAG_INITRD	0x54410005	/* Deprecated ramdisk -- used va not pa */
+#define	ATAG_INITRD2	0x54420005	/* compressed ramdisk image */
+#define	ATAG_SERIAL	0x54410006	/* 64-bits of serial number */
+#define	ATAG_REVISION	0x54410007	/* Board revision */
+#define	ATAG_VIDEOLFB	0x54410008	/* vesafb framebuffer */
+#define	ATAG_CMDLINE	0x54410009	/* Command line */
+
+/*
+ * ATAG_CORE data
+ */
+struct arm_lbabi_core
+{
+	uint32_t flags;			/* bit 0 == read-only */
+	uint32_t pagesize;
+	uint32_t rootdev;
+};
+		
+/*
+ * ATAG_MEM data -- Can be more than one to describe different
+ * banks.
+ */
+struct arm_lbabi_mem32
+{
+	uint32_t size;
+	uint32_t start;			/* start of physical memory */
+};
+
+/* 
+ * ATAG_INITRD2 - Compressed ramdisk image details
+ */
+struct arm_lbabi_initrd
+{
+	uint32_t start;			/* pa of start */
+	uint32_t size;			/* How big the ram disk is */
+};
+
+/*
+ * ATAG_SERIAL - serial number
+ */
+struct arm_lbabi_serial_number
+{
+	uint32_t low;
+	uint32_t high;
+};
+	
+/*
+ * ATAG_REVISION - board revision
+ */
+struct arm_lbabi_revision
+{
+	uint32_t rev;
+};
+	
+/*
+ * ATAG_CMDLINE - Command line from uboot
+ */
+struct arm_lbabi_command_line
+{
+	char command[1];		/* Minimum command length */
+};
+
+struct arm_lbabi_tag 
+{
+	struct arm_lbabi_header tag_hdr;
+	union {
+		struct arm_lbabi_core tag_core;
+		struct arm_lbabi_mem32 tag_mem;
+		struct arm_lbabi_initrd tag_initrd;
+		struct arm_lbabi_serial_number tag_sn;
+		struct arm_lbabi_revision tag_rev;
+		struct arm_lbabi_command_line tag_cmd;
+	} u;
+};
+
+#define	ATAG_TAG(a)  (a)->tag_hdr.tag
+#define ATAG_SIZE(a) (a)->tag_hdr.size
+#define ATAG_NEXT(a) (struct arm_lbabi_tag *)((char *)(a) + ATAG_SIZE(a))
+
+#endif /* __MACHINE_ATAGS_H__ */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/atomic.h
--- a/head/sys/arm/include/atomic.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/atomic.h	Wed Jul 25 17:18:25 2012 +0300
@@ -33,7 +33,7 @@
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/atomic.h 238347 2012-07-10 14:21:25Z imp $
  */
 
 #ifndef	_MACHINE_ATOMIC_H_
@@ -285,7 +285,6 @@
 	return (start);
 }
 
-	    
 #endif /* _KERNEL */
 
 static __inline int
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/blockio.h
--- a/head/sys/arm/include/blockio.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/blockio.h	Wed Jul 25 17:18:25 2012 +0300
@@ -14,7 +14,7 @@
  *    documentation and/or other materials provided with the distribution.
  * 3. The name of the author may not be used to endorse or promote products
  *    derived from this software without specific prior written permission.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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.
@@ -26,7 +26,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/blockio.h 236992 2012-06-13 05:02:51Z imp $
  *
  */
 /*
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/board.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/include/board.h	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,62 @@
+/*-
+ * Copyright (c) 2012 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.
+ */
+
+/* $FreeBSD: head/sys/arm/include/board.h 238189 2012-07-07 05:02:39Z imp $ */
+
+#ifndef _ARM_INCLUDE_BOARD_H_
+#define _ARM_INCLUDE_BOARD_H_
+
+#include <sys/linker_set.h>
+
+typedef long (arm_board_init_fn)(void);
+
+struct arm_board {
+	int		board_id;	/* Board ID from the boot loader */
+	const char	*board_name;	/* Human readable name */
+	arm_board_init_fn *board_init;	/* Board initialize code */
+};
+ 
+#if defined(ARM_MANY_BOARD)
+
+#include "board_id.h"
+
+#define ARM_BOARD(id, name)     \
+	static struct arm_board this_board = { \
+		.board_id = ARM_BOARD_ID_ ## id, \
+		.board_name = name, \
+		.board_init = board_init, \
+	}; \
+	DATA_SET(arm_boards, this_board);
+#define BOARD_INIT static
+
+#else /* !ARM_MANY_BOARD */
+
+#define ARM_BOARD(id, name)
+extern arm_board_init_fn board_init;
+#define BOARD_INIT
+
+#endif /* ARM_MANY_BOARD */
+
+#endif /* _ARM_INCLUDE_BOARD_H_ */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/cpu.h
--- a/head/sys/arm/include/cpu.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/cpu.h	Wed Jul 25 17:18:25 2012 +0300
@@ -1,13 +1,13 @@
 /* $NetBSD: cpu.h,v 1.2 2001/02/23 21:23:52 reinoud Exp $ */
-/* $FreeBSD$ */
+/* $FreeBSD: head/sys/arm/include/cpu.h 236524 2012-06-03 18:34:32Z imp $ */
 
 #ifndef MACHINE_CPU_H
 #define MACHINE_CPU_H
 
 #include <machine/armreg.h>
 
-void    cpu_halt(void);
-void    swi_vm(void *);
+void	cpu_halt(void);
+void	swi_vm(void *);
 
 #ifdef _KERNEL
 static __inline uint64_t
@@ -25,8 +25,8 @@
 
 #define TRAPF_PC(tfp)		((tfp)->tf_pc)
 
-#define cpu_getstack(td)        ((td)->td_frame->tf_usr_sp)
-#define cpu_setstack(td, sp)    ((td)->td_frame->tf_usr_sp = (sp))
+#define cpu_getstack(td)	((td)->td_frame->tf_usr_sp)
+#define cpu_setstack(td, sp)	((td)->td_frame->tf_usr_sp = (sp))
 #define cpu_spinwait()		/* nothing */
 
 #define ARM_NVEC		8
@@ -34,12 +34,20 @@
 
 extern vm_offset_t vector_page;
 
+struct arm_boot_params {
+	register_t	abp_size;	/* Size of this structure */
+	register_t	abp_r0;		/* r0 from the boot loader */
+	register_t	abp_r1;		/* r1 from the boot loader */
+	register_t	abp_r2;		/* r2 from the boot loader */
+	register_t	abp_r3;		/* r3 from the boot loader */
+};
+
 void	arm_vector_init(vm_offset_t, int);
 void	fork_trampoline(void);
 void	identify_arm_cpu(void);
-void	*initarm(void *, void *);
+void	*initarm(struct arm_boot_params *);
 
 extern char btext[];
 extern char etext[];
-int badaddr_read (void *, size_t, void *);
+int badaddr_read(void *, size_t, void *);
 #endif /* !MACHINE_CPU_H */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/cpufunc.h
--- a/head/sys/arm/include/cpufunc.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/cpufunc.h	Wed Jul 25 17:18:25 2012 +0300
@@ -38,7 +38,7 @@
  *
  * Prototypes for cpu, mmu and tlb related functions.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/cpufunc.h 236992 2012-06-13 05:02:51Z imp $
  */
 
 #ifndef _MACHINE_CPUFUNC_H_
@@ -315,7 +315,7 @@
 
 void	sa11x0_context_switch	(void);
 void	sa11x0_cpu_sleep	(int mode);
- 
+
 void	sa11x0_setup		(char *string);
 #endif
 
@@ -471,7 +471,7 @@
   defined(CPU_FA526) || defined(CPU_FA626TE) ||				\
   defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) ||		\
   defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342)
-  
+
 void	armv4_tlb_flushID	(void);
 void	armv4_tlb_flushI	(void);
 void	armv4_tlb_flushD	(void);
@@ -526,7 +526,7 @@
 void	xscale_context_switch	(void);
 
 void	xscale_setup		(char *string);
-#endif	/* CPU_XSCALE_80200 || CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 
+#endif	/* CPU_XSCALE_80200 || CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425
 	   CPU_XSCALE_80219 */
 
 #ifdef	CPU_XSCALE_81342
@@ -628,7 +628,7 @@
 
 extern int	arm_pdcache_size;	/* and unified */
 extern int	arm_pdcache_line_size;
-extern int	arm_pdcache_ways; 
+extern int	arm_pdcache_ways;
 
 extern int	arm_pcache_type;
 extern int	arm_pcache_unified;
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/elf.h
--- a/head/sys/arm/include/elf.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/elf.h	Wed Jul 25 17:18:25 2012 +0300
@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/elf.h 237430 2012-06-22 06:38:31Z kib $
  */
 
 #ifndef _MACHINE_ELF_H_
@@ -82,6 +82,7 @@
 #define	AT_NCPUS	19	/* Number of CPUs. */
 #define	AT_PAGESIZES	20	/* Pagesizes. */
 #define	AT_PAGESIZESLEN	21	/* Number of pagesizes. */
+#define	AT_TIMEKEEP	22	/* Pointer to timehands. */
 #define	AT_STACKPROT	23	/* Initial stack protection. */
 
 #define AT_COUNT        24      /* Count of defined aux entry types. */
@@ -99,8 +100,8 @@
 #define	ELF_TARG_MACH	EM_ARM
 #define	ELF_TARG_VER	1
 
-/* 
- * Magic number for the elf trampoline, chosen wisely to be an immediate 
+/*
+ * Magic number for the elf trampoline, chosen wisely to be an immediate
  * value.
  */
 #define MAGIC_TRAMP_NUMBER	0x5c000003
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/endian.h
--- a/head/sys/arm/include/endian.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/endian.h	Wed Jul 25 17:18:25 2012 +0300
@@ -27,7 +27,7 @@
  *
  *	@(#)endian.h	8.1 (Berkeley) 6/10/93
  * $NetBSD: endian.h,v 1.7 1999/08/21 05:53:51 simonb Exp $
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/endian.h 236992 2012-06-13 05:02:51Z imp $
  */
 
 #ifndef _ENDIAN_H_
@@ -78,7 +78,7 @@
 
 	return ((_x >> 56) | ((_x >> 40) & 0xff00) | ((_x >> 24) & 0xff0000) |
 	    ((_x >> 8) & 0xff000000) | ((_x << 8) & ((__uint64_t)0xff << 32)) |
-	    ((_x << 24) & ((__uint64_t)0xff << 40)) | 
+	    ((_x << 24) & ((__uint64_t)0xff << 40)) |
 	    ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56)));
 }
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/fdt.h
--- a/head/sys/arm/include/fdt.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/fdt.h	Wed Jul 25 17:18:25 2012 +0300
@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/fdt.h 236992 2012-06-13 05:02:51Z imp $
  */
 
 #ifndef _MACHINE_FDT_H_
@@ -44,7 +44,7 @@
 /* Max interrupt number */
 #define FDT_INTR_MAX	NIRQ
 
-/* Map phandle/intpin pair to global IRQ number */ 
+/* Map phandle/intpin pair to global IRQ number */
 #define	FDT_MAP_IRQ(node, pin)	(pin)
 
 /*
@@ -57,6 +57,7 @@
 	vm_size_t	mr_size;
 };
 
+int fdt_localbus_devmap(phandle_t, struct pmap_devmap *, int, int *);
 int fdt_pci_devmap(phandle_t, struct pmap_devmap *devmap, vm_offset_t,
     vm_offset_t);
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/fp.h
--- a/head/sys/arm/include/fp.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/fp.h	Wed Jul 25 17:18:25 2012 +0300
@@ -42,7 +42,7 @@
  *
  * Created      : 10/10/95
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/fp.h 236992 2012-06-13 05:02:51Z imp $
  */
 
 #ifndef _MACHINE_FP_H
@@ -77,7 +77,7 @@
  * Type for a saved FP context, if we want to translate the context to a
  * user-readable form
  */
- 
+
 typedef struct {
 	u_int32_t fpsr;
 	fp_extended_precision_t regs[8];
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/frame.h
--- a/head/sys/arm/include/frame.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/frame.h	Wed Jul 25 17:18:25 2012 +0300
@@ -42,7 +42,7 @@
  *
  * Created      : 30/09/94
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/frame.h 236992 2012-06-13 05:02:51Z imp $
  *
  */
 
@@ -148,7 +148,7 @@
 	u_int	sf_r7;
 	u_int	sf_pc;
 };
- 
+
 /*
  * Stack frame. Used during stack traces (db_trace.c)
  */
@@ -162,5 +162,3 @@
 #endif /* !_LOCORE */
 
 #endif /* _MACHINE_FRAME_H_ */
-  
-/* End of frame.h */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/ieee.h
--- a/head/sys/arm/include/ieee.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/ieee.h	Wed Jul 25 17:18:25 2012 +0300
@@ -39,7 +39,7 @@
  *
  *	@(#)ieee.h	8.1 (Berkeley) 6/11/93
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/ieee.h 236992 2012-06-13 05:02:51Z imp $
  *
  */
 
@@ -124,7 +124,7 @@
 	u_int	dbl_sign:1;
 #if _IEEE_WORD_ORDER == _BIG_ENDIAN
 	u_int   dbl_fracl;
-#endif  
+#endif
 #endif
 };
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/in_cksum.h
--- a/head/sys/arm/include/in_cksum.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/in_cksum.h	Wed Jul 25 17:18:25 2012 +0300
@@ -33,7 +33,7 @@
  *	from tahoe:	in_cksum.c	1.2	86/01/05
  *	from:		@(#)in_cksum.c	1.3 (Berkeley) 1/19/91
  *	from: Id: in_cksum.c,v 1.8 1995/12/03 18:35:19 bde Exp
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/in_cksum.h 236992 2012-06-13 05:02:51Z imp $
  */
 
 #ifndef _MACHINE_IN_CKSUM_H_
@@ -46,7 +46,9 @@
 u_short in_addword(u_short sum, u_short b);
 u_short in_cksum_skip(struct mbuf *m, int len, int skip);
 u_int do_cksum(const void *, int);
+#if defined(IPVERSION) && (IPVERSION == 4)
 u_int in_cksum_hdr(const struct ip *);
+#endif
 
 static __inline u_short
 in_pseudo(u_int sum, u_int b, u_int c)
@@ -54,7 +56,7 @@
 	__asm __volatile("adds %0, %0, %1\n"
 	    		"adcs %0, %0, %2\n"
 			"adc %0, %0, #0\n"
-			: "+r" (sum) 
+			: "+r" (sum)
 			: "r" (b), "r" (c));
 	sum = (sum & 0xffff) + (sum >> 16);
 	if (sum > 0xffff)
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/intr.h
--- a/head/sys/arm/include/intr.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/intr.h	Wed Jul 25 17:18:25 2012 +0300
@@ -32,7 +32,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/intr.h 236992 2012-06-13 05:02:51Z imp $
  *
  */
 
@@ -59,8 +59,8 @@
 int arm_get_next_irq(int);
 void arm_mask_irq(uintptr_t);
 void arm_unmask_irq(uintptr_t);
-void arm_setup_irqhandler(const char *, int (*)(void*), void (*)(void*), 
-    void *, int, int, void **);    
+void arm_setup_irqhandler(const char *, int (*)(void*), void (*)(void*),
+    void *, int, int, void **);
 int arm_remove_irqhandler(int, void *);
 extern void (*arm_post_filter)(void *);
 #endif	/* _MACHINE_INTR_H */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/katelib.h
--- a/head/sys/arm/include/katelib.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/katelib.h	Wed Jul 25 17:18:25 2012 +0300
@@ -43,13 +43,13 @@
  *
  * This should not really be a separate header file. Eventually I will merge
  * this into other header files once I have decided where the declarations
- * should go. 
+ * should go.
  *
  * Created      : 18/09/94
  *
  * Based on kate/katelib/prototypes.h
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/katelib.h 236992 2012-06-13 05:02:51Z imp $
  */
 
 /*
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/kdb.h
--- a/head/sys/arm/include/kdb.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/kdb.h	Wed Jul 25 17:18:25 2012 +0300
@@ -23,7 +23,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/kdb.h 236307 2012-05-30 13:31:08Z gber $
  */
 
 #ifndef _MACHINE_KDB_H_
@@ -46,11 +46,14 @@
 static __inline void
 kdb_cpu_sync_icache(unsigned char *addr, size_t size)
 {
+
+	cpu_icache_sync_all();
 }
 
 static __inline void
 kdb_cpu_trap(int type, int code)
 {
+
 	cpu_idcache_wbinv_all();
 }
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/machdep.h
--- a/head/sys/arm/include/machdep.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/machdep.h	Wed Jul 25 17:18:25 2012 +0300
@@ -1,15 +1,26 @@
 /* $NetBSD: machdep.h,v 1.7 2002/02/21 02:52:21 thorpej Exp $ */
-/* $FreeBSD$ */
+/* $FreeBSD: head/sys/arm/include/machdep.h 237045 2012-06-14 04:18:56Z imp $ */
 
 #ifndef _MACHDEP_BOOT_MACHDEP_H_
 #define _MACHDEP_BOOT_MACHDEP_H_
 
 /* misc prototypes used by the many arm machdeps */
 void arm_lock_cache_line(vm_offset_t);
-vm_offset_t fake_preload_metadata(void);
+void init_proc0(vm_offset_t kstack);
 void halt(void);
 void data_abort_handler(trapframe_t *);
 void prefetch_abort_handler(trapframe_t *);
 void undefinedinstruction_bounce(trapframe_t *);
 
+/* Early boot related helper functions */
+struct arm_boot_params;
+vm_offset_t default_parse_boot_param(struct arm_boot_params *abp);
+vm_offset_t freebsd_parse_boot_param(struct arm_boot_params *abp);
+vm_offset_t linux_parse_boot_param(struct arm_boot_params *abp);
+vm_offset_t fake_preload_metadata(struct arm_boot_params *abp);
+vm_offset_t parse_boot_param(struct arm_boot_params *abp);
+
+/* Setup standard arrays */
+void arm_dump_avail_init( vm_offset_t memsize, size_t max);
+
 #endif /* !_MACHINE_MACHDEP_H_ */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/param.h
--- a/head/sys/arm/include/param.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/param.h	Wed Jul 25 17:18:25 2012 +0300
@@ -35,7 +35,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)param.h	5.8 (Berkeley) 6/28/91
- * $FreeBSD: head/sys/arm/include/param.h 224207 2011-07-19 00:37:24Z attilio $
+ * $FreeBSD: head/sys/arm/include/param.h 236992 2012-06-13 05:02:51Z imp $
  */
 
 #ifndef _ARM_INCLUDE_PARAM_H_
@@ -56,9 +56,13 @@
 #define	MACHINE		"arm"
 #endif
 #ifndef MACHINE_ARCH
+#ifdef __ARMEB__
+#define	MACHINE_ARCH	"armeb"
+#else
 #define	MACHINE_ARCH	"arm"
 #endif
-#define	MID_MACHINE	MID_ARM6 
+#endif
+#define	MID_MACHINE	MID_ARM6
 
 #if defined(SMP) || defined(KLD_MODULE)
 #ifndef MAXCPU
@@ -74,7 +78,7 @@
  * ALIGNED_POINTER is a boolean macro that checks whether an address
  * is valid to fetch data elements of type t from on this architecture.
  * This does not reflect the optimal alignment, just the possibility
- * (within reasonable limits). 
+ * (within reasonable limits).
  */
 #define	ALIGNED_POINTER(p, t)	((((unsigned)(p)) & (sizeof(t)-1)) == 0)
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/pcb.h
--- a/head/sys/arm/include/pcb.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/pcb.h	Wed Jul 25 17:18:25 2012 +0300
@@ -32,7 +32,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/pcb.h 234785 2012-04-29 11:04:31Z dim $
  */
 
 #ifndef	_MACHINE_PCB_H_
@@ -94,7 +94,7 @@
 
 #ifdef _KERNEL
 
-void    savectx(struct pcb *);
+void    savectx(struct pcb *) __returns_twice;
 #endif	/* _KERNEL */
 
 #endif	/* !_MACHINE_PCB_H_ */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/pmap.h
--- a/head/sys/arm/include/pmap.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/pmap.h	Wed Jul 25 17:18:25 2012 +0300
@@ -44,7 +44,7 @@
  *      from: @(#)pmap.h        7.4 (Berkeley) 5/12/91
  * 	from: FreeBSD: src/sys/i386/include/pmap.h,v 1.70 2000/11/30
  *
- * $FreeBSD: head/sys/arm/include/pmap.h 228530 2011-12-15 12:14:15Z raj $
+ * $FreeBSD: head/sys/arm/include/pmap.h 237168 2012-06-16 18:56:19Z alc $
  */
 
 #ifndef _MACHINE_PMAP_H_
@@ -58,7 +58,7 @@
 #define PTE_NOCACHE	0
 #define PTE_CACHE	1
 #define PTE_PAGETABLE	2
- 
+
 #ifndef LOCORE
 
 #include <sys/queue.h>
@@ -78,6 +78,7 @@
 
 #define	pmap_page_get_memattr(m)	VM_MEMATTR_DEFAULT
 #define	pmap_page_is_mapped(m)	(!TAILQ_EMPTY(&(m)->md.pv_list))
+#define	pmap_page_is_write_mapped(m)	(((m)->aflags & PGA_WRITEABLE) != 0)
 #define	pmap_page_set_memattr(m, ma)	(void)0
 
 /*
@@ -413,7 +414,7 @@
 extern pt_entry_t		pte_l2_s_prot_u;
 extern pt_entry_t		pte_l2_s_prot_w;
 extern pt_entry_t		pte_l2_s_prot_mask;
- 
+
 extern pt_entry_t		pte_l1_s_proto;
 extern pt_entry_t		pte_l1_c_proto;
 extern pt_entry_t		pte_l2_s_proto;
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/pmc_mdep.h
--- a/head/sys/arm/include/pmc_mdep.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/pmc_mdep.h	Wed Jul 25 17:18:25 2012 +0300
@@ -23,7 +23,7 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: head/sys/arm/include/pmc_mdep.h 233628 2012-03-28 20:58:30Z fabient $
+ * $FreeBSD: head/sys/arm/include/pmc_mdep.h 236997 2012-06-13 06:38:25Z fabient $
  */
 
 #ifndef _MACHINE_PMC_MDEP_H_
@@ -50,9 +50,23 @@
 	struct pmc_md_xscale_pmc	pm_xscale;
 };
 
-#define	PMC_TRAPFRAME_TO_PC(TF)	((TF)->tf_pc)
-#define	PMC_TRAPFRAME_TO_FP(TF)	((TF)->tf_usr_lr)
-#define	PMC_TRAPFRAME_TO_SP(TF)	((TF)->tf_usr_sp)
+#define	PMC_IN_KERNEL_STACK(S,START,END)		\
+	((S) >= (START) && (S) < (END))
+#define	PMC_IN_KERNEL(va) (((va) >= USRSTACK) &&	\
+	((va) < VM_MAX_KERNEL_ADDRESS))
+
+#define	PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS)
+
+#define	PMC_TRAPFRAME_TO_PC(TF)		((TF)->tf_pc)
+#define	PMC_TRAPFRAME_TO_FP(TF)		((TF)->tf_r11)
+#define	PMC_TRAPFRAME_TO_SVC_SP(TF)	((TF)->tf_svc_sp)
+#define	PMC_TRAPFRAME_TO_USR_SP(TF)	((TF)->tf_usr_sp)
+
+/* Build a fake kernel trapframe from current instruction pointer. */
+#define PMC_FAKE_TRAPFRAME(TF)						\
+	do {								\
+	__asm __volatile("mov %0, pc" : "=r" ((TF)->tf_pc));		\
+	} while (0)
 
 /*
  * Prototypes
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/profile.h
--- a/head/sys/arm/include/profile.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/profile.h	Wed Jul 25 17:18:25 2012 +0300
@@ -31,14 +31,14 @@
  * SUCH DAMAGE.
  *
  *	@(#)profile.h	8.1 (Berkeley) 6/11/93
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/profile.h 236992 2012-06-13 05:02:51Z imp $
  */
 
 #ifndef _MACHINE_PROFILE_H_
 #define	_MACHINE_PROFILE_H_
 
 /*
- * Config generates something to tell the compiler to align functions on 32 
+ * Config generates something to tell the compiler to align functions on 32
  * byte boundaries.  A strict alignment is good for keeping the tables small.
  */
 #define	FUNCTION_ALIGNMENT	16
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/pte.h
--- a/head/sys/arm/include/pte.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/pte.h	Wed Jul 25 17:18:25 2012 +0300
@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/pte.h 236992 2012-06-13 05:02:51Z imp $
  */
 
 #ifndef _MACHINE_PTE_H_
@@ -58,7 +58,7 @@
  * was allocated for a PT then the other 3KB would also get mapped
  * whenever the 1KB was mapped.
  */
- 
+
 #define PT_RSIZE	0x0400		/* Real page table size */
 #define PT_SIZE		0x1000
 #define PD_SIZE		0x4000
@@ -315,7 +315,7 @@
  *
  * Cache attributes with L2 present, S = 0
  * T E X C B   L1 i-cache L1 d-cache L1 DC WP  L2 cacheable write coalesce
- * 0 0 0 0 0 	N	  N 		- 	N		N 
+ * 0 0 0 0 0 	N	  N 		- 	N		N
  * 0 0 0 0 1	N	  N		-	N		Y
  * 0 0 0 1 0	Y	  Y		WT	N		Y
  * 0 0 0 1 1	Y	  Y		WB	Y		Y
@@ -342,7 +342,7 @@
  *
   * Cache attributes with L2 present, S = 1
  * T E X C B   L1 i-cache L1 d-cache L1 DC WP  L2 cacheable write coalesce
- * 0 0 0 0 0 	N	  N 		- 	N		N 
+ * 0 0 0 0 0 	N	  N 		- 	N		N
  * 0 0 0 0 1	N	  N		-	N		Y
  * 0 0 0 1 0	Y	  Y		-	N		Y
  * 0 0 0 1 1	Y	  Y		WT	Y		Y
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/resource.h
--- a/head/sys/arm/include/resource.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/resource.h	Wed Jul 25 17:18:25 2012 +0300
@@ -12,7 +12,7 @@
  * no representations about the suitability of this software for any
  * purpose.  It is provided "as is" without express or implied
  * warranty.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''.  M.I.T. DISCLAIMS
  * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
@@ -26,7 +26,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/resource.h 236992 2012-06-13 05:02:51Z imp $
  */
 
 #ifndef _MACHINE_RESOURCE_H_
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/stack.h
--- a/head/sys/arm/include/stack.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/stack.h	Wed Jul 25 17:18:25 2012 +0300
@@ -5,28 +5,28 @@
  * Mach Operating System
  * Copyright (c) 1991,1990 Carnegie Mellon University
  * All Rights Reserved.
- * 
+ *
  * Permission to use, copy, modify and distribute this software and its
  * documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  * thereof, and that both notices appear in supporting documentation.
- * 
+ *
  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- * 
+ *
  * Carnegie Mellon requests users of this software to return to
- * 
+ *
  *  Software Distribution Coordinator  or  Software.Distribution at CS.CMU.EDU
  *  School of Computer Science
  *  Carnegie Mellon University
  *  Pittsburgh PA 15213-3890
- * 
+ *
  * any improvements or extensions that they make and grant Carnegie the
  * rights to redistribute these changes.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/include/stack.h 236992 2012-06-13 05:02:51Z imp $
  */
 
 #ifndef _MACHINE_STACK_H_
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/vdso.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/include/vdso.h	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,34 @@
+/*-
+ * Copyright 2012 Konstantin Belousov <kib at FreeBSD.ORG>.
+ * 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 THE AUTHOR ``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 AUTHOR 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.
+ *
+ * $FreeBSD: head/sys/arm/include/vdso.h 237433 2012-06-22 07:06:40Z kib $
+ */
+
+#ifndef _ARM_VDSO_H
+#define	_ARM_VDSO_H
+
+#define	VDSO_TIMEHANDS_MD			\
+	uint32_t	th_res[8];
+
+#endif
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/include/vmparam.h
--- a/head/sys/arm/include/vmparam.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/include/vmparam.h	Wed Jul 25 17:18:25 2012 +0300
@@ -28,7 +28,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: head/sys/arm/include/vmparam.h 225995 2011-10-04 17:00:50Z marcel $
+ * $FreeBSD: head/sys/arm/include/vmparam.h 236992 2012-06-13 05:02:51Z imp $
  */
 
 #ifndef	_MACHINE_VMPARAM_H_
@@ -104,7 +104,7 @@
 
 #define VM_MIN_ADDRESS          (0x00001000)
 #ifdef ARM_USE_SMALL_ALLOC
-/* 
+/*
  * ARM_KERN_DIRECTMAP is used to make sure there's enough space between
  * VM_MAXUSER_ADDRESS and KERNBASE to map the whole memory.
  * It has to be a compile-time constant, even if arm_init_smallalloc(),
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/mv/discovery/discovery.c
--- a/head/sys/arm/mv/discovery/discovery.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/mv/discovery/discovery.c	Wed Jul 25 17:18:25 2012 +0300
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/mv/discovery/discovery.c 235609 2012-05-18 14:41:14Z gber $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -43,6 +43,30 @@
 #include <arm/mv/mvvar.h>
 #include <arm/mv/mvwin.h>
 
+/*
+ * Virtual address space layout:
+ * -----------------------------
+ * 0x0000_0000 - 0xBFFF_FFFF	: User Process (3 GB)
+ * 0xC000_0000 - virtual_avail	: Kernel Reserved (text, data, page tables,
+ * 				: stack etc.)
+ * virtual-avail - 0xEFFF_FFFF	: KVA (virtual_avail is typically < 0xc0a0_0000)
+ * 0xF000_0000 - 0xF0FF_FFFF	: No-Cache allocation area (16 MB)
+ * 0xF100_0000 - 0xF10F_FFFF	: SoC Integrated devices registers range (1 MB)
+ * 0xF110_0000 - 0xF11F_FFFF	: PCI-Express I/O space (1MB)
+ * 0xF120_0000 - 0xF12F_FFFF	: PCI I/O space (1MB)
+ * 0xF130_0000 - 0xF52F_FFFF	: PCI-Express memory space (64MB)
+ * 0xF530_0000 - 0xF92F_FFFF	: PCI memory space (64MB)
+ * 0xF930_0000 - 0xF93F_FFFF	: Device Bus: BOOT (1 MB)
+ * 0xF940_0000 - 0xF94F_FFFF	: Device Bus: CS0 (1 MB)
+ * 0xF950_0000 - 0xFB4F_FFFF	: Device Bus: CS1 (32 MB)
+ * 0xFB50_0000 - 0xFB5F_FFFF	: Device Bus: CS2 (1 MB)
+ * 0xFB60_0000 - 0xFFFE_FFFF	: Unused (~74MB)
+ * 0xFFFF_0000 - 0xFFFF_0FFF	: 'High' vectors page (4 kB)
+ * 0xFFFF_1000 - 0xFFFF_1FFF	: ARM_TP_ADDRESS/RAS page (4 kB)
+ * 0xFFFF_2000 - 0xFFFF_FFFF	: Unused (56 kB)
+ */
+
+
 struct resource_spec mv_gpio_res[] = {
 	{ SYS_RES_MEMORY,	0,	RF_ACTIVE },
 	{ SYS_RES_IRQ,		0,	RF_ACTIVE },
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/mv/files.mv
--- a/head/sys/arm/mv/files.mv	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/mv/files.mv	Wed Jul 25 17:18:25 2012 +0300
@@ -1,4 +1,4 @@
-# $FreeBSD: head/sys/arm/mv/files.mv 227730 2011-11-19 16:30:06Z raj $
+# $FreeBSD: head/sys/arm/mv/files.mv 235609 2012-05-18 14:41:14Z gber $
 #
 # The Marvell CPU cores
 # - Compliant with V5TE architecture
@@ -22,6 +22,7 @@
 arm/mv/common.c			standard
 arm/mv/gpio.c			standard
 arm/mv/ic.c			standard
+arm/mv/mv_localbus.c		standard
 arm/mv/mv_machdep.c		standard
 arm/mv/mv_pci.c			optional	pci
 arm/mv/mv_sata.c		optional	ata | atamvsata
@@ -30,6 +31,7 @@
 
 dev/cesa/cesa.c			optional	cesa
 dev/mge/if_mge.c		optional	mge
+dev/nand/nfc_mv.c		optional	nand
 dev/mvs/mvs_soc.c		optional	mvs
 dev/uart/uart_dev_ns8250.c	optional	uart
 dev/usb/controller/ehci_mv.c	optional	ehci
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/mv/mv_localbus.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/arm/mv/mv_localbus.c	Wed Jul 25 17:18:25 2012 +0300
@@ -0,0 +1,490 @@
+/*-
+ * Copyright (c) 2012 Semihalf.
+ * 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 THE 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 THE 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: head/sys/arm/mv/mv_localbus.c 235656 2012-05-19 18:16:49Z marcel $");
+
+#include "opt_platform.h"
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/ktr.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#include <sys/bus.h>
+#include <sys/rman.h>
+#include <sys/malloc.h>
+
+#include <machine/fdt.h>
+
+#include <dev/ofw/ofw_bus.h>
+#include <dev/ofw/ofw_bus_subr.h>
+#include <dev/ofw/openfirm.h>
+
+#include "dev/fdt/fdt_common.h"
+#include "ofw_bus_if.h"
+
+#include <arm/mv/mvwin.h>
+
+#ifdef DEBUG
+#define debugf(fmt, args...) do { printf("%s(): ", __func__);	\
+    printf(fmt,##args); } while (0)
+#else
+#define debugf(fmt, args...)
+#endif
+
+#define MV_LOCALBUS_MAX_BANKS		8
+#define MV_LOCALBUS_MAX_BANK_CELLS	4
+
+static MALLOC_DEFINE(M_LOCALBUS, "localbus", "localbus devices information");
+
+struct localbus_bank {
+	vm_offset_t	va;		/* VA of the bank */
+	vm_paddr_t	pa;		/* physical address of the bank */
+	vm_size_t	size;		/* bank size */
+	uint8_t		mapped;		/* device memory has mapping */
+};
+
+struct localbus_softc {
+	device_t		sc_dev;
+	bus_space_handle_t	sc_bsh;
+	bus_space_tag_t		sc_bst;
+	int			sc_rid;
+
+	struct localbus_bank	*sc_banks;
+};
+
+struct localbus_devinfo {
+	struct ofw_bus_devinfo	di_ofw;
+	struct resource_list	di_res;
+	int			di_bank;
+};
+
+struct localbus_va_entry {
+	int8_t		bank;
+	vm_offset_t 	va;
+	vm_size_t 	size;
+};
+
+/*
+ * Prototypes.
+ */
+static int localbus_probe(device_t);
+static int localbus_attach(device_t);
+static int localbus_print_child(device_t, device_t);
+
+static struct resource *localbus_alloc_resource(device_t, device_t, int,
+    int *, u_long, u_long, u_long, u_int);
+static struct resource_list *localbus_get_resource_list(device_t, device_t);
+
+static ofw_bus_get_devinfo_t localbus_get_devinfo;
+
+/*
+ * Bus interface definition.
+ */
+static device_method_t localbus_methods[] = {
+	/* Device interface */
+	DEVMETHOD(device_probe,		localbus_probe),
+	DEVMETHOD(device_attach,	localbus_attach),
+	DEVMETHOD(device_detach,	bus_generic_detach),
+	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
+	DEVMETHOD(device_suspend,	bus_generic_suspend),
+	DEVMETHOD(device_resume,	bus_generic_resume),
+
+	/* Bus interface */
+	DEVMETHOD(bus_print_child,	localbus_print_child),
+	DEVMETHOD(bus_alloc_resource,	localbus_alloc_resource),
+	DEVMETHOD(bus_release_resource,	bus_generic_release_resource),
+	DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
+	DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
+	DEVMETHOD(bus_setup_intr,	bus_generic_setup_intr),
+	DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
+	DEVMETHOD(bus_get_resource_list, localbus_get_resource_list),
+
+	/* OFW bus interface */
+	DEVMETHOD(ofw_bus_get_devinfo,	localbus_get_devinfo),
+	DEVMETHOD(ofw_bus_get_compat,	ofw_bus_gen_get_compat),
+	DEVMETHOD(ofw_bus_get_model,	ofw_bus_gen_get_model),
+	DEVMETHOD(ofw_bus_get_name,	ofw_bus_gen_get_name),
+	DEVMETHOD(ofw_bus_get_node,	ofw_bus_gen_get_node),
+	DEVMETHOD(ofw_bus_get_type,	ofw_bus_gen_get_type),
+
+	{ 0, 0 }
+};
+
+static driver_t localbus_driver = {
+	"localbus",
+	localbus_methods,
+	sizeof(struct localbus_softc)
+};
+
+const struct localbus_va_entry localbus_virtmap[] = {
+	{  0, MV_DEV_BOOT_BASE,		MV_DEV_BOOT_SIZE },
+	{  1, MV_DEV_CS0_BASE,		MV_DEV_CS0_SIZE },
+	{  2, MV_DEV_CS1_BASE,		MV_DEV_CS1_SIZE },
+	{  3, MV_DEV_CS2_BASE,		MV_DEV_CS2_SIZE },
+
+	{ -1, 0, 0 }
+};
+
+static struct localbus_bank localbus_banks[MV_LOCALBUS_MAX_BANKS];
+
+devclass_t localbus_devclass;
+
+DRIVER_MODULE(localbus, fdtbus, localbus_driver, localbus_devclass, 0, 0);
+
+static int
+fdt_localbus_reg_decode(phandle_t node, struct localbus_softc *sc,
+    struct localbus_devinfo *di)
+{
+	u_long start, end, count;
+	pcell_t *reg, *regptr;
+	pcell_t addr_cells, size_cells;
+	int tuple_size, tuples;
+	int i, rv, bank;
+
+	if (fdt_addrsize_cells(OF_parent(node), &addr_cells, &size_cells) != 0)
+		return (ENXIO);
+
+	tuple_size = sizeof(pcell_t) * (addr_cells + size_cells);
+	tuples = OF_getprop_alloc(node, "reg", tuple_size, (void **)&reg);
+	debugf("addr_cells = %d, size_cells = %d\n", addr_cells, size_cells);
+	debugf("tuples = %d, tuple size = %d\n", tuples, tuple_size);
+	if (tuples <= 0)
+		/* No 'reg' property in this node. */
+		return (0);
+
+	regptr = reg;
+	for (i = 0; i < tuples; i++) {
+
+		bank = fdt_data_get((void *)regptr, 1);
+
+		if (bank >= MV_LOCALBUS_MAX_BANKS) {
+			device_printf(sc->sc_dev, "bank number [%d] out of "
+			    "range\n", bank);
+			continue;
+		}
+
+		/*
+		 * If device doesn't have virtual to physical mapping don't add
+		 * resources
+		 */
+		if (!(sc->sc_banks[bank].mapped)) {
+			device_printf(sc->sc_dev, "device [%d]: missing memory "
+			    "mapping\n", bank);
+			continue;
+		}
+
+		di->di_bank = bank;
+		regptr += 1;
+
+		/* Get address/size. */
+		rv = fdt_data_to_res(regptr, addr_cells - 1, size_cells, &start,
+		    &count);
+		if (rv != 0) {
+			resource_list_free(&di->di_res);
+			goto out;
+		}
+
+		/* Check if enough amount of memory is mapped */
+		if (sc->sc_banks[bank].size < count) {
+			device_printf(sc->sc_dev, "device [%d]: not enough "
+			    "memory reserved\n", bank);
+			continue;
+		}
+
+		regptr += addr_cells - 1 + size_cells;
+
+		/* Calculate address range relative to VA base. */
+		start = sc->sc_banks[bank].va + start;
+		end = start + count - 1;
+
+		debugf("reg addr bank = %d, start = %lx, end = %lx, "
+		    "count = %lx\n", bank, start, end, count);
+
+		/* Use bank (CS) cell as rid. */
+		resource_list_add(&di->di_res, SYS_RES_MEMORY, di->di_bank,
+		    start, end, count);
+	}
+	rv = 0;
+out:
+	free(reg, M_OFWPROP);
+	return (rv);
+}
+
+static int
+localbus_probe(device_t dev)
+{
+
+	if (!ofw_bus_is_compatible_strict(dev, "mrvl,lbc"))
+		return (ENXIO);
+
+	device_set_desc(dev, "Marvell device bus");
+
+	return (BUS_PROBE_DEFAULT);
+}
+
+static int
+localbus_attach(device_t dev)
+{
+	device_t dev_child;
+	struct localbus_softc *sc;
+	struct localbus_devinfo *di;
+	phandle_t dt_node, dt_child;
+
+	sc = device_get_softc(dev);
+	sc->sc_dev = dev;
+	sc->sc_banks = localbus_banks;
+
+	/*
+	 * Walk localbus and add direct subordinates as our children.
+	 */
+	dt_node = ofw_bus_get_node(dev);
+	for (dt_child = OF_child(dt_node); dt_child != 0;
+	    dt_child = OF_peer(dt_child)) {
+
+		/* Check and process 'status' property. */
+		if (!(fdt_is_enabled(dt_child)))
+			continue;
+
+		if (!(fdt_pm_is_enabled(dt_child)))
+			continue;
+
+		di = malloc(sizeof(*di), M_LOCALBUS, M_WAITOK | M_ZERO);
+		if (ofw_bus_gen_setup_devinfo(&di->di_ofw, dt_child) != 0) {
+			free(di, M_LOCALBUS);
+			device_printf(dev, "could not set up devinfo\n");
+			continue;
+		}
+
+		resource_list_init(&di->di_res);
+		if (fdt_localbus_reg_decode(dt_child, sc, di)) {
+			device_printf(dev, "could not process 'reg' "
+			    "property\n");
+			ofw_bus_gen_destroy_devinfo(&di->di_ofw);
+			free(di, M_LOCALBUS);
+			continue;
+		}
+
+		/* Add newbus device for this FDT node */
+		dev_child = device_add_child(dev, NULL, -1);
+		if (dev_child == NULL) {
+			device_printf(dev, "could not add child: %s\n",
+			    di->di_ofw.obd_name);
+			resource_list_free(&di->di_res);
+			ofw_bus_gen_destroy_devinfo(&di->di_ofw);
+			free(di, M_LOCALBUS);
+			continue;
+		}
+#ifdef DEBUG
+		device_printf(dev, "added child: %s\n\n", di->di_ofw.obd_name);
+#endif
+		device_set_ivars(dev_child, di);
+	}
+
+	return (bus_generic_attach(dev));
+}
+
+static int
+localbus_print_child(device_t dev, device_t child)
+{
+	struct localbus_devinfo *di;
+	struct resource_list *rl;
+	int rv;
+
+	di = device_get_ivars(child);
+	rl = &di->di_res;
+
+	rv = 0;
+	rv += bus_print_child_header(dev, child);
+	rv += resource_list_print_type(rl, "mem", SYS_RES_MEMORY, "%#lx");
+	rv += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%ld");
+	rv += bus_print_child_footer(dev, child);
+
+	return (rv);
+}
+
+static struct resource *
+localbus_alloc_resource(device_t bus, device_t child, int type, int *rid,
+    u_long start, u_long end, u_long count, u_int flags)
+{
+	struct localbus_devinfo *di;
+	struct resource_list_entry *rle;
+
+	/*
+	 * Request for the default allocation with a given rid: use resource
+	 * list stored in the local device info.
+	 */
+	if ((start == 0UL) && (end == ~0UL)) {
+		if ((di = device_get_ivars(child)) == NULL)
+			return (NULL);
+
+		if (type == SYS_RES_IOPORT)
+			type = SYS_RES_MEMORY;
+
+		rid = &di->di_bank;
+		rle = resource_list_find(&di->di_res, type, *rid);
+		if (rle == NULL) {
+			device_printf(bus, "no default resources for "
+			    "rid = %d, type = %d\n", *rid, type);
+			return (NULL);
+		}
+		start = rle->start;
+		end = rle->end;
+		count = rle->count;
+	}
+
+	return (bus_generic_alloc_resource(bus, child, type, rid, start, end,
+	    count, flags));
+}
+
+
+static struct resource_list *
+localbus_get_resource_list(device_t bus, device_t child)
+{
+	struct localbus_devinfo *di;
+
+	di = device_get_ivars(child);
+	return (&di->di_res);
+}
+
+static const struct ofw_bus_devinfo *
+localbus_get_devinfo(device_t bus, device_t child)
+{
+	struct localbus_devinfo *di;
+
+	di = device_get_ivars(child);
+	return (&di->di_ofw);
+}
+
+int
+fdt_localbus_devmap(phandle_t dt_node, struct pmap_devmap *fdt_devmap,
+    int banks_max_num, int *banks_added)
+{
+	pcell_t ranges[MV_LOCALBUS_MAX_BANKS * MV_LOCALBUS_MAX_BANK_CELLS];
+	pcell_t *rangesptr;
+	uint32_t tuple_size, bank;
+	vm_paddr_t offset;
+	vm_size_t size;
+	int dev_num, addr_cells, size_cells, par_addr_cells, va_index, i, j, k;
+
+	if ((fdt_addrsize_cells(dt_node, &addr_cells, &size_cells)) != 0)
+		return (EINVAL);
+
+	par_addr_cells = fdt_parent_addr_cells(dt_node);
+	if (par_addr_cells > 2) {
+		/*
+		 * Localbus devmap initialization error: unsupported parent
+		 * #addr-cells
+		 */
+		return (ERANGE);
+	}
+
+	tuple_size = (addr_cells + par_addr_cells + size_cells);
+	if (tuple_size > MV_LOCALBUS_MAX_BANK_CELLS)
+		return (ERANGE);
+
+	tuple_size *= sizeof(pcell_t);
+
+	dev_num = OF_getprop(dt_node, "ranges", ranges, sizeof(ranges));
+ 	if (dev_num <= 0)
+		return (EINVAL);
+
+ 	/* Calculate number of devices attached to bus */
+ 	dev_num = dev_num / tuple_size;
+
+ 	/*
+ 	 * If number of ranges > max number of localbus devices,
+ 	 * additional entries will not be processed
+ 	 */
+ 	dev_num = MIN(dev_num, banks_max_num);
+
+ 	rangesptr = &ranges[0];
+ 	j = 0;
+
+ 	/* Process data from FDT */
+	for (i = 0; i < dev_num; i++) {
+
+		/* First field is bank number */
+		bank = fdt_data_get((void *)rangesptr, 1);
+		rangesptr += 1;
+
+		if (bank < 0 || bank > MV_LOCALBUS_MAX_BANKS) {
+			/* Bank out of range */
+			rangesptr += ((addr_cells - 1) + par_addr_cells +
+			    size_cells);
+			continue;
+		}
+
+		/* Find virtmap entry for this bank */
+		va_index = -1;
+		for (k = 0; localbus_virtmap[k].bank >= 0; k++) {
+			if (localbus_virtmap[k].bank == bank) {
+				va_index = k;
+				break;
+			}
+		}
+
+		/* Check if virtmap entry was found */
+		if (va_index == -1) {
+			rangesptr += ((addr_cells - 1) + par_addr_cells +
+			    size_cells);
+			continue;
+		}
+
+		/* Remaining child's address fields are unused */
+		rangesptr += (addr_cells - 1);
+
+		/* Parent address offset */
+		offset = fdt_data_get((void *)rangesptr, par_addr_cells);
+		rangesptr += par_addr_cells;
+
+		/* Last field is size */
+		size = fdt_data_get((void *)rangesptr, size_cells);
+		rangesptr += size_cells;
+
+		if (size > localbus_virtmap[va_index].size) {
+			/* Not enough space reserved in virtual memory map */
+			continue;
+		}
+
+		fdt_devmap[j].pd_va = localbus_virtmap[va_index].va;
+		fdt_devmap[j].pd_pa = offset;
+		fdt_devmap[j].pd_size = size;
+		fdt_devmap[j].pd_prot = VM_PROT_READ | VM_PROT_WRITE;
+		fdt_devmap[j].pd_cache = PTE_NOCACHE;
+
+		/* Copy data to structure used by localbus driver */
+		localbus_banks[bank].va = fdt_devmap[j].pd_va;
+		localbus_banks[bank].pa = fdt_devmap[j].pd_pa;
+		localbus_banks[bank].size = fdt_devmap[j].pd_size;
+		localbus_banks[bank].mapped = 1;
+
+		j++;
+	}
+
+	*banks_added = j;
+	return (0);
+}
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/mv/mv_machdep.c
--- a/head/sys/arm/mv/mv_machdep.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/mv/mv_machdep.c	Wed Jul 25 17:18:25 2012 +0300
@@ -39,7 +39,7 @@
 #include "opt_platform.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/mv/mv_machdep.c 232295 2012-02-29 12:44:34Z cognet $");
+__FBSDID("$FreeBSD: head/sys/arm/mv/mv_machdep.c 238329 2012-07-10 01:49:50Z imp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -115,16 +115,11 @@
 extern unsigned char __bss_start[];
 extern unsigned char _end[];
 
-#ifdef DDB
-extern vm_offset_t ksym_start, ksym_end;
-#endif
-
 extern u_int data_abort_handler_address;
 extern u_int prefetch_abort_handler_address;
 extern u_int undefined_handler_address;
 
 extern vm_offset_t pmap_bootstrap_lastaddr;
-extern int *end;
 
 struct pv_addr kernel_pt_table[KERNEL_PT_MAX];
 struct pcpu __pcpu;
@@ -134,7 +129,6 @@
 
 vm_paddr_t phys_avail[10];
 vm_paddr_t dump_avail[4];
-vm_offset_t physical_pages;
 vm_offset_t pmap_bootstrap_lastaddr;
 
 const struct pmap_devmap *pmap_devmap_bootstrap_table;
@@ -145,8 +139,6 @@
 struct pv_addr abtstack;
 struct pv_addr kernelstack;
 
-static struct trapframe proc0_tf;
-
 static struct mem_region availmem_regions[FDT_MEM_REGIONS];
 static int availmem_regions_sz;
 
@@ -287,7 +279,7 @@
 		    availmem_regions[i].mr_start + availmem_regions[i].mr_size,
 		    availmem_regions[i].mr_size);
 
-		/* 
+		/*
 		 * We should not map the page at PA 0x0000000, the VM can't
 		 * handle it, as pmap_extract() == 0 means failure.
 		 */
@@ -306,7 +298,7 @@
 }
 
 void *
-initarm(void *mdp, void *unused __unused)
+initarm(struct arm_boot_params *abp)
 {
 	struct pv_addr kernel_l1pt;
 	struct pv_addr dpcpu;
@@ -314,44 +306,21 @@
 	uint32_t memsize, l2size;
 	void *kmdp;
 	u_int l1pagetable;
-	int i = 0, j = 0;
+	int i = 0, j = 0, err_devmap = 0;
 
-	kmdp = NULL;
-	lastaddr = 0;
+        lastaddr = parse_boot_param(abp);
 	memsize = 0;
-	dtbp = (vm_offset_t)NULL;
-
 	set_cpufuncs();
 
 	/*
-	 * Mask metadata pointer: it is supposed to be on page boundary. If
-	 * the first argument (mdp) doesn't point to a valid address the
-	 * bootloader must have passed us something else than the metadata
-	 * ptr... In this case we want to fall back to some built-in settings.
+	 * Find the dtb passed in by the boot loader.
 	 */
-	mdp = (void *)((uint32_t)mdp & ~PAGE_MASK);
-
-	/* Parse metadata and fetch parameters */
-	if (mdp != NULL) {
-		preload_metadata = mdp;
-		kmdp = preload_search_by_type("elf kernel");
-		if (kmdp != NULL) {
-			boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int);
-			kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *);
-			dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t);
-			lastaddr = MD_FETCH(kmdp, MODINFOMD_KERNEND,
-			    vm_offset_t);
-#ifdef DDB
-			ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t);
-			ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t);
-#endif
-		}
-
-		preload_addr_relocate = KERNVIRTADDR - KERNPHYSADDR;
-	} else {
-		/* Fall back to hardcoded metadata. */
-		lastaddr = fake_preload_metadata();
-	}
+        kmdp = preload_search_by_type("elf kernel");
+        if (kmdp != NULL)
+		dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t);
+	else
+		dtbp = (vm_offset_t)NULL;
+		
 
 #if defined(FDT_DTB_STATIC)
 	/*
@@ -496,8 +465,7 @@
 	    VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
 
 	/* Map pmap_devmap[] entries */
-	if (platform_devmap_init() != 0)
-		while (1);
+	err_devmap = platform_devmap_init();
 	pmap_devmap_bootstrap(l1pagetable, pmap_devmap_bootstrap_table);
 
 	cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)) |
@@ -524,18 +492,23 @@
 	physmem = memsize / PAGE_SIZE;
 
 	debugf("initarm: console initialized\n");
-	debugf(" arg1 mdp = 0x%08x\n", (uint32_t)mdp);
+	debugf(" arg1 kmdp = 0x%08x\n", (uint32_t)kmdp);
 	debugf(" boothowto = 0x%08x\n", boothowto);
 	printf(" dtbp = 0x%08x\n", (uint32_t)dtbp);
 	print_kernel_section_addr();
 	print_kenv();
 
+	if (err_devmap != 0)
+		printf("WARNING: could not fully configure devmap, error=%d\n",
+                    err_devmap);
+
 	/*
 	 * Re-initialise decode windows
 	 */
 	if (soc_decode_win() != 0)
 		printf("WARNING: could not re-initialise decode windows! "
 		    "Running with existing settings...\n");
+
 	/*
 	 * Pages were allocated during the secondary bootstrap for the
 	 * stacks for different CPU modes.
@@ -570,22 +543,10 @@
 	undefined_handler_address = (u_int)undefinedinstruction_bounce;
 	undefined_init();
 
-	proc_linkup0(&proc0, &thread0);
-	thread0.td_kstack = kernelstack.pv_va;
-	thread0.td_kstack_pages = KSTACK_PAGES;
-	thread0.td_pcb = (struct pcb *)
-	    (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
-	thread0.td_pcb->pcb_flags = 0;
-	thread0.td_frame = &proc0_tf;
-	pcpup->pc_curpcb = thread0.td_pcb;
+	init_proc0(kernelstack.pv_va);
 
 	arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
-
-	dump_avail[0] = 0;
-	dump_avail[1] = memsize;
-	dump_avail[2] = 0;
-	dump_avail[3] = 0;
-
+	arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0]));
 	pmap_bootstrap(freemempos, pmap_bootstrap_lastaddr, &kernel_l1pt);
 	msgbufp = (void *)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);
@@ -733,25 +694,34 @@
 	return (0);
 }
 
-#define FDT_DEVMAP_MAX	(1 + 2 + 1 + 1)
+#define FDT_DEVMAP_MAX	(MV_WIN_CPU_MAX + 1)
 static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
 	{ 0, 0, 0, 0, 0, }
 };
 
 /*
+ * XXX: When device entry in devmap has pd_size smaller than section size,
+ * system will freeze during initialization
+ */
+
+/*
  * Construct pmap_devmap[] with DT-derived config data.
  */
+
 static int
 platform_devmap_init(void)
 {
 	phandle_t root, child;
+	pcell_t bank_count;
 	u_long base, size;
-	int i;
+	int i, num_mapped;
+
+	i = 0;
+	pmap_devmap_bootstrap_table = &fdt_devmap[0];
 
 	/*
 	 * IMMR range.
 	 */
-	i = 0;
 	fdt_devmap[i].pd_va = fdt_immr_va;
 	fdt_devmap[i].pd_pa = fdt_immr_pa;
 	fdt_devmap[i].pd_size = fdt_immr_size;
@@ -760,12 +730,12 @@
 	i++;
 
 	/*
-	 * PCI range(s).
+	 * PCI range(s) and localbus.
 	 */
 	if ((root = OF_finddevice("/")) == -1)
 		return (ENXIO);
 
-	for (child = OF_child(root); child != 0; child = OF_peer(child))
+	for (child = OF_child(root); child != 0; child = OF_peer(child)) {
 		if (fdt_is_type(child, "pci")) {
 			/*
 			 * Check space: each PCI node will consume 2 devmap
@@ -773,7 +743,6 @@
 			 */
 			if (i + 1 >= FDT_DEVMAP_MAX) {
 				return (ENOMEM);
-				break;
 			}
 
 			/*
@@ -786,6 +755,29 @@
 			i += 2;
 		}
 
+		if (fdt_is_compatible(child, "mrvl,lbc")) {
+			/* Check available space */
+			if (OF_getprop(child, "bank-count", (void *)&bank_count,
+			    sizeof(bank_count)) <= 0)
+				/* If no property, use default value */
+				bank_count = 1;
+			else
+				bank_count = fdt32_to_cpu(bank_count);
+
+			if ((i + bank_count) >= FDT_DEVMAP_MAX)
+				return (ENOMEM);
+
+			/* Add all localbus ranges to device map */
+			num_mapped = 0;
+
+			if (fdt_localbus_devmap(child, &fdt_devmap[i],
+			    (int)bank_count, &num_mapped) != 0)
+				return (ENXIO);
+
+			i += num_mapped;
+		}
+	}
+
 	/*
 	 * CESA SRAM range.
 	 */
@@ -795,7 +787,7 @@
 
 	if ((child = fdt_find_compatible(root, "mrvl,cesa-sram", 0)) == 0)
 		/* No CESA SRAM node. */
-		goto out;
+		return (0);
 moveon:
 	if (i >= FDT_DEVMAP_MAX)
 		return (ENOMEM);
@@ -809,8 +801,6 @@
 	fdt_devmap[i].pd_prot = VM_PROT_READ | VM_PROT_WRITE;
 	fdt_devmap[i].pd_cache = PTE_NOCACHE;
 
-out:
-	pmap_devmap_bootstrap_table = &fdt_devmap[0];
 	return (0);
 }
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/mv/mvwin.h
--- a/head/sys/arm/mv/mvwin.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/mv/mvwin.h	Wed Jul 25 17:18:25 2012 +0300
@@ -28,7 +28,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/mv/mvwin.h 236990 2012-06-13 04:59:00Z imp $
  */
 
 #ifndef _MVWIN_H_
@@ -46,7 +46,7 @@
 #define MV_PCIE_IO_PHYS_BASE	(MV_PHYS_BASE + MV_SIZE)
 #define MV_PCIE_IO_BASE		MV_PCIE_IO_PHYS_BASE
 #define MV_PCIE_IO_SIZE		(1024 * 1024)
-#define MV_PCI_IO_PHYS_BASE	(MV_PCIE_IO_PHYS_BASE + MV_PCIE_IO_SIZE) 
+#define MV_PCI_IO_PHYS_BASE	(MV_PCIE_IO_PHYS_BASE + MV_PCIE_IO_SIZE)
 #define MV_PCI_IO_BASE		MV_PCI_IO_PHYS_BASE
 #define MV_PCI_IO_SIZE		(1024 * 1024)
 
@@ -57,20 +57,17 @@
 #define MV_PCI_MEM_BASE		MV_PCI_MEM_PHYS_BASE
 #define MV_PCI_MEM_SIZE		(64 * 1024 * 1024)
 
-/* XXX DEV_BOOT, CSx are board specific, should be defined per platform */
+#define MV_DEV_BOOT_BASE	0xF9300000
+#define MV_DEV_BOOT_SIZE	(1024 * 1024)		/* 1 MB */
 
-/* 512KB NOR FLASH */
-#define MV_DEV_BOOT_PHYS_BASE	(MV_PCI_MEM_PHYS_BASE + MV_PCI_MEM_SIZE)
-#define MV_DEV_BOOT_SIZE		(512 * 1024)
-/* CS0: 7-seg LED */
-#define MV_DEV_CS0_PHYS_BASE	0xFA000000
-#define MV_DEV_CS0_SIZE	(1024 * 1024) /* XXX u-boot has 2MB */
-/* CS1: 32MB NOR FLASH */
-#define MV_DEV_CS1_PHYS_BASE	(MV_DEV_CS0_PHYS_BASE + MV_DEV_CS0_SIZE)
-#define MV_DEV_CS1_SIZE	(32 * 1024 * 1024)
-/* CS2: 32MB NAND FLASH */
-#define MV_DEV_CS2_PHYS_BASE	(MV_DEV_CS1_PHYS_BASE + MV_DEV_CS1_SIZE)
-#define MV_DEV_CS2_SIZE	1024	/* XXX u-boot has 1MB */
+#define MV_DEV_CS0_BASE		0xF9400000
+#define MV_DEV_CS0_SIZE		(1024 * 1024)		/* 1 MB */
+
+#define MV_DEV_CS1_BASE		0xF9500000
+#define MV_DEV_CS1_SIZE		(32 * 1024 * 1024)	/* 32 MB */
+
+#define MV_DEV_CS2_BASE		0xFB500000
+#define MV_DEV_CS2_SIZE		(1024 * 1024)		/* 1 MB */
 
 #define MV_CESA_SRAM_PHYS_BASE	0xFD000000
 #define MV_CESA_SRAM_BASE	MV_CESA_SRAM_PHYS_BASE /* VA == PA mapping */
@@ -107,8 +104,6 @@
 #define MV_PCIE12_BASE		(MV_PCIE_BASE + 0x48000)
 #define MV_PCIE13_BASE		(MV_PCIE_BASE + 0x4C000)
 
-#define MV_DEV_CS0_BASE		MV_DEV_CS0_PHYS_BASE
-
 /*
  * Decode windows definitions and macros
  */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/mv/std.mv
--- a/head/sys/arm/mv/std.mv	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/mv/std.mv	Wed Jul 25 17:18:25 2012 +0300
@@ -1,5 +1,6 @@
-# $FreeBSD$
+# $FreeBSD: head/sys/arm/mv/std.mv 237042 2012-06-14 04:09:20Z imp $
 
 files		"../mv/files.mv"
 cpu		CPU_ARM9E
 makeoptions	CONF_CFLAGS="-march=armv5te"
+options		FREEBSD_BOOT_LOADER
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/s3c2xx0/s3c2410reg.h
--- a/head/sys/arm/s3c2xx0/s3c2410reg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/s3c2xx0/s3c2410reg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -28,7 +28,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/s3c2xx0/s3c2410reg.h 236990 2012-06-13 04:59:00Z imp $
  */
 
 
@@ -36,7 +36,7 @@
  * Samsung S3C2410X processor is ARM920T based integrated CPU
  *
  * Reference:
- *  S3C2410X User's Manual 
+ *  S3C2410X User's Manual
  */
 #ifndef _ARM_S3C2XX0_S3C2410REG_H_
 #define	_ARM_S3C2XX0_S3C2410REG_H_
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/s3c2xx0/s3c2440reg.h
--- a/head/sys/arm/s3c2xx0/s3c2440reg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/s3c2xx0/s3c2440reg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -23,14 +23,14 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/s3c2xx0/s3c2440reg.h 236990 2012-06-13 04:59:00Z imp $
  */
 
 /*
  * Samsung S3C2440X processor is ARM920T based integrated CPU
  *
  * Reference:
- *  S3C2440A/S3C2442B User's Manual 
+ *  S3C2440A/S3C2442B User's Manual
  */
 #ifndef _ARM_S3C2XX0_S3C2440REG_H_
 #define	_ARM_S3C2XX0_S3C2440REG_H_
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/s3c2xx0/s3c24x0.c
--- a/head/sys/arm/s3c2xx0/s3c24x0.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/s3c2xx0/s3c24x0.c	Wed Jul 25 17:18:25 2012 +0300
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/s3c2xx0/s3c24x0.c 238545 2012-07-17 03:18:12Z gonzo $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -220,7 +220,6 @@
 			/* Enable the external interrupt pin */
 			s3c24x0_enable_ext_intr(irq - S3C24X0_EXTIRQ_MIN);
 		}
-		arm_unmask_irq(irq);
 	}
 	return (0);
 }
@@ -283,7 +282,7 @@
 	    s3c2xx0_softc->sc_gpio_ioh, reg, value);
 
 	return (0);
-} 
+}
 
 static struct resource *
 s3c24x0_alloc_resource(device_t bus, device_t child, int type, int *rid,
@@ -356,7 +355,7 @@
 				rman_release_resource(res);
 				return (NULL);
 			}
-		} 
+		}
 		break;
 	}
 
@@ -751,19 +750,19 @@
 		mask = bus_space_read_4(&s3c2xx0_bs_tag,
 		    s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTMSK);
 		mask |= (1 << irq);
-		bus_space_write_4(&s3c2xx0_bs_tag, 
+		bus_space_write_4(&s3c2xx0_bs_tag,
 		    s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTMSK, mask);
 	} else if (irq < S3C24X0_EXTIRQ_MIN) {
 		mask = bus_space_read_4(&s3c2xx0_bs_tag,
 		    s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTSUBMSK);
 		mask |= (1 << (irq - S3C24X0_SUBIRQ_MIN));
-		bus_space_write_4(&s3c2xx0_bs_tag, 
+		bus_space_write_4(&s3c2xx0_bs_tag,
 		    s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTSUBMSK, mask);
 	} else {
 		mask = bus_space_read_4(&s3c2xx0_bs_tag,
 		    s3c2xx0_softc->sc_gpio_ioh, GPIO_EINTMASK);
 		mask |= (1 << (irq - S3C24X0_EXTIRQ_MIN));
-		bus_space_write_4(&s3c2xx0_bs_tag, 
+		bus_space_write_4(&s3c2xx0_bs_tag,
 		    s3c2xx0_softc->sc_intctl_ioh, GPIO_EINTMASK, mask);
 	}
 }
@@ -787,13 +786,13 @@
 		mask = bus_space_read_4(&s3c2xx0_bs_tag,
 		    s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTSUBMSK);
 		mask &= ~(1 << (irq - S3C24X0_SUBIRQ_MIN));
-		bus_space_write_4(&s3c2xx0_bs_tag, 
+		bus_space_write_4(&s3c2xx0_bs_tag,
 		    s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTSUBMSK, mask);
 	} else {
 		mask = bus_space_read_4(&s3c2xx0_bs_tag,
 		    s3c2xx0_softc->sc_gpio_ioh, GPIO_EINTMASK);
 		mask &= ~(1 << (irq - S3C24X0_EXTIRQ_MIN));
-		bus_space_write_4(&s3c2xx0_bs_tag, 
+		bus_space_write_4(&s3c2xx0_bs_tag,
 		    s3c2xx0_softc->sc_intctl_ioh, GPIO_EINTMASK, mask);
 	}
 }
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/s3c2xx0/s3c24x0_machdep.c
--- a/head/sys/arm/s3c2xx0/s3c24x0_machdep.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/s3c2xx0/s3c24x0_machdep.c	Wed Jul 25 17:18:25 2012 +0300
@@ -38,7 +38,7 @@
  *
  * Machine dependant functions for kernel setup
  *
- * This file needs a lot of work. 
+ * This file needs a lot of work.
  *
  * Created      : 17/09/94
  */
@@ -46,7 +46,7 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/s3c2xx0/s3c24x0_machdep.c 238329 2012-07-10 01:49:50Z imp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -118,10 +118,6 @@
 
 struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
 
-extern void *_end;
-
-extern int *end;
-
 struct pcpu __pcpu;
 struct pcpu *pcpup = &__pcpu;
 
@@ -129,7 +125,6 @@
 
 vm_paddr_t phys_avail[10];
 vm_paddr_t dump_avail[4];
-vm_offset_t physical_pages;
 
 struct pv_addr systempage;
 struct pv_addr msgbufpv;
@@ -138,8 +133,6 @@
 struct pv_addr abtstack;
 struct pv_addr kernelstack;
 
-static struct trapframe proc0_tf;
-
 #define	_A(a)	((a) & ~L1_S_OFFSET)
 #define	_S(s)	(((s) + L1_S_SIZE - 1) & ~(L1_S_SIZE-1))
 
@@ -152,42 +145,42 @@
 		_A(S3C24X0_CLKMAN_BASE),
 		_A(S3C24X0_CLKMAN_PA_BASE),
 		_S(S3C24X0_CLKMAN_SIZE),
-		VM_PROT_READ|VM_PROT_WRITE, 
+		VM_PROT_READ|VM_PROT_WRITE,
 		PTE_NOCACHE,
 	},
 	{
 		_A(S3C24X0_GPIO_BASE),
 		_A(S3C24X0_GPIO_PA_BASE),
 		_S(S3C2410_GPIO_SIZE),
-		VM_PROT_READ|VM_PROT_WRITE,                             
+		VM_PROT_READ|VM_PROT_WRITE,
 		PTE_NOCACHE,
 	},
 	{
 		_A(S3C24X0_INTCTL_BASE),
 		_A(S3C24X0_INTCTL_PA_BASE),
 		_S(S3C24X0_INTCTL_SIZE),
-		VM_PROT_READ|VM_PROT_WRITE, 
+		VM_PROT_READ|VM_PROT_WRITE,
 		PTE_NOCACHE,
 	},
 	{
 		_A(S3C24X0_TIMER_BASE),
 		_A(S3C24X0_TIMER_PA_BASE),
 		_S(S3C24X0_TIMER_SIZE),
-		VM_PROT_READ|VM_PROT_WRITE,                             
+		VM_PROT_READ|VM_PROT_WRITE,
 		PTE_NOCACHE,
 	},
 	{
 		_A(S3C24X0_UART0_BASE),
 		_A(S3C24X0_UART0_PA_BASE),
 		_S(S3C24X0_UART_PA_BASE(3) - S3C24X0_UART0_PA_BASE),
-		VM_PROT_READ|VM_PROT_WRITE,                             
+		VM_PROT_READ|VM_PROT_WRITE,
 		PTE_NOCACHE,
 	},
 	{
 		_A(S3C24X0_WDT_BASE),
 		_A(S3C24X0_WDT_PA_BASE),
 		_S(S3C24X0_WDT_SIZE),
-		VM_PROT_READ|VM_PROT_WRITE,                             
+		VM_PROT_READ|VM_PROT_WRITE,
 		PTE_NOCACHE,
 	},
 	{
@@ -205,10 +198,6 @@
 #define	ioreg_read32(a)  	(*(volatile uint32_t *)(a))
 #define	ioreg_write32(a,v)	(*(volatile uint32_t *)(a)=(v))
 
-#ifdef DDB
-extern vm_offset_t ksym_start, ksym_end;
-#endif
-
 struct arm32_dma_range s3c24x0_range = {
 	.dr_sysbase = 0,
 	.dr_busbase = 0,
@@ -234,7 +223,7 @@
 }
 
 void *
-initarm(void *arg, void *arg2)
+initarm(struct arm_boot_params *abp)
 {
 	struct pv_addr	kernel_l1pt;
 	int loop;
@@ -246,13 +235,11 @@
 	int i;
 	uint32_t memsize;
 
+	boothowto = 0;  /* Likely not needed */
+	lastaddr = parse_boot_param(abp);
 	i = 0;
-
-	boothowto = 0;
-
 	set_cpufuncs();
 	cpufuncs.cf_sleep = s3c24x0_sleep;
-	lastaddr = fake_preload_metadata();
 
 	pcpu_init(pcpup, 0, sizeof(struct pcpu));
 	PCPU_SET(curthread, &thread0);
@@ -283,7 +270,7 @@
 			kernel_pt_table[loop].pv_va = freemempos -
 			    (loop % (PAGE_SIZE / L2_TABLE_SIZE_REAL)) *
 			    L2_TABLE_SIZE_REAL;
-			kernel_pt_table[loop].pv_pa = 
+			kernel_pt_table[loop].pv_pa =
 			    kernel_pt_table[loop].pv_va - KERNVIRTADDR +
 			    KERNPHYSADDR;
 		}
@@ -317,7 +304,7 @@
 	pmap_map_chunk(l1pagetable, KERNBASE, PHYSADDR,
 	   (((uint32_t)(lastaddr) - KERNBASE) + PAGE_SIZE) & ~(PAGE_SIZE - 1),
 	    VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
-	afterkern = round_page((lastaddr + L1_S_SIZE) & ~(L1_S_SIZE 
+	afterkern = round_page((lastaddr + L1_S_SIZE) & ~(L1_S_SIZE
 	    - 1));
 	for (i = 0; i < KERNEL_PT_AFKERNEL_NUM; i++) {
 		pmap_link_l2pt(l1pagetable, afterkern + i * L1_S_SIZE,
@@ -406,30 +393,14 @@
 	prefetch_abort_handler_address = (u_int)prefetch_abort_handler;
 	undefined_handler_address = (u_int)undefinedinstruction_bounce;
 	undefined_init();
-				
-	proc_linkup(&proc0, &thread0);
-	thread0.td_kstack = kernelstack.pv_va;
-	thread0.td_pcb = (struct pcb *)
-		(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
-	thread0.td_pcb->pcb_flags = 0;
-	thread0.td_frame = &proc0_tf;
-	pcpup->pc_curpcb = thread0.td_pcb;
+	
+	init_proc0(kernelstack.pv_va);			
 	
 	arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
 
 	pmap_curmaxkvaddr = afterkern + 0x100000 * (KERNEL_PT_KERN_NUM - 1);
-	/*
-	 * ARM_USE_SMALL_ALLOC uses dump_avail, so it must be filled before
-	 * calling pmap_bootstrap.
-	 */
-	dump_avail[0] = PHYSADDR;
-	dump_avail[1] = PHYSADDR + memsize;
-	dump_avail[2] = 0;
-	dump_avail[3] = 0;
-					
-	pmap_bootstrap(freemempos,
-	    KERNVIRTADDR + 3 * memsize,
-	    &kernel_l1pt);
+	arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0]));
+	pmap_bootstrap(freemempos, KERNVIRTADDR + 3 * memsize, &kernel_l1pt);
 	msgbufp = (void*)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);
 	mutex_init();
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/s3c2xx0/s3c24x0reg.h
--- a/head/sys/arm/s3c2xx0/s3c24x0reg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/s3c2xx0/s3c24x0reg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -28,7 +28,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/s3c2xx0/s3c24x0reg.h 236990 2012-06-13 04:59:00Z imp $
  */
 
 
@@ -36,7 +36,7 @@
  * Samsung S3C2410X/2400 processor is ARM920T based integrated CPU
  *
  * Reference:
- *  S3C2410X User's Manual 
+ *  S3C2410X User's Manual
  *  S3C2400 User's Manual
  */
 #ifndef _ARM_S3C2XX0_S3C24X0REG_H_
@@ -691,7 +691,7 @@
 #define	 SPCON_CPOL		(1<<2)
 #define	 SPCON_IDLELOW_RISING	  (0|0)
 #define	 SPCON_IDLELOW_FALLING	  (0|SPCON_CPHA)
-#define	 SPCON_IDLEHIGH_FALLING  (SPCON_CPOL|0) 
+#define	 SPCON_IDLEHIGH_FALLING  (SPCON_CPOL|0)
 #define	 SPCON_IDLEHIGH_RISING	  (SPCON_CPOL|SPCON_CPHA)
 #define	 SPCON_MSTR		(1<<3)
 #define	 SPCON_ENSCK		(1<<4)
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/sa11x0/assabet_machdep.c
--- a/head/sys/arm/sa11x0/assabet_machdep.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/sa11x0/assabet_machdep.c	Wed Jul 25 17:18:25 2012 +0300
@@ -40,14 +40,14 @@
  *
  * Machine dependant functions for kernel setup
  *
- * This file needs a lot of work. 
+ * This file needs a lot of work.
  *
  * Created      : 17/09/94
  */
 
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/sa11x0/assabet_machdep.c 223562 2011-06-26 10:07:48Z kevlo $");
+__FBSDID("$FreeBSD: head/sys/arm/sa11x0/assabet_machdep.c 238329 2012-07-10 01:49:50Z imp $");
 
 #include "opt_md.h"
 
@@ -119,14 +119,10 @@
 
 struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
 
-extern void *_end;
-
 extern vm_offset_t sa1110_uart_vaddr;
 
 extern vm_offset_t sa1_cache_clean_addr;
 
-extern int *end;
-
 struct pcpu __pcpu;
 struct pcpu *pcpup = &__pcpu;
 
@@ -140,14 +136,12 @@
 vm_paddr_t physical_start;
 vm_paddr_t physical_end;
 vm_paddr_t physical_freestart;
-vm_offset_t physical_pages;
 
 struct pv_addr systempage;
 struct pv_addr irqstack;
 struct pv_addr undstack;
 struct pv_addr abtstack;
 struct pv_addr kernelstack;
-static struct trapframe proc0_tf;
 
 /* Static device mappings. */
 static const struct pmap_devmap assabet_devmap[] = {
@@ -201,7 +195,7 @@
 #define CPU_SA110_CACHE_CLEAN_SIZE (0x4000 * 2)
 
 void *
-initarm(void *arg, void *arg2)
+initarm(struct arm_boot_params *abp)
 {
 	struct pcpu *pc;
 	struct pv_addr  kernel_l1pt;
@@ -216,10 +210,10 @@
 	uint32_t memsize = 32 * 1024 * 1024;
 	sa1110_uart_vaddr = SACOM1_VBASE;
 
-	boothowto = RB_VERBOSE | RB_SINGLE;
+	boothowto = RB_VERBOSE | RB_SINGLE;     /* Default value */
+	lastaddr = parse_boot_param(abp);
 	cninit();
 	set_cpufuncs();
-	lastaddr = fake_preload_metadata();
 	physmem = memsize / PAGE_SIZE;
 	pc = &__pcpu;
 	pcpu_init(pc, 0, sizeof(struct pcpu));
@@ -258,7 +252,7 @@
 			kernel_pt_table[loop].pv_pa = freemempos +
 			    (loop % (PAGE_SIZE / L2_TABLE_SIZE_REAL)) *
 			    L2_TABLE_SIZE_REAL;
-			kernel_pt_table[loop].pv_va = 
+			kernel_pt_table[loop].pv_va =
 			    kernel_pt_table[loop].pv_pa;
 		}
 	}
@@ -344,7 +338,7 @@
 	    VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
 	/* Map the statically mapped devices. */
 	pmap_devmap_bootstrap(l1pagetable, assabet_devmap);
-	pmap_map_chunk(l1pagetable, sa1_cache_clean_addr, 0xf0000000, 
+	pmap_map_chunk(l1pagetable, sa1_cache_clean_addr, 0xf0000000,
 	    CPU_SA110_CACHE_CLEAN_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
 
 	data_abort_handler_address = (u_int)data_abort_handler;
@@ -387,12 +381,7 @@
 
 	/* Set stack for exception handlers */
 	
-	proc_linkup0(&proc0, &thread0);
-	thread0.td_kstack = kernelstack.pv_va;
-	thread0.td_pcb = (struct pcb *)
-		(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
-	thread0.td_pcb->pcb_flags = 0;
-	thread0.td_frame = &proc0_tf;
+	init_proc0(kernelstack.pv_va);
 	
 	
 	/* Enable MMU, I-cache, D-cache, write buffer. */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/sa11x0/sa11x0.c
--- a/head/sys/arm/sa11x0/sa11x0.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/sa11x0/sa11x0.c	Wed Jul 25 17:18:25 2012 +0300
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/sa11x0/sa11x0.c 223562 2011-06-26 10:07:48Z kevlo $");
+__FBSDID("$FreeBSD: head/sys/arm/sa11x0/sa11x0.c 236990 2012-06-13 04:59:00Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -88,12 +88,12 @@
 
 static int
 sa1110_setup_intr(device_t dev, device_t child,
-        struct resource *ires,  int flags, driver_filter_t *filt, 
+        struct resource *ires,  int flags, driver_filter_t *filt,
 	driver_intr_t *intr, void *arg, void **cookiep)
 {
 	int saved_cpsr;
 	
-	if (flags & INTR_TYPE_TTY) 
+	if (flags & INTR_TYPE_TTY)
 		rman_set_start(ires, 15);
 	else if (flags & INTR_TYPE_CLK) {
 		if (rman_get_start(ires) == 0)
@@ -101,10 +101,10 @@
 		else
 			rman_set_start(ires, 27);
 	}
-	saved_cpsr = SetCPSR(I32_bit, I32_bit);                 
+	saved_cpsr = SetCPSR(I32_bit, I32_bit);
 
 	SetCPSR(I32_bit, saved_cpsr & I32_bit);
-	BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, filt, 
+	BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, filt,
 	    intr, arg, cookiep);
 	return (0);
 }
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/sa11x0/sa11x0_gpioreg.h
--- a/head/sys/arm/sa11x0/sa11x0_gpioreg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/sa11x0/sa11x0_gpioreg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -27,12 +27,12 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/sa11x0/sa11x0_gpioreg.h 236990 2012-06-13 04:59:00Z imp $
  *
  */
 
 /*
- * SA-11x0 GPIO Register 
+ * SA-11x0 GPIO Register
  */
 
 #define SAGPIO_NPORTS	8
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/sa11x0/sa11x0_io_asm.S
--- a/head/sys/arm/sa11x0/sa11x0_io_asm.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/sa11x0/sa11x0_io_asm.S	Wed Jul 25 17:18:25 2012 +0300
@@ -35,7 +35,7 @@
  */
 
 #include <machine/asm.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/sa11x0/sa11x0_io_asm.S 236990 2012-06-13 04:59:00Z imp $");
 
 /*
  * bus_space I/O functions for sa11x0
@@ -208,7 +208,7 @@
 	movle	pc, lr
 
 sa11x0_bs_rr_2_loop:
-	ldrh	r1, [r0], #0x0002  
+	ldrh	r1, [r0], #0x0002
 	strh	r1, [r3], #0x0002
         subs    r2, r2, #0x00000001
 	bgt	sa11x0_bs_rr_2_loop
@@ -222,7 +222,7 @@
 ENTRY(sa11x0_bs_wr_2)
 	add	r0, r1, r2
 	ldr	r2, [sp, #0]
-	cmp	r2, #0x00000000  
+	cmp	r2, #0x00000000
 	movle	pc, lr
 
 sa11x0_bs_wr_2_loop:
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/sa11x0/sa11x0_irq.S
--- a/head/sys/arm/sa11x0/sa11x0_irq.S	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/sa11x0/sa11x0_irq.S	Wed Jul 25 17:18:25 2012 +0300
@@ -36,7 +36,7 @@
 #include <machine/armreg.h>
 #include <machine/asmacros.h>
 #include <arm/sa11x0/sa11x0_reg.h>
-__FBSDID("$FreeBSD: head/sys/arm/sa11x0/sa11x0_irq.S 224612 2011-08-02 17:49:27Z attilio $");
+__FBSDID("$FreeBSD: head/sys/arm/sa11x0/sa11x0_irq.S 236990 2012-06-13 04:59:00Z imp $");
 Lcurrent_intr_depth:
 	.word	_C_LABEL(current_intr_depth)
 
@@ -120,7 +120,7 @@
 	mov	pc, lr
 
 	.global _C_LABEL(intrnames), _C_LABEL(sintrnames)
-_C_LABEL(intrnames): 
+_C_LABEL(intrnames):
 _C_LABEL(sintrnames):
 	.int	0
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/sa11x0/sa11x0_ost.c
--- a/head/sys/arm/sa11x0/sa11x0_ost.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/sa11x0/sa11x0_ost.c	Wed Jul 25 17:18:25 2012 +0300
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/sa11x0/sa11x0_ost.c 230133 2012-01-15 13:23:33Z uqs $");
+__FBSDID("$FreeBSD: head/sys/arm/sa11x0/sa11x0_ost.c 236990 2012-06-13 04:59:00Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -56,7 +56,7 @@
 #include <machine/cpufunc.h>
 #include <machine/frame.h>
 
-#include <arm/sa11x0/sa11x0_reg.h> 
+#include <arm/sa11x0/sa11x0_reg.h>
 #include <arm/sa11x0/sa11x0_var.h>
 #include <arm/sa11x0/sa11x0_ostreg.h>
 
@@ -127,7 +127,7 @@
 
 	saost_sc = sc;
 
-	if(bus_space_map(sa->sc_iot, sc->sc_baseaddr, 8, 0, 
+	if(bus_space_map(sa->sc_iot, sc->sc_baseaddr, 8, 0,
 			&sc->sc_ioh))
 		panic("%s: Cannot map registers", device_get_name(dev));
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/sa11x0/sa11x0_ostreg.h
--- a/head/sys/arm/sa11x0/sa11x0_ostreg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/sa11x0/sa11x0_ostreg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -27,12 +27,12 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/sa11x0/sa11x0_ostreg.h 236990 2012-06-13 04:59:00Z imp $
  *
  */
 
 /*
- * SA-11x0 OS Timer Register 
+ * SA-11x0 OS Timer Register
  */
 
 /* OS Timer Match Register */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/sa11x0/sa11x0_var.h
--- a/head/sys/arm/sa11x0/sa11x0_var.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/sa11x0/sa11x0_var.h	Wed Jul 25 17:18:25 2012 +0300
@@ -27,7 +27,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/sa11x0/sa11x0_var.h 236990 2012-06-13 04:59:00Z imp $
  *
  */
 
@@ -58,7 +58,7 @@
 
 extern struct bus_space sa11x0_bs_tag;
 
-void *sa11x0_intr_establish(sa11x0_chipset_tag_t, int, int, int, 
+void *sa11x0_intr_establish(sa11x0_chipset_tag_t, int, int, int,
 			    int (*)(void *), void *);
 void sa11x0_intr_disestablish(sa11x0_chipset_tag_t, void *);
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/sa11x0/uart_dev_sa1110.c
--- a/head/sys/arm/sa11x0/uart_dev_sa1110.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/sa11x0/uart_dev_sa1110.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/sa11x0/uart_dev_sa1110.c 236990 2012-06-13 04:59:00Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -179,12 +179,12 @@
 
 	while (!(uart_getreg(&sc->sc_bas, SACOM_CR3) & CR3_TIE))
 		uart_setreg(&sc->sc_bas, SACOM_CR3,
-		    uart_getreg(&sc->sc_bas, SACOM_CR3) | CR3_TIE);    
+		    uart_getreg(&sc->sc_bas, SACOM_CR3) | CR3_TIE);
 #endif
 
 	sc->sc_txbusy = 1;
 	uart_setreg(&sc->sc_bas, SACOM_CR3, uart_getreg(&sc->sc_bas, SACOM_CR3)
-	    | CR3_TIE);    
+	    | CR3_TIE);
 	for (i = 0; i < sc->sc_txdatasz; i++) {
 		while (!(uart_getreg(&sc->sc_bas, SACOM_SR1) & SR1_TNF));
 
@@ -252,7 +252,7 @@
 			ipend |= SER_INT_RXREADY;
 		mask &= ~CR3_RIE;
 	}
-	uart_setreg(&sc->sc_bas, SACOM_CR3, CR3_RXE | mask); 
+	uart_setreg(&sc->sc_bas, SACOM_CR3, CR3_RXE | mask);
 	return (ipend);
 }
 static int
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i80321/ep80219_machdep.c
--- a/head/sys/arm/xscale/i80321/ep80219_machdep.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i80321/ep80219_machdep.c	Wed Jul 25 17:18:25 2012 +0300
@@ -40,13 +40,13 @@
  *
  * Machine dependant functions for kernel setup
  *
- * This file needs a lot of work. 
+ * This file needs a lot of work.
  *
  * Created      : 17/09/94
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i80321/ep80219_machdep.c 238329 2012-07-10 01:49:50Z imp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -115,10 +115,6 @@
 
 struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
 
-extern void *_end;
-
-extern int *end;
-
 struct pcpu __pcpu;
 struct pcpu *pcpup = &__pcpu;
 
@@ -126,7 +122,6 @@
 
 vm_paddr_t phys_avail[10];
 vm_paddr_t dump_avail[4];
-vm_offset_t physical_pages;
 
 struct pv_addr systempage;
 struct pv_addr msgbufpv;
@@ -136,15 +131,13 @@
 struct pv_addr kernelstack;
 struct pv_addr minidataclean;
 
-static struct trapframe proc0_tf;
-
 
 /* #define IQ80321_OBIO_BASE 0xfe800000UL */
 /* #define IQ80321_OBIO_SIZE 0x00100000UL */
 
 /* Static device mappings. */
 static const struct pmap_devmap ep80219_devmap[] = {
-	/* 
+	/*
 	 * Map the on-board devices VA == PA so that we can access them
 	 * with the MMU on or off.
 	 */
@@ -152,7 +145,7 @@
 		IQ80321_OBIO_BASE,
 		IQ80321_OBIO_BASE,
 		IQ80321_OBIO_SIZE,
-		VM_PROT_READ|VM_PROT_WRITE,                             
+		VM_PROT_READ|VM_PROT_WRITE,
 		PTE_NOCACHE,
 	},
 	{
@@ -161,7 +154,7 @@
 		VERDE_OUT_XLATE_IO_WIN_SIZE,
 		VM_PROT_READ|VM_PROT_WRITE,
 		PTE_NOCACHE,
-	},	    
+	},	
 	{
 		IQ80321_80321_VBASE,
 		VERDE_PMMR_BASE,
@@ -181,7 +174,7 @@
 extern vm_offset_t xscale_cache_clean_addr;
 
 void *
-initarm(void *arg, void *arg2)
+initarm(struct arm_boot_params *abp)
 {
 	struct pv_addr  kernel_l1pt;
 	struct pv_addr  dpcpu;
@@ -194,8 +187,8 @@
 	vm_offset_t lastaddr;
 	uint32_t memsize, memstart;
 
+	lastaddr = parse_boot_param(abp);
 	set_cpufuncs();
-	lastaddr = fake_preload_metadata();
 	pcpu_init(pcpup, 0, sizeof(struct pcpu));
 	PCPU_SET(curthread, &thread0);
 
@@ -224,10 +217,9 @@
 			kernel_pt_table[loop].pv_pa = freemempos +
 			    (loop % (PAGE_SIZE / L2_TABLE_SIZE_REAL)) *
 			    L2_TABLE_SIZE_REAL;
-			kernel_pt_table[loop].pv_va = 
+			kernel_pt_table[loop].pv_va =
 			    kernel_pt_table[loop].pv_pa + 0x20000000;
 		}
-		i++;
 	}
 	freemem_pt = freemempos;
 	freemempos = 0xa0100000;
@@ -294,13 +286,13 @@
 				   (((uint32_t)(lastaddr) - KERNBASE - 0x200000) + L1_S_SIZE) & ~(L1_S_SIZE - 1),
 				   VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
 	freemem_after = ((int)lastaddr + PAGE_SIZE) & ~(PAGE_SIZE - 1);
-	afterkern = round_page(((vm_offset_t)lastaddr + L1_S_SIZE) & ~(L1_S_SIZE 
+	afterkern = round_page(((vm_offset_t)lastaddr + L1_S_SIZE) & ~(L1_S_SIZE
 																   - 1));
 	for (i = 0; i < KERNEL_PT_AFKERNEL_NUM; i++) {
 		pmap_link_l2pt(l1pagetable, afterkern + i * 0x00100000,
 					   &kernel_pt_table[KERNEL_PT_AFKERNEL + i]);
 	}
-	pmap_map_entry(l1pagetable, afterkern, minidataclean.pv_pa, 
+	pmap_map_entry(l1pagetable, afterkern, minidataclean.pv_pa,
 				   VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
 	
 
@@ -309,7 +301,7 @@
 		arm_add_smallalloc_pages((void *)(freemem_after),
 		    (void*)(freemem_after + PAGE_SIZE),
 		    afterkern - (freemem_after + PAGE_SIZE), 0);
-		    
+		
 	}
 #endif
 
@@ -341,7 +333,7 @@
 	 * of the stack memory.
 	 */
 
-				   
+				
 	set_stackptr(PSR_IRQ32_MODE,
 	    irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE);
 	set_stackptr(PSR_ABT32_MODE,
@@ -379,13 +371,7 @@
 	undefined_handler_address = (u_int)undefinedinstruction_bounce;
 	undefined_init();
 				
-	proc_linkup0(&proc0, &thread0);
-	thread0.td_kstack = kernelstack.pv_va;
-	thread0.td_pcb = (struct pcb *)
-		(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
-	thread0.td_pcb->pcb_flags = 0;
-	thread0.td_frame = &proc0_tf;
-	pcpup->pc_curpcb = thread0.td_pcb;
+	init_proc0(kernelstack.pv_va);
 	
 	/* Enable MMU, I-cache, D-cache, write buffer. */
 
@@ -395,7 +381,7 @@
 	dump_avail[1] = 0xa0000000 + memsize;
 	dump_avail[2] = 0;
 	dump_avail[3] = 0;
-	pmap_bootstrap(pmap_curmaxkvaddr, 
+	pmap_bootstrap(pmap_curmaxkvaddr,
 	    0xd0000000, &kernel_l1pt);
 	msgbufp = (void*)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i80321/i80321.c
--- a/head/sys/arm/xscale/i80321/i80321.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i80321/i80321.c	Wed Jul 25 17:18:25 2012 +0300
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i80321/i80321.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -225,9 +225,9 @@
 
 static __inline uint32_t
 i80321_iintsrc_read(void)
-{       
-	uint32_t iintsrc;                                       
-		                                                                
+{
+	uint32_t iintsrc;
+		
 	__asm __volatile("mrc p6, 0, %0, c8, c0, 0"
 	    : "=r" (iintsrc));
 	
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i80321/i80321_aau.c
--- a/head/sys/arm/xscale/i80321/i80321_aau.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i80321/i80321_aau.c	Wed Jul 25 17:18:25 2012 +0300
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i80321/i80321_aau.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -111,14 +111,14 @@
 
 	mtx_init(&softc->mtx, "AAU mtx", NULL, MTX_SPIN);
 	softc->sc_st = sc->sc_st;
-	if (bus_space_subregion(softc->sc_st, sc->sc_sh, VERDE_AAU_BASE, 
+	if (bus_space_subregion(softc->sc_st, sc->sc_sh, VERDE_AAU_BASE,
 	    VERDE_AAU_SIZE, &softc->sc_aau_sh) != 0)
 		panic("%s: unable to subregion AAU registers",
 		    device_get_name(dev));
 	if (bus_dma_tag_create(NULL, sizeof(i80321_aaudesc_t), 0,
-	    BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, 
+	    BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL,
 	    AAU_RING_SIZE * sizeof(i80321_aaudesc_t),
-	    1, sizeof(i80321_aaudesc_t), BUS_DMA_ALLOCNOW, busdma_lock_mutex, 
+	    1, sizeof(i80321_aaudesc_t), BUS_DMA_ALLOCNOW, busdma_lock_mutex,
 	    &Giant, &softc->dmatag))
 		panic("Couldn't create a dma tag");
 	if (bus_dmamem_alloc(softc->dmatag, (void **)&aaudescs,
@@ -186,7 +186,7 @@
 		desc->next_desc = 0;
 		desc->count = len;
 		desc->descr_ctrl = 2 << 1 | 1 << 31; /* Fill, enable dest write */
-		bus_dmamap_sync(sc->dmatag, sc->aauring[0].map, 
+		bus_dmamap_sync(sc->dmatag, sc->aauring[0].map,
 		    BUS_DMASYNC_PREWRITE);
 	} else {
 		test_virt_addr(dst, len);
@@ -218,8 +218,8 @@
 				if (tmplen <= 0 && descnb > 0) {
 					sc->aauring[descnb - 1].desc->next_desc
 					    = 0;
-					bus_dmamap_sync(sc->dmatag, 
-					    sc->aauring[descnb - 1].map, 
+					bus_dmamap_sync(sc->dmatag,
+					    sc->aauring[descnb - 1].map,
 					    BUS_DMASYNC_PREWRITE);
 				}
 				continue;
@@ -241,15 +241,15 @@
 			if (tmplen > 0) {
 				desc->next_desc = sc->aauring[descnb + 1].
 				    phys_addr;
-				bus_dmamap_sync(sc->dmatag, 
-				    sc->aauring[descnb].map, 
+				bus_dmamap_sync(sc->dmatag,
+				    sc->aauring[descnb].map,
 				    BUS_DMASYNC_PREWRITE);
 				desc = sc->aauring[descnb + 1].desc;
 				descnb++;
 			} else {
 				desc->next_desc = 0;
-				bus_dmamap_sync(sc->dmatag, 
-				    sc->aauring[descnb].map, 
+				bus_dmamap_sync(sc->dmatag,
+				    sc->aauring[descnb].map,
 				    BUS_DMASYNC_PREWRITE);
 			}
 									
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i80321/i80321_dma.c
--- a/head/sys/arm/xscale/i80321/i80321_dma.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i80321/i80321_dma.c	Wed Jul 25 17:18:25 2012 +0300
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i80321/i80321_dma.c 236987 2012-06-13 04:38:09Z imp $");
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/bus.h>
@@ -115,13 +115,13 @@
 	mtx_init(&softc->mtx, "DMA engine mtx", NULL, MTX_SPIN);
 	softc->sc_st = sc->sc_st;
 	if (bus_space_subregion(softc->sc_st, sc->sc_sh, unit == 0 ?
-	    VERDE_DMA_BASE0 : VERDE_DMA_BASE1, VERDE_DMA_SIZE, 
+	    VERDE_DMA_BASE0 : VERDE_DMA_BASE1, VERDE_DMA_SIZE,
 	    &softc->sc_dma_sh) != 0)
 		panic("%s: unable to subregion DMA registers",
 		    device_get_name(dev));
 	if (bus_dma_tag_create(NULL, sizeof(i80321_dmadesc_t),
-	    0, BUS_SPACE_MAXADDR,  BUS_SPACE_MAXADDR, NULL, NULL, 
-	    DMA_RING_SIZE * sizeof(i80321_dmadesc_t), 1, 
+	    0, BUS_SPACE_MAXADDR,  BUS_SPACE_MAXADDR, NULL, NULL,
+	    DMA_RING_SIZE * sizeof(i80321_dmadesc_t), 1,
 	    sizeof(i80321_dmadesc_t), BUS_DMA_ALLOCNOW, busdma_lock_mutex,
 	    &Giant, &softc->dmatag))
 		panic("Couldn't create a dma tag");
@@ -131,7 +131,7 @@
 		panic("Couldn't alloc dma memory");
 	for (int i = 0; i < DMA_RING_SIZE; i++) {
 		if (i > 0)
-			if (bus_dmamap_create(softc->dmatag, 0, 
+			if (bus_dmamap_create(softc->dmatag, 0,
 			    &softc->dmaring[i].map))
 				panic("Couldn't alloc dmamap");
 		softc->dmaring[i].desc = &dmadescs[i];	
@@ -213,11 +213,11 @@
 		desc->local_addr = (vm_paddr_t)dst;
 		desc->count = len;
 		desc->descr_ctrl = 1 << 6; /* Local memory to local memory. */
-		bus_dmamap_sync(sc->dmatag, 
-		    sc->dmaring[0].map, 
+		bus_dmamap_sync(sc->dmatag,
+		    sc->dmaring[0].map,
 		    BUS_DMASYNC_PREWRITE);
 	} else {
-		if (!virt_addr_is_valid(dst, len, 1, !(flags & DST_IS_USER)) || 
+		if (!virt_addr_is_valid(dst, len, 1, !(flags & DST_IS_USER)) ||
 		    !virt_addr_is_valid(src, len, 0, !(flags & SRC_IS_USER))) {
 			mtx_lock_spin(&sc->mtx);
 			sc->flags &= ~BUSY;
@@ -275,8 +275,8 @@
 				if (tmplen <= 0 && descnb > 0) {
 					sc->dmaring[descnb - 1].desc->next_desc
 					    = 0;
-					bus_dmamap_sync(sc->dmatag, 
-					    sc->dmaring[descnb - 1].map, 
+					bus_dmamap_sync(sc->dmatag,
+					    sc->dmaring[descnb - 1].map,
 					    BUS_DMASYNC_PREWRITE);
 				}
 				continue;
@@ -301,8 +301,8 @@
 			if (tmplen > 0) {
 				desc->next_desc = sc->dmaring[descnb + 1].
 				    phys_addr;
-				bus_dmamap_sync(sc->dmatag, 
-				    sc->dmaring[descnb].map, 
+				bus_dmamap_sync(sc->dmatag,
+				    sc->dmaring[descnb].map,
 				    BUS_DMASYNC_PREWRITE);
 				desc = sc->dmaring[descnb + 1].desc;
 				descnb++;
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i80321/i80321_intr.h
--- a/head/sys/arm/xscale/i80321/i80321_intr.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i80321/i80321_intr.h	Wed Jul 25 17:18:25 2012 +0300
@@ -33,8 +33,8 @@
  * 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.
- * 
- * $FreeBSD$
+ *
+ * $FreeBSD: head/sys/arm/xscale/i80321/i80321_intr.h 236987 2012-06-13 04:38:09Z imp $
  *
  */
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i80321/i80321_pci.c
--- a/head/sys/arm/xscale/i80321/i80321_pci.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i80321/i80321_pci.c	Wed Jul 25 17:18:25 2012 +0300
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/xscale/i80321/i80321_pci.c 227843 2011-11-22 21:28:20Z marius $");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i80321/i80321_pci.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -79,7 +79,7 @@
 i80321_pci_attach(device_t dev)
 {
 
-	uint32_t busno;                                       
+	uint32_t busno;
 	struct i80321_pci_softc *sc = device_get_softc(dev);
 
 	sc->sc_st = i80321_softc->sc_st;
@@ -100,16 +100,16 @@
 	sc->sc_io_rman.rm_type = RMAN_ARRAY;
 	sc->sc_io_rman.rm_descr = "I80321 PCI I/O Ports";
 	if (rman_init(&sc->sc_io_rman) != 0 ||
-		rman_manage_region(&sc->sc_io_rman, 
-		sc->sc_io, 
-		    sc->sc_io + 
+		rman_manage_region(&sc->sc_io_rman,
+		sc->sc_io,
+		    sc->sc_io +
 		    VERDE_OUT_XLATE_IO_WIN_SIZE) != 0) {
 		panic("i80321_pci_probe: failed to set up I/O rman");
 	}
 	sc->sc_mem_rman.rm_type = RMAN_ARRAY;
 	sc->sc_mem_rman.rm_descr = "I80321 PCI Memory";
 	if (rman_init(&sc->sc_mem_rman) != 0 ||
-	    rman_manage_region(&sc->sc_mem_rman, 
+	    rman_manage_region(&sc->sc_mem_rman,
 	    0, VERDE_OUT_XLATE_MEM_WIN_SIZE) != 0) {
 		panic("i80321_pci_probe: failed to set up memory rman");
 	}
@@ -325,7 +325,7 @@
 				rman_release_resource(rv);
 				return (NULL);
 			}
-		} 
+		}
 	}
 	return (rv);
 }
@@ -340,7 +340,7 @@
 	if (type == SYS_RES_MEMORY) {
 		error = bus_space_map(rman_get_bustag(r),
 		    rman_get_bushandle(r), rman_get_size(r), 0, &p);
-		if (error) 
+		if (error)
 			return (error);
 		rman_set_bushandle(r, p);
 	
@@ -350,8 +350,8 @@
 
 static int
 i80321_pci_setup_intr(device_t dev, device_t child,
-    struct resource *ires, int flags, driver_filter_t *filt, 
-    driver_intr_t *intr, void *arg, void **cookiep)    
+    struct resource *ires, int flags, driver_filter_t *filt,
+    driver_intr_t *intr, void *arg, void **cookiep)
 {
 	return (BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags,
 	    filt, intr, arg, cookiep));
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i80321/i80321_space.c
--- a/head/sys/arm/xscale/i80321/i80321_space.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i80321/i80321_space.c	Wed Jul 25 17:18:25 2012 +0300
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i80321/i80321_space.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -279,7 +279,7 @@
 	panic("i80321_io_bs_alloc(): not implemented");
 }
 
-void    
+void
 i80321_io_bs_free(void *t, bus_space_handle_t bsh, bus_size_t size)
 {
 
@@ -299,7 +299,7 @@
 	endpa = round_page(bpa + size);
 
 	*bshp = (vm_offset_t)pmap_mapdev(pa, endpa - pa);
-		       
+		
 	return (0);
 }
 
@@ -324,7 +324,7 @@
 	panic("i80321_mem_bs_alloc(): not implemented");
 }
 
-void    
+void
 i80321_mem_bs_free(void *t, bus_space_handle_t bsh, bus_size_t size)
 {
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i80321/i80321_timer.c
--- a/head/sys/arm/xscale/i80321/i80321_timer.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i80321/i80321_timer.c	Wed Jul 25 17:18:25 2012 +0300
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i80321/i80321_timer.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -62,7 +62,7 @@
 #include <arm/xscale/i80321/i80321var.h>
 
 #ifdef CPU_XSCALE_81342
-#define ICU_INT_TIMER0	(8) /* XXX: Can't include i81342reg.h because 
+#define ICU_INT_TIMER0	(8) /* XXX: Can't include i81342reg.h because
 			       definitions overrides the ones from i80321reg.h
 			       */
 #endif
@@ -79,7 +79,7 @@
 
 static uint32_t counts_per_hz;
 
-#if defined(XSCALE_DISABLE_CCNT) || defined(CPU_XSCALE_81342) 
+#if defined(XSCALE_DISABLE_CCNT) || defined(CPU_XSCALE_81342)
 static uint32_t offset;
 static uint32_t last = -1;
 #endif
@@ -383,17 +383,17 @@
 
 	oldirqstate = disable_interrupts(I32_bit);
 
-	irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 
+	irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid,
 #ifdef CPU_XSCALE_81342
 	    ICU_INT_TIMER0, ICU_INT_TIMER0,
 #else
-	    ICU_INT_TMR0, ICU_INT_TMR0, 
+	    ICU_INT_TMR0, ICU_INT_TMR0,
 #endif
 	    1, RF_ACTIVE);
 	if (!irq)
 		panic("Unable to setup the clock irq handler.\n");
 	else
-		bus_setup_intr(dev, irq, INTR_TYPE_CLK, clockhandler, NULL, 
+		bus_setup_intr(dev, irq, INTR_TYPE_CLK, clockhandler, NULL,
 		    NULL, &ihl);
 	tmr0_write(0);			/* stop timer */
 	tisr_write(TISR_TMR0);		/* clear interrupt */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i80321/i80321reg.h
--- a/head/sys/arm/xscale/i80321/i80321reg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i80321/i80321reg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -34,12 +34,12 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/xscale/i80321/i80321reg.h 236987 2012-06-13 04:38:09Z imp $
  *
  */
 
-#ifndef _ARM_XSCALE_I80321REG_H_ 
-#define _ARM_XSCALE_I80321REG_H_ 
+#ifndef _ARM_XSCALE_I80321REG_H_
+#define _ARM_XSCALE_I80321REG_H_
 
 /*
  * Register definitions for the Intel 80321 (``Verde'') I/O processor,
@@ -102,7 +102,7 @@
 #if defined(CPU_XSCALE_80321)
 #define	VERDE_AAU_BASE			0x0800
 #define	VERDE_AAU_SIZE			0x0100
-#endif 
+#endif
 
 #define	VERDE_I2C_BASE			0x1680
 #define	VERDE_I2C_BASE0			(VERDE_I2C_BASE + 0x00)
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i80321/iq31244_7seg.c
--- a/head/sys/arm/xscale/i80321/iq31244_7seg.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i80321/iq31244_7seg.c	Wed Jul 25 17:18:25 2012 +0300
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/xscale/i80321/iq31244_7seg.c 227309 2011-11-07 15:43:11Z ed $");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i80321/iq31244_7seg.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -206,7 +206,7 @@
 	SEG_D|SEG_E,
 };
 
-static uint8_t 
+static uint8_t
 iq80321_7seg_xlate(char c)
 {
 	uint8_t rv;
@@ -336,7 +336,7 @@
 
 static SYSCTL_NODE(_hw, OID_AUTO, sevenseg, CTLFLAG_RD, 0, "7 seg");
 static int freq = 20;
-SYSCTL_INT(_hw_sevenseg, OID_AUTO, freq, CTLFLAG_RW, &freq, 0, 
+SYSCTL_INT(_hw_sevenseg, OID_AUTO, freq, CTLFLAG_RW, &freq, 0,
     "7 Seg update frequency");
 static void
 iq31244_7seg_snake(void)
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i80321/iq31244_machdep.c
--- a/head/sys/arm/xscale/i80321/iq31244_machdep.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i80321/iq31244_machdep.c	Wed Jul 25 17:18:25 2012 +0300
@@ -40,13 +40,13 @@
  *
  * Machine dependant functions for kernel setup
  *
- * This file needs a lot of work. 
+ * This file needs a lot of work.
  *
  * Created      : 17/09/94
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i80321/iq31244_machdep.c 238329 2012-07-10 01:49:50Z imp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -115,10 +115,6 @@
 
 struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
 
-extern void *_end;
-
-extern int *end;
-
 struct pcpu __pcpu;
 struct pcpu *pcpup = &__pcpu;
 
@@ -126,7 +122,6 @@
 
 vm_paddr_t phys_avail[10];
 vm_paddr_t dump_avail[4];
-vm_offset_t physical_pages;
 
 struct pv_addr systempage;
 struct pv_addr msgbufpv;
@@ -136,13 +131,11 @@
 struct pv_addr kernelstack;
 struct pv_addr minidataclean;
 
-static struct trapframe proc0_tf;
-
 #define IQ80321_OBIO_BASE 0xfe800000UL
 #define IQ80321_OBIO_SIZE 0x00100000UL
 /* Static device mappings. */
 static const struct pmap_devmap iq80321_devmap[] = {
-	/* 
+	/*
 	 * Map the on-board devices VA == PA so that we can access them
 	 * with the MMU on or off.
 	 */
@@ -150,7 +143,7 @@
 		    IQ80321_OBIO_BASE,
 		    IQ80321_OBIO_BASE,
 		    IQ80321_OBIO_SIZE,
-		    VM_PROT_READ|VM_PROT_WRITE,                             
+		    VM_PROT_READ|VM_PROT_WRITE,
 		    PTE_NOCACHE,
 	    },
 	    {
@@ -160,7 +153,7 @@
 		    VM_PROT_READ|VM_PROT_WRITE,
 		    PTE_NOCACHE,
 	    },
-	    
+	
 	    {
 		    IQ80321_80321_VBASE,
 		    VERDE_PMMR_BASE,
@@ -182,7 +175,7 @@
 extern vm_offset_t xscale_cache_clean_addr;
 
 void *
-initarm(void *arg, void *arg2)
+initarm(struct arm_boot_params *abp)
 {
 	struct pv_addr  kernel_l1pt;
 	struct pv_addr  dpcpu;
@@ -195,8 +188,8 @@
 	vm_offset_t lastaddr;
 	uint32_t memsize, memstart;
 
+	lastaddr = parse_boot_param(abp);
 	set_cpufuncs();
-	lastaddr = fake_preload_metadata();
 	pcpu_init(pcpup, 0, sizeof(struct pcpu));
 	PCPU_SET(curthread, &thread0);
 
@@ -225,7 +218,7 @@
 			kernel_pt_table[loop].pv_pa = freemempos +
 			    (loop % (PAGE_SIZE / L2_TABLE_SIZE_REAL)) *
 			    L2_TABLE_SIZE_REAL;
-			kernel_pt_table[loop].pv_va = 
+			kernel_pt_table[loop].pv_va =
 			    kernel_pt_table[loop].pv_pa + 0x20000000;
 		}
 	}
@@ -292,13 +285,13 @@
 	   (((uint32_t)(lastaddr) - KERNBASE - 0x200000) + L1_S_SIZE) & ~(L1_S_SIZE - 1),
 	    VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
 	freemem_after = ((int)lastaddr + PAGE_SIZE) & ~(PAGE_SIZE - 1);
-	afterkern = round_page(((vm_offset_t)lastaddr + L1_S_SIZE) & ~(L1_S_SIZE 
+	afterkern = round_page(((vm_offset_t)lastaddr + L1_S_SIZE) & ~(L1_S_SIZE
 	    - 1));
 	for (i = 0; i < KERNEL_PT_AFKERNEL_NUM; i++) {
 		pmap_link_l2pt(l1pagetable, afterkern + i * 0x00100000,
 		    &kernel_pt_table[KERNEL_PT_AFKERNEL + i]);
 	}
-	pmap_map_entry(l1pagetable, afterkern, minidataclean.pv_pa, 
+	pmap_map_entry(l1pagetable, afterkern, minidataclean.pv_pa,
 	    VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
 	
 
@@ -307,7 +300,7 @@
 		arm_add_smallalloc_pages((void *)(freemem_after),
 		    (void*)(freemem_after + PAGE_SIZE),
 		    afterkern - (freemem_after + PAGE_SIZE), 0);
-		    
+		
 	}
 #endif
 
@@ -339,7 +332,7 @@
 	 * of the stack memory.
 	 */
 
-				   
+				
 	set_stackptr(PSR_IRQ32_MODE,
 	    irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE);
 	set_stackptr(PSR_ABT32_MODE,
@@ -377,13 +370,7 @@
 	undefined_handler_address = (u_int)undefinedinstruction_bounce;
 	undefined_init();
 				
-	proc_linkup0(&proc0, &thread0);
-	thread0.td_kstack = kernelstack.pv_va;
-	thread0.td_pcb = (struct pcb *)
-		(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
-	thread0.td_pcb->pcb_flags = 0;
-	thread0.td_frame = &proc0_tf;
-	pcpup->pc_curpcb = thread0.td_pcb;
+	init_proc0(kernelstack.pv_va);
 	
 	/* Enable MMU, I-cache, D-cache, write buffer. */
 
@@ -401,7 +388,7 @@
 	dump_avail[2] = 0;
 	dump_avail[3] = 0;
 					
-	pmap_bootstrap(pmap_curmaxkvaddr, 
+	pmap_bootstrap(pmap_curmaxkvaddr,
 	    0xd0000000, &kernel_l1pt);
 	msgbufp = (void*)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i80321/iq80321.c
--- a/head/sys/arm/xscale/i80321/iq80321.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i80321/iq80321.c	Wed Jul 25 17:18:25 2012 +0300
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/xscale/i80321/iq80321.c 226832 2011-10-27 10:21:40Z kevlo $");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i80321/iq80321.c 236987 2012-06-13 04:38:09Z imp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -324,7 +324,7 @@
 
 void
 cpu_reset()
-{       
+{
 	(void) disable_interrupts(I32_bit|F32_bit);
 	*(__volatile uint32_t *)(IQ80321_80321_VBASE + VERDE_ATU_BASE +
 	    ATU_PCSR) = PCSR_RIB | PCSR_RPB;
@@ -351,7 +351,7 @@
 
 static int
 iq80321_setup_intr(device_t dev, device_t child,
-    struct resource *ires, int flags, driver_filter_t *filt, 
+    struct resource *ires, int flags, driver_filter_t *filt,
     driver_intr_t *intr, void *arg, void **cookiep)
 {
 	int error;
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i80321/obio.c
--- a/head/sys/arm/xscale/i80321/obio.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i80321/obio.c	Wed Jul 25 17:18:25 2012 +0300
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i80321/obio.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -120,7 +120,7 @@
 
 
 	rv = rman_reserve_resource(rm, start, end, count, flags, child);
-	if (rv == NULL) 
+	if (rv == NULL)
 		return (NULL);
 	if (type == SYS_RES_IRQ)
 		return (rv);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i8134x/crb_machdep.c
--- a/head/sys/arm/xscale/i8134x/crb_machdep.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i8134x/crb_machdep.c	Wed Jul 25 17:18:25 2012 +0300
@@ -40,13 +40,13 @@
  *
  * Machine dependant functions for kernel setup
  *
- * This file needs a lot of work. 
+ * This file needs a lot of work.
  *
  * Created      : 17/09/94
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/xscale/i8134x/crb_machdep.c 232295 2012-02-29 12:44:34Z cognet $");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i8134x/crb_machdep.c 238329 2012-07-10 01:49:50Z imp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -117,7 +117,6 @@
 extern u_int undefined_handler_address;
 
 struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
-extern int *end;
 
 struct pcpu __pcpu;
 struct pcpu *pcpup = &__pcpu;
@@ -126,7 +125,6 @@
 
 vm_paddr_t phys_avail[10];
 vm_paddr_t dump_avail[4];
-vm_offset_t physical_pages;
 
 struct pv_addr systempage;
 struct pv_addr msgbufpv;
@@ -135,8 +133,6 @@
 struct pv_addr abtstack;
 struct pv_addr kernelstack;
 
-static struct trapframe proc0_tf;
-
 /* Static device mappings. */
 static const struct pmap_devmap iq81342_devmap[] = {
 	    {
@@ -164,7 +160,7 @@
 		    VM_PROT_READ|VM_PROT_WRITE,
 		    PTE_NOCACHE,
 	    },
-	    {	    
+	    {	
 		    0,
 		    0,
 		    0,
@@ -178,7 +174,7 @@
 extern vm_offset_t xscale_cache_clean_addr;
 
 void *
-initarm(void *arg, void *arg2)
+initarm(struct arm_boot_params *abp)
 {
 	struct pv_addr  kernel_l1pt;
 	struct pv_addr  dpcpu;
@@ -191,8 +187,8 @@
 	vm_offset_t lastaddr;
 	uint32_t memsize, memstart;
 
+	lastaddr = parse_boot_param(abp);
 	set_cpufuncs();
-	lastaddr = fake_preload_metadata();
 	pcpu_init(pcpup, 0, sizeof(struct pcpu));
 	PCPU_SET(curthread, &thread0);
 
@@ -221,7 +217,7 @@
 			kernel_pt_table[loop].pv_pa = freemempos +
 			    (loop % (PAGE_SIZE / L2_TABLE_SIZE_REAL)) *
 			    L2_TABLE_SIZE_REAL;
-			kernel_pt_table[loop].pv_va = 
+			kernel_pt_table[loop].pv_va =
 			    kernel_pt_table[loop].pv_pa + 0xc0000000;
 		}
 	}
@@ -280,7 +276,7 @@
 	   (((uint32_t)(lastaddr) - KERNBASE - 0x200000) + L1_S_SIZE) & ~(L1_S_SIZE - 1),
 	    VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
 	freemem_after = ((int)lastaddr + PAGE_SIZE) & ~(PAGE_SIZE - 1);
-	afterkern = round_page(((vm_offset_t)lastaddr + L1_S_SIZE) & ~(L1_S_SIZE 
+	afterkern = round_page(((vm_offset_t)lastaddr + L1_S_SIZE) & ~(L1_S_SIZE
 	    - 1));
 	for (i = 0; i < KERNEL_PT_AFKERNEL_NUM; i++) {
 		pmap_link_l2pt(l1pagetable, afterkern + i * 0x00100000,
@@ -293,7 +289,7 @@
 		arm_add_smallalloc_pages((void *)(freemem_after),
 		    (void*)(freemem_after + PAGE_SIZE),
 		    afterkern - (freemem_after + PAGE_SIZE), 0);
-		    
+		
 	}
 #endif
 
@@ -321,7 +317,7 @@
 	 * of the stack memory.
 	 */
 
-				   
+				
 	set_stackptr(PSR_IRQ32_MODE,
 	    irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE);
 	set_stackptr(PSR_ABT32_MODE,
@@ -353,13 +349,7 @@
 	undefined_handler_address = (u_int)undefinedinstruction_bounce;
 	undefined_init();
 				
-	proc_linkup0(&proc0, &thread0);
-	thread0.td_kstack = kernelstack.pv_va;
-	thread0.td_pcb = (struct pcb *)
-		(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
-	thread0.td_pcb->pcb_flags = 0;
-	thread0.td_frame = &proc0_tf;
-	pcpup->pc_curpcb = thread0.td_pcb;
+	init_proc0(kernelstack.pv_va);
 	
 	arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
 
@@ -373,7 +363,7 @@
 	dump_avail[2] = 0;
 	dump_avail[3] = 0;
 					
-	pmap_bootstrap(pmap_curmaxkvaddr, 
+	pmap_bootstrap(pmap_curmaxkvaddr,
 	    0xd0000000, &kernel_l1pt);
 	msgbufp = (void*)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i8134x/i81342.c
--- a/head/sys/arm/xscale/i8134x/i81342.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i8134x/i81342.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/xscale/i8134x/i81342.c 226832 2011-10-27 10:21:40Z kevlo $");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i8134x/i81342.c 238545 2012-07-17 03:18:12Z gonzo $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -425,8 +425,8 @@
 }
 
 static int
-i81342_setup_intr(device_t dev, device_t child, struct resource *ires, 
-    int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, 
+i81342_setup_intr(device_t dev, device_t child, struct resource *ires,
+    int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg,
     void **cookiep)
 {
 	int error;
@@ -435,7 +435,6 @@
 	    filt, intr, arg, cookiep);
 	if (error)
 		return (error);
-	arm_unmask_irq(rman_get_start(ires));
 	return (0);
 }
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i8134x/i81342_mcu.c
--- a/head/sys/arm/xscale/i8134x/i81342_mcu.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i8134x/i81342_mcu.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i8134x/i81342_mcu.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -38,7 +38,7 @@
 #include <arm/xscale/i8134x/i81342var.h>
 
 void
-i81342_sdram_bounds(bus_space_tag_t bt, bus_space_handle_t bh, 
+i81342_sdram_bounds(bus_space_tag_t bt, bus_space_handle_t bh,
     vm_paddr_t *start, vm_size_t *size)
 {
 	uint32_t reg;
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i8134x/i81342_pci.c
--- a/head/sys/arm/xscale/i8134x/i81342_pci.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i8134x/i81342_pci.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/xscale/i8134x/i81342_pci.c 227843 2011-11-22 21:28:20Z marius $");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i8134x/i81342_pci.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -180,7 +180,7 @@
 	sc->sc_io_rman.rm_type = RMAN_ARRAY;
 	sc->sc_io_rman.rm_descr = "I81342 PCI I/O Ports";
 	if (rman_init(&sc->sc_io_rman) != 0 ||
-		rman_manage_region(&sc->sc_io_rman, 
+		rman_manage_region(&sc->sc_io_rman,
 		sc->sc_is_atux ? IOP34X_PCIX_OIOBAR_VADDR :
 		IOP34X_PCIE_OIOBAR_VADDR,
 		(sc->sc_is_atux ? IOP34X_PCIX_OIOBAR_VADDR :
@@ -190,7 +190,7 @@
 	sc->sc_mem_rman.rm_type = RMAN_ARRAY;
 	sc->sc_mem_rman.rm_descr = "I81342 PCI Memory";
 	if (rman_init(&sc->sc_mem_rman) != 0 ||
-	    rman_manage_region(&sc->sc_mem_rman, 
+	    rman_manage_region(&sc->sc_mem_rman,
 	    0, 0xffffffff) != 0) {
 		panic("i81342_pci_attach: failed to set up memory rman");
 	}
@@ -198,12 +198,12 @@
 	sc->sc_irq_rman.rm_descr = "i81342 PCI IRQs";
 	if (sc->sc_is_atux) {
 		if (rman_init(&sc->sc_irq_rman) != 0 ||
-		    rman_manage_region(&sc->sc_irq_rman, ICU_INT_XINT0, 
+		    rman_manage_region(&sc->sc_irq_rman, ICU_INT_XINT0,
 		    ICU_INT_XINT3) != 0)
 			panic("i83142_pci_attach: failed to set up IRQ rman");
 	} else {
 		if (rman_init(&sc->sc_irq_rman) != 0 ||
-		    rman_manage_region(&sc->sc_irq_rman, ICU_INT_ATUE_MA, 
+		    rman_manage_region(&sc->sc_irq_rman, ICU_INT_ATUE_MA,
 		    ICU_INT_ATUE_MD) != 0)
 			panic("i81342_pci_attach: failed to set up IRQ rman");
 
@@ -242,7 +242,7 @@
 			*addr = (1 << (slot + 16)) | (slot << 11) |
 			    (func << 8) | reg;
 		else
-			*addr = (bus << 16) | (slot << 11) | (func << 11) | 
+			*addr = (bus << 16) | (slot << 11) | (func << 11) |
 			    reg | 1;
 	} else {
 		*addr = (bus << 24) | (slot << 19) | (func << 16) | reg;
@@ -297,7 +297,7 @@
 }
 
 static void
-i81342_pci_write_config(device_t dev, u_int bus, u_int slot, u_int func, 
+i81342_pci_write_config(device_t dev, u_int bus, u_int slot, u_int func,
     u_int reg, u_int32_t data, int bytes)
 {
 	struct i81342_pci_softc *sc = device_get_softc(dev);
@@ -372,7 +372,7 @@
 				rman_release_resource(rv);
 				return (NULL);
 			}
-		} 
+		}
 	}
 	return (rv);
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i8134x/i81342_space.c
--- a/head/sys/arm/xscale/i8134x/i81342_space.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i8134x/i81342_space.c	Wed Jul 25 17:18:25 2012 +0300
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i8134x/i81342_space.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -260,7 +260,7 @@
 	panic("i81342_io_bs_alloc(): not implemented");
 }
 
-void    
+void
 i81342_io_bs_free(void *t, bus_space_handle_t bsh, bus_size_t size)
 {
 
@@ -337,7 +337,7 @@
 	panic("i81342_mem_bs_alloc(): not implemented");
 }
 
-void    
+void
 i81342_mem_bs_free(void *t, bus_space_handle_t bsh, bus_size_t size)
 {
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i8134x/i81342reg.h
--- a/head/sys/arm/xscale/i8134x/i81342reg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i8134x/i81342reg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -24,12 +24,12 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-/* $FreeBSD$ */
+/* $FreeBSD: head/sys/arm/xscale/i8134x/i81342reg.h 236987 2012-06-13 04:38:09Z imp $ */
 
 #ifndef I83142_REG_H_
 #define I83142_REG_H_
 /* Physical Memory Map */
-/* 
+/*
  * 0x000000000 - 0x07FFFFFFF SDRAM
  * 0x090100000 - 0x0901FFFFF ATUe Outbound IO Window
  * 0x0F0000000 - 0x0F1FFFFFF Flash
@@ -62,7 +62,7 @@
 
 #define	IOP34X_ADMA_IE		(1 << 0) /* Interrupt enable */
 #define IOP34X_ADMA_TR		(1 << 1) /* Transfert Direction */
-/* 
+/*
  *               Source                   Destination
  *  00         Host I/O Interface	Local Memory
  *  01         Local Memory             Host I/O Interface
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i8134x/iq81342_7seg.c
--- a/head/sys/arm/xscale/i8134x/iq81342_7seg.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i8134x/iq81342_7seg.c	Wed Jul 25 17:18:25 2012 +0300
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/xscale/i8134x/iq81342_7seg.c 227309 2011-11-07 15:43:11Z ed $");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i8134x/iq81342_7seg.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -207,7 +207,7 @@
 	~(SEG_D|SEG_E),
 };
 
-static uint8_t 
+static uint8_t
 iq81342_7seg_xlate(char c)
 {
 	uint8_t rv;
@@ -337,7 +337,7 @@
 
 static SYSCTL_NODE(_hw, OID_AUTO, sevenseg, CTLFLAG_RD, 0, "7 seg");
 static int freq = 20;
-SYSCTL_INT(_hw_sevenseg, OID_AUTO, freq, CTLFLAG_RW, &freq, 0, 
+SYSCTL_INT(_hw_sevenseg, OID_AUTO, freq, CTLFLAG_RW, &freq, 0,
     "7 Seg update frequency");
 static void
 iq81342_7seg_snake(void)
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i8134x/obio.c
--- a/head/sys/arm/xscale/i8134x/obio.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i8134x/obio.c	Wed Jul 25 17:18:25 2012 +0300
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i8134x/obio.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -127,7 +127,7 @@
 
 
 	rv = rman_reserve_resource(rm, start, end, count, flags, child);
-	if (rv == NULL) 
+	if (rv == NULL)
 		return (NULL);
 	if (type == SYS_RES_IRQ)
 		return (rv);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/i8134x/uart_cpu_i81342.c
--- a/head/sys/arm/xscale/i8134x/uart_cpu_i81342.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/i8134x/uart_cpu_i81342.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/i8134x/uart_cpu_i81342.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -55,7 +55,7 @@
 	di->ops = uart_getops(&uart_ns8250_class);
 	di->bas.chan = 0;
 	di->bas.bst = &obio_bs_tag;
-	di->bas.regshft = 2; 
+	di->bas.regshft = 2;
 	di->bas.rclk = 33334000;
 	di->baudrate = 115200;
 	di->databits = 8;
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/avila_ata.c
--- a/head/sys/arm/xscale/ixp425/avila_ata.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/avila_ata.c	Wed Jul 25 17:18:25 2012 +0300
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/avila_ata.c 227849 2011-11-22 21:56:55Z hselasky $");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/avila_ata.c 236987 2012-06-13 04:38:09Z imp $");
 
 /*
  * Compact Flash Support for the Avila Gateworks XScale boards.
@@ -304,7 +304,7 @@
 }
 
 static int
-ata_avila_setup_intr(device_t dev, device_t child, struct resource *irq, 
+ata_avila_setup_intr(device_t dev, device_t child, struct resource *irq,
 		   int flags, driver_filter_t *filt,
 		   driver_intr_t *function, void *argument, void **cookiep)
 {
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/avila_gpio.c
--- a/head/sys/arm/xscale/ixp425/avila_gpio.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/avila_gpio.c	Wed Jul 25 17:18:25 2012 +0300
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/avila_gpio.c 226034 2011-10-05 08:33:50Z thompsa $");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/avila_gpio.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -108,7 +108,7 @@
 /*
  * Helpers
  */
-static void avila_gpio_pin_configure(struct avila_gpio_softc *sc, 
+static void avila_gpio_pin_configure(struct avila_gpio_softc *sc,
     struct gpio_pin *pin, uint32_t flags);
 static int  avila_gpio_pin_flags(struct avila_gpio_softc *sc, uint32_t pin);
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/avila_machdep.c
--- a/head/sys/arm/xscale/ixp425/avila_machdep.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/avila_machdep.c	Wed Jul 25 17:18:25 2012 +0300
@@ -40,13 +40,13 @@
  *
  * Machine dependant functions for kernel setup
  *
- * This file needs a lot of work. 
+ * This file needs a lot of work.
  *
  * Created      : 17/09/94
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/avila_machdep.c 238329 2012-07-10 01:49:50Z imp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -119,10 +119,6 @@
 
 struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
 
-extern void *_end;
-
-extern int *end;
-
 struct pcpu __pcpu;
 struct pcpu *pcpup = &__pcpu;
 
@@ -130,7 +126,6 @@
 
 vm_paddr_t phys_avail[10];
 vm_paddr_t dump_avail[4];
-vm_offset_t physical_pages;
 
 struct pv_addr systempage;
 struct pv_addr msgbufpv;
@@ -140,8 +135,6 @@
 struct pv_addr kernelstack;
 struct pv_addr minidataclean;
 
-static struct trapframe proc0_tf;
-
 /* Static device mappings. */
 static const struct pmap_devmap ixp425_devmap[] = {
 	/* Physical/Virtual address for I/O space */
@@ -225,7 +218,7 @@
 extern vm_offset_t xscale_cache_clean_addr;
 
 void *
-initarm(void *arg, void *arg2)
+initarm(struct arm_boot_params *abp)
 {
 #define	next_chunk2(a,b)	(((a) + (b)) &~ ((b)-1))
 #define	next_page(a)		next_chunk2(a,PAGE_SIZE)
@@ -240,9 +233,8 @@
 	vm_offset_t lastaddr;
 	uint32_t memsize;
 
-	bootverbose = 1; //////XXXX///////
+	lastaddr = parse_boot_param(abp);
 	set_cpufuncs();		/* NB: sets cputype */
-	lastaddr = fake_preload_metadata();
 	pcpu_init(pcpup, 0, sizeof(struct pcpu));
 	PCPU_SET(curthread, &thread0);
 
@@ -286,7 +278,7 @@
 			kernel_pt_table[loop].pv_pa = freemempos +
 			    (loop % (PAGE_SIZE / L2_TABLE_SIZE_REAL)) *
 			    L2_TABLE_SIZE_REAL;
-			kernel_pt_table[loop].pv_va = 
+			kernel_pt_table[loop].pv_va =
 			    kernel_pt_table[loop].pv_pa +
 				(KERNVIRTADDR - KERNPHYSADDR);
 		}
@@ -367,7 +359,7 @@
 		pmap_link_l2pt(l1pagetable, afterkern + i * 0x00100000,
 		    &kernel_pt_table[KERNEL_PT_AFKERNEL + i]);
 	}
-	pmap_map_entry(l1pagetable, afterkern, minidataclean.pv_pa, 
+	pmap_map_entry(l1pagetable, afterkern, minidataclean.pv_pa,
 	    VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
 
 #ifdef ARM_USE_SMALL_ALLOC
@@ -375,7 +367,7 @@
 		arm_add_smallalloc_pages((void *)(freemem_after),
 		    (void*)(freemem_after + PAGE_SIZE),
 		    afterkern - (freemem_after + PAGE_SIZE), 0);
-		    
+		
 	}
 #endif
 
@@ -444,22 +436,12 @@
 	undefined_handler_address = (u_int)undefinedinstruction_bounce;
 	undefined_init();
 
-	proc_linkup0(&proc0, &thread0);
-	thread0.td_kstack = kernelstack.pv_va;
-	thread0.td_pcb = (struct pcb *)
-		(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
-	thread0.td_pcb->pcb_flags = 0;
-	thread0.td_frame = &proc0_tf;
-	pcpup->pc_curpcb = thread0.td_pcb;
+	init_proc0(kernelstack.pv_va);
 
 	arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
 
 	pmap_curmaxkvaddr = afterkern + PAGE_SIZE;
-	dump_avail[0] = PHYSADDR;
-	dump_avail[1] = PHYSADDR + memsize;
-	dump_avail[2] = 0;
-	dump_avail[3] = 0;
-
+	arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0]));
 	pmap_bootstrap(pmap_curmaxkvaddr, 0xd0000000, &kernel_l1pt);
 	msgbufp = (void*)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/cambria_exp_space.c
--- a/head/sys/arm/xscale/ixp425/cambria_exp_space.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/cambria_exp_space.c	Wed Jul 25 17:18:25 2012 +0300
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/cambria_exp_space.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -249,7 +249,7 @@
 	cs3 = EXP_BUS_READ_4(sc, EXP_TIMING_CS3_OFFSET);
 	/* XXX force slowest possible timings and byte mode */
 	EXP_BUS_WRITE_4(sc, EXP_TIMING_CS3_OFFSET,
-	    cs3 | (EXP_T1|EXP_T2|EXP_T3|EXP_T4|EXP_T5) | 
+	    cs3 | (EXP_T1|EXP_T2|EXP_T3|EXP_T4|EXP_T5) |
 	        EXP_BYTE_EN | EXP_WR_EN | EXP_BYTE_RD16 | EXP_CS_EN);
 
 	/* XXX force GPIO 3+4 for GPS+RS485 uarts */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/if_npe.c
--- a/head/sys/arm/xscale/ixp425/if_npe.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/if_npe.c	Wed Jul 25 17:18:25 2012 +0300
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/if_npe.c 227309 2011-11-07 15:43:11Z ed $");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/if_npe.c 236987 2012-06-13 04:38:09Z imp $");
 
 /*
  * Intel XScale NPE Ethernet driver.
@@ -89,8 +89,8 @@
 
 #include "miibus_if.h"
 
-/* 
- * XXX: For the main bus dma tag. Can go away if the new method to get the 
+/*
+ * XXX: For the main bus dma tag. Can go away if the new method to get the
  * dma tag from the parent got MFC'd into RELENG_6.
  */
 extern struct ixp425_softc *ixp425_softc;
@@ -308,7 +308,7 @@
 	int unit = device_get_unit(dev);
 	int npeid;
 
-	if (unit > 2 || 
+	if (unit > 2 ||
 	    (ixp4xx_read_feature_bits() &
 	     (unit == 0 ? EXP_FCTRL_ETH0 : EXP_FCTRL_ETH1)) == 0)
 		return EINVAL;
@@ -512,7 +512,7 @@
 	}
 
 	/* DMA tag and map for the NPE buffers */
-	error = bus_dma_tag_create(ixp425_softc->sc_dmat, sizeof(uint32_t), 0, 
+	error = bus_dma_tag_create(ixp425_softc->sc_dmat, sizeof(uint32_t), 0,
 	    BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
 	    nbuf * sizeof(struct npehwbuf), 1,
 	    nbuf * sizeof(struct npehwbuf), 0,
@@ -1508,7 +1508,7 @@
 
 	/*
 	 * The MAC core rx/tx disable may leave the MAC hardware in an
-	 * unpredictable state. A hw reset is executed before resetting 
+	 * unpredictable state. A hw reset is executed before resetting
 	 * all the MAC parameters to a known value.
 	 */
 	WR4(sc, NPE_MAC_CORE_CNTRL, NPE_CORE_RESET);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/if_npereg.h
--- a/head/sys/arm/xscale/ixp425/if_npereg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/if_npereg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -26,13 +26,13 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGES.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/xscale/ixp425/if_npereg.h 236987 2012-06-13 04:38:09Z imp $
  */
 
 /*
  * Copyright (c) 2001-2005, Intel Corporation.
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -44,8 +44,8 @@
  * 3. Neither the name of the Intel Corporation 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 COPYRIGHT HOLDERS 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
@@ -253,19 +253,19 @@
 /* NB: shorthands for mii bus mdio routines */
 #define	NPE_MAC_MDIO_CMD	NPE_MAC_MDIO_CMD_1
 #define	NPE_MAC_MDIO_STS	NPE_MAC_MDIO_STS_1
- 
+
 #define NPE_MII_GO                  (1<<31)
 #define NPE_MII_WRITE               (1<<26)
-#define NPE_MII_TIMEOUT_10TH_SECS        5    
+#define NPE_MII_TIMEOUT_10TH_SECS        5
 #define NPE_MII_10TH_SEC_IN_MILLIS     100
 #define NPE_MII_READ_FAIL           (1<<31)
- 
+
 #define NPE_MII_PHY_DEF_DELAY	300	/* max delay before link up, etc. */
 #define NPE_MII_PHY_NO_DELAY	0x0	/* do not delay */
 #define NPE_MII_PHY_NULL	0xff	/* PHY is not present */
 #define NPE_MII_PHY_DEF_ADDR	0x0	/* default PHY's logical address */
 
-/* Register definition */  
+/* Register definition */
 #define NPE_MII_CTRL_REG	0x0	/* Control Register */
 #define NPE_MII_STAT_REG	0x1	/* Status Register */
 #define NPE_MII_PHY_ID1_REG	0x2	/* PHY identifier 1 Register */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/ixp425.c
--- a/head/sys/arm/xscale/ixp425/ixp425.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/ixp425.c	Wed Jul 25 17:18:25 2012 +0300
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/ixp425.c 226832 2011-10-27 10:21:40Z kevlo $");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/ixp425.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include "opt_ddb.h"
 
@@ -177,7 +177,7 @@
 	    gpiotr | GPIO_TYPE(pin, type));
 
 	/* configure gpio line as an input */
-	GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOER, 
+	GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOER,
 	    GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOER) | (1<<pin));
 	IXP4XX_GPIO_UNLOCK();
 }
@@ -334,7 +334,7 @@
 		cambria_exp_bus_init(sc);
 
 	if (bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT,
-	    BUS_SPACE_MAXADDR, NULL, NULL,  0xffffffff, 0xff, 0xffffffff, 0, 
+	    BUS_SPACE_MAXADDR, NULL, NULL,  0xffffffff, 0xff, 0xffffffff, 0,
 	    NULL, NULL, &sc->sc_dmat))
 		panic("%s: failed to create dma tag", __func__);
 
@@ -538,7 +538,7 @@
 					device_printf(child,
 					    "%s: assign 0x%lx:0x%lx%s\n",
 					    __func__, start, end - start,
-					    vtrans->isa4x ? " A4X" : 
+					    vtrans->isa4x ? " A4X" :
 					    vtrans->isslow ? " SLOW" : "");
 			}
 		} else
@@ -606,7 +606,7 @@
 
 static int
 ixp425_deactivate_resource(device_t bus, device_t child, int type, int rid,
-    struct resource *r) 
+    struct resource *r)
 {
 	/* NB: no private resources, just deactive */
 	return (rman_deactivate_resource(r));
@@ -639,8 +639,8 @@
 
 static int
 ixp425_setup_intr(device_t dev, device_t child,
-    struct resource *res, int flags, driver_filter_t *filt, 
-    driver_intr_t *intr, void *arg, void **cookiep)    
+    struct resource *res, int flags, driver_filter_t *filt,
+    driver_intr_t *intr, void *arg, void **cookiep)
 {
 	uint32_t mask, mask2;
 	int error;
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/ixp425_iic.c
--- a/head/sys/arm/xscale/ixp425/ixp425_iic.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/ixp425_iic.c	Wed Jul 25 17:18:25 2012 +0300
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/ixp425_iic.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -101,7 +101,7 @@
 	return (0);
 }
 
-static int 
+static int
 ixpiic_getscl(device_t dev)
 {
 	struct ixpiic_softc *sc = ixpiic_sc;
@@ -115,7 +115,7 @@
 	return (reg & GPIO_I2C_SCL_BIT);
 }
 
-static int 
+static int
 ixpiic_getsda(device_t dev)
 {
 	struct ixpiic_softc *sc = ixpiic_sc;
@@ -129,7 +129,7 @@
 	return (reg & GPIO_I2C_SDA_BIT);
 }
 
-static void 
+static void
 ixpiic_setsda(device_t dev, int val)
 {
 	struct ixpiic_softc *sc = ixpiic_sc;
@@ -144,7 +144,7 @@
 	DELAY(I2C_DELAY);
 }
 
-static void 
+static void
 ixpiic_setscl(device_t dev, int val)
 {
 	struct ixpiic_softc *sc = ixpiic_sc;
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/ixp425_npe.c
--- a/head/sys/arm/xscale/ixp425/ixp425_npe.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/ixp425_npe.c	Wed Jul 25 17:18:25 2012 +0300
@@ -30,7 +30,7 @@
 /*-
  * Copyright (c) 2001-2005, Intel Corporation.
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -42,8 +42,8 @@
  * 3. Neither the name of the Intel Corporation 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 COPYRIGHT HOLDERS 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
@@ -57,7 +57,7 @@
  * SUCH DAMAGE.
 */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/ixp425_npe.c 236987 2012-06-13 04:38:09Z imp $");
 
 /*
  * Intel XScale Network Processing Engine (NPE) support.
@@ -135,7 +135,7 @@
 
 /*
  * masks used to extract address info from State information context
- * register addresses as read from microcode image 
+ * register addresses as read from microcode image
  */
 #define IX_NPEDL_MASK_STATE_ADDR_CTXT_REG         0x0000000F
 #define IX_NPEDL_MASK_STATE_ADDR_CTXT_NUM         0x000000F0
@@ -332,7 +332,7 @@
 	    NULL, ixpnpe_intr, sc, &sc->sc_ih);
 	/*
 	 * Enable output fifo interrupts (NB: must also set OFIFO Write Enable)
-	 */ 
+	 */
 	npe_reg_write(sc, IX_NPECTL,
 	    npe_reg_read(sc, IX_NPECTL) | (IX_NPECTL_OFE | IX_NPECTL_OFWE));
 
@@ -347,7 +347,7 @@
 	if (--sc->sc_nrefs == 0) {
 		npes[sc->sc_npeid] = NULL;
 
-		/* disable output fifo interrupts */ 
+		/* disable output fifo interrupts */
 		npe_reg_write(sc, IX_NPECTL,
 		    npe_reg_read(sc, IX_NPECTL) &~ (IX_NPECTL_OFE | IX_NPECTL_OFWE));
 
@@ -671,7 +671,7 @@
     const IxNpeDlNpeMgrStateInfoBlock *bp, int verify)
 {
 	int i, nentries, error;
-     
+
 	npe_cpu_step_save(sc);
 
 	/* for each state-info context register entry in block */
@@ -683,7 +683,7 @@
 		uint32_t addrInfo = bp->ctxtRegEntry[i].addressInfo;
 
 		uint32_t reg = (addrInfo & IX_NPEDL_MASK_STATE_ADDR_CTXT_REG);
-		uint32_t cNum = (addrInfo & IX_NPEDL_MASK_STATE_ADDR_CTXT_NUM) >> 
+		uint32_t cNum = (addrInfo & IX_NPEDL_MASK_STATE_ADDR_CTXT_NUM) >>
 		    IX_NPEDL_OFFSET_STATE_ADDR_CTXT_NUM;
 		
 		/* error-check Context Register No. and Context Number values */
@@ -692,13 +692,13 @@
 			    "invalid Context Register %u\n", reg);
 			error = EINVAL;
 			break;
-		}    
+		}
 		if (!(0 <= cNum && cNum < IX_NPEDL_CTXT_NUM_MAX)) {
 			device_printf(sc->sc_dev,
 			    "invalid Context Number %u\n", cNum);
 			error = EINVAL;
 			break;
-		}    
+		}
 		/* NOTE that there is no STEVT register for Context 0 */
 		if (cNum == 0 && reg == IX_NPEDL_CTXT_REG_STEVT) {
 			device_printf(sc->sc_dev,
@@ -735,7 +735,7 @@
 
 	/*
 	 * Read Download Map, checking each block type and calling
-	 * appropriate function to perform download 
+	 * appropriate function to perform download
 	 */
 	error = 0;
 	downloadMap = (const IxNpeDlNpeMgrDownloadMap *) imageCodePtr;
@@ -844,7 +844,7 @@
 	    (ixNpeConfigCtrlRegVal & IX_NPEDL_PARITY_BIT_MASK));
 	DPRINTFn(2, sc->sc_dev, "%s: dis parity int, CTL => 0x%x\n",
 	    __func__, ixNpeConfigCtrlRegVal & IX_NPEDL_PARITY_BIT_MASK);
-     
+
 	npe_cpu_step_save(sc);
 
 	/*
@@ -873,7 +873,7 @@
 			DPRINTF(sc->sc_dev, "%s: cannot step (1), error %u\n",
 			    __func__, error);
 			npe_cpu_step_restore(sc);
-			return error;   
+			return error;
 		}
 	}
 	
@@ -888,10 +888,10 @@
 		DPRINTF(sc->sc_dev, "%s: cannot step (2), error %u\n",
 		    __func__, error);
 		npe_cpu_step_restore(sc);
-		return error;   
+		return error;
 	}
 
-	/* 
+	/*
 	 * Reset the physical registers in the NPE register file:
 	 * Note: no need to save/restore REGMAP for Context 0 here
 	 * since all Context Store regs are reset in subsequent code.
@@ -965,7 +965,7 @@
 	error = npe_cpu_stop(sc);
 
 	/* restore NPE configuration bus Control Register - Parity Settings  */
-	npe_reg_write(sc, IX_NPEDL_REG_OFFSET_CTL, 
+	npe_reg_write(sc, IX_NPEDL_REG_OFFSET_CTL,
 	    (ixNpeConfigCtrlRegVal & IX_NPEDL_CONFIG_CTRL_REG_MASK));
 	DPRINTFn(2, sc->sc_dev, "%s: restore CTL => 0x%x\n",
 	    __func__, npe_reg_read(sc, IX_NPEDL_REG_OFFSET_CTL));
@@ -1189,10 +1189,10 @@
 	    newWatchcount == oldWatchcount; tries++) {
 		/* Watch Count register incr's when NPE completes an inst */
 		newWatchcount = npe_reg_read(sc, IX_NPEDL_REG_OFFSET_WC);
-	}    
+	}
 	return (tries < IX_NPE_DL_MAX_NUM_OF_RETRIES) ? 0 : EIO;
 #undef IX_NPE_DL_MAX_NUM_OF_RETRIES
-}    
+}
 
 static void
 npe_cpu_step_restore(struct ixpnpe_softc *sc)
@@ -1283,7 +1283,7 @@
 	} else {
 		uint32_t npeInstruction;
 
-		switch (regSize) { 
+		switch (regSize) {
 		case IX_NPEDL_REG_SIZE_BYTE:
 			npeInstruction = IX_NPEDL_INSTR_WR_REG_BYTE;
 			regVal &= 0xff;
@@ -1353,7 +1353,7 @@
 	    /* regAddr = 0 or 4  */
 	    regAddr = (regAddr & IX_NPEDL_MASK_PHYS_REG_ADDR_LOGICAL_ADDR) *
 		sizeof(uint32_t);
-	    error = npe_logical_reg_write(sc, regAddr, regValue, 
+	    error = npe_logical_reg_write(sc, regAddr, regValue,
 		IX_NPEDL_REG_SIZE_WORD, 0, verify);
 	}
 	return error;
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/ixp425_npereg.h
--- a/head/sys/arm/xscale/ixp425/ixp425_npereg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/ixp425_npereg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -26,13 +26,13 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGES.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/xscale/ixp425/ixp425_npereg.h 236987 2012-06-13 04:38:09Z imp $
  */
 
 /*-
  * Copyright (c) 2001-2005, Intel Corporation.
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -44,8 +44,8 @@
  * 3. Neither the name of the Intel Corporation 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 COPYRIGHT HOLDERS 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
@@ -93,7 +93,7 @@
     (((imageId) >> 0) & 0xff)
 
 /*
- * Instruction and Data Memory Size (in words) for each NPE 
+ * Instruction and Data Memory Size (in words) for each NPE
  */
 #define IX_NPEDL_INS_MEMSIZE_WORDS_NPEA     4096
 #define IX_NPEDL_INS_MEMSIZE_WORDS_NPEB     2048
@@ -135,7 +135,7 @@
 #define IX_NPEDL_MASK_STAT_IFNE              0x00080000	/* IFNE bit */
 
 /*
- * EXCTL (Execution Control) Register commands 
+ * EXCTL (Execution Control) Register commands
 */
 #define IX_NPEDL_EXCTL_CMD_NPE_STEP          0x01	/* Step 1 instruction */
 #define IX_NPEDL_EXCTL_CMD_NPE_START         0x02	/* Start execution */
@@ -164,7 +164,7 @@
 #define IX_NPEDL_EXCTL_STATUS_ECS_K          0x00800000	/* pipeline Klean */
 
 /*
- * Executing Context Stack (ECS) level registers 
+ * Executing Context Stack (ECS) level registers
  */
 #define IX_NPEDL_ECS_BG_CTXT_REG_0           0x00	/* reg 0 @ bg ctx */
 #define IX_NPEDL_ECS_BG_CTXT_REG_1           0x01	/* reg 1 @ bg ctx */
@@ -220,14 +220,14 @@
  * Bit-Offsets from LSB of particular bit-fields in Execution Access registers.
  */
 
-#define IX_NPEDL_OFFSET_ECS_REG_0_NEXTPC     16 
+#define IX_NPEDL_OFFSET_ECS_REG_0_NEXTPC     16
 #define IX_NPEDL_OFFSET_ECS_REG_0_LDUR        8
 
 #define IX_NPEDL_OFFSET_ECS_REG_1_CCTXT      16
 #define IX_NPEDL_OFFSET_ECS_REG_1_SELCTXT     0
 
 /*
- * NPE core & co-processor instruction templates to load into NPE Instruction 
+ * NPE core & co-processor instruction templates to load into NPE Instruction
  * Register, for read/write of NPE register file registers.
  */
 
@@ -268,7 +268,7 @@
  * Write a 16-bit NPE internal logical register.
  * NPE Assembler instruction:  "cprd32 d0    &&& DBG_RdInFIFO"
  */
-#define IX_NPEDL_INSTR_RD_FIFO        0x0F888220    
+#define IX_NPEDL_INSTR_RD_FIFO        0x0F888220
 
 /*
  * Reset Mailbox (MBST) register
@@ -292,7 +292,7 @@
  * Mask the bits of 16-bit data value (least-sig 5 bits) to be used in
  * SRC field of immediate-mode NPE instruction
  */
-#define IX_NPEDL_MASK_IMMED_INSTR_SRC_DATA         0x1F 
+#define IX_NPEDL_MASK_IMMED_INSTR_SRC_DATA         0x1F
 
 /**
  * Mask the bits of 16-bit data value (most-sig 11 bits) to be used in
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/ixp425_pci.c
--- a/head/sys/arm/xscale/ixp425/ixp425_pci.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/ixp425_pci.c	Wed Jul 25 17:18:25 2012 +0300
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/ixp425_pci.c 229125 2011-12-31 15:53:34Z marius $");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/ixp425_pci.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -132,10 +132,10 @@
 
 	/* NB: PCI dma window is 64M so anything above must be bounced */
 	if (bus_dma_tag_create(NULL, 1, 0, IXP425_AHB_OFFSET + 64 * 1024 * 1024,
-	    BUS_SPACE_MAXADDR, NULL, NULL,  0xffffffff, 0xff, 0xffffffff, 0, 
+	    BUS_SPACE_MAXADDR, NULL, NULL,  0xffffffff, 0xff, 0xffffffff, 0,
 	    NULL, NULL, &sc->sc_dmat))
 		panic("couldn't create the PCI dma tag !");
-	/* 
+	/*
 	 * The PCI bus can only address 64MB. However, due to the way our
 	 * implementation of busdma works, busdma can't tell if a device
 	 * is a PCI device or not. So defaults to the PCI dma tag, which
@@ -155,7 +155,7 @@
 	sc->sc_io_rman.rm_type = RMAN_ARRAY;
 	sc->sc_io_rman.rm_descr = "IXP4XX PCI I/O Ports";
 	if (rman_init(&sc->sc_io_rman) != 0 ||
-		rman_manage_region(&sc->sc_io_rman, 0, 
+		rman_manage_region(&sc->sc_io_rman, 0,
 	    	    IXP425_PCI_IO_SIZE) != 0) {
 		panic("ixppcib_probe: failed to set up I/O rman");
 	}
@@ -259,7 +259,7 @@
 
 static int
 ixppcib_setup_intr(device_t dev, device_t child, struct resource *ires,
-    int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, 
+    int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg,
     void **cookiep)
 {
 
@@ -318,11 +318,11 @@
 
 static int
 ixppcib_activate_resource(device_t bus, device_t child, int type, int rid,
-    struct resource *r) 
+    struct resource *r)
 {
 
 	struct ixppcib_softc *sc = device_get_softc(bus);
-  
+
 	switch (type) {
 	case SYS_RES_IOPORT:
 		rman_set_bustag(r, &sc->sc_pci_iot);
@@ -340,7 +340,7 @@
 
 static int
 ixppcib_deactivate_resource(device_t bus, device_t child, int type, int rid,
-    struct resource *r) 
+    struct resource *r)
 {
 
 	device_printf(bus, "%s called deactivate_resource (unexpected)\n",
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/ixp425_pci_space.c
--- a/head/sys/arm/xscale/ixp425/ixp425_pci_space.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/ixp425_pci_space.c	Wed Jul 25 17:18:25 2012 +0300
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/ixp425_pci_space.c 236987 2012-06-13 04:38:09Z imp $");
 
 /*
  * bus_space PCI functions for ixp425
@@ -495,7 +495,7 @@
 	panic("ixp425_mem_bs_alloc(): not implemented\n");
 }
 
-void    
+void
 ixp425_pci_mem_bs_free(void *t, bus_space_handle_t bsh, bus_size_t size)
 {
 	panic("ixp425_mem_bs_free(): not implemented\n");
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/ixp425_qmgr.c
--- a/head/sys/arm/xscale/ixp425/ixp425_qmgr.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/ixp425_qmgr.c	Wed Jul 25 17:18:25 2012 +0300
@@ -30,7 +30,7 @@
 /*-
  * Copyright (c) 2001-2005, Intel Corporation.
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -42,8 +42,8 @@
  * 3. Neither the name of the Intel Corporation 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 COPYRIGHT HOLDERS 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
@@ -57,7 +57,7 @@
  * SUCH DAMAGE.
 */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/ixp425_qmgr.c 236987 2012-06-13 04:38:09Z imp $");
 
 /*
  * Intel XScale Queue Manager support.
@@ -124,7 +124,7 @@
 #if 0
 	/* NB: needed only for A0 parts */
 	u_int		statusWordOffset;	/* status word offset */
-	uint32_t	statusMask;             /* status mask */    
+	uint32_t	statusMask;             /* status mask */
 	uint32_t	statusCheckValue;	/* status check value */
 #endif
 };
@@ -257,7 +257,7 @@
 
 	    qi->cb = dummyCallback;
 	    qi->priority = IX_QMGR_Q_PRIORITY_0;	/* default priority */
-	    /* 
+	    /*
 	     * There are two interrupt registers, 32 bits each. One
 	     * for the lower queues(0-31) and one for the upper
 	     * queues(32-63). Therefore need to mod by 32 i.e the
@@ -280,17 +280,17 @@
 	    if (i < IX_QMGR_MIN_QUEUPP_QID) {
 		/* AQM Q underflow/overflow status reg address, per queue */
 		qi->qUOStatRegAddr = IX_QMGR_QUEUOSTAT0_OFFSET +
-		    ((i / IX_QMGR_QUEUOSTAT_NUM_QUE_PER_WORD) * 
+		    ((i / IX_QMGR_QUEUOSTAT_NUM_QUE_PER_WORD) *
 		     sizeof(uint32_t));
 
 		/* AQM Q underflow status bit masks for status reg per queue */
-		qi->qUflowStatBitMask = 
+		qi->qUflowStatBitMask =
 		    (IX_QMGR_UNDERFLOW_BIT_OFFSET + 1) <<
 		    ((i & (IX_QMGR_QUEUOSTAT_NUM_QUE_PER_WORD - 1)) *
 		     (32 / IX_QMGR_QUEUOSTAT_NUM_QUE_PER_WORD));
 
 		/* AQM Q overflow status bit masks for status reg, per queue */
-		qi->qOflowStatBitMask = 
+		qi->qOflowStatBitMask =
 		    (IX_QMGR_OVERFLOW_BIT_OFFSET + 1) <<
 		    ((i & (IX_QMGR_QUEUOSTAT_NUM_QUE_PER_WORD - 1)) *
 		     (32 / IX_QMGR_QUEUOSTAT_NUM_QUE_PER_WORD));
@@ -302,7 +302,7 @@
 
 		/* AQM Q lower-group (0-31) status register bit offset */
 		qi->qStatBitsOffset =
-		    (i & (IX_QMGR_QUELOWSTAT_NUM_QUE_PER_WORD - 1)) * 
+		    (i & (IX_QMGR_QUELOWSTAT_NUM_QUE_PER_WORD - 1)) *
 		    (32 / IX_QMGR_QUELOWSTAT_NUM_QUE_PER_WORD);
 	    } else { /* AQM Q upper-group (32-63), only */
 		qi->qUOStatRegAddr = 0;		/* XXX */
@@ -405,7 +405,7 @@
 		int qPtrs;
 
 		/*
-		 * Read the status twice because the status may 
+		 * Read the status twice because the status may
 		 * not be immediately ready after the write operation
 		 */
 		if ((status & qi->qOflowStatBitMask) ||
@@ -432,12 +432,12 @@
 		DPRINTFn(2, sc->sc_dev,
 		    "%s(%u, 0x%x) Q full, no overflow status, qConfig 0x%x\n",
 		    __func__, qId, entry, qPtrs);
-		qPtrs = (qPtrs - (qPtrs >> 7)) & 0x7f; 
+		qPtrs = (qPtrs - (qPtrs >> 7)) & 0x7f;
 
 		if (qPtrs == 0) {
 		    /*
-		     * The queue may be full at the time of the 
-		     * snapshot. Next access will check 
+		     * The queue may be full at the time of the
+		     * snapshot. Next access will check
 		     * the overflow status again.
 		     */
 		    qi->qWriteCount = qSize;
@@ -460,7 +460,7 @@
 	*entry = aqm_reg_read(sc, off);
 
 	/*
-	 * Reset the current read count : next access to the read function 
+	 * Reset the current read count : next access to the read function
 	 * will force a underflow status check.
 	 */
 	qi->qReadCount = 0;
@@ -499,7 +499,7 @@
 	*p = entry;
 
 	/*
-	 * Reset the current read count : next access to the read function 
+	 * Reset the current read count : next access to the read function
 	 * will force a underflow status check.
 	 */
 	qi->qReadCount = 0;
@@ -667,7 +667,7 @@
 	    /* low priority q's */
 	    for (q = 0; q < IX_QMGR_MIN_QUEUPP_QID; q++) {
 		qi = &sc->qinfo[q];
-		if (qi->priority == pri) { 
+		if (qi->priority == pri) {
 		    /*
 		     * Build the priority table bitmask which match the
 		     * queues of the first half of the priority table.
@@ -712,8 +712,8 @@
  * 0x00000001   31
  * 0x00000000   32
  *
- * The C version of this function is used as a replacement 
- * for system not providing the equivalent of the CLZ 
+ * The C version of this function is used as a replacement
+ * for system not providing the equivalent of the CLZ
  * assembly language instruction.
  *
  * Note that this version is big-endian
@@ -819,7 +819,7 @@
 {
 	struct qmgrInfo *qi = &qinfo[qId];
 	uint32_t shiftVal;
-       
+
 	if (qId < IX_QMGR_MIN_QUEUPP_QID) {
 	    switch (srcSel) {
 	    case IX_QMGR_Q_SOURCE_ID_E:
@@ -863,7 +863,7 @@
 	    /* One nibble of status per queue so need to shift the
 	     * check value and mask out to the correct position.
 	     */
-	    shiftVal = (qId % IX_QMGR_QUELOWSTAT_NUM_QUE_PER_WORD) * 
+	    shiftVal = (qId % IX_QMGR_QUELOWSTAT_NUM_QUE_PER_WORD) *
 		IX_QMGR_QUELOWSTAT_BITS_PER_Q;
 
 	    /* Calculate the which status word to check from the qId,
@@ -970,7 +970,7 @@
 
 	/* baseAddress, calculated relative to start address */
 	baseAddress = sc->aqmFreeSramAddress;
-		       
+		
 	/* base address must be word-aligned */
 	KASSERT((baseAddress % IX_QMGR_BASE_ADDR_16_WORD_ALIGN) == 0,
 	    ("address not word-aligned"));
@@ -1007,7 +1007,7 @@
 	if (off == IX_QMGR_INT0SRCSELREG0_OFFSET && qId == 0) {
 	    /* Queue 0 at INT0SRCSELREG should not corrupt the value bit-3  */
 	    v |= 0x7;
-	} else {     
+	} else {
 	  const uint32_t bpq = 32 / IX_QMGR_INTSRC_NUM_QUE_PER_WORD;
 	  uint32_t mask;
 	  int qshift;
@@ -1065,7 +1065,7 @@
 			     IX_QMGR_INT0SRCSELREG_RESET_VALUE);
 	aqm_reg_write(sc, IX_QMGR_INT0SRCSELREG3_OFFSET,
 			     IX_QMGR_INT0SRCSELREG_RESET_VALUE);
-	     
+	
 	/* Reset queue interrupt enable register 0..1 */
 	aqm_reg_write(sc, IX_QMGR_QUEIEREG0_OFFSET,
 		IX_QMGR_QUEIEREG_RESET_VALUE);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/ixp425_qmgr.h
--- a/head/sys/arm/xscale/ixp425/ixp425_qmgr.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/ixp425_qmgr.h	Wed Jul 25 17:18:25 2012 +0300
@@ -26,13 +26,13 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGES.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/xscale/ixp425/ixp425_qmgr.h 236987 2012-06-13 04:38:09Z imp $
  */
 
 /*-
  * Copyright (c) 2001-2005, Intel Corporation.
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -44,8 +44,8 @@
  * 3. Neither the name of the Intel Corporation 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 COPYRIGHT HOLDERS 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
@@ -148,7 +148,7 @@
         (((qId) * (IX_QMGR_QUEACC_SIZE * sizeof(uint32_t)))\
 	 + IX_QMGR_QUEACC0_OFFSET)
 
-/* 
+/*
  * Bit location of bit-3 of INT0SRCSELREG0 register to enabled
  * sticky interrupt register.
  */
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/ixp425reg.h
--- a/head/sys/arm/xscale/ixp425/ixp425reg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/ixp425reg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/xscale/ixp425/ixp425reg.h 236987 2012-06-13 04:38:09Z imp $
  *
  */
 
@@ -65,7 +65,7 @@
  * 4000 0000 ---------------------------
  *           SDRAM
  * 0000 0000 ---------------------------
- */           
+ */
 
 /*
  * Virtual memory map for the Intel IXP425/IXP435 integrated devices
@@ -613,7 +613,7 @@
 #define PMNC_EVCNT2_SHIFT 16
 #define PMNC_EVCNT3_SHIFT 24
 
-/* 
+/*
  * Queue Manager
  */
 #define	IXP425_QMGR_HWBASE	0x60000000UL
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/std.ixp425
--- a/head/sys/arm/xscale/ixp425/std.ixp425	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/std.ixp425	Wed Jul 25 17:18:25 2012 +0300
@@ -1,6 +1,5 @@
 #XScale IXP425 generic configuration
-#$FreeBSD$
+#$FreeBSD: head/sys/arm/xscale/ixp425/std.ixp425 235273 2012-05-11 14:51:59Z imp $
 files		"../xscale/ixp425/files.ixp425"
 include		"../xscale/std.xscale"
 cpu 		CPU_XSCALE_IXP425
-makeoption	ARM_BIG_ENDIAN
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/ixp425/std.ixp435
--- a/head/sys/arm/xscale/ixp425/std.ixp435	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/ixp425/std.ixp435	Wed Jul 25 17:18:25 2012 +0300
@@ -1,8 +1,7 @@
 #XScale IXP435 generic configuration
-#$FreeBSD$
+#$FreeBSD: head/sys/arm/xscale/ixp425/std.ixp435 235273 2012-05-11 14:51:59Z imp $
 
 files		"../xscale/ixp425/files.ixp425"
 include		"../xscale/std.xscale"
 cpu 		CPU_XSCALE_IXP435
 cpu 		CPU_XSCALE_IXP425
-makeoption	ARM_BIG_ENDIAN
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/pxa/if_smc_smi.c
--- a/head/sys/arm/xscale/pxa/if_smc_smi.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/pxa/if_smc_smi.c	Wed Jul 25 17:18:25 2012 +0300
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/pxa/if_smc_smi.c 236987 2012-06-13 04:38:09Z imp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -37,7 +37,7 @@
 #include <machine/bus.h>
 #include <machine/resource.h>
 
-#include <net/ethernet.h> 
+#include <net/ethernet.h>
 #include <net/if.h>
 #include <net/if_arp.h>
 #include <net/if_media.h>
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/pxa/pxa_machdep.c
--- a/head/sys/arm/xscale/pxa/pxa_machdep.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/pxa/pxa_machdep.c	Wed Jul 25 17:18:25 2012 +0300
@@ -40,7 +40,7 @@
  *
  * Machine dependant functions for kernel setup
  *
- * This file needs a lot of work. 
+ * This file needs a lot of work.
  *
  * Created      : 17/09/94
  */
@@ -48,7 +48,7 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/pxa/pxa_machdep.c 238329 2012-07-10 01:49:50Z imp $");
 
 #define _ARM32_BUS_DMA_PRIVATE
 #include <sys/param.h>
@@ -115,10 +115,6 @@
 
 struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
 
-extern void *_end;
-
-extern int *end;
-
 struct pcpu __pcpu;
 struct pcpu *pcpup = &__pcpu;
 
@@ -126,7 +122,6 @@
 
 vm_paddr_t phys_avail[PXA2X0_SDRAM_BANKS * 2 + 4];
 vm_paddr_t dump_avail[PXA2X0_SDRAM_BANKS * 2 + 4];
-vm_offset_t physical_pages;
 
 struct pv_addr systempage;
 struct pv_addr msgbufpv;
@@ -136,14 +131,12 @@
 struct pv_addr kernelstack;
 struct pv_addr minidataclean;
 
-static struct trapframe proc0_tf;
-
 static void	pxa_probe_sdram(bus_space_tag_t, bus_space_handle_t,
 		    uint32_t *, uint32_t *);
 
 /* Static device mappings. */
 static const struct pmap_devmap pxa_devmap[] = {
-	/* 
+	/*
 	 * Map the on-board devices up into the KVA region so we don't muck
 	 * up user-space.
 	 */
@@ -162,7 +155,7 @@
 extern vm_offset_t xscale_cache_clean_addr;
 
 void *
-initarm(void *arg, void *arg2)
+initarm(struct arm_boot_params *abp)
 {
 	struct pv_addr  kernel_l1pt;
 	struct pv_addr  dpcpu;
@@ -176,9 +169,8 @@
 	int i, j;
 	uint32_t memsize[PXA2X0_SDRAM_BANKS], memstart[PXA2X0_SDRAM_BANKS];
 
+	lastaddr = parse_boot_param(abp);
 	set_cpufuncs();
-
-	lastaddr = fake_preload_metadata();
 	pcpu_init(pcpup, 0, sizeof(struct pcpu));
 	PCPU_SET(curthread, &thread0);
 
@@ -207,10 +199,9 @@
 			kernel_pt_table[loop].pv_pa = freemempos +
 			    (loop % (PAGE_SIZE / L2_TABLE_SIZE_REAL)) *
 			    L2_TABLE_SIZE_REAL;
-			kernel_pt_table[loop].pv_va = 
+			kernel_pt_table[loop].pv_va =
 			    kernel_pt_table[loop].pv_pa + 0x20000000;
 		}
-		i++;
 	}
 	freemem_pt = freemempos;
 	freemempos = 0xa0100000;
@@ -283,7 +274,7 @@
 		pmap_link_l2pt(l1pagetable, afterkern + i * 0x00100000,
 		    &kernel_pt_table[KERNEL_PT_AFKERNEL + i]);
 	}
-	pmap_map_entry(l1pagetable, afterkern, minidataclean.pv_pa, 
+	pmap_map_entry(l1pagetable, afterkern, minidataclean.pv_pa,
 	    VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
 
 #ifdef ARM_USE_SMALL_ALLOC
@@ -367,13 +358,7 @@
 	undefined_handler_address = (u_int)undefinedinstruction_bounce;
 	undefined_init();
 
-	proc_linkup(&proc0, &thread0);
-	thread0.td_kstack = kernelstack.pv_va;
-	thread0.td_pcb = (struct pcb *)
-		(thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
-	thread0.td_pcb->pcb_flags = 0;
-	thread0.td_frame = &proc0_tf;
-	pcpup->pc_curpcb = thread0.td_pcb;
+	init_proc0(kernelstack.pv_va);
 
 	/* Enable MMU, I-cache, D-cache, write buffer. */
 	arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/pxa/pxa_obio.c
--- a/head/sys/arm/xscale/pxa/pxa_obio.c	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/pxa/pxa_obio.c	Wed Jul 25 17:18:25 2012 +0300
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/arm/xscale/pxa/pxa_obio.c 226832 2011-10-27 10:21:40Z kevlo $");
+__FBSDID("$FreeBSD: head/sys/arm/xscale/pxa/pxa_obio.c 238545 2012-07-17 03:18:12Z gonzo $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -181,7 +181,6 @@
 	    filter, ithread, arg, cookiep);
 	if (error)
 		return (error);
-	arm_unmask_irq(rman_get_start(irq));
 	return (0);
 }
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/pxa/pxareg.h
--- a/head/sys/arm/xscale/pxa/pxareg.h	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/pxa/pxareg.h	Wed Jul 25 17:18:25 2012 +0300
@@ -16,7 +16,7 @@
  *    must display the following acknowledgement:
  *	This product includes software developed for the NetBSD Project by
  *	Genetec Corporation.
- * 4. The name of Genetec Corporation may not be used to endorse or 
+ * 4. The name of Genetec Corporation may not be used to endorse or
  *    promote products derived from this software without specific prior
  *    written permission.
  *
@@ -32,7 +32,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: head/sys/arm/xscale/pxa/pxareg.h 236987 2012-06-13 04:38:09Z imp $
  */
 
 
@@ -139,7 +139,7 @@
 /* width of interrupt controller */
 #define ICU_LEN			32   /* but [0..7,15,16] is not used */
 #define ICU_INT_HWMASK		0xffffff00
-#define PXA250_IRQ_MIN 8	/* 0..7 are not used by integrated 
+#define PXA250_IRQ_MIN 8	/* 0..7 are not used by integrated
 				   peripherals */
 #define PXA270_IRQ_MIN 0
 
diff -r e92dc8e44a53 -r 32bcaf443245 head/sys/arm/xscale/std.xscale
--- a/head/sys/arm/xscale/std.xscale	Wed Jul 25 17:14:19 2012 +0300
+++ b/head/sys/arm/xscale/std.xscale	Wed Jul 25 17:18:25 2012 +0300
@@ -1,2 +1,3 @@
-# $FreeBSD$
+# $FreeBSD: head/sys/arm/xscale/std.xscale 238327 2012-07-10 01:32:52Z imp $
+# machine arm armeb
 options		ARM_CACHE_LOCK_ENABLE


More information about the Zrouter-src-freebsd mailing list