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