]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
* Patch by Andreas Engel, 12 Jul 2004:
authorwdenk <wdenk>
Mon, 2 Aug 2004 23:22:59 +0000 (23:22 +0000)
committerwdenk <wdenk>
Mon, 2 Aug 2004 23:22:59 +0000 (23:22 +0000)
  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

CHANGELOG
README
common/cmd_jffs2.c
drivers/serial_pl010.c
drivers/serial_pl011.c
include/configs/integratorap.h
include/configs/integratorcp.h
include/configs/versatile.h

index 4470f8c3dd6acdc994923a12c5963b857bf1e804..7a9fc1fcde90a5637a65ffd2d39690dfa47306d3 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,13 @@
 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)
 
diff --git a/README b/README
index 0d6eac95f37f3a15acda1ad7a10a4b17fb3947ec..570b668a8b9f4f6101b15e0a5e1dbb21fb4b0aef 100644 (file)
--- a/README
+++ b/README
@@ -380,6 +380,27 @@ The following options need to be configured:
                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,
@@ -541,22 +562,23 @@ The following options need to be configured:
                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
@@ -567,7 +589,7 @@ The following options need to be configured:
                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
@@ -575,8 +597,8 @@ The following options need to be configured:
                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
@@ -585,7 +607,7 @@ The following options need to be configured:
                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)
@@ -783,6 +805,24 @@ The following options need to be configured:
                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
 
index e49b74d6158c3b5a696a376de599a066bf8be7e2..f7a5f9ebfd47a497ab8dddaa2788328fe194afdd 100644 (file)
@@ -47,6 +47,8 @@ static int part_num=0;
 
 #ifndef CFG_JFFS_CUSTOM_PART
 
+#define CFG_JFFS_SINGLE_PART   1
+
 static struct part_info part;
 
 #ifndef CONFIG_JFFS2_NAND
@@ -80,9 +82,6 @@ jffs2_part_info(int part_num)
                        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;
 
@@ -230,6 +229,7 @@ do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        return 0;
 }
 
+#ifndef CFG_JFFS_SINGLE_PART
 int
 do_jffs2_chpart(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
@@ -257,6 +257,7 @@ do_jffs2_chpart(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        return 0;
 
 }
+#endif /* CFG_JFFS_SINGLE_PART */
 
 /***************************************************/
 
index 7ff4b85c35ad917a943c0f46f0f99b09749f76a9..417b6aeda646afbf95fce370eba7ed3c198f52f4 100644 (file)
 #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);
index 0e132268c82c26e5de1b491e2eb5b3ec980ae235..4d35fe5e9ed9197b1c07fc07c83d717ec99d2ca8 100644 (file)
  * 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);
@@ -73,20 +70,11 @@ int serial_init (void)
         ** 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);
@@ -104,7 +92,7 @@ int serial_init (void)
                  (UART_PL011_CR_UARTEN | UART_PL011_CR_TXE |
                   UART_PL011_CR_RXE));
 
-       return (0);
+       return 0;
 }
 
 void serial_putc (const char c)
index 1f0792f8204d574a96c5b5324b1bc33c3e2bbc55..2674b52bf528edb386c2f19eecc7200dd1a98dfa 100644 (file)
@@ -60,6 +60,7 @@
 #define CFG_PL010_SERIAL
 #define CONFIG_CONS_INDEX      0
 #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_SERIAL0            0x16000000
 #define CFG_SERIAL1            0x17000000
index eb814e7d676ce0aa47e72367c3e94bcc78ebf45f..136974846cec3ec8f01334a34ea7e691139b0c4a 100644 (file)
@@ -66,6 +66,8 @@
  * NS16550 Configuration
  */
 #define CFG_PL011_SERIAL
+#define CONFIG_PL011_CLOCK     14745600
+#define CONFIG_PL01x_PORTS     { (void *)CFG_SERIAL0, (void *)CFG_SERIAL1 }
 #define CONFIG_CONS_INDEX      0
 #define CONFIG_BAUDRATE        38400
 #define CFG_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200 }
index 8df0e46a90f867f61abb5475793ec1ee6773b233..49d72518f56f8d76d384fb1883802d3ace967e2a 100644 (file)
  * NS16550 Configuration
  */
 #define CFG_PL011_SERIAL
+#define CONFIG_PL011_CLOCK     24000000
+#define CONFIG_PL01x_PORTS     { (void *)CFG_SERIAL0, (void *)CFG_SERIAL1 }
 #define CONFIG_CONS_INDEX      0
+
 #define CONFIG_BAUDRATE         38400
 #define CFG_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200 }
 #define CFG_SERIAL0            0x101F1000