Update of /cvsroot/blob/blob/src/diag
In directory sc8-pr-cvs1:/tmp/cvs-serv16849
Added Files:
hackkit.c
Log Message:
- hackkit's diag part
--- NEW FILE: hackkit.c ---
/*
* hackkit.c: PT System3 specific stuff
*
* Copyright (C) 2001 Erik Mouw (J.A...@it...)
* Copyright (C) 2001,2002 Stefan Eletzhofer
* (ste...@ww...)
*
* 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
*
*/
#ident "$Id: hackkit.c,v 1.1 2002/11/26 18:18:23 seletz Exp $"
/**********************************************************************
* includes
*/
#ifdef HAVE_CONFIG_H
# include <blob/config.h>
#endif
#include <blob/main.h>
#include <blob/arch.h>
#include <blob/serial.h>
#include <blob/init.h>
#include <blob/sa1100.h>
/**********************************************************************
* defines
*/
/* this will send a cold shiver through erik's spine ... */
#define ERR( x ) { ret = x; goto DONE; }
/* more readable IMHO */
#define MEM( x ) (*((u32 *)(x)))
#define SET(reg,bit) ((reg) |= (1<<(bit)))
#define RST(reg,bit) ((reg) &= ~(1<<(bit)))
#define HKIT_DEBUG 1
/**********************************************************************
* globals
*/
/**********************************************************************
* module globals
*/
static char module_version[] = "$Id: hackkit.c,v 1.1 2002/11/26 18:18:23 seletz Exp $";
#if HKIT_DEBUG
static int hkit_dbg = 1;
#else
static int hkit_dbg = 0;
#endif
/**********************************************************************
* static functions
*/
/*********************************************************************
* hackkit_init_hardware - inits system 3 LL hardware stuff
*/
static void hackkit_init_hardware(void)
{
/* select serial driver */
serial_driver = &sa11x0_serial_driver;
}
__initlist(hackkit_init_hardware, INIT_LEVEL_DRIVER_SELECTION);
|