blob: 36bf69394ff818fc91aa155d709147fa4048ea6e [file] [log] [blame]
Sudhakar Rajashekhara9d799562010-06-07 12:39:59 +05301/*
2 * Miscellaneous DA8XX functions.
3 *
4 * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21#include <asm/io.h>
22#include <asm/arch/hardware.h>
Sughosh Ganud7f9b502010-11-28 20:21:27 -050023#include <asm/arch/da8xx_common.h>
Sudhakar Rajashekhara9d799562010-06-07 12:39:59 +053024
25#ifndef CONFIG_USE_IRQ
26void irq_init(void)
27{
28 /*
29 * Mask all IRQs by clearing the global enable and setting
30 * the enable clear for all the 90 interrupts.
31 */
32
33 writel(0, &davinci_aintc_regs->ger);
34
35 writel(0, &davinci_aintc_regs->hier);
36
37 writel(0xffffffff, &davinci_aintc_regs->ecr1);
38 writel(0xffffffff, &davinci_aintc_regs->ecr2);
39 writel(0xffffffff, &davinci_aintc_regs->ecr3);
40}
41#endif
42
43/*
44 * Enable PSC for various peripherals.
45 */
46int da8xx_configure_lpsc_items(const struct lpsc_resource *item,
47 const int n_items)
48{
49 int i;
50
51 for (i = 0; i < n_items; i++)
52 lpsc_on(item[i].lpsc_no);
53
54 return 0;
55}