ep93xx: define EP93XX_*_PHYS_BASE with macros
PATCH 1/1 ep93xx: define EP93XX_*_PHYS_BASE with macros
Change the #define's for the EP93XX_*_PHYS_BASE addresses to use macros for easier readability.
---
arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +9 -7
@@ -52,22 +52,24 @@#define EP93XX_AHB_VIRT_BASE 0xfef00000#define EP93XX_AHB_SIZE 0x00100000 +#define EP93XX_AHB_PHYS (x) (EP93XX_AHB_PHYS_BASE + (x))#define EP93XX_AHB_IOMEM (x) IOMEM(EP93XX_AHB_VIRT_BASE + (x))#define EP93XX_APB_PHYS_BASE 0x80800000#define EP93XX_APB_VIRT_BASE 0xfed00000#define EP93XX_APB_SIZE 0x00200000 +#define EP93XX_APB_PHYS (x) (EP93XX_APB_PHYS_BASE + (x))#define EP93XX_APB_IOMEM (x) IOMEM(EP93XX_APB_VIRT_BASE + (x))/* AHB peripherals */ #define EP93XX_DMA_BASE EP93XX_AHB_IOMEM(0x00000000) -#define EP93XX_ETHERNET_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00010000) +#define EP93XX_ETHERNET_PHYS_BASE EP93XX_AHB_PHYS(0x00010000)#define EP93XX_ETHERNET_BASE EP93XX_AHB_IOMEM(0x00010000) -#define EP93XX_USB_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00020000) +#define EP93XX_USB_PHYS_BASE EP93XX_AHB_PHYS(0x00020000)#define EP93XX_USB_BASE EP93XX_AHB_IOMEM(0x00020000)#define EP93XX_RASTER_BASE EP93XX_AHB_IOMEM(0x00030000)
@@ -133,13 +135,13 @@#define EP93XX_IRDA_BASE EP93XX_APB_IOMEM(0x000b0000) -#define EP93XX_UART1_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000c0000) +#define EP93XX_UART1_PHYS_BASE EP93XX_APB_PHYS(0x000c0000)#define EP93XX_UART1_BASE EP93XX_APB_IOMEM(0x000c0000) -#define EP93XX_UART2_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000d0000) +#define EP93XX_UART2_PHYS_BASE EP93XX_APB_PHYS(0x000d0000)#define EP93XX_UART2_BASE EP93XX_APB_IOMEM(0x000d0000) -#define EP93XX_UART3_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000e0000) +#define EP93XX_UART3_PHYS_BASE EP93XX_APB_PHYS(0x000e0000)#define EP93XX_UART3_BASE EP93XX_APB_IOMEM(0x000e0000)#define EP93XX_KEY_MATRIX_BASE EP93XX_APB_IOMEM(0x000f0000)
@@ -147,10 +149,10 @@#define EP93XX_ADC_BASE EP93XX_APB_IOMEM(0x00100000)#define EP93XX_TOUCHSCREEN_BASE EP93XX_APB_IOMEM(0x00100000) -#define EP93XX_PWM_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x00110000) +#define EP93XX_PWM_PHYS_BASE EP93XX_APB_PHYS(0x00110000)#define EP93XX_PWM_BASE EP93XX_APB_IOMEM(0x00110000) -#define EP93XX_RTC_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x00120000) +#define EP93XX_RTC_PHYS_BASE EP93XX_APB_PHYS(0x00120000)#define EP93XX_RTC_BASE EP93XX_APB_IOMEM(0x00120000)#define EP93XX_SYSCON_BASE EP93XX_APB_IOMEM(0x00130000)
PATCH 1/1 ep93xx: define EP93XX_*_PHYS_BASE with macros
Quoted 5 lines · H Hartley Sweeten
Change the #define's for the EP93XX_*_PHYS_BASE addresses to use macros for easier readability.
Signed-off-by H Hartley Sweeten <[email protected]>Cc Ryan Mallon <[email protected]>
Looks okay to me:
~Ryan
Signature · 8 lines
Bluewater Systems Ltd - ARM Technology Solution Centre
Ryan Mallon Unit 5, Amuri Park
Phone: +64 3 3779127 404 Barbadoes St
Fax: +64 3 3779135 PO Box 13 889
Email: ryan at bluewatersys.com Christchurch, 8013
Web: http://www.bluewatersys.com New Zealand
Freecall Australia 1800 148 751 USA 1800 261 2934PATCH 1/1 ep93xx: define EP93XX_*_PHYS_BASE with macros
Change the #define's for the EP93XX_*_PHYS_BASE addresses to use macros for easier readability.
---
Rebased to 2.6.31-gitcurr now that the ep93xx branch is stable.
arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +10 -8
@@ -52,25 +52,27 @@#define EP93XX_AHB_VIRT_BASE 0xfef00000#define EP93XX_AHB_SIZE 0x00100000 +#define EP93XX_AHB_PHYS (x) (EP93XX_AHB_PHYS_BASE + (x))#define EP93XX_AHB_IOMEM (x) IOMEM(EP93XX_AHB_VIRT_BASE + (x))#define EP93XX_APB_PHYS_BASE 0x80800000#define EP93XX_APB_VIRT_BASE 0xfed00000#define EP93XX_APB_SIZE 0x00200000 +#define EP93XX_APB_PHYS (x) (EP93XX_APB_PHYS_BASE + (x))#define EP93XX_APB_IOMEM (x) IOMEM(EP93XX_APB_VIRT_BASE + (x))/* AHB peripherals */ #define EP93XX_DMA_BASE EP93XX_AHB_IOMEM(0x00000000) -#define EP93XX_ETHERNET_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00010000) +#define EP93XX_ETHERNET_PHYS_BASE EP93XX_AHB_PHYS(0x00010000)#define EP93XX_ETHERNET_BASE EP93XX_AHB_IOMEM(0x00010000) -#define EP93XX_USB_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00020000) +#define EP93XX_USB_PHYS_BASE EP93XX_AHB_PHYS(0x00020000)#define EP93XX_USB_BASE EP93XX_AHB_IOMEM(0x00020000) -#define EP93XX_RASTER_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00030000) +#define EP93XX_RASTER_PHYS_BASE EP93XX_AHB_PHYS(0x00030000)#define EP93XX_RASTER_BASE EP93XX_AHB_IOMEM(0x00030000)#define EP93XX_GRAPHICS_ACCEL_BASE EP93XX_AHB_IOMEM(0x00040000)
@@ -134,13 +136,13 @@#define EP93XX_IRDA_BASE EP93XX_APB_IOMEM(0x000b0000) -#define EP93XX_UART1_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000c0000) +#define EP93XX_UART1_PHYS_BASE EP93XX_APB_PHYS(0x000c0000)#define EP93XX_UART1_BASE EP93XX_APB_IOMEM(0x000c0000) -#define EP93XX_UART2_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000d0000) +#define EP93XX_UART2_PHYS_BASE EP93XX_APB_PHYS(0x000d0000)#define EP93XX_UART2_BASE EP93XX_APB_IOMEM(0x000d0000) -#define EP93XX_UART3_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000e0000) +#define EP93XX_UART3_PHYS_BASE EP93XX_APB_PHYS(0x000e0000)#define EP93XX_UART3_BASE EP93XX_APB_IOMEM(0x000e0000)#define EP93XX_KEY_MATRIX_BASE EP93XX_APB_IOMEM(0x000f0000)
@@ -148,10 +150,10 @@#define EP93XX_ADC_BASE EP93XX_APB_IOMEM(0x00100000)#define EP93XX_TOUCHSCREEN_BASE EP93XX_APB_IOMEM(0x00100000) -#define EP93XX_PWM_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x00110000) +#define EP93XX_PWM_PHYS_BASE EP93XX_APB_PHYS(0x00110000)#define EP93XX_PWM_BASE EP93XX_APB_IOMEM(0x00110000) -#define EP93XX_RTC_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x00120000) +#define EP93XX_RTC_PHYS_BASE EP93XX_APB_PHYS(0x00120000)#define EP93XX_RTC_BASE EP93XX_APB_IOMEM(0x00120000)#define EP93XX_SYSCON_BASE EP93XX_APB_IOMEM(0x00130000)
PATCH 1/1 ep93xx: define EP93XX_*_PHYS_BASE with macros
Ryan,
Are you still ok with this patch?
Regards,
Hartley
-----Original Message-----
From: [email protected] [mailto:linux-arm-kernel-bounces at lists.infradead.org] On Behalf Of H Hartley Sweeten
Sent: Wednesday, September 23, 2009 1:20 PM
To: linux-arm-kernel
Cc: Ryan Mallon
Subject: RE: [PATCH] ep93xx: define EP93XX_*_PHYS_BASE with macros
Change the #define's for the EP93XX_*_PHYS_BASE addresses to use macros for easier readability.
---
Rebased to 2.6.31-gitcurr now that the ep93xx branch is stable.
arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +10 -8
@@ -52,25 +52,27 @@#define EP93XX_AHB_VIRT_BASE 0xfef00000#define EP93XX_AHB_SIZE 0x00100000 +#define EP93XX_AHB_PHYS (x) (EP93XX_AHB_PHYS_BASE + (x))#define EP93XX_AHB_IOMEM (x) IOMEM(EP93XX_AHB_VIRT_BASE + (x))#define EP93XX_APB_PHYS_BASE 0x80800000#define EP93XX_APB_VIRT_BASE 0xfed00000#define EP93XX_APB_SIZE 0x00200000 +#define EP93XX_APB_PHYS (x) (EP93XX_APB_PHYS_BASE + (x))#define EP93XX_APB_IOMEM (x) IOMEM(EP93XX_APB_VIRT_BASE + (x))/* AHB peripherals */ #define EP93XX_DMA_BASE EP93XX_AHB_IOMEM(0x00000000) -#define EP93XX_ETHERNET_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00010000) +#define EP93XX_ETHERNET_PHYS_BASE EP93XX_AHB_PHYS(0x00010000)#define EP93XX_ETHERNET_BASE EP93XX_AHB_IOMEM(0x00010000) -#define EP93XX_USB_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00020000) +#define EP93XX_USB_PHYS_BASE EP93XX_AHB_PHYS(0x00020000)#define EP93XX_USB_BASE EP93XX_AHB_IOMEM(0x00020000) -#define EP93XX_RASTER_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00030000) +#define EP93XX_RASTER_PHYS_BASE EP93XX_AHB_PHYS(0x00030000)#define EP93XX_RASTER_BASE EP93XX_AHB_IOMEM(0x00030000)#define EP93XX_GRAPHICS_ACCEL_BASE EP93XX_AHB_IOMEM(0x00040000)
@@ -134,13 +136,13 @@#define EP93XX_IRDA_BASE EP93XX_APB_IOMEM(0x000b0000) -#define EP93XX_UART1_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000c0000) +#define EP93XX_UART1_PHYS_BASE EP93XX_APB_PHYS(0x000c0000)#define EP93XX_UART1_BASE EP93XX_APB_IOMEM(0x000c0000) -#define EP93XX_UART2_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000d0000) +#define EP93XX_UART2_PHYS_BASE EP93XX_APB_PHYS(0x000d0000)#define EP93XX_UART2_BASE EP93XX_APB_IOMEM(0x000d0000) -#define EP93XX_UART3_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000e0000) +#define EP93XX_UART3_PHYS_BASE EP93XX_APB_PHYS(0x000e0000)#define EP93XX_UART3_BASE EP93XX_APB_IOMEM(0x000e0000)#define EP93XX_KEY_MATRIX_BASE EP93XX_APB_IOMEM(0x000f0000)
@@ -148,10 +150,10 @@#define EP93XX_ADC_BASE EP93XX_APB_IOMEM(0x00100000)#define EP93XX_TOUCHSCREEN_BASE EP93XX_APB_IOMEM(0x00100000) -#define EP93XX_PWM_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x00110000) +#define EP93XX_PWM_PHYS_BASE EP93XX_APB_PHYS(0x00110000)#define EP93XX_PWM_BASE EP93XX_APB_IOMEM(0x00110000) -#define EP93XX_RTC_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x00120000) +#define EP93XX_RTC_PHYS_BASE EP93XX_APB_PHYS(0x00120000)#define EP93XX_RTC_BASE EP93XX_APB_IOMEM(0x00120000)#define EP93XX_SYSCON_BASE EP93XX_APB_IOMEM(0x00130000)
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/1 ep93xx: define EP93XX_*_PHYS_BASE with macros
Quoted 2 lines · H Hartley Sweeten
Ryan,
Are you still ok with this patch?
Yes.
Quoted 13 lines
-----Original Message-----
From: linux-arm-kernel-bounces at lists.infradead.org [mailto:linux-arm-kernel-bounces at lists.infradead.org] On Behalf Of H Hartley Sweeten
Sent: Wednesday, September 23, 2009 1:20 PM
To: linux-arm-kernel
Cc: Ryan Mallon
Subject: RE: [PATCH] ep93xx: define EP93XX_*_PHYS_BASE with macrosChange the #define's for the EP93XX_*_PHYS_BASE addresses to use macros for easier readability.
Signed-off-by H Hartley Sweeten <[email protected]>Acked-by Ryan Mallon <[email protected]>
Signature · 8 lines
Bluewater Systems Ltd - ARM Technology Solution Centre
Ryan Mallon Unit 5, Amuri Park
Phone: +64 3 3779127 404 Barbadoes St
Fax: +64 3 3779135 PO Box 13 889
Email: ryan at bluewatersys.com Christchurch, 8013
Web: http://www.bluewatersys.com New Zealand
Freecall Australia 1800 148 751 USA 1800 261 2934