aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-10-03 06:52:33 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-10-03 06:52:33 -0400
commit56f68556d7bbb51dd158c74deb09c783345bfbbd (patch)
tree536e6e3c7063b1eee927194dda257602bd3dc66f /arch/arm/mach-omap2
parentfd9470ce3ac6fb54d6026e4b1cdab0936e34805e (diff)
parent7c8ad9828e793573877fd60868bb5d2f1e3b64da (diff)
Merge unstable branch 'omap-rmk'
Merge branch 'omap-rmk' into omap-all
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c2
-rw-r--r--arch/arm/mach-omap2/clock.c18
-rw-r--r--arch/arm/mach-omap2/cm.h2
-rw-r--r--arch/arm/mach-omap2/gpmc.c6
-rw-r--r--arch/arm/mach-omap2/id.c6
-rw-r--r--arch/arm/mach-omap2/irq.c4
-rw-r--r--arch/arm/mach-omap2/mcbsp.c8
-rw-r--r--arch/arm/mach-omap2/prm.h2
-rw-r--r--arch/arm/mach-omap2/serial.c16
9 files changed, 31 insertions, 33 deletions
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index d4d6385cad7c..b72ca13b3acb 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -103,7 +103,7 @@ static struct resource sdp2430_smc91x_resources[] = {
103 [1] = { 103 [1] = {
104 .start = OMAP_GPIO_IRQ(OMAP24XX_ETHR_GPIO_IRQ), 104 .start = OMAP_GPIO_IRQ(OMAP24XX_ETHR_GPIO_IRQ),
105 .end = OMAP_GPIO_IRQ(OMAP24XX_ETHR_GPIO_IRQ), 105 .end = OMAP_GPIO_IRQ(OMAP24XX_ETHR_GPIO_IRQ),
106 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, 106 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
107 }, 107 },
108}; 108};
109 109
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index aa9b37370d44..57c4405cceda 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -278,7 +278,7 @@ int _omap2_clk_enable(struct clk *clk)
278 if (clk->enable) 278 if (clk->enable)
279 return clk->enable(clk); 279 return clk->enable(clk);
280 280
281 if (unlikely(clk->enable_reg == 0)) { 281 if (unlikely(clk->enable_reg == NULL)) {
282 printk(KERN_ERR "clock.c: Enable for %s without enable code\n", 282 printk(KERN_ERR "clock.c: Enable for %s without enable code\n",
283 clk->name); 283 clk->name);
284 return 0; /* REVISIT: -EINVAL */ 284 return 0; /* REVISIT: -EINVAL */
@@ -310,7 +310,7 @@ void _omap2_clk_disable(struct clk *clk)
310 return; 310 return;
311 } 311 }
312 312
313 if (clk->enable_reg == 0) { 313 if (clk->enable_reg == NULL) {
314 /* 314 /*
315 * 'Independent' here refers to a clock which is not 315 * 'Independent' here refers to a clock which is not
316 * controlled by its parent. 316 * controlled by its parent.
@@ -515,7 +515,7 @@ long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate)
515/* Given a clock and a rate apply a clock specific rounding function */ 515/* Given a clock and a rate apply a clock specific rounding function */
516long omap2_clk_round_rate(struct clk *clk, unsigned long rate) 516long omap2_clk_round_rate(struct clk *clk, unsigned long rate)
517{ 517{
518 if (clk->round_rate != 0) 518 if (clk->round_rate != NULL)
519 return clk->round_rate(clk, rate); 519 return clk->round_rate(clk, rate);
520 520
521 if (clk->flags & RATE_FIXED) 521 if (clk->flags & RATE_FIXED)
@@ -604,7 +604,7 @@ u32 omap2_divisor_to_clksel(struct clk *clk, u32 div)
604 */ 604 */
605void __iomem *omap2_get_clksel(struct clk *clk, u32 *field_mask) 605void __iomem *omap2_get_clksel(struct clk *clk, u32 *field_mask)
606{ 606{
607 if (unlikely((clk->clksel_reg == 0) || (clk->clksel_mask == 0))) 607 if (unlikely((clk->clksel_reg == NULL) || (clk->clksel_mask == NULL)))
608 return NULL; 608 return NULL;
609 609
610 *field_mask = clk->clksel_mask; 610 *field_mask = clk->clksel_mask;
@@ -624,7 +624,7 @@ u32 omap2_clksel_get_divisor(struct clk *clk)
624 void __iomem *div_addr; 624 void __iomem *div_addr;
625 625
626 div_addr = omap2_get_clksel(clk, &field_mask); 626 div_addr = omap2_get_clksel(clk, &field_mask);
627 if (div_addr == 0) 627 if (div_addr == NULL)
628 return 0; 628 return 0;
629 629
630 field_val = __raw_readl(div_addr) & field_mask; 630 field_val = __raw_readl(div_addr) & field_mask;
@@ -643,7 +643,7 @@ int omap2_clksel_set_rate(struct clk *clk, unsigned long rate)
643 return -EINVAL; 643 return -EINVAL;
644 644
645 div_addr = omap2_get_clksel(clk, &field_mask); 645 div_addr = omap2_get_clksel(clk, &field_mask);
646 if (div_addr == 0) 646 if (div_addr == NULL)
647 return -EINVAL; 647 return -EINVAL;
648 648
649 field_val = omap2_divisor_to_clksel(clk, new_div); 649 field_val = omap2_divisor_to_clksel(clk, new_div);
@@ -681,7 +681,7 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate)
681 return -EINVAL; 681 return -EINVAL;
682 682
683 /* dpll_ck, core_ck, virt_prcm_set; plus all clksel clocks */ 683 /* dpll_ck, core_ck, virt_prcm_set; plus all clksel clocks */
684 if (clk->set_rate != 0) 684 if (clk->set_rate != NULL)
685 ret = clk->set_rate(clk, rate); 685 ret = clk->set_rate(clk, rate);
686 686
687 if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES))) 687 if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES)))
@@ -702,7 +702,7 @@ static u32 omap2_clksel_get_src_field(void __iomem **src_addr,
702 const struct clksel_rate *clkr; 702 const struct clksel_rate *clkr;
703 703
704 *parent_div = 0; 704 *parent_div = 0;
705 *src_addr = 0; 705 *src_addr = NULL;
706 706
707 clks = omap2_get_clksel_by_parent(clk, src_clk); 707 clks = omap2_get_clksel_by_parent(clk, src_clk);
708 if (clks == NULL) 708 if (clks == NULL)
@@ -743,7 +743,7 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
743 743
744 field_val = omap2_clksel_get_src_field(&src_addr, new_parent, 744 field_val = omap2_clksel_get_src_field(&src_addr, new_parent,
745 &field_mask, clk, &parent_div); 745 &field_mask, clk, &parent_div);
746 if (src_addr == 0) 746 if (src_addr == NULL)
747 return -EINVAL; 747 return -EINVAL;
748 748
749 if (clk->usecount > 0) 749 if (clk->usecount > 0)
diff --git a/arch/arm/mach-omap2/cm.h b/arch/arm/mach-omap2/cm.h
index 87a44c715aa4..65fdf78c91e1 100644
--- a/arch/arm/mach-omap2/cm.h
+++ b/arch/arm/mach-omap2/cm.h
@@ -18,7 +18,7 @@
18 18
19#ifndef __ASSEMBLER__ 19#ifndef __ASSEMBLER__
20#define OMAP_CM_REGADDR(module, reg) \ 20#define OMAP_CM_REGADDR(module, reg) \
21 (void __iomem *)IO_ADDRESS(OMAP2_CM_BASE + (module) + (reg)) 21 IO_ADDRESS(OMAP2_CM_BASE + (module) + (reg))
22#else 22#else
23#define OMAP2420_CM_REGADDR(module, reg) \ 23#define OMAP2420_CM_REGADDR(module, reg) \
24 IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg)) 24 IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg))
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index f51d69bc457d..9b4e58ee2ca2 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -64,10 +64,8 @@ static struct resource gpmc_cs_mem[GPMC_CS_NUM];
64static DEFINE_SPINLOCK(gpmc_mem_lock); 64static DEFINE_SPINLOCK(gpmc_mem_lock);
65static unsigned gpmc_cs_map; 65static unsigned gpmc_cs_map;
66 66
67static void __iomem *gpmc_base = 67static void __iomem *gpmc_base = IO_ADDRESS(GPMC_BASE);
68 (void __iomem *) IO_ADDRESS(GPMC_BASE); 68static void __iomem *gpmc_cs_base = IO_ADDRESS(GPMC_BASE) + GPMC_CS0;
69static void __iomem *gpmc_cs_base =
70 (void __iomem *) IO_ADDRESS(GPMC_BASE) + GPMC_CS0;
71 69
72static struct clk *gpmc_fck; 70static struct clk *gpmc_fck;
73 71
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index a5d4526ac4d6..e53ebe7d58be 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -21,11 +21,11 @@
21#include <mach/cpu.h> 21#include <mach/cpu.h>
22 22
23#if defined(CONFIG_ARCH_OMAP2420) 23#if defined(CONFIG_ARCH_OMAP2420)
24#define TAP_BASE io_p2v(0x48014000) 24#define TAP_BASE IO_ADDRESS(0x48014000)
25#elif defined(CONFIG_ARCH_OMAP2430) 25#elif defined(CONFIG_ARCH_OMAP2430)
26#define TAP_BASE io_p2v(0x4900A000) 26#define TAP_BASE IO_ADDRESS(0x4900A000)
27#elif defined(CONFIG_ARCH_OMAP34XX) 27#elif defined(CONFIG_ARCH_OMAP34XX)
28#define TAP_BASE io_p2v(0x4830A000) 28#define TAP_BASE IO_ADDRESS(0x4830A000)
29#endif 29#endif
30 30
31#define OMAP_TAP_IDCODE 0x0204 31#define OMAP_TAP_IDCODE 0x0204
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 9ef15b31d8fc..742bd0070e63 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -32,7 +32,7 @@
32 * for each bank.. when in doubt, consult the TRM. 32 * for each bank.. when in doubt, consult the TRM.
33 */ 33 */
34static struct omap_irq_bank { 34static struct omap_irq_bank {
35 unsigned long base_reg; 35 void __iomem *base_reg;
36 unsigned int nr_irqs; 36 unsigned int nr_irqs;
37} __attribute__ ((aligned(4))) irq_banks[] = { 37} __attribute__ ((aligned(4))) irq_banks[] = {
38 { 38 {
@@ -94,7 +94,7 @@ static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank)
94 unsigned long tmp; 94 unsigned long tmp;
95 95
96 tmp = __raw_readl(bank->base_reg + INTC_REVISION) & 0xff; 96 tmp = __raw_readl(bank->base_reg + INTC_REVISION) & 0xff;
97 printk(KERN_INFO "IRQ: Found an INTC at 0x%08lx " 97 printk(KERN_INFO "IRQ: Found an INTC at 0x%p "
98 "(revision %ld.%ld) with %d interrupts\n", 98 "(revision %ld.%ld) with %d interrupts\n",
99 bank->base_reg, tmp >> 4, tmp & 0xf, bank->nr_irqs); 99 bank->base_reg, tmp >> 4, tmp & 0xf, bank->nr_irqs);
100 100
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index 27eb6e3ca926..709db03b9999 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -134,7 +134,7 @@ static struct omap_mcbsp_ops omap2_mcbsp_ops = {
134#ifdef CONFIG_ARCH_OMAP24XX 134#ifdef CONFIG_ARCH_OMAP24XX
135static struct omap_mcbsp_platform_data omap24xx_mcbsp_pdata[] = { 135static struct omap_mcbsp_platform_data omap24xx_mcbsp_pdata[] = {
136 { 136 {
137 .virt_base = IO_ADDRESS(OMAP24XX_MCBSP1_BASE), 137 .phys_base = OMAP24XX_MCBSP1_BASE,
138 .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX, 138 .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX,
139 .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX, 139 .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX,
140 .rx_irq = INT_24XX_MCBSP1_IRQ_RX, 140 .rx_irq = INT_24XX_MCBSP1_IRQ_RX,
@@ -143,7 +143,7 @@ static struct omap_mcbsp_platform_data omap24xx_mcbsp_pdata[] = {
143 .clk_name = "mcbsp_clk", 143 .clk_name = "mcbsp_clk",
144 }, 144 },
145 { 145 {
146 .virt_base = IO_ADDRESS(OMAP24XX_MCBSP2_BASE), 146 .phys_base = OMAP24XX_MCBSP2_BASE,
147 .dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX, 147 .dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX,
148 .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX, 148 .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX,
149 .rx_irq = INT_24XX_MCBSP2_IRQ_RX, 149 .rx_irq = INT_24XX_MCBSP2_IRQ_RX,
@@ -161,7 +161,7 @@ static struct omap_mcbsp_platform_data omap24xx_mcbsp_pdata[] = {
161#ifdef CONFIG_ARCH_OMAP34XX 161#ifdef CONFIG_ARCH_OMAP34XX
162static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { 162static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = {
163 { 163 {
164 .virt_base = IO_ADDRESS(OMAP34XX_MCBSP1_BASE), 164 .phys_base = OMAP34XX_MCBSP1_BASE,
165 .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX, 165 .dma_rx_sync = OMAP24XX_DMA_MCBSP1_RX,
166 .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX, 166 .dma_tx_sync = OMAP24XX_DMA_MCBSP1_TX,
167 .rx_irq = INT_24XX_MCBSP1_IRQ_RX, 167 .rx_irq = INT_24XX_MCBSP1_IRQ_RX,
@@ -170,7 +170,7 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = {
170 .clk_name = "mcbsp_clk", 170 .clk_name = "mcbsp_clk",
171 }, 171 },
172 { 172 {
173 .virt_base = IO_ADDRESS(OMAP34XX_MCBSP2_BASE), 173 .phys_base = OMAP34XX_MCBSP2_BASE,
174 .dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX, 174 .dma_rx_sync = OMAP24XX_DMA_MCBSP2_RX,
175 .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX, 175 .dma_tx_sync = OMAP24XX_DMA_MCBSP2_TX,
176 .rx_irq = INT_24XX_MCBSP2_IRQ_RX, 176 .rx_irq = INT_24XX_MCBSP2_IRQ_RX,
diff --git a/arch/arm/mach-omap2/prm.h b/arch/arm/mach-omap2/prm.h
index eb9982fb21d5..e4dc4b17881d 100644
--- a/arch/arm/mach-omap2/prm.h
+++ b/arch/arm/mach-omap2/prm.h
@@ -18,7 +18,7 @@
18 18
19#ifndef __ASSEMBLER__ 19#ifndef __ASSEMBLER__
20#define OMAP_PRM_REGADDR(module, reg) \ 20#define OMAP_PRM_REGADDR(module, reg) \
21 (void __iomem *)IO_ADDRESS(OMAP2_PRM_BASE + (module) + (reg)) 21 IO_ADDRESS(OMAP2_PRM_BASE + (module) + (reg))
22#else 22#else
23#define OMAP2420_PRM_REGADDR(module, reg) \ 23#define OMAP2420_PRM_REGADDR(module, reg) \
24 IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg)) 24 IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg))
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index adc8a26a8fb0..69651cf08305 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -32,24 +32,24 @@ static struct clk * uart3_fck = NULL;
32 32
33static struct plat_serial8250_port serial_platform_data[] = { 33static struct plat_serial8250_port serial_platform_data[] = {
34 { 34 {
35 .membase = (char *)IO_ADDRESS(OMAP_UART1_BASE), 35 .membase = IO_ADDRESS(OMAP_UART1_BASE),
36 .mapbase = (unsigned long)OMAP_UART1_BASE, 36 .mapbase = OMAP_UART1_BASE,
37 .irq = 72, 37 .irq = 72,
38 .flags = UPF_BOOT_AUTOCONF, 38 .flags = UPF_BOOT_AUTOCONF,
39 .iotype = UPIO_MEM, 39 .iotype = UPIO_MEM,
40 .regshift = 2, 40 .regshift = 2,
41 .uartclk = OMAP16XX_BASE_BAUD * 16, 41 .uartclk = OMAP16XX_BASE_BAUD * 16,
42 }, { 42 }, {
43 .membase = (char *)IO_ADDRESS(OMAP_UART2_BASE), 43 .membase = IO_ADDRESS(OMAP_UART2_BASE),
44 .mapbase = (unsigned long)OMAP_UART2_BASE, 44 .mapbase = OMAP_UART2_BASE,
45 .irq = 73, 45 .irq = 73,
46 .flags = UPF_BOOT_AUTOCONF, 46 .flags = UPF_BOOT_AUTOCONF,
47 .iotype = UPIO_MEM, 47 .iotype = UPIO_MEM,
48 .regshift = 2, 48 .regshift = 2,
49 .uartclk = OMAP16XX_BASE_BAUD * 16, 49 .uartclk = OMAP16XX_BASE_BAUD * 16,
50 }, { 50 }, {
51 .membase = (char *)IO_ADDRESS(OMAP_UART3_BASE), 51 .membase = IO_ADDRESS(OMAP_UART3_BASE),
52 .mapbase = (unsigned long)OMAP_UART3_BASE, 52 .mapbase = OMAP_UART3_BASE,
53 .irq = 74, 53 .irq = 74,
54 .flags = UPF_BOOT_AUTOCONF, 54 .flags = UPF_BOOT_AUTOCONF,
55 .iotype = UPIO_MEM, 55 .iotype = UPIO_MEM,
@@ -71,7 +71,7 @@ static inline void serial_write_reg(struct plat_serial8250_port *p, int offset,
71 int value) 71 int value)
72{ 72{
73 offset <<= p->regshift; 73 offset <<= p->regshift;
74 __raw_writeb(value, (unsigned long)(p->membase + offset)); 74 __raw_writeb(value, p->membase + offset);
75} 75}
76 76
77/* 77/*
@@ -108,7 +108,7 @@ void __init omap_serial_init()
108 struct plat_serial8250_port *p = serial_platform_data + i; 108 struct plat_serial8250_port *p = serial_platform_data + i;
109 109
110 if (!(info->enabled_uarts & (1 << i))) { 110 if (!(info->enabled_uarts & (1 << i))) {
111 p->membase = 0; 111 p->membase = NULL;
112 p->mapbase = 0; 112 p->mapbase = 0;
113 continue; 113 continue;
114 } 114 }