cns3xxx: add missing dma mask for ethernet device
[openwrt/openwrt.git] / target / linux / cns3xxx / files / arch / arm / mach-cns3xxx / laguna.c
index 9021f3d65f7300acb88f30f59ee169ea1af5323f..99c4108b2fa33f6d606114019af9d12d175d1bf4 100644 (file)
@@ -31,8 +31,8 @@
 #include <linux/mtd/partitions.h>
 #include <linux/leds.h>
 #include <linux/i2c.h>
-#include <linux/i2c/at24.h>
-#include <linux/i2c/pca953x.h>
+#include <linux/platform_data/at24.h>
+#include <linux/platform_data/pca953x.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/flash.h>
 #include <linux/if_ether.h>
@@ -341,12 +341,17 @@ static struct resource laguna_net_resource[] = {
        }
 };
 
+static u64 laguna_net_dmamask = DMA_BIT_MASK(32);
 static struct platform_device laguna_net_device = {
        .name = "cns3xxx_eth",
        .id = 0,
        .resource = laguna_net_resource,
        .num_resources = ARRAY_SIZE(laguna_net_resource),
-       .dev.platform_data = &laguna_net_data,
+       .dev = {
+               .dma_mask = &laguna_net_dmamask,
+               .coherent_dma_mask = DMA_BIT_MASK(32),
+               .platform_data = &laguna_net_data,
+       }
 };
 
 /*
@@ -537,7 +542,7 @@ static struct resource cns3xxx_usb_otg_resources[] = {
 static u64 cns3xxx_usb_otg_dma_mask = DMA_BIT_MASK(32);
 
 static struct platform_device cns3xxx_usb_otg_device = {
-       .name          = "dwc_otg",
+       .name          = "dwc2",
        .num_resources = ARRAY_SIZE(cns3xxx_usb_otg_resources),
        .resource      = cns3xxx_usb_otg_resources,
        .dev           = {
@@ -818,8 +823,7 @@ static void __init laguna_init(void)
        *reg |= BIT(12) | BIT(13);
 
        /* Enable MMC/SD pins */
-       reg = MISC_GPIOA_PIN_ENABLE_REG;
-       *reg |= 0xf80;
+       *reg |= BIT(7) | BIT(8) | BIT(9) | BIT(10) | BIT(11);
 
        cns3xxx_pwr_clk_en(1 << PM_CLK_GATE_REG_OFFSET_SPI_PCM_I2C);
        cns3xxx_pwr_power_up(1 << PM_CLK_GATE_REG_OFFSET_SPI_PCM_I2C);