diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 14:45:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 14:45:16 -0500 |
commit | 8287361abca36504da813638310d2547469283eb (patch) | |
tree | 8d98e9a910885efdb09ae5390a3ae44040557e2f /arch/arm/mach-omap2/display.c | |
parent | 2989950cea13711f0cc573c26cde8fe08a36be03 (diff) | |
parent | 8556650dd3370a927217f16444aac5cc0c71e61b (diff) |
Merge tag 'headers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC Header cleanups from Olof Johansson:
"This is a collection of header file cleanups, mostly for OMAP and
AT91, that keeps moving the platforms in the direction of
multiplatform by removing the need for mach-dependent header files
used in drivers and other places."
Fix up mostly trivial conflicts as per Olof.
* tag 'headers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (106 commits)
ARM: OMAP2+: Move iommu/iovmm headers to platform_data
ARM: OMAP2+: Make some definitions local
ARM: OMAP2+: Move iommu2 to drivers/iommu/omap-iommu2.c
ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
ARM: OMAP2+: Move iopgtable header to drivers/iommu/
ARM: OMAP: Merge iommu2.h into iommu.h
atmel: move ATMEL_MAX_UART to platform_data/atmel.h
ARM: OMAP: Remove omap_init_consistent_dma_size()
arm: at91: move at91rm9200 rtc header in drivers/rtc
arm: at91: move reset controller header to arm/arm/mach-at91
arm: at91: move pit define to the driver
arm: at91: move at91_shdwc.h to arch/arm/mach-at91
arm: at91: move board header to arch/arm/mach-at91
arn: at91: move at91_tc.h to arch/arm/mach-at91
arm: at91 move at91_aic.h to arch/arm/mach-at91
arm: at91 move board.h to arch/arm/mach-at91
arm: at91: move platfarm_data to include/linux/platform_data/atmel.h
arm: at91: drop machine defconfig
ARM: OMAP: Remove NEED_MACH_GPIO_H
ARM: OMAP: Remove unnecessary mach and plat includes
...
Diffstat (limited to 'arch/arm/mach-omap2/display.c')
-rw-r--r-- | arch/arm/mach-omap2/display.c | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index 1011995f150a..89c57129357a 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c | |||
@@ -25,11 +25,12 @@ | |||
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | 26 | ||
27 | #include <video/omapdss.h> | 27 | #include <video/omapdss.h> |
28 | #include <plat/omap_hwmod.h> | 28 | #include "omap_hwmod.h" |
29 | #include <plat/omap_device.h> | 29 | #include "omap_device.h" |
30 | #include <plat/omap-pm.h> | 30 | #include "omap-pm.h" |
31 | #include "common.h" | 31 | #include "common.h" |
32 | 32 | ||
33 | #include "soc.h" | ||
33 | #include "iomap.h" | 34 | #include "iomap.h" |
34 | #include "mux.h" | 35 | #include "mux.h" |
35 | #include "control.h" | 36 | #include "control.h" |
@@ -284,6 +285,35 @@ err: | |||
284 | return ERR_PTR(r); | 285 | return ERR_PTR(r); |
285 | } | 286 | } |
286 | 287 | ||
288 | static enum omapdss_version __init omap_display_get_version(void) | ||
289 | { | ||
290 | if (cpu_is_omap24xx()) | ||
291 | return OMAPDSS_VER_OMAP24xx; | ||
292 | else if (cpu_is_omap3630()) | ||
293 | return OMAPDSS_VER_OMAP3630; | ||
294 | else if (cpu_is_omap34xx()) { | ||
295 | if (soc_is_am35xx()) { | ||
296 | return OMAPDSS_VER_AM35xx; | ||
297 | } else { | ||
298 | if (omap_rev() < OMAP3430_REV_ES3_0) | ||
299 | return OMAPDSS_VER_OMAP34xx_ES1; | ||
300 | else | ||
301 | return OMAPDSS_VER_OMAP34xx_ES3; | ||
302 | } | ||
303 | } else if (omap_rev() == OMAP4430_REV_ES1_0) | ||
304 | return OMAPDSS_VER_OMAP4430_ES1; | ||
305 | else if (omap_rev() == OMAP4430_REV_ES2_0 || | ||
306 | omap_rev() == OMAP4430_REV_ES2_1 || | ||
307 | omap_rev() == OMAP4430_REV_ES2_2) | ||
308 | return OMAPDSS_VER_OMAP4430_ES2; | ||
309 | else if (cpu_is_omap44xx()) | ||
310 | return OMAPDSS_VER_OMAP4; | ||
311 | else if (soc_is_omap54xx()) | ||
312 | return OMAPDSS_VER_OMAP5; | ||
313 | else | ||
314 | return OMAPDSS_VER_UNKNOWN; | ||
315 | } | ||
316 | |||
287 | int __init omap_display_init(struct omap_dss_board_info *board_data) | 317 | int __init omap_display_init(struct omap_dss_board_info *board_data) |
288 | { | 318 | { |
289 | int r = 0; | 319 | int r = 0; |
@@ -291,9 +321,18 @@ int __init omap_display_init(struct omap_dss_board_info *board_data) | |||
291 | int i, oh_count; | 321 | int i, oh_count; |
292 | const struct omap_dss_hwmod_data *curr_dss_hwmod; | 322 | const struct omap_dss_hwmod_data *curr_dss_hwmod; |
293 | struct platform_device *dss_pdev; | 323 | struct platform_device *dss_pdev; |
324 | enum omapdss_version ver; | ||
294 | 325 | ||
295 | /* create omapdss device */ | 326 | /* create omapdss device */ |
296 | 327 | ||
328 | ver = omap_display_get_version(); | ||
329 | |||
330 | if (ver == OMAPDSS_VER_UNKNOWN) { | ||
331 | pr_err("DSS not supported on this SoC\n"); | ||
332 | return -ENODEV; | ||
333 | } | ||
334 | |||
335 | board_data->version = ver; | ||
297 | board_data->dsi_enable_pads = omap_dsi_enable_pads; | 336 | board_data->dsi_enable_pads = omap_dsi_enable_pads; |
298 | board_data->dsi_disable_pads = omap_dsi_disable_pads; | 337 | board_data->dsi_disable_pads = omap_dsi_disable_pads; |
299 | board_data->get_context_loss_count = omap_pm_get_dev_context_loss_count; | 338 | board_data->get_context_loss_count = omap_pm_get_dev_context_loss_count; |