Merge commit 'u-boot/master' into for-1.3.1
[platform/kernel/u-boot.git] / include / common.h
index 5b2e71c..edd0024 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
@@ -38,7 +38,7 @@ typedef volatile unsigned char        vu_char;
 #include <linux/string.h>
 #include <asm/ptrace.h>
 #include <stdarg.h>
-#if defined(CONFIG_PCI) && defined(CONFIG_440)
+#if defined(CONFIG_PCI) && (defined(CONFIG_4xx) && !defined(CONFIG_AP1000))
 #include <pci.h>
 #endif
 #if defined(CONFIG_8xx)
@@ -65,6 +65,9 @@ typedef volatile unsigned char        vu_char;
 #include <asm/5xx_immap.h>
 #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)
@@ -187,8 +190,7 @@ void        hang            (void) __attribute__ ((noreturn));
 long int initdram (int);
 int    display_options (void);
 void   print_size (ulong, const char *);
-int    print_buffer (ulong addr, void* data, uint width, uint count,
-                      uint linelen);
+int    print_buffer (ulong addr, void* data, uint width, uint count, uint linelen);
 
 /* common/main.c */
 void   main_loop       (void);
@@ -231,6 +233,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>
@@ -249,10 +254,11 @@ void      pci_init      (void);
 void   pci_init_board(void);
 void   pciinfo       (int, int);
 
-#if defined(CONFIG_PCI) && defined(CONFIG_440)
-#   if defined(CFG_PCI_PRE_INIT)
+#if defined(CONFIG_PCI) && (defined(CONFIG_4xx) && !defined(CONFIG_AP1000))
     int           pci_pre_init        (struct pci_controller * );
-#   endif
+#endif
+
+#if defined(CONFIG_PCI) && (defined(CONFIG_440) || defined(CONFIG_405EX))
 #   if defined(CFG_PCI_TARGET_INIT)
        void    pci_target_init      (struct pci_controller *);
 #   endif
@@ -260,8 +266,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
 
@@ -403,6 +409,10 @@ void               ppcDcbi(unsigned long value);
 void           ppcSync(void);
 void           ppcDcbz(unsigned long value);
 #endif
+#if defined (CONFIG_MICROBLAZE)
+unsigned short in16(unsigned int);
+void           out16(unsigned int, unsigned short value);
+#endif
 
 #if defined (CONFIG_MPC83XX)
 void           ppcDWload(unsigned int *addr, unsigned int *ret);
@@ -416,6 +426,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);
@@ -441,11 +458,12 @@ int       sdram_adjust_866 (void);
 int    adjust_sdram_tbs_8xx (void);
 #if defined(CONFIG_8260)
 int    prt_8260_clks (void);
-#elif defined(CONFIG_MPC83XX)
-int print_clock_conf(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
@@ -487,15 +505,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
 
@@ -510,6 +526,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 */
@@ -624,9 +642,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!