Date:2010-07-22 13:32:38 (8 years 4 months ago)
Author:claudio
Commit:8d879e2449d724c85dd01d50210601fda40298f5
Message:[at91] Add support for u-boot

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22351 3c298f89-4303-0410-b956-a3cf2f4a3e73
Files: target/linux/at91/image/Config.in (2 diffs)
target/linux/at91/image/Makefile (1 diff)
target/linux/at91/image/u-boot/Makefile (2 diffs)
target/linux/at91/image/u-boot/patches/001-lowlevel-config.patch (1 diff)
target/linux/at91/image/u-boot/patches/002-dataflash_machine.patch (1 diff)
target/linux/at91/image/u-boot/patches/003-mac_init.patch (1 diff)
target/linux/at91/image/u-boot/patches/004-mac_config.patch (1 diff)
target/linux/at91/image/u-boot/patches/005-remove_float.patch (1 diff)
target/linux/at91/image/u-boot/patches/006-generate_params.patch (1 diff)
target/linux/at91/image/u-boot/patches/007-ubparams_bugfix.patch (1 diff)
target/linux/at91/image/u-boot/patches/008-ubparams_bugfix.patch (1 diff)
target/linux/at91/image/u-boot/patches/009-mac_init_bugfix.patch (1 diff)
target/linux/at91/image/u-boot/patches/010-irda-patch-remove.patch (1 diff)
target/linux/at91/image/u-boot/patches/011-ubparams_update.patch (1 diff)
target/linux/at91/image/u-boot/patches/012-make_3.81.patch (1 diff)
target/linux/at91/image/u-boot/patches/013-params-in-config.patch (1 diff)
target/linux/at91/image/u-boot/patches/014-ubparam-kernel.patch (1 diff)
target/linux/at91/image/u-boot/patches/015-eabi_fixes.patch (1 diff)
target/linux/at91/image/u-boot/patches/100-netusg20.patch (1 diff)
target/linux/at91/image/u-boot/patches/200-clock.patch (1 diff)

Change Details

target/linux/at91/image/Config.in
1010
1111config UBOOT_TARGET
1212    string "U-Boot target board"
13    depends TARGET_at91
1413    depends AT91_UBOOT
15    default "vlink"
14    default "netusg20"
1615    help
1716      For all supported boards there are ready-to-use default
1817        configurations available; just type "<board_name>".
1918
2019config UBOOT_IPADDR
2120    string "IP Address for U-Boot"
22    depends TARGET_at91
2321    depends AT91_UBOOT
2422    default "192.168.0.178"
2523    help
...... 
2725
2826config UBOOT_SERVERIP
2927    string "IP Address of TFTP server"
30    depends TARGET_at91
3128    depends AT91_UBOOT
3229    default "192.168.0.232"
3330    help
target/linux/at91/image/Makefile
88include $(INCLUDE_DIR)/image.mk
99
1010define Build/Clean
11    $(MAKE) -C u-boot clean
1112endef
1213
1314define Build/Compile
15    if [ $(CONFIG_AT91_UBOOT) ]; then \
16        $(MAKE) -C u-boot compile; \
17    fi
1418endef
1519
1620define Image/Prepare
target/linux/at91/image/u-boot/Makefile
99include $(INCLUDE_DIR)/kernel.mk
1010
1111PKG_NAME:=u-boot
12PKG_VERSION:=1.1.4
12PKG_VERSION:=2010.06
1313PKG_RELEASE:=1
1414
1515PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
...... 
3434    $(CP) ./ubclient/* $(PKG_BUILD_DIR)/ubclient
3535    export LAN_IP=$(LAN_IP); \
3636    export LAN_SERVERIP=$(LAN_SERVERIP); \
37    $(MAKE) -C $(PKG_BUILD_DIR)/ubclient \
38        $(TARGET_CONFIGURE_OPTS) \
39        CFLAGS="$(TARGET_CFLAGS) -Dtarget_$(BOARD)=1"
37    #$(MAKE) -C $(PKG_BUILD_DIR)/ubclient \
38    # $(TARGET_CONFIGURE_OPTS) \
39    # CFLAGS="$(TARGET_CFLAGS) -Dtarget_$(BOARD)=1"
4040endef
4141
4242define Build/InstallDev
4343    dd if=$(PKG_BUILD_DIR)/u-boot.bin of=$(PKG_BUILD_DIR)/u-boot.block bs=232k count=1 conv=sync
4444# $(INSTALL_DIR) $(STAGING_DIR)/ubclient/sbin
4545# $(INSTALL_BIN) $(PKG_BUILD_DIR)/ubclient/ubpar $(STAGING_DIR)/ubclient/sbin/
46    $(CP) $(PKG_BUILD_DIR)/ubclient/ubpar ../../base-files/sbin
46# $(CP) $(PKG_BUILD_DIR)/ubclient/ubpar ../../base-files/sbin
47    mkdir -p $(BIN_DIR)/
48    cp $(PKG_BUILD_DIR)/u-boot.bin $(BIN_DIR)/u-boot.$(PKG_VERSION).bin
4749endef
4850
4951$(eval $(call Build/DefaultTargets))
target/linux/at91/image/u-boot/patches/001-lowlevel-config.patch
1+++ u-boot-1.1.4.klaus/cpu/arm920t/config.mk 2006-02-27 19:07:41.000000000 +0100
2@@ -30,5 +30,5 @@
3 # Supply options according to compiler version
4 #
5 # =========================================================================
6-PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
7+PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32)
8 PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
9+++ u-boot-1.1.4.klaus/cpu/arm920t/start.S 2006-02-22 16:45:24.000000000 +0100
10@@ -237,6 +237,7 @@
11  */
12
13
14+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
15 cpu_init_crit:
16     /*
17      * flush v4 I/D caches
18@@ -265,6 +266,7 @@
19     mov lr, ip
20     mov pc, lr
21
22+#endif
23
24 /*
25  *************************************************************************
26+++ u-boot-1.1.4.klaus/examples/Makefile 2006-03-02 02:37:14.000000000 +0100
27@@ -30,7 +30,7 @@
28 endif
29
30 ifeq ($(ARCH),arm)
31-LOAD_ADDR = 0xc100000
32+LOAD_ADDR = 0x21000000
33 endif
34
35 ifeq ($(ARCH),mips)
36+++ u-boot-1.1.4.klaus/include/config.h 2006-02-27 19:04:46.000000000 +0100
37@@ -0,0 +1,2 @@
38+/* Automatically generated - do not edit */
39+#include <configs/at91rm9200dk.h>
40+++ u-boot-1.1.4.klaus/include/config.mk 2006-02-27 19:04:46.000000000 +0100
41@@ -0,0 +1,4 @@
42+ARCH = arm
43+CPU = arm920t
44+BOARD = at91rm9200dk
45+SOC = at91rm9200
46+++ u-boot-1.1.4.klaus/include/configs/at91rm9200dk.h 2006-02-26 22:44:17.000000000 +0100
47@@ -25,6 +25,11 @@
48 #ifndef __CONFIG_H
49 #define __CONFIG_H
50
51+// Added 2 defines to skip re-init lowlevel and relocate HCG HLH
52+//
53+#define CONFIG_SKIP_LOWLEVEL_INIT
54+#define CONFIG_SKIP_RELOCATE_UBOOT
55+
56 /* ARM asynchronous clock */
57 #define AT91C_MAIN_CLOCK 179712000 /* from 18.432 MHz crystal (18432000 / 4 * 39) */
58 #define AT91C_MASTER_CLOCK 59904000 /* peripheral clock (AT91C_MASTER_CLOCK / 3) */
59@@ -165,12 +170,12 @@
60 #define CFG_FLASH_ERASE_TOUT (2*CFG_HZ) /* Timeout for Flash Erase */
61 #define CFG_FLASH_WRITE_TOUT (2*CFG_HZ) /* Timeout for Flash Write */
62
63-#undef CFG_ENV_IS_IN_DATAFLASH
64+#define CFG_ENV_IS_IN_DATAFLASH
65
66 #ifdef CFG_ENV_IS_IN_DATAFLASH
67-#define CFG_ENV_OFFSET 0x20000
68+#define CFG_ENV_OFFSET 0x21000
69 #define CFG_ENV_ADDR (CFG_DATAFLASH_LOGIC_ADDR_CS0 + CFG_ENV_OFFSET)
70-#define CFG_ENV_SIZE 0x2000 /* 0x8000 */
71+#define CFG_ENV_SIZE 0x8400 /* 0x8000 */
72 #else
73 #define CFG_ENV_IS_IN_FLASH 1
74 #ifdef CONFIG_SKIP_LOWLEVEL_INIT
75+++ u-boot-1.1.4.klaus/Makefile 2006-03-02 02:49:23.000000000 +0100
76@@ -57,7 +57,7 @@
77 CROSS_COMPILE = powerpc-linux-
78 endif
79 ifeq ($(ARCH),arm)
80-CROSS_COMPILE = arm-linux-
81+CROSS_COMPILE = ../staging_dir/bin/arm-linux-
82 endif
83 ifeq ($(ARCH),i386)
84 ifeq ($(HOSTARCH),i387)
target/linux/at91/image/u-boot/patches/002-dataflash_machine.patch
1diff -Naur u-boot-1.1.4.org/board/vlink/at45.c u-boot-1.1.4.tmp/board/vlink/at45.c
2+++ u-boot-1.1.4.tmp/board/vlink/at45.c 2005-12-16 17:39:27.000000000 +0100
3@@ -0,0 +1,621 @@
4+/* Driver for ATMEL DataFlash support
5+ * Author : Hamid Ikdoumi (Atmel)
6+ *
7+ * This program is free software; you can redistribute it and/or
8+ * modify it under the terms of the GNU General Public License as
9+ * published by the Free Software Foundation; either version 2 of
10+ * the License, or (at your option) any later version.
11+ *
12+ * This program is distributed in the hope that it will be useful,
13+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+ * GNU General Public License for more details.
16+ *
17+ * You should have received a copy of the GNU General Public License
18+ * along with this program; if not, write to the Free Software
19+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20+ * MA 02111-1307 USA
21+ *
22+ */
23+
24+#include <config.h>
25+#include <common.h>
26+#include <asm/hardware.h>
27+
28+#ifdef CONFIG_HAS_DATAFLASH
29+#include <dataflash.h>
30+
31+#define AT91C_SPI_CLK 10000000 /* Max Value = 10MHz to be compliant to
32+the Continuous Array Read function */
33+
34+/* AC Characteristics */
35+/* DLYBS = tCSS = 250ns min and DLYBCT = tCSH = 250ns */
36+#define DATAFLASH_TCSS (0xC << 16)
37+#define DATAFLASH_TCHS (0x1 << 24)
38+
39+#define AT91C_TIMEOUT_WRDY 200000
40+#define AT91C_SPI_PCS0_SERIAL_DATAFLASH 0xE /* Chip Select 0 : NPCS0 %1110 */
41+#define AT91C_SPI_PCS3_DATAFLASH_CARD 0x7 /* Chip Select 3 : NPCS3 %0111 */
42+
43+void AT91F_SpiInit(void) {
44+
45+/*-------------------------------------------------------------------*/
46+/* SPI DataFlash Init */
47+/*-------------------------------------------------------------------*/
48+ /* Configure PIOs */
49+ AT91C_BASE_PIOA->PIO_ASR = AT91C_PA3_NPCS0 | AT91C_PA4_NPCS1 | AT91C_PA1_MOSI | AT91C_PA5_NPCS2 |
50+ AT91C_PA6_NPCS3 | AT91C_PA0_MISO | AT91C_PA2_SPCK;
51+ AT91C_BASE_PIOA->PIO_PDR = AT91C_PA3_NPCS0 | AT91C_PA4_NPCS1 | AT91C_PA1_MOSI | AT91C_PA5_NPCS2 |
52+ AT91C_PA6_NPCS3 | AT91C_PA0_MISO | AT91C_PA2_SPCK;
53+ /* Enable CLock */
54+ AT91C_BASE_PMC->PMC_PCER = 1 << AT91C_ID_SPI;
55+
56+ /* Reset the SPI */
57+ AT91C_BASE_SPI->SPI_CR = AT91C_SPI_SWRST;
58+
59+ /* Configure SPI in Master Mode with No CS selected !!! */
60+ AT91C_BASE_SPI->SPI_MR = AT91C_SPI_MSTR | AT91C_SPI_MODFDIS | AT91C_SPI_PCS;
61+
62+ /* Configure CS0 and CS3 */
63+ *(AT91C_SPI_CSR + 0) = AT91C_SPI_CPOL | (AT91C_SPI_DLYBS & DATAFLASH_TCSS) | (AT91C_SPI_DLYBCT &
64+ DATAFLASH_TCHS) | ((AT91C_MASTER_CLOCK / (2*AT91C_SPI_CLK)) << 8);
65+
66+ *(AT91C_SPI_CSR + 3) = AT91C_SPI_CPOL | (AT91C_SPI_DLYBS & DATAFLASH_TCSS) | (AT91C_SPI_DLYBCT &
67+ DATAFLASH_TCHS) | ((AT91C_MASTER_CLOCK / (2*AT91C_SPI_CLK)) << 8);
68+
69+}
70+
71+void AT91F_SpiEnable(int cs) {
72+ switch(cs) {
73+ case 0: /* Configure SPI CS0 for Serial DataFlash AT45DBxx */
74+ AT91C_BASE_SPI->SPI_MR &= 0xFFF0FFFF;
75+ AT91C_BASE_SPI->SPI_MR |= ((AT91C_SPI_PCS0_SERIAL_DATAFLASH<<16) & AT91C_SPI_PCS);
76+ break;
77+ case 3: /* Configure SPI CS3 for Serial DataFlash Card */
78+ /* Set up PIO SDC_TYPE to switch on DataFlash Card and not MMC/SDCard */
79+ AT91C_BASE_PIOB->PIO_PER = AT91C_PIO_PB7; /* Set in PIO mode */
80+ AT91C_BASE_PIOB->PIO_OER = AT91C_PIO_PB7; /* Configure in output */
81+ /* Clear Output */
82+ AT91C_BASE_PIOB->PIO_CODR = AT91C_PIO_PB7;
83+ /* Configure PCS */
84+ AT91C_BASE_SPI->SPI_MR &= 0xFFF0FFFF;
85+ AT91C_BASE_SPI->SPI_MR |= ((AT91C_SPI_PCS3_DATAFLASH_CARD<<16) & AT91C_SPI_PCS);
86+ break;
87+ }
88+
89+ /* SPI_Enable */
90+ AT91C_BASE_SPI->SPI_CR = AT91C_SPI_SPIEN;
91+}
92+
93+/*----------------------------------------------------------------------------*/
94+/* \fn AT91F_SpiWrite */
95+/* \brief Set the PDC registers for a transfert */
96+/*----------------------------------------------------------------------------*/
97+unsigned int AT91F_SpiWrite ( AT91PS_DataflashDesc pDesc )
98+{
99+ unsigned int timeout;
100+
101+ pDesc->state = BUSY;
102+
103+ AT91C_BASE_SPI->SPI_PTCR = AT91C_PDC_TXTDIS + AT91C_PDC_RXTDIS;
104+
105+ /* Initialize the Transmit and Receive Pointer */
106+ AT91C_BASE_SPI->SPI_RPR = (unsigned int)pDesc->rx_cmd_pt ;
107+ AT91C_BASE_SPI->SPI_TPR = (unsigned int)pDesc->tx_cmd_pt ;
108+
109+ /* Intialize the Transmit and Receive Counters */
110+ AT91C_BASE_SPI->SPI_RCR = pDesc->rx_cmd_size;
111+ AT91C_BASE_SPI->SPI_TCR = pDesc->tx_cmd_size;
112+
113+ if ( pDesc->tx_data_size != 0 ) {
114+ /* Initialize the Next Transmit and Next Receive Pointer */
115+ AT91C_BASE_SPI->SPI_RNPR = (unsigned int)pDesc->rx_data_pt ;
116+ AT91C_BASE_SPI->SPI_TNPR = (unsigned int)pDesc->tx_data_pt ;
117+
118+ /* Intialize the Next Transmit and Next Receive Counters */
119+ AT91C_BASE_SPI->SPI_RNCR = pDesc->rx_data_size ;
120+ AT91C_BASE_SPI->SPI_TNCR = pDesc->tx_data_size ;
121+ }
122+
123+ /* arm simple, non interrupt dependent timer */
124+ reset_timer_masked();
125+ timeout = 0;
126+
127+ AT91C_BASE_SPI->SPI_PTCR = AT91C_PDC_TXTEN + AT91C_PDC_RXTEN;
128+ while(!(AT91C_BASE_SPI->SPI_SR & AT91C_SPI_RXBUFF) && ((timeout = get_timer_masked() ) < CFG_SPI_WRITE_TOUT));
129+ AT91C_BASE_SPI->SPI_PTCR = AT91C_PDC_TXTDIS + AT91C_PDC_RXTDIS;
130+ pDesc->state = IDLE;
131+
132+ if (timeout >= CFG_SPI_WRITE_TOUT){
133+ printf("Error Timeout\n\r");
134+ return DATAFLASH_ERROR;
135+ }
136+
137+ return DATAFLASH_OK;
138+}
139+
140+
141+/*----------------------------------------------------------------------*/
142+/* \fn AT91F_DataFlashSendCommand */
143+/* \brief Generic function to send a command to the dataflash */
144+/*----------------------------------------------------------------------*/
145+AT91S_DataFlashStatus AT91F_DataFlashSendCommand(
146+ AT91PS_DataFlash pDataFlash,
147+ unsigned char OpCode,
148+ unsigned int CmdSize,
149+ unsigned int DataflashAddress)
150+{
151+ unsigned int adr;
152+
153+ if ( (pDataFlash->pDataFlashDesc->state) != IDLE)
154+ return DATAFLASH_BUSY;
155+
156+ /* process the address to obtain page address and byte address */
157+ adr = ((DataflashAddress / (pDataFlash->pDevice->pages_size)) << pDataFlash->pDevice->page_offset) + (DataflashAddress % (pDataFlash->pDevice->pages_size));
158+
159+ /* fill the command buffer */
160+ pDataFlash->pDataFlashDesc->command[0] = OpCode;
161+ if (pDataFlash->pDevice->pages_number >= 16384) {
162+ pDataFlash->pDataFlashDesc->command[1] = (unsigned char)((adr & 0x0F000000) >> 24);
163+ pDataFlash->pDataFlashDesc->command[2] = (unsigned char)((adr & 0x00FF0000) >> 16);
164+ pDataFlash->pDataFlashDesc->command[3] = (unsigned char)((adr & 0x0000FF00) >> 8);
165+ pDataFlash->pDataFlashDesc->command[4] = (unsigned char)(adr & 0x000000FF);
166+ } else {
167+ pDataFlash->pDataFlashDesc->command[1] = (unsigned char)((adr & 0x00FF0000) >> 16);
168+ pDataFlash->pDataFlashDesc->command[2] = (unsigned char)((adr & 0x0000FF00) >> 8);
169+ pDataFlash->pDataFlashDesc->command[3] = (unsigned char)(adr & 0x000000FF) ;
170+ pDataFlash->pDataFlashDesc->command[4] = 0;
171+ }
172+ pDataFlash->pDataFlashDesc->command[5] = 0;
173+ pDataFlash->pDataFlashDesc->command[6] = 0;
174+ pDataFlash->pDataFlashDesc->command[7] = 0;
175+
176+ /* Initialize the SpiData structure for the spi write fuction */
177+ pDataFlash->pDataFlashDesc->tx_cmd_pt = pDataFlash->pDataFlashDesc->command ;
178+ pDataFlash->pDataFlashDesc->tx_cmd_size = CmdSize ;
179+ pDataFlash->pDataFlashDesc->rx_cmd_pt = pDataFlash->pDataFlashDesc->command ;
180+ pDataFlash->pDataFlashDesc->rx_cmd_size = CmdSize ;
181+
182+ /* send the command and read the data */
183+ return AT91F_SpiWrite (pDataFlash->pDataFlashDesc);
184+}
185+
186+
187+/*----------------------------------------------------------------------*/
188+/* \fn AT91F_DataFlashGetStatus */
189+/* \brief Read the status register of the dataflash */
190+/*----------------------------------------------------------------------*/
191+AT91S_DataFlashStatus AT91F_DataFlashGetStatus(AT91PS_DataflashDesc pDesc)
192+{
193+ AT91S_DataFlashStatus status;
194+
195+ /* if a transfert is in progress ==> return 0 */
196+ if( (pDesc->state) != IDLE)
197+ return DATAFLASH_BUSY;
198+
199+ /* first send the read status command (D7H) */
200+ pDesc->command[0] = DB_STATUS;
201+ pDesc->command[1] = 0;
202+
203+ pDesc->DataFlash_state = GET_STATUS;
204+ pDesc->tx_data_size = 0 ; /* Transmit the command and receive response */
205+ pDesc->tx_cmd_pt = pDesc->command ;
206+ pDesc->rx_cmd_pt = pDesc->command ;
207+ pDesc->rx_cmd_size = 2 ;
208+ pDesc->tx_cmd_size = 2 ;
209+ status = AT91F_SpiWrite (pDesc);
210+
211+ pDesc->DataFlash_state = *( (unsigned char *) (pDesc->rx_cmd_pt) +1);
212+
213+ return status;
214+}
215+
216+
217+/*----------------------------------------------------------------------*/
218+/* \fn AT91F_DataFlashWaitReady */
219+/* \brief wait for dataflash ready (bit7 of the status register == 1) */
220+/*----------------------------------------------------------------------*/
221+AT91S_DataFlashStatus AT91F_DataFlashWaitReady(AT91PS_DataflashDesc pDataFlashDesc, unsigned int timeout)
222+{
223+ pDataFlashDesc->DataFlash_state = IDLE;
224+
225+ do {
226+ AT91F_DataFlashGetStatus(pDataFlashDesc);
227+ timeout--;
228+ } while( ((pDataFlashDesc->DataFlash_state & 0x80) != 0x80) && (timeout > 0) );
229+
230+ if((pDataFlashDesc->DataFlash_state & 0x80) != 0x80)
231+ return DATAFLASH_ERROR;
232+
233+ return DATAFLASH_OK;
234+}
235+
236+
237+/*------------------------------------------------------------------------------*/
238+/* Function Name : AT91F_DataFlashContinuousRead */
239+/* Object : Continuous stream Read */
240+/* Input Parameters : DataFlash Service */
241+/* : <src> = dataflash address */
242+/* : <*dataBuffer> = data buffer pointer */
243+/* : <sizeToRead> = data buffer size */
244+/* Return value : State of the dataflash */
245+/*------------------------------------------------------------------------------*/
246+AT91S_DataFlashStatus AT91F_DataFlashContinuousRead (
247+ AT91PS_DataFlash pDataFlash,
248+ int src,
249+ unsigned char *dataBuffer,
250+ int sizeToRead )
251+{
252+ AT91S_DataFlashStatus status;
253+ /* Test the size to read in the device */
254+ if ( (src + sizeToRead) > (pDataFlash->pDevice->pages_size * (pDataFlash->pDevice->pages_number)))
255+ return DATAFLASH_MEMORY_OVERFLOW;
256+
257+ pDataFlash->pDataFlashDesc->rx_data_pt = dataBuffer;
258+ pDataFlash->pDataFlashDesc->rx_data_size = sizeToRead;
259+ pDataFlash->pDataFlashDesc->tx_data_pt = dataBuffer;
260+ pDataFlash->pDataFlashDesc->tx_data_size = sizeToRead;
261+
262+ status = AT91F_DataFlashSendCommand (pDataFlash, DB_CONTINUOUS_ARRAY_READ, 8, src);
263+ /* Send the command to the dataflash */
264+ return(status);
265+}
266+
267+
268+/*------------------------------------------------------------------------------*/
269+/* Function Name : AT91F_DataFlashPagePgmBuf */
270+/* Object : Main memory page program through buffer 1 or buffer 2 */
271+/* Input Parameters : DataFlash Service */
272+/* : <*src> = Source buffer */
273+/* : <dest> = dataflash destination address */
274+/* : <SizeToWrite> = data buffer size */
275+/* Return value : State of the dataflash */
276+/*------------------------------------------------------------------------------*/
277+AT91S_DataFlashStatus AT91F_DataFlashPagePgmBuf(
278+ AT91PS_DataFlash pDataFlash,
279+ unsigned char *src,
280+ unsigned int dest,
281+ unsigned int SizeToWrite)
282+{
283+ int cmdsize;
284+ pDataFlash->pDataFlashDesc->tx_data_pt = src ;
285+ pDataFlash->pDataFlashDesc->tx_data_size = SizeToWrite ;
286+ pDataFlash->pDataFlashDesc->rx_data_pt = src;
287+ pDataFlash->pDataFlashDesc->rx_data_size = SizeToWrite;
288+
289+ cmdsize = 4;
290+ /* Send the command to the dataflash */
291+ if (pDataFlash->pDevice->pages_number >= 16384)
292+ cmdsize = 5;
293+ return(AT91F_DataFlashSendCommand (pDataFlash, DB_PAGE_PGM_BUF1, cmdsize, dest));
294+}
295+
296+
297+/*------------------------------------------------------------------------------*/
298+/* Function Name : AT91F_MainMemoryToBufferTransfert */
299+/* Object : Read a page in the SRAM Buffer 1 or 2 */
300+/* Input Parameters : DataFlash Service */
301+/* : Page concerned */
302+/* : */
303+/* Return value : State of the dataflash */
304+/*------------------------------------------------------------------------------*/
305+AT91S_DataFlashStatus AT91F_MainMemoryToBufferTransfert(
306+ AT91PS_DataFlash pDataFlash,
307+ unsigned char BufferCommand,
308+ unsigned int page)
309+{
310+ int cmdsize;
311+ /* Test if the buffer command is legal */
312+ if ((BufferCommand != DB_PAGE_2_BUF1_TRF) && (BufferCommand != DB_PAGE_2_BUF2_TRF))
313+ return DATAFLASH_BAD_COMMAND;
314+
315+ /* no data to transmit or receive */
316+ pDataFlash->pDataFlashDesc->tx_data_size = 0;
317+ cmdsize = 4;
318+ if (pDataFlash->pDevice->pages_number >= 16384)
319+ cmdsize = 5;
320+ return(AT91F_DataFlashSendCommand (pDataFlash, BufferCommand, cmdsize, page*pDataFlash->pDevice->pages_size));
321+}
322+
323+
324+/*----------------------------------------------------------------------------- */
325+/* Function Name : AT91F_DataFlashWriteBuffer */
326+/* Object : Write data to the internal sram buffer 1 or 2 */
327+/* Input Parameters : DataFlash Service */
328+/* : <BufferCommand> = command to write buffer1 or buffer2 */
329+/* : <*dataBuffer> = data buffer to write */
330+/* : <bufferAddress> = address in the internal buffer */
331+/* : <SizeToWrite> = data buffer size */
332+/* Return value : State of the dataflash */
333+/*------------------------------------------------------------------------------*/
334+AT91S_DataFlashStatus AT91F_DataFlashWriteBuffer (
335+ AT91PS_DataFlash pDataFlash,
336+ unsigned char BufferCommand,
337+ unsigned char *dataBuffer,
338+ unsigned int bufferAddress,
339+ int SizeToWrite )
340+{
341+ int cmdsize;
342+ /* Test if the buffer command is legal */
343+ if ((BufferCommand != DB_BUF1_WRITE) && (BufferCommand != DB_BUF2_WRITE))
344+ return DATAFLASH_BAD_COMMAND;
345+
346+ /* buffer address must be lower than page size */
347+ if (bufferAddress > pDataFlash->pDevice->pages_size)
348+ return DATAFLASH_BAD_ADDRESS;
349+
350+ if ( (pDataFlash->pDataFlashDesc->state) != IDLE)
351+ return DATAFLASH_BUSY;
352+
353+ /* Send first Write Command */
354+ pDataFlash->pDataFlashDesc->command[0] = BufferCommand;
355+ pDataFlash->pDataFlashDesc->command[1] = 0;
356+ if (pDataFlash->pDevice->pages_number >= 16384) {
357+ pDataFlash->pDataFlashDesc->command[2] = 0;
358+ pDataFlash->pDataFlashDesc->command[3] = (unsigned char)(((unsigned int)(bufferAddress & pDataFlash->pDevice->byte_mask)) >> 8) ;
359+ pDataFlash->pDataFlashDesc->command[4] = (unsigned char)((unsigned int)bufferAddress & 0x00FF) ;
360+ cmdsize = 5;
361+ } else {
362+ pDataFlash->pDataFlashDesc->command[2] = (unsigned char)(((unsigned int)(bufferAddress & pDataFlash->pDevice->byte_mask)) >> 8) ;
363+ pDataFlash->pDataFlashDesc->command[3] = (unsigned char)((unsigned int)bufferAddress & 0x00FF) ;
364+ pDataFlash->pDataFlashDesc->command[4] = 0;
365+ cmdsize = 4;
366+ }
367+
368+ pDataFlash->pDataFlashDesc->tx_cmd_pt = pDataFlash->pDataFlashDesc->command ;
369+ pDataFlash->pDataFlashDesc->tx_cmd_size = cmdsize ;
370+ pDataFlash->pDataFlashDesc->rx_cmd_pt = pDataFlash->pDataFlashDesc->command ;
371+ pDataFlash->pDataFlashDesc->rx_cmd_size = cmdsize ;
372+
373+ pDataFlash->pDataFlashDesc->rx_data_pt = dataBuffer ;
374+ pDataFlash->pDataFlashDesc->tx_data_pt = dataBuffer ;
375+ pDataFlash->pDataFlashDesc->rx_data_size = SizeToWrite ;
376+ pDataFlash->pDataFlashDesc->tx_data_size = SizeToWrite ;
377+
378+ return AT91F_SpiWrite(pDataFlash->pDataFlashDesc);
379+}
380+
381+/*------------------------------------------------------------------------------*/
382+/* Function Name : AT91F_PageErase */
383+/* Object : Erase a page */
384+/* Input Parameters : DataFlash Service */
385+/* : Page concerned */
386+/* : */
387+/* Return value : State of the dataflash */
388+/*------------------------------------------------------------------------------*/
389+AT91S_DataFlashStatus AT91F_PageErase(
390+ AT91PS_DataFlash pDataFlash,
391+ unsigned int page)
392+{
393+ int cmdsize;
394+ /* Test if the buffer command is legal */
395+ /* no data to transmit or receive */
396+ pDataFlash->pDataFlashDesc->tx_data_size = 0;
397+
398+ cmdsize = 4;
399+ if (pDataFlash->pDevice->pages_number >= 16384)
400+ cmdsize = 5;
401+ return(AT91F_DataFlashSendCommand (pDataFlash, DB_PAGE_ERASE, cmdsize, page*pDataFlash->pDevice->pages_size));
402+}
403+
404+
405+/*------------------------------------------------------------------------------*/
406+/* Function Name : AT91F_BlockErase */
407+/* Object : Erase a Block */
408+/* Input Parameters : DataFlash Service */
409+/* : Page concerned */
410+/* : */
411+/* Return value : State of the dataflash */
412+/*------------------------------------------------------------------------------*/
413+AT91S_DataFlashStatus AT91F_BlockErase(
414+ AT91PS_DataFlash pDataFlash,
415+ unsigned int block)
416+{
417+ int cmdsize;
418+ /* Test if the buffer command is legal */
419+ /* no data to transmit or receive */
420+ pDataFlash->pDataFlashDesc->tx_data_size = 0;
421+ cmdsize = 4;
422+ if (pDataFlash->pDevice->pages_number >= 16384)
423+ cmdsize = 5;
424+ return(AT91F_DataFlashSendCommand (pDataFlash, DB_BLOCK_ERASE,cmdsize, block*8*pDataFlash->pDevice->pages_size));
425+}
426+
427+/*------------------------------------------------------------------------------*/
428+/* Function Name : AT91F_WriteBufferToMain */
429+/* Object : Write buffer to the main memory */
430+/* Input Parameters : DataFlash Service */
431+/* : <BufferCommand> = command to send to buffer1 or buffer2 */
432+/* : <dest> = main memory address */
433+/* Return value : State of the dataflash */
434+/*------------------------------------------------------------------------------*/
435+AT91S_DataFlashStatus AT91F_WriteBufferToMain (
436+ AT91PS_DataFlash pDataFlash,
437+ unsigned char BufferCommand,
438+ unsigned int dest )
439+{
440+ int cmdsize;
441+ /* Test if the buffer command is correct */
442+ if ((BufferCommand != DB_BUF1_PAGE_PGM) &&
443+ (BufferCommand != DB_BUF1_PAGE_ERASE_PGM) &&
444+ (BufferCommand != DB_BUF2_PAGE_PGM) &&
445+ (BufferCommand != DB_BUF2_PAGE_ERASE_PGM) )
446+ return DATAFLASH_BAD_COMMAND;
447+
448+ /* no data to transmit or receive */
449+ pDataFlash->pDataFlashDesc->tx_data_size = 0;
450+
451+ cmdsize = 4;
452+ if (pDataFlash->pDevice->pages_number >= 16384)
453+ cmdsize = 5;
454+ /* Send the command to the dataflash */
455+ return(AT91F_DataFlashSendCommand (pDataFlash, BufferCommand, cmdsize, dest));
456+}
457+
458+
459+/*------------------------------------------------------------------------------*/
460+/* Function Name : AT91F_PartialPageWrite */
461+/* Object : Erase partielly a page */
462+/* Input Parameters : <page> = page number */
463+/* : <AdrInpage> = adr to begin the fading */
464+/* : <length> = Number of bytes to erase */
465+/*------------------------------------------------------------------------------*/
466+AT91S_DataFlashStatus AT91F_PartialPageWrite (
467+ AT91PS_DataFlash pDataFlash,
468+ unsigned char *src,
469+ unsigned int dest,
470+ unsigned int size)
471+{
472+ unsigned int page;
473+ unsigned int AdrInPage;
474+
475+ page = dest / (pDataFlash->pDevice->pages_size);
476+ AdrInPage = dest % (pDataFlash->pDevice->pages_size);
477+
478+ /* Read the contents of the page in the Sram Buffer */
479+ AT91F_MainMemoryToBufferTransfert(pDataFlash, DB_PAGE_2_BUF1_TRF, page);
480+ AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY);
481+ /*Update the SRAM buffer */
482+ AT91F_DataFlashWriteBuffer(pDataFlash, DB_BUF1_WRITE, src, AdrInPage, size);
483+
484+ AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY);
485+
486+ /* Erase page if a 128 Mbits device */
487+ if (pDataFlash->pDevice->pages_number >= 16384) {
488+ AT91F_PageErase(pDataFlash, page);
489+ /* Rewrite the modified Sram Buffer in the main memory */
490+ AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY);
491+ }
492+
493+ /* Rewrite the modified Sram Buffer in the main memory */
494+ return(AT91F_WriteBufferToMain(pDataFlash, DB_BUF1_PAGE_ERASE_PGM, (page*pDataFlash->pDevice->pages_size)));
495+}
496+
497+
498+/*------------------------------------------------------------------------------*/
499+/* Function Name : AT91F_DataFlashWrite */
500+/* Object : */
501+/* Input Parameters : <*src> = Source buffer */
502+/* : <dest> = dataflash adress */
503+/* : <size> = data buffer size */
504+/*------------------------------------------------------------------------------*/
505+AT91S_DataFlashStatus AT91F_DataFlashWrite(
506+ AT91PS_DataFlash pDataFlash,
507+ unsigned char *src,
508+ int dest,
509+ int size )
510+{
511+ unsigned int length;
512+ unsigned int page;
513+ unsigned int status;
514+
515+ AT91F_SpiEnable(pDataFlash->pDevice->cs);
516+
517+ if ( (dest + size) > (pDataFlash->pDevice->pages_size * (pDataFlash->pDevice->pages_number)))
518+ return DATAFLASH_MEMORY_OVERFLOW;
519+
520+ /* If destination does not fit a page start address */
521+ if ((dest % ((unsigned int)(pDataFlash->pDevice->pages_size))) != 0 ) {
522+ length = pDataFlash->pDevice->pages_size - (dest % ((unsigned int)(pDataFlash->pDevice->pages_size)));
523+
524+ if (size < length)
525+ length = size;
526+
527+ if(!AT91F_PartialPageWrite(pDataFlash,src, dest, length))
528+ return DATAFLASH_ERROR;
529+
530+ AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY);
531+
532+ /* Update size, source and destination pointers */
533+ size -= length;
534+ dest += length;
535+ src += length;
536+ }
537+
538+ while (( size - pDataFlash->pDevice->pages_size ) >= 0 ) {
539+ /* program dataflash page */
540+ page = (unsigned int)dest / (pDataFlash->pDevice->pages_size);
541+
542+ status = AT91F_DataFlashWriteBuffer(pDataFlash, DB_BUF1_WRITE, src, 0, pDataFlash->pDevice->pages_size);
543+ AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY);
544+
545+ status = AT91F_PageErase(pDataFlash, page);
546+ AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY);
547+ if (!status)
548+ return DATAFLASH_ERROR;
549+
550+ status = AT91F_WriteBufferToMain (pDataFlash, DB_BUF1_PAGE_PGM, dest);
551+ if(!status)
552+ return DATAFLASH_ERROR;
553+
554+ AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY);
555+
556+ /* Update size, source and destination pointers */
557+ size -= pDataFlash->pDevice->pages_size ;
558+ dest += pDataFlash->pDevice->pages_size ;
559+ src += pDataFlash->pDevice->pages_size ;
560+ }
561+
562+ /* If still some bytes to read */
563+ if ( size > 0 ) {
564+ /* program dataflash page */
565+ if(!AT91F_PartialPageWrite(pDataFlash, src, dest, size) )
566+ return DATAFLASH_ERROR;
567+
568+ AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY);
569+ }
570+ return DATAFLASH_OK;
571+}
572+
573+
574+/*------------------------------------------------------------------------------*/
575+/* Function Name : AT91F_DataFlashRead */
576+/* Object : Read a block in dataflash */
577+/* Input Parameters : */
578+/* Return value : */
579+/*------------------------------------------------------------------------------*/
580+int AT91F_DataFlashRead(
581+ AT91PS_DataFlash pDataFlash,
582+ unsigned long addr,
583+ unsigned long size,
584+ char *buffer)
585+{
586+ unsigned long SizeToRead;
587+
588+ AT91F_SpiEnable(pDataFlash->pDevice->cs);
589+
590+ if(AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY) != DATAFLASH_OK)
591+ return -1;
592+
593+ while (size) {
594+ SizeToRead = (size < 0x8000)? size:0x8000;
595+
596+ if (AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY) != DATAFLASH_OK)
597+ return -1;
598+
599+ if (AT91F_DataFlashContinuousRead (pDataFlash, addr, buffer, SizeToRead) != DATAFLASH_OK)
600+ return -1;
601+
602+ size -= SizeToRead;
603+ addr += SizeToRead;
604+ buffer += SizeToRead;
605+ }
606+
607+ return DATAFLASH_OK;
608+}
609+
610+
611+/*------------------------------------------------------------------------------*/
612+/* Function Name : AT91F_DataflashProbe */
613+/* Object : */
614+/* Input Parameters : */
615+/* Return value : Dataflash status register */
616+/*------------------------------------------------------------------------------*/
617+int AT91F_DataflashProbe(int cs, AT91PS_DataflashDesc pDesc)
618+{
619+ AT91F_SpiEnable(cs);
620+ AT91F_DataFlashGetStatus(pDesc);
621+ return((pDesc->command[1] == 0xFF)? 0: pDesc->command[1] & 0x3C);
622+}
623+
624+#endif
625diff -Naur u-boot-1.1.4.org/board/vlink/config.mk u-boot-1.1.4.tmp/board/vlink/config.mk
626+++ u-boot-1.1.4.tmp/board/vlink/config.mk 2005-12-16 17:39:27.000000000 +0100
627@@ -0,0 +1 @@
628+TEXT_BASE = 0x21f00000
629diff -Naur u-boot-1.1.4.org/board/vlink/flash.c u-boot-1.1.4.tmp/board/vlink/flash.c
630+++ u-boot-1.1.4.tmp/board/vlink/flash.c 2006-06-05 02:44:43.000000000 +0200
631@@ -0,0 +1,504 @@
632+/*
633+ * (C) Copyright 2002
634+ * Lineo, Inc. <www.lineo.com>
635+ * Bernhard Kuhn <bkuhn@lineo.com>
636+ *
637+ * (C) Copyright 2002
638+ * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
639+ * Alex Zuepke <azu@sysgo.de>
640+ *
641+ * See file CREDITS for list of people who contributed to this
642+ * project.
643+ *
644+ * This program is free software; you can redistribute it and/or
645+ * modify it under the terms of the GNU General Public License as
646+ * published by the Free Software Foundation; either version 2 of
647+ * the License, or (at your option) any later version.
648+ *
649+ * This program is distributed in the hope that it will be useful,
650+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
651+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
652+ * GNU General Public License for more details.
653+ *
654+ * You should have received a copy of the GNU General Public License
655+ * along with this program; if not, write to the Free Software
656+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
657+ * MA 02111-1307 USA
658+ */
659+
660+#include <common.h>
661+
662+ulong myflush(void);
663+
664+
665+/* Flash Organization Structure */
666+typedef struct OrgDef
667+{
668+ unsigned int sector_number;
669+ unsigned int sector_size;
670+} OrgDef;
671+
672+
673+/* Flash Organizations */
674+OrgDef OrgAT49BV16x4[] =
675+{
676+ { 8, 8*1024 }, /* 8 * 8 kBytes sectors */
677+ { 2, 32*1024 }, /* 2 * 32 kBytes sectors */
678+ { 30, 64*1024 }, /* 30 * 64 kBytes sectors */
679+};
680+
681+OrgDef OrgAT49BV16x4A[] =
682+{
683+ { 8, 8*1024 }, /* 8 * 8 kBytes sectors */
684+ { 31, 64*1024 }, /* 31 * 64 kBytes sectors */
685+};
686+
687+OrgDef OrgAT49BV6416[] =
688+{
689+ { 8, 8*1024 }, /* 8 * 8 kBytes sectors */
690+ { 127, 64*1024 }, /* 127 * 64 kBytes sectors */
691+};
692+
693+flash_info_t flash_info[CFG_MAX_FLASH_BANKS];
694+
695+/* AT49BV1614A Codes */
696+#define FLASH_CODE1 0xAA
697+#define FLASH_CODE2 0x55
698+#define ID_IN_CODE 0x90
699+#define ID_OUT_CODE 0xF0
700+
701+
702+#define CMD_READ_ARRAY 0x00F0
703+#define CMD_UNLOCK1 0x00AA
704+#define CMD_UNLOCK2 0x0055
705+#define CMD_ERASE_SETUP 0x0080
706+#define CMD_ERASE_CONFIRM 0x0030
707+#define CMD_PROGRAM 0x00A0
708+#define CMD_UNLOCK_BYPASS 0x0020
709+#define CMD_SECTOR_UNLOCK 0x0070
710+
711+#define MEM_FLASH_ADDR1 (*(volatile u16 *)(CFG_FLASH_BASE + (0x00005555<<1)))
712+#define MEM_FLASH_ADDR2 (*(volatile u16 *)(CFG_FLASH_BASE + (0x00002AAA<<1)))
713+
714+#define BIT_ERASE_DONE 0x0080
715+#define BIT_RDY_MASK 0x0080
716+#define BIT_PROGRAM_ERROR 0x0020
717+#define BIT_TIMEOUT 0x80000000 /* our flag */
718+
719+#define READY 1
720+#define ERR 2
721+#define TMO 4
722+
723+/*-----------------------------------------------------------------------
724+ */
725+void flash_identification (flash_info_t * info)
726+{
727+ volatile u16 manuf_code, device_code, add_device_code;
728+
729+ MEM_FLASH_ADDR1 = FLASH_CODE1;
730+ MEM_FLASH_ADDR2 = FLASH_CODE2;
731+ MEM_FLASH_ADDR1 = ID_IN_CODE;
732+
733+ manuf_code = *(volatile u16 *) CFG_FLASH_BASE;
734+ device_code = *(volatile u16 *) (CFG_FLASH_BASE + 2);
735+ add_device_code = *(volatile u16 *) (CFG_FLASH_BASE + (3 << 1));
736+
737+ MEM_FLASH_ADDR1 = FLASH_CODE1;
738+ MEM_FLASH_ADDR2 = FLASH_CODE2;
739+ MEM_FLASH_ADDR1 = ID_OUT_CODE;
740+
741+ /* Vendor type */
742+ info->flash_id = ATM_MANUFACT & FLASH_VENDMASK;
743+ printf ("Atmel: ");
744+
745+ if ((device_code & FLASH_TYPEMASK) == (ATM_ID_BV1614 & FLASH_TYPEMASK)) {
746+
747+ if ((add_device_code & FLASH_TYPEMASK) ==
748+ (ATM_ID_BV1614A & FLASH_TYPEMASK)) {
749+ info->flash_id |= ATM_ID_BV1614A & FLASH_TYPEMASK;
750+ printf ("AT49BV1614A (16Mbit)\n");
751+ } else { /* AT49BV1614 Flash */
752+ info->flash_id |= ATM_ID_BV1614 & FLASH_TYPEMASK;
753+ printf ("AT49BV1614 (16Mbit)\n");
754+ }
755+
756+ } else if ((device_code & FLASH_TYPEMASK) == (ATM_ID_BV6416 & FLASH_TYPEMASK)) {
757+ info->flash_id |= ATM_ID_BV6416 & FLASH_TYPEMASK;
758+ printf ("AT49BV6416 (64Mbit)\n");
759+ }
760+}
761+
762+ushort flash_number_sector(OrgDef *pOrgDef, unsigned int nb_blocks)
763+{
764+ int i, nb_sectors = 0;
765+
766+ for (i=0; i<nb_blocks; i++){
767+ nb_sectors += pOrgDef[i].sector_number;
768+ }
769+
770+ return nb_sectors;
771+}
772+
773+void flash_unlock_sector(flash_info_t * info, unsigned int sector)
774+{
775+ volatile u16 *addr = (volatile u16 *) (info->start[sector]);
776+
777+ MEM_FLASH_ADDR1 = CMD_UNLOCK1;
778+ *addr = CMD_SECTOR_UNLOCK;
779+}
780+
781+
782+ulong flash_init (void)
783+{
784+ int i, j, k;
785+ unsigned int flash_nb_blocks, sector;
786+ unsigned int start_address;
787+ OrgDef *pOrgDef;
788+
789+ ulong size = 0;
790+
791+ for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) {
792+ ulong flashbase = 0;
793+
794+ flash_identification (&flash_info[i]);
795+
796+ if ((flash_info[i].flash_id & FLASH_TYPEMASK) ==
797+ (ATM_ID_BV1614 & FLASH_TYPEMASK)) {
798+
799+ pOrgDef = OrgAT49BV16x4;
800+ flash_nb_blocks = sizeof (OrgAT49BV16x4) / sizeof (OrgDef);
801+ } else if ((flash_info[i].flash_id & FLASH_TYPEMASK) ==
802+ (ATM_ID_BV1614A & FLASH_TYPEMASK)){ /* AT49BV1614A Flash */
803+
804+ pOrgDef = OrgAT49BV16x4A;
805+ flash_nb_blocks = sizeof (OrgAT49BV16x4A) / sizeof (OrgDef);
806+ } else if ((flash_info[i].flash_id & FLASH_TYPEMASK) ==
807+ (ATM_ID_BV6416 & FLASH_TYPEMASK)){ /* AT49BV6416 Flash */
808+
809+ pOrgDef = OrgAT49BV6416;
810+ flash_nb_blocks = sizeof (OrgAT49BV6416) / sizeof (OrgDef);
811+ } else {
812+ flash_nb_blocks = 0;
813+ pOrgDef = OrgAT49BV16x4;
814+ }
815+
816+ flash_info[i].sector_count = flash_number_sector(pOrgDef, flash_nb_blocks);
817+ memset (flash_info[i].protect, 0, flash_info[i].sector_count);
818+
819+ if (i == 0)
820+ flashbase = PHYS_FLASH_1;
821+ else
822+ panic ("configured too many flash banks!\n");
823+
824+ sector = 0;
825+ start_address = flashbase;
826+ flash_info[i].size = 0;
827+
828+ for (j = 0; j < flash_nb_blocks; j++) {
829+ for (k = 0; k < pOrgDef[j].sector_number; k++) {
830+ flash_info[i].start[sector++] = start_address;
831+ start_address += pOrgDef[j].sector_size;
832+ flash_info[i].size += pOrgDef[j].sector_size;
833+ }
834+ }
835+
836+ size += flash_info[i].size;
837+
838+ if ((flash_info[i].flash_id & FLASH_TYPEMASK) ==
839+ (ATM_ID_BV6416 & FLASH_TYPEMASK)){ /* AT49BV6416 Flash */
840+
841+ /* Unlock all sectors at reset */
842+ for (j=0; j<flash_info[i].sector_count; j++){
843+ flash_unlock_sector(&flash_info[i], j);
844+ }
845+ }
846+ }
847+
848+ /* Protect binary boot image */
849+ flash_protect (FLAG_PROTECT_SET,
850+ CFG_FLASH_BASE,
851+ CFG_FLASH_BASE + CFG_BOOT_SIZE - 1, &flash_info[0]);
852+
853+ /* Protect environment variables */
854+ flash_protect (FLAG_PROTECT_SET,
855+ CFG_ENV_ADDR,
856+ CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]);
857+
858+ /* Protect U-Boot gzipped image */
859+ flash_protect (FLAG_PROTECT_SET,
860+ CFG_U_BOOT_BASE,
861+ CFG_U_BOOT_BASE + CFG_U_BOOT_SIZE - 1, &flash_info[0]);
862+
863+ return size;
864+}
865+
866+/*-----------------------------------------------------------------------
867+ */
868+void flash_print_info (flash_info_t * info)
869+{
870+ int i;
871+
872+ switch (info->flash_id & FLASH_VENDMASK) {
873+ case (ATM_MANUFACT & FLASH_VENDMASK):
874+ printf ("Atmel: ");
875+ break;
876+ default:
877+ printf ("Unknown Vendor ");
878+ break;
879+ }
880+
881+ switch (info->flash_id & FLASH_TYPEMASK) {
882+ case (ATM_ID_BV1614 & FLASH_TYPEMASK):
883+ printf ("AT49BV1614 (16Mbit)\n");
884+ break;
885+ case (ATM_ID_BV1614A & FLASH_TYPEMASK):
886+ printf ("AT49BV1614A (16Mbit)\n");
887+ break;
888+ case (ATM_ID_BV6416 & FLASH_TYPEMASK):
889+ printf ("AT49BV6416 (64Mbit)\n");
890+ break;
891+ default:
892+ printf ("Unknown Chip Type\n");
893+ return;
894+ }
895+
896+ printf (" Size: %ld MB in %d Sectors\n",
897+ info->size >> 20, info->sector_count);
898+
899+ printf (" Sector Start Addresses:");
900+ for (i = 0; i < info->sector_count; i++) {
901+ if ((i % 5) == 0) {
902+ printf ("\n ");
903+ }
904+ printf (" %08lX%s", info->start[i],
905+ info->protect[i] ? " (RO)" : " ");
906+ }
907+ printf ("\n");
908+}
909+
910+/*-----------------------------------------------------------------------
911+ */
912+
913+int flash_erase (flash_info_t * info, int s_first, int s_last)
914+{
915+ ulong result;
916+ int iflag, cflag, prot, sect;
917+ int rc = ERR_OK;
918+ int chip1;
919+
920+ /* first look for protection bits */
921+
922+ if (info->flash_id == FLASH_UNKNOWN)
923+ return ERR_UNKNOWN_FLASH_TYPE;
924+
925+ if ((s_first < 0) || (s_first > s_last)) {
926+ return ERR_INVAL;
927+ }
928+
929+ if ((info->flash_id & FLASH_VENDMASK) !=
930+ (ATM_MANUFACT & FLASH_VENDMASK)) {
931+ return ERR_UNKNOWN_FLASH_VENDOR;
932+ }
933+
934+ prot = 0;
935+ for (sect = s_first; sect <= s_last; ++sect) {
936+ if (info->protect[sect]) {
937+ prot++;
938+ }
939+ }
940+ if (prot)
941+ return ERR_PROTECTED;
942+
943+ /*
944+ * Disable interrupts which might cause a timeout
945+ * here. Remember that our exception vectors are
946+ * at address 0 in the flash, and we don't want a
947+ * (ticker) exception to happen while the flash
948+ * chip is in programming mode.
949+ */
950+ cflag = icache_status ();
951+ icache_disable ();
952+ iflag = disable_interrupts ();
953+
954+ /* Start erase on unprotected sectors */
955+ for (sect = s_first; sect <= s_last && !ctrlc (); sect++) {
956+ printf ("Erasing sector %2d ... ", sect);
957+
958+ /* arm simple, non interrupt dependent timer */
959+ reset_timer_masked ();
960+
961+ if (info->protect[sect] == 0) { /* not protected */
962+ volatile u16 *addr = (volatile u16 *) (info->start[sect]);
963+
964+ MEM_FLASH_ADDR1 = CMD_UNLOCK1;
965+ MEM_FLASH_ADDR2 = CMD_UNLOCK2;
966+ MEM_FLASH_ADDR1 = CMD_ERASE_SETUP;
967+
968+ MEM_FLASH_ADDR1 = CMD_UNLOCK1;
969+ MEM_FLASH_ADDR2 = CMD_UNLOCK2;
970+ *addr = CMD_ERASE_CONFIRM;
971+
972+ /* wait until flash is ready */
973+ chip1 = 0;
974+
975+ do {
976+ result = *addr;
977+
978+ /* check timeout */
979+ if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) {
980+ MEM_FLASH_ADDR1 = CMD_READ_ARRAY;
981+ chip1 = TMO;
982+ break;
983+ }
984+
985+ if (!chip1 && (result & 0xFFFF) & BIT_ERASE_DONE)
986+ chip1 = READY;
987+
988+ } while (!chip1);
989+
990+ MEM_FLASH_ADDR1 = CMD_READ_ARRAY;
991+
992+ if (chip1 == ERR) {
993+ rc = ERR_PROG_ERROR;
994+ goto outahere;
995+ }
996+ if (chip1 == TMO) {
997+ rc = ERR_TIMOUT;
998+ goto outahere;
999+ }
1000+
1001+ printf ("ok.\n");
1002+ } else { /* it was protected */
1003+ printf ("protected!\n");
1004+ }
1005+ }
1006+
1007+ if (ctrlc ())
1008+ printf ("User Interrupt!\n");
1009+
1010+outahere:
1011+ /* allow flash to settle - wait 10 ms */
1012+ udelay_masked (10000);
1013+
1014+ if (iflag)
1015+ enable_interrupts ();
1016+
1017+ if (cflag)
1018+ icache_enable ();
1019+
1020+ return rc;
1021+}
1022+
1023+/*-----------------------------------------------------------------------
1024+ * Copy memory to flash
1025+ */
1026+
1027+volatile static int write_word (flash_info_t * info, ulong dest,
1028+ ulong data)
1029+{
1030+ volatile u16 *addr = (volatile u16 *) dest;
1031+ ulong result;
1032+ int rc = ERR_OK;
1033+ int cflag, iflag;
1034+ int chip1;
1035+
1036+ /*
1037+ * Check if Flash is (sufficiently) erased
1038+ */
1039+ result = *addr;
1040+ if ((result & data) != data)
1041+ return ERR_NOT_ERASED;
1042+
1043+
1044+ /*
1045+ * Disable interrupts which might cause a timeout
1046+ * here. Remember that our exception vectors are
1047+ * at address 0 in the flash, and we don't want a
1048+ * (ticker) exception to happen while the flash
1049+ * chip is in programming mode.
1050+ */
1051+ cflag = icache_status ();
1052+ icache_disable ();
1053+ iflag = disable_interrupts ();
1054+
1055+ MEM_FLASH_ADDR1 = CMD_UNLOCK1;
1056+ MEM_FLASH_ADDR2 = CMD_UNLOCK2;
1057+ MEM_FLASH_ADDR1 = CMD_PROGRAM;
1058+ *addr = data;
1059+
1060+ /* arm simple, non interrupt dependent timer */
1061+ reset_timer_masked ();
1062+
1063+ /* wait until flash is ready */
1064+ chip1 = 0;
1065+ do {
1066+ result = *addr;
1067+
1068+ /* check timeout */
1069+ if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) {
1070+ chip1 = ERR | TMO;
1071+ break;
1072+ }
1073+ if (!chip1 && ((result & 0x80) == (data & 0x80)))
1074+ chip1 = READY;
1075+
1076+ } while (!chip1);
1077+
1078+ *addr = CMD_READ_ARRAY;
1079+
1080+ if (chip1 == ERR || *addr != data)
1081+ rc = ERR_PROG_ERROR;
1082+
1083+ if (iflag)
1084+ enable_interrupts ();
1085+
1086+ if (cflag)
1087+ icache_enable ();
1088+
1089+ return rc;
1090+}
1091+
1092+/*-----------------------------------------------------------------------
1093+ * Copy memory to flash.
1094+ */
1095+
1096+int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
1097+{
1098+ ulong wp, data;
1099+ int rc;
1100+
1101+ if (addr & 1) {
1102+ printf ("unaligned destination not supported\n");
1103+ return ERR_ALIGN;
1104+ };
1105+
1106+ if ((int) src & 1) {
1107+ printf ("unaligned source not supported\n");
1108+ return ERR_ALIGN;
1109+ };
1110+
1111+ wp = addr;
1112+
1113+ while (cnt >= 2) {
1114+ data = *((volatile u16 *) src);
1115+ if ((rc = write_word (info, wp, data)) != 0) {
1116+ return (rc);
1117+ }
1118+ src += 2;
1119+ wp += 2;
1120+ cnt -= 2;
1121+ }
1122+
1123+ if (cnt == 1) {
1124+ data = (*((volatile u8 *) src)) | (*((volatile u8 *) (wp + 1)) <<
1125+ 8);
1126+ if ((rc = write_word (info, wp, data)) != 0) {
1127+ return (rc);
1128+ }
1129+ src += 1;
1130+ wp += 1;
1131+ cnt -= 1;
1132+ };
1133+
1134+ return ERR_OK;
1135+}
1136diff -Naur u-boot-1.1.4.org/board/vlink/Makefile u-boot-1.1.4.tmp/board/vlink/Makefile
1137+++ u-boot-1.1.4.tmp/board/vlink/Makefile 2006-06-05 02:48:33.000000000 +0200
1138@@ -0,0 +1,46 @@
1139+#
1140+# (C) Copyright 2003
1141+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
1142+#
1143+# See file CREDITS for list of people who contributed to this
1144+# project.
1145+#
1146+# This program is free software; you can redistribute it and/or
1147+# modify it under the terms of the GNU General Public License as
1148+# published by the Free Software Foundation; either version 2 of
1149+# the License, or (at your option) any later version.
1150+#
1151+# This program is distributed in the hope that it will be useful,
1152+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1153+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1154+# GNU General Public License for more details.
1155+#
1156+# You should have received a copy of the GNU General Public License
1157+# along with this program; if not, write to the Free Software
1158+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1159+# MA 02111-1307 USA
1160+#
1161+
1162+include $(TOPDIR)/config.mk
1163+
1164+LIB = lib$(BOARD).a
1165+
1166+OBJS := vlink.o at45.o flash.o
1167+
1168+$(LIB): $(OBJS) $(SOBJS)
1169+ $(AR) crv $@ $(OBJS) $(SOBJS)
1170+
1171+clean:
1172+ rm -f $(SOBJS) $(OBJS)
1173+
1174+distclean: clean
1175+ rm -f $(LIB) core *.bak .depend
1176+
1177+#########################################################################
1178+
1179+.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
1180+ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
1181+
1182+-include .depend
1183+
1184+#########################################################################
1185diff -Naur u-boot-1.1.4.org/board/vlink/u-boot.lds u-boot-1.1.4.tmp/board/vlink/u-boot.lds
1186+++ u-boot-1.1.4.tmp/board/vlink/u-boot.lds 2005-12-16 17:39:27.000000000 +0100
1187@@ -0,0 +1,57 @@
1188+/*
1189+ * (C) Copyright 2002
1190+ * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
1191+ *
1192+ * See file CREDITS for list of people who contributed to this
1193+ * project.
1194+ *
1195+ * This program is free software; you can redistribute it and/or
1196+ * modify it under the terms of the GNU General Public License as
1197+ * published by the Free Software Foundation; either version 2 of
1198+ * the License, or (at your option) any later version.
1199+ *
1200+ * This program is distributed in the hope that it will be useful,
1201+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1202+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1203+ * GNU General Public License for more details.
1204+ *
1205+ * You should have received a copy of the GNU General Public License
1206+ * along with this program; if not, write to the Free Software
1207+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1208+ * MA 02111-1307 USA
1209+ */
1210+
1211+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
1212+/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/
1213+OUTPUT_ARCH(arm)
1214+ENTRY(_start)
1215+SECTIONS
1216+{
1217+ . = 0x00000000;
1218+
1219+ . = ALIGN(4);
1220+ .text :
1221+ {
1222+ cpu/arm920t/start.o (.text)
1223+ *(.text)
1224+ }
1225+
1226+ . = ALIGN(4);
1227+ .rodata : { *(.rodata) }
1228+
1229+ . = ALIGN(4);
1230+ .data : { *(.data) }
1231+
1232+ . = ALIGN(4);
1233+ .got : { *(.got) }
1234+
1235+ . = .;
1236+ __u_boot_cmd_start = .;
1237+ .u_boot_cmd : { *(.u_boot_cmd) }
1238+ __u_boot_cmd_end = .;
1239+
1240+ . = ALIGN(4);
1241+ __bss_start = .;
1242+ .bss : { *(.bss) }
1243+ _end = .;
1244+}
1245diff -Naur u-boot-1.1.4.org/board/vlink/vlink.c u-boot-1.1.4.tmp/board/vlink/vlink.c
1246+++ u-boot-1.1.4.tmp/board/vlink/vlink.c 2006-06-05 03:10:22.000000000 +0200
1247@@ -0,0 +1,89 @@
1248+/*
1249+ * (C) Copyright 2002
1250+ * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
1251+ * Marius Groeger <mgroeger@sysgo.de>
1252+ *
1253+ * See file CREDITS for list of people who contributed to this
1254+ * project.
1255+ *
1256+ * This program is free software; you can redistribute it and/or
1257+ * modify it under the terms of the GNU General Public License as
1258+ * published by the Free Software Foundation; either version 2 of
1259+ * the License, or (at your option) any later version.
1260+ *
1261+ * This program is distributed in the hope that it will be useful,
1262+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1263+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1264+ * GNU General Public License for more details.
1265+ *
1266+ * You should have received a copy of the GNU General Public License
1267+ * along with this program; if not, write to the Free Software
1268+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1269+ * MA 02111-1307 USA
1270+ */
1271+
1272+#include <common.h>
1273+#include <asm/arch/AT91RM9200.h>
1274+#include <at91rm9200_net.h>
1275+#include <dm9161.h>
1276+#include <asm/mach-types.h>
1277+
1278+/* ------------------------------------------------------------------------- */
1279+/*
1280+ * Miscelaneous platform dependent initialisations
1281+ */
1282+
1283+int board_init (void)
1284+{
1285+ DECLARE_GLOBAL_DATA_PTR;
1286+
1287+ /* Enable Ctrlc */
1288+ console_init_f ();
1289+
1290+ /* Correct IRDA resistor problem */
1291+ /* Set PA23_TXD in Output */
1292+ (AT91PS_PIO) AT91C_BASE_PIOA->PIO_OER = AT91C_PA23_TXD2;
1293+
1294+ /* memory and cpu-speed are setup before relocation */
1295+ /* so we do _nothing_ here */
1296+
1297+ /* arch number of Versalink-Board */
1298+ gd->bd->bi_arch_number = MACH_TYPE_VLINK;
1299+ /* adress of boot parameters */
1300+ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
1301+
1302+ return 0;
1303+}
1304+
1305+int dram_init (void)
1306+{
1307+ DECLARE_GLOBAL_DATA_PTR;
1308+
1309+ gd->bd->bi_dram[0].start = PHYS_SDRAM;
1310+ gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
1311+ return 0;
1312+}
1313+
1314+#ifdef CONFIG_DRIVER_ETHER
1315+#if (CONFIG_COMMANDS & CFG_CMD_NET)
1316+
1317+/*
1318+ * Name:
1319+ * at91rm9200_GetPhyInterface
1320+ * Description:
1321+ * Initialise the interface functions to the PHY
1322+ * Arguments:
1323+ * None
1324+ * Return value:
1325+ * None
1326+ */
1327+void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)
1328+{
1329+ p_phyops->Init = dm9161_InitPhy;
1330+ p_phyops->IsPhyConnected = dm9161_IsPhyConnected;
1331+ p_phyops->GetLinkSpeed = dm9161_GetLinkSpeed;
1332+ p_phyops->AutoNegotiate = dm9161_AutoNegotiate;
1333+}
1334+
1335+#endif /* CONFIG_COMMANDS & CFG_CMD_NET */
1336+#endif /* CONFIG_DRIVER_ETHER */
1337diff -Naur u-boot-1.1.4.org/include/asm-arm/mach-types.h u-boot-1.1.4.tmp/include/asm-arm/mach-types.h
1338+++ u-boot-1.1.4.tmp/include/asm-arm/mach-types.h 2006-06-05 01:29:25.000000000 +0200
1339@@ -424,7 +424,7 @@
1340 #define MACH_TYPE_MPORT3S 411
1341 #define MACH_TYPE_RA_ALPHA 412
1342 #define MACH_TYPE_XCEP 413
1343-#define MACH_TYPE_ARCOM_MERCURY 414
1344+#define MACH_TYPE_ARCOM_VULCAN 414
1345 #define MACH_TYPE_STARGATE 415
1346 #define MACH_TYPE_ARMADILLOJ 416
1347 #define MACH_TYPE_ELROY_JACK 417
1348@@ -457,7 +457,7 @@
1349 #define MACH_TYPE_XM250 444
1350 #define MACH_TYPE_T6TC1XB 445
1351 #define MACH_TYPE_ESS710 446
1352-#define MACH_TYPE_MX3ADS 447
1353+#define MACH_TYPE_MX31ADS 447
1354 #define MACH_TYPE_HIMALAYA 448
1355 #define MACH_TYPE_BOLFENK 449
1356 #define MACH_TYPE_AT91RM9200KR 450
1357@@ -563,8 +563,8 @@
1358 #define MACH_TYPE_ENS_CMU 550
1359 #define MACH_TYPE_MM6_SDB 551
1360 #define MACH_TYPE_SATURN 552
1361-#define MACH_TYPE_ARGONPLUSEVB 553
1362-#define MACH_TYPE_SCMA11EVB 554
1363+#define MACH_TYPE_I30030EVB 553
1364+#define MACH_TYPE_MXC27530EVB 554
1365 #define MACH_TYPE_SMDK2800 555
1366 #define MACH_TYPE_MTWILSON 556
1367 #define MACH_TYPE_ZITI 557
1368@@ -644,7 +644,7 @@
1369 #define MACH_TYPE_MX2JAZZ 631
1370 #define MACH_TYPE_MULTIIO 632
1371 #define MACH_TYPE_HRDISPLAY 633
1372-#define MACH_TYPE_SCMA11BB 634
1373+#define MACH_TYPE_MXC27530ADS 634
1374 #define MACH_TYPE_TRIZEPS3 635
1375 #define MACH_TYPE_ZEFEERDZA 636
1376 #define MACH_TYPE_ZEFEERDZB 637
1377@@ -718,7 +718,7 @@
1378 #define MACH_TYPE_GEM 707
1379 #define MACH_TYPE_I858 708
1380 #define MACH_TYPE_HX2750 709
1381-#define MACH_TYPE_ZEUSEVB 710
1382+#define MACH_TYPE_MXC91131EVB 710
1383 #define MACH_TYPE_P700 711
1384 #define MACH_TYPE_CPE 712
1385 #define MACH_TYPE_SPITZ 713
1386@@ -736,6 +736,331 @@
1387 #define MACH_TYPE_LN2410SBC 725
1388 #define MACH_TYPE_CB3RUFC 726
1389 #define MACH_TYPE_MP2USB 727
1390+#define MACH_TYPE_NTNP425C 728
1391+#define MACH_TYPE_COLIBRI 729
1392+#define MACH_TYPE_PCM7220 730
1393+#define MACH_TYPE_GATEWAY7001 731
1394+#define MACH_TYPE_PCM027 732
1395+#define MACH_TYPE_CMPXA 733
1396+#define MACH_TYPE_ANUBIS 734
1397+#define MACH_TYPE_ITE8152 735
1398+#define MACH_TYPE_LPC3XXX 736
1399+#define MACH_TYPE_PUPPETEER 737
1400+#define MACH_TYPE_MACH_VADATECH 738
1401+#define MACH_TYPE_E570 739
1402+#define MACH_TYPE_X50 740
1403+#define MACH_TYPE_RECON 741
1404+#define MACH_TYPE_XBOARDGP8 742
1405+#define MACH_TYPE_FPIC2 743
1406+#define MACH_TYPE_AKITA 744
1407+#define MACH_TYPE_A81 745
1408+#define MACH_TYPE_SVM_SC25X 746
1409+#define MACH_TYPE_VADATECH020 747
1410+#define MACH_TYPE_TLI 748
1411+#define MACH_TYPE_EDB9315LC 749
1412+#define MACH_TYPE_PASSEC 750
1413+#define MACH_TYPE_DS_TIGER 751
1414+#define MACH_TYPE_E310 752
1415+#define MACH_TYPE_E330 753
1416+#define MACH_TYPE_RT3000 754
1417+#define MACH_TYPE_NOKIA770 755
1418+#define MACH_TYPE_PNX0106 756
1419+#define MACH_TYPE_HX21XX 757
1420+#define MACH_TYPE_FARADAY 758
1421+#define MACH_TYPE_SBC9312 759
1422+#define MACH_TYPE_BATMAN 760
1423+#define MACH_TYPE_JPD201 761
1424+#define MACH_TYPE_MIPSA 762
1425+#define MACH_TYPE_KACOM 763
1426+#define MACH_TYPE_SWARCOCPU 764
1427+#define MACH_TYPE_SWARCODSL 765
1428+#define MACH_TYPE_BLUEANGEL 766
1429+#define MACH_TYPE_HAIRYGRAMA 767
1430+#define MACH_TYPE_BANFF 768
1431+#define MACH_TYPE_CARMEVA 769
1432+#define MACH_TYPE_SAM255 770
1433+#define MACH_TYPE_PPM10 771
1434+#define MACH_TYPE_EDB9315A 772
1435+#define MACH_TYPE_SUNSET 773
1436+#define MACH_TYPE_STARGATE2 774
1437+#define MACH_TYPE_INTELMOTE2 775
1438+#define MACH_TYPE_TRIZEPS4 776
1439+#define MACH_TYPE_MAINSTONE2 777
1440+#define MACH_TYPE_EZ_IXP42X 778
1441+#define MACH_TYPE_TAPWAVE_ZODIAC 779
1442+#define MACH_TYPE_UNIVERSALMETER 780
1443+#define MACH_TYPE_HICOARM9 781
1444+#define MACH_TYPE_PNX4008 782
1445+#define MACH_TYPE_KWS6000 783
1446+#define MACH_TYPE_PORTUX920T 784
1447+#define MACH_TYPE_EZ_X5 785
1448+#define MACH_TYPE_OMAP_RUDOLPH 786
1449+#define MACH_TYPE_CPUAT91 787
1450+#define MACH_TYPE_REA9200 788
1451+#define MACH_TYPE_ACTS_PUNE_SA1110 789
1452+#define MACH_TYPE_IXP425 790
1453+#define MACH_TYPE_I30030ADS 791
1454+#define MACH_TYPE_PERCH 792
1455+#define MACH_TYPE_EIS05R1 793
1456+#define MACH_TYPE_PEPPERPAD 794
1457+#define MACH_TYPE_SB3010 795
1458+#define MACH_TYPE_RM9200 796
1459+#define MACH_TYPE_DMA03 797
1460+#define MACH_TYPE_ROAD_S101 798
1461+#define MACH_TYPE_IQ_NEXTGEN_A 799
1462+#define MACH_TYPE_IQ_NEXTGEN_B 800
1463+#define MACH_TYPE_IQ_NEXTGEN_C 801
1464+#define MACH_TYPE_IQ_NEXTGEN_D 802
1465+#define MACH_TYPE_IQ_NEXTGEN_E 803
1466+#define MACH_TYPE_MALLOW_AT91 804
1467+#define MACH_TYPE_CYBERTRACKER_I 805
1468+#define MACH_TYPE_GESBC931X 806
1469+#define MACH_TYPE_CENTIPAD 807
1470+#define MACH_TYPE_ARMSOC 808
1471+#define MACH_TYPE_SE4200 809
1472+#define MACH_TYPE_EMS197A 810
1473+#define MACH_TYPE_MICRO9 811
1474+#define MACH_TYPE_MICRO9L 812
1475+#define MACH_TYPE_UC5471DSP 813
1476+#define MACH_TYPE_SJ5471ENG 814
1477+#define MACH_TYPE_CMPXA26X 815
1478+#define MACH_TYPE_NC 816
1479+#define MACH_TYPE_OMAP_PALMTE 817
1480+#define MACH_TYPE_AJAX52X 818
1481+#define MACH_TYPE_SIRIUSTAR 819
1482+#define MACH_TYPE_IODATA_HDLG 820
1483+#define MACH_TYPE_AT91RM9200UTL 821
1484+#define MACH_TYPE_BIOSAFE 822
1485+#define MACH_TYPE_MP1000 823
1486+#define MACH_TYPE_PARSY 824
1487+#define MACH_TYPE_CCXP 825
1488+#define MACH_TYPE_OMAP_GSAMPLE 826
1489+#define MACH_TYPE_REALVIEW_EB 827
1490+#define MACH_TYPE_SAMOA 828
1491+#define MACH_TYPE_T3XSCALE 829
1492+#define MACH_TYPE_I878 830
1493+#define MACH_TYPE_BORZOI 831
1494+#define MACH_TYPE_GECKO 832
1495+#define MACH_TYPE_DS101 833
1496+#define MACH_TYPE_OMAP_PALMTT2 834
1497+#define MACH_TYPE_XSCALE_PALMLD 835
1498+#define MACH_TYPE_CC9C 836
1499+#define MACH_TYPE_SBC1670 837
1500+#define MACH_TYPE_IXDP28X5 838
1501+#define MACH_TYPE_OMAP_PALMTT 839
1502+#define MACH_TYPE_ML696K 840
1503+#define MACH_TYPE_ARCOM_ZEUS 841
1504+#define MACH_TYPE_OSIRIS 842
1505+#define MACH_TYPE_MAESTRO 843
1506+#define MACH_TYPE_TUNGE2 844
1507+#define MACH_TYPE_IXBBM 845
1508+#define MACH_TYPE_MX27 846
1509+#define MACH_TYPE_AX8004 847
1510+#define MACH_TYPE_AT91SAM9261EK 848
1511+#define MACH_TYPE_LOFT 849
1512+#define MACH_TYPE_MAGPIE 850
1513+#define MACH_TYPE_MX21 851
1514+#define MACH_TYPE_MB87M3400 852
1515+#define MACH_TYPE_MGUARD_DELTA 853
1516+#define MACH_TYPE_DAVINCI_DVDP 854
1517+#define MACH_TYPE_HTCUNIVERSAL 855
1518+#define MACH_TYPE_TPAD 856
1519+#define MACH_TYPE_ROVERP3 857
1520+#define MACH_TYPE_JORNADA928 858
1521+#define MACH_TYPE_MV88FXX81 859
1522+#define MACH_TYPE_STMP36XX 860
1523+#define MACH_TYPE_SXNI79524 861
1524+#define MACH_TYPE_AMS_DELTA 862
1525+#define MACH_TYPE_URANIUM 863
1526+#define MACH_TYPE_UCON 864
1527+#define MACH_TYPE_NAS100D 865
1528+#define MACH_TYPE_L083_1000 866
1529+#define MACH_TYPE_EZX 867
1530+#define MACH_TYPE_PNX5220 868
1531+#define MACH_TYPE_BUTTE 869
1532+#define MACH_TYPE_SRM2 870
1533+#define MACH_TYPE_DSBR 871
1534+#define MACH_TYPE_CRYSTALBALL 872
1535+#define MACH_TYPE_TINYPXA27X 873
1536+#define MACH_TYPE_HERBIE 874
1537+#define MACH_TYPE_MAGICIAN 875
1538+#define MACH_TYPE_CM4002 876
1539+#define MACH_TYPE_B4 877
1540+#define MACH_TYPE_MAUI 878
1541+#define MACH_TYPE_CYBERTRACKER_G 879
1542+#define MACH_TYPE_NXDKN 880
1543+#define MACH_TYPE_MIO8390 881
1544+#define MACH_TYPE_OMI_BOARD 882
1545+#define MACH_TYPE_MX21CIV 883
1546+#define MACH_TYPE_MAHI_CDAC 884
1547+#define MACH_TYPE_XSCALE_PALMTX 885
1548+#define MACH_TYPE_S3C2413 887
1549+#define MACH_TYPE_SAMSYS_EP0 888
1550+#define MACH_TYPE_WG302V1 889
1551+#define MACH_TYPE_WG302V2 890
1552+#define MACH_TYPE_EB42X 891
1553+#define MACH_TYPE_IQ331ES 892
1554+#define MACH_TYPE_COSYDSP 893
1555+#define MACH_TYPE_UPLAT7D 894
1556+#define MACH_TYPE_PTDAVINCI 895
1557+#define MACH_TYPE_MBUS 896
1558+#define MACH_TYPE_NADIA2VB 897
1559+#define MACH_TYPE_R1000 898
1560+#define MACH_TYPE_HW90250 899
1561+#define MACH_TYPE_OMAP_2430SDP 900
1562+#define MACH_TYPE_DAVINCI_EVM 901
1563+#define MACH_TYPE_OMAP_TORNADO 902
1564+#define MACH_TYPE_OLOCREEK 903
1565+#define MACH_TYPE_PALMZ72 904
1566+#define MACH_TYPE_NXDB500 905
1567+#define MACH_TYPE_APF9328 906
1568+#define MACH_TYPE_OMAP_WIPOQ 907
1569+#define MACH_TYPE_OMAP_TWIP 908
1570+#define MACH_TYPE_XSCALE_PALMTREO650 909
1571+#define MACH_TYPE_ACUMEN 910
1572+#define MACH_TYPE_XP100 911
1573+#define MACH_TYPE_FS2410 912
1574+#define MACH_TYPE_PXA270_CERF 913
1575+#define MACH_TYPE_SQ2FTLPALM 914
1576+#define MACH_TYPE_BSEMSERVER 915
1577+#define MACH_TYPE_NETCLIENT 916
1578+#define MACH_TYPE_XSCALE_PALMTT5 917
1579+#define MACH_TYPE_OMAP_PALMTC 918
1580+#define MACH_TYPE_OMAP_APOLLON 919
1581+#define MACH_TYPE_MXC30030EVB 920
1582+#define MACH_TYPE_REA_2D 921
1583+#define MACH_TYPE_TI3E524 922
1584+#define MACH_TYPE_ATEB9200 923
1585+#define MACH_TYPE_AUCKLAND 924
1586+#define MACH_TYPE_AK3320M 925
1587+#define MACH_TYPE_DURAMAX 926
1588+#define MACH_TYPE_N35 927
1589+#define MACH_TYPE_PRONGHORN 928
1590+#define MACH_TYPE_FUNDY 929
1591+#define MACH_TYPE_LOGICPD_PXA270 930
1592+#define MACH_TYPE_CPU777 931
1593+#define MACH_TYPE_SIMICON9201 932
1594+#define MACH_TYPE_LEAP2_HPM 933
1595+#define MACH_TYPE_CM922TXA10 934
1596+#define MACH_TYPE_PXA 935
1597+#define MACH_TYPE_SANDGATE2 936
1598+#define MACH_TYPE_SANDGATE2G 937
1599+#define MACH_TYPE_SANDGATE2P 938
1600+#define MACH_TYPE_FRED_JACK 939
1601+#define MACH_TYPE_TTG_COLOR1 940
1602+#define MACH_TYPE_NXEB500HMI 941
1603+#define MACH_TYPE_NETDCU8 942
1604+#define MACH_TYPE_ML675050_CPU_BOA 943
1605+#define MACH_TYPE_NG_FVX538 944
1606+#define MACH_TYPE_NG_FVS338 945
1607+#define MACH_TYPE_PNX4103 946
1608+#define MACH_TYPE_HESDB 947
1609+#define MACH_TYPE_XSILO 948
1610+#define MACH_TYPE_ESPRESSO 949
1611+#define MACH_TYPE_EMLC 950
1612+#define MACH_TYPE_SISTERON 951
1613+#define MACH_TYPE_RX1950 952
1614+#define MACH_TYPE_TSC_VENUS 953
1615+#define MACH_TYPE_DS101J 954
1616+#define MACH_TYPE_MXC30030ADS 955
1617+#define MACH_TYPE_FUJITSU_WIMAXSOC 956
1618+#define MACH_TYPE_DUALPCMODEM 957
1619+#define MACH_TYPE_GESBC9312 958
1620+#define MACH_TYPE_HTCAPACHE 959
1621+#define MACH_TYPE_IXDP435 960
1622+#define MACH_TYPE_CATPROVT100 961
1623+#define MACH_TYPE_PICOTUX1XX 962
1624+#define MACH_TYPE_PICOTUX2XX 963
1625+#define MACH_TYPE_DSMG600 964
1626+#define MACH_TYPE_EMPC2 965
1627+#define MACH_TYPE_VENTURA 966
1628+#define MACH_TYPE_PHIDGET_SBC 967
1629+#define MACH_TYPE_IJ3K 968
1630+#define MACH_TYPE_PISGAH 969
1631+#define MACH_TYPE_OMAP_FSAMPLE 970
1632+#define MACH_TYPE_SG720 971
1633+#define MACH_TYPE_REDFOX 972
1634+#define MACH_TYPE_MYSH_EP9315_1 973
1635+#define MACH_TYPE_TPF106 974
1636+#define MACH_TYPE_AT91RM9200KG 975
1637+#define MACH_TYPE_SLEDB 976
1638+#define MACH_TYPE_ONTRACK 977
1639+#define MACH_TYPE_PM1200 978
1640+#define MACH_TYPE_ESS24XXX 979
1641+#define MACH_TYPE_COREMP7 980
1642+#define MACH_TYPE_NEXCODER_6446 981
1643+#define MACH_TYPE_STVC8380 982
1644+#define MACH_TYPE_TEKLYNX 983
1645+#define MACH_TYPE_CARBONADO 984
1646+#define MACH_TYPE_SYSMOS_MP730 985
1647+#define MACH_TYPE_SNAPPER_CL15 986
1648+#define MACH_TYPE_PGIGIM 987
1649+#define MACH_TYPE_PTX9160P2 988
1650+#define MACH_TYPE_DCORE1 989
1651+#define MACH_TYPE_VICTORPXA 990
1652+#define MACH_TYPE_MX2DTB 991
1653+#define MACH_TYPE_PXA_IREX_ER0100 992
1654+#define MACH_TYPE_OMAP_PALMZ71 993
1655+#define MACH_TYPE_BARTEC_DEG 994
1656+#define MACH_TYPE_HW50251 995
1657+#define MACH_TYPE_IBOX 996
1658+#define MACH_TYPE_ATLASLH7A404 997
1659+#define MACH_TYPE_PT2026 998
1660+#define MACH_TYPE_HTCALPINE 999
1661+#define MACH_TYPE_BARTEC_VTU 1000
1662+#define MACH_TYPE_VCOREII 1001
1663+#define MACH_TYPE_PDNB3 1002
1664+#define MACH_TYPE_HTCBEETLES 1003
1665+#define MACH_TYPE_S3C6400 1004
1666+#define MACH_TYPE_S3C2443 1005
1667+#define MACH_TYPE_OMAP_LDK 1006
1668+#define MACH_TYPE_SMDK2460 1007
1669+#define MACH_TYPE_SMDK2440 1008
1670+#define MACH_TYPE_SMDK2412 1009
1671+#define MACH_TYPE_WEBBOX 1010
1672+#define MACH_TYPE_CWWNDP 1011
1673+#define MACH_TYPE_DRAGON 1012
1674+#define MACH_TYPE_OPENDO_CPU_BOARD 1013
1675+#define MACH_TYPE_CCM2200 1014
1676+#define MACH_TYPE_ETWARM 1015
1677+#define MACH_TYPE_M93030 1016
1678+#define MACH_TYPE_CC7U 1017
1679+#define MACH_TYPE_MTT_RANGER 1018
1680+#define MACH_TYPE_NEXUS 1019
1681+#define MACH_TYPE_DESMAN 1020
1682+#define MACH_TYPE_BKDE303 1021
1683+#define MACH_TYPE_SMDK2413 1022
1684+#define MACH_TYPE_AML_M7200 1023
1685+#define MACH_TYPE_AML_M5900 1024
1686+#define MACH_TYPE_SG640 1025
1687+#define MACH_TYPE_EDG79524 1026
1688+#define MACH_TYPE_AI2410 1027
1689+#define MACH_TYPE_IXP465 1028
1690+#define MACH_TYPE_BALLOON3 1029
1691+#define MACH_TYPE_HEINS 1030
1692+#define MACH_TYPE_MPLUSEVA 1031
1693+#define MACH_TYPE_RT042 1032
1694+#define MACH_TYPE_CWIEM 1033
1695+#define MACH_TYPE_CM_X270 1034
1696+#define MACH_TYPE_CM_X255 1035
1697+#define MACH_TYPE_ESH_AT91 1036
1698+#define MACH_TYPE_SANDGATE3 1037
1699+#define MACH_TYPE_PRIMO 1038
1700+#define MACH_TYPE_GEMSTONE 1039
1701+#define MACH_TYPE_PRONGHORNMETRO 1040
1702+#define MACH_TYPE_SIDEWINDER 1041
1703+#define MACH_TYPE_PICOMOD1 1042
1704+#define MACH_TYPE_SG590 1043
1705+#define MACH_TYPE_AKAI9307 1044
1706+#define MACH_TYPE_FONTAINE 1045
1707+#define MACH_TYPE_WOMBAT 1046
1708+#define MACH_TYPE_ACQ300 1047
1709+#define MACH_TYPE_MOD_270 1048
1710+#define MACH_TYPE_VC0820 1049
1711+#define MACH_TYPE_ANI_AIM 1050
1712+#define MACH_TYPE_JELLYFISH 1051
1713+#define MACH_TYPE_AMANITA 1052
1714+#define MACH_TYPE_VLINK 1053
1715
1716 #ifdef CONFIG_ARCH_EBSA110
1717 # ifdef machine_arch_type
1718@@ -3540,9 +3865,9 @@
1719 # else
1720 # define machine_arch_type MACH_TYPE_RAMSES
1721 # endif
1722-# define machine_is_ramses() (machine_arch_type == MACH_TYPE_RAMSES)
1723+# define machine_is_mnci() (machine_arch_type == MACH_TYPE_RAMSES)
1724 #else
1725-# define machine_is_ramses() (0)
1726+# define machine_is_mnci() (0)
1727 #endif
1728
1729 #ifdef CONFIG_ARCH_S28X
1730@@ -4500,9 +4825,9 @@
1731 # else
1732 # define machine_arch_type MACH_TYPE_M825XX
1733 # endif
1734-# define machine_is_m825xx() (machine_arch_type == MACH_TYPE_M825XX)
1735+# define machine_is_comcerto() (machine_arch_type == MACH_TYPE_M825XX)
1736 #else
1737-# define machine_is_m825xx() (0)
1738+# define machine_is_comcerto() (0)
1739 #endif
1740
1741 #ifdef CONFIG_SA1100_M7100
1742@@ -5657,16 +5982,16 @@
1743 # define machine_is_xcep() (0)
1744 #endif
1745
1746-#ifdef CONFIG_MACH_ARCOM_MERCURY
1747+#ifdef CONFIG_MACH_ARCOM_VULCAN
1748 # ifdef machine_arch_type
1749 # undef machine_arch_type
1750 # define machine_arch_type __machine_arch_type
1751 # else
1752-# define machine_arch_type MACH_TYPE_ARCOM_MERCURY
1753+# define machine_arch_type MACH_TYPE_ARCOM_VULCAN
1754 # endif
1755-# define machine_is_arcom_mercury() (machine_arch_type == MACH_TYPE_ARCOM_MERCURY)
1756+# define machine_is_arcom_vulcan() (machine_arch_type == MACH_TYPE_ARCOM_VULCAN)
1757 #else
1758-# define machine_is_arcom_mercury() (0)
1759+# define machine_is_arcom_vulcan() (0)
1760 #endif
1761
1762 #ifdef CONFIG_MACH_STARGATE
1763@@ -6053,16 +6378,16 @@
1764 # define machine_is_ess710() (0)
1765 #endif
1766
1767-#ifdef CONFIG_MACH_MX3ADS
1768+#ifdef CONFIG_MACH_MX31ADS
1769 # ifdef machine_arch_type
1770 # undef machine_arch_type
1771 # define machine_arch_type __machine_arch_type
1772 # else
1773-# define machine_arch_type MACH_TYPE_MX3ADS
1774+# define machine_arch_type MACH_TYPE_MX31ADS
1775 # endif
1776-# define machine_is_mx3ads() (machine_arch_type == MACH_TYPE_MX3ADS)
1777+# define machine_is_mx31ads() (machine_arch_type == MACH_TYPE_MX31ADS)
1778 #else
1779-# define machine_is_mx3ads() (0)
1780+# define machine_is_mx31ads() (0)
1781 #endif
1782
1783 #ifdef CONFIG_MACH_HIMALAYA
1784@@ -7325,28 +7650,28 @@
1785 # define machine_is_saturn() (0)
1786 #endif
1787
1788-#ifdef CONFIG_MACH_ARGONPLUSEVB
1789+#ifdef CONFIG_MACH_I30030EVB
1790 # ifdef machine_arch_type
1791 # undef machine_arch_type
1792 # define machine_arch_type __machine_arch_type
1793 # else
1794-# define machine_arch_type MACH_TYPE_ARGONPLUSEVB
1795+# define machine_arch_type MACH_TYPE_I30030EVB
1796 # endif
1797-# define machine_is_argonplusevb() (machine_arch_type == MACH_TYPE_ARGONPLUSEVB)
1798+# define machine_is_i30030evb() (machine_arch_type == MACH_TYPE_I30030EVB)
1799 #else
1800-# define machine_is_argonplusevb() (0)
1801+# define machine_is_i30030evb() (0)
1802 #endif
1803
1804-#ifdef CONFIG_MACH_SCMA11EVB
1805+#ifdef CONFIG_MACH_MXC27530EVB
1806 # ifdef machine_arch_type
1807 # undef machine_arch_type
1808 # define machine_arch_type __machine_arch_type
1809 # else
1810-# define machine_arch_type MACH_TYPE_SCMA11EVB
1811+# define machine_arch_type MACH_TYPE_MXC27530EVB
1812 # endif
1813-# define machine_is_scma11evb() (machine_arch_type == MACH_TYPE_SCMA11EVB)
1814+# define machine_is_mxc27530evb() (machine_arch_type == MACH_TYPE_MXC27530EVB)
1815 #else
1816-# define machine_is_scma11evb() (0)
1817+# define machine_is_mxc27530evb() (0)
1818 #endif
1819
1820 #ifdef CONFIG_MACH_SMDK2800
1821@@ -8297,16 +8622,16 @@
1822 # define machine_is_hrdisplay() (0)
1823 #endif
1824
1825-#ifdef CONFIG_MACH_SCMA11BB
1826+#ifdef CONFIG_MACH_MXC27530ADS
1827 # ifdef machine_arch_type
1828 # undef machine_arch_type
1829 # define machine_arch_type __machine_arch_type
1830 # else
1831-# define machine_arch_type MACH_TYPE_SCMA11BB
1832+# define machine_arch_type MACH_TYPE_MXC27530ADS
1833 # endif
1834-# define machine_is_scma11bb() (machine_arch_type == MACH_TYPE_SCMA11BB)
1835+# define machine_is_mxc27530ads() (machine_arch_type == MACH_TYPE_MXC27530ADS)
1836 #else
1837-# define machine_is_scma11bb() (0)
1838+# define machine_is_mxc27530ads() (0)
1839 #endif
1840
1841 #ifdef CONFIG_MACH_TRIZEPS3
1842@@ -9185,16 +9510,16 @@
1843 # define machine_is_hx2750() (0)
1844 #endif
1845
1846-#ifdef CONFIG_MACH_ZEUSEVB
1847+#ifdef CONFIG_MACH_MXC91131EVB
1848 # ifdef machine_arch_type
1849 # undef machine_arch_type
1850 # define machine_arch_type __machine_arch_type
1851 # else
1852-# define machine_arch_type MACH_TYPE_ZEUSEVB
1853+# define machine_arch_type MACH_TYPE_MXC91131EVB
1854 # endif
1855-# define machine_is_zeusevb() (machine_arch_type == MACH_TYPE_ZEUSEVB)
1856+# define machine_is_mxc91131evb() (machine_arch_type == MACH_TYPE_MXC91131EVB)
1857 #else
1858-# define machine_is_zeusevb() (0)
1859+# define machine_is_mxc91131evb() (0)
1860 #endif
1861
1862 #ifdef CONFIG_MACH_P700
1863@@ -9401,6 +9726,3906 @@
1864 # define machine_is_mp2usb() (0)
1865 #endif
1866
1867+#ifdef CONFIG_MACH_NTNP425C
1868+# ifdef machine_arch_type
1869+# undef machine_arch_type
1870+# define machine_arch_type __machine_arch_type
1871+# else
1872+# define machine_arch_type MACH_TYPE_NTNP425C
1873+# endif
1874+# define machine_is_ntnp425c() (machine_arch_type == MACH_TYPE_NTNP425C)
1875+#else
1876+# define machine_is_ntnp425c() (0)
1877+#endif
1878+
1879+#ifdef CONFIG_MACH_COLIBRI
1880+# ifdef machine_arch_type
1881+# undef machine_arch_type
1882+# define machine_arch_type __machine_arch_type
1883+# else
1884+# define machine_arch_type MACH_TYPE_COLIBRI
1885+# endif
1886+# define machine_is_colibri() (machine_arch_type == MACH_TYPE_COLIBRI)
1887+#else
1888+# define machine_is_colibri() (0)
1889+#endif
1890+
1891+#ifdef CONFIG_MACH_PCM7220
1892+# ifdef machine_arch_type
1893+# undef machine_arch_type
1894+# define machine_arch_type __machine_arch_type
1895+# else
1896+# define machine_arch_type MACH_TYPE_PCM7220
1897+# endif
1898+# define machine_is_pcm7220() (machine_arch_type == MACH_TYPE_PCM7220)
1899+#else
1900+# define machine_is_pcm7220() (0)
1901+#endif
1902+
1903+#ifdef CONFIG_MACH_GATEWAY7001
1904+# ifdef machine_arch_type
1905+# undef machine_arch_type
1906+# define machine_arch_type __machine_arch_type
1907+# else
1908+# define machine_arch_type MACH_TYPE_GATEWAY7001
1909+# endif
1910+# define machine_is_gateway7001() (machine_arch_type == MACH_TYPE_GATEWAY7001)
1911+#else
1912+# define machine_is_gateway7001() (0)
1913+#endif
1914+
1915+#ifdef CONFIG_MACH_PCM027
1916+# ifdef machine_arch_type
1917+# undef machine_arch_type
1918+# define machine_arch_type __machine_arch_type
1919+# else
1920+# define machine_arch_type MACH_TYPE_PCM027
1921+# endif
1922+# define machine_is_pcm027() (machine_arch_type == MACH_TYPE_PCM027)
1923+#else
1924+# define machine_is_pcm027() (0)
1925+#endif
1926+
1927+#ifdef CONFIG_MACH_CMPXA
1928+# ifdef machine_arch_type
1929+# undef machine_arch_type
1930+# define machine_arch_type __machine_arch_type
1931+# else
1932+# define machine_arch_type MACH_TYPE_CMPXA
1933+# endif
1934+# define machine_is_cmpxa() (machine_arch_type == MACH_TYPE_CMPXA)
1935+#else
1936+# define machine_is_cmpxa() (0)
1937+#endif
1938+
1939+#ifdef CONFIG_MACH_ANUBIS
1940+# ifdef machine_arch_type
1941+# undef machine_arch_type
1942+# define machine_arch_type __machine_arch_type
1943+# else
1944+# define machine_arch_type MACH_TYPE_ANUBIS
1945+# endif
1946+# define machine_is_anubis() (machine_arch_type == MACH_TYPE_ANUBIS)
1947+#else
1948+# define machine_is_anubis() (0)
1949+#endif
1950+
1951+#ifdef CONFIG_MACH_ITE8152
1952+# ifdef machine_arch_type
1953+# undef machine_arch_type
1954+# define machine_arch_type __machine_arch_type
1955+# else
1956+# define machine_arch_type MACH_TYPE_ITE8152
1957+# endif
1958+# define machine_is_ite8152() (machine_arch_type == MACH_TYPE_ITE8152)
1959+#else
1960+# define machine_is_ite8152() (0)
1961+#endif
1962+
1963+#ifdef CONFIG_MACH_LPC3XXX
1964+# ifdef machine_arch_type
1965+# undef machine_arch_type
1966+# define machine_arch_type __machine_arch_type
1967+# else
1968+# define machine_arch_type MACH_TYPE_LPC3XXX
1969+# endif
1970+# define machine_is_lpc3xxx() (machine_arch_type == MACH_TYPE_LPC3XXX)
1971+#else
1972+# define machine_is_lpc3xxx() (0)
1973+#endif
1974+
1975+#ifdef CONFIG_MACH_PUPPETEER
1976+# ifdef machine_arch_type
1977+# undef machine_arch_type
1978+# define machine_arch_type __machine_arch_type
1979+# else
1980+# define machine_arch_type MACH_TYPE_PUPPETEER
1981+# endif
1982+# define machine_is_puppeteer() (machine_arch_type == MACH_TYPE_PUPPETEER)
1983+#else
1984+# define machine_is_puppeteer() (0)
1985+#endif
1986+
1987+#ifdef CONFIG_MACH_MACH_VADATECH
1988+# ifdef machine_arch_type
1989+# undef machine_arch_type
1990+# define machine_arch_type __machine_arch_type
1991+# else
1992+# define machine_arch_type MACH_TYPE_MACH_VADATECH
1993+# endif
1994+# define machine_is_vt001() (machine_arch_type == MACH_TYPE_MACH_VADATECH)
1995+#else
1996+# define machine_is_vt001() (0)
1997+#endif
1998+
1999+#ifdef CONFIG_MACH_E570
2000+# ifdef machine_arch_type
2001+# undef machine_arch_type
2002+# define machine_arch_type __machine_arch_type
2003+# else
2004+# define machine_arch_type MACH_TYPE_E570
2005+# endif
2006+# define machine_is_e570() (machine_arch_type == MACH_TYPE_E570)
2007+#else
2008+# define machine_is_e570() (0)
2009+#endif
2010+
2011+#ifdef CONFIG_MACH_X50
2012+# ifdef machine_arch_type
2013+# undef machine_arch_type
2014+# define machine_arch_type __machine_arch_type
2015+# else
2016+# define machine_arch_type MACH_TYPE_X50
2017+# endif
2018+# define machine_is_x50() (machine_arch_type == MACH_TYPE_X50)
2019+#else
2020+# define machine_is_x50() (0)
2021+#endif
2022+
2023+#ifdef CONFIG_MACH_RECON
2024+# ifdef machine_arch_type
2025+# undef machine_arch_type
2026+# define machine_arch_type __machine_arch_type
2027+# else
2028+# define machine_arch_type MACH_TYPE_RECON
2029+# endif
2030+# define machine_is_recon() (machine_arch_type == MACH_TYPE_RECON)
2031+#else
2032+# define machine_is_recon() (0)
2033+#endif
2034+
2035+#ifdef CONFIG_MACH_XBOARDGP8
2036+# ifdef machine_arch_type
2037+# undef machine_arch_type
2038+# define machine_arch_type __machine_arch_type
2039+# else
2040+# define machine_arch_type MACH_TYPE_XBOARDGP8
2041+# endif
2042+# define machine_is_xboardgp8() (machine_arch_type == MACH_TYPE_XBOARDGP8)
2043+#else
2044+# define machine_is_xboardgp8() (0)
2045+#endif
2046+
2047+#ifdef CONFIG_MACH_FPIC2
2048+# ifdef machine_arch_type
2049+# undef machine_arch_type
2050+# define machine_arch_type __machine_arch_type
2051+# else
2052+# define machine_arch_type MACH_TYPE_FPIC2
2053+# endif
2054+# define machine_is_fpic2() (machine_arch_type == MACH_TYPE_FPIC2)
2055+#else
2056+# define machine_is_fpic2() (0)
2057+#endif
2058+
2059+#ifdef CONFIG_MACH_AKITA
2060+# ifdef machine_arch_type
2061+# undef machine_arch_type
2062+# define machine_arch_type __machine_arch_type
2063+# else
2064+# define machine_arch_type MACH_TYPE_AKITA
2065+# endif
2066+# define machine_is_akita() (machine_arch_type == MACH_TYPE_AKITA)
2067+#else
2068+# define machine_is_akita() (0)
2069+#endif
2070+
2071+#ifdef CONFIG_MACH_A81
2072+# ifdef machine_arch_type
2073+# undef machine_arch_type
2074+# define machine_arch_type __machine_arch_type
2075+# else
2076+# define machine_arch_type MACH_TYPE_A81
2077+# endif
2078+# define machine_is_a81() (machine_arch_type == MACH_TYPE_A81)
2079+#else
2080+# define machine_is_a81() (0)
2081+#endif
2082+
2083+#ifdef CONFIG_MACH_SVM_SC25X
2084+# ifdef machine_arch_type
2085+# undef machine_arch_type
2086+# define machine_arch_type __machine_arch_type
2087+# else
2088+# define machine_arch_type MACH_TYPE_SVM_SC25X
2089+# endif
2090+# define machine_is_svm_sc25x() (machine_arch_type == MACH_TYPE_SVM_SC25X)
2091+#else
2092+# define machine_is_svm_sc25x() (0)
2093+#endif
2094+
2095+#ifdef CONFIG_MACH_VADATECH020
2096+# ifdef machine_arch_type
2097+# undef machine_arch_type
2098+# define machine_arch_type __machine_arch_type
2099+# else
2100+# define machine_arch_type MACH_TYPE_VADATECH020
2101+# endif
2102+# define machine_is_vt020() (machine_arch_type == MACH_TYPE_VADATECH020)
2103+#else
2104+# define machine_is_vt020() (0)
2105+#endif
2106+
2107+#ifdef CONFIG_MACH_TLI
2108+# ifdef machine_arch_type
2109+# undef machine_arch_type
2110+# define machine_arch_type __machine_arch_type
2111+# else
2112+# define machine_arch_type MACH_TYPE_TLI
2113+# endif
2114+# define machine_is_tli() (machine_arch_type == MACH_TYPE_TLI)
2115+#else
2116+# define machine_is_tli() (0)
2117+#endif
2118+
2119+#ifdef CONFIG_MACH_EDB9315LC
2120+# ifdef machine_arch_type
2121+# undef machine_arch_type
2122+# define machine_arch_type __machine_arch_type
2123+# else
2124+# define machine_arch_type MACH_TYPE_EDB9315LC
2125+# endif
2126+# define machine_is_edb9315lc() (machine_arch_type == MACH_TYPE_EDB9315LC)
2127+#else
2128+# define machine_is_edb9315lc() (0)
2129+#endif
2130+
2131+#ifdef CONFIG_MACH_PASSEC
2132+# ifdef machine_arch_type
2133+# undef machine_arch_type
2134+# define machine_arch_type __machine_arch_type
2135+# else
2136+# define machine_arch_type MACH_TYPE_PASSEC
2137+# endif
2138+# define machine_is_passec() (machine_arch_type == MACH_TYPE_PASSEC)
2139+#else
2140+# define machine_is_passec() (0)
2141+#endif
2142+
2143+#ifdef CONFIG_MACH_DS_TIGER
2144+# ifdef machine_arch_type
2145+# undef machine_arch_type
2146+# define machine_arch_type __machine_arch_type
2147+# else
2148+# define machine_arch_type MACH_TYPE_DS_TIGER
2149+# endif
2150+# define machine_is_ds_tiger() (machine_arch_type == MACH_TYPE_DS_TIGER)
2151+#else
2152+# define machine_is_ds_tiger() (0)
2153+#endif
2154+
2155+#ifdef CONFIG_MACH_E310
2156+# ifdef machine_arch_type
2157+# undef machine_arch_type
2158+# define machine_arch_type __machine_arch_type
2159+# else
2160+# define machine_arch_type MACH_TYPE_E310
2161+# endif
2162+# define machine_is_e310() (machine_arch_type == MACH_TYPE_E310)
2163+#else
2164+# define machine_is_e310() (0)
2165+#endif
2166+
2167+#ifdef CONFIG_MACH_E330
2168+# ifdef machine_arch_type
2169+# undef machine_arch_type
2170+# define machine_arch_type __machine_arch_type
2171+# else
2172+# define machine_arch_type MACH_TYPE_E330
2173+# endif
2174+# define machine_is_e330() (machine_arch_type == MACH_TYPE_E330)
2175+#else
2176+# define machine_is_e330() (0)
2177+#endif
2178+
2179+#ifdef CONFIG_MACH_RT3000
2180+# ifdef machine_arch_type
2181+# undef machine_arch_type
2182+# define machine_arch_type __machine_arch_type
2183+# else
2184+# define machine_arch_type MACH_TYPE_RT3000
2185+# endif
2186+# define machine_is_rt3000() (machine_arch_type == MACH_TYPE_RT3000)
2187+#else
2188+# define machine_is_rt3000() (0)
2189+#endif
2190+
2191+#ifdef CONFIG_MACH_NOKIA770
2192+# ifdef machine_arch_type
2193+# undef machine_arch_type
2194+# define machine_arch_type __machine_arch_type
2195+# else
2196+# define machine_arch_type MACH_TYPE_NOKIA770
2197+# endif
2198+# define machine_is_nokia770() (machine_arch_type == MACH_TYPE_NOKIA770)
2199+#else
2200+# define machine_is_nokia770() (0)
2201+#endif
2202+
2203+#ifdef CONFIG_MACH_PNX0106
2204+# ifdef machine_arch_type
2205+# undef machine_arch_type
2206+# define machine_arch_type __machine_arch_type
2207+# else
2208+# define machine_arch_type MACH_TYPE_PNX0106
2209+# endif
2210+# define machine_is_pnx0106() (machine_arch_type == MACH_TYPE_PNX0106)
2211+#else
2212+# define machine_is_pnx0106() (0)
2213+#endif
2214+
2215+#ifdef CONFIG_MACH_HX21XX
2216+# ifdef machine_arch_type
2217+# undef machine_arch_type
2218+# define machine_arch_type __machine_arch_type
2219+# else
2220+# define machine_arch_type MACH_TYPE_HX21XX
2221+# endif
2222+# define machine_is_hx21xx() (machine_arch_type == MACH_TYPE_HX21XX)
2223+#else
2224+# define machine_is_hx21xx() (0)
2225+#endif
2226+
2227+#ifdef CONFIG_MACH_FARADAY
2228+# ifdef machine_arch_type
2229+# undef machine_arch_type
2230+# define machine_arch_type __machine_arch_type
2231+# else
2232+# define machine_arch_type MACH_TYPE_FARADAY
2233+# endif
2234+# define machine_is_faraday() (machine_arch_type == MACH_TYPE_FARADAY)
2235+#else
2236+# define machine_is_faraday() (0)
2237+#endif
2238+
2239+#ifdef CONFIG_MACH_SBC9312
2240+# ifdef machine_arch_type
2241+# undef machine_arch_type
2242+# define machine_arch_type __machine_arch_type
2243+# else
2244+# define machine_arch_type MACH_TYPE_SBC9312
2245+# endif
2246+# define machine_is_sbc9312() (machine_arch_type == MACH_TYPE_SBC9312)
2247+#else
2248+# define machine_is_sbc9312() (0)
2249+#endif
2250+
2251+#ifdef CONFIG_MACH_BATMAN
2252+# ifdef machine_arch_type
2253+# undef machine_arch_type
2254+# define machine_arch_type __machine_arch_type
2255+# else
2256+# define machine_arch_type MACH_TYPE_BATMAN
2257+# endif
2258+# define machine_is_batman() (machine_arch_type == MACH_TYPE_BATMAN)
2259+#else
2260+# define machine_is_batman() (0)
2261+#endif
2262+
2263+#ifdef CONFIG_MACH_JPD201
2264+# ifdef machine_arch_type
2265+# undef machine_arch_type
2266+# define machine_arch_type __machine_arch_type
2267+# else
2268+# define machine_arch_type MACH_TYPE_JPD201
2269+# endif
2270+# define machine_is_jpd201() (machine_arch_type == MACH_TYPE_JPD201)
2271+#else
2272+# define machine_is_jpd201() (0)
2273+#endif
2274+
2275+#ifdef CONFIG_MACH_MIPSA
2276+# ifdef machine_arch_type
2277+# undef machine_arch_type
2278+# define machine_arch_type __machine_arch_type
2279+# else
2280+# define machine_arch_type MACH_TYPE_MIPSA
2281+# endif
2282+# define machine_is_mipsa() (machine_arch_type == MACH_TYPE_MIPSA)
2283+#else
2284+# define machine_is_mipsa() (0)
2285+#endif
2286+
2287+#ifdef CONFIG_MACH_KACOM
2288+# ifdef machine_arch_type
2289+# undef machine_arch_type
2290+# define machine_arch_type __machine_arch_type
2291+# else
2292+# define machine_arch_type MACH_TYPE_KACOM
2293+# endif
2294+# define machine_is_kacom() (machine_arch_type == MACH_TYPE_KACOM)
2295+#else
2296+# define machine_is_kacom() (0)
2297+#endif
2298+
2299+#ifdef CONFIG_MACH_SWARCOCPU
2300+# ifdef machine_arch_type
2301+# undef machine_arch_type
2302+# define machine_arch_type __machine_arch_type
2303+# else
2304+# define machine_arch_type MACH_TYPE_SWARCOCPU
2305+# endif
2306+# define machine_is_swarcocpu() (machine_arch_type == MACH_TYPE_SWARCOCPU)
2307+#else
2308+# define machine_is_swarcocpu() (0)
2309+#endif
2310+
2311+#ifdef CONFIG_MACH_SWARCODSL
2312+# ifdef machine_arch_type
2313+# undef machine_arch_type
2314+# define machine_arch_type __machine_arch_type
2315+# else
2316+# define machine_arch_type MACH_TYPE_SWARCODSL
2317+# endif
2318+# define machine_is_swarcodsl() (machine_arch_type == MACH_TYPE_SWARCODSL)
2319+#else
2320+# define machine_is_swarcodsl() (0)
2321+#endif
2322+
2323+#ifdef CONFIG_MACH_BLUEANGEL
2324+# ifdef machine_arch_type
2325+# undef machine_arch_type
2326+# define machine_arch_type __machine_arch_type
2327+# else
2328+# define machine_arch_type MACH_TYPE_BLUEANGEL
2329+# endif
2330+# define machine_is_blueangel() (machine_arch_type == MACH_TYPE_BLUEANGEL)
2331+#else
2332+# define machine_is_blueangel() (0)
2333+#endif
2334+
2335+#ifdef CONFIG_MACH_HAIRYGRAMA
2336+# ifdef machine_arch_type
2337+# undef machine_arch_type
2338+# define machine_arch_type __machine_arch_type
2339+# else
2340+# define machine_arch_type MACH_TYPE_HAIRYGRAMA
2341+# endif
2342+# define machine_is_hairygrama() (machine_arch_type == MACH_TYPE_HAIRYGRAMA)
2343+#else
2344+# define machine_is_hairygrama() (0)
2345+#endif
2346+
2347+#ifdef CONFIG_MACH_BANFF
2348+# ifdef machine_arch_type
2349+# undef machine_arch_type
2350+# define machine_arch_type __machine_arch_type
2351+# else
2352+# define machine_arch_type MACH_TYPE_BANFF
2353+# endif
2354+# define machine_is_banff() (machine_arch_type == MACH_TYPE_BANFF)
2355+#else
2356+# define machine_is_banff() (0)
2357+#endif
2358+
2359+#ifdef CONFIG_MACH_CARMEVA
2360+# ifdef machine_arch_type
2361+# undef machine_arch_type
2362+# define machine_arch_type __machine_arch_type
2363+# else
2364+# define machine_arch_type MACH_TYPE_CARMEVA
2365+# endif
2366+# define machine_is_carmeva() (machine_arch_type == MACH_TYPE_CARMEVA)
2367+#else
2368+# define machine_is_carmeva() (0)
2369+#endif
2370+
2371+#ifdef CONFIG_MACH_SAM255
2372+# ifdef machine_arch_type
2373+# undef machine_arch_type
2374+# define machine_arch_type __machine_arch_type
2375+# else
2376+# define machine_arch_type MACH_TYPE_SAM255
2377+# endif
2378+# define machine_is_sam255() (machine_arch_type == MACH_TYPE_SAM255)
2379+#else
2380+# define machine_is_sam255() (0)
2381+#endif
2382+
2383+#ifdef CONFIG_MACH_PPM10
2384+# ifdef machine_arch_type
2385+# undef machine_arch_type
2386+# define machine_arch_type __machine_arch_type
2387+# else
2388+# define machine_arch_type MACH_TYPE_PPM10
2389+# endif
2390+# define machine_is_ppm10() (machine_arch_type == MACH_TYPE_PPM10)
2391+#else
2392+# define machine_is_ppm10() (0)
2393+#endif
2394+
2395+#ifdef CONFIG_MACH_EDB9315A
2396+# ifdef machine_arch_type
2397+# undef machine_arch_type
2398+# define machine_arch_type __machine_arch_type
2399+# else
2400+# define machine_arch_type MACH_TYPE_EDB9315A
2401+# endif
2402+# define machine_is_edb9315a() (machine_arch_type == MACH_TYPE_EDB9315A)
2403+#else
2404+# define machine_is_edb9315a() (0)
2405+#endif
2406+
2407+#ifdef CONFIG_MACH_SUNSET
2408+# ifdef machine_arch_type
2409+# undef machine_arch_type
2410+# define machine_arch_type __machine_arch_type
2411+# else
2412+# define machine_arch_type MACH_TYPE_SUNSET
2413+# endif
2414+# define machine_is_sunset() (machine_arch_type == MACH_TYPE_SUNSET)
2415+#else
2416+# define machine_is_sunset() (0)
2417+#endif
2418+
2419+#ifdef CONFIG_MACH_STARGATE2
2420+# ifdef machine_arch_type
2421+# undef machine_arch_type
2422+# define machine_arch_type __machine_arch_type
2423+# else
2424+# define machine_arch_type MACH_TYPE_STARGATE2
2425+# endif
2426+# define machine_is_stargate2() (machine_arch_type == MACH_TYPE_STARGATE2)
2427+#else
2428+# define machine_is_stargate2() (0)
2429+#endif
2430+
2431+#ifdef CONFIG_MACH_INTELMOTE2
2432+# ifdef machine_arch_type
2433+# undef machine_arch_type
2434+# define machine_arch_type __machine_arch_type
2435+# else
2436+# define machine_arch_type MACH_TYPE_INTELMOTE2
2437+# endif
2438+# define machine_is_intelmote2() (machine_arch_type == MACH_TYPE_INTELMOTE2)
2439+#else
2440+# define machine_is_intelmote2() (0)
2441+#endif
2442+
2443+#ifdef CONFIG_MACH_TRIZEPS4
2444+# ifdef machine_arch_type
2445+# undef machine_arch_type
2446+# define machine_arch_type __machine_arch_type
2447+# else
2448+# define machine_arch_type MACH_TYPE_TRIZEPS4
2449+# endif
2450+# define machine_is_trizeps4() (machine_arch_type == MACH_TYPE_TRIZEPS4)
2451+#else
2452+# define machine_is_trizeps4() (0)
2453+#endif
2454+
2455+#ifdef CONFIG_MACH_MAINSTONE2
2456+# ifdef machine_arch_type
2457+# undef machine_arch_type
2458+# define machine_arch_type __machine_arch_type
2459+# else
2460+# define machine_arch_type MACH_TYPE_MAINSTONE2
2461+# endif
2462+# define machine_is_mainstone2() (machine_arch_type == MACH_TYPE_MAINSTONE2)
2463+#else
2464+# define machine_is_mainstone2() (0)
2465+#endif
2466+
2467+#ifdef CONFIG_MACH_EZ_IXP42X
2468+# ifdef machine_arch_type
2469+# undef machine_arch_type
2470+# define machine_arch_type __machine_arch_type
2471+# else
2472+# define machine_arch_type MACH_TYPE_EZ_IXP42X
2473+# endif
2474+# define machine_is_ez_ixp42x() (machine_arch_type == MACH_TYPE_EZ_IXP42X)
2475+#else
2476+# define machine_is_ez_ixp42x() (0)
2477+#endif
2478+
2479+#ifdef CONFIG_MACH_TAPWAVE_ZODIAC
2480+# ifdef machine_arch_type
2481+# undef machine_arch_type
2482+# define machine_arch_type __machine_arch_type
2483+# else
2484+# define machine_arch_type MACH_TYPE_TAPWAVE_ZODIAC
2485+# endif
2486+# define machine_is_tapwave_zodiac() (machine_arch_type == MACH_TYPE_TAPWAVE_ZODIAC)
2487+#else
2488+# define machine_is_tapwave_zodiac() (0)
2489+#endif
2490+
2491+#ifdef CONFIG_MACH_UNIVERSALMETER
2492+# ifdef machine_arch_type
2493+# undef machine_arch_type
2494+# define machine_arch_type __machine_arch_type
2495+# else
2496+# define machine_arch_type MACH_TYPE_UNIVERSALMETER
2497+# endif
2498+# define machine_is_universalmeter() (machine_arch_type == MACH_TYPE_UNIVERSALMETER)
2499+#else
2500+# define machine_is_universalmeter() (0)
2501+#endif
2502+
2503+#ifdef CONFIG_MACH_HICOARM9
2504+# ifdef machine_arch_type
2505+# undef machine_arch_type
2506+# define machine_arch_type __machine_arch_type
2507+# else
2508+# define machine_arch_type MACH_TYPE_HICOARM9
2509+# endif
2510+# define machine_is_hicoarm9() (machine_arch_type == MACH_TYPE_HICOARM9)
2511+#else
2512+# define machine_is_hicoarm9() (0)
2513+#endif
2514+
2515+#ifdef CONFIG_MACH_PNX4008
2516+# ifdef machine_arch_type
2517+# undef machine_arch_type
2518+# define machine_arch_type __machine_arch_type
2519+# else
2520+# define machine_arch_type MACH_TYPE_PNX4008
2521+# endif
2522+# define machine_is_pnx4008() (machine_arch_type == MACH_TYPE_PNX4008)
2523+#else
2524+# define machine_is_pnx4008() (0)
2525+#endif
2526+
2527+#ifdef CONFIG_MACH_KWS6000
2528+# ifdef machine_arch_type
2529+# undef machine_arch_type
2530+# define machine_arch_type __machine_arch_type
2531+# else
2532+# define machine_arch_type MACH_TYPE_KWS6000
2533+# endif
2534+# define machine_is_kws6000() (machine_arch_type == MACH_TYPE_KWS6000)
2535+#else
2536+# define machine_is_kws6000() (0)
2537+#endif
2538+
2539+#ifdef CONFIG_MACH_PORTUX920T
2540+# ifdef machine_arch_type
2541+# undef machine_arch_type
2542+# define machine_arch_type __machine_arch_type
2543+# else
2544+# define machine_arch_type MACH_TYPE_PORTUX920T
2545+# endif
2546+# define machine_is_portux920t() (machine_arch_type == MACH_TYPE_PORTUX920T)
2547+#else
2548+# define machine_is_portux920t() (0)
2549+#endif
2550+
2551+#ifdef CONFIG_MACH_EZ_X5
2552+# ifdef machine_arch_type
2553+# undef machine_arch_type
2554+# define machine_arch_type __machine_arch_type
2555+# else
2556+# define machine_arch_type MACH_TYPE_EZ_X5
2557+# endif
2558+# define machine_is_ez_x5() (machine_arch_type == MACH_TYPE_EZ_X5)
2559+#else
2560+# define machine_is_ez_x5() (0)
2561+#endif
2562+
2563+#ifdef CONFIG_MACH_OMAP_RUDOLPH
2564+# ifdef machine_arch_type
2565+# undef machine_arch_type
2566+# define machine_arch_type __machine_arch_type
2567+# else
2568+# define machine_arch_type MACH_TYPE_OMAP_RUDOLPH
2569+# endif
2570+# define machine_is_omap_rudolph() (machine_arch_type == MACH_TYPE_OMAP_RUDOLPH)
2571+#else
2572+# define machine_is_omap_rudolph() (0)
2573+#endif
2574+
2575+#ifdef CONFIG_MACH_CPUAT91
2576+# ifdef machine_arch_type
2577+# undef machine_arch_type
2578+# define machine_arch_type __machine_arch_type
2579+# else
2580+# define machine_arch_type MACH_TYPE_CPUAT91
2581+# endif
2582+# define machine_is_cpuat91() (machine_arch_type == MACH_TYPE_CPUAT91)
2583+#else
2584+# define machine_is_cpuat91() (0)
2585+#endif
2586+
2587+#ifdef CONFIG_MACH_REA9200
2588+# ifdef machine_arch_type
2589+# undef machine_arch_type
2590+# define machine_arch_type __machine_arch_type
2591+# else
2592+# define machine_arch_type MACH_TYPE_REA9200
2593+# endif
2594+# define machine_is_rea9200() (machine_arch_type == MACH_TYPE_REA9200)
2595+#else
2596+# define machine_is_rea9200() (0)
2597+#endif
2598+
2599+#ifdef CONFIG_MACH_ACTS_PUNE_SA1110
2600+# ifdef machine_arch_type
2601+# undef machine_arch_type
2602+# define machine_arch_type __machine_arch_type
2603+# else
2604+# define machine_arch_type MACH_TYPE_ACTS_PUNE_SA1110
2605+# endif
2606+# define machine_is_acts_pune_sa1110() (machine_arch_type == MACH_TYPE_ACTS_PUNE_SA1110)
2607+#else
2608+# define machine_is_acts_pune_sa1110() (0)
2609+#endif
2610+
2611+#ifdef CONFIG_MACH_IXP425
2612+# ifdef machine_arch_type
2613+# undef machine_arch_type
2614+# define machine_arch_type __machine_arch_type
2615+# else
2616+# define machine_arch_type MACH_TYPE_IXP425
2617+# endif
2618+# define machine_is_ixp425() (machine_arch_type == MACH_TYPE_IXP425)
2619+#else
2620+# define machine_is_ixp425() (0)
2621+#endif
2622+
2623+#ifdef CONFIG_MACH_I30030ADS
2624+# ifdef machine_arch_type
2625+# undef machine_arch_type
2626+# define machine_arch_type __machine_arch_type
2627+# else
2628+# define machine_arch_type MACH_TYPE_I30030ADS
2629+# endif
2630+# define machine_is_i30030ads() (machine_arch_type == MACH_TYPE_I30030ADS)
2631+#else
2632+# define machine_is_i30030ads() (0)
2633+#endif
2634+
2635+#ifdef CONFIG_MACH_PERCH
2636+# ifdef machine_arch_type
2637+# undef machine_arch_type
2638+# define machine_arch_type __machine_arch_type
2639+# else
2640+# define machine_arch_type MACH_TYPE_PERCH
2641+# endif
2642+# define machine_is_perch() (machine_arch_type == MACH_TYPE_PERCH)
2643+#else
2644+# define machine_is_perch() (0)
2645+#endif
2646+
2647+#ifdef CONFIG_MACH_EIS05R1
2648+# ifdef machine_arch_type
2649+# undef machine_arch_type
2650+# define machine_arch_type __machine_arch_type
2651+# else
2652+# define machine_arch_type MACH_TYPE_EIS05R1
2653+# endif
2654+# define machine_is_eis05r1() (machine_arch_type == MACH_TYPE_EIS05R1)
2655+#else
2656+# define machine_is_eis05r1() (0)
2657+#endif
2658+
2659+#ifdef CONFIG_MACH_PEPPERPAD
2660+# ifdef machine_arch_type
2661+# undef machine_arch_type
2662+# define machine_arch_type __machine_arch_type
2663+# else
2664+# define machine_arch_type MACH_TYPE_PEPPERPAD
2665+# endif
2666+# define machine_is_pepperpad() (machine_arch_type == MACH_TYPE_PEPPERPAD)
2667+#else
2668+# define machine_is_pepperpad() (0)
2669+#endif
2670+
2671+#ifdef CONFIG_MACH_SB3010
2672+# ifdef machine_arch_type
2673+# undef machine_arch_type
2674+# define machine_arch_type __machine_arch_type
2675+# else
2676+# define machine_arch_type MACH_TYPE_SB3010
2677+# endif
2678+# define machine_is_sb3010() (machine_arch_type == MACH_TYPE_SB3010)
2679+#else
2680+# define machine_is_sb3010() (0)
2681+#endif
2682+
2683+#ifdef CONFIG_MACH_RM9200
2684+# ifdef machine_arch_type
2685+# undef machine_arch_type
2686+# define machine_arch_type __machine_arch_type
2687+# else
2688+# define machine_arch_type MACH_TYPE_RM9200
2689+# endif
2690+# define machine_is_rm9200() (machine_arch_type == MACH_TYPE_RM9200)
2691+#else
2692+# define machine_is_rm9200() (0)
2693+#endif
2694+
2695+#ifdef CONFIG_MACH_DMA03
2696+# ifdef machine_arch_type
2697+# undef machine_arch_type
2698+# define machine_arch_type __machine_arch_type
2699+# else
2700+# define machine_arch_type MACH_TYPE_DMA03
2701+# endif
2702+# define machine_is_dma03() (machine_arch_type == MACH_TYPE_DMA03)
2703+#else
2704+# define machine_is_dma03() (0)
2705+#endif
2706+
2707+#ifdef CONFIG_MACH_ROAD_S101
2708+# ifdef machine_arch_type
2709+# undef machine_arch_type
2710+# define machine_arch_type __machine_arch_type
2711+# else
2712+# define machine_arch_type MACH_TYPE_ROAD_S101
2713+# endif
2714+# define machine_is_road_s101() (machine_arch_type == MACH_TYPE_ROAD_S101)
2715+#else
2716+# define machine_is_road_s101() (0)
2717+#endif
2718+
2719+#ifdef CONFIG_MACH_IQ_NEXTGEN_A
2720+# ifdef machine_arch_type
2721+# undef machine_arch_type
2722+# define machine_arch_type __machine_arch_type
2723+# else
2724+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_A
2725+# endif
2726+# define machine_is_iq_nextgen_a() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_A)
2727+#else
2728+# define machine_is_iq_nextgen_a() (0)
2729+#endif
2730+
2731+#ifdef CONFIG_MACH_IQ_NEXTGEN_B
2732+# ifdef machine_arch_type
2733+# undef machine_arch_type
2734+# define machine_arch_type __machine_arch_type
2735+# else
2736+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_B
2737+# endif
2738+# define machine_is_iq_nextgen_b() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_B)
2739+#else
2740+# define machine_is_iq_nextgen_b() (0)
2741+#endif
2742+
2743+#ifdef CONFIG_MACH_IQ_NEXTGEN_C
2744+# ifdef machine_arch_type
2745+# undef machine_arch_type
2746+# define machine_arch_type __machine_arch_type
2747+# else
2748+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_C
2749+# endif
2750+# define machine_is_iq_nextgen_c() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_C)
2751+#else
2752+# define machine_is_iq_nextgen_c() (0)
2753+#endif
2754+
2755+#ifdef CONFIG_MACH_IQ_NEXTGEN_D
2756+# ifdef machine_arch_type
2757+# undef machine_arch_type
2758+# define machine_arch_type __machine_arch_type
2759+# else
2760+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_D
2761+# endif
2762+# define machine_is_iq_nextgen_d() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_D)
2763+#else
2764+# define machine_is_iq_nextgen_d() (0)
2765+#endif
2766+
2767+#ifdef CONFIG_MACH_IQ_NEXTGEN_E
2768+# ifdef machine_arch_type
2769+# undef machine_arch_type
2770+# define machine_arch_type __machine_arch_type
2771+# else
2772+# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_E
2773+# endif
2774+# define machine_is_iq_nextgen_e() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_E)
2775+#else
2776+# define machine_is_iq_nextgen_e() (0)
2777+#endif
2778+
2779+#ifdef CONFIG_MACH_MALLOW_AT91
2780+# ifdef machine_arch_type
2781+# undef machine_arch_type
2782+# define machine_arch_type __machine_arch_type
2783+# else
2784+# define machine_arch_type MACH_TYPE_MALLOW_AT91
2785+# endif
2786+# define machine_is_mallow_at91() (machine_arch_type == MACH_TYPE_MALLOW_AT91)
2787+#else
2788+# define machine_is_mallow_at91() (0)
2789+#endif
2790+
2791+#ifdef CONFIG_MACH_CYBERTRACKER_I
2792+# ifdef machine_arch_type
2793+# undef machine_arch_type
2794+# define machine_arch_type __machine_arch_type
2795+# else
2796+# define machine_arch_type MACH_TYPE_CYBERTRACKER_I
2797+# endif
2798+# define machine_is_cybertracker_i() (machine_arch_type == MACH_TYPE_CYBERTRACKER_I)
2799+#else
2800+# define machine_is_cybertracker_i() (0)
2801+#endif
2802+
2803+#ifdef CONFIG_MACH_GESBC931X
2804+# ifdef machine_arch_type
2805+# undef machine_arch_type
2806+# define machine_arch_type __machine_arch_type
2807+# else
2808+# define machine_arch_type MACH_TYPE_GESBC931X
2809+# endif
2810+# define machine_is_gesbc931x() (machine_arch_type == MACH_TYPE_GESBC931X)
2811+#else
2812+# define machine_is_gesbc931x() (0)
2813+#endif
2814+
2815+#ifdef CONFIG_MACH_CENTIPAD
2816+# ifdef machine_arch_type
2817+# undef machine_arch_type
2818+# define machine_arch_type __machine_arch_type
2819+# else
2820+# define machine_arch_type MACH_TYPE_CENTIPAD
2821+# endif
2822+# define machine_is_centipad() (machine_arch_type == MACH_TYPE_CENTIPAD)
2823+#else
2824+# define machine_is_centipad() (0)
2825+#endif
2826+
2827+#ifdef CONFIG_MACH_ARMSOC
2828+# ifdef machine_arch_type
2829+# undef machine_arch_type
2830+# define machine_arch_type __machine_arch_type
2831+# else
2832+# define machine_arch_type MACH_TYPE_ARMSOC
2833+# endif
2834+# define machine_is_armsoc() (machine_arch_type == MACH_TYPE_ARMSOC)
2835+#else
2836+# define machine_is_armsoc() (0)
2837+#endif
2838+
2839+#ifdef CONFIG_MACH_SE4200
2840+# ifdef machine_arch_type
2841+# undef machine_arch_type
2842+# define machine_arch_type __machine_arch_type
2843+# else
2844+# define machine_arch_type MACH_TYPE_SE4200
2845+# endif
2846+# define machine_is_se4200() (machine_arch_type == MACH_TYPE_SE4200)
2847+#else
2848+# define machine_is_se4200() (0)
2849+#endif
2850+
2851+#ifdef CONFIG_MACH_EMS197A
2852+# ifdef machine_arch_type
2853+# undef machine_arch_type
2854+# define machine_arch_type __machine_arch_type
2855+# else
2856+# define machine_arch_type MACH_TYPE_EMS197A
2857+# endif
2858+# define machine_is_ems197a() (machine_arch_type == MACH_TYPE_EMS197A)
2859+#else
2860+# define machine_is_ems197a() (0)
2861+#endif
2862+
2863+#ifdef CONFIG_MACH_MICRO9
2864+# ifdef machine_arch_type
2865+# undef machine_arch_type
2866+# define machine_arch_type __machine_arch_type
2867+# else
2868+# define machine_arch_type MACH_TYPE_MICRO9
2869+# endif
2870+# define machine_is_micro9() (machine_arch_type == MACH_TYPE_MICRO9)
2871+#else
2872+# define machine_is_micro9() (0)
2873+#endif
2874+
2875+#ifdef CONFIG_MACH_MICRO9L
2876+# ifdef machine_arch_type
2877+# undef machine_arch_type
2878+# define machine_arch_type __machine_arch_type
2879+# else
2880+# define machine_arch_type MACH_TYPE_MICRO9L
2881+# endif
2882+# define machine_is_micro9l() (machine_arch_type == MACH_TYPE_MICRO9L)
2883+#else
2884+# define machine_is_micro9l() (0)
2885+#endif
2886+
2887+#ifdef CONFIG_MACH_UC5471DSP
2888+# ifdef machine_arch_type
2889+# undef machine_arch_type
2890+# define machine_arch_type __machine_arch_type
2891+# else
2892+# define machine_arch_type MACH_TYPE_UC5471DSP
2893+# endif
2894+# define machine_is_uc5471dsp() (machine_arch_type == MACH_TYPE_UC5471DSP)
2895+#else
2896+# define machine_is_uc5471dsp() (0)
2897+#endif
2898+
2899+#ifdef CONFIG_MACH_SJ5471ENG
2900+# ifdef machine_arch_type
2901+# undef machine_arch_type
2902+# define machine_arch_type __machine_arch_type
2903+# else
2904+# define machine_arch_type MACH_TYPE_SJ5471ENG
2905+# endif
2906+# define machine_is_sj5471eng() (machine_arch_type == MACH_TYPE_SJ5471ENG)
2907+#else
2908+# define machine_is_sj5471eng() (0)
2909+#endif
2910+
2911+#ifdef CONFIG_MACH_CMPXA26X
2912+# ifdef machine_arch_type
2913+# undef machine_arch_type
2914+# define machine_arch_type __machine_arch_type
2915+# else
2916+# define machine_arch_type MACH_TYPE_CMPXA26X
2917+# endif
2918+# define machine_is_none() (machine_arch_type == MACH_TYPE_CMPXA26X)
2919+#else
2920+# define machine_is_none() (0)
2921+#endif
2922+
2923+#ifdef CONFIG_MACH_NC
2924+# ifdef machine_arch_type
2925+# undef machine_arch_type
2926+# define machine_arch_type __machine_arch_type
2927+# else
2928+# define machine_arch_type MACH_TYPE_NC
2929+# endif
2930+# define machine_is_nc1() (machine_arch_type == MACH_TYPE_NC)
2931+#else
2932+# define machine_is_nc1() (0)
2933+#endif
2934+
2935+#ifdef CONFIG_MACH_OMAP_PALMTE
2936+# ifdef machine_arch_type
2937+# undef machine_arch_type
2938+# define machine_arch_type __machine_arch_type
2939+# else
2940+# define machine_arch_type MACH_TYPE_OMAP_PALMTE
2941+# endif
2942+# define machine_is_omap_palmte() (machine_arch_type == MACH_TYPE_OMAP_PALMTE)
2943+#else
2944+# define machine_is_omap_palmte() (0)
2945+#endif
2946+
2947+#ifdef CONFIG_MACH_AJAX52X
2948+# ifdef machine_arch_type
2949+# undef machine_arch_type
2950+# define machine_arch_type __machine_arch_type
2951+# else
2952+# define machine_arch_type MACH_TYPE_AJAX52X
2953+# endif
2954+# define machine_is_ajax52x() (machine_arch_type == MACH_TYPE_AJAX52X)
2955+#else
2956+# define machine_is_ajax52x() (0)
2957+#endif
2958+
2959+#ifdef CONFIG_MACH_SIRIUSTAR
2960+# ifdef machine_arch_type
2961+# undef machine_arch_type
2962+# define machine_arch_type __machine_arch_type
2963+# else
2964+# define machine_arch_type MACH_TYPE_SIRIUSTAR
2965+# endif
2966+# define machine_is_siriustar() (machine_arch_type == MACH_TYPE_SIRIUSTAR)
2967+#else
2968+# define machine_is_siriustar() (0)
2969+#endif
2970+
2971+#ifdef CONFIG_MACH_IODATA_HDLG
2972+# ifdef machine_arch_type
2973+# undef machine_arch_type
2974+# define machine_arch_type __machine_arch_type
2975+# else
2976+# define machine_arch_type MACH_TYPE_IODATA_HDLG
2977+# endif
2978+# define machine_is_iodata_hdlg() (machine_arch_type == MACH_TYPE_IODATA_HDLG)
2979+#else
2980+# define machine_is_iodata_hdlg() (0)
2981+#endif
2982+
2983+#ifdef CONFIG_MACH_AT91RM9200UTL
2984+# ifdef machine_arch_type
2985+# undef machine_arch_type
2986+# define machine_arch_type __machine_arch_type
2987+# else
2988+# define machine_arch_type MACH_TYPE_AT91RM9200UTL
2989+# endif
2990+# define machine_is_at91rm9200utl() (machine_arch_type == MACH_TYPE_AT91RM9200UTL)
2991+#else
2992+# define machine_is_at91rm9200utl() (0)
2993+#endif
2994+
2995+#ifdef CONFIG_MACH_BIOSAFE
2996+# ifdef machine_arch_type
2997+# undef machine_arch_type
2998+# define machine_arch_type __machine_arch_type
2999+# else
3000+# define machine_arch_type MACH_TYPE_BIOSAFE
3001+# endif
3002+# define machine_is_biosafe() (machine_arch_type == MACH_TYPE_BIOSAFE)
3003+#else
3004+# define machine_is_biosafe() (0)
3005+#endif
3006+
3007+#ifdef CONFIG_MACH_MP1000
3008+# ifdef machine_arch_type
3009+# undef machine_arch_type
3010+# define machine_arch_type __machine_arch_type
3011+# else
3012+# define machine_arch_type MACH_TYPE_MP1000
3013+# endif
3014+# define machine_is_mp1000() (machine_arch_type == MACH_TYPE_MP1000)
3015+#else
3016+# define machine_is_mp1000() (0)
3017+#endif
3018+
3019+#ifdef CONFIG_MACH_PARSY
3020+# ifdef machine_arch_type
3021+# undef machine_arch_type
3022+# define machine_arch_type __machine_arch_type
3023+# else
3024+# define machine_arch_type MACH_TYPE_PARSY
3025+# endif
3026+# define machine_is_parsy() (machine_arch_type == MACH_TYPE_PARSY)
3027+#else
3028+# define machine_is_parsy() (0)
3029+#endif
3030+
3031+#ifdef CONFIG_MACH_CCXP
3032+# ifdef machine_arch_type
3033+# undef machine_arch_type
3034+# define machine_arch_type __machine_arch_type
3035+# else
3036+# define machine_arch_type MACH_TYPE_CCXP
3037+# endif
3038+# define machine_is_ccxp270() (machine_arch_type == MACH_TYPE_CCXP)
3039+#else
3040+# define machine_is_ccxp270() (0)
3041+#endif
3042+
3043+#ifdef CONFIG_MACH_OMAP_GSAMPLE
3044+# ifdef machine_arch_type
3045+# undef machine_arch_type
3046+# define machine_arch_type __machine_arch_type
3047+# else
3048+# define machine_arch_type MACH_TYPE_OMAP_GSAMPLE
3049+# endif
3050+# define machine_is_omap_gsample() (machine_arch_type == MACH_TYPE_OMAP_GSAMPLE)
3051+#else
3052+# define machine_is_omap_gsample() (0)
3053+#endif
3054+
3055+#ifdef CONFIG_MACH_REALVIEW_EB
3056+# ifdef machine_arch_type
3057+# undef machine_arch_type
3058+# define machine_arch_type __machine_arch_type
3059+# else
3060+# define machine_arch_type MACH_TYPE_REALVIEW_EB
3061+# endif
3062+# define machine_is_realview_eb() (machine_arch_type == MACH_TYPE_REALVIEW_EB)
3063+#else
3064+# define machine_is_realview_eb() (0)
3065+#endif
3066+
3067+#ifdef CONFIG_MACH_SAMOA
3068+# ifdef machine_arch_type
3069+# undef machine_arch_type
3070+# define machine_arch_type __machine_arch_type
3071+# else
3072+# define machine_arch_type MACH_TYPE_SAMOA
3073+# endif
3074+# define machine_is_samoa() (machine_arch_type == MACH_TYPE_SAMOA)
3075+#else
3076+# define machine_is_samoa() (0)
3077+#endif
3078+
3079+#ifdef CONFIG_MACH_T3XSCALE
3080+# ifdef machine_arch_type
3081+# undef machine_arch_type
3082+# define machine_arch_type __machine_arch_type
3083+# else
3084+# define machine_arch_type MACH_TYPE_T3XSCALE
3085+# endif
3086+# define machine_is_t3xscale() (machine_arch_type == MACH_TYPE_T3XSCALE)
3087+#else
3088+# define machine_is_t3xscale() (0)
3089+#endif
3090+
3091+#ifdef CONFIG_MACH_I878
3092+# ifdef machine_arch_type
3093+# undef machine_arch_type
3094+# define machine_arch_type __machine_arch_type
3095+# else
3096+# define machine_arch_type MACH_TYPE_I878
3097+# endif
3098+# define machine_is_i878() (machine_arch_type == MACH_TYPE_I878)
3099+#else
3100+# define machine_is_i878() (0)
3101+#endif
3102+
3103+#ifdef CONFIG_MACH_BORZOI
3104+# ifdef machine_arch_type
3105+# undef machine_arch_type
3106+# define machine_arch_type __machine_arch_type
3107+# else
3108+# define machine_arch_type MACH_TYPE_BORZOI
3109+# endif
3110+# define machine_is_borzoi() (machine_arch_type == MACH_TYPE_BORZOI)
3111+#else
3112+# define machine_is_borzoi() (0)
3113+#endif
3114+
3115+#ifdef CONFIG_MACH_GECKO
3116+# ifdef machine_arch_type
3117+# undef machine_arch_type
3118+# define machine_arch_type __machine_arch_type
3119+# else
3120+# define machine_arch_type MACH_TYPE_GECKO
3121+# endif
3122+# define machine_is_gecko() (machine_arch_type == MACH_TYPE_GECKO)
3123+#else
3124+# define machine_is_gecko() (0)
3125+#endif
3126+
3127+#ifdef CONFIG_MACH_DS101
3128+# ifdef machine_arch_type
3129+# undef machine_arch_type
3130+# define machine_arch_type __machine_arch_type
3131+# else
3132+# define machine_arch_type MACH_TYPE_DS101
3133+# endif
3134+# define machine_is_ds101() (machine_arch_type == MACH_TYPE_DS101)
3135+#else
3136+# define machine_is_ds101() (0)
3137+#endif
3138+
3139+#ifdef CONFIG_MACH_OMAP_PALMTT2
3140+# ifdef machine_arch_type
3141+# undef machine_arch_type
3142+# define machine_arch_type __machine_arch_type
3143+# else
3144+# define machine_arch_type MACH_TYPE_OMAP_PALMTT2
3145+# endif
3146+# define machine_is_omap_palmtt2() (machine_arch_type == MACH_TYPE_OMAP_PALMTT2)
3147+#else
3148+# define machine_is_omap_palmtt2() (0)
3149+#endif
3150+
3151+#ifdef CONFIG_MACH_XSCALE_PALMLD
3152+# ifdef machine_arch_type
3153+# undef machine_arch_type
3154+# define machine_arch_type __machine_arch_type
3155+# else
3156+# define machine_arch_type MACH_TYPE_XSCALE_PALMLD
3157+# endif
3158+# define machine_is_xscale_palmld() (machine_arch_type == MACH_TYPE_XSCALE_PALMLD)
3159+#else
3160+# define machine_is_xscale_palmld() (0)
3161+#endif
3162+
3163+#ifdef CONFIG_MACH_CC9C
3164+# ifdef machine_arch_type
3165+# undef machine_arch_type
3166+# define machine_arch_type __machine_arch_type
3167+# else
3168+# define machine_arch_type MACH_TYPE_CC9C
3169+# endif
3170+# define machine_is_cc9c() (machine_arch_type == MACH_TYPE_CC9C)
3171+#else
3172+# define machine_is_cc9c() (0)
3173+#endif
3174+
3175+#ifdef CONFIG_MACH_SBC1670
3176+# ifdef machine_arch_type
3177+# undef machine_arch_type
3178+# define machine_arch_type __machine_arch_type
3179+# else
3180+# define machine_arch_type MACH_TYPE_SBC1670
3181+# endif
3182+# define machine_is_sbc1670() (machine_arch_type == MACH_TYPE_SBC1670)
3183+#else
3184+# define machine_is_sbc1670() (0)
3185+#endif
3186+
3187+#ifdef CONFIG_MACH_IXDP28X5
3188+# ifdef machine_arch_type
3189+# undef machine_arch_type
3190+# define machine_arch_type __machine_arch_type
3191+# else
3192+# define machine_arch_type MACH_TYPE_IXDP28X5
3193+# endif
3194+# define machine_is_ixdp28x5() (machine_arch_type == MACH_TYPE_IXDP28X5)
3195+#else
3196+# define machine_is_ixdp28x5() (0)
3197+#endif
3198+
3199+#ifdef CONFIG_MACH_OMAP_PALMTT
3200+# ifdef machine_arch_type
3201+# undef machine_arch_type
3202+# define machine_arch_type __machine_arch_type
3203+# else
3204+# define machine_arch_type MACH_TYPE_OMAP_PALMTT
3205+# endif
3206+# define machine_is_omap_palmtt() (machine_arch_type == MACH_TYPE_OMAP_PALMTT)
3207+#else
3208+# define machine_is_omap_palmtt() (0)
3209+#endif
3210+
3211+#ifdef CONFIG_MACH_ML696K
3212+# ifdef machine_arch_type
3213+# undef machine_arch_type
3214+# define machine_arch_type __machine_arch_type
3215+# else
3216+# define machine_arch_type MACH_TYPE_ML696K
3217+# endif
3218+# define machine_is_ml696k() (machine_arch_type == MACH_TYPE_ML696K)
3219+#else
3220+# define machine_is_ml696k() (0)
3221+#endif
3222+
3223+#ifdef CONFIG_MACH_ARCOM_ZEUS
3224+# ifdef machine_arch_type
3225+# undef machine_arch_type
3226+# define machine_arch_type __machine_arch_type
3227+# else
3228+# define machine_arch_type MACH_TYPE_ARCOM_ZEUS
3229+# endif
3230+# define machine_is_arcom_zeus() (machine_arch_type == MACH_TYPE_ARCOM_ZEUS)
3231+#else
3232+# define machine_is_arcom_zeus() (0)
3233+#endif
3234+
3235+#ifdef CONFIG_MACH_OSIRIS
3236+# ifdef machine_arch_type
3237+# undef machine_arch_type
3238+# define machine_arch_type __machine_arch_type
3239+# else
3240+# define machine_arch_type MACH_TYPE_OSIRIS
3241+# endif
3242+# define machine_is_osiris() (machine_arch_type == MACH_TYPE_OSIRIS)
3243+#else
3244+# define machine_is_osiris() (0)
3245+#endif
3246+
3247+#ifdef CONFIG_MACH_MAESTRO
3248+# ifdef machine_arch_type
3249+# undef machine_arch_type
3250+# define machine_arch_type __machine_arch_type
3251+# else
3252+# define machine_arch_type MACH_TYPE_MAESTRO
3253+# endif
3254+# define machine_is_maestro() (machine_arch_type == MACH_TYPE_MAESTRO)
3255+#else
3256+# define machine_is_maestro() (0)
3257+#endif
3258+
3259+#ifdef CONFIG_MACH_TUNGE2
3260+# ifdef machine_arch_type
3261+# undef machine_arch_type
3262+# define machine_arch_type __machine_arch_type
3263+# else
3264+# define machine_arch_type MACH_TYPE_TUNGE2
3265+# endif
3266+# define machine_is_tunge2() (machine_arch_type == MACH_TYPE_TUNGE2)
3267+#else
3268+# define machine_is_tunge2() (0)
3269+#endif
3270+
3271+#ifdef CONFIG_MACH_IXBBM
3272+# ifdef machine_arch_type
3273+# undef machine_arch_type
3274+# define machine_arch_type __machine_arch_type
3275+# else
3276+# define machine_arch_type MACH_TYPE_IXBBM
3277+# endif
3278+# define machine_is_ixbbm() (machine_arch_type == MACH_TYPE_IXBBM)
3279+#else
3280+# define machine_is_ixbbm() (0)
3281+#endif
3282+
3283+#ifdef CONFIG_MACH_MX27
3284+# ifdef machine_arch_type
3285+# undef machine_arch_type
3286+# define machine_arch_type __machine_arch_type
3287+# else
3288+# define machine_arch_type MACH_TYPE_MX27
3289+# endif
3290+# define machine_is_mx27ads() (machine_arch_type == MACH_TYPE_MX27)
3291+#else
3292+# define machine_is_mx27ads() (0)
3293+#endif
3294+
3295+#ifdef CONFIG_MACH_AX8004
3296+# ifdef machine_arch_type
3297+# undef machine_arch_type
3298+# define machine_arch_type __machine_arch_type
3299+# else
3300+# define machine_arch_type MACH_TYPE_AX8004
3301+# endif
3302+# define machine_is_ax8004() (machine_arch_type == MACH_TYPE_AX8004)
3303+#else
3304+# define machine_is_ax8004() (0)
3305+#endif
3306+
3307+#ifdef CONFIG_MACH_AT91SAM9261EK
3308+# ifdef machine_arch_type
3309+# undef machine_arch_type
3310+# define machine_arch_type __machine_arch_type
3311+# else
3312+# define machine_arch_type MACH_TYPE_AT91SAM9261EK
3313+# endif
3314+# define machine_is_at91sam9261ek() (machine_arch_type == MACH_TYPE_AT91SAM9261EK)
3315+#else
3316+# define machine_is_at91sam9261ek() (0)
3317+#endif
3318+
3319+#ifdef CONFIG_MACH_LOFT
3320+# ifdef machine_arch_type
3321+# undef machine_arch_type
3322+# define machine_arch_type __machine_arch_type
3323+# else
3324+# define machine_arch_type MACH_TYPE_LOFT
3325+# endif
3326+# define machine_is_loft() (machine_arch_type == MACH_TYPE_LOFT)
3327+#else
3328+# define machine_is_loft() (0)
3329+#endif
3330+
3331+#ifdef CONFIG_MACH_MAGPIE
3332+# ifdef machine_arch_type
3333+# undef machine_arch_type
3334+# define machine_arch_type __machine_arch_type
3335+# else
3336+# define machine_arch_type MACH_TYPE_MAGPIE
3337+# endif
3338+# define machine_is_magpie() (machine_arch_type == MACH_TYPE_MAGPIE)
3339+#else
3340+# define machine_is_magpie() (0)
3341+#endif
3342+
3343+#ifdef CONFIG_MACH_MX21
3344+# ifdef machine_arch_type
3345+# undef machine_arch_type
3346+# define machine_arch_type __machine_arch_type
3347+# else
3348+# define machine_arch_type MACH_TYPE_MX21
3349+# endif
3350+# define machine_is_mx21ads() (machine_arch_type == MACH_TYPE_MX21)
3351+#else
3352+# define machine_is_mx21ads() (0)
3353+#endif
3354+
3355+#ifdef CONFIG_MACH_MB87M3400
3356+# ifdef machine_arch_type
3357+# undef machine_arch_type
3358+# define machine_arch_type __machine_arch_type
3359+# else
3360+# define machine_arch_type MACH_TYPE_MB87M3400
3361+# endif
3362+# define machine_is_mb87m3400() (machine_arch_type == MACH_TYPE_MB87M3400)
3363+#else
3364+# define machine_is_mb87m3400() (0)
3365+#endif
3366+
3367+#ifdef CONFIG_MACH_MGUARD_DELTA
3368+# ifdef machine_arch_type
3369+# undef machine_arch_type
3370+# define machine_arch_type __machine_arch_type
3371+# else
3372+# define machine_arch_type MACH_TYPE_MGUARD_DELTA
3373+# endif
3374+# define machine_is_mguard_delta() (machine_arch_type == MACH_TYPE_MGUARD_DELTA)
3375+#else
3376+# define machine_is_mguard_delta() (0)
3377+#endif
3378+
3379+#ifdef CONFIG_MACH_DAVINCI_DVDP
3380+# ifdef machine_arch_type
3381+# undef machine_arch_type
3382+# define machine_arch_type __machine_arch_type
3383+# else
3384+# define machine_arch_type MACH_TYPE_DAVINCI_DVDP
3385+# endif
3386+# define machine_is_davinci_dvdp() (machine_arch_type == MACH_TYPE_DAVINCI_DVDP)
3387+#else
3388+# define machine_is_davinci_dvdp() (0)
3389+#endif
3390+
3391+#ifdef CONFIG_MACH_HTCUNIVERSAL
3392+# ifdef machine_arch_type
3393+# undef machine_arch_type
3394+# define machine_arch_type __machine_arch_type
3395+# else
3396+# define machine_arch_type MACH_TYPE_HTCUNIVERSAL
3397+# endif
3398+# define machine_is_htcuniversal() (machine_arch_type == MACH_TYPE_HTCUNIVERSAL)
3399+#else
3400+# define machine_is_htcuniversal() (0)
3401+#endif
3402+
3403+#ifdef CONFIG_MACH_TPAD
3404+# ifdef machine_arch_type
3405+# undef machine_arch_type
3406+# define machine_arch_type __machine_arch_type
3407+# else
3408+# define machine_arch_type MACH_TYPE_TPAD
3409+# endif
3410+# define machine_is_tpad() (machine_arch_type == MACH_TYPE_TPAD)
3411+#else
3412+# define machine_is_tpad() (0)
3413+#endif
3414+
3415+#ifdef CONFIG_MACH_ROVERP3
3416+# ifdef machine_arch_type
3417+# undef machine_arch_type
3418+# define machine_arch_type __machine_arch_type
3419+# else
3420+# define machine_arch_type MACH_TYPE_ROVERP3
3421+# endif
3422+# define machine_is_roverp3() (machine_arch_type == MACH_TYPE_ROVERP3)
3423+#else
3424+# define machine_is_roverp3() (0)
3425+#endif
3426+
3427+#ifdef CONFIG_MACH_JORNADA928
3428+# ifdef machine_arch_type
3429+# undef machine_arch_type
3430+# define machine_arch_type __machine_arch_type
3431+# else
3432+# define machine_arch_type MACH_TYPE_JORNADA928
3433+# endif
3434+# define machine_is_jornada928() (machine_arch_type == MACH_TYPE_JORNADA928)
3435+#else
3436+# define machine_is_jornada928() (0)
3437+#endif
3438+
3439+#ifdef CONFIG_MACH_MV88FXX81
3440+# ifdef machine_arch_type
3441+# undef machine_arch_type
3442+# define machine_arch_type __machine_arch_type
3443+# else
3444+# define machine_arch_type MACH_TYPE_MV88FXX81
3445+# endif
3446+# define machine_is_mv88fxx81() (machine_arch_type == MACH_TYPE_MV88FXX81)
3447+#else
3448+# define machine_is_mv88fxx81() (0)
3449+#endif
3450+
3451+#ifdef CONFIG_MACH_STMP36XX
3452+# ifdef machine_arch_type
3453+# undef machine_arch_type
3454+# define machine_arch_type __machine_arch_type
3455+# else
3456+# define machine_arch_type MACH_TYPE_STMP36XX
3457+# endif
3458+# define machine_is_stmp36xx() (machine_arch_type == MACH_TYPE_STMP36XX)
3459+#else
3460+# define machine_is_stmp36xx() (0)
3461+#endif
3462+
3463+#ifdef CONFIG_MACH_SXNI79524
3464+# ifdef machine_arch_type
3465+# undef machine_arch_type
3466+# define machine_arch_type __machine_arch_type
3467+# else
3468+# define machine_arch_type MACH_TYPE_SXNI79524
3469+# endif
3470+# define machine_is_sxni79524() (machine_arch_type == MACH_TYPE_SXNI79524)
3471+#else
3472+# define machine_is_sxni79524() (0)
3473+#endif
3474+
3475+#ifdef CONFIG_MACH_AMS_DELTA
3476+# ifdef machine_arch_type
3477+# undef machine_arch_type
3478+# define machine_arch_type __machine_arch_type
3479+# else
3480+# define machine_arch_type MACH_TYPE_AMS_DELTA
3481+# endif
3482+# define machine_is_ams_delta() (machine_arch_type == MACH_TYPE_AMS_DELTA)
3483+#else
3484+# define machine_is_ams_delta() (0)
3485+#endif
3486+
3487+#ifdef CONFIG_MACH_URANIUM
3488+# ifdef machine_arch_type
3489+# undef machine_arch_type
3490+# define machine_arch_type __machine_arch_type
3491+# else
3492+# define machine_arch_type MACH_TYPE_URANIUM
3493+# endif
3494+# define machine_is_uranium() (machine_arch_type == MACH_TYPE_URANIUM)
3495+#else
3496+# define machine_is_uranium() (0)
3497+#endif
3498+
3499+#ifdef CONFIG_MACH_UCON
3500+# ifdef machine_arch_type
3501+# undef machine_arch_type
3502+# define machine_arch_type __machine_arch_type
3503+# else
3504+# define machine_arch_type MACH_TYPE_UCON
3505+# endif
3506+# define machine_is_ucon() (machine_arch_type == MACH_TYPE_UCON)
3507+#else
3508+# define machine_is_ucon() (0)
3509+#endif
3510+
3511+#ifdef CONFIG_MACH_NAS100D
3512+# ifdef machine_arch_type
3513+# undef machine_arch_type
3514+# define machine_arch_type __machine_arch_type
3515+# else
3516+# define machine_arch_type MACH_TYPE_NAS100D
3517+# endif
3518+# define machine_is_nas100d() (machine_arch_type == MACH_TYPE_NAS100D)
3519+#else
3520+# define machine_is_nas100d() (0)
3521+#endif
3522+
3523+#ifdef CONFIG_MACH_L083_1000
3524+# ifdef machine_arch_type
3525+# undef machine_arch_type
3526+# define machine_arch_type __machine_arch_type
3527+# else
3528+# define machine_arch_type MACH_TYPE_L083_1000
3529+# endif
3530+# define machine_is_l083() (machine_arch_type == MACH_TYPE_L083_1000)
3531+#else
3532+# define machine_is_l083() (0)
3533+#endif
3534+
3535+#ifdef CONFIG_MACH_EZX
3536+# ifdef machine_arch_type
3537+# undef machine_arch_type
3538+# define machine_arch_type __machine_arch_type
3539+# else
3540+# define machine_arch_type MACH_TYPE_EZX
3541+# endif
3542+# define machine_is_ezx() (machine_arch_type == MACH_TYPE_EZX)
3543+#else
3544+# define machine_is_ezx() (0)
3545+#endif
3546+
3547+#ifdef CONFIG_MACH_PNX5220
3548+# ifdef machine_arch_type
3549+# undef machine_arch_type
3550+# define machine_arch_type __machine_arch_type
3551+# else
3552+# define machine_arch_type MACH_TYPE_PNX5220
3553+# endif
3554+# define machine_is_pnx5220() (machine_arch_type == MACH_TYPE_PNX5220)
3555+#else
3556+# define machine_is_pnx5220() (0)
3557+#endif
3558+
3559+#ifdef CONFIG_MACH_BUTTE
3560+# ifdef machine_arch_type
3561+# undef machine_arch_type
3562+# define machine_arch_type __machine_arch_type
3563+# else
3564+# define machine_arch_type MACH_TYPE_BUTTE
3565+# endif
3566+# define machine_is_butte() (machine_arch_type == MACH_TYPE_BUTTE)
3567+#else
3568+# define machine_is_butte() (0)
3569+#endif
3570+
3571+#ifdef CONFIG_MACH_SRM2
3572+# ifdef machine_arch_type
3573+# undef machine_arch_type
3574+# define machine_arch_type __machine_arch_type
3575+# else
3576+# define machine_arch_type MACH_TYPE_SRM2
3577+# endif
3578+# define machine_is_srm2() (machine_arch_type == MACH_TYPE_SRM2)
3579+#else
3580+# define machine_is_srm2() (0)
3581+#endif
3582+
3583+#ifdef CONFIG_MACH_DSBR
3584+# ifdef machine_arch_type
3585+# undef machine_arch_type
3586+# define machine_arch_type __machine_arch_type
3587+# else
3588+# define machine_arch_type MACH_TYPE_DSBR
3589+# endif
3590+# define machine_is_dsbr() (machine_arch_type == MACH_TYPE_DSBR)
3591+#else
3592+# define machine_is_dsbr() (0)
3593+#endif
3594+
3595+#ifdef CONFIG_MACH_CRYSTALBALL
3596+# ifdef machine_arch_type
3597+# undef machine_arch_type
3598+# define machine_arch_type __machine_arch_type
3599+# else
3600+# define machine_arch_type MACH_TYPE_CRYSTALBALL
3601+# endif
3602+# define machine_is_crystalball() (machine_arch_type == MACH_TYPE_CRYSTALBALL)
3603+#else
3604+# define machine_is_crystalball() (0)
3605+#endif
3606+
3607+#ifdef CONFIG_MACH_TINYPXA27X
3608+# ifdef machine_arch_type
3609+# undef machine_arch_type
3610+# define machine_arch_type __machine_arch_type
3611+# else
3612+# define machine_arch_type MACH_TYPE_TINYPXA27X
3613+# endif
3614+# define machine_is_tinypxa27x() (machine_arch_type == MACH_TYPE_TINYPXA27X)
3615+#else
3616+# define machine_is_tinypxa27x() (0)
3617+#endif
3618+
3619+#ifdef CONFIG_MACH_HERBIE
3620+# ifdef machine_arch_type
3621+# undef machine_arch_type
3622+# define machine_arch_type __machine_arch_type
3623+# else
3624+# define machine_arch_type MACH_TYPE_HERBIE
3625+# endif
3626+# define machine_is_herbie() (machine_arch_type == MACH_TYPE_HERBIE)
3627+#else
3628+# define machine_is_herbie() (0)
3629+#endif
3630+
3631+#ifdef CONFIG_MACH_MAGICIAN
3632+# ifdef machine_arch_type
3633+# undef machine_arch_type
3634+# define machine_arch_type __machine_arch_type
3635+# else
3636+# define machine_arch_type MACH_TYPE_MAGICIAN
3637+# endif
3638+# define machine_is_magician() (machine_arch_type == MACH_TYPE_MAGICIAN)
3639+#else
3640+# define machine_is_magician() (0)
3641+#endif
3642+
3643+#ifdef CONFIG_MACH_CM4002
3644+# ifdef machine_arch_type
3645+# undef machine_arch_type
3646+# define machine_arch_type __machine_arch_type
3647+# else
3648+# define machine_arch_type MACH_TYPE_CM4002
3649+# endif
3650+# define machine_is_cm4002() (machine_arch_type == MACH_TYPE_CM4002)
3651+#else
3652+# define machine_is_cm4002() (0)
3653+#endif
3654+
3655+#ifdef CONFIG_MACH_B4
3656+# ifdef machine_arch_type
3657+# undef machine_arch_type
3658+# define machine_arch_type __machine_arch_type
3659+# else
3660+# define machine_arch_type MACH_TYPE_B4
3661+# endif
3662+# define machine_is_b4() (machine_arch_type == MACH_TYPE_B4)
3663+#else
3664+# define machine_is_b4() (0)
3665+#endif
3666+
3667+#ifdef CONFIG_MACH_MAUI
3668+# ifdef machine_arch_type
3669+# undef machine_arch_type
3670+# define machine_arch_type __machine_arch_type
3671+# else
3672+# define machine_arch_type MACH_TYPE_MAUI
3673+# endif
3674+# define machine_is_maui() (machine_arch_type == MACH_TYPE_MAUI)
3675+#else
3676+# define machine_is_maui() (0)
3677+#endif
3678+
3679+#ifdef CONFIG_MACH_CYBERTRACKER_G
3680+# ifdef machine_arch_type
3681+# undef machine_arch_type
3682+# define machine_arch_type __machine_arch_type
3683+# else
3684+# define machine_arch_type MACH_TYPE_CYBERTRACKER_G
3685+# endif
3686+# define machine_is_cybertracker_g() (machine_arch_type == MACH_TYPE_CYBERTRACKER_G)
3687+#else
3688+# define machine_is_cybertracker_g() (0)
3689+#endif
3690+
3691+#ifdef CONFIG_MACH_NXDKN
3692+# ifdef machine_arch_type
3693+# undef machine_arch_type
3694+# define machine_arch_type __machine_arch_type
3695+# else
3696+# define machine_arch_type MACH_TYPE_NXDKN
3697+# endif
3698+# define machine_is_nxdkn() (machine_arch_type == MACH_TYPE_NXDKN)
3699+#else
3700+# define machine_is_nxdkn() (0)
3701+#endif
3702+
3703+#ifdef CONFIG_MACH_MIO8390
3704+# ifdef machine_arch_type
3705+# undef machine_arch_type
3706+# define machine_arch_type __machine_arch_type
3707+# else
3708+# define machine_arch_type MACH_TYPE_MIO8390
3709+# endif
3710+# define machine_is_mio8390() (machine_arch_type == MACH_TYPE_MIO8390)
3711+#else
3712+# define machine_is_mio8390() (0)
3713+#endif
3714+
3715+#ifdef CONFIG_MACH_OMI_BOARD
3716+# ifdef machine_arch_type
3717+# undef machine_arch_type
3718+# define machine_arch_type __machine_arch_type
3719+# else
3720+# define machine_arch_type MACH_TYPE_OMI_BOARD
3721+# endif
3722+# define machine_is_omi_board() (machine_arch_type == MACH_TYPE_OMI_BOARD)
3723+#else
3724+# define machine_is_omi_board() (0)
3725+#endif
3726+
3727+#ifdef CONFIG_MACH_MX21CIV
3728+# ifdef machine_arch_type
3729+# undef machine_arch_type
3730+# define machine_arch_type __machine_arch_type
3731+# else
3732+# define machine_arch_type MACH_TYPE_MX21CIV
3733+# endif
3734+# define machine_is_mx21civ() (machine_arch_type == MACH_TYPE_MX21CIV)
3735+#else
3736+# define machine_is_mx21civ() (0)
3737+#endif
3738+
3739+#ifdef CONFIG_MACH_MAHI_CDAC
3740+# ifdef machine_arch_type
3741+# undef machine_arch_type
3742+# define machine_arch_type __machine_arch_type
3743+# else
3744+# define machine_arch_type MACH_TYPE_MAHI_CDAC
3745+# endif
3746+# define machine_is_mahi_cdac() (machine_arch_type == MACH_TYPE_MAHI_CDAC)
3747+#else
3748+# define machine_is_mahi_cdac() (0)
3749+#endif
3750+
3751+#ifdef CONFIG_MACH_XSCALE_PALMTX
3752+# ifdef machine_arch_type
3753+# undef machine_arch_type
3754+# define machine_arch_type __machine_arch_type
3755+# else
3756+# define machine_arch_type MACH_TYPE_XSCALE_PALMTX
3757+# endif
3758+# define machine_is_xscale_palmtx() (machine_arch_type == MACH_TYPE_XSCALE_PALMTX)
3759+#else
3760+# define machine_is_xscale_palmtx() (0)
3761+#endif
3762+
3763+#ifdef CONFIG_MACH_S3C2413
3764+# ifdef machine_arch_type
3765+# undef machine_arch_type
3766+# define machine_arch_type __machine_arch_type
3767+# else
3768+# define machine_arch_type MACH_TYPE_S3C2413
3769+# endif
3770+# define machine_is_s3c2413() (machine_arch_type == MACH_TYPE_S3C2413)
3771+#else
3772+# define machine_is_s3c2413() (0)
3773+#endif
3774+
3775+#ifdef CONFIG_MACH_SAMSYS_EP0
3776+# ifdef machine_arch_type
3777+# undef machine_arch_type
3778+# define machine_arch_type __machine_arch_type
3779+# else
3780+# define machine_arch_type MACH_TYPE_SAMSYS_EP0
3781+# endif
3782+# define machine_is_samsys_ep0() (machine_arch_type == MACH_TYPE_SAMSYS_EP0)
3783+#else
3784+# define machine_is_samsys_ep0() (0)
3785+#endif
3786+
3787+#ifdef CONFIG_MACH_WG302V1
3788+# ifdef machine_arch_type
3789+# undef machine_arch_type
3790+# define machine_arch_type __machine_arch_type
3791+# else
3792+# define machine_arch_type MACH_TYPE_WG302V1
3793+# endif
3794+# define machine_is_wg302v1() (machine_arch_type == MACH_TYPE_WG302V1)
3795+#else
3796+# define machine_is_wg302v1() (0)
3797+#endif
3798+
3799+#ifdef CONFIG_MACH_WG302V2
3800+# ifdef machine_arch_type
3801+# undef machine_arch_type
3802+# define machine_arch_type __machine_arch_type
3803+# else
3804+# define machine_arch_type MACH_TYPE_WG302V2
3805+# endif
3806+# define machine_is_wg302v2() (machine_arch_type == MACH_TYPE_WG302V2)
3807+#else
3808+# define machine_is_wg302v2() (0)
3809+#endif
3810+
3811+#ifdef CONFIG_MACH_EB42X
3812+# ifdef machine_arch_type
3813+# undef machine_arch_type
3814+# define machine_arch_type __machine_arch_type
3815+# else
3816+# define machine_arch_type MACH_TYPE_EB42X
3817+# endif
3818+# define machine_is_eb42x() (machine_arch_type == MACH_TYPE_EB42X)
3819+#else
3820+# define machine_is_eb42x() (0)
3821+#endif
3822+
3823+#ifdef CONFIG_MACH_IQ331ES
3824+# ifdef machine_arch_type
3825+# undef machine_arch_type
3826+# define machine_arch_type __machine_arch_type
3827+# else
3828+# define machine_arch_type MACH_TYPE_IQ331ES
3829+# endif
3830+# define machine_is_iq331es() (machine_arch_type == MACH_TYPE_IQ331ES)
3831+#else
3832+# define machine_is_iq331es() (0)
3833+#endif
3834+
3835+#ifdef CONFIG_MACH_COSYDSP
3836+# ifdef machine_arch_type
3837+# undef machine_arch_type
3838+# define machine_arch_type __machine_arch_type
3839+# else
3840+# define machine_arch_type MACH_TYPE_COSYDSP
3841+# endif
3842+# define machine_is_cosydsp() (machine_arch_type == MACH_TYPE_COSYDSP)
3843+#else
3844+# define machine_is_cosydsp() (0)
3845+#endif
3846+
3847+#ifdef CONFIG_MACH_UPLAT7D
3848+# ifdef machine_arch_type
3849+# undef machine_arch_type
3850+# define machine_arch_type __machine_arch_type
3851+# else
3852+# define machine_arch_type MACH_TYPE_UPLAT7D
3853+# endif
3854+# define machine_is_uplat7d_proto() (machine_arch_type == MACH_TYPE_UPLAT7D)
3855+#else
3856+# define machine_is_uplat7d_proto() (0)
3857+#endif
3858+
3859+#ifdef CONFIG_MACH_PTDAVINCI
3860+# ifdef machine_arch_type
3861+# undef machine_arch_type
3862+# define machine_arch_type __machine_arch_type
3863+# else
3864+# define machine_arch_type MACH_TYPE_PTDAVINCI
3865+# endif
3866+# define machine_is_ptdavinci() (machine_arch_type == MACH_TYPE_PTDAVINCI)
3867+#else
3868+# define machine_is_ptdavinci() (0)
3869+#endif
3870+
3871+#ifdef CONFIG_MACH_MBUS
3872+# ifdef machine_arch_type
3873+# undef machine_arch_type
3874+# define machine_arch_type __machine_arch_type
3875+# else
3876+# define machine_arch_type MACH_TYPE_MBUS
3877+# endif
3878+# define machine_is_mbus() (machine_arch_type == MACH_TYPE_MBUS)
3879+#else
3880+# define machine_is_mbus() (0)
3881+#endif
3882+
3883+#ifdef CONFIG_MACH_NADIA2VB
3884+# ifdef machine_arch_type
3885+# undef machine_arch_type
3886+# define machine_arch_type __machine_arch_type
3887+# else
3888+# define machine_arch_type MACH_TYPE_NADIA2VB
3889+# endif
3890+# define machine_is_nadia2vb() (machine_arch_type == MACH_TYPE_NADIA2VB)
3891+#else
3892+# define machine_is_nadia2vb() (0)
3893+#endif
3894+
3895+#ifdef CONFIG_MACH_R1000
3896+# ifdef machine_arch_type
3897+# undef machine_arch_type
3898+# define machine_arch_type __machine_arch_type
3899+# else
3900+# define machine_arch_type MACH_TYPE_R1000
3901+# endif
3902+# define machine_is_r1000() (machine_arch_type == MACH_TYPE_R1000)
3903+#else
3904+# define machine_is_r1000() (0)
3905+#endif
3906+
3907+#ifdef CONFIG_MACH_HW90250
3908+# ifdef machine_arch_type
3909+# undef machine_arch_type
3910+# define machine_arch_type __machine_arch_type
3911+# else
3912+# define machine_arch_type MACH_TYPE_HW90250
3913+# endif
3914+# define machine_is_hw90250() (machine_arch_type == MACH_TYPE_HW90250)
3915+#else
3916+# define machine_is_hw90250() (0)
3917+#endif
3918+
3919+#ifdef CONFIG_MACH_OMAP_2430SDP
3920+# ifdef machine_arch_type
3921+# undef machine_arch_type
3922+# define machine_arch_type __machine_arch_type
3923+# else
3924+# define machine_arch_type MACH_TYPE_OMAP_2430SDP
3925+# endif
3926+# define machine_is_omap_2430sdp() (machine_arch_type == MACH_TYPE_OMAP_2430SDP)
3927+#else
3928+# define machine_is_omap_2430sdp() (0)
3929+#endif
3930+
3931+#ifdef CONFIG_MACH_DAVINCI_EVM
3932+# ifdef machine_arch_type
3933+# undef machine_arch_type
3934+# define machine_arch_type __machine_arch_type
3935+# else
3936+# define machine_arch_type MACH_TYPE_DAVINCI_EVM
3937+# endif
3938+# define machine_is_davinci_evm() (machine_arch_type == MACH_TYPE_DAVINCI_EVM)
3939+#else
3940+# define machine_is_davinci_evm() (0)
3941+#endif
3942+
3943+#ifdef CONFIG_MACH_OMAP_TORNADO
3944+# ifdef machine_arch_type
3945+# undef machine_arch_type
3946+# define machine_arch_type __machine_arch_type
3947+# else
3948+# define machine_arch_type MACH_TYPE_OMAP_TORNADO
3949+# endif
3950+# define machine_is_omap_tornado() (machine_arch_type == MACH_TYPE_OMAP_TORNADO)
3951+#else
3952+# define machine_is_omap_tornado() (0)
3953+#endif
3954+
3955+#ifdef CONFIG_MACH_OLOCREEK
3956+# ifdef machine_arch_type
3957+# undef machine_arch_type
3958+# define machine_arch_type __machine_arch_type
3959+# else
3960+# define machine_arch_type MACH_TYPE_OLOCREEK
3961+# endif
3962+# define machine_is_olocreek() (machine_arch_type == MACH_TYPE_OLOCREEK)
3963+#else
3964+# define machine_is_olocreek() (0)
3965+#endif
3966+
3967+#ifdef CONFIG_MACH_PALMZ72
3968+# ifdef machine_arch_type
3969+# undef machine_arch_type
3970+# define machine_arch_type __machine_arch_type
3971+# else
3972+# define machine_arch_type MACH_TYPE_PALMZ72
3973+# endif
3974+# define machine_is_palmz72() (machine_arch_type == MACH_TYPE_PALMZ72)
3975+#else
3976+# define machine_is_palmz72() (0)
3977+#endif
3978+
3979+#ifdef CONFIG_MACH_NXDB500
3980+# ifdef machine_arch_type
3981+# undef machine_arch_type
3982+# define machine_arch_type __machine_arch_type
3983+# else
3984+# define machine_arch_type MACH_TYPE_NXDB500
3985+# endif
3986+# define machine_is_nxdb500() (machine_arch_type == MACH_TYPE_NXDB500)
3987+#else
3988+# define machine_is_nxdb500() (0)
3989+#endif
3990+
3991+#ifdef CONFIG_MACH_APF9328
3992+# ifdef machine_arch_type
3993+# undef machine_arch_type
3994+# define machine_arch_type __machine_arch_type
3995+# else
3996+# define machine_arch_type MACH_TYPE_APF9328
3997+# endif
3998+# define machine_is_apf9328() (machine_arch_type == MACH_TYPE_APF9328)
3999+#else
4000+# define machine_is_apf9328() (0)
4001+#endif
4002+
4003+#ifdef CONFIG_MACH_OMAP_WIPOQ
4004+# ifdef machine_arch_type
4005+# undef machine_arch_type
4006+# define machine_arch_type __machine_arch_type
4007+# else
4008+# define machine_arch_type MACH_TYPE_OMAP_WIPOQ
4009+# endif
4010+# define machine_is_omap_wipoq() (machine_arch_type == MACH_TYPE_OMAP_WIPOQ)
4011+#else
4012+# define machine_is_omap_wipoq() (0)
4013+#endif
4014+
4015+#ifdef CONFIG_MACH_OMAP_TWIP
4016+# ifdef machine_arch_type
4017+# undef machine_arch_type
4018+# define machine_arch_type __machine_arch_type
4019+# else
4020+# define machine_arch_type MACH_TYPE_OMAP_TWIP
4021+# endif
4022+# define machine_is_omap_twip() (machine_arch_type == MACH_TYPE_OMAP_TWIP)
4023+#else
4024+# define machine_is_omap_twip() (0)
4025+#endif
4026+
4027+#ifdef CONFIG_MACH_XSCALE_PALMTREO650
4028+# ifdef machine_arch_type
4029+# undef machine_arch_type
4030+# define machine_arch_type __machine_arch_type
4031+# else
4032+# define machine_arch_type MACH_TYPE_XSCALE_PALMTREO650
4033+# endif
4034+# define machine_is_xscale_treo650() (machine_arch_type == MACH_TYPE_XSCALE_PALMTREO650)
4035+#else
4036+# define machine_is_xscale_treo650() (0)
4037+#endif
4038+
4039+#ifdef CONFIG_MACH_ACUMEN
4040+# ifdef machine_arch_type
4041+# undef machine_arch_type
4042+# define machine_arch_type __machine_arch_type
4043+# else
4044+# define machine_arch_type MACH_TYPE_ACUMEN
4045+# endif
4046+# define machine_is_acumen() (machine_arch_type == MACH_TYPE_ACUMEN)
4047+#else
4048+# define machine_is_acumen() (0)
4049+#endif
4050+
4051+#ifdef CONFIG_MACH_XP100
4052+# ifdef machine_arch_type
4053+# undef machine_arch_type
4054+# define machine_arch_type __machine_arch_type
4055+# else
4056+# define machine_arch_type MACH_TYPE_XP100
4057+# endif
4058+# define machine_is_xp100() (machine_arch_type == MACH_TYPE_XP100)
4059+#else
4060+# define machine_is_xp100() (0)
4061+#endif
4062+
4063+#ifdef CONFIG_MACH_FS2410
4064+# ifdef machine_arch_type
4065+# undef machine_arch_type
4066+# define machine_arch_type __machine_arch_type
4067+# else
4068+# define machine_arch_type MACH_TYPE_FS2410
4069+# endif
4070+# define machine_is_fs2410() (machine_arch_type == MACH_TYPE_FS2410)
4071+#else
4072+# define machine_is_fs2410() (0)
4073+#endif
4074+
4075+#ifdef CONFIG_MACH_PXA270_CERF
4076+# ifdef machine_arch_type
4077+# undef machine_arch_type
4078+# define machine_arch_type __machine_arch_type
4079+# else
4080+# define machine_arch_type MACH_TYPE_PXA270_CERF
4081+# endif
4082+# define machine_is_pxa270_cerf() (machine_arch_type == MACH_TYPE_PXA270_CERF)
4083+#else
4084+# define machine_is_pxa270_cerf() (0)
4085+#endif
4086+
4087+#ifdef CONFIG_MACH_SQ2FTLPALM
4088+# ifdef machine_arch_type
4089+# undef machine_arch_type
4090+# define machine_arch_type __machine_arch_type
4091+# else
4092+# define machine_arch_type MACH_TYPE_SQ2FTLPALM
4093+# endif
4094+# define machine_is_sq2ftlpalm() (machine_arch_type == MACH_TYPE_SQ2FTLPALM)
4095+#else
4096+# define machine_is_sq2ftlpalm() (0)
4097+#endif
4098+
4099+#ifdef CONFIG_MACH_BSEMSERVER
4100+# ifdef machine_arch_type
4101+# undef machine_arch_type
4102+# define machine_arch_type __machine_arch_type
4103+# else
4104+# define machine_arch_type MACH_TYPE_BSEMSERVER
4105+# endif
4106+# define machine_is_bsemserver() (machine_arch_type == MACH_TYPE_BSEMSERVER)
4107+#else
4108+# define machine_is_bsemserver() (0)
4109+#endif
4110+
4111+#ifdef CONFIG_MACH_NETCLIENT
4112+# ifdef machine_arch_type
4113+# undef machine_arch_type
4114+# define machine_arch_type __machine_arch_type
4115+# else
4116+# define machine_arch_type MACH_TYPE_NETCLIENT
4117+# endif
4118+# define machine_is_netclient() (machine_arch_type == MACH_TYPE_NETCLIENT)
4119+#else
4120+# define machine_is_netclient() (0)
4121+#endif
4122+
4123+#ifdef CONFIG_MACH_XSCALE_PALMTT5
4124+# ifdef machine_arch_type
4125+# undef machine_arch_type
4126+# define machine_arch_type __machine_arch_type
4127+# else
4128+# define machine_arch_type MACH_TYPE_XSCALE_PALMTT5
4129+# endif
4130+# define machine_is_xscale_palmtt5() (machine_arch_type == MACH_TYPE_XSCALE_PALMTT5)
4131+#else
4132+# define machine_is_xscale_palmtt5() (0)
4133+#endif
4134+
4135+#ifdef CONFIG_MACH_OMAP_PALMTC
4136+# ifdef machine_arch_type
4137+# undef machine_arch_type
4138+# define machine_arch_type __machine_arch_type
4139+# else
4140+# define machine_arch_type MACH_TYPE_OMAP_PALMTC
4141+# endif
4142+# define machine_is_xscale_palmtc() (machine_arch_type == MACH_TYPE_OMAP_PALMTC)
4143+#else
4144+# define machine_is_xscale_palmtc() (0)
4145+#endif
4146+
4147+#ifdef CONFIG_MACH_OMAP_APOLLON
4148+# ifdef machine_arch_type
4149+# undef machine_arch_type
4150+# define machine_arch_type __machine_arch_type
4151+# else
4152+# define machine_arch_type MACH_TYPE_OMAP_APOLLON
4153+# endif
4154+# define machine_is_omap_apollon() (machine_arch_type == MACH_TYPE_OMAP_APOLLON)
4155+#else
4156+# define machine_is_omap_apollon() (0)
4157+#endif
4158+
4159+#ifdef CONFIG_MACH_MXC30030EVB
4160+# ifdef machine_arch_type
4161+# undef machine_arch_type
4162+# define machine_arch_type __machine_arch_type
4163+# else
4164+# define machine_arch_type MACH_TYPE_MXC30030EVB
4165+# endif
4166+# define machine_is_mxc30030evb() (machine_arch_type == MACH_TYPE_MXC30030EVB)
4167+#else
4168+# define machine_is_mxc30030evb() (0)
4169+#endif
4170+
4171+#ifdef CONFIG_MACH_REA_2D
4172+# ifdef machine_arch_type
4173+# undef machine_arch_type
4174+# define machine_arch_type __machine_arch_type
4175+# else
4176+# define machine_arch_type MACH_TYPE_REA_2D
4177+# endif
4178+# define machine_is_rea_2d() (machine_arch_type == MACH_TYPE_REA_2D)
4179+#else
4180+# define machine_is_rea_2d() (0)
4181+#endif
4182+
4183+#ifdef CONFIG_MACH_TI3E524
4184+# ifdef machine_arch_type
4185+# undef machine_arch_type
4186+# define machine_arch_type __machine_arch_type
4187+# else
4188+# define machine_arch_type MACH_TYPE_TI3E524
4189+# endif
4190+# define machine_is_eti3e524() (machine_arch_type == MACH_TYPE_TI3E524)
4191+#else
4192+# define machine_is_eti3e524() (0)
4193+#endif
4194+
4195+#ifdef CONFIG_MACH_ATEB9200
4196+# ifdef machine_arch_type
4197+# undef machine_arch_type
4198+# define machine_arch_type __machine_arch_type
4199+# else
4200+# define machine_arch_type MACH_TYPE_ATEB9200
4201+# endif
4202+# define machine_is_ateb9200() (machine_arch_type == MACH_TYPE_ATEB9200)
4203+#else
4204+# define machine_is_ateb9200() (0)
4205+#endif
4206+
4207+#ifdef CONFIG_MACH_AUCKLAND
4208+# ifdef machine_arch_type
4209+# undef machine_arch_type
4210+# define machine_arch_type __machine_arch_type
4211+# else
4212+# define machine_arch_type MACH_TYPE_AUCKLAND
4213+# endif
4214+# define machine_is_auckland() (machine_arch_type == MACH_TYPE_AUCKLAND)
4215+#else
4216+# define machine_is_auckland() (0)
4217+#endif
4218+
4219+#ifdef CONFIG_MACH_AK3320M
4220+# ifdef machine_arch_type
4221+# undef machine_arch_type
4222+# define machine_arch_type __machine_arch_type
4223+# else
4224+# define machine_arch_type MACH_TYPE_AK3320M
4225+# endif
4226+# define machine_is_ak3220m() (machine_arch_type == MACH_TYPE_AK3320M)
4227+#else
4228+# define machine_is_ak3220m() (0)
4229+#endif
4230+
4231+#ifdef CONFIG_MACH_DURAMAX
4232+# ifdef machine_arch_type
4233+# undef machine_arch_type
4234+# define machine_arch_type __machine_arch_type
4235+# else
4236+# define machine_arch_type MACH_TYPE_DURAMAX
4237+# endif
4238+# define machine_is_duramax() (machine_arch_type == MACH_TYPE_DURAMAX)
4239+#else
4240+# define machine_is_duramax() (0)
4241+#endif
4242+
4243+#ifdef CONFIG_MACH_N35
4244+# ifdef machine_arch_type
4245+# undef machine_arch_type
4246+# define machine_arch_type __machine_arch_type
4247+# else
4248+# define machine_arch_type MACH_TYPE_N35
4249+# endif
4250+# define machine_is_n35() (machine_arch_type == MACH_TYPE_N35)
4251+#else
4252+# define machine_is_n35() (0)
4253+#endif
4254+
4255+#ifdef CONFIG_MACH_PRONGHORN
4256+# ifdef machine_arch_type
4257+# undef machine_arch_type
4258+# define machine_arch_type __machine_arch_type
4259+# else
4260+# define machine_arch_type MACH_TYPE_PRONGHORN
4261+# endif
4262+# define machine_is_pronghorn() (machine_arch_type == MACH_TYPE_PRONGHORN)
4263+#else
4264+# define machine_is_pronghorn() (0)
4265+#endif
4266+
4267+#ifdef CONFIG_MACH_FUNDY
4268+# ifdef machine_arch_type
4269+# undef machine_arch_type
4270+# define machine_arch_type __machine_arch_type
4271+# else
4272+# define machine_arch_type MACH_TYPE_FUNDY
4273+# endif
4274+# define machine_is_fundy() (machine_arch_type == MACH_TYPE_FUNDY)
4275+#else
4276+# define machine_is_fundy() (0)
4277+#endif
4278+
4279+#ifdef CONFIG_MACH_LOGICPD_PXA270
4280+# ifdef machine_arch_type
4281+# undef machine_arch_type
4282+# define machine_arch_type __machine_arch_type
4283+# else
4284+# define machine_arch_type MACH_TYPE_LOGICPD_PXA270
4285+# endif
4286+# define machine_is_logicpd_pxa270() (machine_arch_type == MACH_TYPE_LOGICPD_PXA270)
4287+#else
4288+# define machine_is_logicpd_pxa270() (0)
4289+#endif
4290+
4291+#ifdef CONFIG_MACH_CPU777
4292+# ifdef machine_arch_type
4293+# undef machine_arch_type
4294+# define machine_arch_type __machine_arch_type
4295+# else
4296+# define machine_arch_type MACH_TYPE_CPU777
4297+# endif
4298+# define machine_is_cpu777() (machine_arch_type == MACH_TYPE_CPU777)
4299+#else
4300+# define machine_is_cpu777() (0)
4301+#endif
4302+
4303+#ifdef CONFIG_MACH_SIMICON9201
4304+# ifdef machine_arch_type
4305+# undef machine_arch_type
4306+# define machine_arch_type __machine_arch_type
4307+# else
4308+# define machine_arch_type MACH_TYPE_SIMICON9201
4309+# endif
4310+# define machine_is_simicon9201() (machine_arch_type == MACH_TYPE_SIMICON9201)
4311+#else
4312+# define machine_is_simicon9201() (0)
4313+#endif
4314+
4315+#ifdef CONFIG_MACH_LEAP2_HPM
4316+# ifdef machine_arch_type
4317+# undef machine_arch_type
4318+# define machine_arch_type __machine_arch_type
4319+# else
4320+# define machine_arch_type MACH_TYPE_LEAP2_HPM
4321+# endif
4322+# define machine_is_leap2_hpm() (machine_arch_type == MACH_TYPE_LEAP2_HPM)
4323+#else
4324+# define machine_is_leap2_hpm() (0)
4325+#endif
4326+
4327+#ifdef CONFIG_MACH_CM922TXA10
4328+# ifdef machine_arch_type
4329+# undef machine_arch_type
4330+# define machine_arch_type __machine_arch_type
4331+# else
4332+# define machine_arch_type MACH_TYPE_CM922TXA10
4333+# endif
4334+# define machine_is_cm922txa10() (machine_arch_type == MACH_TYPE_CM922TXA10)
4335+#else
4336+# define machine_is_cm922txa10() (0)
4337+#endif
4338+
4339+#ifdef CONFIG_MACH_PXA
4340+# ifdef machine_arch_type
4341+# undef machine_arch_type
4342+# define machine_arch_type __machine_arch_type
4343+# else
4344+# define machine_arch_type MACH_TYPE_PXA
4345+# endif
4346+# define machine_is_sandgate() (machine_arch_type == MACH_TYPE_PXA)
4347+#else
4348+# define machine_is_sandgate() (0)
4349+#endif
4350+
4351+#ifdef CONFIG_MACH_SANDGATE2
4352+# ifdef machine_arch_type
4353+# undef machine_arch_type
4354+# define machine_arch_type __machine_arch_type
4355+# else
4356+# define machine_arch_type MACH_TYPE_SANDGATE2
4357+# endif
4358+# define machine_is_sandgate2() (machine_arch_type == MACH_TYPE_SANDGATE2)
4359+#else
4360+# define machine_is_sandgate2() (0)
4361+#endif
4362+
4363+#ifdef CONFIG_MACH_SANDGATE2G
4364+# ifdef machine_arch_type
4365+# undef machine_arch_type
4366+# define machine_arch_type __machine_arch_type
4367+# else
4368+# define machine_arch_type MACH_TYPE_SANDGATE2G
4369+# endif
4370+# define machine_is_sandgate2g() (machine_arch_type == MACH_TYPE_SANDGATE2G)
4371+#else
4372+# define machine_is_sandgate2g() (0)
4373+#endif
4374+
4375+#ifdef CONFIG_MACH_SANDGATE2P
4376+# ifdef machine_arch_type
4377+# undef machine_arch_type
4378+# define machine_arch_type __machine_arch_type
4379+# else
4380+# define machine_arch_type MACH_TYPE_SANDGATE2P
4381+# endif
4382+# define machine_is_sandgate2p() (machine_arch_type == MACH_TYPE_SANDGATE2P)
4383+#else
4384+# define machine_is_sandgate2p() (0)
4385+#endif
4386+
4387+#ifdef CONFIG_MACH_FRED_JACK
4388+# ifdef machine_arch_type
4389+# undef machine_arch_type
4390+# define machine_arch_type __machine_arch_type
4391+# else
4392+# define machine_arch_type MACH_TYPE_FRED_JACK
4393+# endif
4394+# define machine_is_fred_jack() (machine_arch_type == MACH_TYPE_FRED_JACK)
4395+#else
4396+# define machine_is_fred_jack() (0)
4397+#endif
4398+
4399+#ifdef CONFIG_MACH_TTG_COLOR1
4400+# ifdef machine_arch_type
4401+# undef machine_arch_type
4402+# define machine_arch_type __machine_arch_type
4403+# else
4404+# define machine_arch_type MACH_TYPE_TTG_COLOR1
4405+# endif
4406+# define machine_is_ttg_color1() (machine_arch_type == MACH_TYPE_TTG_COLOR1)
4407+#else
4408+# define machine_is_ttg_color1() (0)
4409+#endif
4410+
4411+#ifdef CONFIG_MACH_NXEB500HMI
4412+# ifdef machine_arch_type
4413+# undef machine_arch_type
4414+# define machine_arch_type __machine_arch_type
4415+# else
4416+# define machine_arch_type MACH_TYPE_NXEB500HMI
4417+# endif
4418+# define machine_is_nxeb500hmi() (machine_arch_type == MACH_TYPE_NXEB500HMI)
4419+#else
4420+# define machine_is_nxeb500hmi() (0)
4421+#endif
4422+
4423+#ifdef CONFIG_MACH_NETDCU8
4424+# ifdef machine_arch_type
4425+# undef machine_arch_type
4426+# define machine_arch_type __machine_arch_type
4427+# else
4428+# define machine_arch_type MACH_TYPE_NETDCU8
4429+# endif
4430+# define machine_is_netdcu8() (machine_arch_type == MACH_TYPE_NETDCU8)
4431+#else
4432+# define machine_is_netdcu8() (0)
4433+#endif
4434+
4435+#ifdef CONFIG_MACH_ML675050_CPU_BOA
4436+# ifdef machine_arch_type
4437+# undef machine_arch_type
4438+# define machine_arch_type __machine_arch_type
4439+# else
4440+# define machine_arch_type MACH_TYPE_ML675050_CPU_BOA
4441+# endif
4442+# define machine_is_ml675050_cpu_boa() (machine_arch_type == MACH_TYPE_ML675050_CPU_BOA)
4443+#else
4444+# define machine_is_ml675050_cpu_boa() (0)
4445+#endif
4446+
4447+#ifdef CONFIG_MACH_NG_FVX538
4448+# ifdef machine_arch_type
4449+# undef machine_arch_type
4450+# define machine_arch_type __machine_arch_type
4451+# else
4452+# define machine_arch_type MACH_TYPE_NG_FVX538
4453+# endif
4454+# define machine_is_ng_fvx538() (machine_arch_type == MACH_TYPE_NG_FVX538)
4455+#else
4456+# define machine_is_ng_fvx538() (0)
4457+#endif
4458+
4459+#ifdef CONFIG_MACH_NG_FVS338
4460+# ifdef machine_arch_type
4461+# undef machine_arch_type
4462+# define machine_arch_type __machine_arch_type
4463+# else
4464+# define machine_arch_type MACH_TYPE_NG_FVS338
4465+# endif
4466+# define machine_is_ng_fvs338() (machine_arch_type == MACH_TYPE_NG_FVS338)
4467+#else
4468+# define machine_is_ng_fvs338() (0)
4469+#endif
4470+
4471+#ifdef CONFIG_MACH_PNX4103
4472+# ifdef machine_arch_type
4473+# undef machine_arch_type
4474+# define machine_arch_type __machine_arch_type
4475+# else
4476+# define machine_arch_type MACH_TYPE_PNX4103
4477+# endif
4478+# define machine_is_pnx4103() (machine_arch_type == MACH_TYPE_PNX4103)
4479+#else
4480+# define machine_is_pnx4103() (0)
4481+#endif
4482+
4483+#ifdef CONFIG_MACH_HESDB
4484+# ifdef machine_arch_type
4485+# undef machine_arch_type
4486+# define machine_arch_type __machine_arch_type
4487+# else
4488+# define machine_arch_type MACH_TYPE_HESDB
4489+# endif
4490+# define machine_is_hesdb() (machine_arch_type == MACH_TYPE_HESDB)
4491+#else
4492+# define machine_is_hesdb() (0)
4493+#endif
4494+
4495+#ifdef CONFIG_MACH_XSILO
4496+# ifdef machine_arch_type
4497+# undef machine_arch_type
4498+# define machine_arch_type __machine_arch_type
4499+# else
4500+# define machine_arch_type MACH_TYPE_XSILO
4501+# endif
4502+# define machine_is_xsilo() (machine_arch_type == MACH_TYPE_XSILO)
4503+#else
4504+# define machine_is_xsilo() (0)
4505+#endif
4506+
4507+#ifdef CONFIG_MACH_ESPRESSO
4508+# ifdef machine_arch_type
4509+# undef machine_arch_type
4510+# define machine_arch_type __machine_arch_type
4511+# else
4512+# define machine_arch_type MACH_TYPE_ESPRESSO
4513+# endif
4514+# define machine_is_espresso() (machine_arch_type == MACH_TYPE_ESPRESSO)
4515+#else
4516+# define machine_is_espresso() (0)
4517+#endif
4518+
4519+#ifdef CONFIG_MACH_EMLC
4520+# ifdef machine_arch_type
4521+# undef machine_arch_type
4522+# define machine_arch_type __machine_arch_type
4523+# else
4524+# define machine_arch_type MACH_TYPE_EMLC
4525+# endif
4526+# define machine_is_emlc() (machine_arch_type == MACH_TYPE_EMLC)
4527+#else
4528+# define machine_is_emlc() (0)
4529+#endif
4530+
4531+#ifdef CONFIG_MACH_SISTERON
4532+# ifdef machine_arch_type
4533+# undef machine_arch_type
4534+# define machine_arch_type __machine_arch_type
4535+# else
4536+# define machine_arch_type MACH_TYPE_SISTERON
4537+# endif
4538+# define machine_is_sisteron() (machine_arch_type == MACH_TYPE_SISTERON)
4539+#else
4540+# define machine_is_sisteron() (0)
4541+#endif
4542+
4543+#ifdef CONFIG_MACH_RX1950
4544+# ifdef machine_arch_type
4545+# undef machine_arch_type
4546+# define machine_arch_type __machine_arch_type
4547+# else
4548+# define machine_arch_type MACH_TYPE_RX1950
4549+# endif
4550+# define machine_is_rx1950() (machine_arch_type == MACH_TYPE_RX1950)
4551+#else
4552+# define machine_is_rx1950() (0)
4553+#endif
4554+
4555+#ifdef CONFIG_MACH_TSC_VENUS
4556+# ifdef machine_arch_type
4557+# undef machine_arch_type
4558+# define machine_arch_type __machine_arch_type
4559+# else
4560+# define machine_arch_type MACH_TYPE_TSC_VENUS
4561+# endif
4562+# define machine_is_tsc_venus() (machine_arch_type == MACH_TYPE_TSC_VENUS)
4563+#else
4564+# define machine_is_tsc_venus() (0)
4565+#endif
4566+
4567+#ifdef CONFIG_MACH_DS101J
4568+# ifdef machine_arch_type
4569+# undef machine_arch_type
4570+# define machine_arch_type __machine_arch_type
4571+# else
4572+# define machine_arch_type MACH_TYPE_DS101J
4573+# endif
4574+# define machine_is_ds101j() (machine_arch_type == MACH_TYPE_DS101J)
4575+#else
4576+# define machine_is_ds101j() (0)
4577+#endif
4578+
4579+#ifdef CONFIG_MACH_MXC30030ADS
4580+# ifdef machine_arch_type
4581+# undef machine_arch_type
4582+# define machine_arch_type __machine_arch_type
4583+# else
4584+# define machine_arch_type MACH_TYPE_MXC30030ADS
4585+# endif
4586+# define machine_is_mxc30030ads() (machine_arch_type == MACH_TYPE_MXC30030ADS)
4587+#else
4588+# define machine_is_mxc30030ads() (0)
4589+#endif
4590+
4591+#ifdef CONFIG_MACH_FUJITSU_WIMAXSOC
4592+# ifdef machine_arch_type
4593+# undef machine_arch_type
4594+# define machine_arch_type __machine_arch_type
4595+# else
4596+# define machine_arch_type MACH_TYPE_FUJITSU_WIMAXSOC
4597+# endif
4598+# define machine_is_fujitsu_wimaxsoc() (machine_arch_type == MACH_TYPE_FUJITSU_WIMAXSOC)
4599+#else
4600+# define machine_is_fujitsu_wimaxsoc() (0)
4601+#endif
4602+
4603+#ifdef CONFIG_MACH_DUALPCMODEM
4604+# ifdef machine_arch_type
4605+# undef machine_arch_type
4606+# define machine_arch_type __machine_arch_type
4607+# else
4608+# define machine_arch_type MACH_TYPE_DUALPCMODEM
4609+# endif
4610+# define machine_is_dualpcmodem() (machine_arch_type == MACH_TYPE_DUALPCMODEM)
4611+#else
4612+# define machine_is_dualpcmodem() (0)
4613+#endif
4614+
4615+#ifdef CONFIG_MACH_GESBC9312
4616+# ifdef machine_arch_type
4617+# undef machine_arch_type
4618+# define machine_arch_type __machine_arch_type
4619+# else
4620+# define machine_arch_type MACH_TYPE_GESBC9312
4621+# endif
4622+# define machine_is_gesbc9312() (machine_arch_type == MACH_TYPE_GESBC9312)
4623+#else
4624+# define machine_is_gesbc9312() (0)
4625+#endif
4626+
4627+#ifdef CONFIG_MACH_HTCAPACHE
4628+# ifdef machine_arch_type
4629+# undef machine_arch_type
4630+# define machine_arch_type __machine_arch_type
4631+# else
4632+# define machine_arch_type MACH_TYPE_HTCAPACHE
4633+# endif
4634+# define machine_is_htcapache() (machine_arch_type == MACH_TYPE_HTCAPACHE)
4635+#else
4636+# define machine_is_htcapache() (0)
4637+#endif
4638+
4639+#ifdef CONFIG_MACH_IXDP435
4640+# ifdef machine_arch_type
4641+# undef machine_arch_type
4642+# define machine_arch_type __machine_arch_type
4643+# else
4644+# define machine_arch_type MACH_TYPE_IXDP435
4645+# endif
4646+# define machine_is_ixdp435() (machine_arch_type == MACH_TYPE_IXDP435)
4647+#else
4648+# define machine_is_ixdp435() (0)
4649+#endif
4650+
4651+#ifdef CONFIG_MACH_CATPROVT100
4652+# ifdef machine_arch_type
4653+# undef machine_arch_type
4654+# define machine_arch_type __machine_arch_type
4655+# else
4656+# define machine_arch_type MACH_TYPE_CATPROVT100
4657+# endif
4658+# define machine_is_catprovt100() (machine_arch_type == MACH_TYPE_CATPROVT100)
4659+#else
4660+# define machine_is_catprovt100() (0)
4661+#endif
4662+
4663+#ifdef CONFIG_MACH_PICOTUX1XX
4664+# ifdef machine_arch_type
4665+# undef machine_arch_type
4666+# define machine_arch_type __machine_arch_type
4667+# else
4668+# define machine_arch_type MACH_TYPE_PICOTUX1XX
4669+# endif
4670+# define machine_is_picotux1xx() (machine_arch_type == MACH_TYPE_PICOTUX1XX)
4671+#else
4672+# define machine_is_picotux1xx() (0)
4673+#endif
4674+
4675+#ifdef CONFIG_MACH_PICOTUX2XX
4676+# ifdef machine_arch_type
4677+# undef machine_arch_type
4678+# define machine_arch_type __machine_arch_type
4679+# else
4680+# define machine_arch_type MACH_TYPE_PICOTUX2XX
4681+# endif
4682+# define machine_is_picotux2xx() (machine_arch_type == MACH_TYPE_PICOTUX2XX)
4683+#else
4684+# define machine_is_picotux2xx() (0)
4685+#endif
4686+
4687+#ifdef CONFIG_MACH_DSMG600
4688+# ifdef machine_arch_type
4689+# undef machine_arch_type
4690+# define machine_arch_type __machine_arch_type
4691+# else
4692+# define machine_arch_type MACH_TYPE_DSMG600
4693+# endif
4694+# define machine_is_dsmg600() (machine_arch_type == MACH_TYPE_DSMG600)
4695+#else
4696+# define machine_is_dsmg600() (0)
4697+#endif
4698+
4699+#ifdef CONFIG_MACH_EMPC2
4700+# ifdef machine_arch_type
4701+# undef machine_arch_type
4702+# define machine_arch_type __machine_arch_type
4703+# else
4704+# define machine_arch_type MACH_TYPE_EMPC2
4705+# endif
4706+# define machine_is_empc2() (machine_arch_type == MACH_TYPE_EMPC2)
4707+#else
4708+# define machine_is_empc2() (0)
4709+#endif
4710+
4711+#ifdef CONFIG_MACH_VENTURA
4712+# ifdef machine_arch_type
4713+# undef machine_arch_type
4714+# define machine_arch_type __machine_arch_type
4715+# else
4716+# define machine_arch_type MACH_TYPE_VENTURA
4717+# endif
4718+# define machine_is_ventura() (machine_arch_type == MACH_TYPE_VENTURA)
4719+#else
4720+# define machine_is_ventura() (0)
4721+#endif
4722+
4723+#ifdef CONFIG_MACH_PHIDGET_SBC
4724+# ifdef machine_arch_type
4725+# undef machine_arch_type
4726+# define machine_arch_type __machine_arch_type
4727+# else
4728+# define machine_arch_type MACH_TYPE_PHIDGET_SBC
4729+# endif
4730+# define machine_is_phidget_sbc() (machine_arch_type == MACH_TYPE_PHIDGET_SBC)
4731+#else
4732+# define machine_is_phidget_sbc() (0)
4733+#endif
4734+
4735+#ifdef CONFIG_MACH_IJ3K
4736+# ifdef machine_arch_type
4737+# undef machine_arch_type
4738+# define machine_arch_type __machine_arch_type
4739+# else
4740+# define machine_arch_type MACH_TYPE_IJ3K
4741+# endif
4742+# define machine_is_ij3k() (machine_arch_type == MACH_TYPE_IJ3K)
4743+#else
4744+# define machine_is_ij3k() (0)
4745+#endif
4746+
4747+#ifdef CONFIG_MACH_PISGAH
4748+# ifdef machine_arch_type
4749+# undef machine_arch_type
4750+# define machine_arch_type __machine_arch_type
4751+# else
4752+# define machine_arch_type MACH_TYPE_PISGAH
4753+# endif
4754+# define machine_is_pisgah() (machine_arch_type == MACH_TYPE_PISGAH)
4755+#else
4756+# define machine_is_pisgah() (0)
4757+#endif
4758+
4759+#ifdef CONFIG_MACH_OMAP_FSAMPLE
4760+# ifdef machine_arch_type
4761+# undef machine_arch_type
4762+# define machine_arch_type __machine_arch_type
4763+# else
4764+# define machine_arch_type MACH_TYPE_OMAP_FSAMPLE
4765+# endif
4766+# define machine_is_omap_fsample() (machine_arch_type == MACH_TYPE_OMAP_FSAMPLE)
4767+#else
4768+# define machine_is_omap_fsample() (0)
4769+#endif
4770+
4771+#ifdef CONFIG_MACH_SG720
4772+# ifdef machine_arch_type
4773+# undef machine_arch_type
4774+# define machine_arch_type __machine_arch_type
4775+# else
4776+# define machine_arch_type MACH_TYPE_SG720
4777+# endif
4778+# define machine_is_sg720() (machine_arch_type == MACH_TYPE_SG720)
4779+#else
4780+# define machine_is_sg720() (0)
4781+#endif
4782+
4783+#ifdef CONFIG_MACH_REDFOX
4784+# ifdef machine_arch_type
4785+# undef machine_arch_type
4786+# define machine_arch_type __machine_arch_type
4787+# else
4788+# define machine_arch_type MACH_TYPE_REDFOX
4789+# endif
4790+# define machine_is_redfox() (machine_arch_type == MACH_TYPE_REDFOX)
4791+#else
4792+# define machine_is_redfox() (0)
4793+#endif
4794+
4795+#ifdef CONFIG_MACH_MYSH_EP9315_1
4796+# ifdef machine_arch_type
4797+# undef machine_arch_type
4798+# define machine_arch_type __machine_arch_type
4799+# else
4800+# define machine_arch_type MACH_TYPE_MYSH_EP9315_1
4801+# endif
4802+# define machine_is_mysh_ep9315_1() (machine_arch_type == MACH_TYPE_MYSH_EP9315_1)
4803+#else
4804+# define machine_is_mysh_ep9315_1() (0)
4805+#endif
4806+
4807+#ifdef CONFIG_MACH_TPF106
4808+# ifdef machine_arch_type
4809+# undef machine_arch_type
4810+# define machine_arch_type __machine_arch_type
4811+# else
4812+# define machine_arch_type MACH_TYPE_TPF106
4813+# endif
4814+# define machine_is_tpf106() (machine_arch_type == MACH_TYPE_TPF106)
4815+#else
4816+# define machine_is_tpf106() (0)
4817+#endif
4818+
4819+#ifdef CONFIG_MACH_AT91RM9200KG
4820+# ifdef machine_arch_type
4821+# undef machine_arch_type
4822+# define machine_arch_type __machine_arch_type
4823+# else
4824+# define machine_arch_type MACH_TYPE_AT91RM9200KG
4825+# endif
4826+# define machine_is_at91rm9200kg() (machine_arch_type == MACH_TYPE_AT91RM9200KG)
4827+#else
4828+# define machine_is_at91rm9200kg() (0)
4829+#endif
4830+
4831+#ifdef CONFIG_MACH_SLEDB
4832+# ifdef machine_arch_type
4833+# undef machine_arch_type
4834+# define machine_arch_type __machine_arch_type
4835+# else
4836+# define machine_arch_type MACH_TYPE_SLEDB
4837+# endif
4838+# define machine_is_racemt2() (machine_arch_type == MACH_TYPE_SLEDB)
4839+#else
4840+# define machine_is_racemt2() (0)
4841+#endif
4842+
4843+#ifdef CONFIG_MACH_ONTRACK
4844+# ifdef machine_arch_type
4845+# undef machine_arch_type
4846+# define machine_arch_type __machine_arch_type
4847+# else
4848+# define machine_arch_type MACH_TYPE_ONTRACK
4849+# endif
4850+# define machine_is_ontrack() (machine_arch_type == MACH_TYPE_ONTRACK)
4851+#else
4852+# define machine_is_ontrack() (0)
4853+#endif
4854+
4855+#ifdef CONFIG_MACH_PM1200
4856+# ifdef machine_arch_type
4857+# undef machine_arch_type
4858+# define machine_arch_type __machine_arch_type
4859+# else
4860+# define machine_arch_type MACH_TYPE_PM1200
4861+# endif
4862+# define machine_is_pm1200() (machine_arch_type == MACH_TYPE_PM1200)
4863+#else
4864+# define machine_is_pm1200() (0)
4865+#endif
4866+
4867+#ifdef CONFIG_MACH_ESS24XXX
4868+# ifdef machine_arch_type
4869+# undef machine_arch_type
4870+# define machine_arch_type __machine_arch_type
4871+# else
4872+# define machine_arch_type MACH_TYPE_ESS24XXX
4873+# endif
4874+# define machine_is_ess24562() (machine_arch_type == MACH_TYPE_ESS24XXX)
4875+#else
4876+# define machine_is_ess24562() (0)
4877+#endif
4878+
4879+#ifdef CONFIG_MACH_COREMP7
4880+# ifdef machine_arch_type
4881+# undef machine_arch_type
4882+# define machine_arch_type __machine_arch_type
4883+# else
4884+# define machine_arch_type MACH_TYPE_COREMP7
4885+# endif
4886+# define machine_is_coremp7() (machine_arch_type == MACH_TYPE_COREMP7)
4887+#else
4888+# define machine_is_coremp7() (0)
4889+#endif
4890+
4891+#ifdef CONFIG_MACH_NEXCODER_6446
4892+# ifdef machine_arch_type
4893+# undef machine_arch_type
4894+# define machine_arch_type __machine_arch_type
4895+# else
4896+# define machine_arch_type MACH_TYPE_NEXCODER_6446
4897+# endif
4898+# define machine_is_nexcoder_6446() (machine_arch_type == MACH_TYPE_NEXCODER_6446)
4899+#else
4900+# define machine_is_nexcoder_6446() (0)
4901+#endif
4902+
4903+#ifdef CONFIG_MACH_STVC8380
4904+# ifdef machine_arch_type
4905+# undef machine_arch_type
4906+# define machine_arch_type __machine_arch_type
4907+# else
4908+# define machine_arch_type MACH_TYPE_STVC8380
4909+# endif
4910+# define machine_is_stvc8380() (machine_arch_type == MACH_TYPE_STVC8380)
4911+#else
4912+# define machine_is_stvc8380() (0)
4913+#endif
4914+
4915+#ifdef CONFIG_MACH_TEKLYNX
4916+# ifdef machine_arch_type
4917+# undef machine_arch_type
4918+# define machine_arch_type __machine_arch_type
4919+# else
4920+# define machine_arch_type MACH_TYPE_TEKLYNX
4921+# endif
4922+# define machine_is_teklynx() (machine_arch_type == MACH_TYPE_TEKLYNX)
4923+#else
4924+# define machine_is_teklynx() (0)
4925+#endif
4926+
4927+#ifdef CONFIG_MACH_CARBONADO
4928+# ifdef machine_arch_type
4929+# undef machine_arch_type
4930+# define machine_arch_type __machine_arch_type
4931+# else
4932+# define machine_arch_type MACH_TYPE_CARBONADO
4933+# endif
4934+# define machine_is_carbonado() (machine_arch_type == MACH_TYPE_CARBONADO)
4935+#else
4936+# define machine_is_carbonado() (0)
4937+#endif
4938+
4939+#ifdef CONFIG_MACH_SYSMOS_MP730
4940+# ifdef machine_arch_type
4941+# undef machine_arch_type
4942+# define machine_arch_type __machine_arch_type
4943+# else
4944+# define machine_arch_type MACH_TYPE_SYSMOS_MP730
4945+# endif
4946+# define machine_is_sysmos_mp730() (machine_arch_type == MACH_TYPE_SYSMOS_MP730)
4947+#else
4948+# define machine_is_sysmos_mp730() (0)
4949+#endif
4950+
4951+#ifdef CONFIG_MACH_SNAPPER_CL15
4952+# ifdef machine_arch_type
4953+# undef machine_arch_type
4954+# define machine_arch_type __machine_arch_type
4955+# else
4956+# define machine_arch_type MACH_TYPE_SNAPPER_CL15
4957+# endif
4958+# define machine_is_snapper_cl15() (machine_arch_type == MACH_TYPE_SNAPPER_CL15)
4959+#else
4960+# define machine_is_snapper_cl15() (0)
4961+#endif
4962+
4963+#ifdef CONFIG_MACH_PGIGIM
4964+# ifdef machine_arch_type
4965+# undef machine_arch_type
4966+# define machine_arch_type __machine_arch_type
4967+# else
4968+# define machine_arch_type MACH_TYPE_PGIGIM
4969+# endif
4970+# define machine_is_pgigim() (machine_arch_type == MACH_TYPE_PGIGIM)
4971+#else
4972+# define machine_is_pgigim() (0)
4973+#endif
4974+
4975+#ifdef CONFIG_MACH_PTX9160P2
4976+# ifdef machine_arch_type
4977+# undef machine_arch_type
4978+# define machine_arch_type __machine_arch_type
4979+# else
4980+# define machine_arch_type MACH_TYPE_PTX9160P2
4981+# endif
4982+# define machine_is_ptx9160p2() (machine_arch_type == MACH_TYPE_PTX9160P2)
4983+#else
4984+# define machine_is_ptx9160p2() (0)
4985+#endif
4986+
4987+#ifdef CONFIG_MACH_DCORE1
4988+# ifdef machine_arch_type
4989+# undef machine_arch_type
4990+# define machine_arch_type __machine_arch_type
4991+# else
4992+# define machine_arch_type MACH_TYPE_DCORE1
4993+# endif
4994+# define machine_is_dcore1() (machine_arch_type == MACH_TYPE_DCORE1)
4995+#else
4996+# define machine_is_dcore1() (0)
4997+#endif
4998+
4999+#ifdef CONFIG_MACH_VICTORPXA
5000+# ifdef machine_arch_type
5001+# undef machine_arch_type
5002+# define machine_arch_type __machine_arch_type
5003+# else
5004+# define machine_arch_type MACH_TYPE_VICTORPXA
5005+# endif
5006+# define machine_is_victorpxa() (machine_arch_type == MACH_TYPE_VICTORPXA)
5007+#else
5008+# define machine_is_victorpxa() (0)
5009+#endif
5010+
5011+#ifdef CONFIG_MACH_MX2DTB
5012+# ifdef machine_arch_type
5013+# undef machine_arch_type
5014+# define machine_arch_type __machine_arch_type
5015+# else
5016+# define machine_arch_type MACH_TYPE_MX2DTB
5017+# endif
5018+# define machine_is_mx2dtb() (machine_arch_type == MACH_TYPE_MX2DTB)
5019+#else
5020+# define machine_is_mx2dtb() (0)
5021+#endif
5022+
5023+#ifdef CONFIG_MACH_PXA_IREX_ER0100
5024+# ifdef machine_arch_type
5025+# undef machine_arch_type
5026+# define machine_arch_type __machine_arch_type
5027+# else
5028+# define machine_arch_type MACH_TYPE_PXA_IREX_ER0100
5029+# endif
5030+# define machine_is_pxa_irex_er0100() (machine_arch_type == MACH_TYPE_PXA_IREX_ER0100)
5031+#else
5032+# define machine_is_pxa_irex_er0100() (0)
5033+#endif
5034+
5035+#ifdef CONFIG_MACH_OMAP_PALMZ71
5036+# ifdef machine_arch_type
5037+# undef machine_arch_type
5038+# define machine_arch_type __machine_arch_type
5039+# else
5040+# define machine_arch_type MACH_TYPE_OMAP_PALMZ71
5041+# endif
5042+# define machine_is_omap_palmz71() (machine_arch_type == MACH_TYPE_OMAP_PALMZ71)
5043+#else
5044+# define machine_is_omap_palmz71() (0)
5045+#endif
5046+
5047+#ifdef CONFIG_MACH_BARTEC_DEG
5048+# ifdef machine_arch_type
5049+# undef machine_arch_type
5050+# define machine_arch_type __machine_arch_type
5051+# else
5052+# define machine_arch_type MACH_TYPE_BARTEC_DEG
5053+# endif
5054+# define machine_is_bartec_deg() (machine_arch_type == MACH_TYPE_BARTEC_DEG)
5055+#else
5056+# define machine_is_bartec_deg() (0)
5057+#endif
5058+
5059+#ifdef CONFIG_MACH_HW50251
5060+# ifdef machine_arch_type
5061+# undef machine_arch_type
5062+# define machine_arch_type __machine_arch_type
5063+# else
5064+# define machine_arch_type MACH_TYPE_HW50251
5065+# endif
5066+# define machine_is_hw50251() (machine_arch_type == MACH_TYPE_HW50251)
5067+#else
5068+# define machine_is_hw50251() (0)
5069+#endif
5070+
5071+#ifdef CONFIG_MACH_IBOX
5072+# ifdef machine_arch_type
5073+# undef machine_arch_type
5074+# define machine_arch_type __machine_arch_type
5075+# else
5076+# define machine_arch_type MACH_TYPE_IBOX
5077+# endif
5078+# define machine_is_ibox() (machine_arch_type == MACH_TYPE_IBOX)
5079+#else
5080+# define machine_is_ibox() (0)
5081+#endif
5082+
5083+#ifdef CONFIG_MACH_ATLASLH7A404
5084+# ifdef machine_arch_type
5085+# undef machine_arch_type
5086+# define machine_arch_type __machine_arch_type
5087+# else
5088+# define machine_arch_type MACH_TYPE_ATLASLH7A404
5089+# endif
5090+# define machine_is_atlaslh7a404() (machine_arch_type == MACH_TYPE_ATLASLH7A404)
5091+#else
5092+# define machine_is_atlaslh7a404() (0)
5093+#endif
5094+
5095+#ifdef CONFIG_MACH_PT2026
5096+# ifdef machine_arch_type
5097+# undef machine_arch_type
5098+# define machine_arch_type __machine_arch_type
5099+# else
5100+# define machine_arch_type MACH_TYPE_PT2026
5101+# endif
5102+# define machine_is_pt2026() (machine_arch_type == MACH_TYPE_PT2026)
5103+#else
5104+# define machine_is_pt2026() (0)
5105+#endif
5106+
5107+#ifdef CONFIG_MACH_HTCALPINE
5108+# ifdef machine_arch_type
5109+# undef machine_arch_type
5110+# define machine_arch_type __machine_arch_type
5111+# else
5112+# define machine_arch_type MACH_TYPE_HTCALPINE
5113+# endif
5114+# define machine_is_htcalpine() (machine_arch_type == MACH_TYPE_HTCALPINE)
5115+#else
5116+# define machine_is_htcalpine() (0)
5117+#endif
5118+
5119+#ifdef CONFIG_MACH_BARTEC_VTU
5120+# ifdef machine_arch_type
5121+# undef machine_arch_type
5122+# define machine_arch_type __machine_arch_type
5123+# else
5124+# define machine_arch_type MACH_TYPE_BARTEC_VTU
5125+# endif
5126+# define machine_is_bartec_vtu() (machine_arch_type == MACH_TYPE_BARTEC_VTU)
5127+#else
5128+# define machine_is_bartec_vtu() (0)
5129+#endif
5130+
5131+#ifdef CONFIG_MACH_VCOREII
5132+# ifdef machine_arch_type
5133+# undef machine_arch_type
5134+# define machine_arch_type __machine_arch_type
5135+# else
5136+# define machine_arch_type MACH_TYPE_VCOREII
5137+# endif
5138+# define machine_is_vcoreii() (machine_arch_type == MACH_TYPE_VCOREII)
5139+#else
5140+# define machine_is_vcoreii() (0)
5141+#endif
5142+
5143+#ifdef CONFIG_MACH_PDNB3
5144+# ifdef machine_arch_type
5145+# undef machine_arch_type
5146+# define machine_arch_type __machine_arch_type
5147+# else
5148+# define machine_arch_type MACH_TYPE_PDNB3
5149+# endif
5150+# define machine_is_pdnb3() (machine_arch_type == MACH_TYPE_PDNB3)
5151+#else
5152+# define machine_is_pdnb3() (0)
5153+#endif
5154+
5155+#ifdef CONFIG_MACH_HTCBEETLES
5156+# ifdef machine_arch_type
5157+# undef machine_arch_type
5158+# define machine_arch_type __machine_arch_type
5159+# else
5160+# define machine_arch_type MACH_TYPE_HTCBEETLES
5161+# endif
5162+# define machine_is_htcbeetles() (machine_arch_type == MACH_TYPE_HTCBEETLES)
5163+#else
5164+# define machine_is_htcbeetles() (0)
5165+#endif
5166+
5167+#ifdef CONFIG_MACH_S3C6400
5168+# ifdef machine_arch_type
5169+# undef machine_arch_type
5170+# define machine_arch_type __machine_arch_type
5171+# else
5172+# define machine_arch_type MACH_TYPE_S3C6400
5173+# endif
5174+# define machine_is_s3c6400() (machine_arch_type == MACH_TYPE_S3C6400)
5175+#else
5176+# define machine_is_s3c6400() (0)
5177+#endif
5178+
5179+#ifdef CONFIG_MACH_S3C2443
5180+# ifdef machine_arch_type
5181+# undef machine_arch_type
5182+# define machine_arch_type __machine_arch_type
5183+# else
5184+# define machine_arch_type MACH_TYPE_S3C2443
5185+# endif
5186+# define machine_is_s3c2443() (machine_arch_type == MACH_TYPE_S3C2443)
5187+#else
5188+# define machine_is_s3c2443() (0)
5189+#endif
5190+
5191+#ifdef CONFIG_MACH_OMAP_LDK
5192+# ifdef machine_arch_type
5193+# undef machine_arch_type
5194+# define machine_arch_type __machine_arch_type
5195+# else
5196+# define machine_arch_type MACH_TYPE_OMAP_LDK
5197+# endif
5198+# define machine_is_omap_ldk() (machine_arch_type == MACH_TYPE_OMAP_LDK)
5199+#else
5200+# define machine_is_omap_ldk() (0)
5201+#endif
5202+
5203+#ifdef CONFIG_MACH_SMDK2460
5204+# ifdef machine_arch_type
5205+# undef machine_arch_type
5206+# define machine_arch_type __machine_arch_type
5207+# else
5208+# define machine_arch_type MACH_TYPE_SMDK2460
5209+# endif
5210+# define machine_is_smdk2460() (machine_arch_type == MACH_TYPE_SMDK2460)
5211+#else
5212+# define machine_is_smdk2460() (0)
5213+#endif
5214+
5215+#ifdef CONFIG_MACH_SMDK2440
5216+# ifdef machine_arch_type
5217+# undef machine_arch_type
5218+# define machine_arch_type __machine_arch_type
5219+# else
5220+# define machine_arch_type MACH_TYPE_SMDK2440
5221+# endif
5222+# define machine_is_smdk2440() (machine_arch_type == MACH_TYPE_SMDK2440)
5223+#else
5224+# define machine_is_smdk2440() (0)
5225+#endif
5226+
5227+#ifdef CONFIG_MACH_SMDK2412
5228+# ifdef machine_arch_type
5229+# undef machine_arch_type
5230+# define machine_arch_type __machine_arch_type
5231+# else
5232+# define machine_arch_type MACH_TYPE_SMDK2412
5233+# endif
5234+# define machine_is_smdk2412() (machine_arch_type == MACH_TYPE_SMDK2412)
5235+#else
5236+# define machine_is_smdk2412() (0)
5237+#endif
5238+
5239+#ifdef CONFIG_MACH_WEBBOX
5240+# ifdef machine_arch_type
5241+# undef machine_arch_type
5242+# define machine_arch_type __machine_arch_type
5243+# else
5244+# define machine_arch_type MACH_TYPE_WEBBOX
5245+# endif
5246+# define machine_is_webbox() (machine_arch_type == MACH_TYPE_WEBBOX)
5247+#else
5248+# define machine_is_webbox() (0)
5249+#endif
5250+
5251+#ifdef CONFIG_MACH_CWWNDP
5252+# ifdef machine_arch_type
5253+# undef machine_arch_type
5254+# define machine_arch_type __machine_arch_type
5255+# else
5256+# define machine_arch_type MACH_TYPE_CWWNDP
5257+# endif
5258+# define machine_is_cwwndp() (machine_arch_type == MACH_TYPE_CWWNDP)
5259+#else
5260+# define machine_is_cwwndp() (0)
5261+#endif
5262+
5263+#ifdef CONFIG_MACH_DRAGON
5264+# ifdef machine_arch_type
5265+# undef machine_arch_type
5266+# define machine_arch_type __machine_arch_type
5267+# else
5268+# define machine_arch_type MACH_TYPE_DRAGON
5269+# endif
5270+# define machine_is_dragon() (machine_arch_type == MACH_TYPE_DRAGON)
5271+#else
5272+# define machine_is_dragon() (0)
5273+#endif
5274+
5275+#ifdef CONFIG_MACH_OPENDO_CPU_BOARD
5276+# ifdef machine_arch_type
5277+# undef machine_arch_type
5278+# define machine_arch_type __machine_arch_type
5279+# else
5280+# define machine_arch_type MACH_TYPE_OPENDO_CPU_BOARD
5281+# endif
5282+# define machine_is_opendo_cpu_board() (machine_arch_type == MACH_TYPE_OPENDO_CPU_BOARD)
5283+#else
5284+# define machine_is_opendo_cpu_board() (0)
5285+#endif
5286+
5287+#ifdef CONFIG_MACH_CCM2200
5288+# ifdef machine_arch_type
5289+# undef machine_arch_type
5290+# define machine_arch_type __machine_arch_type
5291+# else
5292+# define machine_arch_type MACH_TYPE_CCM2200
5293+# endif
5294+# define machine_is_ccm2200() (machine_arch_type == MACH_TYPE_CCM2200)
5295+#else
5296+# define machine_is_ccm2200() (0)
5297+#endif
5298+
5299+#ifdef CONFIG_MACH_ETWARM
5300+# ifdef machine_arch_type
5301+# undef machine_arch_type
5302+# define machine_arch_type __machine_arch_type
5303+# else
5304+# define machine_arch_type MACH_TYPE_ETWARM
5305+# endif
5306+# define machine_is_etwarm() (machine_arch_type == MACH_TYPE_ETWARM)
5307+#else
5308+# define machine_is_etwarm() (0)
5309+#endif
5310+
5311+#ifdef CONFIG_MACH_M93030
5312+# ifdef machine_arch_type
5313+# undef machine_arch_type
5314+# define machine_arch_type __machine_arch_type
5315+# else
5316+# define machine_arch_type MACH_TYPE_M93030
5317+# endif
5318+# define machine_is_m93030() (machine_arch_type == MACH_TYPE_M93030)
5319+#else
5320+# define machine_is_m93030() (0)
5321+#endif
5322+
5323+#ifdef CONFIG_MACH_CC7U
5324+# ifdef machine_arch_type
5325+# undef machine_arch_type
5326+# define machine_arch_type __machine_arch_type
5327+# else
5328+# define machine_arch_type MACH_TYPE_CC7U
5329+# endif
5330+# define machine_is_cc7u() (machine_arch_type == MACH_TYPE_CC7U)
5331+#else
5332+# define machine_is_cc7u() (0)
5333+#endif
5334+
5335+#ifdef CONFIG_MACH_MTT_RANGER
5336+# ifdef machine_arch_type
5337+# undef machine_arch_type
5338+# define machine_arch_type __machine_arch_type
5339+# else
5340+# define machine_arch_type MACH_TYPE_MTT_RANGER
5341+# endif
5342+# define machine_is_mtt_ranger() (machine_arch_type == MACH_TYPE_MTT_RANGER)
5343+#else
5344+# define machine_is_mtt_ranger() (0)
5345+#endif
5346+
5347+#ifdef CONFIG_MACH_NEXUS
5348+# ifdef machine_arch_type
5349+# undef machine_arch_type
5350+# define machine_arch_type __machine_arch_type
5351+# else
5352+# define machine_arch_type MACH_TYPE_NEXUS
5353+# endif
5354+# define machine_is_nexus() (machine_arch_type == MACH_TYPE_NEXUS)
5355+#else
5356+# define machine_is_nexus() (0)
5357+#endif
5358+
5359+#ifdef CONFIG_MACH_DESMAN
5360+# ifdef machine_arch_type
5361+# undef machine_arch_type
5362+# define machine_arch_type __machine_arch_type
5363+# else
5364+# define machine_arch_type MACH_TYPE_DESMAN
5365+# endif
5366+# define machine_is_desman() (machine_arch_type == MACH_TYPE_DESMAN)
5367+#else
5368+# define machine_is_desman() (0)
5369+#endif
5370+
5371+#ifdef CONFIG_MACH_BKDE303
5372+# ifdef machine_arch_type
5373+# undef machine_arch_type
5374+# define machine_arch_type __machine_arch_type
5375+# else
5376+# define machine_arch_type MACH_TYPE_BKDE303
5377+# endif
5378+# define machine_is_bkde303() (machine_arch_type == MACH_TYPE_BKDE303)
5379+#else
5380+# define machine_is_bkde303() (0)
5381+#endif
5382+
5383+#ifdef CONFIG_MACH_SMDK2413
5384+# ifdef machine_arch_type
5385+# undef machine_arch_type
5386+# define machine_arch_type __machine_arch_type
5387+# else
5388+# define machine_arch_type MACH_TYPE_SMDK2413
5389+# endif
5390+# define machine_is_smdk2413() (machine_arch_type == MACH_TYPE_SMDK2413)
5391+#else
5392+# define machine_is_smdk2413() (0)
5393+#endif
5394+
5395+#ifdef CONFIG_MACH_AML_M7200
5396+# ifdef machine_arch_type
5397+# undef machine_arch_type
5398+# define machine_arch_type __machine_arch_type
5399+# else
5400+# define machine_arch_type MACH_TYPE_AML_M7200
5401+# endif
5402+# define machine_is_aml_m7200() (machine_arch_type == MACH_TYPE_AML_M7200)
5403+#else
5404+# define machine_is_aml_m7200() (0)
5405+#endif
5406+
5407+#ifdef CONFIG_MACH_AML_M5900
5408+# ifdef machine_arch_type
5409+# undef machine_arch_type
5410+# define machine_arch_type __machine_arch_type
5411+# else
5412+# define machine_arch_type MACH_TYPE_AML_M5900
5413+# endif
5414+# define machine_is_aml_m5900() (machine_arch_type == MACH_TYPE_AML_M5900)
5415+#else
5416+# define machine_is_aml_m5900() (0)
5417+#endif
5418+
5419+#ifdef CONFIG_MACH_SG640
5420+# ifdef machine_arch_type
5421+# undef machine_arch_type
5422+# define machine_arch_type __machine_arch_type
5423+# else
5424+# define machine_arch_type MACH_TYPE_SG640
5425+# endif
5426+# define machine_is_sg640() (machine_arch_type == MACH_TYPE_SG640)
5427+#else
5428+# define machine_is_sg640() (0)
5429+#endif
5430+
5431+#ifdef CONFIG_MACH_EDG79524
5432+# ifdef machine_arch_type
5433+# undef machine_arch_type
5434+# define machine_arch_type __machine_arch_type
5435+# else
5436+# define machine_arch_type MACH_TYPE_EDG79524
5437+# endif
5438+# define machine_is_edg79524() (machine_arch_type == MACH_TYPE_EDG79524)
5439+#else
5440+# define machine_is_edg79524() (0)
5441+#endif
5442+
5443+#ifdef CONFIG_MACH_AI2410
5444+# ifdef machine_arch_type
5445+# undef machine_arch_type
5446+# define machine_arch_type __machine_arch_type
5447+# else
5448+# define machine_arch_type MACH_TYPE_AI2410
5449+# endif
5450+# define machine_is_ai2410() (machine_arch_type == MACH_TYPE_AI2410)
5451+#else
5452+# define machine_is_ai2410() (0)
5453+#endif
5454+
5455+#ifdef CONFIG_MACH_IXP465
5456+# ifdef machine_arch_type
5457+# undef machine_arch_type
5458+# define machine_arch_type __machine_arch_type
5459+# else
5460+# define machine_arch_type MACH_TYPE_IXP465
5461+# endif
5462+# define machine_is_ixp465() (machine_arch_type == MACH_TYPE_IXP465)
5463+#else
5464+# define machine_is_ixp465() (0)
5465+#endif
5466+
5467+#ifdef CONFIG_MACH_BALLOON3
5468+# ifdef machine_arch_type
5469+# undef machine_arch_type
5470+# define machine_arch_type __machine_arch_type
5471+# else
5472+# define machine_arch_type MACH_TYPE_BALLOON3
5473+# endif
5474+# define machine_is_balloon3() (machine_arch_type == MACH_TYPE_BALLOON3)
5475+#else
5476+# define machine_is_balloon3() (0)
5477+#endif
5478+
5479+#ifdef CONFIG_MACH_HEINS
5480+# ifdef machine_arch_type
5481+# undef machine_arch_type
5482+# define machine_arch_type __machine_arch_type
5483+# else
5484+# define machine_arch_type MACH_TYPE_HEINS
5485+# endif
5486+# define machine_is_heins() (machine_arch_type == MACH_TYPE_HEINS)
5487+#else
5488+# define machine_is_heins() (0)
5489+#endif
5490+
5491+#ifdef CONFIG_MACH_MPLUSEVA
5492+# ifdef machine_arch_type
5493+# undef machine_arch_type
5494+# define machine_arch_type __machine_arch_type
5495+# else
5496+# define machine_arch_type MACH_TYPE_MPLUSEVA
5497+# endif
5498+# define machine_is_mpluseva() (machine_arch_type == MACH_TYPE_MPLUSEVA)
5499+#else
5500+# define machine_is_mpluseva() (0)
5501+#endif
5502+
5503+#ifdef CONFIG_MACH_RT042
5504+# ifdef machine_arch_type
5505+# undef machine_arch_type
5506+# define machine_arch_type __machine_arch_type
5507+# else
5508+# define machine_arch_type MACH_TYPE_RT042
5509+# endif
5510+# define machine_is_rt042() (machine_arch_type == MACH_TYPE_RT042)
5511+#else
5512+# define machine_is_rt042() (0)
5513+#endif
5514+
5515+#ifdef CONFIG_MACH_CWIEM
5516+# ifdef machine_arch_type
5517+# undef machine_arch_type
5518+# define machine_arch_type __machine_arch_type
5519+# else
5520+# define machine_arch_type MACH_TYPE_CWIEM
5521+# endif
5522+# define machine_is_cwiem() (machine_arch_type == MACH_TYPE_CWIEM)
5523+#else
5524+# define machine_is_cwiem() (0)
5525+#endif
5526+
5527+#ifdef CONFIG_MACH_CM_X270
5528+# ifdef machine_arch_type
5529+# undef machine_arch_type
5530+# define machine_arch_type __machine_arch_type
5531+# else
5532+# define machine_arch_type MACH_TYPE_CM_X270
5533+# endif
5534+# define machine_is_cm_x270() (machine_arch_type == MACH_TYPE_CM_X270)
5535+#else
5536+# define machine_is_cm_x270() (0)
5537+#endif
5538+
5539+#ifdef CONFIG_MACH_CM_X255
5540+# ifdef machine_arch_type
5541+# undef machine_arch_type
5542+# define machine_arch_type __machine_arch_type
5543+# else
5544+# define machine_arch_type MACH_TYPE_CM_X255
5545+# endif
5546+# define machine_is_cm_x255() (machine_arch_type == MACH_TYPE_CM_X255)
5547+#else
5548+# define machine_is_cm_x255() (0)
5549+#endif
5550+
5551+#ifdef CONFIG_MACH_ESH_AT91
5552+# ifdef machine_arch_type
5553+# undef machine_arch_type
5554+# define machine_arch_type __machine_arch_type
5555+# else
5556+# define machine_arch_type MACH_TYPE_ESH_AT91
5557+# endif
5558+# define machine_is_esh_at91() (machine_arch_type == MACH_TYPE_ESH_AT91)
5559+#else
5560+# define machine_is_esh_at91() (0)
5561+#endif
5562+
5563+#ifdef CONFIG_MACH_SANDGATE3
5564+# ifdef machine_arch_type
5565+# undef machine_arch_type
5566+# define machine_arch_type __machine_arch_type
5567+# else
5568+# define machine_arch_type MACH_TYPE_SANDGATE3
5569+# endif
5570+# define machine_is_sandgate3() (machine_arch_type == MACH_TYPE_SANDGATE3)
5571+#else
5572+# define machine_is_sandgate3() (0)
5573+#endif
5574+
5575+#ifdef CONFIG_MACH_PRIMO
5576+# ifdef machine_arch_type
5577+# undef machine_arch_type
5578+# define machine_arch_type __machine_arch_type
5579+# else
5580+# define machine_arch_type MACH_TYPE_PRIMO
5581+# endif
5582+# define machine_is_primo() (machine_arch_type == MACH_TYPE_PRIMO)
5583+#else
5584+# define machine_is_primo() (0)
5585+#endif
5586+
5587+#ifdef CONFIG_MACH_GEMSTONE
5588+# ifdef machine_arch_type
5589+# undef machine_arch_type
5590+# define machine_arch_type __machine_arch_type
5591+# else
5592+# define machine_arch_type MACH_TYPE_GEMSTONE
5593+# endif
5594+# define machine_is_gemstone() (machine_arch_type == MACH_TYPE_GEMSTONE)
5595+#else
5596+# define machine_is_gemstone() (0)
5597+#endif
5598+
5599+#ifdef CONFIG_MACH_PRONGHORNMETRO
5600+# ifdef machine_arch_type
5601+# undef machine_arch_type
5602+# define machine_arch_type __machine_arch_type
5603+# else
5604+# define machine_arch_type MACH_TYPE_PRONGHORNMETRO
5605+# endif
5606+# define machine_is_pronghorn_metro() (machine_arch_type == MACH_TYPE_PRONGHORNMETRO)
5607+#else
5608+# define machine_is_pronghorn_metro() (0)
5609+#endif
5610+
5611+#ifdef CONFIG_MACH_SIDEWINDER
5612+# ifdef machine_arch_type
5613+# undef machine_arch_type
5614+# define machine_arch_type __machine_arch_type
5615+# else
5616+# define machine_arch_type MACH_TYPE_SIDEWINDER
5617+# endif
5618+# define machine_is_sidewinder() (machine_arch_type == MACH_TYPE_SIDEWINDER)
5619+#else
5620+# define machine_is_sidewinder() (0)
5621+#endif
5622+
5623+#ifdef CONFIG_MACH_PICOMOD1
5624+# ifdef machine_arch_type
5625+# undef machine_arch_type
5626+# define machine_arch_type __machine_arch_type
5627+# else
5628+# define machine_arch_type MACH_TYPE_PICOMOD1
5629+# endif
5630+# define machine_is_picomod1() (machine_arch_type == MACH_TYPE_PICOMOD1)
5631+#else
5632+# define machine_is_picomod1() (0)
5633+#endif
5634+
5635+#ifdef CONFIG_MACH_SG590
5636+# ifdef machine_arch_type
5637+# undef machine_arch_type
5638+# define machine_arch_type __machine_arch_type
5639+# else
5640+# define machine_arch_type MACH_TYPE_SG590
5641+# endif
5642+# define machine_is_sg590() (machine_arch_type == MACH_TYPE_SG590)
5643+#else
5644+# define machine_is_sg590() (0)
5645+#endif
5646+
5647+#ifdef CONFIG_MACH_AKAI9307
5648+# ifdef machine_arch_type
5649+# undef machine_arch_type
5650+# define machine_arch_type __machine_arch_type
5651+# else
5652+# define machine_arch_type MACH_TYPE_AKAI9307
5653+# endif
5654+# define machine_is_akai9307() (machine_arch_type == MACH_TYPE_AKAI9307)
5655+#else
5656+# define machine_is_akai9307() (0)
5657+#endif
5658+
5659+#ifdef CONFIG_MACH_FONTAINE
5660+# ifdef machine_arch_type
5661+# undef machine_arch_type
5662+# define machine_arch_type __machine_arch_type
5663+# else
5664+# define machine_arch_type MACH_TYPE_FONTAINE
5665+# endif
5666+# define machine_is_fontaine() (machine_arch_type == MACH_TYPE_FONTAINE)
5667+#else
5668+# define machine_is_fontaine() (0)
5669+#endif
5670+
5671+#ifdef CONFIG_MACH_WOMBAT
5672+# ifdef machine_arch_type
5673+# undef machine_arch_type
5674+# define machine_arch_type __machine_arch_type
5675+# else
5676+# define machine_arch_type MACH_TYPE_WOMBAT
5677+# endif
5678+# define machine_is_wombat() (machine_arch_type == MACH_TYPE_WOMBAT)
5679+#else
5680+# define machine_is_wombat() (0)
5681+#endif
5682+
5683+#ifdef CONFIG_MACH_ACQ300
5684+# ifdef machine_arch_type
5685+# undef machine_arch_type
5686+# define machine_arch_type __machine_arch_type
5687+# else
5688+# define machine_arch_type MACH_TYPE_ACQ300
5689+# endif
5690+# define machine_is_acq300() (machine_arch_type == MACH_TYPE_ACQ300)
5691+#else
5692+# define machine_is_acq300() (0)
5693+#endif
5694+
5695+#ifdef CONFIG_MACH_MOD_270
5696+# ifdef machine_arch_type
5697+# undef machine_arch_type
5698+# define machine_arch_type __machine_arch_type
5699+# else
5700+# define machine_arch_type MACH_TYPE_MOD_270
5701+# endif
5702+# define machine_is_mod_270() (machine_arch_type == MACH_TYPE_MOD_270)
5703+#else
5704+# define machine_is_mod_270() (0)
5705+#endif
5706+
5707+#ifdef CONFIG_MACH_VC0820
5708+# ifdef machine_arch_type
5709+# undef machine_arch_type
5710+# define machine_arch_type __machine_arch_type
5711+# else
5712+# define machine_arch_type MACH_TYPE_VC0820
5713+# endif
5714+# define machine_is_vmc_vc0820() (machine_arch_type == MACH_TYPE_VC0820)
5715+#else
5716+# define machine_is_vmc_vc0820() (0)
5717+#endif
5718+
5719+#ifdef CONFIG_MACH_ANI_AIM
5720+# ifdef machine_arch_type
5721+# undef machine_arch_type
5722+# define machine_arch_type __machine_arch_type
5723+# else
5724+# define machine_arch_type MACH_TYPE_ANI_AIM
5725+# endif
5726+# define machine_is_ani_aim() (machine_arch_type == MACH_TYPE_ANI_AIM)
5727+#else
5728+# define machine_is_ani_aim() (0)
5729+#endif
5730+
5731+#ifdef CONFIG_MACH_JELLYFISH
5732+# ifdef machine_arch_type
5733+# undef machine_arch_type
5734+# define machine_arch_type __machine_arch_type
5735+# else
5736+# define machine_arch_type MACH_TYPE_JELLYFISH
5737+# endif
5738+# define machine_is_jellyfish() (machine_arch_type == MACH_TYPE_JELLYFISH)
5739+#else
5740+# define machine_is_jellyfish() (0)
5741+#endif
5742+
5743+#ifdef CONFIG_MACH_AMANITA
5744+# ifdef machine_arch_type
5745+# undef machine_arch_type
5746+# define machine_arch_type __machine_arch_type
5747+# else
5748+# define machine_arch_type MACH_TYPE_AMANITA
5749+# endif
5750+# define machine_is_amanita() (machine_arch_type == MACH_TYPE_AMANITA)
5751+#else
5752+# define machine_is_amanita() (0)
5753+#endif
5754+
5755+#ifdef CONFIG_MACH_VLINK
5756+# ifdef machine_arch_type
5757+# undef machine_arch_type
5758+# define machine_arch_type __machine_arch_type
5759+# else
5760+# define machine_arch_type MACH_TYPE_VLINK
5761+# endif
5762+# define machine_is_vlink() (machine_arch_type == MACH_TYPE_VLINK)
5763+#else
5764+# define machine_is_vlink() (0)
5765+#endif
5766+
5767 /*
5768  * These have not yet been registered
5769  */
5770diff -Naur u-boot-1.1.4.org/include/config.h u-boot-1.1.4.tmp/include/config.h
5771+++ u-boot-1.1.4.tmp/include/config.h 2006-06-05 05:03:47.000000000 +0200
5772@@ -1,2 +1,2 @@
5773 /* Automatically generated - do not edit */
5774-#include <configs/at91rm9200dk.h>
5775+#include <configs/vlink.h>
5776diff -Naur u-boot-1.1.4.org/include/config.mk u-boot-1.1.4.tmp/include/config.mk
5777+++ u-boot-1.1.4.tmp/include/config.mk 2006-06-05 05:03:47.000000000 +0200
5778@@ -1,4 +1,4 @@
5779 ARCH = arm
5780 CPU = arm920t
5781-BOARD = at91rm9200dk
5782+BOARD = vlink
5783 SOC = at91rm9200
5784diff -Naur u-boot-1.1.4.org/include/configs/vlink.h u-boot-1.1.4.tmp/include/configs/vlink.h
5785+++ u-boot-1.1.4.tmp/include/configs/vlink.h 2006-06-05 03:37:15.000000000 +0200
5786@@ -0,0 +1,244 @@
5787+/*
5788+ * Hamish Guthrie <hamish@prodigi.ch>
5789+ *
5790+ * Configuation settings for the Figment Designs Versalink board.
5791+ *
5792+ * See file CREDITS for list of people who contributed to this
5793+ * project.
5794+ *
5795+ * This program is free software; you can redistribute it and/or
5796+ * modify it under the terms of the GNU General Public License as
5797+ * published by the Free Software Foundation; either version 2 of
5798+ * the License, or (at your option) any later version.
5799+ *
5800+ * This program is distributed in the hope that it will be useful,
5801+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
5802+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5803+ * GNU General Public License for more details.
5804+ *
5805+ * You should have received a copy of the GNU General Public License
5806+ * along with this program; if not, write to the Free Software
5807+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
5808+ * MA 02111-1307 USA
5809+ */
5810+
5811+#ifndef __CONFIG_H
5812+#define __CONFIG_H
5813+
5814+// Added 2 defines to skip re-init lowlevel and relocate HCG HLH
5815+//
5816+#define CONFIG_SKIP_LOWLEVEL_INIT
5817+#define CONFIG_SKIP_RELOCATE_UBOOT
5818+
5819+/* ARM asynchronous clock */
5820+#define AT91C_MAIN_CLOCK 179712000 /* from 18.432 MHz crystal (18432000 / 4 * 39) */
5821+#define AT91C_MASTER_CLOCK 59904000 /* peripheral clock (AT91C_MASTER_CLOCK / 3) */
5822+/* #define AT91C_MASTER_CLOCK 44928000 */ /* peripheral clock (AT91C_MASTER_CLOCK / 4) */
5823+
5824+#define AT91_SLOW_CLOCK 32768 /* slow clock */
5825+
5826+#define CONFIG_ARM920T 1 /* This is an ARM920T Core */
5827+#define CONFIG_AT91RM9200 1 /* It's an Atmel AT91RM9200 SoC */
5828+#define CONFIG_VLINK 1 /* on a Versalink Board */
5829+#define CONFIG_IDENT_STRING " FDL Versalink"
5830+#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
5831+#define USE_920T_MMU 1
5832+
5833+#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
5834+#define CONFIG_SETUP_MEMORY_TAGS 1
5835+#define CONFIG_INITRD_TAG 1
5836+
5837+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
5838+#define CFG_USE_MAIN_OSCILLATOR 1
5839+/* flash */
5840+#define MC_PUIA_VAL 0x00000000
5841+#define MC_PUP_VAL 0x00000000
5842+#define MC_PUER_VAL 0x00000000
5843+#define MC_ASR_VAL 0x00000000
5844+#define MC_AASR_VAL 0x00000000
5845+#define EBI_CFGR_VAL 0x00000000
5846+#define SMC2_CSR_VAL 0x00003284 /* 16bit, 2 TDF, 4 WS */
5847+
5848+/* clocks */
5849+#define PLLAR_VAL 0x20263E04 /* 179.712000 MHz for PCK */
5850+#define PLLBR_VAL 0x10483E0E /* 48.054857 MHz (divider by 2 for USB) */
5851+#define MCKR_VAL 0x00000202 /* PCK/3 = MCK Master Clock = 59.904000MHz from PLLA */
5852+
5853+/* sdram */
5854+#define PIOC_ASR_VAL 0xFFFF0000 /* Configure PIOC as peripheral (D16/D31) */
5855+#define PIOC_BSR_VAL 0x00000000
5856+#define PIOC_PDR_VAL 0xFFFF0000
5857+#define EBI_CSA_VAL 0x00000002 /* CS1=SDRAM */
5858+#define SDRC_CR_VAL 0x2188c155 /* set up the SDRAM */
5859+#define SDRAM 0x20000000 /* address of the SDRAM */
5860+#define SDRAM1 0x20000080 /* address of the SDRAM */
5861+#define SDRAM_VAL 0x00000000 /* value written to SDRAM */
5862+#define SDRC_MR_VAL 0x00000002 /* Precharge All */
5863+#define SDRC_MR_VAL1 0x00000004 /* refresh */
5864+#define SDRC_MR_VAL2 0x00000003 /* Load Mode Register */
5865+#define SDRC_MR_VAL3 0x00000000 /* Normal Mode */
5866+#define SDRC_TR_VAL 0x000002E0 /* Write refresh rate */
5867+#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
5868+/*
5869+ * Size of malloc() pool
5870+ */
5871+#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024)
5872+#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
5873+
5874+#define CONFIG_BAUDRATE 115200
5875+
5876+/*
5877+ * Hardware drivers
5878+ */
5879+
5880+/* define one of these to choose the DBGU, USART0 or USART1 as console */
5881+#define CONFIG_DBGU
5882+#undef CONFIG_USART0
5883+#undef CONFIG_USART1
5884+
5885+#undef CONFIG_HWFLOW /* don't include RTS/CTS flow control support */
5886+
5887+#undef CONFIG_MODEM_SUPPORT /* disable modem initialization stuff */
5888+
5889+#define CONFIG_BOOTDELAY 3
5890+/* #define CONFIG_ENV_OVERWRITE 1 */
5891+
5892+#define CONFIG_COMMANDS \
5893+ ((CONFIG_CMD_DFL | CFG_CMD_MII |\
5894+ CFG_CMD_DHCP ) & \
5895+ ~(CFG_CMD_BDI | \
5896+ CFG_CMD_IMI | \
5897+ CFG_CMD_AUTOSCRIPT | \
5898+ CFG_CMD_FPGA | \
5899+ CFG_CMD_MISC | \
5900+ CFG_CMD_LOADS ))
5901+
5902+/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
5903+#include <cmd_confdefs.h>
5904+
5905+#ifndef CONFIG_VLINK
5906+#define CFG_MAX_NAND_DEVICE 1 /* Max number of NAND devices */
5907+#define SECTORSIZE 512
5908+
5909+#define ADDR_COLUMN 1
5910+#define ADDR_PAGE 2
5911+#define ADDR_COLUMN_PAGE 3
5912+
5913+#define NAND_ChipID_UNKNOWN 0x00
5914+#define NAND_MAX_FLOORS 1
5915+#define NAND_MAX_CHIPS 1
5916+
5917+#define AT91_SMART_MEDIA_ALE (1 << 22) /* our ALE is AD22 */
5918+#define AT91_SMART_MEDIA_CLE (1 << 21) /* our CLE is AD21 */
5919+
5920+#define NAND_DISABLE_CE(nand) do { *AT91C_PIOC_SODR = AT91C_PIO_PC0;} while(0)
5921+#define NAND_ENABLE_CE(nand) do { *AT91C_PIOC_CODR = AT91C_PIO_PC0;} while(0)
5922+
5923+#define NAND_WAIT_READY(nand) while (!(*AT91C_PIOC_PDSR & AT91C_PIO_PC2))
5924+
5925+#define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr | AT91_SMART_MEDIA_CLE) = (__u8)(d); } while(0)
5926+#define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr | AT91_SMART_MEDIA_ALE) = (__u8)(d); } while(0)
5927+#define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
5928+#define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
5929+/* the following are NOP's in our implementation */
5930+#define NAND_CTL_CLRALE(nandptr)
5931+#define NAND_CTL_SETALE(nandptr)
5932+#define NAND_CTL_CLRCLE(nandptr)
5933+#define NAND_CTL_SETCLE(nandptr)
5934+#endif
5935+
5936+#define CONFIG_NR_DRAM_BANKS 1
5937+#define PHYS_SDRAM 0x20000000
5938+#define PHYS_SDRAM_SIZE 0x2000000 /* 32 megs */
5939+
5940+#define CFG_MEMTEST_START PHYS_SDRAM
5941+#define CFG_MEMTEST_END CFG_MEMTEST_START + PHYS_SDRAM_SIZE - 262144
5942+
5943+#define CONFIG_DRIVER_ETHER
5944+#define CONFIG_NET_RETRY_COUNT 20
5945+#define CONFIG_AT91C_USE_RMII
5946+
5947+#define CONFIG_HAS_DATAFLASH 1
5948+#define CFG_SPI_WRITE_TOUT (5*CFG_HZ)
5949+#define CFG_MAX_DATAFLASH_BANKS 2
5950+#define CFG_MAX_DATAFLASH_PAGES 16384
5951+#define CFG_DATAFLASH_LOGIC_ADDR_CS0 0xC0000000 /* Logical adress for CS0 */
5952+#define CFG_DATAFLASH_LOGIC_ADDR_CS3 0xD0000000 /* Logical adress for CS3 */
5953+
5954+#ifdef CONFIG_VLINK
5955+#define PHYS_FLASH_1 0x10000000
5956+#define PHYS_FLASH_SIZE 0x200000 /* 2 megs main flash */
5957+#define CFG_FLASH_BASE PHYS_FLASH_1
5958+#define CFG_MAX_FLASH_BANKS 1
5959+#define CFG_MAX_FLASH_SECT 256
5960+#define CFG_FLASH_ERASE_TOUT (2*CFG_HZ) /* Timeout for Flash Erase */
5961+#define CFG_FLASH_WRITE_TOUT (2*CFG_HZ) /* Timeout for Flash Write */
5962+#endif
5963+
5964+#define CFG_ENV_IS_IN_DATAFLASH
5965+
5966+#ifdef CFG_ENV_IS_IN_DATAFLASH
5967+#define CFG_ENV_OFFSET 0x21000
5968+#define CFG_ENV_ADDR (CFG_DATAFLASH_LOGIC_ADDR_CS0 + CFG_ENV_OFFSET)
5969+#define CFG_ENV_SIZE 0x8400 /* 0x8000 */
5970+#else
5971+#define CFG_ENV_IS_IN_FLASH 1
5972+#ifdef CONFIG_SKIP_LOWLEVEL_INIT
5973+#define CFG_ENV_ADDR (PHYS_FLASH_1 + 0x60000) /* after u-boot.bin */
5974+#define CFG_ENV_SIZE 0x10000 /* sectors are 64K here */
5975+#else
5976+#define CFG_ENV_ADDR (PHYS_FLASH_1 + 0xe000) /* between boot.bin and u-boot.bin.gz */
5977+#define CFG_ENV_SIZE 0x2000 /* 0x8000 */
5978+#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
5979+#endif /* CFG_ENV_IS_IN_DATAFLASH */
5980+
5981+
5982+#define CFG_LOAD_ADDR 0x21000000 /* default load address */
5983+
5984+#ifdef CONFIG_SKIP_LOWLEVEL_INIT
5985+#define CFG_BOOT_SIZE 0x00 /* 0 KBytes */
5986+#define CFG_U_BOOT_BASE PHYS_FLASH_1
5987+#define CFG_U_BOOT_SIZE 0x60000 /* 384 KBytes */
5988+#else
5989+#define CFG_BOOT_SIZE 0x6000 /* 24 KBytes */
5990+#define CFG_U_BOOT_BASE (PHYS_FLASH_1 + 0x10000)
5991+#define CFG_U_BOOT_SIZE 0x10000 /* 64 KBytes */
5992+#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
5993+
5994+#define CFG_BAUDRATE_TABLE {115200 , 19200, 38400, 57600, 9600 }
5995+
5996+#define CFG_PROMPT "U-Boot> " /* Monitor Command Prompt */
5997+#define CFG_CBSIZE 256 /* Console I/O Buffer Size */
5998+#define CFG_MAXARGS 16 /* max number of command args */
5999+#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
6000+
6001+#ifndef __ASSEMBLY__
6002+/*-----------------------------------------------------------------------
6003+ * Board specific extension for bd_info
6004+ *
6005+ * This structure is embedded in the global bd_info (bd_t) structure
6006+ * and can be used by the board specific code (eg board/...)
6007+ */
6008+
6009+struct bd_info_ext {
6010+ /* helper variable for board environment handling
6011+ *
6012+ * env_crc_valid == 0 => uninitialised
6013+ * env_crc_valid > 0 => environment crc in flash is valid
6014+ * env_crc_valid < 0 => environment crc in flash is invalid
6015+ */
6016+ int env_crc_valid;
6017+};
6018+#endif
6019+
6020+#define CFG_HZ 1000
6021+#define CFG_HZ_CLOCK AT91C_MASTER_CLOCK/2 /* AT91C_TC0_CMR is implicitly set to */
6022+ /* AT91C_TC_TIMER_DIV1_CLOCK */
6023+
6024+#define CONFIG_STACKSIZE (32*1024) /* regular stack */
6025+
6026+#ifdef CONFIG_USE_IRQ
6027+#error CONFIG_USE_IRQ not supported
6028+#endif
6029+
6030+#endif
6031diff -Naur u-boot-1.1.4.org/MAKEALL u-boot-1.1.4.tmp/MAKEALL
6032+++ u-boot-1.1.4.tmp/MAKEALL 2006-06-05 02:44:24.000000000 +0200
6033@@ -180,7 +180,7 @@
6034     mx1ads mx1fs2 omap1510inn omap1610h2 \
6035     omap1610inn omap730p2 scb9328 smdk2400 \
6036     smdk2410 trab VCMA9 versatile \
6037- versatileab versatilepb voiceblue
6038+ versatileab versatilepb voiceblue vlink
6039 "
6040
6041 #########################################################################
6042diff -Naur u-boot-1.1.4.org/Makefile u-boot-1.1.4.tmp/Makefile
6043+++ u-boot-1.1.4.tmp/Makefile 2006-06-05 04:40:45.000000000 +0200
6044@@ -1419,6 +1419,9 @@
6045 mp2usb_config : unconfig
6046     @./mkconfig $(@:_config=) arm arm920t mp2usb NULL at91rm9200
6047
6048+vlink_config : unconfig
6049+ @./mkconfig $(@:_config=) arm arm920t vlink NULL at91rm9200
6050+
6051
6052 ########################################################################
6053 ## ARM Integrator boards - see doc/README-integrator for more info.
target/linux/at91/image/u-boot/patches/003-mac_init.patch
1+++ u-boot-1.1.4.tmp/lib_arm/board.c 2006-06-05 12:36:44.000000000 +0200
2@@ -332,6 +332,11 @@
3     }
4 #endif /* CONFIG_DRIVER_SMC91111 || CONFIG_DRIVER_LAN91C96 */
5
6+#ifdef CONFIG_MACH_VLINK
7+ printf("Initialising MAC address\n\r");
8+ eth_init(gd->bd);
9+#endif
10+
11     /* Initialize from environment */
12     if ((s = getenv ("loadaddr")) != NULL) {
13         load_addr = simple_strtoul (s, NULL, 16);
target/linux/at91/image/u-boot/patches/004-mac_config.patch
1+++ u-boot-1.1.4/include/configs/vlink.h 2006-06-07 13:11:01.000000000 +0200
2@@ -105,9 +105,9 @@
3
4 #define CONFIG_COMMANDS \
5                ((CONFIG_CMD_DFL | CFG_CMD_MII |\
6- CFG_CMD_DHCP ) & \
7- ~(CFG_CMD_BDI | \
8- CFG_CMD_IMI | \
9+ CFG_CMD_DHCP | \
10+ CFG_CMD_BDI ) & \
11+ ~(CFG_CMD_IMI | \
12             CFG_CMD_AUTOSCRIPT | \
13             CFG_CMD_FPGA | \
14             CFG_CMD_MISC | \
target/linux/at91/image/u-boot/patches/005-remove_float.patch
1diff -urN u-boot-1.1.4.old/cpu/arm920t/config.mk u-boot-1.1.4/cpu/arm920t/config.mk
2+++ u-boot-1.1.4/cpu/arm920t/config.mk 2007-03-20 09:23:54.000000000 +0100
3@@ -21,8 +21,7 @@
4 # MA 02111-1307 USA
5 #
6
7-PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
8- -msoft-float
9+PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8
10
11 PLATFORM_CPPFLAGS += -march=armv4
12 # =========================================================================
target/linux/at91/image/u-boot/patches/006-generate_params.patch
1+++ u-boot-1.1.4/tools/Makefile 2007-03-22 17:08:46.000000000 +0100
2@@ -21,9 +21,9 @@
3 # MA 02111-1307 USA
4 #
5
6-BINS = img2srec$(SFX) mkimage$(SFX) envcrc$(SFX) gen_eth_addr$(SFX) bmp_logo$(SFX)
7+BINS = img2srec$(SFX) mkimage$(SFX) envcrc$(SFX) gen_eth_addr$(SFX) bmp_logo$(SFX) ubparams$(SFX)
8
9-OBJS = environment.o img2srec.o mkimage.o crc32.o envcrc.o gen_eth_addr.o bmp_logo.o
10+OBJS = environment.o img2srec.o mkimage.o crc32.o envcrc.o gen_eth_addr.o bmp_logo.o ubparams.o
11
12 ifeq ($(ARCH),mips)
13 BINS += inca-swap-bytes$(SFX)
14@@ -118,6 +118,9 @@
15
16 all: .depend $(BINS) $(LOGO_H) subdirs
17
18+ubparams$(SFX): ubparams.o crc32.o
19+ $(CC) $(CFLAGS) -o $@ $^
20+
21 envcrc$(SFX): envcrc.o crc32.o environment.o
22         $(CC) $(CFLAGS) -o $@ $^
23
24@@ -149,6 +152,9 @@
25         $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
26         $(STRIP) $@
27
28+ubparams.o: ubparams.c
29+ $(CC) -g $(CFLAGS) -c $<
30+
31 envcrc.o: envcrc.c
32         $(CC) -g $(CFLAGS) -c $<
33
34+++ u-boot-1.1.4/tools/ubparams.c 2007-03-22 18:09:52.000000000 +0100
35@@ -0,0 +1,78 @@
36+/*
37+ * ubparams.c
38+ *
39+ * Generate a u-boot parameter block with correct crc
40+ *
41+ * (C) 1007 Guthrie Consulting
42+ * hamish@prodigi.ch
43+ *
44+ */
45+
46+#include <stdio.h>
47+#include <stdlib.h>
48+#include <string.h>
49+
50+#ifndef __ASSEMBLY__
51+#define __ASSEMBLY__
52+#endif
53+#define __ASM_STUB_PROCESSOR_H__
54+#include <config.h>
55+#undef __ASSEMBLY__
56+#include "environment.h"
57+
58+#define XMK_STR(x) #x
59+#define MK_STR(x) XMK_STR(x)
60+
61+extern unsigned long crc32 (unsigned long, const unsigned char *, unsigned int);
62+
63+#if !defined(ENV_CRC)
64+#define ENV_CRC ~0
65+#endif
66+
67+unsigned int env_size = 0x8400;
68+env_t environment = {
69+ ENV_CRC,
70+ "bootdelay=3\0"
71+ "baudrate=115200\0"
72+ "stdin=serial\0"
73+ "stdout=serial\0"
74+ "stderr=serial\0"
75+ "partitions=mtdparts=AT45DB642.spi0:132k(bootloader),33k(ubparams),99k(spare),1056k(linux),2112k(rootfs),33k(nvram),-(rootfs_data)\0"
76+ "fbargs=setenv bootargs mtdparts=AT45DB642.spi0:132k(bootloader),33k(ubparams),99k(spare),1056k(linux),2112k(rootfs),33k(nvram),-(rootfs_data) root=/dev/mtdblock4 ro console=/dev/ttyS0,115200,mem=32M\0"
77+ "rdba=setenv bootargs mtdparts=AT45DB642.spi0:132k(bootloader),33k(ubparams),99k(spare),1056k(linux),2112k(rootfs),33k(nvram),-(rootfs_data) root=/dev/ram rw initrd=0x21200000,6000000 ramdisk_size=20000 console=/dev/ttyS0,115200,mem=32M\0"
78+ "rdram=run rdba; tftp 21000000 vImage; tftp 21200000 root.squashfs; bootm 21000000\0"
79+ "flash=run fbargs; bootm 0xc0042000\0"
80+ "bootargs=setenv bootargs mtdparts=AT45DB642.spi0:132k(bootloader),33k(ubparams),99k(spare),1056k(linux),2112k(rootfs),33k(nvram),-(rootfs_data) root=/dev/mtdblock4 ro console=/dev/ttyS0,115200,mem=32M\0"
81+ "bootcmd=bootm 0xc0042000\0"
82+ "ethaddr=00:30:49:00:00:01\0"
83+ "ipaddr=10.0.1.73\0"
84+ "serverip=10.0.1.210\0"
85+ "serial#=MX070205484\0"
86+ "\0"
87+ };
88+
89+int main(void) {
90+ env_t *envptr, *source;
91+ unsigned char *dataptr;
92+ FILE *params;
93+
94+ source = &environment;
95+ envptr = (env_t *)malloc(CFG_ENV_SIZE);
96+ dataptr = (unsigned char *)envptr + ENV_HEADER_SIZE;
97+
98+ printf("Make u-boot params\n");
99+ printf("Params size is %d\n", CFG_ENV_SIZE);
100+
101+ memset(envptr, 0, CFG_ENV_SIZE);
102+ memcpy(envptr, source, sizeof(environment));
103+
104+ envptr->crc = crc32(0, envptr->data, ENV_SIZE);
105+
106+ params = fopen("params", "w");
107+ fwrite(envptr, CFG_ENV_SIZE, 1, params);
108+ fclose(params);
109+
110+ free(envptr);
111+ }
112+
113+
target/linux/at91/image/u-boot/patches/007-ubparams_bugfix.patch
1+++ u-boot-1.1.4/tools/ubparams.c 2007-03-22 18:29:32.000000000 +0100
2@@ -18,7 +18,7 @@
3 #define __ASM_STUB_PROCESSOR_H__
4 #include <config.h>
5 #undef __ASSEMBLY__
6-#include "environment.h"
7+#include <environment.h>
8
9 #define XMK_STR(x) #x
10 #define MK_STR(x) XMK_STR(x)
target/linux/at91/image/u-boot/patches/008-ubparams_bugfix.patch
1+++ u-boot-1.1.4/tools/ubparams.c 2007-03-23 10:49:37.000000000 +0100
2@@ -73,6 +73,7 @@
3     fclose(params);
4
5     free(envptr);
6+ return 0;
7     }
8
9
target/linux/at91/image/u-boot/patches/009-mac_init_bugfix.patch
1diff -urN u-boot-1.1.4.old/lib_arm/board.c u-boot-1.1.4/lib_arm/board.c
2+++ u-boot-1.1.4/lib_arm/board.c 2007-03-24 13:17:12.000000000 +0100
3@@ -332,7 +332,7 @@
4     }
5 #endif /* CONFIG_DRIVER_SMC91111 || CONFIG_DRIVER_LAN91C96 */
6
7-#ifdef CONFIG_MACH_VLINK
8+#ifdef CONFIG_VLINK
9     printf("Initialising MAC address\n\r");
10     eth_init(gd->bd);
11 #endif
target/linux/at91/image/u-boot/patches/010-irda-patch-remove.patch
1+++ u-boot-1.1.4/board/vlink/vlink.c 2007-04-03 11:48:33.000000000 +0200
2@@ -40,10 +40,6 @@
3     /* Enable Ctrlc */
4     console_init_f ();
5
6- /* Correct IRDA resistor problem */
7- /* Set PA23_TXD in Output */
8- (AT91PS_PIO) AT91C_BASE_PIOA->PIO_OER = AT91C_PA23_TXD2;
9-
10     /* memory and cpu-speed are setup before relocation */
11     /* so we do _nothing_ here */
12
target/linux/at91/image/u-boot/patches/011-ubparams_update.patch
1diff -urN u-boot-1.1.4.old/tools/ubparams.c u-boot-1.1.4/tools/ubparams.c
2+++ u-boot-1.1.4/tools/ubparams.c 2007-05-04 10:13:34.000000000 +0200
3@@ -37,12 +37,11 @@
4     "stdin=serial\0"
5     "stdout=serial\0"
6     "stderr=serial\0"
7- "partitions=mtdparts=AT45DB642.spi0:132k(bootloader),33k(ubparams),99k(spare),1056k(linux),2112k(rootfs),33k(nvram),-(rootfs_data)\0"
8- "fbargs=setenv bootargs mtdparts=AT45DB642.spi0:132k(bootloader),33k(ubparams),99k(spare),1056k(linux),2112k(rootfs),33k(nvram),-(rootfs_data) root=/dev/mtdblock4 ro console=/dev/ttyS0,115200,mem=32M\0"
9- "rdba=setenv bootargs mtdparts=AT45DB642.spi0:132k(bootloader),33k(ubparams),99k(spare),1056k(linux),2112k(rootfs),33k(nvram),-(rootfs_data) root=/dev/ram rw initrd=0x21200000,6000000 ramdisk_size=20000 console=/dev/ttyS0,115200,mem=32M\0"
10+ "fbargs=setenv bootargs root=/dev/mtdblock3 ro console=/dev/ttyS0,115200,mem=32M\0"
11+ "rdba=setenv bootargs root=/dev/ram rw initrd=0x21200000,6000000 ramdisk_size=20000 console=/dev/ttyS0,115200,mem=32M\0"
12     "rdram=run rdba; tftp 21000000 vImage; tftp 21200000 root.squashfs; bootm 21000000\0"
13     "flash=run fbargs; bootm 0xc0042000\0"
14- "bootargs=setenv bootargs mtdparts=AT45DB642.spi0:132k(bootloader),33k(ubparams),99k(spare),1056k(linux),2112k(rootfs),33k(nvram),-(rootfs_data) root=/dev/mtdblock4 ro console=/dev/ttyS0,115200,mem=32M\0"
15+ "bootargs=setenv bootargs root=/dev/mtdblock3 ro console=/dev/ttyS0,115200,mem=32M\0"
16     "bootcmd=bootm 0xc0042000\0"
17     "ethaddr=00:30:49:00:00:01\0"
18     "ipaddr=10.0.1.73\0"
target/linux/at91/image/u-boot/patches/012-make_3.81.patch
1diff -urN u-boot-1.1.4.orig/examples/Makefile u-boot-1.1.4/examples/Makefile
2+++ u-boot-1.1.4/examples/Makefile 2007-05-13 13:48:43.000000000 +0200
3@@ -123,10 +123,10 @@
4     $(LD) -g $(EX_LDFLAGS) -Ttext $(LOAD_ADDR) \
5         -o $@ -e $(<:.o=) $< $(LIB) \
6         -L$(gcclibdir) -lgcc
7-%.srec: %
8+%.srec: %.o
9     $(OBJCOPY) -O srec $< $@ 2>/dev/null
10
11-%.bin: %
12+%.bin: %.o
13     $(OBJCOPY) -O binary $< $@ 2>/dev/null
14
15 #########################################################################
target/linux/at91/image/u-boot/patches/013-params-in-config.patch
1+++ u-boot-1.1.4/tools/Makefile 2007-06-14 15:33:04.000000000 +0200
2@@ -153,7 +153,7 @@
3         $(STRIP) $@
4
5 ubparams.o: ubparams.c
6- $(CC) -g $(CFLAGS) -c $<
7+ $(CC) -g $(CFLAGS) -DLAN_IP=$(LAN_IP) -DLAN_SERVERIP=$(LAN_SERVERIP) -c $<
8
9 envcrc.o: envcrc.c
10         $(CC) -g $(CFLAGS) -c $<
11+++ u-boot-1.1.4/tools/ubparams.c 2007-06-14 15:31:55.000000000 +0200
12@@ -44,8 +44,8 @@
13     "bootargs=setenv bootargs root=/dev/mtdblock3 ro console=/dev/ttyS0,115200,mem=32M\0"
14     "bootcmd=bootm 0xc0042000\0"
15     "ethaddr=00:30:49:00:00:01\0"
16- "ipaddr=10.0.1.73\0"
17- "serverip=10.0.1.210\0"
18+ "ipaddr=" MK_STR(LAN_IP) "\0"
19+ "serverip=" MK_STR(LAN_SERVERIP) "\0"
20     "serial#=MX070205484\0"
21     "\0"
22     };
target/linux/at91/image/u-boot/patches/014-ubparam-kernel.patch
1+++ u-boot-1.1.4/tools/ubparams.c 2007-06-19 14:25:05.000000000 +0200
2@@ -39,7 +39,7 @@
3     "stderr=serial\0"
4     "fbargs=setenv bootargs root=/dev/mtdblock3 ro console=/dev/ttyS0,115200,mem=32M\0"
5     "rdba=setenv bootargs root=/dev/ram rw initrd=0x21200000,6000000 ramdisk_size=20000 console=/dev/ttyS0,115200,mem=32M\0"
6- "rdram=run rdba; tftp 21000000 vImage; tftp 21200000 root.squashfs; bootm 21000000\0"
7+ "rdram=run rdba; tftp 21000000 uImage; tftp 21200000 root.squashfs; bootm 21000000\0"
8     "flash=run fbargs; bootm 0xc0042000\0"
9     "bootargs=setenv bootargs root=/dev/mtdblock3 ro console=/dev/ttyS0,115200,mem=32M\0"
10     "bootcmd=bootm 0xc0042000\0"
target/linux/at91/image/u-boot/patches/015-eabi_fixes.patch
1Index: git/lib_arm/div0.c
2===================================================================
3+++ git/lib_arm/div0.c
4@@ -22,9 +22,3 @@
5  */
6
7 /* Replacement (=dummy) for GNU/Linux division-by zero handler */
8-void __div0 (void)
9-{
10- extern void hang (void);
11-
12- hang();
13-}
14Index: git/Makefile
15===================================================================
16+++ git/Makefile
17@@ -225,7 +225,7 @@ LIBS := $(addprefix $(obj),$(LIBS))
18 .PHONY : $(LIBS)
19
20 # Add GCC lib
21-PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
22+PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc -lgcc_eh
23
24 # The "tools" are needed early, so put this first
25 # Don't include stuff already done in $(LIBS)
26+++ b/board/vlink/vlink.c 2009-10-29 16:43:27.000000000 +0100
27@@ -33,6 +33,9 @@
28  * Miscelaneous platform dependent initialisations
29  */
30
31+void raise() {}
32+void abort() {}
33+
34 int board_init (void)
35 {
36     DECLARE_GLOBAL_DATA_PTR;
37+++ b/board/vlink/u-boot.lds 2009-10-29 16:43:57.000000000 +0100
38@@ -38,6 +38,10 @@
39
40     . = ALIGN(4);
41     .rodata : { *(.rodata) }
42+ .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) }
43+ __exidx_start = .;
44+ .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
45+ __exidx_end = .;
46
47     . = ALIGN(4);
48     .data : { *(.data) }
target/linux/at91/image/u-boot/patches/100-netusg20.patch
1Add support for the NetusG20 board by Acmesystems srl.
2This board is based on AT91SAM9G20 SoC.
3
4Signed-off-by: Claudio Mignanti <c.mignanti@gmail.com>
5---
6 MAKEALL | 1 +
7 Makefile | 3 +
8 arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c | 5 +
9 board/acmesystems/netusg20/Makefile | 56 +++++++
10 board/acmesystems/netusg20/config.mk | 1 +
11 board/acmesystems/netusg20/led.c | 40 +++++
12 board/acmesystems/netusg20/netusg20.c | 152 +++++++++++++++++
13 board/acmesystems/netusg20/partition.c | 39 +++++
14 include/configs/netusg20.h | 181 +++++++++++++++++++++
15 9 files changed, 478 insertions(+), 0 deletions(-)
16 create mode 100644 board/acmesystems/netusg20/Makefile
17 create mode 100644 board/acmesystems/netusg20/config.mk
18 create mode 100644 board/acmesystems/netusg20/led.c
19 create mode 100644 board/acmesystems/netusg20/netusg20.c
20 create mode 100644 board/acmesystems/netusg20/partition.c
21 create mode 100644 include/configs/netusg20.h
22
23diff --git a/MAKEALL b/MAKEALL
24index d6d5f5b..60e36e1 100755
25--- a/MAKEALL
26@@ -684,6 +684,7 @@ LIST_at91=" \
27     meesc \
28     mp2usb \
29     m501sk \
30+ netusg20 \
31     otc570 \
32     pm9261 \
33     pm9263 \
34diff --git a/Makefile b/Makefile
35index 87d5214..b73659f 100644
36--- a/Makefile
37@@ -2867,6 +2867,9 @@ at91sam9g45ekes_config : unconfig
38     fi;
39     @$(MKCONFIG) -a at91sam9m10g45ek arm arm926ejs at91sam9m10g45ek atmel at91
40
41+netusg20_config: unconfig
42+ @$(MKCONFIG) $(@:_config=) arm arm926ejs netusg20 acmesystems at91
43+
44 otc570_config : unconfig
45     @$(MKCONFIG) $(@:_config=) arm arm926ejs otc570 esd at91
46
47diff --git a/arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c b/arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
48index 77d49ab..87ec531 100644
49--- a/arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
50@@ -59,7 +59,12 @@ void at91_serial3_hw_init(void)
51 {
52     at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE;
53
54+#ifdef CONFIG_NETUSG20
55+ /* pull-up active on DRXD*/
56+ at91_set_a_periph(AT91_PIO_PORTB, 14, 1);
57+#else
58     at91_set_a_periph(AT91_PIO_PORTB, 14, 0); /* DRXD */
59+#endif
60     at91_set_a_periph(AT91_PIO_PORTB, 15, 1); /* DTXD */
61     writel(1 << AT91_ID_SYS, &pmc->pcer);
62 }
63diff --git a/board/acmesystems/netusg20/Makefile b/board/acmesystems/netusg20/Makefile
64new file mode 100644
65index 0000000..31589fd
66--- /dev/null
67@@ -0,0 +1,56 @@
68+#
69+# (C) Copyright 2003-2008
70+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
71+#
72+# (C) Copyright 2008
73+# Stelian Pop <stelian.pop@leadtechdesign.com>
74+# Lead Tech Design <www.leadtechdesign.com>
75+#
76+# See file CREDITS for list of people who contributed to this
77+# project.
78+#
79+# This program is free software; you can redistribute it and/or
80+# modify it under the terms of the GNU General Public License as
81+# published by the Free Software Foundation; either version 2 of
82+# the License, or (at your option) any later version.
83+#
84+# This program is distributed in the hope that it will be useful,
85+# but WITHOUT ANY WARRANTY; without even the implied warranty of
86+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
87+# GNU General Public License for more details.
88+#
89+# You should have received a copy of the GNU General Public License
90+# along with this program; if not, write to the Free Software
91+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
92+# MA 02111-1307 USA
93+#
94+
95+include $(TOPDIR)/config.mk
96+
97+LIB = $(obj)lib$(BOARD).a
98+
99+COBJS-y += netusg20.o
100+COBJS-y += led.o
101+COBJS-y += partition.o
102+
103+SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
104+OBJS := $(addprefix $(obj),$(COBJS-y))
105+SOBJS := $(addprefix $(obj),$(SOBJS))
106+
107+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
108+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
109+
110+clean:
111+ rm -f $(SOBJS) $(OBJS)
112+
113+distclean: clean
114+ rm -f $(LIB) core *.bak $(obj).depend
115+
116+#########################################################################
117+
118+# defines $(obj).depend target
119+include $(SRCTREE)/rules.mk
120+
121+sinclude $(obj).depend
122+
123+#########################################################################
124diff --git a/board/acmesystems/netusg20/config.mk b/board/acmesystems/netusg20/config.mk
125new file mode 100644
126index 0000000..ff2cfd1
127--- /dev/null
128@@ -0,0 +1 @@
129+TEXT_BASE = 0x23f00000
130diff --git a/board/acmesystems/netusg20/led.c b/board/acmesystems/netusg20/led.c
131new file mode 100644
132index 0000000..1016b98
133--- /dev/null
134@@ -0,0 +1,40 @@
135+/*
136+ * (C) Copyright 2007-2008
137+ * Stelian Pop <stelian.pop@leadtechdesign.com>
138+ * Lead Tech Design <www.leadtechdesign.com>
139+ *
140+ * See file CREDITS for list of people who contributed to this
141+ * project.
142+ *
143+ * This program is free software; you can redistribute it and/or
144+ * modify it under the terms of the GNU General Public License as
145+ * published by the Free Software Foundation; either version 2 of
146+ * the License, or (at your option) any later version.
147+ *
148+ * This program is distributed in the hope that it will be useful,
149+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
150+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
151+ * GNU General Public License for more details.
152+ *
153+ * You should have received a copy of the GNU General Public License
154+ * along with this program; if not, write to the Free Software
155+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
156+ * MA 02111-1307 USA
157+ */
158+
159+#include <common.h>
160+#include <asm/arch/at91sam9260.h>
161+#include <asm/arch/at91_pmc.h>
162+#include <asm/arch/gpio.h>
163+#include <asm/arch/io.h>
164+
165+
166+void coloured_LED_init(void)
167+{
168+ /* Enable clock */
169+ at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOA);
170+
171+ at91_set_gpio_output(CONFIG_RED_LED, 1);
172+
173+ at91_set_gpio_value(CONFIG_RED_LED, 1);
174+}
175diff --git a/board/acmesystems/netusg20/netusg20.c b/board/acmesystems/netusg20/netusg20.c
176new file mode 100644
177index 0000000..94b4d4c
178--- /dev/null
179@@ -0,0 +1,152 @@
180+/*
181+ * (C) Copyright 2007-2008
182+ * Stelian Pop <stelian.pop@leadtechdesign.com>
183+ * Lead Tech Design <www.leadtechdesign.com>
184+ *
185+ * (C) Copyright 2010
186+ * Claudio Mignanti <c.mignanti@gmail.com>
187+ *
188+ * See file CREDITS for list of people who contributed to this
189+ * project.
190+ *
191+ * This program is free software; you can redistribute it and/or
192+ * modify it under the terms of the GNU General Public License as
193+ * published by the Free Software Foundation; either version 2 of
194+ * the License, or (at your option) any later version.
195+ *
196+ * This program is distributed in the hope that it will be useful,
197+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
198+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
199+ * GNU General Public License for more details.
200+ *
201+ * You should have received a copy of the GNU General Public License
202+ * along with this program; if not, write to the Free Software
203+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
204+ * MA 02111-1307 USA
205+ */
206+
207+#include <common.h>
208+#include <asm/arch/at91sam9260.h>
209+#include <asm/arch/at91sam9260_matrix.h>
210+#include <asm/arch/at91sam9_smc.h>
211+#include <asm/arch/at91_common.h>
212+#include <asm/arch/at91_pmc.h>
213+#include <asm/arch/at91_rstc.h>
214+#include <asm/arch/gpio.h>
215+#include <asm/arch/io.h>
216+#include <asm/arch/hardware.h>
217+#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
218+#include <net.h>
219+#endif
220+#include <netdev.h>
221+
222+DECLARE_GLOBAL_DATA_PTR;
223+
224+/* ------------------------------------------------------------------------- */
225+/*
226+ * Miscelaneous platform dependent initialisations
227+ */
228+
229+#ifdef CONFIG_MACB
230+static void at91sam9260ek_macb_hw_init(void)
231+{
232+ unsigned long rstc;
233+
234+ /* Enable clock */
235+ at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_EMAC);
236+
237+ /*
238+ * Disable pull-up on:
239+ * RXDV (PA17) => PHY normal mode (not Test mode)
240+ * ERX0 (PA14) => PHY ADDR0
241+ * ERX1 (PA15) => PHY ADDR1
242+ * ERX2 (PA25) => PHY ADDR2
243+ * ERX3 (PA26) => PHY ADDR3
244+ * ECRS (PA28) => PHY ADDR4 => PHYADDR = 0x0
245+ *
246+ * PHY has internal pull-down
247+ */
248+ writel(pin_to_mask(AT91_PIN_PA14) |
249+ pin_to_mask(AT91_PIN_PA15) |
250+ pin_to_mask(AT91_PIN_PA17) |
251+ pin_to_mask(AT91_PIN_PA25) |
252+ pin_to_mask(AT91_PIN_PA26) |
253+ pin_to_mask(AT91_PIN_PA28),
254+ pin_to_controller(AT91_PIN_PA0) + PIO_PUDR);
255+
256+ rstc = at91_sys_read(AT91_RSTC_MR) & AT91_RSTC_ERSTL;
257+
258+ at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_EXTRST);
259+
260+ /* Wait for end hardware reset */
261+ while (!(at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_NRSTL));
262+
263+ /* Restore NRST value */
264+ at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
265+ (rstc) |
266+ AT91_RSTC_URSTEN);
267+
268+ /* Re-enable pull-up */
269+ writel(pin_to_mask(AT91_PIN_PA14) |
270+ pin_to_mask(AT91_PIN_PA15) |
271+ pin_to_mask(AT91_PIN_PA17) |
272+ pin_to_mask(AT91_PIN_PA25) |
273+ pin_to_mask(AT91_PIN_PA26) |
274+ pin_to_mask(AT91_PIN_PA28),
275+ pin_to_controller(AT91_PIN_PA0) + PIO_PUER);
276+
277+ at91_macb_hw_init();
278+}
279+#endif
280+
281+int board_init(void)
282+{
283+ /* Enable Ctrlc */
284+ console_init_f();
285+
286+ gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9G20EK;
287+
288+ /* adress of boot parameters */
289+ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
290+
291+ at91_serial_hw_init();
292+#ifdef CONFIG_HAS_DATAFLASH
293+ at91_spi0_hw_init((1 << 0) | (1 << 1));
294+#endif
295+#ifdef CONFIG_MACB
296+ at91sam9260ek_macb_hw_init();
297+#endif
298+
299+ return 0;
300+}
301+
302+int dram_init(void)
303+{
304+ gd->bd->bi_dram[0].start = PHYS_SDRAM;
305+ gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
306+ return 0;
307+}
308+
309+#ifdef CONFIG_RESET_PHY_R
310+void reset_phy(void)
311+{
312+#ifdef CONFIG_MACB
313+ /*
314+ * Initialize ethernet HW addr prior to starting Linux,
315+ * needed for nfsroot
316+ */
317+ eth_init(gd->bd);
318+#endif
319+}
320+#endif
321+
322+int board_eth_init(bd_t *bis)
323+{
324+ int rc = 0;
325+#ifdef CONFIG_MACB
326+ rc = macb_eth_initialize(0, (void *)AT91SAM9260_BASE_EMAC, 0x00);
327+#endif
328+ return rc;
329+}
330+
331+void show_boot_progress (int val){}
332diff --git a/board/acmesystems/netusg20/partition.c b/board/acmesystems/netusg20/partition.c
333new file mode 100644
334index 0000000..7d79e53
335--- /dev/null
336@@ -0,0 +1,39 @@
337+/*
338+ * (C) Copyright 2008
339+ * Ulf Samuelsson <ulf@atmel.com>
340+ *
341+ * This program is free software; you can redistribute it and/or
342+ * modify it under the terms of the GNU General Public License as
343+ * published by the Free Software Foundation; either version 2 of
344+ * the License, or (at your option) any later version.
345+ *
346+ * This program is distributed in the hope that it will be useful,
347+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
348+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
349+ * GNU General Public License for more details.
350+ *
351+ * You should have received a copy of the GNU General Public License
352+ * along with this program; if not, write to the Free Software
353+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
354+ * MA 02111-1307 USA
355+ *
356+ */
357+#include <common.h>
358+#include <config.h>
359+#include <asm/hardware.h>
360+#include <dataflash.h>
361+
362+AT91S_DATAFLASH_INFO dataflash_info[CONFIG_SYS_MAX_DATAFLASH_BANKS];
363+
364+struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS] = {
365+ {CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1, 1}
366+};
367+
368+/*define the area offsets*/
369+dataflash_protect_t area_list[NB_DATAFLASH_AREA] = {
370+ {0x00000000, 0x000041FF, FLAG_PROTECT_SET, 0, "Bootstrap"},
371+ {0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"},
372+ {0x00008400, 0x00041FFF, FLAG_PROTECT_SET, 0, "U-Boot"},
373+ {0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"},
374+ {0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0, "FS"},
375+};
376diff --git a/include/configs/netusg20.h b/include/configs/netusg20.h
377new file mode 100644
378index 0000000..99b4f12
379--- /dev/null
380@@ -0,0 +1,181 @@
381+/*
382+ * (C) Copyright 2007-2008
383+ * Stelian Pop <stelian.pop@leadtechdesign.com>
384+ * Lead Tech Design <www.leadtechdesign.com>
385+ *
386+ * Configuation settings for the NetusG20 boards.
387+ *
388+ * See file CREDITS for list of people who contributed to this
389+ * project.
390+ *
391+ * This program is free software; you can redistribute it and/or
392+ * modify it under the terms of the GNU General Public License as
393+ * published by the Free Software Foundation; either version 2 of
394+ * the License, or (at your option) any later version.
395+ *
396+ * This program is distributed in the hope that it will be useful,
397+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
398+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
399+ * GNU General Public License for more details.
400+ *
401+ * You should have received a copy of the GNU General Public License
402+ * along with this program; if not, write to the Free Software
403+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
404+ * MA 02111-1307 USA
405+ */
406+
407+#ifndef __CONFIG_H
408+#define __CONFIG_H
409+
410+#define CONFIG_AT91_LEGACY
411+
412+/* ARM asynchronous clock */
413+#define CONFIG_SYS_AT91_MAIN_CLOCK 18432000 /* 18.432 MHz crystal */
414+#define CONFIG_SYS_HZ 1000
415+
416+#define CONFIG_DISPLAY_CPUINFO
417+
418+#define CONFIG_ARM926EJS 1 /* This is an ARM926EJS Core */
419+#define CONFIG_AT91SAM9G20 1 /* It's an Atmel AT91SAM9G20 SoC*/
420+#define CONFIG_NETUSG20 1
421+
422+#define CONFIG_ARCH_CPU_INIT
423+#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
424+
425+#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */
426+#define CONFIG_SETUP_MEMORY_TAGS 1
427+#define CONFIG_INITRD_TAG 1
428+
429+#define CONFIG_SKIP_LOWLEVEL_INIT
430+#define CONFIG_SKIP_RELOCATE_UBOOT
431+
432+/*
433+ * Hardware drivers
434+ */
435+#define CONFIG_AT91_GPIO 1
436+#define CONFIG_ATMEL_USART 1
437+#undef CONFIG_USART0
438+#undef CONFIG_USART1
439+#undef CONFIG_USART2
440+#define CONFIG_USART3 1 /* USART 3 is DBGU */
441+
442+/* LED */
443+#define CONFIG_AT91_LED
444+#define CONFIG_RED_LED AT91_PIN_PA9 /* this is the power led */
445+#define CONFIG_GREEN_LED AT91_PIN_PA6 /* this is the user led */
446+
447+#define CONFIG_BOOTDELAY 3
448+
449+/*
450+ * BOOTP options
451+ */
452+#define CONFIG_BOOTP_BOOTFILESIZE 1
453+#define CONFIG_BOOTP_BOOTPATH 1
454+#define CONFIG_BOOTP_GATEWAY 1
455+#define CONFIG_BOOTP_HOSTNAME 1
456+
457+/*
458+ * Command line configuration.
459+ */
460+#include <config_cmd_default.h>
461+#undef CONFIG_CMD_BDI
462+#undef CONFIG_CMD_FPGA
463+#undef CONFIG_CMD_IMI
464+#undef CONFIG_CMD_IMLS
465+#undef CONFIG_CMD_LOADS
466+#undef CONFIG_CMD_SOURCE
467+
468+#define CONFIG_CMD_PING 1
469+#define CONFIG_CMD_DHCP 1
470+#define CONFIG_CMD_USB 1
471+
472+/* SDRAM */
473+#define CONFIG_NR_DRAM_BANKS 1
474+#define PHYS_SDRAM 0x20000000
475+#define PHYS_SDRAM_SIZE 0x04000000 /* 64 megs */
476+
477+/* DataFlash */
478+#define CONFIG_ATMEL_DATAFLASH_SPI
479+#define CONFIG_HAS_DATAFLASH 1
480+#define CONFIG_SYS_SPI_WRITE_TOUT (5*CONFIG_SYS_HZ)
481+#define CONFIG_SYS_MAX_DATAFLASH_BANKS 1
482+#define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 0xD0000000 /* CS1 */
483+#define AT91_SPI_CLK 15000000
484+
485+#define DATAFLASH_TCSS (0x22 << 16)
486+#define DATAFLASH_TCHS (0x1 << 24)
487+
488+/* no NAND flash on this board*/
489+#define CONFIG_SYS_NO_FLASH
490+
491+/* Ethernet */
492+#define CONFIG_MACB 1
493+#define CONFIG_RMII 1
494+#define CONFIG_NET_MULTI 1
495+#define CONFIG_NET_RETRY_COUNT 20
496+#define CONFIG_RESET_PHY_R 1
497+
498+/* MMC */
499+#define CONFIG_MMC
500+#define CONFIG_CMD_MMC
501+#define CONFIG_ATMEL_MCI
502+#define CONFIG_CMD_AUTOSCRIPT
503+#define CONFIG_CMD_IMI
504+#define CONFIG_CMD_SOURCE
505+
506+#define MMCI_BASE 0xFFFA8000
507+
508+/* USB */
509+#define CONFIG_USB_ATMEL
510+#define CONFIG_USB_OHCI_NEW 1
511+#define CONFIG_DOS_PARTITION 1
512+#define CONFIG_SYS_USB_OHCI_CPU_INIT 1
513+#define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00500000 /* AT91SAM9260_UHP_BASE */
514+#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9260"
515+#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
516+#define CONFIG_USB_STORAGE 1
517+
518+#define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
519+
520+#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM
521+#define CONFIG_SYS_MEMTEST_END 0x23e00000
522+
523+/* Filesystem */
524+#define CONFIG_CMD_FAT 1
525+#define CONFIG_CMD_EXT2 1
526+
527+/* bootstrap + u-boot + env + linux in dataflash on CS1 */
528+#define CONFIG_ENV_IS_IN_DATAFLASH 1
529+#define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + 0x8400)
530+#define CONFIG_ENV_OFFSET 0x4200
531+#define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + CONFIG_ENV_OFFSET)
532+#define CONFIG_ENV_SIZE 0x4200
533+#define CONFIG_BOOTCOMMAND "mmc init; sleep 1; " \
534+ "ext2load mmc 0 0x20000000 uImage; " \
535+ "source 0x20000000"
536+#define CONFIG_BOOTARGS "mem=64M console=ttyS0,115200 " \
537+ "root=/dev/mmcblk0p1 rootwait"
538+
539+#define CONFIG_BAUDRATE 115200
540+#define CONFIG_SYS_BAUDRATE_TABLE {115200 , 19200, 38400, 57600, 9600 }
541+
542+#define CONFIG_SYS_PROMPT "U-Boot> "
543+#define CONFIG_SYS_CBSIZE 256
544+#define CONFIG_SYS_MAXARGS 16
545+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
546+#define CONFIG_SYS_LONGHELP 1
547+#define CONFIG_CMDLINE_EDITING 1
548+
549+/*
550+ * Size of malloc() pool
551+ */
552+#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
553+#define CONFIG_SYS_GBL_DATA_SIZE 128 /* 128 bytes for initial data */
554+
555+#define CONFIG_STACKSIZE (32*1024) /* regular stack */
556+
557+#ifdef CONFIG_USE_IRQ
558+#error CONFIG_USE_IRQ not supported
559+#endif
560+
561+#endif
562--
5631.7.0.4
564
565
target/linux/at91/image/u-boot/patches/200-clock.patch
1The function get_mci_clk_rate is used inside atmel_mci driver
2but never defined. Fix this typo.
3
4Signed-off-by: Claudio Mignanti <c.mignanti@gmail.com>
5---
6 drivers/mmc/atmel_mci.c | 2 +-
7 1 files changed, 1 insertions(+), 1 deletions(-)
8
9diff --git a/drivers/mmc/atmel_mci.c b/drivers/mmc/atmel_mci.c
10index 3946ffe..628aac9 100644
11--- a/drivers/mmc/atmel_mci.c
12@@ -67,7 +67,7 @@ static void mci_set_mode(unsigned long hz, unsigned long blklen)
13     unsigned long bus_hz;
14     unsigned long clkdiv;
15
16- bus_hz = get_mci_clk_rate();
17+ bus_hz = get_mck_clk_rate();
18     clkdiv = (bus_hz / hz) / 2 - 1;
19
20     pr_debug("mmc: setting clock %lu Hz, block size %lu\n",
21--
221.7.0.4
23

Archive Download the corresponding diff file



interactive