9
0
Fork 0

Initial revision

This commit is contained in:
wdenk 2002-08-27 10:38:37 +00:00
parent 78f6622a1f
commit 0f9cfa09df
4 changed files with 225 additions and 0 deletions

52
include/cmd_fpga.h Normal file
View File

@ -0,0 +1,52 @@
/*
* (C) Copyright 2001
* Rich Ireland, Enterasys Networks, rireland@enterasys.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
*
*/
/*
* FPGA support
*/
#ifndef _CMD_FPGA_H
#define _CMD_FPGA_H
#include <common.h>
#include <command.h>
#if defined(CONFIG_FPGA) && (CONFIG_COMMANDS & CFG_CMD_FPGA)
#define CMD_TBL_FPGA MK_CMD_TBL_ENTRY( \
"fpga", 4, 6, 1, do_fpga, \
"fpga - loadable FPGA image support\n", \
"fpga [operation type] [device number] [image address] [image size]\n" \
"fpga operations:\n" \
"\tinfo\tlist known device information.\n" \
"\tload\tLoad device from memory buffer.\n" \
"\tdump\tLoad device to memory buffer.\n" \
),
extern int do_fpga (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
#else
#define CMD_TBL_FPGA
#endif /* CONFIG_FPGA && CONFIG_COMMANDS & CFG_CMD_FPGA */
#endif /* _CMD_FPGA_H */

54
include/cmd_pci.h Normal file
View File

@ -0,0 +1,54 @@
/*
* (C) Copyright 2001
* Gerald Van Baren, Custom IDEAS, vanbaren@cideas.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
*/
/*
* MII Functions
*/
#ifndef _CMD_PCI_H
#define _CMD_PCI_H
#if (CONFIG_COMMANDS & CFG_CMD_PCI)
#define CMD_TBL_PCI MK_CMD_TBL_ENTRY( \
"pci", 3, 5, 1, do_pci, \
"pci - list and access PCI Configuraton Space\n", \
"[bus] [long]\n" \
" - short or long list of PCI devices on bus 'bus'\n" \
"pci header b.d.f\n" \
" - show header of PCI device 'bus.device.function'\n" \
"pci display[.b, .w, .l] b.d.f [address] [# of objects]\n" \
" - display PCI configuration space (CFG)\n" \
"pci next[.b, .w, .l] b.d.f address\n" \
" - modify, read and keep CFG address\n" \
"pci modify[.b, .w, .l] b.d.f address\n" \
" - modify, auto increment CFG address\n" \
"pci write[.b, .w, .l] b.d.f address value\n" \
" - write to CFG address\n" \
),
int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
#else
#define CMD_TBL_PCI
#endif /* CFG_CMD_PCI */
#endif /* _CMD_PCI_H */

49
include/ide.h Normal file
View File

@ -0,0 +1,49 @@
/*
* (C) Copyright 2000
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* 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 _IDE_H
#define _IDE_H
#define IDE_BUS(dev) (dev >> 1)
#ifdef CONFIG_IDE_LED
/*
* LED Port
*/
#define LED_PORT ((uchar *)(PER8_BASE + 0x3000))
#define LED_IDE1 0x01
#define LED_IDE2 0x02
#define DEVICE_LED(d) ((d & 2) | ((d & 2) == 0)) /* depends on bit positions! */
#endif /* CONFIG_IDE_LED */
/*
* Function Prototypes
*/
void ide_init (void);
ulong ide_read (int device, ulong blknr, ulong blkcnt, ulong *buffer);
ulong ide_write (int device, ulong blknr, ulong blkcnt, ulong *buffer);
#endif /* _IDE_H */

70
include/kgdb.h Normal file
View File

@ -0,0 +1,70 @@
#ifndef __KGDB_H__
#define __KGDB_H__
#include <asm/ptrace.h>
#define KGDBERR_BADPARAMS 1
#define KGDBERR_NOTHEXDIG 2
#define KGDBERR_MEMFAULT 3
#define KGDBERR_NOSPACE 4
#define KGDBERR_ALIGNFAULT 5
#define KGDBDATA_MAXREGS 8
#define KGDBDATA_MAXPRIV 8
#define KGDBEXIT_TYPEMASK 0xff
#define KGDBEXIT_KILL 0
#define KGDBEXIT_CONTINUE 1
#define KGDBEXIT_SINGLE 2
#define KGDBEXIT_WITHADDR 0x100
typedef
struct {
int num;
unsigned long val;
}
kgdb_reg;
typedef
struct {
int sigval;
int extype;
unsigned long exaddr;
int nregs;
kgdb_reg regs[KGDBDATA_MAXREGS];
unsigned long private[KGDBDATA_MAXPRIV];
}
kgdb_data;
/* these functions are provided by the generic kgdb support */
extern void kgdb_init(void);
extern void kgdb_error(int);
extern int kgdb_output_string(const char *, unsigned int);
extern void breakpoint(void);
/* these functions are provided by the platform specific kgdb support */
extern void kgdb_flush_cache_range(void *, void *);
extern void kgdb_flush_cache_all(void);
extern int kgdb_setjmp(long *);
extern void kgdb_longjmp(long *, int);
extern void kgdb_enter(struct pt_regs *, kgdb_data *);
extern void kgdb_exit(struct pt_regs *, kgdb_data *);
extern int kgdb_getregs(struct pt_regs *, char *, int);
extern void kgdb_putreg(struct pt_regs *, int, char *, int);
extern void kgdb_putregs(struct pt_regs *, char *, int);
extern int kgdb_trap(struct pt_regs *);
extern void kgdb_breakpoint(int argc, char *argv[]);
/* these functions are provided by the platform serial driver */
extern void kgdb_serial_init(void);
extern int getDebugChar(void);
extern void putDebugChar(int);
extern void putDebugStr(const char *);
extern void kgdb_interruptible(int);
/* this is referenced in the trap handler for the platform */
extern int (*debugger_exception_handler)(struct pt_regs *);
#endif /* __KGDB_H__ */