|
25 | 25 |
|
26 | 26 | ACPI_MODULE_NAME("acpi_lpss"); |
27 | 27 |
|
| 28 | +#ifdef CONFIG_X86_INTEL_LPSS |
| 29 | + |
| 30 | +#define LPSS_ADDR(desc) ((unsigned long)&desc) |
| 31 | + |
28 | 32 | #define LPSS_CLK_SIZE 0x04 |
29 | 33 | #define LPSS_LTR_SIZE 0x18 |
30 | 34 |
|
@@ -169,40 +173,48 @@ static struct lpss_device_desc byt_i2c_dev_desc = { |
169 | 173 | .shared_clock = &i2c_clock, |
170 | 174 | }; |
171 | 175 |
|
| 176 | +#else |
| 177 | + |
| 178 | +#define LPSS_ADDR(desc) (0UL) |
| 179 | + |
| 180 | +#endif /* CONFIG_X86_INTEL_LPSS */ |
| 181 | + |
172 | 182 | static const struct acpi_device_id acpi_lpss_device_ids[] = { |
173 | 183 | /* Generic LPSS devices */ |
174 | | - { "INTL9C60", (unsigned long)&lpss_dma_desc }, |
| 184 | + { "INTL9C60", LPSS_ADDR(lpss_dma_desc) }, |
175 | 185 |
|
176 | 186 | /* Lynxpoint LPSS devices */ |
177 | | - { "INT33C0", (unsigned long)&lpt_dev_desc }, |
178 | | - { "INT33C1", (unsigned long)&lpt_dev_desc }, |
179 | | - { "INT33C2", (unsigned long)&lpt_i2c_dev_desc }, |
180 | | - { "INT33C3", (unsigned long)&lpt_i2c_dev_desc }, |
181 | | - { "INT33C4", (unsigned long)&lpt_uart_dev_desc }, |
182 | | - { "INT33C5", (unsigned long)&lpt_uart_dev_desc }, |
183 | | - { "INT33C6", (unsigned long)&lpt_sdio_dev_desc }, |
| 187 | + { "INT33C0", LPSS_ADDR(lpt_dev_desc) }, |
| 188 | + { "INT33C1", LPSS_ADDR(lpt_dev_desc) }, |
| 189 | + { "INT33C2", LPSS_ADDR(lpt_i2c_dev_desc) }, |
| 190 | + { "INT33C3", LPSS_ADDR(lpt_i2c_dev_desc) }, |
| 191 | + { "INT33C4", LPSS_ADDR(lpt_uart_dev_desc) }, |
| 192 | + { "INT33C5", LPSS_ADDR(lpt_uart_dev_desc) }, |
| 193 | + { "INT33C6", LPSS_ADDR(lpt_sdio_dev_desc) }, |
184 | 194 | { "INT33C7", }, |
185 | 195 |
|
186 | 196 | /* BayTrail LPSS devices */ |
187 | | - { "80860F09", (unsigned long)&byt_pwm_dev_desc }, |
188 | | - { "80860F0A", (unsigned long)&byt_uart_dev_desc }, |
189 | | - { "80860F0E", (unsigned long)&byt_spi_dev_desc }, |
190 | | - { "80860F14", (unsigned long)&byt_sdio_dev_desc }, |
191 | | - { "80860F41", (unsigned long)&byt_i2c_dev_desc }, |
| 197 | + { "80860F09", LPSS_ADDR(byt_pwm_dev_desc) }, |
| 198 | + { "80860F0A", LPSS_ADDR(byt_uart_dev_desc) }, |
| 199 | + { "80860F0E", LPSS_ADDR(byt_spi_dev_desc) }, |
| 200 | + { "80860F14", LPSS_ADDR(byt_sdio_dev_desc) }, |
| 201 | + { "80860F41", LPSS_ADDR(byt_i2c_dev_desc) }, |
192 | 202 | { "INT33B2", }, |
193 | 203 |
|
194 | | - { "INT3430", (unsigned long)&lpt_dev_desc }, |
195 | | - { "INT3431", (unsigned long)&lpt_dev_desc }, |
196 | | - { "INT3432", (unsigned long)&lpt_i2c_dev_desc }, |
197 | | - { "INT3433", (unsigned long)&lpt_i2c_dev_desc }, |
198 | | - { "INT3434", (unsigned long)&lpt_uart_dev_desc }, |
199 | | - { "INT3435", (unsigned long)&lpt_uart_dev_desc }, |
200 | | - { "INT3436", (unsigned long)&lpt_sdio_dev_desc }, |
| 204 | + { "INT3430", LPSS_ADDR(lpt_dev_desc) }, |
| 205 | + { "INT3431", LPSS_ADDR(lpt_dev_desc) }, |
| 206 | + { "INT3432", LPSS_ADDR(lpt_i2c_dev_desc) }, |
| 207 | + { "INT3433", LPSS_ADDR(lpt_i2c_dev_desc) }, |
| 208 | + { "INT3434", LPSS_ADDR(lpt_uart_dev_desc) }, |
| 209 | + { "INT3435", LPSS_ADDR(lpt_uart_dev_desc) }, |
| 210 | + { "INT3436", LPSS_ADDR(lpt_sdio_dev_desc) }, |
201 | 211 | { "INT3437", }, |
202 | 212 |
|
203 | 213 | { } |
204 | 214 | }; |
205 | 215 |
|
| 216 | +#ifdef CONFIG_X86_INTEL_LPSS |
| 217 | + |
206 | 218 | static int is_memory(struct acpi_resource *res, void *not_used) |
207 | 219 | { |
208 | 220 | struct resource r; |
@@ -695,3 +707,16 @@ void __init acpi_lpss_init(void) |
695 | 707 | acpi_scan_add_handler(&lpss_handler); |
696 | 708 | } |
697 | 709 | } |
| 710 | + |
| 711 | +#else |
| 712 | + |
| 713 | +static struct acpi_scan_handler lpss_handler = { |
| 714 | + .ids = acpi_lpss_device_ids, |
| 715 | +}; |
| 716 | + |
| 717 | +void __init acpi_lpss_init(void) |
| 718 | +{ |
| 719 | + acpi_scan_add_handler(&lpss_handler); |
| 720 | +} |
| 721 | + |
| 722 | +#endif /* CONFIG_X86_INTEL_LPSS */ |
0 commit comments