Pārlūkot izejas kodu

* Fix a bunch of compiler warnings for gcc 4.0

Signed-off-by: Matthew McClintock <msm@freescale.com>
Jon Loeliger 18 gadi atpakaļ
vecāks
revīzija
13a7fcdf37

+ 1 - 3
board/cds/mpc8541cds/mpc8541cds.c

@@ -497,8 +497,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller **hose);
-
-	pci_mpc85xx_init(&hose);
+	pci_mpc85xx_init(hose);
 #endif
 }

+ 0 - 2
board/cds/mpc8548cds/mpc8548cds.c

@@ -323,8 +323,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller **hose);
-
 	pci_mpc85xx_init(&hose);
 #endif
 }

+ 0 - 2
board/cds/mpc8555cds/mpc8555cds.c

@@ -497,8 +497,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(hose);
 #endif
 }

+ 0 - 3
board/mpc8540ads/mpc8540ads.c

@@ -33,7 +33,6 @@
 
 #if defined(CONFIG_OF_FLAT_TREE)
 #include <ft_build.h>
-extern void ft_cpu_setup(void *blob, bd_t *bd);
 #endif
 
 
@@ -327,8 +326,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }

+ 0 - 2
board/mpc8560ads/mpc8560ads.c

@@ -539,8 +539,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }

+ 0 - 2
board/pm854/pm854.c

@@ -289,8 +289,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }

+ 0 - 2
board/pm856/pm856.c

@@ -442,8 +442,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }

+ 0 - 2
board/stxgp3/stxgp3.c

@@ -375,8 +375,6 @@ void
 pci_init_board(void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init(struct pci_controller *hose);
-
 	pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }

+ 0 - 2
board/tqm85xx/tqm85xx.c

@@ -408,8 +408,6 @@ static struct pci_controller hose = {
 void pci_init_board (void)
 {
 #ifdef CONFIG_PCI
-	extern void pci_mpc85xx_init (struct pci_controller *hose);
-
 	pci_mpc85xx_init (&hose);
 #endif /* CONFIG_PCI */
 }

+ 5 - 5
common/ft_build.c

@@ -87,9 +87,9 @@ static int lookup_string(struct ft_cxt *cxt, const char *name)
 
 	p = cxt->p;
 	while (p < cxt->p_end) {
-		if (strcmp(p, name) == 0)
+		if (strcmp((char *)p, name) == 0)
 			return p - cxt->p;
-		p += strlen(p) + 1;
+		p += strlen((char *)p) + 1;
 	}
 
 	return -1;
@@ -143,9 +143,9 @@ void ft_init_cxt(struct ft_cxt *cxt, void *blob)
 	cxt->p_rsvmap += SIZE_OF_RSVMAP_ENTRY;
 	}
 
-	cxt->p_start = (char*)bph + bph->off_dt_struct;
-	cxt->p_end = (char *)bph + bph->totalsize;
-	cxt->p = (char *)bph + bph->off_dt_strings;
+	cxt->p_start = (u8 *)bph + bph->off_dt_struct;
+	cxt->p_end = (u8 *)bph + bph->totalsize;
+	cxt->p = (u8 *)bph + bph->off_dt_strings;
 }
 
 /* add a reserver physical area to the rsvmap */

+ 5 - 0
cpu/mpc85xx/pci.c

@@ -29,6 +29,9 @@
 #include <asm/cpm_85xx.h>
 #include <pci.h>
 
+#if defined(CONFIG_OF_FLAT_TREE)
+#include <ft_build.h>
+#endif
 
 #if defined(CONFIG_PCI)
 
@@ -42,7 +45,9 @@ pci_mpc85xx_init(struct pci_controller *board_hose)
 
 	volatile immap_t    *immap = (immap_t *)CFG_CCSRBAR;
 	volatile ccsr_pcix_t *pcix = &immap->im_pcix;
+#ifdef CONFIG_MPC85XX_PCI2
 	volatile ccsr_pcix_t *pcix2 = &immap->im_pcix2;
+#endif
 	volatile ccsr_gur_t *gur = &immap->im_gur;
 	struct pci_controller * hose;
 

+ 2 - 0
include/ft_build.h

@@ -64,6 +64,8 @@ void *ft_get_prop(void *bphp, const char *propname, int *szp);
 
 #ifdef CONFIG_OF_BOARD_SETUP
 void ft_board_setup(void *blob, bd_t *bd);
+void ft_cpu_setup(void *blob, bd_t *bd);
+void ft_pci_setup(void *blob, bd_t *bd);
 #endif
 
 #endif

+ 3 - 0
include/pci.h

@@ -501,4 +501,7 @@ extern int pci_hose_config_device(struct pci_controller *hose,
 extern void pci_mpc824x_init (struct pci_controller *hose);
 #endif
 
+#ifdef CONFIG_MPC85xx
+extern void pci_mpc85xx_init (struct pci_controller *hose);
+#endif
 #endif	/* _PCI_H */