Sascha Hauer | 2e8fd69 | 2011-01-14 15:32:49 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify it under |
| 5 | * the terms of the GNU General Public License version 2 as published by the |
| 6 | * Free Software Foundation. |
| 7 | */ |
Axel Lin | b9b6586 | 2011-06-30 21:35:03 +0800 | [diff] [blame] | 8 | #include <linux/dma-mapping.h> |
Sascha Hauer | 2e8fd69 | 2011-01-14 15:32:49 +0100 | [diff] [blame] | 9 | #include <asm/sizes.h> |
| 10 | #include <mach/mx23.h> |
| 11 | #include <mach/mx28.h> |
| 12 | #include <mach/devices-common.h> |
Shawn Guo | ce4409b | 2012-06-25 19:22:09 +0800 | [diff] [blame^] | 13 | #include <linux/mxsfb.h> |
Sascha Hauer | 2e8fd69 | 2011-01-14 15:32:49 +0100 | [diff] [blame] | 14 | |
| 15 | #ifdef CONFIG_SOC_IMX23 |
| 16 | struct platform_device *__init mx23_add_mxsfb( |
| 17 | const struct mxsfb_platform_data *pdata) |
| 18 | { |
| 19 | struct resource res[] = { |
| 20 | { |
| 21 | .start = MX23_LCDIF_BASE_ADDR, |
| 22 | .end = MX23_LCDIF_BASE_ADDR + SZ_8K - 1, |
| 23 | .flags = IORESOURCE_MEM, |
| 24 | }, |
| 25 | }; |
| 26 | |
| 27 | return mxs_add_platform_device_dmamask("imx23-fb", -1, |
| 28 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32)); |
| 29 | } |
| 30 | #endif /* ifdef CONFIG_SOC_IMX23 */ |
| 31 | |
| 32 | #ifdef CONFIG_SOC_IMX28 |
| 33 | struct platform_device *__init mx28_add_mxsfb( |
| 34 | const struct mxsfb_platform_data *pdata) |
| 35 | { |
| 36 | struct resource res[] = { |
| 37 | { |
| 38 | .start = MX28_LCDIF_BASE_ADDR, |
| 39 | .end = MX28_LCDIF_BASE_ADDR + SZ_8K - 1, |
| 40 | .flags = IORESOURCE_MEM, |
| 41 | }, |
| 42 | }; |
| 43 | |
| 44 | return mxs_add_platform_device_dmamask("imx28-fb", -1, |
| 45 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32)); |
| 46 | } |
| 47 | #endif /* ifdef CONFIG_SOC_IMX28 */ |