Skip to content
Snippets Groups Projects
Commit 966083e9 authored by Wolfgang Denk's avatar Wolfgang Denk
Browse files

More code cleanup

parent 144f7795
Branches
Tags
No related merge requests found
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
Changes since U-Boot 1.1.4: Changes since U-Boot 1.1.4:
====================================================================== ======================================================================
* More code cleanup
* Disabled kvme080 board in MAKEALL because of build problems. * Disabled kvme080 board in MAKEALL because of build problems.
* Code cleanup * Code cleanup
......
...@@ -91,7 +91,10 @@ extern unsigned int INTERNAL_REG_BASE_ADDR; ...@@ -91,7 +91,10 @@ extern unsigned int INTERNAL_REG_BASE_ADDR;
#define _1G 0x40000000 #define _1G 0x40000000
#define _2G 0x80000000 #define _2G 0x80000000
#ifndef BOOL_WAS_DEFINED
#define BOOL_WAS_DEFINED
typedef enum _bool{false,true} bool; typedef enum _bool{false,true} bool;
#endif
/* Little to Big endian conversion macros */ /* Little to Big endian conversion macros */
......
...@@ -467,7 +467,9 @@ ...@@ -467,7 +467,9 @@
#define CONFIG_ISO_PARTITION 1 #define CONFIG_ISO_PARTITION 1
#undef CONFIG_ATAPI #undef CONFIG_ATAPI
#if 0 /* does not make sense when CFG_CMD_IDE is not enabled, too */
#define CONFIG_IDE_8xx_PCCARD 1 /* Use IDE with PC Card Adapter */ #define CONFIG_IDE_8xx_PCCARD 1 /* Use IDE with PC Card Adapter */
#endif
#undef CONFIG_IDE_8xx_DIRECT /* Direct IDE not supported */ #undef CONFIG_IDE_8xx_DIRECT /* Direct IDE not supported */
#undef CONFIG_IDE_LED /* LED for ide not supported */ #undef CONFIG_IDE_LED /* LED for ide not supported */
#undef CONFIG_IDE_RESET /* reset for ide not supported */ #undef CONFIG_IDE_RESET /* reset for ide not supported */
......
...@@ -424,10 +424,12 @@ static void set_ddr_config(void) { ...@@ -424,10 +424,12 @@ static void set_ddr_config(void) {
* which has to be written with a certain value defined by * which has to be written with a certain value defined by
* errata sheet. * errata sheet.
*/ */
u32 *reserved_p = (u32 *)((u8 *)im + 0x2f00);
#if defined(DDR_CASLAT_20) #if defined(DDR_CASLAT_20)
*((u8 *)im + 0x2f00) = 0x201c0000; *reserved_p = 0x201c0000;
#else #else
*((u8 *)im + 0x2f00) = 0x202c0000; *reserved_p = 0x202c0000;
#endif #endif
} }
} }
...@@ -42,6 +42,7 @@ extern flash_info_t flash_info[]; /* FLASH chips info */ ...@@ -42,6 +42,7 @@ extern flash_info_t flash_info[]; /* FLASH chips info */
void local_bus_init (void); void local_bus_init (void);
long int fixed_sdram (void); long int fixed_sdram (void);
ulong flash_get_size (ulong base, int banknum); ulong flash_get_size (ulong base, int banknum);
#ifdef CONFIG_PS2MULT #ifdef CONFIG_PS2MULT
void ps2mult_early_init(void); void ps2mult_early_init(void);
#endif #endif
......
...@@ -261,8 +261,8 @@ zm_dprintf(char *fmt, ...) ...@@ -261,8 +261,8 @@ zm_dprintf(char *fmt, ...)
static void static void
zm_flush(void) zm_flush(void)
{ {
char *p = zm_out_start;
#ifdef REDBOOT #ifdef REDBOOT
char *p = zm_out_start;
while (*p) mon_write_char(*p++); while (*p) mon_write_char(*p++);
#endif #endif
zm_out = zm_out_start; zm_out = zm_out_start;
......
#include <common.h> #include <common.h>
#if defined(CONFIG_8xx)
#include <mpc8xx.h> #include <mpc8xx.h>
#endif
#include <pcmcia.h> #include <pcmcia.h>
#undef CONFIG_PCMCIA #undef CONFIG_PCMCIA
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include <ps2mult.h> #include <ps2mult.h>
#ifdef CFG_NS16550 #if defined(CFG_NS16550) || defined(CONFIG_MPC85xx)
#include <ns16550.h> #include <ns16550.h>
#endif #endif
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
/* RPX Boards from Embedded Planet */ /* RPX Boards from Embedded Planet */
/* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */
#include <common.h> #include <common.h>
#ifdef CONFIG_8xx
#include <mpc8xx.h> #include <mpc8xx.h>
#endif
#include <pcmcia.h> #include <pcmcia.h>
#undef CONFIG_PCMCIA #undef CONFIG_PCMCIA
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
/* SC8xx Boards by SinoVee Microsystems */ /* SC8xx Boards by SinoVee Microsystems */
/* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */
#include <common.h> #include <common.h>
#ifdef CONFIG_8xx
#include <mpc8xx.h> #include <mpc8xx.h>
#endif
#include <pcmcia.h> #include <pcmcia.h>
#undef CONFIG_PCMCIA #undef CONFIG_PCMCIA
...@@ -242,8 +244,6 @@ int pcmcia_hardware_enable(int slot) ...@@ -242,8 +244,6 @@ int pcmcia_hardware_enable(int slot)
#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA) #if (CONFIG_COMMANDS & CFG_CMD_PCMCIA)
int pcmcia_hardware_disable(int slot) int pcmcia_hardware_disable(int slot)
{ {
volatile pcmconf8xx_t *pcmp =
(pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
u_long reg; u_long reg;
debug ("hardware_disable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot); debug ("hardware_disable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
...@@ -268,9 +268,11 @@ int pcmcia_hardware_disable(int slot) ...@@ -268,9 +268,11 @@ int pcmcia_hardware_disable(int slot)
int pcmcia_voltage_set(int slot, int vcc, int vpp) int pcmcia_voltage_set(int slot, int vcc, int vpp)
{ {
#ifndef CONFIG_NSCU #ifndef CONFIG_NSCU
u_long reg;
# ifdef DEBUG
volatile pcmconf8xx_t *pcmp = volatile pcmconf8xx_t *pcmp =
(pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia)); (pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
u_long reg; # endif
debug ("voltage_set: " PCMCIA_BOARD_MSG debug ("voltage_set: " PCMCIA_BOARD_MSG
" Slot %c, Vcc=%d.%d, Vpp=%d.%d\n", " Slot %c, Vcc=%d.%d, Vpp=%d.%d\n",
......
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
#undef CONFIG_CONS_NONE /* define if console on something else */ #undef CONFIG_CONS_NONE /* define if console on something else */
#define CONFIG_CONS_INDEX 1 /* which serial channel for console */ #define CONFIG_CONS_INDEX 1 /* which serial channel for console */
#else #else /* ! TQM8560 */
#define CONFIG_CONS_INDEX 1 #define CONFIG_CONS_INDEX 1
#undef CONFIG_SERIAL_SOFTWARE_FIFO #undef CONFIG_SERIAL_SOFTWARE_FIFO
...@@ -170,13 +170,6 @@ ...@@ -170,13 +170,6 @@
#define CFG_NS16550_COM1 (CFG_CCSRBAR+0x4500) #define CFG_NS16550_COM1 (CFG_CCSRBAR+0x4500)
#define CFG_NS16550_COM2 (CFG_CCSRBAR+0x4600) #define CFG_NS16550_COM2 (CFG_CCSRBAR+0x4600)
#endif /* CONFIG_TQM8560 */
#define CONFIG_BAUDRATE 115200
#define CFG_BAUDRATE_TABLE \
{300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}
/* PS/2 Keyboard */ /* PS/2 Keyboard */
#if !defined(CONFIG_TQM8560) #if !defined(CONFIG_TQM8560)
#define CONFIG_PS2KBD /* AT-PS/2 Keyboard */ #define CONFIG_PS2KBD /* AT-PS/2 Keyboard */
...@@ -186,6 +179,13 @@ ...@@ -186,6 +179,13 @@
#define CONFIG_BOARD_EARLY_INIT_R 1 #define CONFIG_BOARD_EARLY_INIT_R 1
#endif /* !CONFIG_TQM8560 */ #endif /* !CONFIG_TQM8560 */
#endif /* CONFIG_TQM8560 */
#define CONFIG_BAUDRATE 115200
#define CFG_BAUDRATE_TABLE \
{300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}
/* Use the HUSH parser */ /* Use the HUSH parser */
#define CFG_HUSH_PARSER #define CFG_HUSH_PARSER
#ifdef CFG_HUSH_PARSER #ifdef CFG_HUSH_PARSER
......
...@@ -110,7 +110,10 @@ extern unsigned int INTERNAL_REG_BASE_ADDR; ...@@ -110,7 +110,10 @@ extern unsigned int INTERNAL_REG_BASE_ADDR;
#define _1G 0x40000000 #define _1G 0x40000000
#define _2G 0x80000000 #define _2G 0x80000000
#ifndef BOOL_WAS_DEFINED
#define BOOL_WAS_DEFINED
typedef enum _bool{false,true} bool; typedef enum _bool{false,true} bool;
#endif
/* Little to Big endian conversion macros */ /* Little to Big endian conversion macros */
......
...@@ -97,7 +97,10 @@ typedef struct { ...@@ -97,7 +97,10 @@ typedef struct {
#endif #endif
} connection_info_t; } connection_info_t;
#ifndef BOOL_WAS_DEFINED
#define BOOL_WAS_DEFINED
typedef unsigned int bool; typedef unsigned int bool;
#endif
#define false 0 #define false 0
#define true 1 #define true 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment