summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c3
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c1
-rw-r--r--arch/arm/mach-omap2/board-ldp.c3
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c1
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c1
-rw-r--r--arch/arm/mach-omap2/control.c1
-rw-r--r--arch/arm/mach-omap2/devices.c12
-rw-r--r--arch/arm/mach-omap2/id.c2
-rw-r--r--arch/arm/mach-omap2/serial.c3
-rw-r--r--arch/arm/mach-omap2/twl-common.c1
-rw-r--r--arch/arm/mach-omap2/usb-host.c106
11 files changed, 72 insertions, 62 deletions
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index ee6218c..d4622ed 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -293,7 +293,8 @@ static struct regulator_consumer_supply cm_t35_vsim_supply[] = {
static struct regulator_consumer_supply cm_t35_vio_supplies[] = {
REGULATOR_SUPPLY("vcc", "spi1.0"),
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
- REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
+ REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"),
+ REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
};
/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 5764205..f1d91ba 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -222,6 +222,7 @@ static struct twl4030_gpio_platform_data devkit8000_gpio_data = {
static struct regulator_consumer_supply devkit8000_vpll1_supplies[] = {
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
+ REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"),
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
};
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index d0d17bc..62e4f70 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -272,7 +272,8 @@ static struct regulator_init_data ldp_vaux1 = {
static struct regulator_consumer_supply ldp_vpll2_supplies[] = {
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
- REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
+ REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"),
+ REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
};
static struct regulator_init_data ldp_vpll2 = {
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 28133d5..b1547a0 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -343,6 +343,7 @@ static struct regulator_consumer_supply pandora_vmmc3_supply[] = {
static struct regulator_consumer_supply pandora_vdds_supplies[] = {
REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
+ REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"),
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
};
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 18ca61e..9c2dd10 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -553,6 +553,7 @@ static struct regulator_consumer_supply rx51_vio_supplies[] = {
static struct regulator_consumer_supply rx51_vaux1_consumers[] = {
REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
+ REGULATOR_SUPPLY("vdds_sdi", "omapdss_sdi.0"),
/* Si4713 supply */
REGULATOR_SUPPLY("vdd", "2-0063"),
/* lis3lv02d */
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index 2adb268..31e0dfe 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -249,6 +249,7 @@ void omap_ctrl_write_dsp_boot_addr(u32 bootaddr)
u32 offset = cpu_is_omap243x() ? OMAP243X_CONTROL_IVA2_BOOTADDR :
cpu_is_omap34xx() ? OMAP343X_CONTROL_IVA2_BOOTADDR :
cpu_is_omap44xx() ? OMAP4_CTRL_MODULE_CORE_DSP_BOOTADDR :
+ soc_is_omap54xx() ? OMAP4_CTRL_MODULE_CORE_DSP_BOOTADDR :
0;
if (!offset) {
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index f874a3d..403c211 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -330,10 +330,8 @@ static void __init omap_init_mcpdm(void)
struct platform_device *pdev;
oh = omap_hwmod_lookup("mcpdm");
- if (!oh) {
- printk(KERN_ERR "Could not look up mcpdm hw_mod\n");
+ if (!oh)
return;
- }
pdev = omap_device_build("omap-mcpdm", -1, oh, NULL, 0);
WARN(IS_ERR(pdev), "Can't build omap_device for omap-mcpdm.\n");
@@ -351,10 +349,8 @@ static void __init omap_init_dmic(void)
struct platform_device *pdev;
oh = omap_hwmod_lookup("dmic");
- if (!oh) {
- pr_err("Could not look up dmic hw_mod\n");
+ if (!oh)
return;
- }
pdev = omap_device_build("omap-dmic", -1, oh, NULL, 0);
WARN(IS_ERR(pdev), "Can't build omap_device for omap-dmic.\n");
@@ -377,10 +373,8 @@ static void __init omap_init_hdmi_audio(void)
struct platform_device *pdev;
oh = omap_hwmod_lookup("dss_hdmi");
- if (!oh) {
- printk(KERN_ERR "Could not look up dss_hdmi hw_mod\n");
+ if (!oh)
return;
- }
pdev = omap_device_build("omap-hdmi-audio-dai", -1, oh, NULL, 0);
WARN(IS_ERR(pdev),
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 1272c41..54e4c16 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -601,7 +601,7 @@ void __init omap2_set_globals_tap(u32 class, void __iomem *tap)
#ifdef CONFIG_SOC_BUS
-static const char const *omap_types[] = {
+static const char * const omap_types[] = {
[OMAP2_DEVICE_TYPE_TEST] = "TST",
[OMAP2_DEVICE_TYPE_EMU] = "EMU",
[OMAP2_DEVICE_TYPE_SEC] = "HS",
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 58d5b56..3a674de 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -175,6 +175,9 @@ static char *cmdline_find_option(char *str)
static int __init omap_serial_early_init(void)
{
+ if (of_have_populated_dt())
+ return -ENODEV;
+
do {
char oh_name[MAX_UART_HWMOD_NAME_LEN];
struct omap_hwmod *oh;
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index 51e138c..c05898f 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -140,6 +140,7 @@ static struct regulator_init_data omap3_vdac_idata = {
static struct regulator_consumer_supply omap3_vpll2_supplies[] = {
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
+ REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"),
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
};
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c
index 544c92b..2eb19d4 100644
--- a/arch/arm/mach-omap2/usb-host.c
+++ b/arch/arm/mach-omap2/usb-host.c
@@ -28,6 +28,7 @@
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/usb/phy.h>
+#include <linux/usb/nop-usb-xceiv.h>
#include "soc.h"
#include "omap_device.h"
@@ -366,7 +367,8 @@ static int usbhs_add_regulator(char *name, char *dev_id, char *dev_supply,
struct regulator_init_data *reg_data;
struct fixed_voltage_config *config;
struct platform_device *pdev;
- int ret;
+ struct platform_device_info pdevinfo;
+ int ret = -ENOMEM;
supplies = kzalloc(sizeof(*supplies), GFP_KERNEL);
if (!supplies)
@@ -377,7 +379,7 @@ static int usbhs_add_regulator(char *name, char *dev_id, char *dev_supply,
reg_data = kzalloc(sizeof(*reg_data), GFP_KERNEL);
if (!reg_data)
- return -ENOMEM;
+ goto err_data;
reg_data->constraints.valid_ops_mask = REGULATOR_CHANGE_STATUS;
reg_data->consumer_supplies = supplies;
@@ -386,39 +388,53 @@ static int usbhs_add_regulator(char *name, char *dev_id, char *dev_supply,
config = kmemdup(&hsusb_reg_config, sizeof(hsusb_reg_config),
GFP_KERNEL);
if (!config)
- return -ENOMEM;
+ goto err_config;
+
+ config->supply_name = kstrdup(name, GFP_KERNEL);
+ if (!config->supply_name)
+ goto err_supplyname;
- config->supply_name = name;
config->gpio = gpio;
config->enable_high = polarity;
config->init_data = reg_data;
/* create a regulator device */
- pdev = kzalloc(sizeof(*pdev), GFP_KERNEL);
- if (!pdev)
- return -ENOMEM;
+ memset(&pdevinfo, 0, sizeof(pdevinfo));
+ pdevinfo.name = reg_name;
+ pdevinfo.id = PLATFORM_DEVID_AUTO;
+ pdevinfo.data = config;
+ pdevinfo.size_data = sizeof(*config);
- pdev->id = PLATFORM_DEVID_AUTO;
- pdev->name = reg_name;
- pdev->dev.platform_data = config;
+ pdev = platform_device_register_full(&pdevinfo);
+ if (IS_ERR(pdev)) {
+ ret = PTR_ERR(pdev);
+ pr_err("%s: Failed registering regulator %s for %s : %d\n",
+ __func__, name, dev_id, ret);
+ goto err_register;
+ }
- ret = platform_device_register(pdev);
- if (ret)
- pr_err("%s: Failed registering regulator %s for %s\n",
- __func__, name, dev_id);
+ return 0;
+err_register:
+ kfree(config->supply_name);
+err_supplyname:
+ kfree(config);
+err_config:
+ kfree(reg_data);
+err_data:
+ kfree(supplies);
return ret;
}
+#define MAX_STR 20
+
int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
{
- char *rail_name;
- int i, len;
+ char rail_name[MAX_STR];
+ int i;
struct platform_device *pdev;
char *phy_id;
-
- /* the phy_id will be something like "nop_usb_xceiv.1" */
- len = strlen(nop_name) + 3; /* 3 -> ".1" and NULL terminator */
+ struct platform_device_info pdevinfo;
for (i = 0; i < num_phys; i++) {
@@ -433,25 +449,26 @@ int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
!gpio_is_valid(phy->vcc_gpio))
continue;
- /* create a NOP PHY device */
- pdev = kzalloc(sizeof(*pdev), GFP_KERNEL);
- if (!pdev)
- return -ENOMEM;
-
- pdev->id = phy->port;
- pdev->name = nop_name;
- pdev->dev.platform_data = phy->platform_data;
-
- phy_id = kmalloc(len, GFP_KERNEL);
- if (!phy_id)
+ phy_id = kmalloc(MAX_STR, GFP_KERNEL);
+ if (!phy_id) {
+ pr_err("%s: kmalloc() failed\n", __func__);
return -ENOMEM;
+ }
- scnprintf(phy_id, len, "nop_usb_xceiv.%d\n",
- pdev->id);
-
- if (platform_device_register(pdev)) {
- pr_err("%s: Failed to register device %s\n",
- __func__, phy_id);
+ /* create a NOP PHY device */
+ memset(&pdevinfo, 0, sizeof(pdevinfo));
+ pdevinfo.name = nop_name;
+ pdevinfo.id = phy->port;
+ pdevinfo.data = phy->platform_data;
+ pdevinfo.size_data = sizeof(struct nop_usb_xceiv_platform_data);
+
+ scnprintf(phy_id, MAX_STR, "nop_usb_xceiv.%d",
+ phy->port);
+ pdev = platform_device_register_full(&pdevinfo);
+ if (IS_ERR(pdev)) {
+ pr_err("%s: Failed to register device %s : %ld\n",
+ __func__, phy_id, PTR_ERR(pdev));
+ kfree(phy_id);
continue;
}
@@ -459,26 +476,15 @@ int usbhs_init_phys(struct usbhs_phy_data *phy, int num_phys)
/* Do we need RESET regulator ? */
if (gpio_is_valid(phy->reset_gpio)) {
-
- rail_name = kmalloc(13, GFP_KERNEL);
- if (!rail_name)
- return -ENOMEM;
-
- scnprintf(rail_name, 13, "hsusb%d_reset", phy->port);
-
+ scnprintf(rail_name, MAX_STR,
+ "hsusb%d_reset", phy->port);
usbhs_add_regulator(rail_name, phy_id, "reset",
phy->reset_gpio, 1);
}
/* Do we need VCC regulator ? */
if (gpio_is_valid(phy->vcc_gpio)) {
-
- rail_name = kmalloc(13, GFP_KERNEL);
- if (!rail_name)
- return -ENOMEM;
-
- scnprintf(rail_name, 13, "hsusb%d_vcc", phy->port);
-
+ scnprintf(rail_name, MAX_STR, "hsusb%d_vcc", phy->port);
usbhs_add_regulator(rail_name, phy_id, "vcc",
phy->vcc_gpio, phy->vcc_polarity);
}