diff options
Diffstat (limited to 'arch/powerpc/cpu')
-rw-r--r-- | arch/powerpc/cpu/mpc83xx/cpu.c | 5 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc83xx/ecc.c | 1 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc83xx/interrupts.c | 7 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc83xx/spd_sdram.c | 2 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc83xx/speed.c | 1 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/cpu.c | 3 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/cpu_init.c | 1 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c | 1 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/interrupts.c | 1 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/mp.c | 1 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/speed.c | 1 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/traps.c | 1 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc86xx/cpu.c | 2 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc86xx/interrupts.c | 3 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc86xx/mp.c | 1 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/cache.c | 1 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/cpu.c | 132 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/interrupts.c | 1 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xxx/cpu.c | 1 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xxx/fdt.c | 1 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xxx/srio.c | 1 |
21 files changed, 98 insertions, 70 deletions
diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c index 3048ecf34a..c3e25978a8 100644 --- a/arch/powerpc/cpu/mpc83xx/cpu.c +++ b/arch/powerpc/cpu/mpc83xx/cpu.c @@ -10,6 +10,9 @@ */ #include <common.h> +#include <cpu_func.h> +#include <irq_func.h> +#include <vsprintf.h> #include <watchdog.h> #include <command.h> #include <mpc83xx.h> @@ -194,7 +197,7 @@ void watchdog_reset (void) immr->wdt.swsrr = 0xaa39; if (re_enable) - enable_interrupts (); + enable_interrupts(); } #endif diff --git a/arch/powerpc/cpu/mpc83xx/ecc.c b/arch/powerpc/cpu/mpc83xx/ecc.c index 10e9b96add..a6eb7cb97c 100644 --- a/arch/powerpc/cpu/mpc83xx/ecc.c +++ b/arch/powerpc/cpu/mpc83xx/ecc.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <irq_func.h> #include <mpc83xx.h> #include <command.h> diff --git a/arch/powerpc/cpu/mpc83xx/interrupts.c b/arch/powerpc/cpu/mpc83xx/interrupts.c index 520c2c363e..e83895deab 100644 --- a/arch/powerpc/cpu/mpc83xx/interrupts.c +++ b/arch/powerpc/cpu/mpc83xx/interrupts.c @@ -8,6 +8,7 @@ #include <common.h> #include <command.h> +#include <irq_func.h> #include <mpc83xx.h> #include <asm/processor.h> @@ -35,7 +36,7 @@ void interrupt_init_cpu (unsigned *decrementer_count) * Handle external interrupts */ -void external_interrupt (struct pt_regs *regs) +void external_interrupt(struct pt_regs *regs) { } @@ -45,12 +46,12 @@ void external_interrupt (struct pt_regs *regs) */ void -irq_install_handler (int irq, interrupt_handler_t * handler, void *arg) +irq_install_handler(int irq, interrupt_handler_t * handler, void *arg) { } -void irq_free_handler (int irq) +void irq_free_handler(int irq) { } diff --git a/arch/powerpc/cpu/mpc83xx/spd_sdram.c b/arch/powerpc/cpu/mpc83xx/spd_sdram.c index 8b5ecdb9ad..a14a438b02 100644 --- a/arch/powerpc/cpu/mpc83xx/spd_sdram.c +++ b/arch/powerpc/cpu/mpc83xx/spd_sdram.c @@ -13,6 +13,8 @@ #ifndef CONFIG_MPC83XX_SDRAM #include <common.h> +#include <cpu_func.h> +#include <vsprintf.h> #include <asm/processor.h> #include <asm/io.h> #include <i2c.h> diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c index e118a10fa8..93af7f495f 100644 --- a/arch/powerpc/cpu/mpc83xx/speed.c +++ b/arch/powerpc/cpu/mpc83xx/speed.c @@ -11,6 +11,7 @@ #include <common.h> #include <mpc83xx.h> #include <command.h> +#include <vsprintf.h> #include <asm/processor.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index bf48836036..18556629c3 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -10,6 +10,9 @@ #include <config.h> #include <common.h> +#include <cpu_func.h> +#include <irq_func.h> +#include <vsprintf.h> #include <watchdog.h> #include <command.h> #include <fsl_esdhc.h> diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c index 13691f3836..a9f39dc583 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c @@ -11,6 +11,7 @@ #include <common.h> #include <env.h> +#include <init.h> #include <watchdog.h> #include <asm/processor.h> #include <ioports.h> diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c index fcfa730233..ebdcd29c13 100644 --- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c +++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c @@ -5,6 +5,7 @@ #include <common.h> #include <env.h> +#include <time.h> #ifdef CONFIG_SYS_P4080_ERRATUM_SERDES8 #include <hwconfig.h> #endif diff --git a/arch/powerpc/cpu/mpc85xx/interrupts.c b/arch/powerpc/cpu/mpc85xx/interrupts.c index b5a6ead8bd..e767573193 100644 --- a/arch/powerpc/cpu/mpc85xx/interrupts.c +++ b/arch/powerpc/cpu/mpc85xx/interrupts.c @@ -11,6 +11,7 @@ */ #include <common.h> +#include <irq_func.h> #include <watchdog.h> #include <command.h> #include <asm/processor.h> diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c index 3882c95f92..9757bffe02 100644 --- a/arch/powerpc/cpu/mpc85xx/mp.c +++ b/arch/powerpc/cpu/mpc85xx/mp.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <env.h> #include <asm/processor.h> #include <env.h> diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c index acc2f2bb81..15b05fcc51 100644 --- a/arch/powerpc/cpu/mpc85xx/speed.c +++ b/arch/powerpc/cpu/mpc85xx/speed.c @@ -10,6 +10,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <ppc_asm.tmpl> #include <linux/compiler.h> #include <asm/processor.h> diff --git a/arch/powerpc/cpu/mpc85xx/traps.c b/arch/powerpc/cpu/mpc85xx/traps.c index e1d492f05a..804788d050 100644 --- a/arch/powerpc/cpu/mpc85xx/traps.c +++ b/arch/powerpc/cpu/mpc85xx/traps.c @@ -21,6 +21,7 @@ #include <common.h> #include <command.h> +#include <irq_func.h> #include <kgdb.h> #include <asm/processor.h> diff --git a/arch/powerpc/cpu/mpc86xx/cpu.c b/arch/powerpc/cpu/mpc86xx/cpu.c index c023d0684f..bb14444a2e 100644 --- a/arch/powerpc/cpu/mpc86xx/cpu.c +++ b/arch/powerpc/cpu/mpc86xx/cpu.c @@ -6,6 +6,8 @@ */ #include <common.h> +#include <cpu_func.h> +#include <vsprintf.h> #include <watchdog.h> #include <command.h> #include <asm/cache.h> diff --git a/arch/powerpc/cpu/mpc86xx/interrupts.c b/arch/powerpc/cpu/mpc86xx/interrupts.c index ed780a599d..0f930fcd9e 100644 --- a/arch/powerpc/cpu/mpc86xx/interrupts.c +++ b/arch/powerpc/cpu/mpc86xx/interrupts.c @@ -15,6 +15,7 @@ */ #include <common.h> +#include <irq_func.h> #include <mpc86xx.h> #include <command.h> #include <asm/processor.h> @@ -108,5 +109,5 @@ int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) */ void external_interrupt(struct pt_regs *regs) { - puts("external_interrupt (oops!)\n"); + puts("external_interrupt(oops!)\n"); } diff --git a/arch/powerpc/cpu/mpc86xx/mp.c b/arch/powerpc/cpu/mpc86xx/mp.c index ce300eac5b..07c4c079df 100644 --- a/arch/powerpc/cpu/mpc86xx/mp.c +++ b/arch/powerpc/cpu/mpc86xx/mp.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/processor.h> #include <asm/mmu.h> #include <ioports.h> diff --git a/arch/powerpc/cpu/mpc8xx/cache.c b/arch/powerpc/cpu/mpc8xx/cache.c index 8051d3e8d2..41559009ca 100644 --- a/arch/powerpc/cpu/mpc8xx/cache.c +++ b/arch/powerpc/cpu/mpc8xx/cache.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <asm/processor.h> #include <asm/ppc.h> #include <asm/io.h> diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 798eabdc21..0604433e72 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -17,6 +17,8 @@ */ #include <common.h> +#include <cpu_func.h> +#include <vsprintf.h> #include <watchdog.h> #include <command.h> #include <mpc8xx.h> @@ -33,70 +35,6 @@ DECLARE_GLOBAL_DATA_PTR; -static int check_CPU(long clock, uint pvr, uint immr) -{ - immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; - uint k; - char buf[32]; - - /* the highest 16 bits should be 0x0050 for a 860 */ - - if (PVR_VER(pvr) != PVR_VER(PVR_8xx)) - return -1; - - k = (immr << 16) | - in_be16(&immap->im_cpm.cp_dparam16[PROFF_REVNUM / sizeof(u16)]); - - /* - * Some boards use sockets so different CPUs can be used. - * We have to check chip version in run time. - */ - switch (k) { - /* MPC866P/MPC866T/MPC859T/MPC859DSL/MPC852T */ - case 0x08010004: /* Rev. A.0 */ - printf("MPC866xxxZPnnA"); - break; - case 0x08000003: /* Rev. 0.3 */ - printf("MPC866xxxZPnn"); - break; - case 0x09000000: /* 870/875/880/885 */ - puts("MPC885ZPnn"); - break; - - default: - printf("unknown MPC86x (0x%08x)", k); - break; - } - - printf(" at %s MHz: ", strmhz(buf, clock)); - - print_size(checkicache(), " I-Cache "); - print_size(checkdcache(), " D-Cache"); - - /* do we have a FEC (860T/P or 852/859/866/885)? */ - - out_be32(&immap->im_cpm.cp_fec.fec_addr_low, 0x12345678); - if (in_be32(&immap->im_cpm.cp_fec.fec_addr_low) == 0x12345678) - printf(" FEC present"); - - putc('\n'); - - return 0; -} - -/* ------------------------------------------------------------------------- */ - -int checkcpu(void) -{ - ulong clock = gd->cpu_clk; - uint immr = get_immr(); /* Return full IMMR contents */ - uint pvr = get_pvr(); - - puts("CPU: "); - - return check_CPU(clock, pvr, immr); -} - /* ------------------------------------------------------------------------- */ /* L1 i-cache */ @@ -141,7 +79,7 @@ int checkicache(void) /* L1 d-cache */ /* call with cache disabled */ -int checkdcache(void) +static int checkdcache(void) { immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; memctl8xx_t __iomem *memctl = &immap->im_memctl; @@ -173,6 +111,70 @@ int checkdcache(void) return lines << 4; }; +static int check_CPU(long clock, uint pvr, uint immr) +{ + immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; + uint k; + char buf[32]; + + /* the highest 16 bits should be 0x0050 for a 860 */ + + if (PVR_VER(pvr) != PVR_VER(PVR_8xx)) + return -1; + + k = (immr << 16) | + in_be16(&immap->im_cpm.cp_dparam16[PROFF_REVNUM / sizeof(u16)]); + + /* + * Some boards use sockets so different CPUs can be used. + * We have to check chip version in run time. + */ + switch (k) { + /* MPC866P/MPC866T/MPC859T/MPC859DSL/MPC852T */ + case 0x08010004: /* Rev. A.0 */ + printf("MPC866xxxZPnnA"); + break; + case 0x08000003: /* Rev. 0.3 */ + printf("MPC866xxxZPnn"); + break; + case 0x09000000: /* 870/875/880/885 */ + puts("MPC885ZPnn"); + break; + + default: + printf("unknown MPC86x (0x%08x)", k); + break; + } + + printf(" at %s MHz: ", strmhz(buf, clock)); + + print_size(checkicache(), " I-Cache "); + print_size(checkdcache(), " D-Cache"); + + /* do we have a FEC (860T/P or 852/859/866/885)? */ + + out_be32(&immap->im_cpm.cp_fec.fec_addr_low, 0x12345678); + if (in_be32(&immap->im_cpm.cp_fec.fec_addr_low) == 0x12345678) + printf(" FEC present"); + + putc('\n'); + + return 0; +} + +/* ------------------------------------------------------------------------- */ + +int checkcpu(void) +{ + ulong clock = gd->cpu_clk; + uint immr = get_immr(); /* Return full IMMR contents */ + uint pvr = get_pvr(); + + puts("CPU: "); + + return check_CPU(clock, pvr, immr); +} + /* ------------------------------------------------------------------------- */ void upmconfig(uint upm, uint *table, uint size) diff --git a/arch/powerpc/cpu/mpc8xx/interrupts.c b/arch/powerpc/cpu/mpc8xx/interrupts.c index 26aa7a5645..6ee6088fa8 100644 --- a/arch/powerpc/cpu/mpc8xx/interrupts.c +++ b/arch/powerpc/cpu/mpc8xx/interrupts.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <irq_func.h> #include <mpc8xx.h> #include <mpc8xx_irq.h> #include <asm/cpm_8xx.h> diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c index 467eac4a2e..ed482a9c09 100644 --- a/arch/powerpc/cpu/mpc8xxx/cpu.c +++ b/arch/powerpc/cpu/mpc8xxx/cpu.c @@ -10,6 +10,7 @@ #include <config.h> #include <common.h> #include <command.h> +#include <cpu_func.h> #include <tsec.h> #include <fm_eth.h> #include <netdev.h> diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c index 0d877c43be..485c2d4feb 100644 --- a/arch/powerpc/cpu/mpc8xxx/fdt.c +++ b/arch/powerpc/cpu/mpc8xxx/fdt.c @@ -8,6 +8,7 @@ */ #include <common.h> +#include <cpu_func.h> #include <linux/libfdt.h> #include <fdt_support.h> #include <asm/mp.h> diff --git a/arch/powerpc/cpu/mpc8xxx/srio.c b/arch/powerpc/cpu/mpc8xxx/srio.c index ea7dac6e66..a1f9403559 100644 --- a/arch/powerpc/cpu/mpc8xxx/srio.c +++ b/arch/powerpc/cpu/mpc8xxx/srio.c @@ -5,6 +5,7 @@ #include <common.h> #include <config.h> +#include <time.h> #include <asm/fsl_law.h> #include <asm/fsl_serdes.h> #include <asm/fsl_srio.h> |