diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9g45_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45_devices.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index 410829532aab..4320b2096789 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -1052,7 +1052,7 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) {} | |||
1052 | static struct resource tcb0_resources[] = { | 1052 | static struct resource tcb0_resources[] = { |
1053 | [0] = { | 1053 | [0] = { |
1054 | .start = AT91SAM9G45_BASE_TCB0, | 1054 | .start = AT91SAM9G45_BASE_TCB0, |
1055 | .end = AT91SAM9G45_BASE_TCB0 + SZ_16K - 1, | 1055 | .end = AT91SAM9G45_BASE_TCB0 + SZ_256 - 1, |
1056 | .flags = IORESOURCE_MEM, | 1056 | .flags = IORESOURCE_MEM, |
1057 | }, | 1057 | }, |
1058 | [1] = { | 1058 | [1] = { |
@@ -1073,7 +1073,7 @@ static struct platform_device at91sam9g45_tcb0_device = { | |||
1073 | static struct resource tcb1_resources[] = { | 1073 | static struct resource tcb1_resources[] = { |
1074 | [0] = { | 1074 | [0] = { |
1075 | .start = AT91SAM9G45_BASE_TCB1, | 1075 | .start = AT91SAM9G45_BASE_TCB1, |
1076 | .end = AT91SAM9G45_BASE_TCB1 + SZ_16K - 1, | 1076 | .end = AT91SAM9G45_BASE_TCB1 + SZ_256 - 1, |
1077 | .flags = IORESOURCE_MEM, | 1077 | .flags = IORESOURCE_MEM, |
1078 | }, | 1078 | }, |
1079 | [1] = { | 1079 | [1] = { |
@@ -1090,8 +1090,25 @@ static struct platform_device at91sam9g45_tcb1_device = { | |||
1090 | .num_resources = ARRAY_SIZE(tcb1_resources), | 1090 | .num_resources = ARRAY_SIZE(tcb1_resources), |
1091 | }; | 1091 | }; |
1092 | 1092 | ||
1093 | #if defined(CONFIG_OF) | ||
1094 | static struct of_device_id tcb_ids[] = { | ||
1095 | { .compatible = "atmel,at91rm9200-tcb" }, | ||
1096 | { /*sentinel*/ } | ||
1097 | }; | ||
1098 | #endif | ||
1099 | |||
1093 | static void __init at91_add_device_tc(void) | 1100 | static void __init at91_add_device_tc(void) |
1094 | { | 1101 | { |
1102 | #if defined(CONFIG_OF) | ||
1103 | struct device_node *np; | ||
1104 | |||
1105 | np = of_find_matching_node(NULL, tcb_ids); | ||
1106 | if (np) { | ||
1107 | of_node_put(np); | ||
1108 | return; | ||
1109 | } | ||
1110 | #endif | ||
1111 | |||
1095 | platform_device_register(&at91sam9g45_tcb0_device); | 1112 | platform_device_register(&at91sam9g45_tcb0_device); |
1096 | platform_device_register(&at91sam9g45_tcb1_device); | 1113 | platform_device_register(&at91sam9g45_tcb1_device); |
1097 | } | 1114 | } |