aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-02-15 08:24:46 -0500
committerNicolas Ferre <nicolas.ferre@atmel.com>2012-02-23 08:57:58 -0500
commitb3af8b49befdcc53cb5d89e57662c359bc0b6989 (patch)
tree7c53b06733ae3f00a4971b0a3e7f4deee83169d1 /arch
parent4e9267f1b42b4f7b66214161b55f1f73365692cd (diff)
ARM: at91/rtc-at91sam9: pass the GPBR to use via resources
The GPBR registers are used for storing RTC values. The GPBR registers to use are now provided using standard resource entry. The array is filled in SoC specific code. rtc-at91sam9 RTT as RTC driver is modified to retrieve this information. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> [nicolas.ferre@atmel.com: rework resources assignment] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c19
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c17
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c30
-rw-r--r--arch/arm/mach-at91/at91sam9g45_devices.c17
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c17
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9260.h5
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9261.h5
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9263.h5
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9g45.h5
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9rl.h2
10 files changed, 95 insertions, 27 deletions
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 2071017a475a..34d2f5a58b4b 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -718,14 +718,15 @@ static struct resource rtt_resources[] = {
718 .start = AT91SAM9260_BASE_RTT, 718 .start = AT91SAM9260_BASE_RTT,
719 .end = AT91SAM9260_BASE_RTT + SZ_16 - 1, 719 .end = AT91SAM9260_BASE_RTT + SZ_16 - 1,
720 .flags = IORESOURCE_MEM, 720 .flags = IORESOURCE_MEM,
721 } 721 }, {
722 .flags = IORESOURCE_MEM,
723 },
722}; 724};
723 725
724static struct platform_device at91sam9260_rtt_device = { 726static struct platform_device at91sam9260_rtt_device = {
725 .name = "at91_rtt", 727 .name = "at91_rtt",
726 .id = 0, 728 .id = 0,
727 .resource = rtt_resources, 729 .resource = rtt_resources,
728 .num_resources = ARRAY_SIZE(rtt_resources),
729}; 730};
730 731
731 732
@@ -733,9 +734,21 @@ static struct platform_device at91sam9260_rtt_device = {
733static void __init at91_add_device_rtt_rtc(void) 734static void __init at91_add_device_rtt_rtc(void)
734{ 735{
735 at91sam9260_rtt_device.name = "rtc-at91sam9"; 736 at91sam9260_rtt_device.name = "rtc-at91sam9";
737 /*
738 * The second resource is needed:
739 * GPBR will serve as the storage for RTC time offset
740 */
741 at91sam9260_rtt_device.num_resources = 2;
742 rtt_resources[1].start = AT91SAM9260_BASE_GPBR +
743 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR;
744 rtt_resources[1].end = rtt_resources[1].start + 3;
736} 745}
737#else 746#else
738static void __init at91_add_device_rtt_rtc(void) {} 747static void __init at91_add_device_rtt_rtc(void)
748{
749 /* Only one resource is needed: RTT not used as RTC */
750 at91sam9260_rtt_device.num_resources = 1;
751}
739#endif 752#endif
740 753
741static void __init at91_add_device_rtt(void) 754static void __init at91_add_device_rtt(void)
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index b3ceb97d722d..b9c06c408aba 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -604,6 +604,8 @@ static struct resource rtt_resources[] = {
604 .start = AT91SAM9261_BASE_RTT, 604 .start = AT91SAM9261_BASE_RTT,
605 .end = AT91SAM9261_BASE_RTT + SZ_16 - 1, 605 .end = AT91SAM9261_BASE_RTT + SZ_16 - 1,
606 .flags = IORESOURCE_MEM, 606 .flags = IORESOURCE_MEM,
607 }, {
608 .flags = IORESOURCE_MEM,
607 } 609 }
608}; 610};
609 611
@@ -611,16 +613,27 @@ static struct platform_device at91sam9261_rtt_device = {
611 .name = "at91_rtt", 613 .name = "at91_rtt",
612 .id = 0, 614 .id = 0,
613 .resource = rtt_resources, 615 .resource = rtt_resources,
614 .num_resources = ARRAY_SIZE(rtt_resources),
615}; 616};
616 617
617#if IS_ENABLED(CONFIG_RTC_DRV_AT91SAM9) 618#if IS_ENABLED(CONFIG_RTC_DRV_AT91SAM9)
618static void __init at91_add_device_rtt_rtc(void) 619static void __init at91_add_device_rtt_rtc(void)
619{ 620{
620 at91sam9261_rtt_device.name = "rtc-at91sam9"; 621 at91sam9261_rtt_device.name = "rtc-at91sam9";
622 /*
623 * The second resource is needed:
624 * GPBR will serve as the storage for RTC time offset
625 */
626 at91sam9261_rtt_device.num_resources = 2;
627 rtt_resources[1].start = AT91SAM9261_BASE_GPBR +
628 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR;
629 rtt_resources[1].end = rtt_resources[1].start + 3;
621} 630}
622#else 631#else
623static void __init at91_add_device_rtt_rtc(void) {} 632static void __init at91_add_device_rtt_rtc(void)
633{
634 /* Only one resource is needed: RTT not used as RTC */
635 at91sam9261_rtt_device.num_resources = 1;
636}
624#endif 637#endif
625 638
626static void __init at91_add_device_rtt(void) 639static void __init at91_add_device_rtt(void)
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index b4a6adb39b22..a8ae6f507eed 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -967,6 +967,8 @@ static struct resource rtt0_resources[] = {
967 .start = AT91SAM9263_BASE_RTT0, 967 .start = AT91SAM9263_BASE_RTT0,
968 .end = AT91SAM9263_BASE_RTT0 + SZ_16 - 1, 968 .end = AT91SAM9263_BASE_RTT0 + SZ_16 - 1,
969 .flags = IORESOURCE_MEM, 969 .flags = IORESOURCE_MEM,
970 }, {
971 .flags = IORESOURCE_MEM,
970 } 972 }
971}; 973};
972 974
@@ -974,7 +976,6 @@ static struct platform_device at91sam9263_rtt0_device = {
974 .name = "at91_rtt", 976 .name = "at91_rtt",
975 .id = 0, 977 .id = 0,
976 .resource = rtt0_resources, 978 .resource = rtt0_resources,
977 .num_resources = ARRAY_SIZE(rtt0_resources),
978}; 979};
979 980
980static struct resource rtt1_resources[] = { 981static struct resource rtt1_resources[] = {
@@ -982,6 +983,8 @@ static struct resource rtt1_resources[] = {
982 .start = AT91SAM9263_BASE_RTT1, 983 .start = AT91SAM9263_BASE_RTT1,
983 .end = AT91SAM9263_BASE_RTT1 + SZ_16 - 1, 984 .end = AT91SAM9263_BASE_RTT1 + SZ_16 - 1,
984 .flags = IORESOURCE_MEM, 985 .flags = IORESOURCE_MEM,
986 }, {
987 .flags = IORESOURCE_MEM,
985 } 988 }
986}; 989};
987 990
@@ -989,31 +992,48 @@ static struct platform_device at91sam9263_rtt1_device = {
989 .name = "at91_rtt", 992 .name = "at91_rtt",
990 .id = 1, 993 .id = 1,
991 .resource = rtt1_resources, 994 .resource = rtt1_resources,
992 .num_resources = ARRAY_SIZE(rtt1_resources),
993}; 995};
994 996
995#if IS_ENABLED(CONFIG_RTC_DRV_AT91SAM9) 997#if IS_ENABLED(CONFIG_RTC_DRV_AT91SAM9)
996static void __init at91_add_device_rtt_rtc(void) 998static void __init at91_add_device_rtt_rtc(void)
997{ 999{
998 struct platform_device *pdev; 1000 struct platform_device *pdev;
1001 struct resource *r;
999 1002
1000 switch (CONFIG_RTC_DRV_AT91SAM9_RTT) { 1003 switch (CONFIG_RTC_DRV_AT91SAM9_RTT) {
1001 case 0: 1004 case 0:
1005 /*
1006 * The second resource is needed only for the chosen RTT:
1007 * GPBR will serve as the storage for RTC time offset
1008 */
1009 at91sam9263_rtt0_device.num_resources = 2;
1010 at91sam9263_rtt1_device.num_resources = 1;
1002 pdev = &at91sam9263_rtt0_device; 1011 pdev = &at91sam9263_rtt0_device;
1012 r = rtt0_resources;
1003 break; 1013 break;
1004 case 1: 1014 case 1:
1015 at91sam9263_rtt0_device.num_resources = 1;
1016 at91sam9263_rtt1_device.num_resources = 2;
1005 pdev = &at91sam9263_rtt1_device; 1017 pdev = &at91sam9263_rtt1_device;
1018 r = rtt1_resources;
1006 break; 1019 break;
1007 default: 1020 default:
1008 pr_err("at91sam9263: support only 2 RTT (%d)\n", 1021 pr_err("at91sam9263: only supports 2 RTT (%d)\n",
1009 CONFIG_RTC_DRV_AT91SAM9_RTT); 1022 CONFIG_RTC_DRV_AT91SAM9_RTT);
1010 return; 1023 return;
1011 } 1024 }
1012 1025
1013 pdev->name = "rtc-at91sam9"; 1026 pdev->name = "rtc-at91sam9";
1027 r[1].start = AT91SAM9263_BASE_GPBR + 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR;
1028 r[1].end = r[1].start + 3;
1014} 1029}
1015#else 1030#else
1016static void __init at91_add_device_rtt_rtc(void) {} 1031static void __init at91_add_device_rtt_rtc(void)
1032{
1033 /* Only one resource is needed: RTT not used as RTC */
1034 at91sam9263_rtt0_device.num_resources = 1;
1035 at91sam9263_rtt1_device.num_resources = 1;
1036}
1017#endif 1037#endif
1018 1038
1019static void __init at91_add_device_rtt(void) 1039static void __init at91_add_device_rtt(void)
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index 81d1adf1d978..98e40418fda1 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -1194,6 +1194,8 @@ static struct resource rtt_resources[] = {
1194 .start = AT91SAM9G45_BASE_RTT, 1194 .start = AT91SAM9G45_BASE_RTT,
1195 .end = AT91SAM9G45_BASE_RTT + SZ_16 - 1, 1195 .end = AT91SAM9G45_BASE_RTT + SZ_16 - 1,
1196 .flags = IORESOURCE_MEM, 1196 .flags = IORESOURCE_MEM,
1197 }, {
1198 .flags = IORESOURCE_MEM,
1197 } 1199 }
1198}; 1200};
1199 1201
@@ -1201,16 +1203,27 @@ static struct platform_device at91sam9g45_rtt_device = {
1201 .name = "at91_rtt", 1203 .name = "at91_rtt",
1202 .id = 0, 1204 .id = 0,
1203 .resource = rtt_resources, 1205 .resource = rtt_resources,
1204 .num_resources = ARRAY_SIZE(rtt_resources),
1205}; 1206};
1206 1207
1207#if IS_ENABLED(CONFIG_RTC_DRV_AT91SAM9) 1208#if IS_ENABLED(CONFIG_RTC_DRV_AT91SAM9)
1208static void __init at91_add_device_rtt_rtc(void) 1209static void __init at91_add_device_rtt_rtc(void)
1209{ 1210{
1210 at91sam9g45_rtt_device.name = "rtc-at91sam9"; 1211 at91sam9g45_rtt_device.name = "rtc-at91sam9";
1212 /*
1213 * The second resource is needed:
1214 * GPBR will serve as the storage for RTC time offset
1215 */
1216 at91sam9g45_rtt_device.num_resources = 2;
1217 rtt_resources[1].start = AT91SAM9G45_BASE_GPBR +
1218 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR;
1219 rtt_resources[1].end = rtt_resources[1].start + 3;
1211} 1220}
1212#else 1221#else
1213static void __init at91_add_device_rtt_rtc(void) {} 1222static void __init at91_add_device_rtt_rtc(void)
1223{
1224 /* Only one resource is needed: RTT not used as RTC */
1225 at91sam9g45_rtt_device.num_resources = 1;
1226}
1214#endif 1227#endif
1215 1228
1216static void __init at91_add_device_rtt(void) 1229static void __init at91_add_device_rtt(void)
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index dd248c837a77..342a6c51ed3b 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -683,6 +683,8 @@ static struct resource rtt_resources[] = {
683 .start = AT91SAM9RL_BASE_RTT, 683 .start = AT91SAM9RL_BASE_RTT,
684 .end = AT91SAM9RL_BASE_RTT + SZ_16 - 1, 684 .end = AT91SAM9RL_BASE_RTT + SZ_16 - 1,
685 .flags = IORESOURCE_MEM, 685 .flags = IORESOURCE_MEM,
686 }, {
687 .flags = IORESOURCE_MEM,
686 } 688 }
687}; 689};
688 690
@@ -690,16 +692,27 @@ static struct platform_device at91sam9rl_rtt_device = {
690 .name = "at91_rtt", 692 .name = "at91_rtt",
691 .id = 0, 693 .id = 0,
692 .resource = rtt_resources, 694 .resource = rtt_resources,
693 .num_resources = ARRAY_SIZE(rtt_resources),
694}; 695};
695 696
696#if IS_ENABLED(CONFIG_RTC_DRV_AT91SAM9) 697#if IS_ENABLED(CONFIG_RTC_DRV_AT91SAM9)
697static void __init at91_add_device_rtt_rtc(void) 698static void __init at91_add_device_rtt_rtc(void)
698{ 699{
699 at91sam9rl_rtt_device.name = "rtc-at91sam9"; 700 at91sam9rl_rtt_device.name = "rtc-at91sam9";
701 /*
702 * The second resource is needed:
703 * GPBR will serve as the storage for RTC time offset
704 */
705 at91sam9rl_rtt_device.num_resources = 2;
706 rtt_resources[1].start = AT91SAM9RL_BASE_GPBR +
707 4 * CONFIG_RTC_DRV_AT91SAM9_GPBR;
708 rtt_resources[1].end = rtt_resources[1].start + 3;
700} 709}
701#else 710#else
702static void __init at91_add_device_rtt_rtc(void) {} 711static void __init at91_add_device_rtt_rtc(void)
712{
713 /* Only one resource is needed: RTT not used as RTC */
714 at91sam9rl_rtt_device.num_resources = 1;
715}
703#endif 716#endif
704 717
705static void __init at91_add_device_rtt(void) 718static void __init at91_add_device_rtt(void)
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/arch/arm/mach-at91/include/mach/at91sam9260.h
index 1524e87c0043..2e47b6d19ab9 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9260.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9260.h
@@ -78,10 +78,8 @@
78#define AT91SAM9260_BASE_ADC 0xfffe0000 78#define AT91SAM9260_BASE_ADC 0xfffe0000
79 79
80/* 80/*
81 * System Peripherals (offset from AT91_BASE_SYS) 81 * System Peripherals
82 */ 82 */
83#define AT91_GPBR (0xfffffd50 - AT91_BASE_SYS)
84
85#define AT91SAM9260_BASE_ECC 0xffffe800 83#define AT91SAM9260_BASE_ECC 0xffffe800
86#define AT91SAM9260_BASE_SDRAMC 0xffffea00 84#define AT91SAM9260_BASE_SDRAMC 0xffffea00
87#define AT91SAM9260_BASE_SMC 0xffffec00 85#define AT91SAM9260_BASE_SMC 0xffffec00
@@ -95,6 +93,7 @@
95#define AT91SAM9260_BASE_RTT 0xfffffd20 93#define AT91SAM9260_BASE_RTT 0xfffffd20
96#define AT91SAM9260_BASE_PIT 0xfffffd30 94#define AT91SAM9260_BASE_PIT 0xfffffd30
97#define AT91SAM9260_BASE_WDT 0xfffffd40 95#define AT91SAM9260_BASE_WDT 0xfffffd40
96#define AT91SAM9260_BASE_GPBR 0xfffffd50
98 97
99#define AT91_USART0 AT91SAM9260_BASE_US0 98#define AT91_USART0 AT91SAM9260_BASE_US0
100#define AT91_USART1 AT91SAM9260_BASE_US1 99#define AT91_USART1 AT91SAM9260_BASE_US1
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261.h b/arch/arm/mach-at91/include/mach/at91sam9261.h
index a6a3c1d4bc7f..44fbdc12ee62 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9261.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9261.h
@@ -63,10 +63,8 @@
63 63
64 64
65/* 65/*
66 * System Peripherals (offset from AT91_BASE_SYS) 66 * System Peripherals
67 */ 67 */
68#define AT91_GPBR (0xfffffd50 - AT91_BASE_SYS)
69
70#define AT91SAM9261_BASE_SMC 0xffffec00 68#define AT91SAM9261_BASE_SMC 0xffffec00
71#define AT91SAM9261_BASE_MATRIX 0xffffee00 69#define AT91SAM9261_BASE_MATRIX 0xffffee00
72#define AT91SAM9261_BASE_SDRAMC 0xffffea00 70#define AT91SAM9261_BASE_SDRAMC 0xffffea00
@@ -79,6 +77,7 @@
79#define AT91SAM9261_BASE_RTT 0xfffffd20 77#define AT91SAM9261_BASE_RTT 0xfffffd20
80#define AT91SAM9261_BASE_PIT 0xfffffd30 78#define AT91SAM9261_BASE_PIT 0xfffffd30
81#define AT91SAM9261_BASE_WDT 0xfffffd40 79#define AT91SAM9261_BASE_WDT 0xfffffd40
80#define AT91SAM9261_BASE_GPBR 0xfffffd50
82 81
83#define AT91_USART0 AT91SAM9261_BASE_US0 82#define AT91_USART0 AT91SAM9261_BASE_US0
84#define AT91_USART1 AT91SAM9261_BASE_US1 83#define AT91_USART1 AT91SAM9261_BASE_US1
diff --git a/arch/arm/mach-at91/include/mach/at91sam9263.h b/arch/arm/mach-at91/include/mach/at91sam9263.h
index dda083d1a66b..d96cbb2e03c4 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9263.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9263.h
@@ -72,10 +72,8 @@
72#define AT91SAM9263_BASE_2DGE 0xfffc8000 72#define AT91SAM9263_BASE_2DGE 0xfffc8000
73 73
74/* 74/*
75 * System Peripherals (offset from AT91_BASE_SYS) 75 * System Peripherals
76 */ 76 */
77#define AT91_GPBR (0xfffffd60 - AT91_BASE_SYS)
78
79#define AT91SAM9263_BASE_ECC0 0xffffe000 77#define AT91SAM9263_BASE_ECC0 0xffffe000
80#define AT91SAM9263_BASE_SDRAMC0 0xffffe200 78#define AT91SAM9263_BASE_SDRAMC0 0xffffe200
81#define AT91SAM9263_BASE_SMC0 0xffffe400 79#define AT91SAM9263_BASE_SMC0 0xffffe400
@@ -95,6 +93,7 @@
95#define AT91SAM9263_BASE_PIT 0xfffffd30 93#define AT91SAM9263_BASE_PIT 0xfffffd30
96#define AT91SAM9263_BASE_WDT 0xfffffd40 94#define AT91SAM9263_BASE_WDT 0xfffffd40
97#define AT91SAM9263_BASE_RTT1 0xfffffd50 95#define AT91SAM9263_BASE_RTT1 0xfffffd50
96#define AT91SAM9263_BASE_GPBR 0xfffffd60
98 97
99#define AT91_USART0 AT91SAM9263_BASE_US0 98#define AT91_USART0 AT91SAM9263_BASE_US0
100#define AT91_USART1 AT91SAM9263_BASE_US1 99#define AT91_USART1 AT91SAM9263_BASE_US1
diff --git a/arch/arm/mach-at91/include/mach/at91sam9g45.h b/arch/arm/mach-at91/include/mach/at91sam9g45.h
index a824e15bf00d..d052abcff852 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9g45.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9g45.h
@@ -84,10 +84,8 @@
84#define AT91SAM9G45_BASE_TC5 0xfffd4080 84#define AT91SAM9G45_BASE_TC5 0xfffd4080
85 85
86/* 86/*
87 * System Peripherals (offset from AT91_BASE_SYS) 87 * System Peripherals
88 */ 88 */
89#define AT91_GPBR (0xfffffd60 - AT91_BASE_SYS)
90
91#define AT91SAM9G45_BASE_ECC 0xffffe200 89#define AT91SAM9G45_BASE_ECC 0xffffe200
92#define AT91SAM9G45_BASE_DDRSDRC1 0xffffe400 90#define AT91SAM9G45_BASE_DDRSDRC1 0xffffe400
93#define AT91SAM9G45_BASE_DDRSDRC0 0xffffe600 91#define AT91SAM9G45_BASE_DDRSDRC0 0xffffe600
@@ -106,6 +104,7 @@
106#define AT91SAM9G45_BASE_PIT 0xfffffd30 104#define AT91SAM9G45_BASE_PIT 0xfffffd30
107#define AT91SAM9G45_BASE_WDT 0xfffffd40 105#define AT91SAM9G45_BASE_WDT 0xfffffd40
108#define AT91SAM9G45_BASE_RTC 0xfffffdb0 106#define AT91SAM9G45_BASE_RTC 0xfffffdb0
107#define AT91SAM9G45_BASE_GPBR 0xfffffd60
109 108
110#define AT91_USART0 AT91SAM9G45_BASE_US0 109#define AT91_USART0 AT91SAM9G45_BASE_US0
111#define AT91_USART1 AT91SAM9G45_BASE_US1 110#define AT91_USART1 AT91SAM9G45_BASE_US1
diff --git a/arch/arm/mach-at91/include/mach/at91sam9rl.h b/arch/arm/mach-at91/include/mach/at91sam9rl.h
index 2d7176ac9002..e0073eb10144 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9rl.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9rl.h
@@ -70,7 +70,6 @@
70 * System Peripherals (offset from AT91_BASE_SYS) 70 * System Peripherals (offset from AT91_BASE_SYS)
71 */ 71 */
72#define AT91_SCKCR (0xfffffd50 - AT91_BASE_SYS) 72#define AT91_SCKCR (0xfffffd50 - AT91_BASE_SYS)
73#define AT91_GPBR (0xfffffd60 - AT91_BASE_SYS)
74 73
75#define AT91SAM9RL_BASE_DMA 0xffffe600 74#define AT91SAM9RL_BASE_DMA 0xffffe600
76#define AT91SAM9RL_BASE_ECC 0xffffe800 75#define AT91SAM9RL_BASE_ECC 0xffffe800
@@ -87,6 +86,7 @@
87#define AT91SAM9RL_BASE_RTT 0xfffffd20 86#define AT91SAM9RL_BASE_RTT 0xfffffd20
88#define AT91SAM9RL_BASE_PIT 0xfffffd30 87#define AT91SAM9RL_BASE_PIT 0xfffffd30
89#define AT91SAM9RL_BASE_WDT 0xfffffd40 88#define AT91SAM9RL_BASE_WDT 0xfffffd40
89#define AT91SAM9RL_BASE_GPBR 0xfffffd60
90#define AT91SAM9RL_BASE_RTC 0xfffffe00 90#define AT91SAM9RL_BASE_RTC 0xfffffe00
91 91
92#define AT91_USART0 AT91SAM9RL_BASE_US0 92#define AT91_USART0 AT91SAM9RL_BASE_US0