]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - arch/arm/mach-omap2/board-omap4panda.c
Merge tag 'fbdev-updates-for-3.7' of git://github.com/schandinat/linux-2.6
[mirror_ubuntu-zesty-kernel.git] / arch / arm / mach-omap2 / board-omap4panda.c
index cd4852e5ca57d5928a6eaace1e1ab2ec435f49ed..bfcd397e233c8750ee2d92f85b025d70c02c0699 100644 (file)
 #include <linux/wl12xx.h>
 #include <linux/platform_data/omap-abe-twl6040.h>
 
-#include <mach/hardware.h>
 #include <asm/hardware/gic.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <video/omapdss.h>
 
-#include <plat/board.h>
 #include "common.h"
 #include <plat/usb.h>
 #include <plat/mmc.h>
 #include <video/omap-panel-tfp410.h>
 
+#include "soc.h"
 #include "hsmmc.h"
 #include "control.h"
 #include "mux.h"
@@ -172,7 +171,7 @@ static void __init omap4_ehci_init(void)
                return;
        }
        clk_set_rate(phy_ref_clk, 19200000);
-       clk_enable(phy_ref_clk);
+       clk_prepare_enable(phy_ref_clk);
 
        /* disable the power to the usb hub prior to init and reset phy+hub */
        ret = gpio_request_array(panda_ehci_gpios,
@@ -248,8 +247,7 @@ static struct platform_device omap_vwlan_device = {
 };
 
 static struct wl12xx_platform_data omap_panda_wlan_data  __initdata = {
-       /* PANDA ref clock is 38.4 MHz */
-       .board_ref_clock = 2,
+       .board_ref_clock = WL12XX_REFCLOCK_38, /* 38.4 MHz */
 };
 
 static struct twl6040_codec_data twl6040_codec = {
@@ -263,7 +261,14 @@ static struct twl6040_codec_data twl6040_codec = {
 static struct twl6040_platform_data twl6040_data = {
        .codec          = &twl6040_codec,
        .audpwron_gpio  = 127,
-       .irq_base       = TWL6040_CODEC_IRQ_BASE,
+};
+
+static struct i2c_board_info __initdata panda_i2c_1_boardinfo[] = {
+       {
+               I2C_BOARD_INFO("twl6040", 0x4b),
+               .irq = 119 + OMAP44XX_IRQ_GIC_START,
+               .platform_data = &twl6040_data,
+       },
 };
 
 /* Panda board uses the common PMIC configuration */
@@ -293,8 +298,8 @@ static int __init omap4_panda_i2c_init(void)
                        TWL_COMMON_REGULATOR_CLK32KG |
                        TWL_COMMON_REGULATOR_V1V8 |
                        TWL_COMMON_REGULATOR_V2V1);
-       omap4_pmic_init("twl6030", &omap4_panda_twldata,
-                       &twl6040_data, OMAP44XX_IRQ_SYS_2N);
+       omap4_pmic_init("twl6030", &omap4_panda_twldata, panda_i2c_1_boardinfo,
+                       ARRAY_SIZE(panda_i2c_1_boardinfo));
        omap_register_i2c_bus(2, 400, NULL, 0);
        /*
         * Bus 3 is attached to the DVI port where devices like the pico DLP
@@ -382,6 +387,21 @@ static struct omap_board_mux board_mux[] __initdata = {
        /* NIRQ2 for twl6040 */
        OMAP4_MUX(SYS_NIRQ2, OMAP_MUX_MODE0 |
                  OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE),
+       /* GPIO_127 for twl6040 */
+       OMAP4_MUX(HDQ_SIO, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT),
+       /* McPDM */
+       OMAP4_MUX(ABE_PDM_UL_DATA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
+       OMAP4_MUX(ABE_PDM_DL_DATA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
+       OMAP4_MUX(ABE_PDM_FRAME, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+       OMAP4_MUX(ABE_PDM_LB_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
+       OMAP4_MUX(ABE_CLKS, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
+       /* McBSP1 */
+       OMAP4_MUX(ABE_MCBSP1_CLKX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
+       OMAP4_MUX(ABE_MCBSP1_DR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
+       OMAP4_MUX(ABE_MCBSP1_DX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT |
+                 OMAP_PULL_ENA),
+       OMAP4_MUX(ABE_MCBSP1_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
+
        { .reg_offset = OMAP_MUX_TERMINATOR },
 };
 
@@ -495,6 +515,7 @@ static void __init omap4_panda_init(void)
 MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
        /* Maintainer: David Anders - Texas Instruments Inc */
        .atag_offset    = 0x100,
+       .smp            = smp_ops(omap4_smp_ops),
        .reserve        = omap_reserve,
        .map_io         = omap4_map_io,
        .init_early     = omap4430_init_early,