blob: bb37a1332c877951e766a8891687dae3f05b6ef8 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Eran Liberty9095d4a2005-07-28 10:08:46 -05002/*
3 * (C) Copyright 2000-2002
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 *
6 * Copyright 2004 Freescale Semiconductor, Inc.
Eran Liberty9095d4a2005-07-28 10:08:46 -05007 */
8
Eran Liberty9095d4a2005-07-28 10:08:46 -05009#include <command.h>
Simon Glass9b61c7c2019-11-14 12:57:41 -070010#include <irq_func.h>
Eran Liberty9095d4a2005-07-28 10:08:46 -050011#include <mpc83xx.h>
Simon Glass3ba929a2020-10-30 21:38:53 -060012#include <asm/global_data.h>
Eran Liberty9095d4a2005-07-28 10:08:46 -050013#include <asm/processor.h>
Simon Glass6b9f0102020-05-10 11:40:06 -060014#include <asm/ptrace.h>
J. Neuschäfercc2df522024-12-20 11:37:53 +010015#include "initreg/initreg.h"
Eran Liberty9095d4a2005-07-28 10:08:46 -050016
Wolfgang Denk6405a152006-03-31 18:32:53 +020017DECLARE_GLOBAL_DATA_PTR;
18
Eran Liberty9095d4a2005-07-28 10:08:46 -050019struct irq_action {
20 interrupt_handler_t *handler;
21 void *arg;
22 ulong count;
23};
24
Tom Rinice103982017-08-13 22:44:37 -040025void interrupt_init_cpu (unsigned *decrementer_count)
Eran Liberty9095d4a2005-07-28 10:08:46 -050026{
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020027 volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
Kumar Gala3b16c282006-01-11 11:19:12 -060028
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020029 *decrementer_count = (gd->bus_clk / 4) / CONFIG_SYS_HZ;
Kumar Gala3b16c282006-01-11 11:19:12 -060030
31 /* Enable e300 time base */
32
J. Neuschäfercc2df522024-12-20 11:37:53 +010033 immr->sysconf.spcr |= SPCR_TBEN_MASK;
Eran Liberty9095d4a2005-07-28 10:08:46 -050034}
35
Eran Liberty9095d4a2005-07-28 10:08:46 -050036/*
37 * Handle external interrupts
38 */
39
Simon Glassf87959b2019-11-14 12:57:40 -070040void external_interrupt(struct pt_regs *regs)
Eran Liberty9095d4a2005-07-28 10:08:46 -050041{
42}
43
Eran Liberty9095d4a2005-07-28 10:08:46 -050044/*
45 * Install and free an interrupt handler.
46 */
47
48void
Simon Glassf87959b2019-11-14 12:57:40 -070049irq_install_handler(int irq, interrupt_handler_t * handler, void *arg)
Eran Liberty9095d4a2005-07-28 10:08:46 -050050{
51}
52
Simon Glassf87959b2019-11-14 12:57:40 -070053void irq_free_handler(int irq)
Eran Liberty9095d4a2005-07-28 10:08:46 -050054{
55}
56
Eran Liberty9095d4a2005-07-28 10:08:46 -050057void timer_interrupt_cpu (struct pt_regs *regs)
58{
59 /* nothing to do here */
60 return;
61}
62
Jon Loeliger526e5ce2007-07-09 19:06:00 -050063#if defined(CONFIG_CMD_IRQ)
Eran Liberty9095d4a2005-07-28 10:08:46 -050064
65/* ripped this out of ppc4xx/interrupts.c */
66
67/*
68 * irqinfo - print information about PCI devices
69 */
70
Masahiro Yamadaf7ed78b2020-06-26 15:13:33 +090071void do_irqinfo(struct cmd_tbl *cmdtp, struct bd_info *bd, int flag, int argc,
Simon Glassed38aef2020-05-10 11:40:03 -060072 char *const argv[])
Eran Liberty9095d4a2005-07-28 10:08:46 -050073{
74}
75
Jon Loeliger526e5ce2007-07-09 19:06:00 -050076#endif