Update of /cvsroot/blob/blob/src/blob
In directory sc8-pr-cvs1:/tmp/cvs-serv10102/src/blob
Modified Files:
Makefile.am
Added Files:
ra_alpha.c
Log Message:
basic support for the RotAlign Alpha Base CPU Board
--- NEW FILE: ra_alpha.c ---
/*
* ra_alpha.c: PT Rotalign alpha
*
* Based on csir_ims.c
*
* Copyright (C) 2003 Abraham van der Merwe <ab...@4d...>
* Copyright (C) 2003 Stefan Eletzhofer <ste...@in...>
*
* 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
*/
#ifdef HAVE_CONFIG_H
# include <blob/config.h>
#endif
#include <blob/main.h>
#include <blob/arch.h>
#include <blob/errno.h>
#include <blob/error.h>
#include <blob/util.h>
#include <blob/reboot.h>
#include <blob/serial.h>
#include <blob/flash.h>
#include <blob/init.h>
#include <blob/command.h>
#include <blob/uucodec.h>
#include <blob/led.h>
#include <blob/partition.h>
#include <blob/time.h>
#define GPIO25_LED GPIO_bit(0)
static int led_state;
static int led_locked;
static void rt_alpha_led_on (void)
{
if (!led_locked) {
GPSR0 = GPIO25_LED;
led_state = 1;
}
}
static void rt_alpha_led_off (void)
{
if (!led_locked) {
GPCR0 = GPIO25_LED;
led_state = 0;
}
}
static void rt_alpha_led_toggle (void)
{
if (led_state)
rt_alpha_led_off ();
else
rt_alpha_led_on ();
}
static void rt_alpha_led_lock (void)
{
led_locked = 1;
}
static void rt_alpha_led_unlock (void)
{
led_locked = 0;
}
static void rt_alpha_init_driver (void)
{
static led_driver_t rt_alpha_led_driver = {
.led_on = rt_alpha_led_on,
.led_off = rt_alpha_led_off,
.led_toggle = rt_alpha_led_toggle,
.led_lock = rt_alpha_led_lock,
.led_unlock = rt_alpha_led_unlock
};
static const flash_descriptor_t flash[] = {
{
.size = 128 * 1024,
.num = 64,
.lockable = 1
},
{ /* NULL block */ }
};
static blob_partition_t partitions[] = {
{
.magic = BLOB_DEFAULT_PART_TABLE_MAGIC,
.next = sizeof (blob_partition_t),
.offset = 0x00000000,
.size = BLOB_PART_SIZ_FULL
}, {
.magic = BLOB_PART_VALID_MAGIC,
.next = sizeof (blob_partition_t),
.offset = BLOB_PART_OFS_APPEND,
.size = BLOB_FLASH_LEN,
.name = "blob",
.mem_base = BLOB_RAM_BASE
}, {
.magic = BLOB_PART_VALID_MAGIC,
.next = sizeof (blob_partition_t),
.offset = BLOB_PART_OFS_APPEND,
.size = PARAM_FLASH_LEN,
.name = "param",
.flags = BLOB_PART_FLAG_PTABLE
}, {
.magic = BLOB_PART_VALID_MAGIC,
.next = sizeof (blob_partition_t),
.offset = BLOB_PART_OFS_APPEND,
.size = KERNEL_FLASH_LEN,
.name = "kernel",
.flags = BLOB_PART_FLAG_EXEC,
.mem_base = KERNEL_RAM_BASE,
.entry_point= KERNEL_RAM_BASE
}, {
.magic = BLOB_PART_VALID_MAGIC,
.next = sizeof (blob_partition_t),
.offset = BLOB_PART_OFS_APPEND,
.size = RAMDISK_FLASH_LEN,
.name = "ramdisk",
.flags = BLOB_PART_FLAG_LOAD,
.mem_base = RAMDISK_RAM_BASE
}, {
.magic = BLOB_PART_VALID_MAGIC,
.next = sizeof (blob_partition_t),
.offset = BLOB_PART_OFS_APPEND,
.size = BLOB_PART_SIZ_FULL,
.name = "jffs2",
.flags = BLOB_PART_FLAG_JFFS2
}, {
.magic = BLOB_PART_LAST_MAGIC
}
};
GPDR0 |= GPIO25_LED;
flash_descriptors = flash;
reboot_driver = &pxa_reboot_driver;
serial_driver = &pxa_serial_driver;
flash_driver = &intel32_flash_driver;
led_driver = &rt_alpha_led_driver;
timer_driver = &intelarm_timer_driver;
default_partition_table = partitions;
flash_partition_table = (blob_partition_t *) 0x00000000;
}
__initlist (rt_alpha_init_driver,INIT_LEVEL_DRIVER_SELECTION);
Index: Makefile.am
===================================================================
RCS file: /cvsroot/blob/blob/src/blob/Makefile.am,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- Makefile.am 4 Sep 2003 18:10:42 -0000 1.46
+++ Makefile.am 5 Nov 2003 10:09:45 -0000 1.47
@@ -86,7 +86,8 @@
xmodem.c \
accelent_sa.c assabet.c brutus.c badge4.c cep.c clart.c dafit.c frodo.c \
hackkit.c h3600.c idr.c jornada720.c lart.c miniprint.c nesa.c pleb.c \
- ramses.c shannon.c smdk2500.c system3.c trizeps.c pxa_idp.c csir_ims.c
+ ramses.c shannon.c smdk2500.c system3.c trizeps.c pxa_idp.c csir_ims.c \
+ ra_alpha.c
blob_rest_elf32_DEPENDENCIES = \
|