Commit 777d466d authored by Olof Johansson's avatar Olof Johansson

Merge tag 'omap-for-v3.11/cleanup-signed' of...

Merge tag 'omap-for-v3.11/cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup

From Tony Lindgren:
Move omap4 over to device tree based booting. This allows us to get rid
a big pile of platform init code for things that are already handled by
device tree related code. As am33xx is already device tree based, we
can also remove the same data for am33xx.

* tag 'omap-for-v3.11/cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP4: hwmod data: Remove irq entries from mcspi, mmc hwmods
  ARM: OMAP4: hwmod data: add DSS data back
  ARM: OMAP4: hwmod data: Clean up the data file
  ARM: AM33XX: hwmod data: irq, dma and addr info clean up
  ARM: OMAP2+: Remove omap4 ocp2scp pdata
  ARM: OMAP2+: Remove omap4 pdata for USB
  ARM: OMAP2+: Remove omap4 pdata from hsmmc.c
  ARM: OMAP2+: Remove legacy mux data for omap4
  ARM: OMAP2+: Remove board-omap4panda.c
  ARM: OMAP2+: Remove board-4430sdp.c
  ARM: OMAP2+: Legacy support for wl12xx when booted with devicetree

Resolved merge conflict due to a fix for 3.10 (the fix is removed since
the code is no longer used -- data comes from device tree).
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents 214099b0 09182ab1
...@@ -167,12 +167,6 @@ config OMAP_PACKAGE_CUS ...@@ -167,12 +167,6 @@ config OMAP_PACKAGE_CUS
config OMAP_PACKAGE_CBP config OMAP_PACKAGE_CBP
bool bool
config OMAP_PACKAGE_CBL
bool
config OMAP_PACKAGE_CBS
bool
comment "OMAP Board Type" comment "OMAP Board Type"
depends on ARCH_OMAP2PLUS depends on ARCH_OMAP2PLUS
...@@ -378,22 +372,6 @@ config MACH_TI8148EVM ...@@ -378,22 +372,6 @@ config MACH_TI8148EVM
depends on SOC_TI81XX depends on SOC_TI81XX
default y default y
config MACH_OMAP_4430SDP
bool "OMAP 4430 SDP board"
default y
depends on ARCH_OMAP4
select OMAP_PACKAGE_CBL
select OMAP_PACKAGE_CBS
select REGULATOR_FIXED_VOLTAGE if REGULATOR
config MACH_OMAP4_PANDA
bool "OMAP4 Panda Board"
default y
depends on ARCH_OMAP4
select OMAP_PACKAGE_CBL
select OMAP_PACKAGE_CBS
select REGULATOR_FIXED_VOLTAGE if REGULATOR
config OMAP3_EMU config OMAP3_EMU
bool "OMAP3 debugging peripherals" bool "OMAP3 debugging peripherals"
depends on ARCH_OMAP3 depends on ARCH_OMAP3
......
...@@ -63,7 +63,6 @@ obj-$(CONFIG_ARCH_OMAP3) += omap3-restart.o ...@@ -63,7 +63,6 @@ obj-$(CONFIG_ARCH_OMAP3) += omap3-restart.o
obj-$(CONFIG_SOC_OMAP2420) += mux2420.o obj-$(CONFIG_SOC_OMAP2420) += mux2420.o
obj-$(CONFIG_SOC_OMAP2430) += mux2430.o obj-$(CONFIG_SOC_OMAP2430) += mux2430.o
obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o
obj-$(CONFIG_ARCH_OMAP4) += mux44xx.o
# SMS/SDRC # SMS/SDRC
obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o
...@@ -251,8 +250,6 @@ obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o ...@@ -251,8 +250,6 @@ obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o
obj-$(CONFIG_MACH_CM_T3517) += board-cm-t3517.o obj-$(CONFIG_MACH_CM_T3517) += board-cm-t3517.o
obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o
obj-$(CONFIG_MACH_TOUCHBOOK) += board-omap3touchbook.o obj-$(CONFIG_MACH_TOUCHBOOK) += board-omap3touchbook.o
obj-$(CONFIG_MACH_OMAP_4430SDP) += board-4430sdp.o
obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o
obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o
......
This diff is collapsed.
This diff is collapsed.
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/gpio.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/pinctrl/machine.h> #include <linux/pinctrl/machine.h>
#include <linux/platform_data/omap4-keypad.h> #include <linux/platform_data/omap4-keypad.h>
#include <linux/platform_data/omap_ocp2scp.h> #include <linux/wl12xx.h>
#include <linux/usb/omap_control_usb.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
...@@ -253,49 +253,6 @@ static inline void omap_init_camera(void) ...@@ -253,49 +253,6 @@ static inline void omap_init_camera(void)
#endif #endif
} }
#if IS_ENABLED(CONFIG_OMAP_CONTROL_USB)
static struct omap_control_usb_platform_data omap4_control_usb_pdata = {
.type = 1,
};
struct resource omap4_control_usb_res[] = {
{
.name = "control_dev_conf",
.start = 0x4a002300,
.end = 0x4a002303,
.flags = IORESOURCE_MEM,
},
{
.name = "otghs_control",
.start = 0x4a00233c,
.end = 0x4a00233f,
.flags = IORESOURCE_MEM,
},
};
static struct platform_device omap4_control_usb = {
.name = "omap-control-usb",
.id = -1,
.dev = {
.platform_data = &omap4_control_usb_pdata,
},
.num_resources = 2,
.resource = omap4_control_usb_res,
};
static inline void __init omap_init_control_usb(void)
{
if (!cpu_is_omap44xx())
return;
if (platform_device_register(&omap4_control_usb))
pr_err("Error registering omap_control_usb device\n");
}
#else
static inline void omap_init_control_usb(void) { }
#endif /* CONFIG_OMAP_CONTROL_USB */
int __init omap4_keyboard_init(struct omap4_keypad_platform_data int __init omap4_keyboard_init(struct omap4_keypad_platform_data
*sdp4430_keypad_data, struct omap_board_data *bdata) *sdp4430_keypad_data, struct omap_board_data *bdata)
{ {
...@@ -557,80 +514,38 @@ static void omap_init_vout(void) ...@@ -557,80 +514,38 @@ static void omap_init_vout(void)
static inline void omap_init_vout(void) {} static inline void omap_init_vout(void) {}
#endif #endif
#if defined(CONFIG_OMAP_OCP2SCP) || defined(CONFIG_OMAP_OCP2SCP_MODULE) #if IS_ENABLED(CONFIG_WL12XX)
static int count_ocp2scp_devices(struct omap_ocp2scp_dev *ocp2scp_dev)
{
int cnt = 0;
while (ocp2scp_dev->drv_name != NULL) { static struct wl12xx_platform_data wl12xx __initdata;
cnt++;
ocp2scp_dev++;
}
return cnt; void __init omap_init_wl12xx_of(void)
}
static void __init omap_init_ocp2scp(void)
{ {
struct omap_hwmod *oh; int ret;
struct platform_device *pdev;
int bus_id = -1, dev_cnt = 0, i;
struct omap_ocp2scp_dev *ocp2scp_dev;
const char *oh_name, *name;
struct omap_ocp2scp_platform_data *pdata;
if (!cpu_is_omap44xx())
return;
oh_name = "ocp2scp_usb_phy";
name = "omap-ocp2scp";
oh = omap_hwmod_lookup(oh_name); if (!of_have_populated_dt())
if (!oh) {
pr_err("%s: could not find omap_hwmod for %s\n", __func__,
oh_name);
return;
}
pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
if (!pdata) {
pr_err("%s: No memory for ocp2scp pdata\n", __func__);
return;
}
ocp2scp_dev = oh->dev_attr;
dev_cnt = count_ocp2scp_devices(ocp2scp_dev);
if (!dev_cnt) {
pr_err("%s: No devices connected to ocp2scp\n", __func__);
kfree(pdata);
return; return;
}
pdata->devices = kzalloc(sizeof(struct omap_ocp2scp_dev *) if (of_machine_is_compatible("ti,omap4-sdp")) {
* dev_cnt, GFP_KERNEL); wl12xx.board_ref_clock = WL12XX_REFCLOCK_26;
if (!pdata->devices) { wl12xx.board_tcxo_clock = WL12XX_TCXOCLOCK_26;
pr_err("%s: No memory for ocp2scp pdata devices\n", __func__); wl12xx.irq = gpio_to_irq(53);
kfree(pdata); } else if (of_machine_is_compatible("ti,omap4-panda")) {
wl12xx.board_ref_clock = WL12XX_REFCLOCK_38;
wl12xx.irq = gpio_to_irq(53);
} else {
return; return;
} }
for (i = 0; i < dev_cnt; i++, ocp2scp_dev++) ret = wl12xx_set_platform_data(&wl12xx);
pdata->devices[i] = ocp2scp_dev; if (ret) {
pr_err("error setting wl12xx data: %d\n", ret);
pdata->dev_cnt = dev_cnt;
pdev = omap_device_build(name, bus_id, oh, pdata, sizeof(*pdata));
if (IS_ERR(pdev)) {
pr_err("Could not build omap_device for %s %s\n",
name, oh_name);
kfree(pdata->devices);
kfree(pdata);
return; return;
} }
} }
#else #else
static inline void omap_init_ocp2scp(void) { } static inline void omap_init_wl12xx_of(void)
{
}
#endif #endif
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
...@@ -651,17 +566,18 @@ static int __init omap2_init_devices(void) ...@@ -651,17 +566,18 @@ static int __init omap2_init_devices(void)
omap_init_mbox(); omap_init_mbox();
/* If dtb is there, the devices will be created dynamically */ /* If dtb is there, the devices will be created dynamically */
if (!of_have_populated_dt()) { if (!of_have_populated_dt()) {
omap_init_control_usb();
omap_init_dmic(); omap_init_dmic();
omap_init_mcpdm(); omap_init_mcpdm();
omap_init_mcspi(); omap_init_mcspi();
omap_init_sham(); omap_init_sham();
omap_init_aes(); omap_init_aes();
} else {
/* These can be removed when bindings are done */
omap_init_wl12xx_of();
} }
omap_init_sti(); omap_init_sti();
omap_init_rng(); omap_init_rng();
omap_init_vout(); omap_init_vout();
omap_init_ocp2scp();
return 0; return 0;
} }
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
static u16 control_pbias_offset; static u16 control_pbias_offset;
static u16 control_devconf1_offset; static u16 control_devconf1_offset;
static u16 control_mmc1;
#define HSMMC_NAME_LEN 9 #define HSMMC_NAME_LEN 9
...@@ -121,57 +120,6 @@ static void omap_hsmmc1_after_set_reg(struct device *dev, int slot, ...@@ -121,57 +120,6 @@ static void omap_hsmmc1_after_set_reg(struct device *dev, int slot,
} }
} }
static void omap4_hsmmc1_before_set_reg(struct device *dev, int slot,
int power_on, int vdd)
{
u32 reg;
/*
* Assume we power both OMAP VMMC1 (for CMD, CLK, DAT0..3) and the
* card with Vcc regulator (from twl4030 or whatever). OMAP has both
* 1.8V and 3.0V modes, controlled by the PBIAS register.
*/
reg = omap4_ctrl_pad_readl(control_pbias_offset);
reg &= ~(OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK |
OMAP4_MMC1_PWRDNZ_MASK |
OMAP4_MMC1_PBIASLITE_VMODE_MASK);
omap4_ctrl_pad_writel(reg, control_pbias_offset);
}
static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot,
int power_on, int vdd)
{
u32 reg;
unsigned long timeout;
if (power_on) {
reg = omap4_ctrl_pad_readl(control_pbias_offset);
reg |= OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK;
if ((1 << vdd) <= MMC_VDD_165_195)
reg &= ~OMAP4_MMC1_PBIASLITE_VMODE_MASK;
else
reg |= OMAP4_MMC1_PBIASLITE_VMODE_MASK;
reg |= (OMAP4_MMC1_PBIASLITE_PWRDNZ_MASK |
OMAP4_MMC1_PWRDNZ_MASK);
omap4_ctrl_pad_writel(reg, control_pbias_offset);
timeout = jiffies + msecs_to_jiffies(5);
do {
reg = omap4_ctrl_pad_readl(control_pbias_offset);
if (!(reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK))
break;
usleep_range(100, 200);
} while (!time_after(jiffies, timeout));
if (reg & OMAP4_MMC1_PBIASLITE_VMODE_ERROR_MASK) {
pr_err("Pbias Voltage is not same as LDO\n");
/* Caution : On VMODE_ERROR Power Down MMC IO */
reg &= ~(OMAP4_MMC1_PWRDNZ_MASK);
omap4_ctrl_pad_writel(reg, control_pbias_offset);
}
}
}
static void hsmmc2_select_input_clk_src(struct omap_mmc_platform_data *mmc) static void hsmmc2_select_input_clk_src(struct omap_mmc_platform_data *mmc)
{ {
u32 reg; u32 reg;
...@@ -317,11 +265,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, ...@@ -317,11 +265,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
mmc->slots[0].pm_caps = c->pm_caps; mmc->slots[0].pm_caps = c->pm_caps;
mmc->slots[0].internal_clock = !c->ext_clock; mmc->slots[0].internal_clock = !c->ext_clock;
mmc->max_freq = c->max_freq; mmc->max_freq = c->max_freq;
if (cpu_is_omap44xx()) mmc->reg_offset = 0;
mmc->reg_offset = OMAP4_MMC_REG_OFFSET;
else
mmc->reg_offset = 0;
mmc->get_context_loss_count = hsmmc_get_context_loss; mmc->get_context_loss_count = hsmmc_get_context_loss;
mmc->slots[0].switch_pin = c->gpio_cd; mmc->slots[0].switch_pin = c->gpio_cd;
...@@ -368,24 +312,14 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, ...@@ -368,24 +312,14 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
if (!soc_is_am35xx()) if (!soc_is_am35xx())
mmc->slots[0].features |= HSMMC_HAS_PBIAS; mmc->slots[0].features |= HSMMC_HAS_PBIAS;
if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0))
mmc->slots[0].features |= HSMMC_HAS_UPDATED_RESET;
switch (c->mmc) { switch (c->mmc) {
case 1: case 1:
if (mmc->slots[0].features & HSMMC_HAS_PBIAS) { if (mmc->slots[0].features & HSMMC_HAS_PBIAS) {
/* on-chip level shifting via PBIAS0/PBIAS1 */ /* on-chip level shifting via PBIAS0/PBIAS1 */
if (cpu_is_omap44xx()) { mmc->slots[0].before_set_reg =
mmc->slots[0].before_set_reg = omap_hsmmc1_before_set_reg;
omap4_hsmmc1_before_set_reg; mmc->slots[0].after_set_reg =
mmc->slots[0].after_set_reg = omap_hsmmc1_after_set_reg;
omap4_hsmmc1_after_set_reg;
} else {
mmc->slots[0].before_set_reg =
omap_hsmmc1_before_set_reg;
mmc->slots[0].after_set_reg =
omap_hsmmc1_after_set_reg;
}
} }
if (soc_is_am35xx()) if (soc_is_am35xx())
...@@ -563,34 +497,17 @@ static void __init omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo, ...@@ -563,34 +497,17 @@ static void __init omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo,
void __init omap_hsmmc_init(struct omap2_hsmmc_info *controllers) void __init omap_hsmmc_init(struct omap2_hsmmc_info *controllers)
{ {
u32 reg;
if (omap_hsmmc_done) if (omap_hsmmc_done)
return; return;
omap_hsmmc_done = 1; omap_hsmmc_done = 1;
if (!cpu_is_omap44xx()) { if (cpu_is_omap2430()) {
if (cpu_is_omap2430()) { control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE;
control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE; control_devconf1_offset = OMAP243X_CONTROL_DEVCONF1;
control_devconf1_offset = OMAP243X_CONTROL_DEVCONF1;
} else {
control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE;
control_devconf1_offset = OMAP343X_CONTROL_DEVCONF1;
}
} else { } else {
control_pbias_offset = control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE;
OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_PBIASLITE; control_devconf1_offset = OMAP343X_CONTROL_DEVCONF1;
control_mmc1 = OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_MMC1;
reg = omap4_ctrl_pad_readl(control_mmc1);
reg |= (OMAP4_SDMMC1_PUSTRENGTH_GRP0_MASK |
OMAP4_SDMMC1_PUSTRENGTH_GRP1_MASK);
reg &= ~(OMAP4_SDMMC1_PUSTRENGTH_GRP2_MASK |
OMAP4_SDMMC1_PUSTRENGTH_GRP3_MASK);
reg |= (OMAP4_SDMMC1_DR0_SPEEDCTRL_MASK |
OMAP4_SDMMC1_DR1_SPEEDCTRL_MASK |
OMAP4_SDMMC1_DR2_SPEEDCTRL_MASK);
omap4_ctrl_pad_writel(reg, control_mmc1);
} }
for (; controllers->mmc; controllers++) for (; controllers->mmc; controllers++)
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "mux2420.h" #include "mux2420.h"
#include "mux2430.h" #include "mux2430.h"
#include "mux34xx.h" #include "mux34xx.h"
#include "mux44xx.h"
#define OMAP_MUX_TERMINATOR 0xffff #define OMAP_MUX_TERMINATOR 0xffff
...@@ -64,8 +63,6 @@ ...@@ -64,8 +63,6 @@
/* Flags for omapX_mux_init */ /* Flags for omapX_mux_init */
#define OMAP_PACKAGE_MASK 0xffff #define OMAP_PACKAGE_MASK 0xffff
#define OMAP_PACKAGE_CBS 8 /* 547-pin 0.40 0.40 */
#define OMAP_PACKAGE_CBL 7 /* 547-pin 0.40 0.40 */
#define OMAP_PACKAGE_CBP 6 /* 515-pin 0.40 0.50 */ #define OMAP_PACKAGE_CBP 6 /* 515-pin 0.40 0.50 */
#define OMAP_PACKAGE_CUS 5 /* 423-pin 0.65 */ #define OMAP_PACKAGE_CUS 5 /* 423-pin 0.65 */
#define OMAP_PACKAGE_CBB 4 /* 515-pin 0.40 0.50 */ #define OMAP_PACKAGE_CBB 4 /* 515-pin 0.40 0.50 */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -188,125 +188,6 @@ static void __init setup_ehci_io_mux(const enum usbhs_omap_port_mode *port_mode) ...@@ -188,125 +188,6 @@ static void __init setup_ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
return; return;
} }
static
void __init setup_4430ehci_io_mux(const enum usbhs_omap_port_mode *port_mode)
{
switch (port_mode[0]) {
case OMAP_EHCI_PORT_MODE_PHY:
omap_mux_init_signal("usbb1_ulpiphy_stp",
OMAP_PIN_OUTPUT);
omap_mux_init_signal("usbb1_ulpiphy_clk",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpiphy_dir",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpiphy_nxt",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpiphy_dat0",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpiphy_dat1",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpiphy_dat2",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpiphy_dat3",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpiphy_dat4",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpiphy_dat5",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpiphy_dat6",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpiphy_dat7",
OMAP_PIN_INPUT_PULLDOWN);
break;
case OMAP_EHCI_PORT_MODE_TLL:
omap_mux_init_signal("usbb1_ulpitll_stp",
OMAP_PIN_INPUT_PULLUP);
omap_mux_init_signal("usbb1_ulpitll_clk",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpitll_dir",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpitll_nxt",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpitll_dat0",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpitll_dat1",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpitll_dat2",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpitll_dat3",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpitll_dat4",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpitll_dat5",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpitll_dat6",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_ulpitll_dat7",
OMAP_PIN_INPUT_PULLDOWN);
break;
case OMAP_USBHS_PORT_MODE_UNUSED:
default:
break;
}
switch (port_mode[1]) {
case OMAP_EHCI_PORT_MODE_PHY:
omap_mux_init_signal("usbb2_ulpiphy_stp",
OMAP_PIN_OUTPUT);
omap_mux_init_signal("usbb2_ulpiphy_clk",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpiphy_dir",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpiphy_nxt",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpiphy_dat0",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpiphy_dat1",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpiphy_dat2",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpiphy_dat3",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpiphy_dat4",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpiphy_dat5",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpiphy_dat6",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpiphy_dat7",
OMAP_PIN_INPUT_PULLDOWN);
break;
case OMAP_EHCI_PORT_MODE_TLL:
omap_mux_init_signal("usbb2_ulpitll_stp",
OMAP_PIN_INPUT_PULLUP);
omap_mux_init_signal("usbb2_ulpitll_clk",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpitll_dir",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpitll_nxt",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpitll_dat0",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpitll_dat1",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpitll_dat2",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpitll_dat3",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpitll_dat4",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpitll_dat5",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpitll_dat6",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_ulpitll_dat7",
OMAP_PIN_INPUT_PULLDOWN);
break;
case OMAP_USBHS_PORT_MODE_UNUSED:
default:
break;
}
}
static void __init setup_ohci_io_mux(const enum usbhs_omap_port_mode *port_mode) static void __init setup_ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
{ {
switch (port_mode[0]) { switch (port_mode[0]) {
...@@ -404,78 +285,6 @@ static void __init setup_ohci_io_mux(const enum usbhs_omap_port_mode *port_mode) ...@@ -404,78 +285,6 @@ static void __init setup_ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
} }
} }
static
void __init setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
{
switch (port_mode[0]) {
case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0:
case OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM:
case OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0:
case OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM:
omap_mux_init_signal("usbb1_mm_rxdp",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_mm_rxdm",
OMAP_PIN_INPUT_PULLDOWN);
case OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM:
case OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM:
omap_mux_init_signal("usbb1_mm_rxrcv",
OMAP_PIN_INPUT_PULLDOWN);
case OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0:
case OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0:
omap_mux_init_signal("usbb1_mm_txen",
OMAP_PIN_INPUT_PULLDOWN);
case OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0:
case OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM:
omap_mux_init_signal("usbb1_mm_txdat",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb1_mm_txse0",
OMAP_PIN_INPUT_PULLDOWN);
break;
case OMAP_USBHS_PORT_MODE_UNUSED:
default:
break;
}
switch (port_mode[1]) {
case OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0:
case OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM:
case OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0:
case OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM:
omap_mux_init_signal("usbb2_mm_rxdp",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_mm_rxdm",
OMAP_PIN_INPUT_PULLDOWN);
case OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM:
case OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM:
omap_mux_init_signal("usbb2_mm_rxrcv",
OMAP_PIN_INPUT_PULLDOWN);
case OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0:
case OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0:
omap_mux_init_signal("usbb2_mm_txen",
OMAP_PIN_INPUT_PULLDOWN);
case OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0:
case OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM:
omap_mux_init_signal("usbb2_mm_txdat",
OMAP_PIN_INPUT_PULLDOWN);
omap_mux_init_signal("usbb2_mm_txse0",
OMAP_PIN_INPUT_PULLDOWN);
break;
case OMAP_USBHS_PORT_MODE_UNUSED:
default:
break;
}
}
void __init usbhs_init(struct usbhs_omap_platform_data *pdata) void __init usbhs_init(struct usbhs_omap_platform_data *pdata)
{ {
struct omap_hwmod *uhh_hwm, *tll_hwm; struct omap_hwmod *uhh_hwm, *tll_hwm;
...@@ -489,9 +298,6 @@ void __init usbhs_init(struct usbhs_omap_platform_data *pdata) ...@@ -489,9 +298,6 @@ void __init usbhs_init(struct usbhs_omap_platform_data *pdata)
if (omap_rev() <= OMAP3430_REV_ES2_1) if (omap_rev() <= OMAP3430_REV_ES2_1)
pdata->single_ulpi_bypass = true; pdata->single_ulpi_bypass = true;
} else if (cpu_is_omap44xx()) {
setup_4430ehci_io_mux(pdata->port_mode);
setup_4430ohci_io_mux(pdata->port_mode);
} }
uhh_hwm = omap_hwmod_lookup(USBHS_UHH_HWMODNAME); uhh_hwm = omap_hwmod_lookup(USBHS_UHH_HWMODNAME);
......
...@@ -85,9 +85,6 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data) ...@@ -85,9 +85,6 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data)
musb_plat.mode = board_data->mode; musb_plat.mode = board_data->mode;
musb_plat.extvbus = board_data->extvbus; musb_plat.extvbus = board_data->extvbus;
if (cpu_is_omap44xx())
musb_plat.has_mailbox = true;
if (soc_is_am35xx()) { if (soc_is_am35xx()) {
oh_name = "am35x_otg_hs"; oh_name = "am35x_otg_hs";
name = "musb-am35x"; name = "musb-am35x";
......
...@@ -22,26 +22,6 @@ ...@@ -22,26 +22,6 @@
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/platform_data/omap_ocp2scp.h>
/**
* _count_resources - count for the number of resources
* @res: struct resource *
*
* Count and return the number of resources populated for the device that is
* connected to ocp2scp.
*/
static unsigned _count_resources(struct resource *res)
{
int cnt = 0;
while (res->start != res->end) {
cnt++;
res++;
}
return cnt;
}
static int ocp2scp_remove_devices(struct device *dev, void *c) static int ocp2scp_remove_devices(struct device *dev, void *c)
{ {
...@@ -55,11 +35,7 @@ static int ocp2scp_remove_devices(struct device *dev, void *c) ...@@ -55,11 +35,7 @@ static int ocp2scp_remove_devices(struct device *dev, void *c)
static int omap_ocp2scp_probe(struct platform_device *pdev) static int omap_ocp2scp_probe(struct platform_device *pdev)
{ {
int ret; int ret;
unsigned res_cnt, i;
struct device_node *np = pdev->dev.of_node; struct device_node *np = pdev->dev.of_node;
struct platform_device *pdev_child;
struct omap_ocp2scp_platform_data *pdata = pdev->dev.platform_data;
struct omap_ocp2scp_dev *dev;
if (np) { if (np) {
ret = of_platform_populate(np, NULL, NULL, &pdev->dev); ret = of_platform_populate(np, NULL, NULL, &pdev->dev);
...@@ -68,48 +44,12 @@ static int omap_ocp2scp_probe(struct platform_device *pdev) ...@@ -68,48 +44,12 @@ static int omap_ocp2scp_probe(struct platform_device *pdev)
"failed to add resources for ocp2scp child\n"); "failed to add resources for ocp2scp child\n");
goto err0; goto err0;
} }
} else if (pdata) {
for (i = 0, dev = *pdata->devices; i < pdata->dev_cnt; i++,
dev++) {
res_cnt = _count_resources(dev->res);
pdev_child = platform_device_alloc(dev->drv_name,
PLATFORM_DEVID_AUTO);
if (!pdev_child) {
dev_err(&pdev->dev,
"failed to allocate mem for ocp2scp child\n");
goto err0;
}
ret = platform_device_add_resources(pdev_child,
dev->res, res_cnt);
if (ret) {
dev_err(&pdev->dev,
"failed to add resources for ocp2scp child\n");
goto err1;
}
pdev_child->dev.parent = &pdev->dev;
ret = platform_device_add(pdev_child);
if (ret) {
dev_err(&pdev->dev,
"failed to register ocp2scp child device\n");
goto err1;
}
}
} else {
dev_err(&pdev->dev, "OCP2SCP initialized without plat data\n");
return -EINVAL;
} }
pm_runtime_enable(&pdev->dev); pm_runtime_enable(&pdev->dev);
return 0; return 0;
err1:
platform_device_put(pdev_child);
err0: err0:
device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices); device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices);
......
/*
* omap_ocp2scp.h -- ocp2scp header file
*
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Author: Kishon Vijay Abraham I <kishon@ti.com>
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef __DRIVERS_OMAP_OCP2SCP_H
#define __DRIVERS_OMAP_OCP2SCP_H
struct omap_ocp2scp_dev {
const char *drv_name;
struct resource *res;
};
struct omap_ocp2scp_platform_data {
int dev_cnt;
struct omap_ocp2scp_dev **devices;
};
#endif /* __DRIVERS_OMAP_OCP2SCP_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment