diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-13 14:00:00 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-13 14:00:00 -0500 |
| commit | fe504c5c745aeb767d978fbedeb94775fd4cb69c (patch) | |
| tree | 5ebb384972aabf676d8137d95362333193c89f66 | |
| parent | 698d601224824bc1a5bf17f3d86be902e2aabff0 (diff) | |
| parent | d7460f4a3d75469deb1c6c028961da69608d02d9 (diff) | |
Merge tag 'boards2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC board updates, take 2 from Olof Johansson:
"This branch contains board updates for shmobile that had dependencies
on earlier branches past the first driver branch, and thus are merged
separately.
Most of these are to enable audio and USB on shmobile. They contain a
dependent ASoC branch that has been coordinated with Mark Brown."
* tag 'boards2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
ARM: shmobile: mackerel: Add FLCTL IRQ resource
ARM: shmobile: use FSI driver's audio clock on ap4evb
ARM: shmobile: use FSI driver's audio clock on mackerel
ARM: shmobile: use FSI driver's audio clock on armadillo800eva
ARM: shmobile: mackerel: enable DMAEngine on USB Host
ARM: shmobile: marzen: add USB OHCI driver support
ARM: shmobile: marzen: add USB EHCI driver support
ARM: shmobile: marzen: add USB phy support
ASoC: fsi: add master clock control functions
ASoC: fsi: care fsi_hw_start/stop() return value
ASoC: fsi: fsi_set_master_clk() was called from fsi_hw_xxx() only
ASoC: fsi: use devm_request_irq()
ASoC: fsi: fixup channels_min/max
| -rw-r--r-- | arch/arm/configs/marzen_defconfig | 14 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/Kconfig | 2 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/board-ap4evb.c | 139 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/board-armadillo800eva.c | 38 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/board-mackerel.c | 80 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/board-marzen.c | 186 | ||||
| -rw-r--r-- | include/sound/sh_fsi.h | 6 | ||||
| -rw-r--r-- | sound/soc/sh/fsi.c | 441 |
8 files changed, 617 insertions, 289 deletions
diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig index 5b8215f424c5..728a43c446f8 100644 --- a/arch/arm/configs/marzen_defconfig +++ b/arch/arm/configs/marzen_defconfig | |||
| @@ -47,6 +47,8 @@ CONFIG_DEVTMPFS_MOUNT=y | |||
| 47 | # CONFIG_STANDALONE is not set | 47 | # CONFIG_STANDALONE is not set |
| 48 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 48 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
| 49 | # CONFIG_FW_LOADER is not set | 49 | # CONFIG_FW_LOADER is not set |
| 50 | CONFIG_SCSI=y | ||
| 51 | CONFIG_BLK_DEV_SD=y | ||
| 50 | CONFIG_NETDEVICES=y | 52 | CONFIG_NETDEVICES=y |
| 51 | # CONFIG_NET_VENDOR_BROADCOM is not set | 53 | # CONFIG_NET_VENDOR_BROADCOM is not set |
| 52 | # CONFIG_NET_VENDOR_FARADAY is not set | 54 | # CONFIG_NET_VENDOR_FARADAY is not set |
| @@ -59,9 +61,8 @@ CONFIG_SMSC911X=y | |||
| 59 | # CONFIG_NET_VENDOR_STMICRO is not set | 61 | # CONFIG_NET_VENDOR_STMICRO is not set |
| 60 | # CONFIG_WLAN is not set | 62 | # CONFIG_WLAN is not set |
| 61 | # CONFIG_INPUT_MOUSEDEV is not set | 63 | # CONFIG_INPUT_MOUSEDEV is not set |
| 62 | # CONFIG_INPUT_KEYBOARD is not set | 64 | CONFIG_INPUT_EVDEV=y |
| 63 | # CONFIG_INPUT_MOUSE is not set | 65 | # CONFIG_INPUT_MOUSE is not set |
| 64 | # CONFIG_SERIO is not set | ||
| 65 | # CONFIG_VT is not set | 66 | # CONFIG_VT is not set |
| 66 | # CONFIG_LEGACY_PTYS is not set | 67 | # CONFIG_LEGACY_PTYS is not set |
| 67 | # CONFIG_DEVKMEM is not set | 68 | # CONFIG_DEVKMEM is not set |
| @@ -78,9 +79,16 @@ CONFIG_GPIO_SYSFS=y | |||
| 78 | CONFIG_THERMAL=y | 79 | CONFIG_THERMAL=y |
| 79 | CONFIG_RCAR_THERMAL=y | 80 | CONFIG_RCAR_THERMAL=y |
| 80 | CONFIG_SSB=y | 81 | CONFIG_SSB=y |
| 81 | # CONFIG_USB_SUPPORT is not set | 82 | CONFIG_USB=y |
| 83 | CONFIG_USB_RCAR_PHY=y | ||
| 82 | CONFIG_MMC=y | 84 | CONFIG_MMC=y |
| 83 | CONFIG_MMC_SDHI=y | 85 | CONFIG_MMC_SDHI=y |
| 86 | CONFIG_USB=y | ||
| 87 | CONFIG_USB_EHCI_HCD=y | ||
| 88 | CONFIG_USB_OHCI_HCD=y | ||
| 89 | CONFIG_USB_OHCI_HCD_PLATFORM=y | ||
| 90 | CONFIG_USB_EHCI_HCD_PLATFORM=y | ||
| 91 | CONFIG_USB_STORAGE=y | ||
| 84 | CONFIG_UIO=y | 92 | CONFIG_UIO=y |
| 85 | CONFIG_UIO_PDRV_GENIRQ=y | 93 | CONFIG_UIO_PDRV_GENIRQ=y |
| 86 | # CONFIG_IOMMU_SUPPORT is not set | 94 | # CONFIG_IOMMU_SUPPORT is not set |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 4eddca14ae07..9255546e7bf6 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
| @@ -29,6 +29,8 @@ config ARCH_R8A7779 | |||
| 29 | select ARM_GIC | 29 | select ARM_GIC |
| 30 | select CPU_V7 | 30 | select CPU_V7 |
| 31 | select SH_CLK_CPG | 31 | select SH_CLK_CPG |
| 32 | select USB_ARCH_HAS_EHCI | ||
| 33 | select USB_ARCH_HAS_OHCI | ||
| 32 | 34 | ||
| 33 | config ARCH_EMEV2 | 35 | config ARCH_EMEV2 |
| 34 | bool "Emma Mobile EV2" | 36 | bool "Emma Mobile EV2" |
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index cefdd030361d..40657854e3ad 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
| @@ -658,133 +658,16 @@ static struct platform_device lcdc_device = { | |||
| 658 | 658 | ||
| 659 | /* FSI */ | 659 | /* FSI */ |
| 660 | #define IRQ_FSI evt2irq(0x1840) | 660 | #define IRQ_FSI evt2irq(0x1840) |
| 661 | static int __fsi_set_rate(struct clk *clk, long rate, int enable) | ||
| 662 | { | ||
| 663 | int ret = 0; | ||
| 664 | |||
| 665 | if (rate <= 0) | ||
| 666 | return ret; | ||
| 667 | |||
| 668 | if (enable) { | ||
| 669 | ret = clk_set_rate(clk, rate); | ||
| 670 | if (0 == ret) | ||
| 671 | ret = clk_enable(clk); | ||
| 672 | } else { | ||
| 673 | clk_disable(clk); | ||
| 674 | } | ||
| 675 | |||
| 676 | return ret; | ||
| 677 | } | ||
| 678 | |||
| 679 | static int __fsi_set_round_rate(struct clk *clk, long rate, int enable) | ||
| 680 | { | ||
| 681 | return __fsi_set_rate(clk, clk_round_rate(clk, rate), enable); | ||
| 682 | } | ||
| 683 | |||
| 684 | static int fsi_ak4642_set_rate(struct device *dev, int rate, int enable) | ||
| 685 | { | ||
| 686 | struct clk *fsia_ick; | ||
| 687 | struct clk *fsiack; | ||
| 688 | int ret = -EIO; | ||
| 689 | |||
| 690 | fsia_ick = clk_get(dev, "icka"); | ||
| 691 | if (IS_ERR(fsia_ick)) | ||
| 692 | return PTR_ERR(fsia_ick); | ||
| 693 | |||
| 694 | /* | ||
| 695 | * FSIACK is connected to AK4642, | ||
| 696 | * and use external clock pin from it. | ||
| 697 | * it is parent of fsia_ick now. | ||
| 698 | */ | ||
| 699 | fsiack = clk_get_parent(fsia_ick); | ||
| 700 | if (!fsiack) | ||
| 701 | goto fsia_ick_out; | ||
| 702 | |||
| 703 | /* | ||
| 704 | * we get 1/1 divided clock by setting same rate to fsiack and fsia_ick | ||
| 705 | * | ||
| 706 | ** FIXME ** | ||
| 707 | * Because the freq_table of external clk (fsiack) are all 0, | ||
| 708 | * the return value of clk_round_rate became 0. | ||
| 709 | * So, it use __fsi_set_rate here. | ||
| 710 | */ | ||
| 711 | ret = __fsi_set_rate(fsiack, rate, enable); | ||
| 712 | if (ret < 0) | ||
| 713 | goto fsiack_out; | ||
| 714 | |||
| 715 | ret = __fsi_set_round_rate(fsia_ick, rate, enable); | ||
| 716 | if ((ret < 0) && enable) | ||
| 717 | __fsi_set_round_rate(fsiack, rate, 0); /* disable FSI ACK */ | ||
| 718 | |||
| 719 | fsiack_out: | ||
| 720 | clk_put(fsiack); | ||
| 721 | |||
| 722 | fsia_ick_out: | ||
| 723 | clk_put(fsia_ick); | ||
| 724 | |||
| 725 | return 0; | ||
| 726 | } | ||
| 727 | |||
| 728 | static int fsi_hdmi_set_rate(struct device *dev, int rate, int enable) | ||
| 729 | { | ||
| 730 | struct clk *fsib_clk; | ||
| 731 | struct clk *fdiv_clk = clk_get(NULL, "fsidivb"); | ||
| 732 | long fsib_rate = 0; | ||
| 733 | long fdiv_rate = 0; | ||
| 734 | int ackmd_bpfmd; | ||
| 735 | int ret; | ||
| 736 | |||
| 737 | switch (rate) { | ||
| 738 | case 44100: | ||
| 739 | fsib_rate = rate * 256; | ||
| 740 | ackmd_bpfmd = SH_FSI_ACKMD_256 | SH_FSI_BPFMD_64; | ||
| 741 | break; | ||
| 742 | case 48000: | ||
| 743 | fsib_rate = 85428000; /* around 48kHz x 256 x 7 */ | ||
| 744 | fdiv_rate = rate * 256; | ||
| 745 | ackmd_bpfmd = SH_FSI_ACKMD_256 | SH_FSI_BPFMD_64; | ||
| 746 | break; | ||
| 747 | default: | ||
| 748 | pr_err("unsupported rate in FSI2 port B\n"); | ||
| 749 | return -EINVAL; | ||
| 750 | } | ||
| 751 | |||
| 752 | /* FSI B setting */ | ||
| 753 | fsib_clk = clk_get(dev, "ickb"); | ||
| 754 | if (IS_ERR(fsib_clk)) | ||
| 755 | return -EIO; | ||
| 756 | |||
| 757 | ret = __fsi_set_round_rate(fsib_clk, fsib_rate, enable); | ||
| 758 | if (ret < 0) | ||
| 759 | goto fsi_set_rate_end; | ||
| 760 | |||
| 761 | /* FSI DIV setting */ | ||
| 762 | ret = __fsi_set_round_rate(fdiv_clk, fdiv_rate, enable); | ||
| 763 | if (ret < 0) { | ||
| 764 | /* disable FSI B */ | ||
| 765 | if (enable) | ||
| 766 | __fsi_set_round_rate(fsib_clk, fsib_rate, 0); | ||
| 767 | goto fsi_set_rate_end; | ||
| 768 | } | ||
| 769 | |||
| 770 | ret = ackmd_bpfmd; | ||
| 771 | |||
| 772 | fsi_set_rate_end: | ||
| 773 | clk_put(fsib_clk); | ||
| 774 | return ret; | ||
| 775 | } | ||
| 776 | |||
| 777 | static struct sh_fsi_platform_info fsi_info = { | 661 | static struct sh_fsi_platform_info fsi_info = { |
| 778 | .port_a = { | 662 | .port_a = { |
| 779 | .flags = SH_FSI_BRS_INV, | 663 | .flags = SH_FSI_BRS_INV, |
| 780 | .set_rate = fsi_ak4642_set_rate, | ||
| 781 | }, | 664 | }, |
| 782 | |||
