From: Erik M. <er...@us...> - 2001-12-27 18:27:40
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv30527/src/blob Modified Files: Makefile.am main.c memsetup-sa1110.S Added Files: badge4.c jornada720.c Log Message: - Add HP Jornada 720 port (Chris Hoover) - Add HP Labs Badge4 port (Chris Hoover) - Slightly change the SA1110 memory setup or otherwise the HP machines won't work - Move SA1111 base address into machine specific include files --- NEW FILE: badge4.c --- /* * badge4.c: Badge 4 specific stuff * * Copyright (C) 2001 Hewlett-Packard Company * Written by Christopher Hoover <ch...@hp...> * * 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: badge4.c,v 1.1 2001/12/27 18:27:37 erikm Exp $" #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/flash.h> #include <blob/init.h> #include <blob/sa1100.h> /* flash descriptor for Badge4 flash */ /* 1 x Intel 28F320C3BA100 Advanced+ Boot Block Flash (32 Mbit) */ /* http://developer.intel.com/design/flcomp/datashts/29064512.pdf */ static flash_descriptor_t badge4_flash_descriptors[] = { { /* Eight 4 KW Parameter Bottom Blocks (64K bytes) */ size: 2 * 4 * 1024, num: 8, lockable: 1 }, { /* Sixty three 32 KW Main Blocks (4032K bytes) */ size: 2 * 32 * 1024, num: 63, lockable: 1 }, { /* NULL block */ }, }; static void init_flash_driver(void) { flash_descriptors = badge4_flash_descriptors; flash_driver = &intel16_flash_driver; } __initlist(init_flash_driver, INIT_LEVEL_OTHER_STUFF); static void init_hardware(void) { // GPIO 19 and 20 specify SDRAM "type". // These settings are for 12 row bits, 9 col bits. // ### Incorporate SPD code here. GPDR |= (GPIO_GPIO19 | GPIO_GPIO20); GPSR = GPIO_GPIO19; GPCR = GPIO_GPIO20; } __initlist(init_hardware, INIT_LEVEL_INITIAL_HARDWARE); --- NEW FILE: jornada720.c --- /* * jornada720.c: Jornada 720 with flash board specific stuff * * Copyright (C) 2001 Hewlett-Packard Company * Written by Christopher Hoover <ch...@hp...> * * 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: jornada720.c,v 1.1 2001/12/27 18:27:37 erikm Exp $" #ifdef HAVE_CONFIG_H # include <blob/config.h> #endif #include <blob/flash.h> #include <blob/init.h> #include <blob/sa1100.h> /* flash descriptor for Jornada720 flash */ /* 2 x Intel 28F128J3A StrataFlash (16 MB) [32MB total] */ /* http://developer.intel.com/design/flcomp/datashts/29066709.pdf */ static flash_descriptor_t jornada720_flash_descriptors[] = { { /* One hundred twenty eight 128KB blocks */ size: 2 * 128 * 1024, num: 128, lockable: 1 }, { /* NULL block */ }, }; static int jornada720_enable_vpp(void) { PPSR |= GPIO_GPIO7; PPDR |= GPIO_GPIO7; return 0; } static int jornada720_disable_vpp(void) { PPSR &= ~GPIO_GPIO7; return 0; } static void init_flash_driver(void) { flash_descriptors = jornada720_flash_descriptors; flash_driver = &intel32_flash_driver; flash_driver->enable_vpp = jornada720_enable_vpp; flash_driver->disable_vpp = jornada720_disable_vpp; } __initlist(init_flash_driver, INIT_LEVEL_OTHER_STUFF); static void init_hardware(void) { PPSR &= ~(GPIO_GPIO10 | GPIO_GPIO7); PPDR |= (GPIO_GPIO10 | GPIO_GPIO7); msleep(10 * 1000); /* Take the MCU out of reset mode */ PPSR |= GPIO_GPIO10; } __initlist(init_hardware, INIT_LEVEL_INITIAL_HARDWARE); Index: Makefile.am =================================================================== RCS file: /cvsroot/blob/blob/src/blob/Makefile.am,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Makefile.am 2001/12/19 22:53:45 1.12 +++ Makefile.am 2001/12/27 18:27:37 1.13 @@ -144,9 +144,11 @@ nullflash.c \ assabet.c \ brutus.c \ + badge4.c \ clart.c \ h3600.c \ idr.c \ + jornada720.c \ lart.c \ nesa.c \ pleb.c \ Index: main.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/main.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- main.c 2001/12/20 20:52:40 1.18 +++ main.c 2001/12/27 18:27:37 1.19 @@ -95,7 +95,7 @@ /* call SerialInit() because the default 9k6 speed might not be what the user requested */ -#if defined(H3600) || defined(SHANNON) || defined(IDR) +#if defined(H3600) || defined(SHANNON) || defined(IDR) || defined(BADGE4) || defined(JORNADA720) blob_status.terminalSpeed = baud115k2; /* DEBUG */ #endif SerialInit(blob_status.terminalSpeed); Index: memsetup-sa1110.S =================================================================== RCS file: /cvsroot/blob/blob/src/blob/memsetup-sa1110.S,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- memsetup-sa1110.S 2001/11/04 23:16:26 1.7 +++ memsetup-sa1110.S 2001/12/27 18:27:37 1.8 @@ -54,7 +54,7 @@ MEM_START: .long MEMORY_START MEMORY_CONFIG: - .long 0x72547254 /* 0x0 MDCNFG */ + .long MDCNFG_VALUE /* 0x0 MDCNFG */ .long MDCAS00_VALUE /* 0x04 MDCAS00 */ .long MDCAS01_VALUE /* 0x08 MDCAS01 */ .long MDCAS02_VALUE /* 0x0c MDCAS02 */ |