Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2000-2002 |
| 4 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 5 | * |
| 6 | * Copyright 2004 Freescale Semiconductor, Inc. |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #include <common.h> |
| 10 | #include <command.h> |
| 11 | #include <mpc83xx.h> |
| 12 | #include <asm/processor.h> |
| 13 | |
Wolfgang Denk | 6405a15 | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 14 | DECLARE_GLOBAL_DATA_PTR; |
| 15 | |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 16 | struct irq_action { |
| 17 | interrupt_handler_t *handler; |
| 18 | void *arg; |
| 19 | ulong count; |
| 20 | }; |
| 21 | |
Tom Rini | ce10398 | 2017-08-13 22:44:37 -0400 | [diff] [blame] | 22 | void interrupt_init_cpu (unsigned *decrementer_count) |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 23 | { |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 24 | volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR; |
Kumar Gala | 3b16c28 | 2006-01-11 11:19:12 -0600 | [diff] [blame] | 25 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 26 | *decrementer_count = (gd->bus_clk / 4) / CONFIG_SYS_HZ; |
Kumar Gala | 3b16c28 | 2006-01-11 11:19:12 -0600 | [diff] [blame] | 27 | |
| 28 | /* Enable e300 time base */ |
| 29 | |
| 30 | immr->sysconf.spcr |= 0x00400000; |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | |
| 34 | /* |
| 35 | * Handle external interrupts |
| 36 | */ |
| 37 | |
Simon Glass | f87959b | 2019-11-14 12:57:40 -0700 | [diff] [blame^] | 38 | void external_interrupt(struct pt_regs *regs) |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 39 | { |
| 40 | } |
| 41 | |
| 42 | |
| 43 | /* |
| 44 | * Install and free an interrupt handler. |
| 45 | */ |
| 46 | |
| 47 | void |
Simon Glass | f87959b | 2019-11-14 12:57:40 -0700 | [diff] [blame^] | 48 | irq_install_handler(int irq, interrupt_handler_t * handler, void *arg) |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 49 | { |
| 50 | } |
| 51 | |
| 52 | |
Simon Glass | f87959b | 2019-11-14 12:57:40 -0700 | [diff] [blame^] | 53 | void irq_free_handler(int irq) |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 54 | { |
| 55 | } |
| 56 | |
| 57 | |
| 58 | void timer_interrupt_cpu (struct pt_regs *regs) |
| 59 | { |
| 60 | /* nothing to do here */ |
| 61 | return; |
| 62 | } |
| 63 | |
| 64 | |
Jon Loeliger | 526e5ce | 2007-07-09 19:06:00 -0500 | [diff] [blame] | 65 | #if defined(CONFIG_CMD_IRQ) |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 66 | |
| 67 | /* ripped this out of ppc4xx/interrupts.c */ |
| 68 | |
| 69 | /* |
| 70 | * irqinfo - print information about PCI devices |
| 71 | */ |
| 72 | |
| 73 | void |
Wolfgang Denk | 6262d021 | 2010-06-28 22:00:46 +0200 | [diff] [blame] | 74 | do_irqinfo(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char * const argv[]) |
Eran Liberty | 9095d4a | 2005-07-28 10:08:46 -0500 | [diff] [blame] | 75 | { |
| 76 | } |
| 77 | |
Jon Loeliger | 526e5ce | 2007-07-09 19:06:00 -0500 | [diff] [blame] | 78 | #endif |