From: Stefan E. <se...@us...> - 2004-02-24 11:13:07
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16919/src/blob Modified Files: Makefile.am Added Files: cerf.c Log Message: CERF platform port by Kevin Lo <ke...@ke...> --- NEW FILE: cerf.c --- /* * cerf.c: Intrinsyc CerfCube specific stuff * * Copyright (C) 2004 Kevin Lo (ke...@ke...) * * $Id: cerf.c,v 1.1 2004/02/24 11:06:44 seletz Exp $ * * 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: cerf.c,v 1.1 2004/02/24 11:06:44 seletz Exp $" #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/time.h> #include <blob/partition.h> #include <blob/led.h> #include <blob/autoboot.h> #include <blob/arch.h> #include <blob/proc/sa1111.h> #include <blob/generic_io.h> #include <blob/pcmcia.h> #include <blob/cf.h> #include <blob/tar.h> #include <net/ether.h> /* flash descriptor for CERFCUBE flash */ /* 1x Intel 28F640J3A (16MB) */ static const flash_descriptor_t cerf_flash_descriptors[] = { { size: 128 * 1024, num: 128, lockable: 1 }, { /* NULL block */ }, }; /* default partition table for CERF */ static const blob_partition_t cerf_default_partition_table[] = { { /* start of table */ magic: BLOB_DEFAULT_PART_TABLE_MAGIC, next: sizeof(blob_partition_t), offset: 0x00000000, /* absolute base address */ size: BLOB_PART_SIZ_FULL }, { /* blob itself */ 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 }, { /* parameter block */ 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 }, { /* kernel */ 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 }, { /* root */ magic: BLOB_PART_VALID_MAGIC, next: sizeof(blob_partition_t), offset: BLOB_PART_OFS_APPEND, size: BLOB_PART_SIZ_FULL, name: "ramdisk", /* not really */ flags: BLOB_PART_FLAG_JFFS2 }, { /* last entry */ magic: BLOB_PART_LAST_MAGIC } }; static void cerf_set_partition_table(void) { /* the default partition table */ default_partition_table = cerf_default_partition_table; /* we don't know where the flash partition table will live, so * put the pointer at 0x0000000 and let the partition table * parser figure out. */ flash_partition_table = (blob_partition_t*)0x00000000; } __initlist(cerf_set_partition_table, INIT_LEVEL_OTHER_STUFF); static int cerf_flash_enable_vpp(void) { return 0; } static int cerf_flash_disable_vpp(void) { return 0; } static void init_cerf_flash_driver(void) { flash_descriptors = cerf_flash_descriptors; flash_driver = &intel16_flash_driver; flash_driver->enable_vpp = cerf_flash_enable_vpp; flash_driver->disable_vpp = cerf_flash_disable_vpp; } __initlist(init_cerf_flash_driver, INIT_LEVEL_DRIVER_SELECTION); static void cerf_banner(void) { printf("\n\n\n" BOARD_NAME "\n" "Blob port by Kevin Lo <ke...@ke...>.\n" "\n"); } __initlist(cerf_banner, INIT_LEVEL_INITIAL_HARDWARE); static void cerf_init_hardware(void) { /* enable RS232 tranceiver */ GPDR |= GPIO_GPIO24 | GPIO_GPIO25 ; GPSR |= GPIO_GPIO24 | GPIO_GPIO25 ; /* select drivers */ reboot_driver = &sa11x0_reboot_driver; serial_driver = &sa11x0_serial_driver; led_driver = &sa11x0_gpio_led_driver; timer_driver = &intelarm_timer_driver; } __initlist(cerf_init_hardware, INIT_LEVEL_DRIVER_SELECTION); Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/blob/Makefile.am,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- Makefile.am 5 Feb 2004 18:07:29 -0000 1.49 +++ Makefile.am 24 Feb 2004 11:06:43 -0000 1.50 @@ -85,7 +85,8 @@ compr_rtime.c compr_rubin.c jffs2.c \ uucodec.c \ xmodem.c \ - accelent_sa.c assabet.c brutus.c badge4.c cep.c clart.c dafit.c frodo.c \ + accelent_sa.c assabet.c brutus.c badge4.c cep.c cerf.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 \ ra_alpha.c |