summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGraeme Russ <graeme.russ@gmail.com>2008-09-07 07:08:42 +1000
committerWolfgang Denk <wd@denx.de>2008-09-09 11:48:53 +0200
commit3ef96ded38a8d33b58b9fab9cd879d51ddac4cbd (patch)
treeb40a0685df1836f251fab53f4a767bb7287e0d03 /include
parent5608692104efa8d56df803dc79ea41ac3607eee5 (diff)
Update i386 code (sc520_cdp)
Attempt to bring i386 / sc520 inline with master Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/byteorder.h4
-rw-r--r--include/asm-i386/global_data.h4
-rw-r--r--include/asm-i386/ic/ssi.h34
-rw-r--r--include/asm-i386/pci.h1
-rw-r--r--include/asm-i386/string.h2
-rw-r--r--include/configs/sc520_cdp.h24
6 files changed, 64 insertions, 5 deletions
diff --git a/include/asm-i386/byteorder.h b/include/asm-i386/byteorder.h
index a9c69d5b1f..7dfeb8bbed 100644
--- a/include/asm-i386/byteorder.h
+++ b/include/asm-i386/byteorder.h
@@ -6,7 +6,7 @@
#ifdef __GNUC__
-static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
+static __inline__ __u32 ___arch__swab32(__u32 x)
{
#ifdef CONFIG_X86_BSWAP
__asm__("bswap %0" : "=r" (x) : "0" (x));
@@ -20,7 +20,7 @@ static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
return x;
}
-static __inline__ __const__ __u16 ___arch__swab16(__u16 x)
+static __inline__ __u16 ___arch__swab16(__u16 x)
{
__asm__("xchgb %b0,%h0" /* swap bytes */ \
: "=q" (x) \
diff --git a/include/asm-i386/global_data.h b/include/asm-i386/global_data.h
index 35bad23c17..cc30689d21 100644
--- a/include/asm-i386/global_data.h
+++ b/include/asm-i386/global_data.h
@@ -59,8 +59,8 @@ typedef struct {
#define GD_FLG_LOGINIT 0x00020 /* Log Buffer has been initialized */
#define GD_FLG_DISABLE_CONSOLE 0x00040 /* Disable console (in & out) */
-extern gd_t *global_data;
+extern gd_t *gd;
-#define DECLARE_GLOBAL_DATA_PTR gd_t *gd = global_data
+#define DECLARE_GLOBAL_DATA_PTR
#endif /* __ASM_GBL_DATA_H */
diff --git a/include/asm-i386/ic/ssi.h b/include/asm-i386/ic/ssi.h
new file mode 100644
index 0000000000..bd48eab161
--- /dev/null
+++ b/include/asm-i386/ic/ssi.h
@@ -0,0 +1,34 @@
+/*
+ * (C) Copyright 2008
+ * Graeme Russ <graeme.russ@gmail.com>.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef _ASM_IC_SSI_H_
+#define _ASM_IC_SSI_H_ 1
+
+int ssi_set_interface(int, int, int, int);
+void ssi_chip_select(int);
+u8 ssi_txrx_byte(u8);
+void ssi_tx_byte(u8);
+u8 ssi_rx_byte(void);
+
+
+#endif
diff --git a/include/asm-i386/pci.h b/include/asm-i386/pci.h
index bde95509a4..050a2bb868 100644
--- a/include/asm-i386/pci.h
+++ b/include/asm-i386/pci.h
@@ -31,5 +31,4 @@ int pci_enable_legacy_video_ports(struct pci_controller* hose);
int pci_shadow_rom(pci_dev_t dev, unsigned char *dest);
void pci_remove_rom_window(struct pci_controller* hose, u32 addr);
u32 pci_get_rom_window(struct pci_controller* hose, int size);
-
#endif
diff --git a/include/asm-i386/string.h b/include/asm-i386/string.h
index 91a23f951c..3643a79fdf 100644
--- a/include/asm-i386/string.h
+++ b/include/asm-i386/string.h
@@ -5,6 +5,8 @@
* We don't do inline string functions, since the
* optimised inline asm versions are not small.
*/
+#undef __HAVE_ARCH_STRNCPY
+extern char *strncpy(char *__dest, __const__ char *__src, __kernel_size_t __n);
#undef __HAVE_ARCH_STRRCHR
extern char * strrchr(const char * s, int c);
diff --git a/include/configs/sc520_cdp.h b/include/configs/sc520_cdp.h
index e29655e636..dfe7b7d3e4 100644
--- a/include/configs/sc520_cdp.h
+++ b/include/configs/sc520_cdp.h
@@ -28,6 +28,7 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#define GRUSS_TESTING
/*
* High Level Configuration Options
* (easy to change)
@@ -81,7 +82,11 @@
#include <config_cmd_default.h>
#define CONFIG_CMD_PCI
+#ifndef GRUSS_TESTING
#define CONFIG_CMD_SATA
+#else
+#undef CONFIG_CMD_SATA
+#endif
#define CONFIG_CMD_JFFS2
#define CONFIG_CMD_NET
#define CONFIG_CMD_EEPROM
@@ -175,10 +180,18 @@
/************************************************************
*SATA/Native Stuff
************************************************************/
+#ifndef GRUSS_TESTING
#define CFG_SATA_MAXBUS 2 /*Max Sata buses supported */
#define CFG_SATA_DEVS_PER_BUS 2 /*Max no. of devices per bus/port */
#define CFG_SATA_MAX_DEVICE (CFG_SATA_MAXBUS* CFG_SATA_DEVS_PER_BUS)
#define CONFIG_ATA_PIIX 1 /*Supports ata_piix driver */
+#else
+#undef CFG_SATA_MAXBUS
+#undef CFG_SATA_DEVS_PER_BUS
+#undef CFG_SATA_MAX_DEVICE
+#undef CONFIG_ATA_PIIX
+#endif
+
/************************************************************
* DISK Partition support
@@ -190,7 +203,11 @@
/************************************************************
* Video/Keyboard support
************************************************************/
+#ifndef GRUSS_TESTING
#define CONFIG_VIDEO /* To enable video controller support */
+#else
+#undef CONFIG_VIDEO
+#endif
#define CONFIG_I8042_KBD
#define CFG_ISA_IO 0
@@ -203,6 +220,7 @@
/*
* PCI stuff
*/
+#ifndef GRUSS_TESTING
#define CONFIG_PCI /* include pci support */
#define CONFIG_PCI_PNP /* pci plug-and-play */
#define CONFIG_PCI_SCAN_SHOW
@@ -211,5 +229,11 @@
#define CFG_SECOND_PCI_IRQ 9
#define CFG_THIRD_PCI_IRQ 11
#define CFG_FORTH_PCI_IRQ 15
+#else
+#undef CONFIG_PCI
+#undef CONFIG_PCI_PNP
+#undef CONFIG_PCI_SCAN_SHOW
+#endif
+
#endif /* __CONFIG_H */