Path: blob/master/arch/mn10300/unit-asb2305/unit-init.c
10817 views
/* ASB2305 Initialisation1*2* Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.3* Written by David Howells ([email protected])4*5* This program is free software; you can redistribute it and/or6* modify it under the terms of the GNU General Public Licence7* as published by the Free Software Foundation; either version8* 2 of the Licence, or (at your option) any later version.9*/10#include <linux/kernel.h>11#include <linux/param.h>12#include <linux/init.h>13#include <linux/pci.h>14#include <asm/io.h>15#include <asm/setup.h>16#include <asm/processor.h>17#include <asm/intctl-regs.h>18#include <asm/serial-regs.h>19#include <unit/serial.h>2021/*22* initialise some of the unit hardware before gdbstub is set up23*/24asmlinkage void __init unit_init(void)25{26#ifndef CONFIG_GDBSTUB_ON_TTYSx27/* set the 16550 interrupt line to level 3 if not being used for GDB */28#ifdef CONFIG_EXT_SERIAL_IRQ_LEVEL29set_intr_level(XIRQ0, NUM2GxICR_LEVEL(CONFIG_EXT_SERIAL_IRQ_LEVEL));30#endif31#endif /* CONFIG_GDBSTUB_ON_TTYSx */32}3334/*35* initialise the rest of the unit hardware after gdbstub is ready36*/37void __init unit_setup(void)38{39#ifdef CONFIG_PCI40unit_pci_init();41#endif42}4344/*45* initialise the external interrupts used by a unit of this type46*/47void __init unit_init_IRQ(void)48{49unsigned int extnum;5051for (extnum = 0; extnum < NR_XIRQS; extnum++) {52switch (GET_XIRQ_TRIGGER(extnum)) {53case XIRQ_TRIGGER_HILEVEL:54case XIRQ_TRIGGER_LOWLEVEL:55mn10300_set_lateack_irq_type(XIRQ2IRQ(extnum));56break;57default:58break;59}60}61}626364