i386 Updates (touches some common drivers)
Subsystems (3)
cover i386 Updates (touches some common drivers)
Hi all,
I've been working at cleaning up some lingering loose ends on the i386 architecture. This patch series cleans up the bulk of them. This series in itself is really a number of smaller incemental steps needed to get to where I wanted to be.
Patches 1 though 6 only effect i386 specific code (cpu/i386, lib_i386 etc) these patches are needed to get my development platform (eNET board) up and running again (mainline has drifted away a little since I last worked on this board and a new gcc caused some compile issues as well)
Patches 7 through 9 effect drivers outside the i386 build tree, however as far as I can tell, these drivers are only used by the sc520_cdp and sc520_spunk boards
Patches 10 and 11 fix up the sc520_cdp and sc520_spunk boards. I did not include these fixes in the above patches because:
a) The boards were already broken, and;
b) It made more sense to me for this patch series to be a series of little steps towards the end fix rather than one big jumbled jump
As of patch 11, all i386 boards build clean. sc520_cdp and sc520_spunk could probably work now, but without either board available to test, I cannot confirm.
Patches 12 and 13 bring a couple of i386 components inline with u-boot design philosophy
Patch 14 adds PCI support to the eNET board in preparation for getting networking up and running
At this point, I noticed that my board would sometimes hang during Flash initialisation - looked like probing the Boot Flash was conflicting with the execute in place. I don't really know why it started to happen, but I decided it was about time to move u-boot into RAM which is what patches 15 through 17 do. I have not implemented proper relocation. Sorry Wolfgang, I know you'll hate what I have done, but it is the next step towards what will hopefully one day be real relocation.
PATCH 1/17 Add errno.h to i386
--- include/asm-i386/errno.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 include/asm-i386/errno.h
include/asm-i386/errno.h new file +1 -0
@@ -0,0 +1 @@ +#include <asm-generic/errno.h>
Signature · 1 line
1.6.0.2.GIT
PATCH 2/17 Change inline asm global symbols to local
gcc 4.3.2 optimiser creates multiple copies of inline asm (who knows why) Remove use of global names for labels to prevent 'symbol already defined' errors
--- board/eNET/eNET.c | 4 ++-- cpu/i386/sc520/sc520.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
board/eNET/eNET.c +2 -2
@@ -51,9 +51,9 @@ void init_sc520_enet (void)/* wait at least one millisecond */ asm("movl $0x2000,%%ecx\n" -"wait_loop: pushl %%ecx\n" +"0: pushl %%ecx\n" "popl %%ecx\n" -"loop wait_loop\n" : : :"ecx" ); +"loop 0b\n" : : :"ecx" );/* turn on the SDRAM write buffer */ write_mmcr_byte (SC520_DBCTL ,0x11 );
cpu/i386/sc520/sc520.c +2 -2
@@ -109,9 +109,9 @@ void init_sc520(void)/* wait at least one millisecond */ asm("movl $0x2000,%%ecx\n" -"wait_loop: pushl %%ecx\n" +"0: pushl %%ecx\n" "popl %%ecx\n" -"loop wait_loop\n" : : :"ecx" ); +"loop 0b\n" : : :"ecx" );/* turn on the SDRAM write buffer */ write_mmcr_byte (SC520_DBCTL ,0x11 );
Signature · 1 line
1.6.0.2.GIT
PATCH 3/17 Fix regression introduced by commit 8c63d47651f7
A local variable was deleted that should not have been
--- lib_i386/pcat_timer.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
lib_i386/pcat_timer.c +5 -0
@@ -25,10 +25,13 @@#include <asm/io.h> #include <asm/i8254.h> #include <asm/ibmpc.h> +#include <asm/interrupt.h> #define TIMER0_VALUE 0x04aa/* 1kHz 1.9318MHz / 1000 */ #define TIMER2_VALUE 0x0a8e/* 440Hz */ +static int timer_init_done =0 ; +int timer_init (void ) {/* initialize timer 0 and 2
@@ -52,6 +55,8 @@ int timer_init(void)irq_install_handler (0 , timer_isr,NULL );unmask_irq (0 ); + timer_init_done =1 ; +return 0 ; }
Signature · 1 line
1.6.0.2.GIT
PATCH 4/17 Fix environment configuration for eNET board
The current configuration of the Environment has the redundant copy of the environment in the Boot Flash - This was never the intent. The Environment should instead be in the first two sectors of the first Strata Flash
--- include/configs/eNET.h | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)
include/configs/eNET.h +5 -6
@@ -188,14 +188,13 @@* Environment configuration */ #define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_OFFSET 0x20000/* Offset of Environment Sector */ -#define CONFIG_ENV_SIZE 0x08000/* Total Size of Environment Sector */ #define CONFIG_ENV_SECT_SIZE 0x20000/* Total Size of Environment Sector */ -#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE_1 + \ - CONFIG_ENV_OFFSET) -#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \ +#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE +#define CONFIG_ENV_ADDR CONFIG_SYS_FLASH_BASE_1 +/* Redundant Copy */ +#define CONFIG_ENV_ADDR_REDUND (CONFIG_SYS_FLASH_BASE_1 + \ CONFIG_ENV_SECT_SIZE) -#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) +#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SECT_SIZE/*-----------------------------------------------------------------------
Signature · 1 line
1.6.0.2.GIT
PATCH 5/17 Fix sc520 timer interrupt generation
The current implementation has the timer being started before the interrupt handler is installed. It the interrupt occurs before the handler is installed, the timer interrupt is never reset and the timer stops
--- cpu/i386/sc520/sc520_timer.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
cpu/i386/sc520/sc520_timer.c +3 -3
@@ -54,9 +54,6 @@ int timer_init(void)write_mmcr_word (SC520_GPTMR1MAXCMPA ,100 );write_mmcr_word (SC520_GPTMR1CTL ,0xe009 ); -/* Clear the GP Timers status register */ -write_mmcr_byte (SC520_GPTMRSTA ,0x07 ); -/* Register the SC520 specific timer interrupt handler */ register_timer_isr (sc520_timer_isr);
@@ -64,6 +61,9 @@ int timer_init(void)irq_install_handler (0 , timer_isr,NULL );unmask_irq (0 ); +/* Clear the GP Timer 1 status register to get the show rolling*/ +write_mmcr_byte (SC520_GPTMRSTA ,0x02 ); +return 0 ; }
Signature · 1 line
1.6.0.2.GIT
PATCH 6/17 Misc i386 PCI fixups
Change PCI_REGION_MEMORY to PCI_REGION_SYS_MEMORY (Originally done in commit ff4e66e93c1a, regressed by commit 6d7f610b09f8)
Cast PCI_ROM_ADDRESS_MASK to u32
Wrap probe_pci_video() call inside #ifdef CONFIG_VIDEO
Change call to pci_find_class() to pci_find_devices(). This is based on a patch submitted on 1st March 2007 (Patch that fixes the compilation errors for sc520_cdp board) by mushtaq_k
This patch requires that PCI_VIDEO_VENDOR_ID and PCI_VIDEO_DEVICE_ID be specified in the board config file. Dummy values have been added for the SC520 CDP board to enable compilation, but since I do not have one of these, I do know what the values should be
--- board/sc520_cdp/sc520_cdp.c | 1 + cpu/i386/sc520/sc520_pci.c | 2 +- include/configs/sc520_cdp.h | 2 ++ lib_i386/pci.c | 2 +- lib_i386/video_bios.c | 18 +++++++++--------- 5 files changed, 14 insertions(+), 11 deletions(-)
board/sc520_cdp/sc520_cdp.c +1 -0
@@ -27,6 +27,7 @@#include <asm/io.h> #include <asm/pci.h> #include <asm/ic/sc520.h> +#include <asm/ic/pci.h> #include <ali512x.h> #include <spi.h> #include <netdev.h>
cpu/i386/sc520/sc520_pci.c +1 -1
@@ -124,7 +124,7 @@ void pci_sc520_init(struct pci_controller *hose)SC520_PCI_MEMORY_BUS ,SC520_PCI_MEMORY_PHYS ,SC520_PCI_MEMORY_SIZE , - PCI_REGION_MEM | PCI_REGION_MEMORY); + PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);/* PCI memory space */ pci_set_region(hose->regions + 1,
include/configs/sc520_cdp.h +2 -0
@@ -206,6 +206,8 @@************************************************************/ #ifndef GRUSS_TESTING #define CONFIG_VIDEO /* To enable video controller support */ +#define PCI_VIDEO_VENDOR_ID 0/*Use the appropriate vendor ID*/ +#define PCI_VIDEO_DEVICE_ID 0/*Use the appropriate Device ID*/ #else #undef CONFIG_VIDEO#endif
lib_i386/pci.c +1 -1
@@ -60,7 +60,7 @@ int pci_shadow_rom(pci_dev_t dev, unsigned char *dest) vendor, device, class_code);#endif /* Enable the rom addess decoder */ -pci_write_config_dword (dev,PCI_ROM_ADDRESS ,PCI_ROM_ADDRESS_MASK ); +pci_write_config_dword (dev,PCI_ROM_ADDRESS , (u32 )PCI_ROM_ADDRESS_MASK );pci_read_config_dword (dev,PCI_ROM_ADDRESS , &addr_reg);if (!addr_reg) {
lib_i386/video_bios.c +9 -9
@@ -76,18 +76,22 @@ void print_bios_bios_stat(void) }#endif +#ifdef CONFIG_VIDEO +#define PCI_CLASS_VIDEO 3#define PCI_CLASS_VIDEO_STD 0#define PCI_CLASS_VIDEO_PROG_IF_VGA 0 +static struct pci_device_id supported[] = { + {PCI_VIDEO_VENDOR_ID ,PCI_VIDEO_DEVICE_ID }, + {} +};static u32 probe_pci_video (void ) {pci_dev_t devbusfn; -if ((devbusfn =pci_find_class (PCI_CLASS_VIDEO , -PCI_CLASS_VIDEO_STD , -PCI_CLASS_VIDEO_PROG_IF_VGA ,0 )) !=-1 ) { +if ((devbusfn =pci_find_devices (supported,0 ) !=-1 )) {u32 old;u32 addr;
@@ -103,7 +107,7 @@ static u32 probe_pci_video(void)/* Test the ROM decoder, do the device support a rom? */ pci_read_config_dword (devbusfn,PCI_ROM_ADDRESS , &old); -pci_write_config_dword (devbusfn,PCI_ROM_ADDRESS ,PCI_ROM_ADDRESS_MASK ); +pci_write_config_dword (devbusfn,PCI_ROM_ADDRESS , (u32 )PCI_ROM_ADDRESS_MASK );pci_read_config_dword (devbusfn,PCI_ROM_ADDRESS , &addr);pci_write_config_dword (devbusfn,PCI_ROM_ADDRESS , old);
@@ -133,11 +137,6 @@ static u32 probe_pci_video(void)return 0 ; } - -#endif - -#ifdef CONFIG_VIDEO -static int probe_isa_video (void ) {u32 ptr;
@@ -220,3 +219,4 @@ int video_bios_init(void) }#endif +#endif
Signature · 1 line
1.6.0.2.GIT
PATCH 7/17 Misc SATA fixups
Cast first parameter to sata_cpy()
In /drivers/block/ata_piix.h, ata_id_has_lba48(), ata_id_has_lba(), ata_id_has_dma(), ata_id_u32(), ata_id_u64() are all defined in include/libata.h which is included in ata.h which is included by all files which include ata_piix.h (only ata_piix.c) so these definitions are supurflous to (and conlict with) this in libata.h. Interestingly, my compiler complains about ata_id_u64 already being defined, but not ata_id_u32
ata_dump_id() is defined in include/libata.h and should not be static (maybe should even use ata_dump_id() in libata.c
--- drivers/block/ata_piix.c | 10 +++++----- drivers/block/ata_piix.h | 15 +-------------- 2 files changed, 6 insertions(+), 19 deletions(-)
drivers/block/ata_piix.c +5 -5
@@ -310,7 +310,7 @@ sata_bus_softreset (int num) }if (status &ATA_BUSY ) -printf ("ata%u is slow to respond,plz be patient\n" , port); +printf ("ata%u is slow to respond,plz be patient\n" , num);while ((status &ATA_BUSY )) {msleep (100 );
@@ -318,7 +318,7 @@ sata_bus_softreset (int num) }if (status &ATA_BUSY ) { -printf ("ata%u failed to respond : " , port); +printf ("ata%u failed to respond : " , num);printf ("bus reset failed\n" );return 1 ; }
@@ -389,11 +389,11 @@ sata_identify (int num, int dev)return ; } -sata_cpy (sata_dev_desc[devno].revision, iop->fw_rev, +sata_cpy ((unsigned char *)sata_dev_desc[devno].revision, iop->fw_rev,sizeof (sata_dev_desc[devno].revision)); -sata_cpy (sata_dev_desc[devno].vendor, iop->model, +sata_cpy ((unsigned char *)sata_dev_desc[devno].vendor, iop->model,sizeof (sata_dev_desc[devno].vendor)); -sata_cpy (sata_dev_desc[devno].product, iop->serial_no, +sata_cpy ((unsigned char *)sata_dev_desc[devno].product, iop->serial_no,sizeof (sata_dev_desc[devno].product));strswab (sata_dev_desc[devno].revision);strswab (sata_dev_desc[devno].vendor);
drivers/block/ata_piix.h +1 -14
@@ -37,20 +37,7 @@ struct sata_port {/***********SATA LIBRARY SPECIFIC DEFINITIONS AND DECLARATIONS**************/ #ifdef SATA_DECL /*SATA library specific declarations */ -#define ata_id_has_lba48 (id) ((id)[83] & (1 << 10)) -#define ata_id_has_lba (id) ((id)[49] & (1 << 9)) -#define ata_id_has_dma (id) ((id)[49] & (1 << 8)) -#define ata_id_u32 (id,n) \ - (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) -#define ata_id_u64 (id,n) \ - (((u64) (id)[(n) + 3] << 48) | \ - ((u64) (id)[(n) + 2] << 32) | \ - ((u64) (id)[(n) + 1] << 16) | \ - ((u64) (id)[(n) + 0]) ) -#endif - -#ifdef SATA_DECL /*SATA library specific declarations */ -static inline void +inline void ata_dump_id (u16 * id) { PRINTF ("49 = 0x%04x "
Signature · 1 line
1.6.0.2.GIT
PATCH 8/17 Misc ti_pci1410a fixups
Removed do_pinit() - now declared in cmd_pcmcia.c
Added #define CONFIG_CMD_PCMCIA around pcmcia_off() in line with other PCMCIA drivers
signed/unsigned type fixups
Added semi-colon after default: label as required by newer gcc
The only board that appears to use this driver is the sc520_spunk which is very old and very likely very broken anyway. I do not have one to test whether this patch breaks anything functionaly, I have can only check that it compiles without warning or error
--- drivers/pcmcia/ti_pci1410a.c | 62 ++++++++++++----------------------------- 1 files changed, 18 insertions(+), 44 deletions(-)
drivers/pcmcia/ti_pci1410a.c +18 -44
@@ -68,13 +68,12 @@int pcmcia_on (int ide_base_bus); -static int pcmcia_off (void );static int hardware_disable (int slot);static int hardware_enable (int slot);static int voltage_set (int slot,int vcc,int vpp);static void print_funcid (int func); -static void print_fixed (volatile uchar *p); -static int identify (volatile uchar *p); +static void print_fixed (volatile char *p); +static int identify (volatile char *p);static int check_ide_device (int slot,int ide_base_bus);
@@ -86,33 +85,6 @@ const char *indent = "\t ";/* ------------------------------------------------------------------------- */ -int do_pinit (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) -{ -#ifndef CONFIG_SYS_FIRST_PCMCIA_BUS -# define CONFIG_SYS_FIRST_PCMCIA_BUS 0 -#endif - -int rcode =0 ; - -if (argc !=2 ) { -printf ("Usage: pinit {on | off}\n" ); -return 1 ; - } -if (strcmp (argv[1 ],"on" ) ==0 ) { - rcode =pcmcia_on (CONFIG_SYS_FIRST_PCMCIA_BUS ); - }else if (strcmp (argv[1 ],"off" ) ==0 ) { - rcode =pcmcia_off (); - }else { -printf ("Usage: pinit {on | off}\n" ); -return 1 ; - } - -return rcode; -} - -/* ------------------------------------------------------------------------- */ - -static struct pci_device_id supported[] = { {PCI_VENDOR_ID_TI ,0xac50 },/* Ti PCI1410A */ {PCI_VENDOR_ID_TI ,0xac56 },/* Ti PCI1510 */
@@ -245,7 +217,8 @@ int pcmcia_on(int ide_base_bus)/* ------------------------------------------------------------------------- */ -static int pcmcia_off (void ) +#if defined(CONFIG_CMD_PCMCIA ) +int pcmcia_off (void ) {int slot =0 ;
@@ -285,6 +258,7 @@ static int pcmcia_off (void) return 0; } +#endif /* ------------------------------------------------------------------------- */
@@ -294,9 +268,9 @@ static int pcmcia_off (void)int ide_devices_found;static int check_ide_device (int slot,int ide_base_bus) { -volatile uchar *ident =NULL ; -volatile uchar *feature_p[MAX_FEATURES ]; -volatile uchar *p, *start; +volatile char *ident =NULL ; +volatile char *feature_p[MAX_FEATURES ]; +volatile char *p, *start;int n_features =0 ;uchar func_id = ~0 ;uchar code, len;
@@ -314,7 +288,7 @@ static int check_ide_device(int slot, int ide_base_bus)return 1 ; } - start = p = (volatile uchar *) pcmcia_cis_ptr; + start = p = (volatile char *) pcmcia_cis_ptr;while ((p - start) <MAX_TUPEL_SZ ) {
@@ -417,7 +391,7 @@ static int voltage_set(int slot, int vcc, int vpp) socket_control |=0x30 ;break ;case 0 : -default : +default : ; }switch (vpp) {
@@ -431,7 +405,7 @@ static int voltage_set(int slot, int vcc, int vpp) socket_control |=0x3 ;break ;case 0 : -default : +default : ; }writel (socket_control, reg);
@@ -537,7 +511,7 @@ static void print_funcid(int func)/* ------------------------------------------------------------------------- */ -static void print_fixed (volatile uchar *p) +static void print_fixed (volatile char *p) {if (p ==NULL )return ;
@@ -605,17 +579,17 @@ static void print_fixed(volatile uchar *p)#define MAX_IDENT_CHARS 64#define MAX_IDENT_FIELDS 4 -static uchar *known_cards[] = { +static char *known_cards[] = {"ARGOSY PnPIDE D5" ,NULL }; -static int identify (volatile uchar *p) +static int identify (volatile char *p) { -uchar id_str[MAX_IDENT_CHARS ]; -uchar data; -uchar *t; -uchar **card; +char id_str[MAX_IDENT_CHARS ]; +char data; +char *t; +char **card;int i, done;if (p ==NULL )
Signature · 1 line
1.6.0.2.GIT
PATCH 9/17 Misc ds1722 fixups
This patch is based on a patch submitted by Jean-Christophe PLAGNIOL-VILLARD on 18th May 2008 as part of a general i386 / sc520 fixup which was never applied
--- drivers/hwmon/ds1722.c | 3 ++- include/ds1722.h | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletions(-) create mode 100644 include/ds1722.h
drivers/hwmon/ds1722.c +2 -1
@@ -1,6 +1,7 @@#include <common.h> -#include <ssi.h> +#include <asm/ic/ssi.h> +#include <ds1722.h> static void ds1722_select (int dev) {
include/ds1722.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* 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 _DS1722_H_ +#define _DS1722_H_ + +#define DS1722_RESOLUTION_8BIT 0x0 +#define DS1722_RESOLUTION_9BIT 0x1 +#define DS1722_RESOLUTION_10BIT 0x2 +#define DS1722_RESOLUTION_11BIT 0x3 +#define DS1722_RESOLUTION_12BIT 0x4 + +int ds1722_probe (int dev); + +#endif /* _DS1722_H_ */
Signature · 1 line
1.6.0.2.GIT
PATCH 10/17 Fixup sc520_spunk board
Primary intent is to resolve build errors for this board which has been neglected for a very long time. I do not have one of these boards, so I cannot test functionality
--- board/sc520_spunk/sc520_spunk.c | 33 +++++++++++++++++++++++++++++++-- include/configs/sc520_spunk.h | 2 ++ 2 files changed, 33 insertions(+), 2 deletions(-)
board/sc520_spunk/sc520_spunk.c +31 -2
@@ -24,11 +24,13 @@#include <common.h> #include <pci.h> -#include <ssi.h> #include <netdev.h> +#include <ds1722.h> #include <asm/io.h> #include <asm/pci.h> #include <asm/ic/sc520.h> +#include <asm/ic/pci.h> +#include <asm/ic/ssi.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -112,7 +114,7 @@ static void pci_sc520_spunk_fixup_irq(struct pci_controller *hose, pci_dev_t dev };static int next_irq_index=0 ; -char tmp_pin; +uchar tmp_pin;int pin;pci_hose_read_config_byte (hose, dev,PCI_INTERRUPT_PIN , &tmp_pin);
@@ -637,6 +639,33 @@ void ssi_chip_select(int dev) } } +void spi_eeprom_probe (int x) +{ +} + +int spi_eeprom_read (int x,int offset,uchar *buffer,int len) +{ +return 0 ; +} + +int spi_eeprom_write (int x,int offset,uchar *buffer,int len) +{ +return 0 ; +} + +void mw_eeprom_probe (int x) +{ +} + +int mw_eeprom_read (int x,int offset,uchar *buffer,int len) +{ +return 0 ; +} + +int mw_eeprom_write (int x,int offset,uchar *buffer,int len) +{ +return 0 ; +}void spi_init_f (void ) {
include/configs/sc520_spunk.h +2 -0
@@ -37,6 +37,7 @@#define CONFIG_X86 1/* This is a X86 CPU */ #define CONFIG_SYS_SC520 1/* Include support for AMD SC520 */ +#define CONFIG_SYS_SC520_SSI #define CONFIG_SYS_SDRAM_PRECHARGE_DELAY 6/* 6T */ #define CONFIG_SYS_SDRAM_REFRESH_RATE 78/* 7.8uS (choices are 7.8, 15.6, 31.2 or 62.5uS) */
@@ -218,6 +219,7 @@#define CONFIG_SYS_PCMCIA_CIS_WIN_SIZE 0x00100000#define CONFIG_SYS_PCMCIA_IO_WIN 0xe000#define CONFIG_SYS_PCMCIA_IO_WIN_SIZE 16 +#define CONFIG_PCMCIA_SLOT_A /* TODO: Check this */ /************************************************************ * DISK Partition support
Signature · 1 line
1.6.0.2.GIT
PATCH 11/17 Misc sc520 cdp fixups
Now that the PCI, SATA et al compile problems have been resolved, the cludge that was applied to avoid them can be removed
--- include/configs/sc520_cdp.h | 22 ---------------------- 1 files changed, 0 insertions(+), 22 deletions(-)
include/configs/sc520_cdp.h +0 -22
@@ -30,7 +30,6 @@#define CONFIG_SKIP_RELOCATE_UBOOT -#define GRUSS_TESTING /* * High Level Configuration Options * (easy to change)
@@ -85,11 +84,7 @@#include <config_cmd_default.h> #define CONFIG_CMD_PCI -#ifndef GRUSS_TESTING #define CONFIG_CMD_SATA -#else -#undef CONFIG_CMD_SATA -#endif #define CONFIG_CMD_JFFS2 #define CONFIG_CMD_NET #define CONFIG_CMD_EEPROM
@@ -181,17 +176,10 @@/************************************************************ *SATA/Native Stuff ************************************************************/ -#ifndef GRUSS_TESTING #define CONFIG_SYS_SATA_MAXBUS 2/*Max Sata buses supported */ #define CONFIG_SYS_SATA_DEVS_PER_BUS 2/*Max no. of devices per bus/port */ #define CONFIG_SYS_SATA_MAX_DEVICE (CONFIG_SYS_SATA_MAXBUS* CONFIG_SYS_SATA_DEVS_PER_BUS)#define CONFIG_ATA_PIIX 1/*Supports ata_piix driver */ -#else -#undef CONFIG_SYS_SATA_MAXBUS -#undef CONFIG_SYS_SATA_DEVS_PER_BUS -#undef CONFIG_SYS_SATA_MAX_DEVICE -#undef CONFIG_ATA_PIIX -#endif /************************************************************
@@ -204,13 +192,9 @@/************************************************************ * Video/Keyboard support ************************************************************/ -#ifndef GRUSS_TESTING #define CONFIG_VIDEO /* To enable video controller support */ #define PCI_VIDEO_VENDOR_ID 0/*Use the appropriate vendor ID*/ #define PCI_VIDEO_DEVICE_ID 0/*Use the appropriate Device ID*/ -#else -#undef CONFIG_VIDEO -#endif #define CONFIG_I8042_KBD #define CONFIG_SYS_ISA_IO 0
@@ -223,7 +207,6 @@/* * PCI stuff */ -#ifndef GRUSS_TESTING #define CONFIG_PCI /* include pci support */ #define CONFIG_PCI_PNP /* pci plug-and-play */ #define CONFIG_PCI_SCAN_SHOW
@@ -232,11 +215,6 @@#define CONFIG_SYS_SECOND_PCI_IRQ 9#define CONFIG_SYS_THIRD_PCI_IRQ 11#define CONFIG_SYS_FORTH_PCI_IRQ 15 -#else -#undef CONFIG_PCI -#undef CONFIG_PCI_PNP -#undef CONFIG_PCI_SCAN_SHOW -#endif #endif /* __CONFIG_H */
Signature · 1 line
1.6.0.2.GIT
PATCH 12/17 Replace [read, write]_mmcr_[byte, word, long] with memory mapped structure
--- board/eNET/eNET.c | 86 ++++---- board/sc520_cdp/flash.c | 14 +- board/sc520_cdp/sc520_cdp.c | 171 ++++++++-------- board/sc520_spunk/sc520_spunk.c | 211 ++++++++++---------- cpu/i386/sc520/sc520.c | 71 ++------ cpu/i386/sc520/sc520_pci.c | 66 +++--- cpu/i386/sc520/sc520_ssi.c | 28 ++-- cpu/i386/sc520/sc520_timer.c | 31 ++-- include/asm-i386/ic/sc520.h | 417 ++++++++++++++++++++++----------------- 9 files changed, 550 insertions(+), 545 deletions(-)
board/eNET/eNET.c +43 -43
@@ -46,7 +46,7 @@ unsigned long monitor_flash_len = CONFIG_SYS_MONITOR_LEN;void init_sc520_enet (void ) {/* Set CPU Speed to 100MHz */ -write_mmcr_byte (SC520_CPUCTL ,1 ); + sc520_mmcr->cpuctl =0x01 ; gd->cpu_clk =100000000 ;/* wait at least one millisecond */
@@ -56,7 +56,7 @@ void init_sc520_enet (void) "loop 0b\n": : : "ecx"); /* turn on the SDRAM write buffer */ - write_mmcr_byte(SC520_DBCTL ,0x11 ); + sc520_mmcr->dbctl =0x11 ;/* turn on the cache and disable write through */ asm("movl %%cr0, %%eax\n"
@@ -71,51 +71,51 @@ int board_init(void) {init_sc520_enet (); -write_mmcr_byte (SC520_GPCSRT ,0x01 );/* GP Chip Select Recovery Time */ -write_mmcr_byte (SC520_GPCSPW ,0x07 );/* GP Chip Select Pulse Width */ -write_mmcr_byte (SC520_GPCSOFF ,0x00 );/* GP Chip Select Offset */ -write_mmcr_byte (SC520_GPRDW ,0x05 );/* GP Read pulse width */ -write_mmcr_byte (SC520_GPRDOFF ,0x01 );/* GP Read offset */ -write_mmcr_byte (SC520_GPWRW ,0x05 );/* GP Write pulse width */ -write_mmcr_byte (SC520_GPWROFF ,0x01 );/* GP Write offset */ - -write_mmcr_word (SC520_PIODATA15_0 ,0x0630 );/* PIO15_PIO0 Data */ -write_mmcr_word (SC520_PIODATA31_16 ,0x2000 );/* PIO31_PIO16 Data */ -write_mmcr_word (SC520_PIODIR31_16 ,0x2000 );/* GPIO Direction */ -write_mmcr_word (SC520_PIODIR15_0 ,0x87b5 );/* GPIO Direction */ -write_mmcr_word (SC520_PIOPFS31_16 ,0x0dfe );/* GPIO pin function 31-16 reg */ -write_mmcr_word (SC520_PIOPFS15_0 ,0x200a );/* GPIO pin function 15-0 reg */ -write_mmcr_byte (SC520_CSPFS ,0x00f8 );/* Chip Select Pin Function Select */ - -write_mmcr_long (SC520_PAR2 ,0x200713f8 );/* Uart A (GPCS0, 0x013f8, 8 Bytes) */ -write_mmcr_long (SC520_PAR3 ,0x2c0712f8 );/* Uart B (GPCS3, 0x012f8, 8 Bytes) */ -write_mmcr_long (SC520_PAR4 ,0x300711f8 );/* Uart C (GPCS4, 0x011f8, 8 Bytes) */ -write_mmcr_long (SC520_PAR5 ,0x340710f8 );/* Uart D (GPCS5, 0x010f8, 8 Bytes) */ -write_mmcr_long (SC520_PAR6 ,0xe3ffc000 );/* SDRAM (0x00000000, 128MB) */ -write_mmcr_long (SC520_PAR7 ,0xaa3fd000 );/* StrataFlash (ROMCS1, 0x10000000, 16MB) */ -write_mmcr_long (SC520_PAR8 ,0xca3fd100 );/* StrataFlash (ROMCS2, 0x11000000, 16MB) */ -write_mmcr_long (SC520_PAR9 ,0x4203d900 );/* SRAM (GPCS0, 0x19000000, 1MB) */ -write_mmcr_long (SC520_PAR10 ,0x4e03d910 );/* SRAM (GPCS3, 0x19100000, 1MB) */ -write_mmcr_long (SC520_PAR11 ,0x50018100 );/* DP-RAM (GPCS4, 0x18100000, 4kB) */ -write_mmcr_long (SC520_PAR12 ,0x54020000 );/* CFLASH1 (0x200000000, 4kB) */ -write_mmcr_long (SC520_PAR13 ,0x5c020001 );/* CFLASH2 (0x200010000, 4kB) */ -/* write_mmcr_long(SC520_PAR14, 0x8bfff800); */ /* BOOTCS at 0x18000000 */ -/* write_mmcr_long(SC520_PAR15, 0x38201000); */ /* LEDs etc (GPCS6, 0x1000, 20 Bytes */ + sc520_mmcr->gpcsrt =0x01 ;/* GP Chip Select Recovery Time */ + sc520_mmcr->gpcspw =0x07 ;/* GP Chip Select Pulse Width */ + sc520_mmcr->gpcsoff =0x00 ;/* GP Chip Select Offset */ + sc520_mmcr->gprdw =0x05 ;/* GP Read pulse width */ + sc520_mmcr->gprdoff =0x01 ;/* GP Read offset */ + sc520_mmcr->gpwrw =0x05 ;/* GP Write pulse width */ + sc520_mmcr->gpwroff =0x01 ;/* GP Write offset */ + + sc520_mmcr->piodata15_0 =0x0630 ;/* PIO15_PIO0 Data */ + sc520_mmcr->piodata31_16 =0x2000 ;/* PIO31_PIO16 Data */ + sc520_mmcr->piodir31_16 =0x2000 ;/* GPIO Direction */ + sc520_mmcr->piodir15_0 =0x87b5 ;/* GPIO Direction */ + sc520_mmcr->piopfs31_16 =0x0dfe ;/* GPIO pin function 31-16 reg */ + sc520_mmcr->piopfs15_0 =0x200a ;/* GPIO pin function 15-0 reg */ + sc520_mmcr->cspfs =0x00f8 ;/* Chip Select Pin Function Select */ + + sc520_mmcr->par[2 ] =0x200713f8 ;/* Uart A (GPCS0, 0x013f8, 8 Bytes) */ + sc520_mmcr->par[3 ] =0x2c0712f8 ;/* Uart B (GPCS3, 0x012f8, 8 Bytes) */ + sc520_mmcr->par[4 ] =0x300711f8 ;/* Uart C (GPCS4, 0x011f8, 8 Bytes) */ + sc520_mmcr->par[5 ] =0x340710f8 ;/* Uart D (GPCS5, 0x010f8, 8 Bytes) */ + sc520_mmcr->par[6 ] =0xe3ffc000 ;/* SDRAM (0x00000000, 128MB) */ + sc520_mmcr->par[7 ] =0xaa3fd000 ;/* StrataFlash (ROMCS1, 0x10000000, 16MB) */ + sc520_mmcr->par[8 ] =0xca3fd100 ;/* StrataFlash (ROMCS2, 0x11000000, 16MB) */ + sc520_mmcr->par[9 ] =0x4203d900 ;/* SRAM (GPCS0, 0x19000000, 1MB) */ + sc520_mmcr->par[10 ] =0x4e03d910 ;/* SRAM (GPCS3, 0x19100000, 1MB) */ + sc520_mmcr->par[11 ] =0x50018100 ;/* DP-RAM (GPCS4, 0x18100000, 4kB) */ + sc520_mmcr->par[12 ] =0x54020000 ;/* CFLASH1 (0x200000000, 4kB) */ + sc520_mmcr->par[13 ] =0x5c020001 ;/* CFLASH2 (0x200010000, 4kB) */ +/* sc520_mmcr->par14 = 0x8bfff800; */ /* BOOTCS at 0x18000000 */ +/* sc520_mmcr->par15 = 0x38201000; */ /* LEDs etc (GPCS6, 0x1000, 20 Bytes */ /* Disable Watchdog */ -write_mmcr_word (0x0cb0 ,0x3333 ); -write_mmcr_word (0x0cb0 ,0xcccc ); -write_mmcr_word (0x0cb0 ,0x0000 ); + sc520_mmcr->wdtmrctl =0x3333 ; + sc520_mmcr->wdtmrctl =0xcccc ; + sc520_mmcr->wdtmrctl =0x0000 ;/* Chip Select Configuration */ -write_mmcr_word (SC520_BOOTCSCTL ,0x0033 ); -write_mmcr_word (SC520_ROMCS1CTL ,0x0615 ); -write_mmcr_word (SC520_ROMCS2CTL ,0x0615 ); - -write_mmcr_byte (SC520_ADDDECCTL ,0x02 ); -write_mmcr_byte (SC520_UART1CTL ,0x07 ); -write_mmcr_byte (SC520_SYSARBCTL ,0x06 ); -write_mmcr_word (SC520_SYSARBMENB ,0x0003 ); + sc520_mmcr->bootcsctl =0x0033 ; + sc520_mmcr->romcs1ctl =0x0615 ; + sc520_mmcr->romcs2ctl =0x0615 ; + + sc520_mmcr->adddecctl =0x02 ; + sc520_mmcr->uart1ctl =0x07 ; + sc520_mmcr->sysarbctl =0x06 ; + sc520_mmcr->sysarbmenb =0x0003 ;/* Crystal is 33.000MHz */ gd->bus_clk =33000000 ;
board/sc520_cdp/flash.c +7 -7
@@ -337,12 +337,12 @@ done: ;unsigned micro; \unsigned milli=0 ; \ \ - micro = *(volatile u16 *)(0xfffef000 +SC520_SWTMRMILLI ); \ + micro = sc520_mmcr->swtmrmilli; \ \for (;;) { \ \ - milli += *(volatile u16 *)(0xfffef000 +SC520_SWTMRMILLI ); \ - micro = *(volatile u16 *)(0xfffef000 +SC520_SWTMRMICRO ); \ + milli += sc520_mmcr->swtmrmilli; \ + micro = sc520_mmcr->swtmrmicro; \ \if ((delay) <= (micro + (milli *1000 ))) { \break ; \
@@ -364,12 +364,12 @@ static u32 _amd_erase_flash(u32 addr, u32 sector)/* Sector erase command comes last */ *(volatile u32 *)(addr + sector) =0x30303030 ; - elapsed = *(volatile u16 *)(0xfffef000 +SC520_SWTMRMILLI );/* dummy read */ + elapsed = sc520_mmcr->swtmrmilli;/* dummy read */ elapsed =0 ;__udelay (50 );while (((*(volatile u32 *)(addr + sector)) &0x80808080 ) !=0x80808080 ) { - elapsed += *(volatile u16 *)(0xfffef000 +SC520_SWTMRMILLI ); + elapsed += sc520_mmcr->swtmrmilli;if (elapsed > ((CONFIG_SYS_FLASH_ERASE_TOUT /CONFIG_SYS_HZ ) *1000 )) { *(volatile u32 *)(addr) =0xf0f0f0f0 ;return 1 ;
@@ -487,12 +487,12 @@ static int _amd_write_word(unsigned start, unsigned dest, unsigned data) dest2[0 ] = data; - elapsed = *(volatile u16 *)(0xfffef000 +SC520_SWTMRMILLI );/* dummy read */ + elapsed = sc520_mmcr->swtmrmilli;/* dummy read */ elapsed =0 ;/* data polling for D7 */ while ((dest2[0 ] &0x80808080 ) != (data2[0 ] &0x80808080 )) { - elapsed += *(volatile u16 *)(0xfffef000 +SC520_SWTMRMILLI ); + elapsed += sc520_mmcr->swtmrmilli;if (elapsed > ((CONFIG_SYS_FLASH_WRITE_TOUT /CONFIG_SYS_HZ ) *1000 )) { addr2[0 ] =0xf0f0f0f0 ;return 1 ;
board/sc520_cdp/sc520_cdp.c +84 -87
283 lines not on this page · raw message
board/sc520_spunk/sc520_spunk.c +103 -108
395 lines not on this page · raw message
cpu/i386/sc520/sc520.c +15 -56
126 lines not on this page · raw message
cpu/i386/sc520/sc520_pci.c +33 -33
90 lines not on this page · raw message
cpu/i386/sc520/sc520_ssi.c +15 -13
@@ -61,32 +61,34 @@ int ssi_set_interface(int freq, int lsb_first, int inv_clock, int inv_phase) temp |=PHS_INV_ENB ; } -write_mmcr_byte (SC520_SSICTL , temp); + sc520_mmcr->ssictl = temp;return 0 ; }u8 ssi_txrx_byte (u8 data) { -write_mmcr_byte (SC520_SSIXMIT , data); -while ((read_mmcr_byte (SC520_SSISTA )) &SSISTA_BSY ); -write_mmcr_byte (SC520_SSICMD ,SSICMD_CMD_SEL_XMITRCV ); -while ((read_mmcr_byte (SC520_SSISTA )) &SSISTA_BSY ); -return read_mmcr_byte (SC520_SSIRCV ); + sc520_mmcr->ssixmit = data; +while (sc520_mmcr->ssista &SSISTA_BSY ); + sc520_mmcr->ssicmd =SSICMD_CMD_SEL_XMITRCV ; +while (sc520_mmcr->ssista &SSISTA_BSY ); + +return sc520_mmcr->ssircv; }void ssi_tx_byte (u8 data) { -write_mmcr_byte (SC520_SSIXMIT , data); -while ((read_mmcr_byte (SC520_SSISTA )) &SSISTA_BSY ); -write_mmcr_byte (SC520_SSICMD ,SSICMD_CMD_SEL_XMIT ); + sc520_mmcr->ssixmit = data; +while (sc520_mmcr->ssista &SSISTA_BSY ); + sc520_mmcr->ssicmd =SSICMD_CMD_SEL_XMIT ; }u8 ssi_rx_byte (void ) { -while ((read_mmcr_byte (SC520_SSISTA )) &SSISTA_BSY ); -write_mmcr_byte (SC520_SSICMD ,SSICMD_CMD_SEL_RCV ); -while ((read_mmcr_byte (SC520_SSISTA )) &SSISTA_BSY ); -return read_mmcr_byte (SC520_SSIRCV ); +while (sc520_mmcr->ssista &SSISTA_BSY ); + sc520_mmcr->ssicmd =SSICMD_CMD_SEL_RCV ; +while (sc520_mmcr->ssista &SSISTA_BSY ); + +return sc520_mmcr->ssircv; }
cpu/i386/sc520/sc520_timer.c +16 -15
@@ -30,29 +30,29 @@void sc520_timer_isr (void ) {/* Ack the GP Timer Interrupt */ -write_mmcr_byte (SC520_GPTMRSTA ,0x02 ); + sc520_mmcr->gptmrsta =0x02 ; }int timer_init (void ) {/* Map GP Timer 1 to Master PIC IR0 */ -write_mmcr_byte (SC520_GPTMR1MAP ,0x01 ); + sc520_mmcr->gp_tmr_int_map[1 ] =0x01 ;/* Disable GP Timers 1 & 2 - Allow configuration writes */ -write_mmcr_word (SC520_GPTMR1CTL ,0x4000 ); -write_mmcr_word (SC520_GPTMR2CTL ,0x4000 ); + sc520_mmcr->gptmr1ctl =0x4000 ; + sc520_mmcr->gptmr2ctl =0x4000 ;/* Reset GP Timers 1 & 2 */ -write_mmcr_word (SC520_GPTMR1CNT ,0x0000 ); -write_mmcr_word (SC520_GPTMR2CNT ,0x0000 ); + sc520_mmcr->gptmr1cnt =0x0000 ; + sc520_mmcr->gptmr2cnt =0x0000 ;/* Setup GP Timer 2 as a 100kHz (10us) prescaler */ -write_mmcr_word (SC520_GPTMR2MAXCMPA ,83 ); -write_mmcr_word (SC520_GPTMR2CTL ,0xc001 ); + sc520_mmcr->gptmr2maxcmpa =83 ; + sc520_mmcr->gptmr2ctl =0xc001 ;/* Setup GP Timer 1 as a 1000 Hz (1ms) interrupt generator */ -write_mmcr_word (SC520_GPTMR1MAXCMPA ,100 ); -write_mmcr_word (SC520_GPTMR1CTL ,0xe009 ); + sc520_mmcr->gptmr1maxcmpa =100 ; + sc520_mmcr->gptmr1ctl =0xe009 ;/* Register the SC520 specific timer interrupt handler */ register_timer_isr (sc520_timer_isr);
@@ -62,7 +62,7 @@ int timer_init(void)unmask_irq (0 );/* Clear the GP Timer 1 status register to get the show rolling*/ -write_mmcr_byte (SC520_GPTMRSTA ,0x02 ); + sc520_mmcr->gptmrsta =0x02 ;return 0 ; }
@@ -71,12 +71,13 @@ void udelay(unsigned long usec) {int m =0 ;long u; +long temp; -read_mmcr_word (SC520_SWTMRMILLI ); -read_mmcr_word (SC520_SWTMRMICRO ); + temp = sc520_mmcr->swtmrmilli; + temp = sc520_mmcr->swtmrmicro;do { - m +=read_mmcr_word (SC520_SWTMRMILLI ); - u =read_mmcr_word (SC520_SWTMRMICRO ) + (m *1000 ); + m += sc520_mmcr->swtmrmilli; + u = sc520_mmcr->swtmrmicro + (m *1000 ); }while (u < usec); }
include/asm-i386/ic/sc520.h +234 -183
442 lines not on this page · raw message
Signature · 1 line
1.6.0.2.GIT
PATCH 13/17 Moved PCI from #ifdef to conditional compile for sc520 boards
--- board/eNET/Makefile | 10 +- board/sc520_cdp/Makefile | 14 +- board/sc520_cdp/sc520_cdp.c | 239 -------------------------- board/sc520_cdp/sc520_cdp_pci.c | 271 +++++++++++++++++++++++++++++ board/sc520_spunk/Makefile | 14 +- board/sc520_spunk/sc520_spunk.c | 298 -------------------------------- board/sc520_spunk/sc520_spunk_pci.c | 323 +++++++++++++++++++++++++++++++++++ lib_i386/Makefile | 4 +- lib_i386/pci.c | 3 - lib_i386/pci_type1.c | 5 - 10 files changed, 617 insertions(+), 564 deletions(-) create mode 100644 board/sc520_cdp/sc520_cdp_pci.c create mode 100644 board/sc520_spunk/sc520_spunk_pci.c
board/eNET/Makefile +5 -5
@@ -31,12 +31,12 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a -COBJS := eNET.o -SOBJS := eNET_start16.o eNET_start.o +COBJS-y += eNET.o +SOBJS-y += eNET_start16.o +SOBJS-y += eNET_start.o -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) +SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) $(LIB): $(obj).depend $(OBJS) $(SOBJS) $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
board/sc520_cdp/Makefile +8 -6
@@ -28,12 +28,14 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a -COBJS := sc520_cdp.o flash.o -SOBJS := sc520_cdp_asm.o sc520_cdp_asm16.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) +COBJS-y += sc520_cdp.o +COBJS-y += flash.o +COBJS-$(CONFIG_PCI) += sc520_cdp_pci.o +SOBJS-y += sc520_cdp_asm.o +SOBJS-y += sc520_cdp_asm16.o + +SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) $(LIB): $(obj).depend $(OBJS) $(SOBJS) $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
board/sc520_cdp/sc520_cdp.c +0 -239
259 lines not on this page · raw message
board/sc520_cdp/sc520_cdp_pci.c new file +271 -0
271 lines not on this page · raw message
board/sc520_spunk/Makefile +8 -6
@@ -28,12 +28,14 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a -COBJS := sc520_spunk.o flash.o -SOBJS := sc520_spunk_asm.o sc520_spunk_asm16.o - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) +COBJS-y += sc520_spunk.o +COBJS-y += flash.o +COBJS-$(CONFIG_PCI) += sc520_spunk_pci.o +SOBJS-y += sc520_spunk_asm.o +SOBJS-y += sc520_spunk_asm16.o + +SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) $(LIB): $(obj).depend $(OBJS) $(SOBJS) $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
board/sc520_spunk/sc520_spunk.c +0 -298
320 lines not on this page · raw message
board/sc520_spunk/sc520_spunk_pci.c new file +323 -0
323 lines not on this page · raw message
lib_i386/Makefile +2 -2
@@ -32,8 +32,8 @@ SOBJS-y += realmode_switch.o COBJS-y += bios_setup.o COBJS-y += board.o COBJS-y += bootm.o -COBJS-y += pci.o -COBJS-y += pci_type1.o +COBJS-$(CONFIG_PCI) += pci.o +COBJS-$(CONFIG_PCI) += pci_type1.o COBJS-y += realmode.o COBJS-y += video_bios.o COBJS-y += video.o
lib_i386/pci.c +0 -3
@@ -26,7 +26,6 @@#include <asm/io.h> #include <asm/pci.h> -#ifdef CONFIG_PCI #undef PCI_ROM_SCAN_VERBOSEint pci_shadow_rom (pci_dev_t dev,unsigned char *dest)
@@ -151,5 +150,3 @@ int pci_shadow_rom(pci_dev_t dev, unsigned char *dest)return res; } - -#endif
lib_i386/pci_type1.c +0 -5
@@ -11,9 +11,6 @@*/ #include <common.h> - -#ifdef CONFIG_PCI -#include <asm/io.h> #include <pci.h>
@@ -52,5 +49,3 @@ void pci_setup_type1(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data) hose->cfg_addr = (unsigned int *) cfg_addr; hose->cfg_data = (unsigned char *) cfg_data; } - -#endif
Signature · 1 line
1.6.0.2.GIT
PATCH 14/17 Add PCI support to eNET board
--- board/eNET/Makefile | 1 + board/eNET/eNET_pci.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++++ include/configs/eNET.h | 14 ++++---- 3 files changed, 103 insertions(+), 7 deletions(-) create mode 100644 board/eNET/eNET_pci.c
board/eNET/Makefile +1 -0
@@ -32,6 +32,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a COBJS-y += eNET.o +COBJS-$(CONFIG_PCI) += eNET_pci.o SOBJS-y += eNET_start16.o SOBJS-y += eNET_start.o
board/eNET/eNET_pci.c new file +95 -0
95 lines not on this page · raw message
include/configs/eNET.h +7 -7
@@ -86,6 +86,7 @@#define CONFIG_CMD_MISC /* Misc functions like sleep etc*/ #undef CONFIG_CMD_NET/* bootp, tftpboot, rarpboot */ #undef CONFIG_CMD_NFS/* NFS support */ +#define CONFIG_CMD_PCI /* PCI support */ #define CONFIG_CMD_RUN /* run command in env variable */ #define CONFIG_CMD_SAVEENV /* saveenv */ #define CONFIG_CMD_SETGETDCR /* DCR support on 4xx */
@@ -200,13 +201,12 @@/*----------------------------------------------------------------------- * PCI configuration */ -#undef CONFIG_PCI/* include pci support */ -#undef CONFIG_PCI_PNP/* pci plug-and-play */ -#undef CONFIG_PCI_SCAN_SHOW -#undef CONFIG_SYS_FIRST_PCI_IRQ -#undef CONFIG_SYS_SECOND_PCI_IRQ -#undef CONFIG_SYS_THIRD_PCI_IRQ -#undef CONFIG_SYS_FORTH_PCI_IRQ +#define CONFIG_PCI /* include pci support */ +#define CONFIG_PCI_PNP /* pci plug-and-play */ +#define CONFIG_SYS_FIRST_PCI_IRQ 10 +#define CONFIG_SYS_SECOND_PCI_IRQ 9 +#define CONFIG_SYS_THIRD_PCI_IRQ 11 +#define CONFIG_SYS_FORTH_PCI_IRQ 15/*----------------------------------------------------------------------- * Hardware watchdog configuration
Signature · 1 line
1.6.0.2.GIT
PATCH 15/17 Move eNET low-level initialisation into asm
Allows earlier indication of boot progress by initialising the LEDs and Serial Port while the CPU is still in 16-bit (Real) mode
--- board/eNET/eNET.c | 24 -------- board/eNET/eNET_start.S | 7 ++- board/eNET/eNET_start16.S | 130 ++++++++++++++++++++++++++++++++++++++++++- board/eNET/hardware.h | 16 +++++ include/asm-i386/ic/sc520.h | 20 ++++++- 5 files changed, 167 insertions(+), 30 deletions(-)
board/eNET/eNET.c +0 -24
@@ -46,14 +46,6 @@ unsigned long monitor_flash_len = CONFIG_SYS_MONITOR_LEN;void init_sc520_enet (void ) {/* Set CPU Speed to 100MHz */ - sc520_mmcr->cpuctl =0x01 ; - gd->cpu_clk =100000000 ; - -/* wait at least one millisecond */ - asm("movl $0x2000,%%ecx\n" -"0: pushl %%ecx\n" -"popl %%ecx\n" -"loop 0b\n" : : :"ecx" );/* turn on the SDRAM write buffer */ sc520_mmcr->dbctl =0x11 ;
@@ -79,14 +71,6 @@ int board_init(void) sc520_mmcr->gpwrw =0x05 ;/* GP Write pulse width */ sc520_mmcr->gpwroff =0x01 ;/* GP Write offset */ - sc520_mmcr->piodata15_0 =0x0630 ;/* PIO15_PIO0 Data */ - sc520_mmcr->piodata31_16 =0x2000 ;/* PIO31_PIO16 Data */ - sc520_mmcr->piodir31_16 =0x2000 ;/* GPIO Direction */ - sc520_mmcr->piodir15_0 =0x87b5 ;/* GPIO Direction */ - sc520_mmcr->piopfs31_16 =0x0dfe ;/* GPIO pin function 31-16 reg */ - sc520_mmcr->piopfs15_0 =0x200a ;/* GPIO pin function 15-0 reg */ - sc520_mmcr->cspfs =0x00f8 ;/* Chip Select Pin Function Select */ - sc520_mmcr->par[2 ] =0x200713f8 ;/* Uart A (GPCS0, 0x013f8, 8 Bytes) */ sc520_mmcr->par[3 ] =0x2c0712f8 ;/* Uart B (GPCS3, 0x012f8, 8 Bytes) */ sc520_mmcr->par[4 ] =0x300711f8 ;/* Uart C (GPCS4, 0x011f8, 8 Bytes) */
@@ -102,18 +86,10 @@ int board_init(void)/* sc520_mmcr->par14 = 0x8bfff800; */ /* BOOTCS at 0x18000000 */ /* sc520_mmcr->par15 = 0x38201000; */ /* LEDs etc (GPCS6, 0x1000, 20 Bytes */ -/* Disable Watchdog */ - sc520_mmcr->wdtmrctl =0x3333 ; - sc520_mmcr->wdtmrctl =0xcccc ; - sc520_mmcr->wdtmrctl =0x0000 ; -/* Chip Select Configuration */ - sc520_mmcr->bootcsctl =0x0033 ; sc520_mmcr->romcs1ctl =0x0615 ; sc520_mmcr->romcs2ctl =0x0615 ; - sc520_mmcr->adddecctl =0x02 ; - sc520_mmcr->uart1ctl =0x07 ; sc520_mmcr->sysarbctl =0x06 ; sc520_mmcr->sysarbmenb =0x0003 ;
board/eNET/eNET_start.S +6 -1
@@ -21,12 +21,17 @@ * MA 02111-1307 USA */ +#include <asm/ic/sc520.h> #include "hardware.h" /* board early intialization */ .globl early_board_init early_board_init: - /* No 32-bit board specific initialisation */ + /* Light up the LEDs */ + movw $LED_LATCH_ADDRESS, %dx + movb $LED_1_BITMASK | LED_2_BITMASK, %al + outb %al, %dx + jmp *%ebp /* return to caller */ .globl show_boot_progress_asm
board/eNET/eNET_start16.S +128 -2
148 lines not on this page · raw message
board/eNET/hardware.h +16 -0
@@ -32,4 +32,20 @@#define LED_TX_BITMASK 0x10#define LED_ERR_BITMASK 0x20 +/* Serial Port Definitions */ +#define UART0_BASE 0x3f8 + +#define UART_RBR 0x00 +#define UART_THR 0x00 +#define UART_IER 0x01 +#define UART_IIR 0x02 +#define UART_FCR 0x02 +#define UART_LCR 0x03 +#define UART_MCR 0x04 +#define UART_LSR 0x05 +#define UART_MSR 0x06 +#define UART_SCR 0x07 +#define UART_DLL 0x00 +#define UART_DLM 0x01 +#endif /* HARDWARE_H_ */
include/asm-i386/ic/sc520.h +17 -3
@@ -1,6 +1,6 @@/* * (C) Copyright 2002 -* Daniel Engstr?m, Omicron Ceti AB <[email protected]>. +* Daniel Engstr???m, Omicron Ceti AB <[email protected]>. * * See file CREDITS for list of people who contributed to this * project.
@@ -134,7 +134,8 @@ typedef struct sc520_mmcr {u16 gptmr0cnt;/* GP timer 0 count */ u16 gptmr0maxcmpa;/* GP timer 0 maxcount compare A */ u16 gptmr0maxcmpb;/* GP timer 0 maxcount compare B */ -u16 gptmr1ctl;/* GP timer 1 mode/control */ +u16 gptmr1ctl;/*#define SC520_SWTMRMILLI 0x +GP timer 1 mode/control */ u16 gptmr1cnt;/* GP timer 1 count */ u16 gptmr1maxcmpa;/* GP timer 1 maxcount compare A */ u16 gptmr1maxcmpb;/* GP timer 1 maxcount compare B*/
@@ -223,7 +224,8 @@ typedef struct sc520_mmcr {u8 pad_0xd8d[0x03 ];u8 gpdmaexttc3;/* GP-DMA channel 3 extender transfer count */ u8 gpdmaexttc5;/* GP-DMA channel 5 extender transfer count */ -u8 gpdmaexttc6;/* GP-DMA channel 6 extender transfer count */ +u8 gpdmaexttc6;/* GP-DMA ch+#define SC520_CPUCTL 0x0001 +annel 6 extender transfer count */ u8 gpdmaexttc7;/* GP-DMA channel 7 extender transfer count */ u8 pad_0xd94[0x4 ];u8 gpdmabcctl;/* buffer chaining control */
@@ -256,11 +258,23 @@ extern volatile sc520_mmcr_t *sc520_mmcr;#endif /* MMCR Offsets (required for assembler code */ +#define SC520_CPUCTL 0x0001/* CPU Control */ #define SC520_DBCTL 0x0040/* SDRAM Buffer Control Register */ +#define SC520_BOOTCSCTL 0x0050/* BOOT Flaash Chip Select Control */ +#define SC520_ADDDECCTL 0x0080/* Address Decode Control */ #define SC520_PAR14 0x00c0/* Programmable Address Region 14 Register */ #define SC520_PAR15 0x00c4/* Programmable Address Region 15 Register */ +#define SC520_PIOPFS15_0 0x0c20/* GPIO pin function 15-0 reg */ +#define SC520_PIOPFS31_16 0x0c22/* GPIO pin function 31-16 reg */ +#define SC520_CSPFS 0x0c24/* Chip Select Pin Function Select */ +#define SC520_PIODIR15_0 0x0c2a/* GPIO Direction */ +#define SC520_PIODIR31_16 0x0c2c/* GPIO Direction */ +#define SC520_PIODATA15_0 0x0c30/* PIO15_PIO0 Data */ +#define SC520_PIODATA31_16 0x0c32/* PIO31_PIO16 Data */ #define SC520_SWTMRMILLI 0x0c60/* Software Timer Millisecond Count */ #define SC520_SWTMRMICRO 0x0c62/* Software Timer Microsecond Count */ +#define SC520_WDTMRCTL 0x0cb0/* Watchdog Timer Control */ +#define SC520_UART1CTL 0x0cc0/* UART 1 Control */ /* MMCR Register bits (not all of them :) ) */
Signature · 1 line
1.6.0.2.GIT
PATCH 15/17 Move eNET low-level initialisation into asm
Quoted 3 lines · Graeme Russ
Allows earlier indication of boot progress by initialising the LEDs and Serial Port while the CPU is still in 16-bit (Real) mode
Just noticed a couple of quibbles in this patch - Nothing major
Quoted 23 lines
include/asm-i386/ic/sc520.h +3
-2@@ -1,6 +1,6 @@/* * (C) Copyright 2002 -* Daniel Engstr?m, Omicron Ceti AB <[email protected]>. +* Daniel Engstr???m, Omicron Ceti AB <[email protected]>. * * See file CREDITS for list of people who contributed to this * project. @@ -134,7 +134,8 @@ typedef struct sc520_mmcr {u16 gptmr0cnt;/* GP timer 0 count */ u16 gptmr0maxcmpa;/* GP timer 0 maxcount compare A */ u16 gptmr0maxcmpb;/* GP timer 0 maxcount compare B */ -u16 gptmr1ctl;/* GP timer 1 mode/control */ +u16 gptmr1ctl;/*#define SC520_SWTMRMILLI 0x +GP timer 1 mode/control */ u16 gptmr1cnt;/* GP timer 1 count */ u16 gptmr1maxcmpa;/* GP timer 1 maxcount compare A */ u16 gptmr1maxcmpb;/* GP timer 1 maxcount compare B*/
include/asm-i386/ic/sc520.h typedef struct sc520_mmcr { · line 231
Quoted 9 lines
include/asm-i386/ic/sc520.h +2
-1@@ -223,7 +224,8 @@ typedef struct sc520_mmcr {u8 pad_0xd8d[0x03 ];u8 gpdmaexttc3;/* GP-DMA channel 3 extender transfer count */ u8 gpdmaexttc5;/* GP-DMA channel 5 extender transfer count */ -u8 gpdmaexttc6;/* GP-DMA channel 6 extender transfer count */ +u8 gpdmaexttc6;/* GP-DMA ch+#define SC520_CPUCTL 0x0001 +annel 6 extender transfer count */ u8 gpdmaexttc7;/* GP-DMA channel 7 extender transfer count */ u8 pad_0xd94[0x4 ];u8 gpdmabcctl;/* buffer chaining control */
None of these should be in the patch. Should I resubmit now or wait until discussion on the other parts has been finalised?
Regards
G
PATCH 15/17 Move eNET low-level initialisation into asm
Quoted 2 lines · On Monday 24 August 2009 03:17:26 Graeme Russ wrote:
None of these should be in the patch. Should I resubmit now or wait until discussion on the other parts has been finalised?
if you need to fix only one or two patches in a series, it's generally preferred you fix those one or two patches rather than reposting the whole series. sending a v2 with the reply header set to this patch and a small explanation of the change is easy to do and for people to monitor.
if there's something fundamentally wrong with the series, or you made a mistake in just about every one, then you should respin and resubmit as a new thread.
posting a new series to fix only one or two things makes reviewing much harder as it's often unclear what has changed (and thus what exactly needs double checking)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090824/8a526094/attachment.pgp
PATCH 16/17 Move low level eNET board init into dedicated sections
In reply to Graeme RussThis patch is in readiness for moving all u-boot code + data from Flash to RAM. Low level init code is not needed after bootstrap and therefore does not need to be copied. Moving this code into dedicated sections makes it easier
--- board/eNET/eNET_start.S | 3 +++ board/eNET/u-boot.lds | 4 ++-- board/sc520_cdp/sc520_cdp_asm.S | 1 + board/sc520_cdp/u-boot.lds | 4 ++-- board/sc520_spunk/sc520_spunk_asm.S | 1 + board/sc520_spunk/u-boot.lds | 4 ++-- cpu/i386/sc520/sc520_asm.S | 2 +- cpu/i386/start.S | 2 +- 8 files changed, 13 insertions(+), 8 deletions(-)
board/eNET/eNET_start.S +3 -0
@@ -24,6 +24,9 @@ #include <asm/ic/sc520.h> #include "hardware.h" +.section .start32, "ax" + + /* board early intialization */ .globl early_board_init early_board_init:
board/eNET/u-boot.lds +2 -2
@@ -78,8 +78,8 @@ SECTIONS * The fff0 offset of resetvec is important, however. */ - . = 0xfffffe00; - .start32 : AT (0x3807fe00) { *(.start32); } + . = 0xffffee00; + .start32 : AT (0x3807ee00) { *(.start32); } . = 0xf800; .start16 : AT (0x3807f800) { *(.start16); }
board/sc520_cdp/sc520_cdp_asm.S +1 -0
@@ -25,6 +25,7 @@ * We can then use the leds to display status information. */ +.section .start32, "ax" sc520_cdp_registers: /* size offset value */ .word 1 ; .word 0x040 ; .long 0x00 /* SDRAM buffer control */
board/sc520_cdp/u-boot.lds +2 -2
@@ -79,8 +79,8 @@ SECTIONS */ - . = 0xfffffe00; - .start32 : AT (0x387ffe00) { *(.start32); } + . = 0xffffee00; + .start32 : AT (0x3807ee00) { *(.start32); } . = 0xff00; .start16 : AT (0x387fff00) { *(.start16); }
board/sc520_spunk/sc520_spunk_asm.S +1 -0
@@ -25,6 +25,7 @@ * We can then use the leds to display status information. */ +.section .start32, "ax" sc520_cdp_registers: /* size offset value */ .word 1 ; .word 0x040 ; .long 0x00 /* SDRAM buffer control */
board/sc520_spunk/u-boot.lds +2 -2
@@ -80,8 +80,8 @@ SECTIONS */ - . = 0xfffffe00; - .start32 : AT (0x387ffe00) { *(.start32); } + . = 0xffffee00; + .start32 : AT (0x3807ee00) { *(.start32); } . = 0xff00; .start16 : AT (0x387fff00) { *(.start16); }
cpu/i386/sc520/sc520_asm.S +1 -1
@@ -106,7 +106,7 @@ #include <config.h> -.section .text +.section .start32, "ax" .equ DRCCTL, 0x0fffef010 /* DRAM control register */ .equ DRCTMCTL, 0x0fffef012 /* DRAM timing control register */ .equ DRCCFG, 0x0fffef014 /* DRAM bank configuration register */
cpu/i386/start.S +1 -1
@@ -27,7 +27,7 @@ #include <version.h> -.section .text +.section .start32, "ax" .code32 .globl _start .type _start, @function
Signature · 1 line
1.6.0.2.GIT
PATCH 17/17 Change entire eNET code + data to run from RAM
Flash probing can cause the Boot Flash to lock up - Entire contents of Flash (minus the low level asm init which is not needed post-bootstrap) is copied to RAM
This is not an ideal relocation mechanism. This change sets TEXT_BASE to an area just below the guaranteed 64MB RAM which exists on all eNET boards. At some stage in the future, I hope to implement a proper relocation mechanism
--- board/eNET/config.mk | 2 +- board/eNET/u-boot.lds | 65 ++++++++++++++++++++++++++++------------------- cpu/i386/start.S | 8 ++++++ include/configs/eNET.h | 6 ++-- 4 files changed, 51 insertions(+), 30 deletions(-)
board/eNET/config.mk +1 -1
@@ -21,4 +21,4 @@ # MA 02111-1307 USA # -TEXT_BASE = 0x38040000 +TEXT_BASE = 0x03FC0000
board/eNET/u-boot.lds +39 -26
98 lines not on this page · raw message
cpu/i386/start.S +8 -0
@@ -116,10 +116,18 @@ stack_ok: jmp show_boot_progress_asm .progress2: +#ifdef CONFIG_SYS_FULL_CODE_COPY + /* copy text, rodata, u_boot_cmd, data, and got sections from Flash */ + movl $TEXT_BASE, %edi /* destination address */ + movl $CONFIG_SYS_MONITOR_BASE, %esi /* source address */ + movl $_i386boot_rom_copy_end, %ecx + subl $_i386boot_rom_copy_start, %ecx +#else /* copy data section to ram, size must be 4-byte aligned */ movl $_i386boot_romdata_dest, %edi /* destination address */ movl $_i386boot_romdata_start, %esi /* source address */ movl $_i386boot_romdata_size, %ecx /* number of bytes to copy */ +#endif movl %ecx, %eax andl $3, %eax jnz data_fail
include/configs/eNET.h +3 -3
@@ -28,6 +28,8 @@#ifndef __CONFIG_H#define __CONFIG_H +#define CONFIG_SKIP_RELOCATE_UBOOT +#define CONFIG_SYS_FULL_CODE_COPY /* * Stuff still to be dealt with - */
@@ -154,9 +156,7 @@* Memory organization */ #define CONFIG_SYS_STACK_SIZE 0x8000/* Size of bootloader stack */ -#define CONFIG_SYS_BL_START_FLASH 0x38040000/* Address of relocated code */ -#define CONFIG_SYS_BL_START_RAM 0x03fd0000/* Address of relocated code */ -#define CONFIG_SYS_MONITOR_BASE TEXT_BASE +#define CONFIG_SYS_MONITOR_BASE 0x38040000/* Address of code in Boot Flash */ #define CONFIG_SYS_MONITOR_LEN (256 * 1024)/* Reserve 256 kB for Mon */ #define CONFIG_SYS_FLASH_BASE 0x38000000/* Boot Flash */ #define CONFIG_SYS_FLASH_BASE_1 0x10000000/* StrataFlash 1 */
Signature · 1 line
1.6.0.2.GIT
PATCH v2 16/17 Move low level eNET board init into dedicated sections
In reply to Graeme RussThis patch is in readiness for moving all u-boot code + data from Flash to RAM. Low level init code is not needed after bootstrap and therefore does not need to be copied. Moving this code into dedicated sections makes it easier
---
Version 2
- Modified slightly to account for dropping of patch 15 (no functional changes)
board/eNET/eNET_start.S | 3 +++ board/eNET/u-boot.lds | 4 ++-- board/sc520_cdp/sc520_cdp_asm.S | 1 + board/sc520_cdp/u-boot.lds | 4 ++-- board/sc520_spunk/sc520_spunk_asm.S | 1 + board/sc520_spunk/u-boot.lds | 4 ++-- cpu/i386/sc520/sc520_asm.S | 2 +- cpu/i386/start.S | 2 +- 8 files changed, 13 insertions(+), 8 deletions(-)
board/eNET/eNET_start.S +3 -0
@@ -23,6 +23,9 @@ #include "hardware.h" +.section .start32, "ax" + + /* board early intialization */ .globl early_board_init early_board_init:
board/eNET/u-boot.lds +2 -2
@@ -78,8 +78,8 @@ SECTIONS * The fff0 offset of resetvec is important, however. */ - . = 0xfffffe00; - .start32 : AT (0x3807fe00) { *(.start32); } + . = 0xffffee00; + .start32 : AT (0x3807ee00) { *(.start32); } . = 0xf800; .start16 : AT (0x3807f800) { *(.start16); }
board/sc520_cdp/sc520_cdp_asm.S +1 -0
@@ -25,6 +25,7 @@ * We can then use the leds to display status information. */ +.section .start32, "ax" sc520_cdp_registers: /* size offset value */ .word 1 ; .word 0x040 ; .long 0x00 /* SDRAM buffer control */
board/sc520_cdp/u-boot.lds +2 -2
@@ -79,8 +79,8 @@ SECTIONS */ - . = 0xfffffe00; - .start32 : AT (0x387ffe00) { *(.start32); } + . = 0xffffee00; + .start32 : AT (0x3807ee00) { *(.start32); } . = 0xff00; .start16 : AT (0x387fff00) { *(.start16); }
board/sc520_spunk/sc520_spunk_asm.S +1 -0
@@ -25,6 +25,7 @@ * We can then use the leds to display status information. */ +.section .start32, "ax" sc520_cdp_registers: /* size offset value */ .word 1 ; .word 0x040 ; .long 0x00 /* SDRAM buffer control */
board/sc520_spunk/u-boot.lds +2 -2
@@ -80,8 +80,8 @@ SECTIONS */ - . = 0xfffffe00; - .start32 : AT (0x387ffe00) { *(.start32); } + . = 0xffffee00; + .start32 : AT (0x3807ee00) { *(.start32); } . = 0xff00; .start16 : AT (0x387fff00) { *(.start16); }
cpu/i386/sc520/sc520_asm.S +1 -1
@@ -106,7 +106,7 @@ #include <config.h> -.section .text +.section .start32, "ax" .equ DRCCTL, 0x0fffef010 /* DRAM control register */ .equ DRCTMCTL, 0x0fffef012 /* DRAM timing control register */ .equ DRCCFG, 0x0fffef014 /* DRAM bank configuration register */
cpu/i386/start.S +1 -1
@@ -27,7 +27,7 @@ #include <version.h> -.section .text +.section .start32, "ax" .code32 .globl _start .type _start, @function
Signature · 1 line
1.6.4.1.174.g32f4c
PATCH v2 16/17 Move low level eNET board init into dedicated sections
Dear Graeme Russ,
Quoted 4 lines · In message <[email protected]> you wrote:
This patch is in readiness for moving all u-boot code + data from Flash to RAM. Low level init code is not needed after bootstrap and therefore does not need to be copied. Moving this code into dedicated sections makes it easier
But is this worth the effort? It makes the design more complicated.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de In a business, marketroids, salespukes, and lawyers have different goals from those who actually do work and produce something. Usually, is is the former who triumph over the latter, due to the simple rule that those who print the money make the rules.
-- Tom Christiansen in <[email protected]>
PATCH v2 16/17 Move low level eNET board init into dedicated sections
Quoted 10 lines · Wolfgang Denk
Dear Graeme Russ,
Quoted 4 lines · In message <[email protected]> you wrote:
This patch is in readiness for moving all u-boot code + data from Flash to RAM. Low level init code is not needed after bootstrap and therefore does not need to be copied. Moving this code into dedicated sections makes it easier
But is this worth the effort? It makes the design more complicated.
Actually I think the opposite is true - The low level asm code is all placed at the bottom (or is it top?) end of the Boot Flash rather than interleaved in the rest of the .text section. This is critical for the real mode code as there is a tight limit on the jump lengths. This patch makes it all the more consistent
Quoted 5 lines
Best regards,
Wolfgang Denk
Regards,
G
PATCH 15/17 Move eNET low-level initialisation into asm
In reply to Graeme RussDear Graeme Russ,
Quoted 12 lines · In message <[email protected]> you wrote:
board/eNET/hardware.h +5
-0@@ -32,4 +32,20 @@#define LED_TX_BITMASK 0x10#define LED_ERR_BITMASK 0x20 +/* Serial Port Definitions */ +#define UART0_BASE 0x3f8 + +#define UART_RBR 0x00 +#define UART_THR 0x00
board/eNET/hardware.h line 49
Quoted 10 lines
board/eNET/hardware.h +10
-0+#define UART_IER 0x01 +#define UART_IIR 0x02 +#define UART_FCR 0x02 +#define UART_LCR 0x03 +#define UART_MCR 0x04 +#define UART_LSR 0x05 +#define UART_MSR 0x06 +#define UART_SCR 0x07 +#define UART_DLL 0x00 +#define UART_DLM 0x01
Please remove all SPACE characters that preceed TAB characters (s/ *\t/\t/g)
include/asm-i386/ic/sc520.h line 3
Quoted 7 lines
include/asm-i386/ic/sc520.h +1
-1@@ -1,6 +1,6 @@/* * (C) Copyright 2002 -* Daniel Engstr?m, Omicron Ceti AB <[email protected]>. +* Daniel Engstr???m, Omicron Ceti AB <[email protected]>.
Please do not mess umlauts.
include/asm-i386/ic/sc520.h typedef struct sc520_mmcr { · line 138
Quoted 9 lines
include/asm-i386/ic/sc520.h +2
-1* See file CREDITS for list of people who contributed to this * project. @@ -134,7 +134,8 @@ typedef struct sc520_mmcr {u16 gptmr0cnt;/* GP timer 0 count */ u16 gptmr0maxcmpa;/* GP timer 0 maxcount compare A */ u16 gptmr0maxcmpb;/* GP timer 0 maxcount compare B */ -u16 gptmr1ctl;/* GP timer 1 mode/control */ +u16 gptmr1ctl;/*#define SC520_SWTMRMILLI 0x +GP timer 1 mode/control */
Your patch is line wrapped or otherwise corrupted.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de One friend in a lifetime is much; two are many; three are hardly possible. Friendship needs a certain parallelism of life, a community of thought, a rivalry of aim. - Henry Brook Adams
PATCH v2 15/17 Move eNET low-level initialisation into asm
In reply to Graeme RussAllows earlier indication of boot progress by initialising the LEDs and Serial Port while the CPU is still in 16-bit (Real) mode
---
Version 2
- Fixed comments corrupted by accidental middle-mouse button press while scrolling through code with mouse wheel
- Fixed mangled umlaut
- Fixed space before tab highlighted by Wolfgang Denk
- Restored removed setting of gd->cpu_clk
board/eNET/eNET.c | 23 -------- board/eNET/eNET_start.S | 7 ++- board/eNET/eNET_start16.S | 130 ++++++++++++++++++++++++++++++++++++++++++- board/eNET/hardware.h | 16 +++++ include/asm-i386/ic/sc520.h | 12 ++++ 5 files changed, 162 insertions(+), 26 deletions(-)
board/eNET/eNET.c +0 -23
@@ -46,15 +46,8 @@ unsigned long monitor_flash_len = CONFIG_SYS_MONITOR_LEN;void init_sc520_enet (void ) {/* Set CPU Speed to 100MHz */ - sc520_mmcr->cpuctl =0x01 ; gd->cpu_clk =100000000 ; -/* wait at least one millisecond */ - asm("movl $0x2000,%%ecx\n" -"0: pushl %%ecx\n" -"popl %%ecx\n" -"loop 0b\n" : : :"ecx" ); -/* turn on the SDRAM write buffer */ sc520_mmcr->dbctl =0x11 ;
@@ -79,14 +72,6 @@ int board_init(void) sc520_mmcr->gpwrw =0x05 ;/* GP Write pulse width */ sc520_mmcr->gpwroff =0x01 ;/* GP Write offset */ - sc520_mmcr->piodata15_0 =0x0630 ;/* PIO15_PIO0 Data */ - sc520_mmcr->piodata31_16 =0x2000 ;/* PIO31_PIO16 Data */ - sc520_mmcr->piodir31_16 =0x2000 ;/* GPIO Direction */ - sc520_mmcr->piodir15_0 =0x87b5 ;/* GPIO Direction */ - sc520_mmcr->piopfs31_16 =0x0dfe ;/* GPIO pin function 31-16 reg */ - sc520_mmcr->piopfs15_0 =0x200a ;/* GPIO pin function 15-0 reg */ - sc520_mmcr->cspfs =0x00f8 ;/* Chip Select Pin Function Select */ - sc520_mmcr->par[2 ] =0x200713f8 ;/* Uart A (GPCS0, 0x013f8, 8 Bytes) */ sc520_mmcr->par[3 ] =0x2c0712f8 ;/* Uart B (GPCS3, 0x012f8, 8 Bytes) */ sc520_mmcr->par[4 ] =0x300711f8 ;/* Uart C (GPCS4, 0x011f8, 8 Bytes) */
@@ -102,18 +87,10 @@ int board_init(void)/* sc520_mmcr->par14 = 0x8bfff800; */ /* BOOTCS at 0x18000000 */ /* sc520_mmcr->par15 = 0x38201000; */ /* LEDs etc (GPCS6, 0x1000, 20 Bytes */ -/* Disable Watchdog */ - sc520_mmcr->wdtmrctl =0x3333 ; - sc520_mmcr->wdtmrctl =0xcccc ; - sc520_mmcr->wdtmrctl =0x0000 ; -/* Chip Select Configuration */ - sc520_mmcr->bootcsctl =0x0033 ; sc520_mmcr->romcs1ctl =0x0615 ; sc520_mmcr->romcs2ctl =0x0615 ; - sc520_mmcr->adddecctl =0x02 ; - sc520_mmcr->uart1ctl =0x07 ; sc520_mmcr->sysarbctl =0x06 ; sc520_mmcr->sysarbmenb =0x0003 ;
board/eNET/eNET_start.S +6 -1
@@ -21,12 +21,17 @@ * MA 02111-1307 USA */ +#include <asm/ic/sc520.h> #include "hardware.h" /* board early intialization */ .globl early_board_init early_board_init: - /* No 32-bit board specific initialisation */ + /* Light up the LEDs */ + movw $LED_LATCH_ADDRESS, %dx + movb $LED_1_BITMASK | LED_2_BITMASK, %al + outb %al, %dx + jmp *%ebp /* return to caller */ .globl show_boot_progress_asm
board/eNET/eNET_start16.S +128 -2
148 lines not on this page · raw message
board/eNET/hardware.h +16 -0
@@ -32,4 +32,20 @@#define LED_TX_BITMASK 0x10#define LED_ERR_BITMASK 0x20 +/* Serial Port Definitions */ +#define UART0_BASE 0x3f8 + +#define UART_RBR 0x00 +#define UART_THR 0x00 +#define UART_IER 0x01 +#define UART_IIR 0x02 +#define UART_FCR 0x02 +#define UART_LCR 0x03 +#define UART_MCR 0x04 +#define UART_LSR 0x05 +#define UART_MSR 0x06 +#define UART_SCR 0x07 +#define UART_DLL 0x00 +#define UART_DLM 0x01 +#endif /* HARDWARE_H_ */
include/asm-i386/ic/sc520.h +12 -0
@@ -256,11 +256,23 @@ extern volatile sc520_mmcr_t *sc520_mmcr;#endif /* MMCR Offsets (required for assembler code */ +#define SC520_CPUCTL 0x0001/* CPU Control */ #define SC520_DBCTL 0x0040/* SDRAM Buffer Control Register */ +#define SC520_BOOTCSCTL 0x0050/* BOOT Flaash Chip Select Control */ +#define SC520_ADDDECCTL 0x0080/* Address Decode Control */ #define SC520_PAR14 0x00c0/* Programmable Address Region 14 Register */ #define SC520_PAR15 0x00c4/* Programmable Address Region 15 Register */ +#define SC520_PIOPFS15_0 0x0c20/* GPIO pin function 15-0 reg */ +#define SC520_PIOPFS31_16 0x0c22/* GPIO pin function 31-16 reg */ +#define SC520_CSPFS 0x0c24/* Chip Select Pin Function Select */ +#define SC520_PIODIR15_0 0x0c2a/* GPIO Direction */ +#define SC520_PIODIR31_16 0x0c2c/* GPIO Direction */ +#define SC520_PIODATA15_0 0x0c30/* PIO15_PIO0 Data */ +#define SC520_PIODATA31_16 0x0c32/* PIO31_PIO16 Data */ #define SC520_SWTMRMILLI 0x0c60/* Software Timer Millisecond Count */ #define SC520_SWTMRMICRO 0x0c62/* Software Timer Microsecond Count */ +#define SC520_WDTMRCTL 0x0cb0/* Watchdog Timer Control */ +#define SC520_UART1CTL 0x0cc0/* UART 1 Control */ /* MMCR Register bits (not all of them :) ) */
Signature · 1 line
1.6.4.1.174.g32f4c
PATCH v2 15/17 Move eNET low-level initialisation into asm
Dear Graeme Russ,
Quoted 2 lines · In message <[email protected]> you wrote:
Allows earlier indication of boot progress by initialising the LEDs and Serial Port while the CPU is still in 16-bit (Real) mode
I have to admit that I am not a friend of moving C code to assembler. This contradicts pretty basic principles of U-Boot design.
I can understand that you want diagnosis as early as possible, but 162 insertions versus 26 deletions is a clear indocation that something is awfully wrong.
Are you absolutely sure this is a good idea?
Quoted 5 lines
Version 2
- Fixed comments corrupted by accidental middle-mouse button press while scrolling through code with mouse wheel
- Fixed mangled umlaut
- Fixed space before tab highlighted by Wolfgang Denk
You did not catch all of these, see below.
Quoted 4 lines
board/eNET/eNET_start16.S +0
-0
...
Quoted 12 lines
board/eNET/eNET_start16.S +8
-0@@ -45,6 +44,65 @@ board_init16: movw $0xdf00, %ax movw %ax, %ds + /* Disable Watchdog */ + movl $SC520_WDTMRCTL, %edi + movw $0x3333, %ax + movw %ax, (%di) + movw $0xcccc, %ax + movw %ax, (%di) + movw $0x3333, %ax + movw %ax, (%di)
board/eNET/eNET_start16.S board_init16: · line 64
Quoted 10 lines
board/eNET/eNET_start16.S +10
-0+ + /* Set CPU to 100MHz Speed */ + movb $0x01, %al + movl $SC520_CPUCTL, %edi + movb %al, (%di) + + /* wait at least one millisecond */ + movl $0x1000,%ecx +cpuspddelay: + loop cpuspddelay
SPACE + TAB ...
...
board/eNET/eNET_start16.S board_init16: · line 182
Quoted 4 lines
board/eNET/eNET_start16.S +4
-0+ /* wait for the UART clock to settle */ + movl $0x10000,%ecx +uartdelay: + loop uartdelay
SPACE + TAB ...
Best regards,
Wolfgang Denk
Signature · 8 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The so-called "desktop metaphor" of today's workstations is instead
an "airplane-seat" metaphor. Anyone who has shuffled a lap full of
papers while seated between two portly passengers will recognize the
difference -- one can see only a very few things at once.
- Fred Brooks, Jr.PATCH v2 15/17 Move eNET low-level initialisation into asm
Quoted 9 lines · Wolfgang Denk
Dear Graeme Russ,
Quoted 2 lines · In message <[email protected]> you wrote:
Allows earlier indication of boot progress by initialising the LEDs and Serial Port while the CPU is still in 16-bit (Real) mode
I have to admit that I am not a friend of moving C code to assembler. This contradicts pretty basic principles of U-Boot design.
Normally I would agree
Quoted 3 lines
I can understand that you want diagnosis as early as possible, but 162 insertions versus 26 deletions is a clear indocation that something is awfully wrong.
When it came to relocating the code into RAM, I had an awful time trying to figure out where it was failing. The LEDs turned out to be not so useful because the board was resetting, so the LEDs just kept going through a crazy sequence so I needed serial output.
The other nice thing is it gives serial output to low level init functions in the C code before init_serial()
Quoted 1 line
Are you absolutely sure this is a good idea?
Hmm, maybe now that it's working I may not need it. I just stg pop'd it and the following patches applied cleanly (although it did need to auto modify patch 16) and the board still works so I guess I can ditch it - Shortens patch series by one - How would you like the resend (maybe same length series with Patch 15 being blank?)
Quoted 3 lines
Quoted 1 line
- Fixed space before tab highlighted by Wolfgang Denk
You did not catch all of these, see below.
Arghh, only looked at sc520.h - I just did a global search for space followed by tab - 1000+ hits, but i386 and eNET are clean :)
Quoted 3 lines
Best regards,
Wolfgang Denk
Regards,
G
PATCH v2 15/17 Move eNET low-level initialisation into asm
Dear Graeme Russ,
Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 2 lines
Are you absolutely sure this is a good idea?
Hmm, maybe now that it's working I may not need it. I just stg pop'd it and the following patches applied cleanly (although it did need to auto modify patch 16) and the board still works so I guess I can ditch it - Shortens patch series by one - How would you like the resend (maybe same length series with Patch 15 being blank?)
I don;t use that code, and don;t even know which debug options you have on x86. So it's your decision in the end.
Quoted 2 lines
Arghh, only looked at
sc520.h- I just did a global search for space followed by tab - 1000+ hits, but i386 and eNET are clean :)
So you have 1000+ fixes to do? Thanks in advance.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The Gates in my computer are AND, OR and NOT; they are not Bill.
PATCH v2 15/17 Move eNET low-level initialisation into asm
Quoted 4 lines · Wolfgang Denk
Dear Graeme Russ,
Quoted 1 line · In message <[email protected]> you wrote:
Quoted 1 line
Are you absolutely sure this is a good idea?
Quoted 8 lines
Quoted 5 lines
Hmm, maybe now that it's working I may not need it. I just stg pop'd it and the following patches applied cleanly (although it did need to auto modify patch 16) and the board still works so I guess I can ditch it - Shortens patch series by one - How would you like the resend (maybe same length series with Patch 15 being blank?)
I don;t use that code, and don;t even know which debug options you have on x86. So it's your decision in the end.
OK, I will ditch - I'll resend a blank 15 and new 16 & 17 tomorrow - It's getting late
Quoted 5 lines
Quoted 3 lines
Arghh, only looked at
sc520.h- I just did a global search for space followed by tab - 1000+ hits, but i386 and eNET are clean :)So you have 1000+ fixes to do? Thanks in advance.
LOL - Maybe I'll take that challenge one day
Quoted 5 lines
Best regards,
Wolfgang Denk
PATCH v3 15/17 Move low level eNET board init into dedicated sections (Abandoned)
In reply to Graeme RussThis patch has been abandoned - It's place in the patch series has been kept so as not to disrupt the versioning of later patches
---
Wolfgang Denk
AppliedPATCH 14/17 Add PCI support to eNET board
In reply to Graeme RussDear Graeme Russ,
Quoted 10 lines · In message <[email protected]> you wrote:
--===============0053267559==
Signed-off-by Graeme Russ <[email protected]>--- board/eNET/Makefile | 1 + board/eNET/eNET_pci.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++++ include/configs/eNET.h | 14 ++++---- 3 files changed, 103 insertions(+), 7 deletions(-) create mode 100644 board/eNET/eNET_pci.c
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 9 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"IBM uses what I like to call the 'hole-in-the-ground technique' to
destroy the competition..... IBM digs a big HOLE in the ground and
covers it with leaves. It then puts a big POT OF GOLD nearby. Then it
gives the call, 'Hey, look at all this gold, get over here fast.' As
soon as the competitor approaches the pot, he falls into the pit"
- John C. DvorakWolfgang Denk
AppliedPATCH 13/17 Moved PCI from #ifdef to conditional compile for sc520 boards
In reply to Graeme RussDear Graeme Russ,
Quoted 4 lines · In message <[email protected]> you wrote:
--===============2050527354==
Signed-off-by Graeme Russ <[email protected]>
Quoted 14 lines
--- board/eNET/Makefile | 10 +- board/sc520_cdp/Makefile | 14 +- board/sc520_cdp/sc520_cdp.c | 239 -------------------------- board/sc520_cdp/sc520_cdp_pci.c | 271 +++++++++++++++++++++++++++++ board/sc520_spunk/Makefile | 14 +- board/sc520_spunk/sc520_spunk.c | 298 -------------------------------- board/sc520_spunk/sc520_spunk_pci.c | 323 +++++++++++++++++++++++++++++++++++ lib_i386/Makefile | 4 +- lib_i386/pci.c | 3 - lib_i386/pci_type1.c | 5 - 10 files changed, 617 insertions(+), 564 deletions(-) create mode 100644 board/sc520_cdp/sc520_cdp_pci.c create mode 100644 board/sc520_spunk/sc520_spunk_pci.c
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Certainly there are things in life that money can't buy, but it's very funny - Did you ever try buying them without money? - Ogden Nash
Wolfgang Denk
AppliedPATCH 12/17 Replace [read, write]_mmcr_[byte, word, long] with memory mapped structure
In reply to Graeme RussDear Graeme Russ,
Quoted 13 lines · In message <[email protected]> you wrote:
Signed-off-by Graeme Russ <[email protected]>--- board/eNET/eNET.c | 86 ++++---- board/sc520_cdp/flash.c | 14 +- board/sc520_cdp/sc520_cdp.c | 171 ++++++++-------- board/sc520_spunk/sc520_spunk.c | 211 ++++++++++---------- cpu/i386/sc520/sc520.c | 71 ++------ cpu/i386/sc520/sc520_pci.c | 66 +++--- cpu/i386/sc520/sc520_ssi.c | 28 ++-- cpu/i386/sc520/sc520_timer.c | 31 ++-- include/asm-i386/ic/sc520.h | 417 ++++++++++++++++++++++----------------- 9 files changed, 550 insertions(+), 545 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Nobody trips over mountains. It is the small pebble that causes you to stumble. Pass all the pebbles in your path and you will find you have crossed the mountain.
Wolfgang Denk
AppliedPATCH 11/17 Misc sc520 cdp fixups
In reply to Graeme RussDear Graeme Russ,
Quoted 7 lines · In message <[email protected]> you wrote:
Now that the PCI, SATA et al compile problems have been resolved, the cludge that was applied to avoid them can be removed
Signed-off-by Graeme Russ <[email protected]>--- include/configs/sc520_cdp.h | 22 ---------------------- 1 files changed, 0 insertions(+), 22 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de There is nothing in this world constant but inconstancy. - Swift
Wolfgang Denk
AppliedPATCH 10/17 Fixup sc520_spunk board
In reply to Graeme RussDear Graeme Russ,
Quoted 9 lines · In message <[email protected]> you wrote:
Primary intent is to resolve build errors for this board which has been neglected for a very long time. I do not have one of these boards, so I cannot test functionality
Signed-off-by Graeme Russ <[email protected]>--- board/sc520_spunk/sc520_spunk.c | 33 +++++++++++++++++++++++++++++++-- include/configs/sc520_spunk.h | 2 ++ 2 files changed, 33 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I thought my people would grow tired of killing. But you were right, they see it is easier than trading. And it has its pleasures. I feel it myself. Like the hunt, but with richer rewards. -- Apella, "A Private Little War", stardate 4211.8
Wolfgang Denk
AppliedPATCH 9/17 Misc ds1722 fixups
In reply to Graeme RussDear Graeme Russ,
Quoted 10 lines · In message <[email protected]> you wrote:
This patch is based on a patch submitted by Jean-Christophe PLAGNIOL-VILLARD on 18th May 2008 as part of a general i386 / sc520 fixup which was never applied
Signed-off-by Graeme Russ <[email protected]>--- drivers/hwmon/ds1722.c | 3 ++- include/ds1722.h | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletions(-) create mode 100644 include/ds1722.h
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de On the subject of C program indentation: "In My Egotistical Opinion, most people's C programs should be indented six feet downward and covered with dirt." - Blair P. Houghton
Wolfgang Denk
AppliedPATCH 8/17 Misc ti_pci1410a fixups
In reply to Graeme RussDear Graeme Russ,
Quoted 14 lines · In message <[email protected]> you wrote:
Removed
do_pinit()- now declared incmd_pcmcia.cAdded #define
CONFIG_CMD_PCMCIAaroundpcmcia_off()in line with other PCMCIA driverssigned/unsigned type fixups
Added semi-colon after default: label as required by newer gcc
The only board that appears to use this driver is the
sc520_spunkwhich is very old and very likely very broken anyway. I do not have one to test whether this patch breaks anything functionaly, I have can only check that it compiles without warning or error
Quoted 4 lines
Signed-off-by Graeme Russ <[email protected]>--- drivers/pcmcia/ti_pci1410a.c | 62 ++++++++++++----------------------------- 1 files changed, 18 insertions(+), 44 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Don't hit a man when he's down - kick him; it's easier.
Wolfgang Denk
AppliedPATCH 7/17 Misc SATA fixups
In reply to Graeme RussDear Graeme Russ,
Quoted 10 lines · In message <[email protected]> you wrote:
Cast first parameter to
sata_cpy()In /drivers/block/ata_piix.h,
ata_id_has_lba48(),ata_id_has_lba(),ata_id_has_dma(),ata_id_u32(),ata_id_u64()are all defined ininclude/libata.hwhich is included inata.hwhich is included by all files which includeata_piix.h(onlyata_piix.c) so these definitions are supurflous to (and conlict with) this inlibata.h. Interestingly, my compiler complains aboutata_id_u64already being defined, but notata_id_u32
Quoted 8 lines
ata_dump_id()is defined ininclude/libata.hand should not be static (maybe should even useata_dump_id()inlibata.cSigned-off-by Graeme Russ <[email protected]>--- drivers/block/ata_piix.c | 10 +++++----- drivers/block/ata_piix.h | 15 +-------------- 2 files changed, 6 insertions(+), 19 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de My play was a complete success. The audience was a failure.
Wolfgang Denk
AppliedPATCH 6/17 Misc i386 PCI fixups
In reply to Graeme RussDear Graeme Russ,
Quoted 16 lines · In message <[email protected]> you wrote:
Change
PCI_REGION_MEMORYtoPCI_REGION_SYS_MEMORY(Originally done in commitff4e66e93c1a, regressed by commit6d7f610b09f8)Cast
PCI_ROM_ADDRESS_MASKto u32Wrap
probe_pci_video()call inside #ifdefCONFIG_VIDEOChange call to
pci_find_class()topci_find_devices(). This is based on a patch submitted on 1st March 2007 (Patch that fixes the compilation errors forsc520_cdpboard) bymushtaq_kThis patch requires that
PCI_VIDEO_VENDOR_IDandPCI_VIDEO_DEVICE_IDbe specified in the board config file. Dummy values have been added for the SC520 CDP board to enable compilation, but since I do not have one of these, I do know what the values should be
Quoted 8 lines
Signed-off-by Graeme Russ <[email protected]>--- board/sc520_cdp/sc520_cdp.c | 1 + cpu/i386/sc520/sc520_pci.c | 2 +- include/configs/sc520_cdp.h | 2 ++ lib_i386/pci.c | 2 +- lib_i386/video_bios.c | 18 +++++++++--------- 5 files changed, 14 insertions(+), 11 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I was playing poker the other night... with Tarot cards. I got a full house and 4 people died. - Steven Wright
Wolfgang Denk
AppliedPATCH 5/17 Fix sc520 timer interrupt generation
In reply to Graeme RussDear Graeme Russ,
Quoted 8 lines · In message <[email protected]> you wrote:
The current implementation has the timer being started before the interrupt handler is installed. It the interrupt occurs before the handler is installed, the timer interrupt is never reset and the timer stops
Signed-off-by Graeme Russ <[email protected]>--- cpu/i386/sc520/sc520_timer.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de There's no honorable way to kill, no gentle way to destroy. There is nothing good in war. Except its ending. -- Abraham Lincoln, "The Savage Curtain", stardate 5906.5
Wolfgang Denk
AppliedPATCH 4/17 Fix environment configuration for eNET board
In reply to Graeme RussDear Graeme Russ,
Quoted 8 lines · In message <[email protected]> you wrote:
The current configuration of the Environment has the redundant copy of the environment in the Boot Flash - This was never the intent. The Environment should instead be in the first two sectors of the first Strata Flash
Signed-off-by Graeme Russ <[email protected]>--- include/configs/eNET.h | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The easiest way to figure the cost of living is to take your income and add ten percent.
Wolfgang Denk
AppliedPATCH 3/17 Fix regression introduced by commit 8c63d47651f7
In reply to Graeme RussDear Graeme Russ,
Quoted 6 lines · In message <[email protected]> you wrote:
A local variable was deleted that should not have been
Signed-off-by Graeme Russ <[email protected]>--- lib_i386/pcat_timer.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
C++ was an interesting and valuable experiment, but we've learned its
lessons and it's time to move on.
- Peter Curran in <[email protected]>Wolfgang Denk
AppliedPATCH 2/17 Change inline asm global symbols to local
In reply to Graeme RussDear Graeme Russ,
Quoted 9 lines · In message <[email protected]> you wrote:
gcc 4.3.2 optimiser creates multiple copies of inline asm (who knows why) Remove use of global names for labels to prevent 'symbol already defined' errors
Signed-off-by Graeme Russ <[email protected]>--- board/eNET/eNET.c | 4 ++-- cpu/i386/sc520/sc520.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Philosophy is a game with objectives and no rules. Mathematics is a game with rules and no objectives.
Wolfgang Denk
AppliedPATCH 1/17 Add errno.h to i386
In reply to Graeme RussDear Graeme Russ,
Quoted 6 lines · In message <[email protected]> you wrote:
Signed-off-by Graeme Russ <[email protected]>--- include/asm-i386/errno.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 include/asm-i386/errno.h
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Peace was the way. -- Kirk, "The City on the Edge of Forever", stardate unknown
cover i386 Updates (touches some common drivers)
In reply to Graeme Russplease set sendemail.chainreplyto to false in your git settings. patch series should be like:
[summary 0/xx]
|- [patch 1/xx]
|- [patch 2/xx]
....
not:
[summary 0/xx]
`- [patch 1/xx]
`- [patch 2/xx]
`- ....
the latter makes things a lot more painful for people to parse with their e- mail clients.
you might have to update your git if it doesnt support this option (i see you're using 1.6.0 where as latest release is 1.6.4) ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090823/d91c8ede/attachment.pgp
cover i386 Updates (touches some common drivers)
Dear Mike Frysinger,
Quoted 2 lines · In message <[email protected]> you wrote:
please set sendemail.chainreplyto to false in your git settings. patch series
Why that?
Quoted 11 lines
should be like:
[summary 0/xx]
|- [patch 1/xx]
|- [patch 2/xx]
....not:
[summary 0/xx]
`- [patch 1/xx]
`- [patch 2/xx]`- ....
On contrary. The second form is much more useful as it also indicates the order in which patches should be applied - too often people forget the -n.
Quoted 2 lines
the latter makes things a lot more painful for people to parse with their e- mail clients.
Huh? To me that makes no difference. Actually, I like the second form better.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Every little picofarad has a nanohenry all its own. - Don Vonada
cover i386 Updates (touches some common drivers)
Quoted 20 lines · On Sunday 23 August 2009 01:36:55 Wolfgang Denk wrote:
Quoted 2 lines · Mike Frysinger
please set sendemail.chainreplyto to false in your git settings. patch series
Why that?
Quoted 6 lines
should be like:
[summary 0/xx]|- [patch 1/xx]
|- [patch 2/xx]Quoted 7 lines
....
not:
[summary 0/xx]
`- [patch 1/xx]
`- [patch 2/xx]`- ....
Quoted 3 lines
On contrary. The second form is much more useful as it also indicates the order in which patches should be applied - too often people forget the -n.
the numbering indicates the proper order and that is what -n controls. it's not directly related to threading as that is an independent option --chain- reply-to.
Quoted 5 lines
Quoted 2 lines
the latter makes things a lot more painful for people to parse with their e- mail clients.
Huh? To me that makes no difference. Actually, I like the second form better.
you must either not thread your e-mails properly, or your monitor is insanely wide and/or you use insanely small fonts. as soon as you hit 10+ depth on threads, subjects easily start getting truncated in the display. seeing a few to no characters in the e-mail reader for a subject is a pita. if it's all the same thread, that's one thing as the subject doesnt really change, but in this case they arent.
sane example:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/66481
insane example:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/66597
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090823/78610ac4/attachment.pgp
cover i386 Updates (touches some common drivers)
Quoted 9 lines · Mike Frysinger
Quoted 6 lines · On Sunday 23 August 2009 01:36:55 Wolfgang Denk wrote:
Quoted 2 lines · Mike Frysinger
please set sendemail.chainreplyto to false in your git settings. patch series
Why that?
Quoted 6 lines
sane example:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/66481insane example:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/66597
-mike
I must say, I agree with Mike - It just looks 'odd' and adds nothing that [Patch x/y] does not already add
cover i386 Updates (touches some common drivers)
In reply to Wolfgang DenkQuoted 24 lines · Wolfgang Denk
Dear Mike Frysinger,
Quoted 2 lines · In message <[email protected]> you wrote:
please set sendemail.chainreplyto to false in your git settings. patch series
Why that?
Quoted 11 lines
should be like:
[summary 0/xx]
|- [patch 1/xx]
|- [patch 2/xx]
....not:
[summary 0/xx]
`- [patch 1/xx]
`- [patch 2/xx]`- ....On contrary. The second form is much more useful as it also indicates the order in which patches should be applied - too often people forget the -n.
Quoted 5 lines
Quoted 2 lines
the latter makes things a lot more painful for people to parse with their e- mail clients.
Huh? To me that makes no difference. Actually, I like the second form better.
I much prefer the first form. Besides being more like just about every other vertical list in the world, the second form tends to push the meaningful bit of the subject line off the right edge of the screen. The [U-Boot] tag doesn't help in that respect either...
-Scott