diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-09 17:39:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-09 17:39:22 -0500 |
commit | 2ac9d7aaccbd598b5bd19ac40761b723bb675442 (patch) | |
tree | 09132a44e33798aaa5e80f10bf025b510015cab3 /arch/arm/mach-omap2 | |
parent | 5ede3ceb7b2c2843e153a1803edbdc8c56655950 (diff) | |
parent | dcf7ec5ee62a78123057a1e286c88ca739717409 (diff) |
Merge tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Driver specific changes
Again, a lot of platforms have changes in here: pxa, samsung, omap,
at91, imx, ...
* tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (54 commits)
ARM: sa1100: clean up of the clock support
ARM: pxa: add dummy clock for sa1100-rtc
RTC: sa1100: support sa1100, pxa and mmp soc families
RTC: sa1100: remove redundant code of setting alarm
RTC: sa1100: Clean out ost register
Input: zylonite-wm97xx - replace IRQ_GPIO() with gpio_to_irq()
pcmcia: pxa: replace IRQ_GPIO() with gpio_to_irq()
ARM: EXYNOS: Modified files for SPI consolidation work
ARM: S5P64X0: Enable SDHCI support
ARM: S5P64X0: Add lookup of sdhci-s3c clocks using generic names
ARM: S5P64X0: Add HSMMC setup for host Controller
ARM: EXYNOS: Add USB OHCI support to ORIGEN board
USB: Add Samsung Exynos OHCI diver
ARM: EXYNOS: Add USB OHCI support to SMDKV310 board
ARM: EXYNOS: Add USB OHCI device
net: macb: fix build break with !CONFIG_OF
i2c: tegra: Support DVC controller in device tree
i2c: tegra: Add __devinit/exit to probe/remove
net/at91_ether: use gpio_is_valid for phy IRQ line
ARM: at91/net: add macb ethernet controller in 9g45/9g20 DT
...
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-am3517evm.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock3xxx_data.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock44xx_data.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/hsmmc.c | 59 | ||||
-rw-r--r-- | arch/arm/mach-omap2/hsmmc.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/usb-host.c | 100 |
7 files changed, 119 insertions, 100 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 5598e00ccf52..4b4c9e25a83e 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -410,6 +410,7 @@ static struct omap2_hsmmc_info mmc[] = { | |||
410 | { | 410 | { |
411 | .mmc = 5, | 411 | .mmc = 5, |
412 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, | 412 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, |
413 | .pm_caps = MMC_PM_KEEP_POWER, | ||
413 | .gpio_cd = -EINVAL, | 414 | .gpio_cd = -EINVAL, |
414 | .gpio_wp = -EINVAL, | 415 | .gpio_wp = -EINVAL, |
415 | .ocr_mask = MMC_VDD_165_195, | 416 | .ocr_mask = MMC_VDD_165_195, |
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index f5a3a3f11739..4b1cfe32e6ba 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/i2c/pca953x.h> | 24 | #include <linux/i2c/pca953x.h> |
25 | #include <linux/can/platform/ti_hecc.h> | 25 | #include <linux/can/platform/ti_hecc.h> |
26 | #include <linux/davinci_emac.h> | 26 | #include <linux/davinci_emac.h> |
27 | #include <linux/mmc/host.h> | ||
27 | 28 | ||
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
29 | #include <mach/am35xx.h> | 30 | #include <mach/am35xx.h> |
@@ -40,6 +41,7 @@ | |||
40 | 41 | ||
41 | #include "mux.h" | 42 | #include "mux.h" |
42 | #include "control.h" | 43 | #include "control.h" |
44 | #include "hsmmc.h" | ||
43 | 45 | ||
44 | #define AM35XX_EVM_MDIO_FREQUENCY (1000000) | 46 | #define AM35XX_EVM_MDIO_FREQUENCY (1000000) |
45 | 47 | ||
@@ -455,6 +457,23 @@ static void am3517_evm_hecc_init(struct ti_hecc_platform_data *pdata) | |||
455 | static struct omap_board_config_kernel am3517_evm_config[] __initdata = { | 457 | static struct omap_board_config_kernel am3517_evm_config[] __initdata = { |
456 | }; | 458 | }; |
457 | 459 | ||
460 | static struct omap2_hsmmc_info mmc[] = { | ||
461 | { | ||
462 | .mmc = 1, | ||
463 | .caps = MMC_CAP_4_BIT_DATA, | ||
464 | .gpio_cd = 127, | ||
465 | .gpio_wp = 126, | ||
466 | }, | ||
467 | { | ||
468 | .mmc = 2, | ||
469 | .caps = MMC_CAP_4_BIT_DATA, | ||
470 | .gpio_cd = 128, | ||
471 | .gpio_wp = 129, | ||
472 | }, | ||
473 | {} /* Terminator */ | ||
474 | }; | ||
475 | |||
476 | |||
458 | static void __init am3517_evm_init(void) | 477 | static void __init am3517_evm_init(void) |
459 | { | 478 | { |
460 | omap_board_config = am3517_evm_config; | 479 | omap_board_config = am3517_evm_config; |
@@ -483,6 +502,9 @@ static void __init am3517_evm_init(void) | |||
483 | 502 | ||
484 | /* MUSB */ | 503 | /* MUSB */ |
485 | am3517_evm_musb_init(); | 504 | am3517_evm_musb_init(); |
505 | |||
506 | /* MMC init function */ | ||
507 | omap2_hsmmc_init(mmc); | ||
486 | } | 508 | } |
487 | 509 | ||
488 | MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") | 510 | MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") |
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index 039cadf84c11..d75e5f6b8a01 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c | |||
@@ -3297,7 +3297,7 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3297 | CLK(NULL, "cpefuse_fck", &cpefuse_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3297 | CLK(NULL, "cpefuse_fck", &cpefuse_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3298 | CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3298 | CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3299 | CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3299 | CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3300 | CLK("usbhs-omap.0", "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3300 | CLK("usbhs_omap", "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3301 | CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX), | 3301 | CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX), |
3302 | CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX), | 3302 | CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX), |
3303 | CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), | 3303 | CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), |
@@ -3333,7 +3333,7 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3333 | CLK(NULL, "pka_ick", &pka_ick, CK_34XX | CK_36XX), | 3333 | CLK(NULL, "pka_ick", &pka_ick, CK_34XX | CK_36XX), |
3334 | CLK(NULL, "core_l4_ick", &core_l4_ick, CK_3XXX), | 3334 | CLK(NULL, "core_l4_ick", &core_l4_ick, CK_3XXX), |
3335 | CLK(NULL, "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3335 | CLK(NULL, "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3336 | CLK("usbhs-omap.0", "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3336 | CLK("usbhs_omap", "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3337 | CLK("omap_hsmmc.2", "ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3337 | CLK("omap_hsmmc.2", "ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3338 | CLK(NULL, "icr_ick", &icr_ick, CK_34XX | CK_36XX), | 3338 | CLK(NULL, "icr_ick", &icr_ick, CK_34XX | CK_36XX), |
3339 | CLK("omap-aes", "ick", &aes2_ick, CK_34XX | CK_36XX), | 3339 | CLK("omap-aes", "ick", &aes2_ick, CK_34XX | CK_36XX), |
@@ -3379,20 +3379,18 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3379 | CLK(NULL, "cam_ick", &cam_ick, CK_34XX | CK_36XX), | 3379 | CLK(NULL, "cam_ick", &cam_ick, CK_34XX | CK_36XX), |
3380 | CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_34XX | CK_36XX), | 3380 | CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_34XX | CK_36XX), |
3381 | CLK(NULL, "usbhost_120m_fck", &usbhost_120m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3381 | CLK(NULL, "usbhost_120m_fck", &usbhost_120m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3382 | CLK("usbhs-omap.0", "hs_fck", &usbhost_120m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | ||
3383 | CLK(NULL, "usbhost_48m_fck", &usbhost_48m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3382 | CLK(NULL, "usbhost_48m_fck", &usbhost_48m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3384 | CLK("usbhs-omap.0", "fs_fck", &usbhost_48m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | ||
3385 | CLK(NULL, "usbhost_ick", &usbhost_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3383 | CLK(NULL, "usbhost_ick", &usbhost_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3386 | CLK("usbhs-omap.0", "usbhost_ick", &usbhost_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), | 3384 | CLK("usbhs_omap", "usbhost_ick", &usbhost_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), |
3387 | CLK("usbhs-omap.0", "utmi_p1_gfclk", &dummy_ck, CK_3XXX), | 3385 | CLK("usbhs_omap", "utmi_p1_gfclk", &dummy_ck, CK_3XXX), |
3388 | CLK("usbhs-omap.0", "utmi_p2_gfclk", &dummy_ck, CK_3XXX), | 3386 | CLK("usbhs_omap", "utmi_p2_gfclk", &dummy_ck, CK_3XXX), |
3389 | CLK("usbhs-omap.0", "xclk60mhsp1_ck", &dummy_ck, CK_3XXX), | 3387 | CLK("usbhs_omap", "xclk60mhsp1_ck", &dummy_ck, CK_3XXX), |
3390 | CLK("usbhs-omap.0", "xclk60mhsp2_ck", &dummy_ck, CK_3XXX), | 3388 | CLK("usbhs_omap", "xclk60mhsp2_ck", &dummy_ck, CK_3XXX), |
3391 | CLK("usbhs-omap.0", "usb_host_hs_utmi_p1_clk", &dummy_ck, CK_3XXX), | 3389 | CLK("usbhs_omap", "usb_host_hs_utmi_p1_clk", &dummy_ck, CK_3XXX), |
3392 | CLK("usbhs-omap.0", "usb_host_hs_utmi_p2_clk", &dummy_ck, CK_3XXX), | 3390 | CLK("usbhs_omap", "usb_host_hs_utmi_p2_clk", &dummy_ck, CK_3XXX), |
3393 | CLK("usbhs-omap.0", "usb_tll_hs_usb_ch0_clk", &dummy_ck, CK_3XXX), | 3391 | CLK("usbhs_omap", "usb_tll_hs_usb_ch0_clk", &dummy_ck, CK_3XXX), |
3394 | CLK("usbhs-omap.0", "usb_tll_hs_usb_ch1_clk", &dummy_ck, CK_3XXX), | 3392 | CLK("usbhs_omap", "usb_tll_hs_usb_ch1_clk", &dummy_ck, CK_3XXX), |
3395 | CLK("usbhs-omap.0", "init_60m_fclk", &dummy_ck, CK_3XXX), | 3393 | CLK("usbhs_omap", "init_60m_fclk", &dummy_ck, CK_3XXX), |
3396 | CLK(NULL, "usim_fck", &usim_fck, CK_3430ES2PLUS | CK_36XX), | 3394 | CLK(NULL, "usim_fck", &usim_fck, CK_3430ES2PLUS | CK_36XX), |
3397 | CLK(NULL, "gpt1_fck", &gpt1_fck, CK_3XXX), | 3395 | CLK(NULL, "gpt1_fck", &gpt1_fck, CK_3XXX), |
3398 | CLK(NULL, "wkup_32k_fck", &wkup_32k_fck, CK_3XXX), | 3396 | CLK(NULL, "wkup_32k_fck", &wkup_32k_fck, CK_3XXX), |
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 730097ee0f23..08e86d793a1f 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -3304,7 +3304,7 @@ static struct omap_clk omap44xx_clks[] = { | |||
3304 | CLK(NULL, "uart2_fck", &uart2_fck, CK_443X), | 3304 | CLK(NULL, "uart2_fck", &uart2_fck, CK_443X), |
3305 | CLK(NULL, "uart3_fck", &uart3_fck, CK_443X), | 3305 | CLK(NULL, "uart3_fck", &uart3_fck, CK_443X), |
3306 | CLK(NULL, "uart4_fck", &uart4_fck, CK_443X), | 3306 | CLK(NULL, "uart4_fck", &uart4_fck, CK_443X), |
3307 | CLK("usbhs-omap.0", "fs_fck", &usb_host_fs_fck, CK_443X), | 3307 | CLK("usbhs_omap", "fs_fck", &usb_host_fs_fck, CK_443X), |
3308 | CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X), | 3308 | CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X), |
3309 | CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X), | 3309 | CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X), |
3310 | CLK(NULL, "utmi_p2_gfclk", &utmi_p2_gfclk, CK_443X), | 3310 | CLK(NULL, "utmi_p2_gfclk", &utmi_p2_gfclk, CK_443X), |
@@ -3315,7 +3315,7 @@ static struct omap_clk omap44xx_clks[] = { | |||
3315 | CLK(NULL, "usb_host_hs_hsic60m_p2_clk", &usb_host_hs_hsic60m_p2_clk, CK_443X), | 3315 | CLK(NULL, "usb_host_hs_hsic60m_p2_clk", &usb_host_hs_hsic60m_p2_clk, CK_443X), |
3316 | CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X), | 3316 | CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X), |
3317 | CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X), | 3317 | CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X), |
3318 | CLK("usbhs-omap.0", "hs_fck", &usb_host_hs_fck, CK_443X), | 3318 | CLK("usbhs_omap", "hs_fck", &usb_host_hs_fck, CK_443X), |
3319 | CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X), | 3319 | CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X), |
3320 | CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X), | 3320 | CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X), |
3321 | CLK("musb-omap2430", "ick", &usb_otg_hs_ick, CK_443X), | 3321 | CLK("musb-omap2430", "ick", &usb_otg_hs_ick, CK_443X), |
@@ -3323,7 +3323,7 @@ static struct omap_clk omap44xx_clks[] = { | |||
3323 | CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X), | 3323 | CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X), |
3324 | CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X), | 3324 | CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X), |
3325 | CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X), | 3325 | CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X), |
3326 | CLK("usbhs-omap.0", "usbtll_ick", &usb_tll_hs_ick, CK_443X), | 3326 | CLK("usbhs_omap", "usbtll_ick", &usb_tll_hs_ick, CK_443X), |
3327 | CLK(NULL, "usim_ck", &usim_ck, CK_443X), | 3327 | CLK(NULL, "usim_ck", &usim_ck, CK_443X), |
3328 | CLK(NULL, "usim_fclk", &usim_fclk, CK_443X), | 3328 | CLK(NULL, "usim_fclk", &usim_fclk, CK_443X), |
3329 | CLK(NULL, "usim_fck", &usim_fck, CK_443X), | 3329 | CLK(NULL, "usim_fck", &usim_fck, CK_443X), |
@@ -3383,8 +3383,8 @@ static struct omap_clk omap44xx_clks[] = { | |||
3383 | CLK(NULL, "uart2_ick", &dummy_ck, CK_443X), | 3383 | CLK(NULL, "uart2_ick", &dummy_ck, CK_443X), |
3384 | CLK(NULL, "uart3_ick", &dummy_ck, CK_443X), | 3384 | CLK(NULL, "uart3_ick", &dummy_ck, CK_443X), |
3385 | CLK(NULL, "uart4_ick", &dummy_ck, CK_443X), | 3385 | CLK(NULL, "uart4_ick", &dummy_ck, CK_443X), |
3386 | CLK("usbhs-omap.0", "usbhost_ick", &dummy_ck, CK_443X), | 3386 | CLK("usbhs_omap", "usbhost_ick", &dummy_ck, CK_443X), |
3387 | CLK("usbhs-omap.0", "usbtll_fck", &dummy_ck, CK_443X), | 3387 | CLK("usbhs_omap", "usbtll_fck", &dummy_ck, CK_443X), |
3388 | CLK("omap_wdt", "ick", &dummy_ck, CK_443X), | 3388 | CLK("omap_wdt", "ick", &dummy_ck, CK_443X), |
3389 | CLK("omap_timer.1", "32k_ck", &sys_32k_ck, CK_443X), | 3389 | CLK("omap_timer.1", "32k_ck", &sys_32k_ck, CK_443X), |
3390 | CLK("omap_timer.2", "32k_ck", &sys_32k_ck, CK_443X), | 3390 | CLK("omap_timer.2", "32k_ck", &sys_32k_ck, CK_443X), |
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index f4a1020559a7..bd844af13af5 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -171,6 +171,17 @@ static void omap4_hsmmc1_after_set_reg(struct device *dev, int slot, | |||
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
174 | static void hsmmc2_select_input_clk_src(struct omap_mmc_platform_data *mmc) | ||
175 | { | ||
176 | u32 reg; | ||
177 | |||
178 | if (mmc->slots[0].internal_clock) { | ||
179 | reg = omap_ctrl_readl(control_devconf1_offset); | ||
180 | reg |= OMAP2_MMCSDIO2ADPCLKISEL; | ||
181 | omap_ctrl_writel(reg, control_devconf1_offset); | ||
182 | } | ||
183 | } | ||
184 | |||
174 | static void hsmmc23_before_set_reg(struct device *dev, int slot, | 185 | static void hsmmc23_before_set_reg(struct device *dev, int slot, |
175 | int power_on, int vdd) | 186 | int power_on, int vdd) |
176 | { | 187 | { |
@@ -179,16 +190,19 @@ static void hsmmc23_before_set_reg(struct device *dev, int slot, | |||
179 | if (mmc->slots[0].remux) | 190 | if (mmc->slots[0].remux) |
180 | mmc->slots[0].remux(dev, slot, power_on); | 191 | mmc->slots[0].remux(dev, slot, power_on); |
181 | 192 | ||
182 | if (power_on) { | 193 | if (power_on) |
183 | /* Only MMC2 supports a CLKIN */ | 194 | hsmmc2_select_input_clk_src(mmc); |
184 | if (mmc->slots[0].internal_clock) { | 195 | } |
185 | u32 reg; | ||
186 | 196 | ||
187 | reg = omap_ctrl_readl(control_devconf1_offset); | 197 | static int am35x_hsmmc2_set_power(struct device *dev, int slot, |
188 | reg |= OMAP2_MMCSDIO2ADPCLKISEL; | 198 | int power_on, int vdd) |
189 | omap_ctrl_writel(reg, control_devconf1_offset); | 199 | { |
190 | } | 200 | struct omap_mmc_platform_data *mmc = dev->platform_data; |
191 | } | 201 | |
202 | if (power_on) | ||
203 | hsmmc2_select_input_clk_src(mmc); | ||
204 | |||
205 | return 0; | ||
192 | } | 206 | } |
193 | 207 | ||
194 | static int nop_mmc_set_power(struct device *dev, int slot, int power_on, | 208 | static int nop_mmc_set_power(struct device *dev, int slot, int power_on, |
@@ -200,10 +214,12 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on, | |||
200 | static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller, | 214 | static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller, |
201 | int controller_nr) | 215 | int controller_nr) |
202 | { | 216 | { |
203 | if (gpio_is_valid(mmc_controller->slots[0].switch_pin)) | 217 | if (gpio_is_valid(mmc_controller->slots[0].switch_pin) && |
218 | (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES)) | ||
204 | omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, | 219 | omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, |
205 | OMAP_PIN_INPUT_PULLUP); | 220 | OMAP_PIN_INPUT_PULLUP); |
206 | if (gpio_is_valid(mmc_controller->slots[0].gpio_wp)) | 221 | if (gpio_is_valid(mmc_controller->slots[0].gpio_wp) && |
222 | (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES)) | ||
207 | omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, | 223 | omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, |
208 | OMAP_PIN_INPUT_PULLUP); | 224 | OMAP_PIN_INPUT_PULLUP); |
209 | if (cpu_is_omap34xx()) { | 225 | if (cpu_is_omap34xx()) { |
@@ -296,6 +312,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, | |||
296 | mmc->slots[0].name = hc_name; | 312 | mmc->slots[0].name = hc_name; |
297 | mmc->nr_slots = 1; | 313 | mmc->nr_slots = 1; |
298 | mmc->slots[0].caps = c->caps; | 314 | mmc->slots[0].caps = c->caps; |
315 | mmc->slots[0].pm_caps = c->pm_caps; | ||
299 | mmc->slots[0].internal_clock = !c->ext_clock; | 316 | mmc->slots[0].internal_clock = !c->ext_clock; |
300 | mmc->dma_mask = 0xffffffff; | 317 | mmc->dma_mask = 0xffffffff; |
301 | if (cpu_is_omap44xx()) | 318 | if (cpu_is_omap44xx()) |
@@ -336,11 +353,17 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, | |||
336 | * | 353 | * |
337 | * temporary HACK: ocr_mask instead of fixed supply | 354 | * temporary HACK: ocr_mask instead of fixed supply |
338 | */ | 355 | */ |
339 | mmc->slots[0].ocr_mask = c->ocr_mask; | 356 | if (cpu_is_omap3505() || cpu_is_omap3517()) |
340 | 357 | mmc->slots[0].ocr_mask = MMC_VDD_165_195 | | |
341 | if (cpu_is_omap3517() || cpu_is_omap3505()) | 358 | MMC_VDD_26_27 | |
342 | mmc->slots[0].set_power = nop_mmc_set_power; | 359 | MMC_VDD_27_28 | |
360 | MMC_VDD_29_30 | | ||
361 | MMC_VDD_30_31 | | ||
362 | MMC_VDD_31_32; | ||
343 | else | 363 | else |
364 | mmc->slots[0].ocr_mask = c->ocr_mask; | ||
365 | |||
366 | if (!cpu_is_omap3517() && !cpu_is_omap3505()) | ||
344 | mmc->slots[0].features |= HSMMC_HAS_PBIAS; | 367 | mmc->slots[0].features |= HSMMC_HAS_PBIAS; |
345 | 368 | ||
346 | if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0)) | 369 | if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0)) |
@@ -363,6 +386,9 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, | |||
363 | } | 386 | } |
364 | } | 387 | } |
365 | 388 | ||
389 | if (cpu_is_omap3517() || cpu_is_omap3505()) | ||
390 | mmc->slots[0].set_power = nop_mmc_set_power; | ||
391 | |||
366 | /* OMAP3630 HSMMC1 supports only 4-bit */ | 392 | /* OMAP3630 HSMMC1 supports only 4-bit */ |
367 | if (cpu_is_omap3630() && | 393 | if (cpu_is_omap3630() && |
368 | (c->caps & MMC_CAP_8_BIT_DATA)) { | 394 | (c->caps & MMC_CAP_8_BIT_DATA)) { |
@@ -372,6 +398,9 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, | |||
372 | } | 398 | } |
373 | break; | 399 | break; |
374 | case 2: | 400 | case 2: |
401 | if (cpu_is_omap3517() || cpu_is_omap3505()) | ||
402 | mmc->slots[0].set_power = am35x_hsmmc2_set_power; | ||
403 | |||
375 | if (c->ext_clock) | 404 | if (c->ext_clock) |
376 | c->transceiver = 1; | 405 | c->transceiver = 1; |
377 | if (c->transceiver && (c->caps & MMC_CAP_8_BIT_DATA)) { | 406 | if (c->transceiver && (c->caps & MMC_CAP_8_BIT_DATA)) { |
diff --git a/arch/arm/mach-omap2/hsmmc.h b/arch/arm/mach-omap2/hsmmc.h index f757e78d4d4f..c4409730c4bb 100644 --- a/arch/arm/mach-omap2/hsmmc.h +++ b/arch/arm/mach-omap2/hsmmc.h | |||
@@ -12,6 +12,7 @@ struct omap2_hsmmc_info { | |||
12 | u8 mmc; /* controller 1/2/3 */ | 12 | u8 mmc; /* controller 1/2/3 */ |
13 | u32 caps; /* 4/8 wires and any additional host | 13 | u32 caps; /* 4/8 wires and any additional host |
14 | * capabilities OR'd (ref. linux/mmc/host.h) */ | 14 | * capabilities OR'd (ref. linux/mmc/host.h) */ |
15 | u32 pm_caps; /* PM capabilities */ | ||
15 | bool transceiver; /* MMC-2 option */ | 16 | bool transceiver; /* MMC-2 option */ |
16 | bool ext_clock; /* use external pin for input clock */ | 17 | bool ext_clock; /* use external pin for input clock */ |
17 | bool cover_only; /* No card detect - just cover switch */ | 18 | bool cover_only; /* No card detect - just cover switch */ |
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c index 89ae29847c59..771dc781b746 100644 --- a/arch/arm/mach-omap2/usb-host.c +++ b/arch/arm/mach-omap2/usb-host.c | |||
@@ -28,51 +28,28 @@ | |||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <mach/irqs.h> | 29 | #include <mach/irqs.h> |
30 | #include <plat/usb.h> | 30 | #include <plat/usb.h> |
31 | #include <plat/omap_device.h> | ||
31 | 32 | ||
32 | #include "mux.h" | 33 | #include "mux.h" |
33 | 34 | ||
34 | #ifdef CONFIG_MFD_OMAP_USB_HOST | 35 | #ifdef CONFIG_MFD_OMAP_USB_HOST |
35 | 36 | ||
36 | #define OMAP_USBHS_DEVICE "usbhs-omap" | 37 | #define OMAP_USBHS_DEVICE "usbhs_omap" |
37 | 38 | #define USBHS_UHH_HWMODNAME "usb_host_hs" | |
38 | static struct resource usbhs_resources[] = { | 39 | #define USBHS_TLL_HWMODNAME "usb_tll_hs" |
39 | { | ||
40 | .name = "uhh", | ||
41 | .flags = IORESOURCE_MEM, | ||
42 | }, | ||
43 | { | ||
44 | .name = "tll", | ||
45 | .flags = IORESOURCE_MEM, | ||
46 | }, | ||
47 | { | ||
48 | .name = "ehci", | ||
49 | .flags = IORESOURCE_MEM, | ||
50 | }, | ||
51 | { | ||
52 | .name = "ehci-irq", | ||
53 | .flags = IORESOURCE_IRQ, | ||
54 | }, | ||
55 | { | ||
56 | .name = "ohci", | ||
57 | .flags = IORESOURCE_MEM, | ||
58 | }, | ||
59 | { | ||
60 | .name = "ohci-irq", | ||
61 | .flags = IORESOURCE_IRQ, | ||
62 | } | ||
63 | }; | ||
64 | |||
65 | static struct platform_device usbhs_device = { | ||
66 | .name = OMAP_USBHS_DEVICE, | ||
67 | .id = 0, | ||
68 | .num_resources = ARRAY_SIZE(usbhs_resources), | ||
69 | .resource = usbhs_resources, | ||
70 | }; | ||
71 | 40 | ||
72 | static struct usbhs_omap_platform_data usbhs_data; | 41 | static struct usbhs_omap_platform_data usbhs_data; |
73 | static struct ehci_hcd_omap_platform_data ehci_data; | 42 | static struct ehci_hcd_omap_platform_data ehci_data; |
74 | static struct ohci_hcd_omap_platform_data ohci_data; | 43 | static struct ohci_hcd_omap_platform_data ohci_data; |
75 | 44 | ||
45 | static struct omap_device_pm_latency omap_uhhtll_latency[] = { | ||
46 | { | ||
47 | .deactivate_func = omap_device_idle_hwmods, | ||
48 | .activate_func = omap_device_enable_hwmods, | ||
49 | .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, | ||
50 | }, | ||
51 | }; | ||
52 | |||
76 | /* MUX settings for EHCI pins */ | 53 | /* MUX settings for EHCI pins */ |
77 | /* | 54 | /* |
78 | * setup_ehci_io_mux - initialize IO pad mux for USBHOST | 55 | * setup_ehci_io_mux - initialize IO pad mux for USBHOST |
@@ -508,7 +485,10 @@ static void setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode) | |||
508 | 485 | ||
509 | void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | 486 | void __init usbhs_init(const struct usbhs_omap_board_data *pdata) |
510 | { | 487 | { |
511 | int i; | 488 | struct omap_hwmod *oh[2]; |
489 | struct omap_device *od; | ||
490 | int bus_id = -1; | ||
491 | int i; | ||
512 | 492 | ||
513 | for (i = 0; i < OMAP3_HS_USB_PORTS; i++) { | 493 | for (i = 0; i < OMAP3_HS_USB_PORTS; i++) { |
514 | usbhs_data.port_mode[i] = pdata->port_mode[i]; | 494 | usbhs_data.port_mode[i] = pdata->port_mode[i]; |
@@ -523,44 +503,34 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | |||
523 | usbhs_data.ohci_data = &ohci_data; | 503 | usbhs_data.ohci_data = &ohci_data; |
524 | 504 | ||
525 | if (cpu_is_omap34xx()) { | 505 | if (cpu_is_omap34xx()) { |
526 | usbhs_resources[0].start = OMAP34XX_UHH_CONFIG_BASE; | ||
527 | usbhs_resources[0].end = OMAP34XX_UHH_CONFIG_BASE + SZ_1K - 1; | ||
528 | usbhs_resources[1].start = OMAP34XX_USBTLL_BASE; | ||
529 | usbhs_resources[1].end = OMAP34XX_USBTLL_BASE + SZ_4K - 1; | ||
530 | usbhs_resources[2].start = OMAP34XX_EHCI_BASE; | ||
531 | usbhs_resources[2].end = OMAP34XX_EHCI_BASE + SZ_1K - 1; | ||
532 | usbhs_resources[3].start = INT_34XX_EHCI_IRQ; | ||
533 | usbhs_resources[4].start = OMAP34XX_OHCI_BASE; | ||
534 | usbhs_resources[4].end = OMAP34XX_OHCI_BASE + SZ_1K - 1; | ||
535 | usbhs_resources[5].start = INT_34XX_OHCI_IRQ; | ||
536 | setup_ehci_io_mux(pdata->port_mode); | 506 | setup_ehci_io_mux(pdata->port_mode); |
537 | setup_ohci_io_mux(pdata->port_mode); | 507 | setup_ohci_io_mux(pdata->port_mode); |
538 | } else if (cpu_is_omap44xx()) { | 508 | } else if (cpu_is_omap44xx()) { |
539 | usbhs_resources[0].start = OMAP44XX_UHH_CONFIG_BASE; | ||
540 | usbhs_resources[0].end = OMAP44XX_UHH_CONFIG_BASE + SZ_1K - 1; | ||
541 | usbhs_resources[1].start = OMAP44XX_USBTLL_BASE; | ||
542 | usbhs_resources[1].end = OMAP44XX_USBTLL_BASE + SZ_4K - 1; | ||
543 | usbhs_resources[2].start = OMAP44XX_HSUSB_EHCI_BASE; | ||
544 | usbhs_resources[2].end = OMAP44XX_HSUSB_EHCI_BASE + SZ_1K - 1; | ||
545 | usbhs_resources[3].start = OMAP44XX_IRQ_EHCI; | ||
546 | usbhs_resources[4].start = OMAP44XX_HSUSB_OHCI_BASE; | ||
547 | usbhs_resources[4].end = OMAP44XX_HSUSB_OHCI_BASE + SZ_1K - 1; | ||
548 | usbhs_resources[5].start = OMAP44XX_IRQ_OHCI; | ||
549 | setup_4430ehci_io_mux(pdata->port_mode); | 509 | setup_4430ehci_io_mux(pdata->port_mode); |
550 | setup_4430ohci_io_mux(pdata->port_mode); | 510 | setup_4430ohci_io_mux(pdata->port_mode); |
551 | } | 511 | } |
552 | 512 | ||
553 | if (platform_device_add_data(&usbhs_device, | 513 | oh[0] = omap_hwmod_lookup(USBHS_UHH_HWMODNAME); |
554 | &usbhs_data, sizeof(usbhs_data)) < 0) { | 514 | if (!oh[0]) { |
555 | printk(KERN_ERR "USBHS platform_device_add_data failed\n"); | 515 | pr_err("Could not look up %s\n", USBHS_UHH_HWMODNAME); |
556 | goto init_end; | 516 | return; |
557 | } | 517 | } |
558 | 518 | ||
559 | if (platform_device_register(&usbhs_device) < 0) | 519 | oh[1] = omap_hwmod_lookup(USBHS_TLL_HWMODNAME); |
560 | printk(KERN_ERR "USBHS platform_device_register failed\n"); | 520 | if (!oh[1]) { |
521 | pr_err("Could not look up %s\n", USBHS_TLL_HWMODNAME); | ||
522 | return; | ||
523 | } | ||
561 | 524 | ||
562 | init_end: | 525 | od = omap_device_build_ss(OMAP_USBHS_DEVICE, bus_id, oh, 2, |
563 | return; | 526 | (void *)&usbhs_data, sizeof(usbhs_data), |
527 | omap_uhhtll_latency, | ||
528 | ARRAY_SIZE(omap_uhhtll_latency), false); | ||
529 | if (IS_ERR(od)) { | ||
530 | pr_err("Could not build hwmod devices %s,%s\n", | ||
531 | USBHS_UHH_HWMODNAME, USBHS_TLL_HWMODNAME); | ||
532 | return; | ||
533 | } | ||
564 | } | 534 | } |
565 | 535 | ||
566 | #else | 536 | #else |
@@ -570,5 +540,3 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | |||
570 | } | 540 | } |
571 | 541 | ||
572 | #endif | 542 | #endif |
573 | |||
574 | |||