aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ep93xx
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-03-21 14:35:49 -0400
committerRyan Mallon <rmallon@gmail.com>2012-04-10 20:59:24 -0400
commitede55aaa8bb2dd37e302b2f94312306d216e5f97 (patch)
tree5949bd009308b0ff2689138b15e1d3e4fad870ce /arch/arm/mach-ep93xx
parent0034102808e0dbbf3a2394b82b1bb40b5778de9e (diff)
arm: ep93xx: use DEFINE_RES_* macros
Use the DEFINE_RES_* macros to reduce some of the boilerplate code. Signed-off-by: Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Diffstat (limited to 'arch/arm/mach-ep93xx')
-rw-r--r--arch/arm/mach-ep93xx/core.c94
1 files changed, 16 insertions, 78 deletions
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 8d2589588713..a2cb176cee33 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -241,11 +241,7 @@ unsigned int ep93xx_chip_revision(void)
241 * EP93xx GPIO 241 * EP93xx GPIO
242 *************************************************************************/ 242 *************************************************************************/
243static struct resource ep93xx_gpio_resource[] = { 243static struct resource ep93xx_gpio_resource[] = {
244 { 244 DEFINE_RES_MEM(EP93XX_GPIO_PHYS_BASE, 0xcc),
245 .start = EP93XX_GPIO_PHYS_BASE,
246 .end = EP93XX_GPIO_PHYS_BASE + 0xcc - 1,
247 .flags = IORESOURCE_MEM,
248 },
249}; 245};
250 246
251static struct platform_device ep93xx_gpio_device = { 247static struct platform_device ep93xx_gpio_device = {
@@ -288,11 +284,7 @@ static AMBA_APB_DEVICE(uart3, "apb:uart3", 0x00041010, EP93XX_UART3_PHYS_BASE,
288 { IRQ_EP93XX_UART3 }, &ep93xx_uart_data); 284 { IRQ_EP93XX_UART3 }, &ep93xx_uart_data);
289 285
290static struct resource ep93xx_rtc_resource[] = { 286static struct resource ep93xx_rtc_resource[] = {
291 { 287 DEFINE_RES_MEM(EP93XX_RTC_PHYS_BASE, 0x10c),
292 .start = EP93XX_RTC_PHYS_BASE,
293 .end = EP93XX_RTC_PHYS_BASE + 0x10c - 1,
294 .flags = IORESOURCE_MEM,
295 },
296}; 288};
297 289
298static struct platform_device ep93xx_rtc_device = { 290static struct platform_device ep93xx_rtc_device = {
@@ -304,16 +296,8 @@ static struct platform_device ep93xx_rtc_device = {
304 296
305 297
306static struct resource ep93xx_ohci_resources[] = { 298static struct resource ep93xx_ohci_resources[] = {
307 [0] = { 299 DEFINE_RES_MEM(EP93XX_USB_PHYS_BASE, 0x1000),
308 .start = EP93XX_USB_PHYS_BASE, 300 DEFINE_RES_IRQ(IRQ_EP93XX_USB),
309 .end = EP93XX_USB_PHYS_BASE + 0x0fff,
310 .flags = IORESOURCE_MEM,
311 },
312 [1] = {
313 .start = IRQ_EP93XX_USB,
314 .end = IRQ_EP93XX_USB,
315 .flags = IORESOURCE_IRQ,
316 },
317}; 301};
318 302
319 303
@@ -372,15 +356,8 @@ void __init ep93xx_register_flash(unsigned int width,
372static struct ep93xx_eth_data ep93xx_eth_data; 356static struct ep93xx_eth_data ep93xx_eth_data;
373 357
374static struct resource ep93xx_eth_resource[] = { 358static struct resource ep93xx_eth_resource[] = {
375 { 359 DEFINE_RES_MEM(EP93XX_ETHERNET_PHYS_BASE, 0x10000),
376 .start = EP93XX_ETHERNET_PHYS_BASE, 360 DEFINE_REQ_IRQ(IRQ_EP93XX_ETHERNET),
377 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
378 .flags = IORESOURCE_MEM,
379 }, {
380 .start = IRQ_EP93XX_ETHERNET,
381 .end = IRQ_EP93XX_ETHERNET,
382 .flags = IORESOURCE_IRQ,
383 }
384}; 361};
385 362
386static u64 ep93xx_eth_dma_mask = DMA_BIT_MASK(32); 363static u64 ep93xx_eth_dma_mask = DMA_BIT_MASK(32);
@@ -461,16 +438,8 @@ void __init ep93xx_register_i2c(struct i2c_gpio_platform_data *data,
461static struct ep93xx_spi_info ep93xx_spi_master_data; 438static struct ep93xx_spi_info ep93xx_spi_master_data;
462 439
463static struct resource ep93xx_spi_resources[] = { 440static struct resource ep93xx_spi_resources[] = {
464 { 441 DEFINE_RES_MEM(EP93XX_SPI_PHYS_BASE, 0x18),
465 .start = EP93XX_SPI_PHYS_BASE, 442 DEFINE_RES_IRQ(IRQ_EP93XX_SSP),
466 .end = EP93XX_SPI_PHYS_BASE + 0x18 - 1,
467 .flags = IORESOURCE_MEM,
468 },
469 {
470 .start = IRQ_EP93XX_SSP,
471 .end = IRQ_EP93XX_SSP,
472 .flags = IORESOURCE_IRQ,
473 },
474}; 443};
475 444
476static u64 ep93xx_spi_dma_mask = DMA_BIT_MASK(32); 445static u64 ep93xx_spi_dma_mask = DMA_BIT_MASK(32);
@@ -541,11 +510,7 @@ static struct platform_device ep93xx_leds = {
541 * EP93xx pwm peripheral handling 510 * EP93xx pwm peripheral handling
542 *************************************************************************/ 511 *************************************************************************/
543static struct resource ep93xx_pwm0_resource[] = { 512static struct resource ep93xx_pwm0_resource[] = {
544 { 513 DEFINE_RES_MEM(EP93XX_PWM_PHYS_BASE, 0x10),
545 .start = EP93XX_PWM_PHYS_BASE,
546 .end = EP93XX_PWM_PHYS_BASE + 0x10 - 1,
547 .flags = IORESOURCE_MEM,
548 },
549}; 514};
550 515
551static struct platform_device ep93xx_pwm0_device = { 516static struct platform_device ep93xx_pwm0_device = {
@@ -556,11 +521,7 @@ static struct platform_device ep93xx_pwm0_device = {
556}; 521};
557 522
558static struct resource ep93xx_pwm1_resource[] = { 523static struct resource ep93xx_pwm1_resource[] = {
559 { 524 DEFINE_RES_MEM(EP93XX_PWM_PHYS_BASE + 0x20, 0x10),
560 .start = EP93XX_PWM_PHYS_BASE + 0x20,
561 .end = EP93XX_PWM_PHYS_BASE + 0x30 - 1,
562 .flags = IORESOURCE_MEM,
563 },
564}; 525};
565 526
566static struct platform_device ep93xx_pwm1_device = { 527static struct platform_device ep93xx_pwm1_device = {
@@ -628,11 +589,7 @@ EXPORT_SYMBOL(ep93xx_pwm_release_gpio);
628static struct ep93xxfb_mach_info ep93xxfb_data; 589static struct ep93xxfb_mach_info ep93xxfb_data;
629 590
630static struct resource ep93xx_fb_resource[] = { 591static struct resource ep93xx_fb_resource[] = {
631 { 592 DEFINE_RES_MEM(EP93XX_RASTER_PHYS_BASE, 0x800),
632 .start = EP93XX_RASTER_PHYS_BASE,
633 .end = EP93XX_RASTER_PHYS_BASE + 0x800 - 1,
634 .flags = IORESOURCE_MEM,
635 },
636}; 593};
637 594
638static struct platform_device ep93xx_fb_device = { 595static struct platform_device ep93xx_fb_device = {
@@ -680,15 +637,8 @@ void __init ep93xx_register_fb(struct ep93xxfb_mach_info *data)
680static struct ep93xx_keypad_platform_data ep93xx_keypad_data; 637static struct ep93xx_keypad_platform_data ep93xx_keypad_data;
681 638
682static struct resource ep93xx_keypad_resource[] = { 639static struct resource ep93xx_keypad_resource[] = {
683 { 640 DEFINE_RES_MEM(EP93XX_KEY_MATRIX_PHYS_BASE, 0x0c),
684 .start = EP93XX_KEY_MATRIX_PHYS_BASE, 641 DEFINE_RES_IRQ(IRQ_EP93XX_KEY),
685 .end = EP93XX_KEY_MATRIX_PHYS_BASE + 0x0c - 1,
686 .flags = IORESOURCE_MEM,
687 }, {
688 .start = IRQ_EP93XX_KEY,
689 .end = IRQ_EP93XX_KEY,
690 .flags = IORESOURCE_IRQ,
691 },
692}; 642};
693 643
694static struct platform_device ep93xx_keypad_device = { 644static struct platform_device ep93xx_keypad_device = {
@@ -761,11 +711,7 @@ EXPORT_SYMBOL(ep93xx_keypad_release_gpio);
761 * EP93xx I2S audio peripheral handling 711 * EP93xx I2S audio peripheral handling
762 *************************************************************************/ 712 *************************************************************************/
763static struct resource ep93xx_i2s_resource[] = { 713static struct resource ep93xx_i2s_resource[] = {
764 { 714 DEFINE_RES_MEM(EP93XX_I2S_PHYS_BASE, 0x100),
765 .start = EP93XX_I2S_PHYS_BASE,
766 .end = EP93XX_I2S_PHYS_BASE + 0x100 - 1,
767 .flags = IORESOURCE_MEM,
768 },
769}; 715};
770 716
771static struct platform_device ep93xx_i2s_device = { 717static struct platform_device ep93xx_i2s_device = {
@@ -824,16 +770,8 @@ EXPORT_SYMBOL(ep93xx_i2s_release);
824 * EP93xx AC97 audio peripheral handling 770 * EP93xx AC97 audio peripheral handling
825 *************************************************************************/ 771 *************************************************************************/
826static struct resource ep93xx_ac97_resources[] = { 772static struct resource ep93xx_ac97_resources[] = {
827 { 773 DEFINE_RES_MEM(EP93XX_AAC_PHYS_BASE, 0xac),
828 .start = EP93XX_AAC_PHYS_BASE, 774 DEFINE_RES_IRQ(IRQ_EP93XX_AACINTR),
829 .end = EP93XX_AAC_PHYS_BASE + 0xac - 1,
830 .flags = IORESOURCE_MEM,
831 },
832 {
833 .start = IRQ_EP93XX_AACINTR,
834 .end = IRQ_EP93XX_AACINTR,
835 .flags = IORESOURCE_IRQ,
836 },
837}; 775};
838 776
839static struct platform_device ep93xx_ac97_device = { 777static struct platform_device ep93xx_ac97_device = {