[U-Boot] [PATCH 1/2] powerpc: Rework interrupt_init_cpu()

Mario Six mario.six at gdsys.cc
Mon Aug 14 06:55:49 UTC 2017


On Mon, Aug 14, 2017 at 4:44 AM, Tom Rini <trini at konsulko.com> wrote:
> The function interrupt_init_cpu() is given an int return type but does
> not return anything but 0.  Rework this to be a void function.
>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
>  arch/powerpc/cpu/mpc83xx/interrupts.c | 4 +---
>  arch/powerpc/cpu/mpc85xx/interrupts.c | 4 +---
>  arch/powerpc/cpu/mpc86xx/interrupts.c | 4 +---
>  arch/powerpc/cpu/mpc8xx/interrupts.c  | 4 +---
>  arch/powerpc/include/asm/ppc.h        | 2 +-
>  arch/powerpc/lib/interrupts.c         | 7 +------
>  6 files changed, 6 insertions(+), 19 deletions(-)
>
> diff --git a/arch/powerpc/cpu/mpc83xx/interrupts.c b/arch/powerpc/cpu/mpc83xx/interrupts.c
> index 668aa020889e..50503b4d2c0f 100644
> --- a/arch/powerpc/cpu/mpc83xx/interrupts.c
> +++ b/arch/powerpc/cpu/mpc83xx/interrupts.c
> @@ -20,7 +20,7 @@ struct irq_action {
>         ulong count;
>  };
>
> -int interrupt_init_cpu (unsigned *decrementer_count)
> +void interrupt_init_cpu (unsigned *decrementer_count)
>  {
>         volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
>
> @@ -29,8 +29,6 @@ int interrupt_init_cpu (unsigned *decrementer_count)
>         /* Enable e300 time base */
>
>         immr->sysconf.spcr |= 0x00400000;
> -
> -       return 0;
>  }
>
>
> diff --git a/arch/powerpc/cpu/mpc85xx/interrupts.c b/arch/powerpc/cpu/mpc85xx/interrupts.c
> index cf730c5c53cb..b92549000fbc 100644
> --- a/arch/powerpc/cpu/mpc85xx/interrupts.c
> +++ b/arch/powerpc/cpu/mpc85xx/interrupts.c
> @@ -20,7 +20,7 @@
>  #include <post.h>
>  #endif
>
> -int interrupt_init_cpu(unsigned *decrementer_count)
> +void interrupt_init_cpu(unsigned *decrementer_count)
>  {
>         ccsr_pic_t __iomem *pic = (void *)CONFIG_SYS_MPC8xxx_PIC_ADDR;
>
> @@ -77,8 +77,6 @@ int interrupt_init_cpu(unsigned *decrementer_count)
>  #ifdef CONFIG_POST
>         post_word_store(post_word);
>  #endif
> -
> -       return (0);
>  }
>
>  /* Install and free a interrupt handler. Not implemented yet. */
> diff --git a/arch/powerpc/cpu/mpc86xx/interrupts.c b/arch/powerpc/cpu/mpc86xx/interrupts.c
> index a6db0baab33f..81874790ff35 100644
> --- a/arch/powerpc/cpu/mpc86xx/interrupts.c
> +++ b/arch/powerpc/cpu/mpc86xx/interrupts.c
> @@ -23,7 +23,7 @@
>  #include <post.h>
>  #endif
>
> -int interrupt_init_cpu(unsigned *decrementer_count)
> +void interrupt_init_cpu(unsigned *decrementer_count)
>  {
>         volatile immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;
>         volatile ccsr_pic_t *pic = &immr->im_pic;
> @@ -73,8 +73,6 @@ int interrupt_init_cpu(unsigned *decrementer_count)
>  #ifdef CONFIG_POST
>         post_word_store(post_word);
>  #endif
> -
> -       return 0;
>  }
>
>  /*
> diff --git a/arch/powerpc/cpu/mpc8xx/interrupts.c b/arch/powerpc/cpu/mpc8xx/interrupts.c
> index e8e287a13fa8..846148ab9867 100644
> --- a/arch/powerpc/cpu/mpc8xx/interrupts.c
> +++ b/arch/powerpc/cpu/mpc8xx/interrupts.c
> @@ -30,7 +30,7 @@ static void cpm_interrupt(void *regs);
>
>  /************************************************************************/
>
> -int interrupt_init_cpu(unsigned *decrementer_count)
> +void interrupt_init_cpu(unsigned *decrementer_count)
>  {
>         immap_t __iomem *immr = (immap_t __iomem *)CONFIG_SYS_IMMR;
>
> @@ -41,8 +41,6 @@ int interrupt_init_cpu(unsigned *decrementer_count)
>
>         /* Configure CPM interrupts */
>         cpm_interrupt_init();
> -
> -       return 0;
>  }
>
>  /************************************************************************/
> diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h
> index 850fe93f9798..5e0aa08be936 100644
> --- a/arch/powerpc/include/asm/ppc.h
> +++ b/arch/powerpc/include/asm/ppc.h
> @@ -122,7 +122,7 @@ static inline void set_msr(unsigned long msr)
>  void print_reginfo(void);
>  #endif
>
> -int interrupt_init_cpu(unsigned *);
> +void interrupt_init_cpu(unsigned *);
>  void timer_interrupt_cpu(struct pt_regs *);
>  unsigned long search_exception_table(unsigned long addr);
>
> diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c
> index 46fa18c63fb0..e8784aa16e9c 100644
> --- a/arch/powerpc/lib/interrupts.c
> +++ b/arch/powerpc/lib/interrupts.c
> @@ -63,13 +63,8 @@ int disable_interrupts (void)
>
>  int interrupt_init (void)
>  {
> -       int ret;
> -
>         /* call cpu specific function from $(CPU)/interrupts.c */
> -       ret = interrupt_init_cpu (&decrementer_count);
> -
> -       if (ret)
> -               return ret;
> +       interrupt_init_cpu (&decrementer_count);
>
>         set_dec (decrementer_count);
>
> --
> 1.9.1
>

Acked-by: Mario Six <mario.six at gdsys.cc>


More information about the U-Boot mailing list