GTA04 U-Boot

GTA04 U-Boot Commit Details

Date:2004-08-03 01:22:59 (8 years 9 months ago)
Author:wdenk
Branch:gta04
Commit:6705d81e90ed4466d6e4f445104826096da0c521
Parents: 68ceb29e7133a0f972f53d3d61fd61207374baec
Message:* Patch by Andreas Engel, 12 Jul 2004: Replaced hardcoded PL011 clock frequency with config variable. Fixed wrong CONFIG_CMD_DFL doc.

* Patch by Thomas Viehweger, 09 Jun 2004:
make it possible to remove chpart when there is only one partition
Changes:
MCHANGELOG (1 diff)
MREADME (6 diffs)
Mcommon/cmd_jffs2.c (4 diffs)
Mdrivers/serial_pl010.c (1 diff)
Mdrivers/serial_pl011.c (3 diffs)
Minclude/configs/integratorap.h (1 diff)
Minclude/configs/integratorcp.h (1 diff)
Minclude/configs/versatile.h (1 diff)

File differences

CHANGELOG
22
33
44
5
6
7
8
9
10
11
512
613
714
Changes since U-Boot 1.1.1:
======================================================================
* Patch by Andreas Engel, 12 Jul 2004:
Replaced hardcoded PL011 clock frequency with config variable.
Fixed wrong CONFIG_CMD_DFL doc.
* Patch by Thomas Viehweger, 09 Jun 2004:
make it possible to remove chpart when there is only one partition
* Add support for console over UDP (compatible to Ingo Molnar's
netconsole patch under Linux)
README
380380
381381
382382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
383404
384405
385406
......
541562
542563
543564
544
565
545566
567
546568
547
569
548570
549571
550
572
551573
552574
553
575
554576
555577
556
578
557579
558580
559
581
560582
561583
562584
......
567589
568590
569591
570
592
571593
572594
573595
......
575597
576598
577599
578
579
600
601
580602
581603
582604
......
585607
586608
587609
588
610
589611
590612
591613
......
783805
784806
785807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
786826
787827
788828
expect it to be in bytes, others in MB.
Define CONFIG_MEMSIZE_IN_BYTES to make it in bytes.
- Serial Ports:
CFG_PL010_SERIAL
Define this if you want support for Amba PrimeCell PL010 UARTs.
CFG_PL011_SERIAL
Define this if you want support for Amba PrimeCell PL011 UARTs.
CONFIG_PL011_CLOCK
If you have Amba PrimeCell PL011 UARTs, set this variable to
the clock speed of the UARTs.
CONFIG_PL01x_PORTS
If you have Amba PrimeCell PL010 or PL011 UARTs on your board,
define this to a list of base addresses for each (supported)
port. See e.g. include/configs/versatile.h
- Console Interface:
Depending on board, define exactly one serial port
(like CONFIG_8xx_CONS_SMC1, CONFIG_8xx_CONS_SMC2,
CFG_CMD_ASKENV* ask for env variable
CFG_CMD_AUTOSCRIPT Autoscript Support
CFG_CMD_BDI bdinfo
CFG_CMD_BEDBUG Include BedBug Debugger
CFG_CMD_BEDBUG* Include BedBug Debugger
CFG_CMD_BMP* BMP support
CFG_CMD_BSP* Board specific commands
CFG_CMD_BOOTD bootd
CFG_CMD_CACHE icache, dcache
CFG_CMD_CACHE* icache, dcache
CFG_CMD_CONSOLE coninfo
CFG_CMD_DATE* support for RTC, date/time...
CFG_CMD_DHCP DHCP support
CFG_CMD_DHCP* DHCP support
CFG_CMD_DIAG* Diagnostics
CFG_CMD_DOC* Disk-On-Chip Support
CFG_CMD_DTT Digital Therm and Thermostat
CFG_CMD_DTT* Digital Therm and Thermostat
CFG_CMD_ECHO* echo arguments
CFG_CMD_EEPROM* EEPROM read/write support
CFG_CMD_ELF bootelf, bootvx
CFG_CMD_ELF* bootelf, bootvx
CFG_CMD_ENV saveenv
CFG_CMD_FDC* Floppy Disk Support
CFG_CMD_FAT FAT partition support
CFG_CMD_FAT* FAT partition support
CFG_CMD_FDOS* Dos diskette Support
CFG_CMD_FLASH flinfo, erase, protect
CFG_CMD_FPGA FPGA device initialization support
CFG_CMD_IMLS List all found images
CFG_CMD_IMMAP* IMMR dump support
CFG_CMD_IRQ* irqinfo
CFG_CMD_ITEST* Integer/string test of 2 values
CFG_CMD_ITEST Integer/string test of 2 values
CFG_CMD_JFFS2* JFFS2 Support
CFG_CMD_KGDB* kgdb
CFG_CMD_LOADB loadb
CFG_CMD_MEMORY md, mm, nm, mw, cp, cmp, crc, base,
loop, loopw, mtest
CFG_CMD_MISC Misc functions like sleep etc
CFG_CMD_MMC MMC memory mapped support
CFG_CMD_MII MII utility commands
CFG_CMD_MMC* MMC memory mapped support
CFG_CMD_MII* MII utility commands
CFG_CMD_NAND* NAND support
CFG_CMD_NET bootp, tftpboot, rarpboot
CFG_CMD_PCI* pciinfo
CFG_CMD_PORTIO* Port I/O
CFG_CMD_REGINFO * Register dump
CFG_CMD_RUN run command in env variable
CFG_CMD_SAVES save S record dump
CFG_CMD_SAVES* save S record dump
CFG_CMD_SCSI* SCSI Support
CFG_CMD_SDRAM* print SDRAM configuration information
CFG_CMD_SETGETDCR Support for DCR Register access (4xx only)
enabled with CFG_CMD_MMC. The MMC driver also works with
the FAT fs. This is enabled with CFG_CMD_FAT.
- Journaling Flash filesystem support:
CONFIG_JFFS2_NAND, CONFIG_JFFS2_NAND_OFF, CONFIG_JFFS2_NAND_SIZE,
CONFIG_JFFS2_NAND_DEV
Define these for a default partition on a NAND device
CFG_JFFS2_FIRST_SECTOR,
CFG_JFFS2_FIRST_BANK, CFG_JFFS2_NUM_BANKS
Define these for a default partition on a NOR device
CFG_JFFS_CUSTOM_PART
Define this to create an own partition. You have to provide a
function struct part_info* jffs2_part_info(int part_num)
If you define only one JFFS2 partition you may also want to
#define CFG_JFFS_SINGLE_PART 1
to disable the command chpart. This is the default when you
have not defined a custom partition
- Keyboard Support:
CONFIG_ISA_KEYBOARD
common/cmd_jffs2.c
4747
4848
4949
50
51
5052
5153
5254
......
8082
8183
8284
83
84
85
8685
8786
8887
......
230229
231230
232231
232
233233
234234
235235
......
257257
258258
259259
260
260261
261262
262263
#ifndef CFG_JFFS_CUSTOM_PART
#define CFG_JFFS_SINGLE_PART1
static struct part_info part;
#ifndef CONFIG_JFFS2_NAND
flash_info[CFG_JFFS2_FIRST_BANK].start[0];
#endif
/* unused in current jffs2 loader */
part.erasesize = 0;
/* Mark the struct as ready */
part.usr_priv=(void*)1;
return 0;
}
#ifndef CFG_JFFS_SINGLE_PART
int
do_jffs2_chpart(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
return 0;
}
#endif/* CFG_JFFS_SINGLE_PART */
/***************************************************/
drivers/serial_pl010.c
3838
3939
4040
41
4241
4342
44
45
46
47
43
44
4845
4946
5047
#define IO_READ(addr) (*(volatile unsigned int *)(addr))
/* Integrator AP has two UARTs, we use the first one, at 38400-8-N-1 */
#define NUM_PORTS 2
#define CONSOLE_PORT CONFIG_CONS_INDEX
#define baudRate CONFIG_BAUDRATE
static volatile unsigned char *const port[NUM_PORTS] = {
(void *) (CFG_SERIAL0),
(void *) (CFG_SERIAL1)
};
static volatile unsigned char *const port[] = CONFIG_PL01x_PORTS;
#define NUM_PORTS (sizeof(port)/sizeof(port[0]))
static void pl010_putc (int portnum, char c);
drivers/serial_pl011.c
4141
4242
4343
44
44
4545
4646
47
48
49
50
51
47
48
5249
5350
5451
......
7370
7471
7572
76
7773
78
79
74
75
8076
8177
82
83
84
85
86
87
88
89
9078
9179
9280
......
10492
10593
10694
107
95
10896
10997
11098
* IntegratorCP has two UARTs, use the first one, at 38400-8-N-1
* Versatile PB has four UARTs.
*/
#define NUM_PORTS 2
#define CONSOLE_PORT CONFIG_CONS_INDEX
#define baudRate CONFIG_BAUDRATE
static volatile unsigned char *const port[NUM_PORTS] = {
(void *) (CFG_SERIAL0),
(void *) (CFG_SERIAL1)
};
static volatile unsigned char *const port[] = CONFIG_PL01x_PORTS;
#define NUM_PORTS (sizeof(port)/sizeof(port[0]))
static void pl011_putc (int portnum, char c);
static int pl011_getc (int portnum);
** IBRD = UART_CLK / (16 * BAUD_RATE)
** FBRD = ROUND((64 * MOD(UART_CLK,(16 * BAUD_RATE))) / (16 * BAUD_RATE))
*/
#ifdef CONFIG_VERSATILE
temp = 16 * baudRate;
divider = 24000000 / temp;
remainder = 24000000 % temp;
divider = CONFIG_PL011_CLOCK / temp;
remainder = CONFIG_PL011_CLOCK % temp;
temp = (8 * remainder) / baudRate;
fraction = (temp >> 1) + (temp & 1);
#endif
#ifdef CONFIG_INTEGRATOR
temp = 16 * baudRate;
divider = 14745600 / temp;
remainder = 14745600 % temp;
temp = (8 * remainder) / baudRate;
fraction = (temp >> 1) + (temp & 1);
#endif
IO_WRITE (port[CONSOLE_PORT] + UART_PL011_IBRD, divider);
IO_WRITE (port[CONSOLE_PORT] + UART_PL011_FBRD, fraction);
(UART_PL011_CR_UARTEN | UART_PL011_CR_TXE |
UART_PL011_CR_RXE));
return (0);
return 0;
}
void serial_putc (const char c)
include/configs/integratorap.h
6060
6161
6262
63
6364
6465
6566
#define CFG_PL010_SERIAL
#define CONFIG_CONS_INDEX0
#define CONFIG_BAUDRATE 38400
#define CONFIG_PL01x_PORTS{ (void *) (CFG_SERIAL0), (void *) (CFG_SERIAL1) }
#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
#define CFG_SERIAL00x16000000
#define CFG_SERIAL10x17000000
include/configs/integratorcp.h
6666
6767
6868
69
70
6971
7072
7173
* NS16550 Configuration
*/
#define CFG_PL011_SERIAL
#define CONFIG_PL011_CLOCK14745600
#define CONFIG_PL01x_PORTS{ (void *)CFG_SERIAL0, (void *)CFG_SERIAL1 }
#define CONFIG_CONS_INDEX0
#define CONFIG_BAUDRATE38400
#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
include/configs/versatile.h
8787
8888
8989
90
91
9092
93
9194
9295
9396
* NS16550 Configuration
*/
#define CFG_PL011_SERIAL
#define CONFIG_PL011_CLOCK24000000
#define CONFIG_PL01x_PORTS{ (void *)CFG_SERIAL0, (void *)CFG_SERIAL1 }
#define CONFIG_CONS_INDEX0
#define CONFIG_BAUDRATE 38400
#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
#define CFG_SERIAL00x101F1000

Archive Download the corresponding diff file

Branches

Tags