Message ID | 1297136235-25915-1-git-send-email-thomas.abraham@linaro.org |
---|---|
State | New |
Headers | show |
On Tue, 8 Feb 2011, thomas.abraham@linaro.org wrote: > From: Thomas Abraham <thomas.abraham@linaro.org> > > The length of memory resource definition for UART devices in all the > s5p platforms is one byte more than the intended value. This patch > fixes the UART memory resource definition for all s5p platforms. > > Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> > --- > arch/arm/mach-s5p6442/include/mach/map.h | 2 +- > arch/arm/mach-s5p64x0/include/mach/map.h | 2 +- > arch/arm/mach-s5pc100/include/mach/map.h | 2 +- > arch/arm/mach-s5pv210/include/mach/map.h | 2 +- > arch/arm/mach-s5pv310/include/mach/map.h | 2 +- > 5 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/arch/arm/mach-s5p6442/include/mach/map.h b/arch/arm/mach-s5p6442/include/mach/map.h > index 203dd5a..59464f9 100644 > --- a/arch/arm/mach-s5p6442/include/mach/map.h > +++ b/arch/arm/mach-s5p6442/include/mach/map.h > @@ -46,7 +46,7 @@ > #define S5P_PA_UART0 (S5P6442_PA_UART + 0x0) > #define S5P_PA_UART1 (S5P6442_PA_UART + 0x400) > #define S5P_PA_UART2 (S5P6442_PA_UART + 0x800) > -#define S5P_SZ_UART SZ_256 > +#define S5P_SZ_UART (SZ_256 - 1) [...] This is wrong. I'm sure the _size_ is actually 256. In the resource definition it is not a size but a boundary that is required. So it is not the S5P_SZ_UART definition that needs fixing but rather its usage. For example: .start = S5P6442_PA_PDMA, .end = S5P6442_PA_PDMA + SZ_4K, This is wrong. you should have instead: .start = S5P6442_PA_PDMA, .end = S5P6442_PA_PDMA + SZ_4K - 1, And so on where S5P_SZ_UART is used. Nicolas
On 8 February 2011 09:30, Nicolas Pitre <nicolas.pitre@linaro.org> wrote: > On Tue, 8 Feb 2011, thomas.abraham@linaro.org wrote: > >> From: Thomas Abraham <thomas.abraham@linaro.org> >> >> The length of memory resource definition for UART devices in all the >> s5p platforms is one byte more than the intended value. This patch >> fixes the UART memory resource definition for all s5p platforms. >> >> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> >> --- >> arch/arm/mach-s5p6442/include/mach/map.h | 2 +- >> arch/arm/mach-s5p64x0/include/mach/map.h | 2 +- >> arch/arm/mach-s5pc100/include/mach/map.h | 2 +- >> arch/arm/mach-s5pv210/include/mach/map.h | 2 +- >> arch/arm/mach-s5pv310/include/mach/map.h | 2 +- >> 5 files changed, 5 insertions(+), 5 deletions(-) >> >> diff --git a/arch/arm/mach-s5p6442/include/mach/map.h b/arch/arm/mach-s5p6442/include/mach/map.h >> index 203dd5a..59464f9 100644 >> --- a/arch/arm/mach-s5p6442/include/mach/map.h >> +++ b/arch/arm/mach-s5p6442/include/mach/map.h >> @@ -46,7 +46,7 @@ >> #define S5P_PA_UART0 (S5P6442_PA_UART + 0x0) >> #define S5P_PA_UART1 (S5P6442_PA_UART + 0x400) >> #define S5P_PA_UART2 (S5P6442_PA_UART + 0x800) >> -#define S5P_SZ_UART SZ_256 >> +#define S5P_SZ_UART (SZ_256 - 1) > [...] > > This is wrong. I'm sure the _size_ is actually 256. In the resource > definition it is not a size but a boundary that is required. So it is > not the S5P_SZ_UART definition that needs fixing but rather its usage. > > For example: > > .start = S5P6442_PA_PDMA, > .end = S5P6442_PA_PDMA + SZ_4K, > > This is wrong. you should have instead: > > .start = S5P6442_PA_PDMA, > .end = S5P6442_PA_PDMA + SZ_4K - 1, > > And so on where S5P_SZ_UART is used. > > > Nicolas > Thanks Nicolas. I will correct the patch and resubmit. Regards, Thomas.
diff --git a/arch/arm/mach-s5p6442/include/mach/map.h b/arch/arm/mach-s5p6442/include/mach/map.h index 203dd5a..59464f9 100644 --- a/arch/arm/mach-s5p6442/include/mach/map.h +++ b/arch/arm/mach-s5p6442/include/mach/map.h @@ -46,7 +46,7 @@ #define S5P_PA_UART0 (S5P6442_PA_UART + 0x0) #define S5P_PA_UART1 (S5P6442_PA_UART + 0x400) #define S5P_PA_UART2 (S5P6442_PA_UART + 0x800) -#define S5P_SZ_UART SZ_256 +#define S5P_SZ_UART (SZ_256 - 1) #define S5P6442_PA_IIC0 (0xEC100000) diff --git a/arch/arm/mach-s5p64x0/include/mach/map.h b/arch/arm/mach-s5p64x0/include/mach/map.h index a9365e5..c32c117 100644 --- a/arch/arm/mach-s5p64x0/include/mach/map.h +++ b/arch/arm/mach-s5p64x0/include/mach/map.h @@ -51,7 +51,7 @@ #define S5P_PA_UART4 S5P6450_PA_UART(4) #define S5P_PA_UART5 S5P6450_PA_UART(5) -#define S5P_SZ_UART SZ_256 +#define S5P_SZ_UART (SZ_256 - 1) #define S5P6440_PA_IIC0 (0xEC104000) #define S5P6440_PA_IIC1 (0xEC20F000) diff --git a/arch/arm/mach-s5pc100/include/mach/map.h b/arch/arm/mach-s5pc100/include/mach/map.h index ccbe6b7..f999021 100644 --- a/arch/arm/mach-s5pc100/include/mach/map.h +++ b/arch/arm/mach-s5pc100/include/mach/map.h @@ -128,6 +128,6 @@ #define S5P_PA_UART2 S5P_PA_UART(2) #define S5P_PA_UART3 S5P_PA_UART(3) -#define S5P_SZ_UART SZ_256 +#define S5P_SZ_UART (SZ_256 - 1) #endif /* __ASM_ARCH_MAP_H */ diff --git a/arch/arm/mach-s5pv210/include/mach/map.h b/arch/arm/mach-s5pv210/include/mach/map.h index 1dd5883..89b4f0b 100644 --- a/arch/arm/mach-s5pv210/include/mach/map.h +++ b/arch/arm/mach-s5pv210/include/mach/map.h @@ -130,6 +130,6 @@ #define S5P_PA_UART2 S5P_PA_UART(2) #define S5P_PA_UART3 S5P_PA_UART(3) -#define S5P_SZ_UART SZ_256 +#define S5P_SZ_UART (SZ_256 - 1) #endif /* __ASM_ARCH_MAP_H */ diff --git a/arch/arm/mach-s5pv310/include/mach/map.h b/arch/arm/mach-s5pv310/include/mach/map.h index 901657f..5235024 100644 --- a/arch/arm/mach-s5pv310/include/mach/map.h +++ b/arch/arm/mach-s5pv310/include/mach/map.h @@ -139,6 +139,6 @@ #define S5P_PA_UART3 S5P_PA_UART(3) #define S5P_PA_UART4 S5P_PA_UART(4) -#define S5P_SZ_UART SZ_256 +#define S5P_SZ_UART (SZ_256 - 1) #endif /* __ASM_ARCH_MAP_H */