diff options
author | Wang Dongsheng <dongsheng.wang@freescale.com> | 2015-04-30 10:39:11 (GMT) |
---|---|---|
committer | Honghua Yin <Hong-Hua.Yin@freescale.com> | 2015-05-04 02:12:40 (GMT) |
commit | 4aee35eb819f556d9a0ebbe47f69052951612e92 (patch) | |
tree | e02c5c1bbb0fb5bbd11e0f932b92c9c9d7ac1692 /arch | |
parent | 62f235b427813b031176be5db848cad3ef7df019 (diff) | |
download | linux-fsl-qoriq-4aee35eb819f556d9a0ebbe47f69052951612e92.tar.xz |
powerpc/t1042d4rdb: add DIU support in kernel
Add DIU support for T1042d4rdb board. DIU platform code has supported
in kernel, this patch just add DT node check for T1042d4rdb.
Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
Change-Id: I2b524265ea3009961da445820193788d0c82e19e
Reviewed-on: http://git.am.freescale.net:8181/35832
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Chenhui Zhao <chenhui.zhao@freescale.com>
Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/85xx/corenet_diu.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/85xx/corenet_diu.c b/arch/powerpc/platforms/85xx/corenet_diu.c index cb5a512..28e3243 100644 --- a/arch/powerpc/platforms/85xx/corenet_diu.c +++ b/arch/powerpc/platforms/85xx/corenet_diu.c @@ -30,6 +30,16 @@ #define CPLD_DIUCSR_DVIEN 0x80 #define CPLD_DIUCSR_BACKLIGHT 0x0f +static const struct of_device_id corenet_cpld_matches[] = { + { + .compatible = "fsl,t104xrdb-cpld", + }, + { + .compatible = "fsl,t1040d4rdb-cpld", + }, + {}, +}; + /** * t1042rdb_set_monitor_port: switch the output to a different monitor port */ @@ -38,7 +48,8 @@ static void t1042rdb_set_monitor_port(enum fsl_diu_monitor_port port) struct device_node *cpld_node; static void __iomem *cpld_base; - cpld_node = of_find_compatible_node(NULL, NULL, "fsl,t104xrdb-cpld"); + cpld_node = of_find_matching_node_and_match(NULL, corenet_cpld_matches, + NULL); if (!cpld_node) { pr_err("%s: Missing CPLD node\n", __func__); return; @@ -240,6 +251,16 @@ static void t1024qds_diu_init(void) diu_ops.valid_monitor_port = corenet_valid_monitor_port; } +static const struct of_device_id corenet_board_matches[] = { + { + .compatible = "fsl,T1042RDB_PI", + }, + { + .compatible = "fsl,T1042D4RDB", + }, + {}, +}; + static int __init corenet_diu_init(void) { struct device_node *np; @@ -248,10 +269,13 @@ static int __init corenet_diu_init(void) if (!np) return 0; - /* T1042RDB_PI board */ - if (of_find_compatible_node(NULL, NULL, "fsl,T1042RDB_PI")) + if (of_find_matching_node_and_match(NULL, corenet_board_matches, + NULL)) { t1042rdb_diu_init(); + return 0; + } + /* T1024QDS board */ if (of_find_compatible_node(NULL, NULL, "fsl,T1024QDS")) t1024qds_diu_init(); |