sh: Fix register address of SH7722.
[oweals/u-boot.git] / include / common.h
index 7319c549392b22c4d1dcdce236d719cc1e288971..54083f10c5428232818c31fc1f8fe777e2eefa19 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2000-2004
+ * (C) Copyright 2000-2007
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -63,9 +63,11 @@ typedef volatile unsigned char       vu_char;
 #endif
 #elif defined(CONFIG_5xx)
 #include <asm/5xx_immap.h>
-#define CONFIG_RELOC_FIXUP_WORKS
 #elif defined(CONFIG_MPC5xxx)
 #include <mpc5xxx.h>
+#elif defined(CONFIG_MPC512X)
+#include <mpc512x.h>
+#include <asm/immap_512x.h>
 #elif defined(CONFIG_MPC8220)
 #include <asm/immap_8220.h>
 #elif defined(CONFIG_8260)
@@ -127,20 +129,21 @@ typedef void (interrupt_handler_t)(void *);
 
 /*
  * enable common handling for all TQM8xxL/M boards:
- * - CONFIG_TQM8xxM will be defined for all TQM8xxM and TQM885D boards
+ * - CONFIG_TQM8xxM will be defined for all TQM8xxM boards
  * - CONFIG_TQM8xxL will be defined for all TQM8xxL _and_ TQM8xxM boards
+ *                  and for the TQM885D board
  */
 #if defined(CONFIG_TQM823M) || defined(CONFIG_TQM850M) || \
     defined(CONFIG_TQM855M) || defined(CONFIG_TQM860M) || \
-    defined(CONFIG_TQM862M) || defined(CONFIG_TQM866M) || \
-    defined(CONFIG_TQM885D)
+    defined(CONFIG_TQM862M) || defined(CONFIG_TQM866M)
 # ifndef CONFIG_TQM8xxM
 #  define CONFIG_TQM8xxM
 # endif
 #endif
 #if defined(CONFIG_TQM823L) || defined(CONFIG_TQM850L) || \
     defined(CONFIG_TQM855L) || defined(CONFIG_TQM860L) || \
-    defined(CONFIG_TQM862L) || defined(CONFIG_TQM8xxM)
+    defined(CONFIG_TQM862L) || defined(CONFIG_TQM8xxM) || \
+    defined(CONFIG_TQM885D)
 # ifndef CONFIG_TQM8xxL
 #  define CONFIG_TQM8xxL
 # endif
@@ -194,6 +197,8 @@ int print_buffer (ulong addr, void* data, uint width, uint count, uint linelen);
 void   main_loop       (void);
 int    run_command     (const char *cmd, int flag);
 int    readline        (const char *const prompt);
+int    readline_into_buffer    (const char *const prompt, char * buffer);
+int    parse_line (char *, char *[]);
 void   init_cmd_timeout(void);
 void   reset_cmd_timeout(void);
 
@@ -224,6 +229,7 @@ extern ulong load_addr;             /* Default Load Address */
 /* common/cmd_nvedit.c */
 int    env_init     (void);
 void   env_relocate (void);
+int    envmatch     (uchar *, int);
 char   *getenv      (char *);
 int    getenv_r     (char *name, char *buf, unsigned len);
 int    saveenv      (void);
@@ -231,6 +237,9 @@ int saveenv      (void);
 void inline setenv   (char *, char *);
 #else
 void   setenv       (char *, char *);
+#ifdef CONFIG_HAS_UID
+void   forceenv     (char *, char *);
+#endif
 #endif /* CONFIG_PPC */
 #ifdef CONFIG_ARM
 # include <asm/mach-types.h>
@@ -253,7 +262,7 @@ void        pciinfo       (int, int);
     int           pci_pre_init        (struct pci_controller * );
 #endif
 
-#if defined(CONFIG_PCI) && defined(CONFIG_440)
+#if defined(CONFIG_PCI) && (defined(CONFIG_440) || defined(CONFIG_405EX))
 #   if defined(CFG_PCI_TARGET_INIT)
        void    pci_target_init      (struct pci_controller *);
 #   endif
@@ -261,8 +270,8 @@ void        pciinfo       (int, int);
        void    pci_master_init      (struct pci_controller *);
 #   endif
     int            is_pci_host         (struct pci_controller *);
-#if defined(CONFIG_440SPE)
-   void pcie_setup_hoses(void);
+#if defined(CONFIG_440SPE) || defined(CONFIG_405EX)
+   void pcie_setup_hoses(int busno);
 #endif
 #endif
 
@@ -272,6 +281,9 @@ int misc_init_r   (void);
 /* common/exports.c */
 void   jumptable_init(void);
 
+/* api/api.c */
+void   api_init (void);
+
 /* common/memsize.c */
 long   get_ram_size  (volatile long *, long);
 
@@ -421,6 +433,13 @@ int        checkdcache   (void);
 void   upmconfig     (unsigned int, unsigned int *, unsigned int);
 ulong  get_tbclk     (void);
 void   reset_cpu     (ulong addr);
+#if defined (CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP)
+void ft_cpu_setup(void *blob, bd_t *bd);
+#ifdef CONFIG_PCI
+void ft_pci_setup(void *blob, bd_t *bd);
+#endif
+#endif
+
 
 /* $(CPU)/serial.c */
 int    serial_init   (void);
@@ -449,6 +468,9 @@ int prt_8260_clks (void);
 #elif defined(CONFIG_MPC5xxx)
 int    prt_mpc5xxx_clks (void);
 #endif
+#if defined(CONFIG_MPC512X)
+int    prt_mpc512xxx_clks (void);
+#endif
 #if defined(CONFIG_MPC8220)
 int    prt_mpc8220_clks (void);
 #endif
@@ -482,6 +504,7 @@ ulong       get_bus_freq  (ulong);
 #if defined(CONFIG_MPC85xx)
 typedef MPC85xx_SYS_INFO sys_info_t;
 void   get_sys_info  ( sys_info_t * );
+ulong  get_ddr_freq  (ulong);
 #endif
 #if defined(CONFIG_MPC86xx)
 typedef MPC86xx_SYS_INFO sys_info_t;
@@ -490,15 +513,13 @@ void   get_sys_info  ( sys_info_t * );
 
 #if defined(CONFIG_4xx) || defined(CONFIG_IOP480)
 #  if defined(CONFIG_440)
-    typedef PPC440_SYS_INFO sys_info_t;
 #      if defined(CONFIG_440SPE)
         unsigned long determine_sysper(void);
         unsigned long determine_pci_clock_per(void);
-        int ppc440spe_revB(void);
 #      endif
-#  else
-    typedef PPC405_SYS_INFO sys_info_t;
 #  endif
+typedef PPC4xx_SYS_INFO sys_info_t;
+int    ppc440spe_revB(void);
 void   get_sys_info  ( sys_info_t * );
 #endif
 
@@ -513,6 +534,8 @@ void        cpu_init_f    (void);
 int    cpu_init_r    (void);
 #if defined(CONFIG_8260)
 int    prt_8260_rsr  (void);
+#elif defined(CONFIG_MPC83XX)
+int    prt_83xx_rsr  (void);
 #endif
 
 /* $(CPU)/interrupts.c */
@@ -627,9 +650,13 @@ int        fgetc(int file);
 
 int    pcmcia_init (void);
 
-#ifdef CONFIG_SHOW_BOOT_PROGRESS
-void   show_boot_progress (int status);
+#ifdef CONFIG_STATUS_LED
+# include <status_led.h>
 #endif
+/*
+ * Board-specific Platform code can reimplement show_boot_progress () if needed
+ */
+void inline show_boot_progress (int val);
 
 #ifdef CONFIG_INIT_CRITICAL
 #error CONFIG_INIT_CRITICAL is deprecated!