]>
Commit | Line | Data |
---|---|---|
9d799560 SR |
1 | /* |
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> | |
d7f9b503 | 23 | #include <asm/arch/da8xx_common.h> |
9d799560 SR |
24 | |
25 | #ifndef CONFIG_USE_IRQ | |
26 | void 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 | */ | |
46 | int 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 | } | |
d2607401 SR |
56 | |
57 | #if defined(CONFIG_DRIVER_TI_EMAC) && defined(CONFIG_MACH_DAVINCI_DA850_EVM) | |
58 | void da850_emac_mii_mode_sel(int mode_sel) | |
59 | { | |
60 | int val; | |
61 | ||
62 | val = readl(&davinci_syscfg_regs->cfgchip3); | |
63 | if (mode_sel == 0) | |
64 | val &= ~(1 << 8); | |
65 | else | |
66 | val |= (1 << 8); | |
67 | writel(val, &davinci_syscfg_regs->cfgchip3); | |
68 | } | |
69 | #endif |