diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-23 19:08:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-23 19:08:40 -0400 |
commit | 5e512d0785e67d9ff41ee4af39bb71fc6161d5c9 (patch) | |
tree | 5b0decd6d5b11138a6614c4f7b17592aa76520c6 /arch/arm/mach-ep93xx | |
parent | 451ce7f9cf2d17e34d5d64b76cac047a2a1a3b89 (diff) | |
parent | 233de298cb44e7dd300cd68f5abd7f1a75561fd5 (diff) |
Merge tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull arm soc-specific updates from Arnd Bergmann:
"This is stuff that does not fit well into another category and in
particular is not related to a particular board. The largest part in
here is extending the am33xx support in the omap platform."
Fix up trivial conflicts in arch/arm/mach-{imx/mach-mx35_3ds.c, tegra/Makefile}
* tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (74 commits)
ARM: LPC32xx: Add PWM support
ARM: LPC32xx: Add PWM clock
ARM: LPC32xx: Set system serial based on cpu unique id
ARM: vexpress: Config option for early printk console
ARM: vexpress: Add Device Tree for V2P-CA15_CA7 core tile
ARM: vexpress: Convert V2P-CA15 Device Tree to 64 bit addresses
ARM: vexpress: Add fixed regulator for SMSC
ARM: vexpress: Add missing SP804 interrupt in motherboard's DTS files
ARM: vexpress: Initial common clock support
ARM: SAMSUNG: Introduce Kconfig variable for Samsung custom clk API
ARM: EXYNOS: Add missing static storage class specifier in pmu.c file
ARM: EXYNOS: Make combiner_init function static
ARM: EXYNOS: Update HSOTG PHY clock setting for EXYNOS4X12
ARM: versatile: Make plat-versatile clock optional
ARM: vexpress: Check master site in daughterboard's sysctl operations
ARM: vexpress: remove automatic errata workaround selection
ARM: LPC32xx: Adjust to pl08x DMA interface changes
ARM: EXYNOS: Clear SYS_WDTRESET bit to use watchdog reset
ARM: imx: fix mx51 ehci setup errors
ARM: imx: make ehci power/oc polarities configurable
...
Diffstat (limited to 'arch/arm/mach-ep93xx')
-rw-r--r-- | arch/arm/mach-ep93xx/core.c | 96 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/edb93xx.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/platform.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/soc.h | 1 |
4 files changed, 124 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 4dd07a0e3604..4afe52aaaff3 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -797,6 +797,102 @@ static struct platform_device ep93xx_wdt_device = { | |||
797 | .resource = ep93xx_wdt_resources, | 797 | .resource = ep93xx_wdt_resources, |
798 | }; | 798 | }; |
799 | 799 | ||
800 | /************************************************************************* | ||
801 | * EP93xx IDE | ||
802 | *************************************************************************/ | ||
803 | static struct resource ep93xx_ide_resources[] = { | ||
804 | DEFINE_RES_MEM(EP93XX_IDE_PHYS_BASE, 0x38), | ||
805 | DEFINE_RES_IRQ(IRQ_EP93XX_EXT3), | ||
806 | }; | ||
807 | |||
808 | static struct platform_device ep93xx_ide_device = { | ||
809 | .name = "ep93xx-ide", | ||
810 | .id = -1, | ||
811 | .dev = { | ||
812 | .dma_mask = &ep93xx_ide_device.dev.coherent_dma_mask, | ||
813 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
814 | }, | ||
815 | .num_resources = ARRAY_SIZE(ep93xx_ide_resources), | ||
816 | .resource = ep93xx_ide_resources, | ||
817 | }; | ||
818 | |||
819 | void __init ep93xx_register_ide(void) | ||
820 | { | ||
821 | platform_device_register(&ep93xx_ide_device); | ||
822 | } | ||
823 | |||
824 | int ep93xx_ide_acquire_gpio(struct platform_device *pdev) | ||
825 | { | ||
826 | int err; | ||
827 | int i; | ||
828 | |||
829 | err = gpio_request(EP93XX_GPIO_LINE_EGPIO2, dev_name(&pdev->dev)); | ||
830 | if (err) | ||
831 | return err; | ||
832 | err = gpio_request(EP93XX_GPIO_LINE_EGPIO15, dev_name(&pdev->dev)); | ||
833 | if (err) | ||
834 | goto fail_egpio15; | ||
835 | for (i = 2; i < 8; i++) { | ||
836 | err = gpio_request(EP93XX_GPIO_LINE_E(i), dev_name(&pdev->dev)); | ||
837 | if (err) | ||
838 | goto fail_gpio_e; | ||
839 | } | ||
840 | for (i = 4; i < 8; i++) { | ||
841 | err = gpio_request(EP93XX_GPIO_LINE_G(i), dev_name(&pdev->dev)); | ||
842 | if (err) | ||
843 | goto fail_gpio_g; | ||
844 | } | ||
845 | for (i = 0; i < 8; i++) { | ||
846 | err = gpio_request(EP93XX_GPIO_LINE_H(i), dev_name(&pdev->dev)); | ||
847 | if (err) | ||
848 | goto fail_gpio_h; | ||
849 | } | ||
850 | |||
851 | /* GPIO ports E[7:2], G[7:4] and H used by IDE */ | ||
852 | ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_EONIDE | | ||
853 | EP93XX_SYSCON_DEVCFG_GONIDE | | ||
854 | EP93XX_SYSCON_DEVCFG_HONIDE); | ||
855 | return 0; | ||
856 | |||
857 | fail_gpio_h: | ||
858 | for (--i; i >= 0; --i) | ||
859 | gpio_free(EP93XX_GPIO_LINE_H(i)); | ||
860 | i = 8; | ||
861 | fail_gpio_g: | ||
862 | for (--i; i >= 4; --i) | ||
863 | gpio_free(EP93XX_GPIO_LINE_G(i)); | ||
864 | i = 8; | ||
865 | fail_gpio_e: | ||
866 | for (--i; i >= 2; --i) | ||
867 | gpio_free(EP93XX_GPIO_LINE_E(i)); | ||
868 | gpio_free(EP93XX_GPIO_LINE_EGPIO15); | ||
869 | fail_egpio15: | ||
870 | gpio_free(EP93XX_GPIO_LINE_EGPIO2); | ||
871 | return err; | ||
872 | } | ||
873 | EXPORT_SYMBOL(ep93xx_ide_acquire_gpio); | ||
874 | |||
875 | void ep93xx_ide_release_gpio(struct platform_device *pdev) | ||
876 | { | ||
877 | int i; | ||
878 | |||
879 | for (i = 2; i < 8; i++) | ||
880 | gpio_free(EP93XX_GPIO_LINE_E(i)); | ||
881 | for (i = 4; i < 8; i++) | ||
882 | gpio_free(EP93XX_GPIO_LINE_G(i)); | ||
883 | for (i = 0; i < 8; i++) | ||
884 | gpio_free(EP93XX_GPIO_LINE_H(i)); | ||
885 | gpio_free(EP93XX_GPIO_LINE_EGPIO15); | ||
886 | gpio_free(EP93XX_GPIO_LINE_EGPIO2); | ||
887 | |||
888 | |||
889 | /* GPIO ports E[7:2], G[7:4] and H used by GPIO */ | ||
890 | ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_EONIDE | | ||
891 | EP93XX_SYSCON_DEVCFG_GONIDE | | ||
892 | EP93XX_SYSCON_DEVCFG_HONIDE); | ||
893 | } | ||
894 | EXPORT_SYMBOL(ep93xx_ide_release_gpio); | ||
895 | |||
800 | void __init ep93xx_init_devices(void) | 896 | void __init ep93xx_init_devices(void) |
801 | { | 897 | { |
802 | /* Disallow access to MaverickCrunch initially */ | 898 | /* Disallow access to MaverickCrunch initially */ |
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index 3bb8e56969a5..337ab7cf4c16 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c +++ b/arch/arm/mach-ep93xx/edb93xx.c | |||
@@ -233,6 +233,29 @@ static void __init edb93xx_register_fb(void) | |||
233 | } | 233 | } |
234 | 234 | ||
235 | 235 | ||
236 | /************************************************************************* | ||
237 | * EDB93xx IDE | ||
238 | *************************************************************************/ | ||
239 | static int __init edb93xx_has_ide(void) | ||
240 | { | ||
241 | /* | ||
242 | * Although EDB9312 and EDB9315 do have IDE capability, they have | ||
243 | * INTRQ line wired as pull-up, which makes using IDE interface | ||
244 | * problematic. | ||
245 | */ | ||
246 | return machine_is_edb9312() || machine_is_edb9315() || | ||
247 | machine_is_edb9315a(); | ||
248 | } | ||
249 | |||
250 | static void __init edb93xx_register_ide(void) | ||
251 | { | ||
252 | if (!edb93xx_has_ide()) | ||
253 | return; | ||
254 | |||
255 | ep93xx_register_ide(); | ||
256 | } | ||
257 | |||
258 | |||
236 | static void __init edb93xx_init_machine(void) | 259 | static void __init edb93xx_init_machine(void) |
237 | { | 260 | { |
238 | ep93xx_init_devices(); | 261 | ep93xx_init_devices(); |
@@ -243,6 +266,7 @@ static void __init edb93xx_init_machine(void) | |||
243 | edb93xx_register_i2s(); | 266 | edb93xx_register_i2s(); |
244 | edb93xx_register_pwm(); | 267 | edb93xx_register_pwm(); |
245 | edb93xx_register_fb(); | 268 | edb93xx_register_fb(); |
269 | edb93xx_register_ide(); | ||
246 | } | 270 | } |
247 | 271 | ||
248 | 272 | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h index 1ecb040d98bf..33a5122c6dc8 100644 --- a/arch/arm/mach-ep93xx/include/mach/platform.h +++ b/arch/arm/mach-ep93xx/include/mach/platform.h | |||
@@ -48,6 +48,9 @@ void ep93xx_register_i2s(void); | |||
48 | int ep93xx_i2s_acquire(void); | 48 | int ep93xx_i2s_acquire(void); |
49 | void ep93xx_i2s_release(void); | 49 | void ep93xx_i2s_release(void); |
50 | void ep93xx_register_ac97(void); | 50 | void ep93xx_register_ac97(void); |
51 | void ep93xx_register_ide(void); | ||
52 | int ep93xx_ide_acquire_gpio(struct platform_device *pdev); | ||
53 | void ep93xx_ide_release_gpio(struct platform_device *pdev); | ||
51 | 54 | ||
52 | void ep93xx_init_devices(void); | 55 | void ep93xx_init_devices(void); |
53 | extern struct sys_timer ep93xx_timer; | 56 | extern struct sys_timer ep93xx_timer; |
diff --git a/arch/arm/mach-ep93xx/soc.h b/arch/arm/mach-ep93xx/soc.h index 979fba722926..7bf7ff8beae7 100644 --- a/arch/arm/mach-ep93xx/soc.h +++ b/arch/arm/mach-ep93xx/soc.h | |||
@@ -69,6 +69,7 @@ | |||
69 | 69 | ||
70 | #define EP93XX_BOOT_ROM_BASE EP93XX_AHB_IOMEM(0x00090000) | 70 | #define EP93XX_BOOT_ROM_BASE EP93XX_AHB_IOMEM(0x00090000) |
71 | 71 | ||
72 | #define EP93XX_IDE_PHYS_BASE EP93XX_AHB_PHYS(0x000a0000) | ||
72 | #define EP93XX_IDE_BASE EP93XX_AHB_IOMEM(0x000a0000) | 73 | #define EP93XX_IDE_BASE EP93XX_AHB_IOMEM(0x000a0000) |
73 | 74 | ||
74 | #define EP93XX_VIC1_BASE EP93XX_AHB_IOMEM(0x000b0000) | 75 | #define EP93XX_VIC1_BASE EP93XX_AHB_IOMEM(0x000b0000) |