ARM: OMAP AM35xx: clock and hwmod data: fix UART4 data
authorPaul Walmsley <paul@pwsan.com>
Wed, 27 Jun 2012 20:53:46 +0000 (14:53 -0600)
committerPaul Walmsley <paul@pwsan.com>
Wed, 27 Jun 2012 20:53:46 +0000 (14:53 -0600)
Add missing terminators to the arrays of IRQ, DMA, and address space
structure records in the AM35xx UART4 hwmod data.  Without these
terminators, the following warnings appear on boot:

omap_uart.3: failed to claim resource 58
omap_device: omap_uart: build failed (-16)
WARNING: at /home/paul/linux/arch/arm/mach-omap2/serial.c:375 omap_serial_init_port+0x198/0x284()
Could not build omap_device for omap_uart: uart4.

Also, AM35xx uart4_fck has an incorrect parent clock pointer.  Fix it
and clean up a whitespace issue.

Fix some incorrectly-named macros related to AM35xx UART4.

Cc: Kyle Manna <kyle.manna@fuel7.com>
Cc: Mark A. Greer <mgreer@animalcreek.com>
Cc: Ranjith Lohithakshan <ranjithl@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Mark A. Greer <mgreer@animalcreek.com>
arch/arm/mach-omap2/clock3xxx_data.c
arch/arm/mach-omap2/cm-regbits-34xx.h
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
arch/arm/mach-omap2/prcm-common.h

index 15e6504..58c6e47 100644 (file)
@@ -2490,13 +2490,13 @@ static struct clk uart4_fck = {
 };
 
 static struct clk uart4_fck_am35xx = {
-       .name           = "uart4_fck",
-       .ops            = &clkops_omap2_dflt_wait,
-       .parent         = &per_48m_fck,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP3430_EN_UART4_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-       .recalc         = &followparent_recalc,
+       .name           = "uart4_fck",
+       .ops            = &clkops_omap2_dflt_wait,
+       .parent         = &core_48m_fck,
+       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
+       .enable_bit     = AM35XX_EN_UART4_SHIFT,
+       .clkdm_name     = "core_l4_clkdm",
+       .recalc         = &followparent_recalc,
 };
 
 static struct clk gpt2_fck = {
index 8083a8c..766338f 100644 (file)
 /* AM35XX specific CM_ICLKEN1_CORE bits */
 #define AM35XX_EN_IPSS_MASK                            (1 << 4)
 #define AM35XX_EN_IPSS_SHIFT                           4
-#define AM35XX_EN_UART4_MASK                           (1 << 23)
-#define AM35XX_EN_UART4_SHIFT                          23
 
 /* CM_ICLKEN2_CORE */
 #define OMAP3430_EN_PKA_MASK                           (1 << 4)
 #define OMAP3430_ST_DES2_MASK                          (1 << 26)
 #define OMAP3430_ST_MSPRO_SHIFT                                23
 #define OMAP3430_ST_MSPRO_MASK                         (1 << 23)
+#define AM35XX_ST_UART4_SHIFT                          23
+#define AM35XX_ST_UART4_MASK                           (1 << 23)
 #define OMAP3430_ST_HDQ_SHIFT                          22
 #define OMAP3430_ST_HDQ_MASK                           (1 << 22)
 #define OMAP3430ES1_ST_FAC_SHIFT                       8
index 21428fe..2f4889e 100644 (file)
@@ -527,11 +527,13 @@ static struct omap_hwmod omap36xx_uart4_hwmod = {
 
 static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
        { .irq = INT_35XX_UART4_IRQ, },
+       { .irq = -1 }
 };
 
 static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
        { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, },
        { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
+       { .dma_req = -1 }
 };
 
 static struct omap_hwmod am35xx_uart4_hwmod = {
@@ -543,9 +545,9 @@ static struct omap_hwmod am35xx_uart4_hwmod = {
                .omap2 = {
                        .module_offs = CORE_MOD,
                        .prcm_reg_id = 1,
-                       .module_bit = OMAP3430_EN_UART4_SHIFT,
+                       .module_bit = AM35XX_EN_UART4_SHIFT,
                        .idlest_reg_id = 1,
-                       .idlest_idle_bit = OMAP3430_EN_UART4_SHIFT,
+                       .idlest_idle_bit = AM35XX_ST_UART4_SHIFT,
                },
        },
        .class          = &omap2_uart_class,
@@ -2239,6 +2241,7 @@ static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = {
                .pa_end         = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1,
                .flags          = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
        },
+       { }
 };
 
 static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
index 6da3ba4..cc1398e 100644 (file)
 #define OMAP3430_EN_MMC2_SHIFT                         25
 #define OMAP3430_EN_MMC1_MASK                          (1 << 24)
 #define OMAP3430_EN_MMC1_SHIFT                         24
-#define OMAP3430_EN_UART4_MASK                         (1 << 23)
-#define OMAP3430_EN_UART4_SHIFT                                23
+#define AM35XX_EN_UART4_MASK                           (1 << 23)
+#define AM35XX_EN_UART4_SHIFT                          23
 #define OMAP3430_EN_MCSPI4_MASK                                (1 << 21)
 #define OMAP3430_EN_MCSPI4_SHIFT                       21
 #define OMAP3430_EN_MCSPI3_MASK                                (1 << 20)