diff options
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/arch-pxa/hardware.h | 5 | ||||
-rw-r--r-- | include/asm-arm/arch-pxa/irqs.h | 1 | ||||
-rw-r--r-- | include/asm-arm/arch-pxa/system.h | 17 | ||||
-rw-r--r-- | include/asm-arm/arch-pxa/tosa.h | 50 | ||||
-rw-r--r-- | include/asm-arm/arch-pxa/tosa_bt.h | 22 |
5 files changed, 62 insertions, 33 deletions
diff --git a/include/asm-arm/arch-pxa/hardware.h b/include/asm-arm/arch-pxa/hardware.h index b6a8317c2ec4..09868de841a5 100644 --- a/include/asm-arm/arch-pxa/hardware.h +++ b/include/asm-arm/arch-pxa/hardware.h | |||
@@ -208,6 +208,11 @@ extern void pxa_gpio_set_value(unsigned gpio, int value); | |||
208 | */ | 208 | */ |
209 | extern unsigned int get_memclk_frequency_10khz(void); | 209 | extern unsigned int get_memclk_frequency_10khz(void); |
210 | 210 | ||
211 | /* | ||
212 | * register GPIO as reset generator | ||
213 | */ | ||
214 | extern int init_gpio_reset(int gpio); | ||
215 | |||
211 | #endif | 216 | #endif |
212 | 217 | ||
213 | #if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI) | 218 | #if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI) |
diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h index b6c8fe377683..fa05e76f64e8 100644 --- a/include/asm-arm/arch-pxa/irqs.h +++ b/include/asm-arm/arch-pxa/irqs.h | |||
@@ -180,6 +180,7 @@ | |||
180 | #define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1) | 180 | #define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1) |
181 | #elif defined(CONFIG_ARCH_LUBBOCK) || \ | 181 | #elif defined(CONFIG_ARCH_LUBBOCK) || \ |
182 | defined(CONFIG_MACH_LOGICPD_PXA270) || \ | 182 | defined(CONFIG_MACH_LOGICPD_PXA270) || \ |
183 | defined(CONFIG_MACH_TOSA) || \ | ||
183 | defined(CONFIG_MACH_MAINSTONE) || \ | 184 | defined(CONFIG_MACH_MAINSTONE) || \ |
184 | defined(CONFIG_MACH_PCM027) || \ | 185 | defined(CONFIG_MACH_PCM027) || \ |
185 | defined(CONFIG_MACH_MAGICIAN) | 186 | defined(CONFIG_MACH_MAGICIAN) |
diff --git a/include/asm-arm/arch-pxa/system.h b/include/asm-arm/arch-pxa/system.h index ba7e132de1b3..6956fc5235f8 100644 --- a/include/asm-arm/arch-pxa/system.h +++ b/include/asm-arm/arch-pxa/system.h | |||
@@ -21,19 +21,4 @@ static inline void arch_idle(void) | |||
21 | } | 21 | } |
22 | 22 | ||
23 | 23 | ||
24 | static inline void arch_reset(char mode) | 24 | void arch_reset(char mode); |
25 | { | ||
26 | if (cpu_is_pxa2xx()) | ||
27 | RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; | ||
28 | |||
29 | if (mode == 's') { | ||
30 | /* Jump into ROM at address 0 */ | ||
31 | cpu_reset(0); | ||
32 | } else { | ||
33 | /* Initialize the watchdog and let it fire */ | ||
34 | OWER = OWER_WME; | ||
35 | OSSR = OSSR_M3; | ||
36 | OSMR3 = OSCR + 368640; /* ... in 100 ms */ | ||
37 | } | ||
38 | } | ||
39 | |||
diff --git a/include/asm-arm/arch-pxa/tosa.h b/include/asm-arm/arch-pxa/tosa.h index c5b6fde6907c..a72803f0461b 100644 --- a/include/asm-arm/arch-pxa/tosa.h +++ b/include/asm-arm/arch-pxa/tosa.h | |||
@@ -25,21 +25,18 @@ | |||
25 | */ | 25 | */ |
26 | #define TOSA_SCOOP_GPIO_BASE NR_BUILTIN_GPIO | 26 | #define TOSA_SCOOP_GPIO_BASE NR_BUILTIN_GPIO |
27 | #define TOSA_SCOOP_PXA_VCORE1 SCOOP_GPCR_PA11 | 27 | #define TOSA_SCOOP_PXA_VCORE1 SCOOP_GPCR_PA11 |
28 | #define TOSA_SCOOP_TC6393_REST_IN SCOOP_GPCR_PA12 | 28 | #define TOSA_GPIO_TC6393XB_REST_IN (TOSA_SCOOP_GPIO_BASE + 1) |
29 | #define TOSA_GPIO_IR_POWERDWN (TOSA_SCOOP_GPIO_BASE + 2) | 29 | #define TOSA_GPIO_IR_POWERDWN (TOSA_SCOOP_GPIO_BASE + 2) |
30 | #define TOSA_GPIO_SD_WP (TOSA_SCOOP_GPIO_BASE + 3) | 30 | #define TOSA_GPIO_SD_WP (TOSA_SCOOP_GPIO_BASE + 3) |
31 | #define TOSA_GPIO_PWR_ON (TOSA_SCOOP_GPIO_BASE + 4) | 31 | #define TOSA_GPIO_PWR_ON (TOSA_SCOOP_GPIO_BASE + 4) |
32 | #define TOSA_SCOOP_AUD_PWR_ON SCOOP_GPCR_PA16 | 32 | #define TOSA_SCOOP_AUD_PWR_ON SCOOP_GPCR_PA16 |
33 | #define TOSA_SCOOP_BT_RESET SCOOP_GPCR_PA17 | 33 | #define TOSA_GPIO_BT_RESET (TOSA_SCOOP_GPIO_BASE + 6) |
34 | #define TOSA_SCOOP_BT_PWR_EN SCOOP_GPCR_PA18 | 34 | #define TOSA_GPIO_BT_PWR_EN (TOSA_SCOOP_GPIO_BASE + 7) |
35 | #define TOSA_SCOOP_AC_IN_OL SCOOP_GPCR_PA19 | 35 | #define TOSA_SCOOP_AC_IN_OL SCOOP_GPCR_PA19 |
36 | 36 | ||
37 | /* GPIO Direction 1 : output mode / 0:input mode */ | 37 | /* GPIO Direction 1 : output mode / 0:input mode */ |
38 | #define TOSA_SCOOP_IO_DIR ( TOSA_SCOOP_PXA_VCORE1 | TOSA_SCOOP_TC6393_REST_IN | \ | 38 | #define TOSA_SCOOP_IO_DIR (TOSA_SCOOP_PXA_VCORE1 | \ |
39 | TOSA_SCOOP_AUD_PWR_ON |\ | 39 | TOSA_SCOOP_AUD_PWR_ON) |
40 | TOSA_SCOOP_BT_RESET | TOSA_SCOOP_BT_PWR_EN ) | ||
41 | /* GPIO out put level when init 1: Hi */ | ||
42 | #define TOSA_SCOOP_IO_OUT ( TOSA_SCOOP_TC6393_REST_IN ) | ||
43 | 40 | ||
44 | /* | 41 | /* |
45 | * SCOOP2 jacket GPIOs | 42 | * SCOOP2 jacket GPIOs |
@@ -49,16 +46,34 @@ | |||
49 | #define TOSA_GPIO_NOTE_LED (TOSA_SCOOP_JC_GPIO_BASE + 1) | 46 | #define TOSA_GPIO_NOTE_LED (TOSA_SCOOP_JC_GPIO_BASE + 1) |
50 | #define TOSA_GPIO_CHRG_ERR_LED (TOSA_SCOOP_JC_GPIO_BASE + 2) | 47 | #define TOSA_GPIO_CHRG_ERR_LED (TOSA_SCOOP_JC_GPIO_BASE + 2) |
51 | #define TOSA_GPIO_USB_PULLUP (TOSA_SCOOP_JC_GPIO_BASE + 3) | 48 | #define TOSA_GPIO_USB_PULLUP (TOSA_SCOOP_JC_GPIO_BASE + 3) |
52 | #define TOSA_SCOOP_JC_TC6393_SUSPEND SCOOP_GPCR_PA15 | 49 | #define TOSA_GPIO_TC6393XB_SUSPEND (TOSA_SCOOP_JC_GPIO_BASE + 4) |
53 | #define TOSA_SCOOP_JC_TC3693_L3V_ON SCOOP_GPCR_PA16 | 50 | #define TOSA_GPIO_TC6393XB_L3V_ON (TOSA_SCOOP_JC_GPIO_BASE + 5) |
54 | #define TOSA_SCOOP_JC_WLAN_DETECT SCOOP_GPCR_PA17 | 51 | #define TOSA_SCOOP_JC_WLAN_DETECT SCOOP_GPCR_PA17 |
55 | #define TOSA_GPIO_WLAN_LED (TOSA_SCOOP_JC_GPIO_BASE + 7) | 52 | #define TOSA_GPIO_WLAN_LED (TOSA_SCOOP_JC_GPIO_BASE + 7) |
56 | #define TOSA_SCOOP_JC_CARD_LIMIT_SEL SCOOP_GPCR_PA19 | 53 | #define TOSA_SCOOP_JC_CARD_LIMIT_SEL SCOOP_GPCR_PA19 |
57 | 54 | ||
58 | /* GPIO Direction 1 : output mode / 0:input mode */ | 55 | /* GPIO Direction 1 : output mode / 0:input mode */ |
59 | #define TOSA_SCOOP_JC_IO_DIR ( \ | 56 | #define TOSA_SCOOP_JC_IO_DIR (TOSA_SCOOP_JC_CARD_LIMIT_SEL) |
60 | TOSA_SCOOP_JC_TC6393_SUSPEND | TOSA_SCOOP_JC_TC3693_L3V_ON | \ | 57 | |
61 | TOSA_SCOOP_JC_CARD_LIMIT_SEL ) | 58 | /* |
59 | * TC6393XB GPIOs | ||
60 | */ | ||
61 | #define TOSA_TC6393XB_GPIO_BASE (NR_BUILTIN_GPIO + 2 * 12) | ||
62 | #define TOSA_TC6393XB_GPIO(i) (TOSA_TC6393XB_GPIO_BASE + (i)) | ||
63 | #define TOSA_TC6393XB_GPIO_BIT(gpio) (1 << (gpio - TOSA_TC6393XB_GPIO_BASE)) | ||
64 | |||
65 | #define TOSA_GPIO_TG_ON (TOSA_TC6393XB_GPIO_BASE + 0) | ||
66 | #define TOSA_GPIO_L_MUTE (TOSA_TC6393XB_GPIO_BASE + 1) | ||
67 | #define TOSA_GPIO_BL_C20MA (TOSA_TC6393XB_GPIO_BASE + 3) | ||
68 | #define TOSA_GPIO_CARD_VCC_ON (TOSA_TC6393XB_GPIO_BASE + 4) | ||
69 | #define TOSA_GPIO_CHARGE_OFF (TOSA_TC6393XB_GPIO_BASE + 6) | ||
70 | #define TOSA_GPIO_CHARGE_OFF_JC (TOSA_TC6393XB_GPIO_BASE + 7) | ||
71 | #define TOSA_GPIO_BAT0_V_ON (TOSA_TC6393XB_GPIO_BASE + 9) | ||
72 | #define TOSA_GPIO_BAT1_V_ON (TOSA_TC6393XB_GPIO_BASE + 10) | ||
73 | #define TOSA_GPIO_BU_CHRG_ON (TOSA_TC6393XB_GPIO_BASE + 11) | ||
74 | #define TOSA_GPIO_BAT_SW_ON (TOSA_TC6393XB_GPIO_BASE + 12) | ||
75 | #define TOSA_GPIO_BAT0_TH_ON (TOSA_TC6393XB_GPIO_BASE + 14) | ||
76 | #define TOSA_GPIO_BAT1_TH_ON (TOSA_TC6393XB_GPIO_BASE + 15) | ||
62 | 77 | ||
63 | /* | 78 | /* |
64 | * Timing Generator | 79 | * Timing Generator |
@@ -84,13 +99,13 @@ | |||
84 | #define TOSA_GPIO_JACKET_DETECT (7) | 99 | #define TOSA_GPIO_JACKET_DETECT (7) |
85 | #define TOSA_GPIO_nSD_DETECT (9) | 100 | #define TOSA_GPIO_nSD_DETECT (9) |
86 | #define TOSA_GPIO_nSD_INT (10) | 101 | #define TOSA_GPIO_nSD_INT (10) |
87 | #define TOSA_GPIO_TC6393_CLK (11) | 102 | #define TOSA_GPIO_TC6393XB_CLK (11) |
88 | #define TOSA_GPIO_BAT1_CRG (12) | 103 | #define TOSA_GPIO_BAT1_CRG (12) |
89 | #define TOSA_GPIO_CF_CD (13) | 104 | #define TOSA_GPIO_CF_CD (13) |
90 | #define TOSA_GPIO_BAT0_CRG (14) | 105 | #define TOSA_GPIO_BAT0_CRG (14) |
91 | #define TOSA_GPIO_TC6393_INT (15) | 106 | #define TOSA_GPIO_TC6393XB_INT (15) |
92 | #define TOSA_GPIO_BAT0_LOW (17) | 107 | #define TOSA_GPIO_BAT0_LOW (17) |
93 | #define TOSA_GPIO_TC6393_RDY (18) | 108 | #define TOSA_GPIO_TC6393XB_RDY (18) |
94 | #define TOSA_GPIO_ON_RESET (19) | 109 | #define TOSA_GPIO_ON_RESET (19) |
95 | #define TOSA_GPIO_EAR_IN (20) | 110 | #define TOSA_GPIO_EAR_IN (20) |
96 | #define TOSA_GPIO_CF_IRQ (21) /* CF slot0 Ready */ | 111 | #define TOSA_GPIO_CF_IRQ (21) /* CF slot0 Ready */ |
@@ -99,6 +114,7 @@ | |||
99 | #define TOSA_GPIO_TP_INT (32) /* Touch Panel pen down interrupt */ | 114 | #define TOSA_GPIO_TP_INT (32) /* Touch Panel pen down interrupt */ |
100 | #define TOSA_GPIO_JC_CF_IRQ (36) /* CF slot1 Ready */ | 115 | #define TOSA_GPIO_JC_CF_IRQ (36) /* CF slot1 Ready */ |
101 | #define TOSA_GPIO_BAT_LOCKED (38) /* Battery locked */ | 116 | #define TOSA_GPIO_BAT_LOCKED (38) /* Battery locked */ |
117 | #define TOSA_GPIO_IRDA_TX (47) | ||
102 | #define TOSA_GPIO_TG_SPI_SCLK (81) | 118 | #define TOSA_GPIO_TG_SPI_SCLK (81) |
103 | #define TOSA_GPIO_TG_SPI_CS (82) | 119 | #define TOSA_GPIO_TG_SPI_CS (82) |
104 | #define TOSA_GPIO_TG_SPI_MOSI (83) | 120 | #define TOSA_GPIO_TG_SPI_MOSI (83) |
@@ -137,7 +153,7 @@ | |||
137 | #define TOSA_IRQ_GPIO_BAT1_CRG IRQ_GPIO(TOSA_GPIO_BAT1_CRG) | 153 | #define TOSA_IRQ_GPIO_BAT1_CRG IRQ_GPIO(TOSA_GPIO_BAT1_CRG) |
138 | #define TOSA_IRQ_GPIO_CF_CD IRQ_GPIO(TOSA_GPIO_CF_CD) | 154 | #define TOSA_IRQ_GPIO_CF_CD IRQ_GPIO(TOSA_GPIO_CF_CD) |
139 | #define TOSA_IRQ_GPIO_BAT0_CRG IRQ_GPIO(TOSA_GPIO_BAT0_CRG) | 155 | #define TOSA_IRQ_GPIO_BAT0_CRG IRQ_GPIO(TOSA_GPIO_BAT0_CRG) |
140 | #define TOSA_IRQ_GPIO_TC6393_INT IRQ_GPIO(TOSA_GPIO_TC6393_INT) | 156 | #define TOSA_IRQ_GPIO_TC6393XB_INT IRQ_GPIO(TOSA_GPIO_TC6393XB_INT) |
141 | #define TOSA_IRQ_GPIO_BAT0_LOW IRQ_GPIO(TOSA_GPIO_BAT0_LOW) | 157 | #define TOSA_IRQ_GPIO_BAT0_LOW IRQ_GPIO(TOSA_GPIO_BAT0_LOW) |
142 | #define TOSA_IRQ_GPIO_EAR_IN IRQ_GPIO(TOSA_GPIO_EAR_IN) | 158 | #define TOSA_IRQ_GPIO_EAR_IN IRQ_GPIO(TOSA_GPIO_EAR_IN) |
143 | #define TOSA_IRQ_GPIO_CF_IRQ IRQ_GPIO(TOSA_GPIO_CF_IRQ) | 159 | #define TOSA_IRQ_GPIO_CF_IRQ IRQ_GPIO(TOSA_GPIO_CF_IRQ) |
diff --git a/include/asm-arm/arch-pxa/tosa_bt.h b/include/asm-arm/arch-pxa/tosa_bt.h new file mode 100644 index 000000000000..efc3c3d3b75d --- /dev/null +++ b/include/asm-arm/arch-pxa/tosa_bt.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * Tosa bluetooth built-in chip control. | ||
3 | * | ||
4 | * Later it may be shared with some other platforms. | ||
5 | * | ||
6 | * Copyright (c) 2008 Dmitry Baryshkov | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | #ifndef TOSA_BT_H | ||
14 | #define TOSA_BT_H | ||
15 | |||
16 | struct tosa_bt_data { | ||
17 | int gpio_pwr; | ||
18 | int gpio_reset; | ||
19 | }; | ||
20 | |||
21 | #endif | ||
22 | |||