diff options
Diffstat (limited to 'arch/mips/alchemy/devboards/db1x00/platform.c')
-rw-r--r-- | arch/mips/alchemy/devboards/db1x00/platform.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/mips/alchemy/devboards/db1x00/platform.c b/arch/mips/alchemy/devboards/db1x00/platform.c index 990367f8401d..8704865306a5 100644 --- a/arch/mips/alchemy/devboards/db1x00/platform.c +++ b/arch/mips/alchemy/devboards/db1x00/platform.c | |||
@@ -19,6 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/dma-mapping.h> | ||
22 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
23 | 24 | ||
24 | #include <asm/mach-au1x00/au1000.h> | 25 | #include <asm/mach-au1x00/au1000.h> |
@@ -208,6 +209,34 @@ static int __init db15x0_pci_init(void) | |||
208 | arch_initcall(db15x0_pci_init); | 209 | arch_initcall(db15x0_pci_init); |
209 | #endif | 210 | #endif |
210 | 211 | ||
212 | #ifdef CONFIG_MIPS_DB1100 | ||
213 | static struct resource au1100_lcd_resources[] = { | ||
214 | [0] = { | ||
215 | .start = AU1100_LCD_PHYS_ADDR, | ||
216 | .end = AU1100_LCD_PHYS_ADDR + 0x800 - 1, | ||
217 | .flags = IORESOURCE_MEM, | ||
218 | }, | ||
219 | [1] = { | ||
220 | .start = AU1100_LCD_INT, | ||
221 | .end = AU1100_LCD_INT, | ||
222 | .flags = IORESOURCE_IRQ, | ||
223 | } | ||
224 | }; | ||
225 | |||
226 | static u64 au1100_lcd_dmamask = DMA_BIT_MASK(32); | ||
227 | |||
228 | static struct platform_device au1100_lcd_device = { | ||
229 | .name = "au1100-lcd", | ||
230 | .id = 0, | ||
231 | .dev = { | ||
232 | .dma_mask = &au1100_lcd_dmamask, | ||
233 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
234 | }, | ||
235 | .num_resources = ARRAY_SIZE(au1100_lcd_resources), | ||
236 | .resource = au1100_lcd_resources, | ||
237 | }; | ||
238 | #endif | ||
239 | |||
211 | static int __init db1xxx_dev_init(void) | 240 | static int __init db1xxx_dev_init(void) |
212 | { | 241 | { |
213 | #ifdef DB1XXX_HAS_PCMCIA | 242 | #ifdef DB1XXX_HAS_PCMCIA |
@@ -231,6 +260,9 @@ static int __init db1xxx_dev_init(void) | |||
231 | DB1XXX_PCMCIA_CARD1, DB1XXX_PCMCIA_CD1, | 260 | DB1XXX_PCMCIA_CARD1, DB1XXX_PCMCIA_CD1, |
232 | /*DB1XXX_PCMCIA_STSCHG1*/0, 0, 1); | 261 | /*DB1XXX_PCMCIA_STSCHG1*/0, 0, 1); |
233 | #endif | 262 | #endif |
263 | #ifdef CONFIG_MIPS_DB1100 | ||
264 | platform_device_register(&au1100_lcd_device); | ||
265 | #endif | ||
234 | db1x_register_norflash(BOARD_FLASH_SIZE, BOARD_FLASH_WIDTH, F_SWAPPED); | 266 | db1x_register_norflash(BOARD_FLASH_SIZE, BOARD_FLASH_WIDTH, F_SWAPPED); |
235 | return 0; | 267 | return 0; |
236 | } | 268 | } |