Wolfgang Denk 2006-10-11 23:54:37 +02:00
commit 7e2a24dca9
14 changed files with 24 additions and 32 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -510,7 +510,7 @@ fixup_silent_linux ()
#endif /* CONFIG_SILENT_CONSOLE */ #endif /* CONFIG_SILENT_CONSOLE */
#ifdef CONFIG_PPC #ifdef CONFIG_PPC
static void static void __attribute__((noinline))
do_bootm_linux (cmd_tbl_t *cmdtp, int flag, do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
int argc, char *argv[], int argc, char *argv[],
ulong addr, ulong addr,
@ -625,7 +625,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
/* Look for a '-' which indicates to ignore the ramdisk argument */ /* Look for a '-' which indicates to ignore the ramdisk argument */
if (argc >= 3 && strcmp(argv[2], "-") == 0) { if (argc >= 3 && strcmp(argv[2], "-") == 0) {
debug ("Skipping initrd\n"); debug ("Skipping initrd\n");
data = 0; len = data = 0;
} }
else else
#endif #endif
@ -900,8 +900,6 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
(*kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end); (*kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end);
#else #else
ft_setup(of_flat_tree, kbd, initrd_start, initrd_end);
/* ft_dump_blob(of_flat_tree); */
#if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500) #if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500)
unlock_ram_in_cache(); unlock_ram_in_cache();
@ -917,8 +915,11 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
if (getenv("disable_of") != NULL) if (getenv("disable_of") != NULL)
(*kernel) ((bd_t *)of_flat_tree, initrd_start, initrd_end, (*kernel) ((bd_t *)of_flat_tree, initrd_start, initrd_end,
cmd_start, cmd_end); cmd_start, cmd_end);
else else {
ft_setup(of_flat_tree, kbd, initrd_start, initrd_end);
/* ft_dump_blob(of_flat_tree); */
(*kernel) ((bd_t *)of_flat_tree, (ulong)kernel, 0, 0, 0); (*kernel) ((bd_t *)of_flat_tree, (ulong)kernel, 0, 0, 0);
}
#endif #endif
} }

View file

@ -87,9 +87,9 @@ static int lookup_string(struct ft_cxt *cxt, const char *name)
p = cxt->p; p = cxt->p;
while (p < cxt->p_end) { while (p < cxt->p_end) {
if (strcmp(p, name) == 0) if (strcmp((char *)p, name) == 0)
return p - cxt->p; return p - cxt->p;
p += strlen(p) + 1; p += strlen((char *)p) + 1;
} }
return -1; return -1;
@ -103,7 +103,7 @@ void ft_prop(struct ft_cxt *cxt, const char *name, const void *data, int sz)
if (off == -1) { if (off == -1) {
memcpy(cxt->p_end, name, strlen(name) + 1); memcpy(cxt->p_end, name, strlen(name) + 1);
off = cxt->p_end - cxt->p; off = cxt->p_end - cxt->p;
cxt->p_end += strlen(name) + 2; cxt->p_end += strlen(name) + 1;
} }
/* now put offset from beginning of *STRUCTURE* */ /* now put offset from beginning of *STRUCTURE* */
@ -143,9 +143,9 @@ void ft_init_cxt(struct ft_cxt *cxt, void *blob)
cxt->p_rsvmap += SIZE_OF_RSVMAP_ENTRY; cxt->p_rsvmap += SIZE_OF_RSVMAP_ENTRY;
} }
cxt->p_start = (char*)bph + bph->off_dt_struct; cxt->p_start = (u8 *)bph + bph->off_dt_struct;
cxt->p_end = (char *)bph + bph->totalsize; cxt->p_end = (u8 *)bph + bph->totalsize;
cxt->p = (char *)bph + bph->off_dt_strings; cxt->p = (u8 *)bph + bph->off_dt_strings;
} }
/* add a reserver physical area to the rsvmap */ /* add a reserver physical area to the rsvmap */

View file

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

View file

@ -64,6 +64,8 @@ void *ft_get_prop(void *bphp, const char *propname, int *szp);
#ifdef CONFIG_OF_BOARD_SETUP #ifdef CONFIG_OF_BOARD_SETUP
void ft_board_setup(void *blob, bd_t *bd); 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
#endif #endif

View file

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