blob: dd5a572827117a6571dafdb99df8dc509721c547 [file] [log] [blame]
viresh kumarbc4e8142010-04-01 12:30:58 +01001/*
2 * arch/arm/mach-spear3xx/spear310.c
3 *
4 * SPEAr310 machine source file
5 *
6 * Copyright (C) 2009 ST Microelectronics
7 * Viresh Kumar<viresh.kumar@st.com>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#include <linux/ptrace.h>
15#include <asm/irq.h>
16#include <mach/generic.h>
17#include <mach/spear.h>
18
viresh kumar70f4c0b2010-04-01 12:31:29 +010019/* pad multiplexing support */
20/* muxing registers */
21#define PAD_MUX_CONFIG_REG 0x08
22
23/* devices */
24struct pmx_dev_mode pmx_emi_cs_0_1_4_5_modes[] = {
25 {
26 .ids = 0x00,
27 .mask = PMX_TIMER_3_4_MASK,
28 },
29};
30
31struct pmx_dev pmx_emi_cs_0_1_4_5 = {
32 .name = "emi_cs_0_1_4_5",
33 .modes = pmx_emi_cs_0_1_4_5_modes,
34 .mode_count = ARRAY_SIZE(pmx_emi_cs_0_1_4_5_modes),
35 .enb_on_reset = 1,
36};
37
38struct pmx_dev_mode pmx_emi_cs_2_3_modes[] = {
39 {
40 .ids = 0x00,
41 .mask = PMX_TIMER_1_2_MASK,
42 },
43};
44
45struct pmx_dev pmx_emi_cs_2_3 = {
46 .name = "emi_cs_2_3",
47 .modes = pmx_emi_cs_2_3_modes,
48 .mode_count = ARRAY_SIZE(pmx_emi_cs_2_3_modes),
49 .enb_on_reset = 1,
50};
51
52struct pmx_dev_mode pmx_uart1_modes[] = {
53 {
54 .ids = 0x00,
55 .mask = PMX_FIRDA_MASK,
56 },
57};
58
59struct pmx_dev pmx_uart1 = {
60 .name = "uart1",
61 .modes = pmx_uart1_modes,
62 .mode_count = ARRAY_SIZE(pmx_uart1_modes),
63 .enb_on_reset = 1,
64};
65
66struct pmx_dev_mode pmx_uart2_modes[] = {
67 {
68 .ids = 0x00,
69 .mask = PMX_TIMER_1_2_MASK,
70 },
71};
72
73struct pmx_dev pmx_uart2 = {
74 .name = "uart2",
75 .modes = pmx_uart2_modes,
76 .mode_count = ARRAY_SIZE(pmx_uart2_modes),
77 .enb_on_reset = 1,
78};
79
80struct pmx_dev_mode pmx_uart3_4_5_modes[] = {
81 {
82 .ids = 0x00,
83 .mask = PMX_UART0_MODEM_MASK,
84 },
85};
86
87struct pmx_dev pmx_uart3_4_5 = {
88 .name = "uart3_4_5",
89 .modes = pmx_uart3_4_5_modes,
90 .mode_count = ARRAY_SIZE(pmx_uart3_4_5_modes),
91 .enb_on_reset = 1,
92};
93
94struct pmx_dev_mode pmx_fsmc_modes[] = {
95 {
96 .ids = 0x00,
97 .mask = PMX_SSP_CS_MASK,
98 },
99};
100
101struct pmx_dev pmx_fsmc = {
102 .name = "fsmc",
103 .modes = pmx_fsmc_modes,
104 .mode_count = ARRAY_SIZE(pmx_fsmc_modes),
105 .enb_on_reset = 1,
106};
107
108struct pmx_dev_mode pmx_rs485_0_1_modes[] = {
109 {
110 .ids = 0x00,
111 .mask = PMX_MII_MASK,
112 },
113};
114
115struct pmx_dev pmx_rs485_0_1 = {
116 .name = "rs485_0_1",
117 .modes = pmx_rs485_0_1_modes,
118 .mode_count = ARRAY_SIZE(pmx_rs485_0_1_modes),
119 .enb_on_reset = 1,
120};
121
122struct pmx_dev_mode pmx_tdm0_modes[] = {
123 {
124 .ids = 0x00,
125 .mask = PMX_MII_MASK,
126 },
127};
128
129struct pmx_dev pmx_tdm0 = {
130 .name = "tdm0",
131 .modes = pmx_tdm0_modes,
132 .mode_count = ARRAY_SIZE(pmx_tdm0_modes),
133 .enb_on_reset = 1,
134};
135
136/* pmx driver structure */
137struct pmx_driver pmx_driver = {
138 .mux_reg = {.offset = PAD_MUX_CONFIG_REG, .mask = 0x00007fff},
139};
140
viresh kumarbc4e8142010-04-01 12:30:58 +0100141/* Add spear310 specific devices here */
142
viresh kumar70f4c0b2010-04-01 12:31:29 +0100143/* spear310 routines */
viresh kumarbc4e8142010-04-01 12:30:58 +0100144void __init spear310_init(void)
145{
146 /* call spear3xx family common init function */
147 spear3xx_init();
148}
viresh kumar70f4c0b2010-04-01 12:31:29 +0100149
150void spear310_pmx_init(void)
151{
152 spear_pmx_init(&pmx_driver, SPEAR310_SOC_CONFIG_BASE,
153 SPEAR310_SOC_CONFIG_SIZE);
154}