diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-25 15:38:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-25 15:38:42 -0400 |
commit | ae4c42e4e4d76d003f8ca551fe1aef93ff9a4b21 (patch) | |
tree | 2bff2e4f4456077e7d7c589c8c28824f12dfa21c /arch | |
parent | dd58ecba48edf14be1a5f70120fcd3002277a74a (diff) | |
parent | ab2a0e0d135490729e384c1826d118f92e88cae8 (diff) |
Merge branch 'next/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc
* 'next/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: (133 commits)
ARM: EXYNOS4: Change devname for FIMD clkdev
ARM: S3C64XX: Cleanup mach/regs-fb.h from mach-s3c64xx
ARM: S5PV210: Cleanup mach/regs-fb.h from mach-s5pv210
ARM: S5PC100: Cleanup mach/regs-fb.h from mach-s5pc100
ARM: S3C24XX: Use generic s3c_set_platdata for devices
ARM: S3C64XX: Use generic s3c_set_platdata for OneNAND
ARM: SAMSUNG: Use generic s3c_set_platdata for NAND
ARM: SAMSUNG: Use generic s3c_set_platdata for USB OHCI
ARM: SAMSUNG: Use generic s3c_set_platdata for HWMON
ARM: SAMSUNG: Use generic s3c_set_platdata for FB
ARM: SAMSUNG: Use generic s3c_set_platdata for TS
ARM: S3C64XX: Add PWM backlight support on SMDK6410
ARM: S5P64X0: Add PWM backlight support on SMDK6450
ARM: S5P64X0: Add PWM backlight support on SMDK6440
ARM: S5PC100: Add PWM backlight support on SMDKC100
ARM: S5PV210: Add PWM backlight support on SMDKV210
ARM: EXYNOS4: Add PWM backlight support on SMDKC210
ARM: EXYNOS4: Add PWM backlight support on SMDKV310
ARM: SAMSUNG: Create a common infrastructure for PWM backlight support
clocksource: convert 32-bit down counting clocksource on S5PV210/S5P64X0
...
Fix up trivial conflict in arch/arm/mach-imx/mach-scb9328.c
Diffstat (limited to 'arch')
219 files changed, 4681 insertions, 8099 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 83a7aa2ca57a..ebaa380fde29 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -686,6 +686,7 @@ config ARCH_S3C2410 | |||
686 | select GENERIC_GPIO | 686 | select GENERIC_GPIO |
687 | select ARCH_HAS_CPUFREQ | 687 | select ARCH_HAS_CPUFREQ |
688 | select HAVE_CLK | 688 | select HAVE_CLK |
689 | select CLKDEV_LOOKUP | ||
689 | select ARCH_USES_GETTIMEOFFSET | 690 | select ARCH_USES_GETTIMEOFFSET |
690 | select HAVE_S3C2410_I2C if I2C | 691 | select HAVE_S3C2410_I2C if I2C |
691 | help | 692 | help |
@@ -703,6 +704,7 @@ config ARCH_S3C64XX | |||
703 | select CPU_V6 | 704 | select CPU_V6 |
704 | select ARM_VIC | 705 | select ARM_VIC |
705 | select HAVE_CLK | 706 | select HAVE_CLK |
707 | select CLKDEV_LOOKUP | ||
706 | select NO_IOPORT | 708 | select NO_IOPORT |
707 | select ARCH_USES_GETTIMEOFFSET | 709 | select ARCH_USES_GETTIMEOFFSET |
708 | select ARCH_HAS_CPUFREQ | 710 | select ARCH_HAS_CPUFREQ |
@@ -727,6 +729,8 @@ config ARCH_S5P64X0 | |||
727 | select CPU_V6 | 729 | select CPU_V6 |
728 | select GENERIC_GPIO | 730 | select GENERIC_GPIO |
729 | select HAVE_CLK | 731 | select HAVE_CLK |
732 | select CLKDEV_LOOKUP | ||
733 | select CLKSRC_MMIO | ||
730 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 734 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
731 | select GENERIC_CLOCKEVENTS | 735 | select GENERIC_CLOCKEVENTS |
732 | select HAVE_SCHED_CLOCK | 736 | select HAVE_SCHED_CLOCK |
@@ -740,6 +744,7 @@ config ARCH_S5PC100 | |||
740 | bool "Samsung S5PC100" | 744 | bool "Samsung S5PC100" |
741 | select GENERIC_GPIO | 745 | select GENERIC_GPIO |
742 | select HAVE_CLK | 746 | select HAVE_CLK |
747 | select CLKDEV_LOOKUP | ||
743 | select CPU_V7 | 748 | select CPU_V7 |
744 | select ARM_L1_CACHE_SHIFT_6 | 749 | select ARM_L1_CACHE_SHIFT_6 |
745 | select ARCH_USES_GETTIMEOFFSET | 750 | select ARCH_USES_GETTIMEOFFSET |
@@ -755,6 +760,8 @@ config ARCH_S5PV210 | |||
755 | select ARCH_SPARSEMEM_ENABLE | 760 | select ARCH_SPARSEMEM_ENABLE |
756 | select GENERIC_GPIO | 761 | select GENERIC_GPIO |
757 | select HAVE_CLK | 762 | select HAVE_CLK |
763 | select CLKDEV_LOOKUP | ||
764 | select CLKSRC_MMIO | ||
758 | select ARM_L1_CACHE_SHIFT_6 | 765 | select ARM_L1_CACHE_SHIFT_6 |
759 | select ARCH_HAS_CPUFREQ | 766 | select ARCH_HAS_CPUFREQ |
760 | select GENERIC_CLOCKEVENTS | 767 | select GENERIC_CLOCKEVENTS |
@@ -771,6 +778,7 @@ config ARCH_EXYNOS4 | |||
771 | select ARCH_SPARSEMEM_ENABLE | 778 | select ARCH_SPARSEMEM_ENABLE |
772 | select GENERIC_GPIO | 779 | select GENERIC_GPIO |
773 | select HAVE_CLK | 780 | select HAVE_CLK |
781 | select CLKDEV_LOOKUP | ||
774 | select ARCH_HAS_CPUFREQ | 782 | select ARCH_HAS_CPUFREQ |
775 | select GENERIC_CLOCKEVENTS | 783 | select GENERIC_CLOCKEVENTS |
776 | select HAVE_S3C_RTC if RTC_CLASS | 784 | select HAVE_S3C_RTC if RTC_CLASS |
@@ -856,6 +864,7 @@ config ARCH_OMAP | |||
856 | select HAVE_CLK | 864 | select HAVE_CLK |
857 | select ARCH_REQUIRE_GPIOLIB | 865 | select ARCH_REQUIRE_GPIOLIB |
858 | select ARCH_HAS_CPUFREQ | 866 | select ARCH_HAS_CPUFREQ |
867 | select CLKSRC_MMIO | ||
859 | select GENERIC_CLOCKEVENTS | 868 | select GENERIC_CLOCKEVENTS |
860 | select HAVE_SCHED_CLOCK | 869 | select HAVE_SCHED_CLOCK |
861 | select ARCH_HAS_HOLES_MEMORYMODEL | 870 | select ARCH_HAS_HOLES_MEMORYMODEL |
diff --git a/arch/arm/configs/cm_x300_defconfig b/arch/arm/configs/cm_x300_defconfig index 921e56a7572c..f4b767256f95 100644 --- a/arch/arm/configs/cm_x300_defconfig +++ b/arch/arm/configs/cm_x300_defconfig | |||
@@ -5,7 +5,6 @@ CONFIG_SYSVIPC=y | |||
5 | CONFIG_IKCONFIG=y | 5 | CONFIG_IKCONFIG=y |
6 | CONFIG_IKCONFIG_PROC=y | 6 | CONFIG_IKCONFIG_PROC=y |
7 | CONFIG_LOG_BUF_SHIFT=18 | 7 | CONFIG_LOG_BUF_SHIFT=18 |
8 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
9 | CONFIG_BLK_DEV_INITRD=y | 8 | CONFIG_BLK_DEV_INITRD=y |
10 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 9 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
11 | CONFIG_MODULES=y | 10 | CONFIG_MODULES=y |
@@ -13,6 +12,7 @@ CONFIG_MODULE_UNLOAD=y | |||
13 | CONFIG_MODULE_FORCE_UNLOAD=y | 12 | CONFIG_MODULE_FORCE_UNLOAD=y |
14 | # CONFIG_BLK_DEV_BSG is not set | 13 | # CONFIG_BLK_DEV_BSG is not set |
15 | CONFIG_ARCH_PXA=y | 14 | CONFIG_ARCH_PXA=y |
15 | CONFIG_GPIO_PCA953X=y | ||
16 | CONFIG_MACH_CM_X300=y | 16 | CONFIG_MACH_CM_X300=y |
17 | CONFIG_NO_HZ=y | 17 | CONFIG_NO_HZ=y |
18 | CONFIG_AEABI=y | 18 | CONFIG_AEABI=y |
@@ -23,7 +23,6 @@ CONFIG_CMDLINE="root=/dev/mtdblock5 rootfstype=ubifs console=ttyS2,38400" | |||
23 | CONFIG_CPU_FREQ=y | 23 | CONFIG_CPU_FREQ=y |
24 | CONFIG_CPU_FREQ_GOV_USERSPACE=y | 24 | CONFIG_CPU_FREQ_GOV_USERSPACE=y |
25 | CONFIG_FPE_NWFPE=y | 25 | CONFIG_FPE_NWFPE=y |
26 | CONFIG_PM=y | ||
27 | CONFIG_APM_EMULATION=y | 26 | CONFIG_APM_EMULATION=y |
28 | CONFIG_NET=y | 27 | CONFIG_NET=y |
29 | CONFIG_PACKET=y | 28 | CONFIG_PACKET=y |
@@ -40,8 +39,8 @@ CONFIG_IP_PNP_RARP=y | |||
40 | # CONFIG_INET_DIAG is not set | 39 | # CONFIG_INET_DIAG is not set |
41 | # CONFIG_IPV6 is not set | 40 | # CONFIG_IPV6 is not set |
42 | CONFIG_BT=m | 41 | CONFIG_BT=m |
43 | CONFIG_BT_L2CAP=m | 42 | CONFIG_BT_L2CAP=y |
44 | CONFIG_BT_SCO=m | 43 | CONFIG_BT_SCO=y |
45 | CONFIG_BT_RFCOMM=m | 44 | CONFIG_BT_RFCOMM=m |
46 | CONFIG_BT_RFCOMM_TTY=y | 45 | CONFIG_BT_RFCOMM_TTY=y |
47 | CONFIG_BT_BNEP=m | 46 | CONFIG_BT_BNEP=m |
@@ -60,7 +59,6 @@ CONFIG_MTD_NAND_PXA3xx=y | |||
60 | CONFIG_MTD_UBI=y | 59 | CONFIG_MTD_UBI=y |
61 | CONFIG_BLK_DEV_LOOP=y | 60 | CONFIG_BLK_DEV_LOOP=y |
62 | CONFIG_BLK_DEV_RAM=y | 61 | CONFIG_BLK_DEV_RAM=y |
63 | # CONFIG_MISC_DEVICES is not set | ||
64 | CONFIG_SCSI=y | 62 | CONFIG_SCSI=y |
65 | CONFIG_BLK_DEV_SD=y | 63 | CONFIG_BLK_DEV_SD=y |
66 | CONFIG_NETDEVICES=y | 64 | CONFIG_NETDEVICES=y |
@@ -81,16 +79,15 @@ CONFIG_TOUCHSCREEN_WM97XX=m | |||
81 | # CONFIG_TOUCHSCREEN_WM9705 is not set | 79 | # CONFIG_TOUCHSCREEN_WM9705 is not set |
82 | # CONFIG_TOUCHSCREEN_WM9713 is not set | 80 | # CONFIG_TOUCHSCREEN_WM9713 is not set |
83 | # CONFIG_SERIO is not set | 81 | # CONFIG_SERIO is not set |
82 | # CONFIG_LEGACY_PTYS is not set | ||
84 | CONFIG_SERIAL_PXA=y | 83 | CONFIG_SERIAL_PXA=y |
85 | CONFIG_SERIAL_PXA_CONSOLE=y | 84 | CONFIG_SERIAL_PXA_CONSOLE=y |
86 | # CONFIG_LEGACY_PTYS is not set | ||
87 | # CONFIG_HW_RANDOM is not set | 85 | # CONFIG_HW_RANDOM is not set |
88 | CONFIG_I2C=y | 86 | CONFIG_I2C=y |
89 | CONFIG_I2C_PXA=y | 87 | CONFIG_I2C_PXA=y |
90 | CONFIG_SPI=y | 88 | CONFIG_SPI=y |
91 | CONFIG_SPI_GPIO=y | 89 | CONFIG_SPI_GPIO=y |
92 | CONFIG_GPIO_SYSFS=y | 90 | CONFIG_GPIO_SYSFS=y |
93 | CONFIG_GPIO_PCA953X=y | ||
94 | # CONFIG_HWMON is not set | 91 | # CONFIG_HWMON is not set |
95 | CONFIG_PMIC_DA903X=y | 92 | CONFIG_PMIC_DA903X=y |
96 | CONFIG_REGULATOR=y | 93 | CONFIG_REGULATOR=y |
@@ -102,7 +99,6 @@ CONFIG_LCD_CLASS_DEVICE=y | |||
102 | CONFIG_LCD_TDO24M=y | 99 | CONFIG_LCD_TDO24M=y |
103 | # CONFIG_BACKLIGHT_GENERIC is not set | 100 | # CONFIG_BACKLIGHT_GENERIC is not set |
104 | CONFIG_BACKLIGHT_DA903X=m | 101 | CONFIG_BACKLIGHT_DA903X=m |
105 | # CONFIG_VGA_CONSOLE is not set | ||
106 | CONFIG_FRAMEBUFFER_CONSOLE=y | 102 | CONFIG_FRAMEBUFFER_CONSOLE=y |
107 | CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y | 103 | CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y |
108 | CONFIG_FONTS=y | 104 | CONFIG_FONTS=y |
@@ -131,7 +127,6 @@ CONFIG_HID_GREENASIA=y | |||
131 | CONFIG_HID_SMARTJOYPLUS=y | 127 | CONFIG_HID_SMARTJOYPLUS=y |
132 | CONFIG_HID_TOPSEED=y | 128 | CONFIG_HID_TOPSEED=y |
133 | CONFIG_HID_THRUSTMASTER=y | 129 | CONFIG_HID_THRUSTMASTER=y |
134 | CONFIG_HID_WACOM=m | ||
135 | CONFIG_HID_ZEROPLUS=y | 130 | CONFIG_HID_ZEROPLUS=y |
136 | CONFIG_USB=y | 131 | CONFIG_USB=y |
137 | CONFIG_USB_DEVICEFS=y | 132 | CONFIG_USB_DEVICEFS=y |
@@ -152,7 +147,6 @@ CONFIG_RTC_DRV_PXA=y | |||
152 | CONFIG_EXT2_FS=y | 147 | CONFIG_EXT2_FS=y |
153 | CONFIG_EXT3_FS=y | 148 | CONFIG_EXT3_FS=y |
154 | # CONFIG_EXT3_FS_XATTR is not set | 149 | # CONFIG_EXT3_FS_XATTR is not set |
155 | CONFIG_INOTIFY=y | ||
156 | CONFIG_MSDOS_FS=m | 150 | CONFIG_MSDOS_FS=m |
157 | CONFIG_VFAT_FS=m | 151 | CONFIG_VFAT_FS=m |
158 | CONFIG_TMPFS=y | 152 | CONFIG_TMPFS=y |
@@ -164,7 +158,6 @@ CONFIG_NFS_V3=y | |||
164 | CONFIG_NFS_V3_ACL=y | 158 | CONFIG_NFS_V3_ACL=y |
165 | CONFIG_NFS_V4=y | 159 | CONFIG_NFS_V4=y |
166 | CONFIG_ROOT_NFS=y | 160 | CONFIG_ROOT_NFS=y |
167 | CONFIG_SMB_FS=m | ||
168 | CONFIG_CIFS=m | 161 | CONFIG_CIFS=m |
169 | CONFIG_CIFS_WEAK_PW_HASH=y | 162 | CONFIG_CIFS_WEAK_PW_HASH=y |
170 | CONFIG_PARTITION_ADVANCED=y | 163 | CONFIG_PARTITION_ADVANCED=y |
@@ -172,9 +165,7 @@ CONFIG_NLS_CODEPAGE_437=m | |||
172 | CONFIG_NLS_ISO8859_1=m | 165 | CONFIG_NLS_ISO8859_1=m |
173 | CONFIG_DEBUG_FS=y | 166 | CONFIG_DEBUG_FS=y |
174 | CONFIG_DEBUG_KERNEL=y | 167 | CONFIG_DEBUG_KERNEL=y |
175 | # CONFIG_DETECT_SOFTLOCKUP is not set | ||
176 | # CONFIG_SCHED_DEBUG is not set | 168 | # CONFIG_SCHED_DEBUG is not set |
177 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
178 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 169 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
179 | # CONFIG_FTRACE is not set | 170 | # CONFIG_FTRACE is not set |
180 | CONFIG_DEBUG_USER=y | 171 | CONFIG_DEBUG_USER=y |
@@ -182,7 +173,6 @@ CONFIG_DEBUG_LL=y | |||
182 | CONFIG_CRYPTO_ECB=m | 173 | CONFIG_CRYPTO_ECB=m |
183 | CONFIG_CRYPTO_MICHAEL_MIC=m | 174 | CONFIG_CRYPTO_MICHAEL_MIC=m |
184 | CONFIG_CRYPTO_AES=m | 175 | CONFIG_CRYPTO_AES=m |
185 | CONFIG_CRYPTO_ARC4=m | ||
186 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 176 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
187 | # CONFIG_CRYPTO_HW is not set | 177 | # CONFIG_CRYPTO_HW is not set |
188 | CONFIG_CRC_T10DIF=y | 178 | CONFIG_CRC_T10DIF=y |
diff --git a/arch/arm/include/asm/hardware/scoop.h b/arch/arm/include/asm/hardware/scoop.h index ebb3ceaa8fac..58cdf5d84122 100644 --- a/arch/arm/include/asm/hardware/scoop.h +++ b/arch/arm/include/asm/hardware/scoop.h | |||
@@ -61,7 +61,6 @@ struct scoop_pcmcia_dev { | |||
61 | struct scoop_pcmcia_config { | 61 | struct scoop_pcmcia_config { |
62 | struct scoop_pcmcia_dev *devs; | 62 | struct scoop_pcmcia_dev *devs; |
63 | int num_devs; | 63 | int num_devs; |
64 | void (*pcmcia_init)(void); | ||
65 | void (*power_ctrl)(struct device *scoop, unsigned short cpr, int nr); | 64 | void (*power_ctrl)(struct device *scoop, unsigned short cpr, int nr); |
66 | }; | 65 | }; |
67 | 66 | ||
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 6d03643b9bd1..993a3146fd35 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c | |||
@@ -719,9 +719,15 @@ static void __init cdce_clk_init(void) | |||
719 | } | 719 | } |
720 | } | 720 | } |
721 | 721 | ||
722 | #define DM6467T_EVM_REF_FREQ 33000000 | ||
723 | |||
722 | static void __init davinci_map_io(void) | 724 | static void __init davinci_map_io(void) |
723 | { | 725 | { |
724 | dm646x_init(); | 726 | dm646x_init(); |
727 | |||
728 | if (machine_is_davinci_dm6467tevm()) | ||
729 | davinci_set_refclk_rate(DM6467T_EVM_REF_FREQ); | ||
730 | |||
725 | cdce_clk_init(); | 731 | cdce_clk_init(); |
726 | } | 732 | } |
727 | 733 | ||
@@ -785,17 +791,6 @@ static __init void evm_init(void) | |||
785 | soc_info->emac_pdata->phy_id = DM646X_EVM_PHY_ID; | 791 | soc_info->emac_pdata->phy_id = DM646X_EVM_PHY_ID; |
786 | } | 792 | } |
787 | 793 | ||
788 | #define DM646X_EVM_REF_FREQ 27000000 | ||
789 | #define DM6467T_EVM_REF_FREQ 33000000 | ||
790 | |||
791 | void __init dm646x_board_setup_refclk(struct clk *clk) | ||
792 | { | ||
793 | if (machine_is_davinci_dm6467tevm()) | ||
794 | clk->rate = DM6467T_EVM_REF_FREQ; | ||
795 | else | ||
796 | clk->rate = DM646X_EVM_REF_FREQ; | ||
797 | } | ||
798 | |||
799 | MACHINE_START(DAVINCI_DM6467_EVM, "DaVinci DM646x EVM") | 794 | MACHINE_START(DAVINCI_DM6467_EVM, "DaVinci DM646x EVM") |
800 | .boot_params = (0x80000100), | 795 | .boot_params = (0x80000100), |
801 | .map_io = davinci_map_io, | 796 | .map_io = davinci_map_io, |
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c index e4e3af179f02..ae653194b645 100644 --- a/arch/arm/mach-davinci/clock.c +++ b/arch/arm/mach-davinci/clock.c | |||
@@ -368,6 +368,12 @@ static unsigned long clk_leafclk_recalc(struct clk *clk) | |||
368 | return clk->parent->rate; | 368 | return clk->parent->rate; |
369 | } | 369 | } |
370 | 370 | ||
371 | int davinci_simple_set_rate(struct clk *clk, unsigned long rate) | ||
372 | { | ||
373 | clk->rate = rate; | ||
374 | return 0; | ||
375 | } | ||
376 | |||
371 | static unsigned long clk_pllclk_recalc(struct clk *clk) | 377 | static unsigned long clk_pllclk_recalc(struct clk *clk) |
372 | { | 378 | { |
373 | u32 ctrl, mult = 1, prediv = 1, postdiv = 1; | 379 | u32 ctrl, mult = 1, prediv = 1, postdiv = 1; |
@@ -506,6 +512,38 @@ int davinci_set_pllrate(struct pll_data *pll, unsigned int prediv, | |||
506 | } | 512 | } |
507 | EXPORT_SYMBOL(davinci_set_pllrate); | 513 | EXPORT_SYMBOL(davinci_set_pllrate); |
508 | 514 | ||
515 | /** | ||
516 | * davinci_set_refclk_rate() - Set the reference clock rate | ||
517 | * @rate: The new rate. | ||
518 | * | ||
519 | * Sets the reference clock rate to a given value. This will most likely | ||
520 | * result in the entire clock tree getting updated. | ||
521 | * | ||
522 | * This is used to support boards which use a reference clock different | ||
523 | * than that used by default in <soc>.c file. The reference clock rate | ||
524 | * should be updated early in the boot process; ideally soon after the | ||
525 | * clock tree has been initialized once with the default reference clock | ||
526 | * rate (davinci_common_init()). | ||
527 | * | ||
528 | * Returns 0 on success, error otherwise. | ||
529 | */ | ||
530 | int davinci_set_refclk_rate(unsigned long rate) | ||
531 | { | ||
532 | struct clk *refclk; | ||
533 | |||
534 | refclk = clk_get(NULL, "ref"); | ||
535 | if (IS_ERR(refclk)) { | ||
536 | pr_err("%s: failed to get reference clock.\n", __func__); | ||
537 | return PTR_ERR(refclk); | ||
538 | } | ||
539 | |||
540 | clk_set_rate(refclk, rate); | ||
541 | |||
542 | clk_put(refclk); | ||
543 | |||
544 | return 0; | ||
545 | } | ||
546 | |||
509 | int __init davinci_clk_init(struct clk_lookup *clocks) | 547 | int __init davinci_clk_init(struct clk_lookup *clocks) |
510 | { | 548 | { |
511 | struct clk_lookup *c; | 549 | struct clk_lookup *c; |
diff --git a/arch/arm/mach-davinci/clock.h b/arch/arm/mach-davinci/clock.h index 0dd22031ec62..50b2482e0ba2 100644 --- a/arch/arm/mach-davinci/clock.h +++ b/arch/arm/mach-davinci/clock.h | |||
@@ -123,6 +123,8 @@ int davinci_clk_init(struct clk_lookup *clocks); | |||
123 | int davinci_set_pllrate(struct pll_data *pll, unsigned int prediv, | 123 | int davinci_set_pllrate(struct pll_data *pll, unsigned int prediv, |
124 | unsigned int mult, unsigned int postdiv); | 124 | unsigned int mult, unsigned int postdiv); |
125 | int davinci_set_sysclk_rate(struct clk *clk, unsigned long rate); | 125 | int davinci_set_sysclk_rate(struct clk *clk, unsigned long rate); |
126 | int davinci_set_refclk_rate(unsigned long rate); | ||
127 | int davinci_simple_set_rate(struct clk *clk, unsigned long rate); | ||
126 | 128 | ||
127 | extern struct platform_device davinci_wdt_device; | 129 | extern struct platform_device davinci_wdt_device; |
128 | extern void davinci_watchdog_reset(struct platform_device *); | 130 | extern void davinci_watchdog_reset(struct platform_device *); |
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c index e00d61e2efbe..1802e711a2b8 100644 --- a/arch/arm/mach-davinci/dm646x.c +++ b/arch/arm/mach-davinci/dm646x.c | |||
@@ -43,6 +43,7 @@ | |||
43 | /* | 43 | /* |
44 | * Device specific clocks | 44 | * Device specific clocks |
45 | */ | 45 | */ |
46 | #define DM646X_REF_FREQ 27000000 | ||
46 | #define DM646X_AUX_FREQ 24000000 | 47 | #define DM646X_AUX_FREQ 24000000 |
47 | 48 | ||
48 | static struct pll_data pll1_data = { | 49 | static struct pll_data pll1_data = { |
@@ -57,6 +58,8 @@ static struct pll_data pll2_data = { | |||
57 | 58 | ||
58 | static struct clk ref_clk = { | 59 | static struct clk ref_clk = { |
59 | .name = "ref_clk", | 60 | .name = "ref_clk", |
61 | .rate = DM646X_REF_FREQ, | ||
62 | .set_rate = davinci_simple_set_rate, | ||
60 | }; | 63 | }; |
61 | 64 | ||
62 | static struct clk aux_clkin = { | 65 | static struct clk aux_clkin = { |
@@ -902,7 +905,6 @@ int __init dm646x_init_edma(struct edma_rsv_info *rsv) | |||
902 | 905 | ||
903 | void __init dm646x_init(void) | 906 | void __init dm646x_init(void) |
904 | { | 907 | { |
905 | dm646x_board_setup_refclk(&ref_clk); | ||
906 | davinci_common_init(&davinci_soc_info_dm646x); | 908 | davinci_common_init(&davinci_soc_info_dm646x); |
907 | } | 909 | } |
908 | 910 | ||
diff --git a/arch/arm/mach-davinci/include/mach/dm646x.h b/arch/arm/mach-davinci/include/mach/dm646x.h index 7a27f3f13913..2a00fe5ac253 100644 --- a/arch/arm/mach-davinci/include/mach/dm646x.h +++ b/arch/arm/mach-davinci/include/mach/dm646x.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <mach/asp.h> | 15 | #include <mach/asp.h> |
16 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
17 | #include <linux/videodev2.h> | 17 | #include <linux/videodev2.h> |
18 | #include <linux/clk.h> | ||
19 | #include <linux/davinci_emac.h> | 18 | #include <linux/davinci_emac.h> |
20 | 19 | ||
21 | #define DM646X_EMAC_BASE (0x01C80000) | 20 | #define DM646X_EMAC_BASE (0x01C80000) |
@@ -31,7 +30,6 @@ | |||
31 | void __init dm646x_init(void); | 30 | void __init dm646x_init(void); |
32 | void __init dm646x_init_mcasp0(struct snd_platform_data *pdata); | 31 | void __init dm646x_init_mcasp0(struct snd_platform_data *pdata); |
33 | void __init dm646x_init_mcasp1(struct snd_platform_data *pdata); | 32 | void __init dm646x_init_mcasp1(struct snd_platform_data *pdata); |
34 | void __init dm646x_board_setup_refclk(struct clk *clk); | ||
35 | int __init dm646x_init_edma(struct edma_rsv_info *rsv); | 33 | int __init dm646x_init_edma(struct edma_rsv_info *rsv); |
36 | 34 | ||
37 | void dm646x_video_init(void); | 35 | void dm646x_video_init(void); |
diff --git a/arch/arm/mach-davinci/include/mach/psc.h b/arch/arm/mach-davinci/include/mach/psc.h index a47e6f29206e..1110fdd77ba4 100644 --- a/arch/arm/mach-davinci/include/mach/psc.h +++ b/arch/arm/mach-davinci/include/mach/psc.h | |||
@@ -30,47 +30,47 @@ | |||
30 | #define DAVINCI_PWR_SLEEP_CNTRL_BASE 0x01C41000 | 30 | #define DAVINCI_PWR_SLEEP_CNTRL_BASE 0x01C41000 |
31 | 31 | ||
32 | /* Power and Sleep Controller (PSC) Domains */ | 32 | /* Power and Sleep Controller (PSC) Domains */ |
33 | #define DAVINCI_GPSC_ARMDOMAIN 0 | 33 | #define DAVINCI_GPSC_ARMDOMAIN 0 |
34 | #define DAVINCI_GPSC_DSPDOMAIN 1 | 34 | #define DAVINCI_GPSC_DSPDOMAIN 1 |
35 | 35 | ||
36 | #define DAVINCI_LPSC_VPSSMSTR 0 | 36 | #define DAVINCI_LPSC_VPSSMSTR 0 |
37 | #define DAVINCI_LPSC_VPSSSLV 1 | 37 | #define DAVINCI_LPSC_VPSSSLV 1 |
38 | #define DAVINCI_LPSC_TPCC 2 | 38 | #define DAVINCI_LPSC_TPCC 2 |
39 | #define DAVINCI_LPSC_TPTC0 3 | 39 | #define DAVINCI_LPSC_TPTC0 3 |
40 | #define DAVINCI_LPSC_TPTC1 4 | 40 | #define DAVINCI_LPSC_TPTC1 4 |
41 | #define DAVINCI_LPSC_EMAC 5 | 41 | #define DAVINCI_LPSC_EMAC 5 |
42 | #define DAVINCI_LPSC_EMAC_WRAPPER 6 | 42 | #define DAVINCI_LPSC_EMAC_WRAPPER 6 |
43 | #define DAVINCI_LPSC_USB 9 | 43 | #define DAVINCI_LPSC_USB 9 |
44 | #define DAVINCI_LPSC_ATA 10 | 44 | #define DAVINCI_LPSC_ATA 10 |
45 | #define DAVINCI_LPSC_VLYNQ 11 | 45 | #define DAVINCI_LPSC_VLYNQ 11 |
46 | #define DAVINCI_LPSC_UHPI 12 | 46 | #define DAVINCI_LPSC_UHPI 12 |
47 | #define DAVINCI_LPSC_DDR_EMIF 13 | 47 | #define DAVINCI_LPSC_DDR_EMIF 13 |
48 | #define DAVINCI_LPSC_AEMIF 14 | 48 | #define DAVINCI_LPSC_AEMIF 14 |
49 | #define DAVINCI_LPSC_MMC_SD 15 | 49 | #define DAVINCI_LPSC_MMC_SD 15 |
50 | #define DAVINCI_LPSC_McBSP 17 | 50 | #define DAVINCI_LPSC_McBSP 17 |
51 | #define DAVINCI_LPSC_I2C 18 | 51 | #define DAVINCI_LPSC_I2C 18 |
52 | #define DAVINCI_LPSC_UART0 19 | 52 | #define DAVINCI_LPSC_UART0 19 |
53 | #define DAVINCI_LPSC_UART1 20 | 53 | #define DAVINCI_LPSC_UART1 20 |
54 | #define DAVINCI_LPSC_UART2 21 | 54 | #define DAVINCI_LPSC_UART2 21 |
55 | #define DAVINCI_LPSC_SPI 22 | 55 | #define DAVINCI_LPSC_SPI 22 |
56 | #define DAVINCI_LPSC_PWM0 23 | 56 | #define DAVINCI_LPSC_PWM0 23 |
57 | #define DAVINCI_LPSC_PWM1 24 | 57 | #define DAVINCI_LPSC_PWM1 24 |
58 | #define DAVINCI_LPSC_PWM2 25 | 58 | #define DAVINCI_LPSC_PWM2 25 |
59 | #define DAVINCI_LPSC_GPIO 26 | 59 | #define DAVINCI_LPSC_GPIO 26 |
60 | #define DAVINCI_LPSC_TIMER0 27 | 60 | #define DAVINCI_LPSC_TIMER0 27 |
61 | #define DAVINCI_LPSC_TIMER1 28 | 61 | #define DAVINCI_LPSC_TIMER1 28 |
62 | #define DAVINCI_LPSC_TIMER2 29 | 62 | #define DAVINCI_LPSC_TIMER2 29 |
63 | #define DAVINCI_LPSC_SYSTEM_SUBSYS 30 | 63 | #define DAVINCI_LPSC_SYSTEM_SUBSYS 30 |
64 | #define DAVINCI_LPSC_ARM 31 | 64 | #define DAVINCI_LPSC_ARM 31 |
65 | #define DAVINCI_LPSC_SCR2 32 | 65 | #define DAVINCI_LPSC_SCR2 32 |
66 | #define DAVINCI_LPSC_SCR3 33 | 66 | #define DAVINCI_LPSC_SCR3 33 |
67 | #define DAVINCI_LPSC_SCR4 34 | 67 | #define DAVINCI_LPSC_SCR4 34 |
68 | #define DAVINCI_LPSC_CROSSBAR 35 | 68 | #define DAVINCI_LPSC_CROSSBAR 35 |
69 | #define DAVINCI_LPSC_CFG27 36 | 69 | #define DAVINCI_LPSC_CFG27 36 |
70 | #define DAVINCI_LPSC_CFG3 37 | 70 | #define DAVINCI_LPSC_CFG3 37 |
71 | #define DAVINCI_LPSC_CFG5 38 | 71 | #define DAVINCI_LPSC_CFG5 38 |
72 | #define DAVINCI_LPSC_GEM 39 | 72 | #define DAVINCI_LPSC_GEM 39 |
73 | #define DAVINCI_LPSC_IMCOP 40 | 73 | #define DAVINCI_LPSC_IMCOP 40 |
74 | 74 | ||
75 | #define DM355_LPSC_TIMER3 5 | 75 | #define DM355_LPSC_TIMER3 5 |
76 | #define DM355_LPSC_SPI1 6 | 76 | #define DM355_LPSC_SPI1 6 |
@@ -102,39 +102,39 @@ | |||
102 | /* | 102 | /* |
103 | * LPSC Assignments | 103 | * LPSC Assignments |
104 | */ | 104 | */ |
105 | #define DM646X_LPSC_ARM 0 | 105 | #define DM646X_LPSC_ARM 0 |
106 | #define DM646X_LPSC_C64X_CPU 1 | 106 | #define DM646X_LPSC_C64X_CPU 1 |
107 | #define DM646X_LPSC_HDVICP0 2 | 107 | #define DM646X_LPSC_HDVICP0 2 |
108 | #define DM646X_LPSC_HDVICP1 3 | 108 | #define DM646X_LPSC_HDVICP1 3 |
109 | #define DM646X_LPSC_TPCC 4 | 109 | #define DM646X_LPSC_TPCC 4 |
110 | #define DM646X_LPSC_TPTC0 5 | 110 | #define DM646X_LPSC_TPTC0 5 |
111 | #define DM646X_LPSC_TPTC1 6 | 111 | #define DM646X_LPSC_TPTC1 6 |
112 | #define DM646X_LPSC_TPTC2 7 | 112 | #define DM646X_LPSC_TPTC2 7 |
113 | #define DM646X_LPSC_TPTC3 8 | 113 | #define DM646X_LPSC_TPTC3 8 |
114 | #define DM646X_LPSC_PCI 13 | 114 | #define DM646X_LPSC_PCI 13 |
115 | #define DM646X_LPSC_EMAC 14 | 115 | #define DM646X_LPSC_EMAC 14 |
116 | #define DM646X_LPSC_VDCE 15 | 116 | #define DM646X_LPSC_VDCE 15 |
117 | #define DM646X_LPSC_VPSSMSTR 16 | 117 | #define DM646X_LPSC_VPSSMSTR 16 |
118 | #define DM646X_LPSC_VPSSSLV 17 | 118 | #define DM646X_LPSC_VPSSSLV 17 |
119 | #define DM646X_LPSC_TSIF0 18 | 119 | #define DM646X_LPSC_TSIF0 18 |
120 | #define DM646X_LPSC_TSIF1 19 | 120 | #define DM646X_LPSC_TSIF1 19 |
121 | #define DM646X_LPSC_DDR_EMIF 20 | 121 | #define DM646X_LPSC_DDR_EMIF 20 |
122 | #define DM646X_LPSC_AEMIF 21 | 122 | #define DM646X_LPSC_AEMIF 21 |
123 | #define DM646X_LPSC_McASP0 22 | 123 | #define DM646X_LPSC_McASP0 22 |
124 | #define DM646X_LPSC_McASP1 23 | 124 | #define DM646X_LPSC_McASP1 23 |
125 | #define DM646X_LPSC_CRGEN0 24 | 125 | #define DM646X_LPSC_CRGEN0 24 |
126 | #define DM646X_LPSC_CRGEN1 25 | 126 | #define DM646X_LPSC_CRGEN1 25 |
127 | #define DM646X_LPSC_UART0 26 | 127 | #define DM646X_LPSC_UART0 26 |
128 | #define DM646X_LPSC_UART1 27 | 128 | #define DM646X_LPSC_UART1 27 |
129 | #define DM646X_LPSC_UART2 28 | 129 | #define DM646X_LPSC_UART2 28 |
130 | #define DM646X_LPSC_PWM0 29 | 130 | #define DM646X_LPSC_PWM0 29 |
131 | #define DM646X_LPSC_PWM1 30 | 131 | #define DM646X_LPSC_PWM1 30 |
132 | #define DM646X_LPSC_I2C 31 | 132 | #define DM646X_LPSC_I2C 31 |
133 | #define DM646X_LPSC_SPI 32 | 133 | #define DM646X_LPSC_SPI 32 |
134 | #define DM646X_LPSC_GPIO 33 | 134 | #define DM646X_LPSC_GPIO 33 |
135 | #define DM646X_LPSC_TIMER0 34 | 135 | #define DM646X_LPSC_TIMER0 34 |
136 | #define DM646X_LPSC_TIMER1 35 | 136 | #define DM646X_LPSC_TIMER1 35 |
137 | #define DM646X_LPSC_ARM_INTC 45 | 137 | #define DM646X_LPSC_ARM_INTC 45 |
138 | 138 | ||
139 | /* PSC0 defines */ | 139 | /* PSC0 defines */ |
140 | #define DA8XX_LPSC0_TPCC 0 | 140 | #define DA8XX_LPSC0_TPCC 0 |
@@ -243,7 +243,7 @@ | |||
243 | #define PSC_STATE_DISABLE 2 | 243 | #define PSC_STATE_DISABLE 2 |
244 | #define PSC_STATE_ENABLE 3 | 244 | #define PSC_STATE_ENABLE 3 |
245 | 245 | ||
246 | #define MDSTAT_STATE_MASK 0x1f | 246 | #define MDSTAT_STATE_MASK 0x1f |
247 | 247 | ||
248 | #ifndef __ASSEMBLER__ | 248 | #ifndef __ASSEMBLER__ |
249 | 249 | ||
diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index 1435fc31c4b2..ae433a052df6 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig | |||
@@ -110,6 +110,8 @@ config MACH_SMDKC210 | |||
110 | select S3C_DEV_HSMMC1 | 110 | select S3C_DEV_HSMMC1 |
111 | select S3C_DEV_HSMMC2 | 111 | select S3C_DEV_HSMMC2 |
112 | select S3C_DEV_HSMMC3 | 112 | select S3C_DEV_HSMMC3 |
113 | select SAMSUNG_DEV_PWM | ||
114 | select SAMSUNG_DEV_BACKLIGHT | ||
113 | select EXYNOS4_DEV_PD | 115 | select EXYNOS4_DEV_PD |
114 | select EXYNOS4_DEV_SYSMMU | 116 | select EXYNOS4_DEV_SYSMMU |
115 | select EXYNOS4_SETUP_I2C1 | 117 | select EXYNOS4_SETUP_I2C1 |
@@ -127,8 +129,10 @@ config MACH_SMDKV310 | |||
127 | select S3C_DEV_HSMMC1 | 129 | select S3C_DEV_HSMMC1 |
128 | select S3C_DEV_HSMMC2 | 130 | select S3C_DEV_HSMMC2 |
129 | select S3C_DEV_HSMMC3 | 131 | select S3C_DEV_HSMMC3 |
132 | select SAMSUNG_DEV_BACKLIGHT | ||
130 | select SAMSUNG_DEV_KEYPAD | 133 | select SAMSUNG_DEV_KEYPAD |
131 | select EXYNOS4_DEV_PD | 134 | select EXYNOS4_DEV_PD |
135 | select SAMSUNG_DEV_PWM | ||
132 | select EXYNOS4_DEV_SYSMMU | 136 | select EXYNOS4_DEV_SYSMMU |
133 | select EXYNOS4_SETUP_I2C1 | 137 | select EXYNOS4_SETUP_I2C1 |
134 | select EXYNOS4_SETUP_KEYPAD | 138 | select EXYNOS4_SETUP_KEYPAD |
diff --git a/arch/arm/mach-exynos4/clock.c b/arch/arm/mach-exynos4/clock.c index 871f9d508fde..66494f28bbef 100644 --- a/arch/arm/mach-exynos4/clock.c +++ b/arch/arm/mach-exynos4/clock.c | |||
@@ -27,24 +27,20 @@ | |||
27 | 27 | ||
28 | static struct clk clk_sclk_hdmi27m = { | 28 | static struct clk clk_sclk_hdmi27m = { |
29 | .name = "sclk_hdmi27m", | 29 | .name = "sclk_hdmi27m", |
30 | .id = -1, | ||
31 | .rate = 27000000, | 30 | .rate = 27000000, |
32 | }; | 31 | }; |
33 | 32 | ||
34 | static struct clk clk_sclk_hdmiphy = { | 33 | static struct clk clk_sclk_hdmiphy = { |
35 | .name = "sclk_hdmiphy", | 34 | .name = "sclk_hdmiphy", |
36 | .id = -1, | ||
37 | }; | 35 | }; |
38 | 36 | ||
39 | static struct clk clk_sclk_usbphy0 = { | 37 | static struct clk clk_sclk_usbphy0 = { |
40 | .name = "sclk_usbphy0", | 38 | .name = "sclk_usbphy0", |
41 | .id = -1, | ||
42 | .rate = 27000000, | 39 | .rate = 27000000, |
43 | }; | 40 | }; |
44 | 41 | ||
45 | static struct clk clk_sclk_usbphy1 = { | 42 | static struct clk clk_sclk_usbphy1 = { |
46 | .name = "sclk_usbphy1", | 43 | .name = "sclk_usbphy1", |
47 | .id = -1, | ||
48 | }; | 44 | }; |
49 | 45 | ||
50 | static int exynos4_clksrc_mask_top_ctrl(struct clk *clk, int enable) | 46 | static int exynos4_clksrc_mask_top_ctrl(struct clk *clk, int enable) |
@@ -132,7 +128,6 @@ static int exynos4_clk_ip_perir_ctrl(struct clk *clk, int enable) | |||
132 | static struct clksrc_clk clk_mout_apll = { | 128 | static struct clksrc_clk clk_mout_apll = { |
133 | .clk = { | 129 | .clk = { |
134 | .name = "mout_apll", | 130 | .name = "mout_apll", |
135 | .id = -1, | ||
136 | }, | 131 | }, |
137 | .sources = &clk_src_apll, | 132 | .sources = &clk_src_apll, |
138 | .reg_src = { .reg = S5P_CLKSRC_CPU, .shift = 0, .size = 1 }, | 133 | .reg_src = { .reg = S5P_CLKSRC_CPU, .shift = 0, .size = 1 }, |
@@ -141,7 +136,6 @@ static struct clksrc_clk clk_mout_apll = { | |||
141 | static struct clksrc_clk clk_sclk_apll = { | 136 | static struct clksrc_clk clk_sclk_apll = { |
142 | .clk = { | 137 | .clk = { |
143 | .name = "sclk_apll", | 138 | .name = "sclk_apll", |
144 | .id = -1, | ||
145 | .parent = &clk_mout_apll.clk, | 139 | .parent = &clk_mout_apll.clk, |
146 | }, | 140 | }, |
147 | .reg_div = { .reg = S5P_CLKDIV_CPU, .shift = 24, .size = 3 }, | 141 | .reg_div = { .reg = S5P_CLKDIV_CPU, .shift = 24, .size = 3 }, |
@@ -150,7 +144,6 @@ static struct clksrc_clk clk_sclk_apll = { | |||
150 | static struct clksrc_clk clk_mout_epll = { | 144 | static struct clksrc_clk clk_mout_epll = { |
151 | .clk = { | 145 | .clk = { |
152 | .name = "mout_epll", | 146 | .name = "mout_epll", |
153 | .id = -1, | ||
154 | }, | 147 | }, |
155 | .sources = &clk_src_epll, | 148 | .sources = &clk_src_epll, |
156 | .reg_src = { .reg = S5P_CLKSRC_TOP0, .shift = 4, .size = 1 }, | 149 | .reg_src = { .reg = S5P_CLKSRC_TOP0, .shift = 4, .size = 1 }, |
@@ -159,7 +152,6 @@ static struct clksrc_clk clk_mout_epll = { | |||
159 | static struct clksrc_clk clk_mout_mpll = { | 152 | static struct clksrc_clk clk_mout_mpll = { |
160 | .clk = { | 153 | .clk = { |
161 | .name = "mout_mpll", | 154 | .name = "mout_mpll", |
162 | .id = -1, | ||
163 | }, | 155 | }, |
164 | .sources = &clk_src_mpll, | 156 | .sources = &clk_src_mpll, |
165 | .reg_src = { .reg = S5P_CLKSRC_CPU, .shift = 8, .size = 1 }, | 157 | .reg_src = { .reg = S5P_CLKSRC_CPU, .shift = 8, .size = 1 }, |
@@ -178,7 +170,6 @@ static struct clksrc_sources clkset_moutcore = { | |||
178 | static struct clksrc_clk clk_moutcore = { | 170 | static struct clksrc_clk clk_moutcore = { |
179 | .clk = { | 171 | .clk = { |
180 | .name = "moutcore", | 172 | .name = "moutcore", |
181 | .id = -1, | ||
182 | }, | 173 | }, |
183 | .sources = &clkset_moutcore, | 174 | .sources = &clkset_moutcore, |
184 | .reg_src = { .reg = S5P_CLKSRC_CPU, .shift = 16, .size = 1 }, | 175 | .reg_src = { .reg = S5P_CLKSRC_CPU, .shift = 16, .size = 1 }, |
@@ -187,7 +178,6 @@ static struct clksrc_clk clk_moutcore = { | |||
187 | static struct clksrc_clk clk_coreclk = { | 178 | static struct clksrc_clk clk_coreclk = { |
188 | .clk = { | 179 | .clk = { |
189 | .name = "core_clk", | 180 | .name = "core_clk", |
190 | .id = -1, | ||
191 | .parent = &clk_moutcore.clk, | 181 | .parent = &clk_moutcore.clk, |
192 | }, | 182 | }, |
193 | .reg_div = { .reg = S5P_CLKDIV_CPU, .shift = 0, .size = 3 }, | 183 | .reg_div = { .reg = S5P_CLKDIV_CPU, .shift = 0, .size = 3 }, |
@@ -196,7 +186,6 @@ static struct clksrc_clk clk_coreclk = { | |||
196 | static struct clksrc_clk clk_armclk = { | 186 | static struct clksrc_clk clk_armclk = { |
197 | .clk = { | 187 | .clk = { |
198 | .name = "armclk", | 188 | .name = "armclk", |
199 | .id = -1, | ||
200 | .parent = &clk_coreclk.clk, | 189 | .parent = &clk_coreclk.clk, |
201 | }, | 190 | }, |
202 | }; | 191 | }; |
@@ -204,7 +193,6 @@ static struct clksrc_clk clk_armclk = { | |||
204 | static struct clksrc_clk clk_aclk_corem0 = { | 193 | static struct clksrc_clk clk_aclk_corem0 = { |
205 | .clk = { | 194 | .clk = { |
206 | .name = "aclk_corem0", | 195 | .name = "aclk_corem0", |
207 | .id = -1, | ||
208 | .parent = &clk_coreclk.clk, | 196 | .parent = &clk_coreclk.clk, |
209 | }, | 197 | }, |
210 | .reg_div = { .reg = S5P_CLKDIV_CPU, .shift = 4, .size = 3 }, | 198 | .reg_div = { .reg = S5P_CLKDIV_CPU, .shift = 4, .size = 3 }, |
@@ -213,7 +201,6 @@ static struct clksrc_clk clk_aclk_corem0 = { | |||
213 | static struct clksrc_clk clk_aclk_cores = { | 201 | static struct clksrc_clk clk_aclk_cores = { |
214 | .clk = { | 202 | .clk = { |
215 | .name = "aclk_cores", | 203 | .name = "aclk_cores", |
216 | .id = -1, | ||
217 | .parent = &clk_coreclk.clk, | 204 | .parent = &clk_coreclk.clk, |
218 | }, | 205 | }, |
219 | .reg_div = { .reg = S5P_CLKDIV_CPU, .shift = 4, .size = 3 }, | 206 | .reg_div = { .reg = S5P_CLKDIV_CPU, .shift = 4, .size = 3 }, |
@@ -222,7 +209,6 @@ static struct clksrc_clk clk_aclk_cores = { | |||
222 | static struct clksrc_clk clk_aclk_corem1 = { | 209 | static struct clksrc_clk clk_aclk_corem1 = { |
223 | .clk = { | 210 | .clk = { |
224 | .name = "aclk_corem1", | 211 | .name = "aclk_corem1", |
225 | .id = -1, | ||
226 | .parent = &clk_coreclk.clk, | 212 | .parent = &clk_coreclk.clk, |
227 | }, | 213 | }, |
228 | .reg_div = { .reg = S5P_CLKDIV_CPU, .shift = 8, .size = 3 }, | 214 | .reg_div = { .reg = S5P_CLKDIV_CPU, .shift = 8, .size = 3 }, |
@@ -231,7 +217,6 @@ static struct clksrc_clk clk_aclk_corem1 = { | |||
231 | static struct clksrc_clk clk_periphclk = { | 217 | static struct clksrc_clk clk_periphclk = { |
232 | .clk = { | 218 | .clk = { |
233 | .name = "periphclk", | 219 | .name = "periphclk", |
234 | .id = -1, | ||
235 | .parent = &clk_coreclk.clk, | 220 | .parent = &clk_coreclk.clk, |
236 | }, | 221 | }, |
237 | .reg_div = { .reg = S5P_CLKDIV_CPU, .shift = 12, .size = 3 }, | 222 | .reg_div = { .reg = S5P_CLKDIV_CPU, .shift = 12, .size = 3 }, |
@@ -252,7 +237,6 @@ static struct clksrc_sources clkset_mout_corebus = { | |||
252 | static struct clksrc_clk clk_mout_corebus = { | 237 | static struct clksrc_clk clk_mout_corebus = { |
253 | .clk = { | 238 | .clk = { |
254 | .name = "mout_corebus", | 239 | .name = "mout_corebus", |
255 | .id = -1, | ||
256 | }, | 240 | }, |
257 | .sources = &clkset_mout_corebus, | 241 | .sources = &clkset_mout_corebus, |
258 | .reg_src = { .reg = S5P_CLKSRC_DMC, .shift = 4, .size = 1 }, | 242 | .reg_src = { .reg = S5P_CLKSRC_DMC, .shift = 4, .size = 1 }, |
@@ -261,7 +245,6 @@ static struct clksrc_clk clk_mout_corebus = { | |||
261 | static struct clksrc_clk clk_sclk_dmc = { | 245 | static struct clksrc_clk clk_sclk_dmc = { |
262 | .clk = { | 246 | .clk = { |
263 | .name = "sclk_dmc", | 247 | .name = "sclk_dmc", |
264 | .id = -1, | ||
265 | .parent = &clk_mout_corebus.clk, | 248 | .parent = &clk_mout_corebus.clk, |
266 | }, | 249 | }, |
267 | .reg_div = { .reg = S5P_CLKDIV_DMC0, .shift = 12, .size = 3 }, | 250 | .reg_div = { .reg = S5P_CLKDIV_DMC0, .shift = 12, .size = 3 }, |
@@ -270,7 +253,6 @@ static struct clksrc_clk clk_sclk_dmc = { | |||
270 | static struct clksrc_clk clk_aclk_cored = { | 253 | static struct clksrc_clk clk_aclk_cored = { |
271 | .clk = { | 254 | .clk = { |
272 | .name = "aclk_cored", | 255 | .name = "aclk_cored", |
273 | .id = -1, | ||
274 | .parent = &clk_sclk_dmc.clk, | 256 | .parent = &clk_sclk_dmc.clk, |
275 | }, | 257 | }, |
276 | .reg_div = { .reg = S5P_CLKDIV_DMC0, .shift = 16, .size = 3 }, | 258 | .reg_div = { .reg = S5P_CLKDIV_DMC0, .shift = 16, .size = 3 }, |
@@ -279,7 +261,6 @@ static struct clksrc_clk clk_aclk_cored = { | |||
279 | static struct clksrc_clk clk_aclk_corep = { | 261 | static struct clksrc_clk clk_aclk_corep = { |
280 | .clk = { | 262 | .clk = { |
281 | .name = "aclk_corep", | 263 | .name = "aclk_corep", |
282 | .id = -1, | ||
283 | .parent = &clk_aclk_cored.clk, | 264 | .parent = &clk_aclk_cored.clk, |
284 | }, | 265 | }, |
285 | .reg_div = { .reg = S5P_CLKDIV_DMC0, .shift = 20, .size = 3 }, | 266 | .reg_div = { .reg = S5P_CLKDIV_DMC0, .shift = 20, .size = 3 }, |
@@ -288,7 +269,6 @@ static struct clksrc_clk clk_aclk_corep = { | |||
288 | static struct clksrc_clk clk_aclk_acp = { | 269 | static struct clksrc_clk clk_aclk_acp = { |
289 | .clk = { | 270 | .clk = { |
290 | .name = "aclk_acp", | 271 | .name = "aclk_acp", |
291 | .id = -1, | ||
292 | .parent = &clk_mout_corebus.clk, | 272 | .parent = &clk_mout_corebus.clk, |
293 | }, | 273 | }, |
294 | .reg_div = { .reg = S5P_CLKDIV_DMC0, .shift = 0, .size = 3 }, | 274 | .reg_div = { .reg = S5P_CLKDIV_DMC0, .shift = 0, .size = 3 }, |
@@ -297,7 +277,6 @@ static struct clksrc_clk clk_aclk_acp = { | |||
297 | static struct clksrc_clk clk_pclk_acp = { | 277 | static struct clksrc_clk clk_pclk_acp = { |
298 | .clk = { | 278 | .clk = { |
299 | .name = "pclk_acp", | 279 | .name = "pclk_acp", |
300 | .id = -1, | ||
301 | .parent = &clk_aclk_acp.clk, | 280 | .parent = &clk_aclk_acp.clk, |
302 | }, | 281 | }, |
303 | .reg_div = { .reg = S5P_CLKDIV_DMC0, .shift = 4, .size = 3 }, | 282 | .reg_div = { .reg = S5P_CLKDIV_DMC0, .shift = 4, .size = 3 }, |
@@ -318,7 +297,6 @@ static struct clksrc_sources clkset_aclk = { | |||
318 | static struct clksrc_clk clk_aclk_200 = { | 297 | static struct clksrc_clk clk_aclk_200 = { |
319 | .clk = { | 298 | .clk = { |
320 | .name = "aclk_200", | 299 | .name = "aclk_200", |
321 | .id = -1, | ||
322 | }, | 300 | }, |
323 | .sources = &clkset_aclk, | 301 | .sources = &clkset_aclk, |
324 | .reg_src = { .reg = S5P_CLKSRC_TOP0, .shift = 12, .size = 1 }, | 302 | .reg_src = { .reg = S5P_CLKSRC_TOP0, .shift = 12, .size = 1 }, |
@@ -328,7 +306,6 @@ static struct clksrc_clk clk_aclk_200 = { | |||
328 | static struct clksrc_clk clk_aclk_100 = { | 306 | static struct clksrc_clk clk_aclk_100 = { |
329 | .clk = { | 307 | .clk = { |
330 | .name = "aclk_100", | 308 | .name = "aclk_100", |
331 | .id = -1, | ||
332 | }, | 309 | }, |
333 | .sources = &clkset_aclk, | 310 | .sources = &clkset_aclk, |
334 | .reg_src = { .reg = S5P_CLKSRC_TOP0, .shift = 16, .size = 1 }, | 311 | .reg_src = { .reg = S5P_CLKSRC_TOP0, .shift = 16, .size = 1 }, |
@@ -338,7 +315,6 @@ static struct clksrc_clk clk_aclk_100 = { | |||
338 | static struct clksrc_clk clk_aclk_160 = { | 315 | static struct clksrc_clk clk_aclk_160 = { |
339 | .clk = { | 316 | .clk = { |
340 | .name = "aclk_160", | 317 | .name = "aclk_160", |
341 | .id = -1, | ||
342 | }, | 318 | }, |
343 | .sources = &clkset_aclk, | 319 | .sources = &clkset_aclk, |
344 | .reg_src = { .reg = S5P_CLKSRC_TOP0, .shift = 20, .size = 1 }, | 320 | .reg_src = { .reg = S5P_CLKSRC_TOP0, .shift = 20, .size = 1 }, |
@@ -348,7 +324,6 @@ static struct clksrc_clk clk_aclk_160 = { | |||
348 | static struct clksrc_clk clk_aclk_133 = { | 324 | static struct clksrc_clk clk_aclk_133 = { |
349 | .clk = { | 325 | .clk = { |
350 | .name = "aclk_133", | 326 | .name = "aclk_133", |
351 | .id = -1, | ||
352 | }, | 327 | }, |
353 | .sources = &clkset_aclk, | 328 | .sources = &clkset_aclk, |
354 | .reg_src = { .reg = S5P_CLKSRC_TOP0, .shift = 24, .size = 1 }, | 329 | .reg_src = { .reg = S5P_CLKSRC_TOP0, .shift = 24, .size = 1 }, |
@@ -368,7 +343,6 @@ static struct clksrc_sources clkset_vpllsrc = { | |||
368 | static struct clksrc_clk clk_vpllsrc = { | 343 | static struct clksrc_clk clk_vpllsrc = { |
369 | .clk = { | 344 | .clk = { |
370 | .name = "vpll_src", | 345 | .name = "vpll_src", |
371 | .id = -1, | ||
372 | .enable = exynos4_clksrc_mask_top_ctrl, | 346 | .enable = exynos4_clksrc_mask_top_ctrl, |
373 | .ctrlbit = (1 << 0), | 347 | .ctrlbit = (1 << 0), |
374 | }, | 348 | }, |
@@ -389,7 +363,6 @@ static struct clksrc_sources clkset_sclk_vpll = { | |||
389 | static struct clksrc_clk clk_sclk_vpll = { | 363 | static struct clksrc_clk clk_sclk_vpll = { |
390 | .clk = { | 364 | .clk = { |
391 | .name = "sclk_vpll", | 365 | .name = "sclk_vpll", |
392 | .id = -1, | ||
393 | }, | 366 | }, |
394 | .sources = &clkset_sclk_vpll, | 367 | .sources = &clkset_sclk_vpll, |
395 | .reg_src = { .reg = S5P_CLKSRC_TOP0, .shift = 8, .size = 1 }, | 368 | .reg_src = { .reg = S5P_CLKSRC_TOP0, .shift = 8, .size = 1 }, |
@@ -398,161 +371,151 @@ static struct clksrc_clk clk_sclk_vpll = { | |||
398 | static struct clk init_clocks_off[] = { | 371 | static struct clk init_clocks_off[] = { |
399 | { | 372 | { |
400 | .name = "timers", | 373 | .name = "timers", |
401 | .id = -1, | ||
402 | .parent = &clk_aclk_100.clk, | 374 | .parent = &clk_aclk_100.clk, |
403 | .enable = exynos4_clk_ip_peril_ctrl, | 375 | .enable = exynos4_clk_ip_peril_ctrl, |
404 | .ctrlbit = (1<<24), | 376 | .ctrlbit = (1<<24), |
405 | }, { | 377 | }, { |
406 | .name = "csis", | 378 | .name = "csis", |
407 | .id = 0, | 379 | .devname = "s5p-mipi-csis.0", |
408 | .enable = exynos4_clk_ip_cam_ctrl, | 380 | .enable = exynos4_clk_ip_cam_ctrl, |
409 | .ctrlbit = (1 << 4), | 381 | .ctrlbit = (1 << 4), |
410 | }, { | 382 | }, { |
411 | .name = "csis", | 383 | .name = "csis", |
412 | .id = 1, | 384 | .devname = "s5p-mipi-csis.1", |
413 | .enable = exynos4_clk_ip_cam_ctrl, | 385 | .enable = exynos4_clk_ip_cam_ctrl, |
414 | .ctrlbit = (1 << 5), | 386 | .ctrlbit = (1 << 5), |
415 | }, { | 387 | }, { |
416 | .name = "fimc", | 388 | .name = "fimc", |
417 | .id = 0, | 389 | .devname = "exynos4-fimc.0", |
418 | .enable = exynos4_clk_ip_cam_ctrl, | 390 | .enable = exynos4_clk_ip_cam_ctrl, |
419 | .ctrlbit = (1 << 0), | 391 | .ctrlbit = (1 << 0), |
420 | }, { | 392 | }, { |
421 | .name = "fimc", | 393 | .name = "fimc", |
422 | .id = 1, | 394 | .devname = "exynos4-fimc.1", |
423 | .enable = exynos4_clk_ip_cam_ctrl, | 395 | .enable = exynos4_clk_ip_cam_ctrl, |
424 | .ctrlbit = (1 << 1), | 396 | .ctrlbit = (1 << 1), |
425 | }, { | 397 | }, { |
426 | .name = "fimc", | 398 | .name = "fimc", |
427 | .id = 2, | 399 | .devname = "exynos4-fimc.2", |
428 | .enable = exynos4_clk_ip_cam_ctrl, | 400 | .enable = exynos4_clk_ip_cam_ctrl, |
429 | .ctrlbit = (1 << 2), | 401 | .ctrlbit = (1 << 2), |
430 | }, { | 402 | }, { |
431 | .name = "fimc", | 403 | .name = "fimc", |
432 | .id = 3, | 404 | .devname = "exynos4-fimc.3", |
433 | .enable = exynos4_clk_ip_cam_ctrl, | 405 | .enable = exynos4_clk_ip_cam_ctrl, |
434 | .ctrlbit = (1 << 3), | 406 | .ctrlbit = (1 << 3), |
435 | }, { | 407 | }, { |
436 | .name = "fimd", | 408 | .name = "fimd", |
437 | .id = 0, | 409 | .devname = "exynos4-fb.0", |
438 | .enable = exynos4_clk_ip_lcd0_ctrl, | 410 | .enable = exynos4_clk_ip_lcd0_ctrl, |
439 | .ctrlbit = (1 << 0), | 411 | .ctrlbit = (1 << 0), |
440 | }, { | 412 | }, { |
441 | .name = "fimd", | 413 | .name = "fimd", |
442 | .id = 1, | 414 | .devname = "exynos4-fb.1", |
443 | .enable = exynos4_clk_ip_lcd1_ctrl, | 415 | .enable = exynos4_clk_ip_lcd1_ctrl, |
444 | .ctrlbit = (1 << 0), | 416 | .ctrlbit = (1 << 0), |
445 | }, { | 417 | }, { |
446 | .name = "sataphy", | 418 | .name = "sataphy", |
447 | .id = -1, | ||
448 | .parent = &clk_aclk_133.clk, | 419 | .parent = &clk_aclk_133.clk, |
449 | .enable = exynos4_clk_ip_fsys_ctrl, | 420 | .enable = exynos4_clk_ip_fsys_ctrl, |
450 | .ctrlbit = (1 << 3), | 421 | .ctrlbit = (1 << 3), |
451 | }, { | 422 | }, { |
452 | .name = "hsmmc", | 423 | .name = "hsmmc", |
453 | .id = 0, | 424 | .devname = "s3c-sdhci.0", |
454 | .parent = &clk_aclk_133.clk, | 425 | .parent = &clk_aclk_133.clk, |
455 | .enable = exynos4_clk_ip_fsys_ctrl, | 426 | .enable = exynos4_clk_ip_fsys_ctrl, |
456 | .ctrlbit = (1 << 5), | 427 | .ctrlbit = (1 << 5), |
457 | }, { | 428 | }, { |
458 | .name = "hsmmc", | 429 | .name = "hsmmc", |
459 | .id = 1, | 430 | .devname = "s3c-sdhci.1", |
460 | .parent = &clk_aclk_133.clk, | 431 | .parent = &clk_aclk_133.clk, |
461 | .enable = exynos4_clk_ip_fsys_ctrl, | 432 | .enable = exynos4_clk_ip_fsys_ctrl, |
462 | .ctrlbit = (1 << 6), | 433 | .ctrlbit = (1 << 6), |
463 | }, { | 434 | }, { |
464 | .name = "hsmmc", | 435 | .name = "hsmmc", |
465 | .id = 2, | 436 | .devname = "s3c-sdhci.2", |
466 | .parent = &clk_aclk_133.clk, | 437 | .parent = &clk_aclk_133.clk, |
467 | .enable = exynos4_clk_ip_fsys_ctrl, | 438 | .enable = exynos4_clk_ip_fsys_ctrl, |
468 | .ctrlbit = (1 << 7), | 439 | .ctrlbit = (1 << 7), |
469 | }, { | 440 | }, { |
470 | .name = "hsmmc", | 441 | .name = "hsmmc", |
471 | .id = 3, | 442 | .devname = "s3c-sdhci.3", |
472 | .parent = &clk_aclk_133.clk, | 443 | .parent = &clk_aclk_133.clk, |
473 | .enable = exynos4_clk_ip_fsys_ctrl, | 444 | .enable = exynos4_clk_ip_fsys_ctrl, |
474 | .ctrlbit = (1 << 8), | 445 | .ctrlbit = (1 << 8), |
475 | }, { | 446 | }, { |
476 | .name = "hsmmc", | 447 | .name = "dwmmc", |
477 | .id = 4, | ||
478 | .parent = &clk_aclk_133.clk, | 448 | .parent = &clk_aclk_133.clk, |
479 | .enable = exynos4_clk_ip_fsys_ctrl, | 449 | .enable = exynos4_clk_ip_fsys_ctrl, |
480 | .ctrlbit = (1 << 9), | 450 | .ctrlbit = (1 << 9), |
481 | }, { | 451 | }, { |
482 | .name = "sata", | 452 | .name = "sata", |
483 | .id = -1, | ||
484 | .parent = &clk_aclk_133.clk, | 453 | .parent = &clk_aclk_133.clk, |
485 | .enable = exynos4_clk_ip_fsys_ctrl, | 454 | .enable = exynos4_clk_ip_fsys_ctrl, |
486 | .ctrlbit = (1 << 10), | 455 | .ctrlbit = (1 << 10), |
487 | }, { | 456 | }, { |
488 | .name = "pdma", | 457 | .name = "pdma", |
489 | .id = 0, | 458 | .devname = "s3c-pl330.0", |
490 | .enable = exynos4_clk_ip_fsys_ctrl, | 459 | .enable = exynos4_clk_ip_fsys_ctrl, |
491 | .ctrlbit = (1 << 0), | 460 | .ctrlbit = (1 << 0), |
492 | }, { | 461 | }, { |
493 | .name = "pdma", | 462 | .name = "pdma", |
494 | .id = 1, | 463 | .devname = "s3c-pl330.1", |
495 | .enable = exynos4_clk_ip_fsys_ctrl, | 464 | .enable = exynos4_clk_ip_fsys_ctrl, |
496 | .ctrlbit = (1 << 1), | 465 | .ctrlbit = (1 << 1), |
497 | }, { | 466 | }, { |
498 | .name = "adc", | 467 | .name = "adc", |
499 | .id = -1, | ||
500 | .enable = exynos4_clk_ip_peril_ctrl, | 468 | .enable = exynos4_clk_ip_peril_ctrl, |
501 | .ctrlbit = (1 << 15), | 469 | .ctrlbit = (1 << 15), |
502 | }, { | 470 | }, { |
503 | .name = "keypad", | 471 | .name = "keypad", |
504 | .id = -1, | ||
505 | .enable = exynos4_clk_ip_perir_ctrl, | 472 | .enable = exynos4_clk_ip_perir_ctrl, |
506 | .ctrlbit = (1 << 16), | 473 | .ctrlbit = (1 << 16), |
507 | }, { | 474 | }, { |
508 | .name = "rtc", | 475 | .name = "rtc", |
509 | .id = -1, | ||
510 | .enable = exynos4_clk_ip_perir_ctrl, | 476 | .enable = exynos4_clk_ip_perir_ctrl, |
511 | .ctrlbit = (1 << 15), | 477 | .ctrlbit = (1 << 15), |
512 | }, { | 478 | }, { |
513 | .name = "watchdog", | 479 | .name = "watchdog", |
514 | .id = -1, | ||
515 | .parent = &clk_aclk_100.clk, | 480 | .parent = &clk_aclk_100.clk, |
516 | .enable = exynos4_clk_ip_perir_ctrl, | 481 | .enable = exynos4_clk_ip_perir_ctrl, |
517 | .ctrlbit = (1 << 14), | 482 | .ctrlbit = (1 << 14), |
518 | }, { | 483 | }, { |
519 | .name = "usbhost", | 484 | .name = "usbhost", |
520 | .id = -1, | ||
521 | .enable = exynos4_clk_ip_fsys_ctrl , | 485 | .enable = exynos4_clk_ip_fsys_ctrl , |
522 | .ctrlbit = (1 << 12), | 486 | .ctrlbit = (1 << 12), |
523 | }, { | 487 | }, { |
524 | .name = "otg", | 488 | .name = "otg", |
525 | .id = -1, | ||
526 | .enable = exynos4_clk_ip_fsys_ctrl, | 489 | .enable = exynos4_clk_ip_fsys_ctrl, |
527 | .ctrlbit = (1 << 13), | 490 | .ctrlbit = (1 << 13), |
528 | }, { | 491 | }, { |
529 | .name = "spi", | 492 | .name = "spi", |
530 | .id = 0, | 493 | .devname = "s3c64xx-spi.0", |
531 | .enable = exynos4_clk_ip_peril_ctrl, | 494 | .enable = exynos4_clk_ip_peril_ctrl, |
532 | .ctrlbit = (1 << 16), | 495 | .ctrlbit = (1 << 16), |
533 | }, { | 496 | }, { |
534 | .name = "spi", | 497 | .name = "spi", |
535 | .id = 1, | 498 | .devname = "s3c64xx-spi.1", |
536 | .enable = exynos4_clk_ip_peril_ctrl, | 499 | .enable = exynos4_clk_ip_peril_ctrl, |
537 | .ctrlbit = (1 << 17), | 500 | .ctrlbit = (1 << 17), |
538 | }, { | 501 | }, { |
539 | .name = "spi", | 502 | .name = "spi", |
540 | .id = 2, | 503 | .devname = "s3c64xx-spi.2", |
541 | .enable = exynos4_clk_ip_peril_ctrl, | 504 | .enable = exynos4_clk_ip_peril_ctrl, |
542 | .ctrlbit = (1 << 18), | 505 | .ctrlbit = (1 << 18), |
543 | }, { | 506 | }, { |
544 | .name = "iis", | 507 | .name = "iis", |
545 | .id = 0, | 508 | .devname = "samsung-i2s.0", |
546 | .enable = exynos4_clk_ip_peril_ctrl, | 509 | .enable = exynos4_clk_ip_peril_ctrl, |
547 | .ctrlbit = (1 << 19), | 510 | .ctrlbit = (1 << 19), |
548 | }, { | 511 | }, { |
549 | .name = "iis", | 512 | .name = "iis", |
550 | .id = 1, | 513 | .devname = "samsung-i2s.1", |
551 | .enable = exynos4_clk_ip_peril_ctrl, | 514 | .enable = exynos4_clk_ip_peril_ctrl, |
552 | .ctrlbit = (1 << 20), | 515 | .ctrlbit = (1 << 20), |
553 | }, { | 516 | }, { |
554 | .name = "iis", | 517 | .name = "iis", |
555 | .id = 2, | 518 | .devname = "samsung-i2s.2", |
556 | .enable = exynos4_clk_ip_peril_ctrl, | 519 | .enable = exynos4_clk_ip_peril_ctrl, |
557 | .ctrlbit = (1 << 21), | 520 | .ctrlbit = (1 << 21), |
558 | }, { | 521 | }, { |
@@ -562,125 +525,110 @@ static struct clk init_clocks_off[] = { | |||
562 | .ctrlbit = (1 << 27), | 525 | .ctrlbit = (1 << 27), |
563 | }, { | 526 | }, { |
564 | .name = "fimg2d", | 527 | .name = "fimg2d", |
565 | .id = -1, | ||
566 | .enable = exynos4_clk_ip_image_ctrl, | 528 | .enable = exynos4_clk_ip_image_ctrl, |
567 | .ctrlbit = (1 << 0), | 529 | .ctrlbit = (1 << 0), |
568 | }, { | 530 | }, { |
569 | .name = "i2c", | 531 | .name = "i2c", |
570 | .id = 0, | 532 | .devname = "s3c2440-i2c.0", |
571 | .parent = &clk_aclk_100.clk, | 533 | .parent = &clk_aclk_100.clk, |
572 | .enable = exynos4_clk_ip_peril_ctrl, | 534 | .enable = exynos4_clk_ip_peril_ctrl, |
573 | .ctrlbit = (1 << 6), | 535 | .ctrlbit = (1 << 6), |
574 | }, { | 536 | }, { |
575 | .name = "i2c", | 537 | .name = "i2c", |
576 | .id = 1, | 538 | .devname = "s3c2440-i2c.1", |
577 | .parent = &clk_aclk_100.clk, | 539 | .parent = &clk_aclk_100.clk, |
578 | .enable = exynos4_clk_ip_peril_ctrl, | 540 | .enable = exynos4_clk_ip_peril_ctrl, |
579 | .ctrlbit = (1 << 7), | 541 | .ctrlbit = (1 << 7), |
580 | }, { | 542 | }, { |
581 | .name = "i2c", | 543 | .name = "i2c", |
582 | .id = 2, | 544 | .devname = "s3c2440-i2c.2", |
583 | .parent = &clk_aclk_100.clk, | 545 | .parent = &clk_aclk_100.clk, |
584 | .enable = exynos4_clk_ip_peril_ctrl, | 546 | .enable = exynos4_clk_ip_peril_ctrl, |
585 | .ctrlbit = (1 << 8), | 547 | .ctrlbit = (1 << 8), |
586 | }, { | 548 | }, { |
587 | .name = "i2c", | 549 | .name = "i2c", |
588 | .id = 3, | 550 | .devname = "s3c2440-i2c.3", |
589 | .parent = &clk_aclk_100.clk, | 551 | .parent = &clk_aclk_100.clk, |
590 | .enable = exynos4_clk_ip_peril_ctrl, | 552 | .enable = exynos4_clk_ip_peril_ctrl, |
591 | .ctrlbit = (1 << 9), | 553 | .ctrlbit = (1 << 9), |
592 | }, { | 554 | }, { |
593 | .name = "i2c", | 555 | .name = "i2c", |
594 | .id = 4, | 556 | .devname = "s3c2440-i2c.4", |
595 | .parent = &clk_aclk_100.clk, | 557 | .parent = &clk_aclk_100.clk, |
596 | .enable = exynos4_clk_ip_peril_ctrl, | 558 | .enable = exynos4_clk_ip_peril_ctrl, |
597 | .ctrlbit = (1 << 10), | 559 | .ctrlbit = (1 << 10), |
598 | }, { | 560 | }, { |
599 | .name = "i2c", | 561 | .name = "i2c", |
600 | .id = 5, | 562 | .devname = "s3c2440-i2c.5", |
601 | .parent = &clk_aclk_100.clk, | 563 | .parent = &clk_aclk_100.clk, |
602 | .enable = exynos4_clk_ip_peril_ctrl, | 564 | .enable = exynos4_clk_ip_peril_ctrl, |
603 | .ctrlbit = (1 << 11), | 565 | .ctrlbit = (1 << 11), |
604 | }, { | 566 | }, { |
605 | .name = "i2c", | 567 | .name = "i2c", |
606 | .id = 6, | 568 | .devname = "s3c2440-i2c.6", |
607 | .parent = &clk_aclk_100.clk, | 569 | .parent = &clk_aclk_100.clk, |
608 | .enable = exynos4_clk_ip_peril_ctrl, | 570 | .enable = exynos4_clk_ip_peril_ctrl, |
609 | .ctrlbit = (1 << 12), | 571 | .ctrlbit = (1 << 12), |
610 | }, { | 572 | }, { |
611 | .name = "i2c", | 573 | .name = "i2c", |
612 | .id = 7, | 574 | .devname = "s3c2440-i2c.7", |
613 | .parent = &clk_aclk_100.clk, | 575 | .parent = &clk_aclk_100.clk, |
614 | .enable = exynos4_clk_ip_peril_ctrl, | 576 | .enable = exynos4_clk_ip_peril_ctrl, |
615 | .ctrlbit = (1 << 13), | 577 | .ctrlbit = (1 << 13), |
616 | }, { | 578 | }, { |
617 | .name = "SYSMMU_MDMA", | 579 | .name = "SYSMMU_MDMA", |
618 | .id = -1, | ||
619 | .enable = exynos4_clk_ip_image_ctrl, | 580 | .enable = exynos4_clk_ip_image_ctrl, |
620 | .ctrlbit = (1 << 5), | 581 | .ctrlbit = (1 << 5), |
621 | }, { | 582 | }, { |
622 | .name = "SYSMMU_FIMC0", | 583 | .name = "SYSMMU_FIMC0", |
623 | .id = -1, | ||
624 | .enable = exynos4_clk_ip_cam_ctrl, | 584 | .enable = exynos4_clk_ip_cam_ctrl, |
625 | .ctrlbit = (1 << 7), | 585 | .ctrlbit = (1 << 7), |
626 | }, { | 586 | }, { |
627 | .name = "SYSMMU_FIMC1", | 587 | .name = "SYSMMU_FIMC1", |
628 | .id = -1, | ||
629 | .enable = exynos4_clk_ip_cam_ctrl, | 588 | .enable = exynos4_clk_ip_cam_ctrl, |
630 | .ctrlbit = (1 << 8), | 589 | .ctrlbit = (1 << 8), |
631 | }, { | 590 | }, { |
632 | .name = "SYSMMU_FIMC2", | 591 | .name = "SYSMMU_FIMC2", |
633 | .id = -1, | ||
634 | .enable = exynos4_clk_ip_cam_ctrl, | 592 | .enable = exynos4_clk_ip_cam_ctrl, |
635 | .ctrlbit = (1 << 9), | 593 | .ctrlbit = (1 << 9), |
636 | }, { | 594 | }, { |
637 | .name = "SYSMMU_FIMC3", | 595 | .name = "SYSMMU_FIMC3", |
638 | .id = -1, | ||
639 | .enable = exynos4_clk_ip_cam_ctrl, | 596 | .enable = exynos4_clk_ip_cam_ctrl, |
640 | .ctrlbit = (1 << 10), | 597 | .ctrlbit = (1 << 10), |
641 | }, { | 598 | }, { |
642 | .name = "SYSMMU_JPEG", | 599 | .name = "SYSMMU_JPEG", |
643 | .id = -1, | ||
644 | .enable = exynos4_clk_ip_cam_ctrl, | 600 | .enable = exynos4_clk_ip_cam_ctrl, |
645 | .ctrlbit = (1 << 11), | 601 | .ctrlbit = (1 << 11), |
646 | }, { | 602 | }, { |
647 | .name = "SYSMMU_FIMD0", | 603 | .name = "SYSMMU_FIMD0", |
648 | .id = -1, | ||
649 | .enable = exynos4_clk_ip_lcd0_ctrl, | 604 | .enable = exynos4_clk_ip_lcd0_ctrl, |
650 | .ctrlbit = (1 << 4), | 605 | .ctrlbit = (1 << 4), |
651 | }, { | 606 | }, { |
652 | .name = "SYSMMU_FIMD1", | 607 | .name = "SYSMMU_FIMD1", |
653 | .id = -1, | ||
654 | .enable = exynos4_clk_ip_lcd1_ctrl, | 608 | .enable = exynos4_clk_ip_lcd1_ctrl, |
655 | .ctrlbit = (1 << 4), | 609 | .ctrlbit = (1 << 4), |
656 | }, { | 610 | }, { |
657 | .name = "SYSMMU_PCIe", | 611 | .name = "SYSMMU_PCIe", |
658 | .id = -1, | ||
659 | .enable = exynos4_clk_ip_fsys_ctrl, | 612 | .enable = exynos4_clk_ip_fsys_ctrl, |
660 | .ctrlbit = (1 << 18), | 613 | .ctrlbit = (1 << 18), |
661 | }, { | 614 | }, { |
662 | .name = "SYSMMU_G2D", | 615 | .name = "SYSMMU_G2D", |
663 | .id = -1, | ||
664 | .enable = exynos4_clk_ip_image_ctrl, | 616 | .enable = exynos4_clk_ip_image_ctrl, |
665 | .ctrlbit = (1 << 3), | 617 | .ctrlbit = (1 << 3), |
666 | }, { | 618 | }, { |
667 | .name = "SYSMMU_ROTATOR", | 619 | .name = "SYSMMU_ROTATOR", |
668 | .id = -1, | ||
669 | .enable = exynos4_clk_ip_image_ctrl, | 620 | .enable = exynos4_clk_ip_image_ctrl, |
670 | .ctrlbit = (1 << 4), | 621 | .ctrlbit = (1 << 4), |
671 | }, { | 622 | }, { |
672 | .name = "SYSMMU_TV", | 623 | .name = "SYSMMU_TV", |
673 | .id = -1, | ||
674 | .enable = exynos4_clk_ip_tv_ctrl, | 624 | .enable = exynos4_clk_ip_tv_ctrl, |
675 | .ctrlbit = (1 << 4), | 625 | .ctrlbit = (1 << 4), |
676 | }, { | 626 | }, { |
677 | .name = "SYSMMU_MFC_L", | 627 | .name = "SYSMMU_MFC_L", |
678 | .id = -1, | ||
679 | .enable = exynos4_clk_ip_mfc_ctrl, | 628 | .enable = exynos4_clk_ip_mfc_ctrl, |
680 | .ctrlbit = (1 << 1), | 629 | .ctrlbit = (1 << 1), |
681 | }, { | 630 | }, { |
682 | .name = "SYSMMU_MFC_R", | 631 | .name = "SYSMMU_MFC_R", |
683 | .id = -1, | ||
684 | .enable = exynos4_clk_ip_mfc_ctrl, | 632 | .enable = exynos4_clk_ip_mfc_ctrl, |
685 | .ctrlbit = (1 << 2), | 633 | .ctrlbit = (1 << 2), |
686 | } | 634 | } |
@@ -689,32 +637,32 @@ static struct clk init_clocks_off[] = { | |||
689 | static struct clk init_clocks[] = { | 637 | static struct clk init_clocks[] = { |
690 | { | 638 | { |
691 | .name = "uart", | 639 | .name = "uart", |
692 | .id = 0, | 640 | .devname = "s5pv210-uart.0", |
693 | .enable = exynos4_clk_ip_peril_ctrl, | 641 | .enable = exynos4_clk_ip_peril_ctrl, |
694 | .ctrlbit = (1 << 0), | 642 | .ctrlbit = (1 << 0), |
695 | }, { | 643 | }, { |
696 | .name = "uart", | 644 | .name = "uart", |
697 | .id = 1, | 645 | .devname = "s5pv210-uart.1", |
698 | .enable = exynos4_clk_ip_peril_ctrl, | 646 | .enable = exynos4_clk_ip_peril_ctrl, |
699 | .ctrlbit = (1 << 1), | 647 | .ctrlbit = (1 << 1), |
700 | }, { | 648 | }, { |
701 | .name = "uart", | 649 | .name = "uart", |
702 | .id = 2, | 650 | .devname = "s5pv210-uart.2", |
703 | .enable = exynos4_clk_ip_peril_ctrl, | 651 | .enable = exynos4_clk_ip_peril_ctrl, |
704 | .ctrlbit = (1 << 2), | 652 | .ctrlbit = (1 << 2), |
705 | }, { | 653 | }, { |
706 | .name = "uart", | 654 | .name = "uart", |
707 | .id = 3, | 655 | .devname = "s5pv210-uart.3", |
708 | .enable = exynos4_clk_ip_peril_ctrl, | 656 | .enable = exynos4_clk_ip_peril_ctrl, |
709 | .ctrlbit = (1 << 3), | 657 | .ctrlbit = (1 << 3), |
710 | }, { | 658 | }, { |
711 | .name = "uart", | 659 | .name = "uart", |
712 | .id = 4, | 660 | .devname = "s5pv210-uart.4", |
713 | .enable = exynos4_clk_ip_peril_ctrl, | 661 | .enable = exynos4_clk_ip_peril_ctrl, |
714 | .ctrlbit = (1 << 4), | 662 | .ctrlbit = (1 << 4), |
715 | }, { | 663 | }, { |
716 | .name = "uart", | 664 | .name = "uart", |
717 | .id = 5, | 665 | .devname = "s5pv210-uart.5", |
718 | .enable = exynos4_clk_ip_peril_ctrl, | 666 | .enable = exynos4_clk_ip_peril_ctrl, |
719 | .ctrlbit = (1 << 5), | 667 | .ctrlbit = (1 << 5), |
720 | } | 668 | } |
@@ -750,7 +698,6 @@ static struct clksrc_sources clkset_mout_g2d0 = { | |||
750 | static struct clksrc_clk clk_mout_g2d0 = { | 698 | static struct clksrc_clk clk_mout_g2d0 = { |
751 | .clk = { | 699 | .clk = { |
752 | .name = "mout_g2d0", | 700 | .name = "mout_g2d0", |
753 | .id = -1, | ||
754 | }, | 701 | }, |
755 | .sources = &clkset_mout_g2d0, | 702 | .sources = &clkset_mout_g2d0, |
756 | .reg_src = { .reg = S5P_CLKSRC_IMAGE, .shift = 0, .size = 1 }, | 703 | .reg_src = { .reg = S5P_CLKSRC_IMAGE, .shift = 0, .size = 1 }, |
@@ -769,7 +716,6 @@ static struct clksrc_sources clkset_mout_g2d1 = { | |||
769 | static struct clksrc_clk clk_mout_g2d1 = { | 716 | static struct clksrc_clk clk_mout_g2d1 = { |
770 | .clk = { | 717 | .clk = { |
771 | .name = "mout_g2d1", | 718 | .name = "mout_g2d1", |
772 | .id = -1, | ||
773 | }, | 719 | }, |
774 | .sources = &clkset_mout_g2d1, | 720 | .sources = &clkset_mout_g2d1, |
775 | .reg_src = { .reg = S5P_CLKSRC_IMAGE, .shift = 4, .size = 1 }, | 721 | .reg_src = { .reg = S5P_CLKSRC_IMAGE, .shift = 4, .size = 1 }, |
@@ -788,7 +734,6 @@ static struct clksrc_sources clkset_mout_g2d = { | |||
788 | static struct clksrc_clk clk_dout_mmc0 = { | 734 | static struct clksrc_clk clk_dout_mmc0 = { |
789 | .clk = { | 735 | .clk = { |
790 | .name = "dout_mmc0", | 736 | .name = "dout_mmc0", |
791 | .id = -1, | ||
792 | }, | 737 | }, |
793 | .sources = &clkset_group, | 738 | .sources = &clkset_group, |
794 | .reg_src = { .reg = S5P_CLKSRC_FSYS, .shift = 0, .size = 4 }, | 739 | .reg_src = { .reg = S5P_CLKSRC_FSYS, .shift = 0, .size = 4 }, |
@@ -798,7 +743,6 @@ static struct clksrc_clk clk_dout_mmc0 = { | |||
798 | static struct clksrc_clk clk_dout_mmc1 = { | 743 | static struct clksrc_clk clk_dout_mmc1 = { |
799 | .clk = { | 744 | .clk = { |
800 | .name = "dout_mmc1", | 745 | .name = "dout_mmc1", |
801 | .id = -1, | ||
802 | }, | 746 | }, |
803 | .sources = &clkset_group, | 747 | .sources = &clkset_group, |
804 | .reg_src = { .reg = S5P_CLKSRC_FSYS, .shift = 4, .size = 4 }, | 748 | .reg_src = { .reg = S5P_CLKSRC_FSYS, .shift = 4, .size = 4 }, |
@@ -808,7 +752,6 @@ static struct clksrc_clk clk_dout_mmc1 = { | |||
808 | static struct clksrc_clk clk_dout_mmc2 = { | 752 | static struct clksrc_clk clk_dout_mmc2 = { |
809 | .clk = { | 753 | .clk = { |
810 | .name = "dout_mmc2", | 754 | .name = "dout_mmc2", |
811 | .id = -1, | ||
812 | }, | 755 | }, |
813 | .sources = &clkset_group, | 756 | .sources = &clkset_group, |
814 | .reg_src = { .reg = S5P_CLKSRC_FSYS, .shift = 8, .size = 4 }, | 757 | .reg_src = { .reg = S5P_CLKSRC_FSYS, .shift = 8, .size = 4 }, |
@@ -818,7 +761,6 @@ static struct clksrc_clk clk_dout_mmc2 = { | |||
818 | static struct clksrc_clk clk_dout_mmc3 = { | 761 | static struct clksrc_clk clk_dout_mmc3 = { |
819 | .clk = { | 762 | .clk = { |
820 | .name = "dout_mmc3", | 763 | .name = "dout_mmc3", |
821 | .id = -1, | ||
822 | }, | 764 | }, |
823 | .sources = &clkset_group, | 765 | .sources = &clkset_group, |
824 | .reg_src = { .reg = S5P_CLKSRC_FSYS, .shift = 12, .size = 4 }, | 766 | .reg_src = { .reg = S5P_CLKSRC_FSYS, .shift = 12, .size = 4 }, |
@@ -828,7 +770,6 @@ static struct clksrc_clk clk_dout_mmc3 = { | |||
828 | static struct clksrc_clk clk_dout_mmc4 = { | 770 | static struct clksrc_clk clk_dout_mmc4 = { |
829 | .clk = { | 771 | .clk = { |
830 | .name = "dout_mmc4", | 772 | .name = "dout_mmc4", |
831 | .id = -1, | ||
832 | }, | 773 | }, |
833 | .sources = &clkset_group, | 774 | .sources = &clkset_group, |
834 | .reg_src = { .reg = S5P_CLKSRC_FSYS, .shift = 16, .size = 4 }, | 775 | .reg_src = { .reg = S5P_CLKSRC_FSYS, .shift = 16, .size = 4 }, |
@@ -839,7 +780,7 @@ static struct clksrc_clk clksrcs[] = { | |||
839 | { | 780 | { |
840 | .clk = { | 781 | .clk = { |
841 | .name = "uclk1", | 782 | .name = "uclk1", |
842 | .id = 0, | 783 | .devname = "s5pv210-uart.0", |
843 | .enable = exynos4_clksrc_mask_peril0_ctrl, | 784 | .enable = exynos4_clksrc_mask_peril0_ctrl, |
844 | .ctrlbit = (1 << 0), | 785 | .ctrlbit = (1 << 0), |
845 | }, | 786 | }, |
@@ -849,7 +790,7 @@ static struct clksrc_clk clksrcs[] = { | |||
849 | }, { | 790 | }, { |
850 | .clk = { | 791 | .clk = { |
851 | .name = "uclk1", | 792 | .name = "uclk1", |
852 | .id = 1, | 793 | .devname = "s5pv210-uart.1", |
853 | .enable = exynos4_clksrc_mask_peril0_ctrl, | 794 | .enable = exynos4_clksrc_mask_peril0_ctrl, |
854 | .ctrlbit = (1 << 4), | 795 | .ctrlbit = (1 << 4), |
855 | }, | 796 | }, |
@@ -859,7 +800,7 @@ static struct clksrc_clk clksrcs[] = { | |||
859 | }, { | 800 | }, { |
860 | .clk = { | 801 | .clk = { |
861 | .name = "uclk1", | 802 | .name = "uclk1", |
862 | .id = 2, | 803 | .devname = "s5pv210-uart.2", |
863 | .enable = exynos4_clksrc_mask_peril0_ctrl, | 804 | .enable = exynos4_clksrc_mask_peril0_ctrl, |
864 | .ctrlbit = (1 << 8), | 805 | .ctrlbit = (1 << 8), |
865 | }, | 806 | }, |
@@ -869,7 +810,7 @@ static struct clksrc_clk clksrcs[] = { | |||
869 | }, { | 810 | }, { |
870 | .clk = { | 811 | .clk = { |
871 | .name = "uclk1", | 812 | .name = "uclk1", |
872 | .id = 3, | 813 | .devname = "s5pv210-uart.3", |
873 | .enable = exynos4_clksrc_mask_peril0_ctrl, | 814 | .enable = exynos4_clksrc_mask_peril0_ctrl, |
874 | .ctrlbit = (1 << 12), | 815 | .ctrlbit = (1 << 12), |
875 | }, | 816 | }, |
@@ -879,7 +820,6 @@ static struct clksrc_clk clksrcs[] = { | |||
879 | }, { | 820 | }, { |
880 | .clk = { | 821 | .clk = { |
881 | .name = "sclk_pwm", | 822 | .name = "sclk_pwm", |
882 | .id = -1, | ||
883 | .enable = exynos4_clksrc_mask_peril0_ctrl, | 823 | .enable = exynos4_clksrc_mask_peril0_ctrl, |
884 | .ctrlbit = (1 << 24), | 824 | .ctrlbit = (1 << 24), |
885 | }, | 825 | }, |
@@ -889,7 +829,7 @@ static struct clksrc_clk clksrcs[] = { | |||
889 | }, { | 829 | }, { |
890 | .clk = { | 830 | .clk = { |
891 | .name = "sclk_csis", | 831 | .name = "sclk_csis", |
892 | .id = 0, | 832 | .devname = "s5p-mipi-csis.0", |
893 | .enable = exynos4_clksrc_mask_cam_ctrl, | 833 | .enable = exynos4_clksrc_mask_cam_ctrl, |
894 | .ctrlbit = (1 << 24), | 834 | .ctrlbit = (1 << 24), |
895 | }, | 835 | }, |
@@ -899,7 +839,7 @@ static struct clksrc_clk clksrcs[] = { | |||
899 | }, { | 839 | }, { |
900 | .clk = { | 840 | .clk = { |
901 | .name = "sclk_csis", | 841 | .name = "sclk_csis", |
902 | .id = 1, | 842 | .devname = "s5p-mipi-csis.1", |
903 | .enable = exynos4_clksrc_mask_cam_ctrl, | 843 | .enable = exynos4_clksrc_mask_cam_ctrl, |
904 | .ctrlbit = (1 << 28), | 844 | .ctrlbit = (1 << 28), |
905 | }, | 845 | }, |
@@ -909,7 +849,7 @@ static struct clksrc_clk clksrcs[] = { | |||
909 | }, { | 849 | }, { |
910 | .clk = { | 850 | .clk = { |
911 | .name = "sclk_cam", | 851 | .name = "sclk_cam", |
912 | .id = 0, | 852 | .devname = "exynos4-fimc.0", |
913 | .enable = exynos4_clksrc_mask_cam_ctrl, | 853 | .enable = exynos4_clksrc_mask_cam_ctrl, |
914 | .ctrlbit = (1 << 16), | 854 | .ctrlbit = (1 << 16), |
915 | }, | 855 | }, |
@@ -919,7 +859,7 @@ static struct clksrc_clk clksrcs[] = { | |||
919 | }, { | 859 | }, { |
920 | .clk = { | 860 | .clk = { |
921 | .name = "sclk_cam", | 861 | .name = "sclk_cam", |
922 | .id = 1, | 862 | .devname = "exynos4-fimc.1", |
923 | .enable = exynos4_clksrc_mask_cam_ctrl, | 863 | .enable = exynos4_clksrc_mask_cam_ctrl, |
924 | .ctrlbit = (1 << 20), | 864 | .ctrlbit = (1 << 20), |
925 | }, | 865 | }, |
@@ -929,7 +869,7 @@ static struct clksrc_clk clksrcs[] = { | |||
929 | }, { | 869 | }, { |
930 | .clk = { | 870 | .clk = { |
931 | .name = "sclk_fimc", | 871 | .name = "sclk_fimc", |
932 | .id = 0, | 872 | .devname = "exynos4-fimc.0", |
933 | .enable = exynos4_clksrc_mask_cam_ctrl, | 873 | .enable = exynos4_clksrc_mask_cam_ctrl, |
934 | .ctrlbit = (1 << 0), | 874 | .ctrlbit = (1 << 0), |
935 | }, | 875 | }, |
@@ -939,7 +879,7 @@ static struct clksrc_clk clksrcs[] = { | |||
939 | }, { | 879 | }, { |
940 | .clk = { | 880 | .clk = { |
941 | .name = "sclk_fimc", | 881 | .name = "sclk_fimc", |
942 | .id = 1, | 882 | .devname = "exynos4-fimc.1", |
943 | .enable = exynos4_clksrc_mask_cam_ctrl, | 883 | .enable = exynos4_clksrc_mask_cam_ctrl, |
944 | .ctrlbit = (1 << 4), | 884 | .ctrlbit = (1 << 4), |
945 | }, | 885 | }, |
@@ -949,7 +889,7 @@ static struct clksrc_clk clksrcs[] = { | |||
949 | }, { | 889 | }, { |
950 | .clk = { | 890 | .clk = { |
951 | .name = "sclk_fimc", | 891 | .name = "sclk_fimc", |
952 | .id = 2, | 892 | .devname = "exynos4-fimc.2", |
953 | .enable = exynos4_clksrc_mask_cam_ctrl, | 893 | .enable = exynos4_clksrc_mask_cam_ctrl, |
954 | .ctrlbit = (1 << 8), | 894 | .ctrlbit = (1 << 8), |
955 | }, | 895 | }, |
@@ -959,7 +899,7 @@ static struct clksrc_clk clksrcs[] = { | |||
959 | }, { | 899 | }, { |
960 | .clk = { | 900 | .clk = { |
961 | .name = "sclk_fimc", | 901 | .name = "sclk_fimc", |
962 | .id = 3, | 902 | .devname = "exynos4-fimc.3", |
963 | .enable = exynos4_clksrc_mask_cam_ctrl, | 903 | .enable = exynos4_clksrc_mask_cam_ctrl, |
964 | .ctrlbit = (1 << 12), | 904 | .ctrlbit = (1 << 12), |
965 | }, | 905 | }, |
@@ -969,7 +909,7 @@ static struct clksrc_clk clksrcs[] = { | |||
969 | }, { | 909 | }, { |
970 | .clk = { | 910 | .clk = { |
971 | .name = "sclk_fimd", | 911 | .name = "sclk_fimd", |
972 | .id = 0, | 912 | .devname = "exynos4-fb.0", |
973 | .enable = exynos4_clksrc_mask_lcd0_ctrl, | 913 | .enable = exynos4_clksrc_mask_lcd0_ctrl, |
974 | .ctrlbit = (1 << 0), | 914 | .ctrlbit = (1 << 0), |
975 | }, | 915 | }, |
@@ -979,7 +919,7 @@ static struct clksrc_clk clksrcs[] = { | |||
979 | }, { | 919 | }, { |
980 | .clk = { | 920 | .clk = { |
981 | .name = "sclk_fimd", | 921 | .name = "sclk_fimd", |
982 | .id = 1, | 922 | .devname = "exynos4-fb.1", |
983 | .enable = exynos4_clksrc_mask_lcd1_ctrl, | 923 | .enable = exynos4_clksrc_mask_lcd1_ctrl, |
984 | .ctrlbit = (1 << 0), | 924 | .ctrlbit = (1 << 0), |
985 | }, | 925 | }, |
@@ -989,7 +929,6 @@ static struct clksrc_clk clksrcs[] = { | |||
989 | }, { | 929 | }, { |
990 | .clk = { | 930 | .clk = { |
991 | .name = "sclk_sata", | 931 | .name = "sclk_sata", |
992 | .id = -1, | ||
993 | .enable = exynos4_clksrc_mask_fsys_ctrl, | 932 | .enable = exynos4_clksrc_mask_fsys_ctrl, |
994 | .ctrlbit = (1 << 24), | 933 | .ctrlbit = (1 << 24), |
995 | }, | 934 | }, |
@@ -999,7 +938,7 @@ static struct clksrc_clk clksrcs[] = { | |||
999 | }, { | 938 | }, { |
1000 | .clk = { | 939 | .clk = { |
1001 | .name = "sclk_spi", | 940 | .name = "sclk_spi", |
1002 | .id = 0, | 941 | .devname = "s3c64xx-spi.0", |
1003 | .enable = exynos4_clksrc_mask_peril1_ctrl, | 942 | .enable = exynos4_clksrc_mask_peril1_ctrl, |
1004 | .ctrlbit = (1 << 16), | 943 | .ctrlbit = (1 << 16), |
1005 | }, | 944 | }, |
@@ -1009,7 +948,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1009 | }, { | 948 | }, { |
1010 | .clk = { | 949 | .clk = { |
1011 | .name = "sclk_spi", | 950 | .name = "sclk_spi", |
1012 | .id = 1, | 951 | .devname = "s3c64xx-spi.1", |
1013 | .enable = exynos4_clksrc_mask_peril1_ctrl, | 952 | .enable = exynos4_clksrc_mask_peril1_ctrl, |
1014 | .ctrlbit = (1 << 20), | 953 | .ctrlbit = (1 << 20), |
1015 | }, | 954 | }, |
@@ -1019,7 +958,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1019 | }, { | 958 | }, { |
1020 | .clk = { | 959 | .clk = { |
1021 | .name = "sclk_spi", | 960 | .name = "sclk_spi", |
1022 | .id = 2, | 961 | .devname = "s3c64xx-spi.2", |
1023 | .enable = exynos4_clksrc_mask_peril1_ctrl, | 962 | .enable = exynos4_clksrc_mask_peril1_ctrl, |
1024 | .ctrlbit = (1 << 24), | 963 | .ctrlbit = (1 << 24), |
1025 | }, | 964 | }, |
@@ -1029,7 +968,6 @@ static struct clksrc_clk clksrcs[] = { | |||
1029 | }, { | 968 | }, { |
1030 | .clk = { | 969 | .clk = { |
1031 | .name = "sclk_fimg2d", | 970 | .name = "sclk_fimg2d", |
1032 | .id = -1, | ||
1033 | }, | 971 | }, |
1034 | .sources = &clkset_mout_g2d, | 972 | .sources = &clkset_mout_g2d, |
1035 | .reg_src = { .reg = S5P_CLKSRC_IMAGE, .shift = 8, .size = 1 }, | 973 | .reg_src = { .reg = S5P_CLKSRC_IMAGE, .shift = 8, .size = 1 }, |
@@ -1037,7 +975,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1037 | }, { | 975 | }, { |
1038 | .clk = { | 976 | .clk = { |
1039 | .name = "sclk_mmc", | 977 | .name = "sclk_mmc", |
1040 | .id = 0, | 978 | .devname = "s3c-sdhci.0", |
1041 | .parent = &clk_dout_mmc0.clk, | 979 | .parent = &clk_dout_mmc0.clk, |
1042 | .enable = exynos4_clksrc_mask_fsys_ctrl, | 980 | .enable = exynos4_clksrc_mask_fsys_ctrl, |
1043 | .ctrlbit = (1 << 0), | 981 | .ctrlbit = (1 << 0), |
@@ -1046,7 +984,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1046 | }, { | 984 | }, { |
1047 | .clk = { | 985 | .clk = { |
1048 | .name = "sclk_mmc", | 986 | .name = "sclk_mmc", |
1049 | .id = 1, | 987 | .devname = "s3c-sdhci.1", |
1050 | .parent = &clk_dout_mmc1.clk, | 988 | .parent = &clk_dout_mmc1.clk, |
1051 | .enable = exynos4_clksrc_mask_fsys_ctrl, | 989 | .enable = exynos4_clksrc_mask_fsys_ctrl, |
1052 | .ctrlbit = (1 << 4), | 990 | .ctrlbit = (1 << 4), |
@@ -1055,7 +993,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1055 | }, { | 993 | }, { |
1056 | .clk = { | 994 | .clk = { |
1057 | .name = "sclk_mmc", | 995 | .name = "sclk_mmc", |
1058 | .id = 2, | 996 | .devname = "s3c-sdhci.2", |
1059 | .parent = &clk_dout_mmc2.clk, | 997 | .parent = &clk_dout_mmc2.clk, |
1060 | .enable = exynos4_clksrc_mask_fsys_ctrl, | 998 | .enable = exynos4_clksrc_mask_fsys_ctrl, |
1061 | .ctrlbit = (1 << 8), | 999 | .ctrlbit = (1 << 8), |
@@ -1064,7 +1002,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1064 | }, { | 1002 | }, { |
1065 | .clk = { | 1003 | .clk = { |
1066 | .name = "sclk_mmc", | 1004 | .name = "sclk_mmc", |
1067 | .id = 3, | 1005 | .devname = "s3c-sdhci.3", |
1068 | .parent = &clk_dout_mmc3.clk, | 1006 | .parent = &clk_dout_mmc3.clk, |
1069 | .enable = exynos4_clksrc_mask_fsys_ctrl, | 1007 | .enable = exynos4_clksrc_mask_fsys_ctrl, |
1070 | .ctrlbit = (1 << 12), | 1008 | .ctrlbit = (1 << 12), |
@@ -1072,8 +1010,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1072 | .reg_div = { .reg = S5P_CLKDIV_FSYS2, .shift = 24, .size = 8 }, | 1010 | .reg_div = { .reg = S5P_CLKDIV_FSYS2, .shift = 24, .size = 8 }, |
1073 | }, { | 1011 | }, { |
1074 | .clk = { | 1012 | .clk = { |
1075 | .name = "sclk_mmc", | 1013 | .name = "sclk_dwmmc", |
1076 | .id = 4, | ||
1077 | .parent = &clk_dout_mmc4.clk, | 1014 | .parent = &clk_dout_mmc4.clk, |
1078 | .enable = exynos4_clksrc_mask_fsys_ctrl, | 1015 | .enable = exynos4_clksrc_mask_fsys_ctrl, |
1079 | .ctrlbit = (1 << 16), | 1016 | .ctrlbit = (1 << 16), |
diff --git a/arch/arm/mach-exynos4/include/mach/clkdev.h b/arch/arm/mach-exynos4/include/mach/clkdev.h new file mode 100644 index 000000000000..7dffa83d23ff --- /dev/null +++ b/arch/arm/mach-exynos4/include/mach/clkdev.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __MACH_CLKDEV_H__ | ||
2 | #define __MACH_CLKDEV_H__ | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do {} while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mach-exynos4/mach-smdkc210.c b/arch/arm/mach-exynos4/mach-smdkc210.c index e645f7a955f0..f606ea75bf43 100644 --- a/arch/arm/mach-exynos4/mach-smdkc210.c +++ b/arch/arm/mach-exynos4/mach-smdkc210.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/smsc911x.h> | 15 | #include <linux/smsc911x.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/pwm_backlight.h> | ||
18 | 19 | ||
19 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
@@ -27,6 +28,8 @@ | |||
27 | #include <plat/sdhci.h> | 28 | #include <plat/sdhci.h> |
28 | #include <plat/iic.h> | 29 | #include <plat/iic.h> |
29 | #include <plat/pd.h> | 30 | #include <plat/pd.h> |
31 | #include <plat/gpio-cfg.h> | ||
32 | #include <plat/backlight.h> | ||
30 | 33 | ||
31 | #include <mach/map.h> | 34 | #include <mach/map.h> |
32 | 35 | ||
@@ -191,6 +194,17 @@ static void __init smdkc210_smsc911x_init(void) | |||
191 | (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1); | 194 | (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1); |
192 | } | 195 | } |
193 | 196 | ||
197 | /* LCD Backlight data */ | ||
198 | static struct samsung_bl_gpio_info smdkc210_bl_gpio_info = { | ||
199 | .no = EXYNOS4_GPD0(1), | ||
200 | .func = S3C_GPIO_SFN(2), | ||
201 | }; | ||
202 | |||
203 | static struct platform_pwm_backlight_data smdkc210_bl_data = { | ||
204 | .pwm_id = 1, | ||
205 | .pwm_period_ns = 1000, | ||
206 | }; | ||
207 | |||
194 | static void __init smdkc210_map_io(void) | 208 | static void __init smdkc210_map_io(void) |
195 | { | 209 | { |
196 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | 210 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); |
@@ -210,6 +224,8 @@ static void __init smdkc210_machine_init(void) | |||
210 | s3c_sdhci2_set_platdata(&smdkc210_hsmmc2_pdata); | 224 | s3c_sdhci2_set_platdata(&smdkc210_hsmmc2_pdata); |
211 | s3c_sdhci3_set_platdata(&smdkc210_hsmmc3_pdata); | 225 | s3c_sdhci3_set_platdata(&smdkc210_hsmmc3_pdata); |
212 | 226 | ||
227 | samsung_bl_set(&smdkc210_bl_gpio_info, &smdkc210_bl_data); | ||
228 | |||
213 | platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices)); | 229 | platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices)); |
214 | } | 230 | } |
215 | 231 | ||
diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-exynos4/mach-smdkv310.c index edd814110da8..df1107828abd 100644 --- a/arch/arm/mach-exynos4/mach-smdkv310.c +++ b/arch/arm/mach-exynos4/mach-smdkv310.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/input.h> | 18 | #include <linux/input.h> |
19 | #include <linux/pwm_backlight.h> | ||
19 | 20 | ||
20 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
21 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
@@ -29,6 +30,8 @@ | |||
29 | #include <plat/sdhci.h> | 30 | #include <plat/sdhci.h> |
30 | #include <plat/iic.h> | 31 | #include <plat/iic.h> |
31 | #include <plat/pd.h> | 32 | #include <plat/pd.h> |
33 | #include <plat/gpio-cfg.h> | ||
34 | #include <plat/backlight.h> | ||
32 | 35 | ||
33 | #include <mach/map.h> | 36 | #include <mach/map.h> |
34 | 37 | ||
@@ -209,6 +212,17 @@ static void __init smdkv310_smsc911x_init(void) | |||
209 | (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1); | 212 | (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1); |
210 | } | 213 | } |
211 | 214 | ||
215 | /* LCD Backlight data */ | ||
216 | static struct samsung_bl_gpio_info smdkv310_bl_gpio_info = { | ||
217 | .no = EXYNOS4_GPD0(1), | ||
218 | .func = S3C_GPIO_SFN(2), | ||
219 | }; | ||
220 | |||
221 | static struct platform_pwm_backlight_data smdkv310_bl_data = { | ||
222 | .pwm_id = 1, | ||
223 | .pwm_period_ns = 1000, | ||
224 | }; | ||
225 | |||
212 | static void __init smdkv310_map_io(void) | 226 | static void __init smdkv310_map_io(void) |
213 | { | 227 | { |
214 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | 228 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); |
@@ -230,6 +244,8 @@ static void __init smdkv310_machine_init(void) | |||
230 | 244 | ||
231 | samsung_keypad_set_platdata(&smdkv310_keypad_data); | 245 | samsung_keypad_set_platdata(&smdkv310_keypad_data); |
232 | 246 | ||
247 | samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data); | ||
248 | |||
233 | platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices)); | 249 | platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices)); |
234 | } | 250 | } |
235 | 251 | ||
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 59c97a331136..e8dd22fa7d61 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -167,6 +167,7 @@ config MACH_EUKREA_MBIMXSD25_BASEBOARD | |||
167 | bool "Eukrea MBIMXSD development board" | 167 | bool "Eukrea MBIMXSD development board" |
168 | select IMX_HAVE_PLATFORM_GPIO_KEYS | 168 | select IMX_HAVE_PLATFORM_GPIO_KEYS |
169 | select IMX_HAVE_PLATFORM_IMX_SSI | 169 | select IMX_HAVE_PLATFORM_IMX_SSI |
170 | select LEDS_GPIO_REGISTER | ||
170 | help | 171 | help |
171 | This adds board specific devices that can be found on Eukrea's | 172 | This adds board specific devices that can be found on Eukrea's |
172 | MBIMXSD evaluation board. | 173 | MBIMXSD evaluation board. |
@@ -265,6 +266,7 @@ config MACH_EUKREA_MBIMX27_BASEBOARD | |||
265 | select IMX_HAVE_PLATFORM_IMX_UART | 266 | select IMX_HAVE_PLATFORM_IMX_UART |
266 | select IMX_HAVE_PLATFORM_MXC_MMC | 267 | select IMX_HAVE_PLATFORM_MXC_MMC |
267 | select IMX_HAVE_PLATFORM_SPI_IMX | 268 | select IMX_HAVE_PLATFORM_SPI_IMX |
269 | select LEDS_GPIO_REGISTER | ||
268 | help | 270 | help |
269 | This adds board specific devices that can be found on Eukrea's | 271 | This adds board specific devices that can be found on Eukrea's |
270 | MBIMX27 evaluation board. | 272 | MBIMX27 evaluation board. |
@@ -403,6 +405,7 @@ config MACH_MX31LITE | |||
403 | select IMX_HAVE_PLATFORM_MXC_NAND | 405 | select IMX_HAVE_PLATFORM_MXC_NAND |
404 | select IMX_HAVE_PLATFORM_MXC_RTC | 406 | select IMX_HAVE_PLATFORM_MXC_RTC |
405 | select IMX_HAVE_PLATFORM_SPI_IMX | 407 | select IMX_HAVE_PLATFORM_SPI_IMX |
408 | select LEDS_GPIO_REGISTER | ||
406 | help | 409 | help |
407 | Include support for MX31 LITEKIT platform. This includes specific | 410 | Include support for MX31 LITEKIT platform. This includes specific |
408 | configurations for the board and its peripherals. | 411 | configurations for the board and its peripherals. |
@@ -471,6 +474,7 @@ config MACH_MX31MOBOARD | |||
471 | select IMX_HAVE_PLATFORM_MXC_EHCI | 474 | select IMX_HAVE_PLATFORM_MXC_EHCI |
472 | select IMX_HAVE_PLATFORM_MXC_MMC | 475 | select IMX_HAVE_PLATFORM_MXC_MMC |
473 | select IMX_HAVE_PLATFORM_SPI_IMX | 476 | select IMX_HAVE_PLATFORM_SPI_IMX |
477 | select LEDS_GPIO_REGISTER | ||
474 | select MXC_ULPI if USB_ULPI | 478 | select MXC_ULPI if USB_ULPI |
475 | help | 479 | help |
476 | Include support for mx31moboard platform. This includes specific | 480 | Include support for mx31moboard platform. This includes specific |
@@ -577,6 +581,7 @@ config MACH_EUKREA_MBIMXSD35_BASEBOARD | |||
577 | select IMX_HAVE_PLATFORM_GPIO_KEYS | 581 | select IMX_HAVE_PLATFORM_GPIO_KEYS |
578 | select IMX_HAVE_PLATFORM_IMX_SSI | 582 | select IMX_HAVE_PLATFORM_IMX_SSI |
579 | select IMX_HAVE_PLATFORM_IPU_CORE | 583 | select IMX_HAVE_PLATFORM_IPU_CORE |
584 | select LEDS_GPIO_REGISTER | ||
580 | help | 585 | help |
581 | This adds board specific devices that can be found on Eukrea's | 586 | This adds board specific devices that can be found on Eukrea's |
582 | MBIMXSD evaluation board. | 587 | MBIMXSD evaluation board. |
diff --git a/arch/arm/mach-imx/dma-v1.c b/arch/arm/mach-imx/dma-v1.c index f8aa5be0eb15..42afc29a7da8 100644 --- a/arch/arm/mach-imx/dma-v1.c +++ b/arch/arm/mach-imx/dma-v1.c | |||
@@ -476,7 +476,6 @@ void imx_dma_enable(int channel) | |||
476 | imx_dmav1_writel(imx_dmav1_readl(DMA_CCR(channel)) | CCR_CEN | | 476 | imx_dmav1_writel(imx_dmav1_readl(DMA_CCR(channel)) | CCR_CEN | |
477 | CCR_ACRPT, DMA_CCR(channel)); | 477 | CCR_ACRPT, DMA_CCR(channel)); |
478 | 478 | ||
479 | #ifdef CONFIG_ARCH_MX2 | ||
480 | if ((cpu_is_mx21() || cpu_is_mx27()) && | 479 | if ((cpu_is_mx21() || cpu_is_mx27()) && |
481 | imxdma->sg && imx_dma_hw_chain(imxdma)) { | 480 | imxdma->sg && imx_dma_hw_chain(imxdma)) { |
482 | imxdma->sg = sg_next(imxdma->sg); | 481 | imxdma->sg = sg_next(imxdma->sg); |
@@ -488,7 +487,6 @@ void imx_dma_enable(int channel) | |||
488 | DMA_CCR(channel)); | 487 | DMA_CCR(channel)); |
489 | } | 488 | } |
490 | } | 489 | } |
491 | #endif | ||
492 | imxdma->in_use = 1; | 490 | imxdma->in_use = 1; |
493 | 491 | ||
494 | local_irq_restore(flags); | 492 | local_irq_restore(flags); |
@@ -519,7 +517,6 @@ void imx_dma_disable(int channel) | |||
519 | } | 517 | } |
520 | EXPORT_SYMBOL(imx_dma_disable); | 518 | EXPORT_SYMBOL(imx_dma_disable); |
521 | 519 | ||
522 | #ifdef CONFIG_ARCH_MX2 | ||
523 | static void imx_dma_watchdog(unsigned long chno) | 520 | static void imx_dma_watchdog(unsigned long chno) |
524 | { | 521 | { |
525 | struct imx_dma_channel *imxdma = &imx_dma_channels[chno]; | 522 | struct imx_dma_channel *imxdma = &imx_dma_channels[chno]; |
@@ -531,7 +528,6 @@ static void imx_dma_watchdog(unsigned long chno) | |||
531 | if (imxdma->err_handler) | 528 | if (imxdma->err_handler) |
532 | imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT); | 529 | imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT); |
533 | } | 530 | } |
534 | #endif | ||
535 | 531 | ||
536 | static irqreturn_t dma_err_handler(int irq, void *dev_id) | 532 | static irqreturn_t dma_err_handler(int irq, void *dev_id) |
537 | { | 533 | { |
@@ -655,10 +651,8 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id) | |||
655 | { | 651 | { |
656 | int i, disr; | 652 | int i, disr; |
657 | 653 | ||
658 | #ifdef CONFIG_ARCH_MX2 | ||
659 | if (cpu_is_mx21() || cpu_is_mx27()) | 654 | if (cpu_is_mx21() || cpu_is_mx27()) |
660 | dma_err_handler(irq, dev_id); | 655 | dma_err_handler(irq, dev_id); |
661 | #endif | ||
662 | 656 | ||
663 | disr = imx_dmav1_readl(DMA_DISR); | 657 | disr = imx_dmav1_readl(DMA_DISR); |
664 | 658 | ||
@@ -704,7 +698,6 @@ int imx_dma_request(int channel, const char *name) | |||
704 | imxdma->name = name; | 698 | imxdma->name = name; |
705 | local_irq_restore(flags); /* request_irq() can block */ | 699 | local_irq_restore(flags); /* request_irq() can block */ |
706 | 700 | ||
707 | #ifdef CONFIG_ARCH_MX2 | ||
708 | if (cpu_is_mx21() || cpu_is_mx27()) { | 701 | if (cpu_is_mx21() || cpu_is_mx27()) { |
709 | ret = request_irq(MX2x_INT_DMACH0 + channel, | 702 | ret = request_irq(MX2x_INT_DMACH0 + channel, |
710 | dma_irq_handler, 0, "DMA", NULL); | 703 | dma_irq_handler, 0, "DMA", NULL); |
@@ -718,7 +711,6 @@ int imx_dma_request(int channel, const char *name) | |||
718 | imxdma->watchdog.function = &imx_dma_watchdog; | 711 | imxdma->watchdog.function = &imx_dma_watchdog; |
719 | imxdma->watchdog.data = channel; | 712 | imxdma->watchdog.data = channel; |
720 | } | 713 | } |
721 | #endif | ||
722 | 714 | ||
723 | return ret; | 715 | return ret; |
724 | } | 716 | } |
@@ -745,10 +737,8 @@ void imx_dma_free(int channel) | |||
745 | imx_dma_disable(channel); | 737 | imx_dma_disable(channel); |
746 | imxdma->name = NULL; | 738 | imxdma->name = NULL; |
747 | 739 | ||
748 | #ifdef CONFIG_ARCH_MX2 | ||
749 | if (cpu_is_mx21() || cpu_is_mx27()) | 740 | if (cpu_is_mx21() || cpu_is_mx27()) |
750 | free_irq(MX2x_INT_DMACH0 + channel, NULL); | 741 | free_irq(MX2x_INT_DMACH0 + channel, NULL); |
751 | #endif | ||
752 | 742 | ||
753 | local_irq_restore(flags); | 743 | local_irq_restore(flags); |
754 | } | 744 | } |
@@ -804,21 +794,13 @@ static int __init imx_dma_init(void) | |||
804 | int ret = 0; | 794 | int ret = 0; |
805 | int i; | 795 | int i; |
806 | 796 | ||
807 | #ifdef CONFIG_ARCH_MX1 | ||
808 | if (cpu_is_mx1()) | 797 | if (cpu_is_mx1()) |
809 | imx_dmav1_baseaddr = MX1_IO_ADDRESS(MX1_DMA_BASE_ADDR); | 798 | imx_dmav1_baseaddr = MX1_IO_ADDRESS(MX1_DMA_BASE_ADDR); |
810 | else | 799 | else if (cpu_is_mx21()) |
811 | #endif | ||
812 | #ifdef CONFIG_MACH_MX21 | ||
813 | if (cpu_is_mx21()) | ||
814 | imx_dmav1_baseaddr = MX21_IO_ADDRESS(MX21_DMA_BASE_ADDR); | 800 | imx_dmav1_baseaddr = MX21_IO_ADDRESS(MX21_DMA_BASE_ADDR); |
815 | else | 801 | else if (cpu_is_mx27()) |
816 | #endif | ||
817 | #ifdef CONFIG_MACH_MX27 | ||
818 | if (cpu_is_mx27()) | ||
819 | imx_dmav1_baseaddr = MX27_IO_ADDRESS(MX27_DMA_BASE_ADDR); | 802 | imx_dmav1_baseaddr = MX27_IO_ADDRESS(MX27_DMA_BASE_ADDR); |
820 | else | 803 | else |
821 | #endif | ||
822 | return 0; | 804 | return 0; |
823 | 805 | ||
824 | dma_clk = clk_get(NULL, "dma"); | 806 | dma_clk = clk_get(NULL, "dma"); |
@@ -829,7 +811,6 @@ static int __init imx_dma_init(void) | |||
829 | /* reset DMA module */ | 811 | /* reset DMA module */ |
830 | imx_dmav1_writel(DCR_DRST, DMA_DCR); | 812 | imx_dmav1_writel(DCR_DRST, DMA_DCR); |
831 | 813 | ||
832 | #ifdef CONFIG_ARCH_MX1 | ||
833 | if (cpu_is_mx1()) { | 814 | if (cpu_is_mx1()) { |
834 | ret = request_irq(MX1_DMA_INT, dma_irq_handler, 0, "DMA", NULL); | 815 | ret = request_irq(MX1_DMA_INT, dma_irq_handler, 0, "DMA", NULL); |
835 | if (ret) { | 816 | if (ret) { |
@@ -844,7 +825,7 @@ static int __init imx_dma_init(void) | |||
844 | return ret; | 825 | return ret; |
845 | } | 826 | } |
846 | } | 827 | } |
847 | #endif | 828 | |
848 | /* enable DMA module */ | 829 | /* enable DMA module */ |
849 | imx_dmav1_writel(DCR_DEN, DMA_DCR); | 830 | imx_dmav1_writel(DCR_DEN, DMA_DCR); |
850 | 831 | ||
diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c index 5911281da5f5..5db3e1463af7 100644 --- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c | |||
@@ -112,7 +112,7 @@ eukrea_mbimx27_keymap_data __initconst = { | |||
112 | .keymap_size = ARRAY_SIZE(eukrea_mbimx27_keymap), | 112 | .keymap_size = ARRAY_SIZE(eukrea_mbimx27_keymap), |
113 | }; | 113 | }; |
114 | 114 | ||
115 | static struct gpio_led gpio_leds[] = { | 115 | static const struct gpio_led eukrea_mbimx27_gpio_leds[] __initconst = { |
116 | { | 116 | { |
117 | .name = "led1", | 117 | .name = "led1", |
118 | .default_trigger = "heartbeat", | 118 | .default_trigger = "heartbeat", |
@@ -127,17 +127,10 @@ static struct gpio_led gpio_leds[] = { | |||
127 | }, | 127 | }, |
128 | }; | 128 | }; |
129 | 129 | ||
130 | static struct gpio_led_platform_data gpio_led_info = { | 130 | static const struct gpio_led_platform_data |
131 | .leds = gpio_leds, | 131 | eukrea_mbimx27_gpio_led_info __initconst = { |
132 | .num_leds = ARRAY_SIZE(gpio_leds), | 132 | .leds = eukrea_mbimx27_gpio_leds, |
133 | }; | 133 | .num_leds = ARRAY_SIZE(eukrea_mbimx27_gpio_leds), |
134 | |||
135 | static struct platform_device leds_gpio = { | ||
136 | .name = "leds-gpio", | ||
137 | .id = -1, | ||
138 | .dev = { | ||
139 | .platform_data = &gpio_led_info, | ||
140 | }, | ||
141 | }; | 134 | }; |
142 | 135 | ||
143 | static struct imx_fb_videomode eukrea_mbimx27_modes[] = { | 136 | static struct imx_fb_videomode eukrea_mbimx27_modes[] = { |
@@ -293,10 +286,6 @@ static struct i2c_board_info eukrea_mbimx27_i2c_devices[] = { | |||
293 | }, | 286 | }, |
294 | }; | 287 | }; |
295 | 288 | ||
296 | static struct platform_device *platform_devices[] __initdata = { | ||
297 | &leds_gpio, | ||
298 | }; | ||
299 | |||
300 | static const struct imxmmc_platform_data sdhc_pdata __initconst = { | 289 | static const struct imxmmc_platform_data sdhc_pdata __initconst = { |
301 | .dat3_card_detect = 1, | 290 | .dat3_card_detect = 1, |
302 | }; | 291 | }; |
@@ -377,5 +366,5 @@ void __init eukrea_mbimx27_baseboard_init(void) | |||
377 | 366 | ||
378 | imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data); | 367 | imx27_add_imx_keypad(&eukrea_mbimx27_keymap_data); |
379 | 368 | ||
380 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 369 | gpio_led_register_device(-1, &eukrea_mbimx27_gpio_led_info); |
381 | } | 370 | } |
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c index f9ef04acdab1..01ebcb31e482 100644 --- a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c | |||
@@ -173,7 +173,7 @@ static struct platform_device eukrea_mbimxsd_lcd_powerdev = { | |||
173 | .dev.platform_data = &eukrea_mbimxsd_lcd_power_data, | 173 | .dev.platform_data = &eukrea_mbimxsd_lcd_power_data, |
174 | }; | 174 | }; |
175 | 175 | ||
176 | static struct gpio_led eukrea_mbimxsd_leds[] = { | 176 | static const struct gpio_led eukrea_mbimxsd_leds[] __initconst = { |
177 | { | 177 | { |
178 | .name = "led1", | 178 | .name = "led1", |
179 | .default_trigger = "heartbeat", | 179 | .default_trigger = "heartbeat", |
@@ -182,19 +182,12 @@ static struct gpio_led eukrea_mbimxsd_leds[] = { | |||
182 | }, | 182 | }, |
183 | }; | 183 | }; |
184 | 184 | ||
185 | static struct gpio_led_platform_data eukrea_mbimxsd_led_info = { | 185 | static const struct gpio_led_platform_data |
186 | eukrea_mbimxsd_led_info __initconst = { | ||
186 | .leds = eukrea_mbimxsd_leds, | 187 | .leds = eukrea_mbimxsd_leds, |
187 | .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds), | 188 | .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds), |
188 | }; | 189 | }; |
189 | 190 | ||
190 | static struct platform_device eukrea_mbimxsd_leds_gpio = { | ||
191 | .name = "leds-gpio", | ||
192 | .id = -1, | ||
193 | .dev = { | ||
194 | .platform_data = &eukrea_mbimxsd_led_info, | ||
195 | }, | ||
196 | }; | ||
197 | |||
198 | static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { | 191 | static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { |
199 | { | 192 | { |
200 | .gpio = GPIO_SWITCH1, | 193 | .gpio = GPIO_SWITCH1, |
@@ -212,7 +205,6 @@ static const struct gpio_keys_platform_data | |||
212 | }; | 205 | }; |
213 | 206 | ||
214 | static struct platform_device *platform_devices[] __initdata = { | 207 | static struct platform_device *platform_devices[] __initdata = { |
215 | &eukrea_mbimxsd_leds_gpio, | ||
216 | &eukrea_mbimxsd_lcd_powerdev, | 208 | &eukrea_mbimxsd_lcd_powerdev, |
217 | }; | 209 | }; |
218 | 210 | ||
@@ -287,5 +279,6 @@ void __init eukrea_mbimxsd25_baseboard_init(void) | |||
287 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); | 279 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); |
288 | 280 | ||
289 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 281 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
282 | gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); | ||
290 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); | 283 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); |
291 | } | 284 | } |
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c index 4909ea05855a..558eb526ba56 100644 --- a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c | |||
@@ -193,19 +193,12 @@ static struct gpio_led eukrea_mbimxsd_leds[] = { | |||
193 | }, | 193 | }, |
194 | }; | 194 | }; |
195 | 195 | ||
196 | static struct gpio_led_platform_data eukrea_mbimxsd_led_info = { | 196 | static const struct gpio_led_platform_data |
197 | eukrea_mbimxsd_led_info __initconst = { | ||
197 | .leds = eukrea_mbimxsd_leds, | 198 | .leds = eukrea_mbimxsd_leds, |
198 | .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds), | 199 | .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds), |
199 | }; | 200 | }; |
200 | 201 | ||
201 | static struct platform_device eukrea_mbimxsd_leds_gpio = { | ||
202 | .name = "leds-gpio", | ||
203 | .id = -1, | ||
204 | .dev = { | ||
205 | .platform_data = &eukrea_mbimxsd_led_info, | ||
206 | }, | ||
207 | }; | ||
208 | |||
209 | static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { | 202 | static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { |
210 | { | 203 | { |
211 | .gpio = GPIO_SWITCH1, | 204 | .gpio = GPIO_SWITCH1, |
@@ -223,7 +216,6 @@ static const struct gpio_keys_platform_data | |||
223 | }; | 216 | }; |
224 | 217 | ||
225 | static struct platform_device *platform_devices[] __initdata = { | 218 | static struct platform_device *platform_devices[] __initdata = { |
226 | &eukrea_mbimxsd_leds_gpio, | ||
227 | &eukrea_mbimxsd_lcd_powerdev, | 219 | &eukrea_mbimxsd_lcd_powerdev, |
228 | }; | 220 | }; |
229 | 221 | ||
@@ -299,5 +291,6 @@ void __init eukrea_mbimxsd35_baseboard_init(void) | |||
299 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); | 291 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); |
300 | 292 | ||
301 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 293 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
294 | gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); | ||
302 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); | 295 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); |
303 | } | 296 | } |
diff --git a/arch/arm/mach-imx/mach-apf9328.c b/arch/arm/mach-imx/mach-apf9328.c index 59d2a3b137d9..a404c89485ca 100644 --- a/arch/arm/mach-imx/mach-apf9328.c +++ b/arch/arm/mach-imx/mach-apf9328.c | |||
@@ -99,11 +99,6 @@ static struct platform_device dm9000x_device = { | |||
99 | } | 99 | } |
100 | }; | 100 | }; |
101 | 101 | ||
102 | /* --- SERIAL RESSOURCE --- */ | ||
103 | static const struct imxuart_platform_data uart0_pdata __initconst = { | ||
104 | .flags = 0, | ||
105 | }; | ||
106 | |||
107 | static const struct imxuart_platform_data uart1_pdata __initconst = { | 102 | static const struct imxuart_platform_data uart1_pdata __initconst = { |
108 | .flags = IMXUART_HAVE_RTSCTS, | 103 | .flags = IMXUART_HAVE_RTSCTS, |
109 | }; | 104 | }; |
@@ -121,7 +116,7 @@ static void __init apf9328_init(void) | |||
121 | ARRAY_SIZE(apf9328_pins), | 116 | ARRAY_SIZE(apf9328_pins), |
122 | "APF9328"); | 117 | "APF9328"); |
123 | 118 | ||
124 | imx1_add_imx_uart0(&uart0_pdata); | 119 | imx1_add_imx_uart0(NULL); |
125 | imx1_add_imx_uart1(&uart1_pdata); | 120 | imx1_add_imx_uart1(&uart1_pdata); |
126 | 121 | ||
127 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 122 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index c6269d60ddbc..6707de0ab716 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
35 | #include <asm/mach/time.h> | 35 | #include <asm/mach/time.h> |
36 | #include <mach/common.h> | 36 | #include <mach/common.h> |
37 | #include <mach/iomux.h> | 37 | #include <mach/iomux-mx27.h> |
38 | 38 | ||
39 | #include "devices-imx27.h" | 39 | #include "devices-imx27.h" |
40 | 40 | ||
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index eb663102376f..b31d4129e10e 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #define SPI2_SS0 IMX_GPIO_NR(4, 21) | 47 | #define SPI2_SS0 IMX_GPIO_NR(4, 21) |
48 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(3, 28)) | 48 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(3, 28)) |
49 | #define PMIC_INT IMX_GPIO_NR(3, 14) | 49 | #define PMIC_INT IMX_GPIO_NR(3, 14) |
50 | #define SD1_CD IMX_GPIO_NR(2, 26) | ||
50 | 51 | ||
51 | static const int mx27pdk_pins[] __initconst = { | 52 | static const int mx27pdk_pins[] __initconst = { |
52 | /* UART1 */ | 53 | /* UART1 */ |
@@ -135,13 +136,13 @@ static const struct matrix_keymap_data mx27_3ds_keymap_data __initconst = { | |||
135 | static int mx27_3ds_sdhc1_init(struct device *dev, irq_handler_t detect_irq, | 136 | static int mx27_3ds_sdhc1_init(struct device *dev, irq_handler_t detect_irq, |
136 | void *data) | 137 | void *data) |
137 | { | 138 | { |
138 | return request_irq(IRQ_GPIOB(26), detect_irq, IRQF_TRIGGER_FALLING | | 139 | return request_irq(gpio_to_irq(SD1_CD), detect_irq, |
139 | IRQF_TRIGGER_RISING, "sdhc1-card-detect", data); | 140 | IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, "sdhc1-card-detect", data); |
140 | } | 141 | } |
141 | 142 | ||
142 | static void mx27_3ds_sdhc1_exit(struct device *dev, void *data) | 143 | static void mx27_3ds_sdhc1_exit(struct device *dev, void *data) |
143 | { | 144 | { |
144 | free_irq(IRQ_GPIOB(26), data); | 145 | free_irq(gpio_to_irq(SD1_CD), data); |
145 | } | 146 | } |
146 | 147 | ||
147 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { | 148 | static const struct imxmmc_platform_data sdhc1_pdata __initconst = { |
@@ -261,11 +262,11 @@ static struct mc13xxx_platform_data mc13783_pdata = { | |||
261 | }; | 262 | }; |
262 | 263 | ||
263 | /* SPI */ | 264 | /* SPI */ |
264 | static int spi2_internal_chipselect[] = {SPI2_SS0}; | 265 | static int spi2_chipselect[] = {SPI2_SS0}; |
265 | 266 | ||
266 | static const struct spi_imx_master spi2_pdata __initconst = { | 267 | static const struct spi_imx_master spi2_pdata __initconst = { |
267 | .chipselect = spi2_internal_chipselect, | 268 | .chipselect = spi2_chipselect, |
268 | .num_chipselect = ARRAY_SIZE(spi2_internal_chipselect), | 269 | .num_chipselect = ARRAY_SIZE(spi2_chipselect), |
269 | }; | 270 | }; |
270 | 271 | ||
271 | static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { | 272 | static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { |
@@ -275,7 +276,7 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { | |||
275 | .bus_num = 1, | 276 | .bus_num = 1, |
276 | .chip_select = 0, /* SS0 */ | 277 | .chip_select = 0, /* SS0 */ |
277 | .platform_data = &mc13783_pdata, | 278 | .platform_data = &mc13783_pdata, |
278 | .irq = IRQ_GPIOC(14), | 279 | .irq = gpio_to_irq(PMIC_INT), |
279 | .mode = SPI_CS_HIGH, | 280 | .mode = SPI_CS_HIGH, |
280 | }, | 281 | }, |
281 | }; | 282 | }; |
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index a52fd36e2b52..b358383120e7 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c | |||
@@ -425,7 +425,7 @@ static int __init moboard_usbh2_init(void) | |||
425 | return 0; | 425 | return 0; |
426 | } | 426 | } |
427 | 427 | ||
428 | static struct gpio_led mx31moboard_leds[] = { | 428 | static const struct gpio_led mx31moboard_leds[] __initconst = { |
429 | { | 429 | { |
430 | .name = "coreboard-led-0:red:running", | 430 | .name = "coreboard-led-0:red:running", |
431 | .default_trigger = "heartbeat", | 431 | .default_trigger = "heartbeat", |
@@ -442,26 +442,17 @@ static struct gpio_led mx31moboard_leds[] = { | |||
442 | }, | 442 | }, |
443 | }; | 443 | }; |
444 | 444 | ||
445 | static struct gpio_led_platform_data mx31moboard_led_pdata = { | 445 | static const struct gpio_led_platform_data mx31moboard_led_pdata __initconst = { |
446 | .num_leds = ARRAY_SIZE(mx31moboard_leds), | 446 | .num_leds = ARRAY_SIZE(mx31moboard_leds), |
447 | .leds = mx31moboard_leds, | 447 | .leds = mx31moboard_leds, |
448 | }; | 448 | }; |
449 | 449 | ||
450 | static struct platform_device mx31moboard_leds_device = { | ||
451 | .name = "leds-gpio", | ||
452 | .id = -1, | ||
453 | .dev = { | ||
454 | .platform_data = &mx31moboard_led_pdata, | ||
455 | }, | ||
456 | }; | ||
457 | |||
458 | static const struct ipu_platform_data mx3_ipu_data __initconst = { | 450 | static const struct ipu_platform_data mx3_ipu_data __initconst = { |
459 | .irq_base = MXC_IPU_IRQ_START, | 451 | .irq_base = MXC_IPU_IRQ_START, |
460 | }; | 452 | }; |
461 | 453 | ||
462 | static struct platform_device *devices[] __initdata = { | 454 | static struct platform_device *devices[] __initdata = { |
463 | &mx31moboard_flash, | 455 | &mx31moboard_flash, |
464 | &mx31moboard_leds_device, | ||
465 | }; | 456 | }; |
466 | 457 | ||
467 | static struct mx3_camera_pdata camera_pdata __initdata = { | 458 | static struct mx3_camera_pdata camera_pdata __initdata = { |
@@ -513,6 +504,7 @@ static void __init mx31moboard_init(void) | |||
513 | "moboard"); | 504 | "moboard"); |
514 | 505 | ||
515 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 506 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
507 | gpio_led_register_device(-1, &mx31moboard_led_pdata); | ||
516 | 508 | ||
517 | imx31_add_imx_uart0(&uart0_pdata); | 509 | imx31_add_imx_uart0(&uart0_pdata); |
518 | imx31_add_imx_uart4(&uart4_pdata); | 510 | imx31_add_imx_uart4(&uart4_pdata); |
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c index 48b3c6fd5cf0..b3b9bd8ac2a3 100644 --- a/arch/arm/mach-imx/mach-mx35_3ds.c +++ b/arch/arm/mach-imx/mach-mx35_3ds.c | |||
@@ -43,7 +43,7 @@ | |||
43 | 43 | ||
44 | #include "devices-imx35.h" | 44 | #include "devices-imx35.h" |
45 | 45 | ||
46 | #define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTA + 1) | 46 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(1, 1)) |
47 | 47 | ||
48 | static const struct imxuart_platform_data uart_pdata __initconst = { | 48 | static const struct imxuart_platform_data uart_pdata __initconst = { |
49 | .flags = IMXUART_HAVE_RTSCTS, | 49 | .flags = IMXUART_HAVE_RTSCTS, |
diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c index 82805260e19c..db2d60470e15 100644 --- a/arch/arm/mach-imx/mach-scb9328.c +++ b/arch/arm/mach-imx/mach-scb9328.c | |||
@@ -101,21 +101,7 @@ static const int mxc_uart1_pins[] = { | |||
101 | PC12_PF_UART1_RXD, | 101 | PC12_PF_UART1_RXD, |
102 | }; | 102 | }; |
103 | 103 | ||
104 | static int uart1_mxc_init(struct platform_device *pdev) | ||
105 | { | ||
106 | return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, | ||
107 | ARRAY_SIZE(mxc_uart1_pins), "UART1"); | ||
108 | } | ||
109 | |||
110 | static void uart1_mxc_exit(struct platform_device *pdev) | ||
111 | { | ||
112 | mxc_gpio_release_multiple_pins(mxc_uart1_pins, | ||
113 | ARRAY_SIZE(mxc_uart1_pins)); | ||
114 | } | ||
115 | |||
116 | static const struct imxuart_platform_data uart_pdata __initconst = { | 104 | static const struct imxuart_platform_data uart_pdata __initconst = { |
117 | .init = uart1_mxc_init, | ||
118 | .exit = uart1_mxc_exit, | ||
119 | .flags = IMXUART_HAVE_RTSCTS, | 105 | .flags = IMXUART_HAVE_RTSCTS, |
120 | }; | 106 | }; |
121 | 107 | ||
@@ -131,6 +117,9 @@ static void __init scb9328_init(void) | |||
131 | { | 117 | { |
132 | imx1_soc_init(); | 118 | imx1_soc_init(); |
133 | 119 | ||
120 | mxc_gpio_setup_multiple_pins(mxc_uart1_pins, | ||
121 | ARRAY_SIZE(mxc_uart1_pins), "UART1"); | ||
122 | |||
134 | imx1_add_imx_uart0(&uart_pdata); | 123 | imx1_add_imx_uart0(&uart_pdata); |
135 | 124 | ||
136 | printk(KERN_INFO"Scb9328: Adding devices\n"); | 125 | printk(KERN_INFO"Scb9328: Adding devices\n"); |
diff --git a/arch/arm/mach-imx/mx31lite-db.c b/arch/arm/mach-imx/mx31lite-db.c index 5aa053edc17c..bf0fb87946ba 100644 --- a/arch/arm/mach-imx/mx31lite-db.c +++ b/arch/arm/mach-imx/mx31lite-db.c | |||
@@ -161,7 +161,7 @@ static const struct spi_imx_master spi0_pdata __initconst = { | |||
161 | 161 | ||
162 | /* GPIO LEDs */ | 162 | /* GPIO LEDs */ |
163 | 163 | ||
164 | static struct gpio_led litekit_leds[] = { | 164 | static const struct gpio_led litekit_leds[] __initconst = { |
165 | { | 165 | { |
166 | .name = "GPIO0", | 166 | .name = "GPIO0", |
167 | .gpio = IOMUX_TO_GPIO(MX31_PIN_COMPARE), | 167 | .gpio = IOMUX_TO_GPIO(MX31_PIN_COMPARE), |
@@ -176,19 +176,12 @@ static struct gpio_led litekit_leds[] = { | |||
176 | } | 176 | } |
177 | }; | 177 | }; |
178 | 178 | ||
179 | static struct gpio_led_platform_data litekit_led_platform_data = { | 179 | static const struct gpio_led_platform_data |
180 | litekit_led_platform_data __initconst = { | ||
180 | .leds = litekit_leds, | 181 | .leds = litekit_leds, |
181 | .num_leds = ARRAY_SIZE(litekit_leds), | 182 | .num_leds = ARRAY_SIZE(litekit_leds), |
182 | }; | 183 | }; |
183 | 184 | ||
184 | static struct platform_device litekit_led_device = { | ||
185 | .name = "leds-gpio", | ||
186 | .id = -1, | ||
187 | .dev = { | ||
188 | .platform_data = &litekit_led_platform_data, | ||
189 | }, | ||
190 | }; | ||
191 | |||
192 | void __init mx31lite_db_init(void) | 185 | void __init mx31lite_db_init(void) |
193 | { | 186 | { |
194 | mxc_iomux_setup_multiple_pins(litekit_db_board_pins, | 187 | mxc_iomux_setup_multiple_pins(litekit_db_board_pins, |
@@ -197,7 +190,7 @@ void __init mx31lite_db_init(void) | |||
197 | imx31_add_imx_uart0(&uart_pdata); | 190 | imx31_add_imx_uart0(&uart_pdata); |
198 | imx31_add_mxc_mmc(0, &mmc_pdata); | 191 | imx31_add_mxc_mmc(0, &mmc_pdata); |
199 | imx31_add_spi_imx0(&spi0_pdata); | 192 | imx31_add_spi_imx0(&spi0_pdata); |
200 | platform_device_register(&litekit_led_device); | 193 | gpio_led_register_device(-1, &litekit_led_platform_data); |
201 | imx31_add_imx2_wdt(NULL); | 194 | imx31_add_imx2_wdt(NULL); |
202 | imx31_add_mxc_rtc(NULL); | 195 | imx31_add_mxc_rtc(NULL); |
203 | } | 196 | } |
diff --git a/arch/arm/mach-integrator/include/mach/bits.h b/arch/arm/mach-integrator/include/mach/bits.h deleted file mode 100644 index 09b024e0496a..000000000000 --- a/arch/arm/mach-integrator/include/mach/bits.h +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License as published by | ||
4 | * the Free Software Foundation; either version 2 of the License, or | ||
5 | * (at your option) any later version. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * along with this program; if not, write to the Free Software | ||
14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
15 | */ | ||
16 | /* DO NOT EDIT!! - this file automatically generated | ||
17 | * from .s file by awk -f s2h.awk | ||
18 | */ | ||
19 | /* Bit field definitions | ||
20 | * Copyright (C) ARM Limited 1998. All rights reserved. | ||
21 | */ | ||
22 | |||
23 | #ifndef __bits_h | ||
24 | #define __bits_h 1 | ||
25 | |||
26 | #define BIT0 0x00000001 | ||
27 | #define BIT1 0x00000002 | ||
28 | #define BIT2 0x00000004 | ||
29 | #define BIT3 0x00000008 | ||
30 | #define BIT4 0x00000010 | ||
31 | #define BIT5 0x00000020 | ||
32 | #define BIT6 0x00000040 | ||
33 | #define BIT7 0x00000080 | ||
34 | #define BIT8 0x00000100 | ||
35 | #define BIT9 0x00000200 | ||
36 | #define BIT10 0x00000400 | ||
37 | #define BIT11 0x00000800 | ||
38 | #define BIT12 0x00001000 | ||
39 | #define BIT13 0x00002000 | ||
40 | #define BIT14 0x00004000 | ||
41 | #define BIT15 0x00008000 | ||
42 | #define BIT16 0x00010000 | ||
43 | #define BIT17 0x00020000 | ||
44 | #define BIT18 0x00040000 | ||
45 | #define BIT19 0x00080000 | ||
46 | #define BIT20 0x00100000 | ||
47 | #define BIT21 0x00200000 | ||
48 | #define BIT22 0x00400000 | ||
49 | #define BIT23 0x00800000 | ||
50 | #define BIT24 0x01000000 | ||
51 | #define BIT25 0x02000000 | ||
52 | #define BIT26 0x04000000 | ||
53 | #define BIT27 0x08000000 | ||
54 | #define BIT28 0x10000000 | ||
55 | #define BIT29 0x20000000 | ||
56 | #define BIT30 0x40000000 | ||
57 | #define BIT31 0x80000000 | ||
58 | |||
59 | #endif | ||
60 | |||
61 | /* END */ | ||
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index 799fbc40e53c..f25e9d7bf0f5 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig | |||
@@ -109,6 +109,7 @@ config MACH_EUKREA_MBIMX51_BASEBOARD | |||
109 | bool | 109 | bool |
110 | select IMX_HAVE_PLATFORM_IMX_KEYPAD | 110 | select IMX_HAVE_PLATFORM_IMX_KEYPAD |
111 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 111 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
112 | select LEDS_GPIO_REGISTER | ||
112 | help | 113 | help |
113 | This adds board specific devices that can be found on Eukrea's | 114 | This adds board specific devices that can be found on Eukrea's |
114 | MBIMX51 evaluation board. | 115 | MBIMX51 evaluation board. |
@@ -135,6 +136,7 @@ config MACH_EUKREA_MBIMXSD51_BASEBOARD | |||
135 | prompt "Eukrea MBIMXSD development board" | 136 | prompt "Eukrea MBIMXSD development board" |
136 | bool | 137 | bool |
137 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX | 138 | select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX |
139 | select LEDS_GPIO_REGISTER | ||
138 | help | 140 | help |
139 | This adds board specific devices that can be found on Eukrea's | 141 | This adds board specific devices that can be found on Eukrea's |
140 | MBIMXSD evaluation board. | 142 | MBIMXSD evaluation board. |
@@ -151,6 +153,7 @@ config MX51_EFIKA_COMMON | |||
151 | 153 | ||
152 | config MACH_MX51_EFIKAMX | 154 | config MACH_MX51_EFIKAMX |
153 | bool "Support MX51 Genesi Efika MX nettop" | 155 | bool "Support MX51 Genesi Efika MX nettop" |
156 | select LEDS_GPIO_REGISTER | ||
154 | select MX51_EFIKA_COMMON | 157 | select MX51_EFIKA_COMMON |
155 | help | 158 | help |
156 | Include support for Genesi Efika MX nettop. This includes specific | 159 | Include support for Genesi Efika MX nettop. This includes specific |
@@ -158,6 +161,7 @@ config MACH_MX51_EFIKAMX | |||
158 | 161 | ||
159 | config MACH_MX51_EFIKASB | 162 | config MACH_MX51_EFIKASB |
160 | bool "Support MX51 Genesi Efika Smartbook" | 163 | bool "Support MX51 Genesi Efika Smartbook" |
164 | select LEDS_GPIO_REGISTER | ||
161 | select MX51_EFIKA_COMMON | 165 | select MX51_EFIKA_COMMON |
162 | help | 166 | help |
163 | Include support for Genesi Efika Smartbook. This includes specific | 167 | Include support for Genesi Efika Smartbook. This includes specific |
diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c index add0d42de7af..7c893fa70266 100644 --- a/arch/arm/mach-mx5/board-cpuimx51.c +++ b/arch/arm/mach-mx5/board-cpuimx51.c | |||
@@ -43,10 +43,6 @@ | |||
43 | #define CPUIMX51_QUARTB_GPIO IMX_GPIO_NR(3, 25) | 43 | #define CPUIMX51_QUARTB_GPIO IMX_GPIO_NR(3, 25) |
44 | #define CPUIMX51_QUARTC_GPIO IMX_GPIO_NR(3, 26) | 44 | #define CPUIMX51_QUARTC_GPIO IMX_GPIO_NR(3, 26) |
45 | #define CPUIMX51_QUARTD_GPIO IMX_GPIO_NR(3, 27) | 45 | #define CPUIMX51_QUARTD_GPIO IMX_GPIO_NR(3, 27) |
46 | #define CPUIMX51_QUARTA_IRQ (MXC_INTERNAL_IRQS + CPUIMX51_QUARTA_GPIO) | ||
47 | #define CPUIMX51_QUARTB_IRQ (MXC_INTERNAL_IRQS + CPUIMX51_QUARTB_GPIO) | ||
48 | #define CPUIMX51_QUARTC_IRQ (MXC_INTERNAL_IRQS + CPUIMX51_QUARTC_GPIO) | ||
49 | #define CPUIMX51_QUARTD_IRQ (MXC_INTERNAL_IRQS + CPUIMX51_QUARTD_GPIO) | ||
50 | #define CPUIMX51_QUART_XTAL 14745600 | 46 | #define CPUIMX51_QUART_XTAL 14745600 |
51 | #define CPUIMX51_QUART_REGSHIFT 17 | 47 | #define CPUIMX51_QUART_REGSHIFT 17 |
52 | 48 | ||
@@ -61,7 +57,7 @@ | |||
61 | static struct plat_serial8250_port serial_platform_data[] = { | 57 | static struct plat_serial8250_port serial_platform_data[] = { |
62 | { | 58 | { |
63 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000), | 59 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000), |
64 | .irq = CPUIMX51_QUARTA_IRQ, | 60 | .irq = gpio_to_irq(CPUIMX51_QUARTA_GPIO), |
65 | .irqflags = IRQF_TRIGGER_HIGH, | 61 | .irqflags = IRQF_TRIGGER_HIGH, |
66 | .uartclk = CPUIMX51_QUART_XTAL, | 62 | .uartclk = CPUIMX51_QUART_XTAL, |
67 | .regshift = CPUIMX51_QUART_REGSHIFT, | 63 | .regshift = CPUIMX51_QUART_REGSHIFT, |
@@ -69,7 +65,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
69 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 65 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
70 | }, { | 66 | }, { |
71 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000), | 67 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000), |
72 | .irq = CPUIMX51_QUARTB_IRQ, | 68 | .irq = gpio_to_irq(CPUIMX51_QUARTB_GPIO), |
73 | .irqflags = IRQF_TRIGGER_HIGH, | 69 | .irqflags = IRQF_TRIGGER_HIGH, |
74 | .uartclk = CPUIMX51_QUART_XTAL, | 70 | .uartclk = CPUIMX51_QUART_XTAL, |
75 | .regshift = CPUIMX51_QUART_REGSHIFT, | 71 | .regshift = CPUIMX51_QUART_REGSHIFT, |
@@ -77,7 +73,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
77 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 73 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
78 | }, { | 74 | }, { |
79 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000), | 75 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000), |
80 | .irq = CPUIMX51_QUARTC_IRQ, | 76 | .irq = gpio_to_irq(CPUIMX51_QUARTC_GPIO), |
81 | .irqflags = IRQF_TRIGGER_HIGH, | 77 | .irqflags = IRQF_TRIGGER_HIGH, |
82 | .uartclk = CPUIMX51_QUART_XTAL, | 78 | .uartclk = CPUIMX51_QUART_XTAL, |
83 | .regshift = CPUIMX51_QUART_REGSHIFT, | 79 | .regshift = CPUIMX51_QUART_REGSHIFT, |
@@ -85,7 +81,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
85 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | 81 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, |
86 | }, { | 82 | }, { |
87 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), | 83 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), |
88 | .irq = CPUIMX51_QUARTD_IRQ, | 84 | .irq = irq_to_gpio(CPUIMX51_QUARTD_GPIO), |
89 | .irqflags = IRQF_TRIGGER_HIGH, | 85 | .irqflags = IRQF_TRIGGER_HIGH, |
90 | .uartclk = CPUIMX51_QUART_XTAL, | 86 | .uartclk = CPUIMX51_QUART_XTAL, |
91 | .regshift = CPUIMX51_QUART_REGSHIFT, | 87 | .regshift = CPUIMX51_QUART_REGSHIFT, |
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c index 3112d15feebc..07a38154da21 100644 --- a/arch/arm/mach-mx5/board-mx51_3ds.c +++ b/arch/arm/mach-mx5/board-mx51_3ds.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/spi/spi.h> | 15 | #include <linux/spi/spi.h> |
16 | #include <linux/gpio.h> | ||
16 | 17 | ||
17 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
18 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
@@ -26,7 +27,7 @@ | |||
26 | #include "devices-imx51.h" | 27 | #include "devices-imx51.h" |
27 | #include "devices.h" | 28 | #include "devices.h" |
28 | 29 | ||
29 | #define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTA + 6) | 30 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(1, 6)) |
30 | #define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28) | 31 | #define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28) |
31 | 32 | ||
32 | static iomux_v3_cfg_t mx51_3ds_pads[] = { | 33 | static iomux_v3_cfg_t mx51_3ds_pads[] = { |
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index 6021dd00ec75..e54e4bf61cfd 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | #define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7) | 37 | #define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7) |
38 | #define BABBAGE_USBH1_STP IMX_GPIO_NR(1, 27) | 38 | #define BABBAGE_USBH1_STP IMX_GPIO_NR(1, 27) |
39 | #define BABBAGE_PHY_RESET IMX_GPIO_NR(2, 5) | 39 | #define BABBAGE_USB_PHY_RESET IMX_GPIO_NR(2, 5) |
40 | #define BABBAGE_FEC_PHY_RESET IMX_GPIO_NR(2, 14) | 40 | #define BABBAGE_FEC_PHY_RESET IMX_GPIO_NR(2, 14) |
41 | #define BABBAGE_POWER_KEY IMX_GPIO_NR(2, 21) | 41 | #define BABBAGE_POWER_KEY IMX_GPIO_NR(2, 21) |
42 | #define BABBAGE_ECSPI1_CS0 IMX_GPIO_NR(4, 24) | 42 | #define BABBAGE_ECSPI1_CS0 IMX_GPIO_NR(4, 24) |
@@ -110,6 +110,9 @@ static iomux_v3_cfg_t mx51babbage_pads[] = { | |||
110 | /* USB HUB reset line*/ | 110 | /* USB HUB reset line*/ |
111 | MX51_PAD_GPIO1_7__GPIO1_7, | 111 | MX51_PAD_GPIO1_7__GPIO1_7, |
112 | 112 | ||
113 | /* USB PHY reset line */ | ||
114 | MX51_PAD_EIM_D21__GPIO2_5, | ||
115 | |||
113 | /* FEC */ | 116 | /* FEC */ |
114 | MX51_PAD_EIM_EB2__FEC_MDIO, | 117 | MX51_PAD_EIM_EB2__FEC_MDIO, |
115 | MX51_PAD_EIM_EB3__FEC_RDATA1, | 118 | MX51_PAD_EIM_EB3__FEC_RDATA1, |
@@ -169,34 +172,31 @@ static struct imxi2c_platform_data babbage_hsi2c_data = { | |||
169 | .bitrate = 400000, | 172 | .bitrate = 400000, |
170 | }; | 173 | }; |
171 | 174 | ||
175 | static struct gpio mx51_babbage_usbh1_gpios[] = { | ||
176 | { BABBAGE_USBH1_STP, GPIOF_OUT_INIT_LOW, "usbh1_stp" }, | ||
177 | { BABBAGE_USB_PHY_RESET, GPIOF_OUT_INIT_LOW, "usbh1_phy_reset" }, | ||
178 | }; | ||
179 | |||
172 | static int gpio_usbh1_active(void) | 180 | static int gpio_usbh1_active(void) |
173 | { | 181 | { |
174 | iomux_v3_cfg_t usbh1stp_gpio = MX51_PAD_USBH1_STP__GPIO1_27; | 182 | iomux_v3_cfg_t usbh1stp_gpio = MX51_PAD_USBH1_STP__GPIO1_27; |
175 | iomux_v3_cfg_t phyreset_gpio = MX51_PAD_EIM_D21__GPIO2_5; | ||
176 | int ret; | 183 | int ret; |
177 | 184 | ||
178 | /* Set USBH1_STP to GPIO and toggle it */ | 185 | /* Set USBH1_STP to GPIO and toggle it */ |
179 | mxc_iomux_v3_setup_pad(usbh1stp_gpio); | 186 | mxc_iomux_v3_setup_pad(usbh1stp_gpio); |
180 | ret = gpio_request(BABBAGE_USBH1_STP, "usbh1_stp"); | 187 | ret = gpio_request_array(mx51_babbage_usbh1_gpios, |
188 | ARRAY_SIZE(mx51_babbage_usbh1_gpios)); | ||
181 | 189 | ||
182 | if (ret) { | 190 | if (ret) { |
183 | pr_debug("failed to get MX51_PAD_USBH1_STP__GPIO_1_27: %d\n", ret); | 191 | pr_debug("failed to get USBH1 pins: %d\n", ret); |
184 | return ret; | 192 | return ret; |
185 | } | 193 | } |
186 | gpio_direction_output(BABBAGE_USBH1_STP, 0); | ||
187 | gpio_set_value(BABBAGE_USBH1_STP, 1); | ||
188 | msleep(100); | ||
189 | gpio_free(BABBAGE_USBH1_STP); | ||
190 | |||
191 | /* De-assert USB PHY RESETB */ | ||
192 | mxc_iomux_v3_setup_pad(phyreset_gpio); | ||
193 | ret = gpio_request(BABBAGE_PHY_RESET, "phy_reset"); | ||
194 | 194 | ||
195 | if (ret) { | 195 | msleep(100); |
196 | pr_debug("failed to get MX51_PAD_EIM_D21__GPIO_2_5: %d\n", ret); | 196 | gpio_set_value(BABBAGE_USBH1_STP, 1); |
197 | return ret; | 197 | gpio_set_value(BABBAGE_USB_PHY_RESET, 1); |
198 | } | 198 | gpio_free_array(mx51_babbage_usbh1_gpios, |
199 | gpio_direction_output(BABBAGE_PHY_RESET, 1); | 199 | ARRAY_SIZE(mx51_babbage_usbh1_gpios)); |
200 | return 0; | 200 | return 0; |
201 | } | 201 | } |
202 | 202 | ||
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c index 3be603b9075a..f70700dc0ec1 100644 --- a/arch/arm/mach-mx5/board-mx51_efikamx.c +++ b/arch/arm/mach-mx5/board-mx51_efikamx.c | |||
@@ -139,7 +139,7 @@ static void __init mx51_efikamx_board_id(void) | |||
139 | } | 139 | } |
140 | } | 140 | } |
141 | 141 | ||
142 | static struct gpio_led mx51_efikamx_leds[] = { | 142 | static struct gpio_led mx51_efikamx_leds[] __initdata = { |
143 | { | 143 | { |
144 | .name = "efikamx:green", | 144 | .name = "efikamx:green", |
145 | .default_trigger = "default-on", | 145 | .default_trigger = "default-on", |
@@ -157,19 +157,12 @@ static struct gpio_led mx51_efikamx_leds[] = { | |||
157 | }, | 157 | }, |
158 | }; | 158 | }; |
159 | 159 | ||
160 | static struct gpio_led_platform_data mx51_efikamx_leds_data = { | 160 | static const struct gpio_led_platform_data |
161 | mx51_efikamx_leds_data __initconst = { | ||
161 | .leds = mx51_efikamx_leds, | 162 | .leds = mx51_efikamx_leds, |
162 | .num_leds = ARRAY_SIZE(mx51_efikamx_leds), | 163 | .num_leds = ARRAY_SIZE(mx51_efikamx_leds), |
163 | }; | 164 | }; |
164 | 165 | ||
165 | static struct platform_device mx51_efikamx_leds_device = { | ||
166 | .name = "leds-gpio", | ||
167 | .id = -1, | ||
168 | .dev = { | ||
169 | .platform_data = &mx51_efikamx_leds_data, | ||
170 | }, | ||
171 | }; | ||
172 | |||
173 | static struct gpio_keys_button mx51_efikamx_powerkey[] = { | 166 | static struct gpio_keys_button mx51_efikamx_powerkey[] = { |
174 | { | 167 | { |
175 | .code = KEY_POWER, | 168 | .code = KEY_POWER, |
@@ -250,7 +243,7 @@ static void __init mx51_efikamx_init(void) | |||
250 | mx51_efikamx_leds[2].default_trigger = "mmc1"; | 243 | mx51_efikamx_leds[2].default_trigger = "mmc1"; |
251 | } | 244 | } |
252 | 245 | ||
253 | platform_device_register(&mx51_efikamx_leds_device); | 246 | gpio_led_register_device(-1, &mx51_efikamx_leds_data); |
254 | imx_add_gpio_keys(&mx51_efikamx_powerkey_data); | 247 | imx_add_gpio_keys(&mx51_efikamx_powerkey_data); |
255 | 248 | ||
256 | if (system_rev == 0x11) { | 249 | if (system_rev == 0x11) { |
diff --git a/arch/arm/mach-mx5/board-mx51_efikasb.c b/arch/arm/mach-mx5/board-mx51_efikasb.c index 4b2e522de0f8..2e4d9d32a87c 100644 --- a/arch/arm/mach-mx5/board-mx51_efikasb.c +++ b/arch/arm/mach-mx5/board-mx51_efikasb.c | |||
@@ -132,7 +132,7 @@ static void __init mx51_efikasb_usb(void) | |||
132 | mxc_register_device(&mxc_usbh2_device, &usbh2_config); | 132 | mxc_register_device(&mxc_usbh2_device, &usbh2_config); |
133 | } | 133 | } |
134 | 134 | ||
135 | static struct gpio_led mx51_efikasb_leds[] = { | 135 | static const struct gpio_led mx51_efikasb_leds[] __initconst = { |
136 | { | 136 | { |
137 | .name = "efikasb:green", | 137 | .name = "efikasb:green", |
138 | .default_trigger = "default-on", | 138 | .default_trigger = "default-on", |
@@ -146,19 +146,12 @@ static struct gpio_led mx51_efikasb_leds[] = { | |||
146 | }, | 146 | }, |
147 | }; | 147 | }; |
148 | 148 | ||
149 | static struct gpio_led_platform_data mx51_efikasb_leds_data = { | 149 | static const struct gpio_led_platform_data |
150 | mx51_efikasb_leds_data __initconst = { | ||
150 | .leds = mx51_efikasb_leds, | 151 | .leds = mx51_efikasb_leds, |
151 | .num_leds = ARRAY_SIZE(mx51_efikasb_leds), | 152 | .num_leds = ARRAY_SIZE(mx51_efikasb_leds), |
152 | }; | 153 | }; |
153 | 154 | ||
154 | static struct platform_device mx51_efikasb_leds_device = { | ||
155 | .name = "leds-gpio", | ||
156 | .id = -1, | ||
157 | .dev = { | ||
158 | .platform_data = &mx51_efikasb_leds_data, | ||
159 | }, | ||
160 | }; | ||
161 | |||
162 | static struct gpio_keys_button mx51_efikasb_keys[] = { | 155 | static struct gpio_keys_button mx51_efikasb_keys[] = { |
163 | { | 156 | { |
164 | .code = KEY_POWER, | 157 | .code = KEY_POWER, |
@@ -258,9 +251,8 @@ static void __init efikasb_board_init(void) | |||
258 | mx51_efikasb_usb(); | 251 | mx51_efikasb_usb(); |
259 | imx51_add_sdhci_esdhc_imx(1, NULL); | 252 | imx51_add_sdhci_esdhc_imx(1, NULL); |
260 | 253 | ||
261 | platform_device_register(&mx51_efikasb_leds_device); | 254 | gpio_led_register_device(-1, &mx51_efikasb_leds_data); |
262 | imx_add_gpio_keys(&mx51_efikasb_keys_data); | 255 | imx_add_gpio_keys(&mx51_efikasb_keys_data); |
263 | |||
264 | } | 256 | } |
265 | 257 | ||
266 | static void __init mx51_efikasb_timer_init(void) | 258 | static void __init mx51_efikasb_timer_init(void) |
diff --git a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c index 97292d20f1f3..bbf4564bd050 100644 --- a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c +++ b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c | |||
@@ -31,13 +31,12 @@ | |||
31 | #include "devices.h" | 31 | #include "devices.h" |
32 | 32 | ||
33 | #define MBIMX51_TSC2007_GPIO IMX_GPIO_NR(3, 30) | 33 | #define MBIMX51_TSC2007_GPIO IMX_GPIO_NR(3, 30) |
34 | #define MBIMX51_TSC2007_IRQ (MXC_INTERNAL_IRQS + MBIMX51_TSC2007_GPIO) | ||
35 | #define MBIMX51_LED0 IMX_GPIO_NR(3, 5) | 34 | #define MBIMX51_LED0 IMX_GPIO_NR(3, 5) |
36 | #define MBIMX51_LED1 IMX_GPIO_NR(3, 6) | 35 | #define MBIMX51_LED1 IMX_GPIO_NR(3, 6) |
37 | #define MBIMX51_LED2 IMX_GPIO_NR(3, 7) | 36 | #define MBIMX51_LED2 IMX_GPIO_NR(3, 7) |
38 | #define MBIMX51_LED3 IMX_GPIO_NR(3, 8) | 37 | #define MBIMX51_LED3 IMX_GPIO_NR(3, 8) |
39 | 38 | ||
40 | static struct gpio_led mbimx51_leds[] = { | 39 | static const struct gpio_led mbimx51_leds[] __initconst = { |
41 | { | 40 | { |
42 | .name = "led0", | 41 | .name = "led0", |
43 | .default_trigger = "heartbeat", | 42 | .default_trigger = "heartbeat", |
@@ -64,23 +63,11 @@ static struct gpio_led mbimx51_leds[] = { | |||
64 | }, | 63 | }, |
65 | }; | 64 | }; |
66 | 65 | ||
67 | static struct gpio_led_platform_data mbimx51_leds_info = { | 66 | static const struct gpio_led_platform_data mbimx51_leds_info __initconst = { |
68 | .leds = mbimx51_leds, | 67 | .leds = mbimx51_leds, |
69 | .num_leds = ARRAY_SIZE(mbimx51_leds), | 68 | .num_leds = ARRAY_SIZE(mbimx51_leds), |
70 | }; | 69 | }; |
71 | 70 | ||
72 | static struct platform_device mbimx51_leds_gpio = { | ||
73 | .name = "leds-gpio", | ||
74 | .id = -1, | ||
75 | .dev = { | ||
76 | .platform_data = &mbimx51_leds_info, | ||
77 | }, | ||
78 | }; | ||
79 | |||
80 | static struct platform_device *devices[] __initdata = { | ||
81 | &mbimx51_leds_gpio, | ||
82 | }; | ||
83 | |||
84 | static iomux_v3_cfg_t mbimx51_pads[] = { | 71 | static iomux_v3_cfg_t mbimx51_pads[] = { |
85 | /* UART2 */ | 72 | /* UART2 */ |
86 | MX51_PAD_UART2_RXD__UART2_RXD, | 73 | MX51_PAD_UART2_RXD__UART2_RXD, |
@@ -173,7 +160,7 @@ struct tsc2007_platform_data tsc2007_data = { | |||
173 | static struct i2c_board_info mbimx51_i2c_devices[] = { | 160 | static struct i2c_board_info mbimx51_i2c_devices[] = { |
174 | { | 161 | { |
175 | I2C_BOARD_INFO("tsc2007", 0x49), | 162 | I2C_BOARD_INFO("tsc2007", 0x49), |
176 | .irq = MBIMX51_TSC2007_IRQ, | 163 | .irq = gpio_to_irq(MBIMX51_TSC2007_GPIO), |
177 | .platform_data = &tsc2007_data, | 164 | .platform_data = &tsc2007_data, |
178 | }, { | 165 | }, { |
179 | I2C_BOARD_INFO("tlv320aic23", 0x1a), | 166 | I2C_BOARD_INFO("tlv320aic23", 0x1a), |
@@ -204,13 +191,14 @@ void __init eukrea_mbimx51_baseboard_init(void) | |||
204 | gpio_direction_output(MBIMX51_LED3, 1); | 191 | gpio_direction_output(MBIMX51_LED3, 1); |
205 | gpio_free(MBIMX51_LED3); | 192 | gpio_free(MBIMX51_LED3); |
206 | 193 | ||
207 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 194 | gpio_led_register_device(-1, &mbimx51_leds_info); |
208 | 195 | ||
209 | imx51_add_imx_keypad(&mbimx51_map_data); | 196 | imx51_add_imx_keypad(&mbimx51_map_data); |
210 | 197 | ||
211 | gpio_request(MBIMX51_TSC2007_GPIO, "tsc2007_irq"); | 198 | gpio_request(MBIMX51_TSC2007_GPIO, "tsc2007_irq"); |
212 | gpio_direction_input(MBIMX51_TSC2007_GPIO); | 199 | gpio_direction_input(MBIMX51_TSC2007_GPIO); |
213 | irq_set_irq_type(MBIMX51_TSC2007_IRQ, IRQF_TRIGGER_FALLING); | 200 | irq_set_irq_type(gpio_to_irq(MBIMX51_TSC2007_GPIO), |
201 | IRQF_TRIGGER_FALLING); | ||
214 | i2c_register_board_info(1, mbimx51_i2c_devices, | 202 | i2c_register_board_info(1, mbimx51_i2c_devices, |
215 | ARRAY_SIZE(mbimx51_i2c_devices)); | 203 | ARRAY_SIZE(mbimx51_i2c_devices)); |
216 | 204 | ||
diff --git a/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c index 31c871ec46a6..261923997643 100644 --- a/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c +++ b/arch/arm/mach-mx5/eukrea_mbimxsd-baseboard.c | |||
@@ -74,7 +74,7 @@ static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { | |||
74 | #define GPIO_LED1 IMX_GPIO_NR(3, 30) | 74 | #define GPIO_LED1 IMX_GPIO_NR(3, 30) |
75 | #define GPIO_SWITCH1 IMX_GPIO_NR(3, 31) | 75 | #define GPIO_SWITCH1 IMX_GPIO_NR(3, 31) |
76 | 76 | ||
77 | static struct gpio_led eukrea_mbimxsd_leds[] = { | 77 | static const struct gpio_led eukrea_mbimxsd_leds[] __initconst = { |
78 | { | 78 | { |
79 | .name = "led1", | 79 | .name = "led1", |
80 | .default_trigger = "heartbeat", | 80 | .default_trigger = "heartbeat", |
@@ -83,19 +83,12 @@ static struct gpio_led eukrea_mbimxsd_leds[] = { | |||
83 | }, | 83 | }, |
84 | }; | 84 | }; |
85 | 85 | ||
86 | static struct gpio_led_platform_data eukrea_mbimxsd_led_info = { | 86 | static const struct gpio_led_platform_data |
87 | eukrea_mbimxsd_led_info __initconst = { | ||
87 | .leds = eukrea_mbimxsd_leds, | 88 | .leds = eukrea_mbimxsd_leds, |
88 | .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds), | 89 | .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds), |
89 | }; | 90 | }; |
90 | 91 | ||
91 | static struct platform_device eukrea_mbimxsd_leds_gpio = { | ||
92 | .name = "leds-gpio", | ||
93 | .id = -1, | ||
94 | .dev = { | ||
95 | .platform_data = &eukrea_mbimxsd_led_info, | ||
96 | }, | ||
97 | }; | ||
98 | |||
99 | static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { | 92 | static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { |
100 | { | 93 | { |
101 | .gpio = GPIO_SWITCH1, | 94 | .gpio = GPIO_SWITCH1, |
@@ -112,10 +105,6 @@ static const struct gpio_keys_platform_data | |||
112 | .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons), | 105 | .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons), |
113 | }; | 106 | }; |
114 | 107 | ||
115 | static struct platform_device *platform_devices[] __initdata = { | ||
116 | &eukrea_mbimxsd_leds_gpio, | ||
117 | }; | ||
118 | |||
119 | static const struct imxuart_platform_data uart_pdata __initconst = { | 108 | static const struct imxuart_platform_data uart_pdata __initconst = { |
120 | .flags = IMXUART_HAVE_RTSCTS, | 109 | .flags = IMXUART_HAVE_RTSCTS, |
121 | }; | 110 | }; |
@@ -154,6 +143,6 @@ void __init eukrea_mbimxsd51_baseboard_init(void) | |||
154 | i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices, | 143 | i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices, |
155 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); | 144 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); |
156 | 145 | ||
157 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 146 | gpio_led_register_device(-1, &eukrea_mbimxsd_led_info); |
158 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); | 147 | imx_add_gpio_keys(&eukrea_mbimxsd_button_data); |
159 | } | 148 | } |
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index f114960622e0..162b0b0bc356 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig | |||
@@ -55,6 +55,7 @@ config MACH_MX28EVK | |||
55 | config MODULE_TX28 | 55 | config MODULE_TX28 |
56 | bool | 56 | bool |
57 | select SOC_IMX28 | 57 | select SOC_IMX28 |
58 | select LEDS_GPIO_REGISTER | ||
58 | select MXS_HAVE_AMBA_DUART | 59 | select MXS_HAVE_AMBA_DUART |
59 | select MXS_HAVE_PLATFORM_AUART | 60 | select MXS_HAVE_PLATFORM_AUART |
60 | select MXS_HAVE_PLATFORM_FEC | 61 | select MXS_HAVE_PLATFORM_FEC |
diff --git a/arch/arm/mach-mxs/mach-tx28.c b/arch/arm/mach-mxs/mach-tx28.c index 068e540efbb6..6766a12cca7f 100644 --- a/arch/arm/mach-mxs/mach-tx28.c +++ b/arch/arm/mach-mxs/mach-tx28.c | |||
@@ -109,7 +109,7 @@ static const iomux_cfg_t tx28_stk5v3_pads[] __initconst = { | |||
109 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), | 109 | (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL), |
110 | }; | 110 | }; |
111 | 111 | ||
112 | static struct gpio_led tx28_stk5v3_leds[] = { | 112 | static const struct gpio_led tx28_stk5v3_leds[] __initconst = { |
113 | { | 113 | { |
114 | .name = "GPIO-LED", | 114 | .name = "GPIO-LED", |
115 | .default_trigger = "heartbeat", | 115 | .default_trigger = "heartbeat", |
@@ -151,8 +151,7 @@ static void __init tx28_stk5v3_init(void) | |||
151 | /* spi via ssp will be added when available */ | 151 | /* spi via ssp will be added when available */ |
152 | spi_register_board_info(tx28_spi_board_info, | 152 | spi_register_board_info(tx28_spi_board_info, |
153 | ARRAY_SIZE(tx28_spi_board_info)); | 153 | ARRAY_SIZE(tx28_spi_board_info)); |
154 | mxs_add_platform_device("leds-gpio", 0, NULL, 0, | 154 | gpio_led_register_device(0, &tx28_stk5v3_led_data); |
155 | &tx28_stk5v3_led_data, sizeof(tx28_stk5v3_led_data)); | ||
156 | mx28_add_mxs_i2c(0); | 155 | mx28_add_mxs_i2c(0); |
157 | i2c_register_board_info(0, tx28_stk5v3_i2c_boardinfo, | 156 | i2c_register_board_info(0, tx28_stk5v3_i2c_boardinfo, |
158 | ARRAY_SIZE(tx28_stk5v3_i2c_boardinfo)); | 157 | ARRAY_SIZE(tx28_stk5v3_i2c_boardinfo)); |
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index f49ce85d2448..312ea6b0409d 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
@@ -138,7 +138,7 @@ void ams_delta_latch2_write(u16 mask, u16 value) | |||
138 | static void __init ams_delta_init_irq(void) | 138 | static void __init ams_delta_init_irq(void) |
139 | { | 139 | { |
140 | omap1_init_common_hw(); | 140 | omap1_init_common_hw(); |
141 | omap_init_irq(); | 141 | omap1_init_irq(); |
142 | } | 142 | } |
143 | 143 | ||
144 | static struct map_desc ams_delta_io_desc[] __initdata = { | 144 | static struct map_desc ams_delta_io_desc[] __initdata = { |
@@ -391,7 +391,7 @@ MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)") | |||
391 | .reserve = omap_reserve, | 391 | .reserve = omap_reserve, |
392 | .init_irq = ams_delta_init_irq, | 392 | .init_irq = ams_delta_init_irq, |
393 | .init_machine = ams_delta_init, | 393 | .init_machine = ams_delta_init, |
394 | .timer = &omap_timer, | 394 | .timer = &omap1_timer, |
395 | MACHINE_END | 395 | MACHINE_END |
396 | 396 | ||
397 | EXPORT_SYMBOL(ams_delta_latch1_write); | 397 | EXPORT_SYMBOL(ams_delta_latch1_write); |
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index 87f173d93557..a6b1bea50371 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c | |||
@@ -329,7 +329,7 @@ static void __init omap_fsample_init(void) | |||
329 | static void __init omap_fsample_init_irq(void) | 329 | static void __init omap_fsample_init_irq(void) |
330 | { | 330 | { |
331 | omap1_init_common_hw(); | 331 | omap1_init_common_hw(); |
332 | omap_init_irq(); | 332 | omap1_init_irq(); |
333 | } | 333 | } |
334 | 334 | ||
335 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ | 335 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ |
@@ -394,5 +394,5 @@ MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample") | |||
394 | .reserve = omap_reserve, | 394 | .reserve = omap_reserve, |
395 | .init_irq = omap_fsample_init_irq, | 395 | .init_irq = omap_fsample_init_irq, |
396 | .init_machine = omap_fsample_init, | 396 | .init_machine = omap_fsample_init, |
397 | .timer = &omap_timer, | 397 | .timer = &omap1_timer, |
398 | MACHINE_END | 398 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c index 23f4ab9e2651..04fc356c40fa 100644 --- a/arch/arm/mach-omap1/board-generic.c +++ b/arch/arm/mach-omap1/board-generic.c | |||
@@ -31,7 +31,7 @@ | |||
31 | static void __init omap_generic_init_irq(void) | 31 | static void __init omap_generic_init_irq(void) |
32 | { | 32 | { |
33 | omap1_init_common_hw(); | 33 | omap1_init_common_hw(); |
34 | omap_init_irq(); | 34 | omap1_init_irq(); |
35 | } | 35 | } |
36 | 36 | ||
37 | /* assume no Mini-AB port */ | 37 | /* assume no Mini-AB port */ |
@@ -99,5 +99,5 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710") | |||
99 | .reserve = omap_reserve, | 99 | .reserve = omap_reserve, |
100 | .init_irq = omap_generic_init_irq, | 100 | .init_irq = omap_generic_init_irq, |
101 | .init_machine = omap_generic_init, | 101 | .init_machine = omap_generic_init, |
102 | .timer = &omap_timer, | 102 | .timer = &omap1_timer, |
103 | MACHINE_END | 103 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index ba3bd09c4754..cb7fb1aa3dca 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -376,7 +376,7 @@ static struct i2c_board_info __initdata h2_i2c_board_info[] = { | |||
376 | static void __init h2_init_irq(void) | 376 | static void __init h2_init_irq(void) |
377 | { | 377 | { |
378 | omap1_init_common_hw(); | 378 | omap1_init_common_hw(); |
379 | omap_init_irq(); | 379 | omap1_init_irq(); |
380 | } | 380 | } |
381 | 381 | ||
382 | static struct omap_usb_config h2_usb_config __initdata = { | 382 | static struct omap_usb_config h2_usb_config __initdata = { |
@@ -466,5 +466,5 @@ MACHINE_START(OMAP_H2, "TI-H2") | |||
466 | .reserve = omap_reserve, | 466 | .reserve = omap_reserve, |
467 | .init_irq = h2_init_irq, | 467 | .init_irq = h2_init_irq, |
468 | .init_machine = h2_init, | 468 | .init_machine = h2_init, |
469 | .timer = &omap_timer, | 469 | .timer = &omap1_timer, |
470 | MACHINE_END | 470 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index ac48677672ee..31f34875ffad 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -439,7 +439,7 @@ static void __init h3_init(void) | |||
439 | static void __init h3_init_irq(void) | 439 | static void __init h3_init_irq(void) |
440 | { | 440 | { |
441 | omap1_init_common_hw(); | 441 | omap1_init_common_hw(); |
442 | omap_init_irq(); | 442 | omap1_init_irq(); |
443 | } | 443 | } |
444 | 444 | ||
445 | static void __init h3_map_io(void) | 445 | static void __init h3_map_io(void) |
@@ -454,5 +454,5 @@ MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") | |||
454 | .reserve = omap_reserve, | 454 | .reserve = omap_reserve, |
455 | .init_irq = h3_init_irq, | 455 | .init_irq = h3_init_irq, |
456 | .init_machine = h3_init, | 456 | .init_machine = h3_init, |
457 | .timer = &omap_timer, | 457 | .timer = &omap1_timer, |
458 | MACHINE_END | 458 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index ba05a51f9408..36e06ea7ec65 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c | |||
@@ -605,7 +605,7 @@ static void __init htcherald_init_irq(void) | |||
605 | { | 605 | { |
606 | printk(KERN_INFO "htcherald_init_irq.\n"); | 606 | printk(KERN_INFO "htcherald_init_irq.\n"); |
607 | omap1_init_common_hw(); | 607 | omap1_init_common_hw(); |
608 | omap_init_irq(); | 608 | omap1_init_irq(); |
609 | } | 609 | } |
610 | 610 | ||
611 | MACHINE_START(HERALD, "HTC Herald") | 611 | MACHINE_START(HERALD, "HTC Herald") |
@@ -616,5 +616,5 @@ MACHINE_START(HERALD, "HTC Herald") | |||
616 | .reserve = omap_reserve, | 616 | .reserve = omap_reserve, |
617 | .init_irq = htcherald_init_irq, | 617 | .init_irq = htcherald_init_irq, |
618 | .init_machine = htcherald_init, | 618 | .init_machine = htcherald_init, |
619 | .timer = &omap_timer, | 619 | .timer = &omap1_timer, |
620 | MACHINE_END | 620 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index 2d9b8cbd7a14..0b1ba462d388 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -292,7 +292,7 @@ static void __init innovator_init_smc91x(void) | |||
292 | static void __init innovator_init_irq(void) | 292 | static void __init innovator_init_irq(void) |
293 | { | 293 | { |
294 | omap1_init_common_hw(); | 294 | omap1_init_common_hw(); |
295 | omap_init_irq(); | 295 | omap1_init_irq(); |
296 | } | 296 | } |
297 | 297 | ||
298 | #ifdef CONFIG_ARCH_OMAP15XX | 298 | #ifdef CONFIG_ARCH_OMAP15XX |
@@ -464,5 +464,5 @@ MACHINE_START(OMAP_INNOVATOR, "TI-Innovator") | |||
464 | .reserve = omap_reserve, | 464 | .reserve = omap_reserve, |
465 | .init_irq = innovator_init_irq, | 465 | .init_irq = innovator_init_irq, |
466 | .init_machine = innovator_init, | 466 | .init_machine = innovator_init, |
467 | .timer = &omap_timer, | 467 | .timer = &omap1_timer, |
468 | MACHINE_END | 468 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index cfd084926146..5469ce247ffe 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c | |||
@@ -51,7 +51,7 @@ static void __init omap_nokia770_init_irq(void) | |||
51 | omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004); | 51 | omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004); |
52 | 52 | ||
53 | omap1_init_common_hw(); | 53 | omap1_init_common_hw(); |
54 | omap_init_irq(); | 54 | omap1_init_irq(); |
55 | } | 55 | } |
56 | 56 | ||
57 | static const unsigned int nokia770_keymap[] = { | 57 | static const unsigned int nokia770_keymap[] = { |
@@ -269,5 +269,5 @@ MACHINE_START(NOKIA770, "Nokia 770") | |||
269 | .reserve = omap_reserve, | 269 | .reserve = omap_reserve, |
270 | .init_irq = omap_nokia770_init_irq, | 270 | .init_irq = omap_nokia770_init_irq, |
271 | .init_machine = omap_nokia770_init, | 271 | .init_machine = omap_nokia770_init, |
272 | .timer = &omap_timer, | 272 | .timer = &omap1_timer, |
273 | MACHINE_END | 273 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index e68dfde1918e..b08a21380772 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c | |||
@@ -282,7 +282,7 @@ static void __init osk_init_cf(void) | |||
282 | static void __init osk_init_irq(void) | 282 | static void __init osk_init_irq(void) |
283 | { | 283 | { |
284 | omap1_init_common_hw(); | 284 | omap1_init_common_hw(); |
285 | omap_init_irq(); | 285 | omap1_init_irq(); |
286 | } | 286 | } |
287 | 287 | ||
288 | static struct omap_usb_config osk_usb_config __initdata = { | 288 | static struct omap_usb_config osk_usb_config __initdata = { |
@@ -588,5 +588,5 @@ MACHINE_START(OMAP_OSK, "TI-OSK") | |||
588 | .reserve = omap_reserve, | 588 | .reserve = omap_reserve, |
589 | .init_irq = osk_init_irq, | 589 | .init_irq = osk_init_irq, |
590 | .init_machine = osk_init, | 590 | .init_machine = osk_init, |
591 | .timer = &omap_timer, | 591 | .timer = &omap1_timer, |
592 | MACHINE_END | 592 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index c9d38f47845f..459cb6bfed55 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c | |||
@@ -62,7 +62,7 @@ | |||
62 | static void __init omap_palmte_init_irq(void) | 62 | static void __init omap_palmte_init_irq(void) |
63 | { | 63 | { |
64 | omap1_init_common_hw(); | 64 | omap1_init_common_hw(); |
65 | omap_init_irq(); | 65 | omap1_init_irq(); |
66 | } | 66 | } |
67 | 67 | ||
68 | static const unsigned int palmte_keymap[] = { | 68 | static const unsigned int palmte_keymap[] = { |
@@ -280,5 +280,5 @@ MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E") | |||
280 | .reserve = omap_reserve, | 280 | .reserve = omap_reserve, |
281 | .init_irq = omap_palmte_init_irq, | 281 | .init_irq = omap_palmte_init_irq, |
282 | .init_machine = omap_palmte_init, | 282 | .init_machine = omap_palmte_init, |
283 | .timer = &omap_timer, | 283 | .timer = &omap1_timer, |
284 | MACHINE_END | 284 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index f04f2d36e7d3..b214f45f646c 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c | |||
@@ -266,7 +266,7 @@ static struct spi_board_info __initdata palmtt_boardinfo[] = { | |||
266 | static void __init omap_palmtt_init_irq(void) | 266 | static void __init omap_palmtt_init_irq(void) |
267 | { | 267 | { |
268 | omap1_init_common_hw(); | 268 | omap1_init_common_hw(); |
269 | omap_init_irq(); | 269 | omap1_init_irq(); |
270 | } | 270 | } |
271 | 271 | ||
272 | static struct omap_usb_config palmtt_usb_config __initdata = { | 272 | static struct omap_usb_config palmtt_usb_config __initdata = { |
@@ -326,5 +326,5 @@ MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T") | |||
326 | .reserve = omap_reserve, | 326 | .reserve = omap_reserve, |
327 | .init_irq = omap_palmtt_init_irq, | 327 | .init_irq = omap_palmtt_init_irq, |
328 | .init_machine = omap_palmtt_init, | 328 | .init_machine = omap_palmtt_init, |
329 | .timer = &omap_timer, | 329 | .timer = &omap1_timer, |
330 | MACHINE_END | 330 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index 45f01d2c3a7a..9b0ea48d35fd 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c | |||
@@ -61,7 +61,7 @@ static void __init | |||
61 | omap_palmz71_init_irq(void) | 61 | omap_palmz71_init_irq(void) |
62 | { | 62 | { |
63 | omap1_init_common_hw(); | 63 | omap1_init_common_hw(); |
64 | omap_init_irq(); | 64 | omap1_init_irq(); |
65 | } | 65 | } |
66 | 66 | ||
67 | static const unsigned int palmz71_keymap[] = { | 67 | static const unsigned int palmz71_keymap[] = { |
@@ -346,5 +346,5 @@ MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71") | |||
346 | .reserve = omap_reserve, | 346 | .reserve = omap_reserve, |
347 | .init_irq = omap_palmz71_init_irq, | 347 | .init_irq = omap_palmz71_init_irq, |
348 | .init_machine = omap_palmz71_init, | 348 | .init_machine = omap_palmz71_init, |
349 | .timer = &omap_timer, | 349 | .timer = &omap1_timer, |
350 | MACHINE_END | 350 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index 3c8ee8489458..67acd4142639 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c | |||
@@ -297,7 +297,7 @@ static void __init omap_perseus2_init(void) | |||
297 | static void __init omap_perseus2_init_irq(void) | 297 | static void __init omap_perseus2_init_irq(void) |
298 | { | 298 | { |
299 | omap1_init_common_hw(); | 299 | omap1_init_common_hw(); |
300 | omap_init_irq(); | 300 | omap1_init_irq(); |
301 | } | 301 | } |
302 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ | 302 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ |
303 | static struct map_desc omap_perseus2_io_desc[] __initdata = { | 303 | static struct map_desc omap_perseus2_io_desc[] __initdata = { |
@@ -355,5 +355,5 @@ MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2") | |||
355 | .reserve = omap_reserve, | 355 | .reserve = omap_reserve, |
356 | .init_irq = omap_perseus2_init_irq, | 356 | .init_irq = omap_perseus2_init_irq, |
357 | .init_machine = omap_perseus2_init, | 357 | .init_machine = omap_perseus2_init, |
358 | .timer = &omap_timer, | 358 | .timer = &omap1_timer, |
359 | MACHINE_END | 359 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index 0ad781db4e66..9c3b7c52d9cf 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c | |||
@@ -411,7 +411,7 @@ static void __init omap_sx1_init(void) | |||
411 | static void __init omap_sx1_init_irq(void) | 411 | static void __init omap_sx1_init_irq(void) |
412 | { | 412 | { |
413 | omap1_init_common_hw(); | 413 | omap1_init_common_hw(); |
414 | omap_init_irq(); | 414 | omap1_init_irq(); |
415 | } | 415 | } |
416 | /*----------------------------------------*/ | 416 | /*----------------------------------------*/ |
417 | 417 | ||
@@ -426,5 +426,5 @@ MACHINE_START(SX1, "OMAP310 based Siemens SX1") | |||
426 | .reserve = omap_reserve, | 426 | .reserve = omap_reserve, |
427 | .init_irq = omap_sx1_init_irq, | 427 | .init_irq = omap_sx1_init_irq, |
428 | .init_machine = omap_sx1_init, | 428 | .init_machine = omap_sx1_init, |
429 | .timer = &omap_timer, | 429 | .timer = &omap1_timer, |
430 | MACHINE_END | 430 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index 65d24204937a..036edc0ee9b6 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c | |||
@@ -162,7 +162,7 @@ static struct omap_board_config_kernel voiceblue_config[] = { | |||
162 | static void __init voiceblue_init_irq(void) | 162 | static void __init voiceblue_init_irq(void) |
163 | { | 163 | { |
164 | omap1_init_common_hw(); | 164 | omap1_init_common_hw(); |
165 | omap_init_irq(); | 165 | omap1_init_irq(); |
166 | } | 166 | } |
167 | 167 | ||
168 | static void __init voiceblue_map_io(void) | 168 | static void __init voiceblue_map_io(void) |
@@ -306,5 +306,5 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") | |||
306 | .reserve = omap_reserve, | 306 | .reserve = omap_reserve, |
307 | .init_irq = voiceblue_init_irq, | 307 | .init_irq = voiceblue_init_irq, |
308 | .init_machine = voiceblue_init, | 308 | .init_machine = voiceblue_init, |
309 | .timer = &omap_timer, | 309 | .timer = &omap1_timer, |
310 | MACHINE_END | 310 | MACHINE_END |
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c index 5d3da7a63af3..e2b9c901ab67 100644 --- a/arch/arm/mach-omap1/irq.c +++ b/arch/arm/mach-omap1/irq.c | |||
@@ -175,7 +175,7 @@ static struct irq_chip omap_irq_chip = { | |||
175 | .irq_set_wake = omap_wake_irq, | 175 | .irq_set_wake = omap_wake_irq, |
176 | }; | 176 | }; |
177 | 177 | ||
178 | void __init omap_init_irq(void) | 178 | void __init omap1_init_irq(void) |
179 | { | 179 | { |
180 | int i, j; | 180 | int i, j; |
181 | 181 | ||
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c index d9af9811dedd..ab7395d84bc8 100644 --- a/arch/arm/mach-omap1/mcbsp.c +++ b/arch/arm/mach-omap1/mcbsp.c | |||
@@ -38,7 +38,7 @@ static void omap1_mcbsp_request(unsigned int id) | |||
38 | * On 1510, 1610 and 1710, McBSP1 and McBSP3 | 38 | * On 1510, 1610 and 1710, McBSP1 and McBSP3 |
39 | * are DSP public peripherals. | 39 | * are DSP public peripherals. |
40 | */ | 40 | */ |
41 | if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) { | 41 | if (id == 0 || id == 2) { |
42 | if (dsp_use++ == 0) { | 42 | if (dsp_use++ == 0) { |
43 | api_clk = clk_get(NULL, "api_ck"); | 43 | api_clk = clk_get(NULL, "api_ck"); |
44 | dsp_clk = clk_get(NULL, "dsp_ck"); | 44 | dsp_clk = clk_get(NULL, "dsp_ck"); |
@@ -59,7 +59,7 @@ static void omap1_mcbsp_request(unsigned int id) | |||
59 | 59 | ||
60 | static void omap1_mcbsp_free(unsigned int id) | 60 | static void omap1_mcbsp_free(unsigned int id) |
61 | { | 61 | { |
62 | if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) { | 62 | if (id == 0 || id == 2) { |
63 | if (--dsp_use == 0) { | 63 | if (--dsp_use == 0) { |
64 | if (!IS_ERR(api_clk)) { | 64 | if (!IS_ERR(api_clk)) { |
65 | clk_disable(api_clk); | 65 | clk_disable(api_clk); |
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index 03e1e1062ad4..a1837771e031 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c | |||
@@ -297,7 +297,7 @@ static inline int omap_32k_timer_usable(void) | |||
297 | * Timer initialization | 297 | * Timer initialization |
298 | * --------------------------------------------------------------------------- | 298 | * --------------------------------------------------------------------------- |
299 | */ | 299 | */ |
300 | static void __init omap_timer_init(void) | 300 | static void __init omap1_timer_init(void) |
301 | { | 301 | { |
302 | if (omap_32k_timer_usable()) { | 302 | if (omap_32k_timer_usable()) { |
303 | preferred_sched_clock_init(1); | 303 | preferred_sched_clock_init(1); |
@@ -307,6 +307,6 @@ static void __init omap_timer_init(void) | |||
307 | } | 307 | } |
308 | } | 308 | } |
309 | 309 | ||
310 | struct sys_timer omap_timer = { | 310 | struct sys_timer omap1_timer = { |
311 | .init = omap_timer_init, | 311 | .init = omap1_timer_init, |
312 | }; | 312 | }; |
diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c index 13d7b8f145bd..96604a50c4fe 100644 --- a/arch/arm/mach-omap1/timer32k.c +++ b/arch/arm/mach-omap1/timer32k.c | |||
@@ -183,10 +183,6 @@ static __init void omap_init_32k_timer(void) | |||
183 | bool __init omap_32k_timer_init(void) | 183 | bool __init omap_32k_timer_init(void) |
184 | { | 184 | { |
185 | omap_init_clocksource_32k(); | 185 | omap_init_clocksource_32k(); |
186 | |||
187 | #ifdef CONFIG_OMAP_DM_TIMER | ||
188 | omap_dm_timer_init(); | ||
189 | #endif | ||
190 | omap_init_32k_timer(); | 186 | omap_init_32k_timer(); |
191 | 187 | ||
192 | return true; | 188 | return true; |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index b14807794401..f34336560437 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o pm.o \ | 6 | obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \ |
7 | common.o gpio.o dma.o wd_timer.o | 7 | common.o gpio.o dma.o wd_timer.o |
8 | 8 | ||
9 | omap-2-3-common = irq.o sdrc.o | 9 | omap-2-3-common = irq.o sdrc.o |
@@ -145,9 +145,19 @@ obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o | |||
145 | obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o | 145 | obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o |
146 | 146 | ||
147 | # hwmod data | 147 | # hwmod data |
148 | obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2420_data.o | 148 | obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_ipblock_data.o \ |
149 | obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2430_data.o | 149 | omap_hwmod_2xxx_3xxx_ipblock_data.o \ |
150 | obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o | 150 | omap_hwmod_2xxx_interconnect_data.o \ |
151 | omap_hwmod_2xxx_3xxx_interconnect_data.o \ | ||
152 | omap_hwmod_2420_data.o | ||
153 | obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2xxx_ipblock_data.o \ | ||
154 | omap_hwmod_2xxx_3xxx_ipblock_data.o \ | ||
155 | omap_hwmod_2xxx_interconnect_data.o \ | ||
156 | omap_hwmod_2xxx_3xxx_interconnect_data.o \ | ||
157 | omap_hwmod_2430_data.o | ||
158 | obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_ipblock_data.o \ | ||
159 | omap_hwmod_2xxx_3xxx_interconnect_data.o \ | ||
160 | omap_hwmod_3xxx_data.o | ||
151 | obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o | 161 | obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o |
152 | 162 | ||
153 | # EMU peripherals | 163 | # EMU peripherals |
@@ -269,4 +279,4 @@ obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o | |||
269 | disp-$(CONFIG_OMAP2_DSS) := display.o | 279 | disp-$(CONFIG_OMAP2_DSS) := display.o |
270 | obj-y += $(disp-m) $(disp-y) | 280 | obj-y += $(disp-m) $(disp-y) |
271 | 281 | ||
272 | obj-y += common-board-devices.o | 282 | obj-y += common-board-devices.o twl-common.o |
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index 5de6eac0a725..2028464cf5b9 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c | |||
@@ -260,7 +260,7 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board") | |||
260 | .reserve = omap_reserve, | 260 | .reserve = omap_reserve, |
261 | .map_io = omap_2430sdp_map_io, | 261 | .map_io = omap_2430sdp_map_io, |
262 | .init_early = omap_2430sdp_init_early, | 262 | .init_early = omap_2430sdp_init_early, |
263 | .init_irq = omap_init_irq, | 263 | .init_irq = omap2_init_irq, |
264 | .init_machine = omap_2430sdp_init, | 264 | .init_machine = omap_2430sdp_init, |
265 | .timer = &omap_timer, | 265 | .timer = &omap2_timer, |
266 | MACHINE_END | 266 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index 5dac974be625..bd600cfb7f80 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -231,22 +231,6 @@ static void __init omap_3430sdp_init_early(void) | |||
231 | omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL); | 231 | omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL); |
232 | } | 232 | } |
233 | 233 | ||
234 | static int sdp3430_batt_table[] = { | ||
235 | /* 0 C*/ | ||
236 | 30800, 29500, 28300, 27100, | ||
237 | 26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900, | ||
238 | 17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100, | ||
239 | 11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310, | ||
240 | 8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830, | ||
241 | 5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170, | ||
242 | 4040, 3910, 3790, 3670, 3550 | ||
243 | }; | ||
244 | |||
245 | static struct twl4030_bci_platform_data sdp3430_bci_data = { | ||
246 | .battery_tmp_tbl = sdp3430_batt_table, | ||
247 | .tblsize = ARRAY_SIZE(sdp3430_batt_table), | ||
248 | }; | ||
249 | |||
250 | static struct omap2_hsmmc_info mmc[] = { | 234 | static struct omap2_hsmmc_info mmc[] = { |
251 | { | 235 | { |
252 | .mmc = 1, | 236 | .mmc = 1, |
@@ -292,14 +276,6 @@ static struct twl4030_gpio_platform_data sdp3430_gpio_data = { | |||
292 | .setup = sdp3430_twl_gpio_setup, | 276 | .setup = sdp3430_twl_gpio_setup, |
293 | }; | 277 | }; |
294 | 278 | ||
295 | static struct twl4030_usb_data sdp3430_usb_data = { | ||
296 | .usb_mode = T2_USB_MODE_ULPI, | ||
297 | }; | ||
298 | |||
299 | static struct twl4030_madc_platform_data sdp3430_madc_data = { | ||
300 | .irq_line = 1, | ||
301 | }; | ||
302 | |||
303 | /* regulator consumer mappings */ | 279 | /* regulator consumer mappings */ |
304 | 280 | ||
305 | /* ads7846 on SPI */ | 281 | /* ads7846 on SPI */ |
@@ -307,16 +283,6 @@ static struct regulator_consumer_supply sdp3430_vaux3_supplies[] = { | |||
307 | REGULATOR_SUPPLY("vcc", "spi1.0"), | 283 | REGULATOR_SUPPLY("vcc", "spi1.0"), |
308 | }; | 284 | }; |
309 | 285 | ||
310 | static struct regulator_consumer_supply sdp3430_vdda_dac_supplies[] = { | ||
311 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), | ||
312 | }; | ||
313 | |||
314 | /* VPLL2 for digital video outputs */ | ||
315 | static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = { | ||
316 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
317 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
318 | }; | ||
319 | |||
320 | static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = { | 286 | static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = { |
321 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), | 287 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
322 | }; | 288 | }; |
@@ -433,54 +399,10 @@ static struct regulator_init_data sdp3430_vsim = { | |||
433 | .consumer_supplies = sdp3430_vsim_supplies, | 399 | .consumer_supplies = sdp3430_vsim_supplies, |
434 | }; | 400 | }; |
435 | 401 | ||
436 | /* VDAC for DSS driving S-Video */ | ||
437 | static struct regulator_init_data sdp3430_vdac = { | ||
438 | .constraints = { | ||
439 | .min_uV = 1800000, | ||
440 | .max_uV = 1800000, | ||
441 | .apply_uV = true, | ||
442 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
443 | | REGULATOR_MODE_STANDBY, | ||
444 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
445 | | REGULATOR_CHANGE_STATUS, | ||
446 | }, | ||
447 | .num_consumer_supplies = ARRAY_SIZE(sdp3430_vdda_dac_supplies), | ||
448 | .consumer_supplies = sdp3430_vdda_dac_supplies, | ||
449 | }; | ||
450 | |||
451 | static struct regulator_init_data sdp3430_vpll2 = { | ||
452 | .constraints = { | ||
453 | .name = "VDVI", | ||
454 | .min_uV = 1800000, | ||
455 | .max_uV = 1800000, | ||
456 | .apply_uV = true, | ||
457 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
458 | | REGULATOR_MODE_STANDBY, | ||
459 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
460 | | REGULATOR_CHANGE_STATUS, | ||
461 | }, | ||
462 | .num_consumer_supplies = ARRAY_SIZE(sdp3430_vpll2_supplies), | ||
463 | .consumer_supplies = sdp3430_vpll2_supplies, | ||
464 | }; | ||
465 | |||
466 | static struct twl4030_codec_audio_data sdp3430_audio; | ||
467 | |||
468 | static struct twl4030_codec_data sdp3430_codec = { | ||
469 | .audio_mclk = 26000000, | ||
470 | .audio = &sdp3430_audio, | ||
471 | }; | ||
472 | |||
473 | static struct twl4030_platform_data sdp3430_twldata = { | 402 | static struct twl4030_platform_data sdp3430_twldata = { |
474 | .irq_base = TWL4030_IRQ_BASE, | ||
475 | .irq_end = TWL4030_IRQ_END, | ||
476 | |||
477 | /* platform_data for children goes here */ | 403 | /* platform_data for children goes here */ |
478 | .bci = &sdp3430_bci_data, | ||
479 | .gpio = &sdp3430_gpio_data, | 404 | .gpio = &sdp3430_gpio_data, |
480 | .madc = &sdp3430_madc_data, | ||
481 | .keypad = &sdp3430_kp_data, | 405 | .keypad = &sdp3430_kp_data, |
482 | .usb = &sdp3430_usb_data, | ||
483 | .codec = &sdp3430_codec, | ||
484 | 406 | ||
485 | .vaux1 = &sdp3430_vaux1, | 407 | .vaux1 = &sdp3430_vaux1, |
486 | .vaux2 = &sdp3430_vaux2, | 408 | .vaux2 = &sdp3430_vaux2, |
@@ -489,14 +411,21 @@ static struct twl4030_platform_data sdp3430_twldata = { | |||
489 | .vmmc1 = &sdp3430_vmmc1, | 411 | .vmmc1 = &sdp3430_vmmc1, |
490 | .vmmc2 = &sdp3430_vmmc2, | 412 | .vmmc2 = &sdp3430_vmmc2, |
491 | .vsim = &sdp3430_vsim, | 413 | .vsim = &sdp3430_vsim, |
492 | .vdac = &sdp3430_vdac, | ||
493 | .vpll2 = &sdp3430_vpll2, | ||
494 | }; | 414 | }; |
495 | 415 | ||
496 | static int __init omap3430_i2c_init(void) | 416 | static int __init omap3430_i2c_init(void) |
497 | { | 417 | { |
498 | /* i2c1 for PMIC only */ | 418 | /* i2c1 for PMIC only */ |
419 | omap3_pmic_get_config(&sdp3430_twldata, | ||
420 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI | | ||
421 | TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO, | ||
422 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
423 | sdp3430_twldata.vdac->constraints.apply_uV = true; | ||
424 | sdp3430_twldata.vpll2->constraints.apply_uV = true; | ||
425 | sdp3430_twldata.vpll2->constraints.name = "VDVI"; | ||
426 | |||
499 | omap3_pmic_init("twl4030", &sdp3430_twldata); | 427 | omap3_pmic_init("twl4030", &sdp3430_twldata); |
428 | |||
500 | /* i2c2 on camera connector (for sensor control) and optional isp1301 */ | 429 | /* i2c2 on camera connector (for sensor control) and optional isp1301 */ |
501 | omap_register_i2c_bus(2, 400, NULL, 0); | 430 | omap_register_i2c_bus(2, 400, NULL, 0); |
502 | /* i2c3 on display connector (for DVI, tfp410) */ | 431 | /* i2c3 on display connector (for DVI, tfp410) */ |
@@ -804,7 +733,7 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board") | |||
804 | .reserve = omap_reserve, | 733 | .reserve = omap_reserve, |
805 | .map_io = omap3_map_io, | 734 | .map_io = omap3_map_io, |
806 | .init_early = omap_3430sdp_init_early, | 735 | .init_early = omap_3430sdp_init_early, |
807 | .init_irq = omap_init_irq, | 736 | .init_irq = omap3_init_irq, |
808 | .init_machine = omap_3430sdp_init, | 737 | .init_machine = omap_3430sdp_init, |
809 | .timer = &omap_timer, | 738 | .timer = &omap3_timer, |
810 | MACHINE_END | 739 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c index a5933cc15caa..e4f37b57a0c4 100644 --- a/arch/arm/mach-omap2/board-3630sdp.c +++ b/arch/arm/mach-omap2/board-3630sdp.c | |||
@@ -219,7 +219,7 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board") | |||
219 | .reserve = omap_reserve, | 219 | .reserve = omap_reserve, |
220 | .map_io = omap3_map_io, | 220 | .map_io = omap3_map_io, |
221 | .init_early = omap_sdp_init_early, | 221 | .init_early = omap_sdp_init_early, |
222 | .init_irq = omap_init_irq, | 222 | .init_irq = omap3_init_irq, |
223 | .init_machine = omap_sdp_init, | 223 | .init_machine = omap_sdp_init, |
224 | .timer = &omap_timer, | 224 | .timer = &omap3_timer, |
225 | MACHINE_END | 225 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 63de2d396e2d..933b25bb10de 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -40,7 +40,6 @@ | |||
40 | 40 | ||
41 | #include "mux.h" | 41 | #include "mux.h" |
42 | #include "hsmmc.h" | 42 | #include "hsmmc.h" |
43 | #include "timer-gp.h" | ||
44 | #include "control.h" | 43 | #include "control.h" |
45 | #include "common-board-devices.h" | 44 | #include "common-board-devices.h" |
46 | 45 | ||
@@ -295,9 +294,6 @@ static void __init omap_4430sdp_init_early(void) | |||
295 | { | 294 | { |
296 | omap2_init_common_infrastructure(); | 295 | omap2_init_common_infrastructure(); |
297 | omap2_init_common_devices(NULL, NULL); | 296 | omap2_init_common_devices(NULL, NULL); |
298 | #ifdef CONFIG_OMAP_32K_TIMER | ||
299 | omap2_gp_clockevent_set_gptimer(1); | ||
300 | #endif | ||
301 | } | 297 | } |
302 | 298 | ||
303 | static struct omap_musb_board_data musb_board_data = { | 299 | static struct omap_musb_board_data musb_board_data = { |
@@ -306,14 +302,6 @@ static struct omap_musb_board_data musb_board_data = { | |||
306 | .power = 100, | 302 | .power = 100, |
307 | }; | 303 | }; |
308 | 304 | ||
309 | static struct twl4030_usb_data omap4_usbphy_data = { | ||
310 | .phy_init = omap4430_phy_init, | ||
311 | .phy_exit = omap4430_phy_exit, | ||
312 | .phy_power = omap4430_phy_power, | ||
313 | .phy_set_clock = omap4430_phy_set_clk, | ||
314 | .phy_suspend = omap4430_phy_suspend, | ||
315 | }; | ||
316 | |||
317 | static struct omap2_hsmmc_info mmc[] = { | 305 | static struct omap2_hsmmc_info mmc[] = { |
318 | { | 306 | { |
319 | .mmc = 2, | 307 | .mmc = 2, |
@@ -333,16 +321,7 @@ static struct omap2_hsmmc_info mmc[] = { | |||
333 | }; | 321 | }; |
334 | 322 | ||
335 | static struct regulator_consumer_supply sdp4430_vaux_supply[] = { | 323 | static struct regulator_consumer_supply sdp4430_vaux_supply[] = { |
336 | { | 324 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
337 | .supply = "vmmc", | ||
338 | .dev_name = "omap_hsmmc.1", | ||
339 | }, | ||
340 | }; | ||
341 | static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { | ||
342 | { | ||
343 | .supply = "vmmc", | ||
344 | .dev_name = "omap_hsmmc.0", | ||
345 | }, | ||
346 | }; | 325 | }; |
347 | 326 | ||
348 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) | 327 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) |
@@ -399,65 +378,10 @@ static struct regulator_init_data sdp4430_vaux1 = { | |||
399 | | REGULATOR_CHANGE_MODE | 378 | | REGULATOR_CHANGE_MODE |
400 | | REGULATOR_CHANGE_STATUS, | 379 | | REGULATOR_CHANGE_STATUS, |
401 | }, | 380 | }, |
402 | .num_consumer_supplies = 1, | 381 | .num_consumer_supplies = ARRAY_SIZE(sdp4430_vaux_supply), |
403 | .consumer_supplies = sdp4430_vaux_supply, | 382 | .consumer_supplies = sdp4430_vaux_supply, |
404 | }; | 383 | }; |
405 | 384 | ||
406 | static struct regulator_init_data sdp4430_vaux2 = { | ||
407 | .constraints = { | ||
408 | .min_uV = 1200000, | ||
409 | .max_uV = 2800000, | ||
410 | .apply_uV = true, | ||
411 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
412 | | REGULATOR_MODE_STANDBY, | ||
413 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
414 | | REGULATOR_CHANGE_MODE | ||
415 | | REGULATOR_CHANGE_STATUS, | ||
416 | }, | ||
417 | }; | ||
418 | |||
419 | static struct regulator_init_data sdp4430_vaux3 = { | ||
420 | .constraints = { | ||
421 | .min_uV = 1000000, | ||
422 | .max_uV = 3000000, | ||
423 | .apply_uV = true, | ||
424 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
425 | | REGULATOR_MODE_STANDBY, | ||
426 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
427 | | REGULATOR_CHANGE_MODE | ||
428 | | REGULATOR_CHANGE_STATUS, | ||
429 | }, | ||
430 | }; | ||
431 | |||
432 | /* VMMC1 for MMC1 card */ | ||
433 | static struct regulator_init_data sdp4430_vmmc = { | ||
434 | .constraints = { | ||
435 | .min_uV = 1200000, | ||
436 | .max_uV = 3000000, | ||
437 | .apply_uV = true, | ||
438 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
439 | | REGULATOR_MODE_STANDBY, | ||
440 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
441 | | REGULATOR_CHANGE_MODE | ||
442 | | REGULATOR_CHANGE_STATUS, | ||
443 | }, | ||
444 | .num_consumer_supplies = 1, | ||
445 | .consumer_supplies = sdp4430_vmmc_supply, | ||
446 | }; | ||
447 | |||
448 | static struct regulator_init_data sdp4430_vpp = { | ||
449 | .constraints = { | ||
450 | .min_uV = 1800000, | ||
451 | .max_uV = 2500000, | ||
452 | .apply_uV = true, | ||
453 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
454 | | REGULATOR_MODE_STANDBY, | ||
455 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
456 | | REGULATOR_CHANGE_MODE | ||
457 | | REGULATOR_CHANGE_STATUS, | ||
458 | }, | ||
459 | }; | ||
460 | |||
461 | static struct regulator_init_data sdp4430_vusim = { | 385 | static struct regulator_init_data sdp4430_vusim = { |
462 | .constraints = { | 386 | .constraints = { |
463 | .min_uV = 1200000, | 387 | .min_uV = 1200000, |
@@ -471,74 +395,10 @@ static struct regulator_init_data sdp4430_vusim = { | |||
471 | }, | 395 | }, |
472 | }; | 396 | }; |
473 | 397 | ||
474 | static struct regulator_init_data sdp4430_vana = { | ||
475 | .constraints = { | ||
476 | .min_uV = 2100000, | ||
477 | .max_uV = 2100000, | ||
478 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
479 | | REGULATOR_MODE_STANDBY, | ||
480 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
481 | | REGULATOR_CHANGE_STATUS, | ||
482 | }, | ||
483 | }; | ||
484 | |||
485 | static struct regulator_init_data sdp4430_vcxio = { | ||
486 | .constraints = { | ||
487 | .min_uV = 1800000, | ||
488 | .max_uV = 1800000, | ||
489 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
490 | | REGULATOR_MODE_STANDBY, | ||
491 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
492 | | REGULATOR_CHANGE_STATUS, | ||
493 | }, | ||
494 | }; | ||
495 | |||
496 | static struct regulator_init_data sdp4430_vdac = { | ||
497 | .constraints = { | ||
498 | .min_uV = 1800000, | ||
499 | .max_uV = 1800000, | ||
500 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
501 | | REGULATOR_MODE_STANDBY, | ||
502 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
503 | | REGULATOR_CHANGE_STATUS, | ||
504 | }, | ||
505 | }; | ||
506 | |||
507 | static struct regulator_init_data sdp4430_vusb = { | ||
508 | .constraints = { | ||
509 | .min_uV = 3300000, | ||
510 | .max_uV = 3300000, | ||
511 | .apply_uV = true, | ||
512 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
513 | | REGULATOR_MODE_STANDBY, | ||
514 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
515 | | REGULATOR_CHANGE_STATUS, | ||
516 | }, | ||
517 | }; | ||
518 | |||
519 | static struct regulator_init_data sdp4430_clk32kg = { | ||
520 | .constraints = { | ||
521 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
522 | }, | ||
523 | }; | ||
524 | |||
525 | static struct twl4030_platform_data sdp4430_twldata = { | 398 | static struct twl4030_platform_data sdp4430_twldata = { |
526 | .irq_base = TWL6030_IRQ_BASE, | ||
527 | .irq_end = TWL6030_IRQ_END, | ||
528 | |||
529 | /* Regulators */ | 399 | /* Regulators */ |
530 | .vmmc = &sdp4430_vmmc, | ||
531 | .vpp = &sdp4430_vpp, | ||
532 | .vusim = &sdp4430_vusim, | 400 | .vusim = &sdp4430_vusim, |
533 | .vana = &sdp4430_vana, | ||
534 | .vcxio = &sdp4430_vcxio, | ||
535 | .vdac = &sdp4430_vdac, | ||
536 | .vusb = &sdp4430_vusb, | ||
537 | .vaux1 = &sdp4430_vaux1, | 401 | .vaux1 = &sdp4430_vaux1, |
538 | .vaux2 = &sdp4430_vaux2, | ||
539 | .vaux3 = &sdp4430_vaux3, | ||
540 | .clk32kg = &sdp4430_clk32kg, | ||
541 | .usb = &omap4_usbphy_data | ||
542 | }; | 402 | }; |
543 | 403 | ||
544 | static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = { | 404 | static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = { |
@@ -556,6 +416,16 @@ static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = { | |||
556 | }; | 416 | }; |
557 | static int __init omap4_i2c_init(void) | 417 | static int __init omap4_i2c_init(void) |
558 | { | 418 | { |
419 | omap4_pmic_get_config(&sdp4430_twldata, TWL_COMMON_PDATA_USB, | ||
420 | TWL_COMMON_REGULATOR_VDAC | | ||
421 | TWL_COMMON_REGULATOR_VAUX2 | | ||
422 | TWL_COMMON_REGULATOR_VAUX3 | | ||
423 | TWL_COMMON_REGULATOR_VMMC | | ||
424 | TWL_COMMON_REGULATOR_VPP | | ||
425 | TWL_COMMON_REGULATOR_VANA | | ||
426 | TWL_COMMON_REGULATOR_VCXIO | | ||
427 | TWL_COMMON_REGULATOR_VUSB | | ||
428 | TWL_COMMON_REGULATOR_CLK32KG); | ||
559 | omap4_pmic_init("twl6030", &sdp4430_twldata); | 429 | omap4_pmic_init("twl6030", &sdp4430_twldata); |
560 | omap_register_i2c_bus(2, 400, NULL, 0); | 430 | omap_register_i2c_bus(2, 400, NULL, 0); |
561 | omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, | 431 | omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, |
@@ -773,5 +643,5 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") | |||
773 | .init_early = omap_4430sdp_init_early, | 643 | .init_early = omap_4430sdp_init_early, |
774 | .init_irq = gic_init_irq, | 644 | .init_irq = gic_init_irq, |
775 | .init_machine = omap_4430sdp_init, | 645 | .init_machine = omap_4430sdp_init, |
776 | .timer = &omap_timer, | 646 | .timer = &omap4_timer, |
777 | MACHINE_END | 647 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c index 5e438a77cd72..5f2b55ff04ff 100644 --- a/arch/arm/mach-omap2/board-am3517crane.c +++ b/arch/arm/mach-omap2/board-am3517crane.c | |||
@@ -104,7 +104,7 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD") | |||
104 | .reserve = omap_reserve, | 104 | .reserve = omap_reserve, |
105 | .map_io = omap3_map_io, | 105 | .map_io = omap3_map_io, |
106 | .init_early = am3517_crane_init_early, | 106 | .init_early = am3517_crane_init_early, |
107 | .init_irq = omap_init_irq, | 107 | .init_irq = omap3_init_irq, |
108 | .init_machine = am3517_crane_init, | 108 | .init_machine = am3517_crane_init, |
109 | .timer = &omap_timer, | 109 | .timer = &omap3_timer, |
110 | MACHINE_END | 110 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 63af4171c043..f3006c304150 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c | |||
@@ -494,7 +494,7 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") | |||
494 | .reserve = omap_reserve, | 494 | .reserve = omap_reserve, |
495 | .map_io = omap3_map_io, | 495 | .map_io = omap3_map_io, |
496 | .init_early = am3517_evm_init_early, | 496 | .init_early = am3517_evm_init_early, |
497 | .init_irq = omap_init_irq, | 497 | .init_irq = omap3_init_irq, |
498 | .init_machine = am3517_evm_init, | 498 | .init_machine = am3517_evm_init, |
499 | .timer = &omap_timer, | 499 | .timer = &omap3_timer, |
500 | MACHINE_END | 500 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index b124bdfb4239..70211703ff9f 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c | |||
@@ -354,7 +354,7 @@ MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon") | |||
354 | .reserve = omap_reserve, | 354 | .reserve = omap_reserve, |
355 | .map_io = omap_apollon_map_io, | 355 | .map_io = omap_apollon_map_io, |
356 | .init_early = omap_apollon_init_early, | 356 | .init_early = omap_apollon_init_early, |
357 | .init_irq = omap_init_irq, | 357 | .init_irq = omap2_init_irq, |
358 | .init_machine = omap_apollon_init, | 358 | .init_machine = omap_apollon_init, |
359 | .timer = &omap_timer, | 359 | .timer = &omap2_timer, |
360 | MACHINE_END | 360 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index 77456dec93ea..35891d49c631 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -162,9 +162,7 @@ static struct mtd_partition cm_t35_nand_partitions[] = { | |||
162 | static struct omap_nand_platform_data cm_t35_nand_data = { | 162 | static struct omap_nand_platform_data cm_t35_nand_data = { |
163 | .parts = cm_t35_nand_partitions, | 163 | .parts = cm_t35_nand_partitions, |
164 | .nr_parts = ARRAY_SIZE(cm_t35_nand_partitions), | 164 | .nr_parts = ARRAY_SIZE(cm_t35_nand_partitions), |
165 | .dma_channel = -1, /* disable DMA in OMAP NAND driver */ | ||
166 | .cs = 0, | 165 | .cs = 0, |
167 | |||
168 | }; | 166 | }; |
169 | 167 | ||
170 | static void __init cm_t35_init_nand(void) | 168 | static void __init cm_t35_init_nand(void) |
@@ -337,19 +335,17 @@ static void __init cm_t35_init_display(void) | |||
337 | } | 335 | } |
338 | } | 336 | } |
339 | 337 | ||
340 | static struct regulator_consumer_supply cm_t35_vmmc1_supply = { | 338 | static struct regulator_consumer_supply cm_t35_vmmc1_supply[] = { |
341 | .supply = "vmmc", | 339 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
342 | }; | 340 | }; |
343 | 341 | ||
344 | static struct regulator_consumer_supply cm_t35_vsim_supply = { | 342 | static struct regulator_consumer_supply cm_t35_vsim_supply[] = { |
345 | .supply = "vmmc_aux", | 343 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), |
346 | }; | 344 | }; |
347 | 345 | ||
348 | static struct regulator_consumer_supply cm_t35_vdac_supply = | 346 | static struct regulator_consumer_supply cm_t35_vdvi_supply[] = { |
349 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); | 347 | REGULATOR_SUPPLY("vdvi", "omapdss"), |
350 | 348 | }; | |
351 | static struct regulator_consumer_supply cm_t35_vdvi_supply = | ||
352 | REGULATOR_SUPPLY("vdvi", "omapdss"); | ||
353 | 349 | ||
354 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | 350 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
355 | static struct regulator_init_data cm_t35_vmmc1 = { | 351 | static struct regulator_init_data cm_t35_vmmc1 = { |
@@ -362,8 +358,8 @@ static struct regulator_init_data cm_t35_vmmc1 = { | |||
362 | | REGULATOR_CHANGE_MODE | 358 | | REGULATOR_CHANGE_MODE |
363 | | REGULATOR_CHANGE_STATUS, | 359 | | REGULATOR_CHANGE_STATUS, |
364 | }, | 360 | }, |
365 | .num_consumer_supplies = 1, | 361 | .num_consumer_supplies = ARRAY_SIZE(cm_t35_vmmc1_supply), |
366 | .consumer_supplies = &cm_t35_vmmc1_supply, | 362 | .consumer_supplies = cm_t35_vmmc1_supply, |
367 | }; | 363 | }; |
368 | 364 | ||
369 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ | 365 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ |
@@ -377,41 +373,8 @@ static struct regulator_init_data cm_t35_vsim = { | |||
377 | | REGULATOR_CHANGE_MODE | 373 | | REGULATOR_CHANGE_MODE |
378 | | REGULATOR_CHANGE_STATUS, | 374 | | REGULATOR_CHANGE_STATUS, |
379 | }, | 375 | }, |
380 | .num_consumer_supplies = 1, | 376 | .num_consumer_supplies = ARRAY_SIZE(cm_t35_vsim_supply), |
381 | .consumer_supplies = &cm_t35_vsim_supply, | 377 | .consumer_supplies = cm_t35_vsim_supply, |
382 | }; | ||
383 | |||
384 | /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ | ||
385 | static struct regulator_init_data cm_t35_vdac = { | ||
386 | .constraints = { | ||
387 | .min_uV = 1800000, | ||
388 | .max_uV = 1800000, | ||
389 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
390 | | REGULATOR_MODE_STANDBY, | ||
391 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
392 | | REGULATOR_CHANGE_STATUS, | ||
393 | }, | ||
394 | .num_consumer_supplies = 1, | ||
395 | .consumer_supplies = &cm_t35_vdac_supply, | ||
396 | }; | ||
397 | |||
398 | /* VPLL2 for digital video outputs */ | ||
399 | static struct regulator_init_data cm_t35_vpll2 = { | ||
400 | .constraints = { | ||
401 | .name = "VDVI", | ||
402 | .min_uV = 1800000, | ||
403 | .max_uV = 1800000, | ||
404 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
405 | | REGULATOR_MODE_STANDBY, | ||
406 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
407 | | REGULATOR_CHANGE_STATUS, | ||
408 | }, | ||
409 | .num_consumer_supplies = 1, | ||
410 | .consumer_supplies = &cm_t35_vdvi_supply, | ||
411 | }; | ||
412 | |||
413 | static struct twl4030_usb_data cm_t35_usb_data = { | ||
414 | .usb_mode = T2_USB_MODE_ULPI, | ||
415 | }; | 378 | }; |
416 | 379 | ||
417 | static uint32_t cm_t35_keymap[] = { | 380 | static uint32_t cm_t35_keymap[] = { |
@@ -481,10 +444,6 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio, | |||
481 | mmc[0].gpio_cd = gpio + 0; | 444 | mmc[0].gpio_cd = gpio + 0; |
482 | omap2_hsmmc_init(mmc); | 445 | omap2_hsmmc_init(mmc); |
483 | 446 | ||
484 | /* link regulators to MMC adapters */ | ||
485 | cm_t35_vmmc1_supply.dev = mmc[0].dev; | ||
486 | cm_t35_vsim_supply.dev = mmc[0].dev; | ||
487 | |||
488 | return 0; | 447 | return 0; |
489 | } | 448 | } |
490 | 449 | ||
@@ -496,21 +455,23 @@ static struct twl4030_gpio_platform_data cm_t35_gpio_data = { | |||
496 | }; | 455 | }; |
497 | 456 | ||
498 | static struct twl4030_platform_data cm_t35_twldata = { | 457 | static struct twl4030_platform_data cm_t35_twldata = { |
499 | .irq_base = TWL4030_IRQ_BASE, | ||
500 | .irq_end = TWL4030_IRQ_END, | ||
501 | |||
502 | /* platform_data for children goes here */ | 458 | /* platform_data for children goes here */ |
503 | .keypad = &cm_t35_kp_data, | 459 | .keypad = &cm_t35_kp_data, |
504 | .usb = &cm_t35_usb_data, | ||
505 | .gpio = &cm_t35_gpio_data, | 460 | .gpio = &cm_t35_gpio_data, |
506 | .vmmc1 = &cm_t35_vmmc1, | 461 | .vmmc1 = &cm_t35_vmmc1, |
507 | .vsim = &cm_t35_vsim, | 462 | .vsim = &cm_t35_vsim, |
508 | .vdac = &cm_t35_vdac, | ||
509 | .vpll2 = &cm_t35_vpll2, | ||
510 | }; | 463 | }; |
511 | 464 | ||
512 | static void __init cm_t35_init_i2c(void) | 465 | static void __init cm_t35_init_i2c(void) |
513 | { | 466 | { |
467 | omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB, | ||
468 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
469 | |||
470 | cm_t35_twldata.vpll2->constraints.name = "VDVI"; | ||
471 | cm_t35_twldata.vpll2->num_consumer_supplies = | ||
472 | ARRAY_SIZE(cm_t35_vdvi_supply); | ||
473 | cm_t35_twldata.vpll2->consumer_supplies = cm_t35_vdvi_supply; | ||
474 | |||
514 | omap3_pmic_init("tps65930", &cm_t35_twldata); | 475 | omap3_pmic_init("tps65930", &cm_t35_twldata); |
515 | } | 476 | } |
516 | 477 | ||
@@ -646,7 +607,7 @@ MACHINE_START(CM_T35, "Compulab CM-T35") | |||
646 | .reserve = omap_reserve, | 607 | .reserve = omap_reserve, |
647 | .map_io = omap3_map_io, | 608 | .map_io = omap3_map_io, |
648 | .init_early = cm_t35_init_early, | 609 | .init_early = cm_t35_init_early, |
649 | .init_irq = omap_init_irq, | 610 | .init_irq = omap3_init_irq, |
650 | .init_machine = cm_t35_init, | 611 | .init_machine = cm_t35_init, |
651 | .timer = &omap_timer, | 612 | .timer = &omap3_timer, |
652 | MACHINE_END | 613 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c index c3a9fd35034a..05c72f4c1b57 100644 --- a/arch/arm/mach-omap2/board-cm-t3517.c +++ b/arch/arm/mach-omap2/board-cm-t3517.c | |||
@@ -236,7 +236,6 @@ static struct mtd_partition cm_t3517_nand_partitions[] = { | |||
236 | static struct omap_nand_platform_data cm_t3517_nand_data = { | 236 | static struct omap_nand_platform_data cm_t3517_nand_data = { |
237 | .parts = cm_t3517_nand_partitions, | 237 | .parts = cm_t3517_nand_partitions, |
238 | .nr_parts = ARRAY_SIZE(cm_t3517_nand_partitions), | 238 | .nr_parts = ARRAY_SIZE(cm_t3517_nand_partitions), |
239 | .dma_channel = -1, /* disable DMA in OMAP NAND driver */ | ||
240 | .cs = 0, | 239 | .cs = 0, |
241 | }; | 240 | }; |
242 | 241 | ||
@@ -304,7 +303,7 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517") | |||
304 | .reserve = omap_reserve, | 303 | .reserve = omap_reserve, |
305 | .map_io = omap3_map_io, | 304 | .map_io = omap3_map_io, |
306 | .init_early = cm_t3517_init_early, | 305 | .init_early = cm_t3517_init_early, |
307 | .init_irq = omap_init_irq, | 306 | .init_irq = omap3_init_irq, |
308 | .init_machine = cm_t3517_init, | 307 | .init_machine = cm_t3517_init, |
309 | .timer = &omap_timer, | 308 | .timer = &omap3_timer, |
310 | MACHINE_END | 309 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 34956ec83296..b6002ec31c6a 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c | |||
@@ -58,7 +58,6 @@ | |||
58 | 58 | ||
59 | #include "mux.h" | 59 | #include "mux.h" |
60 | #include "hsmmc.h" | 60 | #include "hsmmc.h" |
61 | #include "timer-gp.h" | ||
62 | #include "common-board-devices.h" | 61 | #include "common-board-devices.h" |
63 | 62 | ||
64 | #define OMAP_DM9000_GPIO_IRQ 25 | 63 | #define OMAP_DM9000_GPIO_IRQ 25 |
@@ -130,13 +129,14 @@ static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev) | |||
130 | gpio_set_value_cansleep(dssdev->reset_gpio, 0); | 129 | gpio_set_value_cansleep(dssdev->reset_gpio, 0); |
131 | } | 130 | } |
132 | 131 | ||
133 | static struct regulator_consumer_supply devkit8000_vmmc1_supply = | 132 | static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = { |
134 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); | 133 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
135 | 134 | }; | |
136 | 135 | ||
137 | /* ads7846 on SPI */ | 136 | /* ads7846 on SPI */ |
138 | static struct regulator_consumer_supply devkit8000_vio_supply = | 137 | static struct regulator_consumer_supply devkit8000_vio_supply[] = { |
139 | REGULATOR_SUPPLY("vcc", "spi2.0"); | 138 | REGULATOR_SUPPLY("vcc", "spi2.0"), |
139 | }; | ||
140 | 140 | ||
141 | static struct panel_generic_dpi_data lcd_panel = { | 141 | static struct panel_generic_dpi_data lcd_panel = { |
142 | .name = "generic", | 142 | .name = "generic", |
@@ -186,9 +186,6 @@ static struct omap_dss_board_info devkit8000_dss_data = { | |||
186 | .default_device = &devkit8000_lcd_device, | 186 | .default_device = &devkit8000_lcd_device, |
187 | }; | 187 | }; |
188 | 188 | ||
189 | static struct regulator_consumer_supply devkit8000_vdda_dac_supply = | ||
190 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); | ||
191 | |||
192 | static uint32_t board_keymap[] = { | 189 | static uint32_t board_keymap[] = { |
193 | KEY(0, 0, KEY_1), | 190 | KEY(0, 0, KEY_1), |
194 | KEY(1, 0, KEY_2), | 191 | KEY(1, 0, KEY_2), |
@@ -284,22 +281,8 @@ static struct regulator_init_data devkit8000_vmmc1 = { | |||
284 | | REGULATOR_CHANGE_MODE | 281 | | REGULATOR_CHANGE_MODE |
285 | | REGULATOR_CHANGE_STATUS, | 282 | | REGULATOR_CHANGE_STATUS, |
286 | }, | 283 | }, |
287 | .num_consumer_supplies = 1, | 284 | .num_consumer_supplies = ARRAY_SIZE(devkit8000_vmmc1_supply), |
288 | .consumer_supplies = &devkit8000_vmmc1_supply, | 285 | .consumer_supplies = devkit8000_vmmc1_supply, |
289 | }; | ||
290 | |||
291 | /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ | ||
292 | static struct regulator_init_data devkit8000_vdac = { | ||
293 | .constraints = { | ||
294 | .min_uV = 1800000, | ||
295 | .max_uV = 1800000, | ||
296 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
297 | | REGULATOR_MODE_STANDBY, | ||
298 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
299 | | REGULATOR_CHANGE_STATUS, | ||
300 | }, | ||
301 | .num_consumer_supplies = 1, | ||
302 | .consumer_supplies = &devkit8000_vdda_dac_supply, | ||
303 | }; | 286 | }; |
304 | 287 | ||
305 | /* VPLL1 for digital video outputs */ | 288 | /* VPLL1 for digital video outputs */ |
@@ -327,31 +310,14 @@ static struct regulator_init_data devkit8000_vio = { | |||
327 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 310 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
328 | | REGULATOR_CHANGE_STATUS, | 311 | | REGULATOR_CHANGE_STATUS, |
329 | }, | 312 | }, |
330 | .num_consumer_supplies = 1, | 313 | .num_consumer_supplies = ARRAY_SIZE(devkit8000_vio_supply), |
331 | .consumer_supplies = &devkit8000_vio_supply, | 314 | .consumer_supplies = devkit8000_vio_supply, |
332 | }; | ||
333 | |||
334 | static struct twl4030_usb_data devkit8000_usb_data = { | ||
335 | .usb_mode = T2_USB_MODE_ULPI, | ||
336 | }; | ||
337 | |||
338 | static struct twl4030_codec_audio_data devkit8000_audio_data; | ||
339 | |||
340 | static struct twl4030_codec_data devkit8000_codec_data = { | ||
341 | .audio_mclk = 26000000, | ||
342 | .audio = &devkit8000_audio_data, | ||
343 | }; | 315 | }; |
344 | 316 | ||
345 | static struct twl4030_platform_data devkit8000_twldata = { | 317 | static struct twl4030_platform_data devkit8000_twldata = { |
346 | .irq_base = TWL4030_IRQ_BASE, | ||
347 | .irq_end = TWL4030_IRQ_END, | ||
348 | |||
349 | /* platform_data for children goes here */ | 318 | /* platform_data for children goes here */ |
350 | .usb = &devkit8000_usb_data, | ||
351 | .gpio = &devkit8000_gpio_data, | 319 | .gpio = &devkit8000_gpio_data, |
352 | .codec = &devkit8000_codec_data, | ||
353 | .vmmc1 = &devkit8000_vmmc1, | 320 | .vmmc1 = &devkit8000_vmmc1, |
354 | .vdac = &devkit8000_vdac, | ||
355 | .vpll1 = &devkit8000_vpll1, | 321 | .vpll1 = &devkit8000_vpll1, |
356 | .vio = &devkit8000_vio, | 322 | .vio = &devkit8000_vio, |
357 | .keypad = &devkit8000_kp_data, | 323 | .keypad = &devkit8000_kp_data, |
@@ -359,6 +325,9 @@ static struct twl4030_platform_data devkit8000_twldata = { | |||
359 | 325 | ||
360 | static int __init devkit8000_i2c_init(void) | 326 | static int __init devkit8000_i2c_init(void) |
361 | { | 327 | { |
328 | omap3_pmic_get_config(&devkit8000_twldata, | ||
329 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, | ||
330 | TWL_COMMON_REGULATOR_VDAC); | ||
362 | omap3_pmic_init("tps65930", &devkit8000_twldata); | 331 | omap3_pmic_init("tps65930", &devkit8000_twldata); |
363 | /* Bus 3 is attached to the DVI port where devices like the pico DLP | 332 | /* Bus 3 is attached to the DVI port where devices like the pico DLP |
364 | * projector don't work reliably with 400kHz */ | 333 | * projector don't work reliably with 400kHz */ |
@@ -438,10 +407,7 @@ static void __init devkit8000_init_early(void) | |||
438 | 407 | ||
439 | static void __init devkit8000_init_irq(void) | 408 | static void __init devkit8000_init_irq(void) |
440 | { | 409 | { |
441 | omap_init_irq(); | 410 | omap3_init_irq(); |
442 | #ifdef CONFIG_OMAP_32K_TIMER | ||
443 | omap2_gp_clockevent_set_gptimer(12); | ||
444 | #endif | ||
445 | } | 411 | } |
446 | 412 | ||
447 | #define OMAP_DM9000_BASE 0x2c000000 | 413 | #define OMAP_DM9000_BASE 0x2c000000 |
@@ -707,5 +673,5 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000") | |||
707 | .init_early = devkit8000_init_early, | 673 | .init_early = devkit8000_init_early, |
708 | .init_irq = devkit8000_init_irq, | 674 | .init_irq = devkit8000_init_irq, |
709 | .init_machine = devkit8000_init, | 675 | .init_machine = devkit8000_init, |
710 | .timer = &omap_timer, | 676 | .timer = &omap3_secure_timer, |
711 | MACHINE_END | 677 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c index 729892fdcf2e..aa1b0cbe19d2 100644 --- a/arch/arm/mach-omap2/board-flash.c +++ b/arch/arm/mach-omap2/board-flash.c | |||
@@ -132,11 +132,7 @@ static struct gpmc_timings nand_timings = { | |||
132 | }; | 132 | }; |
133 | 133 | ||
134 | static struct omap_nand_platform_data board_nand_data = { | 134 | static struct omap_nand_platform_data board_nand_data = { |
135 | .nand_setup = NULL, | ||
136 | .gpmc_t = &nand_timings, | 135 | .gpmc_t = &nand_timings, |
137 | .dma_channel = -1, /* disable DMA in OMAP NAND driver */ | ||
138 | .dev_ready = NULL, | ||
139 | .devsize = 0, /* '0' for 8-bit, '1' for 16-bit device */ | ||
140 | }; | 136 | }; |
141 | 137 | ||
142 | void | 138 | void |
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 73e3c31e8508..54db41a84a9b 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -70,7 +70,7 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx") | |||
70 | .reserve = omap_reserve, | 70 | .reserve = omap_reserve, |
71 | .map_io = omap_generic_map_io, | 71 | .map_io = omap_generic_map_io, |
72 | .init_early = omap_generic_init_early, | 72 | .init_early = omap_generic_init_early, |
73 | .init_irq = omap_init_irq, | 73 | .init_irq = omap2_init_irq, |
74 | .init_machine = omap_generic_init, | 74 | .init_machine = omap_generic_init, |
75 | .timer = &omap_timer, | 75 | .timer = &omap2_timer, |
76 | MACHINE_END | 76 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index bac7933b8cbb..45de2b319ec9 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
@@ -298,7 +298,7 @@ static void __init omap_h4_init_early(void) | |||
298 | 298 | ||
299 | static void __init omap_h4_init_irq(void) | 299 | static void __init omap_h4_init_irq(void) |
300 | { | 300 | { |
301 | omap_init_irq(); | 301 | omap2_init_irq(); |
302 | } | 302 | } |
303 | 303 | ||
304 | static struct at24_platform_data m24c01 = { | 304 | static struct at24_platform_data m24c01 = { |
@@ -388,5 +388,5 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board") | |||
388 | .init_early = omap_h4_init_early, | 388 | .init_early = omap_h4_init_early, |
389 | .init_irq = omap_h4_init_irq, | 389 | .init_irq = omap_h4_init_irq, |
390 | .init_machine = omap_h4_init, | 390 | .init_machine = omap_h4_init, |
391 | .timer = &omap_timer, | 391 | .timer = &omap2_timer, |
392 | MACHINE_END | 392 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 0c1bfca3f731..35be778caf1b 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -222,8 +222,9 @@ static inline void __init igep2_init_smsc911x(void) | |||
222 | static inline void __init igep2_init_smsc911x(void) { } | 222 | static inline void __init igep2_init_smsc911x(void) { } |
223 | #endif | 223 | #endif |
224 | 224 | ||
225 | static struct regulator_consumer_supply igep_vmmc1_supply = | 225 | static struct regulator_consumer_supply igep_vmmc1_supply[] = { |
226 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); | 226 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
227 | }; | ||
227 | 228 | ||
228 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ | 229 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ |
229 | static struct regulator_init_data igep_vmmc1 = { | 230 | static struct regulator_init_data igep_vmmc1 = { |
@@ -236,12 +237,13 @@ static struct regulator_init_data igep_vmmc1 = { | |||
236 | | REGULATOR_CHANGE_MODE | 237 | | REGULATOR_CHANGE_MODE |
237 | | REGULATOR_CHANGE_STATUS, | 238 | | REGULATOR_CHANGE_STATUS, |
238 | }, | 239 | }, |
239 | .num_consumer_supplies = 1, | 240 | .num_consumer_supplies = ARRAY_SIZE(igep_vmmc1_supply), |
240 | .consumer_supplies = &igep_vmmc1_supply, | 241 | .consumer_supplies = igep_vmmc1_supply, |
241 | }; | 242 | }; |
242 | 243 | ||
243 | static struct regulator_consumer_supply igep_vio_supply = | 244 | static struct regulator_consumer_supply igep_vio_supply[] = { |
244 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"); | 245 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"), |
246 | }; | ||
245 | 247 | ||
246 | static struct regulator_init_data igep_vio = { | 248 | static struct regulator_init_data igep_vio = { |
247 | .constraints = { | 249 | .constraints = { |
@@ -254,20 +256,21 @@ static struct regulator_init_data igep_vio = { | |||
254 | | REGULATOR_CHANGE_MODE | 256 | | REGULATOR_CHANGE_MODE |
255 | | REGULATOR_CHANGE_STATUS, | 257 | | REGULATOR_CHANGE_STATUS, |
256 | }, | 258 | }, |
257 | .num_consumer_supplies = 1, | 259 | .num_consumer_supplies = ARRAY_SIZE(igep_vio_supply), |
258 | .consumer_supplies = &igep_vio_supply, | 260 | .consumer_supplies = igep_vio_supply, |
259 | }; | 261 | }; |
260 | 262 | ||
261 | static struct regulator_consumer_supply igep_vmmc2_supply = | 263 | static struct regulator_consumer_supply igep_vmmc2_supply[] = { |
262 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); | 264 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
265 | }; | ||
263 | 266 | ||
264 | static struct regulator_init_data igep_vmmc2 = { | 267 | static struct regulator_init_data igep_vmmc2 = { |
265 | .constraints = { | 268 | .constraints = { |
266 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | 269 | .valid_modes_mask = REGULATOR_MODE_NORMAL, |
267 | .always_on = 1, | 270 | .always_on = 1, |
268 | }, | 271 | }, |
269 | .num_consumer_supplies = 1, | 272 | .num_consumer_supplies = ARRAY_SIZE(igep_vmmc2_supply), |
270 | .consumer_supplies = &igep_vmmc2_supply, | 273 | .consumer_supplies = igep_vmmc2_supply, |
271 | }; | 274 | }; |
272 | 275 | ||
273 | static struct fixed_voltage_config igep_vwlan = { | 276 | static struct fixed_voltage_config igep_vwlan = { |
@@ -440,10 +443,6 @@ static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = { | |||
440 | .setup = igep_twl_gpio_setup, | 443 | .setup = igep_twl_gpio_setup, |
441 | }; | 444 | }; |
442 | 445 | ||
443 | static struct twl4030_usb_data igep_usb_data = { | ||
444 | .usb_mode = T2_USB_MODE_ULPI, | ||
445 | }; | ||
446 | |||
447 | static int igep2_enable_dvi(struct omap_dss_device *dssdev) | 446 | static int igep2_enable_dvi(struct omap_dss_device *dssdev) |
448 | { | 447 | { |
449 | gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1); | 448 | gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1); |
@@ -480,26 +479,6 @@ static struct omap_dss_board_info igep2_dss_data = { | |||
480 | .default_device = &igep2_dvi_device, | 479 | .default_device = &igep2_dvi_device, |
481 | }; | 480 | }; |
482 | 481 | ||
483 | static struct regulator_consumer_supply igep2_vpll2_supplies[] = { | ||
484 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
485 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
486 | }; | ||
487 | |||
488 | static struct regulator_init_data igep2_vpll2 = { | ||
489 | .constraints = { | ||
490 | .name = "VDVI", | ||
491 | .min_uV = 1800000, | ||
492 | .max_uV = 1800000, | ||
493 | .apply_uV = true, | ||
494 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
495 | | REGULATOR_MODE_STANDBY, | ||
496 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
497 | | REGULATOR_CHANGE_STATUS, | ||
498 | }, | ||
499 | .num_consumer_supplies = ARRAY_SIZE(igep2_vpll2_supplies), | ||
500 | .consumer_supplies = igep2_vpll2_supplies, | ||
501 | }; | ||
502 | |||
503 | static void __init igep2_display_init(void) | 482 | static void __init igep2_display_init(void) |
504 | { | 483 | { |
505 | int err = gpio_request_one(IGEP2_GPIO_DVI_PUP, GPIOF_OUT_INIT_HIGH, | 484 | int err = gpio_request_one(IGEP2_GPIO_DVI_PUP, GPIOF_OUT_INIT_HIGH, |
@@ -519,13 +498,6 @@ static void __init igep_init_early(void) | |||
519 | m65kxxxxam_sdrc_params); | 498 | m65kxxxxam_sdrc_params); |
520 | } | 499 | } |
521 | 500 | ||
522 | static struct twl4030_codec_audio_data igep2_audio_data; | ||
523 | |||
524 | static struct twl4030_codec_data igep2_codec_data = { | ||
525 | .audio_mclk = 26000000, | ||
526 | .audio = &igep2_audio_data, | ||
527 | }; | ||
528 | |||
529 | static int igep2_keymap[] = { | 501 | static int igep2_keymap[] = { |
530 | KEY(0, 0, KEY_LEFT), | 502 | KEY(0, 0, KEY_LEFT), |
531 | KEY(0, 1, KEY_RIGHT), | 503 | KEY(0, 1, KEY_RIGHT), |
@@ -558,11 +530,7 @@ static struct twl4030_keypad_data igep2_keypad_pdata = { | |||
558 | }; | 530 | }; |
559 | 531 | ||
560 | static struct twl4030_platform_data igep_twldata = { | 532 | static struct twl4030_platform_data igep_twldata = { |
561 | .irq_base = TWL4030_IRQ_BASE, | ||
562 | .irq_end = TWL4030_IRQ_END, | ||
563 | |||
564 | /* platform_data for children goes here */ | 533 | /* platform_data for children goes here */ |
565 | .usb = &igep_usb_data, | ||
566 | .gpio = &igep_twl4030_gpio_pdata, | 534 | .gpio = &igep_twl4030_gpio_pdata, |
567 | .vmmc1 = &igep_vmmc1, | 535 | .vmmc1 = &igep_vmmc1, |
568 | .vio = &igep_vio, | 536 | .vio = &igep_vio, |
@@ -578,6 +546,8 @@ static void __init igep_i2c_init(void) | |||
578 | { | 546 | { |
579 | int ret; | 547 | int ret; |
580 | 548 | ||
549 | omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_USB, 0); | ||
550 | |||
581 | if (machine_is_igep0020()) { | 551 | if (machine_is_igep0020()) { |
582 | /* | 552 | /* |
583 | * Bus 3 is attached to the DVI port where devices like the | 553 | * Bus 3 is attached to the DVI port where devices like the |
@@ -588,9 +558,12 @@ static void __init igep_i2c_init(void) | |||
588 | if (ret) | 558 | if (ret) |
589 | pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret); | 559 | pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret); |
590 | 560 | ||
591 | igep_twldata.codec = &igep2_codec_data; | ||
592 | igep_twldata.keypad = &igep2_keypad_pdata; | 561 | igep_twldata.keypad = &igep2_keypad_pdata; |
593 | igep_twldata.vpll2 = &igep2_vpll2; | 562 | /* Get common pmic data */ |
563 | omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_AUDIO, | ||
564 | TWL_COMMON_REGULATOR_VPLL2); | ||
565 | igep_twldata.vpll2->constraints.apply_uV = true; | ||
566 | igep_twldata.vpll2->constraints.name = "VDVI"; | ||
594 | } | 567 | } |
595 | 568 | ||
596 | omap3_pmic_init("twl4030", &igep_twldata); | 569 | omap3_pmic_init("twl4030", &igep_twldata); |
@@ -703,9 +676,9 @@ MACHINE_START(IGEP0020, "IGEP v2 board") | |||
703 | .reserve = omap_reserve, | 676 | .reserve = omap_reserve, |
704 | .map_io = omap3_map_io, | 677 | .map_io = omap3_map_io, |
705 | .init_early = igep_init_early, | 678 | .init_early = igep_init_early, |
706 | .init_irq = omap_init_irq, | 679 | .init_irq = omap3_init_irq, |
707 | .init_machine = igep_init, | 680 | .init_machine = igep_init, |
708 | .timer = &omap_timer, | 681 | .timer = &omap3_timer, |
709 | MACHINE_END | 682 | MACHINE_END |
710 | 683 | ||
711 | MACHINE_START(IGEP0030, "IGEP OMAP3 module") | 684 | MACHINE_START(IGEP0030, "IGEP OMAP3 module") |
@@ -713,7 +686,7 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module") | |||
713 | .reserve = omap_reserve, | 686 | .reserve = omap_reserve, |
714 | .map_io = omap3_map_io, | 687 | .map_io = omap3_map_io, |
715 | .init_early = igep_init_early, | 688 | .init_early = igep_init_early, |
716 | .init_irq = omap_init_irq, | 689 | .init_irq = omap3_init_irq, |
717 | .init_machine = igep_init, | 690 | .init_machine = igep_init, |
718 | .timer = &omap_timer, | 691 | .timer = &omap3_timer, |
719 | MACHINE_END | 692 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index f7d6038075f0..218764c9377e 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -199,22 +199,14 @@ static void __init omap_ldp_init_early(void) | |||
199 | omap2_init_common_devices(NULL, NULL); | 199 | omap2_init_common_devices(NULL, NULL); |
200 | } | 200 | } |
201 | 201 | ||
202 | static struct twl4030_usb_data ldp_usb_data = { | ||
203 | .usb_mode = T2_USB_MODE_ULPI, | ||
204 | }; | ||
205 | |||
206 | static struct twl4030_gpio_platform_data ldp_gpio_data = { | 202 | static struct twl4030_gpio_platform_data ldp_gpio_data = { |
207 | .gpio_base = OMAP_MAX_GPIO_LINES, | 203 | .gpio_base = OMAP_MAX_GPIO_LINES, |
208 | .irq_base = TWL4030_GPIO_IRQ_BASE, | 204 | .irq_base = TWL4030_GPIO_IRQ_BASE, |
209 | .irq_end = TWL4030_GPIO_IRQ_END, | 205 | .irq_end = TWL4030_GPIO_IRQ_END, |
210 | }; | 206 | }; |
211 | 207 | ||
212 | static struct twl4030_madc_platform_data ldp_madc_data = { | 208 | static struct regulator_consumer_supply ldp_vmmc1_supply[] = { |
213 | .irq_line = 1, | 209 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
214 | }; | ||
215 | |||
216 | static struct regulator_consumer_supply ldp_vmmc1_supply = { | ||
217 | .supply = "vmmc", | ||
218 | }; | 210 | }; |
219 | 211 | ||
220 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | 212 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
@@ -228,8 +220,8 @@ static struct regulator_init_data ldp_vmmc1 = { | |||
228 | | REGULATOR_CHANGE_MODE | 220 | | REGULATOR_CHANGE_MODE |
229 | | REGULATOR_CHANGE_STATUS, | 221 | | REGULATOR_CHANGE_STATUS, |
230 | }, | 222 | }, |
231 | .num_consumer_supplies = 1, | 223 | .num_consumer_supplies = ARRAY_SIZE(ldp_vmmc1_supply), |
232 | .consumer_supplies = &ldp_vmmc1_supply, | 224 | .consumer_supplies = ldp_vmmc1_supply, |
233 | }; | 225 | }; |
234 | 226 | ||
235 | /* ads7846 on SPI */ | 227 | /* ads7846 on SPI */ |
@@ -253,12 +245,7 @@ static struct regulator_init_data ldp_vaux1 = { | |||
253 | }; | 245 | }; |
254 | 246 | ||
255 | static struct twl4030_platform_data ldp_twldata = { | 247 | static struct twl4030_platform_data ldp_twldata = { |
256 | .irq_base = TWL4030_IRQ_BASE, | ||
257 | .irq_end = TWL4030_IRQ_END, | ||
258 | |||
259 | /* platform_data for children goes here */ | 248 | /* platform_data for children goes here */ |
260 | .madc = &ldp_madc_data, | ||
261 | .usb = &ldp_usb_data, | ||
262 | .vmmc1 = &ldp_vmmc1, | 249 | .vmmc1 = &ldp_vmmc1, |
263 | .vaux1 = &ldp_vaux1, | 250 | .vaux1 = &ldp_vaux1, |
264 | .gpio = &ldp_gpio_data, | 251 | .gpio = &ldp_gpio_data, |
@@ -267,6 +254,8 @@ static struct twl4030_platform_data ldp_twldata = { | |||
267 | 254 | ||
268 | static int __init omap_i2c_init(void) | 255 | static int __init omap_i2c_init(void) |
269 | { | 256 | { |
257 | omap3_pmic_get_config(&ldp_twldata, | ||
258 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC, 0); | ||
270 | omap3_pmic_init("twl4030", &ldp_twldata); | 259 | omap3_pmic_init("twl4030", &ldp_twldata); |
271 | omap_register_i2c_bus(2, 400, NULL, 0); | 260 | omap_register_i2c_bus(2, 400, NULL, 0); |
272 | omap_register_i2c_bus(3, 400, NULL, 0); | 261 | omap_register_i2c_bus(3, 400, NULL, 0); |
@@ -341,8 +330,6 @@ static void __init omap_ldp_init(void) | |||
341 | ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0); | 330 | ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0); |
342 | 331 | ||
343 | omap2_hsmmc_init(mmc); | 332 | omap2_hsmmc_init(mmc); |
344 | /* link regulators to MMC adapters */ | ||
345 | ldp_vmmc1_supply.dev = mmc[0].dev; | ||
346 | } | 333 | } |
347 | 334 | ||
348 | MACHINE_START(OMAP_LDP, "OMAP LDP board") | 335 | MACHINE_START(OMAP_LDP, "OMAP LDP board") |
@@ -350,7 +337,7 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board") | |||
350 | .reserve = omap_reserve, | 337 | .reserve = omap_reserve, |
351 | .map_io = omap3_map_io, | 338 | .map_io = omap3_map_io, |
352 | .init_early = omap_ldp_init_early, | 339 | .init_early = omap_ldp_init_early, |
353 | .init_irq = omap_init_irq, | 340 | .init_irq = omap3_init_irq, |
354 | .init_machine = omap_ldp_init, | 341 | .init_machine = omap_ldp_init, |
355 | .timer = &omap_timer, | 342 | .timer = &omap3_timer, |
356 | MACHINE_END | 343 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 8d74318ed495..e11f0c5d608a 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c | |||
@@ -699,9 +699,9 @@ MACHINE_START(NOKIA_N800, "Nokia N800") | |||
699 | .reserve = omap_reserve, | 699 | .reserve = omap_reserve, |
700 | .map_io = n8x0_map_io, | 700 | .map_io = n8x0_map_io, |
701 | .init_early = n8x0_init_early, | 701 | .init_early = n8x0_init_early, |
702 | .init_irq = omap_init_irq, | 702 | .init_irq = omap2_init_irq, |
703 | .init_machine = n8x0_init_machine, | 703 | .init_machine = n8x0_init_machine, |
704 | .timer = &omap_timer, | 704 | .timer = &omap2_timer, |
705 | MACHINE_END | 705 | MACHINE_END |
706 | 706 | ||
707 | MACHINE_START(NOKIA_N810, "Nokia N810") | 707 | MACHINE_START(NOKIA_N810, "Nokia N810") |
@@ -709,9 +709,9 @@ MACHINE_START(NOKIA_N810, "Nokia N810") | |||
709 | .reserve = omap_reserve, | 709 | .reserve = omap_reserve, |
710 | .map_io = n8x0_map_io, | 710 | .map_io = n8x0_map_io, |
711 | .init_early = n8x0_init_early, | 711 | .init_early = n8x0_init_early, |
712 | .init_irq = omap_init_irq, | 712 | .init_irq = omap2_init_irq, |
713 | .init_machine = n8x0_init_machine, | 713 | .init_machine = n8x0_init_machine, |
714 | .timer = &omap_timer, | 714 | .timer = &omap2_timer, |
715 | MACHINE_END | 715 | MACHINE_END |
716 | 716 | ||
717 | MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX") | 717 | MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX") |
@@ -719,7 +719,7 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX") | |||
719 | .reserve = omap_reserve, | 719 | .reserve = omap_reserve, |
720 | .map_io = n8x0_map_io, | 720 | .map_io = n8x0_map_io, |
721 | .init_early = n8x0_init_early, | 721 | .init_early = n8x0_init_early, |
722 | .init_irq = omap_init_irq, | 722 | .init_irq = omap2_init_irq, |
723 | .init_machine = n8x0_init_machine, | 723 | .init_machine = n8x0_init_machine, |
724 | .timer = &omap_timer, | 724 | .timer = &omap2_timer, |
725 | MACHINE_END | 725 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 7f21d24bd437..34f841112768 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -50,7 +50,6 @@ | |||
50 | 50 | ||
51 | #include "mux.h" | 51 | #include "mux.h" |
52 | #include "hsmmc.h" | 52 | #include "hsmmc.h" |
53 | #include "timer-gp.h" | ||
54 | #include "pm.h" | 53 | #include "pm.h" |
55 | #include "common-board-devices.h" | 54 | #include "common-board-devices.h" |
56 | 55 | ||
@@ -210,14 +209,6 @@ static struct omap_dss_board_info beagle_dss_data = { | |||
210 | .default_device = &beagle_dvi_device, | 209 | .default_device = &beagle_dvi_device, |
211 | }; | 210 | }; |
212 | 211 | ||
213 | static struct regulator_consumer_supply beagle_vdac_supply = | ||
214 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); | ||
215 | |||
216 | static struct regulator_consumer_supply beagle_vdvi_supplies[] = { | ||
217 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
218 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
219 | }; | ||
220 | |||
221 | static void __init beagle_display_init(void) | 212 | static void __init beagle_display_init(void) |
222 | { | 213 | { |
223 | int r; | 214 | int r; |
@@ -239,12 +230,12 @@ static struct omap2_hsmmc_info mmc[] = { | |||
239 | {} /* Terminator */ | 230 | {} /* Terminator */ |
240 | }; | 231 | }; |
241 | 232 | ||
242 | static struct regulator_consumer_supply beagle_vmmc1_supply = { | 233 | static struct regulator_consumer_supply beagle_vmmc1_supply[] = { |
243 | .supply = "vmmc", | 234 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
244 | }; | 235 | }; |
245 | 236 | ||
246 | static struct regulator_consumer_supply beagle_vsim_supply = { | 237 | static struct regulator_consumer_supply beagle_vsim_supply[] = { |
247 | .supply = "vmmc_aux", | 238 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), |
248 | }; | 239 | }; |
249 | 240 | ||
250 | static struct gpio_led gpio_leds[]; | 241 | static struct gpio_led gpio_leds[]; |
@@ -267,10 +258,6 @@ static int beagle_twl_gpio_setup(struct device *dev, | |||
267 | mmc[0].gpio_cd = gpio + 0; | 258 | mmc[0].gpio_cd = gpio + 0; |
268 | omap2_hsmmc_init(mmc); | 259 | omap2_hsmmc_init(mmc); |
269 | 260 | ||
270 | /* link regulators to MMC adapters */ | ||
271 | beagle_vmmc1_supply.dev = mmc[0].dev; | ||
272 | beagle_vsim_supply.dev = mmc[0].dev; | ||
273 | |||
274 | /* | 261 | /* |
275 | * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active | 262 | * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active |
276 | * high / others active low) | 263 | * high / others active low) |
@@ -336,8 +323,8 @@ static struct regulator_init_data beagle_vmmc1 = { | |||
336 | | REGULATOR_CHANGE_MODE | 323 | | REGULATOR_CHANGE_MODE |
337 | | REGULATOR_CHANGE_STATUS, | 324 | | REGULATOR_CHANGE_STATUS, |
338 | }, | 325 | }, |
339 | .num_consumer_supplies = 1, | 326 | .num_consumer_supplies = ARRAY_SIZE(beagle_vmmc1_supply), |
340 | .consumer_supplies = &beagle_vmmc1_supply, | 327 | .consumer_supplies = beagle_vmmc1_supply, |
341 | }; | 328 | }; |
342 | 329 | ||
343 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ | 330 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ |
@@ -351,62 +338,15 @@ static struct regulator_init_data beagle_vsim = { | |||
351 | | REGULATOR_CHANGE_MODE | 338 | | REGULATOR_CHANGE_MODE |
352 | | REGULATOR_CHANGE_STATUS, | 339 | | REGULATOR_CHANGE_STATUS, |
353 | }, | 340 | }, |
354 | .num_consumer_supplies = 1, | 341 | .num_consumer_supplies = ARRAY_SIZE(beagle_vsim_supply), |
355 | .consumer_supplies = &beagle_vsim_supply, | 342 | .consumer_supplies = beagle_vsim_supply, |
356 | }; | ||
357 | |||
358 | /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ | ||
359 | static struct regulator_init_data beagle_vdac = { | ||
360 | .constraints = { | ||
361 | .min_uV = 1800000, | ||
362 | .max_uV = 1800000, | ||
363 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
364 | | REGULATOR_MODE_STANDBY, | ||
365 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
366 | | REGULATOR_CHANGE_STATUS, | ||
367 | }, | ||
368 | .num_consumer_supplies = 1, | ||
369 | .consumer_supplies = &beagle_vdac_supply, | ||
370 | }; | ||
371 | |||
372 | /* VPLL2 for digital video outputs */ | ||
373 | static struct regulator_init_data beagle_vpll2 = { | ||
374 | .constraints = { | ||
375 | .name = "VDVI", | ||
376 | .min_uV = 1800000, | ||
377 | .max_uV = 1800000, | ||
378 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
379 | | REGULATOR_MODE_STANDBY, | ||
380 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
381 | | REGULATOR_CHANGE_STATUS, | ||
382 | }, | ||
383 | .num_consumer_supplies = ARRAY_SIZE(beagle_vdvi_supplies), | ||
384 | .consumer_supplies = beagle_vdvi_supplies, | ||
385 | }; | ||
386 | |||
387 | static struct twl4030_usb_data beagle_usb_data = { | ||
388 | .usb_mode = T2_USB_MODE_ULPI, | ||
389 | }; | ||
390 | |||
391 | static struct twl4030_codec_audio_data beagle_audio_data; | ||
392 | |||
393 | static struct twl4030_codec_data beagle_codec_data = { | ||
394 | .audio_mclk = 26000000, | ||
395 | .audio = &beagle_audio_data, | ||
396 | }; | 343 | }; |
397 | 344 | ||
398 | static struct twl4030_platform_data beagle_twldata = { | 345 | static struct twl4030_platform_data beagle_twldata = { |
399 | .irq_base = TWL4030_IRQ_BASE, | ||
400 | .irq_end = TWL4030_IRQ_END, | ||
401 | |||
402 | /* platform_data for children goes here */ | 346 | /* platform_data for children goes here */ |
403 | .usb = &beagle_usb_data, | ||
404 | .gpio = &beagle_gpio_data, | 347 | .gpio = &beagle_gpio_data, |
405 | .codec = &beagle_codec_data, | ||
406 | .vmmc1 = &beagle_vmmc1, | 348 | .vmmc1 = &beagle_vmmc1, |
407 | .vsim = &beagle_vsim, | 349 | .vsim = &beagle_vsim, |
408 | .vdac = &beagle_vdac, | ||
409 | .vpll2 = &beagle_vpll2, | ||
410 | }; | 350 | }; |
411 | 351 | ||
412 | static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { | 352 | static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { |
@@ -417,6 +357,12 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { | |||
417 | 357 | ||
418 | static int __init omap3_beagle_i2c_init(void) | 358 | static int __init omap3_beagle_i2c_init(void) |
419 | { | 359 | { |
360 | omap3_pmic_get_config(&beagle_twldata, | ||
361 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, | ||
362 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
363 | |||
364 | beagle_twldata.vpll2->constraints.name = "VDVI"; | ||
365 | |||
420 | omap3_pmic_init("twl4030", &beagle_twldata); | 366 | omap3_pmic_init("twl4030", &beagle_twldata); |
421 | /* Bus 3 is attached to the DVI port where devices like the pico DLP | 367 | /* Bus 3 is attached to the DVI port where devices like the pico DLP |
422 | * projector don't work reliably with 400kHz */ | 368 | * projector don't work reliably with 400kHz */ |
@@ -486,10 +432,7 @@ static void __init omap3_beagle_init_early(void) | |||
486 | 432 | ||
487 | static void __init omap3_beagle_init_irq(void) | 433 | static void __init omap3_beagle_init_irq(void) |
488 | { | 434 | { |
489 | omap_init_irq(); | 435 | omap3_init_irq(); |
490 | #ifdef CONFIG_OMAP_32K_TIMER | ||
491 | omap2_gp_clockevent_set_gptimer(12); | ||
492 | #endif | ||
493 | } | 436 | } |
494 | 437 | ||
495 | static struct platform_device *omap3_beagle_devices[] __initdata = { | 438 | static struct platform_device *omap3_beagle_devices[] __initdata = { |
@@ -599,5 +542,5 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") | |||
599 | .init_early = omap3_beagle_init_early, | 542 | .init_early = omap3_beagle_init_early, |
600 | .init_irq = omap3_beagle_init_irq, | 543 | .init_irq = omap3_beagle_init_irq, |
601 | .init_machine = omap3_beagle_init, | 544 | .init_machine = omap3_beagle_init, |
602 | .timer = &omap_timer, | 545 | .timer = &omap3_secure_timer, |
603 | MACHINE_END | 546 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index b4d43464a303..c452b3f3331a 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -273,12 +273,12 @@ static struct omap_dss_board_info omap3_evm_dss_data = { | |||
273 | .default_device = &omap3_evm_lcd_device, | 273 | .default_device = &omap3_evm_lcd_device, |
274 | }; | 274 | }; |
275 | 275 | ||
276 | static struct regulator_consumer_supply omap3evm_vmmc1_supply = { | 276 | static struct regulator_consumer_supply omap3evm_vmmc1_supply[] = { |
277 | .supply = "vmmc", | 277 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
278 | }; | 278 | }; |
279 | 279 | ||
280 | static struct regulator_consumer_supply omap3evm_vsim_supply = { | 280 | static struct regulator_consumer_supply omap3evm_vsim_supply[] = { |
281 | .supply = "vmmc_aux", | 281 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), |
282 | }; | 282 | }; |
283 | 283 | ||
284 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | 284 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
@@ -292,8 +292,8 @@ static struct regulator_init_data omap3evm_vmmc1 = { | |||
292 | | REGULATOR_CHANGE_MODE | 292 | | REGULATOR_CHANGE_MODE |
293 | | REGULATOR_CHANGE_STATUS, | 293 | | REGULATOR_CHANGE_STATUS, |
294 | }, | 294 | }, |
295 | .num_consumer_supplies = 1, | 295 | .num_consumer_supplies = ARRAY_SIZE(omap3evm_vmmc1_supply), |
296 | .consumer_supplies = &omap3evm_vmmc1_supply, | 296 | .consumer_supplies = omap3evm_vmmc1_supply, |
297 | }; | 297 | }; |
298 | 298 | ||
299 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ | 299 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ |
@@ -307,8 +307,8 @@ static struct regulator_init_data omap3evm_vsim = { | |||
307 | | REGULATOR_CHANGE_MODE | 307 | | REGULATOR_CHANGE_MODE |
308 | | REGULATOR_CHANGE_STATUS, | 308 | | REGULATOR_CHANGE_STATUS, |
309 | }, | 309 | }, |
310 | .num_consumer_supplies = 1, | 310 | .num_consumer_supplies = ARRAY_SIZE(omap3evm_vsim_supply), |
311 | .consumer_supplies = &omap3evm_vsim_supply, | 311 | .consumer_supplies = omap3evm_vsim_supply, |
312 | }; | 312 | }; |
313 | 313 | ||
314 | static struct omap2_hsmmc_info mmc[] = { | 314 | static struct omap2_hsmmc_info mmc[] = { |
@@ -365,10 +365,6 @@ static int omap3evm_twl_gpio_setup(struct device *dev, | |||
365 | mmc[0].gpio_cd = gpio + 0; | 365 | mmc[0].gpio_cd = gpio + 0; |
366 | omap2_hsmmc_init(mmc); | 366 | omap2_hsmmc_init(mmc); |
367 | 367 | ||
368 | /* link regulators to MMC adapters */ | ||
369 | omap3evm_vmmc1_supply.dev = mmc[0].dev; | ||
370 | omap3evm_vsim_supply.dev = mmc[0].dev; | ||
371 | |||
372 | /* | 368 | /* |
373 | * Most GPIOs are for USB OTG. Some are mostly sent to | 369 | * Most GPIOs are for USB OTG. Some are mostly sent to |
374 | * the P2 connector; notably LEDA for the LCD backlight. | 370 | * the P2 connector; notably LEDA for the LCD backlight. |
@@ -400,10 +396,6 @@ static struct twl4030_gpio_platform_data omap3evm_gpio_data = { | |||
400 | .setup = omap3evm_twl_gpio_setup, | 396 | .setup = omap3evm_twl_gpio_setup, |
401 | }; | 397 | }; |
402 | 398 | ||
403 | static struct twl4030_usb_data omap3evm_usb_data = { | ||
404 | .usb_mode = T2_USB_MODE_ULPI, | ||
405 | }; | ||
406 | |||
407 | static uint32_t board_keymap[] = { | 399 | static uint32_t board_keymap[] = { |
408 | KEY(0, 0, KEY_LEFT), | 400 | KEY(0, 0, KEY_LEFT), |
409 | KEY(0, 1, KEY_DOWN), | 401 | KEY(0, 1, KEY_DOWN), |
@@ -438,58 +430,10 @@ static struct twl4030_keypad_data omap3evm_kp_data = { | |||
438 | .rep = 1, | 430 | .rep = 1, |
439 | }; | 431 | }; |
440 | 432 | ||
441 | static struct twl4030_madc_platform_data omap3evm_madc_data = { | ||
442 | .irq_line = 1, | ||
443 | }; | ||
444 | |||
445 | static struct twl4030_codec_audio_data omap3evm_audio_data; | ||
446 | |||
447 | static struct twl4030_codec_data omap3evm_codec_data = { | ||
448 | .audio_mclk = 26000000, | ||
449 | .audio = &omap3evm_audio_data, | ||
450 | }; | ||
451 | |||
452 | static struct regulator_consumer_supply omap3_evm_vdda_dac_supply = | ||
453 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); | ||
454 | |||
455 | /* VDAC for DSS driving S-Video */ | ||
456 | static struct regulator_init_data omap3_evm_vdac = { | ||
457 | .constraints = { | ||
458 | .min_uV = 1800000, | ||
459 | .max_uV = 1800000, | ||
460 | .apply_uV = true, | ||
461 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
462 | | REGULATOR_MODE_STANDBY, | ||
463 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
464 | | REGULATOR_CHANGE_STATUS, | ||
465 | }, | ||
466 | .num_consumer_supplies = 1, | ||
467 | .consumer_supplies = &omap3_evm_vdda_dac_supply, | ||
468 | }; | ||
469 | |||
470 | /* VPLL2 for digital video outputs */ | ||
471 | static struct regulator_consumer_supply omap3_evm_vpll2_supplies[] = { | ||
472 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
473 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
474 | }; | ||
475 | |||
476 | static struct regulator_init_data omap3_evm_vpll2 = { | ||
477 | .constraints = { | ||
478 | .min_uV = 1800000, | ||
479 | .max_uV = 1800000, | ||
480 | .apply_uV = true, | ||
481 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
482 | | REGULATOR_MODE_STANDBY, | ||
483 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
484 | | REGULATOR_CHANGE_STATUS, | ||
485 | }, | ||
486 | .num_consumer_supplies = ARRAY_SIZE(omap3_evm_vpll2_supplies), | ||
487 | .consumer_supplies = omap3_evm_vpll2_supplies, | ||
488 | }; | ||
489 | |||
490 | /* ads7846 on SPI */ | 433 | /* ads7846 on SPI */ |
491 | static struct regulator_consumer_supply omap3evm_vio_supply = | 434 | static struct regulator_consumer_supply omap3evm_vio_supply[] = { |
492 | REGULATOR_SUPPLY("vcc", "spi1.0"); | 435 | REGULATOR_SUPPLY("vcc", "spi1.0"), |
436 | }; | ||
493 | 437 | ||
494 | /* VIO for ads7846 */ | 438 | /* VIO for ads7846 */ |
495 | static struct regulator_init_data omap3evm_vio = { | 439 | static struct regulator_init_data omap3evm_vio = { |
@@ -502,8 +446,8 @@ static struct regulator_init_data omap3evm_vio = { | |||
502 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 446 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
503 | | REGULATOR_CHANGE_STATUS, | 447 | | REGULATOR_CHANGE_STATUS, |
504 | }, | 448 | }, |
505 | .num_consumer_supplies = 1, | 449 | .num_consumer_supplies = ARRAY_SIZE(omap3evm_vio_supply), |
506 | .consumer_supplies = &omap3evm_vio_supply, | 450 | .consumer_supplies = omap3evm_vio_supply, |
507 | }; | 451 | }; |
508 | 452 | ||
509 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | 453 | #ifdef CONFIG_WL12XX_PLATFORM_DATA |
@@ -511,16 +455,17 @@ static struct regulator_init_data omap3evm_vio = { | |||
511 | #define OMAP3EVM_WLAN_PMENA_GPIO (150) | 455 | #define OMAP3EVM_WLAN_PMENA_GPIO (150) |
512 | #define OMAP3EVM_WLAN_IRQ_GPIO (149) | 456 | #define OMAP3EVM_WLAN_IRQ_GPIO (149) |
513 | 457 | ||
514 | static struct regulator_consumer_supply omap3evm_vmmc2_supply = | 458 | static struct regulator_consumer_supply omap3evm_vmmc2_supply[] = { |
515 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); | 459 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
460 | }; | ||
516 | 461 | ||
517 | /* VMMC2 for driving the WL12xx module */ | 462 | /* VMMC2 for driving the WL12xx module */ |
518 | static struct regulator_init_data omap3evm_vmmc2 = { | 463 | static struct regulator_init_data omap3evm_vmmc2 = { |
519 | .constraints = { | 464 | .constraints = { |
520 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | 465 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
521 | }, | 466 | }, |
522 | .num_consumer_supplies = 1, | 467 | .num_consumer_supplies = ARRAY_SIZE(omap3evm_vmmc2_supply), |
523 | .consumer_supplies = &omap3evm_vmmc2_supply, | 468 | .consumer_supplies = omap3evm_vmmc2_supply, |
524 | }; | 469 | }; |
525 | 470 | ||
526 | static struct fixed_voltage_config omap3evm_vwlan = { | 471 | static struct fixed_voltage_config omap3evm_vwlan = { |
@@ -548,17 +493,9 @@ struct wl12xx_platform_data omap3evm_wlan_data __initdata = { | |||
548 | #endif | 493 | #endif |
549 | 494 | ||
550 | static struct twl4030_platform_data omap3evm_twldata = { | 495 | static struct twl4030_platform_data omap3evm_twldata = { |
551 | .irq_base = TWL4030_IRQ_BASE, | ||
552 | .irq_end = TWL4030_IRQ_END, | ||
553 | |||
554 | /* platform_data for children goes here */ | 496 | /* platform_data for children goes here */ |
555 | .keypad = &omap3evm_kp_data, | 497 | .keypad = &omap3evm_kp_data, |
556 | .madc = &omap3evm_madc_data, | ||
557 | .usb = &omap3evm_usb_data, | ||
558 | .gpio = &omap3evm_gpio_data, | 498 | .gpio = &omap3evm_gpio_data, |
559 | .codec = &omap3evm_codec_data, | ||
560 | .vdac = &omap3_evm_vdac, | ||
561 | .vpll2 = &omap3_evm_vpll2, | ||
562 | .vio = &omap3evm_vio, | 499 | .vio = &omap3evm_vio, |
563 | .vmmc1 = &omap3evm_vmmc1, | 500 | .vmmc1 = &omap3evm_vmmc1, |
564 | .vsim = &omap3evm_vsim, | 501 | .vsim = &omap3evm_vsim, |
@@ -566,6 +503,14 @@ static struct twl4030_platform_data omap3evm_twldata = { | |||
566 | 503 | ||
567 | static int __init omap3_evm_i2c_init(void) | 504 | static int __init omap3_evm_i2c_init(void) |
568 | { | 505 | { |
506 | omap3_pmic_get_config(&omap3evm_twldata, | ||
507 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC | | ||
508 | TWL_COMMON_PDATA_AUDIO, | ||
509 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
510 | |||
511 | omap3evm_twldata.vdac->constraints.apply_uV = true; | ||
512 | omap3evm_twldata.vpll2->constraints.apply_uV = true; | ||
513 | |||
569 | omap3_pmic_init("twl4030", &omap3evm_twldata); | 514 | omap3_pmic_init("twl4030", &omap3evm_twldata); |
570 | omap_register_i2c_bus(2, 400, NULL, 0); | 515 | omap_register_i2c_bus(2, 400, NULL, 0); |
571 | omap_register_i2c_bus(3, 400, NULL, 0); | 516 | omap_register_i2c_bus(3, 400, NULL, 0); |
@@ -740,7 +685,7 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM") | |||
740 | .reserve = omap_reserve, | 685 | .reserve = omap_reserve, |
741 | .map_io = omap3_map_io, | 686 | .map_io = omap3_map_io, |
742 | .init_early = omap3_evm_init_early, | 687 | .init_early = omap3_evm_init_early, |
743 | .init_irq = omap_init_irq, | 688 | .init_irq = omap3_init_irq, |
744 | .init_machine = omap3_evm_init, | 689 | .init_machine = omap3_evm_init, |
745 | .timer = &omap_timer, | 690 | .timer = &omap3_timer, |
746 | MACHINE_END | 691 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c index 60d9be49dbab..703aeb5b8fd4 100644 --- a/arch/arm/mach-omap2/board-omap3logic.c +++ b/arch/arm/mach-omap2/board-omap3logic.c | |||
@@ -35,7 +35,6 @@ | |||
35 | 35 | ||
36 | #include "mux.h" | 36 | #include "mux.h" |
37 | #include "hsmmc.h" | 37 | #include "hsmmc.h" |
38 | #include "timer-gp.h" | ||
39 | #include "control.h" | 38 | #include "control.h" |
40 | #include "common-board-devices.h" | 39 | #include "common-board-devices.h" |
41 | 40 | ||
@@ -55,8 +54,8 @@ | |||
55 | #define OMAP3_TORPEDO_MMC_GPIO_CD 127 | 54 | #define OMAP3_TORPEDO_MMC_GPIO_CD 127 |
56 | #define OMAP3_TORPEDO_SMSC911X_GPIO_IRQ 129 | 55 | #define OMAP3_TORPEDO_SMSC911X_GPIO_IRQ 129 |
57 | 56 | ||
58 | static struct regulator_consumer_supply omap3logic_vmmc1_supply = { | 57 | static struct regulator_consumer_supply omap3logic_vmmc1_supply[] = { |
59 | .supply = "vmmc", | 58 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
60 | }; | 59 | }; |
61 | 60 | ||
62 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | 61 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
@@ -71,8 +70,8 @@ static struct regulator_init_data omap3logic_vmmc1 = { | |||
71 | | REGULATOR_CHANGE_MODE | 70 | | REGULATOR_CHANGE_MODE |
72 | | REGULATOR_CHANGE_STATUS, | 71 | | REGULATOR_CHANGE_STATUS, |
73 | }, | 72 | }, |
74 | .num_consumer_supplies = 1, | 73 | .num_consumer_supplies = ARRAY_SIZE(omap3logic_vmmc1_supply), |
75 | .consumer_supplies = &omap3logic_vmmc1_supply, | 74 | .consumer_supplies = omap3logic_vmmc1_supply, |
76 | }; | 75 | }; |
77 | 76 | ||
78 | static struct twl4030_gpio_platform_data omap3logic_gpio_data = { | 77 | static struct twl4030_gpio_platform_data omap3logic_gpio_data = { |
@@ -130,8 +129,6 @@ static void __init board_mmc_init(void) | |||
130 | } | 129 | } |
131 | 130 | ||
132 | omap2_hsmmc_init(board_mmc_info); | 131 | omap2_hsmmc_init(board_mmc_info); |
133 | /* link regulators to MMC adapters */ | ||
134 | omap3logic_vmmc1_supply.dev = board_mmc_info[0].dev; | ||
135 | } | 132 | } |
136 | 133 | ||
137 | static struct omap_smsc911x_platform_data __initdata board_smsc911x_data = { | 134 | static struct omap_smsc911x_platform_data __initdata board_smsc911x_data = { |
@@ -215,16 +212,16 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board") | |||
215 | .boot_params = 0x80000100, | 212 | .boot_params = 0x80000100, |
216 | .map_io = omap3_map_io, | 213 | .map_io = omap3_map_io, |
217 | .init_early = omap3logic_init_early, | 214 | .init_early = omap3logic_init_early, |
218 | .init_irq = omap_init_irq, | 215 | .init_irq = omap3_init_irq, |
219 | .init_machine = omap3logic_init, | 216 | .init_machine = omap3logic_init, |
220 | .timer = &omap_timer, | 217 | .timer = &omap3_timer, |
221 | MACHINE_END | 218 | MACHINE_END |
222 | 219 | ||
223 | MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") | 220 | MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") |
224 | .boot_params = 0x80000100, | 221 | .boot_params = 0x80000100, |
225 | .map_io = omap3_map_io, | 222 | .map_io = omap3_map_io, |
226 | .init_early = omap3logic_init_early, | 223 | .init_early = omap3logic_init_early, |
227 | .init_irq = omap_init_irq, | 224 | .init_irq = omap3_init_irq, |
228 | .init_machine = omap3logic_init, | 225 | .init_machine = omap3logic_init, |
229 | .timer = &omap_timer, | 226 | .timer = &omap3_timer, |
230 | MACHINE_END | 227 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 23f71d40883e..080d7bd6795e 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -320,17 +320,17 @@ static struct twl4030_gpio_platform_data omap3pandora_gpio_data = { | |||
320 | .setup = omap3pandora_twl_gpio_setup, | 320 | .setup = omap3pandora_twl_gpio_setup, |
321 | }; | 321 | }; |
322 | 322 | ||
323 | static struct regulator_consumer_supply pandora_vmmc1_supply = | 323 | static struct regulator_consumer_supply pandora_vmmc1_supply[] = { |
324 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); | 324 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
325 | 325 | }; | |
326 | static struct regulator_consumer_supply pandora_vmmc2_supply = | ||
327 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); | ||
328 | 326 | ||
329 | static struct regulator_consumer_supply pandora_vmmc3_supply = | 327 | static struct regulator_consumer_supply pandora_vmmc2_supply[] = { |
330 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"); | 328 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1") |
329 | }; | ||
331 | 330 | ||
332 | static struct regulator_consumer_supply pandora_vdda_dac_supply = | 331 | static struct regulator_consumer_supply pandora_vmmc3_supply[] = { |
333 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); | 332 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"), |
333 | }; | ||
334 | 334 | ||
335 | static struct regulator_consumer_supply pandora_vdds_supplies[] = { | 335 | static struct regulator_consumer_supply pandora_vdds_supplies[] = { |
336 | REGULATOR_SUPPLY("vdds_sdi", "omapdss"), | 336 | REGULATOR_SUPPLY("vdds_sdi", "omapdss"), |
@@ -338,11 +338,13 @@ static struct regulator_consumer_supply pandora_vdds_supplies[] = { | |||
338 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | 338 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), |
339 | }; | 339 | }; |
340 | 340 | ||
341 | static struct regulator_consumer_supply pandora_vcc_lcd_supply = | 341 | static struct regulator_consumer_supply pandora_vcc_lcd_supply[] = { |
342 | REGULATOR_SUPPLY("vcc", "display0"); | 342 | REGULATOR_SUPPLY("vcc", "display0"), |
343 | }; | ||
343 | 344 | ||
344 | static struct regulator_consumer_supply pandora_usb_phy_supply = | 345 | static struct regulator_consumer_supply pandora_usb_phy_supply[] = { |
345 | REGULATOR_SUPPLY("hsusb0", "ehci-omap.0"); | 346 | REGULATOR_SUPPLY("hsusb0", "ehci-omap.0"), |
347 | }; | ||
346 | 348 | ||
347 | /* ads7846 on SPI and 2 nub controllers on I2C */ | 349 | /* ads7846 on SPI and 2 nub controllers on I2C */ |
348 | static struct regulator_consumer_supply pandora_vaux4_supplies[] = { | 350 | static struct regulator_consumer_supply pandora_vaux4_supplies[] = { |
@@ -351,8 +353,9 @@ static struct regulator_consumer_supply pandora_vaux4_supplies[] = { | |||
351 | REGULATOR_SUPPLY("vcc", "3-0067"), | 353 | REGULATOR_SUPPLY("vcc", "3-0067"), |
352 | }; | 354 | }; |
353 | 355 | ||
354 | static struct regulator_consumer_supply pandora_adac_supply = | 356 | static struct regulator_consumer_supply pandora_adac_supply[] = { |
355 | REGULATOR_SUPPLY("vcc", "soc-audio"); | 357 | REGULATOR_SUPPLY("vcc", "soc-audio"), |
358 | }; | ||
356 | 359 | ||
357 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | 360 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
358 | static struct regulator_init_data pandora_vmmc1 = { | 361 | static struct regulator_init_data pandora_vmmc1 = { |
@@ -365,8 +368,8 @@ static struct regulator_init_data pandora_vmmc1 = { | |||
365 | | REGULATOR_CHANGE_MODE | 368 | | REGULATOR_CHANGE_MODE |
366 | | REGULATOR_CHANGE_STATUS, | 369 | | REGULATOR_CHANGE_STATUS, |
367 | }, | 370 | }, |
368 | .num_consumer_supplies = 1, | 371 | .num_consumer_supplies = ARRAY_SIZE(pandora_vmmc1_supply), |
369 | .consumer_supplies = &pandora_vmmc1_supply, | 372 | .consumer_supplies = pandora_vmmc1_supply, |
370 | }; | 373 | }; |
371 | 374 | ||
372 | /* VMMC2 for MMC2 pins CMD, CLK, DAT0..DAT3 (max 100 mA) */ | 375 | /* VMMC2 for MMC2 pins CMD, CLK, DAT0..DAT3 (max 100 mA) */ |
@@ -380,38 +383,8 @@ static struct regulator_init_data pandora_vmmc2 = { | |||
380 | | REGULATOR_CHANGE_MODE | 383 | | REGULATOR_CHANGE_MODE |
381 | | REGULATOR_CHANGE_STATUS, | 384 | | REGULATOR_CHANGE_STATUS, |
382 | }, | 385 | }, |
383 | .num_consumer_supplies = 1, | 386 | .num_consumer_supplies = ARRAY_SIZE(pandora_vmmc2_supply), |
384 | .consumer_supplies = &pandora_vmmc2_supply, | 387 | .consumer_supplies = pandora_vmmc2_supply, |
385 | }; | ||
386 | |||
387 | /* VDAC for DSS driving S-Video */ | ||
388 | static struct regulator_init_data pandora_vdac = { | ||
389 | .constraints = { | ||
390 | .min_uV = 1800000, | ||
391 | .max_uV = 1800000, | ||
392 | .apply_uV = true, | ||
393 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
394 | | REGULATOR_MODE_STANDBY, | ||
395 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
396 | | REGULATOR_CHANGE_STATUS, | ||
397 | }, | ||
398 | .num_consumer_supplies = 1, | ||
399 | .consumer_supplies = &pandora_vdda_dac_supply, | ||
400 | }; | ||
401 | |||
402 | /* VPLL2 for digital video outputs */ | ||
403 | static struct regulator_init_data pandora_vpll2 = { | ||
404 | .constraints = { | ||
405 | .min_uV = 1800000, | ||
406 | .max_uV = 1800000, | ||
407 | .apply_uV = true, | ||
408 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
409 | | REGULATOR_MODE_STANDBY, | ||
410 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
411 | | REGULATOR_CHANGE_STATUS, | ||
412 | }, | ||
413 | .num_consumer_supplies = ARRAY_SIZE(pandora_vdds_supplies), | ||
414 | .consumer_supplies = pandora_vdds_supplies, | ||
415 | }; | 388 | }; |
416 | 389 | ||
417 | /* VAUX1 for LCD */ | 390 | /* VAUX1 for LCD */ |
@@ -425,8 +398,8 @@ static struct regulator_init_data pandora_vaux1 = { | |||
425 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 398 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
426 | | REGULATOR_CHANGE_STATUS, | 399 | | REGULATOR_CHANGE_STATUS, |
427 | }, | 400 | }, |
428 | .num_consumer_supplies = 1, | 401 | .num_consumer_supplies = ARRAY_SIZE(pandora_vcc_lcd_supply), |
429 | .consumer_supplies = &pandora_vcc_lcd_supply, | 402 | .consumer_supplies = pandora_vcc_lcd_supply, |
430 | }; | 403 | }; |
431 | 404 | ||
432 | /* VAUX2 for USB host PHY */ | 405 | /* VAUX2 for USB host PHY */ |
@@ -440,8 +413,8 @@ static struct regulator_init_data pandora_vaux2 = { | |||
440 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 413 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
441 | | REGULATOR_CHANGE_STATUS, | 414 | | REGULATOR_CHANGE_STATUS, |
442 | }, | 415 | }, |
443 | .num_consumer_supplies = 1, | 416 | .num_consumer_supplies = ARRAY_SIZE(pandora_usb_phy_supply), |
444 | .consumer_supplies = &pandora_usb_phy_supply, | 417 | .consumer_supplies = pandora_usb_phy_supply, |
445 | }; | 418 | }; |
446 | 419 | ||
447 | /* VAUX4 for ads7846 and nubs */ | 420 | /* VAUX4 for ads7846 and nubs */ |
@@ -470,8 +443,8 @@ static struct regulator_init_data pandora_vsim = { | |||
470 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 443 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
471 | | REGULATOR_CHANGE_STATUS, | 444 | | REGULATOR_CHANGE_STATUS, |
472 | }, | 445 | }, |
473 | .num_consumer_supplies = 1, | 446 | .num_consumer_supplies = ARRAY_SIZE(pandora_adac_supply), |
474 | .consumer_supplies = &pandora_adac_supply, | 447 | .consumer_supplies = pandora_adac_supply, |
475 | }; | 448 | }; |
476 | 449 | ||
477 | /* Fixed regulator internal to Wifi module */ | 450 | /* Fixed regulator internal to Wifi module */ |
@@ -479,8 +452,8 @@ static struct regulator_init_data pandora_vmmc3 = { | |||
479 | .constraints = { | 452 | .constraints = { |
480 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | 453 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
481 | }, | 454 | }, |
482 | .num_consumer_supplies = 1, | 455 | .num_consumer_supplies = ARRAY_SIZE(pandora_vmmc3_supply), |
483 | .consumer_supplies = &pandora_vmmc3_supply, | 456 | .consumer_supplies = pandora_vmmc3_supply, |
484 | }; | 457 | }; |
485 | 458 | ||
486 | static struct fixed_voltage_config pandora_vwlan = { | 459 | static struct fixed_voltage_config pandora_vwlan = { |
@@ -501,29 +474,12 @@ static struct platform_device pandora_vwlan_device = { | |||
501 | }, | 474 | }, |
502 | }; | 475 | }; |
503 | 476 | ||
504 | static struct twl4030_usb_data omap3pandora_usb_data = { | ||
505 | .usb_mode = T2_USB_MODE_ULPI, | ||
506 | }; | ||
507 | |||
508 | static struct twl4030_codec_audio_data omap3pandora_audio_data; | ||
509 | |||
510 | static struct twl4030_codec_data omap3pandora_codec_data = { | ||
511 | .audio_mclk = 26000000, | ||
512 | .audio = &omap3pandora_audio_data, | ||
513 | }; | ||
514 | |||
515 | static struct twl4030_bci_platform_data pandora_bci_data; | 477 | static struct twl4030_bci_platform_data pandora_bci_data; |
516 | 478 | ||
517 | static struct twl4030_platform_data omap3pandora_twldata = { | 479 | static struct twl4030_platform_data omap3pandora_twldata = { |
518 | .irq_base = TWL4030_IRQ_BASE, | ||
519 | .irq_end = TWL4030_IRQ_END, | ||
520 | .gpio = &omap3pandora_gpio_data, | 480 | .gpio = &omap3pandora_gpio_data, |
521 | .usb = &omap3pandora_usb_data, | ||
522 | .codec = &omap3pandora_codec_data, | ||
523 | .vmmc1 = &pandora_vmmc1, | 481 | .vmmc1 = &pandora_vmmc1, |
524 | .vmmc2 = &pandora_vmmc2, | 482 | .vmmc2 = &pandora_vmmc2, |
525 | .vdac = &pandora_vdac, | ||
526 | .vpll2 = &pandora_vpll2, | ||
527 | .vaux1 = &pandora_vaux1, | 483 | .vaux1 = &pandora_vaux1, |
528 | .vaux2 = &pandora_vaux2, | 484 | .vaux2 = &pandora_vaux2, |
529 | .vaux4 = &pandora_vaux4, | 485 | .vaux4 = &pandora_vaux4, |
@@ -541,6 +497,17 @@ static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = { | |||
541 | 497 | ||
542 | static int __init omap3pandora_i2c_init(void) | 498 | static int __init omap3pandora_i2c_init(void) |
543 | { | 499 | { |
500 | omap3_pmic_get_config(&omap3pandora_twldata, | ||
501 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, | ||
502 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
503 | |||
504 | omap3pandora_twldata.vdac->constraints.apply_uV = true; | ||
505 | |||
506 | omap3pandora_twldata.vpll2->constraints.apply_uV = true; | ||
507 | omap3pandora_twldata.vpll2->num_consumer_supplies = | ||
508 | ARRAY_SIZE(pandora_vdds_supplies); | ||
509 | omap3pandora_twldata.vpll2->consumer_supplies = pandora_vdds_supplies; | ||
510 | |||
544 | omap3_pmic_init("tps65950", &omap3pandora_twldata); | 511 | omap3_pmic_init("tps65950", &omap3pandora_twldata); |
545 | /* i2c2 pins are not connected */ | 512 | /* i2c2 pins are not connected */ |
546 | omap_register_i2c_bus(3, 100, omap3pandora_i2c3_boardinfo, | 513 | omap_register_i2c_bus(3, 100, omap3pandora_i2c3_boardinfo, |
@@ -643,7 +610,7 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console") | |||
643 | .reserve = omap_reserve, | 610 | .reserve = omap_reserve, |
644 | .map_io = omap3_map_io, | 611 | .map_io = omap3_map_io, |
645 | .init_early = omap3pandora_init_early, | 612 | .init_early = omap3pandora_init_early, |
646 | .init_irq = omap_init_irq, | 613 | .init_irq = omap3_init_irq, |
647 | .init_machine = omap3pandora_init, | 614 | .init_machine = omap3pandora_init, |
648 | .timer = &omap_timer, | 615 | .timer = &omap3_timer, |
649 | MACHINE_END | 616 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index 0c108a212ea2..8e104980ea26 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c | |||
@@ -52,7 +52,6 @@ | |||
52 | #include "sdram-micron-mt46h32m32lf-6.h" | 52 | #include "sdram-micron-mt46h32m32lf-6.h" |
53 | #include "mux.h" | 53 | #include "mux.h" |
54 | #include "hsmmc.h" | 54 | #include "hsmmc.h" |
55 | #include "timer-gp.h" | ||
56 | #include "common-board-devices.h" | 55 | #include "common-board-devices.h" |
57 | 56 | ||
58 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) | 57 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) |
@@ -206,12 +205,12 @@ static struct omap_dss_board_info omap3_stalker_dss_data = { | |||
206 | .default_device = &omap3_stalker_dvi_device, | 205 | .default_device = &omap3_stalker_dvi_device, |
207 | }; | 206 | }; |
208 | 207 | ||
209 | static struct regulator_consumer_supply omap3stalker_vmmc1_supply = { | 208 | static struct regulator_consumer_supply omap3stalker_vmmc1_supply[] = { |
210 | .supply = "vmmc", | 209 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
211 | }; | 210 | }; |
212 | 211 | ||
213 | static struct regulator_consumer_supply omap3stalker_vsim_supply = { | 212 | static struct regulator_consumer_supply omap3stalker_vsim_supply[] = { |
214 | .supply = "vmmc_aux", | 213 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), |
215 | }; | 214 | }; |
216 | 215 | ||
217 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | 216 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
@@ -224,8 +223,8 @@ static struct regulator_init_data omap3stalker_vmmc1 = { | |||
224 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | 223 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
225 | | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, | 224 | | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, |
226 | }, | 225 | }, |
227 | .num_consumer_supplies = 1, | 226 | .num_consumer_supplies = ARRAY_SIZE(omap3stalker_vmmc1_supply), |
228 | .consumer_supplies = &omap3stalker_vmmc1_supply, | 227 | .consumer_supplies = omap3stalker_vmmc1_supply, |
229 | }; | 228 | }; |
230 | 229 | ||
231 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ | 230 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ |
@@ -238,8 +237,8 @@ static struct regulator_init_data omap3stalker_vsim = { | |||
238 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | 237 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
239 | | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, | 238 | | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, |
240 | }, | 239 | }, |
241 | .num_consumer_supplies = 1, | 240 | .num_consumer_supplies = ARRAY_SIZE(omap3stalker_vsim_supply), |
242 | .consumer_supplies = &omap3stalker_vsim_supply, | 241 | .consumer_supplies = omap3stalker_vsim_supply, |
243 | }; | 242 | }; |
244 | 243 | ||
245 | static struct omap2_hsmmc_info mmc[] = { | 244 | static struct omap2_hsmmc_info mmc[] = { |
@@ -321,10 +320,6 @@ omap3stalker_twl_gpio_setup(struct device *dev, | |||
321 | mmc[0].gpio_cd = gpio + 0; | 320 | mmc[0].gpio_cd = gpio + 0; |
322 | omap2_hsmmc_init(mmc); | 321 | omap2_hsmmc_init(mmc); |
323 | 322 | ||
324 | /* link regulators to MMC adapters */ | ||
325 | omap3stalker_vmmc1_supply.dev = mmc[0].dev; | ||
326 | omap3stalker_vsim_supply.dev = mmc[0].dev; | ||
327 | |||
328 | /* | 323 | /* |
329 | * Most GPIOs are for USB OTG. Some are mostly sent to | 324 | * Most GPIOs are for USB OTG. Some are mostly sent to |
330 | * the P2 connector; notably LEDA for the LCD backlight. | 325 | * the P2 connector; notably LEDA for the LCD backlight. |
@@ -354,10 +349,6 @@ static struct twl4030_gpio_platform_data omap3stalker_gpio_data = { | |||
354 | .setup = omap3stalker_twl_gpio_setup, | 349 | .setup = omap3stalker_twl_gpio_setup, |
355 | }; | 350 | }; |
356 | 351 | ||
357 | static struct twl4030_usb_data omap3stalker_usb_data = { | ||
358 | .usb_mode = T2_USB_MODE_ULPI, | ||
359 | }; | ||
360 | |||
361 | static uint32_t board_keymap[] = { | 352 | static uint32_t board_keymap[] = { |
362 | KEY(0, 0, KEY_LEFT), | 353 | KEY(0, 0, KEY_LEFT), |
363 | KEY(0, 1, KEY_DOWN), | 354 | KEY(0, 1, KEY_DOWN), |
@@ -392,68 +383,10 @@ static struct twl4030_keypad_data omap3stalker_kp_data = { | |||
392 | .rep = 1, | 383 | .rep = 1, |
393 | }; | 384 | }; |
394 | 385 | ||
395 | static struct twl4030_madc_platform_data omap3stalker_madc_data = { | ||
396 | .irq_line = 1, | ||
397 | }; | ||
398 | |||
399 | static struct twl4030_codec_audio_data omap3stalker_audio_data; | ||
400 | |||
401 | static struct twl4030_codec_data omap3stalker_codec_data = { | ||
402 | .audio_mclk = 26000000, | ||
403 | .audio = &omap3stalker_audio_data, | ||
404 | }; | ||
405 | |||
406 | static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply = | ||
407 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); | ||
408 | |||
409 | /* VDAC for DSS driving S-Video */ | ||
410 | static struct regulator_init_data omap3_stalker_vdac = { | ||
411 | .constraints = { | ||
412 | .min_uV = 1800000, | ||
413 | .max_uV = 1800000, | ||
414 | .apply_uV = true, | ||
415 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
416 | | REGULATOR_MODE_STANDBY, | ||
417 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
418 | | REGULATOR_CHANGE_STATUS, | ||
419 | }, | ||
420 | .num_consumer_supplies = 1, | ||
421 | .consumer_supplies = &omap3_stalker_vdda_dac_supply, | ||
422 | }; | ||
423 | |||
424 | /* VPLL2 for digital video outputs */ | ||
425 | static struct regulator_consumer_supply omap3_stalker_vpll2_supplies[] = { | ||
426 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
427 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
428 | }; | ||
429 | |||
430 | static struct regulator_init_data omap3_stalker_vpll2 = { | ||
431 | .constraints = { | ||
432 | .name = "VDVI", | ||
433 | .min_uV = 1800000, | ||
434 | .max_uV = 1800000, | ||
435 | .apply_uV = true, | ||
436 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
437 | | REGULATOR_MODE_STANDBY, | ||
438 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
439 | | REGULATOR_CHANGE_STATUS, | ||
440 | }, | ||
441 | .num_consumer_supplies = ARRAY_SIZE(omap3_stalker_vpll2_supplies), | ||
442 | .consumer_supplies = omap3_stalker_vpll2_supplies, | ||
443 | }; | ||
444 | |||
445 | static struct twl4030_platform_data omap3stalker_twldata = { | 386 | static struct twl4030_platform_data omap3stalker_twldata = { |
446 | .irq_base = TWL4030_IRQ_BASE, | ||
447 | .irq_end = TWL4030_IRQ_END, | ||
448 | |||
449 | /* platform_data for children goes here */ | 387 | /* platform_data for children goes here */ |
450 | .keypad = &omap3stalker_kp_data, | 388 | .keypad = &omap3stalker_kp_data, |
451 | .madc = &omap3stalker_madc_data, | ||
452 | .usb = &omap3stalker_usb_data, | ||
453 | .gpio = &omap3stalker_gpio_data, | 389 | .gpio = &omap3stalker_gpio_data, |
454 | .codec = &omap3stalker_codec_data, | ||
455 | .vdac = &omap3_stalker_vdac, | ||
456 | .vpll2 = &omap3_stalker_vpll2, | ||
457 | .vmmc1 = &omap3stalker_vmmc1, | 390 | .vmmc1 = &omap3stalker_vmmc1, |
458 | .vsim = &omap3stalker_vsim, | 391 | .vsim = &omap3stalker_vsim, |
459 | }; | 392 | }; |
@@ -474,6 +407,15 @@ static struct i2c_board_info __initdata omap3stalker_i2c_boardinfo3[] = { | |||
474 | 407 | ||
475 | static int __init omap3_stalker_i2c_init(void) | 408 | static int __init omap3_stalker_i2c_init(void) |
476 | { | 409 | { |
410 | omap3_pmic_get_config(&omap3stalker_twldata, | ||
411 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC | | ||
412 | TWL_COMMON_PDATA_AUDIO, | ||
413 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
414 | |||
415 | omap3stalker_twldata.vdac->constraints.apply_uV = true; | ||
416 | omap3stalker_twldata.vpll2->constraints.apply_uV = true; | ||
417 | omap3stalker_twldata.vpll2->constraints.name = "VDVI"; | ||
418 | |||
477 | omap3_pmic_init("twl4030", &omap3stalker_twldata); | 419 | omap3_pmic_init("twl4030", &omap3stalker_twldata); |
478 | omap_register_i2c_bus(2, 400, NULL, 0); | 420 | omap_register_i2c_bus(2, 400, NULL, 0); |
479 | omap_register_i2c_bus(3, 400, omap3stalker_i2c_boardinfo3, | 421 | omap_register_i2c_bus(3, 400, omap3stalker_i2c_boardinfo3, |
@@ -494,10 +436,7 @@ static void __init omap3_stalker_init_early(void) | |||
494 | 436 | ||
495 | static void __init omap3_stalker_init_irq(void) | 437 | static void __init omap3_stalker_init_irq(void) |
496 | { | 438 | { |
497 | omap_init_irq(); | 439 | omap3_init_irq(); |
498 | #ifdef CONFIG_OMAP_32K_TIMER | ||
499 | omap2_gp_clockevent_set_gptimer(12); | ||
500 | #endif | ||
501 | } | 440 | } |
502 | 441 | ||
503 | static struct platform_device *omap3_stalker_devices[] __initdata = { | 442 | static struct platform_device *omap3_stalker_devices[] __initdata = { |
@@ -560,5 +499,5 @@ MACHINE_START(SBC3530, "OMAP3 STALKER") | |||
560 | .init_early = omap3_stalker_init_early, | 499 | .init_early = omap3_stalker_init_early, |
561 | .init_irq = omap3_stalker_init_irq, | 500 | .init_irq = omap3_stalker_init_irq, |
562 | .init_machine = omap3_stalker_init, | 501 | .init_machine = omap3_stalker_init, |
563 | .timer = &omap_timer, | 502 | .timer = &omap3_secure_timer, |
564 | MACHINE_END | 503 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index 5f649faf7377..852ea0464057 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c | |||
@@ -51,7 +51,6 @@ | |||
51 | 51 | ||
52 | #include "mux.h" | 52 | #include "mux.h" |
53 | #include "hsmmc.h" | 53 | #include "hsmmc.h" |
54 | #include "timer-gp.h" | ||
55 | #include "common-board-devices.h" | 54 | #include "common-board-devices.h" |
56 | 55 | ||
57 | #include <asm/setup.h> | 56 | #include <asm/setup.h> |
@@ -114,12 +113,12 @@ static struct omap_lcd_config omap3_touchbook_lcd_config __initdata = { | |||
114 | .ctrl_name = "internal", | 113 | .ctrl_name = "internal", |
115 | }; | 114 | }; |
116 | 115 | ||
117 | static struct regulator_consumer_supply touchbook_vmmc1_supply = { | 116 | static struct regulator_consumer_supply touchbook_vmmc1_supply[] = { |
118 | .supply = "vmmc", | 117 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
119 | }; | 118 | }; |
120 | 119 | ||
121 | static struct regulator_consumer_supply touchbook_vsim_supply = { | 120 | static struct regulator_consumer_supply touchbook_vsim_supply[] = { |
122 | .supply = "vmmc_aux", | 121 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), |
123 | }; | 122 | }; |
124 | 123 | ||
125 | static struct gpio_led gpio_leds[]; | 124 | static struct gpio_led gpio_leds[]; |
@@ -137,10 +136,6 @@ static int touchbook_twl_gpio_setup(struct device *dev, | |||
137 | mmc[0].gpio_cd = gpio + 0; | 136 | mmc[0].gpio_cd = gpio + 0; |
138 | omap2_hsmmc_init(mmc); | 137 | omap2_hsmmc_init(mmc); |
139 | 138 | ||
140 | /* link regulators to MMC adapters */ | ||
141 | touchbook_vmmc1_supply.dev = mmc[0].dev; | ||
142 | touchbook_vsim_supply.dev = mmc[0].dev; | ||
143 | |||
144 | /* REVISIT: need ehci-omap hooks for external VBUS | 139 | /* REVISIT: need ehci-omap hooks for external VBUS |
145 | * power switch and overcurrent detect | 140 | * power switch and overcurrent detect |
146 | */ | 141 | */ |
@@ -167,14 +162,18 @@ static struct twl4030_gpio_platform_data touchbook_gpio_data = { | |||
167 | .setup = touchbook_twl_gpio_setup, | 162 | .setup = touchbook_twl_gpio_setup, |
168 | }; | 163 | }; |
169 | 164 | ||
170 | static struct regulator_consumer_supply touchbook_vdac_supply = { | 165 | static struct regulator_consumer_supply touchbook_vdac_supply[] = { |
166 | { | ||
171 | .supply = "vdac", | 167 | .supply = "vdac", |
172 | .dev = &omap3_touchbook_lcd_device.dev, | 168 | .dev = &omap3_touchbook_lcd_device.dev, |
169 | }, | ||
173 | }; | 170 | }; |
174 | 171 | ||
175 | static struct regulator_consumer_supply touchbook_vdvi_supply = { | 172 | static struct regulator_consumer_supply touchbook_vdvi_supply[] = { |
173 | { | ||
176 | .supply = "vdvi", | 174 | .supply = "vdvi", |
177 | .dev = &omap3_touchbook_lcd_device.dev, | 175 | .dev = &omap3_touchbook_lcd_device.dev, |
176 | }, | ||
178 | }; | 177 | }; |
179 | 178 | ||
180 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | 179 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
@@ -188,8 +187,8 @@ static struct regulator_init_data touchbook_vmmc1 = { | |||
188 | | REGULATOR_CHANGE_MODE | 187 | | REGULATOR_CHANGE_MODE |
189 | | REGULATOR_CHANGE_STATUS, | 188 | | REGULATOR_CHANGE_STATUS, |
190 | }, | 189 | }, |
191 | .num_consumer_supplies = 1, | 190 | .num_consumer_supplies = ARRAY_SIZE(touchbook_vmmc1_supply), |
192 | .consumer_supplies = &touchbook_vmmc1_supply, | 191 | .consumer_supplies = touchbook_vmmc1_supply, |
193 | }; | 192 | }; |
194 | 193 | ||
195 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ | 194 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ |
@@ -203,62 +202,15 @@ static struct regulator_init_data touchbook_vsim = { | |||
203 | | REGULATOR_CHANGE_MODE | 202 | | REGULATOR_CHANGE_MODE |
204 | | REGULATOR_CHANGE_STATUS, | 203 | | REGULATOR_CHANGE_STATUS, |
205 | }, | 204 | }, |
206 | .num_consumer_supplies = 1, | 205 | .num_consumer_supplies = ARRAY_SIZE(touchbook_vsim_supply), |
207 | .consumer_supplies = &touchbook_vsim_supply, | 206 | .consumer_supplies = touchbook_vsim_supply, |
208 | }; | ||
209 | |||
210 | /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ | ||
211 | static struct regulator_init_data touchbook_vdac = { | ||
212 | .constraints = { | ||
213 | .min_uV = 1800000, | ||
214 | .max_uV = 1800000, | ||
215 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
216 | | REGULATOR_MODE_STANDBY, | ||
217 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
218 | | REGULATOR_CHANGE_STATUS, | ||
219 | }, | ||
220 | .num_consumer_supplies = 1, | ||
221 | .consumer_supplies = &touchbook_vdac_supply, | ||
222 | }; | ||
223 | |||
224 | /* VPLL2 for digital video outputs */ | ||
225 | static struct regulator_init_data touchbook_vpll2 = { | ||
226 | .constraints = { | ||
227 | .name = "VDVI", | ||
228 | .min_uV = 1800000, | ||
229 | .max_uV = 1800000, | ||
230 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
231 | | REGULATOR_MODE_STANDBY, | ||
232 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
233 | | REGULATOR_CHANGE_STATUS, | ||
234 | }, | ||
235 | .num_consumer_supplies = 1, | ||
236 | .consumer_supplies = &touchbook_vdvi_supply, | ||
237 | }; | ||
238 | |||
239 | static struct twl4030_usb_data touchbook_usb_data = { | ||
240 | .usb_mode = T2_USB_MODE_ULPI, | ||
241 | }; | ||
242 | |||
243 | static struct twl4030_codec_audio_data touchbook_audio_data; | ||
244 | |||
245 | static struct twl4030_codec_data touchbook_codec_data = { | ||
246 | .audio_mclk = 26000000, | ||
247 | .audio = &touchbook_audio_data, | ||
248 | }; | 207 | }; |
249 | 208 | ||
250 | static struct twl4030_platform_data touchbook_twldata = { | 209 | static struct twl4030_platform_data touchbook_twldata = { |
251 | .irq_base = TWL4030_IRQ_BASE, | ||
252 | .irq_end = TWL4030_IRQ_END, | ||
253 | |||
254 | /* platform_data for children goes here */ | 210 | /* platform_data for children goes here */ |
255 | .usb = &touchbook_usb_data, | ||
256 | .gpio = &touchbook_gpio_data, | 211 | .gpio = &touchbook_gpio_data, |
257 | .codec = &touchbook_codec_data, | ||
258 | .vmmc1 = &touchbook_vmmc1, | 212 | .vmmc1 = &touchbook_vmmc1, |
259 | .vsim = &touchbook_vsim, | 213 | .vsim = &touchbook_vsim, |
260 | .vdac = &touchbook_vdac, | ||
261 | .vpll2 = &touchbook_vpll2, | ||
262 | }; | 214 | }; |
263 | 215 | ||
264 | static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = { | 216 | static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = { |
@@ -270,8 +222,20 @@ static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = { | |||
270 | static int __init omap3_touchbook_i2c_init(void) | 222 | static int __init omap3_touchbook_i2c_init(void) |
271 | { | 223 | { |
272 | /* Standard TouchBook bus */ | 224 | /* Standard TouchBook bus */ |
273 | omap3_pmic_init("twl4030", &touchbook_twldata); | 225 | omap3_pmic_get_config(&touchbook_twldata, |
226 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, | ||
227 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
228 | |||
229 | touchbook_twldata.vdac->num_consumer_supplies = | ||
230 | ARRAY_SIZE(touchbook_vdac_supply); | ||
231 | touchbook_twldata.vdac->consumer_supplies = touchbook_vdac_supply; | ||
274 | 232 | ||
233 | touchbook_twldata.vpll2->constraints.name = "VDVI"; | ||
234 | touchbook_twldata.vpll2->num_consumer_supplies = | ||
235 | ARRAY_SIZE(touchbook_vdvi_supply); | ||
236 | touchbook_twldata.vpll2->consumer_supplies = touchbook_vdvi_supply; | ||
237 | |||
238 | omap3_pmic_init("twl4030", &touchbook_twldata); | ||
275 | /* Additional TouchBook bus */ | 239 | /* Additional TouchBook bus */ |
276 | omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo, | 240 | omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo, |
277 | ARRAY_SIZE(touchBook_i2c_boardinfo)); | 241 | ARRAY_SIZE(touchBook_i2c_boardinfo)); |
@@ -371,10 +335,7 @@ static void __init omap3_touchbook_init_early(void) | |||
371 | 335 | ||
372 | static void __init omap3_touchbook_init_irq(void) | 336 | static void __init omap3_touchbook_init_irq(void) |
373 | { | 337 | { |
374 | omap_init_irq(); | 338 | omap3_init_irq(); |
375 | #ifdef CONFIG_OMAP_32K_TIMER | ||
376 | omap2_gp_clockevent_set_gptimer(12); | ||
377 | #endif | ||
378 | } | 339 | } |
379 | 340 | ||
380 | static struct platform_device *omap3_touchbook_devices[] __initdata = { | 341 | static struct platform_device *omap3_touchbook_devices[] __initdata = { |
@@ -449,5 +410,5 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board") | |||
449 | .init_early = omap3_touchbook_init_early, | 410 | .init_early = omap3_touchbook_init_early, |
450 | .init_irq = omap3_touchbook_init_irq, | 411 | .init_irq = omap3_touchbook_init_irq, |
451 | .init_machine = omap3_touchbook_init, | 412 | .init_machine = omap3_touchbook_init, |
452 | .timer = &omap_timer, | 413 | .timer = &omap3_secure_timer, |
453 | MACHINE_END | 414 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 0cfe2005cb50..9aaa96057666 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <plat/usb.h> | 41 | #include <plat/usb.h> |
42 | #include <plat/mmc.h> | 42 | #include <plat/mmc.h> |
43 | #include <video/omap-panel-generic-dpi.h> | 43 | #include <video/omap-panel-generic-dpi.h> |
44 | #include "timer-gp.h" | ||
45 | 44 | ||
46 | #include "hsmmc.h" | 45 | #include "hsmmc.h" |
47 | #include "control.h" | 46 | #include "control.h" |
@@ -155,14 +154,6 @@ static struct omap_musb_board_data musb_board_data = { | |||
155 | .power = 100, | 154 | .power = 100, |
156 | }; | 155 | }; |
157 | 156 | ||
158 | static struct twl4030_usb_data omap4_usbphy_data = { | ||
159 | .phy_init = omap4430_phy_init, | ||
160 | .phy_exit = omap4430_phy_exit, | ||
161 | .phy_power = omap4430_phy_power, | ||
162 | .phy_set_clock = omap4430_phy_set_clk, | ||
163 | .phy_suspend = omap4430_phy_suspend, | ||
164 | }; | ||
165 | |||
166 | static struct omap2_hsmmc_info mmc[] = { | 157 | static struct omap2_hsmmc_info mmc[] = { |
167 | { | 158 | { |
168 | .mmc = 1, | 159 | .mmc = 1, |
@@ -182,24 +173,16 @@ static struct omap2_hsmmc_info mmc[] = { | |||
182 | {} /* Terminator */ | 173 | {} /* Terminator */ |
183 | }; | 174 | }; |
184 | 175 | ||
185 | static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = { | 176 | static struct regulator_consumer_supply omap4_panda_vmmc5_supply[] = { |
186 | { | 177 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.4"), |
187 | .supply = "vmmc", | ||
188 | .dev_name = "omap_hsmmc.0", | ||
189 | }, | ||
190 | }; | ||
191 | |||
192 | static struct regulator_consumer_supply omap4_panda_vmmc5_supply = { | ||
193 | .supply = "vmmc", | ||
194 | .dev_name = "omap_hsmmc.4", | ||
195 | }; | 178 | }; |
196 | 179 | ||
197 | static struct regulator_init_data panda_vmmc5 = { | 180 | static struct regulator_init_data panda_vmmc5 = { |
198 | .constraints = { | 181 | .constraints = { |
199 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | 182 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
200 | }, | 183 | }, |
201 | .num_consumer_supplies = 1, | 184 | .num_consumer_supplies = ARRAY_SIZE(omap4_panda_vmmc5_supply), |
202 | .consumer_supplies = &omap4_panda_vmmc5_supply, | 185 | .consumer_supplies = omap4_panda_vmmc5_supply, |
203 | }; | 186 | }; |
204 | 187 | ||
205 | static struct fixed_voltage_config panda_vwlan = { | 188 | static struct fixed_voltage_config panda_vwlan = { |
@@ -274,128 +257,8 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers) | |||
274 | return 0; | 257 | return 0; |
275 | } | 258 | } |
276 | 259 | ||
277 | static struct regulator_init_data omap4_panda_vaux2 = { | 260 | /* Panda board uses the common PMIC configuration */ |
278 | .constraints = { | 261 | static struct twl4030_platform_data omap4_panda_twldata; |
279 | .min_uV = 1200000, | ||
280 | .max_uV = 2800000, | ||
281 | .apply_uV = true, | ||
282 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
283 | | REGULATOR_MODE_STANDBY, | ||
284 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
285 | | REGULATOR_CHANGE_MODE | ||
286 | | REGULATOR_CHANGE_STATUS, | ||
287 | }, | ||
288 | }; | ||
289 | |||
290 | static struct regulator_init_data omap4_panda_vaux3 = { | ||
291 | .constraints = { | ||
292 | .min_uV = 1000000, | ||
293 | .max_uV = 3000000, | ||
294 | .apply_uV = true, | ||
295 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
296 | | REGULATOR_MODE_STANDBY, | ||
297 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
298 | | REGULATOR_CHANGE_MODE | ||
299 | | REGULATOR_CHANGE_STATUS, | ||
300 | }, | ||
301 | }; | ||
302 | |||
303 | /* VMMC1 for MMC1 card */ | ||
304 | static struct regulator_init_data omap4_panda_vmmc = { | ||
305 | .constraints = { | ||
306 | .min_uV = 1200000, | ||
307 | .max_uV = 3000000, | ||
308 | .apply_uV = true, | ||
309 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
310 | | REGULATOR_MODE_STANDBY, | ||
311 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
312 | | REGULATOR_CHANGE_MODE | ||
313 | | REGULATOR_CHANGE_STATUS, | ||
314 | }, | ||
315 | .num_consumer_supplies = 1, | ||
316 | .consumer_supplies = omap4_panda_vmmc_supply, | ||
317 | }; | ||
318 | |||
319 | static struct regulator_init_data omap4_panda_vpp = { | ||
320 | .constraints = { | ||
321 | .min_uV = 1800000, | ||
322 | .max_uV = 2500000, | ||
323 | .apply_uV = true, | ||
324 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
325 | | REGULATOR_MODE_STANDBY, | ||
326 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
327 | | REGULATOR_CHANGE_MODE | ||
328 | | REGULATOR_CHANGE_STATUS, | ||
329 | }, | ||
330 | }; | ||
331 | |||
332 | static struct regulator_init_data omap4_panda_vana = { | ||
333 | .constraints = { | ||
334 | .min_uV = 2100000, | ||
335 | .max_uV = 2100000, | ||
336 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
337 | | REGULATOR_MODE_STANDBY, | ||
338 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
339 | | REGULATOR_CHANGE_STATUS, | ||
340 | }, | ||
341 | }; | ||
342 | |||
343 | static struct regulator_init_data omap4_panda_vcxio = { | ||
344 | .constraints = { | ||
345 | .min_uV = 1800000, | ||
346 | .max_uV = 1800000, | ||
347 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
348 | | REGULATOR_MODE_STANDBY, | ||
349 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
350 | | REGULATOR_CHANGE_STATUS, | ||
351 | }, | ||
352 | }; | ||
353 | |||
354 | static struct regulator_init_data omap4_panda_vdac = { | ||
355 | .constraints = { | ||
356 | .min_uV = 1800000, | ||
357 | .max_uV = 1800000, | ||
358 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
359 | | REGULATOR_MODE_STANDBY, | ||
360 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
361 | | REGULATOR_CHANGE_STATUS, | ||
362 | }, | ||
363 | }; | ||
364 | |||
365 | static struct regulator_init_data omap4_panda_vusb = { | ||
366 | .constraints = { | ||
367 | .min_uV = 3300000, | ||
368 | .max_uV = 3300000, | ||
369 | .apply_uV = true, | ||
370 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
371 | | REGULATOR_MODE_STANDBY, | ||
372 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
373 | | REGULATOR_CHANGE_STATUS, | ||
374 | }, | ||
375 | }; | ||
376 | |||
377 | static struct regulator_init_data omap4_panda_clk32kg = { | ||
378 | .constraints = { | ||
379 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
380 | }, | ||
381 | }; | ||
382 | |||
383 | static struct twl4030_platform_data omap4_panda_twldata = { | ||
384 | .irq_base = TWL6030_IRQ_BASE, | ||
385 | .irq_end = TWL6030_IRQ_END, | ||
386 | |||
387 | /* Regulators */ | ||
388 | .vmmc = &omap4_panda_vmmc, | ||
389 | .vpp = &omap4_panda_vpp, | ||
390 | .vana = &omap4_panda_vana, | ||
391 | .vcxio = &omap4_panda_vcxio, | ||
392 | .vdac = &omap4_panda_vdac, | ||
393 | .vusb = &omap4_panda_vusb, | ||
394 | .vaux2 = &omap4_panda_vaux2, | ||
395 | .vaux3 = &omap4_panda_vaux3, | ||
396 | .clk32kg = &omap4_panda_clk32kg, | ||
397 | .usb = &omap4_usbphy_data, | ||
398 | }; | ||
399 | 262 | ||
400 | /* | 263 | /* |
401 | * Display monitor features are burnt in their EEPROM as EDID data. The EEPROM | 264 | * Display monitor features are burnt in their EEPROM as EDID data. The EEPROM |
@@ -409,6 +272,16 @@ static struct i2c_board_info __initdata panda_i2c_eeprom[] = { | |||
409 | 272 | ||
410 | static int __init omap4_panda_i2c_init(void) | 273 | static int __init omap4_panda_i2c_init(void) |
411 | { | 274 | { |
275 | omap4_pmic_get_config(&omap4_panda_twldata, TWL_COMMON_PDATA_USB, | ||
276 | TWL_COMMON_REGULATOR_VDAC | | ||
277 | TWL_COMMON_REGULATOR_VAUX2 | | ||
278 | TWL_COMMON_REGULATOR_VAUX3 | | ||
279 | TWL_COMMON_REGULATOR_VMMC | | ||
280 | TWL_COMMON_REGULATOR_VPP | | ||
281 | TWL_COMMON_REGULATOR_VANA | | ||
282 | TWL_COMMON_REGULATOR_VCXIO | | ||
283 | TWL_COMMON_REGULATOR_VUSB | | ||
284 | TWL_COMMON_REGULATOR_CLK32KG); | ||
412 | omap4_pmic_init("twl6030", &omap4_panda_twldata); | 285 | omap4_pmic_init("twl6030", &omap4_panda_twldata); |
413 | omap_register_i2c_bus(2, 400, NULL, 0); | 286 | omap_register_i2c_bus(2, 400, NULL, 0); |
414 | /* | 287 | /* |
@@ -716,5 +589,5 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board") | |||
716 | .init_early = omap4_panda_init_early, | 589 | .init_early = omap4_panda_init_early, |
717 | .init_irq = gic_init_irq, | 590 | .init_irq = gic_init_irq, |
718 | .init_machine = omap4_panda_init, | 591 | .init_machine = omap4_panda_init, |
719 | .timer = &omap_timer, | 592 | .timer = &omap4_timer, |
720 | MACHINE_END | 593 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 175e1ab2b04d..f1f18d03d24c 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -74,15 +74,16 @@ | |||
74 | defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | 74 | defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) |
75 | 75 | ||
76 | /* fixed regulator for ads7846 */ | 76 | /* fixed regulator for ads7846 */ |
77 | static struct regulator_consumer_supply ads7846_supply = | 77 | static struct regulator_consumer_supply ads7846_supply[] = { |
78 | REGULATOR_SUPPLY("vcc", "spi1.0"); | 78 | REGULATOR_SUPPLY("vcc", "spi1.0"), |
79 | }; | ||
79 | 80 | ||
80 | static struct regulator_init_data vads7846_regulator = { | 81 | static struct regulator_init_data vads7846_regulator = { |
81 | .constraints = { | 82 | .constraints = { |
82 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | 83 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
83 | }, | 84 | }, |
84 | .num_consumer_supplies = 1, | 85 | .num_consumer_supplies = ARRAY_SIZE(ads7846_supply), |
85 | .consumer_supplies = &ads7846_supply, | 86 | .consumer_supplies = ads7846_supply, |
86 | }; | 87 | }; |
87 | 88 | ||
88 | static struct fixed_voltage_config vads7846 = { | 89 | static struct fixed_voltage_config vads7846 = { |
@@ -264,14 +265,6 @@ static struct omap_dss_board_info overo_dss_data = { | |||
264 | .default_device = &overo_dvi_device, | 265 | .default_device = &overo_dvi_device, |
265 | }; | 266 | }; |
266 | 267 | ||
267 | static struct regulator_consumer_supply overo_vdda_dac_supply = | ||
268 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); | ||
269 | |||
270 | static struct regulator_consumer_supply overo_vdds_dsi_supply[] = { | ||
271 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
272 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
273 | }; | ||
274 | |||
275 | static struct mtd_partition overo_nand_partitions[] = { | 268 | static struct mtd_partition overo_nand_partitions[] = { |
276 | { | 269 | { |
277 | .name = "xloader", | 270 | .name = "xloader", |
@@ -319,8 +312,8 @@ static struct omap2_hsmmc_info mmc[] = { | |||
319 | {} /* Terminator */ | 312 | {} /* Terminator */ |
320 | }; | 313 | }; |
321 | 314 | ||
322 | static struct regulator_consumer_supply overo_vmmc1_supply = { | 315 | static struct regulator_consumer_supply overo_vmmc1_supply[] = { |
323 | .supply = "vmmc", | 316 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
324 | }; | 317 | }; |
325 | 318 | ||
326 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) | 319 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) |
@@ -415,8 +408,6 @@ static int overo_twl_gpio_setup(struct device *dev, | |||
415 | { | 408 | { |
416 | omap2_hsmmc_init(mmc); | 409 | omap2_hsmmc_init(mmc); |
417 | 410 | ||
418 | overo_vmmc1_supply.dev = mmc[0].dev; | ||
419 | |||
420 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) | 411 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) |
421 | /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ | 412 | /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ |
422 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; | 413 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; |
@@ -433,10 +424,6 @@ static struct twl4030_gpio_platform_data overo_gpio_data = { | |||
433 | .setup = overo_twl_gpio_setup, | 424 | .setup = overo_twl_gpio_setup, |
434 | }; | 425 | }; |
435 | 426 | ||
436 | static struct twl4030_usb_data overo_usb_data = { | ||
437 | .usb_mode = T2_USB_MODE_ULPI, | ||
438 | }; | ||
439 | |||
440 | static struct regulator_init_data overo_vmmc1 = { | 427 | static struct regulator_init_data overo_vmmc1 = { |
441 | .constraints = { | 428 | .constraints = { |
442 | .min_uV = 1850000, | 429 | .min_uV = 1850000, |
@@ -447,59 +434,23 @@ static struct regulator_init_data overo_vmmc1 = { | |||
447 | | REGULATOR_CHANGE_MODE | 434 | | REGULATOR_CHANGE_MODE |
448 | | REGULATOR_CHANGE_STATUS, | 435 | | REGULATOR_CHANGE_STATUS, |
449 | }, | 436 | }, |
450 | .num_consumer_supplies = 1, | 437 | .num_consumer_supplies = ARRAY_SIZE(overo_vmmc1_supply), |
451 | .consumer_supplies = &overo_vmmc1_supply, | 438 | .consumer_supplies = overo_vmmc1_supply, |
452 | }; | ||
453 | |||
454 | /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ | ||
455 | static struct regulator_init_data overo_vdac = { | ||
456 | .constraints = { | ||
457 | .min_uV = 1800000, | ||
458 | .max_uV = 1800000, | ||
459 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
460 | | REGULATOR_MODE_STANDBY, | ||
461 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
462 | | REGULATOR_CHANGE_STATUS, | ||
463 | }, | ||
464 | .num_consumer_supplies = 1, | ||
465 | .consumer_supplies = &overo_vdda_dac_supply, | ||
466 | }; | ||
467 | |||
468 | /* VPLL2 for digital video outputs */ | ||
469 | static struct regulator_init_data overo_vpll2 = { | ||
470 | .constraints = { | ||
471 | .name = "VDVI", | ||
472 | .min_uV = 1800000, | ||
473 | .max_uV = 1800000, | ||
474 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
475 | | REGULATOR_MODE_STANDBY, | ||
476 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
477 | | REGULATOR_CHANGE_STATUS, | ||
478 | }, | ||
479 | .num_consumer_supplies = ARRAY_SIZE(overo_vdds_dsi_supply), | ||
480 | .consumer_supplies = overo_vdds_dsi_supply, | ||
481 | }; | ||
482 | |||
483 | static struct twl4030_codec_audio_data overo_audio_data; | ||
484 | |||
485 | static struct twl4030_codec_data overo_codec_data = { | ||
486 | .audio_mclk = 26000000, | ||
487 | .audio = &overo_audio_data, | ||
488 | }; | 439 | }; |
489 | 440 | ||
490 | static struct twl4030_platform_data overo_twldata = { | 441 | static struct twl4030_platform_data overo_twldata = { |
491 | .irq_base = TWL4030_IRQ_BASE, | ||
492 | .irq_end = TWL4030_IRQ_END, | ||
493 | .gpio = &overo_gpio_data, | 442 | .gpio = &overo_gpio_data, |
494 | .usb = &overo_usb_data, | ||
495 | .codec = &overo_codec_data, | ||
496 | .vmmc1 = &overo_vmmc1, | 443 | .vmmc1 = &overo_vmmc1, |
497 | .vdac = &overo_vdac, | ||
498 | .vpll2 = &overo_vpll2, | ||
499 | }; | 444 | }; |
500 | 445 | ||
501 | static int __init overo_i2c_init(void) | 446 | static int __init overo_i2c_init(void) |
502 | { | 447 | { |
448 | omap3_pmic_get_config(&overo_twldata, | ||
449 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, | ||
450 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
451 | |||
452 | overo_twldata.vpll2->constraints.name = "VDVI"; | ||
453 | |||
503 | omap3_pmic_init("tps65950", &overo_twldata); | 454 | omap3_pmic_init("tps65950", &overo_twldata); |
504 | /* i2c2 pins are used for gpio */ | 455 | /* i2c2 pins are used for gpio */ |
505 | omap_register_i2c_bus(3, 400, NULL, 0); | 456 | omap_register_i2c_bus(3, 400, NULL, 0); |
@@ -615,7 +566,7 @@ MACHINE_START(OVERO, "Gumstix Overo") | |||
615 | .reserve = omap_reserve, | 566 | .reserve = omap_reserve, |
616 | .map_io = omap3_map_io, | 567 | .map_io = omap3_map_io, |
617 | .init_early = overo_init_early, | 568 | .init_early = overo_init_early, |
618 | .init_irq = omap_init_irq, | 569 | .init_irq = omap3_init_irq, |
619 | .init_machine = overo_init, | 570 | .init_machine = overo_init, |
620 | .timer = &omap_timer, | 571 | .timer = &omap3_timer, |
621 | MACHINE_END | 572 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c index 42d10b12da3c..7dfed24ee12e 100644 --- a/arch/arm/mach-omap2/board-rm680.c +++ b/arch/arm/mach-omap2/board-rm680.c | |||
@@ -79,20 +79,14 @@ static struct twl4030_gpio_platform_data rm680_gpio_data = { | |||
79 | .pulldowns = BIT(1) | BIT(2) | BIT(8) | BIT(15), | 79 | .pulldowns = BIT(1) | BIT(2) | BIT(8) | BIT(15), |
80 | }; | 80 | }; |
81 | 81 | ||
82 | static struct twl4030_usb_data rm680_usb_data = { | ||
83 | .usb_mode = T2_USB_MODE_ULPI, | ||
84 | }; | ||
85 | |||
86 | static struct twl4030_platform_data rm680_twl_data = { | 82 | static struct twl4030_platform_data rm680_twl_data = { |
87 | .irq_base = TWL4030_IRQ_BASE, | ||
88 | .irq_end = TWL4030_IRQ_END, | ||
89 | .gpio = &rm680_gpio_data, | 83 | .gpio = &rm680_gpio_data, |
90 | .usb = &rm680_usb_data, | ||
91 | /* add rest of the children here */ | 84 | /* add rest of the children here */ |
92 | }; | 85 | }; |
93 | 86 | ||
94 | static void __init rm680_i2c_init(void) | 87 | static void __init rm680_i2c_init(void) |
95 | { | 88 | { |
89 | omap3_pmic_get_config(&rm680_twl_data, TWL_COMMON_PDATA_USB, 0); | ||
96 | omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data); | 90 | omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data); |
97 | omap_register_i2c_bus(2, 400, NULL, 0); | 91 | omap_register_i2c_bus(2, 400, NULL, 0); |
98 | omap_register_i2c_bus(3, 400, NULL, 0); | 92 | omap_register_i2c_bus(3, 400, NULL, 0); |
@@ -163,7 +157,7 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board") | |||
163 | .reserve = omap_reserve, | 157 | .reserve = omap_reserve, |
164 | .map_io = rm680_map_io, | 158 | .map_io = rm680_map_io, |
165 | .init_early = rm680_init_early, | 159 | .init_early = rm680_init_early, |
166 | .init_irq = omap_init_irq, | 160 | .init_irq = omap3_init_irq, |
167 | .init_machine = rm680_init, | 161 | .init_machine = rm680_init, |
168 | .timer = &omap_timer, | 162 | .timer = &omap3_timer, |
169 | MACHINE_END | 163 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 88bd6f7705f0..bdb24db36004 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -288,10 +288,6 @@ static struct twl4030_keypad_data rx51_kp_data = { | |||
288 | .rep = 1, | 288 | .rep = 1, |
289 | }; | 289 | }; |
290 | 290 | ||
291 | static struct twl4030_madc_platform_data rx51_madc_data = { | ||
292 | .irq_line = 1, | ||
293 | }; | ||
294 | |||
295 | /* Enable input logic and pull all lines up when eMMC is on. */ | 291 | /* Enable input logic and pull all lines up when eMMC is on. */ |
296 | static struct omap_board_mux rx51_mmc2_on_mux[] = { | 292 | static struct omap_board_mux rx51_mmc2_on_mux[] = { |
297 | OMAP3_MUX(SDMMC2_CMD, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0), | 293 | OMAP3_MUX(SDMMC2_CMD, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0), |
@@ -358,14 +354,17 @@ static struct omap2_hsmmc_info mmc[] __initdata = { | |||
358 | {} /* Terminator */ | 354 | {} /* Terminator */ |
359 | }; | 355 | }; |
360 | 356 | ||
361 | static struct regulator_consumer_supply rx51_vmmc1_supply = | 357 | static struct regulator_consumer_supply rx51_vmmc1_supply[] = { |
362 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); | 358 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
359 | }; | ||
363 | 360 | ||
364 | static struct regulator_consumer_supply rx51_vaux3_supply = | 361 | static struct regulator_consumer_supply rx51_vaux3_supply[] = { |
365 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); | 362 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
363 | }; | ||
366 | 364 | ||
367 | static struct regulator_consumer_supply rx51_vsim_supply = | 365 | static struct regulator_consumer_supply rx51_vsim_supply[] = { |
368 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"); | 366 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"), |
367 | }; | ||
369 | 368 | ||
370 | static struct regulator_consumer_supply rx51_vmmc2_supplies[] = { | 369 | static struct regulator_consumer_supply rx51_vmmc2_supplies[] = { |
371 | /* tlv320aic3x analog supplies */ | 370 | /* tlv320aic3x analog supplies */ |
@@ -395,10 +394,6 @@ static struct regulator_consumer_supply rx51_vaux1_consumers[] = { | |||
395 | REGULATOR_SUPPLY("vdd", "2-0063"), | 394 | REGULATOR_SUPPLY("vdd", "2-0063"), |
396 | }; | 395 | }; |
397 | 396 | ||
398 | static struct regulator_consumer_supply rx51_vdac_supply[] = { | ||
399 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), | ||
400 | }; | ||
401 | |||
402 | static struct regulator_init_data rx51_vaux1 = { | 397 | static struct regulator_init_data rx51_vaux1 = { |
403 | .constraints = { | 398 | .constraints = { |
404 | .name = "V28", | 399 | .name = "V28", |
@@ -452,8 +447,8 @@ static struct regulator_init_data rx51_vaux3_mmc = { | |||
452 | | REGULATOR_CHANGE_MODE | 447 | | REGULATOR_CHANGE_MODE |
453 | | REGULATOR_CHANGE_STATUS, | 448 | | REGULATOR_CHANGE_STATUS, |
454 | }, | 449 | }, |
455 | .num_consumer_supplies = 1, | 450 | .num_consumer_supplies = ARRAY_SIZE(rx51_vaux3_supply), |
456 | .consumer_supplies = &rx51_vaux3_supply, | 451 | .consumer_supplies = rx51_vaux3_supply, |
457 | }; | 452 | }; |
458 | 453 | ||
459 | static struct regulator_init_data rx51_vaux4 = { | 454 | static struct regulator_init_data rx51_vaux4 = { |
@@ -479,8 +474,8 @@ static struct regulator_init_data rx51_vmmc1 = { | |||
479 | | REGULATOR_CHANGE_MODE | 474 | | REGULATOR_CHANGE_MODE |
480 | | REGULATOR_CHANGE_STATUS, | 475 | | REGULATOR_CHANGE_STATUS, |
481 | }, | 476 | }, |
482 | .num_consumer_supplies = 1, | 477 | .num_consumer_supplies = ARRAY_SIZE(rx51_vmmc1_supply), |
483 | .consumer_supplies = &rx51_vmmc1_supply, | 478 | .consumer_supplies = rx51_vmmc1_supply, |
484 | }; | 479 | }; |
485 | 480 | ||
486 | static struct regulator_init_data rx51_vmmc2 = { | 481 | static struct regulator_init_data rx51_vmmc2 = { |
@@ -511,23 +506,8 @@ static struct regulator_init_data rx51_vsim = { | |||
511 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 506 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
512 | | REGULATOR_CHANGE_STATUS, | 507 | | REGULATOR_CHANGE_STATUS, |
513 | }, | 508 | }, |
514 | .num_consumer_supplies = 1, | 509 | .num_consumer_supplies = ARRAY_SIZE(rx51_vsim_supply), |
515 | .consumer_supplies = &rx51_vsim_supply, | 510 | .consumer_supplies = rx51_vsim_supply, |
516 | }; | ||
517 | |||
518 | static struct regulator_init_data rx51_vdac = { | ||
519 | .constraints = { | ||
520 | .name = "VDAC", | ||
521 | .min_uV = 1800000, | ||
522 | .max_uV = 1800000, | ||
523 | .apply_uV = true, | ||
524 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
525 | | REGULATOR_MODE_STANDBY, | ||
526 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
527 | | REGULATOR_CHANGE_STATUS, | ||
528 | }, | ||
529 | .num_consumer_supplies = 1, | ||
530 | .consumer_supplies = rx51_vdac_supply, | ||
531 | }; | 511 | }; |
532 | 512 | ||
533 | static struct regulator_init_data rx51_vio = { | 513 | static struct regulator_init_data rx51_vio = { |
@@ -600,10 +580,6 @@ static struct twl4030_gpio_platform_data rx51_gpio_data = { | |||
600 | .setup = rx51_twlgpio_setup, | 580 | .setup = rx51_twlgpio_setup, |
601 | }; | 581 | }; |
602 | 582 | ||
603 | static struct twl4030_usb_data rx51_usb_data = { | ||
604 | .usb_mode = T2_USB_MODE_ULPI, | ||
605 | }; | ||
606 | |||
607 | static struct twl4030_ins sleep_on_seq[] __initdata = { | 583 | static struct twl4030_ins sleep_on_seq[] __initdata = { |
608 | /* | 584 | /* |
609 | * Turn off everything | 585 | * Turn off everything |
@@ -775,14 +751,9 @@ struct twl4030_codec_data rx51_codec_data __initdata = { | |||
775 | }; | 751 | }; |
776 | 752 | ||
777 | static struct twl4030_platform_data rx51_twldata __initdata = { | 753 | static struct twl4030_platform_data rx51_twldata __initdata = { |
778 | .irq_base = TWL4030_IRQ_BASE, | ||
779 | .irq_end = TWL4030_IRQ_END, | ||
780 | |||
781 | /* platform_data for children goes here */ | 754 | /* platform_data for children goes here */ |
782 | .gpio = &rx51_gpio_data, | 755 | .gpio = &rx51_gpio_data, |
783 | .keypad = &rx51_kp_data, | 756 | .keypad = &rx51_kp_data, |
784 | .madc = &rx51_madc_data, | ||
785 | .usb = &rx51_usb_data, | ||
786 | .power = &rx51_t2scripts_data, | 757 | .power = &rx51_t2scripts_data, |
787 | .codec = &rx51_codec_data, | 758 | .codec = &rx51_codec_data, |
788 | 759 | ||
@@ -791,7 +762,6 @@ static struct twl4030_platform_data rx51_twldata __initdata = { | |||
791 | .vaux4 = &rx51_vaux4, | 762 | .vaux4 = &rx51_vaux4, |
792 | .vmmc1 = &rx51_vmmc1, | 763 | .vmmc1 = &rx51_vmmc1, |
793 | .vsim = &rx51_vsim, | 764 | .vsim = &rx51_vsim, |
794 | .vdac = &rx51_vdac, | ||
795 | .vio = &rx51_vio, | 765 | .vio = &rx51_vio, |
796 | }; | 766 | }; |
797 | 767 | ||
@@ -847,6 +817,13 @@ static int __init rx51_i2c_init(void) | |||
847 | rx51_twldata.vaux3 = &rx51_vaux3_cam; | 817 | rx51_twldata.vaux3 = &rx51_vaux3_cam; |
848 | } | 818 | } |
849 | rx51_twldata.vmmc2 = &rx51_vmmc2; | 819 | rx51_twldata.vmmc2 = &rx51_vmmc2; |
820 | omap3_pmic_get_config(&rx51_twldata, | ||
821 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC, | ||
822 | TWL_COMMON_REGULATOR_VDAC); | ||
823 | |||
824 | rx51_twldata.vdac->constraints.apply_uV = true; | ||
825 | rx51_twldata.vdac->constraints.name = "VDAC"; | ||
826 | |||
850 | omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata); | 827 | omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata); |
851 | omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, | 828 | omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, |
852 | ARRAY_SIZE(rx51_peripherals_i2c_board_info_2)); | 829 | ARRAY_SIZE(rx51_peripherals_i2c_board_info_2)); |
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index fec4cac8fa0a..5ea142f9bc97 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c | |||
@@ -160,7 +160,7 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") | |||
160 | .reserve = rx51_reserve, | 160 | .reserve = rx51_reserve, |
161 | .map_io = rx51_map_io, | 161 | .map_io = rx51_map_io, |
162 | .init_early = rx51_init_early, | 162 | .init_early = rx51_init_early, |
163 | .init_irq = omap_init_irq, | 163 | .init_irq = omap3_init_irq, |
164 | .init_machine = rx51_init, | 164 | .init_machine = rx51_init, |
165 | .timer = &omap_timer, | 165 | .timer = &omap3_timer, |
166 | MACHINE_END | 166 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c index 09fa7bfff8d6..a85d5b0b11da 100644 --- a/arch/arm/mach-omap2/board-ti8168evm.c +++ b/arch/arm/mach-omap2/board-ti8168evm.c | |||
@@ -33,11 +33,6 @@ static void __init ti8168_init_early(void) | |||
33 | omap2_init_common_devices(NULL, NULL); | 33 | omap2_init_common_devices(NULL, NULL); |
34 | } | 34 | } |
35 | 35 | ||
36 | static void __init ti8168_evm_init_irq(void) | ||
37 | { | ||
38 | omap_init_irq(); | ||
39 | } | ||
40 | |||
41 | static void __init ti8168_evm_init(void) | 36 | static void __init ti8168_evm_init(void) |
42 | { | 37 | { |
43 | omap_serial_init(); | 38 | omap_serial_init(); |
@@ -56,7 +51,7 @@ MACHINE_START(TI8168EVM, "ti8168evm") | |||
56 | .boot_params = 0x80000100, | 51 | .boot_params = 0x80000100, |
57 | .map_io = ti8168_evm_map_io, | 52 | .map_io = ti8168_evm_map_io, |
58 | .init_early = ti8168_init_early, | 53 | .init_early = ti8168_init_early, |
59 | .init_irq = ti8168_evm_init_irq, | 54 | .init_irq = ti816x_init_irq, |
60 | .timer = &omap_timer, | 55 | .timer = &omap3_timer, |
61 | .init_machine = ti8168_evm_init, | 56 | .init_machine = ti8168_evm_init, |
62 | MACHINE_END | 57 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index 118c6f53c5eb..13a644233667 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c | |||
@@ -105,21 +105,20 @@ static struct twl4030_keypad_data zoom_kp_twl4030_data = { | |||
105 | .rep = 1, | 105 | .rep = 1, |
106 | }; | 106 | }; |
107 | 107 | ||
108 | static struct regulator_consumer_supply zoom_vmmc1_supply = { | 108 | static struct regulator_consumer_supply zoom_vmmc1_supply[] = { |
109 | .supply = "vmmc", | 109 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), |
110 | }; | 110 | }; |
111 | 111 | ||
112 | static struct regulator_consumer_supply zoom_vsim_supply = { | 112 | static struct regulator_consumer_supply zoom_vsim_supply[] = { |
113 | .supply = "vmmc_aux", | 113 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), |
114 | }; | 114 | }; |
115 | 115 | ||
116 | static struct regulator_consumer_supply zoom_vmmc2_supply = { | 116 | static struct regulator_consumer_supply zoom_vmmc2_supply[] = { |
117 | .supply = "vmmc", | 117 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
118 | }; | 118 | }; |
119 | 119 | ||
120 | static struct regulator_consumer_supply zoom_vmmc3_supply = { | 120 | static struct regulator_consumer_supply zoom_vmmc3_supply[] = { |
121 | .supply = "vmmc", | 121 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"), |
122 | .dev_name = "omap_hsmmc.2", | ||
123 | }; | 122 | }; |
124 | 123 | ||
125 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ | 124 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ |
@@ -133,8 +132,8 @@ static struct regulator_init_data zoom_vmmc1 = { | |||
133 | | REGULATOR_CHANGE_MODE | 132 | | REGULATOR_CHANGE_MODE |
134 | | REGULATOR_CHANGE_STATUS, | 133 | | REGULATOR_CHANGE_STATUS, |
135 | }, | 134 | }, |
136 | .num_consumer_supplies = 1, | 135 | .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc1_supply), |
137 | .consumer_supplies = &zoom_vmmc1_supply, | 136 | .consumer_supplies = zoom_vmmc1_supply, |
138 | }; | 137 | }; |
139 | 138 | ||
140 | /* VMMC2 for MMC2 card */ | 139 | /* VMMC2 for MMC2 card */ |
@@ -148,8 +147,8 @@ static struct regulator_init_data zoom_vmmc2 = { | |||
148 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 147 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
149 | | REGULATOR_CHANGE_STATUS, | 148 | | REGULATOR_CHANGE_STATUS, |
150 | }, | 149 | }, |
151 | .num_consumer_supplies = 1, | 150 | .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc2_supply), |
152 | .consumer_supplies = &zoom_vmmc2_supply, | 151 | .consumer_supplies = zoom_vmmc2_supply, |
153 | }; | 152 | }; |
154 | 153 | ||
155 | /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */ | 154 | /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */ |
@@ -163,16 +162,16 @@ static struct regulator_init_data zoom_vsim = { | |||
163 | | REGULATOR_CHANGE_MODE | 162 | | REGULATOR_CHANGE_MODE |
164 | | REGULATOR_CHANGE_STATUS, | 163 | | REGULATOR_CHANGE_STATUS, |
165 | }, | 164 | }, |
166 | .num_consumer_supplies = 1, | 165 | .num_consumer_supplies = ARRAY_SIZE(zoom_vsim_supply), |
167 | .consumer_supplies = &zoom_vsim_supply, | 166 | .consumer_supplies = zoom_vsim_supply, |
168 | }; | 167 | }; |
169 | 168 | ||
170 | static struct regulator_init_data zoom_vmmc3 = { | 169 | static struct regulator_init_data zoom_vmmc3 = { |
171 | .constraints = { | 170 | .constraints = { |
172 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | 171 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
173 | }, | 172 | }, |
174 | .num_consumer_supplies = 1, | 173 | .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc3_supply), |
175 | .consumer_supplies = &zoom_vmmc3_supply, | 174 | .consumer_supplies = zoom_vmmc3_supply, |
176 | }; | 175 | }; |
177 | 176 | ||
178 | static struct fixed_voltage_config zoom_vwlan = { | 177 | static struct fixed_voltage_config zoom_vwlan = { |
@@ -227,40 +226,6 @@ static struct omap2_hsmmc_info mmc[] = { | |||
227 | {} /* Terminator */ | 226 | {} /* Terminator */ |
228 | }; | 227 | }; |
229 | 228 | ||
230 | static struct regulator_consumer_supply zoom_vpll2_supplies[] = { | ||
231 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
232 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
233 | }; | ||
234 | |||
235 | static struct regulator_consumer_supply zoom_vdda_dac_supply = | ||
236 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); | ||
237 | |||
238 | static struct regulator_init_data zoom_vpll2 = { | ||
239 | .constraints = { | ||
240 | .min_uV = 1800000, | ||
241 | .max_uV = 1800000, | ||
242 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
243 | | REGULATOR_MODE_STANDBY, | ||
244 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
245 | | REGULATOR_CHANGE_STATUS, | ||
246 | }, | ||
247 | .num_consumer_supplies = ARRAY_SIZE(zoom_vpll2_supplies), | ||
248 | .consumer_supplies = zoom_vpll2_supplies, | ||
249 | }; | ||
250 | |||
251 | static struct regulator_init_data zoom_vdac = { | ||
252 | .constraints = { | ||
253 | .min_uV = 1800000, | ||
254 | .max_uV = 1800000, | ||
255 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
256 | | REGULATOR_MODE_STANDBY, | ||
257 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
258 | | REGULATOR_CHANGE_STATUS, | ||
259 | }, | ||
260 | .num_consumer_supplies = 1, | ||
261 | .consumer_supplies = &zoom_vdda_dac_supply, | ||
262 | }; | ||
263 | |||
264 | static int zoom_twl_gpio_setup(struct device *dev, | 229 | static int zoom_twl_gpio_setup(struct device *dev, |
265 | unsigned gpio, unsigned ngpio) | 230 | unsigned gpio, unsigned ngpio) |
266 | { | 231 | { |
@@ -270,13 +235,6 @@ static int zoom_twl_gpio_setup(struct device *dev, | |||
270 | mmc[0].gpio_cd = gpio + 0; | 235 | mmc[0].gpio_cd = gpio + 0; |
271 | omap2_hsmmc_init(mmc); | 236 | omap2_hsmmc_init(mmc); |
272 | 237 | ||
273 | /* link regulators to MMC adapters ... we "know" the | ||
274 | * regulators will be set up only *after* we return. | ||
275 | */ | ||
276 | zoom_vmmc1_supply.dev = mmc[0].dev; | ||
277 | zoom_vsim_supply.dev = mmc[0].dev; | ||
278 | zoom_vmmc2_supply.dev = mmc[1].dev; | ||
279 | |||
280 | ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, | 238 | ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, |
281 | "lcd enable"); | 239 | "lcd enable"); |
282 | if (ret) | 240 | if (ret) |
@@ -292,26 +250,6 @@ static void zoom2_set_hs_extmute(int mute) | |||
292 | gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); | 250 | gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); |
293 | } | 251 | } |
294 | 252 | ||
295 | static int zoom_batt_table[] = { | ||
296 | /* 0 C*/ | ||
297 | 30800, 29500, 28300, 27100, | ||
298 | 26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900, | ||
299 | 17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100, | ||
300 | 11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310, | ||
301 | 8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830, | ||
302 | 5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170, | ||
303 | 4040, 3910, 3790, 3670, 3550 | ||
304 | }; | ||
305 | |||
306 | static struct twl4030_bci_platform_data zoom_bci_data = { | ||
307 | .battery_tmp_tbl = zoom_batt_table, | ||
308 | .tblsize = ARRAY_SIZE(zoom_batt_table), | ||
309 | }; | ||
310 | |||
311 | static struct twl4030_usb_data zoom_usb_data = { | ||
312 | .usb_mode = T2_USB_MODE_ULPI, | ||
313 | }; | ||
314 | |||
315 | static struct twl4030_gpio_platform_data zoom_gpio_data = { | 253 | static struct twl4030_gpio_platform_data zoom_gpio_data = { |
316 | .gpio_base = OMAP_MAX_GPIO_LINES, | 254 | .gpio_base = OMAP_MAX_GPIO_LINES, |
317 | .irq_base = TWL4030_GPIO_IRQ_BASE, | 255 | .irq_base = TWL4030_GPIO_IRQ_BASE, |
@@ -319,41 +257,29 @@ static struct twl4030_gpio_platform_data zoom_gpio_data = { | |||
319 | .setup = zoom_twl_gpio_setup, | 257 | .setup = zoom_twl_gpio_setup, |
320 | }; | 258 | }; |
321 | 259 | ||
322 | static struct twl4030_madc_platform_data zoom_madc_data = { | ||
323 | .irq_line = 1, | ||
324 | }; | ||
325 | |||
326 | static struct twl4030_codec_audio_data zoom_audio_data; | ||
327 | |||
328 | static struct twl4030_codec_data zoom_codec_data = { | ||
329 | .audio_mclk = 26000000, | ||
330 | .audio = &zoom_audio_data, | ||
331 | }; | ||
332 | |||
333 | static struct twl4030_platform_data zoom_twldata = { | 260 | static struct twl4030_platform_data zoom_twldata = { |
334 | .irq_base = TWL4030_IRQ_BASE, | ||
335 | .irq_end = TWL4030_IRQ_END, | ||
336 | |||
337 | /* platform_data for children goes here */ | 261 | /* platform_data for children goes here */ |
338 | .bci = &zoom_bci_data, | ||
339 | .madc = &zoom_madc_data, | ||
340 | .usb = &zoom_usb_data, | ||
341 | .gpio = &zoom_gpio_data, | 262 | .gpio = &zoom_gpio_data, |
342 | .keypad = &zoom_kp_twl4030_data, | 263 | .keypad = &zoom_kp_twl4030_data, |
343 | .codec = &zoom_codec_data, | ||
344 | .vmmc1 = &zoom_vmmc1, | 264 | .vmmc1 = &zoom_vmmc1, |
345 | .vmmc2 = &zoom_vmmc2, | 265 | .vmmc2 = &zoom_vmmc2, |
346 | .vsim = &zoom_vsim, | 266 | .vsim = &zoom_vsim, |
347 | .vpll2 = &zoom_vpll2, | ||
348 | .vdac = &zoom_vdac, | ||
349 | }; | 267 | }; |
350 | 268 | ||
351 | static int __init omap_i2c_init(void) | 269 | static int __init omap_i2c_init(void) |
352 | { | 270 | { |
271 | omap3_pmic_get_config(&zoom_twldata, | ||
272 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI | | ||
273 | TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO, | ||
274 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
275 | |||
353 | if (machine_is_omap_zoom2()) { | 276 | if (machine_is_omap_zoom2()) { |
354 | zoom_audio_data.ramp_delay_value = 3; /* 161 ms */ | 277 | struct twl4030_codec_audio_data *audio_data; |
355 | zoom_audio_data.hs_extmute = 1; | 278 | audio_data = zoom_twldata.codec->audio; |
356 | zoom_audio_data.set_hs_extmute = zoom2_set_hs_extmute; | 279 | |
280 | audio_data->ramp_delay_value = 3; /* 161 ms */ | ||
281 | audio_data->hs_extmute = 1; | ||
282 | audio_data->set_hs_extmute = zoom2_set_hs_extmute; | ||
357 | } | 283 | } |
358 | omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); | 284 | omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); |
359 | omap_register_i2c_bus(2, 400, NULL, 0); | 285 | omap_register_i2c_bus(2, 400, NULL, 0); |
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c index 4b133d75c935..8a98c3c303fc 100644 --- a/arch/arm/mach-omap2/board-zoom.c +++ b/arch/arm/mach-omap2/board-zoom.c | |||
@@ -137,9 +137,9 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board") | |||
137 | .reserve = omap_reserve, | 137 | .reserve = omap_reserve, |
138 | .map_io = omap3_map_io, | 138 | .map_io = omap3_map_io, |
139 | .init_early = omap_zoom_init_early, | 139 | .init_early = omap_zoom_init_early, |
140 | .init_irq = omap_init_irq, | 140 | .init_irq = omap3_init_irq, |
141 | .init_machine = omap_zoom_init, | 141 | .init_machine = omap_zoom_init, |
142 | .timer = &omap_timer, | 142 | .timer = &omap3_timer, |
143 | MACHINE_END | 143 | MACHINE_END |
144 | 144 | ||
145 | MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") | 145 | MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") |
@@ -147,7 +147,7 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") | |||
147 | .reserve = omap_reserve, | 147 | .reserve = omap_reserve, |
148 | .map_io = omap3_map_io, | 148 | .map_io = omap3_map_io, |
149 | .init_early = omap_zoom_init_early, | 149 | .init_early = omap_zoom_init_early, |
150 | .init_irq = omap_init_irq, | 150 | .init_irq = omap3_init_irq, |
151 | .init_machine = omap_zoom_init, | 151 | .init_machine = omap_zoom_init, |
152 | .timer = &omap_timer, | 152 | .timer = &omap3_timer, |
153 | MACHINE_END | 153 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/clock44xx.h b/arch/arm/mach-omap2/clock44xx.h index 6be1095936db..7ceb870e7ab8 100644 --- a/arch/arm/mach-omap2/clock44xx.h +++ b/arch/arm/mach-omap2/clock44xx.h | |||
@@ -8,13 +8,6 @@ | |||
8 | #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H | 8 | #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H |
9 | #define __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H | 9 | #define __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H |
10 | 10 | ||
11 | /* | ||
12 | * XXX Missing values for the OMAP4 DPLL_USB | ||
13 | * XXX Missing min_multiplier values for all OMAP4 DPLLs | ||
14 | */ | ||
15 | #define OMAP4430_MAX_DPLL_MULT 2047 | ||
16 | #define OMAP4430_MAX_DPLL_DIV 128 | ||
17 | |||
18 | int omap4xxx_clk_init(void); | 11 | int omap4xxx_clk_init(void); |
19 | 12 | ||
20 | #endif | 13 | #endif |
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 8c965671b4d4..044df38f65ce 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -53,9 +53,9 @@ static struct clk extalt_clkin_ck = { | |||
53 | static struct clk pad_clks_ck = { | 53 | static struct clk pad_clks_ck = { |
54 | .name = "pad_clks_ck", | 54 | .name = "pad_clks_ck", |
55 | .rate = 12000000, | 55 | .rate = 12000000, |
56 | .ops = &clkops_omap2_dflt, | 56 | .ops = &clkops_omap2_dflt, |
57 | .enable_reg = OMAP4430_CM_CLKSEL_ABE, | 57 | .enable_reg = OMAP4430_CM_CLKSEL_ABE, |
58 | .enable_bit = OMAP4430_PAD_CLKS_GATE_SHIFT, | 58 | .enable_bit = OMAP4430_PAD_CLKS_GATE_SHIFT, |
59 | }; | 59 | }; |
60 | 60 | ||
61 | static struct clk pad_slimbus_core_clks_ck = { | 61 | static struct clk pad_slimbus_core_clks_ck = { |
@@ -73,9 +73,9 @@ static struct clk secure_32k_clk_src_ck = { | |||
73 | static struct clk slimbus_clk = { | 73 | static struct clk slimbus_clk = { |
74 | .name = "slimbus_clk", | 74 | .name = "slimbus_clk", |
75 | .rate = 12000000, | 75 | .rate = 12000000, |
76 | .ops = &clkops_omap2_dflt, | 76 | .ops = &clkops_omap2_dflt, |
77 | .enable_reg = OMAP4430_CM_CLKSEL_ABE, | 77 | .enable_reg = OMAP4430_CM_CLKSEL_ABE, |
78 | .enable_bit = OMAP4430_SLIMBUS_CLK_GATE_SHIFT, | 78 | .enable_bit = OMAP4430_SLIMBUS_CLK_GATE_SHIFT, |
79 | }; | 79 | }; |
80 | 80 | ||
81 | static struct clk sys_32k_ck = { | 81 | static struct clk sys_32k_ck = { |
@@ -258,8 +258,8 @@ static struct dpll_data dpll_abe_dd = { | |||
258 | .enable_mask = OMAP4430_DPLL_EN_MASK, | 258 | .enable_mask = OMAP4430_DPLL_EN_MASK, |
259 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, | 259 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, |
260 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, | 260 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, |
261 | .max_multiplier = OMAP4430_MAX_DPLL_MULT, | 261 | .max_multiplier = 2047, |
262 | .max_divider = OMAP4430_MAX_DPLL_DIV, | 262 | .max_divider = 128, |
263 | .min_divider = 1, | 263 | .min_divider = 1, |
264 | }; | 264 | }; |
265 | 265 | ||
@@ -278,10 +278,10 @@ static struct clk dpll_abe_ck = { | |||
278 | static struct clk dpll_abe_x2_ck = { | 278 | static struct clk dpll_abe_x2_ck = { |
279 | .name = "dpll_abe_x2_ck", | 279 | .name = "dpll_abe_x2_ck", |
280 | .parent = &dpll_abe_ck, | 280 | .parent = &dpll_abe_ck, |
281 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE, | ||
281 | .flags = CLOCK_CLKOUTX2, | 282 | .flags = CLOCK_CLKOUTX2, |
282 | .ops = &clkops_omap4_dpllmx_ops, | 283 | .ops = &clkops_omap4_dpllmx_ops, |
283 | .recalc = &omap3_clkoutx2_recalc, | 284 | .recalc = &omap3_clkoutx2_recalc, |
284 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE, | ||
285 | }; | 285 | }; |
286 | 286 | ||
287 | static const struct clksel_rate div31_1to31_rates[] = { | 287 | static const struct clksel_rate div31_1to31_rates[] = { |
@@ -434,8 +434,8 @@ static struct dpll_data dpll_core_dd = { | |||
434 | .enable_mask = OMAP4430_DPLL_EN_MASK, | 434 | .enable_mask = OMAP4430_DPLL_EN_MASK, |
435 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, | 435 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, |
436 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, | 436 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, |
437 | .max_multiplier = OMAP4430_MAX_DPLL_MULT, | 437 | .max_multiplier = 2047, |
438 | .max_divider = OMAP4430_MAX_DPLL_DIV, | 438 | .max_divider = 128, |
439 | .min_divider = 1, | 439 | .min_divider = 1, |
440 | }; | 440 | }; |
441 | 441 | ||
@@ -622,11 +622,11 @@ static struct clk dpll_core_m3x2_ck = { | |||
622 | .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_CORE, | 622 | .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_CORE, |
623 | .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK, | 623 | .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK, |
624 | .ops = &clkops_omap2_dflt, | 624 | .ops = &clkops_omap2_dflt, |
625 | .enable_reg = OMAP4430_CM_DIV_M3_DPLL_CORE, | ||
626 | .enable_bit = OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT, | ||
627 | .recalc = &omap2_clksel_recalc, | 625 | .recalc = &omap2_clksel_recalc, |
628 | .round_rate = &omap2_clksel_round_rate, | 626 | .round_rate = &omap2_clksel_round_rate, |
629 | .set_rate = &omap2_clksel_set_rate, | 627 | .set_rate = &omap2_clksel_set_rate, |
628 | .enable_reg = OMAP4430_CM_DIV_M3_DPLL_CORE, | ||
629 | .enable_bit = OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT, | ||
630 | }; | 630 | }; |
631 | 631 | ||
632 | static struct clk dpll_core_m7x2_ck = { | 632 | static struct clk dpll_core_m7x2_ck = { |
@@ -672,8 +672,8 @@ static struct dpll_data dpll_iva_dd = { | |||
672 | .enable_mask = OMAP4430_DPLL_EN_MASK, | 672 | .enable_mask = OMAP4430_DPLL_EN_MASK, |
673 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, | 673 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, |
674 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, | 674 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, |
675 | .max_multiplier = OMAP4430_MAX_DPLL_MULT, | 675 | .max_multiplier = 2047, |
676 | .max_divider = OMAP4430_MAX_DPLL_DIV, | 676 | .max_divider = 128, |
677 | .min_divider = 1, | 677 | .min_divider = 1, |
678 | }; | 678 | }; |
679 | 679 | ||
@@ -740,8 +740,8 @@ static struct dpll_data dpll_mpu_dd = { | |||
740 | .enable_mask = OMAP4430_DPLL_EN_MASK, | 740 | .enable_mask = OMAP4430_DPLL_EN_MASK, |
741 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, | 741 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, |
742 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, | 742 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, |
743 | .max_multiplier = OMAP4430_MAX_DPLL_MULT, | 743 | .max_multiplier = 2047, |
744 | .max_divider = OMAP4430_MAX_DPLL_DIV, | 744 | .max_divider = 128, |
745 | .min_divider = 1, | 745 | .min_divider = 1, |
746 | }; | 746 | }; |
747 | 747 | ||
@@ -813,8 +813,8 @@ static struct dpll_data dpll_per_dd = { | |||
813 | .enable_mask = OMAP4430_DPLL_EN_MASK, | 813 | .enable_mask = OMAP4430_DPLL_EN_MASK, |
814 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, | 814 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, |
815 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, | 815 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, |
816 | .max_multiplier = OMAP4430_MAX_DPLL_MULT, | 816 | .max_multiplier = 2047, |
817 | .max_divider = OMAP4430_MAX_DPLL_DIV, | 817 | .max_divider = 128, |
818 | .min_divider = 1, | 818 | .min_divider = 1, |
819 | }; | 819 | }; |
820 | 820 | ||
@@ -850,10 +850,10 @@ static struct clk dpll_per_m2_ck = { | |||
850 | static struct clk dpll_per_x2_ck = { | 850 | static struct clk dpll_per_x2_ck = { |
851 | .name = "dpll_per_x2_ck", | 851 | .name = "dpll_per_x2_ck", |
852 | .parent = &dpll_per_ck, | 852 | .parent = &dpll_per_ck, |
853 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER, | ||
853 | .flags = CLOCK_CLKOUTX2, | 854 | .flags = CLOCK_CLKOUTX2, |
854 | .ops = &clkops_omap4_dpllmx_ops, | 855 | .ops = &clkops_omap4_dpllmx_ops, |
855 | .recalc = &omap3_clkoutx2_recalc, | 856 | .recalc = &omap3_clkoutx2_recalc, |
856 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER, | ||
857 | }; | 857 | }; |
858 | 858 | ||
859 | static const struct clksel dpll_per_m2x2_div[] = { | 859 | static const struct clksel dpll_per_m2x2_div[] = { |
@@ -880,11 +880,11 @@ static struct clk dpll_per_m3x2_ck = { | |||
880 | .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_PER, | 880 | .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_PER, |
881 | .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK, | 881 | .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK, |
882 | .ops = &clkops_omap2_dflt, | 882 | .ops = &clkops_omap2_dflt, |
883 | .enable_reg = OMAP4430_CM_DIV_M3_DPLL_PER, | ||
884 | .enable_bit = OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT, | ||
885 | .recalc = &omap2_clksel_recalc, | 883 | .recalc = &omap2_clksel_recalc, |
886 | .round_rate = &omap2_clksel_round_rate, | 884 | .round_rate = &omap2_clksel_round_rate, |
887 | .set_rate = &omap2_clksel_set_rate, | 885 | .set_rate = &omap2_clksel_set_rate, |
886 | .enable_reg = OMAP4430_CM_DIV_M3_DPLL_PER, | ||
887 | .enable_bit = OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT, | ||
888 | }; | 888 | }; |
889 | 889 | ||
890 | static struct clk dpll_per_m4x2_ck = { | 890 | static struct clk dpll_per_m4x2_ck = { |
@@ -935,63 +935,6 @@ static struct clk dpll_per_m7x2_ck = { | |||
935 | .set_rate = &omap2_clksel_set_rate, | 935 | .set_rate = &omap2_clksel_set_rate, |
936 | }; | 936 | }; |
937 | 937 | ||
938 | /* DPLL_UNIPRO */ | ||
939 | static struct dpll_data dpll_unipro_dd = { | ||
940 | .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_UNIPRO, | ||
941 | .clk_bypass = &sys_clkin_ck, | ||
942 | .clk_ref = &sys_clkin_ck, | ||
943 | .control_reg = OMAP4430_CM_CLKMODE_DPLL_UNIPRO, | ||
944 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), | ||
945 | .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_UNIPRO, | ||
946 | .idlest_reg = OMAP4430_CM_IDLEST_DPLL_UNIPRO, | ||
947 | .mult_mask = OMAP4430_DPLL_MULT_MASK, | ||
948 | .div1_mask = OMAP4430_DPLL_DIV_MASK, | ||
949 | .enable_mask = OMAP4430_DPLL_EN_MASK, | ||
950 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, | ||
951 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, | ||
952 | .sddiv_mask = OMAP4430_DPLL_SD_DIV_MASK, | ||
953 | .max_multiplier = OMAP4430_MAX_DPLL_MULT, | ||
954 | .max_divider = OMAP4430_MAX_DPLL_DIV, | ||
955 | .min_divider = 1, | ||
956 | }; | ||
957 | |||
958 | |||
959 | static struct clk dpll_unipro_ck = { | ||
960 | .name = "dpll_unipro_ck", | ||
961 | .parent = &sys_clkin_ck, | ||
962 | .dpll_data = &dpll_unipro_dd, | ||
963 | .init = &omap2_init_dpll_parent, | ||
964 | .ops = &clkops_omap3_noncore_dpll_ops, | ||
965 | .recalc = &omap3_dpll_recalc, | ||
966 | .round_rate = &omap2_dpll_round_rate, | ||
967 | .set_rate = &omap3_noncore_dpll_set_rate, | ||
968 | }; | ||
969 | |||
970 | static struct clk dpll_unipro_x2_ck = { | ||
971 | .name = "dpll_unipro_x2_ck", | ||
972 | .parent = &dpll_unipro_ck, | ||
973 | .flags = CLOCK_CLKOUTX2, | ||
974 | .ops = &clkops_null, | ||
975 | .recalc = &omap3_clkoutx2_recalc, | ||
976 | }; | ||
977 | |||
978 | static const struct clksel dpll_unipro_m2x2_div[] = { | ||
979 | { .parent = &dpll_unipro_x2_ck, .rates = div31_1to31_rates }, | ||
980 | { .parent = NULL }, | ||
981 | }; | ||
982 | |||
983 | static struct clk dpll_unipro_m2x2_ck = { | ||
984 | .name = "dpll_unipro_m2x2_ck", | ||
985 | .parent = &dpll_unipro_x2_ck, | ||
986 | .clksel = dpll_unipro_m2x2_div, | ||
987 | .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_UNIPRO, | ||
988 | .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, | ||
989 | .ops = &clkops_omap4_dpllmx_ops, | ||
990 | .recalc = &omap2_clksel_recalc, | ||
991 | .round_rate = &omap2_clksel_round_rate, | ||
992 | .set_rate = &omap2_clksel_set_rate, | ||
993 | }; | ||
994 | |||
995 | static struct clk usb_hs_clk_div_ck = { | 938 | static struct clk usb_hs_clk_div_ck = { |
996 | .name = "usb_hs_clk_div_ck", | 939 | .name = "usb_hs_clk_div_ck", |
997 | .parent = &dpll_abe_m3x2_ck, | 940 | .parent = &dpll_abe_m3x2_ck, |
@@ -1015,8 +958,9 @@ static struct dpll_data dpll_usb_dd = { | |||
1015 | .enable_mask = OMAP4430_DPLL_EN_MASK, | 958 | .enable_mask = OMAP4430_DPLL_EN_MASK, |
1016 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, | 959 | .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, |
1017 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, | 960 | .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, |
1018 | .max_multiplier = OMAP4430_MAX_DPLL_MULT, | 961 | .sddiv_mask = OMAP4430_DPLL_SD_DIV_MASK, |
1019 | .max_divider = OMAP4430_MAX_DPLL_DIV, | 962 | .max_multiplier = 4095, |
963 | .max_divider = 256, | ||
1020 | .min_divider = 1, | 964 | .min_divider = 1, |
1021 | }; | 965 | }; |
1022 | 966 | ||
@@ -1035,8 +979,8 @@ static struct clk dpll_usb_ck = { | |||
1035 | static struct clk dpll_usb_clkdcoldo_ck = { | 979 | static struct clk dpll_usb_clkdcoldo_ck = { |
1036 | .name = "dpll_usb_clkdcoldo_ck", | 980 | .name = "dpll_usb_clkdcoldo_ck", |
1037 | .parent = &dpll_usb_ck, | 981 | .parent = &dpll_usb_ck, |
1038 | .ops = &clkops_omap4_dpllmx_ops, | ||
1039 | .clksel_reg = OMAP4430_CM_CLKDCOLDO_DPLL_USB, | 982 | .clksel_reg = OMAP4430_CM_CLKDCOLDO_DPLL_USB, |
983 | .ops = &clkops_omap4_dpllmx_ops, | ||
1040 | .recalc = &followparent_recalc, | 984 | .recalc = &followparent_recalc, |
1041 | }; | 985 | }; |
1042 | 986 | ||
@@ -1169,19 +1113,6 @@ static struct clk func_96m_fclk = { | |||
1169 | .set_rate = &omap2_clksel_set_rate, | 1113 | .set_rate = &omap2_clksel_set_rate, |
1170 | }; | 1114 | }; |
1171 | 1115 | ||
1172 | static const struct clksel hsmmc6_fclk_sel[] = { | ||
1173 | { .parent = &func_64m_fclk, .rates = div_1_0_rates }, | ||
1174 | { .parent = &func_96m_fclk, .rates = div_1_1_rates }, | ||
1175 | { .parent = NULL }, | ||
1176 | }; | ||
1177 | |||
1178 | static struct clk hsmmc6_fclk = { | ||
1179 | .name = "hsmmc6_fclk", | ||
1180 | .parent = &func_64m_fclk, | ||
1181 | .ops = &clkops_null, | ||
1182 | .recalc = &followparent_recalc, | ||
1183 | }; | ||
1184 | |||
1185 | static const struct clksel_rate div2_1to8_rates[] = { | 1116 | static const struct clksel_rate div2_1to8_rates[] = { |
1186 | { .div = 1, .val = 0, .flags = RATE_IN_4430 }, | 1117 | { .div = 1, .val = 0, .flags = RATE_IN_4430 }, |
1187 | { .div = 8, .val = 1, .flags = RATE_IN_4430 }, | 1118 | { .div = 8, .val = 1, .flags = RATE_IN_4430 }, |
@@ -1264,6 +1195,21 @@ static struct clk l4_wkup_clk_mux_ck = { | |||
1264 | .recalc = &omap2_clksel_recalc, | 1195 | .recalc = &omap2_clksel_recalc, |
1265 | }; | 1196 | }; |
1266 | 1197 | ||
1198 | static struct clk ocp_abe_iclk = { | ||
1199 | .name = "ocp_abe_iclk", | ||
1200 | .parent = &aess_fclk, | ||
1201 | .ops = &clkops_null, | ||
1202 | .recalc = &followparent_recalc, | ||
1203 | }; | ||
1204 | |||
1205 | static struct clk per_abe_24m_fclk = { | ||
1206 | .name = "per_abe_24m_fclk", | ||
1207 | .parent = &dpll_abe_m2_ck, | ||
1208 | .ops = &clkops_null, | ||
1209 | .fixed_div = 4, | ||
1210 | .recalc = &omap_fixed_divisor_recalc, | ||
1211 | }; | ||
1212 | |||
1267 | static const struct clksel per_abe_nc_fclk_div[] = { | 1213 | static const struct clksel per_abe_nc_fclk_div[] = { |
1268 | { .parent = &dpll_abe_m2_ck, .rates = div2_1to2_rates }, | 1214 | { .parent = &dpll_abe_m2_ck, .rates = div2_1to2_rates }, |
1269 | { .parent = NULL }, | 1215 | { .parent = NULL }, |
@@ -1281,41 +1227,6 @@ static struct clk per_abe_nc_fclk = { | |||
1281 | .set_rate = &omap2_clksel_set_rate, | 1227 | .set_rate = &omap2_clksel_set_rate, |
1282 | }; | 1228 | }; |
1283 | 1229 | ||
1284 | static const struct clksel mcasp2_fclk_sel[] = { | ||
1285 | { .parent = &func_96m_fclk, .rates = div_1_0_rates }, | ||
1286 | { .parent = &per_abe_nc_fclk, .rates = div_1_1_rates }, | ||
1287 | { .parent = NULL }, | ||
1288 | }; | ||
1289 | |||
1290 | static struct clk mcasp2_fclk = { | ||
1291 | .name = "mcasp2_fclk", | ||
1292 | .parent = &func_96m_fclk, | ||
1293 | .ops = &clkops_null, | ||
1294 | .recalc = &followparent_recalc, | ||
1295 | }; | ||
1296 | |||
1297 | static struct clk mcasp3_fclk = { | ||
1298 | .name = "mcasp3_fclk", | ||
1299 | .parent = &func_96m_fclk, | ||
1300 | .ops = &clkops_null, | ||
1301 | .recalc = &followparent_recalc, | ||
1302 | }; | ||
1303 | |||
1304 | static struct clk ocp_abe_iclk = { | ||
1305 | .name = "ocp_abe_iclk", | ||
1306 | .parent = &aess_fclk, | ||
1307 | .ops = &clkops_null, | ||
1308 | .recalc = &followparent_recalc, | ||
1309 | }; | ||
1310 | |||
1311 | static struct clk per_abe_24m_fclk = { | ||
1312 | .name = "per_abe_24m_fclk", | ||
1313 | .parent = &dpll_abe_m2_ck, | ||
1314 | .ops = &clkops_null, | ||
1315 | .fixed_div = 4, | ||
1316 | .recalc = &omap_fixed_divisor_recalc, | ||
1317 | }; | ||
1318 | |||
1319 | static const struct clksel pmd_stm_clock_mux_sel[] = { | 1230 | static const struct clksel pmd_stm_clock_mux_sel[] = { |
1320 | { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, | 1231 | { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, |
1321 | { .parent = &dpll_core_m6x2_ck, .rates = div_1_1_rates }, | 1232 | { .parent = &dpll_core_m6x2_ck, .rates = div_1_1_rates }, |
@@ -1846,8 +1757,8 @@ static struct clk l3_instr_ick = { | |||
1846 | .ops = &clkops_omap2_dflt, | 1757 | .ops = &clkops_omap2_dflt, |
1847 | .enable_reg = OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL, | 1758 | .enable_reg = OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL, |
1848 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 1759 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
1849 | .clkdm_name = "l3_instr_clkdm", | ||
1850 | .flags = ENABLE_ON_INIT, | 1760 | .flags = ENABLE_ON_INIT, |
1761 | .clkdm_name = "l3_instr_clkdm", | ||
1851 | .parent = &l3_div_ck, | 1762 | .parent = &l3_div_ck, |
1852 | .recalc = &followparent_recalc, | 1763 | .recalc = &followparent_recalc, |
1853 | }; | 1764 | }; |
@@ -1857,8 +1768,8 @@ static struct clk l3_main_3_ick = { | |||
1857 | .ops = &clkops_omap2_dflt, | 1768 | .ops = &clkops_omap2_dflt, |
1858 | .enable_reg = OMAP4430_CM_L3INSTR_L3_3_CLKCTRL, | 1769 | .enable_reg = OMAP4430_CM_L3INSTR_L3_3_CLKCTRL, |
1859 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 1770 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
1860 | .clkdm_name = "l3_instr_clkdm", | ||
1861 | .flags = ENABLE_ON_INIT, | 1771 | .flags = ENABLE_ON_INIT, |
1772 | .clkdm_name = "l3_instr_clkdm", | ||
1862 | .parent = &l3_div_ck, | 1773 | .parent = &l3_div_ck, |
1863 | .recalc = &followparent_recalc, | 1774 | .recalc = &followparent_recalc, |
1864 | }; | 1775 | }; |
@@ -1995,10 +1906,16 @@ static struct clk mcbsp3_fck = { | |||
1995 | .clkdm_name = "abe_clkdm", | 1906 | .clkdm_name = "abe_clkdm", |
1996 | }; | 1907 | }; |
1997 | 1908 | ||
1909 | static const struct clksel mcbsp4_sync_mux_sel[] = { | ||
1910 | { .parent = &func_96m_fclk, .rates = div_1_0_rates }, | ||
1911 | { .parent = &per_abe_nc_fclk, .rates = div_1_1_rates }, | ||
1912 | { .parent = NULL }, | ||
1913 | }; | ||
1914 | |||
1998 | static struct clk mcbsp4_sync_mux_ck = { | 1915 | static struct clk mcbsp4_sync_mux_ck = { |
1999 | .name = "mcbsp4_sync_mux_ck", | 1916 | .name = "mcbsp4_sync_mux_ck", |
2000 | .parent = &func_96m_fclk, | 1917 | .parent = &func_96m_fclk, |
2001 | .clksel = mcasp2_fclk_sel, | 1918 | .clksel = mcbsp4_sync_mux_sel, |
2002 | .init = &omap2_init_clksel_parent, | 1919 | .init = &omap2_init_clksel_parent, |
2003 | .clksel_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL, | 1920 | .clksel_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL, |
2004 | .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK, | 1921 | .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK, |
@@ -2077,11 +1994,17 @@ static struct clk mcspi4_fck = { | |||
2077 | .recalc = &followparent_recalc, | 1994 | .recalc = &followparent_recalc, |
2078 | }; | 1995 | }; |
2079 | 1996 | ||
1997 | static const struct clksel hsmmc1_fclk_sel[] = { | ||
1998 | { .parent = &func_64m_fclk, .rates = div_1_0_rates }, | ||
1999 | { .parent = &func_96m_fclk, .rates = div_1_1_rates }, | ||
2000 | { .parent = NULL }, | ||
2001 | }; | ||
2002 | |||
2080 | /* Merged hsmmc1_fclk into mmc1 */ | 2003 | /* Merged hsmmc1_fclk into mmc1 */ |
2081 | static struct clk mmc1_fck = { | 2004 | static struct clk mmc1_fck = { |
2082 | .name = "mmc1_fck", | 2005 | .name = "mmc1_fck", |
2083 | .parent = &func_64m_fclk, | 2006 | .parent = &func_64m_fclk, |
2084 | .clksel = hsmmc6_fclk_sel, | 2007 | .clksel = hsmmc1_fclk_sel, |
2085 | .init = &omap2_init_clksel_parent, | 2008 | .init = &omap2_init_clksel_parent, |
2086 | .clksel_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL, | 2009 | .clksel_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL, |
2087 | .clksel_mask = OMAP4430_CLKSEL_MASK, | 2010 | .clksel_mask = OMAP4430_CLKSEL_MASK, |
@@ -2096,7 +2019,7 @@ static struct clk mmc1_fck = { | |||
2096 | static struct clk mmc2_fck = { | 2019 | static struct clk mmc2_fck = { |
2097 | .name = "mmc2_fck", | 2020 | .name = "mmc2_fck", |
2098 | .parent = &func_64m_fclk, | 2021 | .parent = &func_64m_fclk, |
2099 | .clksel = hsmmc6_fclk_sel, | 2022 | .clksel = hsmmc1_fclk_sel, |
2100 | .init = &omap2_init_clksel_parent, | 2023 | .init = &omap2_init_clksel_parent, |
2101 | .clksel_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL, | 2024 | .clksel_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL, |
2102 | .clksel_mask = OMAP4430_CLKSEL_MASK, | 2025 | .clksel_mask = OMAP4430_CLKSEL_MASK, |
@@ -2162,8 +2085,8 @@ static struct clk ocp_wp_noc_ick = { | |||
2162 | .ops = &clkops_omap2_dflt, | 2085 | .ops = &clkops_omap2_dflt, |
2163 | .enable_reg = OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL, | 2086 | .enable_reg = OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL, |
2164 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, | 2087 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
2165 | .clkdm_name = "l3_instr_clkdm", | ||
2166 | .flags = ENABLE_ON_INIT, | 2088 | .flags = ENABLE_ON_INIT, |
2089 | .clkdm_name = "l3_instr_clkdm", | ||
2167 | .parent = &l3_div_ck, | 2090 | .parent = &l3_div_ck, |
2168 | .recalc = &followparent_recalc, | 2091 | .recalc = &followparent_recalc, |
2169 | }; | 2092 | }; |
@@ -2895,6 +2818,7 @@ static struct clk auxclk2_ck = { | |||
2895 | .enable_reg = OMAP4_SCRM_AUXCLK2, | 2818 | .enable_reg = OMAP4_SCRM_AUXCLK2, |
2896 | .enable_bit = OMAP4_ENABLE_SHIFT, | 2819 | .enable_bit = OMAP4_ENABLE_SHIFT, |
2897 | }; | 2820 | }; |
2821 | |||
2898 | static struct clk auxclk3_ck = { | 2822 | static struct clk auxclk3_ck = { |
2899 | .name = "auxclk3_ck", | 2823 | .name = "auxclk3_ck", |
2900 | .parent = &sys_clkin_ck, | 2824 | .parent = &sys_clkin_ck, |
@@ -3077,9 +3001,6 @@ static struct omap_clk omap44xx_clks[] = { | |||
3077 | CLK(NULL, "dpll_per_m5x2_ck", &dpll_per_m5x2_ck, CK_443X), | 3001 | CLK(NULL, "dpll_per_m5x2_ck", &dpll_per_m5x2_ck, CK_443X), |
3078 | CLK(NULL, "dpll_per_m6x2_ck", &dpll_per_m6x2_ck, CK_443X), | 3002 | CLK(NULL, "dpll_per_m6x2_ck", &dpll_per_m6x2_ck, CK_443X), |
3079 | CLK(NULL, "dpll_per_m7x2_ck", &dpll_per_m7x2_ck, CK_443X), | 3003 | CLK(NULL, "dpll_per_m7x2_ck", &dpll_per_m7x2_ck, CK_443X), |
3080 | CLK(NULL, "dpll_unipro_ck", &dpll_unipro_ck, CK_443X), | ||
3081 | CLK(NULL, "dpll_unipro_x2_ck", &dpll_unipro_x2_ck, CK_443X), | ||
3082 | CLK(NULL, "dpll_unipro_m2x2_ck", &dpll_unipro_m2x2_ck, CK_443X), | ||
3083 | CLK(NULL, "usb_hs_clk_div_ck", &usb_hs_clk_div_ck, CK_443X), | 3004 | CLK(NULL, "usb_hs_clk_div_ck", &usb_hs_clk_div_ck, CK_443X), |
3084 | CLK(NULL, "dpll_usb_ck", &dpll_usb_ck, CK_443X), | 3005 | CLK(NULL, "dpll_usb_ck", &dpll_usb_ck, CK_443X), |
3085 | CLK(NULL, "dpll_usb_clkdcoldo_ck", &dpll_usb_clkdcoldo_ck, CK_443X), | 3006 | CLK(NULL, "dpll_usb_clkdcoldo_ck", &dpll_usb_clkdcoldo_ck, CK_443X), |
@@ -3092,17 +3013,14 @@ static struct omap_clk omap44xx_clks[] = { | |||
3092 | CLK(NULL, "func_48mc_fclk", &func_48mc_fclk, CK_443X), | 3013 | CLK(NULL, "func_48mc_fclk", &func_48mc_fclk, CK_443X), |
3093 | CLK(NULL, "func_64m_fclk", &func_64m_fclk, CK_443X), | 3014 | CLK(NULL, "func_64m_fclk", &func_64m_fclk, CK_443X), |
3094 | CLK(NULL, "func_96m_fclk", &func_96m_fclk, CK_443X), | 3015 | CLK(NULL, "func_96m_fclk", &func_96m_fclk, CK_443X), |
3095 | CLK(NULL, "hsmmc6_fclk", &hsmmc6_fclk, CK_443X), | ||
3096 | CLK(NULL, "init_60m_fclk", &init_60m_fclk, CK_443X), | 3016 | CLK(NULL, "init_60m_fclk", &init_60m_fclk, CK_443X), |
3097 | CLK(NULL, "l3_div_ck", &l3_div_ck, CK_443X), | 3017 | CLK(NULL, "l3_div_ck", &l3_div_ck, CK_443X), |
3098 | CLK(NULL, "l4_div_ck", &l4_div_ck, CK_443X), | 3018 | CLK(NULL, "l4_div_ck", &l4_div_ck, CK_443X), |
3099 | CLK(NULL, "lp_clk_div_ck", &lp_clk_div_ck, CK_443X), | 3019 | CLK(NULL, "lp_clk_div_ck", &lp_clk_div_ck, CK_443X), |
3100 | CLK(NULL, "l4_wkup_clk_mux_ck", &l4_wkup_clk_mux_ck, CK_443X), | 3020 | CLK(NULL, "l4_wkup_clk_mux_ck", &l4_wkup_clk_mux_ck, CK_443X), |
3101 | CLK(NULL, "per_abe_nc_fclk", &per_abe_nc_fclk, CK_443X), | ||
3102 | CLK(NULL, "mcasp2_fclk", &mcasp2_fclk, CK_443X), | ||
3103 | CLK(NULL, "mcasp3_fclk", &mcasp3_fclk, CK_443X), | ||
3104 | CLK(NULL, "ocp_abe_iclk", &ocp_abe_iclk, CK_443X), | 3021 | CLK(NULL, "ocp_abe_iclk", &ocp_abe_iclk, CK_443X), |
3105 | CLK(NULL, "per_abe_24m_fclk", &per_abe_24m_fclk, CK_443X), | 3022 | CLK(NULL, "per_abe_24m_fclk", &per_abe_24m_fclk, CK_443X), |
3023 | CLK(NULL, "per_abe_nc_fclk", &per_abe_nc_fclk, CK_443X), | ||
3106 | CLK(NULL, "pmd_stm_clock_mux_ck", &pmd_stm_clock_mux_ck, CK_443X), | 3024 | CLK(NULL, "pmd_stm_clock_mux_ck", &pmd_stm_clock_mux_ck, CK_443X), |
3107 | CLK(NULL, "pmd_trace_clk_mux_ck", &pmd_trace_clk_mux_ck, CK_443X), | 3025 | CLK(NULL, "pmd_trace_clk_mux_ck", &pmd_trace_clk_mux_ck, CK_443X), |
3108 | CLK(NULL, "syc_clk_div_ck", &syc_clk_div_ck, CK_443X), | 3026 | CLK(NULL, "syc_clk_div_ck", &syc_clk_div_ck, CK_443X), |
@@ -3204,7 +3122,6 @@ static struct omap_clk omap44xx_clks[] = { | |||
3204 | CLK(NULL, "uart2_fck", &uart2_fck, CK_443X), | 3122 | CLK(NULL, "uart2_fck", &uart2_fck, CK_443X), |
3205 | CLK(NULL, "uart3_fck", &uart3_fck, CK_443X), | 3123 | CLK(NULL, "uart3_fck", &uart3_fck, CK_443X), |
3206 | CLK(NULL, "uart4_fck", &uart4_fck, CK_443X), | 3124 | CLK(NULL, "uart4_fck", &uart4_fck, CK_443X), |
3207 | CLK(NULL, "usb_host_fs_fck", &usb_host_fs_fck, CK_443X), | ||
3208 | CLK("usbhs-omap.0", "fs_fck", &usb_host_fs_fck, CK_443X), | 3125 | CLK("usbhs-omap.0", "fs_fck", &usb_host_fs_fck, CK_443X), |
3209 | CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X), | 3126 | CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X), |
3210 | CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X), | 3127 | CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X), |
@@ -3216,9 +3133,7 @@ static struct omap_clk omap44xx_clks[] = { | |||
3216 | CLK(NULL, "usb_host_hs_hsic60m_p2_clk", &usb_host_hs_hsic60m_p2_clk, CK_443X), | 3133 | CLK(NULL, "usb_host_hs_hsic60m_p2_clk", &usb_host_hs_hsic60m_p2_clk, CK_443X), |
3217 | CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X), | 3134 | CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X), |
3218 | CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X), | 3135 | CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X), |
3219 | CLK(NULL, "usb_host_hs_fck", &usb_host_hs_fck, CK_443X), | ||
3220 | CLK("usbhs-omap.0", "hs_fck", &usb_host_hs_fck, CK_443X), | 3136 | CLK("usbhs-omap.0", "hs_fck", &usb_host_hs_fck, CK_443X), |
3221 | CLK("usbhs-omap.0", "usbhost_ick", &dummy_ck, CK_443X), | ||
3222 | CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X), | 3137 | CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X), |
3223 | CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X), | 3138 | CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X), |
3224 | CLK("musb-omap2430", "ick", &usb_otg_hs_ick, CK_443X), | 3139 | CLK("musb-omap2430", "ick", &usb_otg_hs_ick, CK_443X), |
@@ -3226,17 +3141,26 @@ static struct omap_clk omap44xx_clks[] = { | |||
3226 | CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X), | 3141 | CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X), |
3227 | CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X), | 3142 | CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X), |
3228 | CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X), | 3143 | CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X), |
3229 | CLK(NULL, "usb_tll_hs_ick", &usb_tll_hs_ick, CK_443X), | ||
3230 | CLK("usbhs-omap.0", "usbtll_ick", &usb_tll_hs_ick, CK_443X), | 3144 | CLK("usbhs-omap.0", "usbtll_ick", &usb_tll_hs_ick, CK_443X), |
3231 | CLK("usbhs-omap.0", "usbtll_fck", &dummy_ck, CK_443X), | ||
3232 | CLK(NULL, "usim_ck", &usim_ck, CK_443X), | 3145 | CLK(NULL, "usim_ck", &usim_ck, CK_443X), |
3233 | CLK(NULL, "usim_fclk", &usim_fclk, CK_443X), | 3146 | CLK(NULL, "usim_fclk", &usim_fclk, CK_443X), |
3234 | CLK(NULL, "usim_fck", &usim_fck, CK_443X), | 3147 | CLK(NULL, "usim_fck", &usim_fck, CK_443X), |
3235 | CLK("omap_wdt", "fck", &wd_timer2_fck, CK_443X), | 3148 | CLK("omap_wdt", "fck", &wd_timer2_fck, CK_443X), |
3236 | CLK(NULL, "mailboxes_ick", &dummy_ck, CK_443X), | ||
3237 | CLK(NULL, "wd_timer3_fck", &wd_timer3_fck, CK_443X), | 3149 | CLK(NULL, "wd_timer3_fck", &wd_timer3_fck, CK_443X), |
3238 | CLK(NULL, "stm_clk_div_ck", &stm_clk_div_ck, CK_443X), | 3150 | CLK(NULL, "stm_clk_div_ck", &stm_clk_div_ck, CK_443X), |
3239 | CLK(NULL, "trace_clk_div_ck", &trace_clk_div_ck, CK_443X), | 3151 | CLK(NULL, "trace_clk_div_ck", &trace_clk_div_ck, CK_443X), |
3152 | CLK(NULL, "auxclk0_ck", &auxclk0_ck, CK_443X), | ||
3153 | CLK(NULL, "auxclk1_ck", &auxclk1_ck, CK_443X), | ||
3154 | CLK(NULL, "auxclk2_ck", &auxclk2_ck, CK_443X), | ||
3155 | CLK(NULL, "auxclk3_ck", &auxclk3_ck, CK_443X), | ||
3156 | CLK(NULL, "auxclk4_ck", &auxclk4_ck, CK_443X), | ||
3157 | CLK(NULL, "auxclk5_ck", &auxclk5_ck, CK_443X), | ||
3158 | CLK(NULL, "auxclkreq0_ck", &auxclkreq0_ck, CK_443X), | ||
3159 | CLK(NULL, "auxclkreq1_ck", &auxclkreq1_ck, CK_443X), | ||
3160 | CLK(NULL, "auxclkreq2_ck", &auxclkreq2_ck, CK_443X), | ||
3161 | CLK(NULL, "auxclkreq3_ck", &auxclkreq3_ck, CK_443X), | ||
3162 | CLK(NULL, "auxclkreq4_ck", &auxclkreq4_ck, CK_443X), | ||
3163 | CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck, CK_443X), | ||
3240 | CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X), | 3164 | CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X), |
3241 | CLK(NULL, "gpt1_ick", &dummy_ck, CK_443X), | 3165 | CLK(NULL, "gpt1_ick", &dummy_ck, CK_443X), |
3242 | CLK(NULL, "gpt2_ick", &dummy_ck, CK_443X), | 3166 | CLK(NULL, "gpt2_ick", &dummy_ck, CK_443X), |
@@ -3253,6 +3177,7 @@ static struct omap_clk omap44xx_clks[] = { | |||
3253 | CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X), | 3177 | CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X), |
3254 | CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X), | 3178 | CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X), |
3255 | CLK("omap_i2c.4", "ick", &dummy_ck, CK_443X), | 3179 | CLK("omap_i2c.4", "ick", &dummy_ck, CK_443X), |
3180 | CLK(NULL, "mailboxes_ick", &dummy_ck, CK_443X), | ||
3256 | CLK("omap_hsmmc.0", "ick", &dummy_ck, CK_443X), | 3181 | CLK("omap_hsmmc.0", "ick", &dummy_ck, CK_443X), |
3257 | CLK("omap_hsmmc.1", "ick", &dummy_ck, CK_443X), | 3182 | CLK("omap_hsmmc.1", "ick", &dummy_ck, CK_443X), |
3258 | CLK("omap_hsmmc.2", "ick", &dummy_ck, CK_443X), | 3183 | CLK("omap_hsmmc.2", "ick", &dummy_ck, CK_443X), |
@@ -3270,19 +3195,9 @@ static struct omap_clk omap44xx_clks[] = { | |||
3270 | CLK(NULL, "uart2_ick", &dummy_ck, CK_443X), | 3195 | CLK(NULL, "uart2_ick", &dummy_ck, CK_443X), |
3271 | CLK(NULL, "uart3_ick", &dummy_ck, CK_443X), | 3196 | CLK(NULL, "uart3_ick", &dummy_ck, CK_443X), |
3272 | CLK(NULL, "uart4_ick", &dummy_ck, CK_443X), | 3197 | CLK(NULL, "uart4_ick", &dummy_ck, CK_443X), |
3198 | CLK("usbhs-omap.0", "usbhost_ick", &dummy_ck, CK_443X), | ||
3199 | CLK("usbhs-omap.0", "usbtll_fck", &dummy_ck, CK_443X), | ||
3273 | CLK("omap_wdt", "ick", &dummy_ck, CK_443X), | 3200 | CLK("omap_wdt", "ick", &dummy_ck, CK_443X), |
3274 | CLK(NULL, "auxclk0_ck", &auxclk0_ck, CK_443X), | ||
3275 | CLK(NULL, "auxclk1_ck", &auxclk1_ck, CK_443X), | ||
3276 | CLK(NULL, "auxclk2_ck", &auxclk2_ck, CK_443X), | ||
3277 | CLK(NULL, "auxclk3_ck", &auxclk3_ck, CK_443X), | ||
3278 | CLK(NULL, "auxclk4_ck", &auxclk4_ck, CK_443X), | ||
3279 | CLK(NULL, "auxclk5_ck", &auxclk5_ck, CK_443X), | ||
3280 | CLK(NULL, "auxclkreq0_ck", &auxclkreq0_ck, CK_443X), | ||
3281 | CLK(NULL, "auxclkreq1_ck", &auxclkreq1_ck, CK_443X), | ||
3282 | CLK(NULL, "auxclkreq2_ck", &auxclkreq2_ck, CK_443X), | ||
3283 | CLK(NULL, "auxclkreq3_ck", &auxclkreq3_ck, CK_443X), | ||
3284 | CLK(NULL, "auxclkreq4_ck", &auxclkreq4_ck, CK_443X), | ||
3285 | CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck, CK_443X), | ||
3286 | }; | 3201 | }; |
3287 | 3202 | ||
3288 | int __init omap4xxx_clk_init(void) | 3203 | int __init omap4xxx_clk_init(void) |
diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c b/arch/arm/mach-omap2/clockdomains44xx_data.c index a607ec196e8b..66090f2676ce 100644 --- a/arch/arm/mach-omap2/clockdomains44xx_data.c +++ b/arch/arm/mach-omap2/clockdomains44xx_data.c | |||
@@ -1,11 +1,12 @@ | |||
1 | /* | 1 | /* |
2 | * OMAP4 Clock domains framework | 2 | * OMAP4 Clock domains framework |
3 | * | 3 | * |
4 | * Copyright (C) 2009 Texas Instruments, Inc. | 4 | * Copyright (C) 2009-2011 Texas Instruments, Inc. |
5 | * Copyright (C) 2009 Nokia Corporation | 5 | * Copyright (C) 2009-2011 Nokia Corporation |
6 | * | 6 | * |
7 | * Abhijit Pagare (abhijitpagare@ti.com) | 7 | * Abhijit Pagare (abhijitpagare@ti.com) |
8 | * Benoit Cousson (b-cousson@ti.com) | 8 | * Benoit Cousson (b-cousson@ti.com) |
9 | * Paul Walmsley (paul@pwsan.com) | ||
9 | * | 10 | * |
10 | * This file is automatically generated from the OMAP hardware databases. | 11 | * This file is automatically generated from the OMAP hardware databases. |
11 | * We respectfully ask that any modifications to this file be coordinated | 12 | * We respectfully ask that any modifications to this file be coordinated |
@@ -32,7 +33,7 @@ | |||
32 | 33 | ||
33 | /* Static Dependencies for OMAP4 Clock Domains */ | 34 | /* Static Dependencies for OMAP4 Clock Domains */ |
34 | 35 | ||
35 | static struct clkdm_dep ducati_wkup_sleep_deps[] = { | 36 | static struct clkdm_dep d2d_wkup_sleep_deps[] = { |
36 | { | 37 | { |
37 | .clkdm_name = "abe_clkdm", | 38 | .clkdm_name = "abe_clkdm", |
38 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 39 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
@@ -50,103 +51,103 @@ static struct clkdm_dep ducati_wkup_sleep_deps[] = { | |||
50 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 51 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
51 | }, | 52 | }, |
52 | { | 53 | { |
53 | .clkdm_name = "l3_dss_clkdm", | 54 | .clkdm_name = "l3_emif_clkdm", |
54 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 55 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
55 | }, | 56 | }, |
56 | { | 57 | { |
57 | .clkdm_name = "l3_emif_clkdm", | 58 | .clkdm_name = "l3_init_clkdm", |
58 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 59 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
59 | }, | 60 | }, |
60 | { | 61 | { |
61 | .clkdm_name = "l3_gfx_clkdm", | 62 | .clkdm_name = "l4_cfg_clkdm", |
62 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 63 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
63 | }, | 64 | }, |
64 | { | 65 | { |
65 | .clkdm_name = "l3_init_clkdm", | 66 | .clkdm_name = "l4_per_clkdm", |
66 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 67 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
67 | }, | 68 | }, |
69 | { NULL }, | ||
70 | }; | ||
71 | |||
72 | static struct clkdm_dep ducati_wkup_sleep_deps[] = { | ||
68 | { | 73 | { |
69 | .clkdm_name = "l4_cfg_clkdm", | 74 | .clkdm_name = "abe_clkdm", |
70 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 75 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
71 | }, | 76 | }, |
72 | { | 77 | { |
73 | .clkdm_name = "l4_per_clkdm", | 78 | .clkdm_name = "ivahd_clkdm", |
74 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 79 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
75 | }, | 80 | }, |
76 | { | 81 | { |
77 | .clkdm_name = "l4_secure_clkdm", | 82 | .clkdm_name = "l3_1_clkdm", |
78 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 83 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
79 | }, | 84 | }, |
80 | { | 85 | { |
81 | .clkdm_name = "l4_wkup_clkdm", | 86 | .clkdm_name = "l3_2_clkdm", |
82 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 87 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
83 | }, | 88 | }, |
84 | { | 89 | { |
85 | .clkdm_name = "tesla_clkdm", | 90 | .clkdm_name = "l3_dss_clkdm", |
86 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 91 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
87 | }, | 92 | }, |
88 | { NULL }, | ||
89 | }; | ||
90 | |||
91 | static struct clkdm_dep iss_wkup_sleep_deps[] = { | ||
92 | { | 93 | { |
93 | .clkdm_name = "ivahd_clkdm", | 94 | .clkdm_name = "l3_emif_clkdm", |
94 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 95 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
95 | }, | 96 | }, |
96 | { | 97 | { |
97 | .clkdm_name = "l3_1_clkdm", | 98 | .clkdm_name = "l3_gfx_clkdm", |
98 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 99 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
99 | }, | 100 | }, |
100 | { | 101 | { |
101 | .clkdm_name = "l3_emif_clkdm", | 102 | .clkdm_name = "l3_init_clkdm", |
102 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 103 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
103 | }, | 104 | }, |
104 | { NULL }, | ||
105 | }; | ||
106 | |||
107 | static struct clkdm_dep ivahd_wkup_sleep_deps[] = { | ||
108 | { | 105 | { |
109 | .clkdm_name = "l3_1_clkdm", | 106 | .clkdm_name = "l4_cfg_clkdm", |
110 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 107 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
111 | }, | 108 | }, |
112 | { | 109 | { |
113 | .clkdm_name = "l3_emif_clkdm", | 110 | .clkdm_name = "l4_per_clkdm", |
114 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 111 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
115 | }, | 112 | }, |
116 | { NULL }, | ||
117 | }; | ||
118 | |||
119 | static struct clkdm_dep l3_d2d_wkup_sleep_deps[] = { | ||
120 | { | 113 | { |
121 | .clkdm_name = "abe_clkdm", | 114 | .clkdm_name = "l4_secure_clkdm", |
122 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 115 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
123 | }, | 116 | }, |
124 | { | 117 | { |
125 | .clkdm_name = "ivahd_clkdm", | 118 | .clkdm_name = "l4_wkup_clkdm", |
126 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 119 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
127 | }, | 120 | }, |
128 | { | 121 | { |
129 | .clkdm_name = "l3_1_clkdm", | 122 | .clkdm_name = "tesla_clkdm", |
130 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 123 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
131 | }, | 124 | }, |
125 | { NULL }, | ||
126 | }; | ||
127 | |||
128 | static struct clkdm_dep iss_wkup_sleep_deps[] = { | ||
132 | { | 129 | { |
133 | .clkdm_name = "l3_2_clkdm", | 130 | .clkdm_name = "ivahd_clkdm", |
134 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 131 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
135 | }, | 132 | }, |
136 | { | 133 | { |
137 | .clkdm_name = "l3_emif_clkdm", | 134 | .clkdm_name = "l3_1_clkdm", |
138 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 135 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
139 | }, | 136 | }, |
140 | { | 137 | { |
141 | .clkdm_name = "l3_init_clkdm", | 138 | .clkdm_name = "l3_emif_clkdm", |
142 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 139 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
143 | }, | 140 | }, |
141 | { NULL }, | ||
142 | }; | ||
143 | |||
144 | static struct clkdm_dep ivahd_wkup_sleep_deps[] = { | ||
144 | { | 145 | { |
145 | .clkdm_name = "l4_cfg_clkdm", | 146 | .clkdm_name = "l3_1_clkdm", |
146 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 147 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
147 | }, | 148 | }, |
148 | { | 149 | { |
149 | .clkdm_name = "l4_per_clkdm", | 150 | .clkdm_name = "l3_emif_clkdm", |
150 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 151 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
151 | }, | 152 | }, |
152 | { NULL }, | 153 | { NULL }, |
@@ -280,7 +281,7 @@ static struct clkdm_dep l4_secure_wkup_sleep_deps[] = { | |||
280 | { NULL }, | 281 | { NULL }, |
281 | }; | 282 | }; |
282 | 283 | ||
283 | static struct clkdm_dep mpuss_wkup_sleep_deps[] = { | 284 | static struct clkdm_dep mpu_wkup_sleep_deps[] = { |
284 | { | 285 | { |
285 | .clkdm_name = "abe_clkdm", | 286 | .clkdm_name = "abe_clkdm", |
286 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) | 287 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) |
@@ -497,14 +498,14 @@ static struct clockdomain l3_init_44xx_clkdm = { | |||
497 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 498 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
498 | }; | 499 | }; |
499 | 500 | ||
500 | static struct clockdomain mpuss_44xx_clkdm = { | 501 | static struct clockdomain d2d_44xx_clkdm = { |
501 | .name = "mpuss_clkdm", | 502 | .name = "d2d_clkdm", |
502 | .pwrdm = { .name = "mpu_pwrdm" }, | 503 | .pwrdm = { .name = "core_pwrdm" }, |
503 | .prcm_partition = OMAP4430_CM1_PARTITION, | 504 | .prcm_partition = OMAP4430_CM2_PARTITION, |
504 | .cm_inst = OMAP4430_CM1_MPU_INST, | 505 | .cm_inst = OMAP4430_CM2_CORE_INST, |
505 | .clkdm_offs = OMAP4430_CM1_MPU_MPU_CDOFFS, | 506 | .clkdm_offs = OMAP4430_CM2_CORE_D2D_CDOFFS, |
506 | .wkdep_srcs = mpuss_wkup_sleep_deps, | 507 | .wkdep_srcs = d2d_wkup_sleep_deps, |
507 | .sleepdep_srcs = mpuss_wkup_sleep_deps, | 508 | .sleepdep_srcs = d2d_wkup_sleep_deps, |
508 | .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, | 509 | .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, |
509 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 510 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
510 | }; | 511 | }; |
@@ -563,6 +564,18 @@ static struct clockdomain ducati_44xx_clkdm = { | |||
563 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 564 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
564 | }; | 565 | }; |
565 | 566 | ||
567 | static struct clockdomain mpu_44xx_clkdm = { | ||
568 | .name = "mpu_clkdm", | ||
569 | .pwrdm = { .name = "mpu_pwrdm" }, | ||
570 | .prcm_partition = OMAP4430_CM1_PARTITION, | ||
571 | .cm_inst = OMAP4430_CM1_MPU_INST, | ||
572 | .clkdm_offs = OMAP4430_CM1_MPU_MPU_CDOFFS, | ||
573 | .wkdep_srcs = mpu_wkup_sleep_deps, | ||
574 | .sleepdep_srcs = mpu_wkup_sleep_deps, | ||
575 | .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, | ||
576 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
577 | }; | ||
578 | |||
566 | static struct clockdomain l3_2_44xx_clkdm = { | 579 | static struct clockdomain l3_2_44xx_clkdm = { |
567 | .name = "l3_2_clkdm", | 580 | .name = "l3_2_clkdm", |
568 | .pwrdm = { .name = "core_pwrdm" }, | 581 | .pwrdm = { .name = "core_pwrdm" }, |
@@ -585,18 +598,6 @@ static struct clockdomain l3_1_44xx_clkdm = { | |||
585 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 598 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
586 | }; | 599 | }; |
587 | 600 | ||
588 | static struct clockdomain l3_d2d_44xx_clkdm = { | ||
589 | .name = "l3_d2d_clkdm", | ||
590 | .pwrdm = { .name = "core_pwrdm" }, | ||
591 | .prcm_partition = OMAP4430_CM2_PARTITION, | ||
592 | .cm_inst = OMAP4430_CM2_CORE_INST, | ||
593 | .clkdm_offs = OMAP4430_CM2_CORE_D2D_CDOFFS, | ||
594 | .wkdep_srcs = l3_d2d_wkup_sleep_deps, | ||
595 | .sleepdep_srcs = l3_d2d_wkup_sleep_deps, | ||
596 | .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, | ||
597 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
598 | }; | ||
599 | |||
600 | static struct clockdomain iss_44xx_clkdm = { | 601 | static struct clockdomain iss_44xx_clkdm = { |
601 | .name = "iss_clkdm", | 602 | .name = "iss_clkdm", |
602 | .pwrdm = { .name = "cam_pwrdm" }, | 603 | .pwrdm = { .name = "cam_pwrdm" }, |
@@ -655,6 +656,7 @@ static struct clockdomain l3_dma_44xx_clkdm = { | |||
655 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 656 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
656 | }; | 657 | }; |
657 | 658 | ||
659 | /* As clockdomains are added or removed above, this list must also be changed */ | ||
658 | static struct clockdomain *clockdomains_omap44xx[] __initdata = { | 660 | static struct clockdomain *clockdomains_omap44xx[] __initdata = { |
659 | &l4_cefuse_44xx_clkdm, | 661 | &l4_cefuse_44xx_clkdm, |
660 | &l4_cfg_44xx_clkdm, | 662 | &l4_cfg_44xx_clkdm, |
@@ -666,21 +668,21 @@ static struct clockdomain *clockdomains_omap44xx[] __initdata = { | |||
666 | &abe_44xx_clkdm, | 668 | &abe_44xx_clkdm, |
667 | &l3_instr_44xx_clkdm, | 669 | &l3_instr_44xx_clkdm, |
668 | &l3_init_44xx_clkdm, | 670 | &l3_init_44xx_clkdm, |
669 | &mpuss_44xx_clkdm, | 671 | &d2d_44xx_clkdm, |
670 | &mpu0_44xx_clkdm, | 672 | &mpu0_44xx_clkdm, |
671 | &mpu1_44xx_clkdm, | 673 | &mpu1_44xx_clkdm, |
672 | &l3_emif_44xx_clkdm, | 674 | &l3_emif_44xx_clkdm, |
673 | &l4_ao_44xx_clkdm, | 675 | &l4_ao_44xx_clkdm, |
674 | &ducati_44xx_clkdm, | 676 | &ducati_44xx_clkdm, |
677 | &mpu_44xx_clkdm, | ||
675 | &l3_2_44xx_clkdm, | 678 | &l3_2_44xx_clkdm, |
676 | &l3_1_44xx_clkdm, | 679 | &l3_1_44xx_clkdm, |
677 | &l3_d2d_44xx_clkdm, | ||
678 | &iss_44xx_clkdm, | 680 | &iss_44xx_clkdm, |
679 | &l3_dss_44xx_clkdm, | 681 | &l3_dss_44xx_clkdm, |
680 | &l4_wkup_44xx_clkdm, | 682 | &l4_wkup_44xx_clkdm, |
681 | &emu_sys_44xx_clkdm, | 683 | &emu_sys_44xx_clkdm, |
682 | &l3_dma_44xx_clkdm, | 684 | &l3_dma_44xx_clkdm, |
683 | NULL, | 685 | NULL |
684 | }; | 686 | }; |
685 | 687 | ||
686 | void __init omap44xx_clockdomains_init(void) | 688 | void __init omap44xx_clockdomains_init(void) |
diff --git a/arch/arm/mach-omap2/cm-regbits-44xx.h b/arch/arm/mach-omap2/cm-regbits-44xx.h index 9d47a05b17b4..0e77945d26ec 100644 --- a/arch/arm/mach-omap2/cm-regbits-44xx.h +++ b/arch/arm/mach-omap2/cm-regbits-44xx.h | |||
@@ -22,22 +22,18 @@ | |||
22 | #ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_44XX_H | 22 | #ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_44XX_H |
23 | #define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_44XX_H | 23 | #define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_44XX_H |
24 | 24 | ||
25 | /* | 25 | /* Used by CM_L3_1_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP */ |
26 | * Used by CM_L3_1_DYNAMICDEP, CM_L3_1_DYNAMICDEP_RESTORE, CM_MPU_DYNAMICDEP, | ||
27 | * CM_TESLA_DYNAMICDEP | ||
28 | */ | ||
29 | #define OMAP4430_ABE_DYNDEP_SHIFT 3 | 26 | #define OMAP4430_ABE_DYNDEP_SHIFT 3 |
30 | #define OMAP4430_ABE_DYNDEP_MASK (1 << 3) | 27 | #define OMAP4430_ABE_DYNDEP_MASK (1 << 3) |
31 | 28 | ||
32 | /* | 29 | /* |
33 | * Used by CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, CM_DUCATI_STATICDEP, | 30 | * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, |
34 | * CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, | 31 | * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
35 | * CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP | ||
36 | */ | 32 | */ |
37 | #define OMAP4430_ABE_STATDEP_SHIFT 3 | 33 | #define OMAP4430_ABE_STATDEP_SHIFT 3 |
38 | #define OMAP4430_ABE_STATDEP_MASK (1 << 3) | 34 | #define OMAP4430_ABE_STATDEP_MASK (1 << 3) |
39 | 35 | ||
40 | /* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */ | 36 | /* Used by CM_L4CFG_DYNAMICDEP */ |
41 | #define OMAP4430_ALWONCORE_DYNDEP_SHIFT 16 | 37 | #define OMAP4430_ALWONCORE_DYNDEP_SHIFT 16 |
42 | #define OMAP4430_ALWONCORE_DYNDEP_MASK (1 << 16) | 38 | #define OMAP4430_ALWONCORE_DYNDEP_MASK (1 << 16) |
43 | 39 | ||
@@ -47,14 +43,13 @@ | |||
47 | 43 | ||
48 | /* | 44 | /* |
49 | * Used by CM_AUTOIDLE_DPLL_ABE, CM_AUTOIDLE_DPLL_CORE, | 45 | * Used by CM_AUTOIDLE_DPLL_ABE, CM_AUTOIDLE_DPLL_CORE, |
50 | * CM_AUTOIDLE_DPLL_CORE_RESTORE, CM_AUTOIDLE_DPLL_DDRPHY, | 46 | * CM_AUTOIDLE_DPLL_DDRPHY, CM_AUTOIDLE_DPLL_IVA, CM_AUTOIDLE_DPLL_MPU, |
51 | * CM_AUTOIDLE_DPLL_IVA, CM_AUTOIDLE_DPLL_MPU, CM_AUTOIDLE_DPLL_PER, | 47 | * CM_AUTOIDLE_DPLL_PER, CM_AUTOIDLE_DPLL_UNIPRO, CM_AUTOIDLE_DPLL_USB |
52 | * CM_AUTOIDLE_DPLL_UNIPRO, CM_AUTOIDLE_DPLL_USB | ||
53 | */ | 48 | */ |
54 | #define OMAP4430_AUTO_DPLL_MODE_SHIFT 0 | 49 | #define OMAP4430_AUTO_DPLL_MODE_SHIFT 0 |
55 | #define OMAP4430_AUTO_DPLL_MODE_MASK (0x7 << 0) | 50 | #define OMAP4430_AUTO_DPLL_MODE_MASK (0x7 << 0) |
56 | 51 | ||
57 | /* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */ | 52 | /* Used by CM_L4CFG_DYNAMICDEP */ |
58 | #define OMAP4430_CEFUSE_DYNDEP_SHIFT 17 | 53 | #define OMAP4430_CEFUSE_DYNDEP_SHIFT 17 |
59 | #define OMAP4430_CEFUSE_DYNDEP_MASK (1 << 17) | 54 | #define OMAP4430_CEFUSE_DYNDEP_MASK (1 << 17) |
60 | 55 | ||
@@ -82,15 +77,15 @@ | |||
82 | #define OMAP4430_CLKACTIVITY_ABE_X2_CLK_SHIFT 8 | 77 | #define OMAP4430_CLKACTIVITY_ABE_X2_CLK_SHIFT 8 |
83 | #define OMAP4430_CLKACTIVITY_ABE_X2_CLK_MASK (1 << 8) | 78 | #define OMAP4430_CLKACTIVITY_ABE_X2_CLK_MASK (1 << 8) |
84 | 79 | ||
85 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ | 80 | /* Used by CM_MEMIF_CLKSTCTRL */ |
86 | #define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_SHIFT 11 | 81 | #define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_SHIFT 11 |
87 | #define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_MASK (1 << 11) | 82 | #define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_MASK (1 << 11) |
88 | 83 | ||
89 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ | 84 | /* Used by CM_MEMIF_CLKSTCTRL */ |
90 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_SHIFT 12 | 85 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_SHIFT 12 |
91 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_MASK (1 << 12) | 86 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_MASK (1 << 12) |
92 | 87 | ||
93 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ | 88 | /* Used by CM_MEMIF_CLKSTCTRL */ |
94 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_SHIFT 13 | 89 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_SHIFT 13 |
95 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_MASK (1 << 13) | 90 | #define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_MASK (1 << 13) |
96 | 91 | ||
@@ -110,31 +105,31 @@ | |||
110 | #define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT 9 | 105 | #define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT 9 |
111 | #define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK (1 << 9) | 106 | #define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK (1 << 9) |
112 | 107 | ||
113 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ | 108 | /* Used by CM_MEMIF_CLKSTCTRL */ |
114 | #define OMAP4430_CLKACTIVITY_DLL_CLK_SHIFT 9 | 109 | #define OMAP4430_CLKACTIVITY_DLL_CLK_SHIFT 9 |
115 | #define OMAP4430_CLKACTIVITY_DLL_CLK_MASK (1 << 9) | 110 | #define OMAP4430_CLKACTIVITY_DLL_CLK_MASK (1 << 9) |
116 | 111 | ||
117 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 112 | /* Used by CM_L4PER_CLKSTCTRL */ |
118 | #define OMAP4430_CLKACTIVITY_DMT10_GFCLK_SHIFT 9 | 113 | #define OMAP4430_CLKACTIVITY_DMT10_GFCLK_SHIFT 9 |
119 | #define OMAP4430_CLKACTIVITY_DMT10_GFCLK_MASK (1 << 9) | 114 | #define OMAP4430_CLKACTIVITY_DMT10_GFCLK_MASK (1 << 9) |
120 | 115 | ||
121 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 116 | /* Used by CM_L4PER_CLKSTCTRL */ |
122 | #define OMAP4430_CLKACTIVITY_DMT11_GFCLK_SHIFT 10 | 117 | #define OMAP4430_CLKACTIVITY_DMT11_GFCLK_SHIFT 10 |
123 | #define OMAP4430_CLKACTIVITY_DMT11_GFCLK_MASK (1 << 10) | 118 | #define OMAP4430_CLKACTIVITY_DMT11_GFCLK_MASK (1 << 10) |
124 | 119 | ||
125 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 120 | /* Used by CM_L4PER_CLKSTCTRL */ |
126 | #define OMAP4430_CLKACTIVITY_DMT2_GFCLK_SHIFT 11 | 121 | #define OMAP4430_CLKACTIVITY_DMT2_GFCLK_SHIFT 11 |
127 | #define OMAP4430_CLKACTIVITY_DMT2_GFCLK_MASK (1 << 11) | 122 | #define OMAP4430_CLKACTIVITY_DMT2_GFCLK_MASK (1 << 11) |
128 | 123 | ||
129 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 124 | /* Used by CM_L4PER_CLKSTCTRL */ |
130 | #define OMAP4430_CLKACTIVITY_DMT3_GFCLK_SHIFT 12 | 125 | #define OMAP4430_CLKACTIVITY_DMT3_GFCLK_SHIFT 12 |
131 | #define OMAP4430_CLKACTIVITY_DMT3_GFCLK_MASK (1 << 12) | 126 | #define OMAP4430_CLKACTIVITY_DMT3_GFCLK_MASK (1 << 12) |
132 | 127 | ||
133 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 128 | /* Used by CM_L4PER_CLKSTCTRL */ |
134 | #define OMAP4430_CLKACTIVITY_DMT4_GFCLK_SHIFT 13 | 129 | #define OMAP4430_CLKACTIVITY_DMT4_GFCLK_SHIFT 13 |
135 | #define OMAP4430_CLKACTIVITY_DMT4_GFCLK_MASK (1 << 13) | 130 | #define OMAP4430_CLKACTIVITY_DMT4_GFCLK_MASK (1 << 13) |
136 | 131 | ||
137 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 132 | /* Used by CM_L4PER_CLKSTCTRL */ |
138 | #define OMAP4430_CLKACTIVITY_DMT9_GFCLK_SHIFT 14 | 133 | #define OMAP4430_CLKACTIVITY_DMT9_GFCLK_SHIFT 14 |
139 | #define OMAP4430_CLKACTIVITY_DMT9_GFCLK_MASK (1 << 14) | 134 | #define OMAP4430_CLKACTIVITY_DMT9_GFCLK_MASK (1 << 14) |
140 | 135 | ||
@@ -158,7 +153,7 @@ | |||
158 | #define OMAP4430_CLKACTIVITY_FDIF_GFCLK_SHIFT 10 | 153 | #define OMAP4430_CLKACTIVITY_FDIF_GFCLK_SHIFT 10 |
159 | #define OMAP4430_CLKACTIVITY_FDIF_GFCLK_MASK (1 << 10) | 154 | #define OMAP4430_CLKACTIVITY_FDIF_GFCLK_MASK (1 << 10) |
160 | 155 | ||
161 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 156 | /* Used by CM_L4PER_CLKSTCTRL */ |
162 | #define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_SHIFT 15 | 157 | #define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_SHIFT 15 |
163 | #define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_MASK (1 << 15) | 158 | #define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_MASK (1 << 15) |
164 | 159 | ||
@@ -170,55 +165,55 @@ | |||
170 | #define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_SHIFT 11 | 165 | #define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_SHIFT 11 |
171 | #define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_MASK (1 << 11) | 166 | #define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_MASK (1 << 11) |
172 | 167 | ||
173 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 168 | /* Used by CM_L3INIT_CLKSTCTRL */ |
174 | #define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_SHIFT 20 | 169 | #define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_SHIFT 20 |
175 | #define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_MASK (1 << 20) | 170 | #define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_MASK (1 << 20) |
176 | 171 | ||
177 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 172 | /* Used by CM_L3INIT_CLKSTCTRL */ |
178 | #define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_SHIFT 26 | 173 | #define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_SHIFT 26 |
179 | #define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_MASK (1 << 26) | 174 | #define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_MASK (1 << 26) |
180 | 175 | ||
181 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 176 | /* Used by CM_L3INIT_CLKSTCTRL */ |
182 | #define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_SHIFT 21 | 177 | #define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_SHIFT 21 |
183 | #define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_MASK (1 << 21) | 178 | #define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_MASK (1 << 21) |
184 | 179 | ||
185 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 180 | /* Used by CM_L3INIT_CLKSTCTRL */ |
186 | #define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_SHIFT 27 | 181 | #define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_SHIFT 27 |
187 | #define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_MASK (1 << 27) | 182 | #define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_MASK (1 << 27) |
188 | 183 | ||
189 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 184 | /* Used by CM_L3INIT_CLKSTCTRL */ |
190 | #define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_SHIFT 13 | 185 | #define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_SHIFT 13 |
191 | #define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_MASK (1 << 13) | 186 | #define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_MASK (1 << 13) |
192 | 187 | ||
193 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 188 | /* Used by CM_L3INIT_CLKSTCTRL */ |
194 | #define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_SHIFT 12 | 189 | #define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_SHIFT 12 |
195 | #define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_MASK (1 << 12) | 190 | #define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_MASK (1 << 12) |
196 | 191 | ||
197 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 192 | /* Used by CM_L3INIT_CLKSTCTRL */ |
198 | #define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_SHIFT 28 | 193 | #define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_SHIFT 28 |
199 | #define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_MASK (1 << 28) | 194 | #define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_MASK (1 << 28) |
200 | 195 | ||
201 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 196 | /* Used by CM_L3INIT_CLKSTCTRL */ |
202 | #define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_SHIFT 29 | 197 | #define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_SHIFT 29 |
203 | #define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_MASK (1 << 29) | 198 | #define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_MASK (1 << 29) |
204 | 199 | ||
205 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 200 | /* Used by CM_L3INIT_CLKSTCTRL */ |
206 | #define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_SHIFT 11 | 201 | #define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_SHIFT 11 |
207 | #define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_MASK (1 << 11) | 202 | #define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_MASK (1 << 11) |
208 | 203 | ||
209 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 204 | /* Used by CM_L3INIT_CLKSTCTRL */ |
210 | #define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_SHIFT 16 | 205 | #define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_SHIFT 16 |
211 | #define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_MASK (1 << 16) | 206 | #define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_MASK (1 << 16) |
212 | 207 | ||
213 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 208 | /* Used by CM_L3INIT_CLKSTCTRL */ |
214 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_SHIFT 17 | 209 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_SHIFT 17 |
215 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_MASK (1 << 17) | 210 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_MASK (1 << 17) |
216 | 211 | ||
217 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 212 | /* Used by CM_L3INIT_CLKSTCTRL */ |
218 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_SHIFT 18 | 213 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_SHIFT 18 |
219 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_MASK (1 << 18) | 214 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_MASK (1 << 18) |
220 | 215 | ||
221 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 216 | /* Used by CM_L3INIT_CLKSTCTRL */ |
222 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_SHIFT 19 | 217 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_SHIFT 19 |
223 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_MASK (1 << 19) | 218 | #define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_MASK (1 << 19) |
224 | 219 | ||
@@ -234,11 +229,11 @@ | |||
234 | #define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_SHIFT 10 | 229 | #define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_SHIFT 10 |
235 | #define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_MASK (1 << 10) | 230 | #define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_MASK (1 << 10) |
236 | 231 | ||
237 | /* Used by CM_L3_1_CLKSTCTRL, CM_L3_1_CLKSTCTRL_RESTORE */ | 232 | /* Used by CM_L3_1_CLKSTCTRL */ |
238 | #define OMAP4430_CLKACTIVITY_L3_1_GICLK_SHIFT 8 | 233 | #define OMAP4430_CLKACTIVITY_L3_1_GICLK_SHIFT 8 |
239 | #define OMAP4430_CLKACTIVITY_L3_1_GICLK_MASK (1 << 8) | 234 | #define OMAP4430_CLKACTIVITY_L3_1_GICLK_MASK (1 << 8) |
240 | 235 | ||
241 | /* Used by CM_L3_2_CLKSTCTRL, CM_L3_2_CLKSTCTRL_RESTORE */ | 236 | /* Used by CM_L3_2_CLKSTCTRL */ |
242 | #define OMAP4430_CLKACTIVITY_L3_2_GICLK_SHIFT 8 | 237 | #define OMAP4430_CLKACTIVITY_L3_2_GICLK_SHIFT 8 |
243 | #define OMAP4430_CLKACTIVITY_L3_2_GICLK_MASK (1 << 8) | 238 | #define OMAP4430_CLKACTIVITY_L3_2_GICLK_MASK (1 << 8) |
244 | 239 | ||
@@ -254,7 +249,7 @@ | |||
254 | #define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_SHIFT 8 | 249 | #define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_SHIFT 8 |
255 | #define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_MASK (1 << 8) | 250 | #define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_MASK (1 << 8) |
256 | 251 | ||
257 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ | 252 | /* Used by CM_MEMIF_CLKSTCTRL */ |
258 | #define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_SHIFT 8 | 253 | #define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_SHIFT 8 |
259 | #define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_MASK (1 << 8) | 254 | #define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_MASK (1 << 8) |
260 | 255 | ||
@@ -262,7 +257,7 @@ | |||
262 | #define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_SHIFT 8 | 257 | #define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_SHIFT 8 |
263 | #define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_MASK (1 << 8) | 258 | #define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_MASK (1 << 8) |
264 | 259 | ||
265 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 260 | /* Used by CM_L3INIT_CLKSTCTRL */ |
266 | #define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_SHIFT 8 | 261 | #define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_SHIFT 8 |
267 | #define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_MASK (1 << 8) | 262 | #define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_MASK (1 << 8) |
268 | 263 | ||
@@ -282,7 +277,7 @@ | |||
282 | #define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT 8 | 277 | #define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT 8 |
283 | #define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_MASK (1 << 8) | 278 | #define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_MASK (1 << 8) |
284 | 279 | ||
285 | /* Used by CM_L4CFG_CLKSTCTRL, CM_L4CFG_CLKSTCTRL_RESTORE */ | 280 | /* Used by CM_L4CFG_CLKSTCTRL */ |
286 | #define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_SHIFT 8 | 281 | #define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_SHIFT 8 |
287 | #define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_MASK (1 << 8) | 282 | #define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_MASK (1 << 8) |
288 | 283 | ||
@@ -290,11 +285,11 @@ | |||
290 | #define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_SHIFT 9 | 285 | #define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_SHIFT 9 |
291 | #define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_MASK (1 << 9) | 286 | #define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_MASK (1 << 9) |
292 | 287 | ||
293 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 288 | /* Used by CM_L3INIT_CLKSTCTRL */ |
294 | #define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_SHIFT 9 | 289 | #define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_SHIFT 9 |
295 | #define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_MASK (1 << 9) | 290 | #define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_MASK (1 << 9) |
296 | 291 | ||
297 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 292 | /* Used by CM_L4PER_CLKSTCTRL */ |
298 | #define OMAP4430_CLKACTIVITY_L4_PER_GICLK_SHIFT 8 | 293 | #define OMAP4430_CLKACTIVITY_L4_PER_GICLK_SHIFT 8 |
299 | #define OMAP4430_CLKACTIVITY_L4_PER_GICLK_MASK (1 << 8) | 294 | #define OMAP4430_CLKACTIVITY_L4_PER_GICLK_MASK (1 << 8) |
300 | 295 | ||
@@ -306,7 +301,7 @@ | |||
306 | #define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_SHIFT 12 | 301 | #define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_SHIFT 12 |
307 | #define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_MASK (1 << 12) | 302 | #define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_MASK (1 << 12) |
308 | 303 | ||
309 | /* Used by CM_MPU_CLKSTCTRL, CM_MPU_CLKSTCTRL_RESTORE */ | 304 | /* Used by CM_MPU_CLKSTCTRL */ |
310 | #define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_SHIFT 8 | 305 | #define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_SHIFT 8 |
311 | #define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_MASK (1 << 8) | 306 | #define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_MASK (1 << 8) |
312 | 307 | ||
@@ -314,43 +309,43 @@ | |||
314 | #define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_SHIFT 9 | 309 | #define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_SHIFT 9 |
315 | #define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_MASK (1 << 9) | 310 | #define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_MASK (1 << 9) |
316 | 311 | ||
317 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 312 | /* Used by CM_L4PER_CLKSTCTRL */ |
318 | #define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_SHIFT 16 | 313 | #define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_SHIFT 16 |
319 | #define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_MASK (1 << 16) | 314 | #define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_MASK (1 << 16) |
320 | 315 | ||
321 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 316 | /* Used by CM_L4PER_CLKSTCTRL */ |
322 | #define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_SHIFT 17 | 317 | #define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_SHIFT 17 |
323 | #define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_MASK (1 << 17) | 318 | #define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_MASK (1 << 17) |
324 | 319 | ||
325 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 320 | /* Used by CM_L4PER_CLKSTCTRL */ |
326 | #define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_SHIFT 18 | 321 | #define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_SHIFT 18 |
327 | #define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_MASK (1 << 18) | 322 | #define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_MASK (1 << 18) |
328 | 323 | ||
329 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 324 | /* Used by CM_L4PER_CLKSTCTRL */ |
330 | #define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_SHIFT 19 | 325 | #define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_SHIFT 19 |
331 | #define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_MASK (1 << 19) | 326 | #define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_MASK (1 << 19) |
332 | 327 | ||
333 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 328 | /* Used by CM_L4PER_CLKSTCTRL */ |
334 | #define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_SHIFT 25 | 329 | #define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_SHIFT 25 |
335 | #define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_MASK (1 << 25) | 330 | #define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_MASK (1 << 25) |
336 | 331 | ||
337 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 332 | /* Used by CM_L4PER_CLKSTCTRL */ |
338 | #define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_SHIFT 20 | 333 | #define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_SHIFT 20 |
339 | #define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_MASK (1 << 20) | 334 | #define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_MASK (1 << 20) |
340 | 335 | ||
341 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 336 | /* Used by CM_L4PER_CLKSTCTRL */ |
342 | #define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_SHIFT 21 | 337 | #define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_SHIFT 21 |
343 | #define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_MASK (1 << 21) | 338 | #define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_MASK (1 << 21) |
344 | 339 | ||
345 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 340 | /* Used by CM_L4PER_CLKSTCTRL */ |
346 | #define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_SHIFT 22 | 341 | #define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_SHIFT 22 |
347 | #define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_MASK (1 << 22) | 342 | #define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_MASK (1 << 22) |
348 | 343 | ||
349 | /* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ | 344 | /* Used by CM_L4PER_CLKSTCTRL */ |
350 | #define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_SHIFT 24 | 345 | #define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_SHIFT 24 |
351 | #define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_MASK (1 << 24) | 346 | #define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_MASK (1 << 24) |
352 | 347 | ||
353 | /* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ | 348 | /* Used by CM_MEMIF_CLKSTCTRL */ |
354 | #define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_SHIFT 10 | 349 | #define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_SHIFT 10 |
355 | #define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_MASK (1 << 10) | 350 | #define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_MASK (1 << 10) |
356 | 351 | ||
@@ -378,27 +373,27 @@ | |||
378 | #define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_SHIFT 8 | 373 | #define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_SHIFT 8 |
379 | #define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_MASK (1 << 8) | 374 | #define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_MASK (1 << 8) |
380 | 375 | ||
381 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 376 | /* Used by CM_L3INIT_CLKSTCTRL */ |
382 | #define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_SHIFT 22 | 377 | #define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_SHIFT 22 |
383 | #define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_MASK (1 << 22) | 378 | #define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_MASK (1 << 22) |
384 | 379 | ||
385 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 380 | /* Used by CM_L3INIT_CLKSTCTRL */ |
386 | #define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_SHIFT 23 | 381 | #define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_SHIFT 23 |
387 | #define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_MASK (1 << 23) | 382 | #define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_MASK (1 << 23) |
388 | 383 | ||
389 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 384 | /* Used by CM_L3INIT_CLKSTCTRL */ |
390 | #define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_SHIFT 24 | 385 | #define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_SHIFT 24 |
391 | #define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_MASK (1 << 24) | 386 | #define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_MASK (1 << 24) |
392 | 387 | ||
393 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 388 | /* Used by CM_L3INIT_CLKSTCTRL */ |
394 | #define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_SHIFT 10 | 389 | #define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_SHIFT 10 |
395 | #define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_MASK (1 << 10) | 390 | #define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_MASK (1 << 10) |
396 | 391 | ||
397 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 392 | /* Used by CM_L3INIT_CLKSTCTRL */ |
398 | #define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_SHIFT 14 | 393 | #define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_SHIFT 14 |
399 | #define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_MASK (1 << 14) | 394 | #define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_MASK (1 << 14) |
400 | 395 | ||
401 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 396 | /* Used by CM_L3INIT_CLKSTCTRL */ |
402 | #define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_SHIFT 15 | 397 | #define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_SHIFT 15 |
403 | #define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_MASK (1 << 15) | 398 | #define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_MASK (1 << 15) |
404 | 399 | ||
@@ -406,11 +401,11 @@ | |||
406 | #define OMAP4430_CLKACTIVITY_USIM_GFCLK_SHIFT 10 | 401 | #define OMAP4430_CLKACTIVITY_USIM_GFCLK_SHIFT 10 |
407 | #define OMAP4430_CLKACTIVITY_USIM_GFCLK_MASK (1 << 10) | 402 | #define OMAP4430_CLKACTIVITY_USIM_GFCLK_MASK (1 << 10) |
408 | 403 | ||
409 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 404 | /* Used by CM_L3INIT_CLKSTCTRL */ |
410 | #define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_SHIFT 30 | 405 | #define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_SHIFT 30 |
411 | #define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_MASK (1 << 30) | 406 | #define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_MASK (1 << 30) |
412 | 407 | ||
413 | /* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ | 408 | /* Used by CM_L3INIT_CLKSTCTRL */ |
414 | #define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_SHIFT 25 | 409 | #define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_SHIFT 25 |
415 | #define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_MASK (1 << 25) | 410 | #define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_MASK (1 << 25) |
416 | 411 | ||
@@ -432,7 +427,7 @@ | |||
432 | 427 | ||
433 | /* | 428 | /* |
434 | * Renamed from CLKSEL Used by CM_ABE_DSS_SYS_CLKSEL, CM_ABE_PLL_REF_CLKSEL, | 429 | * Renamed from CLKSEL Used by CM_ABE_DSS_SYS_CLKSEL, CM_ABE_PLL_REF_CLKSEL, |
435 | * CM_L4_WKUP_CLKSEL, CM_CLKSEL_DUCATI_ISS_ROOT, CM_CLKSEL_USB_60MHZ | 430 | * CM_CLKSEL_DUCATI_ISS_ROOT, CM_CLKSEL_USB_60MHZ, CM_L4_WKUP_CLKSEL |
436 | */ | 431 | */ |
437 | #define OMAP4430_CLKSEL_0_0_SHIFT 0 | 432 | #define OMAP4430_CLKSEL_0_0_SHIFT 0 |
438 | #define OMAP4430_CLKSEL_0_0_MASK (1 << 0) | 433 | #define OMAP4430_CLKSEL_0_0_MASK (1 << 0) |
@@ -453,14 +448,11 @@ | |||
453 | #define OMAP4430_CLKSEL_AESS_FCLK_SHIFT 24 | 448 | #define OMAP4430_CLKSEL_AESS_FCLK_SHIFT 24 |
454 | #define OMAP4430_CLKSEL_AESS_FCLK_MASK (1 << 24) | 449 | #define OMAP4430_CLKSEL_AESS_FCLK_MASK (1 << 24) |
455 | 450 | ||
456 | /* Used by CM_CLKSEL_CORE, CM_CLKSEL_CORE_RESTORE */ | 451 | /* Used by CM_CLKSEL_CORE */ |
457 | #define OMAP4430_CLKSEL_CORE_SHIFT 0 | 452 | #define OMAP4430_CLKSEL_CORE_SHIFT 0 |
458 | #define OMAP4430_CLKSEL_CORE_MASK (1 << 0) | 453 | #define OMAP4430_CLKSEL_CORE_MASK (1 << 0) |
459 | 454 | ||
460 | /* | 455 | /* Renamed from CLKSEL_CORE Used by CM_SHADOW_FREQ_CONFIG2 */ |
461 | * Renamed from CLKSEL_CORE Used by CM_SHADOW_FREQ_CONFIG2_RESTORE, | ||
462 | * CM_SHADOW_FREQ_CONFIG2 | ||
463 | */ | ||
464 | #define OMAP4430_CLKSEL_CORE_1_1_SHIFT 1 | 456 | #define OMAP4430_CLKSEL_CORE_1_1_SHIFT 1 |
465 | #define OMAP4430_CLKSEL_CORE_1_1_MASK (1 << 1) | 457 | #define OMAP4430_CLKSEL_CORE_1_1_MASK (1 << 1) |
466 | 458 | ||
@@ -484,18 +476,15 @@ | |||
484 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_SHIFT 26 | 476 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_SHIFT 26 |
485 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_MASK (0x3 << 26) | 477 | #define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_MASK (0x3 << 26) |
486 | 478 | ||
487 | /* Used by CM_CLKSEL_CORE, CM_CLKSEL_CORE_RESTORE */ | 479 | /* Used by CM_CLKSEL_CORE */ |
488 | #define OMAP4430_CLKSEL_L3_SHIFT 4 | 480 | #define OMAP4430_CLKSEL_L3_SHIFT 4 |
489 | #define OMAP4430_CLKSEL_L3_MASK (1 << 4) | 481 | #define OMAP4430_CLKSEL_L3_MASK (1 << 4) |
490 | 482 | ||
491 | /* | 483 | /* Renamed from CLKSEL_L3 Used by CM_SHADOW_FREQ_CONFIG2 */ |
492 | * Renamed from CLKSEL_L3 Used by CM_SHADOW_FREQ_CONFIG2_RESTORE, | ||
493 | * CM_SHADOW_FREQ_CONFIG2 | ||
494 | */ | ||
495 | #define OMAP4430_CLKSEL_L3_SHADOW_SHIFT 2 | 484 | #define OMAP4430_CLKSEL_L3_SHADOW_SHIFT 2 |
496 | #define OMAP4430_CLKSEL_L3_SHADOW_MASK (1 << 2) | 485 | #define OMAP4430_CLKSEL_L3_SHADOW_MASK (1 << 2) |
497 | 486 | ||
498 | /* Used by CM_CLKSEL_CORE, CM_CLKSEL_CORE_RESTORE */ | 487 | /* Used by CM_CLKSEL_CORE */ |
499 | #define OMAP4430_CLKSEL_L4_SHIFT 8 | 488 | #define OMAP4430_CLKSEL_L4_SHIFT 8 |
500 | #define OMAP4430_CLKSEL_L4_MASK (1 << 8) | 489 | #define OMAP4430_CLKSEL_L4_MASK (1 << 8) |
501 | 490 | ||
@@ -526,11 +515,11 @@ | |||
526 | #define OMAP4430_CLKSEL_SOURCE_24_24_SHIFT 24 | 515 | #define OMAP4430_CLKSEL_SOURCE_24_24_SHIFT 24 |
527 | #define OMAP4430_CLKSEL_SOURCE_24_24_MASK (1 << 24) | 516 | #define OMAP4430_CLKSEL_SOURCE_24_24_MASK (1 << 24) |
528 | 517 | ||
529 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 518 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
530 | #define OMAP4430_CLKSEL_UTMI_P1_SHIFT 24 | 519 | #define OMAP4430_CLKSEL_UTMI_P1_SHIFT 24 |
531 | #define OMAP4430_CLKSEL_UTMI_P1_MASK (1 << 24) | 520 | #define OMAP4430_CLKSEL_UTMI_P1_MASK (1 << 24) |
532 | 521 | ||
533 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 522 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
534 | #define OMAP4430_CLKSEL_UTMI_P2_SHIFT 25 | 523 | #define OMAP4430_CLKSEL_UTMI_P2_SHIFT 25 |
535 | #define OMAP4430_CLKSEL_UTMI_P2_MASK (1 << 25) | 524 | #define OMAP4430_CLKSEL_UTMI_P2_MASK (1 << 25) |
536 | 525 | ||
@@ -538,13 +527,10 @@ | |||
538 | * Used by CM1_ABE_CLKSTCTRL, CM_ALWON_CLKSTCTRL, CM_CAM_CLKSTCTRL, | 527 | * Used by CM1_ABE_CLKSTCTRL, CM_ALWON_CLKSTCTRL, CM_CAM_CLKSTCTRL, |
539 | * CM_CEFUSE_CLKSTCTRL, CM_D2D_CLKSTCTRL, CM_DSS_CLKSTCTRL, | 528 | * CM_CEFUSE_CLKSTCTRL, CM_D2D_CLKSTCTRL, CM_DSS_CLKSTCTRL, |
540 | * CM_DUCATI_CLKSTCTRL, CM_EMU_CLKSTCTRL, CM_GFX_CLKSTCTRL, CM_IVAHD_CLKSTCTRL, | 529 | * CM_DUCATI_CLKSTCTRL, CM_EMU_CLKSTCTRL, CM_GFX_CLKSTCTRL, CM_IVAHD_CLKSTCTRL, |
541 | * CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE, CM_L3INSTR_CLKSTCTRL, | 530 | * CM_L3INIT_CLKSTCTRL, CM_L3INSTR_CLKSTCTRL, CM_L3_1_CLKSTCTRL, |
542 | * CM_L3_1_CLKSTCTRL, CM_L3_1_CLKSTCTRL_RESTORE, CM_L3_2_CLKSTCTRL, | 531 | * CM_L3_2_CLKSTCTRL, CM_L4CFG_CLKSTCTRL, CM_L4PER_CLKSTCTRL, |
543 | * CM_L3_2_CLKSTCTRL_RESTORE, CM_L4CFG_CLKSTCTRL, CM_L4CFG_CLKSTCTRL_RESTORE, | 532 | * CM_L4SEC_CLKSTCTRL, CM_MEMIF_CLKSTCTRL, CM_MPU_CLKSTCTRL, CM_SDMA_CLKSTCTRL, |
544 | * CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE, CM_L4SEC_CLKSTCTRL, | 533 | * CM_TESLA_CLKSTCTRL, CM_WKUP_CLKSTCTRL |
545 | * CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE, CM_MPU_CLKSTCTRL, | ||
546 | * CM_MPU_CLKSTCTRL_RESTORE, CM_SDMA_CLKSTCTRL, CM_TESLA_CLKSTCTRL, | ||
547 | * CM_WKUP_CLKSTCTRL | ||
548 | */ | 534 | */ |
549 | #define OMAP4430_CLKTRCTRL_SHIFT 0 | 535 | #define OMAP4430_CLKTRCTRL_SHIFT 0 |
550 | #define OMAP4430_CLKTRCTRL_MASK (0x3 << 0) | 536 | #define OMAP4430_CLKTRCTRL_MASK (0x3 << 0) |
@@ -561,10 +547,7 @@ | |||
561 | #define OMAP4430_CUSTOM_SHIFT 6 | 547 | #define OMAP4430_CUSTOM_SHIFT 6 |
562 | #define OMAP4430_CUSTOM_MASK (0x3 << 6) | 548 | #define OMAP4430_CUSTOM_MASK (0x3 << 6) |
563 | 549 | ||
564 | /* | 550 | /* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */ |
565 | * Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, | ||
566 | * CM_L4CFG_DYNAMICDEP_RESTORE | ||
567 | */ | ||
568 | #define OMAP4430_D2D_DYNDEP_SHIFT 18 | 551 | #define OMAP4430_D2D_DYNDEP_SHIFT 18 |
569 | #define OMAP4430_D2D_DYNDEP_MASK (1 << 18) | 552 | #define OMAP4430_D2D_DYNDEP_MASK (1 << 18) |
570 | 553 | ||
@@ -574,31 +557,29 @@ | |||
574 | 557 | ||
575 | /* | 558 | /* |
576 | * Used by CM_SSC_DELTAMSTEP_DPLL_ABE, CM_SSC_DELTAMSTEP_DPLL_CORE, | 559 | * Used by CM_SSC_DELTAMSTEP_DPLL_ABE, CM_SSC_DELTAMSTEP_DPLL_CORE, |
577 | * CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE, CM_SSC_DELTAMSTEP_DPLL_DDRPHY, | 560 | * CM_SSC_DELTAMSTEP_DPLL_DDRPHY, CM_SSC_DELTAMSTEP_DPLL_IVA, |
578 | * CM_SSC_DELTAMSTEP_DPLL_IVA, CM_SSC_DELTAMSTEP_DPLL_MPU, | 561 | * CM_SSC_DELTAMSTEP_DPLL_MPU, CM_SSC_DELTAMSTEP_DPLL_PER, |
579 | * CM_SSC_DELTAMSTEP_DPLL_PER, CM_SSC_DELTAMSTEP_DPLL_UNIPRO, | 562 | * CM_SSC_DELTAMSTEP_DPLL_UNIPRO, CM_SSC_DELTAMSTEP_DPLL_USB |
580 | * CM_SSC_DELTAMSTEP_DPLL_USB | ||
581 | */ | 563 | */ |
582 | #define OMAP4430_DELTAMSTEP_SHIFT 0 | 564 | #define OMAP4430_DELTAMSTEP_SHIFT 0 |
583 | #define OMAP4430_DELTAMSTEP_MASK (0xfffff << 0) | 565 | #define OMAP4430_DELTAMSTEP_MASK (0xfffff << 0) |
584 | 566 | ||
585 | /* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */ | 567 | /* Used by CM_DLL_CTRL */ |
586 | #define OMAP4430_DLL_OVERRIDE_SHIFT 2 | 568 | #define OMAP4430_DLL_OVERRIDE_SHIFT 0 |
587 | #define OMAP4430_DLL_OVERRIDE_MASK (1 << 2) | 569 | #define OMAP4430_DLL_OVERRIDE_MASK (1 << 0) |
588 | 570 | ||
589 | /* Renamed from DLL_OVERRIDE Used by CM_DLL_CTRL */ | 571 | /* Renamed from DLL_OVERRIDE Used by CM_SHADOW_FREQ_CONFIG1 */ |
590 | #define OMAP4430_DLL_OVERRIDE_0_0_SHIFT 0 | 572 | #define OMAP4430_DLL_OVERRIDE_2_2_SHIFT 2 |
591 | #define OMAP4430_DLL_OVERRIDE_0_0_MASK (1 << 0) | 573 | #define OMAP4430_DLL_OVERRIDE_2_2_MASK (1 << 2) |
592 | 574 | ||
593 | /* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */ | 575 | /* Used by CM_SHADOW_FREQ_CONFIG1 */ |
594 | #define OMAP4430_DLL_RESET_SHIFT 3 | 576 | #define OMAP4430_DLL_RESET_SHIFT 3 |
595 | #define OMAP4430_DLL_RESET_MASK (1 << 3) | 577 | #define OMAP4430_DLL_RESET_MASK (1 << 3) |
596 | 578 | ||
597 | /* | 579 | /* |
598 | * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, | 580 | * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_DDRPHY, |
599 | * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA, | 581 | * CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, |
600 | * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO, | 582 | * CM_CLKSEL_DPLL_UNIPRO, CM_CLKSEL_DPLL_USB |
601 | * CM_CLKSEL_DPLL_USB | ||
602 | */ | 583 | */ |
603 | #define OMAP4430_DPLL_BYP_CLKSEL_SHIFT 23 | 584 | #define OMAP4430_DPLL_BYP_CLKSEL_SHIFT 23 |
604 | #define OMAP4430_DPLL_BYP_CLKSEL_MASK (1 << 23) | 585 | #define OMAP4430_DPLL_BYP_CLKSEL_MASK (1 << 23) |
@@ -607,28 +588,19 @@ | |||
607 | #define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT 8 | 588 | #define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT 8 |
608 | #define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_MASK (1 << 8) | 589 | #define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_MASK (1 << 8) |
609 | 590 | ||
610 | /* Used by CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_CORE_RESTORE */ | 591 | /* Used by CM_CLKSEL_DPLL_CORE */ |
611 | #define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_SHIFT 20 | 592 | #define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_SHIFT 20 |
612 | #define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_MASK (1 << 20) | 593 | #define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_MASK (1 << 20) |
613 | 594 | ||
614 | /* | 595 | /* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */ |
615 | * Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, | ||
616 | * CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_PER | ||
617 | */ | ||
618 | #define OMAP4430_DPLL_CLKOUTHIF_DIV_SHIFT 0 | 596 | #define OMAP4430_DPLL_CLKOUTHIF_DIV_SHIFT 0 |
619 | #define OMAP4430_DPLL_CLKOUTHIF_DIV_MASK (0x1f << 0) | 597 | #define OMAP4430_DPLL_CLKOUTHIF_DIV_MASK (0x1f << 0) |
620 | 598 | ||
621 | /* | 599 | /* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */ |
622 | * Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, | ||
623 | * CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_PER | ||
624 | */ | ||
625 | #define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_SHIFT 5 | 600 | #define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_SHIFT 5 |
626 | #define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_MASK (1 << 5) | 601 | #define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_MASK (1 << 5) |
627 | 602 | ||
628 | /* | 603 | /* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */ |
629 | * Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, | ||
630 | * CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_PER | ||
631 | */ | ||
632 | #define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT 8 | 604 | #define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT 8 |
633 | #define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_MASK (1 << 8) | 605 | #define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_MASK (1 << 8) |
634 | 606 | ||
@@ -637,9 +609,8 @@ | |||
637 | #define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK (1 << 10) | 609 | #define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK (1 << 10) |
638 | 610 | ||
639 | /* | 611 | /* |
640 | * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, | 612 | * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY, |
641 | * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU, | 613 | * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO |
642 | * CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO | ||
643 | */ | 614 | */ |
644 | #define OMAP4430_DPLL_CLKOUT_DIV_SHIFT 0 | 615 | #define OMAP4430_DPLL_CLKOUT_DIV_SHIFT 0 |
645 | #define OMAP4430_DPLL_CLKOUT_DIV_MASK (0x1f << 0) | 616 | #define OMAP4430_DPLL_CLKOUT_DIV_MASK (0x1f << 0) |
@@ -649,9 +620,8 @@ | |||
649 | #define OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK (0x7f << 0) | 620 | #define OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK (0x7f << 0) |
650 | 621 | ||
651 | /* | 622 | /* |
652 | * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, | 623 | * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY, |
653 | * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU, | 624 | * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO |
654 | * CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO | ||
655 | */ | 625 | */ |
656 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_SHIFT 5 | 626 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_SHIFT 5 |
657 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_MASK (1 << 5) | 627 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_MASK (1 << 5) |
@@ -661,29 +631,28 @@ | |||
661 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_MASK (1 << 7) | 631 | #define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_MASK (1 << 7) |
662 | 632 | ||
663 | /* | 633 | /* |
664 | * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, | 634 | * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY, |
665 | * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU, | 635 | * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB |
666 | * CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB | ||
667 | */ | 636 | */ |
668 | #define OMAP4430_DPLL_CLKOUT_GATE_CTRL_SHIFT 8 | 637 | #define OMAP4430_DPLL_CLKOUT_GATE_CTRL_SHIFT 8 |
669 | #define OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8) | 638 | #define OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8) |
670 | 639 | ||
671 | /* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */ | 640 | /* Used by CM_SHADOW_FREQ_CONFIG1 */ |
672 | #define OMAP4430_DPLL_CORE_DPLL_EN_SHIFT 8 | 641 | #define OMAP4430_DPLL_CORE_DPLL_EN_SHIFT 8 |
673 | #define OMAP4430_DPLL_CORE_DPLL_EN_MASK (0x7 << 8) | 642 | #define OMAP4430_DPLL_CORE_DPLL_EN_MASK (0x7 << 8) |
674 | 643 | ||
675 | /* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */ | 644 | /* Used by CM_SHADOW_FREQ_CONFIG1 */ |
676 | #define OMAP4430_DPLL_CORE_M2_DIV_SHIFT 11 | 645 | #define OMAP4430_DPLL_CORE_M2_DIV_SHIFT 11 |
677 | #define OMAP4430_DPLL_CORE_M2_DIV_MASK (0x1f << 11) | 646 | #define OMAP4430_DPLL_CORE_M2_DIV_MASK (0x1f << 11) |
678 | 647 | ||
679 | /* Used by CM_SHADOW_FREQ_CONFIG2, CM_SHADOW_FREQ_CONFIG2_RESTORE */ | 648 | /* Used by CM_SHADOW_FREQ_CONFIG2 */ |
680 | #define OMAP4430_DPLL_CORE_M5_DIV_SHIFT 3 | 649 | #define OMAP4430_DPLL_CORE_M5_DIV_SHIFT 3 |
681 | #define OMAP4430_DPLL_CORE_M5_DIV_MASK (0x1f << 3) | 650 | #define OMAP4430_DPLL_CORE_M5_DIV_MASK (0x1f << 3) |
682 | 651 | ||
683 | /* | 652 | /* |
684 | * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, | 653 | * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_DDRPHY, |
685 | * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA, | 654 | * CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, |
686 | * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO | 655 | * CM_CLKSEL_DPLL_UNIPRO |
687 | */ | 656 | */ |
688 | #define OMAP4430_DPLL_DIV_SHIFT 0 | 657 | #define OMAP4430_DPLL_DIV_SHIFT 0 |
689 | #define OMAP4430_DPLL_DIV_MASK (0x7f << 0) | 658 | #define OMAP4430_DPLL_DIV_MASK (0x7f << 0) |
@@ -693,9 +662,8 @@ | |||
693 | #define OMAP4430_DPLL_DIV_0_7_MASK (0xff << 0) | 662 | #define OMAP4430_DPLL_DIV_0_7_MASK (0xff << 0) |
694 | 663 | ||
695 | /* | 664 | /* |
696 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, | 665 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY, |
697 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, | 666 | * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER |
698 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER | ||
699 | */ | 667 | */ |
700 | #define OMAP4430_DPLL_DRIFTGUARD_EN_SHIFT 8 | 668 | #define OMAP4430_DPLL_DRIFTGUARD_EN_SHIFT 8 |
701 | #define OMAP4430_DPLL_DRIFTGUARD_EN_MASK (1 << 8) | 669 | #define OMAP4430_DPLL_DRIFTGUARD_EN_MASK (1 << 8) |
@@ -705,26 +673,25 @@ | |||
705 | #define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_MASK (1 << 3) | 673 | #define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_MASK (1 << 3) |
706 | 674 | ||
707 | /* | 675 | /* |
708 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, | 676 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY, |
709 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, | 677 | * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, |
710 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, | 678 | * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB |
711 | * CM_CLKMODE_DPLL_USB | ||
712 | */ | 679 | */ |
713 | #define OMAP4430_DPLL_EN_SHIFT 0 | 680 | #define OMAP4430_DPLL_EN_SHIFT 0 |
714 | #define OMAP4430_DPLL_EN_MASK (0x7 << 0) | 681 | #define OMAP4430_DPLL_EN_MASK (0x7 << 0) |
715 | 682 | ||
716 | /* | 683 | /* |
717 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, | 684 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY, |
718 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, | 685 | * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, |
719 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO | 686 | * CM_CLKMODE_DPLL_UNIPRO |
720 | */ | 687 | */ |
721 | #define OMAP4430_DPLL_LPMODE_EN_SHIFT 10 | 688 | #define OMAP4430_DPLL_LPMODE_EN_SHIFT 10 |
722 | #define OMAP4430_DPLL_LPMODE_EN_MASK (1 << 10) | 689 | #define OMAP4430_DPLL_LPMODE_EN_MASK (1 << 10) |
723 | 690 | ||
724 | /* | 691 | /* |
725 | * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, | 692 | * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_DDRPHY, |
726 | * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA, | 693 | * CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, |
727 | * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO | 694 | * CM_CLKSEL_DPLL_UNIPRO |
728 | */ | 695 | */ |
729 | #define OMAP4430_DPLL_MULT_SHIFT 8 | 696 | #define OMAP4430_DPLL_MULT_SHIFT 8 |
730 | #define OMAP4430_DPLL_MULT_MASK (0x7ff << 8) | 697 | #define OMAP4430_DPLL_MULT_MASK (0x7ff << 8) |
@@ -734,9 +701,9 @@ | |||
734 | #define OMAP4430_DPLL_MULT_USB_MASK (0xfff << 8) | 701 | #define OMAP4430_DPLL_MULT_USB_MASK (0xfff << 8) |
735 | 702 | ||
736 | /* | 703 | /* |
737 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, | 704 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY, |
738 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, | 705 | * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, |
739 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO | 706 | * CM_CLKMODE_DPLL_UNIPRO |
740 | */ | 707 | */ |
741 | #define OMAP4430_DPLL_REGM4XEN_SHIFT 11 | 708 | #define OMAP4430_DPLL_REGM4XEN_SHIFT 11 |
742 | #define OMAP4430_DPLL_REGM4XEN_MASK (1 << 11) | 709 | #define OMAP4430_DPLL_REGM4XEN_MASK (1 << 11) |
@@ -746,55 +713,46 @@ | |||
746 | #define OMAP4430_DPLL_SD_DIV_MASK (0xff << 24) | 713 | #define OMAP4430_DPLL_SD_DIV_MASK (0xff << 24) |
747 | 714 | ||
748 | /* | 715 | /* |
749 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, | 716 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY, |
750 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, | 717 | * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, |
751 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, | 718 | * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB |
752 | * CM_CLKMODE_DPLL_USB | ||
753 | */ | 719 | */ |
754 | #define OMAP4430_DPLL_SSC_ACK_SHIFT 13 | 720 | #define OMAP4430_DPLL_SSC_ACK_SHIFT 13 |
755 | #define OMAP4430_DPLL_SSC_ACK_MASK (1 << 13) | 721 | #define OMAP4430_DPLL_SSC_ACK_MASK (1 << 13) |
756 | 722 | ||
757 | /* | 723 | /* |
758 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, | 724 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY, |
759 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, | 725 | * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, |
760 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, | 726 | * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB |
761 | * CM_CLKMODE_DPLL_USB | ||
762 | */ | 727 | */ |
763 | #define OMAP4430_DPLL_SSC_DOWNSPREAD_SHIFT 14 | 728 | #define OMAP4430_DPLL_SSC_DOWNSPREAD_SHIFT 14 |
764 | #define OMAP4430_DPLL_SSC_DOWNSPREAD_MASK (1 << 14) | 729 | #define OMAP4430_DPLL_SSC_DOWNSPREAD_MASK (1 << 14) |
765 | 730 | ||
766 | /* | 731 | /* |
767 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, | 732 | * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY, |
768 | * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, | 733 | * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, |
769 | * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, | 734 | * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB |
770 | * CM_CLKMODE_DPLL_USB | ||
771 | */ | 735 | */ |
772 | #define OMAP4430_DPLL_SSC_EN_SHIFT 12 | 736 | #define OMAP4430_DPLL_SSC_EN_SHIFT 12 |
773 | #define OMAP4430_DPLL_SSC_EN_MASK (1 << 12) | 737 | #define OMAP4430_DPLL_SSC_EN_MASK (1 << 12) |
774 | 738 | ||
775 | /* | 739 | /* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */ |
776 | * Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, | ||
777 | * CM_L4CFG_DYNAMICDEP_RESTORE, CM_L4PER_DYNAMICDEP, CM_L4PER_DYNAMICDEP_RESTORE | ||
778 | */ | ||
779 | #define OMAP4430_DSS_DYNDEP_SHIFT 8 | 740 | #define OMAP4430_DSS_DYNDEP_SHIFT 8 |
780 | #define OMAP4430_DSS_DYNDEP_MASK (1 << 8) | 741 | #define OMAP4430_DSS_DYNDEP_MASK (1 << 8) |
781 | 742 | ||
782 | /* | 743 | /* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP */ |
783 | * Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, | ||
784 | * CM_SDMA_STATICDEP_RESTORE | ||
785 | */ | ||
786 | #define OMAP4430_DSS_STATDEP_SHIFT 8 | 744 | #define OMAP4430_DSS_STATDEP_SHIFT 8 |
787 | #define OMAP4430_DSS_STATDEP_MASK (1 << 8) | 745 | #define OMAP4430_DSS_STATDEP_MASK (1 << 8) |
788 | 746 | ||
789 | /* Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE */ | 747 | /* Used by CM_L3_2_DYNAMICDEP */ |
790 | #define OMAP4430_DUCATI_DYNDEP_SHIFT 0 | 748 | #define OMAP4430_DUCATI_DYNDEP_SHIFT 0 |
791 | #define OMAP4430_DUCATI_DYNDEP_MASK (1 << 0) | 749 | #define OMAP4430_DUCATI_DYNDEP_MASK (1 << 0) |
792 | 750 | ||
793 | /* Used by CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE */ | 751 | /* Used by CM_MPU_STATICDEP, CM_SDMA_STATICDEP */ |
794 | #define OMAP4430_DUCATI_STATDEP_SHIFT 0 | 752 | #define OMAP4430_DUCATI_STATDEP_SHIFT 0 |
795 | #define OMAP4430_DUCATI_STATDEP_MASK (1 << 0) | 753 | #define OMAP4430_DUCATI_STATDEP_MASK (1 << 0) |
796 | 754 | ||
797 | /* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */ | 755 | /* Used by CM_SHADOW_FREQ_CONFIG1 */ |
798 | #define OMAP4430_FREQ_UPDATE_SHIFT 0 | 756 | #define OMAP4430_FREQ_UPDATE_SHIFT 0 |
799 | #define OMAP4430_FREQ_UPDATE_MASK (1 << 0) | 757 | #define OMAP4430_FREQ_UPDATE_MASK (1 << 0) |
800 | 758 | ||
@@ -802,7 +760,7 @@ | |||
802 | #define OMAP4430_FUNC_SHIFT 16 | 760 | #define OMAP4430_FUNC_SHIFT 16 |
803 | #define OMAP4430_FUNC_MASK (0xfff << 16) | 761 | #define OMAP4430_FUNC_MASK (0xfff << 16) |
804 | 762 | ||
805 | /* Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE */ | 763 | /* Used by CM_L3_2_DYNAMICDEP */ |
806 | #define OMAP4430_GFX_DYNDEP_SHIFT 10 | 764 | #define OMAP4430_GFX_DYNDEP_SHIFT 10 |
807 | #define OMAP4430_GFX_DYNDEP_MASK (1 << 10) | 765 | #define OMAP4430_GFX_DYNDEP_MASK (1 << 10) |
808 | 766 | ||
@@ -810,119 +768,95 @@ | |||
810 | #define OMAP4430_GFX_STATDEP_SHIFT 10 | 768 | #define OMAP4430_GFX_STATDEP_SHIFT 10 |
811 | #define OMAP4430_GFX_STATDEP_MASK (1 << 10) | 769 | #define OMAP4430_GFX_STATDEP_MASK (1 << 10) |
812 | 770 | ||
813 | /* Used by CM_SHADOW_FREQ_CONFIG2, CM_SHADOW_FREQ_CONFIG2_RESTORE */ | 771 | /* Used by CM_SHADOW_FREQ_CONFIG2 */ |
814 | #define OMAP4430_GPMC_FREQ_UPDATE_SHIFT 0 | 772 | #define OMAP4430_GPMC_FREQ_UPDATE_SHIFT 0 |
815 | #define OMAP4430_GPMC_FREQ_UPDATE_MASK (1 << 0) | 773 | #define OMAP4430_GPMC_FREQ_UPDATE_MASK (1 << 0) |
816 | 774 | ||
817 | /* | 775 | /* |
818 | * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE, | 776 | * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, |
819 | * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER | 777 | * CM_DIV_M4_DPLL_PER |
820 | */ | 778 | */ |
821 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIV_SHIFT 0 | 779 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIV_SHIFT 0 |
822 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK (0x1f << 0) | 780 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK (0x1f << 0) |
823 | 781 | ||
824 | /* | 782 | /* |
825 | * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE, | 783 | * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, |
826 | * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER | 784 | * CM_DIV_M4_DPLL_PER |
827 | */ | 785 | */ |
828 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT 5 | 786 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT 5 |
829 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_MASK (1 << 5) | 787 | #define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_MASK (1 << 5) |
830 | 788 | ||
831 | /* | 789 | /* |
832 | * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE, | 790 | * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, |
833 | * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER | 791 | * CM_DIV_M4_DPLL_PER |
834 | */ | 792 | */ |
835 | #define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT 8 | 793 | #define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT 8 |
836 | #define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK (1 << 8) | 794 | #define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK (1 << 8) |
837 | 795 | ||
838 | /* | 796 | /* |
839 | * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE, | 797 | * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, |
840 | * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER | 798 | * CM_DIV_M4_DPLL_PER |
841 | */ | 799 | */ |
842 | #define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_SHIFT 12 | 800 | #define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_SHIFT 12 |
843 | #define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_MASK (1 << 12) | 801 | #define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_MASK (1 << 12) |
844 | 802 | ||
845 | /* | 803 | /* |
846 | * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE, | 804 | * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, |
847 | * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER | 805 | * CM_DIV_M5_DPLL_PER |
848 | */ | 806 | */ |
849 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIV_SHIFT 0 | 807 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIV_SHIFT 0 |
850 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK (0x1f << 0) | 808 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK (0x1f << 0) |
851 | 809 | ||
852 | /* | 810 | /* |
853 | * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE, | 811 | * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, |
854 | * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER | 812 | * CM_DIV_M5_DPLL_PER |
855 | */ | 813 | */ |
856 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT 5 | 814 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT 5 |
857 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_MASK (1 << 5) | 815 | #define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_MASK (1 << 5) |
858 | 816 | ||
859 | /* | 817 | /* |
860 | * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE, | 818 | * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, |
861 | * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER | 819 | * CM_DIV_M5_DPLL_PER |
862 | */ | 820 | */ |
863 | #define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT 8 | 821 | #define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT 8 |
864 | #define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK (1 << 8) | 822 | #define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK (1 << 8) |
865 | 823 | ||
866 | /* | 824 | /* |
867 | * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE, | 825 | * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, |
868 | * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER | 826 | * CM_DIV_M5_DPLL_PER |
869 | */ | 827 | */ |
870 | #define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_SHIFT 12 | 828 | #define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_SHIFT 12 |
871 | #define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_MASK (1 << 12) | 829 | #define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_MASK (1 << 12) |
872 | 830 | ||
873 | /* | 831 | /* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ |
874 | * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE, | ||
875 | * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER | ||
876 | */ | ||
877 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIV_SHIFT 0 | 832 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIV_SHIFT 0 |
878 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK (0x1f << 0) | 833 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK (0x1f << 0) |
879 | 834 | ||
880 | /* | 835 | /* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ |
881 | * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE, | ||
882 | * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER | ||
883 | */ | ||
884 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT 5 | 836 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT 5 |
885 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_MASK (1 << 5) | 837 | #define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_MASK (1 << 5) |
886 | 838 | ||
887 | /* | 839 | /* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ |
888 | * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE, | ||
889 | * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER | ||
890 | */ | ||
891 | #define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT 8 | 840 | #define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT 8 |
892 | #define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK (1 << 8) | 841 | #define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK (1 << 8) |
893 | 842 | ||
894 | /* | 843 | /* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ |
895 | * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE, | ||
896 | * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER | ||
897 | */ | ||
898 | #define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_SHIFT 12 | 844 | #define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_SHIFT 12 |
899 | #define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_MASK (1 << 12) | 845 | #define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_MASK (1 << 12) |
900 | 846 | ||
901 | /* | 847 | /* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ |
902 | * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE, | ||
903 | * CM_DIV_M7_DPLL_PER | ||
904 | */ | ||
905 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIV_SHIFT 0 | 848 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIV_SHIFT 0 |
906 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK (0x1f << 0) | 849 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK (0x1f << 0) |
907 | 850 | ||
908 | /* | 851 | /* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ |
909 | * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE, | ||
910 | * CM_DIV_M7_DPLL_PER | ||
911 | */ | ||
912 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_SHIFT 5 | 852 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_SHIFT 5 |
913 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_MASK (1 << 5) | 853 | #define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_MASK (1 << 5) |
914 | 854 | ||
915 | /* | 855 | /* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ |
916 | * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE, | ||
917 | * CM_DIV_M7_DPLL_PER | ||
918 | */ | ||
919 | #define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_SHIFT 8 | 856 | #define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_SHIFT 8 |
920 | #define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_MASK (1 << 8) | 857 | #define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_MASK (1 << 8) |
921 | 858 | ||
922 | /* | 859 | /* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ |
923 | * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE, | ||
924 | * CM_DIV_M7_DPLL_PER | ||
925 | */ | ||
926 | #define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_SHIFT 12 | 860 | #define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_SHIFT 12 |
927 | #define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_MASK (1 << 12) | 861 | #define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_MASK (1 << 12) |
928 | 862 | ||
@@ -934,8 +868,7 @@ | |||
934 | * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_MDMINTC_CLKCTRL, | 868 | * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_MDMINTC_CLKCTRL, |
935 | * CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, | 869 | * CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, |
936 | * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, | 870 | * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, |
937 | * CM_CM1_PROFILING_CLKCTRL, CM_CM1_PROFILING_CLKCTRL_RESTORE, | 871 | * CM_CM1_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL, |
938 | * CM_CM2_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL_RESTORE, | ||
939 | * CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL, | 872 | * CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL, |
940 | * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL, | 873 | * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL, |
941 | * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, | 874 | * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, |
@@ -944,30 +877,24 @@ | |||
944 | * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, | 877 | * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, |
945 | * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, | 878 | * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, |
946 | * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL, | 879 | * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL, |
947 | * CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, CM_L3INIT_USB_HOST_FS_CLKCTRL, | 880 | * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL, |
948 | * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL, | 881 | * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL, |
949 | * CM_L3INIT_USB_TLL_CLKCTRL_RESTORE, CM_L3INIT_XHPI_CLKCTRL, | 882 | * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL, |
950 | * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL_RESTORE, | ||
951 | * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE, | ||
952 | * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE, | ||
953 | * CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, CM_L3_2_L3_2_CLKCTRL, | 883 | * CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, CM_L3_2_L3_2_CLKCTRL, |
954 | * CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, CM_L4CFG_L4_CFG_CLKCTRL, | 884 | * CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, CM_L4CFG_L4_CFG_CLKCTRL, |
955 | * CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, CM_L4PER_ADC_CLKCTRL, | 885 | * CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, CM_L4PER_ADC_CLKCTRL, |
956 | * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL, | 886 | * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL, |
957 | * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL, | 887 | * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL, |
958 | * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, | 888 | * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, |
959 | * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL_RESTORE, | 889 | * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, |
960 | * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL_RESTORE, | 890 | * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL, |
961 | * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL_RESTORE, | 891 | * CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL, CM_L4PER_I2C1_CLKCTRL, |
962 | * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL_RESTORE, | 892 | * CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL, |
963 | * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL_RESTORE, | 893 | * CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL, |
964 | * CM_L4PER_HDQ1W_CLKCTRL, CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL, | 894 | * CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, |
965 | * CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, | 895 | * CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, |
966 | * CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, | 896 | * CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL, CM_L4PER_MMCSD4_CLKCTRL, |
967 | * CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL, | 897 | * CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL, |
968 | * CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL, | ||
969 | * CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL, | ||
970 | * CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL, | ||
971 | * CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, | 898 | * CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, |
972 | * CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL, | 899 | * CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL, |
973 | * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL, | 900 | * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL, |
@@ -983,166 +910,148 @@ | |||
983 | #define OMAP4430_IDLEST_SHIFT 16 | 910 | #define OMAP4430_IDLEST_SHIFT 16 |
984 | #define OMAP4430_IDLEST_MASK (0x3 << 16) | 911 | #define OMAP4430_IDLEST_MASK (0x3 << 16) |
985 | 912 | ||
986 | /* | 913 | /* Used by CM_DUCATI_DYNAMICDEP, CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */ |
987 | * Used by CM_DUCATI_DYNAMICDEP, CM_L3_2_DYNAMICDEP, | ||
988 | * CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE | ||
989 | */ | ||
990 | #define OMAP4430_ISS_DYNDEP_SHIFT 9 | 914 | #define OMAP4430_ISS_DYNDEP_SHIFT 9 |
991 | #define OMAP4430_ISS_DYNDEP_MASK (1 << 9) | 915 | #define OMAP4430_ISS_DYNDEP_MASK (1 << 9) |
992 | 916 | ||
993 | /* | 917 | /* |
994 | * Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, | 918 | * Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, |
995 | * CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP | 919 | * CM_TESLA_STATICDEP |
996 | */ | 920 | */ |
997 | #define OMAP4430_ISS_STATDEP_SHIFT 9 | 921 | #define OMAP4430_ISS_STATDEP_SHIFT 9 |
998 | #define OMAP4430_ISS_STATDEP_MASK (1 << 9) | 922 | #define OMAP4430_ISS_STATDEP_MASK (1 << 9) |
999 | 923 | ||
1000 | /* Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_TESLA_DYNAMICDEP */ | 924 | /* Used by CM_L3_2_DYNAMICDEP, CM_TESLA_DYNAMICDEP */ |
1001 | #define OMAP4430_IVAHD_DYNDEP_SHIFT 2 | 925 | #define OMAP4430_IVAHD_DYNDEP_SHIFT 2 |
1002 | #define OMAP4430_IVAHD_DYNDEP_MASK (1 << 2) | 926 | #define OMAP4430_IVAHD_DYNDEP_MASK (1 << 2) |
1003 | 927 | ||
1004 | /* | 928 | /* |
1005 | * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, | 929 | * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_DSS_STATICDEP, |
1006 | * CM_DSS_STATICDEP, CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, | 930 | * CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_L3INIT_STATICDEP, |
1007 | * CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, | 931 | * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
1008 | * CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP | ||
1009 | */ | 932 | */ |
1010 | #define OMAP4430_IVAHD_STATDEP_SHIFT 2 | 933 | #define OMAP4430_IVAHD_STATDEP_SHIFT 2 |
1011 | #define OMAP4430_IVAHD_STATDEP_MASK (1 << 2) | 934 | #define OMAP4430_IVAHD_STATDEP_MASK (1 << 2) |
1012 | 935 | ||
1013 | /* | 936 | /* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */ |
1014 | * Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, | ||
1015 | * CM_L4CFG_DYNAMICDEP_RESTORE, CM_L4PER_DYNAMICDEP, CM_L4PER_DYNAMICDEP_RESTORE | ||
1016 | */ | ||
1017 | #define OMAP4430_L3INIT_DYNDEP_SHIFT 7 | 937 | #define OMAP4430_L3INIT_DYNDEP_SHIFT 7 |
1018 | #define OMAP4430_L3INIT_DYNDEP_MASK (1 << 7) | 938 | #define OMAP4430_L3INIT_DYNDEP_MASK (1 << 7) |
1019 | 939 | ||
1020 | /* | 940 | /* |
1021 | * Used by CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, CM_DUCATI_STATICDEP, | 941 | * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, |
1022 | * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, | 942 | * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
1023 | * CM_TESLA_STATICDEP | ||
1024 | */ | 943 | */ |
1025 | #define OMAP4430_L3INIT_STATDEP_SHIFT 7 | 944 | #define OMAP4430_L3INIT_STATDEP_SHIFT 7 |
1026 | #define OMAP4430_L3INIT_STATDEP_MASK (1 << 7) | 945 | #define OMAP4430_L3INIT_STATDEP_MASK (1 << 7) |
1027 | 946 | ||
1028 | /* | 947 | /* |
1029 | * Used by CM_DSS_DYNAMICDEP, CM_L3INIT_DYNAMICDEP, CM_L3_2_DYNAMICDEP, | 948 | * Used by CM_DSS_DYNAMICDEP, CM_L3INIT_DYNAMICDEP, CM_L3_2_DYNAMICDEP, |
1030 | * CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, | 949 | * CM_L4CFG_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP |
1031 | * CM_L4CFG_DYNAMICDEP_RESTORE, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP | ||
1032 | */ | 950 | */ |
1033 | #define OMAP4430_L3_1_DYNDEP_SHIFT 5 | 951 | #define OMAP4430_L3_1_DYNDEP_SHIFT 5 |
1034 | #define OMAP4430_L3_1_DYNDEP_MASK (1 << 5) | 952 | #define OMAP4430_L3_1_DYNDEP_MASK (1 << 5) |
1035 | 953 | ||
1036 | /* | 954 | /* |
1037 | * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, | 955 | * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_DSS_STATICDEP, |
1038 | * CM_DSS_STATICDEP, CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP, | 956 | * CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP, |
1039 | * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, | 957 | * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, |
1040 | * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP | 958 | * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
1041 | */ | 959 | */ |
1042 | #define OMAP4430_L3_1_STATDEP_SHIFT 5 | 960 | #define OMAP4430_L3_1_STATDEP_SHIFT 5 |
1043 | #define OMAP4430_L3_1_STATDEP_MASK (1 << 5) | 961 | #define OMAP4430_L3_1_STATDEP_MASK (1 << 5) |
1044 | 962 | ||
1045 | /* | 963 | /* |
1046 | * Used by CM_CAM_DYNAMICDEP, CM_D2D_DYNAMICDEP, CM_D2D_DYNAMICDEP_RESTORE, | 964 | * Used by CM_CAM_DYNAMICDEP, CM_D2D_DYNAMICDEP, CM_DUCATI_DYNAMICDEP, |
1047 | * CM_DUCATI_DYNAMICDEP, CM_EMU_DYNAMICDEP, CM_GFX_DYNAMICDEP, | 965 | * CM_EMU_DYNAMICDEP, CM_GFX_DYNAMICDEP, CM_IVAHD_DYNAMICDEP, |
1048 | * CM_IVAHD_DYNAMICDEP, CM_L3INIT_DYNAMICDEP, CM_L3_1_DYNAMICDEP, | 966 | * CM_L3INIT_DYNAMICDEP, CM_L3_1_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, |
1049 | * CM_L3_1_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, | 967 | * CM_L4SEC_DYNAMICDEP, CM_SDMA_DYNAMICDEP |
1050 | * CM_L4CFG_DYNAMICDEP_RESTORE, CM_L4SEC_DYNAMICDEP, CM_SDMA_DYNAMICDEP | ||
1051 | */ | 968 | */ |
1052 | #define OMAP4430_L3_2_DYNDEP_SHIFT 6 | 969 | #define OMAP4430_L3_2_DYNDEP_SHIFT 6 |
1053 | #define OMAP4430_L3_2_DYNDEP_MASK (1 << 6) | 970 | #define OMAP4430_L3_2_DYNDEP_MASK (1 << 6) |
1054 | 971 | ||
1055 | /* | 972 | /* |
1056 | * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, | 973 | * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_DSS_STATICDEP, |
1057 | * CM_DSS_STATICDEP, CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP, | 974 | * CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP, |
1058 | * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, | 975 | * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, |
1059 | * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP | 976 | * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
1060 | */ | 977 | */ |
1061 | #define OMAP4430_L3_2_STATDEP_SHIFT 6 | 978 | #define OMAP4430_L3_2_STATDEP_SHIFT 6 |
1062 | #define OMAP4430_L3_2_STATDEP_MASK (1 << 6) | 979 | #define OMAP4430_L3_2_STATDEP_MASK (1 << 6) |
1063 | 980 | ||
1064 | /* Used by CM_L3_1_DYNAMICDEP, CM_L3_1_DYNAMICDEP_RESTORE */ | 981 | /* Used by CM_L3_1_DYNAMICDEP */ |
1065 | #define OMAP4430_L4CFG_DYNDEP_SHIFT 12 | 982 | #define OMAP4430_L4CFG_DYNDEP_SHIFT 12 |
1066 | #define OMAP4430_L4CFG_DYNDEP_MASK (1 << 12) | 983 | #define OMAP4430_L4CFG_DYNDEP_MASK (1 << 12) |
1067 | 984 | ||
1068 | /* | 985 | /* |
1069 | * Used by CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, CM_DUCATI_STATICDEP, | 986 | * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, |
1070 | * CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, | 987 | * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
1071 | * CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP | ||
1072 | */ | 988 | */ |
1073 | #define OMAP4430_L4CFG_STATDEP_SHIFT 12 | 989 | #define OMAP4430_L4CFG_STATDEP_SHIFT 12 |
1074 | #define OMAP4430_L4CFG_STATDEP_MASK (1 << 12) | 990 | #define OMAP4430_L4CFG_STATDEP_MASK (1 << 12) |
1075 | 991 | ||
1076 | /* Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE */ | 992 | /* Used by CM_L3_2_DYNAMICDEP */ |
1077 | #define OMAP4430_L4PER_DYNDEP_SHIFT 13 | 993 | #define OMAP4430_L4PER_DYNDEP_SHIFT 13 |
1078 | #define OMAP4430_L4PER_DYNDEP_MASK (1 << 13) | 994 | #define OMAP4430_L4PER_DYNDEP_MASK (1 << 13) |
1079 | 995 | ||
1080 | /* | 996 | /* |
1081 | * Used by CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, CM_DUCATI_STATICDEP, | 997 | * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, |
1082 | * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, | 998 | * CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
1083 | * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP | ||
1084 | */ | 999 | */ |
1085 | #define OMAP4430_L4PER_STATDEP_SHIFT 13 | 1000 | #define OMAP4430_L4PER_STATDEP_SHIFT 13 |
1086 | #define OMAP4430_L4PER_STATDEP_MASK (1 << 13) | 1001 | #define OMAP4430_L4PER_STATDEP_MASK (1 << 13) |
1087 | 1002 | ||
1088 | /* | 1003 | /* Used by CM_L3_2_DYNAMICDEP, CM_L4PER_DYNAMICDEP */ |
1089 | * Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4PER_DYNAMICDEP, | ||
1090 | * CM_L4PER_DYNAMICDEP_RESTORE | ||
1091 | */ | ||
1092 | #define OMAP4430_L4SEC_DYNDEP_SHIFT 14 | 1004 | #define OMAP4430_L4SEC_DYNDEP_SHIFT 14 |
1093 | #define OMAP4430_L4SEC_DYNDEP_MASK (1 << 14) | 1005 | #define OMAP4430_L4SEC_DYNDEP_MASK (1 << 14) |
1094 | 1006 | ||
1095 | /* | 1007 | /* |
1096 | * Used by CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, | 1008 | * Used by CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, |
1097 | * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE | 1009 | * CM_SDMA_STATICDEP |
1098 | */ | 1010 | */ |
1099 | #define OMAP4430_L4SEC_STATDEP_SHIFT 14 | 1011 | #define OMAP4430_L4SEC_STATDEP_SHIFT 14 |
1100 | #define OMAP4430_L4SEC_STATDEP_MASK (1 << 14) | 1012 | #define OMAP4430_L4SEC_STATDEP_MASK (1 << 14) |
1101 | 1013 | ||
1102 | /* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */ | 1014 | /* Used by CM_L4CFG_DYNAMICDEP */ |
1103 | #define OMAP4430_L4WKUP_DYNDEP_SHIFT 15 | 1015 | #define OMAP4430_L4WKUP_DYNDEP_SHIFT 15 |
1104 | #define OMAP4430_L4WKUP_DYNDEP_MASK (1 << 15) | 1016 | #define OMAP4430_L4WKUP_DYNDEP_MASK (1 << 15) |
1105 | 1017 | ||
1106 | /* | 1018 | /* |
1107 | * Used by CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, | 1019 | * Used by CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, |
1108 | * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP | 1020 | * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
1109 | */ | 1021 | */ |
1110 | #define OMAP4430_L4WKUP_STATDEP_SHIFT 15 | 1022 | #define OMAP4430_L4WKUP_STATDEP_SHIFT 15 |
1111 | #define OMAP4430_L4WKUP_STATDEP_MASK (1 << 15) | 1023 | #define OMAP4430_L4WKUP_STATDEP_MASK (1 << 15) |
1112 | 1024 | ||
1113 | /* | 1025 | /* |
1114 | * Used by CM_D2D_DYNAMICDEP, CM_D2D_DYNAMICDEP_RESTORE, CM_L3_1_DYNAMICDEP, | 1026 | * Used by CM_D2D_DYNAMICDEP, CM_L3_1_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, |
1115 | * CM_L3_1_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, | 1027 | * CM_MPU_DYNAMICDEP |
1116 | * CM_L4CFG_DYNAMICDEP_RESTORE, CM_MPU_DYNAMICDEP | ||
1117 | */ | 1028 | */ |
1118 | #define OMAP4430_MEMIF_DYNDEP_SHIFT 4 | 1029 | #define OMAP4430_MEMIF_DYNDEP_SHIFT 4 |
1119 | #define OMAP4430_MEMIF_DYNDEP_MASK (1 << 4) | 1030 | #define OMAP4430_MEMIF_DYNDEP_MASK (1 << 4) |
1120 | 1031 | ||
1121 | /* | 1032 | /* |
1122 | * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, | 1033 | * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_DSS_STATICDEP, |
1123 | * CM_DSS_STATICDEP, CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP, | 1034 | * CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP, |
1124 | * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, | 1035 | * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, |
1125 | * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP | 1036 | * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP |
1126 | */ | 1037 | */ |
1127 | #define OMAP4430_MEMIF_STATDEP_SHIFT 4 | 1038 | #define OMAP4430_MEMIF_STATDEP_SHIFT 4 |
1128 | #define OMAP4430_MEMIF_STATDEP_MASK (1 << 4) | 1039 | #define OMAP4430_MEMIF_STATDEP_MASK (1 << 4) |
1129 | 1040 | ||
1130 | /* | 1041 | /* |
1131 | * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE, | 1042 | * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE, |
1132 | * CM_SSC_MODFREQDIV_DPLL_CORE_RESTORE, CM_SSC_MODFREQDIV_DPLL_DDRPHY, | 1043 | * CM_SSC_MODFREQDIV_DPLL_DDRPHY, CM_SSC_MODFREQDIV_DPLL_IVA, |
1133 | * CM_SSC_MODFREQDIV_DPLL_IVA, CM_SSC_MODFREQDIV_DPLL_MPU, | 1044 | * CM_SSC_MODFREQDIV_DPLL_MPU, CM_SSC_MODFREQDIV_DPLL_PER, |
1134 | * CM_SSC_MODFREQDIV_DPLL_PER, CM_SSC_MODFREQDIV_DPLL_UNIPRO, | 1045 | * CM_SSC_MODFREQDIV_DPLL_UNIPRO, CM_SSC_MODFREQDIV_DPLL_USB |
1135 | * CM_SSC_MODFREQDIV_DPLL_USB | ||
1136 | */ | 1046 | */ |
1137 | #define OMAP4430_MODFREQDIV_EXPONENT_SHIFT 8 | 1047 | #define OMAP4430_MODFREQDIV_EXPONENT_SHIFT 8 |
1138 | #define OMAP4430_MODFREQDIV_EXPONENT_MASK (0x7 << 8) | 1048 | #define OMAP4430_MODFREQDIV_EXPONENT_MASK (0x7 << 8) |
1139 | 1049 | ||
1140 | /* | 1050 | /* |
1141 | * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE, | 1051 | * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE, |
1142 | * CM_SSC_MODFREQDIV_DPLL_CORE_RESTORE, CM_SSC_MODFREQDIV_DPLL_DDRPHY, | 1052 | * CM_SSC_MODFREQDIV_DPLL_DDRPHY, CM_SSC_MODFREQDIV_DPLL_IVA, |
1143 | * CM_SSC_MODFREQDIV_DPLL_IVA, CM_SSC_MODFREQDIV_DPLL_MPU, | 1053 | * CM_SSC_MODFREQDIV_DPLL_MPU, CM_SSC_MODFREQDIV_DPLL_PER, |
1144 | * CM_SSC_MODFREQDIV_DPLL_PER, CM_SSC_MODFREQDIV_DPLL_UNIPRO, | 1054 | * CM_SSC_MODFREQDIV_DPLL_UNIPRO, CM_SSC_MODFREQDIV_DPLL_USB |
1145 | * CM_SSC_MODFREQDIV_DPLL_USB | ||
1146 | */ | 1055 | */ |
1147 | #define OMAP4430_MODFREQDIV_MANTISSA_SHIFT 0 | 1056 | #define OMAP4430_MODFREQDIV_MANTISSA_SHIFT 0 |
1148 | #define OMAP4430_MODFREQDIV_MANTISSA_MASK (0x7f << 0) | 1057 | #define OMAP4430_MODFREQDIV_MANTISSA_MASK (0x7f << 0) |
@@ -1155,8 +1064,7 @@ | |||
1155 | * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_MDMINTC_CLKCTRL, | 1064 | * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_MDMINTC_CLKCTRL, |
1156 | * CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, | 1065 | * CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, |
1157 | * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, | 1066 | * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, |
1158 | * CM_CM1_PROFILING_CLKCTRL, CM_CM1_PROFILING_CLKCTRL_RESTORE, | 1067 | * CM_CM1_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL, |
1159 | * CM_CM2_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL_RESTORE, | ||
1160 | * CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL, | 1068 | * CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL, |
1161 | * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL, | 1069 | * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL, |
1162 | * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, | 1070 | * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, |
@@ -1165,30 +1073,24 @@ | |||
1165 | * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, | 1073 | * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, |
1166 | * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, | 1074 | * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, |
1167 | * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL, | 1075 | * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL, |
1168 | * CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, CM_L3INIT_USB_HOST_FS_CLKCTRL, | 1076 | * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL, |
1169 | * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL, | 1077 | * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL, |
1170 | * CM_L3INIT_USB_TLL_CLKCTRL_RESTORE, CM_L3INIT_XHPI_CLKCTRL, | 1078 | * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL, |
1171 | * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL_RESTORE, | ||
1172 | * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE, | ||
1173 | * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE, | ||
1174 | * CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, CM_L3_2_L3_2_CLKCTRL, | 1079 | * CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, CM_L3_2_L3_2_CLKCTRL, |
1175 | * CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, CM_L4CFG_L4_CFG_CLKCTRL, | 1080 | * CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, CM_L4CFG_L4_CFG_CLKCTRL, |
1176 | * CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, CM_L4PER_ADC_CLKCTRL, | 1081 | * CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, CM_L4PER_ADC_CLKCTRL, |
1177 | * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL, | 1082 | * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL, |
1178 | * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL, | 1083 | * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL, |
1179 | * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, | 1084 | * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, |
1180 | * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL_RESTORE, | 1085 | * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL, |
1181 | * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL_RESTORE, | 1086 | * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL, |
1182 | * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL_RESTORE, | 1087 | * CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL, CM_L4PER_I2C1_CLKCTRL, |
1183 | * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL_RESTORE, | 1088 | * CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL, |
1184 | * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL_RESTORE, | 1089 | * CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL, |
1185 | * CM_L4PER_HDQ1W_CLKCTRL, CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL, | 1090 | * CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL, |
1186 | * CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, | 1091 | * CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL, |
1187 | * CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, | 1092 | * CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL, CM_L4PER_MMCSD4_CLKCTRL, |
1188 | * CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL, | 1093 | * CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL, |
1189 | * CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL, | ||
1190 | * CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL, | ||
1191 | * CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL, | ||
1192 | * CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, | 1094 | * CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, |
1193 | * CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL, | 1095 | * CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL, |
1194 | * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL, | 1096 | * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL, |
@@ -1221,11 +1123,9 @@ | |||
1221 | #define OMAP4430_OPTFCLKEN_CTRLCLK_MASK (1 << 8) | 1123 | #define OMAP4430_OPTFCLKEN_CTRLCLK_MASK (1 << 8) |
1222 | 1124 | ||
1223 | /* | 1125 | /* |
1224 | * Used by CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL_RESTORE, | 1126 | * Used by CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, |
1225 | * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL_RESTORE, | 1127 | * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, |
1226 | * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL_RESTORE, | 1128 | * CM_WKUP_GPIO1_CLKCTRL |
1227 | * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL_RESTORE, | ||
1228 | * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL_RESTORE, CM_WKUP_GPIO1_CLKCTRL | ||
1229 | */ | 1129 | */ |
1230 | #define OMAP4430_OPTFCLKEN_DBCLK_SHIFT 8 | 1130 | #define OMAP4430_OPTFCLKEN_DBCLK_SHIFT 8 |
1231 | #define OMAP4430_OPTFCLKEN_DBCLK_MASK (1 << 8) | 1131 | #define OMAP4430_OPTFCLKEN_DBCLK_MASK (1 << 8) |
@@ -1254,23 +1154,23 @@ | |||
1254 | #define OMAP4430_OPTFCLKEN_FCLK2_SHIFT 10 | 1154 | #define OMAP4430_OPTFCLKEN_FCLK2_SHIFT 10 |
1255 | #define OMAP4430_OPTFCLKEN_FCLK2_MASK (1 << 10) | 1155 | #define OMAP4430_OPTFCLKEN_FCLK2_MASK (1 << 10) |
1256 | 1156 | ||
1257 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 1157 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
1258 | #define OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT 15 | 1158 | #define OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT 15 |
1259 | #define OMAP4430_OPTFCLKEN_FUNC48MCLK_MASK (1 << 15) | 1159 | #define OMAP4430_OPTFCLKEN_FUNC48MCLK_MASK (1 << 15) |
1260 | 1160 | ||
1261 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 1161 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
1262 | #define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT 13 | 1162 | #define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT 13 |
1263 | #define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_MASK (1 << 13) | 1163 | #define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_MASK (1 << 13) |
1264 | 1164 | ||
1265 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 1165 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
1266 | #define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT 14 | 1166 | #define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT 14 |
1267 | #define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_MASK (1 << 14) | 1167 | #define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_MASK (1 << 14) |
1268 | 1168 | ||
1269 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 1169 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
1270 | #define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT 11 | 1170 | #define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT 11 |
1271 | #define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_MASK (1 << 11) | 1171 | #define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_MASK (1 << 11) |
1272 | 1172 | ||
1273 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 1173 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
1274 | #define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT 12 | 1174 | #define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT 12 |
1275 | #define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_MASK (1 << 12) | 1175 | #define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_MASK (1 << 12) |
1276 | 1176 | ||
@@ -1306,27 +1206,27 @@ | |||
1306 | #define OMAP4430_OPTFCLKEN_TXPHYCLK_SHIFT 8 | 1206 | #define OMAP4430_OPTFCLKEN_TXPHYCLK_SHIFT 8 |
1307 | #define OMAP4430_OPTFCLKEN_TXPHYCLK_MASK (1 << 8) | 1207 | #define OMAP4430_OPTFCLKEN_TXPHYCLK_MASK (1 << 8) |
1308 | 1208 | ||
1309 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */ | 1209 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL */ |
1310 | #define OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT 8 | 1210 | #define OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT 8 |
1311 | #define OMAP4430_OPTFCLKEN_USB_CH0_CLK_MASK (1 << 8) | 1211 | #define OMAP4430_OPTFCLKEN_USB_CH0_CLK_MASK (1 << 8) |
1312 | 1212 | ||
1313 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */ | 1213 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL */ |
1314 | #define OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT 9 | 1214 | #define OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT 9 |
1315 | #define OMAP4430_OPTFCLKEN_USB_CH1_CLK_MASK (1 << 9) | 1215 | #define OMAP4430_OPTFCLKEN_USB_CH1_CLK_MASK (1 << 9) |
1316 | 1216 | ||
1317 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */ | 1217 | /* Used by CM_L3INIT_USB_TLL_CLKCTRL */ |
1318 | #define OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT 10 | 1218 | #define OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT 10 |
1319 | #define OMAP4430_OPTFCLKEN_USB_CH2_CLK_MASK (1 << 10) | 1219 | #define OMAP4430_OPTFCLKEN_USB_CH2_CLK_MASK (1 << 10) |
1320 | 1220 | ||
1321 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 1221 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
1322 | #define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT 8 | 1222 | #define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT 8 |
1323 | #define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_MASK (1 << 8) | 1223 | #define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_MASK (1 << 8) |
1324 | 1224 | ||
1325 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 1225 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
1326 | #define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT 9 | 1226 | #define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT 9 |
1327 | #define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_MASK (1 << 9) | 1227 | #define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_MASK (1 << 9) |
1328 | 1228 | ||
1329 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ | 1229 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL */ |
1330 | #define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT 10 | 1230 | #define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT 10 |
1331 | #define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_MASK (1 << 10) | 1231 | #define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_MASK (1 << 10) |
1332 | 1232 | ||
@@ -1374,7 +1274,7 @@ | |||
1374 | #define OMAP4430_PMD_TRACE_MUX_CTRL_SHIFT 22 | 1274 | #define OMAP4430_PMD_TRACE_MUX_CTRL_SHIFT 22 |
1375 | #define OMAP4430_PMD_TRACE_MUX_CTRL_MASK (0x3 << 22) | 1275 | #define OMAP4430_PMD_TRACE_MUX_CTRL_MASK (0x3 << 22) |
1376 | 1276 | ||
1377 | /* Used by CM_DYN_DEP_PRESCAL, CM_DYN_DEP_PRESCAL_RESTORE */ | 1277 | /* Used by CM_DYN_DEP_PRESCAL */ |
1378 | #define OMAP4430_PRESCAL_SHIFT 0 | 1278 | #define OMAP4430_PRESCAL_SHIFT 0 |
1379 | #define OMAP4430_PRESCAL_MASK (0x3f << 0) | 1279 | #define OMAP4430_PRESCAL_MASK (0x3f << 0) |
1380 | 1280 | ||
@@ -1382,10 +1282,7 @@ | |||
1382 | #define OMAP4430_R_RTL_SHIFT 11 | 1282 | #define OMAP4430_R_RTL_SHIFT 11 |
1383 | #define OMAP4430_R_RTL_MASK (0x1f << 11) | 1283 | #define OMAP4430_R_RTL_MASK (0x1f << 11) |
1384 | 1284 | ||
1385 | /* | 1285 | /* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL */ |
1386 | * Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, | ||
1387 | * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE | ||
1388 | */ | ||
1389 | #define OMAP4430_SAR_MODE_SHIFT 4 | 1286 | #define OMAP4430_SAR_MODE_SHIFT 4 |
1390 | #define OMAP4430_SAR_MODE_MASK (1 << 4) | 1287 | #define OMAP4430_SAR_MODE_MASK (1 << 4) |
1391 | 1288 | ||
@@ -1397,7 +1294,7 @@ | |||
1397 | #define OMAP4430_SCHEME_SHIFT 30 | 1294 | #define OMAP4430_SCHEME_SHIFT 30 |
1398 | #define OMAP4430_SCHEME_MASK (0x3 << 30) | 1295 | #define OMAP4430_SCHEME_MASK (0x3 << 30) |
1399 | 1296 | ||
1400 | /* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */ | 1297 | /* Used by CM_L4CFG_DYNAMICDEP */ |
1401 | #define OMAP4430_SDMA_DYNDEP_SHIFT 11 | 1298 | #define OMAP4430_SDMA_DYNDEP_SHIFT 11 |
1402 | #define OMAP4430_SDMA_DYNDEP_MASK (1 << 11) | 1299 | #define OMAP4430_SDMA_DYNDEP_MASK (1 << 11) |
1403 | 1300 | ||
@@ -1417,10 +1314,10 @@ | |||
1417 | * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, | 1314 | * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, |
1418 | * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, | 1315 | * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, |
1419 | * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, | 1316 | * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, |
1420 | * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, | 1317 | * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_FS_CLKCTRL, |
1421 | * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL, | 1318 | * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, |
1422 | * CM_L3INIT_XHPI_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_MPU_MPU_CLKCTRL, | 1319 | * CM_L4SEC_CRYPTODMA_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL, |
1423 | * CM_SDMA_SDMA_CLKCTRL, CM_TESLA_TESLA_CLKCTRL | 1320 | * CM_TESLA_TESLA_CLKCTRL |
1424 | */ | 1321 | */ |
1425 | #define OMAP4430_STBYST_SHIFT 18 | 1322 | #define OMAP4430_STBYST_SHIFT 18 |
1426 | #define OMAP4430_STBYST_MASK (1 << 18) | 1323 | #define OMAP4430_STBYST_MASK (1 << 18) |
@@ -1438,17 +1335,13 @@ | |||
1438 | #define OMAP4430_ST_DPLL_CLKDCOLDO_MASK (1 << 9) | 1335 | #define OMAP4430_ST_DPLL_CLKDCOLDO_MASK (1 << 9) |
1439 | 1336 | ||
1440 | /* | 1337 | /* |
1441 | * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, | 1338 | * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY, |
1442 | * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU, | 1339 | * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB |
1443 | * CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB | ||
1444 | */ | 1340 | */ |
1445 | #define OMAP4430_ST_DPLL_CLKOUT_SHIFT 9 | 1341 | #define OMAP4430_ST_DPLL_CLKOUT_SHIFT 9 |
1446 | #define OMAP4430_ST_DPLL_CLKOUT_MASK (1 << 9) | 1342 | #define OMAP4430_ST_DPLL_CLKOUT_MASK (1 << 9) |
1447 | 1343 | ||
1448 | /* | 1344 | /* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */ |
1449 | * Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, | ||
1450 | * CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_PER | ||
1451 | */ | ||
1452 | #define OMAP4430_ST_DPLL_CLKOUTHIF_SHIFT 9 | 1345 | #define OMAP4430_ST_DPLL_CLKOUTHIF_SHIFT 9 |
1453 | #define OMAP4430_ST_DPLL_CLKOUTHIF_MASK (1 << 9) | 1346 | #define OMAP4430_ST_DPLL_CLKOUTHIF_MASK (1 << 9) |
1454 | 1347 | ||
@@ -1457,30 +1350,24 @@ | |||
1457 | #define OMAP4430_ST_DPLL_CLKOUTX2_MASK (1 << 11) | 1350 | #define OMAP4430_ST_DPLL_CLKOUTX2_MASK (1 << 11) |
1458 | 1351 | ||
1459 | /* | 1352 | /* |
1460 | * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE, | 1353 | * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, |
1461 | * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER | 1354 | * CM_DIV_M4_DPLL_PER |
1462 | */ | 1355 | */ |
1463 | #define OMAP4430_ST_HSDIVIDER_CLKOUT1_SHIFT 9 | 1356 | #define OMAP4430_ST_HSDIVIDER_CLKOUT1_SHIFT 9 |
1464 | #define OMAP4430_ST_HSDIVIDER_CLKOUT1_MASK (1 << 9) | 1357 | #define OMAP4430_ST_HSDIVIDER_CLKOUT1_MASK (1 << 9) |
1465 | 1358 | ||
1466 | /* | 1359 | /* |
1467 | * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE, | 1360 | * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, |
1468 | * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER | 1361 | * CM_DIV_M5_DPLL_PER |
1469 | */ | 1362 | */ |
1470 | #define OMAP4430_ST_HSDIVIDER_CLKOUT2_SHIFT 9 | 1363 | #define OMAP4430_ST_HSDIVIDER_CLKOUT2_SHIFT 9 |
1471 | #define OMAP4430_ST_HSDIVIDER_CLKOUT2_MASK (1 << 9) | 1364 | #define OMAP4430_ST_HSDIVIDER_CLKOUT2_MASK (1 << 9) |
1472 | 1365 | ||
1473 | /* | 1366 | /* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */ |
1474 | * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE, | ||
1475 | * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER | ||
1476 | */ | ||
1477 | #define OMAP4430_ST_HSDIVIDER_CLKOUT3_SHIFT 9 | 1367 | #define OMAP4430_ST_HSDIVIDER_CLKOUT3_SHIFT 9 |
1478 | #define OMAP4430_ST_HSDIVIDER_CLKOUT3_MASK (1 << 9) | 1368 | #define OMAP4430_ST_HSDIVIDER_CLKOUT3_MASK (1 << 9) |
1479 | 1369 | ||
1480 | /* | 1370 | /* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */ |
1481 | * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE, | ||
1482 | * CM_DIV_M7_DPLL_PER | ||
1483 | */ | ||
1484 | #define OMAP4430_ST_HSDIVIDER_CLKOUT4_SHIFT 9 | 1371 | #define OMAP4430_ST_HSDIVIDER_CLKOUT4_SHIFT 9 |
1485 | #define OMAP4430_ST_HSDIVIDER_CLKOUT4_MASK (1 << 9) | 1372 | #define OMAP4430_ST_HSDIVIDER_CLKOUT4_MASK (1 << 9) |
1486 | 1373 | ||
@@ -1496,7 +1383,7 @@ | |||
1496 | #define OMAP4430_SYS_CLKSEL_SHIFT 0 | 1383 | #define OMAP4430_SYS_CLKSEL_SHIFT 0 |
1497 | #define OMAP4430_SYS_CLKSEL_MASK (0x7 << 0) | 1384 | #define OMAP4430_SYS_CLKSEL_MASK (0x7 << 0) |
1498 | 1385 | ||
1499 | /* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */ | 1386 | /* Used by CM_L4CFG_DYNAMICDEP */ |
1500 | #define OMAP4430_TESLA_DYNDEP_SHIFT 1 | 1387 | #define OMAP4430_TESLA_DYNDEP_SHIFT 1 |
1501 | #define OMAP4430_TESLA_DYNDEP_MASK (1 << 1) | 1388 | #define OMAP4430_TESLA_DYNDEP_MASK (1 << 1) |
1502 | 1389 | ||
@@ -1505,11 +1392,9 @@ | |||
1505 | #define OMAP4430_TESLA_STATDEP_MASK (1 << 1) | 1392 | #define OMAP4430_TESLA_STATDEP_MASK (1 << 1) |
1506 | 1393 | ||
1507 | /* | 1394 | /* |
1508 | * Used by CM_D2D_DYNAMICDEP, CM_D2D_DYNAMICDEP_RESTORE, CM_DUCATI_DYNAMICDEP, | 1395 | * Used by CM_D2D_DYNAMICDEP, CM_DUCATI_DYNAMICDEP, CM_EMU_DYNAMICDEP, |
1509 | * CM_EMU_DYNAMICDEP, CM_L3_1_DYNAMICDEP, CM_L3_1_DYNAMICDEP_RESTORE, | 1396 | * CM_L3_1_DYNAMICDEP, CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, |
1510 | * CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, | 1397 | * CM_L4PER_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP |
1511 | * CM_L4CFG_DYNAMICDEP_RESTORE, CM_L4PER_DYNAMICDEP, | ||
1512 | * CM_L4PER_DYNAMICDEP_RESTORE, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP | ||
1513 | */ | 1398 | */ |
1514 | #define OMAP4430_WINDOWSIZE_SHIFT 24 | 1399 | #define OMAP4430_WINDOWSIZE_SHIFT 24 |
1515 | #define OMAP4430_WINDOWSIZE_MASK (0xf << 24) | 1400 | #define OMAP4430_WINDOWSIZE_MASK (0xf << 24) |
diff --git a/arch/arm/mach-omap2/cm1_44xx.h b/arch/arm/mach-omap2/cm1_44xx.h index e2d7a56b2ad6..1bc00dc4876c 100644 --- a/arch/arm/mach-omap2/cm1_44xx.h +++ b/arch/arm/mach-omap2/cm1_44xx.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * OMAP44xx CM1 instance offset macros | 2 | * OMAP44xx CM1 instance offset macros |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. | 4 | * Copyright (C) 2009-2011 Texas Instruments, Inc. |
5 | * Copyright (C) 2009-2010 Nokia Corporation | 5 | * Copyright (C) 2009-2010 Nokia Corporation |
6 | * | 6 | * |
7 | * Paul Walmsley (paul@pwsan.com) | 7 | * Paul Walmsley (paul@pwsan.com) |
@@ -41,9 +41,9 @@ | |||
41 | #define OMAP4430_CM1_INSTR_INST 0x0f00 | 41 | #define OMAP4430_CM1_INSTR_INST 0x0f00 |
42 | 42 | ||
43 | /* CM1 clockdomain register offsets (from instance start) */ | 43 | /* CM1 clockdomain register offsets (from instance start) */ |
44 | #define OMAP4430_CM1_ABE_ABE_CDOFFS 0x0000 | 44 | #define OMAP4430_CM1_MPU_MPU_CDOFFS 0x0000 |
45 | #define OMAP4430_CM1_MPU_MPU_CDOFFS 0x0000 | 45 | #define OMAP4430_CM1_TESLA_TESLA_CDOFFS 0x0000 |
46 | #define OMAP4430_CM1_TESLA_TESLA_CDOFFS 0x0000 | 46 | #define OMAP4430_CM1_ABE_ABE_CDOFFS 0x0000 |
47 | 47 | ||
48 | /* CM1 */ | 48 | /* CM1 */ |
49 | 49 | ||
@@ -82,8 +82,8 @@ | |||
82 | #define OMAP4430_CM_DIV_M7_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0044) | 82 | #define OMAP4430_CM_DIV_M7_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0044) |
83 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_CORE_OFFSET 0x0048 | 83 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_CORE_OFFSET 0x0048 |
84 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0048) | 84 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0048) |
85 | #define OMAP4_CM_SSC_INSTFREQDIV_DPLL_CORE_OFFSET 0x004c | 85 | #define OMAP4_CM_SSC_MODFREQDIV_DPLL_CORE_OFFSET 0x004c |
86 | #define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x004c) | 86 | #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x004c) |
87 | #define OMAP4_CM_EMU_OVERRIDE_DPLL_CORE_OFFSET 0x0050 | 87 | #define OMAP4_CM_EMU_OVERRIDE_DPLL_CORE_OFFSET 0x0050 |
88 | #define OMAP4430_CM_EMU_OVERRIDE_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0050) | 88 | #define OMAP4430_CM_EMU_OVERRIDE_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0050) |
89 | #define OMAP4_CM_CLKMODE_DPLL_MPU_OFFSET 0x0060 | 89 | #define OMAP4_CM_CLKMODE_DPLL_MPU_OFFSET 0x0060 |
@@ -98,8 +98,8 @@ | |||
98 | #define OMAP4430_CM_DIV_M2_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0070) | 98 | #define OMAP4430_CM_DIV_M2_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0070) |
99 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_MPU_OFFSET 0x0088 | 99 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_MPU_OFFSET 0x0088 |
100 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0088) | 100 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0088) |
101 | #define OMAP4_CM_SSC_INSTFREQDIV_DPLL_MPU_OFFSET 0x008c | 101 | #define OMAP4_CM_SSC_MODFREQDIV_DPLL_MPU_OFFSET 0x008c |
102 | #define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x008c) | 102 | #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x008c) |
103 | #define OMAP4_CM_BYPCLK_DPLL_MPU_OFFSET 0x009c | 103 | #define OMAP4_CM_BYPCLK_DPLL_MPU_OFFSET 0x009c |
104 | #define OMAP4430_CM_BYPCLK_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x009c) | 104 | #define OMAP4430_CM_BYPCLK_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x009c) |
105 | #define OMAP4_CM_CLKMODE_DPLL_IVA_OFFSET 0x00a0 | 105 | #define OMAP4_CM_CLKMODE_DPLL_IVA_OFFSET 0x00a0 |
@@ -116,8 +116,8 @@ | |||
116 | #define OMAP4430_CM_DIV_M5_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00bc) | 116 | #define OMAP4430_CM_DIV_M5_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00bc) |
117 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_IVA_OFFSET 0x00c8 | 117 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_IVA_OFFSET 0x00c8 |
118 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00c8) | 118 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00c8) |
119 | #define OMAP4_CM_SSC_INSTFREQDIV_DPLL_IVA_OFFSET 0x00cc | 119 | #define OMAP4_CM_SSC_MODFREQDIV_DPLL_IVA_OFFSET 0x00cc |
120 | #define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00cc) | 120 | #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00cc) |
121 | #define OMAP4_CM_BYPCLK_DPLL_IVA_OFFSET 0x00dc | 121 | #define OMAP4_CM_BYPCLK_DPLL_IVA_OFFSET 0x00dc |
122 | #define OMAP4430_CM_BYPCLK_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00dc) | 122 | #define OMAP4430_CM_BYPCLK_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00dc) |
123 | #define OMAP4_CM_CLKMODE_DPLL_ABE_OFFSET 0x00e0 | 123 | #define OMAP4_CM_CLKMODE_DPLL_ABE_OFFSET 0x00e0 |
@@ -134,8 +134,8 @@ | |||
134 | #define OMAP4430_CM_DIV_M3_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00f4) | 134 | #define OMAP4430_CM_DIV_M3_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00f4) |
135 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_ABE_OFFSET 0x0108 | 135 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_ABE_OFFSET 0x0108 |
136 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0108) | 136 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0108) |
137 | #define OMAP4_CM_SSC_INSTFREQDIV_DPLL_ABE_OFFSET 0x010c | 137 | #define OMAP4_CM_SSC_MODFREQDIV_DPLL_ABE_OFFSET 0x010c |
138 | #define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x010c) | 138 | #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x010c) |
139 | #define OMAP4_CM_CLKMODE_DPLL_DDRPHY_OFFSET 0x0120 | 139 | #define OMAP4_CM_CLKMODE_DPLL_DDRPHY_OFFSET 0x0120 |
140 | #define OMAP4430_CM_CLKMODE_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0120) | 140 | #define OMAP4430_CM_CLKMODE_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0120) |
141 | #define OMAP4_CM_IDLEST_DPLL_DDRPHY_OFFSET 0x0124 | 141 | #define OMAP4_CM_IDLEST_DPLL_DDRPHY_OFFSET 0x0124 |
@@ -154,8 +154,8 @@ | |||
154 | #define OMAP4430_CM_DIV_M6_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0140) | 154 | #define OMAP4430_CM_DIV_M6_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0140) |
155 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_DDRPHY_OFFSET 0x0148 | 155 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_DDRPHY_OFFSET 0x0148 |
156 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0148) | 156 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0148) |
157 | #define OMAP4_CM_SSC_INSTFREQDIV_DPLL_DDRPHY_OFFSET 0x014c | 157 | #define OMAP4_CM_SSC_MODFREQDIV_DPLL_DDRPHY_OFFSET 0x014c |
158 | #define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x014c) | 158 | #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x014c) |
159 | #define OMAP4_CM_SHADOW_FREQ_CONFIG1_OFFSET 0x0160 | 159 | #define OMAP4_CM_SHADOW_FREQ_CONFIG1_OFFSET 0x0160 |
160 | #define OMAP4430_CM_SHADOW_FREQ_CONFIG1 OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0160) | 160 | #define OMAP4430_CM_SHADOW_FREQ_CONFIG1 OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0160) |
161 | #define OMAP4_CM_SHADOW_FREQ_CONFIG2_OFFSET 0x0164 | 161 | #define OMAP4_CM_SHADOW_FREQ_CONFIG2_OFFSET 0x0164 |
@@ -217,42 +217,6 @@ | |||
217 | #define OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET 0x0088 | 217 | #define OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET 0x0088 |
218 | #define OMAP4430_CM1_ABE_WDT3_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_INST, 0x0088) | 218 | #define OMAP4430_CM1_ABE_WDT3_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_INST, 0x0088) |
219 | 219 | ||
220 | /* CM1.RESTORE_CM1 register offsets */ | ||
221 | #define OMAP4_CM_CLKSEL_CORE_RESTORE_OFFSET 0x0000 | ||
222 | #define OMAP4430_CM_CLKSEL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0000) | ||
223 | #define OMAP4_CM_DIV_M2_DPLL_CORE_RESTORE_OFFSET 0x0004 | ||
224 | #define OMAP4430_CM_DIV_M2_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0004) | ||
225 | #define OMAP4_CM_DIV_M3_DPLL_CORE_RESTORE_OFFSET 0x0008 | ||
226 | #define OMAP4430_CM_DIV_M3_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0008) | ||
227 | #define OMAP4_CM_DIV_M4_DPLL_CORE_RESTORE_OFFSET 0x000c | ||
228 | #define OMAP4430_CM_DIV_M4_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x000c) | ||
229 | #define OMAP4_CM_DIV_M5_DPLL_CORE_RESTORE_OFFSET 0x0010 | ||
230 | #define OMAP4430_CM_DIV_M5_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0010) | ||
231 | #define OMAP4_CM_DIV_M6_DPLL_CORE_RESTORE_OFFSET 0x0014 | ||
232 | #define OMAP4430_CM_DIV_M6_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0014) | ||
233 | #define OMAP4_CM_DIV_M7_DPLL_CORE_RESTORE_OFFSET 0x0018 | ||
234 | #define OMAP4430_CM_DIV_M7_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0018) | ||
235 | #define OMAP4_CM_CLKSEL_DPLL_CORE_RESTORE_OFFSET 0x001c | ||
236 | #define OMAP4430_CM_CLKSEL_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x001c) | ||
237 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE_OFFSET 0x0020 | ||
238 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0020) | ||
239 | #define OMAP4_CM_SSC_INSTFREQDIV_DPLL_CORE_RESTORE_OFFSET 0x0024 | ||
240 | #define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0024) | ||
241 | #define OMAP4_CM_CLKMODE_DPLL_CORE_RESTORE_OFFSET 0x0028 | ||
242 | #define OMAP4430_CM_CLKMODE_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0028) | ||
243 | #define OMAP4_CM_SHADOW_FREQ_CONFIG2_RESTORE_OFFSET 0x002c | ||
244 | #define OMAP4430_CM_SHADOW_FREQ_CONFIG2_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x002c) | ||
245 | #define OMAP4_CM_SHADOW_FREQ_CONFIG1_RESTORE_OFFSET 0x0030 | ||
246 | #define OMAP4430_CM_SHADOW_FREQ_CONFIG1_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0030) | ||
247 | #define OMAP4_CM_AUTOIDLE_DPLL_CORE_RESTORE_OFFSET 0x0034 | ||
248 | #define OMAP4430_CM_AUTOIDLE_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0034) | ||
249 | #define OMAP4_CM_MPU_CLKSTCTRL_RESTORE_OFFSET 0x0038 | ||
250 | #define OMAP4430_CM_MPU_CLKSTCTRL_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0038) | ||
251 | #define OMAP4_CM_CM1_PROFILING_CLKCTRL_RESTORE_OFFSET 0x003c | ||
252 | #define OMAP4430_CM_CM1_PROFILING_CLKCTRL_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x003c) | ||
253 | #define OMAP4_CM_DYN_DEP_PRESCAL_RESTORE_OFFSET 0x0040 | ||
254 | #define OMAP4430_CM_DYN_DEP_PRESCAL_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0040) | ||
255 | |||
256 | /* Function prototypes */ | 220 | /* Function prototypes */ |
257 | extern u32 omap4_cm1_read_inst_reg(s16 inst, u16 idx); | 221 | extern u32 omap4_cm1_read_inst_reg(s16 inst, u16 idx); |
258 | extern void omap4_cm1_write_inst_reg(u32 val, s16 inst, u16 idx); | 222 | extern void omap4_cm1_write_inst_reg(u32 val, s16 inst, u16 idx); |
diff --git a/arch/arm/mach-omap2/cm2_44xx.h b/arch/arm/mach-omap2/cm2_44xx.h index aa4745044065..b9de72da1a8e 100644 --- a/arch/arm/mach-omap2/cm2_44xx.h +++ b/arch/arm/mach-omap2/cm2_44xx.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * OMAP44xx CM2 instance offset macros | 2 | * OMAP44xx CM2 instance offset macros |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. | 4 | * Copyright (C) 2009-2011 Texas Instruments, Inc. |
5 | * Copyright (C) 2009-2010 Nokia Corporation | 5 | * Copyright (C) 2009-2010 Nokia Corporation |
6 | * | 6 | * |
7 | * Paul Walmsley (paul@pwsan.com) | 7 | * Paul Walmsley (paul@pwsan.com) |
@@ -40,9 +40,9 @@ | |||
40 | #define OMAP4430_CM2_CAM_INST 0x1000 | 40 | #define OMAP4430_CM2_CAM_INST 0x1000 |
41 | #define OMAP4430_CM2_DSS_INST 0x1100 | 41 | #define OMAP4430_CM2_DSS_INST 0x1100 |
42 | #define OMAP4430_CM2_GFX_INST 0x1200 | 42 | #define OMAP4430_CM2_GFX_INST 0x1200 |
43 | #define OMAP4430_CM2_L3INIT_INST 0x1300 | 43 | #define OMAP4430_CM2_L3INIT_INST 0x1300 |
44 | #define OMAP4430_CM2_L4PER_INST 0x1400 | 44 | #define OMAP4430_CM2_L4PER_INST 0x1400 |
45 | #define OMAP4430_CM2_CEFUSE_INST 0x1600 | 45 | #define OMAP4430_CM2_CEFUSE_INST 0x1600 |
46 | #define OMAP4430_CM2_RESTORE_INST 0x1e00 | 46 | #define OMAP4430_CM2_RESTORE_INST 0x1e00 |
47 | #define OMAP4430_CM2_INSTR_INST 0x1f00 | 47 | #define OMAP4430_CM2_INSTR_INST 0x1f00 |
48 | 48 | ||
@@ -65,7 +65,6 @@ | |||
65 | #define OMAP4430_CM2_L4PER_L4SEC_CDOFFS 0x0180 | 65 | #define OMAP4430_CM2_L4PER_L4SEC_CDOFFS 0x0180 |
66 | #define OMAP4430_CM2_CEFUSE_CEFUSE_CDOFFS 0x0000 | 66 | #define OMAP4430_CM2_CEFUSE_CEFUSE_CDOFFS 0x0000 |
67 | 67 | ||
68 | |||
69 | /* CM2 */ | 68 | /* CM2 */ |
70 | 69 | ||
71 | /* CM2.OCP_SOCKET_CM2 register offsets */ | 70 | /* CM2.OCP_SOCKET_CM2 register offsets */ |
@@ -121,8 +120,8 @@ | |||
121 | #define OMAP4430_CM_DIV_M7_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0064) | 120 | #define OMAP4430_CM_DIV_M7_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0064) |
122 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_PER_OFFSET 0x0068 | 121 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_PER_OFFSET 0x0068 |
123 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0068) | 122 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0068) |
124 | #define OMAP4_CM_SSC_INSTFREQDIV_DPLL_PER_OFFSET 0x006c | 123 | #define OMAP4_CM_SSC_MODFREQDIV_DPLL_PER_OFFSET 0x006c |
125 | #define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x006c) | 124 | #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x006c) |
126 | #define OMAP4_CM_CLKMODE_DPLL_USB_OFFSET 0x0080 | 125 | #define OMAP4_CM_CLKMODE_DPLL_USB_OFFSET 0x0080 |
127 | #define OMAP4430_CM_CLKMODE_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0080) | 126 | #define OMAP4430_CM_CLKMODE_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0080) |
128 | #define OMAP4_CM_IDLEST_DPLL_USB_OFFSET 0x0084 | 127 | #define OMAP4_CM_IDLEST_DPLL_USB_OFFSET 0x0084 |
@@ -135,8 +134,8 @@ | |||
135 | #define OMAP4430_CM_DIV_M2_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0090) | 134 | #define OMAP4430_CM_DIV_M2_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0090) |
136 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_USB_OFFSET 0x00a8 | 135 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_USB_OFFSET 0x00a8 |
137 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00a8) | 136 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00a8) |
138 | #define OMAP4_CM_SSC_INSTFREQDIV_DPLL_USB_OFFSET 0x00ac | 137 | #define OMAP4_CM_SSC_MODFREQDIV_DPLL_USB_OFFSET 0x00ac |
139 | #define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00ac) | 138 | #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00ac) |
140 | #define OMAP4_CM_CLKDCOLDO_DPLL_USB_OFFSET 0x00b4 | 139 | #define OMAP4_CM_CLKDCOLDO_DPLL_USB_OFFSET 0x00b4 |
141 | #define OMAP4430_CM_CLKDCOLDO_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00b4) | 140 | #define OMAP4430_CM_CLKDCOLDO_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00b4) |
142 | #define OMAP4_CM_CLKMODE_DPLL_UNIPRO_OFFSET 0x00c0 | 141 | #define OMAP4_CM_CLKMODE_DPLL_UNIPRO_OFFSET 0x00c0 |
@@ -151,8 +150,8 @@ | |||
151 | #define OMAP4430_CM_DIV_M2_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00d0) | 150 | #define OMAP4430_CM_DIV_M2_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00d0) |
152 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_UNIPRO_OFFSET 0x00e8 | 151 | #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_UNIPRO_OFFSET 0x00e8 |
153 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00e8) | 152 | #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00e8) |
154 | #define OMAP4_CM_SSC_INSTFREQDIV_DPLL_UNIPRO_OFFSET 0x00ec | 153 | #define OMAP4_CM_SSC_MODFREQDIV_DPLL_UNIPRO_OFFSET 0x00ec |
155 | #define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00ec) | 154 | #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00ec) |
156 | 155 | ||
157 | /* CM2.ALWAYS_ON_CM2 register offsets */ | 156 | /* CM2.ALWAYS_ON_CM2 register offsets */ |
158 | #define OMAP4_CM_ALWON_CLKSTCTRL_OFFSET 0x0000 | 157 | #define OMAP4_CM_ALWON_CLKSTCTRL_OFFSET 0x0000 |
@@ -227,8 +226,8 @@ | |||
227 | #define OMAP4430_CM_D2D_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0508) | 226 | #define OMAP4430_CM_D2D_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0508) |
228 | #define OMAP4_CM_D2D_SAD2D_CLKCTRL_OFFSET 0x0520 | 227 | #define OMAP4_CM_D2D_SAD2D_CLKCTRL_OFFSET 0x0520 |
229 | #define OMAP4430_CM_D2D_SAD2D_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0520) | 228 | #define OMAP4430_CM_D2D_SAD2D_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0520) |
230 | #define OMAP4_CM_D2D_INSTEM_ICR_CLKCTRL_OFFSET 0x0528 | 229 | #define OMAP4_CM_D2D_MODEM_ICR_CLKCTRL_OFFSET 0x0528 |
231 | #define OMAP4430_CM_D2D_INSTEM_ICR_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0528) | 230 | #define OMAP4430_CM_D2D_MODEM_ICR_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0528) |
232 | #define OMAP4_CM_D2D_SAD2D_FW_CLKCTRL_OFFSET 0x0530 | 231 | #define OMAP4_CM_D2D_SAD2D_FW_CLKCTRL_OFFSET 0x0530 |
233 | #define OMAP4430_CM_D2D_SAD2D_FW_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0530) | 232 | #define OMAP4430_CM_D2D_SAD2D_FW_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0530) |
234 | #define OMAP4_CM_L4CFG_CLKSTCTRL_OFFSET 0x0600 | 233 | #define OMAP4_CM_L4CFG_CLKSTCTRL_OFFSET 0x0600 |
@@ -450,56 +449,6 @@ | |||
450 | #define OMAP4_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET 0x0020 | 449 | #define OMAP4_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET 0x0020 |
451 | #define OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CEFUSE_INST, 0x0020) | 450 | #define OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CEFUSE_INST, 0x0020) |
452 | 451 | ||
453 | /* CM2.RESTORE_CM2 register offsets */ | ||
454 | #define OMAP4_CM_L3_1_CLKSTCTRL_RESTORE_OFFSET 0x0000 | ||
455 | #define OMAP4430_CM_L3_1_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0000) | ||
456 | #define OMAP4_CM_L3_2_CLKSTCTRL_RESTORE_OFFSET 0x0004 | ||
457 | #define OMAP4430_CM_L3_2_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0004) | ||
458 | #define OMAP4_CM_L4CFG_CLKSTCTRL_RESTORE_OFFSET 0x0008 | ||
459 | #define OMAP4430_CM_L4CFG_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0008) | ||
460 | #define OMAP4_CM_MEMIF_CLKSTCTRL_RESTORE_OFFSET 0x000c | ||
461 | #define OMAP4430_CM_MEMIF_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x000c) | ||
462 | #define OMAP4_CM_L4PER_CLKSTCTRL_RESTORE_OFFSET 0x0010 | ||
463 | #define OMAP4430_CM_L4PER_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0010) | ||
464 | #define OMAP4_CM_L3INIT_CLKSTCTRL_RESTORE_OFFSET 0x0014 | ||
465 | #define OMAP4430_CM_L3INIT_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0014) | ||
466 | #define OMAP4_CM_L3INSTR_L3_3_CLKCTRL_RESTORE_OFFSET 0x0018 | ||
467 | #define OMAP4430_CM_L3INSTR_L3_3_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0018) | ||
468 | #define OMAP4_CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE_OFFSET 0x001c | ||
469 | #define OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x001c) | ||
470 | #define OMAP4_CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE_OFFSET 0x0020 | ||
471 | #define OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0020) | ||
472 | #define OMAP4_CM_CM2_PROFILING_CLKCTRL_RESTORE_OFFSET 0x0024 | ||
473 | #define OMAP4430_CM_CM2_PROFILING_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0024) | ||
474 | #define OMAP4_CM_D2D_STATICDEP_RESTORE_OFFSET 0x0028 | ||
475 | #define OMAP4430_CM_D2D_STATICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0028) | ||
476 | #define OMAP4_CM_L3_1_DYNAMICDEP_RESTORE_OFFSET 0x002c | ||
477 | #define OMAP4430_CM_L3_1_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x002c) | ||
478 | #define OMAP4_CM_L3_2_DYNAMICDEP_RESTORE_OFFSET 0x0030 | ||
479 | #define OMAP4430_CM_L3_2_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0030) | ||
480 | #define OMAP4_CM_D2D_DYNAMICDEP_RESTORE_OFFSET 0x0034 | ||
481 | #define OMAP4430_CM_D2D_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0034) | ||
482 | #define OMAP4_CM_L4CFG_DYNAMICDEP_RESTORE_OFFSET 0x0038 | ||
483 | #define OMAP4430_CM_L4CFG_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0038) | ||
484 | #define OMAP4_CM_L4PER_DYNAMICDEP_RESTORE_OFFSET 0x003c | ||
485 | #define OMAP4430_CM_L4PER_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x003c) | ||
486 | #define OMAP4_CM_L4PER_GPIO2_CLKCTRL_RESTORE_OFFSET 0x0040 | ||
487 | #define OMAP4430_CM_L4PER_GPIO2_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0040) | ||
488 | #define OMAP4_CM_L4PER_GPIO3_CLKCTRL_RESTORE_OFFSET 0x0044 | ||
489 | #define OMAP4430_CM_L4PER_GPIO3_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0044) | ||
490 | #define OMAP4_CM_L4PER_GPIO4_CLKCTRL_RESTORE_OFFSET 0x0048 | ||
491 | #define OMAP4430_CM_L4PER_GPIO4_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0048) | ||
492 | #define OMAP4_CM_L4PER_GPIO5_CLKCTRL_RESTORE_OFFSET 0x004c | ||
493 | #define OMAP4430_CM_L4PER_GPIO5_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x004c) | ||
494 | #define OMAP4_CM_L4PER_GPIO6_CLKCTRL_RESTORE_OFFSET 0x0050 | ||
495 | #define OMAP4430_CM_L4PER_GPIO6_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0050) | ||
496 | #define OMAP4_CM_L3INIT_USB_HOST_CLKCTRL_RESTORE_OFFSET 0x0054 | ||
497 | #define OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0054) | ||
498 | #define OMAP4_CM_L3INIT_USB_TLL_CLKCTRL_RESTORE_OFFSET 0x0058 | ||
499 | #define OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0058) | ||
500 | #define OMAP4_CM_SDMA_STATICDEP_RESTORE_OFFSET 0x005c | ||
501 | #define OMAP4430_CM_SDMA_STATICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x005c) | ||
502 | |||
503 | /* Function prototypes */ | 452 | /* Function prototypes */ |
504 | extern u32 omap4_cm2_read_inst_reg(s16 inst, u16 idx); | 453 | extern u32 omap4_cm2_read_inst_reg(s16 inst, u16 idx); |
505 | extern void omap4_cm2_write_inst_reg(u32 val, s16 inst, u16 idx); | 454 | extern void omap4_cm2_write_inst_reg(u32 val, s16 inst, u16 idx); |
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c index 94ccf464677b..bcb0c5817167 100644 --- a/arch/arm/mach-omap2/common-board-devices.c +++ b/arch/arm/mach-omap2/common-board-devices.c | |||
@@ -20,36 +20,15 @@ | |||
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/i2c.h> | ||
24 | #include <linux/i2c/twl.h> | ||
25 | |||
26 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
27 | #include <linux/spi/spi.h> | 24 | #include <linux/spi/spi.h> |
28 | #include <linux/spi/ads7846.h> | 25 | #include <linux/spi/ads7846.h> |
29 | 26 | ||
30 | #include <plat/i2c.h> | ||
31 | #include <plat/mcspi.h> | 27 | #include <plat/mcspi.h> |
32 | #include <plat/nand.h> | 28 | #include <plat/nand.h> |
33 | 29 | ||
34 | #include "common-board-devices.h" | 30 | #include "common-board-devices.h" |
35 | 31 | ||
36 | static struct i2c_board_info __initdata pmic_i2c_board_info = { | ||
37 | .addr = 0x48, | ||
38 | .flags = I2C_CLIENT_WAKE, | ||
39 | }; | ||
40 | |||
41 | void __init omap_pmic_init(int bus, u32 clkrate, | ||
42 | const char *pmic_type, int pmic_irq, | ||
43 | struct twl4030_platform_data *pmic_data) | ||
44 | { | ||
45 | strncpy(pmic_i2c_board_info.type, pmic_type, | ||
46 | sizeof(pmic_i2c_board_info.type)); | ||
47 | pmic_i2c_board_info.irq = pmic_irq; | ||
48 | pmic_i2c_board_info.platform_data = pmic_data; | ||
49 | |||
50 | omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1); | ||
51 | } | ||
52 | |||
53 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \ | 32 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \ |
54 | defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | 33 | defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) |
55 | static struct omap2_mcspi_device_config ads7846_mcspi_config = { | 34 | static struct omap2_mcspi_device_config ads7846_mcspi_config = { |
@@ -115,9 +94,7 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce, | |||
115 | #endif | 94 | #endif |
116 | 95 | ||
117 | #if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE) | 96 | #if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE) |
118 | static struct omap_nand_platform_data nand_data = { | 97 | static struct omap_nand_platform_data nand_data; |
119 | .dma_channel = -1, /* disable DMA in OMAP NAND driver */ | ||
120 | }; | ||
121 | 98 | ||
122 | void __init omap_nand_flash_init(int options, struct mtd_partition *parts, | 99 | void __init omap_nand_flash_init(int options, struct mtd_partition *parts, |
123 | int nr_parts) | 100 | int nr_parts) |
@@ -148,7 +125,7 @@ void __init omap_nand_flash_init(int options, struct mtd_partition *parts, | |||
148 | nand_data.cs = nandcs; | 125 | nand_data.cs = nandcs; |
149 | nand_data.parts = parts; | 126 | nand_data.parts = parts; |
150 | nand_data.nr_parts = nr_parts; | 127 | nand_data.nr_parts = nr_parts; |
151 | nand_data.options = options; | 128 | nand_data.devsize = options; |
152 | 129 | ||
153 | printk(KERN_INFO "Registering NAND on CS%d\n", nandcs); | 130 | printk(KERN_INFO "Registering NAND on CS%d\n", nandcs); |
154 | if (gpmc_nand_init(&nand_data) < 0) | 131 | if (gpmc_nand_init(&nand_data) < 0) |
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h index 679719051df5..a0b4a42836ab 100644 --- a/arch/arm/mach-omap2/common-board-devices.h +++ b/arch/arm/mach-omap2/common-board-devices.h | |||
@@ -1,33 +1,11 @@ | |||
1 | #ifndef __OMAP_COMMON_BOARD_DEVICES__ | 1 | #ifndef __OMAP_COMMON_BOARD_DEVICES__ |
2 | #define __OMAP_COMMON_BOARD_DEVICES__ | 2 | #define __OMAP_COMMON_BOARD_DEVICES__ |
3 | 3 | ||
4 | #include "twl-common.h" | ||
5 | |||
4 | #define NAND_BLOCK_SIZE SZ_128K | 6 | #define NAND_BLOCK_SIZE SZ_128K |
5 | 7 | ||
6 | struct twl4030_platform_data; | ||
7 | struct mtd_partition; | 8 | struct mtd_partition; |
8 | |||
9 | void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq, | ||
10 | struct twl4030_platform_data *pmic_data); | ||
11 | |||
12 | static inline void omap2_pmic_init(const char *pmic_type, | ||
13 | struct twl4030_platform_data *pmic_data) | ||
14 | { | ||
15 | omap_pmic_init(2, 2600, pmic_type, INT_24XX_SYS_NIRQ, pmic_data); | ||
16 | } | ||
17 | |||
18 | static inline void omap3_pmic_init(const char *pmic_type, | ||
19 | struct twl4030_platform_data *pmic_data) | ||
20 | { | ||
21 | omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data); | ||
22 | } | ||
23 | |||
24 | static inline void omap4_pmic_init(const char *pmic_type, | ||
25 | struct twl4030_platform_data *pmic_data) | ||
26 | { | ||
27 | /* Phoenix Audio IC needs I2C1 to start with 400 KHz or less */ | ||
28 | omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data); | ||
29 | } | ||
30 | |||
31 | struct ads7846_platform_data; | 9 | struct ads7846_platform_data; |
32 | 10 | ||
33 | void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce, | 11 | void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce, |
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c index c1791d08ae56..8ad210bda9a9 100644 --- a/arch/arm/mach-omap2/gpmc-nand.c +++ b/arch/arm/mach-omap2/gpmc-nand.c | |||
@@ -20,8 +20,6 @@ | |||
20 | #include <plat/board.h> | 20 | #include <plat/board.h> |
21 | #include <plat/gpmc.h> | 21 | #include <plat/gpmc.h> |
22 | 22 | ||
23 | static struct omap_nand_platform_data *gpmc_nand_data; | ||
24 | |||
25 | static struct resource gpmc_nand_resource = { | 23 | static struct resource gpmc_nand_resource = { |
26 | .flags = IORESOURCE_MEM, | 24 | .flags = IORESOURCE_MEM, |
27 | }; | 25 | }; |
@@ -33,7 +31,7 @@ static struct platform_device gpmc_nand_device = { | |||
33 | .resource = &gpmc_nand_resource, | 31 | .resource = &gpmc_nand_resource, |
34 | }; | 32 | }; |
35 | 33 | ||
36 | static int omap2_nand_gpmc_retime(void) | 34 | static int omap2_nand_gpmc_retime(struct omap_nand_platform_data *gpmc_nand_data) |
37 | { | 35 | { |
38 | struct gpmc_timings t; | 36 | struct gpmc_timings t; |
39 | int err; | 37 | int err; |
@@ -83,13 +81,11 @@ static int omap2_nand_gpmc_retime(void) | |||
83 | return 0; | 81 | return 0; |
84 | } | 82 | } |
85 | 83 | ||
86 | int __init gpmc_nand_init(struct omap_nand_platform_data *_nand_data) | 84 | int __init gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data) |
87 | { | 85 | { |
88 | int err = 0; | 86 | int err = 0; |
89 | struct device *dev = &gpmc_nand_device.dev; | 87 | struct device *dev = &gpmc_nand_device.dev; |
90 | 88 | ||
91 | gpmc_nand_data = _nand_data; | ||
92 | gpmc_nand_data->nand_setup = omap2_nand_gpmc_retime; | ||
93 | gpmc_nand_device.dev.platform_data = gpmc_nand_data; | 89 | gpmc_nand_device.dev.platform_data = gpmc_nand_data; |
94 | 90 | ||
95 | err = gpmc_cs_request(gpmc_nand_data->cs, NAND_IO_SIZE, | 91 | err = gpmc_cs_request(gpmc_nand_data->cs, NAND_IO_SIZE, |
@@ -100,7 +96,7 @@ int __init gpmc_nand_init(struct omap_nand_platform_data *_nand_data) | |||
100 | } | 96 | } |
101 | 97 | ||
102 | /* Set timings in GPMC */ | 98 | /* Set timings in GPMC */ |
103 | err = omap2_nand_gpmc_retime(); | 99 | err = omap2_nand_gpmc_retime(gpmc_nand_data); |
104 | if (err < 0) { | 100 | if (err < 0) { |
105 | dev_err(dev, "Unable to set gpmc timings: %d\n", err); | 101 | dev_err(dev, "Unable to set gpmc timings: %d\n", err); |
106 | return err; | 102 | return err; |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 441e79d043a7..2ce1ce6fb4db 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -333,23 +333,9 @@ static int _set_hwmod_postsetup_state(struct omap_hwmod *oh, void *data) | |||
333 | return omap_hwmod_set_postsetup_state(oh, *(u8 *)data); | 333 | return omap_hwmod_set_postsetup_state(oh, *(u8 *)data); |
334 | } | 334 | } |
335 | 335 | ||
336 | /* See irq.c, omap4-common.c and entry-macro.S */ | ||
336 | void __iomem *omap_irq_base; | 337 | void __iomem *omap_irq_base; |
337 | 338 | ||
338 | /* | ||
339 | * Initialize asm_irq_base for entry-macro.S | ||
340 | */ | ||
341 | static inline void omap_irq_base_init(void) | ||
342 | { | ||
343 | if (cpu_is_omap24xx()) | ||
344 | omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE); | ||
345 | else if (cpu_is_omap34xx()) | ||
346 | omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE); | ||
347 | else if (cpu_is_omap44xx()) | ||
348 | omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE); | ||
349 | else | ||
350 | pr_err("Could not initialize omap_irq_base\n"); | ||
351 | } | ||
352 | |||
353 | void __init omap2_init_common_infrastructure(void) | 339 | void __init omap2_init_common_infrastructure(void) |
354 | { | 340 | { |
355 | u8 postsetup_state; | 341 | u8 postsetup_state; |
@@ -422,7 +408,6 @@ void __init omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0, | |||
422 | _omap2_init_reprogram_sdrc(); | 408 | _omap2_init_reprogram_sdrc(); |
423 | } | 409 | } |
424 | 410 | ||
425 | omap_irq_base_init(); | ||
426 | } | 411 | } |
427 | 412 | ||
428 | /* | 413 | /* |
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 3af2b7a1045e..3a12f7586a4c 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c | |||
@@ -141,25 +141,20 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) | |||
141 | IRQ_NOREQUEST | IRQ_NOPROBE, 0); | 141 | IRQ_NOREQUEST | IRQ_NOPROBE, 0); |
142 | } | 142 | } |
143 | 143 | ||
144 | void __init omap_init_irq(void) | 144 | static void __init omap_init_irq(u32 base, int nr_irqs) |
145 | { | 145 | { |
146 | unsigned long nr_of_irqs = 0; | 146 | unsigned long nr_of_irqs = 0; |
147 | unsigned int nr_banks = 0; | 147 | unsigned int nr_banks = 0; |
148 | int i, j; | 148 | int i, j; |
149 | 149 | ||
150 | omap_irq_base = ioremap(base, SZ_4K); | ||
151 | if (WARN_ON(!omap_irq_base)) | ||
152 | return; | ||
153 | |||
150 | for (i = 0; i < ARRAY_SIZE(irq_banks); i++) { | 154 | for (i = 0; i < ARRAY_SIZE(irq_banks); i++) { |
151 | unsigned long base = 0; | ||
152 | struct omap_irq_bank *bank = irq_banks + i; | 155 | struct omap_irq_bank *bank = irq_banks + i; |
153 | 156 | ||
154 | if (cpu_is_omap24xx()) | 157 | bank->nr_irqs = nr_irqs; |
155 | base = OMAP24XX_IC_BASE; | ||
156 | else if (cpu_is_omap34xx()) | ||
157 | base = OMAP34XX_IC_BASE; | ||
158 | |||
159 | BUG_ON(!base); | ||
160 | |||
161 | if (cpu_is_ti816x()) | ||
162 | bank->nr_irqs = 128; | ||
163 | 158 | ||
164 | /* Static mapping, never released */ | 159 | /* Static mapping, never released */ |
165 | bank->base_reg = ioremap(base, SZ_4K); | 160 | bank->base_reg = ioremap(base, SZ_4K); |
@@ -181,6 +176,21 @@ void __init omap_init_irq(void) | |||
181 | nr_of_irqs, nr_banks, nr_banks > 1 ? "s" : ""); | 176 | nr_of_irqs, nr_banks, nr_banks > 1 ? "s" : ""); |
182 | } | 177 | } |
183 | 178 | ||
179 | void __init omap2_init_irq(void) | ||
180 | { | ||
181 | omap_init_irq(OMAP24XX_IC_BASE, 96); | ||
182 | } | ||
183 | |||
184 | void __init omap3_init_irq(void) | ||
185 | { | ||
186 | omap_init_irq(OMAP34XX_IC_BASE, 96); | ||
187 | } | ||
188 | |||
189 | void __init ti816x_init_irq(void) | ||
190 | { | ||
191 | omap_init_irq(OMAP34XX_IC_BASE, 128); | ||
192 | } | ||
193 | |||
184 | #ifdef CONFIG_ARCH_OMAP3 | 194 | #ifdef CONFIG_ARCH_OMAP3 |
185 | static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)]; | 195 | static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)]; |
186 | 196 | ||
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 9ef8c29dd817..35ac3e5f6e94 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <asm/hardware/gic.h> | 19 | #include <asm/hardware/gic.h> |
20 | #include <asm/hardware/cache-l2x0.h> | 20 | #include <asm/hardware/cache-l2x0.h> |
21 | 21 | ||
22 | #include <plat/irqs.h> | ||
23 | |||
22 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
23 | #include <mach/omap4-common.h> | 25 | #include <mach/omap4-common.h> |
24 | 26 | ||
@@ -31,17 +33,15 @@ void __iomem *gic_dist_base_addr; | |||
31 | 33 | ||
32 | void __init gic_init_irq(void) | 34 | void __init gic_init_irq(void) |
33 | { | 35 | { |
34 | void __iomem *gic_cpu_base; | ||
35 | |||
36 | /* Static mapping, never released */ | 36 | /* Static mapping, never released */ |
37 | gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K); | 37 | gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K); |
38 | BUG_ON(!gic_dist_base_addr); | 38 | BUG_ON(!gic_dist_base_addr); |
39 | 39 | ||
40 | /* Static mapping, never released */ | 40 | /* Static mapping, never released */ |
41 | gic_cpu_base = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512); | 41 | omap_irq_base = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512); |
42 | BUG_ON(!gic_cpu_base); | 42 | BUG_ON(!omap_irq_base); |
43 | 43 | ||
44 | gic_init(0, 29, gic_dist_base_addr, gic_cpu_base); | 44 | gic_init(0, 29, gic_dist_base_addr, omap_irq_base); |
45 | } | 45 | } |
46 | 46 | ||
47 | #ifdef CONFIG_CACHE_L2X0 | 47 | #ifdef CONFIG_CACHE_L2X0 |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 293fa6cd50e1..7d242c9e2a2c 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * omap_hwmod implementation for OMAP2/3/4 | 2 | * omap_hwmod implementation for OMAP2/3/4 |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2011 Nokia Corporation | 4 | * Copyright (C) 2009-2011 Nokia Corporation |
5 | * Copyright (C) 2011 Texas Instruments, Inc. | ||
5 | * | 6 | * |
6 | * Paul Walmsley, Benoît Cousson, Kevin Hilman | 7 | * Paul Walmsley, Benoît Cousson, Kevin Hilman |
7 | * | 8 | * |
@@ -387,11 +388,10 @@ static int _set_module_autoidle(struct omap_hwmod *oh, u8 autoidle, | |||
387 | */ | 388 | */ |
388 | static int _enable_wakeup(struct omap_hwmod *oh, u32 *v) | 389 | static int _enable_wakeup(struct omap_hwmod *oh, u32 *v) |
389 | { | 390 | { |
390 | u32 wakeup_mask; | ||
391 | |||
392 | if (!oh->class->sysc || | 391 | if (!oh->class->sysc || |
393 | !((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) || | 392 | !((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) || |
394 | (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP))) | 393 | (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) || |
394 | (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP))) | ||
395 | return -EINVAL; | 395 | return -EINVAL; |
396 | 396 | ||
397 | if (!oh->class->sysc->sysc_fields) { | 397 | if (!oh->class->sysc->sysc_fields) { |
@@ -399,12 +399,13 @@ static int _enable_wakeup(struct omap_hwmod *oh, u32 *v) | |||
399 | return -EINVAL; | 399 | return -EINVAL; |
400 | } | 400 | } |
401 | 401 | ||
402 | wakeup_mask = (0x1 << oh->class->sysc->sysc_fields->enwkup_shift); | 402 | if (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) |
403 | 403 | *v |= 0x1 << oh->class->sysc->sysc_fields->enwkup_shift; | |
404 | *v |= wakeup_mask; | ||
405 | 404 | ||
406 | if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) | 405 | if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) |
407 | _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART_WKUP, v); | 406 | _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART_WKUP, v); |
407 | if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP) | ||
408 | _set_master_standbymode(oh, HWMOD_IDLEMODE_SMART_WKUP, v); | ||
408 | 409 | ||
409 | /* XXX test pwrdm_get_wken for this hwmod's subsystem */ | 410 | /* XXX test pwrdm_get_wken for this hwmod's subsystem */ |
410 | 411 | ||
@@ -422,11 +423,10 @@ static int _enable_wakeup(struct omap_hwmod *oh, u32 *v) | |||
422 | */ | 423 | */ |
423 | static int _disable_wakeup(struct omap_hwmod *oh, u32 *v) | 424 | static int _disable_wakeup(struct omap_hwmod *oh, u32 *v) |
424 | { | 425 | { |
425 | u32 wakeup_mask; | ||
426 | |||
427 | if (!oh->class->sysc || | 426 | if (!oh->class->sysc || |
428 | !((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) || | 427 | !((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) || |
429 | (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP))) | 428 | (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) || |
429 | (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP))) | ||
430 | return -EINVAL; | 430 | return -EINVAL; |
431 | 431 | ||
432 | if (!oh->class->sysc->sysc_fields) { | 432 | if (!oh->class->sysc->sysc_fields) { |
@@ -434,12 +434,13 @@ static int _disable_wakeup(struct omap_hwmod *oh, u32 *v) | |||
434 | return -EINVAL; | 434 | return -EINVAL; |
435 | } | 435 | } |
436 | 436 | ||
437 | wakeup_mask = (0x1 << oh->class->sysc->sysc_fields->enwkup_shift); | 437 | if (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) |
438 | 438 | *v &= ~(0x1 << oh->class->sysc->sysc_fields->enwkup_shift); | |
439 | *v &= ~wakeup_mask; | ||
440 | 439 | ||
441 | if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) | 440 | if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) |
442 | _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART, v); | 441 | _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART, v); |
442 | if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP) | ||
443 | _set_master_standbymode(oh, HWMOD_IDLEMODE_SMART_WKUP, v); | ||
443 | 444 | ||
444 | /* XXX test pwrdm_get_wken for this hwmod's subsystem */ | 445 | /* XXX test pwrdm_get_wken for this hwmod's subsystem */ |
445 | 446 | ||
@@ -678,6 +679,75 @@ static void _disable_optional_clocks(struct omap_hwmod *oh) | |||
678 | } | 679 | } |
679 | 680 | ||
680 | /** | 681 | /** |
682 | * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh | ||
683 | * @oh: struct omap_hwmod *oh | ||
684 | * | ||
685 | * Count and return the number of MPU IRQs associated with the hwmod | ||
686 | * @oh. Used to allocate struct resource data. Returns 0 if @oh is | ||
687 | * NULL. | ||
688 | */ | ||
689 | static int _count_mpu_irqs(struct omap_hwmod *oh) | ||
690 | { | ||
691 | struct omap_hwmod_irq_info *ohii; | ||
692 | int i = 0; | ||
693 | |||
694 | if (!oh || !oh->mpu_irqs) | ||
695 | return 0; | ||
696 | |||
697 | do { | ||
698 | ohii = &oh->mpu_irqs[i++]; | ||
699 | } while (ohii->irq != -1); | ||
700 | |||
701 | return i; | ||
702 | } | ||
703 | |||
704 | /** | ||
705 | * _count_sdma_reqs - count the number of SDMA request lines associated with @oh | ||
706 | * @oh: struct omap_hwmod *oh | ||
707 | * | ||
708 | * Count and return the number of SDMA request lines associated with | ||
709 | * the hwmod @oh. Used to allocate struct resource data. Returns 0 | ||
710 | * if @oh is NULL. | ||
711 | */ | ||
712 | static int _count_sdma_reqs(struct omap_hwmod *oh) | ||
713 | { | ||
714 | struct omap_hwmod_dma_info *ohdi; | ||
715 | int i = 0; | ||
716 | |||
717 | if (!oh || !oh->sdma_reqs) | ||
718 | return 0; | ||
719 | |||
720 | do { | ||
721 | ohdi = &oh->sdma_reqs[i++]; | ||
722 | } while (ohdi->dma_req != -1); | ||
723 | |||
724 | return i; | ||
725 | } | ||
726 | |||
727 | /** | ||
728 | * _count_ocp_if_addr_spaces - count the number of address space entries for @oh | ||
729 | * @oh: struct omap_hwmod *oh | ||
730 | * | ||
731 | * Count and return the number of address space ranges associated with | ||
732 | * the hwmod @oh. Used to allocate struct resource data. Returns 0 | ||
733 | * if @oh is NULL. | ||
734 | */ | ||
735 | static int _count_ocp_if_addr_spaces(struct omap_hwmod_ocp_if *os) | ||
736 | { | ||
737 | struct omap_hwmod_addr_space *mem; | ||
738 | int i = 0; | ||
739 | |||
740 | if (!os || !os->addr) | ||
741 | return 0; | ||
742 | |||
743 | do { | ||
744 | mem = &os->addr[i++]; | ||
745 | } while (mem->pa_start != mem->pa_end); | ||
746 | |||
747 | return i; | ||
748 | } | ||
749 | |||
750 | /** | ||
681 | * _find_mpu_port_index - find hwmod OCP slave port ID intended for MPU use | 751 | * _find_mpu_port_index - find hwmod OCP slave port ID intended for MPU use |
682 | * @oh: struct omap_hwmod * | 752 | * @oh: struct omap_hwmod * |
683 | * | 753 | * |
@@ -722,8 +792,7 @@ static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index) | |||
722 | { | 792 | { |
723 | struct omap_hwmod_ocp_if *os; | 793 | struct omap_hwmod_ocp_if *os; |
724 | struct omap_hwmod_addr_space *mem; | 794 | struct omap_hwmod_addr_space *mem; |
725 | int i; | 795 | int i = 0, found = 0; |
726 | int found = 0; | ||
727 | void __iomem *va_start; | 796 | void __iomem *va_start; |
728 | 797 | ||
729 | if (!oh || oh->slaves_cnt == 0) | 798 | if (!oh || oh->slaves_cnt == 0) |
@@ -731,12 +800,14 @@ static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index) | |||
731 | 800 | ||
732 | os = oh->slaves[index]; | 801 | os = oh->slaves[index]; |
733 | 802 | ||
734 | for (i = 0, mem = os->addr; i < os->addr_cnt; i++, mem++) { | 803 | if (!os->addr) |
735 | if (mem->flags & ADDR_TYPE_RT) { | 804 | return NULL; |
805 | |||
806 | do { | ||
807 | mem = &os->addr[i++]; | ||
808 | if (mem->flags & ADDR_TYPE_RT) | ||
736 | found = 1; | 809 | found = 1; |
737 | break; | 810 | } while (!found && mem->pa_start != mem->pa_end); |
738 | } | ||
739 | } | ||
740 | 811 | ||
741 | if (found) { | 812 | if (found) { |
742 | va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start); | 813 | va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start); |
@@ -781,8 +852,16 @@ static void _enable_sysc(struct omap_hwmod *oh) | |||
781 | } | 852 | } |
782 | 853 | ||
783 | if (sf & SYSC_HAS_MIDLEMODE) { | 854 | if (sf & SYSC_HAS_MIDLEMODE) { |
784 | idlemode = (oh->flags & HWMOD_SWSUP_MSTANDBY) ? | 855 | if (oh->flags & HWMOD_SWSUP_MSTANDBY) { |
785 | HWMOD_IDLEMODE_NO : HWMOD_IDLEMODE_SMART; | 856 | idlemode = HWMOD_IDLEMODE_NO; |
857 | } else { | ||
858 | if (sf & SYSC_HAS_ENAWAKEUP) | ||
859 | _enable_wakeup(oh, &v); | ||
860 | if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP) | ||
861 | idlemode = HWMOD_IDLEMODE_SMART_WKUP; | ||
862 | else | ||
863 | idlemode = HWMOD_IDLEMODE_SMART; | ||
864 | } | ||
786 | _set_master_standbymode(oh, idlemode, &v); | 865 | _set_master_standbymode(oh, idlemode, &v); |
787 | } | 866 | } |
788 | 867 | ||
@@ -840,8 +919,16 @@ static void _idle_sysc(struct omap_hwmod *oh) | |||
840 | } | 919 | } |
841 | 920 | ||
842 | if (sf & SYSC_HAS_MIDLEMODE) { | 921 | if (sf & SYSC_HAS_MIDLEMODE) { |
843 | idlemode = (oh->flags & HWMOD_SWSUP_MSTANDBY) ? | 922 | if (oh->flags & HWMOD_SWSUP_MSTANDBY) { |
844 | HWMOD_IDLEMODE_FORCE : HWMOD_IDLEMODE_SMART; | 923 | idlemode = HWMOD_IDLEMODE_FORCE; |
924 | } else { | ||
925 | if (sf & SYSC_HAS_ENAWAKEUP) | ||
926 | _enable_wakeup(oh, &v); | ||
927 | if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP) | ||
928 | idlemode = HWMOD_IDLEMODE_SMART_WKUP; | ||
929 | else | ||
930 | idlemode = HWMOD_IDLEMODE_SMART; | ||
931 | } | ||
845 | _set_master_standbymode(oh, idlemode, &v); | 932 | _set_master_standbymode(oh, idlemode, &v); |
846 | } | 933 | } |
847 | 934 | ||
@@ -928,6 +1015,8 @@ static int _init_clocks(struct omap_hwmod *oh, void *data) | |||
928 | 1015 | ||
929 | if (!ret) | 1016 | if (!ret) |
930 | oh->_state = _HWMOD_STATE_CLKS_INITED; | 1017 | oh->_state = _HWMOD_STATE_CLKS_INITED; |
1018 | else | ||
1019 | pr_warning("omap_hwmod: %s: cannot _init_clocks\n", oh->name); | ||
931 | 1020 | ||
932 | return ret; | 1021 | return ret; |
933 | } | 1022 | } |
@@ -1224,6 +1313,8 @@ static int _enable(struct omap_hwmod *oh) | |||
1224 | { | 1313 | { |
1225 | int r; | 1314 | int r; |
1226 | 1315 | ||
1316 | pr_debug("omap_hwmod: %s: enabling\n", oh->name); | ||
1317 | |||
1227 | if (oh->_state != _HWMOD_STATE_INITIALIZED && | 1318 | if (oh->_state != _HWMOD_STATE_INITIALIZED && |
1228 | oh->_state != _HWMOD_STATE_IDLE && | 1319 | oh->_state != _HWMOD_STATE_IDLE && |
1229 | oh->_state != _HWMOD_STATE_DISABLED) { | 1320 | oh->_state != _HWMOD_STATE_DISABLED) { |
@@ -1232,17 +1323,6 @@ static int _enable(struct omap_hwmod *oh) | |||
1232 | return -EINVAL; | 1323 | return -EINVAL; |
1233 | } | 1324 | } |
1234 | 1325 | ||
1235 | pr_debug("omap_hwmod: %s: enabling\n", oh->name); | ||
1236 | |||
1237 | /* | ||
1238 | * If an IP contains only one HW reset line, then de-assert it in order | ||
1239 | * to allow to enable the clocks. Otherwise the PRCM will return | ||
1240 | * Intransition status, and the init will failed. | ||
1241 | */ | ||
1242 | if ((oh->_state == _HWMOD_STATE_INITIALIZED || | ||
1243 | oh->_state == _HWMOD_STATE_DISABLED) && oh->rst_lines_cnt == 1) | ||
1244 | _deassert_hardreset(oh, oh->rst_lines[0].name); | ||
1245 | |||
1246 | /* Mux pins for device runtime if populated */ | 1326 | /* Mux pins for device runtime if populated */ |
1247 | if (oh->mux && (!oh->mux->enabled || | 1327 | if (oh->mux && (!oh->mux->enabled || |
1248 | ((oh->_state == _HWMOD_STATE_IDLE) && | 1328 | ((oh->_state == _HWMOD_STATE_IDLE) && |
@@ -1252,20 +1332,31 @@ static int _enable(struct omap_hwmod *oh) | |||
1252 | _add_initiator_dep(oh, mpu_oh); | 1332 | _add_initiator_dep(oh, mpu_oh); |
1253 | _enable_clocks(oh); | 1333 | _enable_clocks(oh); |
1254 | 1334 | ||
1255 | r = _wait_target_ready(oh); | 1335 | /* |
1256 | if (!r) { | 1336 | * If an IP contains only one HW reset line, then de-assert it in order |
1257 | oh->_state = _HWMOD_STATE_ENABLED; | 1337 | * to allow the module state transition. Otherwise the PRCM will return |
1338 | * Intransition status, and the init will failed. | ||
1339 | */ | ||
1340 | if ((oh->_state == _HWMOD_STATE_INITIALIZED || | ||
1341 | oh->_state == _HWMOD_STATE_DISABLED) && oh->rst_lines_cnt == 1) | ||
1342 | _deassert_hardreset(oh, oh->rst_lines[0].name); | ||
1258 | 1343 | ||
1259 | /* Access the sysconfig only if the target is ready */ | 1344 | r = _wait_target_ready(oh); |
1260 | if (oh->class->sysc) { | 1345 | if (r) { |
1261 | if (!(oh->_int_flags & _HWMOD_SYSCONFIG_LOADED)) | ||
1262 | _update_sysc_cache(oh); | ||
1263 | _enable_sysc(oh); | ||
1264 | } | ||
1265 | } else { | ||
1266 | _disable_clocks(oh); | ||
1267 | pr_debug("omap_hwmod: %s: _wait_target_ready: %d\n", | 1346 | pr_debug("omap_hwmod: %s: _wait_target_ready: %d\n", |
1268 | oh->name, r); | 1347 | oh->name, r); |
1348 | _disable_clocks(oh); | ||
1349 | |||
1350 | return r; | ||
1351 | } | ||
1352 | |||
1353 | oh->_state = _HWMOD_STATE_ENABLED; | ||
1354 | |||
1355 | /* Access the sysconfig only if the target is ready */ | ||
1356 | if (oh->class->sysc) { | ||
1357 | if (!(oh->_int_flags & _HWMOD_SYSCONFIG_LOADED)) | ||
1358 | _update_sysc_cache(oh); | ||
1359 | _enable_sysc(oh); | ||
1269 | } | 1360 | } |
1270 | 1361 | ||
1271 | return r; | 1362 | return r; |
@@ -1281,14 +1372,14 @@ static int _enable(struct omap_hwmod *oh) | |||
1281 | */ | 1372 | */ |
1282 | static int _idle(struct omap_hwmod *oh) | 1373 | static int _idle(struct omap_hwmod *oh) |
1283 | { | 1374 | { |
1375 | pr_debug("omap_hwmod: %s: idling\n", oh->name); | ||
1376 | |||
1284 | if (oh->_state != _HWMOD_STATE_ENABLED) { | 1377 | if (oh->_state != _HWMOD_STATE_ENABLED) { |
1285 | WARN(1, "omap_hwmod: %s: idle state can only be entered from " | 1378 | WARN(1, "omap_hwmod: %s: idle state can only be entered from " |
1286 | "enabled state\n", oh->name); | 1379 | "enabled state\n", oh->name); |
1287 | return -EINVAL; | 1380 | return -EINVAL; |
1288 | } | 1381 | } |
1289 | 1382 | ||
1290 | pr_debug("omap_hwmod: %s: idling\n", oh->name); | ||
1291 | |||
1292 | if (oh->class->sysc) | 1383 | if (oh->class->sysc) |
1293 | _idle_sysc(oh); | 1384 | _idle_sysc(oh); |
1294 | _del_initiator_dep(oh, mpu_oh); | 1385 | _del_initiator_dep(oh, mpu_oh); |
@@ -1374,15 +1465,11 @@ static int _shutdown(struct omap_hwmod *oh) | |||
1374 | } | 1465 | } |
1375 | } | 1466 | } |
1376 | 1467 | ||
1377 | if (oh->class->sysc) | 1468 | if (oh->class->sysc) { |
1469 | if (oh->_state == _HWMOD_STATE_IDLE) | ||
1470 | _enable(oh); | ||
1378 | _shutdown_sysc(oh); | 1471 | _shutdown_sysc(oh); |
1379 | 1472 | } | |
1380 | /* | ||
1381 | * If an IP contains only one HW reset line, then assert it | ||
1382 | * before disabling the clocks and shutting down the IP. | ||
1383 | */ | ||
1384 | if (oh->rst_lines_cnt == 1) | ||
1385 | _assert_hardreset(oh, oh->rst_lines[0].name); | ||
1386 | 1473 | ||
1387 | /* clocks and deps are already disabled in idle */ | 1474 | /* clocks and deps are already disabled in idle */ |
1388 | if (oh->_state == _HWMOD_STATE_ENABLED) { | 1475 | if (oh->_state == _HWMOD_STATE_ENABLED) { |
@@ -1392,6 +1479,13 @@ static int _shutdown(struct omap_hwmod *oh) | |||
1392 | } | 1479 | } |
1393 | /* XXX Should this code also force-disable the optional clocks? */ | 1480 | /* XXX Should this code also force-disable the optional clocks? */ |
1394 | 1481 | ||
1482 | /* | ||
1483 | * If an IP contains only one HW reset line, then assert it | ||
1484 | * after disabling the clocks and before shutting down the IP. | ||
1485 | */ | ||
1486 | if (oh->rst_lines_cnt == 1) | ||
1487 | _assert_hardreset(oh, oh->rst_lines[0].name); | ||
1488 | |||
1395 | /* Mux pins to safe mode or use populated off mode values */ | 1489 | /* Mux pins to safe mode or use populated off mode values */ |
1396 | if (oh->mux) | 1490 | if (oh->mux) |
1397 | omap_hwmod_mux(oh->mux, _HWMOD_STATE_DISABLED); | 1491 | omap_hwmod_mux(oh->mux, _HWMOD_STATE_DISABLED); |
@@ -1685,9 +1779,6 @@ static int __init _populate_mpu_rt_base(struct omap_hwmod *oh, void *data) | |||
1685 | return 0; | 1779 | return 0; |
1686 | 1780 | ||
1687 | oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index); | 1781 | oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index); |
1688 | if (!oh->_mpu_rt_va) | ||
1689 | pr_warning("omap_hwmod: %s found no _mpu_rt_va for %s\n", | ||
1690 | __func__, oh->name); | ||
1691 | 1782 | ||
1692 | return 0; | 1783 | return 0; |
1693 | } | 1784 | } |
@@ -1939,10 +2030,10 @@ int omap_hwmod_count_resources(struct omap_hwmod *oh) | |||
1939 | { | 2030 | { |
1940 | int ret, i; | 2031 | int ret, i; |
1941 | 2032 | ||
1942 | ret = oh->mpu_irqs_cnt + oh->sdma_reqs_cnt; | 2033 | ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh); |
1943 | 2034 | ||
1944 | for (i = 0; i < oh->slaves_cnt; i++) | 2035 | for (i = 0; i < oh->slaves_cnt; i++) |
1945 | ret += oh->slaves[i]->addr_cnt; | 2036 | ret += _count_ocp_if_addr_spaces(oh->slaves[i]); |
1946 | 2037 | ||
1947 | return ret; | 2038 | return ret; |
1948 | } | 2039 | } |
@@ -1959,12 +2050,13 @@ int omap_hwmod_count_resources(struct omap_hwmod *oh) | |||
1959 | */ | 2050 | */ |
1960 | int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) | 2051 | int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) |
1961 | { | 2052 | { |
1962 | int i, j; | 2053 | int i, j, mpu_irqs_cnt, sdma_reqs_cnt; |
1963 | int r = 0; | 2054 | int r = 0; |
1964 | 2055 | ||
1965 | /* For each IRQ, DMA, memory area, fill in array.*/ | 2056 | /* For each IRQ, DMA, memory area, fill in array.*/ |
1966 | 2057 | ||
1967 | for (i = 0; i < oh->mpu_irqs_cnt; i++) { | 2058 | mpu_irqs_cnt = _count_mpu_irqs(oh); |
2059 | for (i = 0; i < mpu_irqs_cnt; i++) { | ||
1968 | (res + r)->name = (oh->mpu_irqs + i)->name; | 2060 | (res + r)->name = (oh->mpu_irqs + i)->name; |
1969 | (res + r)->start = (oh->mpu_irqs + i)->irq; | 2061 | (res + r)->start = (oh->mpu_irqs + i)->irq; |
1970 | (res + r)->end = (oh->mpu_irqs + i)->irq; | 2062 | (res + r)->end = (oh->mpu_irqs + i)->irq; |
@@ -1972,7 +2064,8 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) | |||
1972 | r++; | 2064 | r++; |
1973 | } | 2065 | } |
1974 | 2066 | ||
1975 | for (i = 0; i < oh->sdma_reqs_cnt; i++) { | 2067 | sdma_reqs_cnt = _count_sdma_reqs(oh); |
2068 | for (i = 0; i < sdma_reqs_cnt; i++) { | ||
1976 | (res + r)->name = (oh->sdma_reqs + i)->name; | 2069 | (res + r)->name = (oh->sdma_reqs + i)->name; |
1977 | (res + r)->start = (oh->sdma_reqs + i)->dma_req; | 2070 | (res + r)->start = (oh->sdma_reqs + i)->dma_req; |
1978 | (res + r)->end = (oh->sdma_reqs + i)->dma_req; | 2071 | (res + r)->end = (oh->sdma_reqs + i)->dma_req; |
@@ -1982,10 +2075,12 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) | |||
1982 | 2075 | ||
1983 | for (i = 0; i < oh->slaves_cnt; i++) { | 2076 | for (i = 0; i < oh->slaves_cnt; i++) { |
1984 | struct omap_hwmod_ocp_if *os; | 2077 | struct omap_hwmod_ocp_if *os; |
2078 | int addr_cnt; | ||
1985 | 2079 | ||
1986 | os = oh->slaves[i]; | 2080 | os = oh->slaves[i]; |
2081 | addr_cnt = _count_ocp_if_addr_spaces(os); | ||
1987 | 2082 | ||
1988 | for (j = 0; j < os->addr_cnt; j++) { | 2083 | for (j = 0; j < addr_cnt; j++) { |
1989 | (res + r)->name = (os->addr + j)->name; | 2084 | (res + r)->name = (os->addr + j)->name; |
1990 | (res + r)->start = (os->addr + j)->pa_start; | 2085 | (res + r)->start = (os->addr + j)->pa_start; |
1991 | (res + r)->end = (os->addr + j)->pa_end; | 2086 | (res + r)->end = (os->addr + j)->pa_end; |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c index c4d0ae87d62a..f3901abf2c28 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips | 2 | * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2010 Nokia Corporation | 4 | * Copyright (C) 2009-2011 Nokia Corporation |
5 | * Paul Walmsley | 5 | * Paul Walmsley |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -114,38 +114,20 @@ static struct omap_hwmod omap2420_mcbsp1_hwmod; | |||
114 | static struct omap_hwmod omap2420_mcbsp2_hwmod; | 114 | static struct omap_hwmod omap2420_mcbsp2_hwmod; |
115 | 115 | ||
116 | /* l4 core -> mcspi1 interface */ | 116 | /* l4 core -> mcspi1 interface */ |
117 | static struct omap_hwmod_addr_space omap2420_mcspi1_addr_space[] = { | ||
118 | { | ||
119 | .pa_start = 0x48098000, | ||
120 | .pa_end = 0x480980ff, | ||
121 | .flags = ADDR_TYPE_RT, | ||
122 | }, | ||
123 | }; | ||
124 | |||
125 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = { | 117 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = { |
126 | .master = &omap2420_l4_core_hwmod, | 118 | .master = &omap2420_l4_core_hwmod, |
127 | .slave = &omap2420_mcspi1_hwmod, | 119 | .slave = &omap2420_mcspi1_hwmod, |
128 | .clk = "mcspi1_ick", | 120 | .clk = "mcspi1_ick", |
129 | .addr = omap2420_mcspi1_addr_space, | 121 | .addr = omap2_mcspi1_addr_space, |
130 | .addr_cnt = ARRAY_SIZE(omap2420_mcspi1_addr_space), | ||
131 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 122 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
132 | }; | 123 | }; |
133 | 124 | ||
134 | /* l4 core -> mcspi2 interface */ | 125 | /* l4 core -> mcspi2 interface */ |
135 | static struct omap_hwmod_addr_space omap2420_mcspi2_addr_space[] = { | ||
136 | { | ||
137 | .pa_start = 0x4809a000, | ||
138 | .pa_end = 0x4809a0ff, | ||
139 | .flags = ADDR_TYPE_RT, | ||
140 | }, | ||
141 | }; | ||
142 | |||
143 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = { | 126 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = { |
144 | .master = &omap2420_l4_core_hwmod, | 127 | .master = &omap2420_l4_core_hwmod, |
145 | .slave = &omap2420_mcspi2_hwmod, | 128 | .slave = &omap2420_mcspi2_hwmod, |
146 | .clk = "mcspi2_ick", | 129 | .clk = "mcspi2_ick", |
147 | .addr = omap2420_mcspi2_addr_space, | 130 | .addr = omap2_mcspi2_addr_space, |
148 | .addr_cnt = ARRAY_SIZE(omap2420_mcspi2_addr_space), | ||
149 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 131 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
150 | }; | 132 | }; |
151 | 133 | ||
@@ -157,95 +139,47 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = { | |||
157 | }; | 139 | }; |
158 | 140 | ||
159 | /* L4 CORE -> UART1 interface */ | 141 | /* L4 CORE -> UART1 interface */ |
160 | static struct omap_hwmod_addr_space omap2420_uart1_addr_space[] = { | ||
161 | { | ||
162 | .pa_start = OMAP2_UART1_BASE, | ||
163 | .pa_end = OMAP2_UART1_BASE + SZ_8K - 1, | ||
164 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
165 | }, | ||
166 | }; | ||
167 | |||
168 | static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = { | 142 | static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = { |
169 | .master = &omap2420_l4_core_hwmod, | 143 | .master = &omap2420_l4_core_hwmod, |
170 | .slave = &omap2420_uart1_hwmod, | 144 | .slave = &omap2420_uart1_hwmod, |
171 | .clk = "uart1_ick", | 145 | .clk = "uart1_ick", |
172 | .addr = omap2420_uart1_addr_space, | 146 | .addr = omap2xxx_uart1_addr_space, |
173 | .addr_cnt = ARRAY_SIZE(omap2420_uart1_addr_space), | ||
174 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 147 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
175 | }; | 148 | }; |
176 | 149 | ||
177 | /* L4 CORE -> UART2 interface */ | 150 | /* L4 CORE -> UART2 interface */ |
178 | static struct omap_hwmod_addr_space omap2420_uart2_addr_space[] = { | ||
179 | { | ||
180 | .pa_start = OMAP2_UART2_BASE, | ||
181 | .pa_end = OMAP2_UART2_BASE + SZ_1K - 1, | ||
182 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
183 | }, | ||
184 | }; | ||
185 | |||
186 | static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = { | 151 | static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = { |
187 | .master = &omap2420_l4_core_hwmod, | 152 | .master = &omap2420_l4_core_hwmod, |
188 | .slave = &omap2420_uart2_hwmod, | 153 | .slave = &omap2420_uart2_hwmod, |
189 | .clk = "uart2_ick", | 154 | .clk = "uart2_ick", |
190 | .addr = omap2420_uart2_addr_space, | 155 | .addr = omap2xxx_uart2_addr_space, |
191 | .addr_cnt = ARRAY_SIZE(omap2420_uart2_addr_space), | ||
192 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 156 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
193 | }; | 157 | }; |
194 | 158 | ||
195 | /* L4 PER -> UART3 interface */ | 159 | /* L4 PER -> UART3 interface */ |
196 | static struct omap_hwmod_addr_space omap2420_uart3_addr_space[] = { | ||
197 | { | ||
198 | .pa_start = OMAP2_UART3_BASE, | ||
199 | .pa_end = OMAP2_UART3_BASE + SZ_1K - 1, | ||
200 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
201 | }, | ||
202 | }; | ||
203 | |||
204 | static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = { | 160 | static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = { |
205 | .master = &omap2420_l4_core_hwmod, | 161 | .master = &omap2420_l4_core_hwmod, |
206 | .slave = &omap2420_uart3_hwmod, | 162 | .slave = &omap2420_uart3_hwmod, |
207 | .clk = "uart3_ick", | 163 | .clk = "uart3_ick", |
208 | .addr = omap2420_uart3_addr_space, | 164 | .addr = omap2xxx_uart3_addr_space, |
209 | .addr_cnt = ARRAY_SIZE(omap2420_uart3_addr_space), | ||
210 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 165 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
211 | }; | 166 | }; |
212 | 167 | ||
213 | /* I2C IP block address space length (in bytes) */ | ||
214 | #define OMAP2_I2C_AS_LEN 128 | ||
215 | |||
216 | /* L4 CORE -> I2C1 interface */ | 168 | /* L4 CORE -> I2C1 interface */ |
217 | static struct omap_hwmod_addr_space omap2420_i2c1_addr_space[] = { | ||
218 | { | ||
219 | .pa_start = 0x48070000, | ||
220 | .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1, | ||
221 | .flags = ADDR_TYPE_RT, | ||
222 | }, | ||
223 | }; | ||
224 | |||
225 | static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = { | 169 | static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = { |
226 | .master = &omap2420_l4_core_hwmod, | 170 | .master = &omap2420_l4_core_hwmod, |
227 | .slave = &omap2420_i2c1_hwmod, | 171 | .slave = &omap2420_i2c1_hwmod, |
228 | .clk = "i2c1_ick", | 172 | .clk = "i2c1_ick", |
229 | .addr = omap2420_i2c1_addr_space, | 173 | .addr = omap2_i2c1_addr_space, |
230 | .addr_cnt = ARRAY_SIZE(omap2420_i2c1_addr_space), | ||
231 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 174 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
232 | }; | 175 | }; |
233 | 176 | ||
234 | /* L4 CORE -> I2C2 interface */ | 177 | /* L4 CORE -> I2C2 interface */ |
235 | static struct omap_hwmod_addr_space omap2420_i2c2_addr_space[] = { | ||
236 | { | ||
237 | .pa_start = 0x48072000, | ||
238 | .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1, | ||
239 | .flags = ADDR_TYPE_RT, | ||
240 | }, | ||
241 | }; | ||
242 | |||
243 | static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = { | 178 | static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = { |
244 | .master = &omap2420_l4_core_hwmod, | 179 | .master = &omap2420_l4_core_hwmod, |
245 | .slave = &omap2420_i2c2_hwmod, | 180 | .slave = &omap2420_i2c2_hwmod, |
246 | .clk = "i2c2_ick", | 181 | .clk = "i2c2_ick", |
247 | .addr = omap2420_i2c2_addr_space, | 182 | .addr = omap2_i2c2_addr_space, |
248 | .addr_cnt = ARRAY_SIZE(omap2420_i2c2_addr_space), | ||
249 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 183 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
250 | }; | 184 | }; |
251 | 185 | ||
@@ -340,29 +274,8 @@ static struct omap_hwmod omap2420_iva_hwmod = { | |||
340 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | 274 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
341 | }; | 275 | }; |
342 | 276 | ||
343 | /* Timer Common */ | ||
344 | static struct omap_hwmod_class_sysconfig omap2420_timer_sysc = { | ||
345 | .rev_offs = 0x0000, | ||
346 | .sysc_offs = 0x0010, | ||
347 | .syss_offs = 0x0014, | ||
348 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | | ||
349 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
350 | SYSC_HAS_AUTOIDLE), | ||
351 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
352 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
353 | }; | ||
354 | |||
355 | static struct omap_hwmod_class omap2420_timer_hwmod_class = { | ||
356 | .name = "timer", | ||
357 | .sysc = &omap2420_timer_sysc, | ||
358 | .rev = OMAP_TIMER_IP_VERSION_1, | ||
359 | }; | ||
360 | |||
361 | /* timer1 */ | 277 | /* timer1 */ |
362 | static struct omap_hwmod omap2420_timer1_hwmod; | 278 | static struct omap_hwmod omap2420_timer1_hwmod; |
363 | static struct omap_hwmod_irq_info omap2420_timer1_mpu_irqs[] = { | ||
364 | { .irq = 37, }, | ||
365 | }; | ||
366 | 279 | ||
367 | static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = { | 280 | static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = { |
368 | { | 281 | { |
@@ -370,6 +283,7 @@ static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = { | |||
370 | .pa_end = 0x48028000 + SZ_1K - 1, | 283 | .pa_end = 0x48028000 + SZ_1K - 1, |
371 | .flags = ADDR_TYPE_RT | 284 | .flags = ADDR_TYPE_RT |
372 | }, | 285 | }, |
286 | { } | ||
373 | }; | 287 | }; |
374 | 288 | ||
375 | /* l4_wkup -> timer1 */ | 289 | /* l4_wkup -> timer1 */ |
@@ -378,7 +292,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = { | |||
378 | .slave = &omap2420_timer1_hwmod, | 292 | .slave = &omap2420_timer1_hwmod, |
379 | .clk = "gpt1_ick", | 293 | .clk = "gpt1_ick", |
380 | .addr = omap2420_timer1_addrs, | 294 | .addr = omap2420_timer1_addrs, |
381 | .addr_cnt = ARRAY_SIZE(omap2420_timer1_addrs), | ||
382 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 295 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
383 | }; | 296 | }; |
384 | 297 | ||
@@ -390,8 +303,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = { | |||
390 | /* timer1 hwmod */ | 303 | /* timer1 hwmod */ |
391 | static struct omap_hwmod omap2420_timer1_hwmod = { | 304 | static struct omap_hwmod omap2420_timer1_hwmod = { |
392 | .name = "timer1", | 305 | .name = "timer1", |
393 | .mpu_irqs = omap2420_timer1_mpu_irqs, | 306 | .mpu_irqs = omap2_timer1_mpu_irqs, |
394 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer1_mpu_irqs), | ||
395 | .main_clk = "gpt1_fck", | 307 | .main_clk = "gpt1_fck", |
396 | .prcm = { | 308 | .prcm = { |
397 | .omap2 = { | 309 | .omap2 = { |
@@ -404,31 +316,19 @@ static struct omap_hwmod omap2420_timer1_hwmod = { | |||
404 | }, | 316 | }, |
405 | .slaves = omap2420_timer1_slaves, | 317 | .slaves = omap2420_timer1_slaves, |
406 | .slaves_cnt = ARRAY_SIZE(omap2420_timer1_slaves), | 318 | .slaves_cnt = ARRAY_SIZE(omap2420_timer1_slaves), |
407 | .class = &omap2420_timer_hwmod_class, | 319 | .class = &omap2xxx_timer_hwmod_class, |
408 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | 320 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
409 | }; | 321 | }; |
410 | 322 | ||
411 | /* timer2 */ | 323 | /* timer2 */ |
412 | static struct omap_hwmod omap2420_timer2_hwmod; | 324 | static struct omap_hwmod omap2420_timer2_hwmod; |
413 | static struct omap_hwmod_irq_info omap2420_timer2_mpu_irqs[] = { | ||
414 | { .irq = 38, }, | ||
415 | }; | ||
416 | |||
417 | static struct omap_hwmod_addr_space omap2420_timer2_addrs[] = { | ||
418 | { | ||
419 | .pa_start = 0x4802a000, | ||
420 | .pa_end = 0x4802a000 + SZ_1K - 1, | ||
421 | .flags = ADDR_TYPE_RT | ||
422 | }, | ||
423 | }; | ||
424 | 325 | ||
425 | /* l4_core -> timer2 */ | 326 | /* l4_core -> timer2 */ |
426 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = { | 327 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = { |
427 | .master = &omap2420_l4_core_hwmod, | 328 | .master = &omap2420_l4_core_hwmod, |
428 | .slave = &omap2420_timer2_hwmod, | 329 | .slave = &omap2420_timer2_hwmod, |
429 | .clk = "gpt2_ick", | 330 | .clk = "gpt2_ick", |
430 | .addr = omap2420_timer2_addrs, | 331 | .addr = omap2xxx_timer2_addrs, |
431 | .addr_cnt = ARRAY_SIZE(omap2420_timer2_addrs), | ||
432 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 332 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
433 | }; | 333 | }; |
434 | 334 | ||
@@ -440,8 +340,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = { | |||
440 | /* timer2 hwmod */ | 340 | /* timer2 hwmod */ |
441 | static struct omap_hwmod omap2420_timer2_hwmod = { | 341 | static struct omap_hwmod omap2420_timer2_hwmod = { |
442 | .name = "timer2", | 342 | .name = "timer2", |
443 | .mpu_irqs = omap2420_timer2_mpu_irqs, | 343 | .mpu_irqs = omap2_timer2_mpu_irqs, |
444 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer2_mpu_irqs), | ||
445 | .main_clk = "gpt2_fck", | 344 | .main_clk = "gpt2_fck", |
446 | .prcm = { | 345 | .prcm = { |
447 | .omap2 = { | 346 | .omap2 = { |
@@ -454,31 +353,19 @@ static struct omap_hwmod omap2420_timer2_hwmod = { | |||
454 | }, | 353 | }, |
455 | .slaves = omap2420_timer2_slaves, | 354 | .slaves = omap2420_timer2_slaves, |
456 | .slaves_cnt = ARRAY_SIZE(omap2420_timer2_slaves), | 355 | .slaves_cnt = ARRAY_SIZE(omap2420_timer2_slaves), |
457 | .class = &omap2420_timer_hwmod_class, | 356 | .class = &omap2xxx_timer_hwmod_class, |
458 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | 357 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
459 | }; | 358 | }; |
460 | 359 | ||
461 | /* timer3 */ | 360 | /* timer3 */ |
462 | static struct omap_hwmod omap2420_timer3_hwmod; | 361 | static struct omap_hwmod omap2420_timer3_hwmod; |
463 | static struct omap_hwmod_irq_info omap2420_timer3_mpu_irqs[] = { | ||
464 | { .irq = 39, }, | ||
465 | }; | ||
466 | |||
467 | static struct omap_hwmod_addr_space omap2420_timer3_addrs[] = { | ||
468 | { | ||
469 | .pa_start = 0x48078000, | ||
470 | .pa_end = 0x48078000 + SZ_1K - 1, | ||
471 | .flags = ADDR_TYPE_RT | ||
472 | }, | ||
473 | }; | ||
474 | 362 | ||
475 | /* l4_core -> timer3 */ | 363 | /* l4_core -> timer3 */ |
476 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = { | 364 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = { |
477 | .master = &omap2420_l4_core_hwmod, | 365 | .master = &omap2420_l4_core_hwmod, |
478 | .slave = &omap2420_timer3_hwmod, | 366 | .slave = &omap2420_timer3_hwmod, |
479 | .clk = "gpt3_ick", | 367 | .clk = "gpt3_ick", |
480 | .addr = omap2420_timer3_addrs, | 368 | .addr = omap2xxx_timer3_addrs, |
481 | .addr_cnt = ARRAY_SIZE(omap2420_timer3_addrs), | ||
482 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 369 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
483 | }; | 370 | }; |
484 | 371 | ||
@@ -490,8 +377,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = { | |||
490 | /* timer3 hwmod */ | 377 | /* timer3 hwmod */ |
491 | static struct omap_hwmod omap2420_timer3_hwmod = { | 378 | static struct omap_hwmod omap2420_timer3_hwmod = { |
492 | .name = "timer3", | 379 | .name = "timer3", |
493 | .mpu_irqs = omap2420_timer3_mpu_irqs, | 380 | .mpu_irqs = omap2_timer3_mpu_irqs, |
494 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer3_mpu_irqs), | ||
495 | .main_clk = "gpt3_fck", | 381 | .main_clk = "gpt3_fck", |
496 | .prcm = { | 382 | .prcm = { |
497 | .omap2 = { | 383 | .omap2 = { |
@@ -504,31 +390,19 @@ static struct omap_hwmod omap2420_timer3_hwmod = { | |||
504 | }, | 390 | }, |
505 | .slaves = omap2420_timer3_slaves, | 391 | .slaves = omap2420_timer3_slaves, |
506 | .slaves_cnt = ARRAY_SIZE(omap2420_timer3_slaves), | 392 | .slaves_cnt = ARRAY_SIZE(omap2420_timer3_slaves), |
507 | .class = &omap2420_timer_hwmod_class, | 393 | .class = &omap2xxx_timer_hwmod_class, |
508 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | 394 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
509 | }; | 395 | }; |
510 | 396 | ||
511 | /* timer4 */ | 397 | /* timer4 */ |
512 | static struct omap_hwmod omap2420_timer4_hwmod; | 398 | static struct omap_hwmod omap2420_timer4_hwmod; |
513 | static struct omap_hwmod_irq_info omap2420_timer4_mpu_irqs[] = { | ||
514 | { .irq = 40, }, | ||
515 | }; | ||
516 | |||
517 | static struct omap_hwmod_addr_space omap2420_timer4_addrs[] = { | ||
518 | { | ||
519 | .pa_start = 0x4807a000, | ||
520 | .pa_end = 0x4807a000 + SZ_1K - 1, | ||
521 | .flags = ADDR_TYPE_RT | ||
522 | }, | ||
523 | }; | ||
524 | 399 | ||
525 | /* l4_core -> timer4 */ | 400 | /* l4_core -> timer4 */ |
526 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = { | 401 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = { |
527 | .master = &omap2420_l4_core_hwmod, | 402 | .master = &omap2420_l4_core_hwmod, |
528 | .slave = &omap2420_timer4_hwmod, | 403 | .slave = &omap2420_timer4_hwmod, |
529 | .clk = "gpt4_ick", | 404 | .clk = "gpt4_ick", |
530 | .addr = omap2420_timer4_addrs, | 405 | .addr = omap2xxx_timer4_addrs, |
531 | .addr_cnt = ARRAY_SIZE(omap2420_timer4_addrs), | ||
532 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 406 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
533 | }; | 407 | }; |
534 | 408 | ||
@@ -540,8 +414,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = { | |||
540 | /* timer4 hwmod */ | 414 | /* timer4 hwmod */ |
541 | static struct omap_hwmod omap2420_timer4_hwmod = { | 415 | static struct omap_hwmod omap2420_timer4_hwmod = { |
542 | .name = "timer4", | 416 | .name = "timer4", |
543 | .mpu_irqs = omap2420_timer4_mpu_irqs, | 417 | .mpu_irqs = omap2_timer4_mpu_irqs, |
544 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer4_mpu_irqs), | ||
545 | .main_clk = "gpt4_fck", | 418 | .main_clk = "gpt4_fck", |
546 | .prcm = { | 419 | .prcm = { |
547 | .omap2 = { | 420 | .omap2 = { |
@@ -554,31 +427,19 @@ static struct omap_hwmod omap2420_timer4_hwmod = { | |||
554 | }, | 427 | }, |
555 | .slaves = omap2420_timer4_slaves, | 428 | .slaves = omap2420_timer4_slaves, |
556 | .slaves_cnt = ARRAY_SIZE(omap2420_timer4_slaves), | 429 | .slaves_cnt = ARRAY_SIZE(omap2420_timer4_slaves), |
557 | .class = &omap2420_timer_hwmod_class, | 430 | .class = &omap2xxx_timer_hwmod_class, |
558 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | 431 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
559 | }; | 432 | }; |
560 | 433 | ||
561 | /* timer5 */ | 434 | /* timer5 */ |
562 | static struct omap_hwmod omap2420_timer5_hwmod; | 435 | static struct omap_hwmod omap2420_timer5_hwmod; |
563 | static struct omap_hwmod_irq_info omap2420_timer5_mpu_irqs[] = { | ||
564 | { .irq = 41, }, | ||
565 | }; | ||
566 | |||
567 | static struct omap_hwmod_addr_space omap2420_timer5_addrs[] = { | ||
568 | { | ||
569 | .pa_start = 0x4807c000, | ||
570 | .pa_end = 0x4807c000 + SZ_1K - 1, | ||
571 | .flags = ADDR_TYPE_RT | ||
572 | }, | ||
573 | }; | ||
574 | 436 | ||
575 | /* l4_core -> timer5 */ | 437 | /* l4_core -> timer5 */ |
576 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = { | 438 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = { |
577 | .master = &omap2420_l4_core_hwmod, | 439 | .master = &omap2420_l4_core_hwmod, |
578 | .slave = &omap2420_timer5_hwmod, | 440 | .slave = &omap2420_timer5_hwmod, |
579 | .clk = "gpt5_ick", | 441 | .clk = "gpt5_ick", |
580 | .addr = omap2420_timer5_addrs, | 442 | .addr = omap2xxx_timer5_addrs, |
581 | .addr_cnt = ARRAY_SIZE(omap2420_timer5_addrs), | ||
582 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 443 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
583 | }; | 444 | }; |
584 | 445 | ||
@@ -590,8 +451,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = { | |||
590 | /* timer5 hwmod */ | 451 | /* timer5 hwmod */ |
591 | static struct omap_hwmod omap2420_timer5_hwmod = { | 452 | static struct omap_hwmod omap2420_timer5_hwmod = { |
592 | .name = "timer5", | 453 | .name = "timer5", |
593 | .mpu_irqs = omap2420_timer5_mpu_irqs, | 454 | .mpu_irqs = omap2_timer5_mpu_irqs, |
594 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer5_mpu_irqs), | ||
595 | .main_clk = "gpt5_fck", | 455 | .main_clk = "gpt5_fck", |
596 | .prcm = { | 456 | .prcm = { |
597 | .omap2 = { | 457 | .omap2 = { |
@@ -604,32 +464,20 @@ static struct omap_hwmod omap2420_timer5_hwmod = { | |||
604 | }, | 464 | }, |
605 | .slaves = omap2420_timer5_slaves, | 465 | .slaves = omap2420_timer5_slaves, |
606 | .slaves_cnt = ARRAY_SIZE(omap2420_timer5_slaves), | 466 | .slaves_cnt = ARRAY_SIZE(omap2420_timer5_slaves), |
607 | .class = &omap2420_timer_hwmod_class, | 467 | .class = &omap2xxx_timer_hwmod_class, |
608 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | 468 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
609 | }; | 469 | }; |
610 | 470 | ||
611 | 471 | ||
612 | /* timer6 */ | 472 | /* timer6 */ |
613 | static struct omap_hwmod omap2420_timer6_hwmod; | 473 | static struct omap_hwmod omap2420_timer6_hwmod; |
614 | static struct omap_hwmod_irq_info omap2420_timer6_mpu_irqs[] = { | ||
615 | { .irq = 42, }, | ||
616 | }; | ||
617 | |||
618 | static struct omap_hwmod_addr_space omap2420_timer6_addrs[] = { | ||
619 | { | ||
620 | .pa_start = 0x4807e000, | ||
621 | .pa_end = 0x4807e000 + SZ_1K - 1, | ||
622 | .flags = ADDR_TYPE_RT | ||
623 | }, | ||
624 | }; | ||
625 | 474 | ||
626 | /* l4_core -> timer6 */ | 475 | /* l4_core -> timer6 */ |
627 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = { | 476 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = { |
628 | .master = &omap2420_l4_core_hwmod, | 477 | .master = &omap2420_l4_core_hwmod, |
629 | .slave = &omap2420_timer6_hwmod, | 478 | .slave = &omap2420_timer6_hwmod, |
630 | .clk = "gpt6_ick", | 479 | .clk = "gpt6_ick", |
631 | .addr = omap2420_timer6_addrs, | 480 | .addr = omap2xxx_timer6_addrs, |
632 | .addr_cnt = ARRAY_SIZE(omap2420_timer6_addrs), | ||
633 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 481 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
634 | }; | 482 | }; |
635 | 483 | ||
@@ -641,8 +489,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer6_slaves[] = { | |||
641 | /* timer6 hwmod */ | 489 | /* timer6 hwmod */ |
642 | static struct omap_hwmod omap2420_timer6_hwmod = { | 490 | static struct omap_hwmod omap2420_timer6_hwmod = { |
643 | .name = "timer6", | 491 | .name = "timer6", |
644 | .mpu_irqs = omap2420_timer6_mpu_irqs, | 492 | .mpu_irqs = omap2_timer6_mpu_irqs, |
645 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer6_mpu_irqs), | ||
646 | .main_clk = "gpt6_fck", | 493 | .main_clk = "gpt6_fck", |
647 | .prcm = { | 494 | .prcm = { |
648 | .omap2 = { | 495 | .omap2 = { |
@@ -655,31 +502,19 @@ static struct omap_hwmod omap2420_timer6_hwmod = { | |||
655 | }, | 502 | }, |
656 | .slaves = omap2420_timer6_slaves, | 503 | .slaves = omap2420_timer6_slaves, |
657 | .slaves_cnt = ARRAY_SIZE(omap2420_timer6_slaves), | 504 | .slaves_cnt = ARRAY_SIZE(omap2420_timer6_slaves), |
658 | .class = &omap2420_timer_hwmod_class, | 505 | .class = &omap2xxx_timer_hwmod_class, |
659 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | 506 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
660 | }; | 507 | }; |
661 | 508 | ||
662 | /* timer7 */ | 509 | /* timer7 */ |
663 | static struct omap_hwmod omap2420_timer7_hwmod; | 510 | static struct omap_hwmod omap2420_timer7_hwmod; |
664 | static struct omap_hwmod_irq_info omap2420_timer7_mpu_irqs[] = { | ||
665 | { .irq = 43, }, | ||
666 | }; | ||
667 | |||
668 | static struct omap_hwmod_addr_space omap2420_timer7_addrs[] = { | ||
669 | { | ||
670 | .pa_start = 0x48080000, | ||
671 | .pa_end = 0x48080000 + SZ_1K - 1, | ||
672 | .flags = ADDR_TYPE_RT | ||
673 | }, | ||
674 | }; | ||
675 | 511 | ||
676 | /* l4_core -> timer7 */ | 512 | /* l4_core -> timer7 */ |
677 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = { | 513 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = { |
678 | .master = &omap2420_l4_core_hwmod, | 514 | .master = &omap2420_l4_core_hwmod, |
679 | .slave = &omap2420_timer7_hwmod, | 515 | .slave = &omap2420_timer7_hwmod, |
680 | .clk = "gpt7_ick", | 516 | .clk = "gpt7_ick", |
681 | .addr = omap2420_timer7_addrs, | 517 | .addr = omap2xxx_timer7_addrs, |
682 | .addr_cnt = ARRAY_SIZE(omap2420_timer7_addrs), | ||
683 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 518 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
684 | }; | 519 | }; |
685 | 520 | ||
@@ -691,8 +526,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer7_slaves[] = { | |||
691 | /* timer7 hwmod */ | 526 | /* timer7 hwmod */ |
692 | static struct omap_hwmod omap2420_timer7_hwmod = { | 527 | static struct omap_hwmod omap2420_timer7_hwmod = { |
693 | .name = "timer7", | 528 | .name = "timer7", |
694 | .mpu_irqs = omap2420_timer7_mpu_irqs, | 529 | .mpu_irqs = omap2_timer7_mpu_irqs, |
695 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer7_mpu_irqs), | ||
696 | .main_clk = "gpt7_fck", | 530 | .main_clk = "gpt7_fck", |
697 | .prcm = { | 531 | .prcm = { |
698 | .omap2 = { | 532 | .omap2 = { |
@@ -705,31 +539,19 @@ static struct omap_hwmod omap2420_timer7_hwmod = { | |||
705 | }, | 539 | }, |
706 | .slaves = omap2420_timer7_slaves, | 540 | .slaves = omap2420_timer7_slaves, |
707 | .slaves_cnt = ARRAY_SIZE(omap2420_timer7_slaves), | 541 | .slaves_cnt = ARRAY_SIZE(omap2420_timer7_slaves), |
708 | .class = &omap2420_timer_hwmod_class, | 542 | .class = &omap2xxx_timer_hwmod_class, |
709 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | 543 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
710 | }; | 544 | }; |
711 | 545 | ||
712 | /* timer8 */ | 546 | /* timer8 */ |
713 | static struct omap_hwmod omap2420_timer8_hwmod; | 547 | static struct omap_hwmod omap2420_timer8_hwmod; |
714 | static struct omap_hwmod_irq_info omap2420_timer8_mpu_irqs[] = { | ||
715 | { .irq = 44, }, | ||
716 | }; | ||
717 | |||
718 | static struct omap_hwmod_addr_space omap2420_timer8_addrs[] = { | ||
719 | { | ||
720 | .pa_start = 0x48082000, | ||
721 | .pa_end = 0x48082000 + SZ_1K - 1, | ||
722 | .flags = ADDR_TYPE_RT | ||
723 | }, | ||
724 | }; | ||
725 | 548 | ||
726 | /* l4_core -> timer8 */ | 549 | /* l4_core -> timer8 */ |
727 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = { | 550 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = { |
728 | .master = &omap2420_l4_core_hwmod, | 551 | .master = &omap2420_l4_core_hwmod, |
729 | .slave = &omap2420_timer8_hwmod, | 552 | .slave = &omap2420_timer8_hwmod, |
730 | .clk = "gpt8_ick", | 553 | .clk = "gpt8_ick", |
731 | .addr = omap2420_timer8_addrs, | 554 | .addr = omap2xxx_timer8_addrs, |
732 | .addr_cnt = ARRAY_SIZE(omap2420_timer8_addrs), | ||
733 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 555 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
734 | }; | 556 | }; |
735 | 557 | ||
@@ -741,8 +563,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer8_slaves[] = { | |||
741 | /* timer8 hwmod */ | 563 | /* timer8 hwmod */ |
742 | static struct omap_hwmod omap2420_timer8_hwmod = { | 564 | static struct omap_hwmod omap2420_timer8_hwmod = { |
743 | .name = "timer8", | 565 | .name = "timer8", |
744 | .mpu_irqs = omap2420_timer8_mpu_irqs, | 566 | .mpu_irqs = omap2_timer8_mpu_irqs, |
745 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer8_mpu_irqs), | ||
746 | .main_clk = "gpt8_fck", | 567 | .main_clk = "gpt8_fck", |
747 | .prcm = { | 568 | .prcm = { |
748 | .omap2 = { | 569 | .omap2 = { |
@@ -755,31 +576,19 @@ static struct omap_hwmod omap2420_timer8_hwmod = { | |||
755 | }, | 576 | }, |
756 | .slaves = omap2420_timer8_slaves, | 577 | .slaves = omap2420_timer8_slaves, |
757 | .slaves_cnt = ARRAY_SIZE(omap2420_timer8_slaves), | 578 | .slaves_cnt = ARRAY_SIZE(omap2420_timer8_slaves), |
758 | .class = &omap2420_timer_hwmod_class, | 579 | .class = &omap2xxx_timer_hwmod_class, |
759 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | 580 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
760 | }; | 581 | }; |
761 | 582 | ||
762 | /* timer9 */ | 583 | /* timer9 */ |
763 | static struct omap_hwmod omap2420_timer9_hwmod; | 584 | static struct omap_hwmod omap2420_timer9_hwmod; |
764 | static struct omap_hwmod_irq_info omap2420_timer9_mpu_irqs[] = { | ||
765 | { .irq = 45, }, | ||
766 | }; | ||
767 | |||
768 | static struct omap_hwmod_addr_space omap2420_timer9_addrs[] = { | ||
769 | { | ||
770 | .pa_start = 0x48084000, | ||
771 | .pa_end = 0x48084000 + SZ_1K - 1, | ||
772 | .flags = ADDR_TYPE_RT | ||
773 | }, | ||
774 | }; | ||
775 | 585 | ||
776 | /* l4_core -> timer9 */ | 586 | /* l4_core -> timer9 */ |
777 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = { | 587 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = { |
778 | .master = &omap2420_l4_core_hwmod, | 588 | .master = &omap2420_l4_core_hwmod, |
779 | .slave = &omap2420_timer9_hwmod, | 589 | .slave = &omap2420_timer9_hwmod, |
780 | .clk = "gpt9_ick", | 590 | .clk = "gpt9_ick", |
781 | .addr = omap2420_timer9_addrs, | 591 | .addr = omap2xxx_timer9_addrs, |
782 | .addr_cnt = ARRAY_SIZE(omap2420_timer9_addrs), | ||
783 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 592 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
784 | }; | 593 | }; |
785 | 594 | ||
@@ -791,8 +600,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer9_slaves[] = { | |||
791 | /* timer9 hwmod */ | 600 | /* timer9 hwmod */ |
792 | static struct omap_hwmod omap2420_timer9_hwmod = { | 601 | static struct omap_hwmod omap2420_timer9_hwmod = { |
793 | .name = "timer9", | 602 | .name = "timer9", |
794 | .mpu_irqs = omap2420_timer9_mpu_irqs, | 603 | .mpu_irqs = omap2_timer9_mpu_irqs, |
795 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer9_mpu_irqs), | ||
796 | .main_clk = "gpt9_fck", | 604 | .main_clk = "gpt9_fck", |
797 | .prcm = { | 605 | .prcm = { |
798 | .omap2 = { | 606 | .omap2 = { |
@@ -805,31 +613,19 @@ static struct omap_hwmod omap2420_timer9_hwmod = { | |||
805 | }, | 613 | }, |
806 | .slaves = omap2420_timer9_slaves, | 614 | .slaves = omap2420_timer9_slaves, |
807 | .slaves_cnt = ARRAY_SIZE(omap2420_timer9_slaves), | 615 | .slaves_cnt = ARRAY_SIZE(omap2420_timer9_slaves), |
808 | .class = &omap2420_timer_hwmod_class, | 616 | .class = &omap2xxx_timer_hwmod_class, |
809 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | 617 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
810 | }; | 618 | }; |
811 | 619 | ||
812 | /* timer10 */ | 620 | /* timer10 */ |
813 | static struct omap_hwmod omap2420_timer10_hwmod; | 621 | static struct omap_hwmod omap2420_timer10_hwmod; |
814 | static struct omap_hwmod_irq_info omap2420_timer10_mpu_irqs[] = { | ||
815 | { .irq = 46, }, | ||
816 | }; | ||
817 | |||
818 | static struct omap_hwmod_addr_space omap2420_timer10_addrs[] = { | ||
819 | { | ||
820 | .pa_start = 0x48086000, | ||
821 | .pa_end = 0x48086000 + SZ_1K - 1, | ||
822 | .flags = ADDR_TYPE_RT | ||
823 | }, | ||
824 | }; | ||
825 | 622 | ||
826 | /* l4_core -> timer10 */ | 623 | /* l4_core -> timer10 */ |
827 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = { | 624 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = { |
828 | .master = &omap2420_l4_core_hwmod, | 625 | .master = &omap2420_l4_core_hwmod, |
829 | .slave = &omap2420_timer10_hwmod, | 626 | .slave = &omap2420_timer10_hwmod, |
830 | .clk = "gpt10_ick", | 627 | .clk = "gpt10_ick", |
831 | .addr = omap2420_timer10_addrs, | 628 | .addr = omap2_timer10_addrs, |
832 | .addr_cnt = ARRAY_SIZE(omap2420_timer10_addrs), | ||
833 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 629 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
834 | }; | 630 | }; |
835 | 631 | ||
@@ -841,8 +637,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer10_slaves[] = { | |||
841 | /* timer10 hwmod */ | 637 | /* timer10 hwmod */ |
842 | static struct omap_hwmod omap2420_timer10_hwmod = { | 638 | static struct omap_hwmod omap2420_timer10_hwmod = { |
843 | .name = "timer10", | 639 | .name = "timer10", |
844 | .mpu_irqs = omap2420_timer10_mpu_irqs, | 640 | .mpu_irqs = omap2_timer10_mpu_irqs, |
845 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer10_mpu_irqs), | ||
846 | .main_clk = "gpt10_fck", | 641 | .main_clk = "gpt10_fck", |
847 | .prcm = { | 642 | .prcm = { |
848 | .omap2 = { | 643 | .omap2 = { |
@@ -855,31 +650,19 @@ static struct omap_hwmod omap2420_timer10_hwmod = { | |||
855 | }, | 650 | }, |
856 | .slaves = omap2420_timer10_slaves, | 651 | .slaves = omap2420_timer10_slaves, |
857 | .slaves_cnt = ARRAY_SIZE(omap2420_timer10_slaves), | 652 | .slaves_cnt = ARRAY_SIZE(omap2420_timer10_slaves), |
858 | .class = &omap2420_timer_hwmod_class, | 653 | .class = &omap2xxx_timer_hwmod_class, |
859 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | 654 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
860 | }; | 655 | }; |
861 | 656 | ||
862 | /* timer11 */ | 657 | /* timer11 */ |
863 | static struct omap_hwmod omap2420_timer11_hwmod; | 658 | static struct omap_hwmod omap2420_timer11_hwmod; |
864 | static struct omap_hwmod_irq_info omap2420_timer11_mpu_irqs[] = { | ||
865 | { .irq = 47, }, | ||
866 | }; | ||
867 | |||
868 | static struct omap_hwmod_addr_space omap2420_timer11_addrs[] = { | ||
869 | { | ||
870 | .pa_start = 0x48088000, | ||
871 | .pa_end = 0x48088000 + SZ_1K - 1, | ||
872 | .flags = ADDR_TYPE_RT | ||
873 | }, | ||
874 | }; | ||
875 | 659 | ||
876 | /* l4_core -> timer11 */ | 660 | /* l4_core -> timer11 */ |
877 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = { | 661 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = { |
878 | .master = &omap2420_l4_core_hwmod, | 662 | .master = &omap2420_l4_core_hwmod, |
879 | .slave = &omap2420_timer11_hwmod, | 663 | .slave = &omap2420_timer11_hwmod, |
880 | .clk = "gpt11_ick", | 664 | .clk = "gpt11_ick", |
881 | .addr = omap2420_timer11_addrs, | 665 | .addr = omap2_timer11_addrs, |
882 | .addr_cnt = ARRAY_SIZE(omap2420_timer11_addrs), | ||
883 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 666 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
884 | }; | 667 | }; |
885 | 668 | ||
@@ -891,8 +674,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer11_slaves[] = { | |||
891 | /* timer11 hwmod */ | 674 | /* timer11 hwmod */ |
892 | static struct omap_hwmod omap2420_timer11_hwmod = { | 675 | static struct omap_hwmod omap2420_timer11_hwmod = { |
893 | .name = "timer11", | 676 | .name = "timer11", |
894 | .mpu_irqs = omap2420_timer11_mpu_irqs, | 677 | .mpu_irqs = omap2_timer11_mpu_irqs, |
895 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer11_mpu_irqs), | ||
896 | .main_clk = "gpt11_fck", | 678 | .main_clk = "gpt11_fck", |
897 | .prcm = { | 679 | .prcm = { |
898 | .omap2 = { | 680 | .omap2 = { |
@@ -905,31 +687,19 @@ static struct omap_hwmod omap2420_timer11_hwmod = { | |||
905 | }, | 687 | }, |
906 | .slaves = omap2420_timer11_slaves, | 688 | .slaves = omap2420_timer11_slaves, |
907 | .slaves_cnt = ARRAY_SIZE(omap2420_timer11_slaves), | 689 | .slaves_cnt = ARRAY_SIZE(omap2420_timer11_slaves), |
908 | .class = &omap2420_timer_hwmod_class, | 690 | .class = &omap2xxx_timer_hwmod_class, |
909 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | 691 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
910 | }; | 692 | }; |
911 | 693 | ||
912 | /* timer12 */ | 694 | /* timer12 */ |
913 | static struct omap_hwmod omap2420_timer12_hwmod; | 695 | static struct omap_hwmod omap2420_timer12_hwmod; |
914 | static struct omap_hwmod_irq_info omap2420_timer12_mpu_irqs[] = { | ||
915 | { .irq = 48, }, | ||
916 | }; | ||
917 | |||
918 | static struct omap_hwmod_addr_space omap2420_timer12_addrs[] = { | ||
919 | { | ||
920 | .pa_start = 0x4808a000, | ||
921 | .pa_end = 0x4808a000 + SZ_1K - 1, | ||
922 | .flags = ADDR_TYPE_RT | ||
923 | }, | ||
924 | }; | ||
925 | 696 | ||
926 | /* l4_core -> timer12 */ | 697 | /* l4_core -> timer12 */ |
927 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = { | 698 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = { |
928 | .master = &omap2420_l4_core_hwmod, | 699 | .master = &omap2420_l4_core_hwmod, |
929 | .slave = &omap2420_timer12_hwmod, | 700 | .slave = &omap2420_timer12_hwmod, |
930 | .clk = "gpt12_ick", | 701 | .clk = "gpt12_ick", |
931 | .addr = omap2420_timer12_addrs, | 702 | .addr = omap2xxx_timer12_addrs, |
932 | .addr_cnt = ARRAY_SIZE(omap2420_timer12_addrs), | ||
933 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 703 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
934 | }; | 704 | }; |
935 | 705 | ||
@@ -941,8 +711,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer12_slaves[] = { | |||
941 | /* timer12 hwmod */ | 711 | /* timer12 hwmod */ |
942 | static struct omap_hwmod omap2420_timer12_hwmod = { | 712 | static struct omap_hwmod omap2420_timer12_hwmod = { |
943 | .name = "timer12", | 713 | .name = "timer12", |
944 | .mpu_irqs = omap2420_timer12_mpu_irqs, | 714 | .mpu_irqs = omap2xxx_timer12_mpu_irqs, |
945 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer12_mpu_irqs), | ||
946 | .main_clk = "gpt12_fck", | 715 | .main_clk = "gpt12_fck", |
947 | .prcm = { | 716 | .prcm = { |
948 | .omap2 = { | 717 | .omap2 = { |
@@ -955,7 +724,7 @@ static struct omap_hwmod omap2420_timer12_hwmod = { | |||
955 | }, | 724 | }, |
956 | .slaves = omap2420_timer12_slaves, | 725 | .slaves = omap2420_timer12_slaves, |
957 | .slaves_cnt = ARRAY_SIZE(omap2420_timer12_slaves), | 726 | .slaves_cnt = ARRAY_SIZE(omap2420_timer12_slaves), |
958 | .class = &omap2420_timer_hwmod_class, | 727 | .class = &omap2xxx_timer_hwmod_class, |
959 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | 728 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
960 | }; | 729 | }; |
961 | 730 | ||
@@ -966,6 +735,7 @@ static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = { | |||
966 | .pa_end = 0x4802207f, | 735 | .pa_end = 0x4802207f, |
967 | .flags = ADDR_TYPE_RT | 736 | .flags = ADDR_TYPE_RT |
968 | }, | 737 | }, |
738 | { } | ||
969 | }; | 739 | }; |
970 | 740 | ||
971 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = { | 741 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = { |
@@ -973,31 +743,9 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = { | |||
973 | .slave = &omap2420_wd_timer2_hwmod, | 743 | .slave = &omap2420_wd_timer2_hwmod, |
974 | .clk = "mpu_wdt_ick", | 744 | .clk = "mpu_wdt_ick", |
975 | .addr = omap2420_wd_timer2_addrs, | 745 | .addr = omap2420_wd_timer2_addrs, |
976 | .addr_cnt = ARRAY_SIZE(omap2420_wd_timer2_addrs), | ||
977 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 746 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
978 | }; | 747 | }; |
979 | 748 | ||
980 | /* | ||
981 | * 'wd_timer' class | ||
982 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on | ||
983 | * overflow condition | ||
984 | */ | ||
985 | |||
986 | static struct omap_hwmod_class_sysconfig omap2420_wd_timer_sysc = { | ||
987 | .rev_offs = 0x0000, | ||
988 | .sysc_offs = 0x0010, | ||
989 | .syss_offs = 0x0014, | ||
990 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET | | ||
991 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
992 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
993 | }; | ||
994 | |||
995 | static struct omap_hwmod_class omap2420_wd_timer_hwmod_class = { | ||
996 | .name = "wd_timer", | ||
997 | .sysc = &omap2420_wd_timer_sysc, | ||
998 | .pre_shutdown = &omap2_wd_timer_disable | ||
999 | }; | ||
1000 | |||
1001 | /* wd_timer2 */ | 749 | /* wd_timer2 */ |
1002 | static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = { | 750 | static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = { |
1003 | &omap2420_l4_wkup__wd_timer2, | 751 | &omap2420_l4_wkup__wd_timer2, |
@@ -1005,7 +753,7 @@ static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = { | |||
1005 | 753 | ||
1006 | static struct omap_hwmod omap2420_wd_timer2_hwmod = { | 754 | static struct omap_hwmod omap2420_wd_timer2_hwmod = { |
1007 | .name = "wd_timer2", | 755 | .name = "wd_timer2", |
1008 | .class = &omap2420_wd_timer_hwmod_class, | 756 | .class = &omap2xxx_wd_timer_hwmod_class, |
1009 | .main_clk = "mpu_wdt_fck", | 757 | .main_clk = "mpu_wdt_fck", |
1010 | .prcm = { | 758 | .prcm = { |
1011 | .omap2 = { | 759 | .omap2 = { |
@@ -1021,45 +769,16 @@ static struct omap_hwmod omap2420_wd_timer2_hwmod = { | |||
1021 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | 769 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
1022 | }; | 770 | }; |
1023 | 771 | ||
1024 | /* UART */ | ||
1025 | |||
1026 | static struct omap_hwmod_class_sysconfig uart_sysc = { | ||
1027 | .rev_offs = 0x50, | ||
1028 | .sysc_offs = 0x54, | ||
1029 | .syss_offs = 0x58, | ||
1030 | .sysc_flags = (SYSC_HAS_SIDLEMODE | | ||
1031 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
1032 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
1033 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1034 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1035 | }; | ||
1036 | |||
1037 | static struct omap_hwmod_class uart_class = { | ||
1038 | .name = "uart", | ||
1039 | .sysc = &uart_sysc, | ||
1040 | }; | ||
1041 | |||
1042 | /* UART1 */ | 772 | /* UART1 */ |
1043 | 773 | ||
1044 | static struct omap_hwmod_irq_info uart1_mpu_irqs[] = { | ||
1045 | { .irq = INT_24XX_UART1_IRQ, }, | ||
1046 | }; | ||
1047 | |||
1048 | static struct omap_hwmod_dma_info uart1_sdma_reqs[] = { | ||
1049 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, }, | ||
1050 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, }, | ||
1051 | }; | ||
1052 | |||
1053 | static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = { | 774 | static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = { |
1054 | &omap2_l4_core__uart1, | 775 | &omap2_l4_core__uart1, |
1055 | }; | 776 | }; |
1056 | 777 | ||
1057 | static struct omap_hwmod omap2420_uart1_hwmod = { | 778 | static struct omap_hwmod omap2420_uart1_hwmod = { |
1058 | .name = "uart1", | 779 | .name = "uart1", |
1059 | .mpu_irqs = uart1_mpu_irqs, | 780 | .mpu_irqs = omap2_uart1_mpu_irqs, |
1060 | .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs), | 781 | .sdma_reqs = omap2_uart1_sdma_reqs, |
1061 | .sdma_reqs = uart1_sdma_reqs, | ||
1062 | .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs), | ||
1063 | .main_clk = "uart1_fck", | 782 | .main_clk = "uart1_fck", |
1064 | .prcm = { | 783 | .prcm = { |
1065 | .omap2 = { | 784 | .omap2 = { |
@@ -1072,31 +791,20 @@ static struct omap_hwmod omap2420_uart1_hwmod = { | |||
1072 | }, | 791 | }, |
1073 | .slaves = omap2420_uart1_slaves, | 792 | .slaves = omap2420_uart1_slaves, |
1074 | .slaves_cnt = ARRAY_SIZE(omap2420_uart1_slaves), | 793 | .slaves_cnt = ARRAY_SIZE(omap2420_uart1_slaves), |
1075 | .class = &uart_class, | 794 | .class = &omap2_uart_class, |
1076 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | 795 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
1077 | }; | 796 | }; |
1078 | 797 | ||
1079 | /* UART2 */ | 798 | /* UART2 */ |
1080 | 799 | ||
1081 | static struct omap_hwmod_irq_info uart2_mpu_irqs[] = { | ||
1082 | { .irq = INT_24XX_UART2_IRQ, }, | ||
1083 | }; | ||
1084 | |||
1085 | static struct omap_hwmod_dma_info uart2_sdma_reqs[] = { | ||
1086 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, }, | ||
1087 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, }, | ||
1088 | }; | ||
1089 | |||
1090 | static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = { | 800 | static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = { |
1091 | &omap2_l4_core__uart2, | 801 | &omap2_l4_core__uart2, |
1092 | }; | 802 | }; |
1093 | 803 | ||
1094 | static struct omap_hwmod omap2420_uart2_hwmod = { | 804 | static struct omap_hwmod omap2420_uart2_hwmod = { |
1095 | .name = "uart2", | 805 | .name = "uart2", |
1096 | .mpu_irqs = uart2_mpu_irqs, | 806 | .mpu_irqs = omap2_uart2_mpu_irqs, |
1097 | .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs), | 807 | .sdma_reqs = omap2_uart2_sdma_reqs, |
1098 | .sdma_reqs = uart2_sdma_reqs, | ||
1099 | .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs), | ||
1100 | .main_clk = "uart2_fck", | 808 | .main_clk = "uart2_fck", |
1101 | .prcm = { | 809 | .prcm = { |
1102 | .omap2 = { | 810 | .omap2 = { |
@@ -1109,31 +817,20 @@ static struct omap_hwmod omap2420_uart2_hwmod = { | |||
1109 | }, | 817 | }, |
1110 | .slaves = omap2420_uart2_slaves, | 818 | .slaves = omap2420_uart2_slaves, |
1111 | .slaves_cnt = ARRAY_SIZE(omap2420_uart2_slaves), | 819 | .slaves_cnt = ARRAY_SIZE(omap2420_uart2_slaves), |
1112 | .class = &uart_class, | 820 | .class = &omap2_uart_class, |
1113 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | 821 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
1114 | }; | 822 | }; |
1115 | 823 | ||
1116 | /* UART3 */ | 824 | /* UART3 */ |
1117 | 825 | ||
1118 | static struct omap_hwmod_irq_info uart3_mpu_irqs[] = { | ||
1119 | { .irq = INT_24XX_UART3_IRQ, }, | ||
1120 | }; | ||
1121 | |||
1122 | static struct omap_hwmod_dma_info uart3_sdma_reqs[] = { | ||
1123 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, }, | ||
1124 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, }, | ||
1125 | }; | ||
1126 | |||
1127 | static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = { | 826 | static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = { |
1128 | &omap2_l4_core__uart3, | 827 | &omap2_l4_core__uart3, |
1129 | }; | 828 | }; |
1130 | 829 | ||
1131 | static struct omap_hwmod omap2420_uart3_hwmod = { | 830 | static struct omap_hwmod omap2420_uart3_hwmod = { |
1132 | .name = "uart3", | 831 | .name = "uart3", |
1133 | .mpu_irqs = uart3_mpu_irqs, | 832 | .mpu_irqs = omap2_uart3_mpu_irqs, |
1134 | .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs), | 833 | .sdma_reqs = omap2_uart3_sdma_reqs, |
1135 | .sdma_reqs = uart3_sdma_reqs, | ||
1136 | .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs), | ||
1137 | .main_clk = "uart3_fck", | 834 | .main_clk = "uart3_fck", |
1138 | .prcm = { | 835 | .prcm = { |
1139 | .omap2 = { | 836 | .omap2 = { |
@@ -1146,53 +843,22 @@ static struct omap_hwmod omap2420_uart3_hwmod = { | |||
1146 | }, | 843 | }, |
1147 | .slaves = omap2420_uart3_slaves, | 844 | .slaves = omap2420_uart3_slaves, |
1148 | .slaves_cnt = ARRAY_SIZE(omap2420_uart3_slaves), | 845 | .slaves_cnt = ARRAY_SIZE(omap2420_uart3_slaves), |
1149 | .class = &uart_class, | 846 | .class = &omap2_uart_class, |
1150 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | 847 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
1151 | }; | 848 | }; |
1152 | 849 | ||
1153 | /* | ||
1154 | * 'dss' class | ||
1155 | * display sub-system | ||
1156 | */ | ||
1157 | |||
1158 | static struct omap_hwmod_class_sysconfig omap2420_dss_sysc = { | ||
1159 | .rev_offs = 0x0000, | ||
1160 | .sysc_offs = 0x0010, | ||
1161 | .syss_offs = 0x0014, | ||
1162 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1163 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1164 | }; | ||
1165 | |||
1166 | static struct omap_hwmod_class omap2420_dss_hwmod_class = { | ||
1167 | .name = "dss", | ||
1168 | .sysc = &omap2420_dss_sysc, | ||
1169 | }; | ||
1170 | |||
1171 | static struct omap_hwmod_dma_info omap2420_dss_sdma_chs[] = { | ||
1172 | { .name = "dispc", .dma_req = 5 }, | ||
1173 | }; | ||
1174 | |||
1175 | /* dss */ | 850 | /* dss */ |
1176 | /* dss master ports */ | 851 | /* dss master ports */ |
1177 | static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = { | 852 | static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = { |
1178 | &omap2420_dss__l3, | 853 | &omap2420_dss__l3, |
1179 | }; | 854 | }; |
1180 | 855 | ||
1181 | static struct omap_hwmod_addr_space omap2420_dss_addrs[] = { | ||
1182 | { | ||
1183 | .pa_start = 0x48050000, | ||
1184 | .pa_end = 0x480503FF, | ||
1185 | .flags = ADDR_TYPE_RT | ||
1186 | }, | ||
1187 | }; | ||
1188 | |||
1189 | /* l4_core -> dss */ | 856 | /* l4_core -> dss */ |
1190 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss = { | 857 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss = { |
1191 | .master = &omap2420_l4_core_hwmod, | 858 | .master = &omap2420_l4_core_hwmod, |
1192 | .slave = &omap2420_dss_core_hwmod, | 859 | .slave = &omap2420_dss_core_hwmod, |
1193 | .clk = "dss_ick", | 860 | .clk = "dss_ick", |
1194 | .addr = omap2420_dss_addrs, | 861 | .addr = omap2_dss_addrs, |
1195 | .addr_cnt = ARRAY_SIZE(omap2420_dss_addrs), | ||
1196 | .fw = { | 862 | .fw = { |
1197 | .omap2 = { | 863 | .omap2 = { |
1198 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION, | 864 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION, |
@@ -1214,10 +880,9 @@ static struct omap_hwmod_opt_clk dss_opt_clks[] = { | |||
1214 | 880 | ||
1215 | static struct omap_hwmod omap2420_dss_core_hwmod = { | 881 | static struct omap_hwmod omap2420_dss_core_hwmod = { |
1216 | .name = "dss_core", | 882 | .name = "dss_core", |
1217 | .class = &omap2420_dss_hwmod_class, | 883 | .class = &omap2_dss_hwmod_class, |
1218 | .main_clk = "dss1_fck", /* instead of dss_fck */ | 884 | .main_clk = "dss1_fck", /* instead of dss_fck */ |
1219 | .sdma_reqs = omap2420_dss_sdma_chs, | 885 | .sdma_reqs = omap2xxx_dss_sdma_chs, |
1220 | .sdma_reqs_cnt = ARRAY_SIZE(omap2420_dss_sdma_chs), | ||
1221 | .prcm = { | 886 | .prcm = { |
1222 | .omap2 = { | 887 | .omap2 = { |
1223 | .prcm_reg_id = 1, | 888 | .prcm_reg_id = 1, |
@@ -1237,46 +902,12 @@ static struct omap_hwmod omap2420_dss_core_hwmod = { | |||
1237 | .flags = HWMOD_NO_IDLEST, | 902 | .flags = HWMOD_NO_IDLEST, |
1238 | }; | 903 | }; |
1239 | 904 | ||
1240 | /* | ||
1241 | * 'dispc' class | ||
1242 | * display controller | ||
1243 | */ | ||
1244 | |||
1245 | static struct omap_hwmod_class_sysconfig omap2420_dispc_sysc = { | ||
1246 | .rev_offs = 0x0000, | ||
1247 | .sysc_offs = 0x0010, | ||
1248 | .syss_offs = 0x0014, | ||
1249 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | | ||
1250 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1251 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
1252 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
1253 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1254 | }; | ||
1255 | |||
1256 | static struct omap_hwmod_class omap2420_dispc_hwmod_class = { | ||
1257 | .name = "dispc", | ||
1258 | .sysc = &omap2420_dispc_sysc, | ||
1259 | }; | ||
1260 | |||
1261 | static struct omap_hwmod_irq_info omap2420_dispc_irqs[] = { | ||
1262 | { .irq = 25 }, | ||
1263 | }; | ||
1264 | |||
1265 | static struct omap_hwmod_addr_space omap2420_dss_dispc_addrs[] = { | ||
1266 | { | ||
1267 | .pa_start = 0x48050400, | ||
1268 | .pa_end = 0x480507FF, | ||
1269 | .flags = ADDR_TYPE_RT | ||
1270 | }, | ||
1271 | }; | ||
1272 | |||
1273 | /* l4_core -> dss_dispc */ | 905 | /* l4_core -> dss_dispc */ |
1274 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = { | 906 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = { |
1275 | .master = &omap2420_l4_core_hwmod, | 907 | .master = &omap2420_l4_core_hwmod, |
1276 | .slave = &omap2420_dss_dispc_hwmod, | 908 | .slave = &omap2420_dss_dispc_hwmod, |
1277 | .clk = "dss_ick", | 909 | .clk = "dss_ick", |
1278 | .addr = omap2420_dss_dispc_addrs, | 910 | .addr = omap2_dss_dispc_addrs, |
1279 | .addr_cnt = ARRAY_SIZE(omap2420_dss_dispc_addrs), | ||
1280 | .fw = { | 911 | .fw = { |
1281 | .omap2 = { | 912 | .omap2 = { |
1282 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION, | 913 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION, |
@@ -1293,9 +924,8 @@ static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = { | |||
1293 | 924 | ||
1294 | static struct omap_hwmod omap2420_dss_dispc_hwmod = { | 925 | static struct omap_hwmod omap2420_dss_dispc_hwmod = { |
1295 | .name = "dss_dispc", | 926 | .name = "dss_dispc", |
1296 | .class = &omap2420_dispc_hwmod_class, | 927 | .class = &omap2_dispc_hwmod_class, |
1297 | .mpu_irqs = omap2420_dispc_irqs, | 928 | .mpu_irqs = omap2_dispc_irqs, |
1298 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_dispc_irqs), | ||
1299 | .main_clk = "dss1_fck", | 929 | .main_clk = "dss1_fck", |
1300 | .prcm = { | 930 | .prcm = { |
1301 | .omap2 = { | 931 | .omap2 = { |
@@ -1312,41 +942,12 @@ static struct omap_hwmod omap2420_dss_dispc_hwmod = { | |||
1312 | .flags = HWMOD_NO_IDLEST, | 942 | .flags = HWMOD_NO_IDLEST, |
1313 | }; | 943 | }; |
1314 | 944 | ||
1315 | /* | ||
1316 | * 'rfbi' class | ||
1317 | * remote frame buffer interface | ||
1318 | */ | ||
1319 | |||
1320 | static struct omap_hwmod_class_sysconfig omap2420_rfbi_sysc = { | ||
1321 | .rev_offs = 0x0000, | ||
1322 | .sysc_offs = 0x0010, | ||
1323 | .syss_offs = 0x0014, | ||
1324 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
1325 | SYSC_HAS_AUTOIDLE), | ||
1326 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1327 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1328 | }; | ||
1329 | |||
1330 | static struct omap_hwmod_class omap2420_rfbi_hwmod_class = { | ||
1331 | .name = "rfbi", | ||
1332 | .sysc = &omap2420_rfbi_sysc, | ||
1333 | }; | ||
1334 | |||
1335 | static struct omap_hwmod_addr_space omap2420_dss_rfbi_addrs[] = { | ||
1336 | { | ||
1337 | .pa_start = 0x48050800, | ||
1338 | .pa_end = 0x48050BFF, | ||
1339 | .flags = ADDR_TYPE_RT | ||
1340 | }, | ||
1341 | }; | ||
1342 | |||
1343 | /* l4_core -> dss_rfbi */ | 945 | /* l4_core -> dss_rfbi */ |
1344 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = { | 946 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = { |
1345 | .master = &omap2420_l4_core_hwmod, | 947 | .master = &omap2420_l4_core_hwmod, |
1346 | .slave = &omap2420_dss_rfbi_hwmod, | 948 | .slave = &omap2420_dss_rfbi_hwmod, |
1347 | .clk = "dss_ick", | 949 | .clk = "dss_ick", |
1348 | .addr = omap2420_dss_rfbi_addrs, | 950 | .addr = omap2_dss_rfbi_addrs, |
1349 | .addr_cnt = ARRAY_SIZE(omap2420_dss_rfbi_addrs), | ||
1350 | .fw = { | 951 | .fw = { |
1351 | .omap2 = { | 952 | .omap2 = { |
1352 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION, | 953 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION, |
@@ -1363,7 +964,7 @@ static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = { | |||
1363 | 964 | ||
1364 | static struct omap_hwmod omap2420_dss_rfbi_hwmod = { | 965 | static struct omap_hwmod omap2420_dss_rfbi_hwmod = { |
1365 | .name = "dss_rfbi", | 966 | .name = "dss_rfbi", |
1366 | .class = &omap2420_rfbi_hwmod_class, | 967 | .class = &omap2_rfbi_hwmod_class, |
1367 | .main_clk = "dss1_fck", | 968 | .main_clk = "dss1_fck", |
1368 | .prcm = { | 969 | .prcm = { |
1369 | .omap2 = { | 970 | .omap2 = { |
@@ -1378,31 +979,12 @@ static struct omap_hwmod omap2420_dss_rfbi_hwmod = { | |||
1378 | .flags = HWMOD_NO_IDLEST, | 979 | .flags = HWMOD_NO_IDLEST, |
1379 | }; | 980 | }; |
1380 | 981 | ||
1381 | /* | ||
1382 | * 'venc' class | ||
1383 | * video encoder | ||
1384 | */ | ||
1385 | |||
1386 | static struct omap_hwmod_class omap2420_venc_hwmod_class = { | ||
1387 | .name = "venc", | ||
1388 | }; | ||
1389 | |||
1390 | /* dss_venc */ | ||
1391 | static struct omap_hwmod_addr_space omap2420_dss_venc_addrs[] = { | ||
1392 | { | ||
1393 | .pa_start = 0x48050C00, | ||
1394 | .pa_end = 0x48050FFF, | ||
1395 | .flags = ADDR_TYPE_RT | ||
1396 | }, | ||
1397 | }; | ||
1398 | |||
1399 | /* l4_core -> dss_venc */ | 982 | /* l4_core -> dss_venc */ |
1400 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = { | 983 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = { |
1401 | .master = &omap2420_l4_core_hwmod, | 984 | .master = &omap2420_l4_core_hwmod, |
1402 | .slave = &omap2420_dss_venc_hwmod, | 985 | .slave = &omap2420_dss_venc_hwmod, |
1403 | .clk = "dss_54m_fck", | 986 | .clk = "dss_54m_fck", |
1404 | .addr = omap2420_dss_venc_addrs, | 987 | .addr = omap2_dss_venc_addrs, |
1405 | .addr_cnt = ARRAY_SIZE(omap2420_dss_venc_addrs), | ||
1406 | .fw = { | 988 | .fw = { |
1407 | .omap2 = { | 989 | .omap2 = { |
1408 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION, | 990 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION, |
@@ -1420,7 +1002,7 @@ static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = { | |||
1420 | 1002 | ||
1421 | static struct omap_hwmod omap2420_dss_venc_hwmod = { | 1003 | static struct omap_hwmod omap2420_dss_venc_hwmod = { |
1422 | .name = "dss_venc", | 1004 | .name = "dss_venc", |
1423 | .class = &omap2420_venc_hwmod_class, | 1005 | .class = &omap2_venc_hwmod_class, |
1424 | .main_clk = "dss1_fck", | 1006 | .main_clk = "dss1_fck", |
1425 | .prcm = { | 1007 | .prcm = { |
1426 | .omap2 = { | 1008 | .omap2 = { |
@@ -1453,25 +1035,14 @@ static struct omap_i2c_dev_attr i2c_dev_attr; | |||
1453 | 1035 | ||
1454 | /* I2C1 */ | 1036 | /* I2C1 */ |
1455 | 1037 | ||
1456 | static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = { | ||
1457 | { .irq = INT_24XX_I2C1_IRQ, }, | ||
1458 | }; | ||
1459 | |||
1460 | static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = { | ||
1461 | { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX }, | ||
1462 | { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX }, | ||
1463 | }; | ||
1464 | |||
1465 | static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = { | 1038 | static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = { |
1466 | &omap2420_l4_core__i2c1, | 1039 | &omap2420_l4_core__i2c1, |
1467 | }; | 1040 | }; |
1468 | 1041 | ||
1469 | static struct omap_hwmod omap2420_i2c1_hwmod = { | 1042 | static struct omap_hwmod omap2420_i2c1_hwmod = { |
1470 | .name = "i2c1", | 1043 | .name = "i2c1", |
1471 | .mpu_irqs = i2c1_mpu_irqs, | 1044 | .mpu_irqs = omap2_i2c1_mpu_irqs, |
1472 | .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs), | 1045 | .sdma_reqs = omap2_i2c1_sdma_reqs, |
1473 | .sdma_reqs = i2c1_sdma_reqs, | ||
1474 | .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs), | ||
1475 | .main_clk = "i2c1_fck", | 1046 | .main_clk = "i2c1_fck", |
1476 | .prcm = { | 1047 | .prcm = { |
1477 | .omap2 = { | 1048 | .omap2 = { |
@@ -1492,25 +1063,14 @@ static struct omap_hwmod omap2420_i2c1_hwmod = { | |||
1492 | 1063 | ||
1493 | /* I2C2 */ | 1064 | /* I2C2 */ |
1494 | 1065 | ||
1495 | static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = { | ||
1496 | { .irq = INT_24XX_I2C2_IRQ, }, | ||
1497 | }; | ||
1498 | |||
1499 | static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = { | ||
1500 | { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX }, | ||
1501 | { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX }, | ||
1502 | }; | ||
1503 | |||
1504 | static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = { | 1066 | static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = { |
1505 | &omap2420_l4_core__i2c2, | 1067 | &omap2420_l4_core__i2c2, |
1506 | }; | 1068 | }; |
1507 | 1069 | ||
1508 | static struct omap_hwmod omap2420_i2c2_hwmod = { | 1070 | static struct omap_hwmod omap2420_i2c2_hwmod = { |
1509 | .name = "i2c2", | 1071 | .name = "i2c2", |
1510 | .mpu_irqs = i2c2_mpu_irqs, | 1072 | .mpu_irqs = omap2_i2c2_mpu_irqs, |
1511 | .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs), | 1073 | .sdma_reqs = omap2_i2c2_sdma_reqs, |
1512 | .sdma_reqs = i2c2_sdma_reqs, | ||
1513 | .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs), | ||
1514 | .main_clk = "i2c2_fck", | 1074 | .main_clk = "i2c2_fck", |
1515 | .prcm = { | 1075 | .prcm = { |
1516 | .omap2 = { | 1076 | .omap2 = { |
@@ -1536,6 +1096,7 @@ static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = { | |||
1536 | .pa_end = 0x480181ff, | 1096 | .pa_end = 0x480181ff, |
1537 | .flags = ADDR_TYPE_RT | 1097 | .flags = ADDR_TYPE_RT |
1538 | }, | 1098 | }, |
1099 | { } | ||
1539 | }; | 1100 | }; |
1540 | 1101 | ||
1541 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = { | 1102 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = { |
@@ -1543,7 +1104,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = { | |||
1543 | .slave = &omap2420_gpio1_hwmod, | 1104 | .slave = &omap2420_gpio1_hwmod, |
1544 | .clk = "gpios_ick", | 1105 | .clk = "gpios_ick", |
1545 | .addr = omap2420_gpio1_addr_space, | 1106 | .addr = omap2420_gpio1_addr_space, |
1546 | .addr_cnt = ARRAY_SIZE(omap2420_gpio1_addr_space), | ||
1547 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1107 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1548 | }; | 1108 | }; |
1549 | 1109 | ||
@@ -1554,6 +1114,7 @@ static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = { | |||
1554 | .pa_end = 0x4801a1ff, | 1114 | .pa_end = 0x4801a1ff, |
1555 | .flags = ADDR_TYPE_RT | 1115 | .flags = ADDR_TYPE_RT |
1556 | }, | 1116 | }, |
1117 | { } | ||
1557 | }; | 1118 | }; |
1558 | 1119 | ||
1559 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = { | 1120 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = { |
@@ -1561,7 +1122,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = { | |||
1561 | .slave = &omap2420_gpio2_hwmod, | 1122 | .slave = &omap2420_gpio2_hwmod, |
1562 | .clk = "gpios_ick", | 1123 | .clk = "gpios_ick", |
1563 | .addr = omap2420_gpio2_addr_space, | 1124 | .addr = omap2420_gpio2_addr_space, |
1564 | .addr_cnt = ARRAY_SIZE(omap2420_gpio2_addr_space), | ||
1565 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1125 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1566 | }; | 1126 | }; |
1567 | 1127 | ||
@@ -1572,6 +1132,7 @@ static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = { | |||
1572 | .pa_end = 0x4801c1ff, | 1132 | .pa_end = 0x4801c1ff, |
1573 | .flags = ADDR_TYPE_RT | 1133 | .flags = ADDR_TYPE_RT |
1574 | }, | 1134 | }, |
1135 | { } | ||
1575 | }; | 1136 | }; |
1576 | 1137 | ||
1577 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = { | 1138 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = { |
@@ -1579,7 +1140,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = { | |||
1579 | .slave = &omap2420_gpio3_hwmod, | 1140 | .slave = &omap2420_gpio3_hwmod, |
1580 | .clk = "gpios_ick", | 1141 | .clk = "gpios_ick", |
1581 | .addr = omap2420_gpio3_addr_space, | 1142 | .addr = omap2420_gpio3_addr_space, |
1582 | .addr_cnt = ARRAY_SIZE(omap2420_gpio3_addr_space), | ||
1583 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1143 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1584 | }; | 1144 | }; |
1585 | 1145 | ||
@@ -1590,6 +1150,7 @@ static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = { | |||
1590 | .pa_end = 0x4801e1ff, | 1150 | .pa_end = 0x4801e1ff, |
1591 | .flags = ADDR_TYPE_RT | 1151 | .flags = ADDR_TYPE_RT |
1592 | }, | 1152 | }, |
1153 | { } | ||
1593 | }; | 1154 | }; |
1594 | 1155 | ||
1595 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = { | 1156 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = { |
@@ -1597,7 +1158,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = { | |||
1597 | .slave = &omap2420_gpio4_hwmod, | 1158 | .slave = &omap2420_gpio4_hwmod, |
1598 | .clk = "gpios_ick", | 1159 | .clk = "gpios_ick", |
1599 | .addr = omap2420_gpio4_addr_space, | 1160 | .addr = omap2420_gpio4_addr_space, |
1600 | .addr_cnt = ARRAY_SIZE(omap2420_gpio4_addr_space), | ||
1601 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1161 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1602 | }; | 1162 | }; |
1603 | 1163 | ||
@@ -1607,32 +1167,7 @@ static struct omap_gpio_dev_attr gpio_dev_attr = { | |||
1607 | .dbck_flag = false, | 1167 | .dbck_flag = false, |
1608 | }; | 1168 | }; |
1609 | 1169 | ||
1610 | static struct omap_hwmod_class_sysconfig omap242x_gpio_sysc = { | ||
1611 | .rev_offs = 0x0000, | ||
1612 | .sysc_offs = 0x0010, | ||
1613 | .syss_offs = 0x0014, | ||
1614 | .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | | ||
1615 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | | ||
1616 | SYSS_HAS_RESET_STATUS), | ||
1617 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1618 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1619 | }; | ||
1620 | |||
1621 | /* | ||
1622 | * 'gpio' class | ||
1623 | * general purpose io module | ||
1624 | */ | ||
1625 | static struct omap_hwmod_class omap242x_gpio_hwmod_class = { | ||
1626 | .name = "gpio", | ||
1627 | .sysc = &omap242x_gpio_sysc, | ||
1628 | .rev = 0, | ||
1629 | }; | ||
1630 | |||
1631 | /* gpio1 */ | 1170 | /* gpio1 */ |
1632 | static struct omap_hwmod_irq_info omap242x_gpio1_irqs[] = { | ||
1633 | { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */ | ||
1634 | }; | ||
1635 | |||
1636 | static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = { | 1171 | static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = { |
1637 | &omap2420_l4_wkup__gpio1, | 1172 | &omap2420_l4_wkup__gpio1, |
1638 | }; | 1173 | }; |
@@ -1640,8 +1175,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = { | |||
1640 | static struct omap_hwmod omap2420_gpio1_hwmod = { | 1175 | static struct omap_hwmod omap2420_gpio1_hwmod = { |
1641 | .name = "gpio1", | 1176 | .name = "gpio1", |
1642 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1177 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
1643 | .mpu_irqs = omap242x_gpio1_irqs, | 1178 | .mpu_irqs = omap2_gpio1_irqs, |
1644 | .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio1_irqs), | ||
1645 | .main_clk = "gpios_fck", | 1179 | .main_clk = "gpios_fck", |
1646 | .prcm = { | 1180 | .prcm = { |
1647 | .omap2 = { | 1181 | .omap2 = { |
@@ -1654,16 +1188,12 @@ static struct omap_hwmod omap2420_gpio1_hwmod = { | |||
1654 | }, | 1188 | }, |
1655 | .slaves = omap2420_gpio1_slaves, | 1189 | .slaves = omap2420_gpio1_slaves, |
1656 | .slaves_cnt = ARRAY_SIZE(omap2420_gpio1_slaves), | 1190 | .slaves_cnt = ARRAY_SIZE(omap2420_gpio1_slaves), |
1657 | .class = &omap242x_gpio_hwmod_class, | 1191 | .class = &omap2xxx_gpio_hwmod_class, |
1658 | .dev_attr = &gpio_dev_attr, | 1192 | .dev_attr = &gpio_dev_attr, |
1659 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | 1193 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
1660 | }; | 1194 | }; |
1661 | 1195 | ||
1662 | /* gpio2 */ | 1196 | /* gpio2 */ |
1663 | static struct omap_hwmod_irq_info omap242x_gpio2_irqs[] = { | ||
1664 | { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */ | ||
1665 | }; | ||
1666 | |||
1667 | static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = { | 1197 | static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = { |
1668 | &omap2420_l4_wkup__gpio2, | 1198 | &omap2420_l4_wkup__gpio2, |
1669 | }; | 1199 | }; |
@@ -1671,8 +1201,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = { | |||
1671 | static struct omap_hwmod omap2420_gpio2_hwmod = { | 1201 | static struct omap_hwmod omap2420_gpio2_hwmod = { |
1672 | .name = "gpio2", | 1202 | .name = "gpio2", |
1673 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1203 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
1674 | .mpu_irqs = omap242x_gpio2_irqs, | 1204 | .mpu_irqs = omap2_gpio2_irqs, |
1675 | .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio2_irqs), | ||
1676 | .main_clk = "gpios_fck", | 1205 | .main_clk = "gpios_fck", |
1677 | .prcm = { | 1206 | .prcm = { |
1678 | .omap2 = { | 1207 | .omap2 = { |
@@ -1685,16 +1214,12 @@ static struct omap_hwmod omap2420_gpio2_hwmod = { | |||
1685 | }, | 1214 | }, |
1686 | .slaves = omap2420_gpio2_slaves, | 1215 | .slaves = omap2420_gpio2_slaves, |
1687 | .slaves_cnt = ARRAY_SIZE(omap2420_gpio2_slaves), | 1216 | .slaves_cnt = ARRAY_SIZE(omap2420_gpio2_slaves), |
1688 | .class = &omap242x_gpio_hwmod_class, | 1217 | .class = &omap2xxx_gpio_hwmod_class, |
1689 | .dev_attr = &gpio_dev_attr, | 1218 | .dev_attr = &gpio_dev_attr, |
1690 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | 1219 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
1691 | }; | 1220 | }; |
1692 | 1221 | ||
1693 | /* gpio3 */ | 1222 | /* gpio3 */ |
1694 | static struct omap_hwmod_irq_info omap242x_gpio3_irqs[] = { | ||
1695 | { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */ | ||
1696 | }; | ||
1697 | |||
1698 | static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = { | 1223 | static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = { |
1699 | &omap2420_l4_wkup__gpio3, | 1224 | &omap2420_l4_wkup__gpio3, |
1700 | }; | 1225 | }; |
@@ -1702,8 +1227,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = { | |||
1702 | static struct omap_hwmod omap2420_gpio3_hwmod = { | 1227 | static struct omap_hwmod omap2420_gpio3_hwmod = { |
1703 | .name = "gpio3", | 1228 | .name = "gpio3", |
1704 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1229 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
1705 | .mpu_irqs = omap242x_gpio3_irqs, | 1230 | .mpu_irqs = omap2_gpio3_irqs, |
1706 | .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio3_irqs), | ||
1707 | .main_clk = "gpios_fck", | 1231 | .main_clk = "gpios_fck", |
1708 | .prcm = { | 1232 | .prcm = { |
1709 | .omap2 = { | 1233 | .omap2 = { |
@@ -1716,16 +1240,12 @@ static struct omap_hwmod omap2420_gpio3_hwmod = { | |||
1716 | }, | 1240 | }, |
1717 | .slaves = omap2420_gpio3_slaves, | 1241 | .slaves = omap2420_gpio3_slaves, |
1718 | .slaves_cnt = ARRAY_SIZE(omap2420_gpio3_slaves), | 1242 | .slaves_cnt = ARRAY_SIZE(omap2420_gpio3_slaves), |
1719 | .class = &omap242x_gpio_hwmod_class, | 1243 | .class = &omap2xxx_gpio_hwmod_class, |
1720 | .dev_attr = &gpio_dev_attr, | 1244 | .dev_attr = &gpio_dev_attr, |
1721 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | 1245 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
1722 | }; | 1246 | }; |
1723 | 1247 | ||
1724 | /* gpio4 */ | 1248 | /* gpio4 */ |
1725 | static struct omap_hwmod_irq_info omap242x_gpio4_irqs[] = { | ||
1726 | { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */ | ||
1727 | }; | ||
1728 | |||
1729 | static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = { | 1249 | static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = { |
1730 | &omap2420_l4_wkup__gpio4, | 1250 | &omap2420_l4_wkup__gpio4, |
1731 | }; | 1251 | }; |
@@ -1733,8 +1253,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = { | |||
1733 | static struct omap_hwmod omap2420_gpio4_hwmod = { | 1253 | static struct omap_hwmod omap2420_gpio4_hwmod = { |
1734 | .name = "gpio4", | 1254 | .name = "gpio4", |
1735 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1255 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
1736 | .mpu_irqs = omap242x_gpio4_irqs, | 1256 | .mpu_irqs = omap2_gpio4_irqs, |
1737 | .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio4_irqs), | ||
1738 | .main_clk = "gpios_fck", | 1257 | .main_clk = "gpios_fck", |
1739 | .prcm = { | 1258 | .prcm = { |
1740 | .omap2 = { | 1259 | .omap2 = { |
@@ -1747,28 +1266,11 @@ static struct omap_hwmod omap2420_gpio4_hwmod = { | |||
1747 | }, | 1266 | }, |
1748 | .slaves = omap2420_gpio4_slaves, | 1267 | .slaves = omap2420_gpio4_slaves, |
1749 | .slaves_cnt = ARRAY_SIZE(omap2420_gpio4_slaves), | 1268 | .slaves_cnt = ARRAY_SIZE(omap2420_gpio4_slaves), |
1750 | .class = &omap242x_gpio_hwmod_class, | 1269 | .class = &omap2xxx_gpio_hwmod_class, |
1751 | .dev_attr = &gpio_dev_attr, | 1270 | .dev_attr = &gpio_dev_attr, |
1752 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | 1271 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
1753 | }; | 1272 | }; |
1754 | 1273 | ||
1755 | /* system dma */ | ||
1756 | static struct omap_hwmod_class_sysconfig omap2420_dma_sysc = { | ||
1757 | .rev_offs = 0x0000, | ||
1758 | .sysc_offs = 0x002c, | ||
1759 | .syss_offs = 0x0028, | ||
1760 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE | | ||
1761 | SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE | | ||
1762 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
1763 | .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
1764 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1765 | }; | ||
1766 | |||
1767 | static struct omap_hwmod_class omap2420_dma_hwmod_class = { | ||
1768 | .name = "dma", | ||
1769 | .sysc = &omap2420_dma_sysc, | ||
1770 | }; | ||
1771 | |||
1772 | /* dma attributes */ | 1274 | /* dma attributes */ |
1773 | static struct omap_dma_dev_attr dma_dev_attr = { | 1275 | static struct omap_dma_dev_attr dma_dev_attr = { |
1774 | .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | | 1276 | .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | |
@@ -1776,21 +1278,6 @@ static struct omap_dma_dev_attr dma_dev_attr = { | |||
1776 | .lch_count = 32, | 1278 | .lch_count = 32, |
1777 | }; | 1279 | }; |
1778 | 1280 | ||
1779 | static struct omap_hwmod_irq_info omap2420_dma_system_irqs[] = { | ||
1780 | { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */ | ||
1781 | { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */ | ||
1782 | { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */ | ||
1783 | { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */ | ||
1784 | }; | ||
1785 | |||
1786 | static struct omap_hwmod_addr_space omap2420_dma_system_addrs[] = { | ||
1787 | { | ||
1788 | .pa_start = 0x48056000, | ||
1789 | .pa_end = 0x48056fff, | ||
1790 | .flags = ADDR_TYPE_RT | ||
1791 | }, | ||
1792 | }; | ||
1793 | |||
1794 | /* dma_system -> L3 */ | 1281 | /* dma_system -> L3 */ |
1795 | static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = { | 1282 | static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = { |
1796 | .master = &omap2420_dma_system_hwmod, | 1283 | .master = &omap2420_dma_system_hwmod, |
@@ -1809,8 +1296,7 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = { | |||
1809 | .master = &omap2420_l4_core_hwmod, | 1296 | .master = &omap2420_l4_core_hwmod, |
1810 | .slave = &omap2420_dma_system_hwmod, | 1297 | .slave = &omap2420_dma_system_hwmod, |
1811 | .clk = "sdma_ick", | 1298 | .clk = "sdma_ick", |
1812 | .addr = omap2420_dma_system_addrs, | 1299 | .addr = omap2_dma_system_addrs, |
1813 | .addr_cnt = ARRAY_SIZE(omap2420_dma_system_addrs), | ||
1814 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1300 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1815 | }; | 1301 | }; |
1816 | 1302 | ||
@@ -1821,9 +1307,8 @@ static struct omap_hwmod_ocp_if *omap2420_dma_system_slaves[] = { | |||
1821 | 1307 | ||
1822 | static struct omap_hwmod omap2420_dma_system_hwmod = { | 1308 | static struct omap_hwmod omap2420_dma_system_hwmod = { |
1823 | .name = "dma", | 1309 | .name = "dma", |
1824 | .class = &omap2420_dma_hwmod_class, | 1310 | .class = &omap2xxx_dma_hwmod_class, |
1825 | .mpu_irqs = omap2420_dma_system_irqs, | 1311 | .mpu_irqs = omap2_dma_system_irqs, |
1826 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_dma_system_irqs), | ||
1827 | .main_clk = "core_l3_ck", | 1312 | .main_clk = "core_l3_ck", |
1828 | .slaves = omap2420_dma_system_slaves, | 1313 | .slaves = omap2420_dma_system_slaves, |
1829 | .slaves_cnt = ARRAY_SIZE(omap2420_dma_system_slaves), | 1314 | .slaves_cnt = ARRAY_SIZE(omap2420_dma_system_slaves), |
@@ -1834,48 +1319,19 @@ static struct omap_hwmod omap2420_dma_system_hwmod = { | |||
1834 | .flags = HWMOD_NO_IDLEST, | 1319 | .flags = HWMOD_NO_IDLEST, |
1835 | }; | 1320 | }; |
1836 | 1321 | ||
1837 | /* | ||
1838 | * 'mailbox' class | ||
1839 | * mailbox module allowing communication between the on-chip processors | ||
1840 | * using a queued mailbox-interrupt mechanism. | ||
1841 | */ | ||
1842 | |||
1843 | static struct omap_hwmod_class_sysconfig omap2420_mailbox_sysc = { | ||
1844 | .rev_offs = 0x000, | ||
1845 | .sysc_offs = 0x010, | ||
1846 | .syss_offs = 0x014, | ||
1847 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
1848 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1849 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1850 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1851 | }; | ||
1852 | |||
1853 | static struct omap_hwmod_class omap2420_mailbox_hwmod_class = { | ||
1854 | .name = "mailbox", | ||
1855 | .sysc = &omap2420_mailbox_sysc, | ||
1856 | }; | ||
1857 | |||
1858 | /* mailbox */ | 1322 | /* mailbox */ |
1859 | static struct omap_hwmod omap2420_mailbox_hwmod; | 1323 | static struct omap_hwmod omap2420_mailbox_hwmod; |
1860 | static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = { | 1324 | static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = { |
1861 | { .name = "dsp", .irq = 26 }, | 1325 | { .name = "dsp", .irq = 26 }, |
1862 | { .name = "iva", .irq = 34 }, | 1326 | { .name = "iva", .irq = 34 }, |
1863 | }; | 1327 | { .irq = -1 } |
1864 | |||
1865 | static struct omap_hwmod_addr_space omap2420_mailbox_addrs[] = { | ||
1866 | { | ||
1867 | .pa_start = 0x48094000, | ||
1868 | .pa_end = 0x480941ff, | ||
1869 | .flags = ADDR_TYPE_RT, | ||
1870 | }, | ||
1871 | }; | 1328 | }; |
1872 | 1329 | ||
1873 | /* l4_core -> mailbox */ | 1330 | /* l4_core -> mailbox */ |
1874 | static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = { | 1331 | static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = { |
1875 | .master = &omap2420_l4_core_hwmod, | 1332 | .master = &omap2420_l4_core_hwmod, |
1876 | .slave = &omap2420_mailbox_hwmod, | 1333 | .slave = &omap2420_mailbox_hwmod, |
1877 | .addr = omap2420_mailbox_addrs, | 1334 | .addr = omap2_mailbox_addrs, |
1878 | .addr_cnt = ARRAY_SIZE(omap2420_mailbox_addrs), | ||
1879 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1335 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1880 | }; | 1336 | }; |
1881 | 1337 | ||
@@ -1886,9 +1342,8 @@ static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = { | |||
1886 | 1342 | ||
1887 | static struct omap_hwmod omap2420_mailbox_hwmod = { | 1343 | static struct omap_hwmod omap2420_mailbox_hwmod = { |
1888 | .name = "mailbox", | 1344 | .name = "mailbox", |
1889 | .class = &omap2420_mailbox_hwmod_class, | 1345 | .class = &omap2xxx_mailbox_hwmod_class, |
1890 | .mpu_irqs = omap2420_mailbox_irqs, | 1346 | .mpu_irqs = omap2420_mailbox_irqs, |
1891 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mailbox_irqs), | ||
1892 | .main_clk = "mailboxes_ick", | 1347 | .main_clk = "mailboxes_ick", |
1893 | .prcm = { | 1348 | .prcm = { |
1894 | .omap2 = { | 1349 | .omap2 = { |
@@ -1904,45 +1359,7 @@ static struct omap_hwmod omap2420_mailbox_hwmod = { | |||
1904 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | 1359 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
1905 | }; | 1360 | }; |
1906 | 1361 | ||
1907 | /* | ||
1908 | * 'mcspi' class | ||
1909 | * multichannel serial port interface (mcspi) / master/slave synchronous serial | ||
1910 | * bus | ||
1911 | */ | ||
1912 | |||
1913 | static struct omap_hwmod_class_sysconfig omap2420_mcspi_sysc = { | ||
1914 | .rev_offs = 0x0000, | ||
1915 | .sysc_offs = 0x0010, | ||
1916 | .syss_offs = 0x0014, | ||
1917 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
1918 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
1919 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
1920 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1921 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1922 | }; | ||
1923 | |||
1924 | static struct omap_hwmod_class omap2420_mcspi_class = { | ||
1925 | .name = "mcspi", | ||
1926 | .sysc = &omap2420_mcspi_sysc, | ||
1927 | .rev = OMAP2_MCSPI_REV, | ||
1928 | }; | ||
1929 | |||
1930 | /* mcspi1 */ | 1362 | /* mcspi1 */ |
1931 | static struct omap_hwmod_irq_info omap2420_mcspi1_mpu_irqs[] = { | ||
1932 | { .irq = 65 }, | ||
1933 | }; | ||
1934 | |||
1935 | static struct omap_hwmod_dma_info omap2420_mcspi1_sdma_reqs[] = { | ||
1936 | { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */ | ||
1937 | { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */ | ||
1938 | { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */ | ||
1939 | { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */ | ||
1940 | { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */ | ||
1941 | { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */ | ||
1942 | { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */ | ||
1943 | { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */ | ||
1944 | }; | ||
1945 | |||
1946 | static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = { | 1363 | static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = { |
1947 | &omap2420_l4_core__mcspi1, | 1364 | &omap2420_l4_core__mcspi1, |
1948 | }; | 1365 | }; |
@@ -1953,10 +1370,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { | |||
1953 | 1370 | ||
1954 | static struct omap_hwmod omap2420_mcspi1_hwmod = { | 1371 | static struct omap_hwmod omap2420_mcspi1_hwmod = { |
1955 | .name = "mcspi1_hwmod", | 1372 | .name = "mcspi1_hwmod", |
1956 | .mpu_irqs = omap2420_mcspi1_mpu_irqs, | 1373 | .mpu_irqs = omap2_mcspi1_mpu_irqs, |
1957 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcspi1_mpu_irqs), | 1374 | .sdma_reqs = omap2_mcspi1_sdma_reqs, |
1958 | .sdma_reqs = omap2420_mcspi1_sdma_reqs, | ||
1959 | .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcspi1_sdma_reqs), | ||
1960 | .main_clk = "mcspi1_fck", | 1375 | .main_clk = "mcspi1_fck", |
1961 | .prcm = { | 1376 | .prcm = { |
1962 | .omap2 = { | 1377 | .omap2 = { |
@@ -1969,23 +1384,12 @@ static struct omap_hwmod omap2420_mcspi1_hwmod = { | |||
1969 | }, | 1384 | }, |
1970 | .slaves = omap2420_mcspi1_slaves, | 1385 | .slaves = omap2420_mcspi1_slaves, |
1971 | .slaves_cnt = ARRAY_SIZE(omap2420_mcspi1_slaves), | 1386 | .slaves_cnt = ARRAY_SIZE(omap2420_mcspi1_slaves), |
1972 | .class = &omap2420_mcspi_class, | 1387 | .class = &omap2xxx_mcspi_class, |
1973 | .dev_attr = &omap_mcspi1_dev_attr, | 1388 | .dev_attr = &omap_mcspi1_dev_attr, |
1974 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | 1389 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
1975 | }; | 1390 | }; |
1976 | 1391 | ||
1977 | /* mcspi2 */ | 1392 | /* mcspi2 */ |
1978 | static struct omap_hwmod_irq_info omap2420_mcspi2_mpu_irqs[] = { | ||
1979 | { .irq = 66 }, | ||
1980 | }; | ||
1981 | |||
1982 | static struct omap_hwmod_dma_info omap2420_mcspi2_sdma_reqs[] = { | ||
1983 | { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */ | ||
1984 | { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */ | ||
1985 | { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */ | ||
1986 | { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */ | ||
1987 | }; | ||
1988 | |||
1989 | static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = { | 1393 | static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = { |
1990 | &omap2420_l4_core__mcspi2, | 1394 | &omap2420_l4_core__mcspi2, |
1991 | }; | 1395 | }; |
@@ -1996,10 +1400,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { | |||
1996 | 1400 | ||
1997 | static struct omap_hwmod omap2420_mcspi2_hwmod = { | 1401 | static struct omap_hwmod omap2420_mcspi2_hwmod = { |
1998 | .name = "mcspi2_hwmod", | 1402 | .name = "mcspi2_hwmod", |
1999 | .mpu_irqs = omap2420_mcspi2_mpu_irqs, | 1403 | .mpu_irqs = omap2_mcspi2_mpu_irqs, |
2000 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcspi2_mpu_irqs), | 1404 | .sdma_reqs = omap2_mcspi2_sdma_reqs, |
2001 | .sdma_reqs = omap2420_mcspi2_sdma_reqs, | ||
2002 | .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcspi2_sdma_reqs), | ||
2003 | .main_clk = "mcspi2_fck", | 1405 | .main_clk = "mcspi2_fck", |
2004 | .prcm = { | 1406 | .prcm = { |
2005 | .omap2 = { | 1407 | .omap2 = { |
@@ -2012,8 +1414,8 @@ static struct omap_hwmod omap2420_mcspi2_hwmod = { | |||
2012 | }, | 1414 | }, |
2013 | .slaves = omap2420_mcspi2_slaves, | 1415 | .slaves = omap2420_mcspi2_slaves, |
2014 | .slaves_cnt = ARRAY_SIZE(omap2420_mcspi2_slaves), | 1416 | .slaves_cnt = ARRAY_SIZE(omap2420_mcspi2_slaves), |
2015 | .class = &omap2420_mcspi_class, | 1417 | .class = &omap2xxx_mcspi_class, |
2016 | .dev_attr = &omap_mcspi2_dev_attr, | 1418 | .dev_attr = &omap_mcspi2_dev_attr, |
2017 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | 1419 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
2018 | }; | 1420 | }; |
2019 | 1421 | ||
@@ -2030,20 +1432,7 @@ static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = { | |||
2030 | static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = { | 1432 | static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = { |
2031 | { .name = "tx", .irq = 59 }, | 1433 | { .name = "tx", .irq = 59 }, |
2032 | { .name = "rx", .irq = 60 }, | 1434 | { .name = "rx", .irq = 60 }, |
2033 | }; | 1435 | { .irq = -1 } |
2034 | |||
2035 | static struct omap_hwmod_dma_info omap2420_mcbsp1_sdma_chs[] = { | ||
2036 | { .name = "rx", .dma_req = 32 }, | ||
2037 | { .name = "tx", .dma_req = 31 }, | ||
2038 | }; | ||
2039 | |||
2040 | static struct omap_hwmod_addr_space omap2420_mcbsp1_addrs[] = { | ||
2041 | { | ||
2042 | .name = "mpu", | ||
2043 | .pa_start = 0x48074000, | ||
2044 | .pa_end = 0x480740ff, | ||
2045 | .flags = ADDR_TYPE_RT | ||
2046 | }, | ||
2047 | }; | 1436 | }; |
2048 | 1437 | ||
2049 | /* l4_core -> mcbsp1 */ | 1438 | /* l4_core -> mcbsp1 */ |
@@ -2051,8 +1440,7 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = { | |||
2051 | .master = &omap2420_l4_core_hwmod, | 1440 | .master = &omap2420_l4_core_hwmod, |
2052 | .slave = &omap2420_mcbsp1_hwmod, | 1441 | .slave = &omap2420_mcbsp1_hwmod, |
2053 | .clk = "mcbsp1_ick", | 1442 | .clk = "mcbsp1_ick", |
2054 | .addr = omap2420_mcbsp1_addrs, | 1443 | .addr = omap2_mcbsp1_addrs, |
2055 | .addr_cnt = ARRAY_SIZE(omap2420_mcbsp1_addrs), | ||
2056 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1444 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2057 | }; | 1445 | }; |
2058 | 1446 | ||
@@ -2065,9 +1453,7 @@ static struct omap_hwmod omap2420_mcbsp1_hwmod = { | |||
2065 | .name = "mcbsp1", | 1453 | .name = "mcbsp1", |
2066 | .class = &omap2420_mcbsp_hwmod_class, | 1454 | .class = &omap2420_mcbsp_hwmod_class, |
2067 | .mpu_irqs = omap2420_mcbsp1_irqs, | 1455 | .mpu_irqs = omap2420_mcbsp1_irqs, |
2068 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcbsp1_irqs), | 1456 | .sdma_reqs = omap2_mcbsp1_sdma_reqs, |
2069 | .sdma_reqs = omap2420_mcbsp1_sdma_chs, | ||
2070 | .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcbsp1_sdma_chs), | ||
2071 | .main_clk = "mcbsp1_fck", | 1457 | .main_clk = "mcbsp1_fck", |
2072 | .prcm = { | 1458 | .prcm = { |
2073 | .omap2 = { | 1459 | .omap2 = { |
@@ -2087,20 +1473,7 @@ static struct omap_hwmod omap2420_mcbsp1_hwmod = { | |||
2087 | static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = { | 1473 | static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = { |
2088 | { .name = "tx", .irq = 62 }, | 1474 | { .name = "tx", .irq = 62 }, |
2089 | { .name = "rx", .irq = 63 }, | 1475 | { .name = "rx", .irq = 63 }, |
2090 | }; | 1476 | { .irq = -1 } |
2091 | |||
2092 | static struct omap_hwmod_dma_info omap2420_mcbsp2_sdma_chs[] = { | ||
2093 | { .name = "rx", .dma_req = 34 }, | ||
2094 | { .name = "tx", .dma_req = 33 }, | ||
2095 | }; | ||
2096 | |||
2097 | static struct omap_hwmod_addr_space omap2420_mcbsp2_addrs[] = { | ||
2098 | { | ||
2099 | .name = "mpu", | ||
2100 | .pa_start = 0x48076000, | ||
2101 | .pa_end = 0x480760ff, | ||
2102 | .flags = ADDR_TYPE_RT | ||
2103 | }, | ||
2104 | }; | 1477 | }; |
2105 | 1478 | ||
2106 | /* l4_core -> mcbsp2 */ | 1479 | /* l4_core -> mcbsp2 */ |
@@ -2108,8 +1481,7 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = { | |||
2108 | .master = &omap2420_l4_core_hwmod, | 1481 | .master = &omap2420_l4_core_hwmod, |
2109 | .slave = &omap2420_mcbsp2_hwmod, | 1482 | .slave = &omap2420_mcbsp2_hwmod, |
2110 | .clk = "mcbsp2_ick", | 1483 | .clk = "mcbsp2_ick", |
2111 | .addr = omap2420_mcbsp2_addrs, | 1484 | .addr = omap2xxx_mcbsp2_addrs, |
2112 | .addr_cnt = ARRAY_SIZE(omap2420_mcbsp2_addrs), | ||
2113 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1485 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2114 | }; | 1486 | }; |
2115 | 1487 | ||
@@ -2122,9 +1494,7 @@ static struct omap_hwmod omap2420_mcbsp2_hwmod = { | |||
2122 | .name = "mcbsp2", | 1494 | .name = "mcbsp2", |
2123 | .class = &omap2420_mcbsp_hwmod_class, | 1495 | .class = &omap2420_mcbsp_hwmod_class, |
2124 | .mpu_irqs = omap2420_mcbsp2_irqs, | 1496 | .mpu_irqs = omap2420_mcbsp2_irqs, |
2125 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcbsp2_irqs), | 1497 | .sdma_reqs = omap2_mcbsp2_sdma_reqs, |
2126 | .sdma_reqs = omap2420_mcbsp2_sdma_chs, | ||
2127 | .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcbsp2_sdma_chs), | ||
2128 | .main_clk = "mcbsp2_fck", | 1498 | .main_clk = "mcbsp2_fck", |
2129 | .prcm = { | 1499 | .prcm = { |
2130 | .omap2 = { | 1500 | .omap2 = { |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index 9682dd519f8d..2a52f025bd06 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips | 2 | * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2010 Nokia Corporation | 4 | * Copyright (C) 2009-2011 Nokia Corporation |
5 | * Paul Walmsley | 5 | * Paul Walmsley |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -131,42 +131,21 @@ static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = { | |||
131 | .user = OCP_USER_MPU, | 131 | .user = OCP_USER_MPU, |
132 | }; | 132 | }; |
133 | 133 | ||
134 | /* I2C IP block address space length (in bytes) */ | ||
135 | #define OMAP2_I2C_AS_LEN 128 | ||
136 | |||
137 | /* L4 CORE -> I2C1 interface */ | 134 | /* L4 CORE -> I2C1 interface */ |
138 | static struct omap_hwmod_addr_space omap2430_i2c1_addr_space[] = { | ||
139 | { | ||
140 | .pa_start = 0x48070000, | ||
141 | .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1, | ||
142 | .flags = ADDR_TYPE_RT, | ||
143 | }, | ||
144 | }; | ||
145 | |||
146 | static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = { | 135 | static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = { |
147 | .master = &omap2430_l4_core_hwmod, | 136 | .master = &omap2430_l4_core_hwmod, |
148 | .slave = &omap2430_i2c1_hwmod, | 137 | .slave = &omap2430_i2c1_hwmod, |
149 | .clk = "i2c1_ick", | 138 | .clk = "i2c1_ick", |
150 | .addr = omap2430_i2c1_addr_space, | 139 | .addr = omap2_i2c1_addr_space, |
151 | .addr_cnt = ARRAY_SIZE(omap2430_i2c1_addr_space), | ||
152 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 140 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
153 | }; | 141 | }; |
154 | 142 | ||
155 | /* L4 CORE -> I2C2 interface */ | 143 | /* L4 CORE -> I2C2 interface */ |
156 | static struct omap_hwmod_addr_space omap2430_i2c2_addr_space[] = { | ||
157 | { | ||
158 | .pa_start = 0x48072000, | ||
159 | .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1, | ||
160 | .flags = ADDR_TYPE_RT, | ||
161 | }, | ||
162 | }; | ||
163 | |||
164 | static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = { | 144 | static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = { |
165 | .master = &omap2430_l4_core_hwmod, | 145 | .master = &omap2430_l4_core_hwmod, |
166 | .slave = &omap2430_i2c2_hwmod, | 146 | .slave = &omap2430_i2c2_hwmod, |
167 | .clk = "i2c2_ick", | 147 | .clk = "i2c2_ick", |
168 | .addr = omap2430_i2c2_addr_space, | 148 | .addr = omap2_i2c2_addr_space, |
169 | .addr_cnt = ARRAY_SIZE(omap2430_i2c2_addr_space), | ||
170 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 149 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
171 | }; | 150 | }; |
172 | 151 | ||
@@ -178,56 +157,29 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = { | |||
178 | }; | 157 | }; |
179 | 158 | ||
180 | /* L4 CORE -> UART1 interface */ | 159 | /* L4 CORE -> UART1 interface */ |
181 | static struct omap_hwmod_addr_space omap2430_uart1_addr_space[] = { | ||
182 | { | ||
183 | .pa_start = OMAP2_UART1_BASE, | ||
184 | .pa_end = OMAP2_UART1_BASE + SZ_8K - 1, | ||
185 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
186 | }, | ||
187 | }; | ||
188 | |||
189 | static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = { | 160 | static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = { |
190 | .master = &omap2430_l4_core_hwmod, | 161 | .master = &omap2430_l4_core_hwmod, |
191 | .slave = &omap2430_uart1_hwmod, | 162 | .slave = &omap2430_uart1_hwmod, |
192 | .clk = "uart1_ick", | 163 | .clk = "uart1_ick", |
193 | .addr = omap2430_uart1_addr_space, | 164 | .addr = omap2xxx_uart1_addr_space, |
194 | .addr_cnt = ARRAY_SIZE(omap2430_uart1_addr_space), | ||
195 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 165 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
196 | }; | 166 | }; |
197 | 167 | ||
198 | /* L4 CORE -> UART2 interface */ | 168 | /* L4 CORE -> UART2 interface */ |
199 | static struct omap_hwmod_addr_space omap2430_uart2_addr_space[] = { | ||
200 | { | ||
201 | .pa_start = OMAP2_UART2_BASE, | ||
202 | .pa_end = OMAP2_UART2_BASE + SZ_1K - 1, | ||
203 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
204 | }, | ||
205 | }; | ||
206 | |||
207 | static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = { | 169 | static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = { |
208 | .master = &omap2430_l4_core_hwmod, | 170 | .master = &omap2430_l4_core_hwmod, |
209 | .slave = &omap2430_uart2_hwmod, | 171 | .slave = &omap2430_uart2_hwmod, |
210 | .clk = "uart2_ick", | 172 | .clk = "uart2_ick", |
211 | .addr = omap2430_uart2_addr_space, | 173 | .addr = omap2xxx_uart2_addr_space, |
212 | .addr_cnt = ARRAY_SIZE(omap2430_uart2_addr_space), | ||
213 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 174 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
214 | }; | 175 | }; |
215 | 176 | ||
216 | /* L4 PER -> UART3 interface */ | 177 | /* L4 PER -> UART3 interface */ |
217 | static struct omap_hwmod_addr_space omap2430_uart3_addr_space[] = { | ||
218 | { | ||
219 | .pa_start = OMAP2_UART3_BASE, | ||
220 | .pa_end = OMAP2_UART3_BASE + SZ_1K - 1, | ||
221 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
222 | }, | ||
223 | }; | ||
224 | |||
225 | static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = { | 178 | static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = { |
226 | .master = &omap2430_l4_core_hwmod, | 179 | .master = &omap2430_l4_core_hwmod, |
227 | .slave = &omap2430_uart3_hwmod, | 180 | .slave = &omap2430_uart3_hwmod, |
228 | .clk = "uart3_ick", | 181 | .clk = "uart3_ick", |
229 | .addr = omap2430_uart3_addr_space, | 182 | .addr = omap2xxx_uart3_addr_space, |
230 | .addr_cnt = ARRAY_SIZE(omap2430_uart3_addr_space), | ||
231 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 183 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
232 | }; | 184 | }; |
233 | 185 | ||
@@ -248,7 +200,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = { | |||
248 | .slave = &omap2430_usbhsotg_hwmod, | 200 | .slave = &omap2430_usbhsotg_hwmod, |
249 | .clk = "usb_l4_ick", | 201 | .clk = "usb_l4_ick", |
250 | .addr = omap2430_usbhsotg_addrs, | 202 | .addr = omap2430_usbhsotg_addrs, |
251 | .addr_cnt = ARRAY_SIZE(omap2430_usbhsotg_addrs), | ||
252 | .user = OCP_USER_MPU, | 203 | .user = OCP_USER_MPU, |
253 | }; | 204 | }; |
254 | 205 | ||
@@ -261,38 +212,20 @@ static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = { | |||
261 | }; | 212 | }; |
262 | 213 | ||
263 | /* L4 CORE -> MMC1 interface */ | 214 | /* L4 CORE -> MMC1 interface */ |
264 | static struct omap_hwmod_addr_space omap2430_mmc1_addr_space[] = { | ||
265 | { | ||
266 | .pa_start = 0x4809c000, | ||
267 | .pa_end = 0x4809c1ff, | ||
268 | .flags = ADDR_TYPE_RT, | ||
269 | }, | ||
270 | }; | ||
271 | |||
272 | static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = { | 215 | static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = { |
273 | .master = &omap2430_l4_core_hwmod, | 216 | .master = &omap2430_l4_core_hwmod, |
274 | .slave = &omap2430_mmc1_hwmod, | 217 | .slave = &omap2430_mmc1_hwmod, |
275 | .clk = "mmchs1_ick", | 218 | .clk = "mmchs1_ick", |
276 | .addr = omap2430_mmc1_addr_space, | 219 | .addr = omap2430_mmc1_addr_space, |
277 | .addr_cnt = ARRAY_SIZE(omap2430_mmc1_addr_space), | ||
278 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 220 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
279 | }; | 221 | }; |
280 | 222 | ||
281 | /* L4 CORE -> MMC2 interface */ | 223 | /* L4 CORE -> MMC2 interface */ |
282 | static struct omap_hwmod_addr_space omap2430_mmc2_addr_space[] = { | ||
283 | { | ||
284 | .pa_start = 0x480b4000, | ||
285 | .pa_end = 0x480b41ff, | ||
286 | .flags = ADDR_TYPE_RT, | ||
287 | }, | ||
288 | }; | ||
289 | |||
290 | static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = { | 224 | static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = { |
291 | .master = &omap2430_l4_core_hwmod, | 225 | .master = &omap2430_l4_core_hwmod, |
292 | .slave = &omap2430_mmc2_hwmod, | 226 | .slave = &omap2430_mmc2_hwmod, |
293 | .addr = omap2430_mmc2_addr_space, | ||
294 | .clk = "mmchs2_ick", | 227 | .clk = "mmchs2_ick", |
295 | .addr_cnt = ARRAY_SIZE(omap2430_mmc2_addr_space), | 228 | .addr = omap2430_mmc2_addr_space, |
296 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 229 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
297 | }; | 230 | }; |
298 | 231 | ||
@@ -333,56 +266,29 @@ static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = { | |||
333 | }; | 266 | }; |
334 | 267 | ||
335 | /* l4 core -> mcspi1 interface */ | 268 | /* l4 core -> mcspi1 interface */ |
336 | static struct omap_hwmod_addr_space omap2430_mcspi1_addr_space[] = { | ||
337 | { | ||
338 | .pa_start = 0x48098000, | ||
339 | .pa_end = 0x480980ff, | ||
340 | .flags = ADDR_TYPE_RT, | ||
341 | }, | ||
342 | }; | ||
343 | |||
344 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = { | 269 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = { |
345 | .master = &omap2430_l4_core_hwmod, | 270 | .master = &omap2430_l4_core_hwmod, |
346 | .slave = &omap2430_mcspi1_hwmod, | 271 | .slave = &omap2430_mcspi1_hwmod, |
347 | .clk = "mcspi1_ick", | 272 | .clk = "mcspi1_ick", |
348 | .addr = omap2430_mcspi1_addr_space, | 273 | .addr = omap2_mcspi1_addr_space, |
349 | .addr_cnt = ARRAY_SIZE(omap2430_mcspi1_addr_space), | ||
350 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 274 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
351 | }; | 275 | }; |
352 | 276 | ||
353 | /* l4 core -> mcspi2 interface */ | 277 | /* l4 core -> mcspi2 interface */ |
354 | static struct omap_hwmod_addr_space omap2430_mcspi2_addr_space[] = { | ||
355 | { | ||
356 | .pa_start = 0x4809a000, | ||
357 | .pa_end = 0x4809a0ff, | ||
358 | .flags = ADDR_TYPE_RT, | ||
359 | }, | ||
360 | }; | ||
361 | |||
362 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = { | 278 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = { |
363 | .master = &omap2430_l4_core_hwmod, | 279 | .master = &omap2430_l4_core_hwmod, |
364 | .slave = &omap2430_mcspi2_hwmod, | 280 | .slave = &omap2430_mcspi2_hwmod, |
365 | .clk = "mcspi2_ick", | 281 | .clk = "mcspi2_ick", |
366 | .addr = omap2430_mcspi2_addr_space, | 282 | .addr = omap2_mcspi2_addr_space, |
367 | .addr_cnt = ARRAY_SIZE(omap2430_mcspi2_addr_space), | ||
368 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 283 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
369 | }; | 284 | }; |
370 | 285 | ||
371 | /* l4 core -> mcspi3 interface */ | 286 | /* l4 core -> mcspi3 interface */ |
372 | static struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[] = { | ||
373 | { | ||
374 | .pa_start = 0x480b8000, | ||
375 | .pa_end = 0x480b80ff, | ||
376 | .flags = ADDR_TYPE_RT, | ||
377 | }, | ||
378 | }; | ||
379 | |||
380 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = { | 287 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = { |
381 | .master = &omap2430_l4_core_hwmod, | 288 | .master = &omap2430_l4_core_hwmod, |
382 | .slave = &omap2430_mcspi3_hwmod, | 289 | .slave = &omap2430_mcspi3_hwmod, |
383 | .clk = "mcspi3_ick", | 290 | .clk = "mcspi3_ick", |
384 | .addr = omap2430_mcspi3_addr_space, | 291 | .addr = omap2430_mcspi3_addr_space, |
385 | .addr_cnt = ARRAY_SIZE(omap2430_mcspi3_addr_space), | ||
386 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 292 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
387 | }; | 293 | }; |
388 | 294 | ||
@@ -441,29 +347,8 @@ static struct omap_hwmod omap2430_iva_hwmod = { | |||
441 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | 347 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) |
442 | }; | 348 | }; |
443 | 349 | ||
444 | /* Timer Common */ | ||
445 | static struct omap_hwmod_class_sysconfig omap2430_timer_sysc = { | ||
446 | .rev_offs = 0x0000, | ||
447 | .sysc_offs = 0x0010, | ||
448 | .syss_offs = 0x0014, | ||
449 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | | ||
450 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
451 | SYSC_HAS_AUTOIDLE), | ||
452 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
453 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
454 | }; | ||
455 | |||
456 | static struct omap_hwmod_class omap2430_timer_hwmod_class = { | ||
457 | .name = "timer", | ||
458 | .sysc = &omap2430_timer_sysc, | ||
459 | .rev = OMAP_TIMER_IP_VERSION_1, | ||
460 | }; | ||
461 | |||
462 | /* timer1 */ | 350 | /* timer1 */ |
463 | static struct omap_hwmod omap2430_timer1_hwmod; | 351 | static struct omap_hwmod omap2430_timer1_hwmod; |
464 | static struct omap_hwmod_irq_info omap2430_timer1_mpu_irqs[] = { | ||
465 | { .irq = 37, }, | ||
466 | }; | ||
467 | 352 | ||
468 | static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = { | 353 | static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = { |
469 | { | 354 | { |
@@ -471,6 +356,7 @@ static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = { | |||
471 | .pa_end = 0x49018000 + SZ_1K - 1, | 356 | .pa_end = 0x49018000 + SZ_1K - 1, |
472 | .flags = ADDR_TYPE_RT | 357 | .flags = ADDR_TYPE_RT |
473 | }, | 358 | }, |
359 | { } | ||
474 | }; | 360 | }; |
475 | 361 | ||
476 | /* l4_wkup -> timer1 */ | 362 | /* l4_wkup -> timer1 */ |
@@ -479,7 +365,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = { | |||
479 | .slave = &omap2430_timer1_hwmod, | 365 | .slave = &omap2430_timer1_hwmod, |
480 | .clk = "gpt1_ick", | 366 | .clk = "gpt1_ick", |
481 | .addr = omap2430_timer1_addrs, | 367 | .addr = omap2430_timer1_addrs, |
482 | .addr_cnt = ARRAY_SIZE(omap2430_timer1_addrs), | ||
483 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 368 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
484 | }; | 369 | }; |
485 | 370 | ||
@@ -491,8 +376,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = { | |||
491 | /* timer1 hwmod */ | 376 | /* timer1 hwmod */ |
492 | static struct omap_hwmod omap2430_timer1_hwmod = { | 377 | static struct omap_hwmod omap2430_timer1_hwmod = { |
493 | .name = "timer1", | 378 | .name = "timer1", |
494 | .mpu_irqs = omap2430_timer1_mpu_irqs, | 379 | .mpu_irqs = omap2_timer1_mpu_irqs, |
495 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer1_mpu_irqs), | ||
496 | .main_clk = "gpt1_fck", | 380 | .main_clk = "gpt1_fck", |
497 | .prcm = { | 381 | .prcm = { |
498 | .omap2 = { | 382 | .omap2 = { |
@@ -505,31 +389,19 @@ static struct omap_hwmod omap2430_timer1_hwmod = { | |||
505 | }, | 389 | }, |
506 | .slaves = omap2430_timer1_slaves, | 390 | .slaves = omap2430_timer1_slaves, |
507 | .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves), | 391 | .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves), |
508 | .class = &omap2430_timer_hwmod_class, | 392 | .class = &omap2xxx_timer_hwmod_class, |
509 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | 393 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) |
510 | }; | 394 | }; |
511 | 395 | ||
512 | /* timer2 */ | 396 | /* timer2 */ |
513 | static struct omap_hwmod omap2430_timer2_hwmod; | 397 | static struct omap_hwmod omap2430_timer2_hwmod; |
514 | static struct omap_hwmod_irq_info omap2430_timer2_mpu_irqs[] = { | ||
515 | { .irq = 38, }, | ||
516 | }; | ||
517 | |||
518 | static struct omap_hwmod_addr_space omap2430_timer2_addrs[] = { | ||
519 | { | ||
520 | .pa_start = 0x4802a000, | ||
521 | .pa_end = 0x4802a000 + SZ_1K - 1, | ||
522 | .flags = ADDR_TYPE_RT | ||
523 | }, | ||
524 | }; | ||
525 | 398 | ||
526 | /* l4_core -> timer2 */ | 399 | /* l4_core -> timer2 */ |
527 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = { | 400 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = { |
528 | .master = &omap2430_l4_core_hwmod, | 401 | .master = &omap2430_l4_core_hwmod, |
529 | .slave = &omap2430_timer2_hwmod, | 402 | .slave = &omap2430_timer2_hwmod, |
530 | .clk = "gpt2_ick", | 403 | .clk = "gpt2_ick", |
531 | .addr = omap2430_timer2_addrs, | 404 | .addr = omap2xxx_timer2_addrs, |
532 | .addr_cnt = ARRAY_SIZE(omap2430_timer2_addrs), | ||
533 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 405 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
534 | }; | 406 | }; |
535 | 407 | ||
@@ -541,8 +413,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = { | |||
541 | /* timer2 hwmod */ | 413 | /* timer2 hwmod */ |
542 | static struct omap_hwmod omap2430_timer2_hwmod = { | 414 | static struct omap_hwmod omap2430_timer2_hwmod = { |
543 | .name = "timer2", | 415 | .name = "timer2", |
544 | .mpu_irqs = omap2430_timer2_mpu_irqs, | 416 | .mpu_irqs = omap2_timer2_mpu_irqs, |
545 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer2_mpu_irqs), | ||
546 | .main_clk = "gpt2_fck", | 417 | .main_clk = "gpt2_fck", |
547 | .prcm = { | 418 | .prcm = { |
548 | .omap2 = { | 419 | .omap2 = { |
@@ -555,31 +426,19 @@ static struct omap_hwmod omap2430_timer2_hwmod = { | |||
555 | }, | 426 | }, |
556 | .slaves = omap2430_timer2_slaves, | 427 | .slaves = omap2430_timer2_slaves, |
557 | .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves), | 428 | .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves), |
558 | .class = &omap2430_timer_hwmod_class, | 429 | .class = &omap2xxx_timer_hwmod_class, |
559 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | 430 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) |
560 | }; | 431 | }; |
561 | 432 | ||
562 | /* timer3 */ | 433 | /* timer3 */ |
563 | static struct omap_hwmod omap2430_timer3_hwmod; | 434 | static struct omap_hwmod omap2430_timer3_hwmod; |
564 | static struct omap_hwmod_irq_info omap2430_timer3_mpu_irqs[] = { | ||
565 | { .irq = 39, }, | ||
566 | }; | ||
567 | |||
568 | static struct omap_hwmod_addr_space omap2430_timer3_addrs[] = { | ||
569 | { | ||
570 | .pa_start = 0x48078000, | ||
571 | .pa_end = 0x48078000 + SZ_1K - 1, | ||
572 | .flags = ADDR_TYPE_RT | ||
573 | }, | ||
574 | }; | ||
575 | 435 | ||
576 | /* l4_core -> timer3 */ | 436 | /* l4_core -> timer3 */ |
577 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = { | 437 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = { |
578 | .master = &omap2430_l4_core_hwmod, | 438 | .master = &omap2430_l4_core_hwmod, |
579 | .slave = &omap2430_timer3_hwmod, | 439 | .slave = &omap2430_timer3_hwmod, |
580 | .clk = "gpt3_ick", | 440 | .clk = "gpt3_ick", |
581 | .addr = omap2430_timer3_addrs, | 441 | .addr = omap2xxx_timer3_addrs, |
582 | .addr_cnt = ARRAY_SIZE(omap2430_timer3_addrs), | ||
583 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 442 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
584 | }; | 443 | }; |
585 | 444 | ||
@@ -591,8 +450,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = { | |||
591 | /* timer3 hwmod */ | 450 | /* timer3 hwmod */ |
592 | static struct omap_hwmod omap2430_timer3_hwmod = { | 451 | static struct omap_hwmod omap2430_timer3_hwmod = { |
593 | .name = "timer3", | 452 | .name = "timer3", |
594 | .mpu_irqs = omap2430_timer3_mpu_irqs, | 453 | .mpu_irqs = omap2_timer3_mpu_irqs, |
595 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer3_mpu_irqs), | ||
596 | .main_clk = "gpt3_fck", | 454 | .main_clk = "gpt3_fck", |
597 | .prcm = { | 455 | .prcm = { |
598 | .omap2 = { | 456 | .omap2 = { |
@@ -605,31 +463,19 @@ static struct omap_hwmod omap2430_timer3_hwmod = { | |||
605 | }, | 463 | }, |
606 | .slaves = omap2430_timer3_slaves, | 464 | .slaves = omap2430_timer3_slaves, |
607 | .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves), | 465 | .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves), |
608 | .class = &omap2430_timer_hwmod_class, | 466 | .class = &omap2xxx_timer_hwmod_class, |
609 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | 467 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) |
610 | }; | 468 | }; |
611 | 469 | ||
612 | /* timer4 */ | 470 | /* timer4 */ |
613 | static struct omap_hwmod omap2430_timer4_hwmod; | 471 | static struct omap_hwmod omap2430_timer4_hwmod; |
614 | static struct omap_hwmod_irq_info omap2430_timer4_mpu_irqs[] = { | ||
615 | { .irq = 40, }, | ||
616 | }; | ||
617 | |||
618 | static struct omap_hwmod_addr_space omap2430_timer4_addrs[] = { | ||
619 | { | ||
620 | .pa_start = 0x4807a000, | ||
621 | .pa_end = 0x4807a000 + SZ_1K - 1, | ||
622 | .flags = ADDR_TYPE_RT | ||
623 | }, | ||
624 | }; | ||
625 | 472 | ||
626 | /* l4_core -> timer4 */ | 473 | /* l4_core -> timer4 */ |
627 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = { | 474 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = { |
628 | .master = &omap2430_l4_core_hwmod, | 475 | .master = &omap2430_l4_core_hwmod, |
629 | .slave = &omap2430_timer4_hwmod, | 476 | .slave = &omap2430_timer4_hwmod, |
630 | .clk = "gpt4_ick", | 477 | .clk = "gpt4_ick", |
631 | .addr = omap2430_timer4_addrs, | 478 | .addr = omap2xxx_timer4_addrs, |
632 | .addr_cnt = ARRAY_SIZE(omap2430_timer4_addrs), | ||
633 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 479 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
634 | }; | 480 | }; |
635 | 481 | ||
@@ -641,8 +487,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = { | |||
641 | /* timer4 hwmod */ | 487 | /* timer4 hwmod */ |
642 | static struct omap_hwmod omap2430_timer4_hwmod = { | 488 | static struct omap_hwmod omap2430_timer4_hwmod = { |
643 | .name = "timer4", | 489 | .name = "timer4", |
644 | .mpu_irqs = omap2430_timer4_mpu_irqs, | 490 | .mpu_irqs = omap2_timer4_mpu_irqs, |
645 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer4_mpu_irqs), | ||
646 | .main_clk = "gpt4_fck", | 491 | .main_clk = "gpt4_fck", |
647 | .prcm = { | 492 | .prcm = { |
648 | .omap2 = { | 493 | .omap2 = { |
@@ -655,31 +500,19 @@ static struct omap_hwmod omap2430_timer4_hwmod = { | |||
655 | }, | 500 | }, |
656 | .slaves = omap2430_timer4_slaves, | 501 | .slaves = omap2430_timer4_slaves, |
657 | .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves), | 502 | .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves), |
658 | .class = &omap2430_timer_hwmod_class, | 503 | .class = &omap2xxx_timer_hwmod_class, |
659 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | 504 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) |
660 | }; | 505 | }; |
661 | 506 | ||
662 | /* timer5 */ | 507 | /* timer5 */ |
663 | static struct omap_hwmod omap2430_timer5_hwmod; | 508 | static struct omap_hwmod omap2430_timer5_hwmod; |
664 | static struct omap_hwmod_irq_info omap2430_timer5_mpu_irqs[] = { | ||
665 | { .irq = 41, }, | ||
666 | }; | ||
667 | |||
668 | static struct omap_hwmod_addr_space omap2430_timer5_addrs[] = { | ||
669 | { | ||
670 | .pa_start = 0x4807c000, | ||
671 | .pa_end = 0x4807c000 + SZ_1K - 1, | ||
672 | .flags = ADDR_TYPE_RT | ||
673 | }, | ||
674 | }; | ||
675 | 509 | ||
676 | /* l4_core -> timer5 */ | 510 | /* l4_core -> timer5 */ |
677 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = { | 511 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = { |
678 | .master = &omap2430_l4_core_hwmod, | 512 | .master = &omap2430_l4_core_hwmod, |
679 | .slave = &omap2430_timer5_hwmod, | 513 | .slave = &omap2430_timer5_hwmod, |
680 | .clk = "gpt5_ick", | 514 | .clk = "gpt5_ick", |
681 | .addr = omap2430_timer5_addrs, | 515 | .addr = omap2xxx_timer5_addrs, |
682 | .addr_cnt = ARRAY_SIZE(omap2430_timer5_addrs), | ||
683 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 516 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
684 | }; | 517 | }; |
685 | 518 | ||
@@ -691,8 +524,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = { | |||
691 | /* timer5 hwmod */ | 524 | /* timer5 hwmod */ |
692 | static struct omap_hwmod omap2430_timer5_hwmod = { | 525 | static struct omap_hwmod omap2430_timer5_hwmod = { |
693 | .name = "timer5", | 526 | .name = "timer5", |
694 | .mpu_irqs = omap2430_timer5_mpu_irqs, | 527 | .mpu_irqs = omap2_timer5_mpu_irqs, |
695 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer5_mpu_irqs), | ||
696 | .main_clk = "gpt5_fck", | 528 | .main_clk = "gpt5_fck", |
697 | .prcm = { | 529 | .prcm = { |
698 | .omap2 = { | 530 | .omap2 = { |
@@ -705,31 +537,19 @@ static struct omap_hwmod omap2430_timer5_hwmod = { | |||
705 | }, | 537 | }, |
706 | .slaves = omap2430_timer5_slaves, | 538 | .slaves = omap2430_timer5_slaves, |
707 | .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves), | 539 | .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves), |
708 | .class = &omap2430_timer_hwmod_class, | 540 | .class = &omap2xxx_timer_hwmod_class, |
709 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | 541 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) |
710 | }; | 542 | }; |
711 | 543 | ||
712 | /* timer6 */ | 544 | /* timer6 */ |
713 | static struct omap_hwmod omap2430_timer6_hwmod; | 545 | static struct omap_hwmod omap2430_timer6_hwmod; |
714 | static struct omap_hwmod_irq_info omap2430_timer6_mpu_irqs[] = { | ||
715 | { .irq = 42, }, | ||
716 | }; | ||
717 | |||
718 | static struct omap_hwmod_addr_space omap2430_timer6_addrs[] = { | ||
719 | { | ||
720 | .pa_start = 0x4807e000, | ||
721 | .pa_end = 0x4807e000 + SZ_1K - 1, | ||
722 | .flags = ADDR_TYPE_RT | ||
723 | }, | ||
724 | }; | ||
725 | 546 | ||
726 | /* l4_core -> timer6 */ | 547 | /* l4_core -> timer6 */ |
727 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = { | 548 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = { |
728 | .master = &omap2430_l4_core_hwmod, | 549 | .master = &omap2430_l4_core_hwmod, |
729 | .slave = &omap2430_timer6_hwmod, | 550 | .slave = &omap2430_timer6_hwmod, |
730 | .clk = "gpt6_ick", | 551 | .clk = "gpt6_ick", |
731 | .addr = omap2430_timer6_addrs, | 552 | .addr = omap2xxx_timer6_addrs, |
732 | .addr_cnt = ARRAY_SIZE(omap2430_timer6_addrs), | ||
733 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 553 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
734 | }; | 554 | }; |
735 | 555 | ||
@@ -741,8 +561,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = { | |||
741 | /* timer6 hwmod */ | 561 | /* timer6 hwmod */ |
742 | static struct omap_hwmod omap2430_timer6_hwmod = { | 562 | static struct omap_hwmod omap2430_timer6_hwmod = { |
743 | .name = "timer6", | 563 | .name = "timer6", |
744 | .mpu_irqs = omap2430_timer6_mpu_irqs, | 564 | .mpu_irqs = omap2_timer6_mpu_irqs, |
745 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer6_mpu_irqs), | ||
746 | .main_clk = "gpt6_fck", | 565 | .main_clk = "gpt6_fck", |
747 | .prcm = { | 566 | .prcm = { |
748 | .omap2 = { | 567 | .omap2 = { |
@@ -755,31 +574,19 @@ static struct omap_hwmod omap2430_timer6_hwmod = { | |||
755 | }, | 574 | }, |
756 | .slaves = omap2430_timer6_slaves, | 575 | .slaves = omap2430_timer6_slaves, |
757 | .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves), | 576 | .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves), |
758 | .class = &omap2430_timer_hwmod_class, | 577 | .class = &omap2xxx_timer_hwmod_class, |
759 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | 578 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) |
760 | }; | 579 | }; |
761 | 580 | ||
762 | /* timer7 */ | 581 | /* timer7 */ |
763 | static struct omap_hwmod omap2430_timer7_hwmod; | 582 | static struct omap_hwmod omap2430_timer7_hwmod; |
764 | static struct omap_hwmod_irq_info omap2430_timer7_mpu_irqs[] = { | ||
765 | { .irq = 43, }, | ||
766 | }; | ||
767 | |||
768 | static struct omap_hwmod_addr_space omap2430_timer7_addrs[] = { | ||
769 | { | ||
770 | .pa_start = 0x48080000, | ||
771 | .pa_end = 0x48080000 + SZ_1K - 1, | ||
772 | .flags = ADDR_TYPE_RT | ||
773 | }, | ||
774 | }; | ||
775 | 583 | ||
776 | /* l4_core -> timer7 */ | 584 | /* l4_core -> timer7 */ |
777 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = { | 585 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = { |
778 | .master = &omap2430_l4_core_hwmod, | 586 | .master = &omap2430_l4_core_hwmod, |
779 | .slave = &omap2430_timer7_hwmod, | 587 | .slave = &omap2430_timer7_hwmod, |
780 | .clk = "gpt7_ick", | 588 | .clk = "gpt7_ick", |
781 | .addr = omap2430_timer7_addrs, | 589 | .addr = omap2xxx_timer7_addrs, |
782 | .addr_cnt = ARRAY_SIZE(omap2430_timer7_addrs), | ||
783 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 590 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
784 | }; | 591 | }; |
785 | 592 | ||
@@ -791,8 +598,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = { | |||
791 | /* timer7 hwmod */ | 598 | /* timer7 hwmod */ |
792 | static struct omap_hwmod omap2430_timer7_hwmod = { | 599 | static struct omap_hwmod omap2430_timer7_hwmod = { |
793 | .name = "timer7", | 600 | .name = "timer7", |
794 | .mpu_irqs = omap2430_timer7_mpu_irqs, | 601 | .mpu_irqs = omap2_timer7_mpu_irqs, |
795 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer7_mpu_irqs), | ||
796 | .main_clk = "gpt7_fck", | 602 | .main_clk = "gpt7_fck", |
797 | .prcm = { | 603 | .prcm = { |
798 | .omap2 = { | 604 | .omap2 = { |
@@ -805,31 +611,19 @@ static struct omap_hwmod omap2430_timer7_hwmod = { | |||
805 | }, | 611 | }, |
806 | .slaves = omap2430_timer7_slaves, | 612 | .slaves = omap2430_timer7_slaves, |
807 | .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves), | 613 | .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves), |
808 | .class = &omap2430_timer_hwmod_class, | 614 | .class = &omap2xxx_timer_hwmod_class, |
809 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | 615 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) |
810 | }; | 616 | }; |
811 | 617 | ||
812 | /* timer8 */ | 618 | /* timer8 */ |
813 | static struct omap_hwmod omap2430_timer8_hwmod; | 619 | static struct omap_hwmod omap2430_timer8_hwmod; |
814 | static struct omap_hwmod_irq_info omap2430_timer8_mpu_irqs[] = { | ||
815 | { .irq = 44, }, | ||
816 | }; | ||
817 | |||
818 | static struct omap_hwmod_addr_space omap2430_timer8_addrs[] = { | ||
819 | { | ||
820 | .pa_start = 0x48082000, | ||
821 | .pa_end = 0x48082000 + SZ_1K - 1, | ||
822 | .flags = ADDR_TYPE_RT | ||
823 | }, | ||
824 | }; | ||
825 | 620 | ||
826 | /* l4_core -> timer8 */ | 621 | /* l4_core -> timer8 */ |
827 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = { | 622 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = { |
828 | .master = &omap2430_l4_core_hwmod, | 623 | .master = &omap2430_l4_core_hwmod, |
829 | .slave = &omap2430_timer8_hwmod, | 624 | .slave = &omap2430_timer8_hwmod, |
830 | .clk = "gpt8_ick", | 625 | .clk = "gpt8_ick", |
831 | .addr = omap2430_timer8_addrs, | 626 | .addr = omap2xxx_timer8_addrs, |
832 | .addr_cnt = ARRAY_SIZE(omap2430_timer8_addrs), | ||
833 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 627 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
834 | }; | 628 | }; |
835 | 629 | ||
@@ -841,8 +635,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = { | |||
841 | /* timer8 hwmod */ | 635 | /* timer8 hwmod */ |
842 | static struct omap_hwmod omap2430_timer8_hwmod = { | 636 | static struct omap_hwmod omap2430_timer8_hwmod = { |
843 | .name = "timer8", | 637 | .name = "timer8", |
844 | .mpu_irqs = omap2430_timer8_mpu_irqs, | 638 | .mpu_irqs = omap2_timer8_mpu_irqs, |
845 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer8_mpu_irqs), | ||
846 | .main_clk = "gpt8_fck", | 639 | .main_clk = "gpt8_fck", |
847 | .prcm = { | 640 | .prcm = { |
848 | .omap2 = { | 641 | .omap2 = { |
@@ -855,31 +648,19 @@ static struct omap_hwmod omap2430_timer8_hwmod = { | |||
855 | }, | 648 | }, |
856 | .slaves = omap2430_timer8_slaves, | 649 | .slaves = omap2430_timer8_slaves, |
857 | .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves), | 650 | .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves), |
858 | .class = &omap2430_timer_hwmod_class, | 651 | .class = &omap2xxx_timer_hwmod_class, |
859 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | 652 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) |
860 | }; | 653 | }; |
861 | 654 | ||
862 | /* timer9 */ | 655 | /* timer9 */ |
863 | static struct omap_hwmod omap2430_timer9_hwmod; | 656 | static struct omap_hwmod omap2430_timer9_hwmod; |
864 | static struct omap_hwmod_irq_info omap2430_timer9_mpu_irqs[] = { | ||
865 | { .irq = 45, }, | ||
866 | }; | ||
867 | |||
868 | static struct omap_hwmod_addr_space omap2430_timer9_addrs[] = { | ||
869 | { | ||
870 | .pa_start = 0x48084000, | ||
871 | .pa_end = 0x48084000 + SZ_1K - 1, | ||
872 | .flags = ADDR_TYPE_RT | ||
873 | }, | ||
874 | }; | ||
875 | 657 | ||
876 | /* l4_core -> timer9 */ | 658 | /* l4_core -> timer9 */ |
877 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = { | 659 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = { |
878 | .master = &omap2430_l4_core_hwmod, | 660 | .master = &omap2430_l4_core_hwmod, |
879 | .slave = &omap2430_timer9_hwmod, | 661 | .slave = &omap2430_timer9_hwmod, |
880 | .clk = "gpt9_ick", | 662 | .clk = "gpt9_ick", |
881 | .addr = omap2430_timer9_addrs, | 663 | .addr = omap2xxx_timer9_addrs, |
882 | .addr_cnt = ARRAY_SIZE(omap2430_timer9_addrs), | ||
883 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 664 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
884 | }; | 665 | }; |
885 | 666 | ||
@@ -891,8 +672,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = { | |||
891 | /* timer9 hwmod */ | 672 | /* timer9 hwmod */ |
892 | static struct omap_hwmod omap2430_timer9_hwmod = { | 673 | static struct omap_hwmod omap2430_timer9_hwmod = { |
893 | .name = "timer9", | 674 | .name = "timer9", |
894 | .mpu_irqs = omap2430_timer9_mpu_irqs, | 675 | .mpu_irqs = omap2_timer9_mpu_irqs, |
895 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer9_mpu_irqs), | ||
896 | .main_clk = "gpt9_fck", | 676 | .main_clk = "gpt9_fck", |
897 | .prcm = { | 677 | .prcm = { |
898 | .omap2 = { | 678 | .omap2 = { |
@@ -905,31 +685,19 @@ static struct omap_hwmod omap2430_timer9_hwmod = { | |||
905 | }, | 685 | }, |
906 | .slaves = omap2430_timer9_slaves, | 686 | .slaves = omap2430_timer9_slaves, |
907 | .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves), | 687 | .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves), |
908 | .class = &omap2430_timer_hwmod_class, | 688 | .class = &omap2xxx_timer_hwmod_class, |
909 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | 689 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) |
910 | }; | 690 | }; |
911 | 691 | ||
912 | /* timer10 */ | 692 | /* timer10 */ |
913 | static struct omap_hwmod omap2430_timer10_hwmod; | 693 | static struct omap_hwmod omap2430_timer10_hwmod; |
914 | static struct omap_hwmod_irq_info omap2430_timer10_mpu_irqs[] = { | ||
915 | { .irq = 46, }, | ||
916 | }; | ||
917 | |||
918 | static struct omap_hwmod_addr_space omap2430_timer10_addrs[] = { | ||
919 | { | ||
920 | .pa_start = 0x48086000, | ||
921 | .pa_end = 0x48086000 + SZ_1K - 1, | ||
922 | .flags = ADDR_TYPE_RT | ||
923 | }, | ||
924 | }; | ||
925 | 694 | ||
926 | /* l4_core -> timer10 */ | 695 | /* l4_core -> timer10 */ |
927 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = { | 696 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = { |
928 | .master = &omap2430_l4_core_hwmod, | 697 | .master = &omap2430_l4_core_hwmod, |
929 | .slave = &omap2430_timer10_hwmod, | 698 | .slave = &omap2430_timer10_hwmod, |
930 | .clk = "gpt10_ick", | 699 | .clk = "gpt10_ick", |
931 | .addr = omap2430_timer10_addrs, | 700 | .addr = omap2_timer10_addrs, |
932 | .addr_cnt = ARRAY_SIZE(omap2430_timer10_addrs), | ||
933 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 701 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
934 | }; | 702 | }; |
935 | 703 | ||
@@ -941,8 +709,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = { | |||
941 | /* timer10 hwmod */ | 709 | /* timer10 hwmod */ |
942 | static struct omap_hwmod omap2430_timer10_hwmod = { | 710 | static struct omap_hwmod omap2430_timer10_hwmod = { |
943 | .name = "timer10", | 711 | .name = "timer10", |
944 | .mpu_irqs = omap2430_timer10_mpu_irqs, | 712 | .mpu_irqs = omap2_timer10_mpu_irqs, |
945 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer10_mpu_irqs), | ||
946 | .main_clk = "gpt10_fck", | 713 | .main_clk = "gpt10_fck", |
947 | .prcm = { | 714 | .prcm = { |
948 | .omap2 = { | 715 | .omap2 = { |
@@ -955,31 +722,19 @@ static struct omap_hwmod omap2430_timer10_hwmod = { | |||
955 | }, | 722 | }, |
956 | .slaves = omap2430_timer10_slaves, | 723 | .slaves = omap2430_timer10_slaves, |
957 | .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves), | 724 | .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves), |
958 | .class = &omap2430_timer_hwmod_class, | 725 | .class = &omap2xxx_timer_hwmod_class, |
959 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | 726 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) |
960 | }; | 727 | }; |
961 | 728 | ||
962 | /* timer11 */ | 729 | /* timer11 */ |
963 | static struct omap_hwmod omap2430_timer11_hwmod; | 730 | static struct omap_hwmod omap2430_timer11_hwmod; |
964 | static struct omap_hwmod_irq_info omap2430_timer11_mpu_irqs[] = { | ||
965 | { .irq = 47, }, | ||
966 | }; | ||
967 | |||
968 | static struct omap_hwmod_addr_space omap2430_timer11_addrs[] = { | ||
969 | { | ||
970 | .pa_start = 0x48088000, | ||
971 | .pa_end = 0x48088000 + SZ_1K - 1, | ||
972 | .flags = ADDR_TYPE_RT | ||
973 | }, | ||
974 | }; | ||
975 | 731 | ||
976 | /* l4_core -> timer11 */ | 732 | /* l4_core -> timer11 */ |
977 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = { | 733 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = { |
978 | .master = &omap2430_l4_core_hwmod, | 734 | .master = &omap2430_l4_core_hwmod, |
979 | .slave = &omap2430_timer11_hwmod, | 735 | .slave = &omap2430_timer11_hwmod, |
980 | .clk = "gpt11_ick", | 736 | .clk = "gpt11_ick", |
981 | .addr = omap2430_timer11_addrs, | 737 | .addr = omap2_timer11_addrs, |
982 | .addr_cnt = ARRAY_SIZE(omap2430_timer11_addrs), | ||
983 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 738 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
984 | }; | 739 | }; |
985 | 740 | ||
@@ -991,8 +746,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = { | |||
991 | /* timer11 hwmod */ | 746 | /* timer11 hwmod */ |
992 | static struct omap_hwmod omap2430_timer11_hwmod = { | 747 | static struct omap_hwmod omap2430_timer11_hwmod = { |
993 | .name = "timer11", | 748 | .name = "timer11", |
994 | .mpu_irqs = omap2430_timer11_mpu_irqs, | 749 | .mpu_irqs = omap2_timer11_mpu_irqs, |
995 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer11_mpu_irqs), | ||
996 | .main_clk = "gpt11_fck", | 750 | .main_clk = "gpt11_fck", |
997 | .prcm = { | 751 | .prcm = { |
998 | .omap2 = { | 752 | .omap2 = { |
@@ -1005,31 +759,19 @@ static struct omap_hwmod omap2430_timer11_hwmod = { | |||
1005 | }, | 759 | }, |
1006 | .slaves = omap2430_timer11_slaves, | 760 | .slaves = omap2430_timer11_slaves, |
1007 | .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves), | 761 | .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves), |
1008 | .class = &omap2430_timer_hwmod_class, | 762 | .class = &omap2xxx_timer_hwmod_class, |
1009 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | 763 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) |
1010 | }; | 764 | }; |
1011 | 765 | ||
1012 | /* timer12 */ | 766 | /* timer12 */ |
1013 | static struct omap_hwmod omap2430_timer12_hwmod; | 767 | static struct omap_hwmod omap2430_timer12_hwmod; |
1014 | static struct omap_hwmod_irq_info omap2430_timer12_mpu_irqs[] = { | ||
1015 | { .irq = 48, }, | ||
1016 | }; | ||
1017 | |||
1018 | static struct omap_hwmod_addr_space omap2430_timer12_addrs[] = { | ||
1019 | { | ||
1020 | .pa_start = 0x4808a000, | ||
1021 | .pa_end = 0x4808a000 + SZ_1K - 1, | ||
1022 | .flags = ADDR_TYPE_RT | ||
1023 | }, | ||
1024 | }; | ||
1025 | 768 | ||
1026 | /* l4_core -> timer12 */ | 769 | /* l4_core -> timer12 */ |
1027 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = { | 770 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = { |
1028 | .master = &omap2430_l4_core_hwmod, | 771 | .master = &omap2430_l4_core_hwmod, |
1029 | .slave = &omap2430_timer12_hwmod, | 772 | .slave = &omap2430_timer12_hwmod, |
1030 | .clk = "gpt12_ick", | 773 | .clk = "gpt12_ick", |
1031 | .addr = omap2430_timer12_addrs, | 774 | .addr = omap2xxx_timer12_addrs, |
1032 | .addr_cnt = ARRAY_SIZE(omap2430_timer12_addrs), | ||
1033 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 775 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1034 | }; | 776 | }; |
1035 | 777 | ||
@@ -1041,8 +783,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = { | |||
1041 | /* timer12 hwmod */ | 783 | /* timer12 hwmod */ |
1042 | static struct omap_hwmod omap2430_timer12_hwmod = { | 784 | static struct omap_hwmod omap2430_timer12_hwmod = { |
1043 | .name = "timer12", | 785 | .name = "timer12", |
1044 | .mpu_irqs = omap2430_timer12_mpu_irqs, | 786 | .mpu_irqs = omap2xxx_timer12_mpu_irqs, |
1045 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer12_mpu_irqs), | ||
1046 | .main_clk = "gpt12_fck", | 787 | .main_clk = "gpt12_fck", |
1047 | .prcm = { | 788 | .prcm = { |
1048 | .omap2 = { | 789 | .omap2 = { |
@@ -1055,7 +796,7 @@ static struct omap_hwmod omap2430_timer12_hwmod = { | |||
1055 | }, | 796 | }, |
1056 | .slaves = omap2430_timer12_slaves, | 797 | .slaves = omap2430_timer12_slaves, |
1057 | .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves), | 798 | .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves), |
1058 | .class = &omap2430_timer_hwmod_class, | 799 | .class = &omap2xxx_timer_hwmod_class, |
1059 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | 800 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) |
1060 | }; | 801 | }; |
1061 | 802 | ||
@@ -1066,6 +807,7 @@ static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = { | |||
1066 | .pa_end = 0x4901607f, | 807 | .pa_end = 0x4901607f, |
1067 | .flags = ADDR_TYPE_RT | 808 | .flags = ADDR_TYPE_RT |
1068 | }, | 809 | }, |
810 | { } | ||
1069 | }; | 811 | }; |
1070 | 812 | ||
1071 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = { | 813 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = { |
@@ -1073,31 +815,9 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = { | |||
1073 | .slave = &omap2430_wd_timer2_hwmod, | 815 | .slave = &omap2430_wd_timer2_hwmod, |
1074 | .clk = "mpu_wdt_ick", | 816 | .clk = "mpu_wdt_ick", |
1075 | .addr = omap2430_wd_timer2_addrs, | 817 | .addr = omap2430_wd_timer2_addrs, |
1076 | .addr_cnt = ARRAY_SIZE(omap2430_wd_timer2_addrs), | ||
1077 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 818 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1078 | }; | 819 | }; |
1079 | 820 | ||
1080 | /* | ||
1081 | * 'wd_timer' class | ||
1082 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on | ||
1083 | * overflow condition | ||
1084 | */ | ||
1085 | |||
1086 | static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = { | ||
1087 | .rev_offs = 0x0, | ||
1088 | .sysc_offs = 0x0010, | ||
1089 | .syss_offs = 0x0014, | ||
1090 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET | | ||
1091 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
1092 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1093 | }; | ||
1094 | |||
1095 | static struct omap_hwmod_class omap2430_wd_timer_hwmod_class = { | ||
1096 | .name = "wd_timer", | ||
1097 | .sysc = &omap2430_wd_timer_sysc, | ||
1098 | .pre_shutdown = &omap2_wd_timer_disable | ||
1099 | }; | ||
1100 | |||
1101 | /* wd_timer2 */ | 821 | /* wd_timer2 */ |
1102 | static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = { | 822 | static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = { |
1103 | &omap2430_l4_wkup__wd_timer2, | 823 | &omap2430_l4_wkup__wd_timer2, |
@@ -1105,7 +825,7 @@ static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = { | |||
1105 | 825 | ||
1106 | static struct omap_hwmod omap2430_wd_timer2_hwmod = { | 826 | static struct omap_hwmod omap2430_wd_timer2_hwmod = { |
1107 | .name = "wd_timer2", | 827 | .name = "wd_timer2", |
1108 | .class = &omap2430_wd_timer_hwmod_class, | 828 | .class = &omap2xxx_wd_timer_hwmod_class, |
1109 | .main_clk = "mpu_wdt_fck", | 829 | .main_clk = "mpu_wdt_fck", |
1110 | .prcm = { | 830 | .prcm = { |
1111 | .omap2 = { | 831 | .omap2 = { |
@@ -1121,45 +841,16 @@ static struct omap_hwmod omap2430_wd_timer2_hwmod = { | |||
1121 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 841 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
1122 | }; | 842 | }; |
1123 | 843 | ||
1124 | /* UART */ | ||
1125 | |||
1126 | static struct omap_hwmod_class_sysconfig uart_sysc = { | ||
1127 | .rev_offs = 0x50, | ||
1128 | .sysc_offs = 0x54, | ||
1129 | .syss_offs = 0x58, | ||
1130 | .sysc_flags = (SYSC_HAS_SIDLEMODE | | ||
1131 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
1132 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
1133 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1134 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1135 | }; | ||
1136 | |||
1137 | static struct omap_hwmod_class uart_class = { | ||
1138 | .name = "uart", | ||
1139 | .sysc = &uart_sysc, | ||
1140 | }; | ||
1141 | |||
1142 | /* UART1 */ | 844 | /* UART1 */ |
1143 | 845 | ||
1144 | static struct omap_hwmod_irq_info uart1_mpu_irqs[] = { | ||
1145 | { .irq = INT_24XX_UART1_IRQ, }, | ||
1146 | }; | ||
1147 | |||
1148 | static struct omap_hwmod_dma_info uart1_sdma_reqs[] = { | ||
1149 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, }, | ||
1150 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, }, | ||
1151 | }; | ||
1152 | |||
1153 | static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = { | 846 | static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = { |
1154 | &omap2_l4_core__uart1, | 847 | &omap2_l4_core__uart1, |
1155 | }; | 848 | }; |
1156 | 849 | ||
1157 | static struct omap_hwmod omap2430_uart1_hwmod = { | 850 | static struct omap_hwmod omap2430_uart1_hwmod = { |
1158 | .name = "uart1", | 851 | .name = "uart1", |
1159 | .mpu_irqs = uart1_mpu_irqs, | 852 | .mpu_irqs = omap2_uart1_mpu_irqs, |
1160 | .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs), | 853 | .sdma_reqs = omap2_uart1_sdma_reqs, |
1161 | .sdma_reqs = uart1_sdma_reqs, | ||
1162 | .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs), | ||
1163 | .main_clk = "uart1_fck", | 854 | .main_clk = "uart1_fck", |
1164 | .prcm = { | 855 | .prcm = { |
1165 | .omap2 = { | 856 | .omap2 = { |
@@ -1172,31 +863,20 @@ static struct omap_hwmod omap2430_uart1_hwmod = { | |||
1172 | }, | 863 | }, |
1173 | .slaves = omap2430_uart1_slaves, | 864 | .slaves = omap2430_uart1_slaves, |
1174 | .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves), | 865 | .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves), |
1175 | .class = &uart_class, | 866 | .class = &omap2_uart_class, |
1176 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 867 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
1177 | }; | 868 | }; |
1178 | 869 | ||
1179 | /* UART2 */ | 870 | /* UART2 */ |
1180 | 871 | ||
1181 | static struct omap_hwmod_irq_info uart2_mpu_irqs[] = { | ||
1182 | { .irq = INT_24XX_UART2_IRQ, }, | ||
1183 | }; | ||
1184 | |||
1185 | static struct omap_hwmod_dma_info uart2_sdma_reqs[] = { | ||
1186 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, }, | ||
1187 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, }, | ||
1188 | }; | ||
1189 | |||
1190 | static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = { | 872 | static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = { |
1191 | &omap2_l4_core__uart2, | 873 | &omap2_l4_core__uart2, |
1192 | }; | 874 | }; |
1193 | 875 | ||
1194 | static struct omap_hwmod omap2430_uart2_hwmod = { | 876 | static struct omap_hwmod omap2430_uart2_hwmod = { |
1195 | .name = "uart2", | 877 | .name = "uart2", |
1196 | .mpu_irqs = uart2_mpu_irqs, | 878 | .mpu_irqs = omap2_uart2_mpu_irqs, |
1197 | .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs), | 879 | .sdma_reqs = omap2_uart2_sdma_reqs, |
1198 | .sdma_reqs = uart2_sdma_reqs, | ||
1199 | .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs), | ||
1200 | .main_clk = "uart2_fck", | 880 | .main_clk = "uart2_fck", |
1201 | .prcm = { | 881 | .prcm = { |
1202 | .omap2 = { | 882 | .omap2 = { |
@@ -1209,31 +889,20 @@ static struct omap_hwmod omap2430_uart2_hwmod = { | |||
1209 | }, | 889 | }, |
1210 | .slaves = omap2430_uart2_slaves, | 890 | .slaves = omap2430_uart2_slaves, |
1211 | .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves), | 891 | .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves), |
1212 | .class = &uart_class, | 892 | .class = &omap2_uart_class, |
1213 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 893 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
1214 | }; | 894 | }; |
1215 | 895 | ||
1216 | /* UART3 */ | 896 | /* UART3 */ |
1217 | 897 | ||
1218 | static struct omap_hwmod_irq_info uart3_mpu_irqs[] = { | ||
1219 | { .irq = INT_24XX_UART3_IRQ, }, | ||
1220 | }; | ||
1221 | |||
1222 | static struct omap_hwmod_dma_info uart3_sdma_reqs[] = { | ||
1223 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, }, | ||
1224 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, }, | ||
1225 | }; | ||
1226 | |||
1227 | static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = { | 898 | static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = { |
1228 | &omap2_l4_core__uart3, | 899 | &omap2_l4_core__uart3, |
1229 | }; | 900 | }; |
1230 | 901 | ||
1231 | static struct omap_hwmod omap2430_uart3_hwmod = { | 902 | static struct omap_hwmod omap2430_uart3_hwmod = { |
1232 | .name = "uart3", | 903 | .name = "uart3", |
1233 | .mpu_irqs = uart3_mpu_irqs, | 904 | .mpu_irqs = omap2_uart3_mpu_irqs, |
1234 | .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs), | 905 | .sdma_reqs = omap2_uart3_sdma_reqs, |
1235 | .sdma_reqs = uart3_sdma_reqs, | ||
1236 | .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs), | ||
1237 | .main_clk = "uart3_fck", | 906 | .main_clk = "uart3_fck", |
1238 | .prcm = { | 907 | .prcm = { |
1239 | .omap2 = { | 908 | .omap2 = { |
@@ -1246,53 +915,22 @@ static struct omap_hwmod omap2430_uart3_hwmod = { | |||
1246 | }, | 915 | }, |
1247 | .slaves = omap2430_uart3_slaves, | 916 | .slaves = omap2430_uart3_slaves, |
1248 | .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves), | 917 | .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves), |
1249 | .class = &uart_class, | 918 | .class = &omap2_uart_class, |
1250 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 919 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
1251 | }; | 920 | }; |
1252 | 921 | ||
1253 | /* | ||
1254 | * 'dss' class | ||
1255 | * display sub-system | ||
1256 | */ | ||
1257 | |||
1258 | static struct omap_hwmod_class_sysconfig omap2430_dss_sysc = { | ||
1259 | .rev_offs = 0x0000, | ||
1260 | .sysc_offs = 0x0010, | ||
1261 | .syss_offs = 0x0014, | ||
1262 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1263 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1264 | }; | ||
1265 | |||
1266 | static struct omap_hwmod_class omap2430_dss_hwmod_class = { | ||
1267 | .name = "dss", | ||
1268 | .sysc = &omap2430_dss_sysc, | ||
1269 | }; | ||
1270 | |||
1271 | static struct omap_hwmod_dma_info omap2430_dss_sdma_chs[] = { | ||
1272 | { .name = "dispc", .dma_req = 5 }, | ||
1273 | }; | ||
1274 | |||
1275 | /* dss */ | 922 | /* dss */ |
1276 | /* dss master ports */ | 923 | /* dss master ports */ |
1277 | static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = { | 924 | static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = { |
1278 | &omap2430_dss__l3, | 925 | &omap2430_dss__l3, |
1279 | }; | 926 | }; |
1280 | 927 | ||
1281 | static struct omap_hwmod_addr_space omap2430_dss_addrs[] = { | ||
1282 | { | ||
1283 | .pa_start = 0x48050000, | ||
1284 | .pa_end = 0x480503FF, | ||
1285 | .flags = ADDR_TYPE_RT | ||
1286 | }, | ||
1287 | }; | ||
1288 | |||
1289 | /* l4_core -> dss */ | 928 | /* l4_core -> dss */ |
1290 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss = { | 929 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss = { |
1291 | .master = &omap2430_l4_core_hwmod, | 930 | .master = &omap2430_l4_core_hwmod, |
1292 | .slave = &omap2430_dss_core_hwmod, | 931 | .slave = &omap2430_dss_core_hwmod, |
1293 | .clk = "dss_ick", | 932 | .clk = "dss_ick", |
1294 | .addr = omap2430_dss_addrs, | 933 | .addr = omap2_dss_addrs, |
1295 | .addr_cnt = ARRAY_SIZE(omap2430_dss_addrs), | ||
1296 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 934 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1297 | }; | 935 | }; |
1298 | 936 | ||
@@ -1308,10 +946,9 @@ static struct omap_hwmod_opt_clk dss_opt_clks[] = { | |||
1308 | 946 | ||
1309 | static struct omap_hwmod omap2430_dss_core_hwmod = { | 947 | static struct omap_hwmod omap2430_dss_core_hwmod = { |
1310 | .name = "dss_core", | 948 | .name = "dss_core", |
1311 | .class = &omap2430_dss_hwmod_class, | 949 | .class = &omap2_dss_hwmod_class, |
1312 | .main_clk = "dss1_fck", /* instead of dss_fck */ | 950 | .main_clk = "dss1_fck", /* instead of dss_fck */ |
1313 | .sdma_reqs = omap2430_dss_sdma_chs, | 951 | .sdma_reqs = omap2xxx_dss_sdma_chs, |
1314 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_dss_sdma_chs), | ||
1315 | .prcm = { | 952 | .prcm = { |
1316 | .omap2 = { | 953 | .omap2 = { |
1317 | .prcm_reg_id = 1, | 954 | .prcm_reg_id = 1, |
@@ -1331,46 +968,12 @@ static struct omap_hwmod omap2430_dss_core_hwmod = { | |||
1331 | .flags = HWMOD_NO_IDLEST, | 968 | .flags = HWMOD_NO_IDLEST, |
1332 | }; | 969 | }; |
1333 | 970 | ||
1334 | /* | ||
1335 | * 'dispc' class | ||
1336 | * display controller | ||
1337 | */ | ||
1338 | |||
1339 | static struct omap_hwmod_class_sysconfig omap2430_dispc_sysc = { | ||
1340 | .rev_offs = 0x0000, | ||
1341 | .sysc_offs = 0x0010, | ||
1342 | .syss_offs = 0x0014, | ||
1343 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | | ||
1344 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1345 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
1346 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
1347 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1348 | }; | ||
1349 | |||
1350 | static struct omap_hwmod_class omap2430_dispc_hwmod_class = { | ||
1351 | .name = "dispc", | ||
1352 | .sysc = &omap2430_dispc_sysc, | ||
1353 | }; | ||
1354 | |||
1355 | static struct omap_hwmod_irq_info omap2430_dispc_irqs[] = { | ||
1356 | { .irq = 25 }, | ||
1357 | }; | ||
1358 | |||
1359 | static struct omap_hwmod_addr_space omap2430_dss_dispc_addrs[] = { | ||
1360 | { | ||
1361 | .pa_start = 0x48050400, | ||
1362 | .pa_end = 0x480507FF, | ||
1363 | .flags = ADDR_TYPE_RT | ||
1364 | }, | ||
1365 | }; | ||
1366 | |||
1367 | /* l4_core -> dss_dispc */ | 971 | /* l4_core -> dss_dispc */ |
1368 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = { | 972 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = { |
1369 | .master = &omap2430_l4_core_hwmod, | 973 | .master = &omap2430_l4_core_hwmod, |
1370 | .slave = &omap2430_dss_dispc_hwmod, | 974 | .slave = &omap2430_dss_dispc_hwmod, |
1371 | .clk = "dss_ick", | 975 | .clk = "dss_ick", |
1372 | .addr = omap2430_dss_dispc_addrs, | 976 | .addr = omap2_dss_dispc_addrs, |
1373 | .addr_cnt = ARRAY_SIZE(omap2430_dss_dispc_addrs), | ||
1374 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 977 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1375 | }; | 978 | }; |
1376 | 979 | ||
@@ -1381,9 +984,8 @@ static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = { | |||
1381 | 984 | ||
1382 | static struct omap_hwmod omap2430_dss_dispc_hwmod = { | 985 | static struct omap_hwmod omap2430_dss_dispc_hwmod = { |
1383 | .name = "dss_dispc", | 986 | .name = "dss_dispc", |
1384 | .class = &omap2430_dispc_hwmod_class, | 987 | .class = &omap2_dispc_hwmod_class, |
1385 | .mpu_irqs = omap2430_dispc_irqs, | 988 | .mpu_irqs = omap2_dispc_irqs, |
1386 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dispc_irqs), | ||
1387 | .main_clk = "dss1_fck", | 989 | .main_clk = "dss1_fck", |
1388 | .prcm = { | 990 | .prcm = { |
1389 | .omap2 = { | 991 | .omap2 = { |
@@ -1400,41 +1002,12 @@ static struct omap_hwmod omap2430_dss_dispc_hwmod = { | |||
1400 | .flags = HWMOD_NO_IDLEST, | 1002 | .flags = HWMOD_NO_IDLEST, |
1401 | }; | 1003 | }; |
1402 | 1004 | ||
1403 | /* | ||
1404 | * 'rfbi' class | ||
1405 | * remote frame buffer interface | ||
1406 | */ | ||
1407 | |||
1408 | static struct omap_hwmod_class_sysconfig omap2430_rfbi_sysc = { | ||
1409 | .rev_offs = 0x0000, | ||
1410 | .sysc_offs = 0x0010, | ||
1411 | .syss_offs = 0x0014, | ||
1412 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
1413 | SYSC_HAS_AUTOIDLE), | ||
1414 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1415 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1416 | }; | ||
1417 | |||
1418 | static struct omap_hwmod_class omap2430_rfbi_hwmod_class = { | ||
1419 | .name = "rfbi", | ||
1420 | .sysc = &omap2430_rfbi_sysc, | ||
1421 | }; | ||
1422 | |||
1423 | static struct omap_hwmod_addr_space omap2430_dss_rfbi_addrs[] = { | ||
1424 | { | ||
1425 | .pa_start = 0x48050800, | ||
1426 | .pa_end = 0x48050BFF, | ||
1427 | .flags = ADDR_TYPE_RT | ||
1428 | }, | ||
1429 | }; | ||
1430 | |||
1431 | /* l4_core -> dss_rfbi */ | 1005 | /* l4_core -> dss_rfbi */ |
1432 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = { | 1006 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = { |
1433 | .master = &omap2430_l4_core_hwmod, | 1007 | .master = &omap2430_l4_core_hwmod, |
1434 | .slave = &omap2430_dss_rfbi_hwmod, | 1008 | .slave = &omap2430_dss_rfbi_hwmod, |
1435 | .clk = "dss_ick", | 1009 | .clk = "dss_ick", |
1436 | .addr = omap2430_dss_rfbi_addrs, | 1010 | .addr = omap2_dss_rfbi_addrs, |
1437 | .addr_cnt = ARRAY_SIZE(omap2430_dss_rfbi_addrs), | ||
1438 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1011 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1439 | }; | 1012 | }; |
1440 | 1013 | ||
@@ -1445,7 +1018,7 @@ static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = { | |||
1445 | 1018 | ||
1446 | static struct omap_hwmod omap2430_dss_rfbi_hwmod = { | 1019 | static struct omap_hwmod omap2430_dss_rfbi_hwmod = { |
1447 | .name = "dss_rfbi", | 1020 | .name = "dss_rfbi", |
1448 | .class = &omap2430_rfbi_hwmod_class, | 1021 | .class = &omap2_rfbi_hwmod_class, |
1449 | .main_clk = "dss1_fck", | 1022 | .main_clk = "dss1_fck", |
1450 | .prcm = { | 1023 | .prcm = { |
1451 | .omap2 = { | 1024 | .omap2 = { |
@@ -1460,31 +1033,12 @@ static struct omap_hwmod omap2430_dss_rfbi_hwmod = { | |||
1460 | .flags = HWMOD_NO_IDLEST, | 1033 | .flags = HWMOD_NO_IDLEST, |
1461 | }; | 1034 | }; |
1462 | 1035 | ||
1463 | /* | ||
1464 | * 'venc' class | ||
1465 | * video encoder | ||
1466 | */ | ||
1467 | |||
1468 | static struct omap_hwmod_class omap2430_venc_hwmod_class = { | ||
1469 | .name = "venc", | ||
1470 | }; | ||
1471 | |||
1472 | /* dss_venc */ | ||
1473 | static struct omap_hwmod_addr_space omap2430_dss_venc_addrs[] = { | ||
1474 | { | ||
1475 | .pa_start = 0x48050C00, | ||
1476 | .pa_end = 0x48050FFF, | ||
1477 | .flags = ADDR_TYPE_RT | ||
1478 | }, | ||
1479 | }; | ||
1480 | |||
1481 | /* l4_core -> dss_venc */ | 1036 | /* l4_core -> dss_venc */ |
1482 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = { | 1037 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = { |
1483 | .master = &omap2430_l4_core_hwmod, | 1038 | .master = &omap2430_l4_core_hwmod, |
1484 | .slave = &omap2430_dss_venc_hwmod, | 1039 | .slave = &omap2430_dss_venc_hwmod, |
1485 | .clk = "dss_54m_fck", | 1040 | .clk = "dss_54m_fck", |
1486 | .addr = omap2430_dss_venc_addrs, | 1041 | .addr = omap2_dss_venc_addrs, |
1487 | .addr_cnt = ARRAY_SIZE(omap2430_dss_venc_addrs), | ||
1488 | .flags = OCPIF_SWSUP_IDLE, | 1042 | .flags = OCPIF_SWSUP_IDLE, |
1489 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1043 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1490 | }; | 1044 | }; |
@@ -1496,7 +1050,7 @@ static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = { | |||
1496 | 1050 | ||
1497 | static struct omap_hwmod omap2430_dss_venc_hwmod = { | 1051 | static struct omap_hwmod omap2430_dss_venc_hwmod = { |
1498 | .name = "dss_venc", | 1052 | .name = "dss_venc", |
1499 | .class = &omap2430_venc_hwmod_class, | 1053 | .class = &omap2_venc_hwmod_class, |
1500 | .main_clk = "dss1_fck", | 1054 | .main_clk = "dss1_fck", |
1501 | .prcm = { | 1055 | .prcm = { |
1502 | .omap2 = { | 1056 | .omap2 = { |
@@ -1532,25 +1086,14 @@ static struct omap_i2c_dev_attr i2c_dev_attr = { | |||
1532 | 1086 | ||
1533 | /* I2C1 */ | 1087 | /* I2C1 */ |
1534 | 1088 | ||
1535 | static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = { | ||
1536 | { .irq = INT_24XX_I2C1_IRQ, }, | ||
1537 | }; | ||
1538 | |||
1539 | static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = { | ||
1540 | { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX }, | ||
1541 | { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX }, | ||
1542 | }; | ||
1543 | |||
1544 | static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = { | 1089 | static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = { |
1545 | &omap2430_l4_core__i2c1, | 1090 | &omap2430_l4_core__i2c1, |
1546 | }; | 1091 | }; |
1547 | 1092 | ||
1548 | static struct omap_hwmod omap2430_i2c1_hwmod = { | 1093 | static struct omap_hwmod omap2430_i2c1_hwmod = { |
1549 | .name = "i2c1", | 1094 | .name = "i2c1", |
1550 | .mpu_irqs = i2c1_mpu_irqs, | 1095 | .mpu_irqs = omap2_i2c1_mpu_irqs, |
1551 | .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs), | 1096 | .sdma_reqs = omap2_i2c1_sdma_reqs, |
1552 | .sdma_reqs = i2c1_sdma_reqs, | ||
1553 | .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs), | ||
1554 | .main_clk = "i2chs1_fck", | 1097 | .main_clk = "i2chs1_fck", |
1555 | .prcm = { | 1098 | .prcm = { |
1556 | .omap2 = { | 1099 | .omap2 = { |
@@ -1578,25 +1121,14 @@ static struct omap_hwmod omap2430_i2c1_hwmod = { | |||
1578 | 1121 | ||
1579 | /* I2C2 */ | 1122 | /* I2C2 */ |
1580 | 1123 | ||
1581 | static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = { | ||
1582 | { .irq = INT_24XX_I2C2_IRQ, }, | ||
1583 | }; | ||
1584 | |||
1585 | static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = { | ||
1586 | { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX }, | ||
1587 | { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX }, | ||
1588 | }; | ||
1589 | |||
1590 | static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = { | 1124 | static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = { |
1591 | &omap2430_l4_core__i2c2, | 1125 | &omap2430_l4_core__i2c2, |
1592 | }; | 1126 | }; |
1593 | 1127 | ||
1594 | static struct omap_hwmod omap2430_i2c2_hwmod = { | 1128 | static struct omap_hwmod omap2430_i2c2_hwmod = { |
1595 | .name = "i2c2", | 1129 | .name = "i2c2", |
1596 | .mpu_irqs = i2c2_mpu_irqs, | 1130 | .mpu_irqs = omap2_i2c2_mpu_irqs, |
1597 | .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs), | 1131 | .sdma_reqs = omap2_i2c2_sdma_reqs, |
1598 | .sdma_reqs = i2c2_sdma_reqs, | ||
1599 | .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs), | ||
1600 | .main_clk = "i2chs2_fck", | 1132 | .main_clk = "i2chs2_fck", |
1601 | .prcm = { | 1133 | .prcm = { |
1602 | .omap2 = { | 1134 | .omap2 = { |
@@ -1621,6 +1153,7 @@ static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = { | |||
1621 | .pa_end = 0x4900C1ff, | 1153 | .pa_end = 0x4900C1ff, |
1622 | .flags = ADDR_TYPE_RT | 1154 | .flags = ADDR_TYPE_RT |
1623 | }, | 1155 | }, |
1156 | { } | ||
1624 | }; | 1157 | }; |
1625 | 1158 | ||
1626 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = { | 1159 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = { |
@@ -1628,7 +1161,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = { | |||
1628 | .slave = &omap2430_gpio1_hwmod, | 1161 | .slave = &omap2430_gpio1_hwmod, |
1629 | .clk = "gpios_ick", | 1162 | .clk = "gpios_ick", |
1630 | .addr = omap2430_gpio1_addr_space, | 1163 | .addr = omap2430_gpio1_addr_space, |
1631 | .addr_cnt = ARRAY_SIZE(omap2430_gpio1_addr_space), | ||
1632 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1164 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1633 | }; | 1165 | }; |
1634 | 1166 | ||
@@ -1639,6 +1171,7 @@ static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = { | |||
1639 | .pa_end = 0x4900E1ff, | 1171 | .pa_end = 0x4900E1ff, |
1640 | .flags = ADDR_TYPE_RT | 1172 | .flags = ADDR_TYPE_RT |
1641 | }, | 1173 | }, |
1174 | { } | ||
1642 | }; | 1175 | }; |
1643 | 1176 | ||
1644 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = { | 1177 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = { |
@@ -1646,7 +1179,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = { | |||
1646 | .slave = &omap2430_gpio2_hwmod, | 1179 | .slave = &omap2430_gpio2_hwmod, |
1647 | .clk = "gpios_ick", | 1180 | .clk = "gpios_ick", |
1648 | .addr = omap2430_gpio2_addr_space, | 1181 | .addr = omap2430_gpio2_addr_space, |
1649 | .addr_cnt = ARRAY_SIZE(omap2430_gpio2_addr_space), | ||
1650 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1182 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1651 | }; | 1183 | }; |
1652 | 1184 | ||
@@ -1657,6 +1189,7 @@ static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = { | |||
1657 | .pa_end = 0x490101ff, | 1189 | .pa_end = 0x490101ff, |
1658 | .flags = ADDR_TYPE_RT | 1190 | .flags = ADDR_TYPE_RT |
1659 | }, | 1191 | }, |
1192 | { } | ||
1660 | }; | 1193 | }; |
1661 | 1194 | ||
1662 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = { | 1195 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = { |
@@ -1664,7 +1197,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = { | |||
1664 | .slave = &omap2430_gpio3_hwmod, | 1197 | .slave = &omap2430_gpio3_hwmod, |
1665 | .clk = "gpios_ick", | 1198 | .clk = "gpios_ick", |
1666 | .addr = omap2430_gpio3_addr_space, | 1199 | .addr = omap2430_gpio3_addr_space, |
1667 | .addr_cnt = ARRAY_SIZE(omap2430_gpio3_addr_space), | ||
1668 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1200 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1669 | }; | 1201 | }; |
1670 | 1202 | ||
@@ -1675,6 +1207,7 @@ static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = { | |||
1675 | .pa_end = 0x490121ff, | 1207 | .pa_end = 0x490121ff, |
1676 | .flags = ADDR_TYPE_RT | 1208 | .flags = ADDR_TYPE_RT |
1677 | }, | 1209 | }, |
1210 | { } | ||
1678 | }; | 1211 | }; |
1679 | 1212 | ||
1680 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = { | 1213 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = { |
@@ -1682,7 +1215,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = { | |||
1682 | .slave = &omap2430_gpio4_hwmod, | 1215 | .slave = &omap2430_gpio4_hwmod, |
1683 | .clk = "gpios_ick", | 1216 | .clk = "gpios_ick", |
1684 | .addr = omap2430_gpio4_addr_space, | 1217 | .addr = omap2430_gpio4_addr_space, |
1685 | .addr_cnt = ARRAY_SIZE(omap2430_gpio4_addr_space), | ||
1686 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1218 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1687 | }; | 1219 | }; |
1688 | 1220 | ||
@@ -1693,6 +1225,7 @@ static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = { | |||
1693 | .pa_end = 0x480B61ff, | 1225 | .pa_end = 0x480B61ff, |
1694 | .flags = ADDR_TYPE_RT | 1226 | .flags = ADDR_TYPE_RT |
1695 | }, | 1227 | }, |
1228 | { } | ||
1696 | }; | 1229 | }; |
1697 | 1230 | ||
1698 | static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = { | 1231 | static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = { |
@@ -1700,7 +1233,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = { | |||
1700 | .slave = &omap2430_gpio5_hwmod, | 1233 | .slave = &omap2430_gpio5_hwmod, |
1701 | .clk = "gpio5_ick", | 1234 | .clk = "gpio5_ick", |
1702 | .addr = omap2430_gpio5_addr_space, | 1235 | .addr = omap2430_gpio5_addr_space, |
1703 | .addr_cnt = ARRAY_SIZE(omap2430_gpio5_addr_space), | ||
1704 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1236 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1705 | }; | 1237 | }; |
1706 | 1238 | ||
@@ -1710,32 +1242,7 @@ static struct omap_gpio_dev_attr gpio_dev_attr = { | |||
1710 | .dbck_flag = false, | 1242 | .dbck_flag = false, |
1711 | }; | 1243 | }; |
1712 | 1244 | ||
1713 | static struct omap_hwmod_class_sysconfig omap243x_gpio_sysc = { | ||
1714 | .rev_offs = 0x0000, | ||
1715 | .sysc_offs = 0x0010, | ||
1716 | .syss_offs = 0x0014, | ||
1717 | .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | | ||
1718 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | | ||
1719 | SYSS_HAS_RESET_STATUS), | ||
1720 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1721 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1722 | }; | ||
1723 | |||
1724 | /* | ||
1725 | * 'gpio' class | ||
1726 | * general purpose io module | ||
1727 | */ | ||
1728 | static struct omap_hwmod_class omap243x_gpio_hwmod_class = { | ||
1729 | .name = "gpio", | ||
1730 | .sysc = &omap243x_gpio_sysc, | ||
1731 | .rev = 0, | ||
1732 | }; | ||
1733 | |||
1734 | /* gpio1 */ | 1245 | /* gpio1 */ |
1735 | static struct omap_hwmod_irq_info omap243x_gpio1_irqs[] = { | ||
1736 | { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */ | ||
1737 | }; | ||
1738 | |||
1739 | static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = { | 1246 | static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = { |
1740 | &omap2430_l4_wkup__gpio1, | 1247 | &omap2430_l4_wkup__gpio1, |
1741 | }; | 1248 | }; |
@@ -1743,8 +1250,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = { | |||
1743 | static struct omap_hwmod omap2430_gpio1_hwmod = { | 1250 | static struct omap_hwmod omap2430_gpio1_hwmod = { |
1744 | .name = "gpio1", | 1251 | .name = "gpio1", |
1745 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1252 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
1746 | .mpu_irqs = omap243x_gpio1_irqs, | 1253 | .mpu_irqs = omap2_gpio1_irqs, |
1747 | .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio1_irqs), | ||
1748 | .main_clk = "gpios_fck", | 1254 | .main_clk = "gpios_fck", |
1749 | .prcm = { | 1255 | .prcm = { |
1750 | .omap2 = { | 1256 | .omap2 = { |
@@ -1757,16 +1263,12 @@ static struct omap_hwmod omap2430_gpio1_hwmod = { | |||
1757 | }, | 1263 | }, |
1758 | .slaves = omap2430_gpio1_slaves, | 1264 | .slaves = omap2430_gpio1_slaves, |
1759 | .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves), | 1265 | .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves), |
1760 | .class = &omap243x_gpio_hwmod_class, | 1266 | .class = &omap2xxx_gpio_hwmod_class, |
1761 | .dev_attr = &gpio_dev_attr, | 1267 | .dev_attr = &gpio_dev_attr, |
1762 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 1268 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
1763 | }; | 1269 | }; |
1764 | 1270 | ||
1765 | /* gpio2 */ | 1271 | /* gpio2 */ |
1766 | static struct omap_hwmod_irq_info omap243x_gpio2_irqs[] = { | ||
1767 | { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */ | ||
1768 | }; | ||
1769 | |||
1770 | static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = { | 1272 | static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = { |
1771 | &omap2430_l4_wkup__gpio2, | 1273 | &omap2430_l4_wkup__gpio2, |
1772 | }; | 1274 | }; |
@@ -1774,8 +1276,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = { | |||
1774 | static struct omap_hwmod omap2430_gpio2_hwmod = { | 1276 | static struct omap_hwmod omap2430_gpio2_hwmod = { |
1775 | .name = "gpio2", | 1277 | .name = "gpio2", |
1776 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1278 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
1777 | .mpu_irqs = omap243x_gpio2_irqs, | 1279 | .mpu_irqs = omap2_gpio2_irqs, |
1778 | .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio2_irqs), | ||
1779 | .main_clk = "gpios_fck", | 1280 | .main_clk = "gpios_fck", |
1780 | .prcm = { | 1281 | .prcm = { |
1781 | .omap2 = { | 1282 | .omap2 = { |
@@ -1788,16 +1289,12 @@ static struct omap_hwmod omap2430_gpio2_hwmod = { | |||
1788 | }, | 1289 | }, |
1789 | .slaves = omap2430_gpio2_slaves, | 1290 | .slaves = omap2430_gpio2_slaves, |
1790 | .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves), | 1291 | .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves), |
1791 | .class = &omap243x_gpio_hwmod_class, | 1292 | .class = &omap2xxx_gpio_hwmod_class, |
1792 | .dev_attr = &gpio_dev_attr, | 1293 | .dev_attr = &gpio_dev_attr, |
1793 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 1294 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
1794 | }; | 1295 | }; |
1795 | 1296 | ||
1796 | /* gpio3 */ | 1297 | /* gpio3 */ |
1797 | static struct omap_hwmod_irq_info omap243x_gpio3_irqs[] = { | ||
1798 | { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */ | ||
1799 | }; | ||
1800 | |||
1801 | static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = { | 1298 | static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = { |
1802 | &omap2430_l4_wkup__gpio3, | 1299 | &omap2430_l4_wkup__gpio3, |
1803 | }; | 1300 | }; |
@@ -1805,8 +1302,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = { | |||
1805 | static struct omap_hwmod omap2430_gpio3_hwmod = { | 1302 | static struct omap_hwmod omap2430_gpio3_hwmod = { |
1806 | .name = "gpio3", | 1303 | .name = "gpio3", |
1807 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1304 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
1808 | .mpu_irqs = omap243x_gpio3_irqs, | 1305 | .mpu_irqs = omap2_gpio3_irqs, |
1809 | .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio3_irqs), | ||
1810 | .main_clk = "gpios_fck", | 1306 | .main_clk = "gpios_fck", |
1811 | .prcm = { | 1307 | .prcm = { |
1812 | .omap2 = { | 1308 | .omap2 = { |
@@ -1819,16 +1315,12 @@ static struct omap_hwmod omap2430_gpio3_hwmod = { | |||
1819 | }, | 1315 | }, |
1820 | .slaves = omap2430_gpio3_slaves, | 1316 | .slaves = omap2430_gpio3_slaves, |
1821 | .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves), | 1317 | .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves), |
1822 | .class = &omap243x_gpio_hwmod_class, | 1318 | .class = &omap2xxx_gpio_hwmod_class, |
1823 | .dev_attr = &gpio_dev_attr, | 1319 | .dev_attr = &gpio_dev_attr, |
1824 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 1320 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
1825 | }; | 1321 | }; |
1826 | 1322 | ||
1827 | /* gpio4 */ | 1323 | /* gpio4 */ |
1828 | static struct omap_hwmod_irq_info omap243x_gpio4_irqs[] = { | ||
1829 | { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */ | ||
1830 | }; | ||
1831 | |||
1832 | static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = { | 1324 | static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = { |
1833 | &omap2430_l4_wkup__gpio4, | 1325 | &omap2430_l4_wkup__gpio4, |
1834 | }; | 1326 | }; |
@@ -1836,8 +1328,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = { | |||
1836 | static struct omap_hwmod omap2430_gpio4_hwmod = { | 1328 | static struct omap_hwmod omap2430_gpio4_hwmod = { |
1837 | .name = "gpio4", | 1329 | .name = "gpio4", |
1838 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1330 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
1839 | .mpu_irqs = omap243x_gpio4_irqs, | 1331 | .mpu_irqs = omap2_gpio4_irqs, |
1840 | .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio4_irqs), | ||
1841 | .main_clk = "gpios_fck", | 1332 | .main_clk = "gpios_fck", |
1842 | .prcm = { | 1333 | .prcm = { |
1843 | .omap2 = { | 1334 | .omap2 = { |
@@ -1850,7 +1341,7 @@ static struct omap_hwmod omap2430_gpio4_hwmod = { | |||
1850 | }, | 1341 | }, |
1851 | .slaves = omap2430_gpio4_slaves, | 1342 | .slaves = omap2430_gpio4_slaves, |
1852 | .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves), | 1343 | .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves), |
1853 | .class = &omap243x_gpio_hwmod_class, | 1344 | .class = &omap2xxx_gpio_hwmod_class, |
1854 | .dev_attr = &gpio_dev_attr, | 1345 | .dev_attr = &gpio_dev_attr, |
1855 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 1346 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
1856 | }; | 1347 | }; |
@@ -1858,6 +1349,7 @@ static struct omap_hwmod omap2430_gpio4_hwmod = { | |||
1858 | /* gpio5 */ | 1349 | /* gpio5 */ |
1859 | static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = { | 1350 | static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = { |
1860 | { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */ | 1351 | { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */ |
1352 | { .irq = -1 } | ||
1861 | }; | 1353 | }; |
1862 | 1354 | ||
1863 | static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = { | 1355 | static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = { |
@@ -1868,7 +1360,6 @@ static struct omap_hwmod omap2430_gpio5_hwmod = { | |||
1868 | .name = "gpio5", | 1360 | .name = "gpio5", |
1869 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1361 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
1870 | .mpu_irqs = omap243x_gpio5_irqs, | 1362 | .mpu_irqs = omap243x_gpio5_irqs, |
1871 | .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio5_irqs), | ||
1872 | .main_clk = "gpio5_fck", | 1363 | .main_clk = "gpio5_fck", |
1873 | .prcm = { | 1364 | .prcm = { |
1874 | .omap2 = { | 1365 | .omap2 = { |
@@ -1881,28 +1372,11 @@ static struct omap_hwmod omap2430_gpio5_hwmod = { | |||
1881 | }, | 1372 | }, |
1882 | .slaves = omap2430_gpio5_slaves, | 1373 | .slaves = omap2430_gpio5_slaves, |
1883 | .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves), | 1374 | .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves), |
1884 | .class = &omap243x_gpio_hwmod_class, | 1375 | .class = &omap2xxx_gpio_hwmod_class, |
1885 | .dev_attr = &gpio_dev_attr, | 1376 | .dev_attr = &gpio_dev_attr, |
1886 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 1377 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
1887 | }; | 1378 | }; |
1888 | 1379 | ||
1889 | /* dma_system */ | ||
1890 | static struct omap_hwmod_class_sysconfig omap2430_dma_sysc = { | ||
1891 | .rev_offs = 0x0000, | ||
1892 | .sysc_offs = 0x002c, | ||
1893 | .syss_offs = 0x0028, | ||
1894 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE | | ||
1895 | SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE | | ||
1896 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
1897 | .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
1898 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1899 | }; | ||
1900 | |||
1901 | static struct omap_hwmod_class omap2430_dma_hwmod_class = { | ||
1902 | .name = "dma", | ||
1903 | .sysc = &omap2430_dma_sysc, | ||
1904 | }; | ||
1905 | |||
1906 | /* dma attributes */ | 1380 | /* dma attributes */ |
1907 | static struct omap_dma_dev_attr dma_dev_attr = { | 1381 | static struct omap_dma_dev_attr dma_dev_attr = { |
1908 | .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | | 1382 | .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | |
@@ -1910,21 +1384,6 @@ static struct omap_dma_dev_attr dma_dev_attr = { | |||
1910 | .lch_count = 32, | 1384 | .lch_count = 32, |
1911 | }; | 1385 | }; |
1912 | 1386 | ||
1913 | static struct omap_hwmod_irq_info omap2430_dma_system_irqs[] = { | ||
1914 | { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */ | ||
1915 | { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */ | ||
1916 | { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */ | ||
1917 | { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */ | ||
1918 | }; | ||
1919 | |||
1920 | static struct omap_hwmod_addr_space omap2430_dma_system_addrs[] = { | ||
1921 | { | ||
1922 | .pa_start = 0x48056000, | ||
1923 | .pa_end = 0x48056fff, | ||
1924 | .flags = ADDR_TYPE_RT | ||
1925 | }, | ||
1926 | }; | ||
1927 | |||
1928 | /* dma_system -> L3 */ | 1387 | /* dma_system -> L3 */ |
1929 | static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = { | 1388 | static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = { |
1930 | .master = &omap2430_dma_system_hwmod, | 1389 | .master = &omap2430_dma_system_hwmod, |
@@ -1943,8 +1402,7 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = { | |||
1943 | .master = &omap2430_l4_core_hwmod, | 1402 | .master = &omap2430_l4_core_hwmod, |
1944 | .slave = &omap2430_dma_system_hwmod, | 1403 | .slave = &omap2430_dma_system_hwmod, |
1945 | .clk = "sdma_ick", | 1404 | .clk = "sdma_ick", |
1946 | .addr = omap2430_dma_system_addrs, | 1405 | .addr = omap2_dma_system_addrs, |
1947 | .addr_cnt = ARRAY_SIZE(omap2430_dma_system_addrs), | ||
1948 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1406 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1949 | }; | 1407 | }; |
1950 | 1408 | ||
@@ -1955,9 +1413,8 @@ static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = { | |||
1955 | 1413 | ||
1956 | static struct omap_hwmod omap2430_dma_system_hwmod = { | 1414 | static struct omap_hwmod omap2430_dma_system_hwmod = { |
1957 | .name = "dma", | 1415 | .name = "dma", |
1958 | .class = &omap2430_dma_hwmod_class, | 1416 | .class = &omap2xxx_dma_hwmod_class, |
1959 | .mpu_irqs = omap2430_dma_system_irqs, | 1417 | .mpu_irqs = omap2_dma_system_irqs, |
1960 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dma_system_irqs), | ||
1961 | .main_clk = "core_l3_ck", | 1418 | .main_clk = "core_l3_ck", |
1962 | .slaves = omap2430_dma_system_slaves, | 1419 | .slaves = omap2430_dma_system_slaves, |
1963 | .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves), | 1420 | .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves), |
@@ -1968,47 +1425,18 @@ static struct omap_hwmod omap2430_dma_system_hwmod = { | |||
1968 | .flags = HWMOD_NO_IDLEST, | 1425 | .flags = HWMOD_NO_IDLEST, |
1969 | }; | 1426 | }; |
1970 | 1427 | ||
1971 | /* | ||
1972 | * 'mailbox' class | ||
1973 | * mailbox module allowing communication between the on-chip processors | ||
1974 | * using a queued mailbox-interrupt mechanism. | ||
1975 | */ | ||
1976 | |||
1977 | static struct omap_hwmod_class_sysconfig omap2430_mailbox_sysc = { | ||
1978 | .rev_offs = 0x000, | ||
1979 | .sysc_offs = 0x010, | ||
1980 | .syss_offs = 0x014, | ||
1981 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
1982 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1983 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1984 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1985 | }; | ||
1986 | |||
1987 | static struct omap_hwmod_class omap2430_mailbox_hwmod_class = { | ||
1988 | .name = "mailbox", | ||
1989 | .sysc = &omap2430_mailbox_sysc, | ||
1990 | }; | ||
1991 | |||
1992 | /* mailbox */ | 1428 | /* mailbox */ |
1993 | static struct omap_hwmod omap2430_mailbox_hwmod; | 1429 | static struct omap_hwmod omap2430_mailbox_hwmod; |
1994 | static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = { | 1430 | static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = { |
1995 | { .irq = 26 }, | 1431 | { .irq = 26 }, |
1996 | }; | 1432 | { .irq = -1 } |
1997 | |||
1998 | static struct omap_hwmod_addr_space omap2430_mailbox_addrs[] = { | ||
1999 | { | ||
2000 | .pa_start = 0x48094000, | ||
2001 | .pa_end = 0x480941ff, | ||
2002 | .flags = ADDR_TYPE_RT, | ||
2003 | }, | ||
2004 | }; | 1433 | }; |
2005 | 1434 | ||
2006 | /* l4_core -> mailbox */ | 1435 | /* l4_core -> mailbox */ |
2007 | static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = { | 1436 | static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = { |
2008 | .master = &omap2430_l4_core_hwmod, | 1437 | .master = &omap2430_l4_core_hwmod, |
2009 | .slave = &omap2430_mailbox_hwmod, | 1438 | .slave = &omap2430_mailbox_hwmod, |
2010 | .addr = omap2430_mailbox_addrs, | 1439 | .addr = omap2_mailbox_addrs, |
2011 | .addr_cnt = ARRAY_SIZE(omap2430_mailbox_addrs), | ||
2012 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1440 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2013 | }; | 1441 | }; |
2014 | 1442 | ||
@@ -2019,9 +1447,8 @@ static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = { | |||
2019 | 1447 | ||
2020 | static struct omap_hwmod omap2430_mailbox_hwmod = { | 1448 | static struct omap_hwmod omap2430_mailbox_hwmod = { |
2021 | .name = "mailbox", | 1449 | .name = "mailbox", |
2022 | .class = &omap2430_mailbox_hwmod_class, | 1450 | .class = &omap2xxx_mailbox_hwmod_class, |
2023 | .mpu_irqs = omap2430_mailbox_irqs, | 1451 | .mpu_irqs = omap2430_mailbox_irqs, |
2024 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mailbox_irqs), | ||
2025 | .main_clk = "mailboxes_ick", | 1452 | .main_clk = "mailboxes_ick", |
2026 | .prcm = { | 1453 | .prcm = { |
2027 | .omap2 = { | 1454 | .omap2 = { |
@@ -2037,45 +1464,7 @@ static struct omap_hwmod omap2430_mailbox_hwmod = { | |||
2037 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 1464 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
2038 | }; | 1465 | }; |
2039 | 1466 | ||
2040 | /* | ||
2041 | * 'mcspi' class | ||
2042 | * multichannel serial port interface (mcspi) / master/slave synchronous serial | ||
2043 | * bus | ||
2044 | */ | ||
2045 | |||
2046 | static struct omap_hwmod_class_sysconfig omap2430_mcspi_sysc = { | ||
2047 | .rev_offs = 0x0000, | ||
2048 | .sysc_offs = 0x0010, | ||
2049 | .syss_offs = 0x0014, | ||
2050 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
2051 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
2052 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
2053 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
2054 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
2055 | }; | ||
2056 | |||
2057 | static struct omap_hwmod_class omap2430_mcspi_class = { | ||
2058 | .name = "mcspi", | ||
2059 | .sysc = &omap2430_mcspi_sysc, | ||
2060 | .rev = OMAP2_MCSPI_REV, | ||
2061 | }; | ||
2062 | |||
2063 | /* mcspi1 */ | 1467 | /* mcspi1 */ |
2064 | static struct omap_hwmod_irq_info omap2430_mcspi1_mpu_irqs[] = { | ||
2065 | { .irq = 65 }, | ||
2066 | }; | ||
2067 | |||
2068 | static struct omap_hwmod_dma_info omap2430_mcspi1_sdma_reqs[] = { | ||
2069 | { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */ | ||
2070 | { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */ | ||
2071 | { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */ | ||
2072 | { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */ | ||
2073 | { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */ | ||
2074 | { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */ | ||
2075 | { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */ | ||
2076 | { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */ | ||
2077 | }; | ||
2078 | |||
2079 | static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = { | 1468 | static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = { |
2080 | &omap2430_l4_core__mcspi1, | 1469 | &omap2430_l4_core__mcspi1, |
2081 | }; | 1470 | }; |
@@ -2086,10 +1475,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { | |||
2086 | 1475 | ||
2087 | static struct omap_hwmod omap2430_mcspi1_hwmod = { | 1476 | static struct omap_hwmod omap2430_mcspi1_hwmod = { |
2088 | .name = "mcspi1_hwmod", | 1477 | .name = "mcspi1_hwmod", |
2089 | .mpu_irqs = omap2430_mcspi1_mpu_irqs, | 1478 | .mpu_irqs = omap2_mcspi1_mpu_irqs, |
2090 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi1_mpu_irqs), | 1479 | .sdma_reqs = omap2_mcspi1_sdma_reqs, |
2091 | .sdma_reqs = omap2430_mcspi1_sdma_reqs, | ||
2092 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi1_sdma_reqs), | ||
2093 | .main_clk = "mcspi1_fck", | 1480 | .main_clk = "mcspi1_fck", |
2094 | .prcm = { | 1481 | .prcm = { |
2095 | .omap2 = { | 1482 | .omap2 = { |
@@ -2102,23 +1489,12 @@ static struct omap_hwmod omap2430_mcspi1_hwmod = { | |||
2102 | }, | 1489 | }, |
2103 | .slaves = omap2430_mcspi1_slaves, | 1490 | .slaves = omap2430_mcspi1_slaves, |
2104 | .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves), | 1491 | .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves), |
2105 | .class = &omap2430_mcspi_class, | 1492 | .class = &omap2xxx_mcspi_class, |
2106 | .dev_attr = &omap_mcspi1_dev_attr, | 1493 | .dev_attr = &omap_mcspi1_dev_attr, |
2107 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 1494 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
2108 | }; | 1495 | }; |
2109 | 1496 | ||
2110 | /* mcspi2 */ | 1497 | /* mcspi2 */ |
2111 | static struct omap_hwmod_irq_info omap2430_mcspi2_mpu_irqs[] = { | ||
2112 | { .irq = 66 }, | ||
2113 | }; | ||
2114 | |||
2115 | static struct omap_hwmod_dma_info omap2430_mcspi2_sdma_reqs[] = { | ||
2116 | { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */ | ||
2117 | { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */ | ||
2118 | { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */ | ||
2119 | { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */ | ||
2120 | }; | ||
2121 | |||
2122 | static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = { | 1498 | static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = { |
2123 | &omap2430_l4_core__mcspi2, | 1499 | &omap2430_l4_core__mcspi2, |
2124 | }; | 1500 | }; |
@@ -2129,10 +1505,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { | |||
2129 | 1505 | ||
2130 | static struct omap_hwmod omap2430_mcspi2_hwmod = { | 1506 | static struct omap_hwmod omap2430_mcspi2_hwmod = { |
2131 | .name = "mcspi2_hwmod", | 1507 | .name = "mcspi2_hwmod", |
2132 | .mpu_irqs = omap2430_mcspi2_mpu_irqs, | 1508 | .mpu_irqs = omap2_mcspi2_mpu_irqs, |
2133 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi2_mpu_irqs), | 1509 | .sdma_reqs = omap2_mcspi2_sdma_reqs, |
2134 | .sdma_reqs = omap2430_mcspi2_sdma_reqs, | ||
2135 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi2_sdma_reqs), | ||
2136 | .main_clk = "mcspi2_fck", | 1510 | .main_clk = "mcspi2_fck", |
2137 | .prcm = { | 1511 | .prcm = { |
2138 | .omap2 = { | 1512 | .omap2 = { |
@@ -2145,14 +1519,15 @@ static struct omap_hwmod omap2430_mcspi2_hwmod = { | |||
2145 | }, | 1519 | }, |
2146 | .slaves = omap2430_mcspi2_slaves, | 1520 | .slaves = omap2430_mcspi2_slaves, |
2147 | .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves), | 1521 | .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves), |
2148 | .class = &omap2430_mcspi_class, | 1522 | .class = &omap2xxx_mcspi_class, |
2149 | .dev_attr = &omap_mcspi2_dev_attr, | 1523 | .dev_attr = &omap_mcspi2_dev_attr, |
2150 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 1524 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
2151 | }; | 1525 | }; |
2152 | 1526 | ||
2153 | /* mcspi3 */ | 1527 | /* mcspi3 */ |
2154 | static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = { | 1528 | static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = { |
2155 | { .irq = 91 }, | 1529 | { .irq = 91 }, |
1530 | { .irq = -1 } | ||
2156 | }; | 1531 | }; |
2157 | 1532 | ||
2158 | static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = { | 1533 | static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = { |
@@ -2160,6 +1535,7 @@ static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = { | |||
2160 | { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */ | 1535 | { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */ |
2161 | { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */ | 1536 | { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */ |
2162 | { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */ | 1537 | { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */ |
1538 | { .dma_req = -1 } | ||
2163 | }; | 1539 | }; |
2164 | 1540 | ||
2165 | static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = { | 1541 | static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = { |
@@ -2173,9 +1549,7 @@ static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = { | |||
2173 | static struct omap_hwmod omap2430_mcspi3_hwmod = { | 1549 | static struct omap_hwmod omap2430_mcspi3_hwmod = { |
2174 | .name = "mcspi3_hwmod", | 1550 | .name = "mcspi3_hwmod", |
2175 | .mpu_irqs = omap2430_mcspi3_mpu_irqs, | 1551 | .mpu_irqs = omap2430_mcspi3_mpu_irqs, |
2176 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi3_mpu_irqs), | ||
2177 | .sdma_reqs = omap2430_mcspi3_sdma_reqs, | 1552 | .sdma_reqs = omap2430_mcspi3_sdma_reqs, |
2178 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi3_sdma_reqs), | ||
2179 | .main_clk = "mcspi3_fck", | 1553 | .main_clk = "mcspi3_fck", |
2180 | .prcm = { | 1554 | .prcm = { |
2181 | .omap2 = { | 1555 | .omap2 = { |
@@ -2188,8 +1562,8 @@ static struct omap_hwmod omap2430_mcspi3_hwmod = { | |||
2188 | }, | 1562 | }, |
2189 | .slaves = omap2430_mcspi3_slaves, | 1563 | .slaves = omap2430_mcspi3_slaves, |
2190 | .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves), | 1564 | .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves), |
2191 | .class = &omap2430_mcspi_class, | 1565 | .class = &omap2xxx_mcspi_class, |
2192 | .dev_attr = &omap_mcspi3_dev_attr, | 1566 | .dev_attr = &omap_mcspi3_dev_attr, |
2193 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 1567 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
2194 | }; | 1568 | }; |
2195 | 1569 | ||
@@ -2218,12 +1592,12 @@ static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = { | |||
2218 | 1592 | ||
2219 | { .name = "mc", .irq = 92 }, | 1593 | { .name = "mc", .irq = 92 }, |
2220 | { .name = "dma", .irq = 93 }, | 1594 | { .name = "dma", .irq = 93 }, |
1595 | { .irq = -1 } | ||
2221 | }; | 1596 | }; |
2222 | 1597 | ||
2223 | static struct omap_hwmod omap2430_usbhsotg_hwmod = { | 1598 | static struct omap_hwmod omap2430_usbhsotg_hwmod = { |
2224 | .name = "usb_otg_hs", | 1599 | .name = "usb_otg_hs", |
2225 | .mpu_irqs = omap2430_usbhsotg_mpu_irqs, | 1600 | .mpu_irqs = omap2430_usbhsotg_mpu_irqs, |
2226 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_usbhsotg_mpu_irqs), | ||
2227 | .main_clk = "usbhs_ick", | 1601 | .main_clk = "usbhs_ick", |
2228 | .prcm = { | 1602 | .prcm = { |
2229 | .omap2 = { | 1603 | .omap2 = { |
@@ -2273,20 +1647,7 @@ static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = { | |||
2273 | { .name = "rx", .irq = 60 }, | 1647 | { .name = "rx", .irq = 60 }, |
2274 | { .name = "ovr", .irq = 61 }, | 1648 | { .name = "ovr", .irq = 61 }, |
2275 | { .name = "common", .irq = 64 }, | 1649 | { .name = "common", .irq = 64 }, |
2276 | }; | 1650 | { .irq = -1 } |
2277 | |||
2278 | static struct omap_hwmod_dma_info omap2430_mcbsp1_sdma_chs[] = { | ||
2279 | { .name = "rx", .dma_req = 32 }, | ||
2280 | { .name = "tx", .dma_req = 31 }, | ||
2281 | }; | ||
2282 | |||
2283 | static struct omap_hwmod_addr_space omap2430_mcbsp1_addrs[] = { | ||
2284 | { | ||
2285 | .name = "mpu", | ||
2286 | .pa_start = 0x48074000, | ||
2287 | .pa_end = 0x480740ff, | ||
2288 | .flags = ADDR_TYPE_RT | ||
2289 | }, | ||
2290 | }; | 1651 | }; |
2291 | 1652 | ||
2292 | /* l4_core -> mcbsp1 */ | 1653 | /* l4_core -> mcbsp1 */ |
@@ -2294,8 +1655,7 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = { | |||
2294 | .master = &omap2430_l4_core_hwmod, | 1655 | .master = &omap2430_l4_core_hwmod, |
2295 | .slave = &omap2430_mcbsp1_hwmod, | 1656 | .slave = &omap2430_mcbsp1_hwmod, |
2296 | .clk = "mcbsp1_ick", | 1657 | .clk = "mcbsp1_ick", |
2297 | .addr = omap2430_mcbsp1_addrs, | 1658 | .addr = omap2_mcbsp1_addrs, |
2298 | .addr_cnt = ARRAY_SIZE(omap2430_mcbsp1_addrs), | ||
2299 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1659 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2300 | }; | 1660 | }; |
2301 | 1661 | ||
@@ -2308,9 +1668,7 @@ static struct omap_hwmod omap2430_mcbsp1_hwmod = { | |||
2308 | .name = "mcbsp1", | 1668 | .name = "mcbsp1", |
2309 | .class = &omap2430_mcbsp_hwmod_class, | 1669 | .class = &omap2430_mcbsp_hwmod_class, |
2310 | .mpu_irqs = omap2430_mcbsp1_irqs, | 1670 | .mpu_irqs = omap2430_mcbsp1_irqs, |
2311 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_irqs), | 1671 | .sdma_reqs = omap2_mcbsp1_sdma_reqs, |
2312 | .sdma_reqs = omap2430_mcbsp1_sdma_chs, | ||
2313 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_sdma_chs), | ||
2314 | .main_clk = "mcbsp1_fck", | 1672 | .main_clk = "mcbsp1_fck", |
2315 | .prcm = { | 1673 | .prcm = { |
2316 | .omap2 = { | 1674 | .omap2 = { |
@@ -2331,20 +1689,7 @@ static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = { | |||
2331 | { .name = "tx", .irq = 62 }, | 1689 | { .name = "tx", .irq = 62 }, |
2332 | { .name = "rx", .irq = 63 }, | 1690 | { .name = "rx", .irq = 63 }, |
2333 | { .name = "common", .irq = 16 }, | 1691 | { .name = "common", .irq = 16 }, |
2334 | }; | 1692 | { .irq = -1 } |
2335 | |||
2336 | static struct omap_hwmod_dma_info omap2430_mcbsp2_sdma_chs[] = { | ||
2337 | { .name = "rx", .dma_req = 34 }, | ||
2338 | { .name = "tx", .dma_req = 33 }, | ||
2339 | }; | ||
2340 | |||
2341 | static struct omap_hwmod_addr_space omap2430_mcbsp2_addrs[] = { | ||
2342 | { | ||
2343 | .name = "mpu", | ||
2344 | .pa_start = 0x48076000, | ||
2345 | .pa_end = 0x480760ff, | ||
2346 | .flags = ADDR_TYPE_RT | ||
2347 | }, | ||
2348 | }; | 1693 | }; |
2349 | 1694 | ||
2350 | /* l4_core -> mcbsp2 */ | 1695 | /* l4_core -> mcbsp2 */ |
@@ -2352,8 +1697,7 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = { | |||
2352 | .master = &omap2430_l4_core_hwmod, | 1697 | .master = &omap2430_l4_core_hwmod, |
2353 | .slave = &omap2430_mcbsp2_hwmod, | 1698 | .slave = &omap2430_mcbsp2_hwmod, |
2354 | .clk = "mcbsp2_ick", | 1699 | .clk = "mcbsp2_ick", |
2355 | .addr = omap2430_mcbsp2_addrs, | 1700 | .addr = omap2xxx_mcbsp2_addrs, |
2356 | .addr_cnt = ARRAY_SIZE(omap2430_mcbsp2_addrs), | ||
2357 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1701 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2358 | }; | 1702 | }; |
2359 | 1703 | ||
@@ -2366,9 +1710,7 @@ static struct omap_hwmod omap2430_mcbsp2_hwmod = { | |||
2366 | .name = "mcbsp2", | 1710 | .name = "mcbsp2", |
2367 | .class = &omap2430_mcbsp_hwmod_class, | 1711 | .class = &omap2430_mcbsp_hwmod_class, |
2368 | .mpu_irqs = omap2430_mcbsp2_irqs, | 1712 | .mpu_irqs = omap2430_mcbsp2_irqs, |
2369 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_irqs), | 1713 | .sdma_reqs = omap2_mcbsp2_sdma_reqs, |
2370 | .sdma_reqs = omap2430_mcbsp2_sdma_chs, | ||
2371 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_sdma_chs), | ||
2372 | .main_clk = "mcbsp2_fck", | 1714 | .main_clk = "mcbsp2_fck", |
2373 | .prcm = { | 1715 | .prcm = { |
2374 | .omap2 = { | 1716 | .omap2 = { |
@@ -2389,11 +1731,7 @@ static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = { | |||
2389 | { .name = "tx", .irq = 89 }, | 1731 | { .name = "tx", .irq = 89 }, |
2390 | { .name = "rx", .irq = 90 }, | 1732 | { .name = "rx", .irq = 90 }, |
2391 | { .name = "common", .irq = 17 }, | 1733 | { .name = "common", .irq = 17 }, |
2392 | }; | 1734 | { .irq = -1 } |
2393 | |||
2394 | static struct omap_hwmod_dma_info omap2430_mcbsp3_sdma_chs[] = { | ||
2395 | { .name = "rx", .dma_req = 18 }, | ||
2396 | { .name = "tx", .dma_req = 17 }, | ||
2397 | }; | 1735 | }; |
2398 | 1736 | ||
2399 | static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = { | 1737 | static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = { |
@@ -2403,6 +1741,7 @@ static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = { | |||
2403 | .pa_end = 0x4808C0ff, | 1741 | .pa_end = 0x4808C0ff, |
2404 | .flags = ADDR_TYPE_RT | 1742 | .flags = ADDR_TYPE_RT |
2405 | }, | 1743 | }, |
1744 | { } | ||
2406 | }; | 1745 | }; |
2407 | 1746 | ||
2408 | /* l4_core -> mcbsp3 */ | 1747 | /* l4_core -> mcbsp3 */ |
@@ -2411,7 +1750,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = { | |||
2411 | .slave = &omap2430_mcbsp3_hwmod, | 1750 | .slave = &omap2430_mcbsp3_hwmod, |
2412 | .clk = "mcbsp3_ick", | 1751 | .clk = "mcbsp3_ick", |
2413 | .addr = omap2430_mcbsp3_addrs, | 1752 | .addr = omap2430_mcbsp3_addrs, |
2414 | .addr_cnt = ARRAY_SIZE(omap2430_mcbsp3_addrs), | ||
2415 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1753 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2416 | }; | 1754 | }; |
2417 | 1755 | ||
@@ -2424,9 +1762,7 @@ static struct omap_hwmod omap2430_mcbsp3_hwmod = { | |||
2424 | .name = "mcbsp3", | 1762 | .name = "mcbsp3", |
2425 | .class = &omap2430_mcbsp_hwmod_class, | 1763 | .class = &omap2430_mcbsp_hwmod_class, |
2426 | .mpu_irqs = omap2430_mcbsp3_irqs, | 1764 | .mpu_irqs = omap2430_mcbsp3_irqs, |
2427 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_irqs), | 1765 | .sdma_reqs = omap2_mcbsp3_sdma_reqs, |
2428 | .sdma_reqs = omap2430_mcbsp3_sdma_chs, | ||
2429 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_sdma_chs), | ||
2430 | .main_clk = "mcbsp3_fck", | 1766 | .main_clk = "mcbsp3_fck", |
2431 | .prcm = { | 1767 | .prcm = { |
2432 | .omap2 = { | 1768 | .omap2 = { |
@@ -2447,11 +1783,13 @@ static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = { | |||
2447 | { .name = "tx", .irq = 54 }, | 1783 | { .name = "tx", .irq = 54 }, |
2448 | { .name = "rx", .irq = 55 }, | 1784 | { .name = "rx", .irq = 55 }, |
2449 | { .name = "common", .irq = 18 }, | 1785 | { .name = "common", .irq = 18 }, |
1786 | { .irq = -1 } | ||
2450 | }; | 1787 | }; |
2451 | 1788 | ||
2452 | static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = { | 1789 | static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = { |
2453 | { .name = "rx", .dma_req = 20 }, | 1790 | { .name = "rx", .dma_req = 20 }, |
2454 | { .name = "tx", .dma_req = 19 }, | 1791 | { .name = "tx", .dma_req = 19 }, |
1792 | { .dma_req = -1 } | ||
2455 | }; | 1793 | }; |
2456 | 1794 | ||
2457 | static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = { | 1795 | static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = { |
@@ -2461,6 +1799,7 @@ static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = { | |||
2461 | .pa_end = 0x4808E0ff, | 1799 | .pa_end = 0x4808E0ff, |
2462 | .flags = ADDR_TYPE_RT | 1800 | .flags = ADDR_TYPE_RT |
2463 | }, | 1801 | }, |
1802 | { } | ||
2464 | }; | 1803 | }; |
2465 | 1804 | ||
2466 | /* l4_core -> mcbsp4 */ | 1805 | /* l4_core -> mcbsp4 */ |
@@ -2469,7 +1808,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = { | |||
2469 | .slave = &omap2430_mcbsp4_hwmod, | 1808 | .slave = &omap2430_mcbsp4_hwmod, |
2470 | .clk = "mcbsp4_ick", | 1809 | .clk = "mcbsp4_ick", |
2471 | .addr = omap2430_mcbsp4_addrs, | 1810 | .addr = omap2430_mcbsp4_addrs, |
2472 | .addr_cnt = ARRAY_SIZE(omap2430_mcbsp4_addrs), | ||
2473 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1811 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2474 | }; | 1812 | }; |
2475 | 1813 | ||
@@ -2482,9 +1820,7 @@ static struct omap_hwmod omap2430_mcbsp4_hwmod = { | |||
2482 | .name = "mcbsp4", | 1820 | .name = "mcbsp4", |
2483 | .class = &omap2430_mcbsp_hwmod_class, | 1821 | .class = &omap2430_mcbsp_hwmod_class, |
2484 | .mpu_irqs = omap2430_mcbsp4_irqs, | 1822 | .mpu_irqs = omap2430_mcbsp4_irqs, |
2485 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_irqs), | ||
2486 | .sdma_reqs = omap2430_mcbsp4_sdma_chs, | 1823 | .sdma_reqs = omap2430_mcbsp4_sdma_chs, |
2487 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_sdma_chs), | ||
2488 | .main_clk = "mcbsp4_fck", | 1824 | .main_clk = "mcbsp4_fck", |
2489 | .prcm = { | 1825 | .prcm = { |
2490 | .omap2 = { | 1826 | .omap2 = { |
@@ -2505,11 +1841,13 @@ static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = { | |||
2505 | { .name = "tx", .irq = 81 }, | 1841 | { .name = "tx", .irq = 81 }, |
2506 | { .name = "rx", .irq = 82 }, | 1842 | { .name = "rx", .irq = 82 }, |
2507 | { .name = "common", .irq = 19 }, | 1843 | { .name = "common", .irq = 19 }, |
1844 | { .irq = -1 } | ||
2508 | }; | 1845 | }; |
2509 | 1846 | ||
2510 | static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = { | 1847 | static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = { |
2511 | { .name = "rx", .dma_req = 22 }, | 1848 | { .name = "rx", .dma_req = 22 }, |
2512 | { .name = "tx", .dma_req = 21 }, | 1849 | { .name = "tx", .dma_req = 21 }, |
1850 | { .dma_req = -1 } | ||
2513 | }; | 1851 | }; |
2514 | 1852 | ||
2515 | static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = { | 1853 | static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = { |
@@ -2519,6 +1857,7 @@ static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = { | |||
2519 | .pa_end = 0x480960ff, | 1857 | .pa_end = 0x480960ff, |
2520 | .flags = ADDR_TYPE_RT | 1858 | .flags = ADDR_TYPE_RT |
2521 | }, | 1859 | }, |
1860 | { } | ||
2522 | }; | 1861 | }; |
2523 | 1862 | ||
2524 | /* l4_core -> mcbsp5 */ | 1863 | /* l4_core -> mcbsp5 */ |
@@ -2527,7 +1866,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = { | |||
2527 | .slave = &omap2430_mcbsp5_hwmod, | 1866 | .slave = &omap2430_mcbsp5_hwmod, |
2528 | .clk = "mcbsp5_ick", | 1867 | .clk = "mcbsp5_ick", |
2529 | .addr = omap2430_mcbsp5_addrs, | 1868 | .addr = omap2430_mcbsp5_addrs, |
2530 | .addr_cnt = ARRAY_SIZE(omap2430_mcbsp5_addrs), | ||
2531 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1869 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2532 | }; | 1870 | }; |
2533 | 1871 | ||
@@ -2540,9 +1878,7 @@ static struct omap_hwmod omap2430_mcbsp5_hwmod = { | |||
2540 | .name = "mcbsp5", | 1878 | .name = "mcbsp5", |
2541 | .class = &omap2430_mcbsp_hwmod_class, | 1879 | .class = &omap2430_mcbsp_hwmod_class, |
2542 | .mpu_irqs = omap2430_mcbsp5_irqs, | 1880 | .mpu_irqs = omap2430_mcbsp5_irqs, |
2543 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_irqs), | ||
2544 | .sdma_reqs = omap2430_mcbsp5_sdma_chs, | 1881 | .sdma_reqs = omap2430_mcbsp5_sdma_chs, |
2545 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_sdma_chs), | ||
2546 | .main_clk = "mcbsp5_fck", | 1882 | .main_clk = "mcbsp5_fck", |
2547 | .prcm = { | 1883 | .prcm = { |
2548 | .omap2 = { | 1884 | .omap2 = { |
@@ -2580,11 +1916,13 @@ static struct omap_hwmod_class omap2430_mmc_class = { | |||
2580 | 1916 | ||
2581 | static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = { | 1917 | static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = { |
2582 | { .irq = 83 }, | 1918 | { .irq = 83 }, |
1919 | { .irq = -1 } | ||
2583 | }; | 1920 | }; |
2584 | 1921 | ||
2585 | static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = { | 1922 | static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = { |
2586 | { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */ | 1923 | { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */ |
2587 | { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */ | 1924 | { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */ |
1925 | { .dma_req = -1 } | ||
2588 | }; | 1926 | }; |
2589 | 1927 | ||
2590 | static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = { | 1928 | static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = { |
@@ -2603,9 +1941,7 @@ static struct omap_hwmod omap2430_mmc1_hwmod = { | |||
2603 | .name = "mmc1", | 1941 | .name = "mmc1", |
2604 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1942 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
2605 | .mpu_irqs = omap2430_mmc1_mpu_irqs, | 1943 | .mpu_irqs = omap2430_mmc1_mpu_irqs, |
2606 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mmc1_mpu_irqs), | ||
2607 | .sdma_reqs = omap2430_mmc1_sdma_reqs, | 1944 | .sdma_reqs = omap2430_mmc1_sdma_reqs, |
2608 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc1_sdma_reqs), | ||
2609 | .opt_clks = omap2430_mmc1_opt_clks, | 1945 | .opt_clks = omap2430_mmc1_opt_clks, |
2610 | .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks), | 1946 | .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks), |
2611 | .main_clk = "mmchs1_fck", | 1947 | .main_clk = "mmchs1_fck", |
@@ -2629,11 +1965,13 @@ static struct omap_hwmod omap2430_mmc1_hwmod = { | |||
2629 | 1965 | ||
2630 | static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = { | 1966 | static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = { |
2631 | { .irq = 86 }, | 1967 | { .irq = 86 }, |
1968 | { .irq = -1 } | ||
2632 | }; | 1969 | }; |
2633 | 1970 | ||
2634 | static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = { | 1971 | static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = { |
2635 | { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */ | 1972 | { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */ |
2636 | { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */ | 1973 | { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */ |
1974 | { .dma_req = -1 } | ||
2637 | }; | 1975 | }; |
2638 | 1976 | ||
2639 | static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = { | 1977 | static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = { |
@@ -2648,9 +1986,7 @@ static struct omap_hwmod omap2430_mmc2_hwmod = { | |||
2648 | .name = "mmc2", | 1986 | .name = "mmc2", |
2649 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1987 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
2650 | .mpu_irqs = omap2430_mmc2_mpu_irqs, | 1988 | .mpu_irqs = omap2430_mmc2_mpu_irqs, |
2651 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mmc2_mpu_irqs), | ||
2652 | .sdma_reqs = omap2430_mmc2_sdma_reqs, | 1989 | .sdma_reqs = omap2430_mmc2_sdma_reqs, |
2653 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc2_sdma_reqs), | ||
2654 | .opt_clks = omap2430_mmc2_opt_clks, | 1990 | .opt_clks = omap2430_mmc2_opt_clks, |
2655 | .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks), | 1991 | .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks), |
2656 | .main_clk = "mmchs2_fck", | 1992 | .main_clk = "mmchs2_fck", |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c new file mode 100644 index 000000000000..04637fabadd2 --- /dev/null +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c | |||
@@ -0,0 +1,173 @@ | |||
1 | /* | ||
2 | * omap_hwmod_2xxx_3xxx_interconnect_data.c - common interconnect data, OMAP2/3 | ||
3 | * | ||
4 | * Copyright (C) 2009-2011 Nokia Corporation | ||
5 | * Paul Walmsley | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * XXX handle crossbar/shared link difference for L3? | ||
12 | * XXX these should be marked initdata for multi-OMAP kernels | ||
13 | */ | ||
14 | #include <asm/sizes.h> | ||
15 | |||
16 | #include <plat/omap_hwmod.h> | ||
17 | #include <plat/serial.h> | ||
18 | |||
19 | #include "omap_hwmod_common_data.h" | ||
20 | |||
21 | struct omap_hwmod_addr_space omap2430_mmc1_addr_space[] = { | ||
22 | { | ||
23 | .pa_start = 0x4809c000, | ||
24 | .pa_end = 0x4809c1ff, | ||
25 | .flags = ADDR_TYPE_RT, | ||
26 | }, | ||
27 | { } | ||
28 | }; | ||
29 | |||
30 | struct omap_hwmod_addr_space omap2430_mmc2_addr_space[] = { | ||
31 | { | ||
32 | .pa_start = 0x480b4000, | ||
33 | .pa_end = 0x480b41ff, | ||
34 | .flags = ADDR_TYPE_RT, | ||
35 | }, | ||
36 | { } | ||
37 | }; | ||
38 | |||
39 | struct omap_hwmod_addr_space omap2_i2c1_addr_space[] = { | ||
40 | { | ||
41 | .pa_start = 0x48070000, | ||
42 | .pa_end = 0x48070000 + SZ_128 - 1, | ||
43 | .flags = ADDR_TYPE_RT, | ||
44 | }, | ||
45 | { } | ||
46 | }; | ||
47 | |||
48 | struct omap_hwmod_addr_space omap2_i2c2_addr_space[] = { | ||
49 | { | ||
50 | .pa_start = 0x48072000, | ||
51 | .pa_end = 0x48072000 + SZ_128 - 1, | ||
52 | .flags = ADDR_TYPE_RT, | ||
53 | }, | ||
54 | { } | ||
55 | }; | ||
56 | |||
57 | struct omap_hwmod_addr_space omap2_dss_addrs[] = { | ||
58 | { | ||
59 | .pa_start = 0x48050000, | ||
60 | .pa_end = 0x48050000 + SZ_1K - 1, | ||
61 | .flags = ADDR_TYPE_RT | ||
62 | }, | ||
63 | { } | ||
64 | }; | ||
65 | |||
66 | struct omap_hwmod_addr_space omap2_dss_dispc_addrs[] = { | ||
67 | { | ||
68 | .pa_start = 0x48050400, | ||
69 | .pa_end = 0x48050400 + SZ_1K - 1, | ||
70 | .flags = ADDR_TYPE_RT | ||
71 | }, | ||
72 | { } | ||
73 | }; | ||
74 | |||
75 | struct omap_hwmod_addr_space omap2_dss_rfbi_addrs[] = { | ||
76 | { | ||
77 | .pa_start = 0x48050800, | ||
78 | .pa_end = 0x48050800 + SZ_1K - 1, | ||
79 | .flags = ADDR_TYPE_RT | ||
80 | }, | ||
81 | { } | ||
82 | }; | ||
83 | |||
84 | struct omap_hwmod_addr_space omap2_dss_venc_addrs[] = { | ||
85 | { | ||
86 | .pa_start = 0x48050C00, | ||
87 | .pa_end = 0x48050C00 + SZ_1K - 1, | ||
88 | .flags = ADDR_TYPE_RT | ||
89 | }, | ||
90 | { } | ||
91 | }; | ||
92 | |||
93 | struct omap_hwmod_addr_space omap2_timer10_addrs[] = { | ||
94 | { | ||
95 | .pa_start = 0x48086000, | ||
96 | .pa_end = 0x48086000 + SZ_1K - 1, | ||
97 | .flags = ADDR_TYPE_RT | ||
98 | }, | ||
99 | { } | ||
100 | }; | ||
101 | |||
102 | struct omap_hwmod_addr_space omap2_timer11_addrs[] = { | ||
103 | { | ||
104 | .pa_start = 0x48088000, | ||
105 | .pa_end = 0x48088000 + SZ_1K - 1, | ||
106 | .flags = ADDR_TYPE_RT | ||
107 | }, | ||
108 | { } | ||
109 | }; | ||
110 | |||
111 | struct omap_hwmod_addr_space omap2xxx_timer12_addrs[] = { | ||
112 | { | ||
113 | .pa_start = 0x4808a000, | ||
114 | .pa_end = 0x4808a000 + SZ_1K - 1, | ||
115 | .flags = ADDR_TYPE_RT | ||
116 | }, | ||
117 | { } | ||
118 | }; | ||
119 | |||
120 | struct omap_hwmod_addr_space omap2_mcspi1_addr_space[] = { | ||
121 | { | ||
122 | .pa_start = 0x48098000, | ||
123 | .pa_end = 0x48098000 + SZ_256 - 1, | ||
124 | .flags = ADDR_TYPE_RT, | ||
125 | }, | ||
126 | { } | ||
127 | }; | ||
128 | |||
129 | struct omap_hwmod_addr_space omap2_mcspi2_addr_space[] = { | ||
130 | { | ||
131 | .pa_start = 0x4809a000, | ||
132 | .pa_end = 0x4809a000 + SZ_256 - 1, | ||
133 | .flags = ADDR_TYPE_RT, | ||
134 | }, | ||
135 | { } | ||
136 | }; | ||
137 | |||
138 | struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[] = { | ||
139 | { | ||
140 | .pa_start = 0x480b8000, | ||
141 | .pa_end = 0x480b8000 + SZ_256 - 1, | ||
142 | .flags = ADDR_TYPE_RT, | ||
143 | }, | ||
144 | { } | ||
145 | }; | ||
146 | |||
147 | struct omap_hwmod_addr_space omap2_dma_system_addrs[] = { | ||
148 | { | ||
149 | .pa_start = 0x48056000, | ||
150 | .pa_end = 0x48056000 + SZ_4K - 1, | ||
151 | .flags = ADDR_TYPE_RT | ||
152 | }, | ||
153 | { } | ||
154 | }; | ||
155 | |||
156 | struct omap_hwmod_addr_space omap2_mailbox_addrs[] = { | ||
157 | { | ||
158 | .pa_start = 0x48094000, | ||
159 | .pa_end = 0x48094000 + SZ_512 - 1, | ||
160 | .flags = ADDR_TYPE_RT, | ||
161 | }, | ||
162 | { } | ||
163 | }; | ||
164 | |||
165 | struct omap_hwmod_addr_space omap2_mcbsp1_addrs[] = { | ||
166 | { | ||
167 | .name = "mpu", | ||
168 | .pa_start = 0x48074000, | ||
169 | .pa_end = 0x480740ff, | ||
170 | .flags = ADDR_TYPE_RT | ||
171 | }, | ||
172 | { } | ||
173 | }; | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c new file mode 100644 index 000000000000..c451729d289a --- /dev/null +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | |||
@@ -0,0 +1,322 @@ | |||
1 | /* | ||
2 | * omap_hwmod_2xxx_3xxx_ipblock_data.c - common IP block data for OMAP2/3 | ||
3 | * | ||
4 | * Copyright (C) 2011 Nokia Corporation | ||
5 | * Paul Walmsley | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #include <plat/omap_hwmod.h> | ||
12 | #include <plat/serial.h> | ||
13 | #include <plat/dma.h> | ||
14 | |||
15 | #include <mach/irqs.h> | ||
16 | |||
17 | #include "omap_hwmod_common_data.h" | ||
18 | |||
19 | /* UART */ | ||
20 | |||
21 | static struct omap_hwmod_class_sysconfig omap2_uart_sysc = { | ||
22 | .rev_offs = 0x50, | ||
23 | .sysc_offs = 0x54, | ||
24 | .syss_offs = 0x58, | ||
25 | .sysc_flags = (SYSC_HAS_SIDLEMODE | | ||
26 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
27 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
28 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
29 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
30 | }; | ||
31 | |||
32 | struct omap_hwmod_class omap2_uart_class = { | ||
33 | .name = "uart", | ||
34 | .sysc = &omap2_uart_sysc, | ||
35 | }; | ||
36 | |||
37 | /* | ||
38 | * 'dss' class | ||
39 | * display sub-system | ||
40 | */ | ||
41 | |||
42 | static struct omap_hwmod_class_sysconfig omap2_dss_sysc = { | ||
43 | .rev_offs = 0x0000, | ||
44 | .sysc_offs = 0x0010, | ||
45 | .syss_offs = 0x0014, | ||
46 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
47 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
48 | }; | ||
49 | |||
50 | struct omap_hwmod_class omap2_dss_hwmod_class = { | ||
51 | .name = "dss", | ||
52 | .sysc = &omap2_dss_sysc, | ||
53 | }; | ||
54 | |||
55 | /* | ||
56 | * 'dispc' class | ||
57 | * display controller | ||
58 | */ | ||
59 | |||
60 | static struct omap_hwmod_class_sysconfig omap2_dispc_sysc = { | ||
61 | .rev_offs = 0x0000, | ||
62 | .sysc_offs = 0x0010, | ||
63 | .syss_offs = 0x0014, | ||
64 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | | ||
65 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
66 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
67 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
68 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
69 | }; | ||
70 | |||
71 | struct omap_hwmod_class omap2_dispc_hwmod_class = { | ||
72 | .name = "dispc", | ||
73 | .sysc = &omap2_dispc_sysc, | ||
74 | }; | ||
75 | |||
76 | /* | ||
77 | * 'rfbi' class | ||
78 | * remote frame buffer interface | ||
79 | */ | ||
80 | |||
81 | static struct omap_hwmod_class_sysconfig omap2_rfbi_sysc = { | ||
82 | .rev_offs = 0x0000, | ||
83 | .sysc_offs = 0x0010, | ||
84 | .syss_offs = 0x0014, | ||
85 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
86 | SYSC_HAS_AUTOIDLE), | ||
87 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
88 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
89 | }; | ||
90 | |||
91 | struct omap_hwmod_class omap2_rfbi_hwmod_class = { | ||
92 | .name = "rfbi", | ||
93 | .sysc = &omap2_rfbi_sysc, | ||
94 | }; | ||
95 | |||
96 | /* | ||
97 | * 'venc' class | ||
98 | * video encoder | ||
99 | */ | ||
100 | |||
101 | struct omap_hwmod_class omap2_venc_hwmod_class = { | ||
102 | .name = "venc", | ||
103 | }; | ||
104 | |||
105 | |||
106 | /* Common DMA request line data */ | ||
107 | struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[] = { | ||
108 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, }, | ||
109 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, }, | ||
110 | { .dma_req = -1 } | ||
111 | }; | ||
112 | |||
113 | struct omap_hwmod_dma_info omap2_uart2_sdma_reqs[] = { | ||
114 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, }, | ||
115 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, }, | ||
116 | { .dma_req = -1 } | ||
117 | }; | ||
118 | |||
119 | struct omap_hwmod_dma_info omap2_uart3_sdma_reqs[] = { | ||
120 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, }, | ||
121 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, }, | ||
122 | { .dma_req = -1 } | ||
123 | }; | ||
124 | |||
125 | struct omap_hwmod_dma_info omap2_i2c1_sdma_reqs[] = { | ||
126 | { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX }, | ||
127 | { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX }, | ||
128 | { .dma_req = -1 } | ||
129 | }; | ||
130 | |||
131 | struct omap_hwmod_dma_info omap2_i2c2_sdma_reqs[] = { | ||
132 | { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX }, | ||
133 | { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX }, | ||
134 | { .dma_req = -1 } | ||
135 | }; | ||
136 | |||
137 | struct omap_hwmod_dma_info omap2_mcspi1_sdma_reqs[] = { | ||
138 | { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */ | ||
139 | { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */ | ||
140 | { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */ | ||
141 | { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */ | ||
142 | { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */ | ||
143 | { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */ | ||
144 | { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */ | ||
145 | { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */ | ||
146 | { .dma_req = -1 } | ||
147 | }; | ||
148 | |||
149 | struct omap_hwmod_dma_info omap2_mcspi2_sdma_reqs[] = { | ||
150 | { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */ | ||
151 | { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */ | ||
152 | { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */ | ||
153 | { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */ | ||
154 | { .dma_req = -1 } | ||
155 | }; | ||
156 | |||
157 | struct omap_hwmod_dma_info omap2_mcbsp1_sdma_reqs[] = { | ||
158 | { .name = "rx", .dma_req = 32 }, | ||
159 | { .name = "tx", .dma_req = 31 }, | ||
160 | { .dma_req = -1 } | ||
161 | }; | ||
162 | |||
163 | struct omap_hwmod_dma_info omap2_mcbsp2_sdma_reqs[] = { | ||
164 | { .name = "rx", .dma_req = 34 }, | ||
165 | { .name = "tx", .dma_req = 33 }, | ||
166 | { .dma_req = -1 } | ||
167 | }; | ||
168 | |||
169 | struct omap_hwmod_dma_info omap2_mcbsp3_sdma_reqs[] = { | ||
170 | { .name = "rx", .dma_req = 18 }, | ||
171 | { .name = "tx", .dma_req = 17 }, | ||
172 | { .dma_req = -1 } | ||
173 | }; | ||
174 | |||
175 | /* Other IP block data */ | ||
176 | |||
177 | |||
178 | /* | ||
179 | * omap_hwmod class data | ||
180 | */ | ||
181 | |||
182 | struct omap_hwmod_class l3_hwmod_class = { | ||
183 | .name = "l3" | ||
184 | }; | ||
185 | |||
186 | struct omap_hwmod_class l4_hwmod_class = { | ||
187 | .name = "l4" | ||
188 | }; | ||
189 | |||
190 | struct omap_hwmod_class mpu_hwmod_class = { | ||
191 | .name = "mpu" | ||
192 | }; | ||
193 | |||
194 | struct omap_hwmod_class iva_hwmod_class = { | ||
195 | .name = "iva" | ||
196 | }; | ||
197 | |||
198 | /* Common MPU IRQ line data */ | ||
199 | |||
200 | struct omap_hwmod_irq_info omap2_timer1_mpu_irqs[] = { | ||
201 | { .irq = 37, }, | ||
202 | { .irq = -1 } | ||
203 | }; | ||
204 | |||
205 | struct omap_hwmod_irq_info omap2_timer2_mpu_irqs[] = { | ||
206 | { .irq = 38, }, | ||
207 | { .irq = -1 } | ||
208 | }; | ||
209 | |||
210 | struct omap_hwmod_irq_info omap2_timer3_mpu_irqs[] = { | ||
211 | { .irq = 39, }, | ||
212 | { .irq = -1 } | ||
213 | }; | ||
214 | |||
215 | struct omap_hwmod_irq_info omap2_timer4_mpu_irqs[] = { | ||
216 | { .irq = 40, }, | ||
217 | { .irq = -1 } | ||
218 | }; | ||
219 | |||
220 | struct omap_hwmod_irq_info omap2_timer5_mpu_irqs[] = { | ||
221 | { .irq = 41, }, | ||
222 | { .irq = -1 } | ||
223 | }; | ||
224 | |||
225 | struct omap_hwmod_irq_info omap2_timer6_mpu_irqs[] = { | ||
226 | { .irq = 42, }, | ||
227 | { .irq = -1 } | ||
228 | }; | ||
229 | |||
230 | struct omap_hwmod_irq_info omap2_timer7_mpu_irqs[] = { | ||
231 | { .irq = 43, }, | ||
232 | { .irq = -1 } | ||
233 | }; | ||
234 | |||
235 | struct omap_hwmod_irq_info omap2_timer8_mpu_irqs[] = { | ||
236 | { .irq = 44, }, | ||
237 | { .irq = -1 } | ||
238 | }; | ||
239 | |||
240 | struct omap_hwmod_irq_info omap2_timer9_mpu_irqs[] = { | ||
241 | { .irq = 45, }, | ||
242 | { .irq = -1 } | ||
243 | }; | ||
244 | |||
245 | struct omap_hwmod_irq_info omap2_timer10_mpu_irqs[] = { | ||
246 | { .irq = 46, }, | ||
247 | { .irq = -1 } | ||
248 | }; | ||
249 | |||
250 | struct omap_hwmod_irq_info omap2_timer11_mpu_irqs[] = { | ||
251 | { .irq = 47, }, | ||
252 | { .irq = -1 } | ||
253 | }; | ||
254 | |||
255 | struct omap_hwmod_irq_info omap2_uart1_mpu_irqs[] = { | ||
256 | { .irq = INT_24XX_UART1_IRQ, }, | ||
257 | { .irq = -1 } | ||
258 | }; | ||
259 | |||
260 | struct omap_hwmod_irq_info omap2_uart2_mpu_irqs[] = { | ||
261 | { .irq = INT_24XX_UART2_IRQ, }, | ||
262 | { .irq = -1 } | ||
263 | }; | ||
264 | |||
265 | struct omap_hwmod_irq_info omap2_uart3_mpu_irqs[] = { | ||
266 | { .irq = INT_24XX_UART3_IRQ, }, | ||
267 | { .irq = -1 } | ||
268 | }; | ||
269 | |||
270 | struct omap_hwmod_irq_info omap2_dispc_irqs[] = { | ||
271 | { .irq = 25 }, | ||
272 | { .irq = -1 } | ||
273 | }; | ||
274 | |||
275 | struct omap_hwmod_irq_info omap2_i2c1_mpu_irqs[] = { | ||
276 | { .irq = INT_24XX_I2C1_IRQ, }, | ||
277 | { .irq = -1 } | ||
278 | }; | ||
279 | |||
280 | struct omap_hwmod_irq_info omap2_i2c2_mpu_irqs[] = { | ||
281 | { .irq = INT_24XX_I2C2_IRQ, }, | ||
282 | { .irq = -1 } | ||
283 | }; | ||
284 | |||
285 | struct omap_hwmod_irq_info omap2_gpio1_irqs[] = { | ||
286 | { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */ | ||
287 | { .irq = -1 } | ||
288 | }; | ||
289 | |||
290 | struct omap_hwmod_irq_info omap2_gpio2_irqs[] = { | ||
291 | { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */ | ||
292 | { .irq = -1 } | ||
293 | }; | ||
294 | |||
295 | struct omap_hwmod_irq_info omap2_gpio3_irqs[] = { | ||
296 | { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */ | ||
297 | { .irq = -1 } | ||
298 | }; | ||
299 | |||
300 | struct omap_hwmod_irq_info omap2_gpio4_irqs[] = { | ||
301 | { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */ | ||
302 | { .irq = -1 } | ||
303 | }; | ||
304 | |||
305 | struct omap_hwmod_irq_info omap2_dma_system_irqs[] = { | ||
306 | { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */ | ||
307 | { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */ | ||
308 | { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */ | ||
309 | { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */ | ||
310 | { .irq = -1 } | ||
311 | }; | ||
312 | |||
313 | struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[] = { | ||
314 | { .irq = 65 }, | ||
315 | { .irq = -1 } | ||
316 | }; | ||
317 | |||
318 | struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[] = { | ||
319 | { .irq = 66 }, | ||
320 | { .irq = -1 } | ||
321 | }; | ||
322 | |||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c new file mode 100644 index 000000000000..4f3547c2a49e --- /dev/null +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c | |||
@@ -0,0 +1,130 @@ | |||
1 | /* | ||
2 | * omap_hwmod_2xxx_interconnect_data.c - common interconnect data for OMAP2xxx | ||
3 | * | ||
4 | * Copyright (C) 2009-2011 Nokia Corporation | ||
5 | * Paul Walmsley | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * XXX handle crossbar/shared link difference for L3? | ||
12 | * XXX these should be marked initdata for multi-OMAP kernels | ||
13 | */ | ||
14 | #include <asm/sizes.h> | ||
15 | |||
16 | #include <plat/omap_hwmod.h> | ||
17 | #include <plat/serial.h> | ||
18 | |||
19 | #include "omap_hwmod_common_data.h" | ||
20 | |||
21 | struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = { | ||
22 | { | ||
23 | .pa_start = OMAP2_UART1_BASE, | ||
24 | .pa_end = OMAP2_UART1_BASE + SZ_8K - 1, | ||
25 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
26 | }, | ||
27 | { } | ||
28 | }; | ||
29 | |||
30 | struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = { | ||
31 | { | ||
32 | .pa_start = OMAP2_UART2_BASE, | ||
33 | .pa_end = OMAP2_UART2_BASE + SZ_1K - 1, | ||
34 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
35 | }, | ||
36 | { } | ||
37 | }; | ||
38 | |||
39 | struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = { | ||
40 | { | ||
41 | .pa_start = OMAP2_UART3_BASE, | ||
42 | .pa_end = OMAP2_UART3_BASE + SZ_1K - 1, | ||
43 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
44 | }, | ||
45 | { } | ||
46 | }; | ||
47 | |||
48 | struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = { | ||
49 | { | ||
50 | .pa_start = 0x4802a000, | ||
51 | .pa_end = 0x4802a000 + SZ_1K - 1, | ||
52 | .flags = ADDR_TYPE_RT | ||
53 | }, | ||
54 | { } | ||
55 | }; | ||
56 | |||
57 | struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = { | ||
58 | { | ||
59 | .pa_start = 0x48078000, | ||
60 | .pa_end = 0x48078000 + SZ_1K - 1, | ||
61 | .flags = ADDR_TYPE_RT | ||
62 | }, | ||
63 | { } | ||
64 | }; | ||
65 | |||
66 | struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = { | ||
67 | { | ||
68 | .pa_start = 0x4807a000, | ||
69 | .pa_end = 0x4807a000 + SZ_1K - 1, | ||
70 | .flags = ADDR_TYPE_RT | ||
71 | }, | ||
72 | { } | ||
73 | }; | ||
74 | |||
75 | struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = { | ||
76 | { | ||
77 | .pa_start = 0x4807c000, | ||
78 | .pa_end = 0x4807c000 + SZ_1K - 1, | ||
79 | .flags = ADDR_TYPE_RT | ||
80 | }, | ||
81 | { } | ||
82 | }; | ||
83 | |||
84 | struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = { | ||
85 | { | ||
86 | .pa_start = 0x4807e000, | ||
87 | .pa_end = 0x4807e000 + SZ_1K - 1, | ||
88 | .flags = ADDR_TYPE_RT | ||
89 | }, | ||
90 | { } | ||
91 | }; | ||
92 | |||
93 | struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = { | ||
94 | { | ||
95 | .pa_start = 0x48080000, | ||
96 | .pa_end = 0x48080000 + SZ_1K - 1, | ||
97 | .flags = ADDR_TYPE_RT | ||
98 | }, | ||
99 | { } | ||
100 | }; | ||
101 | |||
102 | struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = { | ||
103 | { | ||
104 | .pa_start = 0x48082000, | ||
105 | .pa_end = 0x48082000 + SZ_1K - 1, | ||
106 | .flags = ADDR_TYPE_RT | ||
107 | }, | ||
108 | { } | ||
109 | }; | ||
110 | |||
111 | struct omap_hwmod_addr_space omap2xxx_timer9_addrs[] = { | ||
112 | { | ||
113 | .pa_start = 0x48084000, | ||
114 | .pa_end = 0x48084000 + SZ_1K - 1, | ||
115 | .flags = ADDR_TYPE_RT | ||
116 | }, | ||
117 | { } | ||
118 | }; | ||
119 | |||
120 | struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[] = { | ||
121 | { | ||
122 | .name = "mpu", | ||
123 | .pa_start = 0x48076000, | ||
124 | .pa_end = 0x480760ff, | ||
125 | .flags = ADDR_TYPE_RT | ||
126 | }, | ||
127 | { } | ||
128 | }; | ||
129 | |||
130 | |||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c new file mode 100644 index 000000000000..177dee20faef --- /dev/null +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | |||
@@ -0,0 +1,150 @@ | |||
1 | /* | ||
2 | * omap_hwmod_2xxx_ipblock_data.c - common IP block data for OMAP2xxx | ||
3 | * | ||
4 | * Copyright (C) 2011 Nokia Corporation | ||
5 | * Paul Walmsley | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #include <plat/omap_hwmod.h> | ||
12 | #include <plat/serial.h> | ||
13 | #include <plat/dma.h> | ||
14 | #include <plat/dmtimer.h> | ||
15 | #include <plat/mcspi.h> | ||
16 | |||
17 | #include <mach/irqs.h> | ||
18 | |||
19 | #include "omap_hwmod_common_data.h" | ||
20 | #include "wd_timer.h" | ||
21 | |||
22 | struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = { | ||
23 | { .irq = 48, }, | ||
24 | { .irq = -1 } | ||
25 | }; | ||
26 | |||
27 | struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = { | ||
28 | { .name = "dispc", .dma_req = 5 }, | ||
29 | { .dma_req = -1 } | ||
30 | }; | ||
31 | /* OMAP2xxx Timer Common */ | ||
32 | static struct omap_hwmod_class_sysconfig omap2xxx_timer_sysc = { | ||
33 | .rev_offs = 0x0000, | ||
34 | .sysc_offs = 0x0010, | ||
35 | .syss_offs = 0x0014, | ||
36 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | | ||
37 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
38 | SYSC_HAS_AUTOIDLE), | ||
39 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
40 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
41 | }; | ||
42 | |||
43 | struct omap_hwmod_class omap2xxx_timer_hwmod_class = { | ||
44 | .name = "timer", | ||
45 | .sysc = &omap2xxx_timer_sysc, | ||
46 | .rev = OMAP_TIMER_IP_VERSION_1, | ||
47 | }; | ||
48 | |||
49 | /* | ||
50 | * 'wd_timer' class | ||
51 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on | ||
52 | * overflow condition | ||
53 | */ | ||
54 | |||
55 | static struct omap_hwmod_class_sysconfig omap2xxx_wd_timer_sysc = { | ||
56 | .rev_offs = 0x0000, | ||
57 | .sysc_offs = 0x0010, | ||
58 | .syss_offs = 0x0014, | ||
59 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET | | ||
60 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
61 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
62 | }; | ||
63 | |||
64 | struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class = { | ||
65 | .name = "wd_timer", | ||
66 | .sysc = &omap2xxx_wd_timer_sysc, | ||
67 | .pre_shutdown = &omap2_wd_timer_disable | ||
68 | }; | ||
69 | |||
70 | /* | ||
71 | * 'gpio' class | ||
72 | * general purpose io module | ||
73 | */ | ||
74 | static struct omap_hwmod_class_sysconfig omap2xxx_gpio_sysc = { | ||
75 | .rev_offs = 0x0000, | ||
76 | .sysc_offs = 0x0010, | ||
77 | .syss_offs = 0x0014, | ||
78 | .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | | ||
79 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE | | ||
80 | SYSS_HAS_RESET_STATUS), | ||
81 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
82 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
83 | }; | ||
84 | |||
85 | struct omap_hwmod_class omap2xxx_gpio_hwmod_class = { | ||
86 | .name = "gpio", | ||
87 | .sysc = &omap2xxx_gpio_sysc, | ||
88 | .rev = 0, | ||
89 | }; | ||
90 | |||
91 | /* system dma */ | ||
92 | static struct omap_hwmod_class_sysconfig omap2xxx_dma_sysc = { | ||
93 | .rev_offs = 0x0000, | ||
94 | .sysc_offs = 0x002c, | ||
95 | .syss_offs = 0x0028, | ||
96 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE | | ||
97 | SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE | | ||
98 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
99 | .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
100 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
101 | }; | ||
102 | |||
103 | struct omap_hwmod_class omap2xxx_dma_hwmod_class = { | ||
104 | .name = "dma", | ||
105 | .sysc = &omap2xxx_dma_sysc, | ||
106 | }; | ||
107 | |||
108 | /* | ||
109 | * 'mailbox' class | ||
110 | * mailbox module allowing communication between the on-chip processors | ||
111 | * using a queued mailbox-interrupt mechanism. | ||
112 | */ | ||
113 | |||
114 | static struct omap_hwmod_class_sysconfig omap2xxx_mailbox_sysc = { | ||
115 | .rev_offs = 0x000, | ||
116 | .sysc_offs = 0x010, | ||
117 | .syss_offs = 0x014, | ||
118 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
119 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
120 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
121 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
122 | }; | ||
123 | |||
124 | struct omap_hwmod_class omap2xxx_mailbox_hwmod_class = { | ||
125 | .name = "mailbox", | ||
126 | .sysc = &omap2xxx_mailbox_sysc, | ||
127 | }; | ||
128 | |||
129 | /* | ||
130 | * 'mcspi' class | ||
131 | * multichannel serial port interface (mcspi) / master/slave synchronous serial | ||
132 | * bus | ||
133 | */ | ||
134 | |||
135 | static struct omap_hwmod_class_sysconfig omap2xxx_mcspi_sysc = { | ||
136 | .rev_offs = 0x0000, | ||
137 | .sysc_offs = 0x0010, | ||
138 | .syss_offs = 0x0014, | ||
139 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
140 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
141 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
142 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
143 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
144 | }; | ||
145 | |||
146 | struct omap_hwmod_class omap2xxx_mcspi_class = { | ||
147 | .name = "mcspi", | ||
148 | .sysc = &omap2xxx_mcspi_sysc, | ||
149 | .rev = OMAP2_MCSPI_REV, | ||
150 | }; | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 909a84de6682..1a52716e48bf 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips | 2 | * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2010 Nokia Corporation | 4 | * Copyright (C) 2009-2011 Nokia Corporation |
5 | * Paul Walmsley | 5 | * Paul Walmsley |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -103,6 +103,7 @@ static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = { | |||
103 | static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = { | 103 | static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = { |
104 | { .irq = INT_34XX_L3_DBG_IRQ }, | 104 | { .irq = INT_34XX_L3_DBG_IRQ }, |
105 | { .irq = INT_34XX_L3_APP_IRQ }, | 105 | { .irq = INT_34XX_L3_APP_IRQ }, |
106 | { .irq = -1 } | ||
106 | }; | 107 | }; |
107 | 108 | ||
108 | static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = { | 109 | static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = { |
@@ -111,6 +112,7 @@ static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = { | |||
111 | .pa_end = 0x6800ffff, | 112 | .pa_end = 0x6800ffff, |
112 | .flags = ADDR_TYPE_RT, | 113 | .flags = ADDR_TYPE_RT, |
113 | }, | 114 | }, |
115 | { } | ||
114 | }; | 116 | }; |
115 | 117 | ||
116 | /* MPU -> L3 interface */ | 118 | /* MPU -> L3 interface */ |
@@ -118,7 +120,6 @@ static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = { | |||
118 | .master = &omap3xxx_mpu_hwmod, | 120 | .master = &omap3xxx_mpu_hwmod, |
119 | .slave = &omap3xxx_l3_main_hwmod, | 121 | .slave = &omap3xxx_l3_main_hwmod, |
120 | .addr = omap3xxx_l3_main_addrs, | 122 | .addr = omap3xxx_l3_main_addrs, |
121 | .addr_cnt = ARRAY_SIZE(omap3xxx_l3_main_addrs), | ||
122 | .user = OCP_USER_MPU, | 123 | .user = OCP_USER_MPU, |
123 | }; | 124 | }; |
124 | 125 | ||
@@ -150,8 +151,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = { | |||
150 | static struct omap_hwmod omap3xxx_l3_main_hwmod = { | 151 | static struct omap_hwmod omap3xxx_l3_main_hwmod = { |
151 | .name = "l3_main", | 152 | .name = "l3_main", |
152 | .class = &l3_hwmod_class, | 153 | .class = &l3_hwmod_class, |
153 | .mpu_irqs = omap3xxx_l3_main_irqs, | 154 | .mpu_irqs = omap3xxx_l3_main_irqs, |
154 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_l3_main_irqs), | ||
155 | .masters = omap3xxx_l3_main_masters, | 155 | .masters = omap3xxx_l3_main_masters, |
156 | .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters), | 156 | .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters), |
157 | .slaves = omap3xxx_l3_main_slaves, | 157 | .slaves = omap3xxx_l3_main_slaves, |
@@ -190,39 +190,21 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { | |||
190 | }; | 190 | }; |
191 | 191 | ||
192 | /* L4 CORE -> MMC1 interface */ | 192 | /* L4 CORE -> MMC1 interface */ |
193 | static struct omap_hwmod_addr_space omap3xxx_mmc1_addr_space[] = { | ||
194 | { | ||
195 | .pa_start = 0x4809c000, | ||
196 | .pa_end = 0x4809c1ff, | ||
197 | .flags = ADDR_TYPE_RT, | ||
198 | }, | ||
199 | }; | ||
200 | |||
201 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = { | 193 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = { |
202 | .master = &omap3xxx_l4_core_hwmod, | 194 | .master = &omap3xxx_l4_core_hwmod, |
203 | .slave = &omap3xxx_mmc1_hwmod, | 195 | .slave = &omap3xxx_mmc1_hwmod, |
204 | .clk = "mmchs1_ick", | 196 | .clk = "mmchs1_ick", |
205 | .addr = omap3xxx_mmc1_addr_space, | 197 | .addr = omap2430_mmc1_addr_space, |
206 | .addr_cnt = ARRAY_SIZE(omap3xxx_mmc1_addr_space), | ||
207 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 198 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
208 | .flags = OMAP_FIREWALL_L4 | 199 | .flags = OMAP_FIREWALL_L4 |
209 | }; | 200 | }; |
210 | 201 | ||
211 | /* L4 CORE -> MMC2 interface */ | 202 | /* L4 CORE -> MMC2 interface */ |
212 | static struct omap_hwmod_addr_space omap3xxx_mmc2_addr_space[] = { | ||
213 | { | ||
214 | .pa_start = 0x480b4000, | ||
215 | .pa_end = 0x480b41ff, | ||
216 | .flags = ADDR_TYPE_RT, | ||
217 | }, | ||
218 | }; | ||
219 | |||
220 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = { | 203 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = { |
221 | .master = &omap3xxx_l4_core_hwmod, | 204 | .master = &omap3xxx_l4_core_hwmod, |
222 | .slave = &omap3xxx_mmc2_hwmod, | 205 | .slave = &omap3xxx_mmc2_hwmod, |
223 | .clk = "mmchs2_ick", | 206 | .clk = "mmchs2_ick", |
224 | .addr = omap3xxx_mmc2_addr_space, | 207 | .addr = omap2430_mmc2_addr_space, |
225 | .addr_cnt = ARRAY_SIZE(omap3xxx_mmc2_addr_space), | ||
226 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 208 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
227 | .flags = OMAP_FIREWALL_L4 | 209 | .flags = OMAP_FIREWALL_L4 |
228 | }; | 210 | }; |
@@ -234,6 +216,7 @@ static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = { | |||
234 | .pa_end = 0x480ad1ff, | 216 | .pa_end = 0x480ad1ff, |
235 | .flags = ADDR_TYPE_RT, | 217 | .flags = ADDR_TYPE_RT, |
236 | }, | 218 | }, |
219 | { } | ||
237 | }; | 220 | }; |
238 | 221 | ||
239 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = { | 222 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = { |
@@ -241,7 +224,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = { | |||
241 | .slave = &omap3xxx_mmc3_hwmod, | 224 | .slave = &omap3xxx_mmc3_hwmod, |
242 | .clk = "mmchs3_ick", | 225 | .clk = "mmchs3_ick", |
243 | .addr = omap3xxx_mmc3_addr_space, | 226 | .addr = omap3xxx_mmc3_addr_space, |
244 | .addr_cnt = ARRAY_SIZE(omap3xxx_mmc3_addr_space), | ||
245 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 227 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
246 | .flags = OMAP_FIREWALL_L4 | 228 | .flags = OMAP_FIREWALL_L4 |
247 | }; | 229 | }; |
@@ -253,6 +235,7 @@ static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = { | |||
253 | .pa_end = OMAP3_UART1_BASE + SZ_8K - 1, | 235 | .pa_end = OMAP3_UART1_BASE + SZ_8K - 1, |
254 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | 236 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, |
255 | }, | 237 | }, |
238 | { } | ||
256 | }; | 239 | }; |
257 | 240 | ||
258 | static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = { | 241 | static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = { |
@@ -260,7 +243,6 @@ static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = { | |||
260 | .slave = &omap3xxx_uart1_hwmod, | 243 | .slave = &omap3xxx_uart1_hwmod, |
261 | .clk = "uart1_ick", | 244 | .clk = "uart1_ick", |
262 | .addr = omap3xxx_uart1_addr_space, | 245 | .addr = omap3xxx_uart1_addr_space, |
263 | .addr_cnt = ARRAY_SIZE(omap3xxx_uart1_addr_space), | ||
264 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 246 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
265 | }; | 247 | }; |
266 | 248 | ||
@@ -271,6 +253,7 @@ static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = { | |||
271 | .pa_end = OMAP3_UART2_BASE + SZ_1K - 1, | 253 | .pa_end = OMAP3_UART2_BASE + SZ_1K - 1, |
272 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | 254 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, |
273 | }, | 255 | }, |
256 | { } | ||
274 | }; | 257 | }; |
275 | 258 | ||
276 | static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = { | 259 | static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = { |
@@ -278,7 +261,6 @@ static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = { | |||
278 | .slave = &omap3xxx_uart2_hwmod, | 261 | .slave = &omap3xxx_uart2_hwmod, |
279 | .clk = "uart2_ick", | 262 | .clk = "uart2_ick", |
280 | .addr = omap3xxx_uart2_addr_space, | 263 | .addr = omap3xxx_uart2_addr_space, |
281 | .addr_cnt = ARRAY_SIZE(omap3xxx_uart2_addr_space), | ||
282 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 264 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
283 | }; | 265 | }; |
284 | 266 | ||
@@ -289,6 +271,7 @@ static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = { | |||
289 | .pa_end = OMAP3_UART3_BASE + SZ_1K - 1, | 271 | .pa_end = OMAP3_UART3_BASE + SZ_1K - 1, |
290 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | 272 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, |
291 | }, | 273 | }, |
274 | { } | ||
292 | }; | 275 | }; |
293 | 276 | ||
294 | static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = { | 277 | static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = { |
@@ -296,7 +279,6 @@ static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = { | |||
296 | .slave = &omap3xxx_uart3_hwmod, | 279 | .slave = &omap3xxx_uart3_hwmod, |
297 | .clk = "uart3_ick", | 280 | .clk = "uart3_ick", |
298 | .addr = omap3xxx_uart3_addr_space, | 281 | .addr = omap3xxx_uart3_addr_space, |
299 | .addr_cnt = ARRAY_SIZE(omap3xxx_uart3_addr_space), | ||
300 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 282 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
301 | }; | 283 | }; |
302 | 284 | ||
@@ -307,6 +289,7 @@ static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = { | |||
307 | .pa_end = OMAP3_UART4_BASE + SZ_1K - 1, | 289 | .pa_end = OMAP3_UART4_BASE + SZ_1K - 1, |
308 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | 290 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, |
309 | }, | 291 | }, |
292 | { } | ||
310 | }; | 293 | }; |
311 | 294 | ||
312 | static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = { | 295 | static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = { |
@@ -314,28 +297,15 @@ static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = { | |||
314 | .slave = &omap3xxx_uart4_hwmod, | 297 | .slave = &omap3xxx_uart4_hwmod, |
315 | .clk = "uart4_ick", | 298 | .clk = "uart4_ick", |
316 | .addr = omap3xxx_uart4_addr_space, | 299 | .addr = omap3xxx_uart4_addr_space, |
317 | .addr_cnt = ARRAY_SIZE(omap3xxx_uart4_addr_space), | ||
318 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 300 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
319 | }; | 301 | }; |
320 | 302 | ||
321 | /* I2C IP block address space length (in bytes) */ | ||
322 | #define OMAP2_I2C_AS_LEN 128 | ||
323 | |||
324 | /* L4 CORE -> I2C1 interface */ | 303 | /* L4 CORE -> I2C1 interface */ |
325 | static struct omap_hwmod_addr_space omap3xxx_i2c1_addr_space[] = { | ||
326 | { | ||
327 | .pa_start = 0x48070000, | ||
328 | .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1, | ||
329 | .flags = ADDR_TYPE_RT, | ||
330 | }, | ||
331 | }; | ||
332 | |||
333 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = { | 304 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = { |
334 | .master = &omap3xxx_l4_core_hwmod, | 305 | .master = &omap3xxx_l4_core_hwmod, |
335 | .slave = &omap3xxx_i2c1_hwmod, | 306 | .slave = &omap3xxx_i2c1_hwmod, |
336 | .clk = "i2c1_ick", | 307 | .clk = "i2c1_ick", |
337 | .addr = omap3xxx_i2c1_addr_space, | 308 | .addr = omap2_i2c1_addr_space, |
338 | .addr_cnt = ARRAY_SIZE(omap3xxx_i2c1_addr_space), | ||
339 | .fw = { | 309 | .fw = { |
340 | .omap2 = { | 310 | .omap2 = { |
341 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION, | 311 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION, |
@@ -347,20 +317,11 @@ static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = { | |||
347 | }; | 317 | }; |
348 | 318 | ||
349 | /* L4 CORE -> I2C2 interface */ | 319 | /* L4 CORE -> I2C2 interface */ |
350 | static struct omap_hwmod_addr_space omap3xxx_i2c2_addr_space[] = { | ||
351 | { | ||
352 | .pa_start = 0x48072000, | ||
353 | .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1, | ||
354 | .flags = ADDR_TYPE_RT, | ||
355 | }, | ||
356 | }; | ||
357 | |||
358 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = { | 320 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = { |
359 | .master = &omap3xxx_l4_core_hwmod, | 321 | .master = &omap3xxx_l4_core_hwmod, |
360 | .slave = &omap3xxx_i2c2_hwmod, | 322 | .slave = &omap3xxx_i2c2_hwmod, |
361 | .clk = "i2c2_ick", | 323 | .clk = "i2c2_ick", |
362 | .addr = omap3xxx_i2c2_addr_space, | 324 | .addr = omap2_i2c2_addr_space, |
363 | .addr_cnt = ARRAY_SIZE(omap3xxx_i2c2_addr_space), | ||
364 | .fw = { | 325 | .fw = { |
365 | .omap2 = { | 326 | .omap2 = { |
366 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION, | 327 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION, |
@@ -375,9 +336,10 @@ static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = { | |||
375 | static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = { | 336 | static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = { |
376 | { | 337 | { |
377 | .pa_start = 0x48060000, | 338 | .pa_start = 0x48060000, |
378 | .pa_end = 0x48060000 + OMAP2_I2C_AS_LEN - 1, | 339 | .pa_end = 0x48060000 + SZ_128 - 1, |
379 | .flags = ADDR_TYPE_RT, | 340 | .flags = ADDR_TYPE_RT, |
380 | }, | 341 | }, |
342 | { } | ||
381 | }; | 343 | }; |
382 | 344 | ||
383 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = { | 345 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = { |
@@ -385,7 +347,6 @@ static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = { | |||
385 | .slave = &omap3xxx_i2c3_hwmod, | 347 | .slave = &omap3xxx_i2c3_hwmod, |
386 | .clk = "i2c3_ick", | 348 | .clk = "i2c3_ick", |
387 | .addr = omap3xxx_i2c3_addr_space, | 349 | .addr = omap3xxx_i2c3_addr_space, |
388 | .addr_cnt = ARRAY_SIZE(omap3xxx_i2c3_addr_space), | ||
389 | .fw = { | 350 | .fw = { |
390 | .omap2 = { | 351 | .omap2 = { |
391 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION, | 352 | .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION, |
@@ -403,6 +364,7 @@ static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = { | |||
403 | .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1, | 364 | .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1, |
404 | .flags = ADDR_TYPE_RT, | 365 | .flags = ADDR_TYPE_RT, |
405 | }, | 366 | }, |
367 | { } | ||
406 | }; | 368 | }; |
407 | 369 | ||
408 | static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = { | 370 | static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = { |
@@ -410,7 +372,6 @@ static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = { | |||
410 | .slave = &omap34xx_sr1_hwmod, | 372 | .slave = &omap34xx_sr1_hwmod, |
411 | .clk = "sr_l4_ick", | 373 | .clk = "sr_l4_ick", |
412 | .addr = omap3_sr1_addr_space, | 374 | .addr = omap3_sr1_addr_space, |
413 | .addr_cnt = ARRAY_SIZE(omap3_sr1_addr_space), | ||
414 | .user = OCP_USER_MPU, | 375 | .user = OCP_USER_MPU, |
415 | }; | 376 | }; |
416 | 377 | ||
@@ -421,6 +382,7 @@ static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = { | |||
421 | .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1, | 382 | .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1, |
422 | .flags = ADDR_TYPE_RT, | 383 | .flags = ADDR_TYPE_RT, |
423 | }, | 384 | }, |
385 | { } | ||
424 | }; | 386 | }; |
425 | 387 | ||
426 | static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = { | 388 | static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = { |
@@ -428,7 +390,6 @@ static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = { | |||
428 | .slave = &omap34xx_sr2_hwmod, | 390 | .slave = &omap34xx_sr2_hwmod, |
429 | .clk = "sr_l4_ick", | 391 | .clk = "sr_l4_ick", |
430 | .addr = omap3_sr2_addr_space, | 392 | .addr = omap3_sr2_addr_space, |
431 | .addr_cnt = ARRAY_SIZE(omap3_sr2_addr_space), | ||
432 | .user = OCP_USER_MPU, | 393 | .user = OCP_USER_MPU, |
433 | }; | 394 | }; |
434 | 395 | ||
@@ -442,6 +403,7 @@ static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = { | |||
442 | .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1, | 403 | .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1, |
443 | .flags = ADDR_TYPE_RT | 404 | .flags = ADDR_TYPE_RT |
444 | }, | 405 | }, |
406 | { } | ||
445 | }; | 407 | }; |
446 | 408 | ||
447 | /* l4_core -> usbhsotg */ | 409 | /* l4_core -> usbhsotg */ |
@@ -450,7 +412,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = { | |||
450 | .slave = &omap3xxx_usbhsotg_hwmod, | 412 | .slave = &omap3xxx_usbhsotg_hwmod, |
451 | .clk = "l4_ick", | 413 | .clk = "l4_ick", |
452 | .addr = omap3xxx_usbhsotg_addrs, | 414 | .addr = omap3xxx_usbhsotg_addrs, |
453 | .addr_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_addrs), | ||
454 | .user = OCP_USER_MPU, | 415 | .user = OCP_USER_MPU, |
455 | }; | 416 | }; |
456 | 417 | ||
@@ -468,6 +429,7 @@ static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = { | |||
468 | .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1, | 429 | .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1, |
469 | .flags = ADDR_TYPE_RT | 430 | .flags = ADDR_TYPE_RT |
470 | }, | 431 | }, |
432 | { } | ||
471 | }; | 433 | }; |
472 | 434 | ||
473 | /* l4_core -> usbhsotg */ | 435 | /* l4_core -> usbhsotg */ |
@@ -476,7 +438,6 @@ static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = { | |||
476 | .slave = &am35xx_usbhsotg_hwmod, | 438 | .slave = &am35xx_usbhsotg_hwmod, |
477 | .clk = "l4_ick", | 439 | .clk = "l4_ick", |
478 | .addr = am35xx_usbhsotg_addrs, | 440 | .addr = am35xx_usbhsotg_addrs, |
479 | .addr_cnt = ARRAY_SIZE(am35xx_usbhsotg_addrs), | ||
480 | .user = OCP_USER_MPU, | 441 | .user = OCP_USER_MPU, |
481 | }; | 442 | }; |
482 | 443 | ||
@@ -611,9 +572,6 @@ static struct omap_hwmod_class omap3xxx_timer_hwmod_class = { | |||
611 | 572 | ||
612 | /* timer1 */ | 573 | /* timer1 */ |
613 | static struct omap_hwmod omap3xxx_timer1_hwmod; | 574 | static struct omap_hwmod omap3xxx_timer1_hwmod; |
614 | static struct omap_hwmod_irq_info omap3xxx_timer1_mpu_irqs[] = { | ||
615 | { .irq = 37, }, | ||
616 | }; | ||
617 | 575 | ||
618 | static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = { | 576 | static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = { |
619 | { | 577 | { |
@@ -621,6 +579,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = { | |||
621 | .pa_end = 0x48318000 + SZ_1K - 1, | 579 | .pa_end = 0x48318000 + SZ_1K - 1, |
622 | .flags = ADDR_TYPE_RT | 580 | .flags = ADDR_TYPE_RT |
623 | }, | 581 | }, |
582 | { } | ||
624 | }; | 583 | }; |
625 | 584 | ||
626 | /* l4_wkup -> timer1 */ | 585 | /* l4_wkup -> timer1 */ |
@@ -629,7 +588,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = { | |||
629 | .slave = &omap3xxx_timer1_hwmod, | 588 | .slave = &omap3xxx_timer1_hwmod, |
630 | .clk = "gpt1_ick", | 589 | .clk = "gpt1_ick", |
631 | .addr = omap3xxx_timer1_addrs, | 590 | .addr = omap3xxx_timer1_addrs, |
632 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer1_addrs), | ||
633 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 591 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
634 | }; | 592 | }; |
635 | 593 | ||
@@ -641,8 +599,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer1_slaves[] = { | |||
641 | /* timer1 hwmod */ | 599 | /* timer1 hwmod */ |
642 | static struct omap_hwmod omap3xxx_timer1_hwmod = { | 600 | static struct omap_hwmod omap3xxx_timer1_hwmod = { |
643 | .name = "timer1", | 601 | .name = "timer1", |
644 | .mpu_irqs = omap3xxx_timer1_mpu_irqs, | 602 | .mpu_irqs = omap2_timer1_mpu_irqs, |
645 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer1_mpu_irqs), | ||
646 | .main_clk = "gpt1_fck", | 603 | .main_clk = "gpt1_fck", |
647 | .prcm = { | 604 | .prcm = { |
648 | .omap2 = { | 605 | .omap2 = { |
@@ -661,9 +618,6 @@ static struct omap_hwmod omap3xxx_timer1_hwmod = { | |||
661 | 618 | ||
662 | /* timer2 */ | 619 | /* timer2 */ |
663 | static struct omap_hwmod omap3xxx_timer2_hwmod; | 620 | static struct omap_hwmod omap3xxx_timer2_hwmod; |
664 | static struct omap_hwmod_irq_info omap3xxx_timer2_mpu_irqs[] = { | ||
665 | { .irq = 38, }, | ||
666 | }; | ||
667 | 621 | ||
668 | static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = { | 622 | static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = { |
669 | { | 623 | { |
@@ -671,6 +625,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = { | |||
671 | .pa_end = 0x49032000 + SZ_1K - 1, | 625 | .pa_end = 0x49032000 + SZ_1K - 1, |
672 | .flags = ADDR_TYPE_RT | 626 | .flags = ADDR_TYPE_RT |
673 | }, | 627 | }, |
628 | { } | ||
674 | }; | 629 | }; |
675 | 630 | ||
676 | /* l4_per -> timer2 */ | 631 | /* l4_per -> timer2 */ |
@@ -679,7 +634,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = { | |||
679 | .slave = &omap3xxx_timer2_hwmod, | 634 | .slave = &omap3xxx_timer2_hwmod, |
680 | .clk = "gpt2_ick", | 635 | .clk = "gpt2_ick", |
681 | .addr = omap3xxx_timer2_addrs, | 636 | .addr = omap3xxx_timer2_addrs, |
682 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer2_addrs), | ||
683 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 637 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
684 | }; | 638 | }; |
685 | 639 | ||
@@ -691,8 +645,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer2_slaves[] = { | |||
691 | /* timer2 hwmod */ | 645 | /* timer2 hwmod */ |
692 | static struct omap_hwmod omap3xxx_timer2_hwmod = { | 646 | static struct omap_hwmod omap3xxx_timer2_hwmod = { |
693 | .name = "timer2", | 647 | .name = "timer2", |
694 | .mpu_irqs = omap3xxx_timer2_mpu_irqs, | 648 | .mpu_irqs = omap2_timer2_mpu_irqs, |
695 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer2_mpu_irqs), | ||
696 | .main_clk = "gpt2_fck", | 649 | .main_clk = "gpt2_fck", |
697 | .prcm = { | 650 | .prcm = { |
698 | .omap2 = { | 651 | .omap2 = { |
@@ -711,9 +664,6 @@ static struct omap_hwmod omap3xxx_timer2_hwmod = { | |||
711 | 664 | ||
712 | /* timer3 */ | 665 | /* timer3 */ |
713 | static struct omap_hwmod omap3xxx_timer3_hwmod; | 666 | static struct omap_hwmod omap3xxx_timer3_hwmod; |
714 | static struct omap_hwmod_irq_info omap3xxx_timer3_mpu_irqs[] = { | ||
715 | { .irq = 39, }, | ||
716 | }; | ||
717 | 667 | ||
718 | static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = { | 668 | static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = { |
719 | { | 669 | { |
@@ -721,6 +671,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = { | |||
721 | .pa_end = 0x49034000 + SZ_1K - 1, | 671 | .pa_end = 0x49034000 + SZ_1K - 1, |
722 | .flags = ADDR_TYPE_RT | 672 | .flags = ADDR_TYPE_RT |
723 | }, | 673 | }, |
674 | { } | ||
724 | }; | 675 | }; |
725 | 676 | ||
726 | /* l4_per -> timer3 */ | 677 | /* l4_per -> timer3 */ |
@@ -729,7 +680,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = { | |||
729 | .slave = &omap3xxx_timer3_hwmod, | 680 | .slave = &omap3xxx_timer3_hwmod, |
730 | .clk = "gpt3_ick", | 681 | .clk = "gpt3_ick", |
731 | .addr = omap3xxx_timer3_addrs, | 682 | .addr = omap3xxx_timer3_addrs, |
732 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer3_addrs), | ||
733 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 683 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
734 | }; | 684 | }; |
735 | 685 | ||
@@ -741,8 +691,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer3_slaves[] = { | |||
741 | /* timer3 hwmod */ | 691 | /* timer3 hwmod */ |
742 | static struct omap_hwmod omap3xxx_timer3_hwmod = { | 692 | static struct omap_hwmod omap3xxx_timer3_hwmod = { |
743 | .name = "timer3", | 693 | .name = "timer3", |
744 | .mpu_irqs = omap3xxx_timer3_mpu_irqs, | 694 | .mpu_irqs = omap2_timer3_mpu_irqs, |
745 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer3_mpu_irqs), | ||
746 | .main_clk = "gpt3_fck", | 695 | .main_clk = "gpt3_fck", |
747 | .prcm = { | 696 | .prcm = { |
748 | .omap2 = { | 697 | .omap2 = { |
@@ -761,9 +710,6 @@ static struct omap_hwmod omap3xxx_timer3_hwmod = { | |||
761 | 710 | ||
762 | /* timer4 */ | 711 | /* timer4 */ |
763 | static struct omap_hwmod omap3xxx_timer4_hwmod; | 712 | static struct omap_hwmod omap3xxx_timer4_hwmod; |
764 | static struct omap_hwmod_irq_info omap3xxx_timer4_mpu_irqs[] = { | ||
765 | { .irq = 40, }, | ||
766 | }; | ||
767 | 713 | ||
768 | static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = { | 714 | static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = { |
769 | { | 715 | { |
@@ -771,6 +717,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = { | |||
771 | .pa_end = 0x49036000 + SZ_1K - 1, | 717 | .pa_end = 0x49036000 + SZ_1K - 1, |
772 | .flags = ADDR_TYPE_RT | 718 | .flags = ADDR_TYPE_RT |
773 | }, | 719 | }, |
720 | { } | ||
774 | }; | 721 | }; |
775 | 722 | ||
776 | /* l4_per -> timer4 */ | 723 | /* l4_per -> timer4 */ |
@@ -779,7 +726,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = { | |||
779 | .slave = &omap3xxx_timer4_hwmod, | 726 | .slave = &omap3xxx_timer4_hwmod, |
780 | .clk = "gpt4_ick", | 727 | .clk = "gpt4_ick", |
781 | .addr = omap3xxx_timer4_addrs, | 728 | .addr = omap3xxx_timer4_addrs, |
782 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer4_addrs), | ||
783 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 729 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
784 | }; | 730 | }; |
785 | 731 | ||
@@ -791,8 +737,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer4_slaves[] = { | |||
791 | /* timer4 hwmod */ | 737 | /* timer4 hwmod */ |
792 | static struct omap_hwmod omap3xxx_timer4_hwmod = { | 738 | static struct omap_hwmod omap3xxx_timer4_hwmod = { |
793 | .name = "timer4", | 739 | .name = "timer4", |
794 | .mpu_irqs = omap3xxx_timer4_mpu_irqs, | 740 | .mpu_irqs = omap2_timer4_mpu_irqs, |
795 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer4_mpu_irqs), | ||
796 | .main_clk = "gpt4_fck", | 741 | .main_clk = "gpt4_fck", |
797 | .prcm = { | 742 | .prcm = { |
798 | .omap2 = { | 743 | .omap2 = { |
@@ -811,9 +756,6 @@ static struct omap_hwmod omap3xxx_timer4_hwmod = { | |||
811 | 756 | ||
812 | /* timer5 */ | 757 | /* timer5 */ |
813 | static struct omap_hwmod omap3xxx_timer5_hwmod; | 758 | static struct omap_hwmod omap3xxx_timer5_hwmod; |
814 | static struct omap_hwmod_irq_info omap3xxx_timer5_mpu_irqs[] = { | ||
815 | { .irq = 41, }, | ||
816 | }; | ||
817 | 759 | ||
818 | static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = { | 760 | static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = { |
819 | { | 761 | { |
@@ -821,6 +763,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = { | |||
821 | .pa_end = 0x49038000 + SZ_1K - 1, | 763 | .pa_end = 0x49038000 + SZ_1K - 1, |
822 | .flags = ADDR_TYPE_RT | 764 | .flags = ADDR_TYPE_RT |
823 | }, | 765 | }, |
766 | { } | ||
824 | }; | 767 | }; |
825 | 768 | ||
826 | /* l4_per -> timer5 */ | 769 | /* l4_per -> timer5 */ |
@@ -829,7 +772,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = { | |||
829 | .slave = &omap3xxx_timer5_hwmod, | 772 | .slave = &omap3xxx_timer5_hwmod, |
830 | .clk = "gpt5_ick", | 773 | .clk = "gpt5_ick", |
831 | .addr = omap3xxx_timer5_addrs, | 774 | .addr = omap3xxx_timer5_addrs, |
832 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer5_addrs), | ||
833 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 775 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
834 | }; | 776 | }; |
835 | 777 | ||
@@ -841,8 +783,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer5_slaves[] = { | |||
841 | /* timer5 hwmod */ | 783 | /* timer5 hwmod */ |
842 | static struct omap_hwmod omap3xxx_timer5_hwmod = { | 784 | static struct omap_hwmod omap3xxx_timer5_hwmod = { |
843 | .name = "timer5", | 785 | .name = "timer5", |
844 | .mpu_irqs = omap3xxx_timer5_mpu_irqs, | 786 | .mpu_irqs = omap2_timer5_mpu_irqs, |
845 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer5_mpu_irqs), | ||
846 | .main_clk = "gpt5_fck", | 787 | .main_clk = "gpt5_fck", |
847 | .prcm = { | 788 | .prcm = { |
848 | .omap2 = { | 789 | .omap2 = { |
@@ -861,9 +802,6 @@ static struct omap_hwmod omap3xxx_timer5_hwmod = { | |||
861 | 802 | ||
862 | /* timer6 */ | 803 | /* timer6 */ |
863 | static struct omap_hwmod omap3xxx_timer6_hwmod; | 804 | static struct omap_hwmod omap3xxx_timer6_hwmod; |
864 | static struct omap_hwmod_irq_info omap3xxx_timer6_mpu_irqs[] = { | ||
865 | { .irq = 42, }, | ||
866 | }; | ||
867 | 805 | ||
868 | static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = { | 806 | static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = { |
869 | { | 807 | { |
@@ -871,6 +809,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = { | |||
871 | .pa_end = 0x4903A000 + SZ_1K - 1, | 809 | .pa_end = 0x4903A000 + SZ_1K - 1, |
872 | .flags = ADDR_TYPE_RT | 810 | .flags = ADDR_TYPE_RT |
873 | }, | 811 | }, |
812 | { } | ||
874 | }; | 813 | }; |
875 | 814 | ||
876 | /* l4_per -> timer6 */ | 815 | /* l4_per -> timer6 */ |
@@ -879,7 +818,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = { | |||
879 | .slave = &omap3xxx_timer6_hwmod, | 818 | .slave = &omap3xxx_timer6_hwmod, |
880 | .clk = "gpt6_ick", | 819 | .clk = "gpt6_ick", |
881 | .addr = omap3xxx_timer6_addrs, | 820 | .addr = omap3xxx_timer6_addrs, |
882 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer6_addrs), | ||
883 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 821 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
884 | }; | 822 | }; |
885 | 823 | ||
@@ -891,8 +829,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer6_slaves[] = { | |||
891 | /* timer6 hwmod */ | 829 | /* timer6 hwmod */ |
892 | static struct omap_hwmod omap3xxx_timer6_hwmod = { | 830 | static struct omap_hwmod omap3xxx_timer6_hwmod = { |
893 | .name = "timer6", | 831 | .name = "timer6", |
894 | .mpu_irqs = omap3xxx_timer6_mpu_irqs, | 832 | .mpu_irqs = omap2_timer6_mpu_irqs, |
895 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer6_mpu_irqs), | ||
896 | .main_clk = "gpt6_fck", | 833 | .main_clk = "gpt6_fck", |
897 | .prcm = { | 834 | .prcm = { |
898 | .omap2 = { | 835 | .omap2 = { |
@@ -911,9 +848,6 @@ static struct omap_hwmod omap3xxx_timer6_hwmod = { | |||
911 | 848 | ||
912 | /* timer7 */ | 849 | /* timer7 */ |
913 | static struct omap_hwmod omap3xxx_timer7_hwmod; | 850 | static struct omap_hwmod omap3xxx_timer7_hwmod; |
914 | static struct omap_hwmod_irq_info omap3xxx_timer7_mpu_irqs[] = { | ||
915 | { .irq = 43, }, | ||
916 | }; | ||
917 | 851 | ||
918 | static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = { | 852 | static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = { |
919 | { | 853 | { |
@@ -921,6 +855,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = { | |||
921 | .pa_end = 0x4903C000 + SZ_1K - 1, | 855 | .pa_end = 0x4903C000 + SZ_1K - 1, |
922 | .flags = ADDR_TYPE_RT | 856 | .flags = ADDR_TYPE_RT |
923 | }, | 857 | }, |
858 | { } | ||
924 | }; | 859 | }; |
925 | 860 | ||
926 | /* l4_per -> timer7 */ | 861 | /* l4_per -> timer7 */ |
@@ -929,7 +864,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = { | |||
929 | .slave = &omap3xxx_timer7_hwmod, | 864 | .slave = &omap3xxx_timer7_hwmod, |
930 | .clk = "gpt7_ick", | 865 | .clk = "gpt7_ick", |
931 | .addr = omap3xxx_timer7_addrs, | 866 | .addr = omap3xxx_timer7_addrs, |
932 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer7_addrs), | ||
933 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 867 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
934 | }; | 868 | }; |
935 | 869 | ||
@@ -941,8 +875,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer7_slaves[] = { | |||
941 | /* timer7 hwmod */ | 875 | /* timer7 hwmod */ |
942 | static struct omap_hwmod omap3xxx_timer7_hwmod = { | 876 | static struct omap_hwmod omap3xxx_timer7_hwmod = { |
943 | .name = "timer7", | 877 | .name = "timer7", |
944 | .mpu_irqs = omap3xxx_timer7_mpu_irqs, | 878 | .mpu_irqs = omap2_timer7_mpu_irqs, |
945 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer7_mpu_irqs), | ||
946 | .main_clk = "gpt7_fck", | 879 | .main_clk = "gpt7_fck", |
947 | .prcm = { | 880 | .prcm = { |
948 | .omap2 = { | 881 | .omap2 = { |
@@ -961,9 +894,6 @@ static struct omap_hwmod omap3xxx_timer7_hwmod = { | |||
961 | 894 | ||
962 | /* timer8 */ | 895 | /* timer8 */ |
963 | static struct omap_hwmod omap3xxx_timer8_hwmod; | 896 | static struct omap_hwmod omap3xxx_timer8_hwmod; |
964 | static struct omap_hwmod_irq_info omap3xxx_timer8_mpu_irqs[] = { | ||
965 | { .irq = 44, }, | ||
966 | }; | ||
967 | 897 | ||
968 | static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = { | 898 | static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = { |
969 | { | 899 | { |
@@ -971,6 +901,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = { | |||
971 | .pa_end = 0x4903E000 + SZ_1K - 1, | 901 | .pa_end = 0x4903E000 + SZ_1K - 1, |
972 | .flags = ADDR_TYPE_RT | 902 | .flags = ADDR_TYPE_RT |
973 | }, | 903 | }, |
904 | { } | ||
974 | }; | 905 | }; |
975 | 906 | ||
976 | /* l4_per -> timer8 */ | 907 | /* l4_per -> timer8 */ |
@@ -979,7 +910,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = { | |||
979 | .slave = &omap3xxx_timer8_hwmod, | 910 | .slave = &omap3xxx_timer8_hwmod, |
980 | .clk = "gpt8_ick", | 911 | .clk = "gpt8_ick", |
981 | .addr = omap3xxx_timer8_addrs, | 912 | .addr = omap3xxx_timer8_addrs, |
982 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer8_addrs), | ||
983 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 913 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
984 | }; | 914 | }; |
985 | 915 | ||
@@ -991,8 +921,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer8_slaves[] = { | |||
991 | /* timer8 hwmod */ | 921 | /* timer8 hwmod */ |
992 | static struct omap_hwmod omap3xxx_timer8_hwmod = { | 922 | static struct omap_hwmod omap3xxx_timer8_hwmod = { |
993 | .name = "timer8", | 923 | .name = "timer8", |
994 | .mpu_irqs = omap3xxx_timer8_mpu_irqs, | 924 | .mpu_irqs = omap2_timer8_mpu_irqs, |
995 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer8_mpu_irqs), | ||
996 | .main_clk = "gpt8_fck", | 925 | .main_clk = "gpt8_fck", |
997 | .prcm = { | 926 | .prcm = { |
998 | .omap2 = { | 927 | .omap2 = { |
@@ -1011,9 +940,6 @@ static struct omap_hwmod omap3xxx_timer8_hwmod = { | |||
1011 | 940 | ||
1012 | /* timer9 */ | 941 | /* timer9 */ |
1013 | static struct omap_hwmod omap3xxx_timer9_hwmod; | 942 | static struct omap_hwmod omap3xxx_timer9_hwmod; |
1014 | static struct omap_hwmod_irq_info omap3xxx_timer9_mpu_irqs[] = { | ||
1015 | { .irq = 45, }, | ||
1016 | }; | ||
1017 | 943 | ||
1018 | static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = { | 944 | static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = { |
1019 | { | 945 | { |
@@ -1021,6 +947,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = { | |||
1021 | .pa_end = 0x49040000 + SZ_1K - 1, | 947 | .pa_end = 0x49040000 + SZ_1K - 1, |
1022 | .flags = ADDR_TYPE_RT | 948 | .flags = ADDR_TYPE_RT |
1023 | }, | 949 | }, |
950 | { } | ||
1024 | }; | 951 | }; |
1025 | 952 | ||
1026 | /* l4_per -> timer9 */ | 953 | /* l4_per -> timer9 */ |
@@ -1029,7 +956,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = { | |||
1029 | .slave = &omap3xxx_timer9_hwmod, | 956 | .slave = &omap3xxx_timer9_hwmod, |
1030 | .clk = "gpt9_ick", | 957 | .clk = "gpt9_ick", |
1031 | .addr = omap3xxx_timer9_addrs, | 958 | .addr = omap3xxx_timer9_addrs, |
1032 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer9_addrs), | ||
1033 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 959 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1034 | }; | 960 | }; |
1035 | 961 | ||
@@ -1041,8 +967,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer9_slaves[] = { | |||
1041 | /* timer9 hwmod */ | 967 | /* timer9 hwmod */ |
1042 | static struct omap_hwmod omap3xxx_timer9_hwmod = { | 968 | static struct omap_hwmod omap3xxx_timer9_hwmod = { |
1043 | .name = "timer9", | 969 | .name = "timer9", |
1044 | .mpu_irqs = omap3xxx_timer9_mpu_irqs, | 970 | .mpu_irqs = omap2_timer9_mpu_irqs, |
1045 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer9_mpu_irqs), | ||
1046 | .main_clk = "gpt9_fck", | 971 | .main_clk = "gpt9_fck", |
1047 | .prcm = { | 972 | .prcm = { |
1048 | .omap2 = { | 973 | .omap2 = { |
@@ -1061,25 +986,13 @@ static struct omap_hwmod omap3xxx_timer9_hwmod = { | |||
1061 | 986 | ||
1062 | /* timer10 */ | 987 | /* timer10 */ |
1063 | static struct omap_hwmod omap3xxx_timer10_hwmod; | 988 | static struct omap_hwmod omap3xxx_timer10_hwmod; |
1064 | static struct omap_hwmod_irq_info omap3xxx_timer10_mpu_irqs[] = { | ||
1065 | { .irq = 46, }, | ||
1066 | }; | ||
1067 | |||
1068 | static struct omap_hwmod_addr_space omap3xxx_timer10_addrs[] = { | ||
1069 | { | ||
1070 | .pa_start = 0x48086000, | ||
1071 | .pa_end = 0x48086000 + SZ_1K - 1, | ||
1072 | .flags = ADDR_TYPE_RT | ||
1073 | }, | ||
1074 | }; | ||
1075 | 989 | ||
1076 | /* l4_core -> timer10 */ | 990 | /* l4_core -> timer10 */ |
1077 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = { | 991 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = { |
1078 | .master = &omap3xxx_l4_core_hwmod, | 992 | .master = &omap3xxx_l4_core_hwmod, |
1079 | .slave = &omap3xxx_timer10_hwmod, | 993 | .slave = &omap3xxx_timer10_hwmod, |
1080 | .clk = "gpt10_ick", | 994 | .clk = "gpt10_ick", |
1081 | .addr = omap3xxx_timer10_addrs, | 995 | .addr = omap2_timer10_addrs, |
1082 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer10_addrs), | ||
1083 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 996 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1084 | }; | 997 | }; |
1085 | 998 | ||
@@ -1091,8 +1004,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer10_slaves[] = { | |||
1091 | /* timer10 hwmod */ | 1004 | /* timer10 hwmod */ |
1092 | static struct omap_hwmod omap3xxx_timer10_hwmod = { | 1005 | static struct omap_hwmod omap3xxx_timer10_hwmod = { |
1093 | .name = "timer10", | 1006 | .name = "timer10", |
1094 | .mpu_irqs = omap3xxx_timer10_mpu_irqs, | 1007 | .mpu_irqs = omap2_timer10_mpu_irqs, |
1095 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer10_mpu_irqs), | ||
1096 | .main_clk = "gpt10_fck", | 1008 | .main_clk = "gpt10_fck", |
1097 | .prcm = { | 1009 | .prcm = { |
1098 | .omap2 = { | 1010 | .omap2 = { |
@@ -1111,25 +1023,13 @@ static struct omap_hwmod omap3xxx_timer10_hwmod = { | |||
1111 | 1023 | ||
1112 | /* timer11 */ | 1024 | /* timer11 */ |
1113 | static struct omap_hwmod omap3xxx_timer11_hwmod; | 1025 | static struct omap_hwmod omap3xxx_timer11_hwmod; |
1114 | static struct omap_hwmod_irq_info omap3xxx_timer11_mpu_irqs[] = { | ||
1115 | { .irq = 47, }, | ||
1116 | }; | ||
1117 | |||
1118 | static struct omap_hwmod_addr_space omap3xxx_timer11_addrs[] = { | ||
1119 | { | ||
1120 | .pa_start = 0x48088000, | ||
1121 | .pa_end = 0x48088000 + SZ_1K - 1, | ||
1122 | .flags = ADDR_TYPE_RT | ||
1123 | }, | ||
1124 | }; | ||
1125 | 1026 | ||
1126 | /* l4_core -> timer11 */ | 1027 | /* l4_core -> timer11 */ |
1127 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = { | 1028 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = { |
1128 | .master = &omap3xxx_l4_core_hwmod, | 1029 | .master = &omap3xxx_l4_core_hwmod, |
1129 | .slave = &omap3xxx_timer11_hwmod, | 1030 | .slave = &omap3xxx_timer11_hwmod, |
1130 | .clk = "gpt11_ick", | 1031 | .clk = "gpt11_ick", |
1131 | .addr = omap3xxx_timer11_addrs, | 1032 | .addr = omap2_timer11_addrs, |
1132 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer11_addrs), | ||
1133 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1033 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1134 | }; | 1034 | }; |
1135 | 1035 | ||
@@ -1141,8 +1041,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer11_slaves[] = { | |||
1141 | /* timer11 hwmod */ | 1041 | /* timer11 hwmod */ |
1142 | static struct omap_hwmod omap3xxx_timer11_hwmod = { | 1042 | static struct omap_hwmod omap3xxx_timer11_hwmod = { |
1143 | .name = "timer11", | 1043 | .name = "timer11", |
1144 | .mpu_irqs = omap3xxx_timer11_mpu_irqs, | 1044 | .mpu_irqs = omap2_timer11_mpu_irqs, |
1145 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer11_mpu_irqs), | ||
1146 | .main_clk = "gpt11_fck", | 1045 | .main_clk = "gpt11_fck", |
1147 | .prcm = { | 1046 | .prcm = { |
1148 | .omap2 = { | 1047 | .omap2 = { |
@@ -1163,6 +1062,7 @@ static struct omap_hwmod omap3xxx_timer11_hwmod = { | |||
1163 | static struct omap_hwmod omap3xxx_timer12_hwmod; | 1062 | static struct omap_hwmod omap3xxx_timer12_hwmod; |
1164 | static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = { | 1063 | static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = { |
1165 | { .irq = 95, }, | 1064 | { .irq = 95, }, |
1065 | { .irq = -1 } | ||
1166 | }; | 1066 | }; |
1167 | 1067 | ||
1168 | static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = { | 1068 | static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = { |
@@ -1171,6 +1071,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = { | |||
1171 | .pa_end = 0x48304000 + SZ_1K - 1, | 1071 | .pa_end = 0x48304000 + SZ_1K - 1, |
1172 | .flags = ADDR_TYPE_RT | 1072 | .flags = ADDR_TYPE_RT |
1173 | }, | 1073 | }, |
1074 | { } | ||
1174 | }; | 1075 | }; |
1175 | 1076 | ||
1176 | /* l4_core -> timer12 */ | 1077 | /* l4_core -> timer12 */ |
@@ -1179,7 +1080,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer12 = { | |||
1179 | .slave = &omap3xxx_timer12_hwmod, | 1080 | .slave = &omap3xxx_timer12_hwmod, |
1180 | .clk = "gpt12_ick", | 1081 | .clk = "gpt12_ick", |
1181 | .addr = omap3xxx_timer12_addrs, | 1082 | .addr = omap3xxx_timer12_addrs, |
1182 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer12_addrs), | ||
1183 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1083 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1184 | }; | 1084 | }; |
1185 | 1085 | ||
@@ -1192,7 +1092,6 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer12_slaves[] = { | |||
1192 | static struct omap_hwmod omap3xxx_timer12_hwmod = { | 1092 | static struct omap_hwmod omap3xxx_timer12_hwmod = { |
1193 | .name = "timer12", | 1093 | .name = "timer12", |
1194 | .mpu_irqs = omap3xxx_timer12_mpu_irqs, | 1094 | .mpu_irqs = omap3xxx_timer12_mpu_irqs, |
1195 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer12_mpu_irqs), | ||
1196 | .main_clk = "gpt12_fck", | 1095 | .main_clk = "gpt12_fck", |
1197 | .prcm = { | 1096 | .prcm = { |
1198 | .omap2 = { | 1097 | .omap2 = { |
@@ -1216,6 +1115,7 @@ static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = { | |||
1216 | .pa_end = 0x4831407f, | 1115 | .pa_end = 0x4831407f, |
1217 | .flags = ADDR_TYPE_RT | 1116 | .flags = ADDR_TYPE_RT |
1218 | }, | 1117 | }, |
1118 | { } | ||
1219 | }; | 1119 | }; |
1220 | 1120 | ||
1221 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = { | 1121 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = { |
@@ -1223,7 +1123,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = { | |||
1223 | .slave = &omap3xxx_wd_timer2_hwmod, | 1123 | .slave = &omap3xxx_wd_timer2_hwmod, |
1224 | .clk = "wdt2_ick", | 1124 | .clk = "wdt2_ick", |
1225 | .addr = omap3xxx_wd_timer2_addrs, | 1125 | .addr = omap3xxx_wd_timer2_addrs, |
1226 | .addr_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_addrs), | ||
1227 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1126 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1228 | }; | 1127 | }; |
1229 | 1128 | ||
@@ -1291,45 +1190,16 @@ static struct omap_hwmod omap3xxx_wd_timer2_hwmod = { | |||
1291 | .flags = HWMOD_SWSUP_SIDLE, | 1190 | .flags = HWMOD_SWSUP_SIDLE, |
1292 | }; | 1191 | }; |
1293 | 1192 | ||
1294 | /* UART common */ | ||
1295 | |||
1296 | static struct omap_hwmod_class_sysconfig uart_sysc = { | ||
1297 | .rev_offs = 0x50, | ||
1298 | .sysc_offs = 0x54, | ||
1299 | .syss_offs = 0x58, | ||
1300 | .sysc_flags = (SYSC_HAS_SIDLEMODE | | ||
1301 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
1302 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
1303 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1304 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1305 | }; | ||
1306 | |||
1307 | static struct omap_hwmod_class uart_class = { | ||
1308 | .name = "uart", | ||
1309 | .sysc = &uart_sysc, | ||
1310 | }; | ||
1311 | |||
1312 | /* UART1 */ | 1193 | /* UART1 */ |
1313 | 1194 | ||
1314 | static struct omap_hwmod_irq_info uart1_mpu_irqs[] = { | ||
1315 | { .irq = INT_24XX_UART1_IRQ, }, | ||
1316 | }; | ||
1317 | |||
1318 | static struct omap_hwmod_dma_info uart1_sdma_reqs[] = { | ||
1319 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, }, | ||
1320 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, }, | ||
1321 | }; | ||
1322 | |||
1323 | static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = { | 1195 | static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = { |
1324 | &omap3_l4_core__uart1, | 1196 | &omap3_l4_core__uart1, |
1325 | }; | 1197 | }; |
1326 | 1198 | ||
1327 | static struct omap_hwmod omap3xxx_uart1_hwmod = { | 1199 | static struct omap_hwmod omap3xxx_uart1_hwmod = { |
1328 | .name = "uart1", | 1200 | .name = "uart1", |
1329 | .mpu_irqs = uart1_mpu_irqs, | 1201 | .mpu_irqs = omap2_uart1_mpu_irqs, |
1330 | .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs), | 1202 | .sdma_reqs = omap2_uart1_sdma_reqs, |
1331 | .sdma_reqs = uart1_sdma_reqs, | ||
1332 | .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs), | ||
1333 | .main_clk = "uart1_fck", | 1203 | .main_clk = "uart1_fck", |
1334 | .prcm = { | 1204 | .prcm = { |
1335 | .omap2 = { | 1205 | .omap2 = { |
@@ -1342,31 +1212,20 @@ static struct omap_hwmod omap3xxx_uart1_hwmod = { | |||
1342 | }, | 1212 | }, |
1343 | .slaves = omap3xxx_uart1_slaves, | 1213 | .slaves = omap3xxx_uart1_slaves, |
1344 | .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves), | 1214 | .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves), |
1345 | .class = &uart_class, | 1215 | .class = &omap2_uart_class, |
1346 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | 1216 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), |
1347 | }; | 1217 | }; |
1348 | 1218 | ||
1349 | /* UART2 */ | 1219 | /* UART2 */ |
1350 | 1220 | ||
1351 | static struct omap_hwmod_irq_info uart2_mpu_irqs[] = { | ||
1352 | { .irq = INT_24XX_UART2_IRQ, }, | ||
1353 | }; | ||
1354 | |||
1355 | static struct omap_hwmod_dma_info uart2_sdma_reqs[] = { | ||
1356 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, }, | ||
1357 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, }, | ||
1358 | }; | ||
1359 | |||
1360 | static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = { | 1221 | static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = { |
1361 | &omap3_l4_core__uart2, | 1222 | &omap3_l4_core__uart2, |
1362 | }; | 1223 | }; |
1363 | 1224 | ||
1364 | static struct omap_hwmod omap3xxx_uart2_hwmod = { | 1225 | static struct omap_hwmod omap3xxx_uart2_hwmod = { |
1365 | .name = "uart2", | 1226 | .name = "uart2", |
1366 | .mpu_irqs = uart2_mpu_irqs, | 1227 | .mpu_irqs = omap2_uart2_mpu_irqs, |
1367 | .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs), | 1228 | .sdma_reqs = omap2_uart2_sdma_reqs, |
1368 | .sdma_reqs = uart2_sdma_reqs, | ||
1369 | .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs), | ||
1370 | .main_clk = "uart2_fck", | 1229 | .main_clk = "uart2_fck", |
1371 | .prcm = { | 1230 | .prcm = { |
1372 | .omap2 = { | 1231 | .omap2 = { |
@@ -1379,31 +1238,20 @@ static struct omap_hwmod omap3xxx_uart2_hwmod = { | |||
1379 | }, | 1238 | }, |
1380 | .slaves = omap3xxx_uart2_slaves, | 1239 | .slaves = omap3xxx_uart2_slaves, |
1381 | .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves), | 1240 | .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves), |
1382 | .class = &uart_class, | 1241 | .class = &omap2_uart_class, |
1383 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | 1242 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), |
1384 | }; | 1243 | }; |
1385 | 1244 | ||
1386 | /* UART3 */ | 1245 | /* UART3 */ |
1387 | 1246 | ||
1388 | static struct omap_hwmod_irq_info uart3_mpu_irqs[] = { | ||
1389 | { .irq = INT_24XX_UART3_IRQ, }, | ||
1390 | }; | ||
1391 | |||
1392 | static struct omap_hwmod_dma_info uart3_sdma_reqs[] = { | ||
1393 | { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, }, | ||
1394 | { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, }, | ||
1395 | }; | ||
1396 | |||
1397 | static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = { | 1247 | static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = { |
1398 | &omap3_l4_per__uart3, | 1248 | &omap3_l4_per__uart3, |
1399 | }; | 1249 | }; |
1400 | 1250 | ||
1401 | static struct omap_hwmod omap3xxx_uart3_hwmod = { | 1251 | static struct omap_hwmod omap3xxx_uart3_hwmod = { |
1402 | .name = "uart3", | 1252 | .name = "uart3", |
1403 | .mpu_irqs = uart3_mpu_irqs, | 1253 | .mpu_irqs = omap2_uart3_mpu_irqs, |
1404 | .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs), | 1254 | .sdma_reqs = omap2_uart3_sdma_reqs, |
1405 | .sdma_reqs = uart3_sdma_reqs, | ||
1406 | .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs), | ||
1407 | .main_clk = "uart3_fck", | 1255 | .main_clk = "uart3_fck", |
1408 | .prcm = { | 1256 | .prcm = { |
1409 | .omap2 = { | 1257 | .omap2 = { |
@@ -1416,7 +1264,7 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = { | |||
1416 | }, | 1264 | }, |
1417 | .slaves = omap3xxx_uart3_slaves, | 1265 | .slaves = omap3xxx_uart3_slaves, |
1418 | .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves), | 1266 | .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves), |
1419 | .class = &uart_class, | 1267 | .class = &omap2_uart_class, |
1420 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | 1268 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), |
1421 | }; | 1269 | }; |
1422 | 1270 | ||
@@ -1424,11 +1272,13 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = { | |||
1424 | 1272 | ||
1425 | static struct omap_hwmod_irq_info uart4_mpu_irqs[] = { | 1273 | static struct omap_hwmod_irq_info uart4_mpu_irqs[] = { |
1426 | { .irq = INT_36XX_UART4_IRQ, }, | 1274 | { .irq = INT_36XX_UART4_IRQ, }, |
1275 | { .irq = -1 } | ||
1427 | }; | 1276 | }; |
1428 | 1277 | ||
1429 | static struct omap_hwmod_dma_info uart4_sdma_reqs[] = { | 1278 | static struct omap_hwmod_dma_info uart4_sdma_reqs[] = { |
1430 | { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, }, | 1279 | { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, }, |
1431 | { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, }, | 1280 | { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, }, |
1281 | { .dma_req = -1 } | ||
1432 | }; | 1282 | }; |
1433 | 1283 | ||
1434 | static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = { | 1284 | static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = { |
@@ -1438,9 +1288,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = { | |||
1438 | static struct omap_hwmod omap3xxx_uart4_hwmod = { | 1288 | static struct omap_hwmod omap3xxx_uart4_hwmod = { |
1439 | .name = "uart4", | 1289 | .name = "uart4", |
1440 | .mpu_irqs = uart4_mpu_irqs, | 1290 | .mpu_irqs = uart4_mpu_irqs, |
1441 | .mpu_irqs_cnt = ARRAY_SIZE(uart4_mpu_irqs), | ||
1442 | .sdma_reqs = uart4_sdma_reqs, | 1291 | .sdma_reqs = uart4_sdma_reqs, |
1443 | .sdma_reqs_cnt = ARRAY_SIZE(uart4_sdma_reqs), | ||
1444 | .main_clk = "uart4_fck", | 1292 | .main_clk = "uart4_fck", |
1445 | .prcm = { | 1293 | .prcm = { |
1446 | .omap2 = { | 1294 | .omap2 = { |
@@ -1453,7 +1301,7 @@ static struct omap_hwmod omap3xxx_uart4_hwmod = { | |||
1453 | }, | 1301 | }, |
1454 | .slaves = omap3xxx_uart4_slaves, | 1302 | .slaves = omap3xxx_uart4_slaves, |
1455 | .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves), | 1303 | .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves), |
1456 | .class = &uart_class, | 1304 | .class = &omap2_uart_class, |
1457 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1), | 1305 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1), |
1458 | }; | 1306 | }; |
1459 | 1307 | ||
@@ -1462,27 +1310,10 @@ static struct omap_hwmod_class i2c_class = { | |||
1462 | .sysc = &i2c_sysc, | 1310 | .sysc = &i2c_sysc, |
1463 | }; | 1311 | }; |
1464 | 1312 | ||
1465 | /* | ||
1466 | * 'dss' class | ||
1467 | * display sub-system | ||
1468 | */ | ||
1469 | |||
1470 | static struct omap_hwmod_class_sysconfig omap3xxx_dss_sysc = { | ||
1471 | .rev_offs = 0x0000, | ||
1472 | .sysc_offs = 0x0010, | ||
1473 | .syss_offs = 0x0014, | ||
1474 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1475 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1476 | }; | ||
1477 | |||
1478 | static struct omap_hwmod_class omap3xxx_dss_hwmod_class = { | ||
1479 | .name = "dss", | ||
1480 | .sysc = &omap3xxx_dss_sysc, | ||
1481 | }; | ||
1482 | |||
1483 | static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = { | 1313 | static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = { |
1484 | { .name = "dispc", .dma_req = 5 }, | 1314 | { .name = "dispc", .dma_req = 5 }, |
1485 | { .name = "dsi1", .dma_req = 74 }, | 1315 | { .name = "dsi1", .dma_req = 74 }, |
1316 | { .dma_req = -1 } | ||
1486 | }; | 1317 | }; |
1487 | 1318 | ||
1488 | /* dss */ | 1319 | /* dss */ |
@@ -1491,21 +1322,12 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = { | |||
1491 | &omap3xxx_dss__l3, | 1322 | &omap3xxx_dss__l3, |
1492 | }; | 1323 | }; |
1493 | 1324 | ||
1494 | static struct omap_hwmod_addr_space omap3xxx_dss_addrs[] = { | ||
1495 | { | ||
1496 | .pa_start = 0x48050000, | ||
1497 | .pa_end = 0x480503FF, | ||
1498 | .flags = ADDR_TYPE_RT | ||
1499 | }, | ||
1500 | }; | ||
1501 | |||
1502 | /* l4_core -> dss */ | 1325 | /* l4_core -> dss */ |
1503 | static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = { | 1326 | static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = { |
1504 | .master = &omap3xxx_l4_core_hwmod, | 1327 | .master = &omap3xxx_l4_core_hwmod, |
1505 | .slave = &omap3430es1_dss_core_hwmod, | 1328 | .slave = &omap3430es1_dss_core_hwmod, |
1506 | .clk = "dss_ick", | 1329 | .clk = "dss_ick", |
1507 | .addr = omap3xxx_dss_addrs, | 1330 | .addr = omap2_dss_addrs, |
1508 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_addrs), | ||
1509 | .fw = { | 1331 | .fw = { |
1510 | .omap2 = { | 1332 | .omap2 = { |
1511 | .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION, | 1333 | .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION, |
@@ -1520,8 +1342,7 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = { | |||
1520 | .master = &omap3xxx_l4_core_hwmod, | 1342 | .master = &omap3xxx_l4_core_hwmod, |
1521 | .slave = &omap3xxx_dss_core_hwmod, | 1343 | .slave = &omap3xxx_dss_core_hwmod, |
1522 | .clk = "dss_ick", | 1344 | .clk = "dss_ick", |
1523 | .addr = omap3xxx_dss_addrs, | 1345 | .addr = omap2_dss_addrs, |
1524 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_addrs), | ||
1525 | .fw = { | 1346 | .fw = { |
1526 | .omap2 = { | 1347 | .omap2 = { |
1527 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION, | 1348 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION, |
@@ -1549,11 +1370,9 @@ static struct omap_hwmod_opt_clk dss_opt_clks[] = { | |||
1549 | 1370 | ||
1550 | static struct omap_hwmod omap3430es1_dss_core_hwmod = { | 1371 | static struct omap_hwmod omap3430es1_dss_core_hwmod = { |
1551 | .name = "dss_core", | 1372 | .name = "dss_core", |
1552 | .class = &omap3xxx_dss_hwmod_class, | 1373 | .class = &omap2_dss_hwmod_class, |
1553 | .main_clk = "dss1_alwon_fck", /* instead of dss_fck */ | 1374 | .main_clk = "dss1_alwon_fck", /* instead of dss_fck */ |
1554 | .sdma_reqs = omap3xxx_dss_sdma_chs, | 1375 | .sdma_reqs = omap3xxx_dss_sdma_chs, |
1555 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs), | ||
1556 | |||
1557 | .prcm = { | 1376 | .prcm = { |
1558 | .omap2 = { | 1377 | .omap2 = { |
1559 | .prcm_reg_id = 1, | 1378 | .prcm_reg_id = 1, |
@@ -1575,11 +1394,9 @@ static struct omap_hwmod omap3430es1_dss_core_hwmod = { | |||
1575 | 1394 | ||
1576 | static struct omap_hwmod omap3xxx_dss_core_hwmod = { | 1395 | static struct omap_hwmod omap3xxx_dss_core_hwmod = { |
1577 | .name = "dss_core", | 1396 | .name = "dss_core", |
1578 | .class = &omap3xxx_dss_hwmod_class, | 1397 | .class = &omap2_dss_hwmod_class, |
1579 | .main_clk = "dss1_alwon_fck", /* instead of dss_fck */ | 1398 | .main_clk = "dss1_alwon_fck", /* instead of dss_fck */ |
1580 | .sdma_reqs = omap3xxx_dss_sdma_chs, | 1399 | .sdma_reqs = omap3xxx_dss_sdma_chs, |
1581 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs), | ||
1582 | |||
1583 | .prcm = { | 1400 | .prcm = { |
1584 | .omap2 = { | 1401 | .omap2 = { |
1585 | .prcm_reg_id = 1, | 1402 | .prcm_reg_id = 1, |
@@ -1600,47 +1417,12 @@ static struct omap_hwmod omap3xxx_dss_core_hwmod = { | |||
1600 | CHIP_IS_OMAP3630ES1 | CHIP_GE_OMAP3630ES1_1), | 1417 | CHIP_IS_OMAP3630ES1 | CHIP_GE_OMAP3630ES1_1), |
1601 | }; | 1418 | }; |
1602 | 1419 | ||
1603 | /* | ||
1604 | * 'dispc' class | ||
1605 | * display controller | ||
1606 | */ | ||
1607 | |||
1608 | static struct omap_hwmod_class_sysconfig omap3xxx_dispc_sysc = { | ||
1609 | .rev_offs = 0x0000, | ||
1610 | .sysc_offs = 0x0010, | ||
1611 | .syss_offs = 0x0014, | ||
1612 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | | ||
1613 | SYSC_HAS_MIDLEMODE | SYSC_HAS_ENAWAKEUP | | ||
1614 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1615 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
1616 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
1617 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1618 | }; | ||
1619 | |||
1620 | static struct omap_hwmod_class omap3xxx_dispc_hwmod_class = { | ||
1621 | .name = "dispc", | ||
1622 | .sysc = &omap3xxx_dispc_sysc, | ||
1623 | }; | ||
1624 | |||
1625 | static struct omap_hwmod_irq_info omap3xxx_dispc_irqs[] = { | ||
1626 | { .irq = 25 }, | ||
1627 | }; | ||
1628 | |||
1629 | static struct omap_hwmod_addr_space omap3xxx_dss_dispc_addrs[] = { | ||
1630 | { | ||
1631 | .pa_start = 0x48050400, | ||
1632 | .pa_end = 0x480507FF, | ||
1633 | .flags = ADDR_TYPE_RT | ||
1634 | }, | ||
1635 | }; | ||
1636 | |||
1637 | /* l4_core -> dss_dispc */ | 1420 | /* l4_core -> dss_dispc */ |
1638 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = { | 1421 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = { |
1639 | .master = &omap3xxx_l4_core_hwmod, | 1422 | .master = &omap3xxx_l4_core_hwmod, |
1640 | .slave = &omap3xxx_dss_dispc_hwmod, | 1423 | .slave = &omap3xxx_dss_dispc_hwmod, |
1641 | .clk = "dss_ick", | 1424 | .clk = "dss_ick", |
1642 | .addr = omap3xxx_dss_dispc_addrs, | 1425 | .addr = omap2_dss_dispc_addrs, |
1643 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_addrs), | ||
1644 | .fw = { | 1426 | .fw = { |
1645 | .omap2 = { | 1427 | .omap2 = { |
1646 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION, | 1428 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION, |
@@ -1658,9 +1440,8 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = { | |||
1658 | 1440 | ||
1659 | static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { | 1441 | static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { |
1660 | .name = "dss_dispc", | 1442 | .name = "dss_dispc", |
1661 | .class = &omap3xxx_dispc_hwmod_class, | 1443 | .class = &omap2_dispc_hwmod_class, |
1662 | .mpu_irqs = omap3xxx_dispc_irqs, | 1444 | .mpu_irqs = omap2_dispc_irqs, |
1663 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dispc_irqs), | ||
1664 | .main_clk = "dss1_alwon_fck", | 1445 | .main_clk = "dss1_alwon_fck", |
1665 | .prcm = { | 1446 | .prcm = { |
1666 | .omap2 = { | 1447 | .omap2 = { |
@@ -1688,6 +1469,7 @@ static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = { | |||
1688 | 1469 | ||
1689 | static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = { | 1470 | static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = { |
1690 | { .irq = 25 }, | 1471 | { .irq = 25 }, |
1472 | { .irq = -1 } | ||
1691 | }; | 1473 | }; |
1692 | 1474 | ||
1693 | /* dss_dsi1 */ | 1475 | /* dss_dsi1 */ |
@@ -1697,6 +1479,7 @@ static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = { | |||
1697 | .pa_end = 0x4804FFFF, | 1479 | .pa_end = 0x4804FFFF, |
1698 | .flags = ADDR_TYPE_RT | 1480 | .flags = ADDR_TYPE_RT |
1699 | }, | 1481 | }, |
1482 | { } | ||
1700 | }; | 1483 | }; |
1701 | 1484 | ||
1702 | /* l4_core -> dss_dsi1 */ | 1485 | /* l4_core -> dss_dsi1 */ |
@@ -1704,7 +1487,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = { | |||
1704 | .master = &omap3xxx_l4_core_hwmod, | 1487 | .master = &omap3xxx_l4_core_hwmod, |
1705 | .slave = &omap3xxx_dss_dsi1_hwmod, | 1488 | .slave = &omap3xxx_dss_dsi1_hwmod, |
1706 | .addr = omap3xxx_dss_dsi1_addrs, | 1489 | .addr = omap3xxx_dss_dsi1_addrs, |
1707 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_addrs), | ||
1708 | .fw = { | 1490 | .fw = { |
1709 | .omap2 = { | 1491 | .omap2 = { |
1710 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION, | 1492 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION, |
@@ -1724,7 +1506,6 @@ static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = { | |||
1724 | .name = "dss_dsi1", | 1506 | .name = "dss_dsi1", |
1725 | .class = &omap3xxx_dsi_hwmod_class, | 1507 | .class = &omap3xxx_dsi_hwmod_class, |
1726 | .mpu_irqs = omap3xxx_dsi1_irqs, | 1508 | .mpu_irqs = omap3xxx_dsi1_irqs, |
1727 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dsi1_irqs), | ||
1728 | .main_clk = "dss1_alwon_fck", | 1509 | .main_clk = "dss1_alwon_fck", |
1729 | .prcm = { | 1510 | .prcm = { |
1730 | .omap2 = { | 1511 | .omap2 = { |
@@ -1741,41 +1522,12 @@ static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = { | |||
1741 | .flags = HWMOD_NO_IDLEST, | 1522 | .flags = HWMOD_NO_IDLEST, |
1742 | }; | 1523 | }; |
1743 | 1524 | ||
1744 | /* | ||
1745 | * 'rfbi' class | ||
1746 | * remote frame buffer interface | ||
1747 | */ | ||
1748 | |||
1749 | static struct omap_hwmod_class_sysconfig omap3xxx_rfbi_sysc = { | ||
1750 | .rev_offs = 0x0000, | ||
1751 | .sysc_offs = 0x0010, | ||
1752 | .syss_offs = 0x0014, | ||
1753 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
1754 | SYSC_HAS_AUTOIDLE), | ||
1755 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1756 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1757 | }; | ||
1758 | |||
1759 | static struct omap_hwmod_class omap3xxx_rfbi_hwmod_class = { | ||
1760 | .name = "rfbi", | ||
1761 | .sysc = &omap3xxx_rfbi_sysc, | ||
1762 | }; | ||
1763 | |||
1764 | static struct omap_hwmod_addr_space omap3xxx_dss_rfbi_addrs[] = { | ||
1765 | { | ||
1766 | .pa_start = 0x48050800, | ||
1767 | .pa_end = 0x48050BFF, | ||
1768 | .flags = ADDR_TYPE_RT | ||
1769 | }, | ||
1770 | }; | ||
1771 | |||
1772 | /* l4_core -> dss_rfbi */ | 1525 | /* l4_core -> dss_rfbi */ |
1773 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = { | 1526 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = { |
1774 | .master = &omap3xxx_l4_core_hwmod, | 1527 | .master = &omap3xxx_l4_core_hwmod, |
1775 | .slave = &omap3xxx_dss_rfbi_hwmod, | 1528 | .slave = &omap3xxx_dss_rfbi_hwmod, |
1776 | .clk = "dss_ick", | 1529 | .clk = "dss_ick", |
1777 | .addr = omap3xxx_dss_rfbi_addrs, | 1530 | .addr = omap2_dss_rfbi_addrs, |
1778 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_addrs), | ||
1779 | .fw = { | 1531 | .fw = { |
1780 | .omap2 = { | 1532 | .omap2 = { |
1781 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION, | 1533 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION, |
@@ -1793,7 +1545,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = { | |||
1793 | 1545 | ||
1794 | static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = { | 1546 | static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = { |
1795 | .name = "dss_rfbi", | 1547 | .name = "dss_rfbi", |
1796 | .class = &omap3xxx_rfbi_hwmod_class, | 1548 | .class = &omap2_rfbi_hwmod_class, |
1797 | .main_clk = "dss1_alwon_fck", | 1549 | .main_clk = "dss1_alwon_fck", |
1798 | .prcm = { | 1550 | .prcm = { |
1799 | .omap2 = { | 1551 | .omap2 = { |
@@ -1810,31 +1562,12 @@ static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = { | |||
1810 | .flags = HWMOD_NO_IDLEST, | 1562 | .flags = HWMOD_NO_IDLEST, |
1811 | }; | 1563 | }; |
1812 | 1564 | ||
1813 | /* | ||
1814 | * 'venc' class | ||
1815 | * video encoder | ||
1816 | */ | ||
1817 | |||
1818 | static struct omap_hwmod_class omap3xxx_venc_hwmod_class = { | ||
1819 | .name = "venc", | ||
1820 | }; | ||
1821 | |||
1822 | /* dss_venc */ | ||
1823 | static struct omap_hwmod_addr_space omap3xxx_dss_venc_addrs[] = { | ||
1824 | { | ||
1825 | .pa_start = 0x48050C00, | ||
1826 | .pa_end = 0x48050FFF, | ||
1827 | .flags = ADDR_TYPE_RT | ||
1828 | }, | ||
1829 | }; | ||
1830 | |||
1831 | /* l4_core -> dss_venc */ | 1565 | /* l4_core -> dss_venc */ |
1832 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = { | 1566 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = { |
1833 | .master = &omap3xxx_l4_core_hwmod, | 1567 | .master = &omap3xxx_l4_core_hwmod, |
1834 | .slave = &omap3xxx_dss_venc_hwmod, | 1568 | .slave = &omap3xxx_dss_venc_hwmod, |
1835 | .clk = "dss_tv_fck", | 1569 | .clk = "dss_tv_fck", |
1836 | .addr = omap3xxx_dss_venc_addrs, | 1570 | .addr = omap2_dss_venc_addrs, |
1837 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_venc_addrs), | ||
1838 | .fw = { | 1571 | .fw = { |
1839 | .omap2 = { | 1572 | .omap2 = { |
1840 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION, | 1573 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION, |
@@ -1853,7 +1586,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = { | |||
1853 | 1586 | ||
1854 | static struct omap_hwmod omap3xxx_dss_venc_hwmod = { | 1587 | static struct omap_hwmod omap3xxx_dss_venc_hwmod = { |
1855 | .name = "dss_venc", | 1588 | .name = "dss_venc", |
1856 | .class = &omap3xxx_venc_hwmod_class, | 1589 | .class = &omap2_venc_hwmod_class, |
1857 | .main_clk = "dss1_alwon_fck", | 1590 | .main_clk = "dss1_alwon_fck", |
1858 | .prcm = { | 1591 | .prcm = { |
1859 | .omap2 = { | 1592 | .omap2 = { |
@@ -1876,25 +1609,14 @@ static struct omap_i2c_dev_attr i2c1_dev_attr = { | |||
1876 | .fifo_depth = 8, /* bytes */ | 1609 | .fifo_depth = 8, /* bytes */ |
1877 | }; | 1610 | }; |
1878 | 1611 | ||
1879 | static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = { | ||
1880 | { .irq = INT_24XX_I2C1_IRQ, }, | ||
1881 | }; | ||
1882 | |||
1883 | static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = { | ||
1884 | { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX }, | ||
1885 | { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX }, | ||
1886 | }; | ||
1887 | |||
1888 | static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = { | 1612 | static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = { |
1889 | &omap3_l4_core__i2c1, | 1613 | &omap3_l4_core__i2c1, |
1890 | }; | 1614 | }; |
1891 | 1615 | ||
1892 | static struct omap_hwmod omap3xxx_i2c1_hwmod = { | 1616 | static struct omap_hwmod omap3xxx_i2c1_hwmod = { |
1893 | .name = "i2c1", | 1617 | .name = "i2c1", |
1894 | .mpu_irqs = i2c1_mpu_irqs, | 1618 | .mpu_irqs = omap2_i2c1_mpu_irqs, |
1895 | .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs), | 1619 | .sdma_reqs = omap2_i2c1_sdma_reqs, |
1896 | .sdma_reqs = i2c1_sdma_reqs, | ||
1897 | .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs), | ||
1898 | .main_clk = "i2c1_fck", | 1620 | .main_clk = "i2c1_fck", |
1899 | .prcm = { | 1621 | .prcm = { |
1900 | .omap2 = { | 1622 | .omap2 = { |
@@ -1918,25 +1640,14 @@ static struct omap_i2c_dev_attr i2c2_dev_attr = { | |||
1918 | .fifo_depth = 8, /* bytes */ | 1640 | .fifo_depth = 8, /* bytes */ |
1919 | }; | 1641 | }; |
1920 | 1642 | ||
1921 | static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = { | ||
1922 | { .irq = INT_24XX_I2C2_IRQ, }, | ||
1923 | }; | ||
1924 | |||
1925 | static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = { | ||
1926 | { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX }, | ||
1927 | { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX }, | ||
1928 | }; | ||
1929 | |||
1930 | static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = { | 1643 | static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = { |
1931 | &omap3_l4_core__i2c2, | 1644 | &omap3_l4_core__i2c2, |
1932 | }; | 1645 | }; |
1933 | 1646 | ||
1934 | static struct omap_hwmod omap3xxx_i2c2_hwmod = { | 1647 | static struct omap_hwmod omap3xxx_i2c2_hwmod = { |
1935 | .name = "i2c2", | 1648 | .name = "i2c2", |
1936 | .mpu_irqs = i2c2_mpu_irqs, | 1649 | .mpu_irqs = omap2_i2c2_mpu_irqs, |
1937 | .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs), | 1650 | .sdma_reqs = omap2_i2c2_sdma_reqs, |
1938 | .sdma_reqs = i2c2_sdma_reqs, | ||
1939 | .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs), | ||
1940 | .main_clk = "i2c2_fck", | 1651 | .main_clk = "i2c2_fck", |
1941 | .prcm = { | 1652 | .prcm = { |
1942 | .omap2 = { | 1653 | .omap2 = { |
@@ -1962,11 +1673,13 @@ static struct omap_i2c_dev_attr i2c3_dev_attr = { | |||
1962 | 1673 | ||
1963 | static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = { | 1674 | static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = { |
1964 | { .irq = INT_34XX_I2C3_IRQ, }, | 1675 | { .irq = INT_34XX_I2C3_IRQ, }, |
1676 | { .irq = -1 } | ||
1965 | }; | 1677 | }; |
1966 | 1678 | ||
1967 | static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = { | 1679 | static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = { |
1968 | { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX }, | 1680 | { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX }, |
1969 | { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX }, | 1681 | { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX }, |
1682 | { .dma_req = -1 } | ||
1970 | }; | 1683 | }; |
1971 | 1684 | ||
1972 | static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = { | 1685 | static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = { |
@@ -1976,9 +1689,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = { | |||
1976 | static struct omap_hwmod omap3xxx_i2c3_hwmod = { | 1689 | static struct omap_hwmod omap3xxx_i2c3_hwmod = { |
1977 | .name = "i2c3", | 1690 | .name = "i2c3", |
1978 | .mpu_irqs = i2c3_mpu_irqs, | 1691 | .mpu_irqs = i2c3_mpu_irqs, |
1979 | .mpu_irqs_cnt = ARRAY_SIZE(i2c3_mpu_irqs), | ||
1980 | .sdma_reqs = i2c3_sdma_reqs, | 1692 | .sdma_reqs = i2c3_sdma_reqs, |
1981 | .sdma_reqs_cnt = ARRAY_SIZE(i2c3_sdma_reqs), | ||
1982 | .main_clk = "i2c3_fck", | 1693 | .main_clk = "i2c3_fck", |
1983 | .prcm = { | 1694 | .prcm = { |
1984 | .omap2 = { | 1695 | .omap2 = { |
@@ -2003,13 +1714,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = { | |||
2003 | .pa_end = 0x483101ff, | 1714 | .pa_end = 0x483101ff, |
2004 | .flags = ADDR_TYPE_RT | 1715 | .flags = ADDR_TYPE_RT |
2005 | }, | 1716 | }, |
1717 | { } | ||
2006 | }; | 1718 | }; |
2007 | 1719 | ||
2008 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = { | 1720 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = { |
2009 | .master = &omap3xxx_l4_wkup_hwmod, | 1721 | .master = &omap3xxx_l4_wkup_hwmod, |
2010 | .slave = &omap3xxx_gpio1_hwmod, | 1722 | .slave = &omap3xxx_gpio1_hwmod, |
2011 | .addr = omap3xxx_gpio1_addrs, | 1723 | .addr = omap3xxx_gpio1_addrs, |
2012 | .addr_cnt = ARRAY_SIZE(omap3xxx_gpio1_addrs), | ||
2013 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1724 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2014 | }; | 1725 | }; |
2015 | 1726 | ||
@@ -2020,13 +1731,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = { | |||
2020 | .pa_end = 0x490501ff, | 1731 | .pa_end = 0x490501ff, |
2021 | .flags = ADDR_TYPE_RT | 1732 | .flags = ADDR_TYPE_RT |
2022 | }, | 1733 | }, |
1734 | { } | ||
2023 | }; | 1735 | }; |
2024 | 1736 | ||
2025 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = { | 1737 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = { |
2026 | .master = &omap3xxx_l4_per_hwmod, | 1738 | .master = &omap3xxx_l4_per_hwmod, |
2027 | .slave = &omap3xxx_gpio2_hwmod, | 1739 | .slave = &omap3xxx_gpio2_hwmod, |
2028 | .addr = omap3xxx_gpio2_addrs, | 1740 | .addr = omap3xxx_gpio2_addrs, |
2029 | .addr_cnt = ARRAY_SIZE(omap3xxx_gpio2_addrs), | ||
2030 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1741 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2031 | }; | 1742 | }; |
2032 | 1743 | ||
@@ -2037,13 +1748,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = { | |||
2037 | .pa_end = 0x490521ff, | 1748 | .pa_end = 0x490521ff, |
2038 | .flags = ADDR_TYPE_RT | 1749 | .flags = ADDR_TYPE_RT |
2039 | }, | 1750 | }, |
1751 | { } | ||
2040 | }; | 1752 | }; |
2041 | 1753 | ||
2042 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = { | 1754 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = { |
2043 | .master = &omap3xxx_l4_per_hwmod, | 1755 | .master = &omap3xxx_l4_per_hwmod, |
2044 | .slave = &omap3xxx_gpio3_hwmod, | 1756 | .slave = &omap3xxx_gpio3_hwmod, |
2045 | .addr = omap3xxx_gpio3_addrs, | 1757 | .addr = omap3xxx_gpio3_addrs, |
2046 | .addr_cnt = ARRAY_SIZE(omap3xxx_gpio3_addrs), | ||
2047 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1758 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2048 | }; | 1759 | }; |
2049 | 1760 | ||
@@ -2054,13 +1765,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = { | |||
2054 | .pa_end = 0x490541ff, | 1765 | .pa_end = 0x490541ff, |
2055 | .flags = ADDR_TYPE_RT | 1766 | .flags = ADDR_TYPE_RT |
2056 | }, | 1767 | }, |
1768 | { } | ||
2057 | }; | 1769 | }; |
2058 | 1770 | ||
2059 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = { | 1771 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = { |
2060 | .master = &omap3xxx_l4_per_hwmod, | 1772 | .master = &omap3xxx_l4_per_hwmod, |
2061 | .slave = &omap3xxx_gpio4_hwmod, | 1773 | .slave = &omap3xxx_gpio4_hwmod, |
2062 | .addr = omap3xxx_gpio4_addrs, | 1774 | .addr = omap3xxx_gpio4_addrs, |
2063 | .addr_cnt = ARRAY_SIZE(omap3xxx_gpio4_addrs), | ||
2064 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1775 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2065 | }; | 1776 | }; |
2066 | 1777 | ||
@@ -2071,13 +1782,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = { | |||
2071 | .pa_end = 0x490561ff, | 1782 | .pa_end = 0x490561ff, |
2072 | .flags = ADDR_TYPE_RT | 1783 | .flags = ADDR_TYPE_RT |
2073 | }, | 1784 | }, |
1785 | { } | ||
2074 | }; | 1786 | }; |
2075 | 1787 | ||
2076 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = { | 1788 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = { |
2077 | .master = &omap3xxx_l4_per_hwmod, | 1789 | .master = &omap3xxx_l4_per_hwmod, |
2078 | .slave = &omap3xxx_gpio5_hwmod, | 1790 | .slave = &omap3xxx_gpio5_hwmod, |
2079 | .addr = omap3xxx_gpio5_addrs, | 1791 | .addr = omap3xxx_gpio5_addrs, |
2080 | .addr_cnt = ARRAY_SIZE(omap3xxx_gpio5_addrs), | ||
2081 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1792 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2082 | }; | 1793 | }; |
2083 | 1794 | ||
@@ -2088,13 +1799,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = { | |||
2088 | .pa_end = 0x490581ff, | 1799 | .pa_end = 0x490581ff, |
2089 | .flags = ADDR_TYPE_RT | 1800 | .flags = ADDR_TYPE_RT |
2090 | }, | 1801 | }, |
1802 | { } | ||
2091 | }; | 1803 | }; |
2092 | 1804 | ||
2093 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = { | 1805 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = { |
2094 | .master = &omap3xxx_l4_per_hwmod, | 1806 | .master = &omap3xxx_l4_per_hwmod, |
2095 | .slave = &omap3xxx_gpio6_hwmod, | 1807 | .slave = &omap3xxx_gpio6_hwmod, |
2096 | .addr = omap3xxx_gpio6_addrs, | 1808 | .addr = omap3xxx_gpio6_addrs, |
2097 | .addr_cnt = ARRAY_SIZE(omap3xxx_gpio6_addrs), | ||
2098 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1809 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2099 | }; | 1810 | }; |
2100 | 1811 | ||
@@ -2127,10 +1838,6 @@ static struct omap_gpio_dev_attr gpio_dev_attr = { | |||
2127 | }; | 1838 | }; |
2128 | 1839 | ||
2129 | /* gpio1 */ | 1840 | /* gpio1 */ |
2130 | static struct omap_hwmod_irq_info omap3xxx_gpio1_irqs[] = { | ||
2131 | { .irq = 29 }, /* INT_34XX_GPIO_BANK1 */ | ||
2132 | }; | ||
2133 | |||
2134 | static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { | 1841 | static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { |
2135 | { .role = "dbclk", .clk = "gpio1_dbck", }, | 1842 | { .role = "dbclk", .clk = "gpio1_dbck", }, |
2136 | }; | 1843 | }; |
@@ -2142,8 +1849,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = { | |||
2142 | static struct omap_hwmod omap3xxx_gpio1_hwmod = { | 1849 | static struct omap_hwmod omap3xxx_gpio1_hwmod = { |
2143 | .name = "gpio1", | 1850 | .name = "gpio1", |
2144 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1851 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
2145 | .mpu_irqs = omap3xxx_gpio1_irqs, | 1852 | .mpu_irqs = omap2_gpio1_irqs, |
2146 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio1_irqs), | ||
2147 | .main_clk = "gpio1_ick", | 1853 | .main_clk = "gpio1_ick", |
2148 | .opt_clks = gpio1_opt_clks, | 1854 | .opt_clks = gpio1_opt_clks, |
2149 | .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks), | 1855 | .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks), |
@@ -2164,10 +1870,6 @@ static struct omap_hwmod omap3xxx_gpio1_hwmod = { | |||
2164 | }; | 1870 | }; |
2165 | 1871 | ||
2166 | /* gpio2 */ | 1872 | /* gpio2 */ |
2167 | static struct omap_hwmod_irq_info omap3xxx_gpio2_irqs[] = { | ||
2168 | { .irq = 30 }, /* INT_34XX_GPIO_BANK2 */ | ||
2169 | }; | ||
2170 | |||
2171 | static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { | 1873 | static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { |
2172 | { .role = "dbclk", .clk = "gpio2_dbck", }, | 1874 | { .role = "dbclk", .clk = "gpio2_dbck", }, |
2173 | }; | 1875 | }; |
@@ -2179,8 +1881,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = { | |||
2179 | static struct omap_hwmod omap3xxx_gpio2_hwmod = { | 1881 | static struct omap_hwmod omap3xxx_gpio2_hwmod = { |
2180 | .name = "gpio2", | 1882 | .name = "gpio2", |
2181 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1883 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
2182 | .mpu_irqs = omap3xxx_gpio2_irqs, | 1884 | .mpu_irqs = omap2_gpio2_irqs, |
2183 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio2_irqs), | ||
2184 | .main_clk = "gpio2_ick", | 1885 | .main_clk = "gpio2_ick", |
2185 | .opt_clks = gpio2_opt_clks, | 1886 | .opt_clks = gpio2_opt_clks, |
2186 | .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks), | 1887 | .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks), |
@@ -2201,10 +1902,6 @@ static struct omap_hwmod omap3xxx_gpio2_hwmod = { | |||
2201 | }; | 1902 | }; |
2202 | 1903 | ||
2203 | /* gpio3 */ | 1904 | /* gpio3 */ |
2204 | static struct omap_hwmod_irq_info omap3xxx_gpio3_irqs[] = { | ||
2205 | { .irq = 31 }, /* INT_34XX_GPIO_BANK3 */ | ||
2206 | }; | ||
2207 | |||
2208 | static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { | 1905 | static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { |
2209 | { .role = "dbclk", .clk = "gpio3_dbck", }, | 1906 | { .role = "dbclk", .clk = "gpio3_dbck", }, |
2210 | }; | 1907 | }; |
@@ -2216,8 +1913,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = { | |||
2216 | static struct omap_hwmod omap3xxx_gpio3_hwmod = { | 1913 | static struct omap_hwmod omap3xxx_gpio3_hwmod = { |
2217 | .name = "gpio3", | 1914 | .name = "gpio3", |
2218 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1915 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
2219 | .mpu_irqs = omap3xxx_gpio3_irqs, | 1916 | .mpu_irqs = omap2_gpio3_irqs, |
2220 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio3_irqs), | ||
2221 | .main_clk = "gpio3_ick", | 1917 | .main_clk = "gpio3_ick", |
2222 | .opt_clks = gpio3_opt_clks, | 1918 | .opt_clks = gpio3_opt_clks, |
2223 | .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks), | 1919 | .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks), |
@@ -2238,10 +1934,6 @@ static struct omap_hwmod omap3xxx_gpio3_hwmod = { | |||
2238 | }; | 1934 | }; |
2239 | 1935 | ||
2240 | /* gpio4 */ | 1936 | /* gpio4 */ |
2241 | static struct omap_hwmod_irq_info omap3xxx_gpio4_irqs[] = { | ||
2242 | { .irq = 32 }, /* INT_34XX_GPIO_BANK4 */ | ||
2243 | }; | ||
2244 | |||
2245 | static struct omap_hwmod_opt_clk gpio4_opt_clks[] = { | 1937 | static struct omap_hwmod_opt_clk gpio4_opt_clks[] = { |
2246 | { .role = "dbclk", .clk = "gpio4_dbck", }, | 1938 | { .role = "dbclk", .clk = "gpio4_dbck", }, |
2247 | }; | 1939 | }; |
@@ -2253,8 +1945,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = { | |||
2253 | static struct omap_hwmod omap3xxx_gpio4_hwmod = { | 1945 | static struct omap_hwmod omap3xxx_gpio4_hwmod = { |
2254 | .name = "gpio4", | 1946 | .name = "gpio4", |
2255 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1947 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
2256 | .mpu_irqs = omap3xxx_gpio4_irqs, | 1948 | .mpu_irqs = omap2_gpio4_irqs, |
2257 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio4_irqs), | ||
2258 | .main_clk = "gpio4_ick", | 1949 | .main_clk = "gpio4_ick", |
2259 | .opt_clks = gpio4_opt_clks, | 1950 | .opt_clks = gpio4_opt_clks, |
2260 | .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks), | 1951 | .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks), |
@@ -2277,6 +1968,7 @@ static struct omap_hwmod omap3xxx_gpio4_hwmod = { | |||
2277 | /* gpio5 */ | 1968 | /* gpio5 */ |
2278 | static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = { | 1969 | static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = { |
2279 | { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */ | 1970 | { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */ |
1971 | { .irq = -1 } | ||
2280 | }; | 1972 | }; |
2281 | 1973 | ||
2282 | static struct omap_hwmod_opt_clk gpio5_opt_clks[] = { | 1974 | static struct omap_hwmod_opt_clk gpio5_opt_clks[] = { |
@@ -2291,7 +1983,6 @@ static struct omap_hwmod omap3xxx_gpio5_hwmod = { | |||
2291 | .name = "gpio5", | 1983 | .name = "gpio5", |
2292 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1984 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
2293 | .mpu_irqs = omap3xxx_gpio5_irqs, | 1985 | .mpu_irqs = omap3xxx_gpio5_irqs, |
2294 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio5_irqs), | ||
2295 | .main_clk = "gpio5_ick", | 1986 | .main_clk = "gpio5_ick", |
2296 | .opt_clks = gpio5_opt_clks, | 1987 | .opt_clks = gpio5_opt_clks, |
2297 | .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks), | 1988 | .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks), |
@@ -2314,6 +2005,7 @@ static struct omap_hwmod omap3xxx_gpio5_hwmod = { | |||
2314 | /* gpio6 */ | 2005 | /* gpio6 */ |
2315 | static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = { | 2006 | static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = { |
2316 | { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */ | 2007 | { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */ |
2008 | { .irq = -1 } | ||
2317 | }; | 2009 | }; |
2318 | 2010 | ||
2319 | static struct omap_hwmod_opt_clk gpio6_opt_clks[] = { | 2011 | static struct omap_hwmod_opt_clk gpio6_opt_clks[] = { |
@@ -2328,7 +2020,6 @@ static struct omap_hwmod omap3xxx_gpio6_hwmod = { | |||
2328 | .name = "gpio6", | 2020 | .name = "gpio6", |
2329 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 2021 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
2330 | .mpu_irqs = omap3xxx_gpio6_irqs, | 2022 | .mpu_irqs = omap3xxx_gpio6_irqs, |
2331 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio6_irqs), | ||
2332 | .main_clk = "gpio6_ick", | 2023 | .main_clk = "gpio6_ick", |
2333 | .opt_clks = gpio6_opt_clks, | 2024 | .opt_clks = gpio6_opt_clks, |
2334 | .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks), | 2025 | .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks), |
@@ -2382,19 +2073,13 @@ static struct omap_hwmod_class omap3xxx_dma_hwmod_class = { | |||
2382 | }; | 2073 | }; |
2383 | 2074 | ||
2384 | /* dma_system */ | 2075 | /* dma_system */ |
2385 | static struct omap_hwmod_irq_info omap3xxx_dma_system_irqs[] = { | ||
2386 | { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */ | ||
2387 | { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */ | ||
2388 | { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */ | ||
2389 | { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */ | ||
2390 | }; | ||
2391 | |||
2392 | static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = { | 2076 | static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = { |
2393 | { | 2077 | { |
2394 | .pa_start = 0x48056000, | 2078 | .pa_start = 0x48056000, |
2395 | .pa_end = 0x48056fff, | 2079 | .pa_end = 0x48056fff, |
2396 | .flags = ADDR_TYPE_RT | 2080 | .flags = ADDR_TYPE_RT |
2397 | }, | 2081 | }, |
2082 | { } | ||
2398 | }; | 2083 | }; |
2399 | 2084 | ||
2400 | /* dma_system master ports */ | 2085 | /* dma_system master ports */ |
@@ -2408,7 +2093,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = { | |||
2408 | .slave = &omap3xxx_dma_system_hwmod, | 2093 | .slave = &omap3xxx_dma_system_hwmod, |
2409 | .clk = "core_l4_ick", | 2094 | .clk = "core_l4_ick", |
2410 | .addr = omap3xxx_dma_system_addrs, | 2095 | .addr = omap3xxx_dma_system_addrs, |
2411 | .addr_cnt = ARRAY_SIZE(omap3xxx_dma_system_addrs), | ||
2412 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2096 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2413 | }; | 2097 | }; |
2414 | 2098 | ||
@@ -2420,8 +2104,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = { | |||
2420 | static struct omap_hwmod omap3xxx_dma_system_hwmod = { | 2104 | static struct omap_hwmod omap3xxx_dma_system_hwmod = { |
2421 | .name = "dma", | 2105 | .name = "dma", |
2422 | .class = &omap3xxx_dma_hwmod_class, | 2106 | .class = &omap3xxx_dma_hwmod_class, |
2423 | .mpu_irqs = omap3xxx_dma_system_irqs, | 2107 | .mpu_irqs = omap2_dma_system_irqs, |
2424 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dma_system_irqs), | ||
2425 | .main_clk = "core_l3_ick", | 2108 | .main_clk = "core_l3_ick", |
2426 | .prcm = { | 2109 | .prcm = { |
2427 | .omap2 = { | 2110 | .omap2 = { |
@@ -2466,11 +2149,7 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = { | |||
2466 | { .name = "irq", .irq = 16 }, | 2149 | { .name = "irq", .irq = 16 }, |
2467 | { .name = "tx", .irq = 59 }, | 2150 | { .name = "tx", .irq = 59 }, |
2468 | { .name = "rx", .irq = 60 }, | 2151 | { .name = "rx", .irq = 60 }, |
2469 | }; | 2152 | { .irq = -1 } |
2470 | |||
2471 | static struct omap_hwmod_dma_info omap3xxx_mcbsp1_sdma_chs[] = { | ||
2472 | { .name = "rx", .dma_req = 32 }, | ||
2473 | { .name = "tx", .dma_req = 31 }, | ||
2474 | }; | 2153 | }; |
2475 | 2154 | ||
2476 | static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = { | 2155 | static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = { |
@@ -2480,6 +2159,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = { | |||
2480 | .pa_end = 0x480740ff, | 2159 | .pa_end = 0x480740ff, |
2481 | .flags = ADDR_TYPE_RT | 2160 | .flags = ADDR_TYPE_RT |
2482 | }, | 2161 | }, |
2162 | { } | ||
2483 | }; | 2163 | }; |
2484 | 2164 | ||
2485 | /* l4_core -> mcbsp1 */ | 2165 | /* l4_core -> mcbsp1 */ |
@@ -2488,7 +2168,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = { | |||
2488 | .slave = &omap3xxx_mcbsp1_hwmod, | 2168 | .slave = &omap3xxx_mcbsp1_hwmod, |
2489 | .clk = "mcbsp1_ick", | 2169 | .clk = "mcbsp1_ick", |
2490 | .addr = omap3xxx_mcbsp1_addrs, | 2170 | .addr = omap3xxx_mcbsp1_addrs, |
2491 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_addrs), | ||
2492 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2171 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2493 | }; | 2172 | }; |
2494 | 2173 | ||
@@ -2501,9 +2180,7 @@ static struct omap_hwmod omap3xxx_mcbsp1_hwmod = { | |||
2501 | .name = "mcbsp1", | 2180 | .name = "mcbsp1", |
2502 | .class = &omap3xxx_mcbsp_hwmod_class, | 2181 | .class = &omap3xxx_mcbsp_hwmod_class, |
2503 | .mpu_irqs = omap3xxx_mcbsp1_irqs, | 2182 | .mpu_irqs = omap3xxx_mcbsp1_irqs, |
2504 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_irqs), | 2183 | .sdma_reqs = omap2_mcbsp1_sdma_reqs, |
2505 | .sdma_reqs = omap3xxx_mcbsp1_sdma_chs, | ||
2506 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_sdma_chs), | ||
2507 | .main_clk = "mcbsp1_fck", | 2184 | .main_clk = "mcbsp1_fck", |
2508 | .prcm = { | 2185 | .prcm = { |
2509 | .omap2 = { | 2186 | .omap2 = { |
@@ -2524,11 +2201,7 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = { | |||
2524 | { .name = "irq", .irq = 17 }, | 2201 | { .name = "irq", .irq = 17 }, |
2525 | { .name = "tx", .irq = 62 }, | 2202 | { .name = "tx", .irq = 62 }, |
2526 | { .name = "rx", .irq = 63 }, | 2203 | { .name = "rx", .irq = 63 }, |
2527 | }; | 2204 | { .irq = -1 } |
2528 | |||
2529 | static struct omap_hwmod_dma_info omap3xxx_mcbsp2_sdma_chs[] = { | ||
2530 | { .name = "rx", .dma_req = 34 }, | ||
2531 | { .name = "tx", .dma_req = 33 }, | ||
2532 | }; | 2205 | }; |
2533 | 2206 | ||
2534 | static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = { | 2207 | static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = { |
@@ -2538,6 +2211,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = { | |||
2538 | .pa_end = 0x490220ff, | 2211 | .pa_end = 0x490220ff, |
2539 | .flags = ADDR_TYPE_RT | 2212 | .flags = ADDR_TYPE_RT |
2540 | }, | 2213 | }, |
2214 | { } | ||
2541 | }; | 2215 | }; |
2542 | 2216 | ||
2543 | /* l4_per -> mcbsp2 */ | 2217 | /* l4_per -> mcbsp2 */ |
@@ -2546,7 +2220,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = { | |||
2546 | .slave = &omap3xxx_mcbsp2_hwmod, | 2220 | .slave = &omap3xxx_mcbsp2_hwmod, |
2547 | .clk = "mcbsp2_ick", | 2221 | .clk = "mcbsp2_ick", |
2548 | .addr = omap3xxx_mcbsp2_addrs, | 2222 | .addr = omap3xxx_mcbsp2_addrs, |
2549 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_addrs), | ||
2550 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2223 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2551 | }; | 2224 | }; |
2552 | 2225 | ||
@@ -2563,9 +2236,7 @@ static struct omap_hwmod omap3xxx_mcbsp2_hwmod = { | |||
2563 | .name = "mcbsp2", | 2236 | .name = "mcbsp2", |
2564 | .class = &omap3xxx_mcbsp_hwmod_class, | 2237 | .class = &omap3xxx_mcbsp_hwmod_class, |
2565 | .mpu_irqs = omap3xxx_mcbsp2_irqs, | 2238 | .mpu_irqs = omap3xxx_mcbsp2_irqs, |
2566 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_irqs), | 2239 | .sdma_reqs = omap2_mcbsp2_sdma_reqs, |
2567 | .sdma_reqs = omap3xxx_mcbsp2_sdma_chs, | ||
2568 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sdma_chs), | ||
2569 | .main_clk = "mcbsp2_fck", | 2240 | .main_clk = "mcbsp2_fck", |
2570 | .prcm = { | 2241 | .prcm = { |
2571 | .omap2 = { | 2242 | .omap2 = { |
@@ -2587,11 +2258,7 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = { | |||
2587 | { .name = "irq", .irq = 22 }, | 2258 | { .name = "irq", .irq = 22 }, |
2588 | { .name = "tx", .irq = 89 }, | 2259 | { .name = "tx", .irq = 89 }, |
2589 | { .name = "rx", .irq = 90 }, | 2260 | { .name = "rx", .irq = 90 }, |
2590 | }; | 2261 | { .irq = -1 } |
2591 | |||
2592 | static struct omap_hwmod_dma_info omap3xxx_mcbsp3_sdma_chs[] = { | ||
2593 | { .name = "rx", .dma_req = 18 }, | ||
2594 | { .name = "tx", .dma_req = 17 }, | ||
2595 | }; | 2262 | }; |
2596 | 2263 | ||
2597 | static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = { | 2264 | static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = { |
@@ -2601,6 +2268,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = { | |||
2601 | .pa_end = 0x490240ff, | 2268 | .pa_end = 0x490240ff, |
2602 | .flags = ADDR_TYPE_RT | 2269 | .flags = ADDR_TYPE_RT |
2603 | }, | 2270 | }, |
2271 | { } | ||
2604 | }; | 2272 | }; |
2605 | 2273 | ||
2606 | /* l4_per -> mcbsp3 */ | 2274 | /* l4_per -> mcbsp3 */ |
@@ -2609,7 +2277,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = { | |||
2609 | .slave = &omap3xxx_mcbsp3_hwmod, | 2277 | .slave = &omap3xxx_mcbsp3_hwmod, |
2610 | .clk = "mcbsp3_ick", | 2278 | .clk = "mcbsp3_ick", |
2611 | .addr = omap3xxx_mcbsp3_addrs, | 2279 | .addr = omap3xxx_mcbsp3_addrs, |
2612 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_addrs), | ||
2613 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2280 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2614 | }; | 2281 | }; |
2615 | 2282 | ||
@@ -2626,9 +2293,7 @@ static struct omap_hwmod omap3xxx_mcbsp3_hwmod = { | |||
2626 | .name = "mcbsp3", | 2293 | .name = "mcbsp3", |
2627 | .class = &omap3xxx_mcbsp_hwmod_class, | 2294 | .class = &omap3xxx_mcbsp_hwmod_class, |
2628 | .mpu_irqs = omap3xxx_mcbsp3_irqs, | 2295 | .mpu_irqs = omap3xxx_mcbsp3_irqs, |
2629 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_irqs), | 2296 | .sdma_reqs = omap2_mcbsp3_sdma_reqs, |
2630 | .sdma_reqs = omap3xxx_mcbsp3_sdma_chs, | ||
2631 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sdma_chs), | ||
2632 | .main_clk = "mcbsp3_fck", | 2297 | .main_clk = "mcbsp3_fck", |
2633 | .prcm = { | 2298 | .prcm = { |
2634 | .omap2 = { | 2299 | .omap2 = { |
@@ -2650,11 +2315,13 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = { | |||
2650 | { .name = "irq", .irq = 23 }, | 2315 | { .name = "irq", .irq = 23 }, |
2651 | { .name = "tx", .irq = 54 }, | 2316 | { .name = "tx", .irq = 54 }, |
2652 | { .name = "rx", .irq = 55 }, | 2317 | { .name = "rx", .irq = 55 }, |
2318 | { .irq = -1 } | ||
2653 | }; | 2319 | }; |
2654 | 2320 | ||
2655 | static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = { | 2321 | static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = { |
2656 | { .name = "rx", .dma_req = 20 }, | 2322 | { .name = "rx", .dma_req = 20 }, |
2657 | { .name = "tx", .dma_req = 19 }, | 2323 | { .name = "tx", .dma_req = 19 }, |
2324 | { .dma_req = -1 } | ||
2658 | }; | 2325 | }; |
2659 | 2326 | ||
2660 | static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = { | 2327 | static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = { |
@@ -2664,6 +2331,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = { | |||
2664 | .pa_end = 0x490260ff, | 2331 | .pa_end = 0x490260ff, |
2665 | .flags = ADDR_TYPE_RT | 2332 | .flags = ADDR_TYPE_RT |
2666 | }, | 2333 | }, |
2334 | { } | ||
2667 | }; | 2335 | }; |
2668 | 2336 | ||
2669 | /* l4_per -> mcbsp4 */ | 2337 | /* l4_per -> mcbsp4 */ |
@@ -2672,7 +2340,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = { | |||
2672 | .slave = &omap3xxx_mcbsp4_hwmod, | 2340 | .slave = &omap3xxx_mcbsp4_hwmod, |
2673 | .clk = "mcbsp4_ick", | 2341 | .clk = "mcbsp4_ick", |
2674 | .addr = omap3xxx_mcbsp4_addrs, | 2342 | .addr = omap3xxx_mcbsp4_addrs, |
2675 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_addrs), | ||
2676 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2343 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2677 | }; | 2344 | }; |
2678 | 2345 | ||
@@ -2685,9 +2352,7 @@ static struct omap_hwmod omap3xxx_mcbsp4_hwmod = { | |||
2685 | .name = "mcbsp4", | 2352 | .name = "mcbsp4", |
2686 | .class = &omap3xxx_mcbsp_hwmod_class, | 2353 | .class = &omap3xxx_mcbsp_hwmod_class, |
2687 | .mpu_irqs = omap3xxx_mcbsp4_irqs, | 2354 | .mpu_irqs = omap3xxx_mcbsp4_irqs, |
2688 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_irqs), | ||
2689 | .sdma_reqs = omap3xxx_mcbsp4_sdma_chs, | 2355 | .sdma_reqs = omap3xxx_mcbsp4_sdma_chs, |
2690 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_sdma_chs), | ||
2691 | .main_clk = "mcbsp4_fck", | 2356 | .main_clk = "mcbsp4_fck", |
2692 | .prcm = { | 2357 | .prcm = { |
2693 | .omap2 = { | 2358 | .omap2 = { |
@@ -2708,11 +2373,13 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = { | |||
2708 | { .name = "irq", .irq = 27 }, | 2373 | { .name = "irq", .irq = 27 }, |
2709 | { .name = "tx", .irq = 81 }, | 2374 | { .name = "tx", .irq = 81 }, |
2710 | { .name = "rx", .irq = 82 }, | 2375 | { .name = "rx", .irq = 82 }, |
2376 | { .irq = -1 } | ||
2711 | }; | 2377 | }; |
2712 | 2378 | ||
2713 | static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = { | 2379 | static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = { |
2714 | { .name = "rx", .dma_req = 22 }, | 2380 | { .name = "rx", .dma_req = 22 }, |
2715 | { .name = "tx", .dma_req = 21 }, | 2381 | { .name = "tx", .dma_req = 21 }, |
2382 | { .dma_req = -1 } | ||
2716 | }; | 2383 | }; |
2717 | 2384 | ||
2718 | static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = { | 2385 | static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = { |
@@ -2722,6 +2389,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = { | |||
2722 | .pa_end = 0x480960ff, | 2389 | .pa_end = 0x480960ff, |
2723 | .flags = ADDR_TYPE_RT | 2390 | .flags = ADDR_TYPE_RT |
2724 | }, | 2391 | }, |
2392 | { } | ||
2725 | }; | 2393 | }; |
2726 | 2394 | ||
2727 | /* l4_core -> mcbsp5 */ | 2395 | /* l4_core -> mcbsp5 */ |
@@ -2730,7 +2398,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = { | |||
2730 | .slave = &omap3xxx_mcbsp5_hwmod, | 2398 | .slave = &omap3xxx_mcbsp5_hwmod, |
2731 | .clk = "mcbsp5_ick", | 2399 | .clk = "mcbsp5_ick", |
2732 | .addr = omap3xxx_mcbsp5_addrs, | 2400 | .addr = omap3xxx_mcbsp5_addrs, |
2733 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_addrs), | ||
2734 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2401 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2735 | }; | 2402 | }; |
2736 | 2403 | ||
@@ -2743,9 +2410,7 @@ static struct omap_hwmod omap3xxx_mcbsp5_hwmod = { | |||
2743 | .name = "mcbsp5", | 2410 | .name = "mcbsp5", |
2744 | .class = &omap3xxx_mcbsp_hwmod_class, | 2411 | .class = &omap3xxx_mcbsp_hwmod_class, |
2745 | .mpu_irqs = omap3xxx_mcbsp5_irqs, | 2412 | .mpu_irqs = omap3xxx_mcbsp5_irqs, |
2746 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_irqs), | ||
2747 | .sdma_reqs = omap3xxx_mcbsp5_sdma_chs, | 2413 | .sdma_reqs = omap3xxx_mcbsp5_sdma_chs, |
2748 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_sdma_chs), | ||
2749 | .main_clk = "mcbsp5_fck", | 2414 | .main_clk = "mcbsp5_fck", |
2750 | .prcm = { | 2415 | .prcm = { |
2751 | .omap2 = { | 2416 | .omap2 = { |
@@ -2776,6 +2441,7 @@ static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = { | |||
2776 | /* mcbsp2_sidetone */ | 2441 | /* mcbsp2_sidetone */ |
2777 | static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = { | 2442 | static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = { |
2778 | { .name = "irq", .irq = 4 }, | 2443 | { .name = "irq", .irq = 4 }, |
2444 | { .irq = -1 } | ||
2779 | }; | 2445 | }; |
2780 | 2446 | ||
2781 | static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = { | 2447 | static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = { |
@@ -2785,6 +2451,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = { | |||
2785 | .pa_end = 0x490280ff, | 2451 | .pa_end = 0x490280ff, |
2786 | .flags = ADDR_TYPE_RT | 2452 | .flags = ADDR_TYPE_RT |
2787 | }, | 2453 | }, |
2454 | { } | ||
2788 | }; | 2455 | }; |
2789 | 2456 | ||
2790 | /* l4_per -> mcbsp2_sidetone */ | 2457 | /* l4_per -> mcbsp2_sidetone */ |
@@ -2793,7 +2460,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = { | |||
2793 | .slave = &omap3xxx_mcbsp2_sidetone_hwmod, | 2460 | .slave = &omap3xxx_mcbsp2_sidetone_hwmod, |
2794 | .clk = "mcbsp2_ick", | 2461 | .clk = "mcbsp2_ick", |
2795 | .addr = omap3xxx_mcbsp2_sidetone_addrs, | 2462 | .addr = omap3xxx_mcbsp2_sidetone_addrs, |
2796 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_addrs), | ||
2797 | .user = OCP_USER_MPU, | 2463 | .user = OCP_USER_MPU, |
2798 | }; | 2464 | }; |
2799 | 2465 | ||
@@ -2806,7 +2472,6 @@ static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = { | |||
2806 | .name = "mcbsp2_sidetone", | 2472 | .name = "mcbsp2_sidetone", |
2807 | .class = &omap3xxx_mcbsp_sidetone_hwmod_class, | 2473 | .class = &omap3xxx_mcbsp_sidetone_hwmod_class, |
2808 | .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs, | 2474 | .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs, |
2809 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_irqs), | ||
2810 | .main_clk = "mcbsp2_fck", | 2475 | .main_clk = "mcbsp2_fck", |
2811 | .prcm = { | 2476 | .prcm = { |
2812 | .omap2 = { | 2477 | .omap2 = { |
@@ -2825,6 +2490,7 @@ static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = { | |||
2825 | /* mcbsp3_sidetone */ | 2490 | /* mcbsp3_sidetone */ |
2826 | static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = { | 2491 | static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = { |
2827 | { .name = "irq", .irq = 5 }, | 2492 | { .name = "irq", .irq = 5 }, |
2493 | { .irq = -1 } | ||
2828 | }; | 2494 | }; |
2829 | 2495 | ||
2830 | static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = { | 2496 | static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = { |
@@ -2834,6 +2500,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = { | |||
2834 | .pa_end = 0x4902A0ff, | 2500 | .pa_end = 0x4902A0ff, |
2835 | .flags = ADDR_TYPE_RT | 2501 | .flags = ADDR_TYPE_RT |
2836 | }, | 2502 | }, |
2503 | { } | ||
2837 | }; | 2504 | }; |
2838 | 2505 | ||
2839 | /* l4_per -> mcbsp3_sidetone */ | 2506 | /* l4_per -> mcbsp3_sidetone */ |
@@ -2842,7 +2509,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = { | |||
2842 | .slave = &omap3xxx_mcbsp3_sidetone_hwmod, | 2509 | .slave = &omap3xxx_mcbsp3_sidetone_hwmod, |
2843 | .clk = "mcbsp3_ick", | 2510 | .clk = "mcbsp3_ick", |
2844 | .addr = omap3xxx_mcbsp3_sidetone_addrs, | 2511 | .addr = omap3xxx_mcbsp3_sidetone_addrs, |
2845 | .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_addrs), | ||
2846 | .user = OCP_USER_MPU, | 2512 | .user = OCP_USER_MPU, |
2847 | }; | 2513 | }; |
2848 | 2514 | ||
@@ -2855,7 +2521,6 @@ static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = { | |||
2855 | .name = "mcbsp3_sidetone", | 2521 | .name = "mcbsp3_sidetone", |
2856 | .class = &omap3xxx_mcbsp_sidetone_hwmod_class, | 2522 | .class = &omap3xxx_mcbsp_sidetone_hwmod_class, |
2857 | .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs, | 2523 | .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs, |
2858 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_irqs), | ||
2859 | .main_clk = "mcbsp3_fck", | 2524 | .main_clk = "mcbsp3_fck", |
2860 | .prcm = { | 2525 | .prcm = { |
2861 | .omap2 = { | 2526 | .omap2 = { |
@@ -3025,6 +2690,7 @@ static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = { | |||
3025 | static struct omap_hwmod omap3xxx_mailbox_hwmod; | 2690 | static struct omap_hwmod omap3xxx_mailbox_hwmod; |
3026 | static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = { | 2691 | static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = { |
3027 | { .irq = 26 }, | 2692 | { .irq = 26 }, |
2693 | { .irq = -1 } | ||
3028 | }; | 2694 | }; |
3029 | 2695 | ||
3030 | static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = { | 2696 | static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = { |
@@ -3033,6 +2699,7 @@ static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = { | |||
3033 | .pa_end = 0x480941ff, | 2699 | .pa_end = 0x480941ff, |
3034 | .flags = ADDR_TYPE_RT, | 2700 | .flags = ADDR_TYPE_RT, |
3035 | }, | 2701 | }, |
2702 | { } | ||
3036 | }; | 2703 | }; |
3037 | 2704 | ||
3038 | /* l4_core -> mailbox */ | 2705 | /* l4_core -> mailbox */ |
@@ -3040,7 +2707,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = { | |||
3040 | .master = &omap3xxx_l4_core_hwmod, | 2707 | .master = &omap3xxx_l4_core_hwmod, |
3041 | .slave = &omap3xxx_mailbox_hwmod, | 2708 | .slave = &omap3xxx_mailbox_hwmod, |
3042 | .addr = omap3xxx_mailbox_addrs, | 2709 | .addr = omap3xxx_mailbox_addrs, |
3043 | .addr_cnt = ARRAY_SIZE(omap3xxx_mailbox_addrs), | ||
3044 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2710 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3045 | }; | 2711 | }; |
3046 | 2712 | ||
@@ -3053,7 +2719,6 @@ static struct omap_hwmod omap3xxx_mailbox_hwmod = { | |||
3053 | .name = "mailbox", | 2719 | .name = "mailbox", |
3054 | .class = &omap3xxx_mailbox_hwmod_class, | 2720 | .class = &omap3xxx_mailbox_hwmod_class, |
3055 | .mpu_irqs = omap3xxx_mailbox_irqs, | 2721 | .mpu_irqs = omap3xxx_mailbox_irqs, |
3056 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mailbox_irqs), | ||
3057 | .main_clk = "mailboxes_ick", | 2722 | .main_clk = "mailboxes_ick", |
3058 | .prcm = { | 2723 | .prcm = { |
3059 | .omap2 = { | 2724 | .omap2 = { |
@@ -3070,56 +2735,29 @@ static struct omap_hwmod omap3xxx_mailbox_hwmod = { | |||
3070 | }; | 2735 | }; |
3071 | 2736 | ||
3072 | /* l4 core -> mcspi1 interface */ | 2737 | /* l4 core -> mcspi1 interface */ |
3073 | static struct omap_hwmod_addr_space omap34xx_mcspi1_addr_space[] = { | ||
3074 | { | ||
3075 | .pa_start = 0x48098000, | ||
3076 | .pa_end = 0x480980ff, | ||
3077 | .flags = ADDR_TYPE_RT, | ||
3078 | }, | ||
3079 | }; | ||
3080 | |||
3081 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = { | 2738 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = { |
3082 | .master = &omap3xxx_l4_core_hwmod, | 2739 | .master = &omap3xxx_l4_core_hwmod, |
3083 | .slave = &omap34xx_mcspi1, | 2740 | .slave = &omap34xx_mcspi1, |
3084 | .clk = "mcspi1_ick", | 2741 | .clk = "mcspi1_ick", |
3085 | .addr = omap34xx_mcspi1_addr_space, | 2742 | .addr = omap2_mcspi1_addr_space, |
3086 | .addr_cnt = ARRAY_SIZE(omap34xx_mcspi1_addr_space), | ||
3087 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2743 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3088 | }; | 2744 | }; |
3089 | 2745 | ||
3090 | /* l4 core -> mcspi2 interface */ | 2746 | /* l4 core -> mcspi2 interface */ |
3091 | static struct omap_hwmod_addr_space omap34xx_mcspi2_addr_space[] = { | ||
3092 | { | ||
3093 | .pa_start = 0x4809a000, | ||
3094 | .pa_end = 0x4809a0ff, | ||
3095 | .flags = ADDR_TYPE_RT, | ||
3096 | }, | ||
3097 | }; | ||
3098 | |||
3099 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = { | 2747 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = { |
3100 | .master = &omap3xxx_l4_core_hwmod, | 2748 | .master = &omap3xxx_l4_core_hwmod, |
3101 | .slave = &omap34xx_mcspi2, | 2749 | .slave = &omap34xx_mcspi2, |
3102 | .clk = "mcspi2_ick", | 2750 | .clk = "mcspi2_ick", |
3103 | .addr = omap34xx_mcspi2_addr_space, | 2751 | .addr = omap2_mcspi2_addr_space, |
3104 | .addr_cnt = ARRAY_SIZE(omap34xx_mcspi2_addr_space), | ||
3105 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2752 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3106 | }; | 2753 | }; |
3107 | 2754 | ||
3108 | /* l4 core -> mcspi3 interface */ | 2755 | /* l4 core -> mcspi3 interface */ |
3109 | static struct omap_hwmod_addr_space omap34xx_mcspi3_addr_space[] = { | ||
3110 | { | ||
3111 | .pa_start = 0x480b8000, | ||
3112 | .pa_end = 0x480b80ff, | ||
3113 | .flags = ADDR_TYPE_RT, | ||
3114 | }, | ||
3115 | }; | ||
3116 | |||
3117 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = { | 2756 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = { |
3118 | .master = &omap3xxx_l4_core_hwmod, | 2757 | .master = &omap3xxx_l4_core_hwmod, |
3119 | .slave = &omap34xx_mcspi3, | 2758 | .slave = &omap34xx_mcspi3, |
3120 | .clk = "mcspi3_ick", | 2759 | .clk = "mcspi3_ick", |
3121 | .addr = omap34xx_mcspi3_addr_space, | 2760 | .addr = omap2430_mcspi3_addr_space, |
3122 | .addr_cnt = ARRAY_SIZE(omap34xx_mcspi3_addr_space), | ||
3123 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2761 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3124 | }; | 2762 | }; |
3125 | 2763 | ||
@@ -3130,6 +2768,7 @@ static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = { | |||
3130 | .pa_end = 0x480ba0ff, | 2768 | .pa_end = 0x480ba0ff, |
3131 | .flags = ADDR_TYPE_RT, | 2769 | .flags = ADDR_TYPE_RT, |
3132 | }, | 2770 | }, |
2771 | { } | ||
3133 | }; | 2772 | }; |
3134 | 2773 | ||
3135 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = { | 2774 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = { |
@@ -3137,7 +2776,6 @@ static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = { | |||
3137 | .slave = &omap34xx_mcspi4, | 2776 | .slave = &omap34xx_mcspi4, |
3138 | .clk = "mcspi4_ick", | 2777 | .clk = "mcspi4_ick", |
3139 | .addr = omap34xx_mcspi4_addr_space, | 2778 | .addr = omap34xx_mcspi4_addr_space, |
3140 | .addr_cnt = ARRAY_SIZE(omap34xx_mcspi4_addr_space), | ||
3141 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2779 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3142 | }; | 2780 | }; |
3143 | 2781 | ||
@@ -3165,21 +2803,6 @@ static struct omap_hwmod_class omap34xx_mcspi_class = { | |||
3165 | }; | 2803 | }; |
3166 | 2804 | ||
3167 | /* mcspi1 */ | 2805 | /* mcspi1 */ |
3168 | static struct omap_hwmod_irq_info omap34xx_mcspi1_mpu_irqs[] = { | ||
3169 | { .name = "irq", .irq = 65 }, | ||
3170 | }; | ||
3171 | |||
3172 | static struct omap_hwmod_dma_info omap34xx_mcspi1_sdma_reqs[] = { | ||
3173 | { .name = "tx0", .dma_req = 35 }, | ||
3174 | { .name = "rx0", .dma_req = 36 }, | ||
3175 | { .name = "tx1", .dma_req = 37 }, | ||
3176 | { .name = "rx1", .dma_req = 38 }, | ||
3177 | { .name = "tx2", .dma_req = 39 }, | ||
3178 | { .name = "rx2", .dma_req = 40 }, | ||
3179 | { .name = "tx3", .dma_req = 41 }, | ||
3180 | { .name = "rx3", .dma_req = 42 }, | ||
3181 | }; | ||
3182 | |||
3183 | static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = { | 2806 | static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = { |
3184 | &omap34xx_l4_core__mcspi1, | 2807 | &omap34xx_l4_core__mcspi1, |
3185 | }; | 2808 | }; |
@@ -3190,10 +2813,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { | |||
3190 | 2813 | ||
3191 | static struct omap_hwmod omap34xx_mcspi1 = { | 2814 | static struct omap_hwmod omap34xx_mcspi1 = { |
3192 | .name = "mcspi1", | 2815 | .name = "mcspi1", |
3193 | .mpu_irqs = omap34xx_mcspi1_mpu_irqs, | 2816 | .mpu_irqs = omap2_mcspi1_mpu_irqs, |
3194 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_mpu_irqs), | 2817 | .sdma_reqs = omap2_mcspi1_sdma_reqs, |
3195 | .sdma_reqs = omap34xx_mcspi1_sdma_reqs, | ||
3196 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_sdma_reqs), | ||
3197 | .main_clk = "mcspi1_fck", | 2818 | .main_clk = "mcspi1_fck", |
3198 | .prcm = { | 2819 | .prcm = { |
3199 | .omap2 = { | 2820 | .omap2 = { |
@@ -3212,17 +2833,6 @@ static struct omap_hwmod omap34xx_mcspi1 = { | |||
3212 | }; | 2833 | }; |
3213 | 2834 | ||
3214 | /* mcspi2 */ | 2835 | /* mcspi2 */ |
3215 | static struct omap_hwmod_irq_info omap34xx_mcspi2_mpu_irqs[] = { | ||
3216 | { .name = "irq", .irq = 66 }, | ||
3217 | }; | ||
3218 | |||
3219 | static struct omap_hwmod_dma_info omap34xx_mcspi2_sdma_reqs[] = { | ||
3220 | { .name = "tx0", .dma_req = 43 }, | ||
3221 | { .name = "rx0", .dma_req = 44 }, | ||
3222 | { .name = "tx1", .dma_req = 45 }, | ||
3223 | { .name = "rx1", .dma_req = 46 }, | ||
3224 | }; | ||
3225 | |||
3226 | static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = { | 2836 | static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = { |
3227 | &omap34xx_l4_core__mcspi2, | 2837 | &omap34xx_l4_core__mcspi2, |
3228 | }; | 2838 | }; |
@@ -3233,10 +2843,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { | |||
3233 | 2843 | ||
3234 | static struct omap_hwmod omap34xx_mcspi2 = { | 2844 | static struct omap_hwmod omap34xx_mcspi2 = { |
3235 | .name = "mcspi2", | 2845 | .name = "mcspi2", |
3236 | .mpu_irqs = omap34xx_mcspi2_mpu_irqs, | 2846 | .mpu_irqs = omap2_mcspi2_mpu_irqs, |
3237 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_mpu_irqs), | 2847 | .sdma_reqs = omap2_mcspi2_sdma_reqs, |
3238 | .sdma_reqs = omap34xx_mcspi2_sdma_reqs, | ||
3239 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_sdma_reqs), | ||
3240 | .main_clk = "mcspi2_fck", | 2848 | .main_clk = "mcspi2_fck", |
3241 | .prcm = { | 2849 | .prcm = { |
3242 | .omap2 = { | 2850 | .omap2 = { |
@@ -3257,6 +2865,7 @@ static struct omap_hwmod omap34xx_mcspi2 = { | |||
3257 | /* mcspi3 */ | 2865 | /* mcspi3 */ |
3258 | static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = { | 2866 | static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = { |
3259 | { .name = "irq", .irq = 91 }, /* 91 */ | 2867 | { .name = "irq", .irq = 91 }, /* 91 */ |
2868 | { .irq = -1 } | ||
3260 | }; | 2869 | }; |
3261 | 2870 | ||
3262 | static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = { | 2871 | static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = { |
@@ -3264,6 +2873,7 @@ static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = { | |||
3264 | { .name = "rx0", .dma_req = 16 }, | 2873 | { .name = "rx0", .dma_req = 16 }, |
3265 | { .name = "tx1", .dma_req = 23 }, | 2874 | { .name = "tx1", .dma_req = 23 }, |
3266 | { .name = "rx1", .dma_req = 24 }, | 2875 | { .name = "rx1", .dma_req = 24 }, |
2876 | { .dma_req = -1 } | ||
3267 | }; | 2877 | }; |
3268 | 2878 | ||
3269 | static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = { | 2879 | static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = { |
@@ -3277,9 +2887,7 @@ static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = { | |||
3277 | static struct omap_hwmod omap34xx_mcspi3 = { | 2887 | static struct omap_hwmod omap34xx_mcspi3 = { |
3278 | .name = "mcspi3", | 2888 | .name = "mcspi3", |
3279 | .mpu_irqs = omap34xx_mcspi3_mpu_irqs, | 2889 | .mpu_irqs = omap34xx_mcspi3_mpu_irqs, |
3280 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_mpu_irqs), | ||
3281 | .sdma_reqs = omap34xx_mcspi3_sdma_reqs, | 2890 | .sdma_reqs = omap34xx_mcspi3_sdma_reqs, |
3282 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_sdma_reqs), | ||
3283 | .main_clk = "mcspi3_fck", | 2891 | .main_clk = "mcspi3_fck", |
3284 | .prcm = { | 2892 | .prcm = { |
3285 | .omap2 = { | 2893 | .omap2 = { |
@@ -3300,11 +2908,13 @@ static struct omap_hwmod omap34xx_mcspi3 = { | |||
3300 | /* SPI4 */ | 2908 | /* SPI4 */ |
3301 | static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = { | 2909 | static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = { |
3302 | { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */ | 2910 | { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */ |
2911 | { .irq = -1 } | ||
3303 | }; | 2912 | }; |
3304 | 2913 | ||
3305 | static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = { | 2914 | static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = { |
3306 | { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */ | 2915 | { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */ |
3307 | { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */ | 2916 | { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */ |
2917 | { .dma_req = -1 } | ||
3308 | }; | 2918 | }; |
3309 | 2919 | ||
3310 | static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = { | 2920 | static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = { |
@@ -3318,9 +2928,7 @@ static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = { | |||
3318 | static struct omap_hwmod omap34xx_mcspi4 = { | 2928 | static struct omap_hwmod omap34xx_mcspi4 = { |
3319 | .name = "mcspi4", | 2929 | .name = "mcspi4", |
3320 | .mpu_irqs = omap34xx_mcspi4_mpu_irqs, | 2930 | .mpu_irqs = omap34xx_mcspi4_mpu_irqs, |
3321 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_mpu_irqs), | ||
3322 | .sdma_reqs = omap34xx_mcspi4_sdma_reqs, | 2931 | .sdma_reqs = omap34xx_mcspi4_sdma_reqs, |
3323 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_sdma_reqs), | ||
3324 | .main_clk = "mcspi4_fck", | 2932 | .main_clk = "mcspi4_fck", |
3325 | .prcm = { | 2933 | .prcm = { |
3326 | .omap2 = { | 2934 | .omap2 = { |
@@ -3362,12 +2970,12 @@ static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = { | |||
3362 | 2970 | ||
3363 | { .name = "mc", .irq = 92 }, | 2971 | { .name = "mc", .irq = 92 }, |
3364 | { .name = "dma", .irq = 93 }, | 2972 | { .name = "dma", .irq = 93 }, |
2973 | { .irq = -1 } | ||
3365 | }; | 2974 | }; |
3366 | 2975 | ||
3367 | static struct omap_hwmod omap3xxx_usbhsotg_hwmod = { | 2976 | static struct omap_hwmod omap3xxx_usbhsotg_hwmod = { |
3368 | .name = "usb_otg_hs", | 2977 | .name = "usb_otg_hs", |
3369 | .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs, | 2978 | .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs, |
3370 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_mpu_irqs), | ||
3371 | .main_clk = "hsotgusb_ick", | 2979 | .main_clk = "hsotgusb_ick", |
3372 | .prcm = { | 2980 | .prcm = { |
3373 | .omap2 = { | 2981 | .omap2 = { |
@@ -3399,6 +3007,7 @@ static struct omap_hwmod omap3xxx_usbhsotg_hwmod = { | |||
3399 | static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = { | 3007 | static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = { |
3400 | 3008 | ||
3401 | { .name = "mc", .irq = 71 }, | 3009 | { .name = "mc", .irq = 71 }, |
3010 | { .irq = -1 } | ||
3402 | }; | 3011 | }; |
3403 | 3012 | ||
3404 | static struct omap_hwmod_class am35xx_usbotg_class = { | 3013 | static struct omap_hwmod_class am35xx_usbotg_class = { |
@@ -3409,7 +3018,6 @@ static struct omap_hwmod_class am35xx_usbotg_class = { | |||
3409 | static struct omap_hwmod am35xx_usbhsotg_hwmod = { | 3018 | static struct omap_hwmod am35xx_usbhsotg_hwmod = { |
3410 | .name = "am35x_otg_hs", | 3019 | .name = "am35x_otg_hs", |
3411 | .mpu_irqs = am35xx_usbhsotg_mpu_irqs, | 3020 | .mpu_irqs = am35xx_usbhsotg_mpu_irqs, |
3412 | .mpu_irqs_cnt = ARRAY_SIZE(am35xx_usbhsotg_mpu_irqs), | ||
3413 | .main_clk = NULL, | 3021 | .main_clk = NULL, |
3414 | .prcm = { | 3022 | .prcm = { |
3415 | .omap2 = { | 3023 | .omap2 = { |
@@ -3445,11 +3053,13 @@ static struct omap_hwmod_class omap34xx_mmc_class = { | |||
3445 | 3053 | ||
3446 | static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = { | 3054 | static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = { |
3447 | { .irq = 83, }, | 3055 | { .irq = 83, }, |
3056 | { .irq = -1 } | ||
3448 | }; | 3057 | }; |
3449 | 3058 | ||
3450 | static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = { | 3059 | static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = { |
3451 | { .name = "tx", .dma_req = 61, }, | 3060 | { .name = "tx", .dma_req = 61, }, |
3452 | { .name = "rx", .dma_req = 62, }, | 3061 | { .name = "rx", .dma_req = 62, }, |
3062 | { .dma_req = -1 } | ||
3453 | }; | 3063 | }; |
3454 | 3064 | ||
3455 | static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = { | 3065 | static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = { |
@@ -3467,9 +3077,7 @@ static struct omap_mmc_dev_attr mmc1_dev_attr = { | |||
3467 | static struct omap_hwmod omap3xxx_mmc1_hwmod = { | 3077 | static struct omap_hwmod omap3xxx_mmc1_hwmod = { |
3468 | .name = "mmc1", | 3078 | .name = "mmc1", |
3469 | .mpu_irqs = omap34xx_mmc1_mpu_irqs, | 3079 | .mpu_irqs = omap34xx_mmc1_mpu_irqs, |
3470 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc1_mpu_irqs), | ||
3471 | .sdma_reqs = omap34xx_mmc1_sdma_reqs, | 3080 | .sdma_reqs = omap34xx_mmc1_sdma_reqs, |
3472 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc1_sdma_reqs), | ||
3473 | .opt_clks = omap34xx_mmc1_opt_clks, | 3081 | .opt_clks = omap34xx_mmc1_opt_clks, |
3474 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks), | 3082 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks), |
3475 | .main_clk = "mmchs1_fck", | 3083 | .main_clk = "mmchs1_fck", |
@@ -3493,11 +3101,13 @@ static struct omap_hwmod omap3xxx_mmc1_hwmod = { | |||
3493 | 3101 | ||
3494 | static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = { | 3102 | static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = { |
3495 | { .irq = INT_24XX_MMC2_IRQ, }, | 3103 | { .irq = INT_24XX_MMC2_IRQ, }, |
3104 | { .irq = -1 } | ||
3496 | }; | 3105 | }; |
3497 | 3106 | ||
3498 | static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = { | 3107 | static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = { |
3499 | { .name = "tx", .dma_req = 47, }, | 3108 | { .name = "tx", .dma_req = 47, }, |
3500 | { .name = "rx", .dma_req = 48, }, | 3109 | { .name = "rx", .dma_req = 48, }, |
3110 | { .dma_req = -1 } | ||
3501 | }; | 3111 | }; |
3502 | 3112 | ||
3503 | static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = { | 3113 | static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = { |
@@ -3511,9 +3121,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = { | |||
3511 | static struct omap_hwmod omap3xxx_mmc2_hwmod = { | 3121 | static struct omap_hwmod omap3xxx_mmc2_hwmod = { |
3512 | .name = "mmc2", | 3122 | .name = "mmc2", |
3513 | .mpu_irqs = omap34xx_mmc2_mpu_irqs, | 3123 | .mpu_irqs = omap34xx_mmc2_mpu_irqs, |
3514 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc2_mpu_irqs), | ||
3515 | .sdma_reqs = omap34xx_mmc2_sdma_reqs, | 3124 | .sdma_reqs = omap34xx_mmc2_sdma_reqs, |
3516 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc2_sdma_reqs), | ||
3517 | .opt_clks = omap34xx_mmc2_opt_clks, | 3125 | .opt_clks = omap34xx_mmc2_opt_clks, |
3518 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks), | 3126 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks), |
3519 | .main_clk = "mmchs2_fck", | 3127 | .main_clk = "mmchs2_fck", |
@@ -3536,11 +3144,13 @@ static struct omap_hwmod omap3xxx_mmc2_hwmod = { | |||
3536 | 3144 | ||
3537 | static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = { | 3145 | static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = { |
3538 | { .irq = 94, }, | 3146 | { .irq = 94, }, |
3147 | { .irq = -1 } | ||
3539 | }; | 3148 | }; |
3540 | 3149 | ||
3541 | static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = { | 3150 | static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = { |
3542 | { .name = "tx", .dma_req = 77, }, | 3151 | { .name = "tx", .dma_req = 77, }, |
3543 | { .name = "rx", .dma_req = 78, }, | 3152 | { .name = "rx", .dma_req = 78, }, |
3153 | { .dma_req = -1 } | ||
3544 | }; | 3154 | }; |
3545 | 3155 | ||
3546 | static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = { | 3156 | static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = { |
@@ -3554,9 +3164,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = { | |||
3554 | static struct omap_hwmod omap3xxx_mmc3_hwmod = { | 3164 | static struct omap_hwmod omap3xxx_mmc3_hwmod = { |
3555 | .name = "mmc3", | 3165 | .name = "mmc3", |
3556 | .mpu_irqs = omap34xx_mmc3_mpu_irqs, | 3166 | .mpu_irqs = omap34xx_mmc3_mpu_irqs, |
3557 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc3_mpu_irqs), | ||
3558 | .sdma_reqs = omap34xx_mmc3_sdma_reqs, | 3167 | .sdma_reqs = omap34xx_mmc3_sdma_reqs, |
3559 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc3_sdma_reqs), | ||
3560 | .opt_clks = omap34xx_mmc3_opt_clks, | 3168 | .opt_clks = omap34xx_mmc3_opt_clks, |
3561 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks), | 3169 | .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks), |
3562 | .main_clk = "mmchs3_fck", | 3170 | .main_clk = "mmchs3_fck", |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index e1c69ffe0f69..e01143725b08 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -80,7 +80,12 @@ static struct omap_hwmod_class omap44xx_dmm_hwmod_class = { | |||
80 | .name = "dmm", | 80 | .name = "dmm", |
81 | }; | 81 | }; |
82 | 82 | ||
83 | /* dmm interface data */ | 83 | /* dmm */ |
84 | static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = { | ||
85 | { .irq = 113 + OMAP44XX_IRQ_GIC_START }, | ||
86 | { .irq = -1 } | ||
87 | }; | ||
88 | |||
84 | /* l3_main_1 -> dmm */ | 89 | /* l3_main_1 -> dmm */ |
85 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = { | 90 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = { |
86 | .master = &omap44xx_l3_main_1_hwmod, | 91 | .master = &omap44xx_l3_main_1_hwmod, |
@@ -95,6 +100,7 @@ static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = { | |||
95 | .pa_end = 0x4e0007ff, | 100 | .pa_end = 0x4e0007ff, |
96 | .flags = ADDR_TYPE_RT | 101 | .flags = ADDR_TYPE_RT |
97 | }, | 102 | }, |
103 | { } | ||
98 | }; | 104 | }; |
99 | 105 | ||
100 | /* mpu -> dmm */ | 106 | /* mpu -> dmm */ |
@@ -103,7 +109,6 @@ static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = { | |||
103 | .slave = &omap44xx_dmm_hwmod, | 109 | .slave = &omap44xx_dmm_hwmod, |
104 | .clk = "l3_div_ck", | 110 | .clk = "l3_div_ck", |
105 | .addr = omap44xx_dmm_addrs, | 111 | .addr = omap44xx_dmm_addrs, |
106 | .addr_cnt = ARRAY_SIZE(omap44xx_dmm_addrs), | ||
107 | .user = OCP_USER_MPU, | 112 | .user = OCP_USER_MPU, |
108 | }; | 113 | }; |
109 | 114 | ||
@@ -113,17 +118,12 @@ static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = { | |||
113 | &omap44xx_mpu__dmm, | 118 | &omap44xx_mpu__dmm, |
114 | }; | 119 | }; |
115 | 120 | ||
116 | static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = { | ||
117 | { .irq = 113 + OMAP44XX_IRQ_GIC_START }, | ||
118 | }; | ||
119 | |||
120 | static struct omap_hwmod omap44xx_dmm_hwmod = { | 121 | static struct omap_hwmod omap44xx_dmm_hwmod = { |
121 | .name = "dmm", | 122 | .name = "dmm", |
122 | .class = &omap44xx_dmm_hwmod_class, | 123 | .class = &omap44xx_dmm_hwmod_class, |
124 | .mpu_irqs = omap44xx_dmm_irqs, | ||
123 | .slaves = omap44xx_dmm_slaves, | 125 | .slaves = omap44xx_dmm_slaves, |
124 | .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves), | 126 | .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves), |
125 | .mpu_irqs = omap44xx_dmm_irqs, | ||
126 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dmm_irqs), | ||
127 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 127 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
128 | }; | 128 | }; |
129 | 129 | ||
@@ -135,7 +135,7 @@ static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = { | |||
135 | .name = "emif_fw", | 135 | .name = "emif_fw", |
136 | }; | 136 | }; |
137 | 137 | ||
138 | /* emif_fw interface data */ | 138 | /* emif_fw */ |
139 | /* dmm -> emif_fw */ | 139 | /* dmm -> emif_fw */ |
140 | static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = { | 140 | static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = { |
141 | .master = &omap44xx_dmm_hwmod, | 141 | .master = &omap44xx_dmm_hwmod, |
@@ -150,6 +150,7 @@ static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = { | |||
150 | .pa_end = 0x4a20c0ff, | 150 | .pa_end = 0x4a20c0ff, |
151 | .flags = ADDR_TYPE_RT | 151 | .flags = ADDR_TYPE_RT |
152 | }, | 152 | }, |
153 | { } | ||
153 | }; | 154 | }; |
154 | 155 | ||
155 | /* l4_cfg -> emif_fw */ | 156 | /* l4_cfg -> emif_fw */ |
@@ -158,7 +159,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = { | |||
158 | .slave = &omap44xx_emif_fw_hwmod, | 159 | .slave = &omap44xx_emif_fw_hwmod, |
159 | .clk = "l4_div_ck", | 160 | .clk = "l4_div_ck", |
160 | .addr = omap44xx_emif_fw_addrs, | 161 | .addr = omap44xx_emif_fw_addrs, |
161 | .addr_cnt = ARRAY_SIZE(omap44xx_emif_fw_addrs), | ||
162 | .user = OCP_USER_MPU, | 162 | .user = OCP_USER_MPU, |
163 | }; | 163 | }; |
164 | 164 | ||
@@ -184,7 +184,7 @@ static struct omap_hwmod_class omap44xx_l3_hwmod_class = { | |||
184 | .name = "l3", | 184 | .name = "l3", |
185 | }; | 185 | }; |
186 | 186 | ||
187 | /* l3_instr interface data */ | 187 | /* l3_instr */ |
188 | /* iva -> l3_instr */ | 188 | /* iva -> l3_instr */ |
189 | static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = { | 189 | static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = { |
190 | .master = &omap44xx_iva_hwmod, | 190 | .master = &omap44xx_iva_hwmod, |
@@ -215,7 +215,13 @@ static struct omap_hwmod omap44xx_l3_instr_hwmod = { | |||
215 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 215 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
216 | }; | 216 | }; |
217 | 217 | ||
218 | /* l3_main_1 interface data */ | 218 | /* l3_main_1 */ |
219 | static struct omap_hwmod_irq_info omap44xx_l3_main_1_irqs[] = { | ||
220 | { .name = "dbg_err", .irq = 9 + OMAP44XX_IRQ_GIC_START }, | ||
221 | { .name = "app_err", .irq = 10 + OMAP44XX_IRQ_GIC_START }, | ||
222 | { .irq = -1 } | ||
223 | }; | ||
224 | |||
219 | /* dsp -> l3_main_1 */ | 225 | /* dsp -> l3_main_1 */ |
220 | static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = { | 226 | static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = { |
221 | .master = &omap44xx_dsp_hwmod, | 227 | .master = &omap44xx_dsp_hwmod, |
@@ -264,18 +270,13 @@ static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = { | |||
264 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 270 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
265 | }; | 271 | }; |
266 | 272 | ||
267 | /* L3 target configuration and error log registers */ | ||
268 | static struct omap_hwmod_irq_info omap44xx_l3_targ_irqs[] = { | ||
269 | { .irq = 9 + OMAP44XX_IRQ_GIC_START }, | ||
270 | { .irq = 10 + OMAP44XX_IRQ_GIC_START }, | ||
271 | }; | ||
272 | |||
273 | static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = { | 273 | static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = { |
274 | { | 274 | { |
275 | .pa_start = 0x44000000, | 275 | .pa_start = 0x44000000, |
276 | .pa_end = 0x44000fff, | 276 | .pa_end = 0x44000fff, |
277 | .flags = ADDR_TYPE_RT, | 277 | .flags = ADDR_TYPE_RT |
278 | }, | 278 | }, |
279 | { } | ||
279 | }; | 280 | }; |
280 | 281 | ||
281 | /* mpu -> l3_main_1 */ | 282 | /* mpu -> l3_main_1 */ |
@@ -284,8 +285,7 @@ static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = { | |||
284 | .slave = &omap44xx_l3_main_1_hwmod, | 285 | .slave = &omap44xx_l3_main_1_hwmod, |
285 | .clk = "l3_div_ck", | 286 | .clk = "l3_div_ck", |
286 | .addr = omap44xx_l3_main_1_addrs, | 287 | .addr = omap44xx_l3_main_1_addrs, |
287 | .addr_cnt = ARRAY_SIZE(omap44xx_l3_main_1_addrs), | 288 | .user = OCP_USER_MPU, |
288 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
289 | }; | 289 | }; |
290 | 290 | ||
291 | /* l3_main_1 slave ports */ | 291 | /* l3_main_1 slave ports */ |
@@ -302,14 +302,13 @@ static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = { | |||
302 | static struct omap_hwmod omap44xx_l3_main_1_hwmod = { | 302 | static struct omap_hwmod omap44xx_l3_main_1_hwmod = { |
303 | .name = "l3_main_1", | 303 | .name = "l3_main_1", |
304 | .class = &omap44xx_l3_hwmod_class, | 304 | .class = &omap44xx_l3_hwmod_class, |
305 | .mpu_irqs = omap44xx_l3_targ_irqs, | 305 | .mpu_irqs = omap44xx_l3_main_1_irqs, |
306 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_l3_targ_irqs), | ||
307 | .slaves = omap44xx_l3_main_1_slaves, | 306 | .slaves = omap44xx_l3_main_1_slaves, |
308 | .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves), | 307 | .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves), |
309 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 308 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
310 | }; | 309 | }; |
311 | 310 | ||
312 | /* l3_main_2 interface data */ | 311 | /* l3_main_2 */ |
313 | /* dma_system -> l3_main_2 */ | 312 | /* dma_system -> l3_main_2 */ |
314 | static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = { | 313 | static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = { |
315 | .master = &omap44xx_dma_system_hwmod, | 314 | .master = &omap44xx_dma_system_hwmod, |
@@ -354,8 +353,9 @@ static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = { | |||
354 | { | 353 | { |
355 | .pa_start = 0x44800000, | 354 | .pa_start = 0x44800000, |
356 | .pa_end = 0x44801fff, | 355 | .pa_end = 0x44801fff, |
357 | .flags = ADDR_TYPE_RT, | 356 | .flags = ADDR_TYPE_RT |
358 | }, | 357 | }, |
358 | { } | ||
359 | }; | 359 | }; |
360 | 360 | ||
361 | /* l3_main_1 -> l3_main_2 */ | 361 | /* l3_main_1 -> l3_main_2 */ |
@@ -364,8 +364,7 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = { | |||
364 | .slave = &omap44xx_l3_main_2_hwmod, | 364 | .slave = &omap44xx_l3_main_2_hwmod, |
365 | .clk = "l3_div_ck", | 365 | .clk = "l3_div_ck", |
366 | .addr = omap44xx_l3_main_2_addrs, | 366 | .addr = omap44xx_l3_main_2_addrs, |
367 | .addr_cnt = ARRAY_SIZE(omap44xx_l3_main_2_addrs), | 367 | .user = OCP_USER_MPU, |
368 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
369 | }; | 368 | }; |
370 | 369 | ||
371 | /* l4_cfg -> l3_main_2 */ | 370 | /* l4_cfg -> l3_main_2 */ |
@@ -404,13 +403,14 @@ static struct omap_hwmod omap44xx_l3_main_2_hwmod = { | |||
404 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 403 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
405 | }; | 404 | }; |
406 | 405 | ||
407 | /* l3_main_3 interface data */ | 406 | /* l3_main_3 */ |
408 | static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = { | 407 | static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = { |
409 | { | 408 | { |
410 | .pa_start = 0x45000000, | 409 | .pa_start = 0x45000000, |
411 | .pa_end = 0x45000fff, | 410 | .pa_end = 0x45000fff, |
412 | .flags = ADDR_TYPE_RT, | 411 | .flags = ADDR_TYPE_RT |
413 | }, | 412 | }, |
413 | { } | ||
414 | }; | 414 | }; |
415 | 415 | ||
416 | /* l3_main_1 -> l3_main_3 */ | 416 | /* l3_main_1 -> l3_main_3 */ |
@@ -419,8 +419,7 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = { | |||
419 | .slave = &omap44xx_l3_main_3_hwmod, | 419 | .slave = &omap44xx_l3_main_3_hwmod, |
420 | .clk = "l3_div_ck", | 420 | .clk = "l3_div_ck", |
421 | .addr = omap44xx_l3_main_3_addrs, | 421 | .addr = omap44xx_l3_main_3_addrs, |
422 | .addr_cnt = ARRAY_SIZE(omap44xx_l3_main_3_addrs), | 422 | .user = OCP_USER_MPU, |
423 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
424 | }; | 423 | }; |
425 | 424 | ||
426 | /* l3_main_2 -> l3_main_3 */ | 425 | /* l3_main_2 -> l3_main_3 */ |
@@ -462,7 +461,7 @@ static struct omap_hwmod_class omap44xx_l4_hwmod_class = { | |||
462 | .name = "l4", | 461 | .name = "l4", |
463 | }; | 462 | }; |
464 | 463 | ||
465 | /* l4_abe interface data */ | 464 | /* l4_abe */ |
466 | /* aess -> l4_abe */ | 465 | /* aess -> l4_abe */ |
467 | static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = { | 466 | static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = { |
468 | .master = &omap44xx_aess_hwmod, | 467 | .master = &omap44xx_aess_hwmod, |
@@ -511,7 +510,7 @@ static struct omap_hwmod omap44xx_l4_abe_hwmod = { | |||
511 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 510 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
512 | }; | 511 | }; |
513 | 512 | ||
514 | /* l4_cfg interface data */ | 513 | /* l4_cfg */ |
515 | /* l3_main_1 -> l4_cfg */ | 514 | /* l3_main_1 -> l4_cfg */ |
516 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = { | 515 | static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = { |
517 | .master = &omap44xx_l3_main_1_hwmod, | 516 | .master = &omap44xx_l3_main_1_hwmod, |
@@ -533,7 +532,7 @@ static struct omap_hwmod omap44xx_l4_cfg_hwmod = { | |||
533 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 532 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
534 | }; | 533 | }; |
535 | 534 | ||
536 | /* l4_per interface data */ | 535 | /* l4_per */ |
537 | /* l3_main_2 -> l4_per */ | 536 | /* l3_main_2 -> l4_per */ |
538 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = { | 537 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = { |
539 | .master = &omap44xx_l3_main_2_hwmod, | 538 | .master = &omap44xx_l3_main_2_hwmod, |
@@ -555,7 +554,7 @@ static struct omap_hwmod omap44xx_l4_per_hwmod = { | |||
555 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | 554 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), |
556 | }; | 555 | }; |
557 | 556 | ||
558 | /* l4_wkup interface data */ | 557 | /* l4_wkup */ |
559 | /* l4_cfg -> l4_wkup */ | 558 | /* l4_cfg -> l4_wkup */ |
560 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = { | 559 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = { |
561 | .master = &omap44xx_l4_cfg_hwmod, | 560 | .master = &omap44xx_l4_cfg_hwmod, |
@@ -585,7 +584,7 @@ static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = { | |||
585 | .name = "mpu_bus", | 584 | .name = "mpu_bus", |
586 | }; | 585 | }; |
587 | 586 | ||
588 | /* mpu_private interface data */ | 587 | /* mpu_private */ |
589 | /* mpu -> mpu_private */ | 588 | /* mpu -> mpu_private */ |
590 | static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = { | 589 | static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = { |
591 | .master = &omap44xx_mpu_hwmod, | 590 | .master = &omap44xx_mpu_hwmod, |
@@ -633,7 +632,9 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = { | |||
633 | * gpmc | 632 | * gpmc |
634 | * gpu | 633 | * gpu |
635 | * hdq1w | 634 | * hdq1w |
636 | * hsi | 635 | * mcasp |
636 | * mpu_c0 | ||
637 | * mpu_c1 | ||
637 | * ocmc_ram | 638 | * ocmc_ram |
638 | * ocp2scp_usb_phy | 639 | * ocp2scp_usb_phy |
639 | * ocp_wp_noc | 640 | * ocp_wp_noc |
@@ -660,7 +661,8 @@ static struct omap_hwmod_class_sysconfig omap44xx_aess_sysc = { | |||
660 | .sysc_offs = 0x0010, | 661 | .sysc_offs = 0x0010, |
661 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE), | 662 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE), |
662 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | 663 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
663 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | 664 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART | |
665 | MSTANDBY_SMART_WKUP), | ||
664 | .sysc_fields = &omap_hwmod_sysc_type2, | 666 | .sysc_fields = &omap_hwmod_sysc_type2, |
665 | }; | 667 | }; |
666 | 668 | ||
@@ -672,6 +674,7 @@ static struct omap_hwmod_class omap44xx_aess_hwmod_class = { | |||
672 | /* aess */ | 674 | /* aess */ |
673 | static struct omap_hwmod_irq_info omap44xx_aess_irqs[] = { | 675 | static struct omap_hwmod_irq_info omap44xx_aess_irqs[] = { |
674 | { .irq = 99 + OMAP44XX_IRQ_GIC_START }, | 676 | { .irq = 99 + OMAP44XX_IRQ_GIC_START }, |
677 | { .irq = -1 } | ||
675 | }; | 678 | }; |
676 | 679 | ||
677 | static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = { | 680 | static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = { |
@@ -683,6 +686,7 @@ static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = { | |||
683 | { .name = "fifo5", .dma_req = 105 + OMAP44XX_DMA_REQ_START }, | 686 | { .name = "fifo5", .dma_req = 105 + OMAP44XX_DMA_REQ_START }, |
684 | { .name = "fifo6", .dma_req = 106 + OMAP44XX_DMA_REQ_START }, | 687 | { .name = "fifo6", .dma_req = 106 + OMAP44XX_DMA_REQ_START }, |
685 | { .name = "fifo7", .dma_req = 107 + OMAP44XX_DMA_REQ_START }, | 688 | { .name = "fifo7", .dma_req = 107 + OMAP44XX_DMA_REQ_START }, |
689 | { .dma_req = -1 } | ||
686 | }; | 690 | }; |
687 | 691 | ||
688 | /* aess master ports */ | 692 | /* aess master ports */ |
@@ -696,6 +700,7 @@ static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = { | |||
696 | .pa_end = 0x401f13ff, | 700 | .pa_end = 0x401f13ff, |
697 | .flags = ADDR_TYPE_RT | 701 | .flags = ADDR_TYPE_RT |
698 | }, | 702 | }, |
703 | { } | ||
699 | }; | 704 | }; |
700 | 705 | ||
701 | /* l4_abe -> aess */ | 706 | /* l4_abe -> aess */ |
@@ -704,7 +709,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = { | |||
704 | .slave = &omap44xx_aess_hwmod, | 709 | .slave = &omap44xx_aess_hwmod, |
705 | .clk = "ocp_abe_iclk", | 710 | .clk = "ocp_abe_iclk", |
706 | .addr = omap44xx_aess_addrs, | 711 | .addr = omap44xx_aess_addrs, |
707 | .addr_cnt = ARRAY_SIZE(omap44xx_aess_addrs), | ||
708 | .user = OCP_USER_MPU, | 712 | .user = OCP_USER_MPU, |
709 | }; | 713 | }; |
710 | 714 | ||
@@ -714,6 +718,7 @@ static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = { | |||
714 | .pa_end = 0x490f13ff, | 718 | .pa_end = 0x490f13ff, |
715 | .flags = ADDR_TYPE_RT | 719 | .flags = ADDR_TYPE_RT |
716 | }, | 720 | }, |
721 | { } | ||
717 | }; | 722 | }; |
718 | 723 | ||
719 | /* l4_abe -> aess (dma) */ | 724 | /* l4_abe -> aess (dma) */ |
@@ -722,7 +727,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = { | |||
722 | .slave = &omap44xx_aess_hwmod, | 727 | .slave = &omap44xx_aess_hwmod, |
723 | .clk = "ocp_abe_iclk", | 728 | .clk = "ocp_abe_iclk", |
724 | .addr = omap44xx_aess_dma_addrs, | 729 | .addr = omap44xx_aess_dma_addrs, |
725 | .addr_cnt = ARRAY_SIZE(omap44xx_aess_dma_addrs), | ||
726 | .user = OCP_USER_SDMA, | 730 | .user = OCP_USER_SDMA, |
727 | }; | 731 | }; |
728 | 732 | ||
@@ -736,11 +740,9 @@ static struct omap_hwmod omap44xx_aess_hwmod = { | |||
736 | .name = "aess", | 740 | .name = "aess", |
737 | .class = &omap44xx_aess_hwmod_class, | 741 | .class = &omap44xx_aess_hwmod_class, |
738 | .mpu_irqs = omap44xx_aess_irqs, | 742 | .mpu_irqs = omap44xx_aess_irqs, |
739 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_aess_irqs), | ||
740 | .sdma_reqs = omap44xx_aess_sdma_reqs, | 743 | .sdma_reqs = omap44xx_aess_sdma_reqs, |
741 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_aess_sdma_reqs), | ||
742 | .main_clk = "aess_fck", | 744 | .main_clk = "aess_fck", |
743 | .prcm = { | 745 | .prcm = { |
744 | .omap4 = { | 746 | .omap4 = { |
745 | .clkctrl_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL, | 747 | .clkctrl_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL, |
746 | }, | 748 | }, |
@@ -769,7 +771,7 @@ static struct omap_hwmod_opt_clk bandgap_opt_clks[] = { | |||
769 | static struct omap_hwmod omap44xx_bandgap_hwmod = { | 771 | static struct omap_hwmod omap44xx_bandgap_hwmod = { |
770 | .name = "bandgap", | 772 | .name = "bandgap", |
771 | .class = &omap44xx_bandgap_hwmod_class, | 773 | .class = &omap44xx_bandgap_hwmod_class, |
772 | .prcm = { | 774 | .prcm = { |
773 | .omap4 = { | 775 | .omap4 = { |
774 | .clkctrl_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL, | 776 | .clkctrl_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL, |
775 | }, | 777 | }, |
@@ -806,6 +808,7 @@ static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = { | |||
806 | .pa_end = 0x4a30401f, | 808 | .pa_end = 0x4a30401f, |
807 | .flags = ADDR_TYPE_RT | 809 | .flags = ADDR_TYPE_RT |
808 | }, | 810 | }, |
811 | { } | ||
809 | }; | 812 | }; |
810 | 813 | ||
811 | /* l4_wkup -> counter_32k */ | 814 | /* l4_wkup -> counter_32k */ |
@@ -814,7 +817,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = { | |||
814 | .slave = &omap44xx_counter_32k_hwmod, | 817 | .slave = &omap44xx_counter_32k_hwmod, |
815 | .clk = "l4_wkup_clk_mux_ck", | 818 | .clk = "l4_wkup_clk_mux_ck", |
816 | .addr = omap44xx_counter_32k_addrs, | 819 | .addr = omap44xx_counter_32k_addrs, |
817 | .addr_cnt = ARRAY_SIZE(omap44xx_counter_32k_addrs), | ||
818 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 820 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
819 | }; | 821 | }; |
820 | 822 | ||
@@ -828,7 +830,7 @@ static struct omap_hwmod omap44xx_counter_32k_hwmod = { | |||
828 | .class = &omap44xx_counter_hwmod_class, | 830 | .class = &omap44xx_counter_hwmod_class, |
829 | .flags = HWMOD_SWSUP_SIDLE, | 831 | .flags = HWMOD_SWSUP_SIDLE, |
830 | .main_clk = "sys_32k_ck", | 832 | .main_clk = "sys_32k_ck", |
831 | .prcm = { | 833 | .prcm = { |
832 | .omap4 = { | 834 | .omap4 = { |
833 | .clkctrl_reg = OMAP4430_CM_WKUP_SYNCTIMER_CLKCTRL, | 835 | .clkctrl_reg = OMAP4430_CM_WKUP_SYNCTIMER_CLKCTRL, |
834 | }, | 836 | }, |
@@ -875,6 +877,7 @@ static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = { | |||
875 | { .name = "1", .irq = 13 + OMAP44XX_IRQ_GIC_START }, | 877 | { .name = "1", .irq = 13 + OMAP44XX_IRQ_GIC_START }, |
876 | { .name = "2", .irq = 14 + OMAP44XX_IRQ_GIC_START }, | 878 | { .name = "2", .irq = 14 + OMAP44XX_IRQ_GIC_START }, |
877 | { .name = "3", .irq = 15 + OMAP44XX_IRQ_GIC_START }, | 879 | { .name = "3", .irq = 15 + OMAP44XX_IRQ_GIC_START }, |
880 | { .irq = -1 } | ||
878 | }; | 881 | }; |
879 | 882 | ||
880 | /* dma_system master ports */ | 883 | /* dma_system master ports */ |
@@ -888,6 +891,7 @@ static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = { | |||
888 | .pa_end = 0x4a056fff, | 891 | .pa_end = 0x4a056fff, |
889 | .flags = ADDR_TYPE_RT | 892 | .flags = ADDR_TYPE_RT |
890 | }, | 893 | }, |
894 | { } | ||
891 | }; | 895 | }; |
892 | 896 | ||
893 | /* l4_cfg -> dma_system */ | 897 | /* l4_cfg -> dma_system */ |
@@ -896,7 +900,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = { | |||
896 | .slave = &omap44xx_dma_system_hwmod, | 900 | .slave = &omap44xx_dma_system_hwmod, |
897 | .clk = "l4_div_ck", | 901 | .clk = "l4_div_ck", |
898 | .addr = omap44xx_dma_system_addrs, | 902 | .addr = omap44xx_dma_system_addrs, |
899 | .addr_cnt = ARRAY_SIZE(omap44xx_dma_system_addrs), | ||
900 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 903 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
901 | }; | 904 | }; |
902 | 905 | ||
@@ -909,7 +912,6 @@ static struct omap_hwmod omap44xx_dma_system_hwmod = { | |||
909 | .name = "dma_system", | 912 | .name = "dma_system", |
910 | .class = &omap44xx_dma_hwmod_class, | 913 | .class = &omap44xx_dma_hwmod_class, |
911 | .mpu_irqs = omap44xx_dma_system_irqs, | 914 | .mpu_irqs = omap44xx_dma_system_irqs, |
912 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dma_system_irqs), | ||
913 | .main_clk = "l3_div_ck", | 915 | .main_clk = "l3_div_ck", |
914 | .prcm = { | 916 | .prcm = { |
915 | .omap4 = { | 917 | .omap4 = { |
@@ -948,10 +950,12 @@ static struct omap_hwmod_class omap44xx_dmic_hwmod_class = { | |||
948 | static struct omap_hwmod omap44xx_dmic_hwmod; | 950 | static struct omap_hwmod omap44xx_dmic_hwmod; |
949 | static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = { | 951 | static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = { |
950 | { .irq = 114 + OMAP44XX_IRQ_GIC_START }, | 952 | { .irq = 114 + OMAP44XX_IRQ_GIC_START }, |
953 | { .irq = -1 } | ||
951 | }; | 954 | }; |
952 | 955 | ||
953 | static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = { | 956 | static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = { |
954 | { .dma_req = 66 + OMAP44XX_DMA_REQ_START }, | 957 | { .dma_req = 66 + OMAP44XX_DMA_REQ_START }, |
958 | { .dma_req = -1 } | ||
955 | }; | 959 | }; |
956 | 960 | ||
957 | static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = { | 961 | static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = { |
@@ -960,6 +964,7 @@ static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = { | |||
960 | .pa_end = 0x4012e07f, | 964 | .pa_end = 0x4012e07f, |
961 | .flags = ADDR_TYPE_RT | 965 | .flags = ADDR_TYPE_RT |
962 | }, | 966 | }, |
967 | { } | ||
963 | }; | 968 | }; |
964 | 969 | ||
965 | /* l4_abe -> dmic */ | 970 | /* l4_abe -> dmic */ |
@@ -968,7 +973,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = { | |||
968 | .slave = &omap44xx_dmic_hwmod, | 973 | .slave = &omap44xx_dmic_hwmod, |
969 | .clk = "ocp_abe_iclk", | 974 | .clk = "ocp_abe_iclk", |
970 | .addr = omap44xx_dmic_addrs, | 975 | .addr = omap44xx_dmic_addrs, |
971 | .addr_cnt = ARRAY_SIZE(omap44xx_dmic_addrs), | ||
972 | .user = OCP_USER_MPU, | 976 | .user = OCP_USER_MPU, |
973 | }; | 977 | }; |
974 | 978 | ||
@@ -978,6 +982,7 @@ static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = { | |||
978 | .pa_end = 0x4902e07f, | 982 | .pa_end = 0x4902e07f, |
979 | .flags = ADDR_TYPE_RT | 983 | .flags = ADDR_TYPE_RT |
980 | }, | 984 | }, |
985 | { } | ||
981 | }; | 986 | }; |
982 | 987 | ||
983 | /* l4_abe -> dmic (dma) */ | 988 | /* l4_abe -> dmic (dma) */ |
@@ -986,7 +991,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = { | |||
986 | .slave = &omap44xx_dmic_hwmod, | 991 | .slave = &omap44xx_dmic_hwmod, |
987 | .clk = "ocp_abe_iclk", | 992 | .clk = "ocp_abe_iclk", |
988 | .addr = omap44xx_dmic_dma_addrs, | 993 | .addr = omap44xx_dmic_dma_addrs, |
989 | .addr_cnt = ARRAY_SIZE(omap44xx_dmic_dma_addrs), | ||
990 | .user = OCP_USER_SDMA, | 994 | .user = OCP_USER_SDMA, |
991 | }; | 995 | }; |
992 | 996 | ||
@@ -1000,11 +1004,9 @@ static struct omap_hwmod omap44xx_dmic_hwmod = { | |||
1000 | .name = "dmic", | 1004 | .name = "dmic", |
1001 | .class = &omap44xx_dmic_hwmod_class, | 1005 | .class = &omap44xx_dmic_hwmod_class, |
1002 | .mpu_irqs = omap44xx_dmic_irqs, | 1006 | .mpu_irqs = omap44xx_dmic_irqs, |
1003 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dmic_irqs), | ||
1004 | .sdma_reqs = omap44xx_dmic_sdma_reqs, | 1007 | .sdma_reqs = omap44xx_dmic_sdma_reqs, |
1005 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dmic_sdma_reqs), | ||
1006 | .main_clk = "dmic_fck", | 1008 | .main_clk = "dmic_fck", |
1007 | .prcm = { | 1009 | .prcm = { |
1008 | .omap4 = { | 1010 | .omap4 = { |
1009 | .clkctrl_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL, | 1011 | .clkctrl_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL, |
1010 | }, | 1012 | }, |
@@ -1026,6 +1028,7 @@ static struct omap_hwmod_class omap44xx_dsp_hwmod_class = { | |||
1026 | /* dsp */ | 1028 | /* dsp */ |
1027 | static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = { | 1029 | static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = { |
1028 | { .irq = 28 + OMAP44XX_IRQ_GIC_START }, | 1030 | { .irq = 28 + OMAP44XX_IRQ_GIC_START }, |
1031 | { .irq = -1 } | ||
1029 | }; | 1032 | }; |
1030 | 1033 | ||
1031 | static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = { | 1034 | static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = { |
@@ -1082,7 +1085,6 @@ static struct omap_hwmod omap44xx_dsp_hwmod = { | |||
1082 | .name = "dsp", | 1085 | .name = "dsp", |
1083 | .class = &omap44xx_dsp_hwmod_class, | 1086 | .class = &omap44xx_dsp_hwmod_class, |
1084 | .mpu_irqs = omap44xx_dsp_irqs, | 1087 | .mpu_irqs = omap44xx_dsp_irqs, |
1085 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dsp_irqs), | ||
1086 | .rst_lines = omap44xx_dsp_resets, | 1088 | .rst_lines = omap44xx_dsp_resets, |
1087 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets), | 1089 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets), |
1088 | .main_clk = "dsp_fck", | 1090 | .main_clk = "dsp_fck", |
@@ -1127,6 +1129,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = { | |||
1127 | .pa_end = 0x5800007f, | 1129 | .pa_end = 0x5800007f, |
1128 | .flags = ADDR_TYPE_RT | 1130 | .flags = ADDR_TYPE_RT |
1129 | }, | 1131 | }, |
1132 | { } | ||
1130 | }; | 1133 | }; |
1131 | 1134 | ||
1132 | /* l3_main_2 -> dss */ | 1135 | /* l3_main_2 -> dss */ |
@@ -1135,7 +1138,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = { | |||
1135 | .slave = &omap44xx_dss_hwmod, | 1138 | .slave = &omap44xx_dss_hwmod, |
1136 | .clk = "l3_div_ck", | 1139 | .clk = "l3_div_ck", |
1137 | .addr = omap44xx_dss_dma_addrs, | 1140 | .addr = omap44xx_dss_dma_addrs, |
1138 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dma_addrs), | ||
1139 | .user = OCP_USER_SDMA, | 1141 | .user = OCP_USER_SDMA, |
1140 | }; | 1142 | }; |
1141 | 1143 | ||
@@ -1145,6 +1147,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = { | |||
1145 | .pa_end = 0x4804007f, | 1147 | .pa_end = 0x4804007f, |
1146 | .flags = ADDR_TYPE_RT | 1148 | .flags = ADDR_TYPE_RT |
1147 | }, | 1149 | }, |
1150 | { } | ||
1148 | }; | 1151 | }; |
1149 | 1152 | ||
1150 | /* l4_per -> dss */ | 1153 | /* l4_per -> dss */ |
@@ -1153,7 +1156,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = { | |||
1153 | .slave = &omap44xx_dss_hwmod, | 1156 | .slave = &omap44xx_dss_hwmod, |
1154 | .clk = "l4_div_ck", | 1157 | .clk = "l4_div_ck", |
1155 | .addr = omap44xx_dss_addrs, | 1158 | .addr = omap44xx_dss_addrs, |
1156 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_addrs), | ||
1157 | .user = OCP_USER_MPU, | 1159 | .user = OCP_USER_MPU, |
1158 | }; | 1160 | }; |
1159 | 1161 | ||
@@ -1215,10 +1217,12 @@ static struct omap_hwmod_class omap44xx_dispc_hwmod_class = { | |||
1215 | static struct omap_hwmod omap44xx_dss_dispc_hwmod; | 1217 | static struct omap_hwmod omap44xx_dss_dispc_hwmod; |
1216 | static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = { | 1218 | static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = { |
1217 | { .irq = 25 + OMAP44XX_IRQ_GIC_START }, | 1219 | { .irq = 25 + OMAP44XX_IRQ_GIC_START }, |
1220 | { .irq = -1 } | ||
1218 | }; | 1221 | }; |
1219 | 1222 | ||
1220 | static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = { | 1223 | static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = { |
1221 | { .dma_req = 5 + OMAP44XX_DMA_REQ_START }, | 1224 | { .dma_req = 5 + OMAP44XX_DMA_REQ_START }, |
1225 | { .dma_req = -1 } | ||
1222 | }; | 1226 | }; |
1223 | 1227 | ||
1224 | static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = { | 1228 | static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = { |
@@ -1227,6 +1231,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = { | |||
1227 | .pa_end = 0x58001fff, | 1231 | .pa_end = 0x58001fff, |
1228 | .flags = ADDR_TYPE_RT | 1232 | .flags = ADDR_TYPE_RT |
1229 | }, | 1233 | }, |
1234 | { } | ||
1230 | }; | 1235 | }; |
1231 | 1236 | ||
1232 | /* l3_main_2 -> dss_dispc */ | 1237 | /* l3_main_2 -> dss_dispc */ |
@@ -1235,7 +1240,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = { | |||
1235 | .slave = &omap44xx_dss_dispc_hwmod, | 1240 | .slave = &omap44xx_dss_dispc_hwmod, |
1236 | .clk = "l3_div_ck", | 1241 | .clk = "l3_div_ck", |
1237 | .addr = omap44xx_dss_dispc_dma_addrs, | 1242 | .addr = omap44xx_dss_dispc_dma_addrs, |
1238 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dispc_dma_addrs), | ||
1239 | .user = OCP_USER_SDMA, | 1243 | .user = OCP_USER_SDMA, |
1240 | }; | 1244 | }; |
1241 | 1245 | ||
@@ -1245,6 +1249,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = { | |||
1245 | .pa_end = 0x48041fff, | 1249 | .pa_end = 0x48041fff, |
1246 | .flags = ADDR_TYPE_RT | 1250 | .flags = ADDR_TYPE_RT |
1247 | }, | 1251 | }, |
1252 | { } | ||
1248 | }; | 1253 | }; |
1249 | 1254 | ||
1250 | /* l4_per -> dss_dispc */ | 1255 | /* l4_per -> dss_dispc */ |
@@ -1253,7 +1258,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = { | |||
1253 | .slave = &omap44xx_dss_dispc_hwmod, | 1258 | .slave = &omap44xx_dss_dispc_hwmod, |
1254 | .clk = "l4_div_ck", | 1259 | .clk = "l4_div_ck", |
1255 | .addr = omap44xx_dss_dispc_addrs, | 1260 | .addr = omap44xx_dss_dispc_addrs, |
1256 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dispc_addrs), | ||
1257 | .user = OCP_USER_MPU, | 1261 | .user = OCP_USER_MPU, |
1258 | }; | 1262 | }; |
1259 | 1263 | ||
@@ -1267,9 +1271,7 @@ static struct omap_hwmod omap44xx_dss_dispc_hwmod = { | |||
1267 | .name = "dss_dispc", | 1271 | .name = "dss_dispc", |
1268 | .class = &omap44xx_dispc_hwmod_class, | 1272 | .class = &omap44xx_dispc_hwmod_class, |
1269 | .mpu_irqs = omap44xx_dss_dispc_irqs, | 1273 | .mpu_irqs = omap44xx_dss_dispc_irqs, |
1270 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_dispc_irqs), | ||
1271 | .sdma_reqs = omap44xx_dss_dispc_sdma_reqs, | 1274 | .sdma_reqs = omap44xx_dss_dispc_sdma_reqs, |
1272 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_dispc_sdma_reqs), | ||
1273 | .main_clk = "dss_fck", | 1275 | .main_clk = "dss_fck", |
1274 | .prcm = { | 1276 | .prcm = { |
1275 | .omap4 = { | 1277 | .omap4 = { |
@@ -1306,10 +1308,12 @@ static struct omap_hwmod_class omap44xx_dsi_hwmod_class = { | |||
1306 | static struct omap_hwmod omap44xx_dss_dsi1_hwmod; | 1308 | static struct omap_hwmod omap44xx_dss_dsi1_hwmod; |
1307 | static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = { | 1309 | static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = { |
1308 | { .irq = 53 + OMAP44XX_IRQ_GIC_START }, | 1310 | { .irq = 53 + OMAP44XX_IRQ_GIC_START }, |
1311 | { .irq = -1 } | ||
1309 | }; | 1312 | }; |
1310 | 1313 | ||
1311 | static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = { | 1314 | static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = { |
1312 | { .dma_req = 74 + OMAP44XX_DMA_REQ_START }, | 1315 | { .dma_req = 74 + OMAP44XX_DMA_REQ_START }, |
1316 | { .dma_req = -1 } | ||
1313 | }; | 1317 | }; |
1314 | 1318 | ||
1315 | static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = { | 1319 | static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = { |
@@ -1318,6 +1322,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = { | |||
1318 | .pa_end = 0x580041ff, | 1322 | .pa_end = 0x580041ff, |
1319 | .flags = ADDR_TYPE_RT | 1323 | .flags = ADDR_TYPE_RT |
1320 | }, | 1324 | }, |
1325 | { } | ||
1321 | }; | 1326 | }; |
1322 | 1327 | ||
1323 | /* l3_main_2 -> dss_dsi1 */ | 1328 | /* l3_main_2 -> dss_dsi1 */ |
@@ -1326,7 +1331,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = { | |||
1326 | .slave = &omap44xx_dss_dsi1_hwmod, | 1331 | .slave = &omap44xx_dss_dsi1_hwmod, |
1327 | .clk = "l3_div_ck", | 1332 | .clk = "l3_div_ck", |
1328 | .addr = omap44xx_dss_dsi1_dma_addrs, | 1333 | .addr = omap44xx_dss_dsi1_dma_addrs, |
1329 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_dma_addrs), | ||
1330 | .user = OCP_USER_SDMA, | 1334 | .user = OCP_USER_SDMA, |
1331 | }; | 1335 | }; |
1332 | 1336 | ||
@@ -1336,6 +1340,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = { | |||
1336 | .pa_end = 0x480441ff, | 1340 | .pa_end = 0x480441ff, |
1337 | .flags = ADDR_TYPE_RT | 1341 | .flags = ADDR_TYPE_RT |
1338 | }, | 1342 | }, |
1343 | { } | ||
1339 | }; | 1344 | }; |
1340 | 1345 | ||
1341 | /* l4_per -> dss_dsi1 */ | 1346 | /* l4_per -> dss_dsi1 */ |
@@ -1344,7 +1349,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = { | |||
1344 | .slave = &omap44xx_dss_dsi1_hwmod, | 1349 | .slave = &omap44xx_dss_dsi1_hwmod, |
1345 | .clk = "l4_div_ck", | 1350 | .clk = "l4_div_ck", |
1346 | .addr = omap44xx_dss_dsi1_addrs, | 1351 | .addr = omap44xx_dss_dsi1_addrs, |
1347 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_addrs), | ||
1348 | .user = OCP_USER_MPU, | 1352 | .user = OCP_USER_MPU, |
1349 | }; | 1353 | }; |
1350 | 1354 | ||
@@ -1358,9 +1362,7 @@ static struct omap_hwmod omap44xx_dss_dsi1_hwmod = { | |||
1358 | .name = "dss_dsi1", | 1362 | .name = "dss_dsi1", |
1359 | .class = &omap44xx_dsi_hwmod_class, | 1363 | .class = &omap44xx_dsi_hwmod_class, |
1360 | .mpu_irqs = omap44xx_dss_dsi1_irqs, | 1364 | .mpu_irqs = omap44xx_dss_dsi1_irqs, |
1361 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_irqs), | ||
1362 | .sdma_reqs = omap44xx_dss_dsi1_sdma_reqs, | 1365 | .sdma_reqs = omap44xx_dss_dsi1_sdma_reqs, |
1363 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_sdma_reqs), | ||
1364 | .main_clk = "dss_fck", | 1366 | .main_clk = "dss_fck", |
1365 | .prcm = { | 1367 | .prcm = { |
1366 | .omap4 = { | 1368 | .omap4 = { |
@@ -1376,10 +1378,12 @@ static struct omap_hwmod omap44xx_dss_dsi1_hwmod = { | |||
1376 | static struct omap_hwmod omap44xx_dss_dsi2_hwmod; | 1378 | static struct omap_hwmod omap44xx_dss_dsi2_hwmod; |
1377 | static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = { | 1379 | static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = { |
1378 | { .irq = 84 + OMAP44XX_IRQ_GIC_START }, | 1380 | { .irq = 84 + OMAP44XX_IRQ_GIC_START }, |
1381 | { .irq = -1 } | ||
1379 | }; | 1382 | }; |
1380 | 1383 | ||
1381 | static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = { | 1384 | static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = { |
1382 | { .dma_req = 83 + OMAP44XX_DMA_REQ_START }, | 1385 | { .dma_req = 83 + OMAP44XX_DMA_REQ_START }, |
1386 | { .dma_req = -1 } | ||
1383 | }; | 1387 | }; |
1384 | 1388 | ||
1385 | static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = { | 1389 | static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = { |
@@ -1388,6 +1392,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = { | |||
1388 | .pa_end = 0x580051ff, | 1392 | .pa_end = 0x580051ff, |
1389 | .flags = ADDR_TYPE_RT | 1393 | .flags = ADDR_TYPE_RT |
1390 | }, | 1394 | }, |
1395 | { } | ||
1391 | }; | 1396 | }; |
1392 | 1397 | ||
1393 | /* l3_main_2 -> dss_dsi2 */ | 1398 | /* l3_main_2 -> dss_dsi2 */ |
@@ -1396,7 +1401,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = { | |||
1396 | .slave = &omap44xx_dss_dsi2_hwmod, | 1401 | .slave = &omap44xx_dss_dsi2_hwmod, |
1397 | .clk = "l3_div_ck", | 1402 | .clk = "l3_div_ck", |
1398 | .addr = omap44xx_dss_dsi2_dma_addrs, | 1403 | .addr = omap44xx_dss_dsi2_dma_addrs, |
1399 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_dma_addrs), | ||
1400 | .user = OCP_USER_SDMA, | 1404 | .user = OCP_USER_SDMA, |
1401 | }; | 1405 | }; |
1402 | 1406 | ||
@@ -1406,6 +1410,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = { | |||
1406 | .pa_end = 0x480451ff, | 1410 | .pa_end = 0x480451ff, |
1407 | .flags = ADDR_TYPE_RT | 1411 | .flags = ADDR_TYPE_RT |
1408 | }, | 1412 | }, |
1413 | { } | ||
1409 | }; | 1414 | }; |
1410 | 1415 | ||
1411 | /* l4_per -> dss_dsi2 */ | 1416 | /* l4_per -> dss_dsi2 */ |
@@ -1414,7 +1419,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = { | |||
1414 | .slave = &omap44xx_dss_dsi2_hwmod, | 1419 | .slave = &omap44xx_dss_dsi2_hwmod, |
1415 | .clk = "l4_div_ck", | 1420 | .clk = "l4_div_ck", |
1416 | .addr = omap44xx_dss_dsi2_addrs, | 1421 | .addr = omap44xx_dss_dsi2_addrs, |
1417 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_addrs), | ||
1418 | .user = OCP_USER_MPU, | 1422 | .user = OCP_USER_MPU, |
1419 | }; | 1423 | }; |
1420 | 1424 | ||
@@ -1428,9 +1432,7 @@ static struct omap_hwmod omap44xx_dss_dsi2_hwmod = { | |||
1428 | .name = "dss_dsi2", | 1432 | .name = "dss_dsi2", |
1429 | .class = &omap44xx_dsi_hwmod_class, | 1433 | .class = &omap44xx_dsi_hwmod_class, |
1430 | .mpu_irqs = omap44xx_dss_dsi2_irqs, | 1434 | .mpu_irqs = omap44xx_dss_dsi2_irqs, |
1431 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_irqs), | ||
1432 | .sdma_reqs = omap44xx_dss_dsi2_sdma_reqs, | 1435 | .sdma_reqs = omap44xx_dss_dsi2_sdma_reqs, |
1433 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_sdma_reqs), | ||
1434 | .main_clk = "dss_fck", | 1436 | .main_clk = "dss_fck", |
1435 | .prcm = { | 1437 | .prcm = { |
1436 | .omap4 = { | 1438 | .omap4 = { |
@@ -1466,10 +1468,12 @@ static struct omap_hwmod_class omap44xx_hdmi_hwmod_class = { | |||
1466 | static struct omap_hwmod omap44xx_dss_hdmi_hwmod; | 1468 | static struct omap_hwmod omap44xx_dss_hdmi_hwmod; |
1467 | static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = { | 1469 | static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = { |
1468 | { .irq = 101 + OMAP44XX_IRQ_GIC_START }, | 1470 | { .irq = 101 + OMAP44XX_IRQ_GIC_START }, |
1471 | { .irq = -1 } | ||
1469 | }; | 1472 | }; |
1470 | 1473 | ||
1471 | static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = { | 1474 | static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = { |
1472 | { .dma_req = 75 + OMAP44XX_DMA_REQ_START }, | 1475 | { .dma_req = 75 + OMAP44XX_DMA_REQ_START }, |
1476 | { .dma_req = -1 } | ||
1473 | }; | 1477 | }; |
1474 | 1478 | ||
1475 | static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = { | 1479 | static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = { |
@@ -1478,6 +1482,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = { | |||
1478 | .pa_end = 0x58006fff, | 1482 | .pa_end = 0x58006fff, |
1479 | .flags = ADDR_TYPE_RT | 1483 | .flags = ADDR_TYPE_RT |
1480 | }, | 1484 | }, |
1485 | { } | ||
1481 | }; | 1486 | }; |
1482 | 1487 | ||
1483 | /* l3_main_2 -> dss_hdmi */ | 1488 | /* l3_main_2 -> dss_hdmi */ |
@@ -1486,7 +1491,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = { | |||
1486 | .slave = &omap44xx_dss_hdmi_hwmod, | 1491 | .slave = &omap44xx_dss_hdmi_hwmod, |
1487 | .clk = "l3_div_ck", | 1492 | .clk = "l3_div_ck", |
1488 | .addr = omap44xx_dss_hdmi_dma_addrs, | 1493 | .addr = omap44xx_dss_hdmi_dma_addrs, |
1489 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_dma_addrs), | ||
1490 | .user = OCP_USER_SDMA, | 1494 | .user = OCP_USER_SDMA, |
1491 | }; | 1495 | }; |
1492 | 1496 | ||
@@ -1496,6 +1500,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = { | |||
1496 | .pa_end = 0x48046fff, | 1500 | .pa_end = 0x48046fff, |
1497 | .flags = ADDR_TYPE_RT | 1501 | .flags = ADDR_TYPE_RT |
1498 | }, | 1502 | }, |
1503 | { } | ||
1499 | }; | 1504 | }; |
1500 | 1505 | ||
1501 | /* l4_per -> dss_hdmi */ | 1506 | /* l4_per -> dss_hdmi */ |
@@ -1504,7 +1509,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = { | |||
1504 | .slave = &omap44xx_dss_hdmi_hwmod, | 1509 | .slave = &omap44xx_dss_hdmi_hwmod, |
1505 | .clk = "l4_div_ck", | 1510 | .clk = "l4_div_ck", |
1506 | .addr = omap44xx_dss_hdmi_addrs, | 1511 | .addr = omap44xx_dss_hdmi_addrs, |
1507 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_addrs), | ||
1508 | .user = OCP_USER_MPU, | 1512 | .user = OCP_USER_MPU, |
1509 | }; | 1513 | }; |
1510 | 1514 | ||
@@ -1518,9 +1522,7 @@ static struct omap_hwmod omap44xx_dss_hdmi_hwmod = { | |||
1518 | .name = "dss_hdmi", | 1522 | .name = "dss_hdmi", |
1519 | .class = &omap44xx_hdmi_hwmod_class, | 1523 | .class = &omap44xx_hdmi_hwmod_class, |
1520 | .mpu_irqs = omap44xx_dss_hdmi_irqs, | 1524 | .mpu_irqs = omap44xx_dss_hdmi_irqs, |
1521 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_irqs), | ||
1522 | .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs, | 1525 | .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs, |
1523 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_sdma_reqs), | ||
1524 | .main_clk = "dss_fck", | 1526 | .main_clk = "dss_fck", |
1525 | .prcm = { | 1527 | .prcm = { |
1526 | .omap4 = { | 1528 | .omap4 = { |
@@ -1556,6 +1558,7 @@ static struct omap_hwmod_class omap44xx_rfbi_hwmod_class = { | |||
1556 | static struct omap_hwmod omap44xx_dss_rfbi_hwmod; | 1558 | static struct omap_hwmod omap44xx_dss_rfbi_hwmod; |
1557 | static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = { | 1559 | static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = { |
1558 | { .dma_req = 13 + OMAP44XX_DMA_REQ_START }, | 1560 | { .dma_req = 13 + OMAP44XX_DMA_REQ_START }, |
1561 | { .dma_req = -1 } | ||
1559 | }; | 1562 | }; |
1560 | 1563 | ||
1561 | static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = { | 1564 | static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = { |
@@ -1564,6 +1567,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = { | |||
1564 | .pa_end = 0x580020ff, | 1567 | .pa_end = 0x580020ff, |
1565 | .flags = ADDR_TYPE_RT | 1568 | .flags = ADDR_TYPE_RT |
1566 | }, | 1569 | }, |
1570 | { } | ||
1567 | }; | 1571 | }; |
1568 | 1572 | ||
1569 | /* l3_main_2 -> dss_rfbi */ | 1573 | /* l3_main_2 -> dss_rfbi */ |
@@ -1572,7 +1576,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = { | |||
1572 | .slave = &omap44xx_dss_rfbi_hwmod, | 1576 | .slave = &omap44xx_dss_rfbi_hwmod, |
1573 | .clk = "l3_div_ck", | 1577 | .clk = "l3_div_ck", |
1574 | .addr = omap44xx_dss_rfbi_dma_addrs, | 1578 | .addr = omap44xx_dss_rfbi_dma_addrs, |
1575 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_dma_addrs), | ||
1576 | .user = OCP_USER_SDMA, | 1579 | .user = OCP_USER_SDMA, |
1577 | }; | 1580 | }; |
1578 | 1581 | ||
@@ -1582,6 +1585,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = { | |||
1582 | .pa_end = 0x480420ff, | 1585 | .pa_end = 0x480420ff, |
1583 | .flags = ADDR_TYPE_RT | 1586 | .flags = ADDR_TYPE_RT |
1584 | }, | 1587 | }, |
1588 | { } | ||
1585 | }; | 1589 | }; |
1586 | 1590 | ||
1587 | /* l4_per -> dss_rfbi */ | 1591 | /* l4_per -> dss_rfbi */ |
@@ -1590,7 +1594,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = { | |||
1590 | .slave = &omap44xx_dss_rfbi_hwmod, | 1594 | .slave = &omap44xx_dss_rfbi_hwmod, |
1591 | .clk = "l4_div_ck", | 1595 | .clk = "l4_div_ck", |
1592 | .addr = omap44xx_dss_rfbi_addrs, | 1596 | .addr = omap44xx_dss_rfbi_addrs, |
1593 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_addrs), | ||
1594 | .user = OCP_USER_MPU, | 1597 | .user = OCP_USER_MPU, |
1595 | }; | 1598 | }; |
1596 | 1599 | ||
@@ -1604,7 +1607,6 @@ static struct omap_hwmod omap44xx_dss_rfbi_hwmod = { | |||
1604 | .name = "dss_rfbi", | 1607 | .name = "dss_rfbi", |
1605 | .class = &omap44xx_rfbi_hwmod_class, | 1608 | .class = &omap44xx_rfbi_hwmod_class, |
1606 | .sdma_reqs = omap44xx_dss_rfbi_sdma_reqs, | 1609 | .sdma_reqs = omap44xx_dss_rfbi_sdma_reqs, |
1607 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_sdma_reqs), | ||
1608 | .main_clk = "dss_fck", | 1610 | .main_clk = "dss_fck", |
1609 | .prcm = { | 1611 | .prcm = { |
1610 | .omap4 = { | 1612 | .omap4 = { |
@@ -1633,6 +1635,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = { | |||
1633 | .pa_end = 0x580030ff, | 1635 | .pa_end = 0x580030ff, |
1634 | .flags = ADDR_TYPE_RT | 1636 | .flags = ADDR_TYPE_RT |
1635 | }, | 1637 | }, |
1638 | { } | ||
1636 | }; | 1639 | }; |
1637 | 1640 | ||
1638 | /* l3_main_2 -> dss_venc */ | 1641 | /* l3_main_2 -> dss_venc */ |
@@ -1641,7 +1644,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = { | |||
1641 | .slave = &omap44xx_dss_venc_hwmod, | 1644 | .slave = &omap44xx_dss_venc_hwmod, |
1642 | .clk = "l3_div_ck", | 1645 | .clk = "l3_div_ck", |
1643 | .addr = omap44xx_dss_venc_dma_addrs, | 1646 | .addr = omap44xx_dss_venc_dma_addrs, |
1644 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_venc_dma_addrs), | ||
1645 | .user = OCP_USER_SDMA, | 1647 | .user = OCP_USER_SDMA, |
1646 | }; | 1648 | }; |
1647 | 1649 | ||
@@ -1651,6 +1653,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = { | |||
1651 | .pa_end = 0x480430ff, | 1653 | .pa_end = 0x480430ff, |
1652 | .flags = ADDR_TYPE_RT | 1654 | .flags = ADDR_TYPE_RT |
1653 | }, | 1655 | }, |
1656 | { } | ||
1654 | }; | 1657 | }; |
1655 | 1658 | ||
1656 | /* l4_per -> dss_venc */ | 1659 | /* l4_per -> dss_venc */ |
@@ -1659,7 +1662,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = { | |||
1659 | .slave = &omap44xx_dss_venc_hwmod, | 1662 | .slave = &omap44xx_dss_venc_hwmod, |
1660 | .clk = "l4_div_ck", | 1663 | .clk = "l4_div_ck", |
1661 | .addr = omap44xx_dss_venc_addrs, | 1664 | .addr = omap44xx_dss_venc_addrs, |
1662 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_venc_addrs), | ||
1663 | .user = OCP_USER_MPU, | 1665 | .user = OCP_USER_MPU, |
1664 | }; | 1666 | }; |
1665 | 1667 | ||
@@ -1716,6 +1718,7 @@ static struct omap_gpio_dev_attr gpio_dev_attr = { | |||
1716 | static struct omap_hwmod omap44xx_gpio1_hwmod; | 1718 | static struct omap_hwmod omap44xx_gpio1_hwmod; |
1717 | static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = { | 1719 | static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = { |
1718 | { .irq = 29 + OMAP44XX_IRQ_GIC_START }, | 1720 | { .irq = 29 + OMAP44XX_IRQ_GIC_START }, |
1721 | { .irq = -1 } | ||
1719 | }; | 1722 | }; |
1720 | 1723 | ||
1721 | static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = { | 1724 | static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = { |
@@ -1724,6 +1727,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = { | |||
1724 | .pa_end = 0x4a3101ff, | 1727 | .pa_end = 0x4a3101ff, |
1725 | .flags = ADDR_TYPE_RT | 1728 | .flags = ADDR_TYPE_RT |
1726 | }, | 1729 | }, |
1730 | { } | ||
1727 | }; | 1731 | }; |
1728 | 1732 | ||
1729 | /* l4_wkup -> gpio1 */ | 1733 | /* l4_wkup -> gpio1 */ |
@@ -1732,7 +1736,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = { | |||
1732 | .slave = &omap44xx_gpio1_hwmod, | 1736 | .slave = &omap44xx_gpio1_hwmod, |
1733 | .clk = "l4_wkup_clk_mux_ck", | 1737 | .clk = "l4_wkup_clk_mux_ck", |
1734 | .addr = omap44xx_gpio1_addrs, | 1738 | .addr = omap44xx_gpio1_addrs, |
1735 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio1_addrs), | ||
1736 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1739 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1737 | }; | 1740 | }; |
1738 | 1741 | ||
@@ -1749,7 +1752,6 @@ static struct omap_hwmod omap44xx_gpio1_hwmod = { | |||
1749 | .name = "gpio1", | 1752 | .name = "gpio1", |
1750 | .class = &omap44xx_gpio_hwmod_class, | 1753 | .class = &omap44xx_gpio_hwmod_class, |
1751 | .mpu_irqs = omap44xx_gpio1_irqs, | 1754 | .mpu_irqs = omap44xx_gpio1_irqs, |
1752 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio1_irqs), | ||
1753 | .main_clk = "gpio1_ick", | 1755 | .main_clk = "gpio1_ick", |
1754 | .prcm = { | 1756 | .prcm = { |
1755 | .omap4 = { | 1757 | .omap4 = { |
@@ -1768,6 +1770,7 @@ static struct omap_hwmod omap44xx_gpio1_hwmod = { | |||
1768 | static struct omap_hwmod omap44xx_gpio2_hwmod; | 1770 | static struct omap_hwmod omap44xx_gpio2_hwmod; |
1769 | static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = { | 1771 | static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = { |
1770 | { .irq = 30 + OMAP44XX_IRQ_GIC_START }, | 1772 | { .irq = 30 + OMAP44XX_IRQ_GIC_START }, |
1773 | { .irq = -1 } | ||
1771 | }; | 1774 | }; |
1772 | 1775 | ||
1773 | static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = { | 1776 | static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = { |
@@ -1776,6 +1779,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = { | |||
1776 | .pa_end = 0x480551ff, | 1779 | .pa_end = 0x480551ff, |
1777 | .flags = ADDR_TYPE_RT | 1780 | .flags = ADDR_TYPE_RT |
1778 | }, | 1781 | }, |
1782 | { } | ||
1779 | }; | 1783 | }; |
1780 | 1784 | ||
1781 | /* l4_per -> gpio2 */ | 1785 | /* l4_per -> gpio2 */ |
@@ -1784,7 +1788,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = { | |||
1784 | .slave = &omap44xx_gpio2_hwmod, | 1788 | .slave = &omap44xx_gpio2_hwmod, |
1785 | .clk = "l4_div_ck", | 1789 | .clk = "l4_div_ck", |
1786 | .addr = omap44xx_gpio2_addrs, | 1790 | .addr = omap44xx_gpio2_addrs, |
1787 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio2_addrs), | ||
1788 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1791 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1789 | }; | 1792 | }; |
1790 | 1793 | ||
@@ -1802,7 +1805,6 @@ static struct omap_hwmod omap44xx_gpio2_hwmod = { | |||
1802 | .class = &omap44xx_gpio_hwmod_class, | 1805 | .class = &omap44xx_gpio_hwmod_class, |
1803 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1806 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
1804 | .mpu_irqs = omap44xx_gpio2_irqs, | 1807 | .mpu_irqs = omap44xx_gpio2_irqs, |
1805 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio2_irqs), | ||
1806 | .main_clk = "gpio2_ick", | 1808 | .main_clk = "gpio2_ick", |
1807 | .prcm = { | 1809 | .prcm = { |
1808 | .omap4 = { | 1810 | .omap4 = { |
@@ -1821,6 +1823,7 @@ static struct omap_hwmod omap44xx_gpio2_hwmod = { | |||
1821 | static struct omap_hwmod omap44xx_gpio3_hwmod; | 1823 | static struct omap_hwmod omap44xx_gpio3_hwmod; |
1822 | static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = { | 1824 | static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = { |
1823 | { .irq = 31 + OMAP44XX_IRQ_GIC_START }, | 1825 | { .irq = 31 + OMAP44XX_IRQ_GIC_START }, |
1826 | { .irq = -1 } | ||
1824 | }; | 1827 | }; |
1825 | 1828 | ||
1826 | static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = { | 1829 | static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = { |
@@ -1829,6 +1832,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = { | |||
1829 | .pa_end = 0x480571ff, | 1832 | .pa_end = 0x480571ff, |
1830 | .flags = ADDR_TYPE_RT | 1833 | .flags = ADDR_TYPE_RT |
1831 | }, | 1834 | }, |
1835 | { } | ||
1832 | }; | 1836 | }; |
1833 | 1837 | ||
1834 | /* l4_per -> gpio3 */ | 1838 | /* l4_per -> gpio3 */ |
@@ -1837,7 +1841,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = { | |||
1837 | .slave = &omap44xx_gpio3_hwmod, | 1841 | .slave = &omap44xx_gpio3_hwmod, |
1838 | .clk = "l4_div_ck", | 1842 | .clk = "l4_div_ck", |
1839 | .addr = omap44xx_gpio3_addrs, | 1843 | .addr = omap44xx_gpio3_addrs, |
1840 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio3_addrs), | ||
1841 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1844 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1842 | }; | 1845 | }; |
1843 | 1846 | ||
@@ -1855,7 +1858,6 @@ static struct omap_hwmod omap44xx_gpio3_hwmod = { | |||
1855 | .class = &omap44xx_gpio_hwmod_class, | 1858 | .class = &omap44xx_gpio_hwmod_class, |
1856 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1859 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
1857 | .mpu_irqs = omap44xx_gpio3_irqs, | 1860 | .mpu_irqs = omap44xx_gpio3_irqs, |
1858 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio3_irqs), | ||
1859 | .main_clk = "gpio3_ick", | 1861 | .main_clk = "gpio3_ick", |
1860 | .prcm = { | 1862 | .prcm = { |
1861 | .omap4 = { | 1863 | .omap4 = { |
@@ -1874,6 +1876,7 @@ static struct omap_hwmod omap44xx_gpio3_hwmod = { | |||
1874 | static struct omap_hwmod omap44xx_gpio4_hwmod; | 1876 | static struct omap_hwmod omap44xx_gpio4_hwmod; |
1875 | static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = { | 1877 | static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = { |
1876 | { .irq = 32 + OMAP44XX_IRQ_GIC_START }, | 1878 | { .irq = 32 + OMAP44XX_IRQ_GIC_START }, |
1879 | { .irq = -1 } | ||
1877 | }; | 1880 | }; |
1878 | 1881 | ||
1879 | static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = { | 1882 | static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = { |
@@ -1882,6 +1885,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = { | |||
1882 | .pa_end = 0x480591ff, | 1885 | .pa_end = 0x480591ff, |
1883 | .flags = ADDR_TYPE_RT | 1886 | .flags = ADDR_TYPE_RT |
1884 | }, | 1887 | }, |
1888 | { } | ||
1885 | }; | 1889 | }; |
1886 | 1890 | ||
1887 | /* l4_per -> gpio4 */ | 1891 | /* l4_per -> gpio4 */ |
@@ -1890,7 +1894,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = { | |||
1890 | .slave = &omap44xx_gpio4_hwmod, | 1894 | .slave = &omap44xx_gpio4_hwmod, |
1891 | .clk = "l4_div_ck", | 1895 | .clk = "l4_div_ck", |
1892 | .addr = omap44xx_gpio4_addrs, | 1896 | .addr = omap44xx_gpio4_addrs, |
1893 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio4_addrs), | ||
1894 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1897 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1895 | }; | 1898 | }; |
1896 | 1899 | ||
@@ -1908,7 +1911,6 @@ static struct omap_hwmod omap44xx_gpio4_hwmod = { | |||
1908 | .class = &omap44xx_gpio_hwmod_class, | 1911 | .class = &omap44xx_gpio_hwmod_class, |
1909 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1912 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
1910 | .mpu_irqs = omap44xx_gpio4_irqs, | 1913 | .mpu_irqs = omap44xx_gpio4_irqs, |
1911 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio4_irqs), | ||
1912 | .main_clk = "gpio4_ick", | 1914 | .main_clk = "gpio4_ick", |
1913 | .prcm = { | 1915 | .prcm = { |
1914 | .omap4 = { | 1916 | .omap4 = { |
@@ -1927,6 +1929,7 @@ static struct omap_hwmod omap44xx_gpio4_hwmod = { | |||
1927 | static struct omap_hwmod omap44xx_gpio5_hwmod; | 1929 | static struct omap_hwmod omap44xx_gpio5_hwmod; |
1928 | static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = { | 1930 | static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = { |
1929 | { .irq = 33 + OMAP44XX_IRQ_GIC_START }, | 1931 | { .irq = 33 + OMAP44XX_IRQ_GIC_START }, |
1932 | { .irq = -1 } | ||
1930 | }; | 1933 | }; |
1931 | 1934 | ||
1932 | static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = { | 1935 | static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = { |
@@ -1935,6 +1938,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = { | |||
1935 | .pa_end = 0x4805b1ff, | 1938 | .pa_end = 0x4805b1ff, |
1936 | .flags = ADDR_TYPE_RT | 1939 | .flags = ADDR_TYPE_RT |
1937 | }, | 1940 | }, |
1941 | { } | ||
1938 | }; | 1942 | }; |
1939 | 1943 | ||
1940 | /* l4_per -> gpio5 */ | 1944 | /* l4_per -> gpio5 */ |
@@ -1943,7 +1947,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = { | |||
1943 | .slave = &omap44xx_gpio5_hwmod, | 1947 | .slave = &omap44xx_gpio5_hwmod, |
1944 | .clk = "l4_div_ck", | 1948 | .clk = "l4_div_ck", |
1945 | .addr = omap44xx_gpio5_addrs, | 1949 | .addr = omap44xx_gpio5_addrs, |
1946 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio5_addrs), | ||
1947 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1950 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
1948 | }; | 1951 | }; |
1949 | 1952 | ||
@@ -1961,7 +1964,6 @@ static struct omap_hwmod omap44xx_gpio5_hwmod = { | |||
1961 | .class = &omap44xx_gpio_hwmod_class, | 1964 | .class = &omap44xx_gpio_hwmod_class, |
1962 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 1965 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
1963 | .mpu_irqs = omap44xx_gpio5_irqs, | 1966 | .mpu_irqs = omap44xx_gpio5_irqs, |
1964 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio5_irqs), | ||
1965 | .main_clk = "gpio5_ick", | 1967 | .main_clk = "gpio5_ick", |
1966 | .prcm = { | 1968 | .prcm = { |
1967 | .omap4 = { | 1969 | .omap4 = { |
@@ -1980,6 +1982,7 @@ static struct omap_hwmod omap44xx_gpio5_hwmod = { | |||
1980 | static struct omap_hwmod omap44xx_gpio6_hwmod; | 1982 | static struct omap_hwmod omap44xx_gpio6_hwmod; |
1981 | static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = { | 1983 | static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = { |
1982 | { .irq = 34 + OMAP44XX_IRQ_GIC_START }, | 1984 | { .irq = 34 + OMAP44XX_IRQ_GIC_START }, |
1985 | { .irq = -1 } | ||
1983 | }; | 1986 | }; |
1984 | 1987 | ||
1985 | static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = { | 1988 | static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = { |
@@ -1988,6 +1991,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = { | |||
1988 | .pa_end = 0x4805d1ff, | 1991 | .pa_end = 0x4805d1ff, |
1989 | .flags = ADDR_TYPE_RT | 1992 | .flags = ADDR_TYPE_RT |
1990 | }, | 1993 | }, |
1994 | { } | ||
1991 | }; | 1995 | }; |
1992 | 1996 | ||
1993 | /* l4_per -> gpio6 */ | 1997 | /* l4_per -> gpio6 */ |
@@ -1996,7 +2000,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = { | |||
1996 | .slave = &omap44xx_gpio6_hwmod, | 2000 | .slave = &omap44xx_gpio6_hwmod, |
1997 | .clk = "l4_div_ck", | 2001 | .clk = "l4_div_ck", |
1998 | .addr = omap44xx_gpio6_addrs, | 2002 | .addr = omap44xx_gpio6_addrs, |
1999 | .addr_cnt = ARRAY_SIZE(omap44xx_gpio6_addrs), | ||
2000 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2003 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2001 | }; | 2004 | }; |
2002 | 2005 | ||
@@ -2014,7 +2017,6 @@ static struct omap_hwmod omap44xx_gpio6_hwmod = { | |||
2014 | .class = &omap44xx_gpio_hwmod_class, | 2017 | .class = &omap44xx_gpio_hwmod_class, |
2015 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, | 2018 | .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, |
2016 | .mpu_irqs = omap44xx_gpio6_irqs, | 2019 | .mpu_irqs = omap44xx_gpio6_irqs, |
2017 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio6_irqs), | ||
2018 | .main_clk = "gpio6_ick", | 2020 | .main_clk = "gpio6_ick", |
2019 | .prcm = { | 2021 | .prcm = { |
2020 | .omap4 = { | 2022 | .omap4 = { |
@@ -2044,7 +2046,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_hsi_sysc = { | |||
2044 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | 2046 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), |
2045 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | 2047 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
2046 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | 2048 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | |
2047 | MSTANDBY_SMART), | 2049 | MSTANDBY_SMART | MSTANDBY_SMART_WKUP), |
2048 | .sysc_fields = &omap_hwmod_sysc_type1, | 2050 | .sysc_fields = &omap_hwmod_sysc_type1, |
2049 | }; | 2051 | }; |
2050 | 2052 | ||
@@ -2058,6 +2060,7 @@ static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = { | |||
2058 | { .name = "mpu_p1", .irq = 67 + OMAP44XX_IRQ_GIC_START }, | 2060 | { .name = "mpu_p1", .irq = 67 + OMAP44XX_IRQ_GIC_START }, |
2059 | { .name = "mpu_p2", .irq = 68 + OMAP44XX_IRQ_GIC_START }, | 2061 | { .name = "mpu_p2", .irq = 68 + OMAP44XX_IRQ_GIC_START }, |
2060 | { .name = "mpu_dma", .irq = 71 + OMAP44XX_IRQ_GIC_START }, | 2062 | { .name = "mpu_dma", .irq = 71 + OMAP44XX_IRQ_GIC_START }, |
2063 | { .irq = -1 } | ||
2061 | }; | 2064 | }; |
2062 | 2065 | ||
2063 | /* hsi master ports */ | 2066 | /* hsi master ports */ |
@@ -2071,6 +2074,7 @@ static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = { | |||
2071 | .pa_end = 0x4a05bfff, | 2074 | .pa_end = 0x4a05bfff, |
2072 | .flags = ADDR_TYPE_RT | 2075 | .flags = ADDR_TYPE_RT |
2073 | }, | 2076 | }, |
2077 | { } | ||
2074 | }; | 2078 | }; |
2075 | 2079 | ||
2076 | /* l4_cfg -> hsi */ | 2080 | /* l4_cfg -> hsi */ |
@@ -2079,7 +2083,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = { | |||
2079 | .slave = &omap44xx_hsi_hwmod, | 2083 | .slave = &omap44xx_hsi_hwmod, |
2080 | .clk = "l4_div_ck", | 2084 | .clk = "l4_div_ck", |
2081 | .addr = omap44xx_hsi_addrs, | 2085 | .addr = omap44xx_hsi_addrs, |
2082 | .addr_cnt = ARRAY_SIZE(omap44xx_hsi_addrs), | ||
2083 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2086 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2084 | }; | 2087 | }; |
2085 | 2088 | ||
@@ -2092,9 +2095,8 @@ static struct omap_hwmod omap44xx_hsi_hwmod = { | |||
2092 | .name = "hsi", | 2095 | .name = "hsi", |
2093 | .class = &omap44xx_hsi_hwmod_class, | 2096 | .class = &omap44xx_hsi_hwmod_class, |
2094 | .mpu_irqs = omap44xx_hsi_irqs, | 2097 | .mpu_irqs = omap44xx_hsi_irqs, |
2095 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_hsi_irqs), | ||
2096 | .main_clk = "hsi_fck", | 2098 | .main_clk = "hsi_fck", |
2097 | .prcm = { | 2099 | .prcm = { |
2098 | .omap4 = { | 2100 | .omap4 = { |
2099 | .clkctrl_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL, | 2101 | .clkctrl_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL, |
2100 | }, | 2102 | }, |
@@ -2131,11 +2133,13 @@ static struct omap_hwmod_class omap44xx_i2c_hwmod_class = { | |||
2131 | static struct omap_hwmod omap44xx_i2c1_hwmod; | 2133 | static struct omap_hwmod omap44xx_i2c1_hwmod; |
2132 | static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = { | 2134 | static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = { |
2133 | { .irq = 56 + OMAP44XX_IRQ_GIC_START }, | 2135 | { .irq = 56 + OMAP44XX_IRQ_GIC_START }, |
2136 | { .irq = -1 } | ||
2134 | }; | 2137 | }; |
2135 | 2138 | ||
2136 | static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = { | 2139 | static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = { |
2137 | { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START }, | 2140 | { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START }, |
2138 | { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START }, | 2141 | { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START }, |
2142 | { .dma_req = -1 } | ||
2139 | }; | 2143 | }; |
2140 | 2144 | ||
2141 | static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = { | 2145 | static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = { |
@@ -2144,6 +2148,7 @@ static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = { | |||
2144 | .pa_end = 0x480700ff, | 2148 | .pa_end = 0x480700ff, |
2145 | .flags = ADDR_TYPE_RT | 2149 | .flags = ADDR_TYPE_RT |
2146 | }, | 2150 | }, |
2151 | { } | ||
2147 | }; | 2152 | }; |
2148 | 2153 | ||
2149 | /* l4_per -> i2c1 */ | 2154 | /* l4_per -> i2c1 */ |
@@ -2152,7 +2157,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = { | |||
2152 | .slave = &omap44xx_i2c1_hwmod, | 2157 | .slave = &omap44xx_i2c1_hwmod, |
2153 | .clk = "l4_div_ck", | 2158 | .clk = "l4_div_ck", |
2154 | .addr = omap44xx_i2c1_addrs, | 2159 | .addr = omap44xx_i2c1_addrs, |
2155 | .addr_cnt = ARRAY_SIZE(omap44xx_i2c1_addrs), | ||
2156 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2160 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2157 | }; | 2161 | }; |
2158 | 2162 | ||
@@ -2166,9 +2170,7 @@ static struct omap_hwmod omap44xx_i2c1_hwmod = { | |||
2166 | .class = &omap44xx_i2c_hwmod_class, | 2170 | .class = &omap44xx_i2c_hwmod_class, |
2167 | .flags = HWMOD_INIT_NO_RESET, | 2171 | .flags = HWMOD_INIT_NO_RESET, |
2168 | .mpu_irqs = omap44xx_i2c1_irqs, | 2172 | .mpu_irqs = omap44xx_i2c1_irqs, |
2169 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c1_irqs), | ||
2170 | .sdma_reqs = omap44xx_i2c1_sdma_reqs, | 2173 | .sdma_reqs = omap44xx_i2c1_sdma_reqs, |
2171 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c1_sdma_reqs), | ||
2172 | .main_clk = "i2c1_fck", | 2174 | .main_clk = "i2c1_fck", |
2173 | .prcm = { | 2175 | .prcm = { |
2174 | .omap4 = { | 2176 | .omap4 = { |
@@ -2184,11 +2186,13 @@ static struct omap_hwmod omap44xx_i2c1_hwmod = { | |||
2184 | static struct omap_hwmod omap44xx_i2c2_hwmod; | 2186 | static struct omap_hwmod omap44xx_i2c2_hwmod; |
2185 | static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = { | 2187 | static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = { |
2186 | { .irq = 57 + OMAP44XX_IRQ_GIC_START }, | 2188 | { .irq = 57 + OMAP44XX_IRQ_GIC_START }, |
2189 | { .irq = -1 } | ||
2187 | }; | 2190 | }; |
2188 | 2191 | ||
2189 | static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = { | 2192 | static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = { |
2190 | { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START }, | 2193 | { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START }, |
2191 | { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START }, | 2194 | { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START }, |
2195 | { .dma_req = -1 } | ||
2192 | }; | 2196 | }; |
2193 | 2197 | ||
2194 | static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = { | 2198 | static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = { |
@@ -2197,6 +2201,7 @@ static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = { | |||
2197 | .pa_end = 0x480720ff, | 2201 | .pa_end = 0x480720ff, |
2198 | .flags = ADDR_TYPE_RT | 2202 | .flags = ADDR_TYPE_RT |
2199 | }, | 2203 | }, |
2204 | { } | ||
2200 | }; | 2205 | }; |
2201 | 2206 | ||
2202 | /* l4_per -> i2c2 */ | 2207 | /* l4_per -> i2c2 */ |
@@ -2205,7 +2210,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = { | |||
2205 | .slave = &omap44xx_i2c2_hwmod, | 2210 | .slave = &omap44xx_i2c2_hwmod, |
2206 | .clk = "l4_div_ck", | 2211 | .clk = "l4_div_ck", |
2207 | .addr = omap44xx_i2c2_addrs, | 2212 | .addr = omap44xx_i2c2_addrs, |
2208 | .addr_cnt = ARRAY_SIZE(omap44xx_i2c2_addrs), | ||
2209 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2213 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2210 | }; | 2214 | }; |
2211 | 2215 | ||
@@ -2219,9 +2223,7 @@ static struct omap_hwmod omap44xx_i2c2_hwmod = { | |||
2219 | .class = &omap44xx_i2c_hwmod_class, | 2223 | .class = &omap44xx_i2c_hwmod_class, |
2220 | .flags = HWMOD_INIT_NO_RESET, | 2224 | .flags = HWMOD_INIT_NO_RESET, |
2221 | .mpu_irqs = omap44xx_i2c2_irqs, | 2225 | .mpu_irqs = omap44xx_i2c2_irqs, |
2222 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c2_irqs), | ||
2223 | .sdma_reqs = omap44xx_i2c2_sdma_reqs, | 2226 | .sdma_reqs = omap44xx_i2c2_sdma_reqs, |
2224 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c2_sdma_reqs), | ||
2225 | .main_clk = "i2c2_fck", | 2227 | .main_clk = "i2c2_fck", |
2226 | .prcm = { | 2228 | .prcm = { |
2227 | .omap4 = { | 2229 | .omap4 = { |
@@ -2237,11 +2239,13 @@ static struct omap_hwmod omap44xx_i2c2_hwmod = { | |||
2237 | static struct omap_hwmod omap44xx_i2c3_hwmod; | 2239 | static struct omap_hwmod omap44xx_i2c3_hwmod; |
2238 | static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = { | 2240 | static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = { |
2239 | { .irq = 61 + OMAP44XX_IRQ_GIC_START }, | 2241 | { .irq = 61 + OMAP44XX_IRQ_GIC_START }, |
2242 | { .irq = -1 } | ||
2240 | }; | 2243 | }; |
2241 | 2244 | ||
2242 | static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = { | 2245 | static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = { |
2243 | { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START }, | 2246 | { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START }, |
2244 | { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START }, | 2247 | { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START }, |
2248 | { .dma_req = -1 } | ||
2245 | }; | 2249 | }; |
2246 | 2250 | ||
2247 | static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = { | 2251 | static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = { |
@@ -2250,6 +2254,7 @@ static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = { | |||
2250 | .pa_end = 0x480600ff, | 2254 | .pa_end = 0x480600ff, |
2251 | .flags = ADDR_TYPE_RT | 2255 | .flags = ADDR_TYPE_RT |
2252 | }, | 2256 | }, |
2257 | { } | ||
2253 | }; | 2258 | }; |
2254 | 2259 | ||
2255 | /* l4_per -> i2c3 */ | 2260 | /* l4_per -> i2c3 */ |
@@ -2258,7 +2263,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = { | |||
2258 | .slave = &omap44xx_i2c3_hwmod, | 2263 | .slave = &omap44xx_i2c3_hwmod, |
2259 | .clk = "l4_div_ck", | 2264 | .clk = "l4_div_ck", |
2260 | .addr = omap44xx_i2c3_addrs, | 2265 | .addr = omap44xx_i2c3_addrs, |
2261 | .addr_cnt = ARRAY_SIZE(omap44xx_i2c3_addrs), | ||
2262 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2266 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2263 | }; | 2267 | }; |
2264 | 2268 | ||
@@ -2272,9 +2276,7 @@ static struct omap_hwmod omap44xx_i2c3_hwmod = { | |||
2272 | .class = &omap44xx_i2c_hwmod_class, | 2276 | .class = &omap44xx_i2c_hwmod_class, |
2273 | .flags = HWMOD_INIT_NO_RESET, | 2277 | .flags = HWMOD_INIT_NO_RESET, |
2274 | .mpu_irqs = omap44xx_i2c3_irqs, | 2278 | .mpu_irqs = omap44xx_i2c3_irqs, |
2275 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c3_irqs), | ||
2276 | .sdma_reqs = omap44xx_i2c3_sdma_reqs, | 2279 | .sdma_reqs = omap44xx_i2c3_sdma_reqs, |
2277 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c3_sdma_reqs), | ||
2278 | .main_clk = "i2c3_fck", | 2280 | .main_clk = "i2c3_fck", |
2279 | .prcm = { | 2281 | .prcm = { |
2280 | .omap4 = { | 2282 | .omap4 = { |
@@ -2290,11 +2292,13 @@ static struct omap_hwmod omap44xx_i2c3_hwmod = { | |||
2290 | static struct omap_hwmod omap44xx_i2c4_hwmod; | 2292 | static struct omap_hwmod omap44xx_i2c4_hwmod; |
2291 | static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = { | 2293 | static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = { |
2292 | { .irq = 62 + OMAP44XX_IRQ_GIC_START }, | 2294 | { .irq = 62 + OMAP44XX_IRQ_GIC_START }, |
2295 | { .irq = -1 } | ||
2293 | }; | 2296 | }; |
2294 | 2297 | ||
2295 | static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = { | 2298 | static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = { |
2296 | { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START }, | 2299 | { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START }, |
2297 | { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START }, | 2300 | { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START }, |
2301 | { .dma_req = -1 } | ||
2298 | }; | 2302 | }; |
2299 | 2303 | ||
2300 | static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = { | 2304 | static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = { |
@@ -2303,6 +2307,7 @@ static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = { | |||
2303 | .pa_end = 0x483500ff, | 2307 | .pa_end = 0x483500ff, |
2304 | .flags = ADDR_TYPE_RT | 2308 | .flags = ADDR_TYPE_RT |
2305 | }, | 2309 | }, |
2310 | { } | ||
2306 | }; | 2311 | }; |
2307 | 2312 | ||
2308 | /* l4_per -> i2c4 */ | 2313 | /* l4_per -> i2c4 */ |
@@ -2311,7 +2316,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = { | |||
2311 | .slave = &omap44xx_i2c4_hwmod, | 2316 | .slave = &omap44xx_i2c4_hwmod, |
2312 | .clk = "l4_div_ck", | 2317 | .clk = "l4_div_ck", |
2313 | .addr = omap44xx_i2c4_addrs, | 2318 | .addr = omap44xx_i2c4_addrs, |
2314 | .addr_cnt = ARRAY_SIZE(omap44xx_i2c4_addrs), | ||
2315 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2319 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2316 | }; | 2320 | }; |
2317 | 2321 | ||
@@ -2325,9 +2329,7 @@ static struct omap_hwmod omap44xx_i2c4_hwmod = { | |||
2325 | .class = &omap44xx_i2c_hwmod_class, | 2329 | .class = &omap44xx_i2c_hwmod_class, |
2326 | .flags = HWMOD_INIT_NO_RESET, | 2330 | .flags = HWMOD_INIT_NO_RESET, |
2327 | .mpu_irqs = omap44xx_i2c4_irqs, | 2331 | .mpu_irqs = omap44xx_i2c4_irqs, |
2328 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c4_irqs), | ||
2329 | .sdma_reqs = omap44xx_i2c4_sdma_reqs, | 2332 | .sdma_reqs = omap44xx_i2c4_sdma_reqs, |
2330 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c4_sdma_reqs), | ||
2331 | .main_clk = "i2c4_fck", | 2333 | .main_clk = "i2c4_fck", |
2332 | .prcm = { | 2334 | .prcm = { |
2333 | .omap4 = { | 2335 | .omap4 = { |
@@ -2351,6 +2353,7 @@ static struct omap_hwmod_class omap44xx_ipu_hwmod_class = { | |||
2351 | /* ipu */ | 2353 | /* ipu */ |
2352 | static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = { | 2354 | static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = { |
2353 | { .irq = 100 + OMAP44XX_IRQ_GIC_START }, | 2355 | { .irq = 100 + OMAP44XX_IRQ_GIC_START }, |
2356 | { .irq = -1 } | ||
2354 | }; | 2357 | }; |
2355 | 2358 | ||
2356 | static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = { | 2359 | static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = { |
@@ -2390,7 +2393,7 @@ static struct omap_hwmod omap44xx_ipu_c0_hwmod = { | |||
2390 | .flags = HWMOD_INIT_NO_RESET, | 2393 | .flags = HWMOD_INIT_NO_RESET, |
2391 | .rst_lines = omap44xx_ipu_c0_resets, | 2394 | .rst_lines = omap44xx_ipu_c0_resets, |
2392 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets), | 2395 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets), |
2393 | .prcm = { | 2396 | .prcm = { |
2394 | .omap4 = { | 2397 | .omap4 = { |
2395 | .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL, | 2398 | .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL, |
2396 | }, | 2399 | }, |
@@ -2405,7 +2408,7 @@ static struct omap_hwmod omap44xx_ipu_c1_hwmod = { | |||
2405 | .flags = HWMOD_INIT_NO_RESET, | 2408 | .flags = HWMOD_INIT_NO_RESET, |
2406 | .rst_lines = omap44xx_ipu_c1_resets, | 2409 | .rst_lines = omap44xx_ipu_c1_resets, |
2407 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets), | 2410 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets), |
2408 | .prcm = { | 2411 | .prcm = { |
2409 | .omap4 = { | 2412 | .omap4 = { |
2410 | .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL, | 2413 | .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL, |
2411 | }, | 2414 | }, |
@@ -2417,11 +2420,10 @@ static struct omap_hwmod omap44xx_ipu_hwmod = { | |||
2417 | .name = "ipu", | 2420 | .name = "ipu", |
2418 | .class = &omap44xx_ipu_hwmod_class, | 2421 | .class = &omap44xx_ipu_hwmod_class, |
2419 | .mpu_irqs = omap44xx_ipu_irqs, | 2422 | .mpu_irqs = omap44xx_ipu_irqs, |
2420 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_ipu_irqs), | ||
2421 | .rst_lines = omap44xx_ipu_resets, | 2423 | .rst_lines = omap44xx_ipu_resets, |
2422 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets), | 2424 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets), |
2423 | .main_clk = "ipu_fck", | 2425 | .main_clk = "ipu_fck", |
2424 | .prcm = { | 2426 | .prcm = { |
2425 | .omap4 = { | 2427 | .omap4 = { |
2426 | .clkctrl_reg = OMAP4430_CM_DUCATI_DUCATI_CLKCTRL, | 2428 | .clkctrl_reg = OMAP4430_CM_DUCATI_DUCATI_CLKCTRL, |
2427 | .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL, | 2429 | .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL, |
@@ -2446,7 +2448,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = { | |||
2446 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | 2448 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), |
2447 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | 2449 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
2448 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | 2450 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | |
2449 | MSTANDBY_SMART), | 2451 | MSTANDBY_SMART | MSTANDBY_SMART_WKUP), |
2450 | .sysc_fields = &omap_hwmod_sysc_type2, | 2452 | .sysc_fields = &omap_hwmod_sysc_type2, |
2451 | }; | 2453 | }; |
2452 | 2454 | ||
@@ -2458,6 +2460,7 @@ static struct omap_hwmod_class omap44xx_iss_hwmod_class = { | |||
2458 | /* iss */ | 2460 | /* iss */ |
2459 | static struct omap_hwmod_irq_info omap44xx_iss_irqs[] = { | 2461 | static struct omap_hwmod_irq_info omap44xx_iss_irqs[] = { |
2460 | { .irq = 24 + OMAP44XX_IRQ_GIC_START }, | 2462 | { .irq = 24 + OMAP44XX_IRQ_GIC_START }, |
2463 | { .irq = -1 } | ||
2461 | }; | 2464 | }; |
2462 | 2465 | ||
2463 | static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = { | 2466 | static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = { |
@@ -2465,6 +2468,7 @@ static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = { | |||
2465 | { .name = "2", .dma_req = 9 + OMAP44XX_DMA_REQ_START }, | 2468 | { .name = "2", .dma_req = 9 + OMAP44XX_DMA_REQ_START }, |
2466 | { .name = "3", .dma_req = 11 + OMAP44XX_DMA_REQ_START }, | 2469 | { .name = "3", .dma_req = 11 + OMAP44XX_DMA_REQ_START }, |
2467 | { .name = "4", .dma_req = 12 + OMAP44XX_DMA_REQ_START }, | 2470 | { .name = "4", .dma_req = 12 + OMAP44XX_DMA_REQ_START }, |
2471 | { .dma_req = -1 } | ||
2468 | }; | 2472 | }; |
2469 | 2473 | ||
2470 | /* iss master ports */ | 2474 | /* iss master ports */ |
@@ -2478,6 +2482,7 @@ static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = { | |||
2478 | .pa_end = 0x520000ff, | 2482 | .pa_end = 0x520000ff, |
2479 | .flags = ADDR_TYPE_RT | 2483 | .flags = ADDR_TYPE_RT |
2480 | }, | 2484 | }, |
2485 | { } | ||
2481 | }; | 2486 | }; |
2482 | 2487 | ||
2483 | /* l3_main_2 -> iss */ | 2488 | /* l3_main_2 -> iss */ |
@@ -2486,7 +2491,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = { | |||
2486 | .slave = &omap44xx_iss_hwmod, | 2491 | .slave = &omap44xx_iss_hwmod, |
2487 | .clk = "l3_div_ck", | 2492 | .clk = "l3_div_ck", |
2488 | .addr = omap44xx_iss_addrs, | 2493 | .addr = omap44xx_iss_addrs, |
2489 | .addr_cnt = ARRAY_SIZE(omap44xx_iss_addrs), | ||
2490 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2494 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2491 | }; | 2495 | }; |
2492 | 2496 | ||
@@ -2503,11 +2507,9 @@ static struct omap_hwmod omap44xx_iss_hwmod = { | |||
2503 | .name = "iss", | 2507 | .name = "iss", |
2504 | .class = &omap44xx_iss_hwmod_class, | 2508 | .class = &omap44xx_iss_hwmod_class, |
2505 | .mpu_irqs = omap44xx_iss_irqs, | 2509 | .mpu_irqs = omap44xx_iss_irqs, |
2506 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_iss_irqs), | ||
2507 | .sdma_reqs = omap44xx_iss_sdma_reqs, | 2510 | .sdma_reqs = omap44xx_iss_sdma_reqs, |
2508 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_iss_sdma_reqs), | ||
2509 | .main_clk = "iss_fck", | 2511 | .main_clk = "iss_fck", |
2510 | .prcm = { | 2512 | .prcm = { |
2511 | .omap4 = { | 2513 | .omap4 = { |
2512 | .clkctrl_reg = OMAP4430_CM_CAM_ISS_CLKCTRL, | 2514 | .clkctrl_reg = OMAP4430_CM_CAM_ISS_CLKCTRL, |
2513 | }, | 2515 | }, |
@@ -2535,6 +2537,7 @@ static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = { | |||
2535 | { .name = "sync_1", .irq = 103 + OMAP44XX_IRQ_GIC_START }, | 2537 | { .name = "sync_1", .irq = 103 + OMAP44XX_IRQ_GIC_START }, |
2536 | { .name = "sync_0", .irq = 104 + OMAP44XX_IRQ_GIC_START }, | 2538 | { .name = "sync_0", .irq = 104 + OMAP44XX_IRQ_GIC_START }, |
2537 | { .name = "mailbox_0", .irq = 107 + OMAP44XX_IRQ_GIC_START }, | 2539 | { .name = "mailbox_0", .irq = 107 + OMAP44XX_IRQ_GIC_START }, |
2540 | { .irq = -1 } | ||
2538 | }; | 2541 | }; |
2539 | 2542 | ||
2540 | static struct omap_hwmod_rst_info omap44xx_iva_resets[] = { | 2543 | static struct omap_hwmod_rst_info omap44xx_iva_resets[] = { |
@@ -2561,6 +2564,7 @@ static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = { | |||
2561 | .pa_end = 0x5a07ffff, | 2564 | .pa_end = 0x5a07ffff, |
2562 | .flags = ADDR_TYPE_RT | 2565 | .flags = ADDR_TYPE_RT |
2563 | }, | 2566 | }, |
2567 | { } | ||
2564 | }; | 2568 | }; |
2565 | 2569 | ||
2566 | /* l3_main_2 -> iva */ | 2570 | /* l3_main_2 -> iva */ |
@@ -2569,7 +2573,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = { | |||
2569 | .slave = &omap44xx_iva_hwmod, | 2573 | .slave = &omap44xx_iva_hwmod, |
2570 | .clk = "l3_div_ck", | 2574 | .clk = "l3_div_ck", |
2571 | .addr = omap44xx_iva_addrs, | 2575 | .addr = omap44xx_iva_addrs, |
2572 | .addr_cnt = ARRAY_SIZE(omap44xx_iva_addrs), | ||
2573 | .user = OCP_USER_MPU, | 2576 | .user = OCP_USER_MPU, |
2574 | }; | 2577 | }; |
2575 | 2578 | ||
@@ -2613,7 +2616,6 @@ static struct omap_hwmod omap44xx_iva_hwmod = { | |||
2613 | .name = "iva", | 2616 | .name = "iva", |
2614 | .class = &omap44xx_iva_hwmod_class, | 2617 | .class = &omap44xx_iva_hwmod_class, |
2615 | .mpu_irqs = omap44xx_iva_irqs, | 2618 | .mpu_irqs = omap44xx_iva_irqs, |
2616 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_iva_irqs), | ||
2617 | .rst_lines = omap44xx_iva_resets, | 2619 | .rst_lines = omap44xx_iva_resets, |
2618 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_resets), | 2620 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_resets), |
2619 | .main_clk = "iva_fck", | 2621 | .main_clk = "iva_fck", |
@@ -2656,6 +2658,7 @@ static struct omap_hwmod_class omap44xx_kbd_hwmod_class = { | |||
2656 | static struct omap_hwmod omap44xx_kbd_hwmod; | 2658 | static struct omap_hwmod omap44xx_kbd_hwmod; |
2657 | static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = { | 2659 | static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = { |
2658 | { .irq = 120 + OMAP44XX_IRQ_GIC_START }, | 2660 | { .irq = 120 + OMAP44XX_IRQ_GIC_START }, |
2661 | { .irq = -1 } | ||
2659 | }; | 2662 | }; |
2660 | 2663 | ||
2661 | static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = { | 2664 | static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = { |
@@ -2664,6 +2667,7 @@ static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = { | |||
2664 | .pa_end = 0x4a31c07f, | 2667 | .pa_end = 0x4a31c07f, |
2665 | .flags = ADDR_TYPE_RT | 2668 | .flags = ADDR_TYPE_RT |
2666 | }, | 2669 | }, |
2670 | { } | ||
2667 | }; | 2671 | }; |
2668 | 2672 | ||
2669 | /* l4_wkup -> kbd */ | 2673 | /* l4_wkup -> kbd */ |
@@ -2672,7 +2676,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = { | |||
2672 | .slave = &omap44xx_kbd_hwmod, | 2676 | .slave = &omap44xx_kbd_hwmod, |
2673 | .clk = "l4_wkup_clk_mux_ck", | 2677 | .clk = "l4_wkup_clk_mux_ck", |
2674 | .addr = omap44xx_kbd_addrs, | 2678 | .addr = omap44xx_kbd_addrs, |
2675 | .addr_cnt = ARRAY_SIZE(omap44xx_kbd_addrs), | ||
2676 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2679 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2677 | }; | 2680 | }; |
2678 | 2681 | ||
@@ -2685,9 +2688,8 @@ static struct omap_hwmod omap44xx_kbd_hwmod = { | |||
2685 | .name = "kbd", | 2688 | .name = "kbd", |
2686 | .class = &omap44xx_kbd_hwmod_class, | 2689 | .class = &omap44xx_kbd_hwmod_class, |
2687 | .mpu_irqs = omap44xx_kbd_irqs, | 2690 | .mpu_irqs = omap44xx_kbd_irqs, |
2688 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_kbd_irqs), | ||
2689 | .main_clk = "kbd_fck", | 2691 | .main_clk = "kbd_fck", |
2690 | .prcm = { | 2692 | .prcm = { |
2691 | .omap4 = { | 2693 | .omap4 = { |
2692 | .clkctrl_reg = OMAP4430_CM_WKUP_KEYBOARD_CLKCTRL, | 2694 | .clkctrl_reg = OMAP4430_CM_WKUP_KEYBOARD_CLKCTRL, |
2693 | }, | 2695 | }, |
@@ -2721,6 +2723,7 @@ static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = { | |||
2721 | static struct omap_hwmod omap44xx_mailbox_hwmod; | 2723 | static struct omap_hwmod omap44xx_mailbox_hwmod; |
2722 | static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = { | 2724 | static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = { |
2723 | { .irq = 26 + OMAP44XX_IRQ_GIC_START }, | 2725 | { .irq = 26 + OMAP44XX_IRQ_GIC_START }, |
2726 | { .irq = -1 } | ||
2724 | }; | 2727 | }; |
2725 | 2728 | ||
2726 | static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = { | 2729 | static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = { |
@@ -2729,6 +2732,7 @@ static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = { | |||
2729 | .pa_end = 0x4a0f41ff, | 2732 | .pa_end = 0x4a0f41ff, |
2730 | .flags = ADDR_TYPE_RT | 2733 | .flags = ADDR_TYPE_RT |
2731 | }, | 2734 | }, |
2735 | { } | ||
2732 | }; | 2736 | }; |
2733 | 2737 | ||
2734 | /* l4_cfg -> mailbox */ | 2738 | /* l4_cfg -> mailbox */ |
@@ -2737,7 +2741,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = { | |||
2737 | .slave = &omap44xx_mailbox_hwmod, | 2741 | .slave = &omap44xx_mailbox_hwmod, |
2738 | .clk = "l4_div_ck", | 2742 | .clk = "l4_div_ck", |
2739 | .addr = omap44xx_mailbox_addrs, | 2743 | .addr = omap44xx_mailbox_addrs, |
2740 | .addr_cnt = ARRAY_SIZE(omap44xx_mailbox_addrs), | ||
2741 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2744 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2742 | }; | 2745 | }; |
2743 | 2746 | ||
@@ -2750,8 +2753,7 @@ static struct omap_hwmod omap44xx_mailbox_hwmod = { | |||
2750 | .name = "mailbox", | 2753 | .name = "mailbox", |
2751 | .class = &omap44xx_mailbox_hwmod_class, | 2754 | .class = &omap44xx_mailbox_hwmod_class, |
2752 | .mpu_irqs = omap44xx_mailbox_irqs, | 2755 | .mpu_irqs = omap44xx_mailbox_irqs, |
2753 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mailbox_irqs), | 2756 | .prcm = { |
2754 | .prcm = { | ||
2755 | .omap4 = { | 2757 | .omap4 = { |
2756 | .clkctrl_reg = OMAP4430_CM_L4CFG_MAILBOX_CLKCTRL, | 2758 | .clkctrl_reg = OMAP4430_CM_L4CFG_MAILBOX_CLKCTRL, |
2757 | }, | 2759 | }, |
@@ -2784,11 +2786,13 @@ static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = { | |||
2784 | static struct omap_hwmod omap44xx_mcbsp1_hwmod; | 2786 | static struct omap_hwmod omap44xx_mcbsp1_hwmod; |
2785 | static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = { | 2787 | static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = { |
2786 | { .irq = 17 + OMAP44XX_IRQ_GIC_START }, | 2788 | { .irq = 17 + OMAP44XX_IRQ_GIC_START }, |
2789 | { .irq = -1 } | ||
2787 | }; | 2790 | }; |
2788 | 2791 | ||
2789 | static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = { | 2792 | static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = { |
2790 | { .name = "tx", .dma_req = 32 + OMAP44XX_DMA_REQ_START }, | 2793 | { .name = "tx", .dma_req = 32 + OMAP44XX_DMA_REQ_START }, |
2791 | { .name = "rx", .dma_req = 33 + OMAP44XX_DMA_REQ_START }, | 2794 | { .name = "rx", .dma_req = 33 + OMAP44XX_DMA_REQ_START }, |
2795 | { .dma_req = -1 } | ||
2792 | }; | 2796 | }; |
2793 | 2797 | ||
2794 | static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = { | 2798 | static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = { |
@@ -2798,6 +2802,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = { | |||
2798 | .pa_end = 0x401220ff, | 2802 | .pa_end = 0x401220ff, |
2799 | .flags = ADDR_TYPE_RT | 2803 | .flags = ADDR_TYPE_RT |
2800 | }, | 2804 | }, |
2805 | { } | ||
2801 | }; | 2806 | }; |
2802 | 2807 | ||
2803 | /* l4_abe -> mcbsp1 */ | 2808 | /* l4_abe -> mcbsp1 */ |
@@ -2806,7 +2811,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = { | |||
2806 | .slave = &omap44xx_mcbsp1_hwmod, | 2811 | .slave = &omap44xx_mcbsp1_hwmod, |
2807 | .clk = "ocp_abe_iclk", | 2812 | .clk = "ocp_abe_iclk", |
2808 | .addr = omap44xx_mcbsp1_addrs, | 2813 | .addr = omap44xx_mcbsp1_addrs, |
2809 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp1_addrs), | ||
2810 | .user = OCP_USER_MPU, | 2814 | .user = OCP_USER_MPU, |
2811 | }; | 2815 | }; |
2812 | 2816 | ||
@@ -2817,6 +2821,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = { | |||
2817 | .pa_end = 0x490220ff, | 2821 | .pa_end = 0x490220ff, |
2818 | .flags = ADDR_TYPE_RT | 2822 | .flags = ADDR_TYPE_RT |
2819 | }, | 2823 | }, |
2824 | { } | ||
2820 | }; | 2825 | }; |
2821 | 2826 | ||
2822 | /* l4_abe -> mcbsp1 (dma) */ | 2827 | /* l4_abe -> mcbsp1 (dma) */ |
@@ -2825,7 +2830,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = { | |||
2825 | .slave = &omap44xx_mcbsp1_hwmod, | 2830 | .slave = &omap44xx_mcbsp1_hwmod, |
2826 | .clk = "ocp_abe_iclk", | 2831 | .clk = "ocp_abe_iclk", |
2827 | .addr = omap44xx_mcbsp1_dma_addrs, | 2832 | .addr = omap44xx_mcbsp1_dma_addrs, |
2828 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp1_dma_addrs), | ||
2829 | .user = OCP_USER_SDMA, | 2833 | .user = OCP_USER_SDMA, |
2830 | }; | 2834 | }; |
2831 | 2835 | ||
@@ -2839,9 +2843,7 @@ static struct omap_hwmod omap44xx_mcbsp1_hwmod = { | |||
2839 | .name = "mcbsp1", | 2843 | .name = "mcbsp1", |
2840 | .class = &omap44xx_mcbsp_hwmod_class, | 2844 | .class = &omap44xx_mcbsp_hwmod_class, |
2841 | .mpu_irqs = omap44xx_mcbsp1_irqs, | 2845 | .mpu_irqs = omap44xx_mcbsp1_irqs, |
2842 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp1_irqs), | ||
2843 | .sdma_reqs = omap44xx_mcbsp1_sdma_reqs, | 2846 | .sdma_reqs = omap44xx_mcbsp1_sdma_reqs, |
2844 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp1_sdma_reqs), | ||
2845 | .main_clk = "mcbsp1_fck", | 2847 | .main_clk = "mcbsp1_fck", |
2846 | .prcm = { | 2848 | .prcm = { |
2847 | .omap4 = { | 2849 | .omap4 = { |
@@ -2857,11 +2859,13 @@ static struct omap_hwmod omap44xx_mcbsp1_hwmod = { | |||
2857 | static struct omap_hwmod omap44xx_mcbsp2_hwmod; | 2859 | static struct omap_hwmod omap44xx_mcbsp2_hwmod; |
2858 | static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = { | 2860 | static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = { |
2859 | { .irq = 22 + OMAP44XX_IRQ_GIC_START }, | 2861 | { .irq = 22 + OMAP44XX_IRQ_GIC_START }, |
2862 | { .irq = -1 } | ||
2860 | }; | 2863 | }; |
2861 | 2864 | ||
2862 | static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = { | 2865 | static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = { |
2863 | { .name = "tx", .dma_req = 16 + OMAP44XX_DMA_REQ_START }, | 2866 | { .name = "tx", .dma_req = 16 + OMAP44XX_DMA_REQ_START }, |
2864 | { .name = "rx", .dma_req = 17 + OMAP44XX_DMA_REQ_START }, | 2867 | { .name = "rx", .dma_req = 17 + OMAP44XX_DMA_REQ_START }, |
2868 | { .dma_req = -1 } | ||
2865 | }; | 2869 | }; |
2866 | 2870 | ||
2867 | static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = { | 2871 | static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = { |
@@ -2871,6 +2875,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = { | |||
2871 | .pa_end = 0x401240ff, | 2875 | .pa_end = 0x401240ff, |
2872 | .flags = ADDR_TYPE_RT | 2876 | .flags = ADDR_TYPE_RT |
2873 | }, | 2877 | }, |
2878 | { } | ||
2874 | }; | 2879 | }; |
2875 | 2880 | ||
2876 | /* l4_abe -> mcbsp2 */ | 2881 | /* l4_abe -> mcbsp2 */ |
@@ -2879,7 +2884,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = { | |||
2879 | .slave = &omap44xx_mcbsp2_hwmod, | 2884 | .slave = &omap44xx_mcbsp2_hwmod, |
2880 | .clk = "ocp_abe_iclk", | 2885 | .clk = "ocp_abe_iclk", |
2881 | .addr = omap44xx_mcbsp2_addrs, | 2886 | .addr = omap44xx_mcbsp2_addrs, |
2882 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp2_addrs), | ||
2883 | .user = OCP_USER_MPU, | 2887 | .user = OCP_USER_MPU, |
2884 | }; | 2888 | }; |
2885 | 2889 | ||
@@ -2890,6 +2894,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = { | |||
2890 | .pa_end = 0x490240ff, | 2894 | .pa_end = 0x490240ff, |
2891 | .flags = ADDR_TYPE_RT | 2895 | .flags = ADDR_TYPE_RT |
2892 | }, | 2896 | }, |
2897 | { } | ||
2893 | }; | 2898 | }; |
2894 | 2899 | ||
2895 | /* l4_abe -> mcbsp2 (dma) */ | 2900 | /* l4_abe -> mcbsp2 (dma) */ |
@@ -2898,7 +2903,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = { | |||
2898 | .slave = &omap44xx_mcbsp2_hwmod, | 2903 | .slave = &omap44xx_mcbsp2_hwmod, |
2899 | .clk = "ocp_abe_iclk", | 2904 | .clk = "ocp_abe_iclk", |
2900 | .addr = omap44xx_mcbsp2_dma_addrs, | 2905 | .addr = omap44xx_mcbsp2_dma_addrs, |
2901 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp2_dma_addrs), | ||
2902 | .user = OCP_USER_SDMA, | 2906 | .user = OCP_USER_SDMA, |
2903 | }; | 2907 | }; |
2904 | 2908 | ||
@@ -2912,9 +2916,7 @@ static struct omap_hwmod omap44xx_mcbsp2_hwmod = { | |||
2912 | .name = "mcbsp2", | 2916 | .name = "mcbsp2", |
2913 | .class = &omap44xx_mcbsp_hwmod_class, | 2917 | .class = &omap44xx_mcbsp_hwmod_class, |
2914 | .mpu_irqs = omap44xx_mcbsp2_irqs, | 2918 | .mpu_irqs = omap44xx_mcbsp2_irqs, |
2915 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp2_irqs), | ||
2916 | .sdma_reqs = omap44xx_mcbsp2_sdma_reqs, | 2919 | .sdma_reqs = omap44xx_mcbsp2_sdma_reqs, |
2917 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp2_sdma_reqs), | ||
2918 | .main_clk = "mcbsp2_fck", | 2920 | .main_clk = "mcbsp2_fck", |
2919 | .prcm = { | 2921 | .prcm = { |
2920 | .omap4 = { | 2922 | .omap4 = { |
@@ -2930,11 +2932,13 @@ static struct omap_hwmod omap44xx_mcbsp2_hwmod = { | |||
2930 | static struct omap_hwmod omap44xx_mcbsp3_hwmod; | 2932 | static struct omap_hwmod omap44xx_mcbsp3_hwmod; |
2931 | static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = { | 2933 | static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = { |
2932 | { .irq = 23 + OMAP44XX_IRQ_GIC_START }, | 2934 | { .irq = 23 + OMAP44XX_IRQ_GIC_START }, |
2935 | { .irq = -1 } | ||
2933 | }; | 2936 | }; |
2934 | 2937 | ||
2935 | static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = { | 2938 | static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = { |
2936 | { .name = "tx", .dma_req = 18 + OMAP44XX_DMA_REQ_START }, | 2939 | { .name = "tx", .dma_req = 18 + OMAP44XX_DMA_REQ_START }, |
2937 | { .name = "rx", .dma_req = 19 + OMAP44XX_DMA_REQ_START }, | 2940 | { .name = "rx", .dma_req = 19 + OMAP44XX_DMA_REQ_START }, |
2941 | { .dma_req = -1 } | ||
2938 | }; | 2942 | }; |
2939 | 2943 | ||
2940 | static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = { | 2944 | static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = { |
@@ -2944,6 +2948,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = { | |||
2944 | .pa_end = 0x401260ff, | 2948 | .pa_end = 0x401260ff, |
2945 | .flags = ADDR_TYPE_RT | 2949 | .flags = ADDR_TYPE_RT |
2946 | }, | 2950 | }, |
2951 | { } | ||
2947 | }; | 2952 | }; |
2948 | 2953 | ||
2949 | /* l4_abe -> mcbsp3 */ | 2954 | /* l4_abe -> mcbsp3 */ |
@@ -2952,7 +2957,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = { | |||
2952 | .slave = &omap44xx_mcbsp3_hwmod, | 2957 | .slave = &omap44xx_mcbsp3_hwmod, |
2953 | .clk = "ocp_abe_iclk", | 2958 | .clk = "ocp_abe_iclk", |
2954 | .addr = omap44xx_mcbsp3_addrs, | 2959 | .addr = omap44xx_mcbsp3_addrs, |
2955 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp3_addrs), | ||
2956 | .user = OCP_USER_MPU, | 2960 | .user = OCP_USER_MPU, |
2957 | }; | 2961 | }; |
2958 | 2962 | ||
@@ -2963,6 +2967,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = { | |||
2963 | .pa_end = 0x490260ff, | 2967 | .pa_end = 0x490260ff, |
2964 | .flags = ADDR_TYPE_RT | 2968 | .flags = ADDR_TYPE_RT |
2965 | }, | 2969 | }, |
2970 | { } | ||
2966 | }; | 2971 | }; |
2967 | 2972 | ||
2968 | /* l4_abe -> mcbsp3 (dma) */ | 2973 | /* l4_abe -> mcbsp3 (dma) */ |
@@ -2971,7 +2976,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = { | |||
2971 | .slave = &omap44xx_mcbsp3_hwmod, | 2976 | .slave = &omap44xx_mcbsp3_hwmod, |
2972 | .clk = "ocp_abe_iclk", | 2977 | .clk = "ocp_abe_iclk", |
2973 | .addr = omap44xx_mcbsp3_dma_addrs, | 2978 | .addr = omap44xx_mcbsp3_dma_addrs, |
2974 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp3_dma_addrs), | ||
2975 | .user = OCP_USER_SDMA, | 2979 | .user = OCP_USER_SDMA, |
2976 | }; | 2980 | }; |
2977 | 2981 | ||
@@ -2985,9 +2989,7 @@ static struct omap_hwmod omap44xx_mcbsp3_hwmod = { | |||
2985 | .name = "mcbsp3", | 2989 | .name = "mcbsp3", |
2986 | .class = &omap44xx_mcbsp_hwmod_class, | 2990 | .class = &omap44xx_mcbsp_hwmod_class, |
2987 | .mpu_irqs = omap44xx_mcbsp3_irqs, | 2991 | .mpu_irqs = omap44xx_mcbsp3_irqs, |
2988 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp3_irqs), | ||
2989 | .sdma_reqs = omap44xx_mcbsp3_sdma_reqs, | 2992 | .sdma_reqs = omap44xx_mcbsp3_sdma_reqs, |
2990 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp3_sdma_reqs), | ||
2991 | .main_clk = "mcbsp3_fck", | 2993 | .main_clk = "mcbsp3_fck", |
2992 | .prcm = { | 2994 | .prcm = { |
2993 | .omap4 = { | 2995 | .omap4 = { |
@@ -3003,11 +3005,13 @@ static struct omap_hwmod omap44xx_mcbsp3_hwmod = { | |||
3003 | static struct omap_hwmod omap44xx_mcbsp4_hwmod; | 3005 | static struct omap_hwmod omap44xx_mcbsp4_hwmod; |
3004 | static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = { | 3006 | static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = { |
3005 | { .irq = 16 + OMAP44XX_IRQ_GIC_START }, | 3007 | { .irq = 16 + OMAP44XX_IRQ_GIC_START }, |
3008 | { .irq = -1 } | ||
3006 | }; | 3009 | }; |
3007 | 3010 | ||
3008 | static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = { | 3011 | static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = { |
3009 | { .name = "tx", .dma_req = 30 + OMAP44XX_DMA_REQ_START }, | 3012 | { .name = "tx", .dma_req = 30 + OMAP44XX_DMA_REQ_START }, |
3010 | { .name = "rx", .dma_req = 31 + OMAP44XX_DMA_REQ_START }, | 3013 | { .name = "rx", .dma_req = 31 + OMAP44XX_DMA_REQ_START }, |
3014 | { .dma_req = -1 } | ||
3011 | }; | 3015 | }; |
3012 | 3016 | ||
3013 | static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = { | 3017 | static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = { |
@@ -3016,6 +3020,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = { | |||
3016 | .pa_end = 0x480960ff, | 3020 | .pa_end = 0x480960ff, |
3017 | .flags = ADDR_TYPE_RT | 3021 | .flags = ADDR_TYPE_RT |
3018 | }, | 3022 | }, |
3023 | { } | ||
3019 | }; | 3024 | }; |
3020 | 3025 | ||
3021 | /* l4_per -> mcbsp4 */ | 3026 | /* l4_per -> mcbsp4 */ |
@@ -3024,7 +3029,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = { | |||
3024 | .slave = &omap44xx_mcbsp4_hwmod, | 3029 | .slave = &omap44xx_mcbsp4_hwmod, |
3025 | .clk = "l4_div_ck", | 3030 | .clk = "l4_div_ck", |
3026 | .addr = omap44xx_mcbsp4_addrs, | 3031 | .addr = omap44xx_mcbsp4_addrs, |
3027 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp4_addrs), | ||
3028 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 3032 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3029 | }; | 3033 | }; |
3030 | 3034 | ||
@@ -3037,9 +3041,7 @@ static struct omap_hwmod omap44xx_mcbsp4_hwmod = { | |||
3037 | .name = "mcbsp4", | 3041 | .name = "mcbsp4", |
3038 | .class = &omap44xx_mcbsp_hwmod_class, | 3042 | .class = &omap44xx_mcbsp_hwmod_class, |
3039 | .mpu_irqs = omap44xx_mcbsp4_irqs, | 3043 | .mpu_irqs = omap44xx_mcbsp4_irqs, |
3040 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp4_irqs), | ||
3041 | .sdma_reqs = omap44xx_mcbsp4_sdma_reqs, | 3044 | .sdma_reqs = omap44xx_mcbsp4_sdma_reqs, |
3042 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp4_sdma_reqs), | ||
3043 | .main_clk = "mcbsp4_fck", | 3045 | .main_clk = "mcbsp4_fck", |
3044 | .prcm = { | 3046 | .prcm = { |
3045 | .omap4 = { | 3047 | .omap4 = { |
@@ -3076,11 +3078,13 @@ static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = { | |||
3076 | static struct omap_hwmod omap44xx_mcpdm_hwmod; | 3078 | static struct omap_hwmod omap44xx_mcpdm_hwmod; |
3077 | static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = { | 3079 | static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = { |
3078 | { .irq = 112 + OMAP44XX_IRQ_GIC_START }, | 3080 | { .irq = 112 + OMAP44XX_IRQ_GIC_START }, |
3081 | { .irq = -1 } | ||
3079 | }; | 3082 | }; |
3080 | 3083 | ||
3081 | static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = { | 3084 | static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = { |
3082 | { .name = "up_link", .dma_req = 64 + OMAP44XX_DMA_REQ_START }, | 3085 | { .name = "up_link", .dma_req = 64 + OMAP44XX_DMA_REQ_START }, |
3083 | { .name = "dn_link", .dma_req = 65 + OMAP44XX_DMA_REQ_START }, | 3086 | { .name = "dn_link", .dma_req = 65 + OMAP44XX_DMA_REQ_START }, |
3087 | { .dma_req = -1 } | ||
3084 | }; | 3088 | }; |
3085 | 3089 | ||
3086 | static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = { | 3090 | static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = { |
@@ -3089,6 +3093,7 @@ static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = { | |||
3089 | .pa_end = 0x4013207f, | 3093 | .pa_end = 0x4013207f, |
3090 | .flags = ADDR_TYPE_RT | 3094 | .flags = ADDR_TYPE_RT |
3091 | }, | 3095 | }, |
3096 | { } | ||
3092 | }; | 3097 | }; |
3093 | 3098 | ||
3094 | /* l4_abe -> mcpdm */ | 3099 | /* l4_abe -> mcpdm */ |
@@ -3097,7 +3102,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = { | |||
3097 | .slave = &omap44xx_mcpdm_hwmod, | 3102 | .slave = &omap44xx_mcpdm_hwmod, |
3098 | .clk = "ocp_abe_iclk", | 3103 | .clk = "ocp_abe_iclk", |
3099 | .addr = omap44xx_mcpdm_addrs, | 3104 | .addr = omap44xx_mcpdm_addrs, |
3100 | .addr_cnt = ARRAY_SIZE(omap44xx_mcpdm_addrs), | ||
3101 | .user = OCP_USER_MPU, | 3105 | .user = OCP_USER_MPU, |
3102 | }; | 3106 | }; |
3103 | 3107 | ||
@@ -3107,6 +3111,7 @@ static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = { | |||
3107 | .pa_end = 0x4903207f, | 3111 | .pa_end = 0x4903207f, |
3108 | .flags = ADDR_TYPE_RT | 3112 | .flags = ADDR_TYPE_RT |
3109 | }, | 3113 | }, |
3114 | { } | ||
3110 | }; | 3115 | }; |
3111 | 3116 | ||
3112 | /* l4_abe -> mcpdm (dma) */ | 3117 | /* l4_abe -> mcpdm (dma) */ |
@@ -3115,7 +3120,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = { | |||
3115 | .slave = &omap44xx_mcpdm_hwmod, | 3120 | .slave = &omap44xx_mcpdm_hwmod, |
3116 | .clk = "ocp_abe_iclk", | 3121 | .clk = "ocp_abe_iclk", |
3117 | .addr = omap44xx_mcpdm_dma_addrs, | 3122 | .addr = omap44xx_mcpdm_dma_addrs, |
3118 | .addr_cnt = ARRAY_SIZE(omap44xx_mcpdm_dma_addrs), | ||
3119 | .user = OCP_USER_SDMA, | 3123 | .user = OCP_USER_SDMA, |
3120 | }; | 3124 | }; |
3121 | 3125 | ||
@@ -3129,11 +3133,9 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = { | |||
3129 | .name = "mcpdm", | 3133 | .name = "mcpdm", |
3130 | .class = &omap44xx_mcpdm_hwmod_class, | 3134 | .class = &omap44xx_mcpdm_hwmod_class, |
3131 | .mpu_irqs = omap44xx_mcpdm_irqs, | 3135 | .mpu_irqs = omap44xx_mcpdm_irqs, |
3132 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcpdm_irqs), | ||
3133 | .sdma_reqs = omap44xx_mcpdm_sdma_reqs, | 3136 | .sdma_reqs = omap44xx_mcpdm_sdma_reqs, |
3134 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcpdm_sdma_reqs), | ||
3135 | .main_clk = "mcpdm_fck", | 3137 | .main_clk = "mcpdm_fck", |
3136 | .prcm = { | 3138 | .prcm = { |
3137 | .omap4 = { | 3139 | .omap4 = { |
3138 | .clkctrl_reg = OMAP4430_CM1_ABE_PDM_CLKCTRL, | 3140 | .clkctrl_reg = OMAP4430_CM1_ABE_PDM_CLKCTRL, |
3139 | }, | 3141 | }, |
@@ -3169,6 +3171,7 @@ static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = { | |||
3169 | static struct omap_hwmod omap44xx_mcspi1_hwmod; | 3171 | static struct omap_hwmod omap44xx_mcspi1_hwmod; |
3170 | static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = { | 3172 | static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = { |
3171 | { .irq = 65 + OMAP44XX_IRQ_GIC_START }, | 3173 | { .irq = 65 + OMAP44XX_IRQ_GIC_START }, |
3174 | { .irq = -1 } | ||
3172 | }; | 3175 | }; |
3173 | 3176 | ||
3174 | static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = { | 3177 | static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = { |
@@ -3180,6 +3183,7 @@ static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = { | |||
3180 | { .name = "rx2", .dma_req = 39 + OMAP44XX_DMA_REQ_START }, | 3183 | { .name = "rx2", .dma_req = 39 + OMAP44XX_DMA_REQ_START }, |
3181 | { .name = "tx3", .dma_req = 40 + OMAP44XX_DMA_REQ_START }, | 3184 | { .name = "tx3", .dma_req = 40 + OMAP44XX_DMA_REQ_START }, |
3182 | { .name = "rx3", .dma_req = 41 + OMAP44XX_DMA_REQ_START }, | 3185 | { .name = "rx3", .dma_req = 41 + OMAP44XX_DMA_REQ_START }, |
3186 | { .dma_req = -1 } | ||
3183 | }; | 3187 | }; |
3184 | 3188 | ||
3185 | static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = { | 3189 | static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = { |
@@ -3188,6 +3192,7 @@ static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = { | |||
3188 | .pa_end = 0x480981ff, | 3192 | .pa_end = 0x480981ff, |
3189 | .flags = ADDR_TYPE_RT | 3193 | .flags = ADDR_TYPE_RT |
3190 | }, | 3194 | }, |
3195 | { } | ||
3191 | }; | 3196 | }; |
3192 | 3197 | ||
3193 | /* l4_per -> mcspi1 */ | 3198 | /* l4_per -> mcspi1 */ |
@@ -3196,7 +3201,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = { | |||
3196 | .slave = &omap44xx_mcspi1_hwmod, | 3201 | .slave = &omap44xx_mcspi1_hwmod, |
3197 | .clk = "l4_div_ck", | 3202 | .clk = "l4_div_ck", |
3198 | .addr = omap44xx_mcspi1_addrs, | 3203 | .addr = omap44xx_mcspi1_addrs, |
3199 | .addr_cnt = ARRAY_SIZE(omap44xx_mcspi1_addrs), | ||
3200 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 3204 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3201 | }; | 3205 | }; |
3202 | 3206 | ||
@@ -3214,9 +3218,7 @@ static struct omap_hwmod omap44xx_mcspi1_hwmod = { | |||
3214 | .name = "mcspi1", | 3218 | .name = "mcspi1", |
3215 | .class = &omap44xx_mcspi_hwmod_class, | 3219 | .class = &omap44xx_mcspi_hwmod_class, |
3216 | .mpu_irqs = omap44xx_mcspi1_irqs, | 3220 | .mpu_irqs = omap44xx_mcspi1_irqs, |
3217 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi1_irqs), | ||
3218 | .sdma_reqs = omap44xx_mcspi1_sdma_reqs, | 3221 | .sdma_reqs = omap44xx_mcspi1_sdma_reqs, |
3219 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi1_sdma_reqs), | ||
3220 | .main_clk = "mcspi1_fck", | 3222 | .main_clk = "mcspi1_fck", |
3221 | .prcm = { | 3223 | .prcm = { |
3222 | .omap4 = { | 3224 | .omap4 = { |
@@ -3233,6 +3235,7 @@ static struct omap_hwmod omap44xx_mcspi1_hwmod = { | |||
3233 | static struct omap_hwmod omap44xx_mcspi2_hwmod; | 3235 | static struct omap_hwmod omap44xx_mcspi2_hwmod; |
3234 | static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = { | 3236 | static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = { |
3235 | { .irq = 66 + OMAP44XX_IRQ_GIC_START }, | 3237 | { .irq = 66 + OMAP44XX_IRQ_GIC_START }, |
3238 | { .irq = -1 } | ||
3236 | }; | 3239 | }; |
3237 | 3240 | ||
3238 | static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = { | 3241 | static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = { |
@@ -3240,6 +3243,7 @@ static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = { | |||
3240 | { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START }, | 3243 | { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START }, |
3241 | { .name = "tx1", .dma_req = 44 + OMAP44XX_DMA_REQ_START }, | 3244 | { .name = "tx1", .dma_req = 44 + OMAP44XX_DMA_REQ_START }, |
3242 | { .name = "rx1", .dma_req = 45 + OMAP44XX_DMA_REQ_START }, | 3245 | { .name = "rx1", .dma_req = 45 + OMAP44XX_DMA_REQ_START }, |
3246 | { .dma_req = -1 } | ||
3243 | }; | 3247 | }; |
3244 | 3248 | ||
3245 | static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = { | 3249 | static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = { |
@@ -3248,6 +3252,7 @@ static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = { | |||
3248 | .pa_end = 0x4809a1ff, | 3252 | .pa_end = 0x4809a1ff, |
3249 | .flags = ADDR_TYPE_RT | 3253 | .flags = ADDR_TYPE_RT |
3250 | }, | 3254 | }, |
3255 | { } | ||
3251 | }; | 3256 | }; |
3252 | 3257 | ||
3253 | /* l4_per -> mcspi2 */ | 3258 | /* l4_per -> mcspi2 */ |
@@ -3256,7 +3261,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = { | |||
3256 | .slave = &omap44xx_mcspi2_hwmod, | 3261 | .slave = &omap44xx_mcspi2_hwmod, |
3257 | .clk = "l4_div_ck", | 3262 | .clk = "l4_div_ck", |
3258 | .addr = omap44xx_mcspi2_addrs, | 3263 | .addr = omap44xx_mcspi2_addrs, |
3259 | .addr_cnt = ARRAY_SIZE(omap44xx_mcspi2_addrs), | ||
3260 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 3264 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3261 | }; | 3265 | }; |
3262 | 3266 | ||
@@ -3274,9 +3278,7 @@ static struct omap_hwmod omap44xx_mcspi2_hwmod = { | |||
3274 | .name = "mcspi2", | 3278 | .name = "mcspi2", |
3275 | .class = &omap44xx_mcspi_hwmod_class, | 3279 | .class = &omap44xx_mcspi_hwmod_class, |
3276 | .mpu_irqs = omap44xx_mcspi2_irqs, | 3280 | .mpu_irqs = omap44xx_mcspi2_irqs, |
3277 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi2_irqs), | ||
3278 | .sdma_reqs = omap44xx_mcspi2_sdma_reqs, | 3281 | .sdma_reqs = omap44xx_mcspi2_sdma_reqs, |
3279 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi2_sdma_reqs), | ||
3280 | .main_clk = "mcspi2_fck", | 3282 | .main_clk = "mcspi2_fck", |
3281 | .prcm = { | 3283 | .prcm = { |
3282 | .omap4 = { | 3284 | .omap4 = { |
@@ -3293,6 +3295,7 @@ static struct omap_hwmod omap44xx_mcspi2_hwmod = { | |||
3293 | static struct omap_hwmod omap44xx_mcspi3_hwmod; | 3295 | static struct omap_hwmod omap44xx_mcspi3_hwmod; |
3294 | static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = { | 3296 | static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = { |
3295 | { .irq = 91 + OMAP44XX_IRQ_GIC_START }, | 3297 | { .irq = 91 + OMAP44XX_IRQ_GIC_START }, |
3298 | { .irq = -1 } | ||
3296 | }; | 3299 | }; |
3297 | 3300 | ||
3298 | static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = { | 3301 | static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = { |
@@ -3300,6 +3303,7 @@ static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = { | |||
3300 | { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START }, | 3303 | { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START }, |
3301 | { .name = "tx1", .dma_req = 22 + OMAP44XX_DMA_REQ_START }, | 3304 | { .name = "tx1", .dma_req = 22 + OMAP44XX_DMA_REQ_START }, |
3302 | { .name = "rx1", .dma_req = 23 + OMAP44XX_DMA_REQ_START }, | 3305 | { .name = "rx1", .dma_req = 23 + OMAP44XX_DMA_REQ_START }, |
3306 | { .dma_req = -1 } | ||
3303 | }; | 3307 | }; |
3304 | 3308 | ||
3305 | static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = { | 3309 | static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = { |
@@ -3308,6 +3312,7 @@ static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = { | |||
3308 | .pa_end = 0x480b81ff, | 3312 | .pa_end = 0x480b81ff, |
3309 | .flags = ADDR_TYPE_RT | 3313 | .flags = ADDR_TYPE_RT |
3310 | }, | 3314 | }, |
3315 | { } | ||
3311 | }; | 3316 | }; |
3312 | 3317 | ||
3313 | /* l4_per -> mcspi3 */ | 3318 | /* l4_per -> mcspi3 */ |
@@ -3316,7 +3321,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = { | |||
3316 | .slave = &omap44xx_mcspi3_hwmod, | 3321 | .slave = &omap44xx_mcspi3_hwmod, |
3317 | .clk = "l4_div_ck", | 3322 | .clk = "l4_div_ck", |
3318 | .addr = omap44xx_mcspi3_addrs, | 3323 | .addr = omap44xx_mcspi3_addrs, |
3319 | .addr_cnt = ARRAY_SIZE(omap44xx_mcspi3_addrs), | ||
3320 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 3324 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3321 | }; | 3325 | }; |
3322 | 3326 | ||
@@ -3334,9 +3338,7 @@ static struct omap_hwmod omap44xx_mcspi3_hwmod = { | |||
3334 | .name = "mcspi3", | 3338 | .name = "mcspi3", |
3335 | .class = &omap44xx_mcspi_hwmod_class, | 3339 | .class = &omap44xx_mcspi_hwmod_class, |
3336 | .mpu_irqs = omap44xx_mcspi3_irqs, | 3340 | .mpu_irqs = omap44xx_mcspi3_irqs, |
3337 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi3_irqs), | ||
3338 | .sdma_reqs = omap44xx_mcspi3_sdma_reqs, | 3341 | .sdma_reqs = omap44xx_mcspi3_sdma_reqs, |
3339 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi3_sdma_reqs), | ||
3340 | .main_clk = "mcspi3_fck", | 3342 | .main_clk = "mcspi3_fck", |
3341 | .prcm = { | 3343 | .prcm = { |
3342 | .omap4 = { | 3344 | .omap4 = { |
@@ -3353,11 +3355,13 @@ static struct omap_hwmod omap44xx_mcspi3_hwmod = { | |||
3353 | static struct omap_hwmod omap44xx_mcspi4_hwmod; | 3355 | static struct omap_hwmod omap44xx_mcspi4_hwmod; |
3354 | static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = { | 3356 | static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = { |
3355 | { .irq = 48 + OMAP44XX_IRQ_GIC_START }, | 3357 | { .irq = 48 + OMAP44XX_IRQ_GIC_START }, |
3358 | { .irq = -1 } | ||
3356 | }; | 3359 | }; |
3357 | 3360 | ||
3358 | static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = { | 3361 | static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = { |
3359 | { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START }, | 3362 | { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START }, |
3360 | { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START }, | 3363 | { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START }, |
3364 | { .dma_req = -1 } | ||
3361 | }; | 3365 | }; |
3362 | 3366 | ||
3363 | static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = { | 3367 | static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = { |
@@ -3366,6 +3370,7 @@ static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = { | |||
3366 | .pa_end = 0x480ba1ff, | 3370 | .pa_end = 0x480ba1ff, |
3367 | .flags = ADDR_TYPE_RT | 3371 | .flags = ADDR_TYPE_RT |
3368 | }, | 3372 | }, |
3373 | { } | ||
3369 | }; | 3374 | }; |
3370 | 3375 | ||
3371 | /* l4_per -> mcspi4 */ | 3376 | /* l4_per -> mcspi4 */ |
@@ -3374,7 +3379,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = { | |||
3374 | .slave = &omap44xx_mcspi4_hwmod, | 3379 | .slave = &omap44xx_mcspi4_hwmod, |
3375 | .clk = "l4_div_ck", | 3380 | .clk = "l4_div_ck", |
3376 | .addr = omap44xx_mcspi4_addrs, | 3381 | .addr = omap44xx_mcspi4_addrs, |
3377 | .addr_cnt = ARRAY_SIZE(omap44xx_mcspi4_addrs), | ||
3378 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 3382 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3379 | }; | 3383 | }; |
3380 | 3384 | ||
@@ -3392,9 +3396,7 @@ static struct omap_hwmod omap44xx_mcspi4_hwmod = { | |||
3392 | .name = "mcspi4", | 3396 | .name = "mcspi4", |
3393 | .class = &omap44xx_mcspi_hwmod_class, | 3397 | .class = &omap44xx_mcspi_hwmod_class, |
3394 | .mpu_irqs = omap44xx_mcspi4_irqs, | 3398 | .mpu_irqs = omap44xx_mcspi4_irqs, |
3395 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi4_irqs), | ||
3396 | .sdma_reqs = omap44xx_mcspi4_sdma_reqs, | 3399 | .sdma_reqs = omap44xx_mcspi4_sdma_reqs, |
3397 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi4_sdma_reqs), | ||
3398 | .main_clk = "mcspi4_fck", | 3400 | .main_clk = "mcspi4_fck", |
3399 | .prcm = { | 3401 | .prcm = { |
3400 | .omap4 = { | 3402 | .omap4 = { |
@@ -3420,7 +3422,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_mmc_sysc = { | |||
3420 | SYSC_HAS_SOFTRESET), | 3422 | SYSC_HAS_SOFTRESET), |
3421 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | 3423 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | |
3422 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | 3424 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | |
3423 | MSTANDBY_SMART), | 3425 | MSTANDBY_SMART | MSTANDBY_SMART_WKUP), |
3424 | .sysc_fields = &omap_hwmod_sysc_type2, | 3426 | .sysc_fields = &omap_hwmod_sysc_type2, |
3425 | }; | 3427 | }; |
3426 | 3428 | ||
@@ -3430,14 +3432,15 @@ static struct omap_hwmod_class omap44xx_mmc_hwmod_class = { | |||
3430 | }; | 3432 | }; |
3431 | 3433 | ||
3432 | /* mmc1 */ | 3434 | /* mmc1 */ |
3433 | |||
3434 | static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = { | 3435 | static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = { |
3435 | { .irq = 83 + OMAP44XX_IRQ_GIC_START }, | 3436 | { .irq = 83 + OMAP44XX_IRQ_GIC_START }, |
3437 | { .irq = -1 } | ||
3436 | }; | 3438 | }; |
3437 | 3439 | ||
3438 | static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = { | 3440 | static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = { |
3439 | { .name = "tx", .dma_req = 60 + OMAP44XX_DMA_REQ_START }, | 3441 | { .name = "tx", .dma_req = 60 + OMAP44XX_DMA_REQ_START }, |
3440 | { .name = "rx", .dma_req = 61 + OMAP44XX_DMA_REQ_START }, | 3442 | { .name = "rx", .dma_req = 61 + OMAP44XX_DMA_REQ_START }, |
3443 | { .dma_req = -1 } | ||
3441 | }; | 3444 | }; |
3442 | 3445 | ||
3443 | /* mmc1 master ports */ | 3446 | /* mmc1 master ports */ |
@@ -3451,6 +3454,7 @@ static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = { | |||
3451 | .pa_end = 0x4809c3ff, | 3454 | .pa_end = 0x4809c3ff, |
3452 | .flags = ADDR_TYPE_RT | 3455 | .flags = ADDR_TYPE_RT |
3453 | }, | 3456 | }, |
3457 | { } | ||
3454 | }; | 3458 | }; |
3455 | 3459 | ||
3456 | /* l4_per -> mmc1 */ | 3460 | /* l4_per -> mmc1 */ |
@@ -3459,7 +3463,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = { | |||
3459 | .slave = &omap44xx_mmc1_hwmod, | 3463 | .slave = &omap44xx_mmc1_hwmod, |
3460 | .clk = "l4_div_ck", | 3464 | .clk = "l4_div_ck", |
3461 | .addr = omap44xx_mmc1_addrs, | 3465 | .addr = omap44xx_mmc1_addrs, |
3462 | .addr_cnt = ARRAY_SIZE(omap44xx_mmc1_addrs), | ||
3463 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 3466 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3464 | }; | 3467 | }; |
3465 | 3468 | ||
@@ -3477,11 +3480,9 @@ static struct omap_hwmod omap44xx_mmc1_hwmod = { | |||
3477 | .name = "mmc1", | 3480 | .name = "mmc1", |
3478 | .class = &omap44xx_mmc_hwmod_class, | 3481 | .class = &omap44xx_mmc_hwmod_class, |
3479 | .mpu_irqs = omap44xx_mmc1_irqs, | 3482 | .mpu_irqs = omap44xx_mmc1_irqs, |
3480 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc1_irqs), | ||
3481 | .sdma_reqs = omap44xx_mmc1_sdma_reqs, | 3483 | .sdma_reqs = omap44xx_mmc1_sdma_reqs, |
3482 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc1_sdma_reqs), | ||
3483 | .main_clk = "mmc1_fck", | 3484 | .main_clk = "mmc1_fck", |
3484 | .prcm = { | 3485 | .prcm = { |
3485 | .omap4 = { | 3486 | .omap4 = { |
3486 | .clkctrl_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL, | 3487 | .clkctrl_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL, |
3487 | }, | 3488 | }, |
@@ -3497,11 +3498,13 @@ static struct omap_hwmod omap44xx_mmc1_hwmod = { | |||
3497 | /* mmc2 */ | 3498 | /* mmc2 */ |
3498 | static struct omap_hwmod_irq_info omap44xx_mmc2_irqs[] = { | 3499 | static struct omap_hwmod_irq_info omap44xx_mmc2_irqs[] = { |
3499 | { .irq = 86 + OMAP44XX_IRQ_GIC_START }, | 3500 | { .irq = 86 + OMAP44XX_IRQ_GIC_START }, |
3501 | { .irq = -1 } | ||
3500 | }; | 3502 | }; |
3501 | 3503 | ||
3502 | static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = { | 3504 | static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = { |
3503 | { .name = "tx", .dma_req = 46 + OMAP44XX_DMA_REQ_START }, | 3505 | { .name = "tx", .dma_req = 46 + OMAP44XX_DMA_REQ_START }, |
3504 | { .name = "rx", .dma_req = 47 + OMAP44XX_DMA_REQ_START }, | 3506 | { .name = "rx", .dma_req = 47 + OMAP44XX_DMA_REQ_START }, |
3507 | { .dma_req = -1 } | ||
3505 | }; | 3508 | }; |
3506 | 3509 | ||
3507 | /* mmc2 master ports */ | 3510 | /* mmc2 master ports */ |
@@ -3515,6 +3518,7 @@ static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = { | |||
3515 | .pa_end = 0x480b43ff, | 3518 | .pa_end = 0x480b43ff, |
3516 | .flags = ADDR_TYPE_RT | 3519 | .flags = ADDR_TYPE_RT |
3517 | }, | 3520 | }, |
3521 | { } | ||
3518 | }; | 3522 | }; |
3519 | 3523 | ||
3520 | /* l4_per -> mmc2 */ | 3524 | /* l4_per -> mmc2 */ |
@@ -3523,7 +3527,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = { | |||
3523 | .slave = &omap44xx_mmc2_hwmod, | 3527 | .slave = &omap44xx_mmc2_hwmod, |
3524 | .clk = "l4_div_ck", | 3528 | .clk = "l4_div_ck", |
3525 | .addr = omap44xx_mmc2_addrs, | 3529 | .addr = omap44xx_mmc2_addrs, |
3526 | .addr_cnt = ARRAY_SIZE(omap44xx_mmc2_addrs), | ||
3527 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 3530 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3528 | }; | 3531 | }; |
3529 | 3532 | ||
@@ -3536,11 +3539,9 @@ static struct omap_hwmod omap44xx_mmc2_hwmod = { | |||
3536 | .name = "mmc2", | 3539 | .name = "mmc2", |
3537 | .class = &omap44xx_mmc_hwmod_class, | 3540 | .class = &omap44xx_mmc_hwmod_class, |
3538 | .mpu_irqs = omap44xx_mmc2_irqs, | 3541 | .mpu_irqs = omap44xx_mmc2_irqs, |
3539 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc2_irqs), | ||
3540 | .sdma_reqs = omap44xx_mmc2_sdma_reqs, | 3542 | .sdma_reqs = omap44xx_mmc2_sdma_reqs, |
3541 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc2_sdma_reqs), | ||
3542 | .main_clk = "mmc2_fck", | 3543 | .main_clk = "mmc2_fck", |
3543 | .prcm = { | 3544 | .prcm = { |
3544 | .omap4 = { | 3545 | .omap4 = { |
3545 | .clkctrl_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL, | 3546 | .clkctrl_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL, |
3546 | }, | 3547 | }, |
@@ -3556,11 +3557,13 @@ static struct omap_hwmod omap44xx_mmc2_hwmod = { | |||
3556 | static struct omap_hwmod omap44xx_mmc3_hwmod; | 3557 | static struct omap_hwmod omap44xx_mmc3_hwmod; |
3557 | static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = { | 3558 | static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = { |
3558 | { .irq = 94 + OMAP44XX_IRQ_GIC_START }, | 3559 | { .irq = 94 + OMAP44XX_IRQ_GIC_START }, |
3560 | { .irq = -1 } | ||
3559 | }; | 3561 | }; |
3560 | 3562 | ||
3561 | static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = { | 3563 | static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = { |
3562 | { .name = "tx", .dma_req = 76 + OMAP44XX_DMA_REQ_START }, | 3564 | { .name = "tx", .dma_req = 76 + OMAP44XX_DMA_REQ_START }, |
3563 | { .name = "rx", .dma_req = 77 + OMAP44XX_DMA_REQ_START }, | 3565 | { .name = "rx", .dma_req = 77 + OMAP44XX_DMA_REQ_START }, |
3566 | { .dma_req = -1 } | ||
3564 | }; | 3567 | }; |
3565 | 3568 | ||
3566 | static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = { | 3569 | static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = { |
@@ -3569,6 +3572,7 @@ static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = { | |||
3569 | .pa_end = 0x480ad3ff, | 3572 | .pa_end = 0x480ad3ff, |
3570 | .flags = ADDR_TYPE_RT | 3573 | .flags = ADDR_TYPE_RT |
3571 | }, | 3574 | }, |
3575 | { } | ||
3572 | }; | 3576 | }; |
3573 | 3577 | ||
3574 | /* l4_per -> mmc3 */ | 3578 | /* l4_per -> mmc3 */ |
@@ -3577,7 +3581,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = { | |||
3577 | .slave = &omap44xx_mmc3_hwmod, | 3581 | .slave = &omap44xx_mmc3_hwmod, |
3578 | .clk = "l4_div_ck", | 3582 | .clk = "l4_div_ck", |
3579 | .addr = omap44xx_mmc3_addrs, | 3583 | .addr = omap44xx_mmc3_addrs, |
3580 | .addr_cnt = ARRAY_SIZE(omap44xx_mmc3_addrs), | ||
3581 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 3584 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3582 | }; | 3585 | }; |
3583 | 3586 | ||
@@ -3590,11 +3593,9 @@ static struct omap_hwmod omap44xx_mmc3_hwmod = { | |||
3590 | .name = "mmc3", | 3593 | .name = "mmc3", |
3591 | .class = &omap44xx_mmc_hwmod_class, | 3594 | .class = &omap44xx_mmc_hwmod_class, |
3592 | .mpu_irqs = omap44xx_mmc3_irqs, | 3595 | .mpu_irqs = omap44xx_mmc3_irqs, |
3593 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc3_irqs), | ||
3594 | .sdma_reqs = omap44xx_mmc3_sdma_reqs, | 3596 | .sdma_reqs = omap44xx_mmc3_sdma_reqs, |
3595 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc3_sdma_reqs), | ||
3596 | .main_clk = "mmc3_fck", | 3597 | .main_clk = "mmc3_fck", |
3597 | .prcm = { | 3598 | .prcm = { |
3598 | .omap4 = { | 3599 | .omap4 = { |
3599 | .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD3_CLKCTRL, | 3600 | .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD3_CLKCTRL, |
3600 | }, | 3601 | }, |
@@ -3608,11 +3609,13 @@ static struct omap_hwmod omap44xx_mmc3_hwmod = { | |||
3608 | static struct omap_hwmod omap44xx_mmc4_hwmod; | 3609 | static struct omap_hwmod omap44xx_mmc4_hwmod; |
3609 | static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = { | 3610 | static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = { |
3610 | { .irq = 96 + OMAP44XX_IRQ_GIC_START }, | 3611 | { .irq = 96 + OMAP44XX_IRQ_GIC_START }, |
3612 | { .irq = -1 } | ||
3611 | }; | 3613 | }; |
3612 | 3614 | ||
3613 | static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = { | 3615 | static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = { |
3614 | { .name = "tx", .dma_req = 56 + OMAP44XX_DMA_REQ_START }, | 3616 | { .name = "tx", .dma_req = 56 + OMAP44XX_DMA_REQ_START }, |
3615 | { .name = "rx", .dma_req = 57 + OMAP44XX_DMA_REQ_START }, | 3617 | { .name = "rx", .dma_req = 57 + OMAP44XX_DMA_REQ_START }, |
3618 | { .dma_req = -1 } | ||
3616 | }; | 3619 | }; |
3617 | 3620 | ||
3618 | static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = { | 3621 | static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = { |
@@ -3621,6 +3624,7 @@ static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = { | |||
3621 | .pa_end = 0x480d13ff, | 3624 | .pa_end = 0x480d13ff, |
3622 | .flags = ADDR_TYPE_RT | 3625 | .flags = ADDR_TYPE_RT |
3623 | }, | 3626 | }, |
3627 | { } | ||
3624 | }; | 3628 | }; |
3625 | 3629 | ||
3626 | /* l4_per -> mmc4 */ | 3630 | /* l4_per -> mmc4 */ |
@@ -3629,7 +3633,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = { | |||
3629 | .slave = &omap44xx_mmc4_hwmod, | 3633 | .slave = &omap44xx_mmc4_hwmod, |
3630 | .clk = "l4_div_ck", | 3634 | .clk = "l4_div_ck", |
3631 | .addr = omap44xx_mmc4_addrs, | 3635 | .addr = omap44xx_mmc4_addrs, |
3632 | .addr_cnt = ARRAY_SIZE(omap44xx_mmc4_addrs), | ||
3633 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 3636 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3634 | }; | 3637 | }; |
3635 | 3638 | ||
@@ -3642,11 +3645,10 @@ static struct omap_hwmod omap44xx_mmc4_hwmod = { | |||
3642 | .name = "mmc4", | 3645 | .name = "mmc4", |
3643 | .class = &omap44xx_mmc_hwmod_class, | 3646 | .class = &omap44xx_mmc_hwmod_class, |
3644 | .mpu_irqs = omap44xx_mmc4_irqs, | 3647 | .mpu_irqs = omap44xx_mmc4_irqs, |
3645 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc4_irqs), | 3648 | |
3646 | .sdma_reqs = omap44xx_mmc4_sdma_reqs, | 3649 | .sdma_reqs = omap44xx_mmc4_sdma_reqs, |
3647 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc4_sdma_reqs), | ||
3648 | .main_clk = "mmc4_fck", | 3650 | .main_clk = "mmc4_fck", |
3649 | .prcm = { | 3651 | .prcm = { |
3650 | .omap4 = { | 3652 | .omap4 = { |
3651 | .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD4_CLKCTRL, | 3653 | .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD4_CLKCTRL, |
3652 | }, | 3654 | }, |
@@ -3660,11 +3662,13 @@ static struct omap_hwmod omap44xx_mmc4_hwmod = { | |||
3660 | static struct omap_hwmod omap44xx_mmc5_hwmod; | 3662 | static struct omap_hwmod omap44xx_mmc5_hwmod; |
3661 | static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = { | 3663 | static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = { |
3662 | { .irq = 59 + OMAP44XX_IRQ_GIC_START }, | 3664 | { .irq = 59 + OMAP44XX_IRQ_GIC_START }, |
3665 | { .irq = -1 } | ||
3663 | }; | 3666 | }; |
3664 | 3667 | ||
3665 | static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = { | 3668 | static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = { |
3666 | { .name = "tx", .dma_req = 58 + OMAP44XX_DMA_REQ_START }, | 3669 | { .name = "tx", .dma_req = 58 + OMAP44XX_DMA_REQ_START }, |
3667 | { .name = "rx", .dma_req = 59 + OMAP44XX_DMA_REQ_START }, | 3670 | { .name = "rx", .dma_req = 59 + OMAP44XX_DMA_REQ_START }, |
3671 | { .dma_req = -1 } | ||
3668 | }; | 3672 | }; |
3669 | 3673 | ||
3670 | static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = { | 3674 | static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = { |
@@ -3673,6 +3677,7 @@ static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = { | |||
3673 | .pa_end = 0x480d53ff, | 3677 | .pa_end = 0x480d53ff, |
3674 | .flags = ADDR_TYPE_RT | 3678 | .flags = ADDR_TYPE_RT |
3675 | }, | 3679 | }, |
3680 | { } | ||
3676 | }; | 3681 | }; |
3677 | 3682 | ||
3678 | /* l4_per -> mmc5 */ | 3683 | /* l4_per -> mmc5 */ |
@@ -3681,7 +3686,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = { | |||
3681 | .slave = &omap44xx_mmc5_hwmod, | 3686 | .slave = &omap44xx_mmc5_hwmod, |
3682 | .clk = "l4_div_ck", | 3687 | .clk = "l4_div_ck", |
3683 | .addr = omap44xx_mmc5_addrs, | 3688 | .addr = omap44xx_mmc5_addrs, |
3684 | .addr_cnt = ARRAY_SIZE(omap44xx_mmc5_addrs), | ||
3685 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 3689 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3686 | }; | 3690 | }; |
3687 | 3691 | ||
@@ -3694,11 +3698,9 @@ static struct omap_hwmod omap44xx_mmc5_hwmod = { | |||
3694 | .name = "mmc5", | 3698 | .name = "mmc5", |
3695 | .class = &omap44xx_mmc_hwmod_class, | 3699 | .class = &omap44xx_mmc_hwmod_class, |
3696 | .mpu_irqs = omap44xx_mmc5_irqs, | 3700 | .mpu_irqs = omap44xx_mmc5_irqs, |
3697 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc5_irqs), | ||
3698 | .sdma_reqs = omap44xx_mmc5_sdma_reqs, | 3701 | .sdma_reqs = omap44xx_mmc5_sdma_reqs, |
3699 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc5_sdma_reqs), | ||
3700 | .main_clk = "mmc5_fck", | 3702 | .main_clk = "mmc5_fck", |
3701 | .prcm = { | 3703 | .prcm = { |
3702 | .omap4 = { | 3704 | .omap4 = { |
3703 | .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD5_CLKCTRL, | 3705 | .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD5_CLKCTRL, |
3704 | }, | 3706 | }, |
@@ -3722,6 +3724,7 @@ static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = { | |||
3722 | { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START }, | 3724 | { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START }, |
3723 | { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START }, | 3725 | { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START }, |
3724 | { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START }, | 3726 | { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START }, |
3727 | { .irq = -1 } | ||
3725 | }; | 3728 | }; |
3726 | 3729 | ||
3727 | /* mpu master ports */ | 3730 | /* mpu master ports */ |
@@ -3734,9 +3737,8 @@ static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = { | |||
3734 | static struct omap_hwmod omap44xx_mpu_hwmod = { | 3737 | static struct omap_hwmod omap44xx_mpu_hwmod = { |
3735 | .name = "mpu", | 3738 | .name = "mpu", |
3736 | .class = &omap44xx_mpu_hwmod_class, | 3739 | .class = &omap44xx_mpu_hwmod_class, |
3737 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | 3740 | .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, |
3738 | .mpu_irqs = omap44xx_mpu_irqs, | 3741 | .mpu_irqs = omap44xx_mpu_irqs, |
3739 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mpu_irqs), | ||
3740 | .main_clk = "dpll_mpu_m2_ck", | 3742 | .main_clk = "dpll_mpu_m2_ck", |
3741 | .prcm = { | 3743 | .prcm = { |
3742 | .omap4 = { | 3744 | .omap4 = { |
@@ -3778,6 +3780,7 @@ static struct omap_hwmod_class omap44xx_smartreflex_hwmod_class = { | |||
3778 | static struct omap_hwmod omap44xx_smartreflex_core_hwmod; | 3780 | static struct omap_hwmod omap44xx_smartreflex_core_hwmod; |
3779 | static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = { | 3781 | static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = { |
3780 | { .irq = 19 + OMAP44XX_IRQ_GIC_START }, | 3782 | { .irq = 19 + OMAP44XX_IRQ_GIC_START }, |
3783 | { .irq = -1 } | ||
3781 | }; | 3784 | }; |
3782 | 3785 | ||
3783 | static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = { | 3786 | static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = { |
@@ -3786,6 +3789,7 @@ static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = { | |||
3786 | .pa_end = 0x4a0dd03f, | 3789 | .pa_end = 0x4a0dd03f, |
3787 | .flags = ADDR_TYPE_RT | 3790 | .flags = ADDR_TYPE_RT |
3788 | }, | 3791 | }, |
3792 | { } | ||
3789 | }; | 3793 | }; |
3790 | 3794 | ||
3791 | /* l4_cfg -> smartreflex_core */ | 3795 | /* l4_cfg -> smartreflex_core */ |
@@ -3794,7 +3798,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = { | |||
3794 | .slave = &omap44xx_smartreflex_core_hwmod, | 3798 | .slave = &omap44xx_smartreflex_core_hwmod, |
3795 | .clk = "l4_div_ck", | 3799 | .clk = "l4_div_ck", |
3796 | .addr = omap44xx_smartreflex_core_addrs, | 3800 | .addr = omap44xx_smartreflex_core_addrs, |
3797 | .addr_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_addrs), | ||
3798 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 3801 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3799 | }; | 3802 | }; |
3800 | 3803 | ||
@@ -3807,7 +3810,7 @@ static struct omap_hwmod omap44xx_smartreflex_core_hwmod = { | |||
3807 | .name = "smartreflex_core", | 3810 | .name = "smartreflex_core", |
3808 | .class = &omap44xx_smartreflex_hwmod_class, | 3811 | .class = &omap44xx_smartreflex_hwmod_class, |
3809 | .mpu_irqs = omap44xx_smartreflex_core_irqs, | 3812 | .mpu_irqs = omap44xx_smartreflex_core_irqs, |
3810 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_irqs), | 3813 | |
3811 | .main_clk = "smartreflex_core_fck", | 3814 | .main_clk = "smartreflex_core_fck", |
3812 | .vdd_name = "core", | 3815 | .vdd_name = "core", |
3813 | .prcm = { | 3816 | .prcm = { |
@@ -3824,6 +3827,7 @@ static struct omap_hwmod omap44xx_smartreflex_core_hwmod = { | |||
3824 | static struct omap_hwmod omap44xx_smartreflex_iva_hwmod; | 3827 | static struct omap_hwmod omap44xx_smartreflex_iva_hwmod; |
3825 | static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = { | 3828 | static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = { |
3826 | { .irq = 102 + OMAP44XX_IRQ_GIC_START }, | 3829 | { .irq = 102 + OMAP44XX_IRQ_GIC_START }, |
3830 | { .irq = -1 } | ||
3827 | }; | 3831 | }; |
3828 | 3832 | ||
3829 | static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = { | 3833 | static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = { |
@@ -3832,6 +3836,7 @@ static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = { | |||
3832 | .pa_end = 0x4a0db03f, | 3836 | .pa_end = 0x4a0db03f, |
3833 | .flags = ADDR_TYPE_RT | 3837 | .flags = ADDR_TYPE_RT |
3834 | }, | 3838 | }, |
3839 | { } | ||
3835 | }; | 3840 | }; |
3836 | 3841 | ||
3837 | /* l4_cfg -> smartreflex_iva */ | 3842 | /* l4_cfg -> smartreflex_iva */ |
@@ -3840,7 +3845,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = { | |||
3840 | .slave = &omap44xx_smartreflex_iva_hwmod, | 3845 | .slave = &omap44xx_smartreflex_iva_hwmod, |
3841 | .clk = "l4_div_ck", | 3846 | .clk = "l4_div_ck", |
3842 | .addr = omap44xx_smartreflex_iva_addrs, | 3847 | .addr = omap44xx_smartreflex_iva_addrs, |
3843 | .addr_cnt = ARRAY_SIZE(omap44xx_smartreflex_iva_addrs), | ||
3844 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 3848 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3845 | }; | 3849 | }; |
3846 | 3850 | ||
@@ -3853,7 +3857,6 @@ static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = { | |||
3853 | .name = "smartreflex_iva", | 3857 | .name = "smartreflex_iva", |
3854 | .class = &omap44xx_smartreflex_hwmod_class, | 3858 | .class = &omap44xx_smartreflex_hwmod_class, |
3855 | .mpu_irqs = omap44xx_smartreflex_iva_irqs, | 3859 | .mpu_irqs = omap44xx_smartreflex_iva_irqs, |
3856 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_smartreflex_iva_irqs), | ||
3857 | .main_clk = "smartreflex_iva_fck", | 3860 | .main_clk = "smartreflex_iva_fck", |
3858 | .vdd_name = "iva", | 3861 | .vdd_name = "iva", |
3859 | .prcm = { | 3862 | .prcm = { |
@@ -3870,6 +3873,7 @@ static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = { | |||
3870 | static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod; | 3873 | static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod; |
3871 | static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = { | 3874 | static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = { |
3872 | { .irq = 18 + OMAP44XX_IRQ_GIC_START }, | 3875 | { .irq = 18 + OMAP44XX_IRQ_GIC_START }, |
3876 | { .irq = -1 } | ||
3873 | }; | 3877 | }; |
3874 | 3878 | ||
3875 | static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = { | 3879 | static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = { |
@@ -3878,6 +3882,7 @@ static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = { | |||
3878 | .pa_end = 0x4a0d903f, | 3882 | .pa_end = 0x4a0d903f, |
3879 | .flags = ADDR_TYPE_RT | 3883 | .flags = ADDR_TYPE_RT |
3880 | }, | 3884 | }, |
3885 | { } | ||
3881 | }; | 3886 | }; |
3882 | 3887 | ||
3883 | /* l4_cfg -> smartreflex_mpu */ | 3888 | /* l4_cfg -> smartreflex_mpu */ |
@@ -3886,7 +3891,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = { | |||
3886 | .slave = &omap44xx_smartreflex_mpu_hwmod, | 3891 | .slave = &omap44xx_smartreflex_mpu_hwmod, |
3887 | .clk = "l4_div_ck", | 3892 | .clk = "l4_div_ck", |
3888 | .addr = omap44xx_smartreflex_mpu_addrs, | 3893 | .addr = omap44xx_smartreflex_mpu_addrs, |
3889 | .addr_cnt = ARRAY_SIZE(omap44xx_smartreflex_mpu_addrs), | ||
3890 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 3894 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3891 | }; | 3895 | }; |
3892 | 3896 | ||
@@ -3899,7 +3903,6 @@ static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = { | |||
3899 | .name = "smartreflex_mpu", | 3903 | .name = "smartreflex_mpu", |
3900 | .class = &omap44xx_smartreflex_hwmod_class, | 3904 | .class = &omap44xx_smartreflex_hwmod_class, |
3901 | .mpu_irqs = omap44xx_smartreflex_mpu_irqs, | 3905 | .mpu_irqs = omap44xx_smartreflex_mpu_irqs, |
3902 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_smartreflex_mpu_irqs), | ||
3903 | .main_clk = "smartreflex_mpu_fck", | 3906 | .main_clk = "smartreflex_mpu_fck", |
3904 | .vdd_name = "mpu", | 3907 | .vdd_name = "mpu", |
3905 | .prcm = { | 3908 | .prcm = { |
@@ -3943,6 +3946,7 @@ static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = { | |||
3943 | .pa_end = 0x4a0f6fff, | 3946 | .pa_end = 0x4a0f6fff, |
3944 | .flags = ADDR_TYPE_RT | 3947 | .flags = ADDR_TYPE_RT |
3945 | }, | 3948 | }, |
3949 | { } | ||
3946 | }; | 3950 | }; |
3947 | 3951 | ||
3948 | /* l4_cfg -> spinlock */ | 3952 | /* l4_cfg -> spinlock */ |
@@ -3951,7 +3955,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = { | |||
3951 | .slave = &omap44xx_spinlock_hwmod, | 3955 | .slave = &omap44xx_spinlock_hwmod, |
3952 | .clk = "l4_div_ck", | 3956 | .clk = "l4_div_ck", |
3953 | .addr = omap44xx_spinlock_addrs, | 3957 | .addr = omap44xx_spinlock_addrs, |
3954 | .addr_cnt = ARRAY_SIZE(omap44xx_spinlock_addrs), | ||
3955 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 3958 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
3956 | }; | 3959 | }; |
3957 | 3960 | ||
@@ -4015,6 +4018,7 @@ static struct omap_hwmod_class omap44xx_timer_hwmod_class = { | |||
4015 | static struct omap_hwmod omap44xx_timer1_hwmod; | 4018 | static struct omap_hwmod omap44xx_timer1_hwmod; |
4016 | static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = { | 4019 | static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = { |
4017 | { .irq = 37 + OMAP44XX_IRQ_GIC_START }, | 4020 | { .irq = 37 + OMAP44XX_IRQ_GIC_START }, |
4021 | { .irq = -1 } | ||
4018 | }; | 4022 | }; |
4019 | 4023 | ||
4020 | static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = { | 4024 | static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = { |
@@ -4023,6 +4027,7 @@ static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = { | |||
4023 | .pa_end = 0x4a31807f, | 4027 | .pa_end = 0x4a31807f, |
4024 | .flags = ADDR_TYPE_RT | 4028 | .flags = ADDR_TYPE_RT |
4025 | }, | 4029 | }, |
4030 | { } | ||
4026 | }; | 4031 | }; |
4027 | 4032 | ||
4028 | /* l4_wkup -> timer1 */ | 4033 | /* l4_wkup -> timer1 */ |
@@ -4031,7 +4036,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = { | |||
4031 | .slave = &omap44xx_timer1_hwmod, | 4036 | .slave = &omap44xx_timer1_hwmod, |
4032 | .clk = "l4_wkup_clk_mux_ck", | 4037 | .clk = "l4_wkup_clk_mux_ck", |
4033 | .addr = omap44xx_timer1_addrs, | 4038 | .addr = omap44xx_timer1_addrs, |
4034 | .addr_cnt = ARRAY_SIZE(omap44xx_timer1_addrs), | ||
4035 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4039 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
4036 | }; | 4040 | }; |
4037 | 4041 | ||
@@ -4044,7 +4048,6 @@ static struct omap_hwmod omap44xx_timer1_hwmod = { | |||
4044 | .name = "timer1", | 4048 | .name = "timer1", |
4045 | .class = &omap44xx_timer_1ms_hwmod_class, | 4049 | .class = &omap44xx_timer_1ms_hwmod_class, |
4046 | .mpu_irqs = omap44xx_timer1_irqs, | 4050 | .mpu_irqs = omap44xx_timer1_irqs, |
4047 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer1_irqs), | ||
4048 | .main_clk = "timer1_fck", | 4051 | .main_clk = "timer1_fck", |
4049 | .prcm = { | 4052 | .prcm = { |
4050 | .omap4 = { | 4053 | .omap4 = { |
@@ -4060,6 +4063,7 @@ static struct omap_hwmod omap44xx_timer1_hwmod = { | |||
4060 | static struct omap_hwmod omap44xx_timer2_hwmod; | 4063 | static struct omap_hwmod omap44xx_timer2_hwmod; |
4061 | static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = { | 4064 | static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = { |
4062 | { .irq = 38 + OMAP44XX_IRQ_GIC_START }, | 4065 | { .irq = 38 + OMAP44XX_IRQ_GIC_START }, |
4066 | { .irq = -1 } | ||
4063 | }; | 4067 | }; |
4064 | 4068 | ||
4065 | static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = { | 4069 | static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = { |
@@ -4068,6 +4072,7 @@ static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = { | |||
4068 | .pa_end = 0x4803207f, | 4072 | .pa_end = 0x4803207f, |
4069 | .flags = ADDR_TYPE_RT | 4073 | .flags = ADDR_TYPE_RT |
4070 | }, | 4074 | }, |
4075 | { } | ||
4071 | }; | 4076 | }; |
4072 | 4077 | ||
4073 | /* l4_per -> timer2 */ | 4078 | /* l4_per -> timer2 */ |
@@ -4076,7 +4081,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = { | |||
4076 | .slave = &omap44xx_timer2_hwmod, | 4081 | .slave = &omap44xx_timer2_hwmod, |
4077 | .clk = "l4_div_ck", | 4082 | .clk = "l4_div_ck", |
4078 | .addr = omap44xx_timer2_addrs, | 4083 | .addr = omap44xx_timer2_addrs, |
4079 | .addr_cnt = ARRAY_SIZE(omap44xx_timer2_addrs), | ||
4080 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4084 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
4081 | }; | 4085 | }; |
4082 | 4086 | ||
@@ -4089,7 +4093,6 @@ static struct omap_hwmod omap44xx_timer2_hwmod = { | |||
4089 | .name = "timer2", | 4093 | .name = "timer2", |
4090 | .class = &omap44xx_timer_1ms_hwmod_class, | 4094 | .class = &omap44xx_timer_1ms_hwmod_class, |
4091 | .mpu_irqs = omap44xx_timer2_irqs, | 4095 | .mpu_irqs = omap44xx_timer2_irqs, |
4092 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer2_irqs), | ||
4093 | .main_clk = "timer2_fck", | 4096 | .main_clk = "timer2_fck", |
4094 | .prcm = { | 4097 | .prcm = { |
4095 | .omap4 = { | 4098 | .omap4 = { |
@@ -4105,6 +4108,7 @@ static struct omap_hwmod omap44xx_timer2_hwmod = { | |||
4105 | static struct omap_hwmod omap44xx_timer3_hwmod; | 4108 | static struct omap_hwmod omap44xx_timer3_hwmod; |
4106 | static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = { | 4109 | static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = { |
4107 | { .irq = 39 + OMAP44XX_IRQ_GIC_START }, | 4110 | { .irq = 39 + OMAP44XX_IRQ_GIC_START }, |
4111 | { .irq = -1 } | ||
4108 | }; | 4112 | }; |
4109 | 4113 | ||
4110 | static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = { | 4114 | static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = { |
@@ -4113,6 +4117,7 @@ static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = { | |||
4113 | .pa_end = 0x4803407f, | 4117 | .pa_end = 0x4803407f, |
4114 | .flags = ADDR_TYPE_RT | 4118 | .flags = ADDR_TYPE_RT |
4115 | }, | 4119 | }, |
4120 | { } | ||
4116 | }; | 4121 | }; |
4117 | 4122 | ||
4118 | /* l4_per -> timer3 */ | 4123 | /* l4_per -> timer3 */ |
@@ -4121,7 +4126,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = { | |||
4121 | .slave = &omap44xx_timer3_hwmod, | 4126 | .slave = &omap44xx_timer3_hwmod, |
4122 | .clk = "l4_div_ck", | 4127 | .clk = "l4_div_ck", |
4123 | .addr = omap44xx_timer3_addrs, | 4128 | .addr = omap44xx_timer3_addrs, |
4124 | .addr_cnt = ARRAY_SIZE(omap44xx_timer3_addrs), | ||
4125 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4129 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
4126 | }; | 4130 | }; |
4127 | 4131 | ||
@@ -4134,7 +4138,6 @@ static struct omap_hwmod omap44xx_timer3_hwmod = { | |||
4134 | .name = "timer3", | 4138 | .name = "timer3", |
4135 | .class = &omap44xx_timer_hwmod_class, | 4139 | .class = &omap44xx_timer_hwmod_class, |
4136 | .mpu_irqs = omap44xx_timer3_irqs, | 4140 | .mpu_irqs = omap44xx_timer3_irqs, |
4137 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer3_irqs), | ||
4138 | .main_clk = "timer3_fck", | 4141 | .main_clk = "timer3_fck", |
4139 | .prcm = { | 4142 | .prcm = { |
4140 | .omap4 = { | 4143 | .omap4 = { |
@@ -4150,6 +4153,7 @@ static struct omap_hwmod omap44xx_timer3_hwmod = { | |||
4150 | static struct omap_hwmod omap44xx_timer4_hwmod; | 4153 | static struct omap_hwmod omap44xx_timer4_hwmod; |
4151 | static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = { | 4154 | static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = { |
4152 | { .irq = 40 + OMAP44XX_IRQ_GIC_START }, | 4155 | { .irq = 40 + OMAP44XX_IRQ_GIC_START }, |
4156 | { .irq = -1 } | ||
4153 | }; | 4157 | }; |
4154 | 4158 | ||
4155 | static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = { | 4159 | static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = { |
@@ -4158,6 +4162,7 @@ static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = { | |||
4158 | .pa_end = 0x4803607f, | 4162 | .pa_end = 0x4803607f, |
4159 | .flags = ADDR_TYPE_RT | 4163 | .flags = ADDR_TYPE_RT |
4160 | }, | 4164 | }, |
4165 | { } | ||
4161 | }; | 4166 | }; |
4162 | 4167 | ||
4163 | /* l4_per -> timer4 */ | 4168 | /* l4_per -> timer4 */ |
@@ -4166,7 +4171,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = { | |||
4166 | .slave = &omap44xx_timer4_hwmod, | 4171 | .slave = &omap44xx_timer4_hwmod, |
4167 | .clk = "l4_div_ck", | 4172 | .clk = "l4_div_ck", |
4168 | .addr = omap44xx_timer4_addrs, | 4173 | .addr = omap44xx_timer4_addrs, |
4169 | .addr_cnt = ARRAY_SIZE(omap44xx_timer4_addrs), | ||
4170 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4174 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
4171 | }; | 4175 | }; |
4172 | 4176 | ||
@@ -4179,7 +4183,6 @@ static struct omap_hwmod omap44xx_timer4_hwmod = { | |||
4179 | .name = "timer4", | 4183 | .name = "timer4", |
4180 | .class = &omap44xx_timer_hwmod_class, | 4184 | .class = &omap44xx_timer_hwmod_class, |
4181 | .mpu_irqs = omap44xx_timer4_irqs, | 4185 | .mpu_irqs = omap44xx_timer4_irqs, |
4182 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer4_irqs), | ||
4183 | .main_clk = "timer4_fck", | 4186 | .main_clk = "timer4_fck", |
4184 | .prcm = { | 4187 | .prcm = { |
4185 | .omap4 = { | 4188 | .omap4 = { |
@@ -4195,6 +4198,7 @@ static struct omap_hwmod omap44xx_timer4_hwmod = { | |||
4195 | static struct omap_hwmod omap44xx_timer5_hwmod; | 4198 | static struct omap_hwmod omap44xx_timer5_hwmod; |
4196 | static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = { | 4199 | static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = { |
4197 | { .irq = 41 + OMAP44XX_IRQ_GIC_START }, | 4200 | { .irq = 41 + OMAP44XX_IRQ_GIC_START }, |
4201 | { .irq = -1 } | ||
4198 | }; | 4202 | }; |
4199 | 4203 | ||
4200 | static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = { | 4204 | static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = { |
@@ -4203,6 +4207,7 @@ static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = { | |||
4203 | .pa_end = 0x4013807f, | 4207 | .pa_end = 0x4013807f, |
4204 | .flags = ADDR_TYPE_RT | 4208 | .flags = ADDR_TYPE_RT |
4205 | }, | 4209 | }, |
4210 | { } | ||
4206 | }; | 4211 | }; |
4207 | 4212 | ||
4208 | /* l4_abe -> timer5 */ | 4213 | /* l4_abe -> timer5 */ |
@@ -4211,7 +4216,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = { | |||
4211 | .slave = &omap44xx_timer5_hwmod, | 4216 | .slave = &omap44xx_timer5_hwmod, |
4212 | .clk = "ocp_abe_iclk", | 4217 | .clk = "ocp_abe_iclk", |
4213 | .addr = omap44xx_timer5_addrs, | 4218 | .addr = omap44xx_timer5_addrs, |
4214 | .addr_cnt = ARRAY_SIZE(omap44xx_timer5_addrs), | ||
4215 | .user = OCP_USER_MPU, | 4219 | .user = OCP_USER_MPU, |
4216 | }; | 4220 | }; |
4217 | 4221 | ||
@@ -4221,6 +4225,7 @@ static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = { | |||
4221 | .pa_end = 0x4903807f, | 4225 | .pa_end = 0x4903807f, |
4222 | .flags = ADDR_TYPE_RT | 4226 | .flags = ADDR_TYPE_RT |
4223 | }, | 4227 | }, |
4228 | { } | ||
4224 | }; | 4229 | }; |
4225 | 4230 | ||
4226 | /* l4_abe -> timer5 (dma) */ | 4231 | /* l4_abe -> timer5 (dma) */ |
@@ -4229,7 +4234,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = { | |||
4229 | .slave = &omap44xx_timer5_hwmod, | 4234 | .slave = &omap44xx_timer5_hwmod, |
4230 | .clk = "ocp_abe_iclk", | 4235 | .clk = "ocp_abe_iclk", |
4231 | .addr = omap44xx_timer5_dma_addrs, | 4236 | .addr = omap44xx_timer5_dma_addrs, |
4232 | .addr_cnt = ARRAY_SIZE(omap44xx_timer5_dma_addrs), | ||
4233 | .user = OCP_USER_SDMA, | 4237 | .user = OCP_USER_SDMA, |
4234 | }; | 4238 | }; |
4235 | 4239 | ||
@@ -4243,7 +4247,6 @@ static struct omap_hwmod omap44xx_timer5_hwmod = { | |||
4243 | .name = "timer5", | 4247 | .name = "timer5", |
4244 | .class = &omap44xx_timer_hwmod_class, | 4248 | .class = &omap44xx_timer_hwmod_class, |
4245 | .mpu_irqs = omap44xx_timer5_irqs, | 4249 | .mpu_irqs = omap44xx_timer5_irqs, |
4246 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer5_irqs), | ||
4247 | .main_clk = "timer5_fck", | 4250 | .main_clk = "timer5_fck", |
4248 | .prcm = { | 4251 | .prcm = { |
4249 | .omap4 = { | 4252 | .omap4 = { |
@@ -4259,6 +4262,7 @@ static struct omap_hwmod omap44xx_timer5_hwmod = { | |||
4259 | static struct omap_hwmod omap44xx_timer6_hwmod; | 4262 | static struct omap_hwmod omap44xx_timer6_hwmod; |
4260 | static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = { | 4263 | static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = { |
4261 | { .irq = 42 + OMAP44XX_IRQ_GIC_START }, | 4264 | { .irq = 42 + OMAP44XX_IRQ_GIC_START }, |
4265 | { .irq = -1 } | ||
4262 | }; | 4266 | }; |
4263 | 4267 | ||
4264 | static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = { | 4268 | static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = { |
@@ -4267,6 +4271,7 @@ static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = { | |||
4267 | .pa_end = 0x4013a07f, | 4271 | .pa_end = 0x4013a07f, |
4268 | .flags = ADDR_TYPE_RT | 4272 | .flags = ADDR_TYPE_RT |
4269 | }, | 4273 | }, |
4274 | { } | ||
4270 | }; | 4275 | }; |
4271 | 4276 | ||
4272 | /* l4_abe -> timer6 */ | 4277 | /* l4_abe -> timer6 */ |
@@ -4275,7 +4280,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = { | |||
4275 | .slave = &omap44xx_timer6_hwmod, | 4280 | .slave = &omap44xx_timer6_hwmod, |
4276 | .clk = "ocp_abe_iclk", | 4281 | .clk = "ocp_abe_iclk", |
4277 | .addr = omap44xx_timer6_addrs, | 4282 | .addr = omap44xx_timer6_addrs, |
4278 | .addr_cnt = ARRAY_SIZE(omap44xx_timer6_addrs), | ||
4279 | .user = OCP_USER_MPU, | 4283 | .user = OCP_USER_MPU, |
4280 | }; | 4284 | }; |
4281 | 4285 | ||
@@ -4285,6 +4289,7 @@ static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = { | |||
4285 | .pa_end = 0x4903a07f, | 4289 | .pa_end = 0x4903a07f, |
4286 | .flags = ADDR_TYPE_RT | 4290 | .flags = ADDR_TYPE_RT |
4287 | }, | 4291 | }, |
4292 | { } | ||
4288 | }; | 4293 | }; |
4289 | 4294 | ||
4290 | /* l4_abe -> timer6 (dma) */ | 4295 | /* l4_abe -> timer6 (dma) */ |
@@ -4293,7 +4298,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = { | |||
4293 | .slave = &omap44xx_timer6_hwmod, | 4298 | .slave = &omap44xx_timer6_hwmod, |
4294 | .clk = "ocp_abe_iclk", | 4299 | .clk = "ocp_abe_iclk", |
4295 | .addr = omap44xx_timer6_dma_addrs, | 4300 | .addr = omap44xx_timer6_dma_addrs, |
4296 | .addr_cnt = ARRAY_SIZE(omap44xx_timer6_dma_addrs), | ||
4297 | .user = OCP_USER_SDMA, | 4301 | .user = OCP_USER_SDMA, |
4298 | }; | 4302 | }; |
4299 | 4303 | ||
@@ -4307,7 +4311,7 @@ static struct omap_hwmod omap44xx_timer6_hwmod = { | |||
4307 | .name = "timer6", | 4311 | .name = "timer6", |
4308 | .class = &omap44xx_timer_hwmod_class, | 4312 | .class = &omap44xx_timer_hwmod_class, |
4309 | .mpu_irqs = omap44xx_timer6_irqs, | 4313 | .mpu_irqs = omap44xx_timer6_irqs, |
4310 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer6_irqs), | 4314 | |
4311 | .main_clk = "timer6_fck", | 4315 | .main_clk = "timer6_fck", |
4312 | .prcm = { | 4316 | .prcm = { |
4313 | .omap4 = { | 4317 | .omap4 = { |
@@ -4323,6 +4327,7 @@ static struct omap_hwmod omap44xx_timer6_hwmod = { | |||
4323 | static struct omap_hwmod omap44xx_timer7_hwmod; | 4327 | static struct omap_hwmod omap44xx_timer7_hwmod; |
4324 | static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = { | 4328 | static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = { |
4325 | { .irq = 43 + OMAP44XX_IRQ_GIC_START }, | 4329 | { .irq = 43 + OMAP44XX_IRQ_GIC_START }, |
4330 | { .irq = -1 } | ||
4326 | }; | 4331 | }; |
4327 | 4332 | ||
4328 | static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = { | 4333 | static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = { |
@@ -4331,6 +4336,7 @@ static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = { | |||
4331 | .pa_end = 0x4013c07f, | 4336 | .pa_end = 0x4013c07f, |
4332 | .flags = ADDR_TYPE_RT | 4337 | .flags = ADDR_TYPE_RT |
4333 | }, | 4338 | }, |
4339 | { } | ||
4334 | }; | 4340 | }; |
4335 | 4341 | ||
4336 | /* l4_abe -> timer7 */ | 4342 | /* l4_abe -> timer7 */ |
@@ -4339,7 +4345,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = { | |||
4339 | .slave = &omap44xx_timer7_hwmod, | 4345 | .slave = &omap44xx_timer7_hwmod, |
4340 | .clk = "ocp_abe_iclk", | 4346 | .clk = "ocp_abe_iclk", |
4341 | .addr = omap44xx_timer7_addrs, | 4347 | .addr = omap44xx_timer7_addrs, |
4342 | .addr_cnt = ARRAY_SIZE(omap44xx_timer7_addrs), | ||
4343 | .user = OCP_USER_MPU, | 4348 | .user = OCP_USER_MPU, |
4344 | }; | 4349 | }; |
4345 | 4350 | ||
@@ -4349,6 +4354,7 @@ static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = { | |||
4349 | .pa_end = 0x4903c07f, | 4354 | .pa_end = 0x4903c07f, |
4350 | .flags = ADDR_TYPE_RT | 4355 | .flags = ADDR_TYPE_RT |
4351 | }, | 4356 | }, |
4357 | { } | ||
4352 | }; | 4358 | }; |
4353 | 4359 | ||
4354 | /* l4_abe -> timer7 (dma) */ | 4360 | /* l4_abe -> timer7 (dma) */ |
@@ -4357,7 +4363,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = { | |||
4357 | .slave = &omap44xx_timer7_hwmod, | 4363 | .slave = &omap44xx_timer7_hwmod, |
4358 | .clk = "ocp_abe_iclk", | 4364 | .clk = "ocp_abe_iclk", |
4359 | .addr = omap44xx_timer7_dma_addrs, | 4365 | .addr = omap44xx_timer7_dma_addrs, |
4360 | .addr_cnt = ARRAY_SIZE(omap44xx_timer7_dma_addrs), | ||
4361 | .user = OCP_USER_SDMA, | 4366 | .user = OCP_USER_SDMA, |
4362 | }; | 4367 | }; |
4363 | 4368 | ||
@@ -4371,7 +4376,6 @@ static struct omap_hwmod omap44xx_timer7_hwmod = { | |||
4371 | .name = "timer7", | 4376 | .name = "timer7", |
4372 | .class = &omap44xx_timer_hwmod_class, | 4377 | .class = &omap44xx_timer_hwmod_class, |
4373 | .mpu_irqs = omap44xx_timer7_irqs, | 4378 | .mpu_irqs = omap44xx_timer7_irqs, |
4374 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer7_irqs), | ||
4375 | .main_clk = "timer7_fck", | 4379 | .main_clk = "timer7_fck", |
4376 | .prcm = { | 4380 | .prcm = { |
4377 | .omap4 = { | 4381 | .omap4 = { |
@@ -4387,6 +4391,7 @@ static struct omap_hwmod omap44xx_timer7_hwmod = { | |||
4387 | static struct omap_hwmod omap44xx_timer8_hwmod; | 4391 | static struct omap_hwmod omap44xx_timer8_hwmod; |
4388 | static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = { | 4392 | static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = { |
4389 | { .irq = 44 + OMAP44XX_IRQ_GIC_START }, | 4393 | { .irq = 44 + OMAP44XX_IRQ_GIC_START }, |
4394 | { .irq = -1 } | ||
4390 | }; | 4395 | }; |
4391 | 4396 | ||
4392 | static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = { | 4397 | static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = { |
@@ -4395,6 +4400,7 @@ static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = { | |||
4395 | .pa_end = 0x4013e07f, | 4400 | .pa_end = 0x4013e07f, |
4396 | .flags = ADDR_TYPE_RT | 4401 | .flags = ADDR_TYPE_RT |
4397 | }, | 4402 | }, |
4403 | { } | ||
4398 | }; | 4404 | }; |
4399 | 4405 | ||
4400 | /* l4_abe -> timer8 */ | 4406 | /* l4_abe -> timer8 */ |
@@ -4403,7 +4409,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = { | |||
4403 | .slave = &omap44xx_timer8_hwmod, | 4409 | .slave = &omap44xx_timer8_hwmod, |
4404 | .clk = "ocp_abe_iclk", | 4410 | .clk = "ocp_abe_iclk", |
4405 | .addr = omap44xx_timer8_addrs, | 4411 | .addr = omap44xx_timer8_addrs, |
4406 | .addr_cnt = ARRAY_SIZE(omap44xx_timer8_addrs), | ||
4407 | .user = OCP_USER_MPU, | 4412 | .user = OCP_USER_MPU, |
4408 | }; | 4413 | }; |
4409 | 4414 | ||
@@ -4413,6 +4418,7 @@ static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = { | |||
4413 | .pa_end = 0x4903e07f, | 4418 | .pa_end = 0x4903e07f, |
4414 | .flags = ADDR_TYPE_RT | 4419 | .flags = ADDR_TYPE_RT |
4415 | }, | 4420 | }, |
4421 | { } | ||
4416 | }; | 4422 | }; |
4417 | 4423 | ||
4418 | /* l4_abe -> timer8 (dma) */ | 4424 | /* l4_abe -> timer8 (dma) */ |
@@ -4421,7 +4427,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = { | |||
4421 | .slave = &omap44xx_timer8_hwmod, | 4427 | .slave = &omap44xx_timer8_hwmod, |
4422 | .clk = "ocp_abe_iclk", | 4428 | .clk = "ocp_abe_iclk", |
4423 | .addr = omap44xx_timer8_dma_addrs, | 4429 | .addr = omap44xx_timer8_dma_addrs, |
4424 | .addr_cnt = ARRAY_SIZE(omap44xx_timer8_dma_addrs), | ||
4425 | .user = OCP_USER_SDMA, | 4430 | .user = OCP_USER_SDMA, |
4426 | }; | 4431 | }; |
4427 | 4432 | ||
@@ -4435,7 +4440,6 @@ static struct omap_hwmod omap44xx_timer8_hwmod = { | |||
4435 | .name = "timer8", | 4440 | .name = "timer8", |
4436 | .class = &omap44xx_timer_hwmod_class, | 4441 | .class = &omap44xx_timer_hwmod_class, |
4437 | .mpu_irqs = omap44xx_timer8_irqs, | 4442 | .mpu_irqs = omap44xx_timer8_irqs, |
4438 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer8_irqs), | ||
4439 | .main_clk = "timer8_fck", | 4443 | .main_clk = "timer8_fck", |
4440 | .prcm = { | 4444 | .prcm = { |
4441 | .omap4 = { | 4445 | .omap4 = { |
@@ -4451,6 +4455,7 @@ static struct omap_hwmod omap44xx_timer8_hwmod = { | |||
4451 | static struct omap_hwmod omap44xx_timer9_hwmod; | 4455 | static struct omap_hwmod omap44xx_timer9_hwmod; |
4452 | static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = { | 4456 | static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = { |
4453 | { .irq = 45 + OMAP44XX_IRQ_GIC_START }, | 4457 | { .irq = 45 + OMAP44XX_IRQ_GIC_START }, |
4458 | { .irq = -1 } | ||
4454 | }; | 4459 | }; |
4455 | 4460 | ||
4456 | static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = { | 4461 | static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = { |
@@ -4459,6 +4464,7 @@ static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = { | |||
4459 | .pa_end = 0x4803e07f, | 4464 | .pa_end = 0x4803e07f, |
4460 | .flags = ADDR_TYPE_RT | 4465 | .flags = ADDR_TYPE_RT |
4461 | }, | 4466 | }, |
4467 | { } | ||
4462 | }; | 4468 | }; |
4463 | 4469 | ||
4464 | /* l4_per -> timer9 */ | 4470 | /* l4_per -> timer9 */ |
@@ -4467,7 +4473,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = { | |||
4467 | .slave = &omap44xx_timer9_hwmod, | 4473 | .slave = &omap44xx_timer9_hwmod, |
4468 | .clk = "l4_div_ck", | 4474 | .clk = "l4_div_ck", |
4469 | .addr = omap44xx_timer9_addrs, | 4475 | .addr = omap44xx_timer9_addrs, |
4470 | .addr_cnt = ARRAY_SIZE(omap44xx_timer9_addrs), | ||
4471 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4476 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
4472 | }; | 4477 | }; |
4473 | 4478 | ||
@@ -4480,7 +4485,6 @@ static struct omap_hwmod omap44xx_timer9_hwmod = { | |||
4480 | .name = "timer9", | 4485 | .name = "timer9", |
4481 | .class = &omap44xx_timer_hwmod_class, | 4486 | .class = &omap44xx_timer_hwmod_class, |
4482 | .mpu_irqs = omap44xx_timer9_irqs, | 4487 | .mpu_irqs = omap44xx_timer9_irqs, |
4483 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer9_irqs), | ||
4484 | .main_clk = "timer9_fck", | 4488 | .main_clk = "timer9_fck", |
4485 | .prcm = { | 4489 | .prcm = { |
4486 | .omap4 = { | 4490 | .omap4 = { |
@@ -4496,6 +4500,7 @@ static struct omap_hwmod omap44xx_timer9_hwmod = { | |||
4496 | static struct omap_hwmod omap44xx_timer10_hwmod; | 4500 | static struct omap_hwmod omap44xx_timer10_hwmod; |
4497 | static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = { | 4501 | static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = { |
4498 | { .irq = 46 + OMAP44XX_IRQ_GIC_START }, | 4502 | { .irq = 46 + OMAP44XX_IRQ_GIC_START }, |
4503 | { .irq = -1 } | ||
4499 | }; | 4504 | }; |
4500 | 4505 | ||
4501 | static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = { | 4506 | static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = { |
@@ -4504,6 +4509,7 @@ static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = { | |||
4504 | .pa_end = 0x4808607f, | 4509 | .pa_end = 0x4808607f, |
4505 | .flags = ADDR_TYPE_RT | 4510 | .flags = ADDR_TYPE_RT |
4506 | }, | 4511 | }, |
4512 | { } | ||
4507 | }; | 4513 | }; |
4508 | 4514 | ||
4509 | /* l4_per -> timer10 */ | 4515 | /* l4_per -> timer10 */ |
@@ -4512,7 +4518,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = { | |||
4512 | .slave = &omap44xx_timer10_hwmod, | 4518 | .slave = &omap44xx_timer10_hwmod, |
4513 | .clk = "l4_div_ck", | 4519 | .clk = "l4_div_ck", |
4514 | .addr = omap44xx_timer10_addrs, | 4520 | .addr = omap44xx_timer10_addrs, |
4515 | .addr_cnt = ARRAY_SIZE(omap44xx_timer10_addrs), | ||
4516 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4521 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
4517 | }; | 4522 | }; |
4518 | 4523 | ||
@@ -4525,7 +4530,6 @@ static struct omap_hwmod omap44xx_timer10_hwmod = { | |||
4525 | .name = "timer10", | 4530 | .name = "timer10", |
4526 | .class = &omap44xx_timer_1ms_hwmod_class, | 4531 | .class = &omap44xx_timer_1ms_hwmod_class, |
4527 | .mpu_irqs = omap44xx_timer10_irqs, | 4532 | .mpu_irqs = omap44xx_timer10_irqs, |
4528 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer10_irqs), | ||
4529 | .main_clk = "timer10_fck", | 4533 | .main_clk = "timer10_fck", |
4530 | .prcm = { | 4534 | .prcm = { |
4531 | .omap4 = { | 4535 | .omap4 = { |
@@ -4541,6 +4545,7 @@ static struct omap_hwmod omap44xx_timer10_hwmod = { | |||
4541 | static struct omap_hwmod omap44xx_timer11_hwmod; | 4545 | static struct omap_hwmod omap44xx_timer11_hwmod; |
4542 | static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = { | 4546 | static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = { |
4543 | { .irq = 47 + OMAP44XX_IRQ_GIC_START }, | 4547 | { .irq = 47 + OMAP44XX_IRQ_GIC_START }, |
4548 | { .irq = -1 } | ||
4544 | }; | 4549 | }; |
4545 | 4550 | ||
4546 | static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = { | 4551 | static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = { |
@@ -4549,6 +4554,7 @@ static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = { | |||
4549 | .pa_end = 0x4808807f, | 4554 | .pa_end = 0x4808807f, |
4550 | .flags = ADDR_TYPE_RT | 4555 | .flags = ADDR_TYPE_RT |
4551 | }, | 4556 | }, |
4557 | { } | ||
4552 | }; | 4558 | }; |
4553 | 4559 | ||
4554 | /* l4_per -> timer11 */ | 4560 | /* l4_per -> timer11 */ |
@@ -4557,7 +4563,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = { | |||
4557 | .slave = &omap44xx_timer11_hwmod, | 4563 | .slave = &omap44xx_timer11_hwmod, |
4558 | .clk = "l4_div_ck", | 4564 | .clk = "l4_div_ck", |
4559 | .addr = omap44xx_timer11_addrs, | 4565 | .addr = omap44xx_timer11_addrs, |
4560 | .addr_cnt = ARRAY_SIZE(omap44xx_timer11_addrs), | ||
4561 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4566 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
4562 | }; | 4567 | }; |
4563 | 4568 | ||
@@ -4570,7 +4575,6 @@ static struct omap_hwmod omap44xx_timer11_hwmod = { | |||
4570 | .name = "timer11", | 4575 | .name = "timer11", |
4571 | .class = &omap44xx_timer_hwmod_class, | 4576 | .class = &omap44xx_timer_hwmod_class, |
4572 | .mpu_irqs = omap44xx_timer11_irqs, | 4577 | .mpu_irqs = omap44xx_timer11_irqs, |
4573 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer11_irqs), | ||
4574 | .main_clk = "timer11_fck", | 4578 | .main_clk = "timer11_fck", |
4575 | .prcm = { | 4579 | .prcm = { |
4576 | .omap4 = { | 4580 | .omap4 = { |
@@ -4608,11 +4612,13 @@ static struct omap_hwmod_class omap44xx_uart_hwmod_class = { | |||
4608 | static struct omap_hwmod omap44xx_uart1_hwmod; | 4612 | static struct omap_hwmod omap44xx_uart1_hwmod; |
4609 | static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = { | 4613 | static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = { |
4610 | { .irq = 72 + OMAP44XX_IRQ_GIC_START }, | 4614 | { .irq = 72 + OMAP44XX_IRQ_GIC_START }, |
4615 | { .irq = -1 } | ||
4611 | }; | 4616 | }; |
4612 | 4617 | ||
4613 | static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = { | 4618 | static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = { |
4614 | { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START }, | 4619 | { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START }, |
4615 | { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START }, | 4620 | { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START }, |
4621 | { .dma_req = -1 } | ||
4616 | }; | 4622 | }; |
4617 | 4623 | ||
4618 | static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = { | 4624 | static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = { |
@@ -4621,6 +4627,7 @@ static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = { | |||
4621 | .pa_end = 0x4806a0ff, | 4627 | .pa_end = 0x4806a0ff, |
4622 | .flags = ADDR_TYPE_RT | 4628 | .flags = ADDR_TYPE_RT |
4623 | }, | 4629 | }, |
4630 | { } | ||
4624 | }; | 4631 | }; |
4625 | 4632 | ||
4626 | /* l4_per -> uart1 */ | 4633 | /* l4_per -> uart1 */ |
@@ -4629,7 +4636,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = { | |||
4629 | .slave = &omap44xx_uart1_hwmod, | 4636 | .slave = &omap44xx_uart1_hwmod, |
4630 | .clk = "l4_div_ck", | 4637 | .clk = "l4_div_ck", |
4631 | .addr = omap44xx_uart1_addrs, | 4638 | .addr = omap44xx_uart1_addrs, |
4632 | .addr_cnt = ARRAY_SIZE(omap44xx_uart1_addrs), | ||
4633 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4639 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
4634 | }; | 4640 | }; |
4635 | 4641 | ||
@@ -4642,9 +4648,7 @@ static struct omap_hwmod omap44xx_uart1_hwmod = { | |||
4642 | .name = "uart1", | 4648 | .name = "uart1", |
4643 | .class = &omap44xx_uart_hwmod_class, | 4649 | .class = &omap44xx_uart_hwmod_class, |
4644 | .mpu_irqs = omap44xx_uart1_irqs, | 4650 | .mpu_irqs = omap44xx_uart1_irqs, |
4645 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart1_irqs), | ||
4646 | .sdma_reqs = omap44xx_uart1_sdma_reqs, | 4651 | .sdma_reqs = omap44xx_uart1_sdma_reqs, |
4647 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart1_sdma_reqs), | ||
4648 | .main_clk = "uart1_fck", | 4652 | .main_clk = "uart1_fck", |
4649 | .prcm = { | 4653 | .prcm = { |
4650 | .omap4 = { | 4654 | .omap4 = { |
@@ -4660,11 +4664,13 @@ static struct omap_hwmod omap44xx_uart1_hwmod = { | |||
4660 | static struct omap_hwmod omap44xx_uart2_hwmod; | 4664 | static struct omap_hwmod omap44xx_uart2_hwmod; |
4661 | static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = { | 4665 | static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = { |
4662 | { .irq = 73 + OMAP44XX_IRQ_GIC_START }, | 4666 | { .irq = 73 + OMAP44XX_IRQ_GIC_START }, |
4667 | { .irq = -1 } | ||
4663 | }; | 4668 | }; |
4664 | 4669 | ||
4665 | static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = { | 4670 | static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = { |
4666 | { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START }, | 4671 | { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START }, |
4667 | { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START }, | 4672 | { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START }, |
4673 | { .dma_req = -1 } | ||
4668 | }; | 4674 | }; |
4669 | 4675 | ||
4670 | static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = { | 4676 | static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = { |
@@ -4673,6 +4679,7 @@ static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = { | |||
4673 | .pa_end = 0x4806c0ff, | 4679 | .pa_end = 0x4806c0ff, |
4674 | .flags = ADDR_TYPE_RT | 4680 | .flags = ADDR_TYPE_RT |
4675 | }, | 4681 | }, |
4682 | { } | ||
4676 | }; | 4683 | }; |
4677 | 4684 | ||
4678 | /* l4_per -> uart2 */ | 4685 | /* l4_per -> uart2 */ |
@@ -4681,7 +4688,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = { | |||
4681 | .slave = &omap44xx_uart2_hwmod, | 4688 | .slave = &omap44xx_uart2_hwmod, |
4682 | .clk = "l4_div_ck", | 4689 | .clk = "l4_div_ck", |
4683 | .addr = omap44xx_uart2_addrs, | 4690 | .addr = omap44xx_uart2_addrs, |
4684 | .addr_cnt = ARRAY_SIZE(omap44xx_uart2_addrs), | ||
4685 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4691 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
4686 | }; | 4692 | }; |
4687 | 4693 | ||
@@ -4694,9 +4700,7 @@ static struct omap_hwmod omap44xx_uart2_hwmod = { | |||
4694 | .name = "uart2", | 4700 | .name = "uart2", |
4695 | .class = &omap44xx_uart_hwmod_class, | 4701 | .class = &omap44xx_uart_hwmod_class, |
4696 | .mpu_irqs = omap44xx_uart2_irqs, | 4702 | .mpu_irqs = omap44xx_uart2_irqs, |
4697 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart2_irqs), | ||
4698 | .sdma_reqs = omap44xx_uart2_sdma_reqs, | 4703 | .sdma_reqs = omap44xx_uart2_sdma_reqs, |
4699 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart2_sdma_reqs), | ||
4700 | .main_clk = "uart2_fck", | 4704 | .main_clk = "uart2_fck", |
4701 | .prcm = { | 4705 | .prcm = { |
4702 | .omap4 = { | 4706 | .omap4 = { |
@@ -4712,11 +4716,13 @@ static struct omap_hwmod omap44xx_uart2_hwmod = { | |||
4712 | static struct omap_hwmod omap44xx_uart3_hwmod; | 4716 | static struct omap_hwmod omap44xx_uart3_hwmod; |
4713 | static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = { | 4717 | static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = { |
4714 | { .irq = 74 + OMAP44XX_IRQ_GIC_START }, | 4718 | { .irq = 74 + OMAP44XX_IRQ_GIC_START }, |
4719 | { .irq = -1 } | ||
4715 | }; | 4720 | }; |
4716 | 4721 | ||
4717 | static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = { | 4722 | static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = { |
4718 | { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START }, | 4723 | { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START }, |
4719 | { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START }, | 4724 | { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START }, |
4725 | { .dma_req = -1 } | ||
4720 | }; | 4726 | }; |
4721 | 4727 | ||
4722 | static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = { | 4728 | static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = { |
@@ -4725,6 +4731,7 @@ static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = { | |||
4725 | .pa_end = 0x480200ff, | 4731 | .pa_end = 0x480200ff, |
4726 | .flags = ADDR_TYPE_RT | 4732 | .flags = ADDR_TYPE_RT |
4727 | }, | 4733 | }, |
4734 | { } | ||
4728 | }; | 4735 | }; |
4729 | 4736 | ||
4730 | /* l4_per -> uart3 */ | 4737 | /* l4_per -> uart3 */ |
@@ -4733,7 +4740,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = { | |||
4733 | .slave = &omap44xx_uart3_hwmod, | 4740 | .slave = &omap44xx_uart3_hwmod, |
4734 | .clk = "l4_div_ck", | 4741 | .clk = "l4_div_ck", |
4735 | .addr = omap44xx_uart3_addrs, | 4742 | .addr = omap44xx_uart3_addrs, |
4736 | .addr_cnt = ARRAY_SIZE(omap44xx_uart3_addrs), | ||
4737 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4743 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
4738 | }; | 4744 | }; |
4739 | 4745 | ||
@@ -4745,11 +4751,9 @@ static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = { | |||
4745 | static struct omap_hwmod omap44xx_uart3_hwmod = { | 4751 | static struct omap_hwmod omap44xx_uart3_hwmod = { |
4746 | .name = "uart3", | 4752 | .name = "uart3", |
4747 | .class = &omap44xx_uart_hwmod_class, | 4753 | .class = &omap44xx_uart_hwmod_class, |
4748 | .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), | 4754 | .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, |
4749 | .mpu_irqs = omap44xx_uart3_irqs, | 4755 | .mpu_irqs = omap44xx_uart3_irqs, |
4750 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart3_irqs), | ||
4751 | .sdma_reqs = omap44xx_uart3_sdma_reqs, | 4756 | .sdma_reqs = omap44xx_uart3_sdma_reqs, |
4752 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart3_sdma_reqs), | ||
4753 | .main_clk = "uart3_fck", | 4757 | .main_clk = "uart3_fck", |
4754 | .prcm = { | 4758 | .prcm = { |
4755 | .omap4 = { | 4759 | .omap4 = { |
@@ -4765,11 +4769,13 @@ static struct omap_hwmod omap44xx_uart3_hwmod = { | |||
4765 | static struct omap_hwmod omap44xx_uart4_hwmod; | 4769 | static struct omap_hwmod omap44xx_uart4_hwmod; |
4766 | static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = { | 4770 | static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = { |
4767 | { .irq = 70 + OMAP44XX_IRQ_GIC_START }, | 4771 | { .irq = 70 + OMAP44XX_IRQ_GIC_START }, |
4772 | { .irq = -1 } | ||
4768 | }; | 4773 | }; |
4769 | 4774 | ||
4770 | static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = { | 4775 | static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = { |
4771 | { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START }, | 4776 | { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START }, |
4772 | { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START }, | 4777 | { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START }, |
4778 | { .dma_req = -1 } | ||
4773 | }; | 4779 | }; |
4774 | 4780 | ||
4775 | static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = { | 4781 | static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = { |
@@ -4778,6 +4784,7 @@ static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = { | |||
4778 | .pa_end = 0x4806e0ff, | 4784 | .pa_end = 0x4806e0ff, |
4779 | .flags = ADDR_TYPE_RT | 4785 | .flags = ADDR_TYPE_RT |
4780 | }, | 4786 | }, |
4787 | { } | ||
4781 | }; | 4788 | }; |
4782 | 4789 | ||
4783 | /* l4_per -> uart4 */ | 4790 | /* l4_per -> uart4 */ |
@@ -4786,7 +4793,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = { | |||
4786 | .slave = &omap44xx_uart4_hwmod, | 4793 | .slave = &omap44xx_uart4_hwmod, |
4787 | .clk = "l4_div_ck", | 4794 | .clk = "l4_div_ck", |
4788 | .addr = omap44xx_uart4_addrs, | 4795 | .addr = omap44xx_uart4_addrs, |
4789 | .addr_cnt = ARRAY_SIZE(omap44xx_uart4_addrs), | ||
4790 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4796 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
4791 | }; | 4797 | }; |
4792 | 4798 | ||
@@ -4799,9 +4805,7 @@ static struct omap_hwmod omap44xx_uart4_hwmod = { | |||
4799 | .name = "uart4", | 4805 | .name = "uart4", |
4800 | .class = &omap44xx_uart_hwmod_class, | 4806 | .class = &omap44xx_uart_hwmod_class, |
4801 | .mpu_irqs = omap44xx_uart4_irqs, | 4807 | .mpu_irqs = omap44xx_uart4_irqs, |
4802 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart4_irqs), | ||
4803 | .sdma_reqs = omap44xx_uart4_sdma_reqs, | 4808 | .sdma_reqs = omap44xx_uart4_sdma_reqs, |
4804 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart4_sdma_reqs), | ||
4805 | .main_clk = "uart4_fck", | 4809 | .main_clk = "uart4_fck", |
4806 | .prcm = { | 4810 | .prcm = { |
4807 | .omap4 = { | 4811 | .omap4 = { |
@@ -4832,14 +4836,15 @@ static struct omap_hwmod_class_sysconfig omap44xx_usb_otg_hs_sysc = { | |||
4832 | }; | 4836 | }; |
4833 | 4837 | ||
4834 | static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = { | 4838 | static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = { |
4835 | .name = "usb_otg_hs", | 4839 | .name = "usb_otg_hs", |
4836 | .sysc = &omap44xx_usb_otg_hs_sysc, | 4840 | .sysc = &omap44xx_usb_otg_hs_sysc, |
4837 | }; | 4841 | }; |
4838 | 4842 | ||
4839 | /* usb_otg_hs */ | 4843 | /* usb_otg_hs */ |
4840 | static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = { | 4844 | static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = { |
4841 | { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START }, | 4845 | { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START }, |
4842 | { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START }, | 4846 | { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START }, |
4847 | { .irq = -1 } | ||
4843 | }; | 4848 | }; |
4844 | 4849 | ||
4845 | /* usb_otg_hs master ports */ | 4850 | /* usb_otg_hs master ports */ |
@@ -4853,6 +4858,7 @@ static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = { | |||
4853 | .pa_end = 0x4a0ab003, | 4858 | .pa_end = 0x4a0ab003, |
4854 | .flags = ADDR_TYPE_RT | 4859 | .flags = ADDR_TYPE_RT |
4855 | }, | 4860 | }, |
4861 | { } | ||
4856 | }; | 4862 | }; |
4857 | 4863 | ||
4858 | /* l4_cfg -> usb_otg_hs */ | 4864 | /* l4_cfg -> usb_otg_hs */ |
@@ -4861,7 +4867,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = { | |||
4861 | .slave = &omap44xx_usb_otg_hs_hwmod, | 4867 | .slave = &omap44xx_usb_otg_hs_hwmod, |
4862 | .clk = "l4_div_ck", | 4868 | .clk = "l4_div_ck", |
4863 | .addr = omap44xx_usb_otg_hs_addrs, | 4869 | .addr = omap44xx_usb_otg_hs_addrs, |
4864 | .addr_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_addrs), | ||
4865 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4870 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
4866 | }; | 4871 | }; |
4867 | 4872 | ||
@@ -4879,7 +4884,6 @@ static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = { | |||
4879 | .class = &omap44xx_usb_otg_hs_hwmod_class, | 4884 | .class = &omap44xx_usb_otg_hs_hwmod_class, |
4880 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, | 4885 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, |
4881 | .mpu_irqs = omap44xx_usb_otg_hs_irqs, | 4886 | .mpu_irqs = omap44xx_usb_otg_hs_irqs, |
4882 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_irqs), | ||
4883 | .main_clk = "usb_otg_hs_ick", | 4887 | .main_clk = "usb_otg_hs_ick", |
4884 | .prcm = { | 4888 | .prcm = { |
4885 | .omap4 = { | 4889 | .omap4 = { |
@@ -4887,7 +4891,7 @@ static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = { | |||
4887 | }, | 4891 | }, |
4888 | }, | 4892 | }, |
4889 | .opt_clks = usb_otg_hs_opt_clks, | 4893 | .opt_clks = usb_otg_hs_opt_clks, |
4890 | .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks), | 4894 | .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks), |
4891 | .slaves = omap44xx_usb_otg_hs_slaves, | 4895 | .slaves = omap44xx_usb_otg_hs_slaves, |
4892 | .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves), | 4896 | .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves), |
4893 | .masters = omap44xx_usb_otg_hs_masters, | 4897 | .masters = omap44xx_usb_otg_hs_masters, |
@@ -4922,6 +4926,7 @@ static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = { | |||
4922 | static struct omap_hwmod omap44xx_wd_timer2_hwmod; | 4926 | static struct omap_hwmod omap44xx_wd_timer2_hwmod; |
4923 | static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = { | 4927 | static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = { |
4924 | { .irq = 80 + OMAP44XX_IRQ_GIC_START }, | 4928 | { .irq = 80 + OMAP44XX_IRQ_GIC_START }, |
4929 | { .irq = -1 } | ||
4925 | }; | 4930 | }; |
4926 | 4931 | ||
4927 | static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = { | 4932 | static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = { |
@@ -4930,6 +4935,7 @@ static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = { | |||
4930 | .pa_end = 0x4a31407f, | 4935 | .pa_end = 0x4a31407f, |
4931 | .flags = ADDR_TYPE_RT | 4936 | .flags = ADDR_TYPE_RT |
4932 | }, | 4937 | }, |
4938 | { } | ||
4933 | }; | 4939 | }; |
4934 | 4940 | ||
4935 | /* l4_wkup -> wd_timer2 */ | 4941 | /* l4_wkup -> wd_timer2 */ |
@@ -4938,7 +4944,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = { | |||
4938 | .slave = &omap44xx_wd_timer2_hwmod, | 4944 | .slave = &omap44xx_wd_timer2_hwmod, |
4939 | .clk = "l4_wkup_clk_mux_ck", | 4945 | .clk = "l4_wkup_clk_mux_ck", |
4940 | .addr = omap44xx_wd_timer2_addrs, | 4946 | .addr = omap44xx_wd_timer2_addrs, |
4941 | .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer2_addrs), | ||
4942 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 4947 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
4943 | }; | 4948 | }; |
4944 | 4949 | ||
@@ -4951,7 +4956,6 @@ static struct omap_hwmod omap44xx_wd_timer2_hwmod = { | |||
4951 | .name = "wd_timer2", | 4956 | .name = "wd_timer2", |
4952 | .class = &omap44xx_wd_timer_hwmod_class, | 4957 | .class = &omap44xx_wd_timer_hwmod_class, |
4953 | .mpu_irqs = omap44xx_wd_timer2_irqs, | 4958 | .mpu_irqs = omap44xx_wd_timer2_irqs, |
4954 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer2_irqs), | ||
4955 | .main_clk = "wd_timer2_fck", | 4959 | .main_clk = "wd_timer2_fck", |
4956 | .prcm = { | 4960 | .prcm = { |
4957 | .omap4 = { | 4961 | .omap4 = { |
@@ -4967,6 +4971,7 @@ static struct omap_hwmod omap44xx_wd_timer2_hwmod = { | |||
4967 | static struct omap_hwmod omap44xx_wd_timer3_hwmod; | 4971 | static struct omap_hwmod omap44xx_wd_timer3_hwmod; |
4968 | static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = { | 4972 | static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = { |
4969 | { .irq = 36 + OMAP44XX_IRQ_GIC_START }, | 4973 | { .irq = 36 + OMAP44XX_IRQ_GIC_START }, |
4974 | { .irq = -1 } | ||
4970 | }; | 4975 | }; |
4971 | 4976 | ||
4972 | static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = { | 4977 | static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = { |
@@ -4975,6 +4980,7 @@ static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = { | |||
4975 | .pa_end = 0x4013007f, | 4980 | .pa_end = 0x4013007f, |
4976 | .flags = ADDR_TYPE_RT | 4981 | .flags = ADDR_TYPE_RT |
4977 | }, | 4982 | }, |
4983 | { } | ||
4978 | }; | 4984 | }; |
4979 | 4985 | ||
4980 | /* l4_abe -> wd_timer3 */ | 4986 | /* l4_abe -> wd_timer3 */ |
@@ -4983,7 +4989,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = { | |||
4983 | .slave = &omap44xx_wd_timer3_hwmod, | 4989 | .slave = &omap44xx_wd_timer3_hwmod, |
4984 | .clk = "ocp_abe_iclk", | 4990 | .clk = "ocp_abe_iclk", |
4985 | .addr = omap44xx_wd_timer3_addrs, | 4991 | .addr = omap44xx_wd_timer3_addrs, |
4986 | .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_addrs), | ||
4987 | .user = OCP_USER_MPU, | 4992 | .user = OCP_USER_MPU, |
4988 | }; | 4993 | }; |
4989 | 4994 | ||
@@ -4993,6 +4998,7 @@ static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = { | |||
4993 | .pa_end = 0x4903007f, | 4998 | .pa_end = 0x4903007f, |
4994 | .flags = ADDR_TYPE_RT | 4999 | .flags = ADDR_TYPE_RT |
4995 | }, | 5000 | }, |
5001 | { } | ||
4996 | }; | 5002 | }; |
4997 | 5003 | ||
4998 | /* l4_abe -> wd_timer3 (dma) */ | 5004 | /* l4_abe -> wd_timer3 (dma) */ |
@@ -5001,7 +5007,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = { | |||
5001 | .slave = &omap44xx_wd_timer3_hwmod, | 5007 | .slave = &omap44xx_wd_timer3_hwmod, |
5002 | .clk = "ocp_abe_iclk", | 5008 | .clk = "ocp_abe_iclk", |
5003 | .addr = omap44xx_wd_timer3_dma_addrs, | 5009 | .addr = omap44xx_wd_timer3_dma_addrs, |
5004 | .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_dma_addrs), | ||
5005 | .user = OCP_USER_SDMA, | 5010 | .user = OCP_USER_SDMA, |
5006 | }; | 5011 | }; |
5007 | 5012 | ||
@@ -5015,7 +5020,6 @@ static struct omap_hwmod omap44xx_wd_timer3_hwmod = { | |||
5015 | .name = "wd_timer3", | 5020 | .name = "wd_timer3", |
5016 | .class = &omap44xx_wd_timer_hwmod_class, | 5021 | .class = &omap44xx_wd_timer_hwmod_class, |
5017 | .mpu_irqs = omap44xx_wd_timer3_irqs, | 5022 | .mpu_irqs = omap44xx_wd_timer3_irqs, |
5018 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer3_irqs), | ||
5019 | .main_clk = "wd_timer3_fck", | 5023 | .main_clk = "wd_timer3_fck", |
5020 | .prcm = { | 5024 | .prcm = { |
5021 | .omap4 = { | 5025 | .omap4 = { |
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.c b/arch/arm/mach-omap2/omap_hwmod_common_data.c index 08a134243ecb..de832ebc93a9 100644 --- a/arch/arm/mach-omap2/omap_hwmod_common_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_common_data.c | |||
@@ -49,23 +49,3 @@ struct omap_hwmod_sysc_fields omap_hwmod_sysc_type2 = { | |||
49 | .srst_shift = SYSC_TYPE2_SOFTRESET_SHIFT, | 49 | .srst_shift = SYSC_TYPE2_SOFTRESET_SHIFT, |
50 | }; | 50 | }; |
51 | 51 | ||
52 | |||
53 | /* | ||
54 | * omap_hwmod class data | ||
55 | */ | ||
56 | |||
57 | struct omap_hwmod_class l3_hwmod_class = { | ||
58 | .name = "l3" | ||
59 | }; | ||
60 | |||
61 | struct omap_hwmod_class l4_hwmod_class = { | ||
62 | .name = "l4" | ||
63 | }; | ||
64 | |||
65 | struct omap_hwmod_class mpu_hwmod_class = { | ||
66 | .name = "mpu" | ||
67 | }; | ||
68 | |||
69 | struct omap_hwmod_class iva_hwmod_class = { | ||
70 | .name = "iva" | ||
71 | }; | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h index c34e98bf1242..39a7c37f4587 100644 --- a/arch/arm/mach-omap2/omap_hwmod_common_data.h +++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h | |||
@@ -1,10 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * omap_hwmod_common_data.h - OMAP hwmod common macros and declarations | 2 | * omap_hwmod_common_data.h - OMAP hwmod common macros and declarations |
3 | * | 3 | * |
4 | * Copyright (C) 2010 Nokia Corporation | 4 | * Copyright (C) 2010-2011 Nokia Corporation |
5 | * Paul Walmsley | 5 | * Paul Walmsley |
6 | * | 6 | * |
7 | * Copyright (C) 2010 Texas Instruments, Inc. | 7 | * Copyright (C) 2010-2011 Texas Instruments, Inc. |
8 | * Benoît Cousson | 8 | * Benoît Cousson |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
@@ -16,10 +16,99 @@ | |||
16 | 16 | ||
17 | #include <plat/omap_hwmod.h> | 17 | #include <plat/omap_hwmod.h> |
18 | 18 | ||
19 | /* Common address space across OMAP2xxx */ | ||
20 | extern struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[]; | ||
21 | extern struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[]; | ||
22 | extern struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[]; | ||
23 | extern struct omap_hwmod_addr_space omap2xxx_timer2_addrs[]; | ||
24 | extern struct omap_hwmod_addr_space omap2xxx_timer3_addrs[]; | ||
25 | extern struct omap_hwmod_addr_space omap2xxx_timer4_addrs[]; | ||
26 | extern struct omap_hwmod_addr_space omap2xxx_timer5_addrs[]; | ||
27 | extern struct omap_hwmod_addr_space omap2xxx_timer6_addrs[]; | ||
28 | extern struct omap_hwmod_addr_space omap2xxx_timer7_addrs[]; | ||
29 | extern struct omap_hwmod_addr_space omap2xxx_timer8_addrs[]; | ||
30 | extern struct omap_hwmod_addr_space omap2xxx_timer9_addrs[]; | ||
31 | extern struct omap_hwmod_addr_space omap2xxx_timer12_addrs[]; | ||
32 | extern struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[]; | ||
33 | |||
34 | /* Common address space across OMAP2xxx/3xxx */ | ||
35 | extern struct omap_hwmod_addr_space omap2_i2c1_addr_space[]; | ||
36 | extern struct omap_hwmod_addr_space omap2_i2c2_addr_space[]; | ||
37 | extern struct omap_hwmod_addr_space omap2_dss_addrs[]; | ||
38 | extern struct omap_hwmod_addr_space omap2_dss_dispc_addrs[]; | ||
39 | extern struct omap_hwmod_addr_space omap2_dss_rfbi_addrs[]; | ||
40 | extern struct omap_hwmod_addr_space omap2_dss_venc_addrs[]; | ||
41 | extern struct omap_hwmod_addr_space omap2_timer10_addrs[]; | ||
42 | extern struct omap_hwmod_addr_space omap2_timer11_addrs[]; | ||
43 | extern struct omap_hwmod_addr_space omap2430_mmc1_addr_space[]; | ||
44 | extern struct omap_hwmod_addr_space omap2430_mmc2_addr_space[]; | ||
45 | extern struct omap_hwmod_addr_space omap2_mcspi1_addr_space[]; | ||
46 | extern struct omap_hwmod_addr_space omap2_mcspi2_addr_space[]; | ||
47 | extern struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[]; | ||
48 | extern struct omap_hwmod_addr_space omap2_dma_system_addrs[]; | ||
49 | extern struct omap_hwmod_addr_space omap2_mailbox_addrs[]; | ||
50 | extern struct omap_hwmod_addr_space omap2_mcbsp1_addrs[]; | ||
51 | |||
52 | /* Common IP block data across OMAP2xxx */ | ||
53 | extern struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[]; | ||
54 | extern struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[]; | ||
55 | |||
56 | /* Common IP block data */ | ||
57 | extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[]; | ||
58 | extern struct omap_hwmod_dma_info omap2_uart2_sdma_reqs[]; | ||
59 | extern struct omap_hwmod_dma_info omap2_uart3_sdma_reqs[]; | ||
60 | extern struct omap_hwmod_dma_info omap2_i2c1_sdma_reqs[]; | ||
61 | extern struct omap_hwmod_dma_info omap2_i2c2_sdma_reqs[]; | ||
62 | extern struct omap_hwmod_dma_info omap2_mcspi1_sdma_reqs[]; | ||
63 | extern struct omap_hwmod_dma_info omap2_mcspi2_sdma_reqs[]; | ||
64 | extern struct omap_hwmod_dma_info omap2_mcbsp1_sdma_reqs[]; | ||
65 | extern struct omap_hwmod_dma_info omap2_mcbsp2_sdma_reqs[]; | ||
66 | |||
67 | /* Common IP block data on OMAP2430/OMAP3 */ | ||
68 | extern struct omap_hwmod_dma_info omap2_mcbsp3_sdma_reqs[]; | ||
69 | |||
70 | /* Common IP block data across OMAP2/3 */ | ||
71 | extern struct omap_hwmod_irq_info omap2_timer1_mpu_irqs[]; | ||
72 | extern struct omap_hwmod_irq_info omap2_timer2_mpu_irqs[]; | ||
73 | extern struct omap_hwmod_irq_info omap2_timer3_mpu_irqs[]; | ||
74 | extern struct omap_hwmod_irq_info omap2_timer4_mpu_irqs[]; | ||
75 | extern struct omap_hwmod_irq_info omap2_timer5_mpu_irqs[]; | ||
76 | extern struct omap_hwmod_irq_info omap2_timer6_mpu_irqs[]; | ||
77 | extern struct omap_hwmod_irq_info omap2_timer7_mpu_irqs[]; | ||
78 | extern struct omap_hwmod_irq_info omap2_timer8_mpu_irqs[]; | ||
79 | extern struct omap_hwmod_irq_info omap2_timer9_mpu_irqs[]; | ||
80 | extern struct omap_hwmod_irq_info omap2_timer10_mpu_irqs[]; | ||
81 | extern struct omap_hwmod_irq_info omap2_timer11_mpu_irqs[]; | ||
82 | extern struct omap_hwmod_irq_info omap2_uart1_mpu_irqs[]; | ||
83 | extern struct omap_hwmod_irq_info omap2_uart2_mpu_irqs[]; | ||
84 | extern struct omap_hwmod_irq_info omap2_uart3_mpu_irqs[]; | ||
85 | extern struct omap_hwmod_irq_info omap2_dispc_irqs[]; | ||
86 | extern struct omap_hwmod_irq_info omap2_i2c1_mpu_irqs[]; | ||
87 | extern struct omap_hwmod_irq_info omap2_i2c2_mpu_irqs[]; | ||
88 | extern struct omap_hwmod_irq_info omap2_gpio1_irqs[]; | ||
89 | extern struct omap_hwmod_irq_info omap2_gpio2_irqs[]; | ||
90 | extern struct omap_hwmod_irq_info omap2_gpio3_irqs[]; | ||
91 | extern struct omap_hwmod_irq_info omap2_gpio4_irqs[]; | ||
92 | extern struct omap_hwmod_irq_info omap2_dma_system_irqs[]; | ||
93 | extern struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[]; | ||
94 | extern struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[]; | ||
95 | |||
19 | /* OMAP hwmod classes - forward declarations */ | 96 | /* OMAP hwmod classes - forward declarations */ |
20 | extern struct omap_hwmod_class l3_hwmod_class; | 97 | extern struct omap_hwmod_class l3_hwmod_class; |
21 | extern struct omap_hwmod_class l4_hwmod_class; | 98 | extern struct omap_hwmod_class l4_hwmod_class; |
22 | extern struct omap_hwmod_class mpu_hwmod_class; | 99 | extern struct omap_hwmod_class mpu_hwmod_class; |
23 | extern struct omap_hwmod_class iva_hwmod_class; | 100 | extern struct omap_hwmod_class iva_hwmod_class; |
101 | extern struct omap_hwmod_class omap2_uart_class; | ||
102 | extern struct omap_hwmod_class omap2_dss_hwmod_class; | ||
103 | extern struct omap_hwmod_class omap2_dispc_hwmod_class; | ||
104 | extern struct omap_hwmod_class omap2_rfbi_hwmod_class; | ||
105 | extern struct omap_hwmod_class omap2_venc_hwmod_class; | ||
106 | |||
107 | extern struct omap_hwmod_class omap2xxx_timer_hwmod_class; | ||
108 | extern struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class; | ||
109 | extern struct omap_hwmod_class omap2xxx_gpio_hwmod_class; | ||
110 | extern struct omap_hwmod_class omap2xxx_dma_hwmod_class; | ||
111 | extern struct omap_hwmod_class omap2xxx_mailbox_hwmod_class; | ||
112 | extern struct omap_hwmod_class omap2xxx_mcspi_class; | ||
24 | 113 | ||
25 | #endif | 114 | #endif |
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index e01da45c0537..4411163e012d 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c | |||
@@ -38,155 +38,12 @@ | |||
38 | #include "prm2xxx_3xxx.h" | 38 | #include "prm2xxx_3xxx.h" |
39 | #include "pm.h" | 39 | #include "pm.h" |
40 | 40 | ||
41 | int omap2_pm_debug; | ||
42 | u32 enable_off_mode; | 41 | u32 enable_off_mode; |
43 | u32 sleep_while_idle; | ||
44 | u32 wakeup_timer_seconds; | ||
45 | u32 wakeup_timer_milliseconds; | ||
46 | |||
47 | #define DUMP_PRM_MOD_REG(mod, reg) \ | ||
48 | regs[reg_count].name = #mod "." #reg; \ | ||
49 | regs[reg_count++].val = omap2_prm_read_mod_reg(mod, reg) | ||
50 | #define DUMP_CM_MOD_REG(mod, reg) \ | ||
51 | regs[reg_count].name = #mod "." #reg; \ | ||
52 | regs[reg_count++].val = omap2_cm_read_mod_reg(mod, reg) | ||
53 | #define DUMP_PRM_REG(reg) \ | ||
54 | regs[reg_count].name = #reg; \ | ||
55 | regs[reg_count++].val = __raw_readl(reg) | ||
56 | #define DUMP_CM_REG(reg) \ | ||
57 | regs[reg_count].name = #reg; \ | ||
58 | regs[reg_count++].val = __raw_readl(reg) | ||
59 | #define DUMP_INTC_REG(reg, off) \ | ||
60 | regs[reg_count].name = #reg; \ | ||
61 | regs[reg_count++].val = \ | ||
62 | __raw_readl(OMAP2_L4_IO_ADDRESS(0x480fe000 + (off))) | ||
63 | |||
64 | void omap2_pm_dump(int mode, int resume, unsigned int us) | ||
65 | { | ||
66 | struct reg { | ||
67 | const char *name; | ||
68 | u32 val; | ||
69 | } regs[32]; | ||
70 | int reg_count = 0, i; | ||
71 | const char *s1 = NULL, *s2 = NULL; | ||
72 | |||
73 | if (!resume) { | ||
74 | #if 0 | ||
75 | /* MPU */ | ||
76 | DUMP_PRM_MOD_REG(OCP_MOD, OMAP2_PRM_IRQENABLE_MPU_OFFSET); | ||
77 | DUMP_CM_MOD_REG(MPU_MOD, OMAP2_CM_CLKSTCTRL); | ||
78 | DUMP_PRM_MOD_REG(MPU_MOD, OMAP2_PM_PWSTCTRL); | ||
79 | DUMP_PRM_MOD_REG(MPU_MOD, OMAP2_PM_PWSTST); | ||
80 | DUMP_PRM_MOD_REG(MPU_MOD, PM_WKDEP); | ||
81 | #endif | ||
82 | #if 0 | ||
83 | /* INTC */ | ||
84 | DUMP_INTC_REG(INTC_MIR0, 0x0084); | ||
85 | DUMP_INTC_REG(INTC_MIR1, 0x00a4); | ||
86 | DUMP_INTC_REG(INTC_MIR2, 0x00c4); | ||
87 | #endif | ||
88 | #if 0 | ||
89 | DUMP_CM_MOD_REG(CORE_MOD, CM_FCLKEN1); | ||
90 | if (cpu_is_omap24xx()) { | ||
91 | DUMP_CM_MOD_REG(CORE_MOD, OMAP24XX_CM_FCLKEN2); | ||
92 | DUMP_PRM_MOD_REG(OMAP24XX_GR_MOD, | ||
93 | OMAP2_PRCM_CLKEMUL_CTRL_OFFSET); | ||
94 | DUMP_PRM_MOD_REG(OMAP24XX_GR_MOD, | ||
95 | OMAP2_PRCM_CLKSRC_CTRL_OFFSET); | ||
96 | } | ||
97 | DUMP_CM_MOD_REG(WKUP_MOD, CM_FCLKEN); | ||
98 | DUMP_CM_MOD_REG(CORE_MOD, CM_ICLKEN1); | ||
99 | DUMP_CM_MOD_REG(CORE_MOD, CM_ICLKEN2); | ||
100 | DUMP_CM_MOD_REG(WKUP_MOD, CM_ICLKEN); | ||
101 | DUMP_CM_MOD_REG(PLL_MOD, CM_CLKEN); | ||
102 | DUMP_CM_MOD_REG(PLL_MOD, CM_AUTOIDLE); | ||
103 | DUMP_PRM_MOD_REG(CORE_MOD, OMAP2_PM_PWSTST); | ||
104 | #endif | ||
105 | #if 0 | ||
106 | /* DSP */ | ||
107 | if (cpu_is_omap24xx()) { | ||
108 | DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, CM_FCLKEN); | ||
109 | DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, CM_ICLKEN); | ||
110 | DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, CM_IDLEST); | ||
111 | DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, CM_AUTOIDLE); | ||
112 | DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, CM_CLKSEL); | ||
113 | DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, OMAP2_CM_CLKSTCTRL); | ||
114 | DUMP_PRM_MOD_REG(OMAP24XX_DSP_MOD, OMAP2_RM_RSTCTRL); | ||
115 | DUMP_PRM_MOD_REG(OMAP24XX_DSP_MOD, OMAP2_RM_RSTST); | ||
116 | DUMP_PRM_MOD_REG(OMAP24XX_DSP_MOD, OMAP2_PM_PWSTCTRL); | ||
117 | DUMP_PRM_MOD_REG(OMAP24XX_DSP_MOD, OMAP2_PM_PWSTST); | ||
118 | } | ||
119 | #endif | ||
120 | } else { | ||
121 | DUMP_PRM_MOD_REG(CORE_MOD, PM_WKST1); | ||
122 | if (cpu_is_omap24xx()) | ||
123 | DUMP_PRM_MOD_REG(CORE_MOD, OMAP24XX_PM_WKST2); | ||
124 | DUMP_PRM_MOD_REG(WKUP_MOD, PM_WKST); | ||
125 | DUMP_PRM_MOD_REG(OCP_MOD, OMAP2_PRCM_IRQSTATUS_MPU_OFFSET); | ||
126 | #if 1 | ||
127 | DUMP_INTC_REG(INTC_PENDING_IRQ0, 0x0098); | ||
128 | DUMP_INTC_REG(INTC_PENDING_IRQ1, 0x00b8); | ||
129 | DUMP_INTC_REG(INTC_PENDING_IRQ2, 0x00d8); | ||
130 | #endif | ||
131 | } | ||
132 | |||
133 | switch (mode) { | ||
134 | case 0: | ||
135 | s1 = "full"; | ||
136 | s2 = "retention"; | ||
137 | break; | ||
138 | case 1: | ||
139 | s1 = "MPU"; | ||
140 | s2 = "retention"; | ||
141 | break; | ||
142 | case 2: | ||
143 | s1 = "MPU"; | ||
144 | s2 = "idle"; | ||
145 | break; | ||
146 | } | ||
147 | |||
148 | if (!resume) | ||
149 | #ifdef CONFIG_NO_HZ | ||
150 | printk(KERN_INFO | ||
151 | "--- Going to %s %s (next timer after %u ms)\n", s1, s2, | ||
152 | jiffies_to_msecs(get_next_timer_interrupt(jiffies) - | ||
153 | jiffies)); | ||
154 | #else | ||
155 | printk(KERN_INFO "--- Going to %s %s\n", s1, s2); | ||
156 | #endif | ||
157 | else | ||
158 | printk(KERN_INFO "--- Woke up (slept for %u.%03u ms)\n", | ||
159 | us / 1000, us % 1000); | ||
160 | |||
161 | for (i = 0; i < reg_count; i++) | ||
162 | printk(KERN_INFO "%-20s: 0x%08x\n", regs[i].name, regs[i].val); | ||
163 | } | ||
164 | |||
165 | void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds) | ||
166 | { | ||
167 | u32 tick_rate, cycles; | ||
168 | |||
169 | if (!seconds && !milliseconds) | ||
170 | return; | ||
171 | |||
172 | tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gptimer_wakeup)); | ||
173 | cycles = tick_rate * seconds + tick_rate * milliseconds / 1000; | ||
174 | omap_dm_timer_stop(gptimer_wakeup); | ||
175 | omap_dm_timer_set_load_start(gptimer_wakeup, 0, 0xffffffff - cycles); | ||
176 | |||
177 | pr_info("PM: Resume timer in %u.%03u secs" | ||
178 | " (%d ticks at %d ticks/sec.)\n", | ||
179 | seconds, milliseconds, cycles, tick_rate); | ||
180 | } | ||
181 | 42 | ||
182 | #ifdef CONFIG_DEBUG_FS | 43 | #ifdef CONFIG_DEBUG_FS |
183 | #include <linux/debugfs.h> | 44 | #include <linux/debugfs.h> |
184 | #include <linux/seq_file.h> | 45 | #include <linux/seq_file.h> |
185 | 46 | ||
186 | static void pm_dbg_regset_store(u32 *ptr); | ||
187 | |||
188 | static struct dentry *pm_dbg_dir; | ||
189 | |||
190 | static int pm_dbg_init_done; | 47 | static int pm_dbg_init_done; |
191 | 48 | ||
192 | static int pm_dbg_init(void); | 49 | static int pm_dbg_init(void); |
@@ -196,160 +53,6 @@ enum { | |||
196 | DEBUG_FILE_TIMERS, | 53 | DEBUG_FILE_TIMERS, |
197 | }; | 54 | }; |
198 | 55 | ||
199 | struct pm_module_def { | ||
200 | char name[8]; /* Name of the module */ | ||
201 | short type; /* CM or PRM */ | ||
202 | unsigned short offset; | ||
203 | int low; /* First register address on this module */ | ||
204 | int high; /* Last register address on this module */ | ||
205 | }; | ||
206 | |||
207 | #define MOD_CM 0 | ||
208 | #define MOD_PRM 1 | ||
209 | |||
210 | static const struct pm_module_def *pm_dbg_reg_modules; | ||
211 | static const struct pm_module_def omap3_pm_reg_modules[] = { | ||
212 | { "IVA2", MOD_CM, OMAP3430_IVA2_MOD, 0, 0x4c }, | ||
213 | { "OCP", MOD_CM, OCP_MOD, 0, 0x10 }, | ||
214 | { "MPU", MOD_CM, MPU_MOD, 4, 0x4c }, | ||
215 | { "CORE", MOD_CM, CORE_MOD, 0, 0x4c }, | ||
216 | { "SGX", MOD_CM, OMAP3430ES2_SGX_MOD, 0, 0x4c }, | ||
217 | { "WKUP", MOD_CM, WKUP_MOD, 0, 0x40 }, | ||
218 | { "CCR", MOD_CM, PLL_MOD, 0, 0x70 }, | ||
219 | { "DSS", MOD_CM, OMAP3430_DSS_MOD, 0, 0x4c }, | ||
220 | { "CAM", MOD_CM, OMAP3430_CAM_MOD, 0, 0x4c }, | ||
221 | { "PER", MOD_CM, OMAP3430_PER_MOD, 0, 0x4c }, | ||
222 | { "EMU", MOD_CM, OMAP3430_EMU_MOD, 0x40, 0x54 }, | ||
223 | { "NEON", MOD_CM, OMAP3430_NEON_MOD, 0x20, 0x48 }, | ||
224 | { "USB", MOD_CM, OMAP3430ES2_USBHOST_MOD, 0, 0x4c }, | ||
225 | |||
226 | { "IVA2", MOD_PRM, OMAP3430_IVA2_MOD, 0x50, 0xfc }, | ||
227 | { "OCP", MOD_PRM, OCP_MOD, 4, 0x1c }, | ||
228 | { "MPU", MOD_PRM, MPU_MOD, 0x58, 0xe8 }, | ||
229 | { "CORE", MOD_PRM, CORE_MOD, 0x58, 0xf8 }, | ||
230 | { "SGX", MOD_PRM, OMAP3430ES2_SGX_MOD, 0x58, 0xe8 }, | ||
231 | { "WKUP", MOD_PRM, WKUP_MOD, 0xa0, 0xb0 }, | ||
232 | { "CCR", MOD_PRM, PLL_MOD, 0x40, 0x70 }, | ||
233 | { "DSS", MOD_PRM, OMAP3430_DSS_MOD, 0x58, 0xe8 }, | ||
234 | { "CAM", MOD_PRM, OMAP3430_CAM_MOD, 0x58, 0xe8 }, | ||
235 | { "PER", MOD_PRM, OMAP3430_PER_MOD, 0x58, 0xe8 }, | ||
236 | { "EMU", MOD_PRM, OMAP3430_EMU_MOD, 0x58, 0xe4 }, | ||
237 | { "GLBL", MOD_PRM, OMAP3430_GR_MOD, 0x20, 0xe4 }, | ||
238 | { "NEON", MOD_PRM, OMAP3430_NEON_MOD, 0x58, 0xe8 }, | ||
239 | { "USB", MOD_PRM, OMAP3430ES2_USBHOST_MOD, 0x58, 0xe8 }, | ||
240 | { "", 0, 0, 0, 0 }, | ||
241 | }; | ||
242 | |||
243 | #define PM_DBG_MAX_REG_SETS 4 | ||
244 | |||
245 | static void *pm_dbg_reg_set[PM_DBG_MAX_REG_SETS]; | ||
246 | |||
247 | static int pm_dbg_get_regset_size(void) | ||
248 | { | ||
249 | static int regset_size; | ||
250 | |||
251 | if (regset_size == 0) { | ||
252 | int i = 0; | ||
253 | |||
254 | while (pm_dbg_reg_modules[i].name[0] != 0) { | ||
255 | regset_size += pm_dbg_reg_modules[i].high + | ||
256 | 4 - pm_dbg_reg_modules[i].low; | ||
257 | i++; | ||
258 | } | ||
259 | } | ||
260 | return regset_size; | ||
261 | } | ||
262 | |||
263 | static int pm_dbg_show_regs(struct seq_file *s, void *unused) | ||
264 | { | ||
265 | int i, j; | ||
266 | unsigned long val; | ||
267 | int reg_set = (int)s->private; | ||
268 | u32 *ptr; | ||
269 | void *store = NULL; | ||
270 | int regs; | ||
271 | int linefeed; | ||
272 | |||
273 | if (reg_set == 0) { | ||
274 | store = kmalloc(pm_dbg_get_regset_size(), GFP_KERNEL); | ||
275 | ptr = store; | ||
276 | pm_dbg_regset_store(ptr); | ||
277 | } else { | ||
278 | ptr = pm_dbg_reg_set[reg_set - 1]; | ||
279 | } | ||
280 | |||
281 | i = 0; | ||
282 | |||
283 | while (pm_dbg_reg_modules[i].name[0] != 0) { | ||
284 | regs = 0; | ||
285 | linefeed = 0; | ||
286 | if (pm_dbg_reg_modules[i].type == MOD_CM) | ||
287 | seq_printf(s, "MOD: CM_%s (%08x)\n", | ||
288 | pm_dbg_reg_modules[i].name, | ||
289 | (u32)(OMAP3430_CM_BASE + | ||
290 | pm_dbg_reg_modules[i].offset)); | ||
291 | else | ||
292 | seq_printf(s, "MOD: PRM_%s (%08x)\n", | ||
293 | pm_dbg_reg_modules[i].name, | ||
294 | (u32)(OMAP3430_PRM_BASE + | ||
295 | pm_dbg_reg_modules[i].offset)); | ||
296 | |||
297 | for (j = pm_dbg_reg_modules[i].low; | ||
298 | j <= pm_dbg_reg_modules[i].high; j += 4) { | ||
299 | val = *(ptr++); | ||
300 | if (val != 0) { | ||
301 | regs++; | ||
302 | if (linefeed) { | ||
303 | seq_printf(s, "\n"); | ||
304 | linefeed = 0; | ||
305 | } | ||
306 | seq_printf(s, " %02x => %08lx", j, val); | ||
307 | if (regs % 4 == 0) | ||
308 | linefeed = 1; | ||
309 | } | ||
310 | } | ||
311 | seq_printf(s, "\n"); | ||
312 | i++; | ||
313 | } | ||
314 | |||
315 | if (store != NULL) | ||
316 | kfree(store); | ||
317 | |||
318 | return 0; | ||
319 | } | ||
320 | |||
321 | static void pm_dbg_regset_store(u32 *ptr) | ||
322 | { | ||
323 | int i, j; | ||
324 | u32 val; | ||
325 | |||
326 | i = 0; | ||
327 | |||
328 | while (pm_dbg_reg_modules[i].name[0] != 0) { | ||
329 | for (j = pm_dbg_reg_modules[i].low; | ||
330 | j <= pm_dbg_reg_modules[i].high; j += 4) { | ||
331 | if (pm_dbg_reg_modules[i].type == MOD_CM) | ||
332 | val = omap2_cm_read_mod_reg( | ||
333 | pm_dbg_reg_modules[i].offset, j); | ||
334 | else | ||
335 | val = omap2_prm_read_mod_reg( | ||
336 | pm_dbg_reg_modules[i].offset, j); | ||
337 | *(ptr++) = val; | ||
338 | } | ||
339 | i++; | ||
340 | } | ||
341 | } | ||
342 | |||
343 | int pm_dbg_regset_save(int reg_set) | ||
344 | { | ||
345 | if (pm_dbg_reg_set[reg_set-1] == NULL) | ||
346 | return -EINVAL; | ||
347 | |||
348 | pm_dbg_regset_store(pm_dbg_reg_set[reg_set-1]); | ||
349 | |||
350 | return 0; | ||
351 | } | ||
352 | |||
353 | static const char pwrdm_state_names[][PWRDM_MAX_PWRSTS] = { | 56 | static const char pwrdm_state_names[][PWRDM_MAX_PWRSTS] = { |
354 | "OFF", | 57 | "OFF", |
355 | "RET", | 58 | "RET", |
@@ -469,11 +172,6 @@ static int pm_dbg_open(struct inode *inode, struct file *file) | |||
469 | }; | 172 | }; |
470 | } | 173 | } |
471 | 174 | ||
472 | static int pm_dbg_reg_open(struct inode *inode, struct file *file) | ||
473 | { | ||
474 | return single_open(file, pm_dbg_show_regs, inode->i_private); | ||
475 | } | ||
476 | |||
477 | static const struct file_operations debug_fops = { | 175 | static const struct file_operations debug_fops = { |
478 | .open = pm_dbg_open, | 176 | .open = pm_dbg_open, |
479 | .read = seq_read, | 177 | .read = seq_read, |
@@ -481,40 +179,6 @@ static const struct file_operations debug_fops = { | |||
481 | .release = single_release, | 179 | .release = single_release, |
482 | }; | 180 | }; |
483 | 181 | ||
484 | static const struct file_operations debug_reg_fops = { | ||
485 | .open = pm_dbg_reg_open, | ||
486 | .read = seq_read, | ||
487 | .llseek = seq_lseek, | ||
488 | .release = single_release, | ||
489 | }; | ||
490 | |||
491 | int pm_dbg_regset_init(int reg_set) | ||
492 | { | ||
493 | char name[2]; | ||
494 | |||
495 | if (!pm_dbg_init_done) | ||
496 | pm_dbg_init(); | ||
497 | |||
498 | if (reg_set < 1 || reg_set > PM_DBG_MAX_REG_SETS || | ||
499 | pm_dbg_reg_set[reg_set-1] != NULL) | ||
500 | return -EINVAL; | ||
501 | |||
502 | pm_dbg_reg_set[reg_set-1] = | ||
503 | kmalloc(pm_dbg_get_regset_size(), GFP_KERNEL); | ||
504 | |||
505 | if (pm_dbg_reg_set[reg_set-1] == NULL) | ||
506 | return -ENOMEM; | ||
507 | |||
508 | if (pm_dbg_dir != NULL) { | ||
509 | sprintf(name, "%d", reg_set); | ||
510 | |||
511 | (void) debugfs_create_file(name, S_IRUGO, | ||
512 | pm_dbg_dir, (void *)reg_set, &debug_reg_fops); | ||
513 | } | ||
514 | |||
515 | return 0; | ||
516 | } | ||
517 | |||
518 | static int pwrdm_suspend_get(void *data, u64 *val) | 182 | static int pwrdm_suspend_get(void *data, u64 *val) |
519 | { | 183 | { |
520 | int ret = -EINVAL; | 184 | int ret = -EINVAL; |
@@ -576,9 +240,6 @@ static int option_set(void *data, u64 val) | |||
576 | { | 240 | { |
577 | u32 *option = data; | 241 | u32 *option = data; |
578 | 242 | ||
579 | if (option == &wakeup_timer_milliseconds && val >= 1000) | ||
580 | return -EINVAL; | ||
581 | |||
582 | *option = val; | 243 | *option = val; |
583 | 244 | ||
584 | if (option == &enable_off_mode) { | 245 | if (option == &enable_off_mode) { |
@@ -595,22 +256,13 @@ static int option_set(void *data, u64 val) | |||
595 | 256 | ||
596 | DEFINE_SIMPLE_ATTRIBUTE(pm_dbg_option_fops, option_get, option_set, "%llu\n"); | 257 | DEFINE_SIMPLE_ATTRIBUTE(pm_dbg_option_fops, option_get, option_set, "%llu\n"); |
597 | 258 | ||
598 | static int pm_dbg_init(void) | 259 | static int __init pm_dbg_init(void) |
599 | { | 260 | { |
600 | int i; | ||
601 | struct dentry *d; | 261 | struct dentry *d; |
602 | char name[2]; | ||
603 | 262 | ||
604 | if (pm_dbg_init_done) | 263 | if (pm_dbg_init_done) |
605 | return 0; | 264 | return 0; |
606 | 265 | ||
607 | if (cpu_is_omap34xx()) | ||
608 | pm_dbg_reg_modules = omap3_pm_reg_modules; | ||
609 | else { | ||
610 | printk(KERN_ERR "%s: only OMAP3 supported\n", __func__); | ||
611 | return -ENODEV; | ||
612 | } | ||
613 | |||
614 | d = debugfs_create_dir("pm_debug", NULL); | 266 | d = debugfs_create_dir("pm_debug", NULL); |
615 | if (IS_ERR(d)) | 267 | if (IS_ERR(d)) |
616 | return PTR_ERR(d); | 268 | return PTR_ERR(d); |
@@ -622,30 +274,8 @@ static int pm_dbg_init(void) | |||
622 | 274 | ||
623 | pwrdm_for_each(pwrdms_setup, (void *)d); | 275 | pwrdm_for_each(pwrdms_setup, (void *)d); |
624 | 276 | ||
625 | pm_dbg_dir = debugfs_create_dir("registers", d); | ||
626 | if (IS_ERR(pm_dbg_dir)) | ||
627 | return PTR_ERR(pm_dbg_dir); | ||
628 | |||
629 | (void) debugfs_create_file("current", S_IRUGO, | ||
630 | pm_dbg_dir, (void *)0, &debug_reg_fops); | ||
631 | |||
632 | for (i = 0; i < PM_DBG_MAX_REG_SETS; i++) | ||
633 | if (pm_dbg_reg_set[i] != NULL) { | ||
634 | sprintf(name, "%d", i+1); | ||
635 | (void) debugfs_create_file(name, S_IRUGO, | ||
636 | pm_dbg_dir, (void *)(i+1), &debug_reg_fops); | ||
637 | |||
638 | } | ||
639 | |||
640 | (void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d, | 277 | (void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d, |
641 | &enable_off_mode, &pm_dbg_option_fops); | 278 | &enable_off_mode, &pm_dbg_option_fops); |
642 | (void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUSR, d, | ||
643 | &sleep_while_idle, &pm_dbg_option_fops); | ||
644 | (void) debugfs_create_file("wakeup_timer_seconds", S_IRUGO | S_IWUSR, d, | ||
645 | &wakeup_timer_seconds, &pm_dbg_option_fops); | ||
646 | (void) debugfs_create_file("wakeup_timer_milliseconds", | ||
647 | S_IRUGO | S_IWUSR, d, &wakeup_timer_milliseconds, | ||
648 | &pm_dbg_option_fops); | ||
649 | pm_dbg_init_done = 1; | 279 | pm_dbg_init_done = 1; |
650 | 280 | ||
651 | return 0; | 281 | return 0; |
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 04ee56646126..4e166add2f35 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h | |||
@@ -60,32 +60,16 @@ inline void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params) | |||
60 | extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm); | 60 | extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm); |
61 | extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state); | 61 | extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state); |
62 | 62 | ||
63 | extern u32 wakeup_timer_seconds; | ||
64 | extern u32 wakeup_timer_milliseconds; | ||
65 | extern struct omap_dm_timer *gptimer_wakeup; | ||
66 | |||
67 | #ifdef CONFIG_PM_DEBUG | 63 | #ifdef CONFIG_PM_DEBUG |
68 | extern void omap2_pm_dump(int mode, int resume, unsigned int us); | ||
69 | extern void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds); | ||
70 | extern int omap2_pm_debug; | ||
71 | extern u32 enable_off_mode; | 64 | extern u32 enable_off_mode; |
72 | extern u32 sleep_while_idle; | ||
73 | #else | 65 | #else |
74 | #define omap2_pm_dump(mode, resume, us) do {} while (0); | ||
75 | #define omap2_pm_wakeup_on_timer(seconds, milliseconds) do {} while (0); | ||
76 | #define omap2_pm_debug 0 | ||
77 | #define enable_off_mode 0 | 66 | #define enable_off_mode 0 |
78 | #define sleep_while_idle 0 | ||
79 | #endif | 67 | #endif |
80 | 68 | ||
81 | #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) | 69 | #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) |
82 | extern void pm_dbg_update_time(struct powerdomain *pwrdm, int prev); | 70 | extern void pm_dbg_update_time(struct powerdomain *pwrdm, int prev); |
83 | extern int pm_dbg_regset_save(int reg_set); | ||
84 | extern int pm_dbg_regset_init(int reg_set); | ||
85 | #else | 71 | #else |
86 | #define pm_dbg_update_time(pwrdm, prev) do {} while (0); | 72 | #define pm_dbg_update_time(pwrdm, prev) do {} while (0); |
87 | #define pm_dbg_regset_save(reg_set) do {} while (0); | ||
88 | #define pm_dbg_regset_init(reg_set) do {} while (0); | ||
89 | #endif /* CONFIG_PM_DEBUG */ | 73 | #endif /* CONFIG_PM_DEBUG */ |
90 | 74 | ||
91 | /* 24xx */ | 75 | /* 24xx */ |
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index df3ded6fe194..bf089e743ed9 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c | |||
@@ -53,6 +53,8 @@ | |||
53 | #include "powerdomain.h" | 53 | #include "powerdomain.h" |
54 | #include "clockdomain.h" | 54 | #include "clockdomain.h" |
55 | 55 | ||
56 | static int omap2_pm_debug; | ||
57 | |||
56 | #ifdef CONFIG_SUSPEND | 58 | #ifdef CONFIG_SUSPEND |
57 | static suspend_state_t suspend_state = PM_SUSPEND_ON; | 59 | static suspend_state_t suspend_state = PM_SUSPEND_ON; |
58 | static inline bool is_suspending(void) | 60 | static inline bool is_suspending(void) |
@@ -123,7 +125,6 @@ static void omap2_enter_full_retention(void) | |||
123 | omap2_gpio_prepare_for_idle(0); | 125 | omap2_gpio_prepare_for_idle(0); |
124 | 126 | ||
125 | if (omap2_pm_debug) { | 127 | if (omap2_pm_debug) { |
126 | omap2_pm_dump(0, 0, 0); | ||
127 | getnstimeofday(&ts_preidle); | 128 | getnstimeofday(&ts_preidle); |
128 | } | 129 | } |
129 | 130 | ||
@@ -160,7 +161,6 @@ no_sleep: | |||
160 | getnstimeofday(&ts_postidle); | 161 | getnstimeofday(&ts_postidle); |
161 | ts_idle = timespec_sub(ts_postidle, ts_preidle); | 162 | ts_idle = timespec_sub(ts_postidle, ts_preidle); |
162 | tmp = timespec_to_ns(&ts_idle) * NSEC_PER_USEC; | 163 | tmp = timespec_to_ns(&ts_idle) * NSEC_PER_USEC; |
163 | omap2_pm_dump(0, 1, tmp); | ||
164 | } | 164 | } |
165 | omap2_gpio_resume_after_idle(); | 165 | omap2_gpio_resume_after_idle(); |
166 | 166 | ||
@@ -247,7 +247,6 @@ static void omap2_enter_mpu_retention(void) | |||
247 | } | 247 | } |
248 | 248 | ||
249 | if (omap2_pm_debug) { | 249 | if (omap2_pm_debug) { |
250 | omap2_pm_dump(only_idle ? 2 : 1, 0, 0); | ||
251 | getnstimeofday(&ts_preidle); | 250 | getnstimeofday(&ts_preidle); |
252 | } | 251 | } |
253 | 252 | ||
@@ -259,7 +258,6 @@ static void omap2_enter_mpu_retention(void) | |||
259 | getnstimeofday(&ts_postidle); | 258 | getnstimeofday(&ts_postidle); |
260 | ts_idle = timespec_sub(ts_postidle, ts_preidle); | 259 | ts_idle = timespec_sub(ts_postidle, ts_preidle); |
261 | tmp = timespec_to_ns(&ts_idle) * NSEC_PER_USEC; | 260 | tmp = timespec_to_ns(&ts_idle) * NSEC_PER_USEC; |
262 | omap2_pm_dump(only_idle ? 2 : 1, 1, tmp); | ||
263 | } | 261 | } |
264 | } | 262 | } |
265 | 263 | ||
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index b77d82665abb..7255d9bce868 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -485,8 +485,6 @@ console_still_active: | |||
485 | 485 | ||
486 | int omap3_can_sleep(void) | 486 | int omap3_can_sleep(void) |
487 | { | 487 | { |
488 | if (!sleep_while_idle) | ||
489 | return 0; | ||
490 | if (!omap_uart_can_sleep()) | 488 | if (!omap_uart_can_sleep()) |
491 | return 0; | 489 | return 0; |
492 | return 1; | 490 | return 1; |
@@ -522,10 +520,6 @@ static int omap3_pm_suspend(void) | |||
522 | struct power_state *pwrst; | 520 | struct power_state *pwrst; |
523 | int state, ret = 0; | 521 | int state, ret = 0; |
524 | 522 | ||
525 | if (wakeup_timer_seconds || wakeup_timer_milliseconds) | ||
526 | omap2_pm_wakeup_on_timer(wakeup_timer_seconds, | ||
527 | wakeup_timer_milliseconds); | ||
528 | |||
529 | /* Read current next_pwrsts */ | 523 | /* Read current next_pwrsts */ |
530 | list_for_each_entry(pwrst, &pwrst_list, node) | 524 | list_for_each_entry(pwrst, &pwrst_list, node) |
531 | pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm); | 525 | pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm); |
diff --git a/arch/arm/mach-omap2/powerdomains44xx_data.c b/arch/arm/mach-omap2/powerdomains44xx_data.c index c4222c7036a5..3a7e678fd5f1 100644 --- a/arch/arm/mach-omap2/powerdomains44xx_data.c +++ b/arch/arm/mach-omap2/powerdomains44xx_data.c | |||
@@ -53,7 +53,7 @@ static struct powerdomain core_44xx_pwrdm = { | |||
53 | [3] = PWRSTS_ON, /* ducati_l2ram */ | 53 | [3] = PWRSTS_ON, /* ducati_l2ram */ |
54 | [4] = PWRSTS_ON, /* ducati_unicache */ | 54 | [4] = PWRSTS_ON, /* ducati_unicache */ |
55 | }, | 55 | }, |
56 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 56 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
57 | }; | 57 | }; |
58 | 58 | ||
59 | /* gfx_44xx_pwrdm: 3D accelerator power domain */ | 59 | /* gfx_44xx_pwrdm: 3D accelerator power domain */ |
@@ -70,7 +70,7 @@ static struct powerdomain gfx_44xx_pwrdm = { | |||
70 | .pwrsts_mem_on = { | 70 | .pwrsts_mem_on = { |
71 | [0] = PWRSTS_ON, /* gfx_mem */ | 71 | [0] = PWRSTS_ON, /* gfx_mem */ |
72 | }, | 72 | }, |
73 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 73 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
74 | }; | 74 | }; |
75 | 75 | ||
76 | /* abe_44xx_pwrdm: Audio back end power domain */ | 76 | /* abe_44xx_pwrdm: Audio back end power domain */ |
@@ -90,7 +90,7 @@ static struct powerdomain abe_44xx_pwrdm = { | |||
90 | [0] = PWRSTS_ON, /* aessmem */ | 90 | [0] = PWRSTS_ON, /* aessmem */ |
91 | [1] = PWRSTS_ON, /* periphmem */ | 91 | [1] = PWRSTS_ON, /* periphmem */ |
92 | }, | 92 | }, |
93 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 93 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
94 | }; | 94 | }; |
95 | 95 | ||
96 | /* dss_44xx_pwrdm: Display subsystem power domain */ | 96 | /* dss_44xx_pwrdm: Display subsystem power domain */ |
@@ -108,7 +108,7 @@ static struct powerdomain dss_44xx_pwrdm = { | |||
108 | .pwrsts_mem_on = { | 108 | .pwrsts_mem_on = { |
109 | [0] = PWRSTS_ON, /* dss_mem */ | 109 | [0] = PWRSTS_ON, /* dss_mem */ |
110 | }, | 110 | }, |
111 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 111 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
112 | }; | 112 | }; |
113 | 113 | ||
114 | /* tesla_44xx_pwrdm: Tesla processor power domain */ | 114 | /* tesla_44xx_pwrdm: Tesla processor power domain */ |
@@ -130,7 +130,7 @@ static struct powerdomain tesla_44xx_pwrdm = { | |||
130 | [1] = PWRSTS_ON, /* tesla_l1 */ | 130 | [1] = PWRSTS_ON, /* tesla_l1 */ |
131 | [2] = PWRSTS_ON, /* tesla_l2 */ | 131 | [2] = PWRSTS_ON, /* tesla_l2 */ |
132 | }, | 132 | }, |
133 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 133 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
134 | }; | 134 | }; |
135 | 135 | ||
136 | /* wkup_44xx_pwrdm: Wake-up power domain */ | 136 | /* wkup_44xx_pwrdm: Wake-up power domain */ |
@@ -241,7 +241,7 @@ static struct powerdomain ivahd_44xx_pwrdm = { | |||
241 | [2] = PWRSTS_ON, /* tcm1_mem */ | 241 | [2] = PWRSTS_ON, /* tcm1_mem */ |
242 | [3] = PWRSTS_ON, /* tcm2_mem */ | 242 | [3] = PWRSTS_ON, /* tcm2_mem */ |
243 | }, | 243 | }, |
244 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 244 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
245 | }; | 245 | }; |
246 | 246 | ||
247 | /* cam_44xx_pwrdm: Camera subsystem power domain */ | 247 | /* cam_44xx_pwrdm: Camera subsystem power domain */ |
@@ -258,7 +258,7 @@ static struct powerdomain cam_44xx_pwrdm = { | |||
258 | .pwrsts_mem_on = { | 258 | .pwrsts_mem_on = { |
259 | [0] = PWRSTS_ON, /* cam_mem */ | 259 | [0] = PWRSTS_ON, /* cam_mem */ |
260 | }, | 260 | }, |
261 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 261 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
262 | }; | 262 | }; |
263 | 263 | ||
264 | /* l3init_44xx_pwrdm: L3 initators pheripherals power domain */ | 264 | /* l3init_44xx_pwrdm: L3 initators pheripherals power domain */ |
@@ -276,7 +276,7 @@ static struct powerdomain l3init_44xx_pwrdm = { | |||
276 | .pwrsts_mem_on = { | 276 | .pwrsts_mem_on = { |
277 | [0] = PWRSTS_ON, /* l3init_bank1 */ | 277 | [0] = PWRSTS_ON, /* l3init_bank1 */ |
278 | }, | 278 | }, |
279 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 279 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
280 | }; | 280 | }; |
281 | 281 | ||
282 | /* l4per_44xx_pwrdm: Target peripherals power domain */ | 282 | /* l4per_44xx_pwrdm: Target peripherals power domain */ |
@@ -296,7 +296,7 @@ static struct powerdomain l4per_44xx_pwrdm = { | |||
296 | [0] = PWRSTS_ON, /* nonretained_bank */ | 296 | [0] = PWRSTS_ON, /* nonretained_bank */ |
297 | [1] = PWRSTS_ON, /* retained_bank */ | 297 | [1] = PWRSTS_ON, /* retained_bank */ |
298 | }, | 298 | }, |
299 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, | 299 | .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, |
300 | }; | 300 | }; |
301 | 301 | ||
302 | /* | 302 | /* |
diff --git a/arch/arm/mach-omap2/prcm_mpu44xx.h b/arch/arm/mach-omap2/prcm_mpu44xx.h index d22d1b43bccd..8a6e250f04b5 100644 --- a/arch/arm/mach-omap2/prcm_mpu44xx.h +++ b/arch/arm/mach-omap2/prcm_mpu44xx.h | |||
@@ -31,7 +31,6 @@ | |||
31 | OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE + (inst) + (reg)) | 31 | OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE + (inst) + (reg)) |
32 | 32 | ||
33 | /* PRCM_MPU instances */ | 33 | /* PRCM_MPU instances */ |
34 | |||
35 | #define OMAP4430_PRCM_MPU_OCP_SOCKET_PRCM_INST 0x0000 | 34 | #define OMAP4430_PRCM_MPU_OCP_SOCKET_PRCM_INST 0x0000 |
36 | #define OMAP4430_PRCM_MPU_DEVICE_PRM_INST 0x0200 | 35 | #define OMAP4430_PRCM_MPU_DEVICE_PRM_INST 0x0200 |
37 | #define OMAP4430_PRCM_MPU_CPU0_INST 0x0400 | 36 | #define OMAP4430_PRCM_MPU_CPU0_INST 0x0400 |
@@ -52,46 +51,46 @@ | |||
52 | */ | 51 | */ |
53 | 52 | ||
54 | /* PRCM_MPU.OCP_SOCKET_PRCM register offsets */ | 53 | /* PRCM_MPU.OCP_SOCKET_PRCM register offsets */ |
55 | #define OMAP4_REVISION_PRCM_OFFSET 0x0000 | 54 | #define OMAP4_REVISION_PRCM_OFFSET 0x0000 |
56 | #define OMAP4430_REVISION_PRCM OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_OCP_SOCKET_PRCM_INST, 0x0000) | 55 | #define OMAP4430_REVISION_PRCM OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_OCP_SOCKET_PRCM_INST, 0x0000) |
57 | 56 | ||
58 | /* PRCM_MPU.DEVICE_PRM register offsets */ | 57 | /* PRCM_MPU.DEVICE_PRM register offsets */ |
59 | #define OMAP4_PRCM_MPU_PRM_RSTST_OFFSET 0x0000 | 58 | #define OMAP4_PRCM_MPU_PRM_RSTST_OFFSET 0x0000 |
60 | #define OMAP4430_PRCM_MPU_PRM_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_INST, 0x0000) | 59 | #define OMAP4430_PRCM_MPU_PRM_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_INST, 0x0000) |
61 | #define OMAP4_PRCM_MPU_PRM_PSCON_COUNT_OFFSET 0x0004 | 60 | #define OMAP4_PRCM_MPU_PRM_PSCON_COUNT_OFFSET 0x0004 |
62 | #define OMAP4430_PRCM_MPU_PRM_PSCON_COUNT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_INST, 0x0004) | 61 | #define OMAP4430_PRCM_MPU_PRM_PSCON_COUNT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_INST, 0x0004) |
63 | 62 | ||
64 | /* PRCM_MPU.CPU0 register offsets */ | 63 | /* PRCM_MPU.CPU0 register offsets */ |
65 | #define OMAP4_PM_CPU0_PWRSTCTRL_OFFSET 0x0000 | 64 | #define OMAP4_PM_CPU0_PWRSTCTRL_OFFSET 0x0000 |
66 | #define OMAP4430_PM_CPU0_PWRSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0000) | 65 | #define OMAP4430_PM_CPU0_PWRSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0000) |
67 | #define OMAP4_PM_CPU0_PWRSTST_OFFSET 0x0004 | 66 | #define OMAP4_PM_CPU0_PWRSTST_OFFSET 0x0004 |
68 | #define OMAP4430_PM_CPU0_PWRSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0004) | 67 | #define OMAP4430_PM_CPU0_PWRSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0004) |
69 | #define OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET 0x0008 | 68 | #define OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET 0x0008 |
70 | #define OMAP4430_RM_CPU0_CPU0_CONTEXT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0008) | 69 | #define OMAP4430_RM_CPU0_CPU0_CONTEXT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0008) |
71 | #define OMAP4_RM_CPU0_CPU0_RSTCTRL_OFFSET 0x000c | 70 | #define OMAP4_RM_CPU0_CPU0_RSTCTRL_OFFSET 0x000c |
72 | #define OMAP4430_RM_CPU0_CPU0_RSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x000c) | 71 | #define OMAP4430_RM_CPU0_CPU0_RSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x000c) |
73 | #define OMAP4_RM_CPU0_CPU0_RSTST_OFFSET 0x0010 | 72 | #define OMAP4_RM_CPU0_CPU0_RSTST_OFFSET 0x0010 |
74 | #define OMAP4430_RM_CPU0_CPU0_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0010) | 73 | #define OMAP4430_RM_CPU0_CPU0_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0010) |
75 | #define OMAP4_CM_CPU0_CPU0_CLKCTRL_OFFSET 0x0014 | 74 | #define OMAP4_CM_CPU0_CPU0_CLKCTRL_OFFSET 0x0014 |
76 | #define OMAP4430_CM_CPU0_CPU0_CLKCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0014) | 75 | #define OMAP4430_CM_CPU0_CPU0_CLKCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0014) |
77 | #define OMAP4_CM_CPU0_CLKSTCTRL_OFFSET 0x0018 | 76 | #define OMAP4_CM_CPU0_CLKSTCTRL_OFFSET 0x0018 |
78 | #define OMAP4430_CM_CPU0_CLKSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0018) | 77 | #define OMAP4430_CM_CPU0_CLKSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0018) |
79 | 78 | ||
80 | /* PRCM_MPU.CPU1 register offsets */ | 79 | /* PRCM_MPU.CPU1 register offsets */ |
81 | #define OMAP4_PM_CPU1_PWRSTCTRL_OFFSET 0x0000 | 80 | #define OMAP4_PM_CPU1_PWRSTCTRL_OFFSET 0x0000 |
82 | #define OMAP4430_PM_CPU1_PWRSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0000) | 81 | #define OMAP4430_PM_CPU1_PWRSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0000) |
83 | #define OMAP4_PM_CPU1_PWRSTST_OFFSET 0x0004 | 82 | #define OMAP4_PM_CPU1_PWRSTST_OFFSET 0x0004 |
84 | #define OMAP4430_PM_CPU1_PWRSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0004) | 83 | #define OMAP4430_PM_CPU1_PWRSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0004) |
85 | #define OMAP4_RM_CPU1_CPU1_CONTEXT_OFFSET 0x0008 | 84 | #define OMAP4_RM_CPU1_CPU1_CONTEXT_OFFSET 0x0008 |
86 | #define OMAP4430_RM_CPU1_CPU1_CONTEXT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0008) | 85 | #define OMAP4430_RM_CPU1_CPU1_CONTEXT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0008) |
87 | #define OMAP4_RM_CPU1_CPU1_RSTCTRL_OFFSET 0x000c | 86 | #define OMAP4_RM_CPU1_CPU1_RSTCTRL_OFFSET 0x000c |
88 | #define OMAP4430_RM_CPU1_CPU1_RSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x000c) | 87 | #define OMAP4430_RM_CPU1_CPU1_RSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x000c) |
89 | #define OMAP4_RM_CPU1_CPU1_RSTST_OFFSET 0x0010 | 88 | #define OMAP4_RM_CPU1_CPU1_RSTST_OFFSET 0x0010 |
90 | #define OMAP4430_RM_CPU1_CPU1_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0010) | 89 | #define OMAP4430_RM_CPU1_CPU1_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0010) |
91 | #define OMAP4_CM_CPU1_CPU1_CLKCTRL_OFFSET 0x0014 | 90 | #define OMAP4_CM_CPU1_CPU1_CLKCTRL_OFFSET 0x0014 |
92 | #define OMAP4430_CM_CPU1_CPU1_CLKCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0014) | 91 | #define OMAP4430_CM_CPU1_CPU1_CLKCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0014) |
93 | #define OMAP4_CM_CPU1_CLKSTCTRL_OFFSET 0x0018 | 92 | #define OMAP4_CM_CPU1_CLKSTCTRL_OFFSET 0x0018 |
94 | #define OMAP4430_CM_CPU1_CLKSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0018) | 93 | #define OMAP4430_CM_CPU1_CLKSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0018) |
95 | 94 | ||
96 | /* Function prototypes */ | 95 | /* Function prototypes */ |
97 | # ifndef __ASSEMBLER__ | 96 | # ifndef __ASSEMBLER__ |
diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h index 67a0d3feb3f6..6e53120fd6cb 100644 --- a/arch/arm/mach-omap2/prm44xx.h +++ b/arch/arm/mach-omap2/prm44xx.h | |||
@@ -31,7 +31,7 @@ | |||
31 | #define OMAP4430_PRM_BASE 0x4a306000 | 31 | #define OMAP4430_PRM_BASE 0x4a306000 |
32 | 32 | ||
33 | #define OMAP44XX_PRM_REGADDR(inst, reg) \ | 33 | #define OMAP44XX_PRM_REGADDR(inst, reg) \ |
34 | OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE + (inst) + (reg)) | 34 | OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE + (inst) + (reg)) |
35 | 35 | ||
36 | 36 | ||
37 | /* PRM instances */ | 37 | /* PRM instances */ |
@@ -46,30 +46,18 @@ | |||
46 | #define OMAP4430_PRM_CAM_INST 0x1000 | 46 | #define OMAP4430_PRM_CAM_INST 0x1000 |
47 | #define OMAP4430_PRM_DSS_INST 0x1100 | 47 | #define OMAP4430_PRM_DSS_INST 0x1100 |
48 | #define OMAP4430_PRM_GFX_INST 0x1200 | 48 | #define OMAP4430_PRM_GFX_INST 0x1200 |
49 | #define OMAP4430_PRM_L3INIT_INST 0x1300 | 49 | #define OMAP4430_PRM_L3INIT_INST 0x1300 |
50 | #define OMAP4430_PRM_L4PER_INST 0x1400 | 50 | #define OMAP4430_PRM_L4PER_INST 0x1400 |
51 | #define OMAP4430_PRM_CEFUSE_INST 0x1600 | 51 | #define OMAP4430_PRM_CEFUSE_INST 0x1600 |
52 | #define OMAP4430_PRM_WKUP_INST 0x1700 | 52 | #define OMAP4430_PRM_WKUP_INST 0x1700 |
53 | #define OMAP4430_PRM_WKUP_CM_INST 0x1800 | 53 | #define OMAP4430_PRM_WKUP_CM_INST 0x1800 |
54 | #define OMAP4430_PRM_EMU_INST 0x1900 | 54 | #define OMAP4430_PRM_EMU_INST 0x1900 |
55 | #define OMAP4430_PRM_EMU_CM_INST 0x1a00 | 55 | #define OMAP4430_PRM_EMU_CM_INST 0x1a00 |
56 | #define OMAP4430_PRM_DEVICE_INST 0x1b00 | 56 | #define OMAP4430_PRM_DEVICE_INST 0x1b00 |
57 | #define OMAP4430_PRM_INSTR_INST 0x1f00 | 57 | #define OMAP4430_PRM_INSTR_INST 0x1f00 |
58 | 58 | ||
59 | /* PRM clockdomain register offsets (from instance start) */ | 59 | /* PRM clockdomain register offsets (from instance start) */ |
60 | #define OMAP4430_PRM_MPU_MPU_CDOFFS 0x0000 | ||
61 | #define OMAP4430_PRM_TESLA_TESLA_CDOFFS 0x0000 | ||
62 | #define OMAP4430_PRM_ABE_ABE_CDOFFS 0x0000 | ||
63 | #define OMAP4430_PRM_CORE_CORE_CDOFFS 0x0000 | ||
64 | #define OMAP4430_PRM_IVAHD_IVAHD_CDOFFS 0x0000 | ||
65 | #define OMAP4430_PRM_CAM_CAM_CDOFFS 0x0000 | ||
66 | #define OMAP4430_PRM_DSS_DSS_CDOFFS 0x0000 | ||
67 | #define OMAP4430_PRM_GFX_GFX_CDOFFS 0x0000 | ||
68 | #define OMAP4430_PRM_L3INIT_L3INIT_CDOFFS 0x0000 | ||
69 | #define OMAP4430_PRM_L4PER_L4PER_CDOFFS 0x0000 | ||
70 | #define OMAP4430_PRM_CEFUSE_CEFUSE_CDOFFS 0x0000 | ||
71 | #define OMAP4430_PRM_WKUP_CM_WKUP_CDOFFS 0x0000 | 60 | #define OMAP4430_PRM_WKUP_CM_WKUP_CDOFFS 0x0000 |
72 | #define OMAP4430_PRM_EMU_EMU_CDOFFS 0x0000 | ||
73 | #define OMAP4430_PRM_EMU_CM_EMU_CDOFFS 0x0000 | 61 | #define OMAP4430_PRM_EMU_CM_EMU_CDOFFS 0x0000 |
74 | 62 | ||
75 | /* OMAP4 specific register offsets */ | 63 | /* OMAP4 specific register offsets */ |
@@ -247,8 +235,8 @@ | |||
247 | #define OMAP4430_RM_MEMIF_DLL_H_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x0464) | 235 | #define OMAP4430_RM_MEMIF_DLL_H_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x0464) |
248 | #define OMAP4_RM_D2D_SAD2D_CONTEXT_OFFSET 0x0524 | 236 | #define OMAP4_RM_D2D_SAD2D_CONTEXT_OFFSET 0x0524 |
249 | #define OMAP4430_RM_D2D_SAD2D_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x0524) | 237 | #define OMAP4430_RM_D2D_SAD2D_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x0524) |
250 | #define OMAP4_RM_D2D_INSTEM_ICR_CONTEXT_OFFSET 0x052c | 238 | #define OMAP4_RM_D2D_MODEM_ICR_CONTEXT_OFFSET 0x052c |
251 | #define OMAP4430_RM_D2D_INSTEM_ICR_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x052c) | 239 | #define OMAP4430_RM_D2D_MODEM_ICR_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x052c) |
252 | #define OMAP4_RM_D2D_SAD2D_FW_CONTEXT_OFFSET 0x0534 | 240 | #define OMAP4_RM_D2D_SAD2D_FW_CONTEXT_OFFSET 0x0534 |
253 | #define OMAP4430_RM_D2D_SAD2D_FW_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x0534) | 241 | #define OMAP4430_RM_D2D_SAD2D_FW_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x0534) |
254 | #define OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET 0x0624 | 242 | #define OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET 0x0624 |
@@ -713,8 +701,8 @@ | |||
713 | #define OMAP4430_PRM_VC_VAL_BYPASS OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00a0) | 701 | #define OMAP4430_PRM_VC_VAL_BYPASS OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00a0) |
714 | #define OMAP4_PRM_VC_CFG_CHANNEL_OFFSET 0x00a4 | 702 | #define OMAP4_PRM_VC_CFG_CHANNEL_OFFSET 0x00a4 |
715 | #define OMAP4430_PRM_VC_CFG_CHANNEL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00a4) | 703 | #define OMAP4430_PRM_VC_CFG_CHANNEL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00a4) |
716 | #define OMAP4_PRM_VC_CFG_I2C_INSTE_OFFSET 0x00a8 | 704 | #define OMAP4_PRM_VC_CFG_I2C_MODE_OFFSET 0x00a8 |
717 | #define OMAP4430_PRM_VC_CFG_I2C_INSTE OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00a8) | 705 | #define OMAP4430_PRM_VC_CFG_I2C_MODE OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00a8) |
718 | #define OMAP4_PRM_VC_CFG_I2C_CLK_OFFSET 0x00ac | 706 | #define OMAP4_PRM_VC_CFG_I2C_CLK_OFFSET 0x00ac |
719 | #define OMAP4430_PRM_VC_CFG_I2C_CLK OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00ac) | 707 | #define OMAP4430_PRM_VC_CFG_I2C_CLK OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00ac) |
720 | #define OMAP4_PRM_SRAM_COUNT_OFFSET 0x00b0 | 708 | #define OMAP4_PRM_SRAM_COUNT_OFFSET 0x00b0 |
@@ -751,8 +739,8 @@ | |||
751 | #define OMAP4430_PRM_PHASE2A_CNDP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00ec) | 739 | #define OMAP4430_PRM_PHASE2A_CNDP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00ec) |
752 | #define OMAP4_PRM_PHASE2B_CNDP_OFFSET 0x00f0 | 740 | #define OMAP4_PRM_PHASE2B_CNDP_OFFSET 0x00f0 |
753 | #define OMAP4430_PRM_PHASE2B_CNDP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f0) | 741 | #define OMAP4430_PRM_PHASE2B_CNDP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f0) |
754 | #define OMAP4_PRM_INSTEM_IF_CTRL_OFFSET 0x00f4 | 742 | #define OMAP4_PRM_MODEM_IF_CTRL_OFFSET 0x00f4 |
755 | #define OMAP4430_PRM_INSTEM_IF_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f4) | 743 | #define OMAP4430_PRM_MODEM_IF_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f4) |
756 | #define OMAP4_PRM_VC_ERRST_OFFSET 0x00f8 | 744 | #define OMAP4_PRM_VC_ERRST_OFFSET 0x00f8 |
757 | #define OMAP4430_PRM_VC_ERRST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f8) | 745 | #define OMAP4430_PRM_VC_ERRST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f8) |
758 | 746 | ||
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index fb7dc52394a8..2ce2fb7664bc 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c | |||
@@ -143,7 +143,7 @@ static irqreturn_t sr_interrupt(int irq, void *data) | |||
143 | sr_write_reg(sr_info, IRQSTATUS, status); | 143 | sr_write_reg(sr_info, IRQSTATUS, status); |
144 | } | 144 | } |
145 | 145 | ||
146 | if (sr_class->class_type == SR_CLASS2 && sr_class->notify) | 146 | if (sr_class->notify) |
147 | sr_class->notify(sr_info->voltdm, status); | 147 | sr_class->notify(sr_info->voltdm, status); |
148 | 148 | ||
149 | return IRQ_HANDLED; | 149 | return IRQ_HANDLED; |
@@ -258,9 +258,7 @@ static int sr_late_init(struct omap_sr *sr_info) | |||
258 | struct resource *mem; | 258 | struct resource *mem; |
259 | int ret = 0; | 259 | int ret = 0; |
260 | 260 | ||
261 | if (sr_class->class_type == SR_CLASS2 && | 261 | if (sr_class->notify && sr_class->notify_flags && sr_info->irq) { |
262 | sr_class->notify_flags && sr_info->irq) { | ||
263 | |||
264 | name = kasprintf(GFP_KERNEL, "sr_%s", sr_info->voltdm->name); | 262 | name = kasprintf(GFP_KERNEL, "sr_%s", sr_info->voltdm->name); |
265 | if (name == NULL) { | 263 | if (name == NULL) { |
266 | ret = -ENOMEM; | 264 | ret = -ENOMEM; |
@@ -270,6 +268,7 @@ static int sr_late_init(struct omap_sr *sr_info) | |||
270 | 0, name, (void *)sr_info); | 268 | 0, name, (void *)sr_info); |
271 | if (ret) | 269 | if (ret) |
272 | goto error; | 270 | goto error; |
271 | disable_irq(sr_info->irq); | ||
273 | } | 272 | } |
274 | 273 | ||
275 | if (pdata && pdata->enable_on_init) | 274 | if (pdata && pdata->enable_on_init) |
@@ -278,16 +277,16 @@ static int sr_late_init(struct omap_sr *sr_info) | |||
278 | return ret; | 277 | return ret; |
279 | 278 | ||
280 | error: | 279 | error: |
281 | iounmap(sr_info->base); | 280 | iounmap(sr_info->base); |
282 | mem = platform_get_resource(sr_info->pdev, IORESOURCE_MEM, 0); | 281 | mem = platform_get_resource(sr_info->pdev, IORESOURCE_MEM, 0); |
283 | release_mem_region(mem->start, resource_size(mem)); | 282 | release_mem_region(mem->start, resource_size(mem)); |
284 | list_del(&sr_info->node); | 283 | list_del(&sr_info->node); |
285 | dev_err(&sr_info->pdev->dev, "%s: ERROR in registering" | 284 | dev_err(&sr_info->pdev->dev, "%s: ERROR in registering" |
286 | "interrupt handler. Smartreflex will" | 285 | "interrupt handler. Smartreflex will" |
287 | "not function as desired\n", __func__); | 286 | "not function as desired\n", __func__); |
288 | kfree(name); | 287 | kfree(name); |
289 | kfree(sr_info); | 288 | kfree(sr_info); |
290 | return ret; | 289 | return ret; |
291 | } | 290 | } |
292 | 291 | ||
293 | static void sr_v1_disable(struct omap_sr *sr) | 292 | static void sr_v1_disable(struct omap_sr *sr) |
@@ -808,10 +807,13 @@ static int omap_sr_autocomp_store(void *data, u64 val) | |||
808 | return -EINVAL; | 807 | return -EINVAL; |
809 | } | 808 | } |
810 | 809 | ||
811 | if (!val) | 810 | /* control enable/disable only if there is a delta in value */ |
812 | sr_stop_vddautocomp(sr_info); | 811 | if (sr_info->autocomp_active != val) { |
813 | else | 812 | if (!val) |
814 | sr_start_vddautocomp(sr_info); | 813 | sr_stop_vddautocomp(sr_info); |
814 | else | ||
815 | sr_start_vddautocomp(sr_info); | ||
816 | } | ||
815 | 817 | ||
816 | return 0; | 818 | return 0; |
817 | } | 819 | } |
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c deleted file mode 100644 index 3b9cf85f4bb9..000000000000 --- a/arch/arm/mach-omap2/timer-gp.c +++ /dev/null | |||
@@ -1,266 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-omap2/timer-gp.c | ||
3 | * | ||
4 | * OMAP2 GP timer support. | ||
5 | * | ||
6 | * Copyright (C) 2009 Nokia Corporation | ||
7 | * | ||
8 | * Update to use new clocksource/clockevent layers | ||
9 | * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com> | ||
10 | * Copyright (C) 2007 MontaVista Software, Inc. | ||
11 | * | ||
12 | * Original driver: | ||
13 | * Copyright (C) 2005 Nokia Corporation | ||
14 | * Author: Paul Mundt <paul.mundt@nokia.com> | ||
15 | * Juha Yrjölä <juha.yrjola@nokia.com> | ||
16 | * OMAP Dual-mode timer framework support by Timo Teras | ||
17 | * | ||
18 | * Some parts based off of TI's 24xx code: | ||
19 | * | ||
20 | * Copyright (C) 2004-2009 Texas Instruments, Inc. | ||
21 | * | ||
22 | * Roughly modelled after the OMAP1 MPU timer code. | ||
23 | * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
24 | * | ||
25 | * This file is subject to the terms and conditions of the GNU General Public | ||
26 | * License. See the file "COPYING" in the main directory of this archive | ||
27 | * for more details. | ||
28 | */ | ||
29 | #include <linux/init.h> | ||
30 | #include <linux/time.h> | ||
31 | #include <linux/interrupt.h> | ||
32 | #include <linux/err.h> | ||
33 | #include <linux/clk.h> | ||
34 | #include <linux/delay.h> | ||
35 | #include <linux/irq.h> | ||
36 | #include <linux/clocksource.h> | ||
37 | #include <linux/clockchips.h> | ||
38 | |||
39 | #include <asm/mach/time.h> | ||
40 | #include <plat/dmtimer.h> | ||
41 | #include <asm/localtimer.h> | ||
42 | #include <asm/sched_clock.h> | ||
43 | #include <plat/common.h> | ||
44 | #include <plat/omap_hwmod.h> | ||
45 | |||
46 | #include "timer-gp.h" | ||
47 | |||
48 | |||
49 | /* MAX_GPTIMER_ID: number of GPTIMERs on the chip */ | ||
50 | #define MAX_GPTIMER_ID 12 | ||
51 | |||
52 | static struct omap_dm_timer *gptimer; | ||
53 | static struct clock_event_device clockevent_gpt; | ||
54 | static u8 __initdata gptimer_id = 1; | ||
55 | static u8 __initdata inited; | ||
56 | struct omap_dm_timer *gptimer_wakeup; | ||
57 | |||
58 | static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id) | ||
59 | { | ||
60 | struct omap_dm_timer *gpt = (struct omap_dm_timer *)dev_id; | ||
61 | struct clock_event_device *evt = &clockevent_gpt; | ||
62 | |||
63 | omap_dm_timer_write_status(gpt, OMAP_TIMER_INT_OVERFLOW); | ||
64 | |||
65 | evt->event_handler(evt); | ||
66 | return IRQ_HANDLED; | ||
67 | } | ||
68 | |||
69 | static struct irqaction omap2_gp_timer_irq = { | ||
70 | .name = "gp timer", | ||
71 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
72 | .handler = omap2_gp_timer_interrupt, | ||
73 | }; | ||
74 | |||
75 | static int omap2_gp_timer_set_next_event(unsigned long cycles, | ||
76 | struct clock_event_device *evt) | ||
77 | { | ||
78 | omap_dm_timer_set_load_start(gptimer, 0, 0xffffffff - cycles); | ||
79 | |||
80 | return 0; | ||
81 | } | ||
82 | |||
83 | static void omap2_gp_timer_set_mode(enum clock_event_mode mode, | ||
84 | struct clock_event_device *evt) | ||
85 | { | ||
86 | u32 period; | ||
87 | |||
88 | omap_dm_timer_stop(gptimer); | ||
89 | |||
90 | switch (mode) { | ||
91 | case CLOCK_EVT_MODE_PERIODIC: | ||
92 | period = clk_get_rate(omap_dm_timer_get_fclk(gptimer)) / HZ; | ||
93 | period -= 1; | ||
94 | omap_dm_timer_set_load_start(gptimer, 1, 0xffffffff - period); | ||
95 | break; | ||
96 | case CLOCK_EVT_MODE_ONESHOT: | ||
97 | break; | ||
98 | case CLOCK_EVT_MODE_UNUSED: | ||
99 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
100 | case CLOCK_EVT_MODE_RESUME: | ||
101 | break; | ||
102 | } | ||
103 | } | ||
104 | |||
105 | static struct clock_event_device clockevent_gpt = { | ||
106 | .name = "gp timer", | ||
107 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | ||
108 | .shift = 32, | ||
109 | .set_next_event = omap2_gp_timer_set_next_event, | ||
110 | .set_mode = omap2_gp_timer_set_mode, | ||
111 | }; | ||
112 | |||
113 | /** | ||
114 | * omap2_gp_clockevent_set_gptimer - set which GPTIMER is used for clockevents | ||
115 | * @id: GPTIMER to use (1..MAX_GPTIMER_ID) | ||
116 | * | ||
117 | * Define the GPTIMER that the system should use for the tick timer. | ||
118 | * Meant to be called from board-*.c files in the event that GPTIMER1, the | ||
119 | * default, is unsuitable. Returns -EINVAL on error or 0 on success. | ||
120 | */ | ||
121 | int __init omap2_gp_clockevent_set_gptimer(u8 id) | ||
122 | { | ||
123 | if (id < 1 || id > MAX_GPTIMER_ID) | ||
124 | return -EINVAL; | ||
125 | |||
126 | BUG_ON(inited); | ||
127 | |||
128 | gptimer_id = id; | ||
129 | |||
130 | return 0; | ||
131 | } | ||
132 | |||
133 | static void __init omap2_gp_clockevent_init(void) | ||
134 | { | ||
135 | u32 tick_rate; | ||
136 | int src; | ||
137 | char clockevent_hwmod_name[8]; /* 8 = sizeof("timerXX0") */ | ||
138 | |||
139 | inited = 1; | ||
140 | |||
141 | sprintf(clockevent_hwmod_name, "timer%d", gptimer_id); | ||
142 | omap_hwmod_setup_one(clockevent_hwmod_name); | ||
143 | |||
144 | gptimer = omap_dm_timer_request_specific(gptimer_id); | ||
145 | BUG_ON(gptimer == NULL); | ||
146 | gptimer_wakeup = gptimer; | ||
147 | |||
148 | #if defined(CONFIG_OMAP_32K_TIMER) | ||
149 | src = OMAP_TIMER_SRC_32_KHZ; | ||
150 | #else | ||
151 | src = OMAP_TIMER_SRC_SYS_CLK; | ||
152 | WARN(gptimer_id == 12, "WARNING: GPTIMER12 can only use the " | ||
153 | "secure 32KiHz clock source\n"); | ||
154 | #endif | ||
155 | |||
156 | if (gptimer_id != 12) | ||
157 | WARN(IS_ERR_VALUE(omap_dm_timer_set_source(gptimer, src)), | ||
158 | "timer-gp: omap_dm_timer_set_source() failed\n"); | ||
159 | |||
160 | tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gptimer)); | ||
161 | |||
162 | pr_info("OMAP clockevent source: GPTIMER%d at %u Hz\n", | ||
163 | gptimer_id, tick_rate); | ||
164 | |||
165 | omap2_gp_timer_irq.dev_id = (void *)gptimer; | ||
166 | setup_irq(omap_dm_timer_get_irq(gptimer), &omap2_gp_timer_irq); | ||
167 | omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW); | ||
168 | |||
169 | clockevent_gpt.mult = div_sc(tick_rate, NSEC_PER_SEC, | ||
170 | clockevent_gpt.shift); | ||
171 | clockevent_gpt.max_delta_ns = | ||
172 | clockevent_delta2ns(0xffffffff, &clockevent_gpt); | ||
173 | clockevent_gpt.min_delta_ns = | ||
174 | clockevent_delta2ns(3, &clockevent_gpt); | ||
175 | /* Timer internal resynch latency. */ | ||
176 | |||
177 | clockevent_gpt.cpumask = cpumask_of(0); | ||
178 | clockevents_register_device(&clockevent_gpt); | ||
179 | } | ||
180 | |||
181 | /* Clocksource code */ | ||
182 | |||
183 | #ifdef CONFIG_OMAP_32K_TIMER | ||
184 | /* | ||
185 | * When 32k-timer is enabled, don't use GPTimer for clocksource | ||
186 | * instead, just leave default clocksource which uses the 32k | ||
187 | * sync counter. See clocksource setup in plat-omap/counter_32k.c | ||
188 | */ | ||
189 | |||
190 | static void __init omap2_gp_clocksource_init(void) | ||
191 | { | ||
192 | omap_init_clocksource_32k(); | ||
193 | } | ||
194 | |||
195 | #else | ||
196 | /* | ||
197 | * clocksource | ||
198 | */ | ||
199 | static DEFINE_CLOCK_DATA(cd); | ||
200 | static struct omap_dm_timer *gpt_clocksource; | ||
201 | static cycle_t clocksource_read_cycles(struct clocksource *cs) | ||
202 | { | ||
203 | return (cycle_t)omap_dm_timer_read_counter(gpt_clocksource); | ||
204 | } | ||
205 | |||
206 | static struct clocksource clocksource_gpt = { | ||
207 | .name = "gp timer", | ||
208 | .rating = 300, | ||
209 | .read = clocksource_read_cycles, | ||
210 | .mask = CLOCKSOURCE_MASK(32), | ||
211 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
212 | }; | ||
213 | |||
214 | static void notrace dmtimer_update_sched_clock(void) | ||
215 | { | ||
216 | u32 cyc; | ||
217 | |||
218 | cyc = omap_dm_timer_read_counter(gpt_clocksource); | ||
219 | |||
220 | update_sched_clock(&cd, cyc, (u32)~0); | ||
221 | } | ||
222 | |||
223 | /* Setup free-running counter for clocksource */ | ||
224 | static void __init omap2_gp_clocksource_init(void) | ||
225 | { | ||
226 | static struct omap_dm_timer *gpt; | ||
227 | u32 tick_rate; | ||
228 | static char err1[] __initdata = KERN_ERR | ||
229 | "%s: failed to request dm-timer\n"; | ||
230 | static char err2[] __initdata = KERN_ERR | ||
231 | "%s: can't register clocksource!\n"; | ||
232 | |||
233 | gpt = omap_dm_timer_request(); | ||
234 | if (!gpt) | ||
235 | printk(err1, clocksource_gpt.name); | ||
236 | gpt_clocksource = gpt; | ||
237 | |||
238 | omap_dm_timer_set_source(gpt, OMAP_TIMER_SRC_SYS_CLK); | ||
239 | tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gpt)); | ||
240 | |||
241 | omap_dm_timer_set_load_start(gpt, 1, 0); | ||
242 | |||
243 | init_sched_clock(&cd, dmtimer_update_sched_clock, 32, tick_rate); | ||
244 | |||
245 | if (clocksource_register_hz(&clocksource_gpt, tick_rate)) | ||
246 | printk(err2, clocksource_gpt.name); | ||
247 | } | ||
248 | #endif | ||
249 | |||
250 | static void __init omap2_gp_timer_init(void) | ||
251 | { | ||
252 | #ifdef CONFIG_LOCAL_TIMERS | ||
253 | if (cpu_is_omap44xx()) { | ||
254 | twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256); | ||
255 | BUG_ON(!twd_base); | ||
256 | } | ||
257 | #endif | ||
258 | omap_dm_timer_init(); | ||
259 | |||
260 | omap2_gp_clockevent_init(); | ||
261 | omap2_gp_clocksource_init(); | ||
262 | } | ||
263 | |||
264 | struct sys_timer omap_timer = { | ||
265 | .init = omap2_gp_timer_init, | ||
266 | }; | ||
diff --git a/arch/arm/mach-omap2/timer-gp.h b/arch/arm/mach-omap2/timer-gp.h deleted file mode 100644 index 5c1072c6783b..000000000000 --- a/arch/arm/mach-omap2/timer-gp.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * OMAP2/3 GPTIMER support.headers | ||
3 | * | ||
4 | * Copyright (C) 2009 Nokia Corporation | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_TIMER_GP_H | ||
12 | #define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_TIMER_GP_H | ||
13 | |||
14 | extern int __init omap2_gp_clockevent_set_gptimer(u8 id); | ||
15 | |||
16 | #endif | ||
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c new file mode 100644 index 000000000000..e9640728239b --- /dev/null +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -0,0 +1,342 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-omap2/timer.c | ||
3 | * | ||
4 | * OMAP2 GP timer support. | ||
5 | * | ||
6 | * Copyright (C) 2009 Nokia Corporation | ||
7 | * | ||
8 | * Update to use new clocksource/clockevent layers | ||
9 | * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com> | ||
10 | * Copyright (C) 2007 MontaVista Software, Inc. | ||
11 | * | ||
12 | * Original driver: | ||
13 | * Copyright (C) 2005 Nokia Corporation | ||
14 | * Author: Paul Mundt <paul.mundt@nokia.com> | ||
15 | * Juha Yrjölä <juha.yrjola@nokia.com> | ||
16 | * OMAP Dual-mode timer framework support by Timo Teras | ||
17 | * | ||
18 | * Some parts based off of TI's 24xx code: | ||
19 | * | ||
20 | * Copyright (C) 2004-2009 Texas Instruments, Inc. | ||
21 | * | ||
22 | * Roughly modelled after the OMAP1 MPU timer code. | ||
23 | * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
24 | * | ||
25 | * This file is subject to the terms and conditions of the GNU General Public | ||
26 | * License. See the file "COPYING" in the main directory of this archive | ||
27 | * for more details. | ||
28 | */ | ||
29 | #include <linux/init.h> | ||
30 | #include <linux/time.h> | ||
31 | #include <linux/interrupt.h> | ||
32 | #include <linux/err.h> | ||
33 | #include <linux/clk.h> | ||
34 | #include <linux/delay.h> | ||
35 | #include <linux/irq.h> | ||
36 | #include <linux/clocksource.h> | ||
37 | #include <linux/clockchips.h> | ||
38 | |||
39 | #include <asm/mach/time.h> | ||
40 | #include <plat/dmtimer.h> | ||
41 | #include <asm/localtimer.h> | ||
42 | #include <asm/sched_clock.h> | ||
43 | #include <plat/common.h> | ||
44 | #include <plat/omap_hwmod.h> | ||
45 | |||
46 | /* Parent clocks, eventually these will come from the clock framework */ | ||
47 | |||
48 | #define OMAP2_MPU_SOURCE "sys_ck" | ||
49 | #define OMAP3_MPU_SOURCE OMAP2_MPU_SOURCE | ||
50 | #define OMAP4_MPU_SOURCE "sys_clkin_ck" | ||
51 | #define OMAP2_32K_SOURCE "func_32k_ck" | ||
52 | #define OMAP3_32K_SOURCE "omap_32k_fck" | ||
53 | #define OMAP4_32K_SOURCE "sys_32k_ck" | ||
54 | |||
55 | #ifdef CONFIG_OMAP_32K_TIMER | ||
56 | #define OMAP2_CLKEV_SOURCE OMAP2_32K_SOURCE | ||
57 | #define OMAP3_CLKEV_SOURCE OMAP3_32K_SOURCE | ||
58 | #define OMAP4_CLKEV_SOURCE OMAP4_32K_SOURCE | ||
59 | #define OMAP3_SECURE_TIMER 12 | ||
60 | #else | ||
61 | #define OMAP2_CLKEV_SOURCE OMAP2_MPU_SOURCE | ||
62 | #define OMAP3_CLKEV_SOURCE OMAP3_MPU_SOURCE | ||
63 | #define OMAP4_CLKEV_SOURCE OMAP4_MPU_SOURCE | ||
64 | #define OMAP3_SECURE_TIMER 1 | ||
65 | #endif | ||
66 | |||
67 | /* MAX_GPTIMER_ID: number of GPTIMERs on the chip */ | ||
68 | #define MAX_GPTIMER_ID 12 | ||
69 | |||
70 | u32 sys_timer_reserved; | ||
71 | |||
72 | /* Clockevent code */ | ||
73 | |||
74 | static struct omap_dm_timer clkev; | ||
75 | static struct clock_event_device clockevent_gpt; | ||
76 | |||
77 | static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id) | ||
78 | { | ||
79 | struct clock_event_device *evt = &clockevent_gpt; | ||
80 | |||
81 | __omap_dm_timer_write_status(clkev.io_base, OMAP_TIMER_INT_OVERFLOW); | ||
82 | |||
83 | evt->event_handler(evt); | ||
84 | return IRQ_HANDLED; | ||
85 | } | ||
86 | |||
87 | static struct irqaction omap2_gp_timer_irq = { | ||
88 | .name = "gp timer", | ||
89 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
90 | .handler = omap2_gp_timer_interrupt, | ||
91 | }; | ||
92 | |||
93 | static int omap2_gp_timer_set_next_event(unsigned long cycles, | ||
94 | struct clock_event_device *evt) | ||
95 | { | ||
96 | __omap_dm_timer_load_start(clkev.io_base, OMAP_TIMER_CTRL_ST, | ||
97 | 0xffffffff - cycles, 1); | ||
98 | |||
99 | return 0; | ||
100 | } | ||
101 | |||
102 | static void omap2_gp_timer_set_mode(enum clock_event_mode mode, | ||
103 | struct clock_event_device *evt) | ||
104 | { | ||
105 | u32 period; | ||
106 | |||
107 | __omap_dm_timer_stop(clkev.io_base, 1, clkev.rate); | ||
108 | |||
109 | switch (mode) { | ||
110 | case CLOCK_EVT_MODE_PERIODIC: | ||
111 | period = clkev.rate / HZ; | ||
112 | period -= 1; | ||
113 | /* Looks like we need to first set the load value separately */ | ||
114 | __omap_dm_timer_write(clkev.io_base, OMAP_TIMER_LOAD_REG, | ||
115 | 0xffffffff - period, 1); | ||
116 | __omap_dm_timer_load_start(clkev.io_base, | ||
117 | OMAP_TIMER_CTRL_AR | OMAP_TIMER_CTRL_ST, | ||
118 | 0xffffffff - period, 1); | ||
119 | break; | ||
120 | case CLOCK_EVT_MODE_ONESHOT: | ||
121 | break; | ||
122 | case CLOCK_EVT_MODE_UNUSED: | ||
123 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
124 | case CLOCK_EVT_MODE_RESUME: | ||
125 | break; | ||
126 | } | ||
127 | } | ||
128 | |||
129 | static struct clock_event_device clockevent_gpt = { | ||
130 | .name = "gp timer", | ||
131 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | ||
132 | .shift = 32, | ||
133 | .set_next_event = omap2_gp_timer_set_next_event, | ||
134 | .set_mode = omap2_gp_timer_set_mode, | ||
135 | }; | ||
136 | |||
137 | static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, | ||
138 | int gptimer_id, | ||
139 | const char *fck_source) | ||
140 | { | ||
141 | char name[10]; /* 10 = sizeof("gptXX_Xck0") */ | ||
142 | struct omap_hwmod *oh; | ||
143 | size_t size; | ||
144 | int res = 0; | ||
145 | |||
146 | sprintf(name, "timer%d", gptimer_id); | ||
147 | omap_hwmod_setup_one(name); | ||
148 | oh = omap_hwmod_lookup(name); | ||
149 | if (!oh) | ||
150 | return -ENODEV; | ||
151 | |||
152 | timer->irq = oh->mpu_irqs[0].irq; | ||
153 | timer->phys_base = oh->slaves[0]->addr->pa_start; | ||
154 | size = oh->slaves[0]->addr->pa_end - timer->phys_base; | ||
155 | |||
156 | /* Static mapping, never released */ | ||
157 | timer->io_base = ioremap(timer->phys_base, size); | ||
158 | if (!timer->io_base) | ||
159 | return -ENXIO; | ||
160 | |||
161 | /* After the dmtimer is using hwmod these clocks won't be needed */ | ||
162 | sprintf(name, "gpt%d_fck", gptimer_id); | ||
163 | timer->fclk = clk_get(NULL, name); | ||
164 | if (IS_ERR(timer->fclk)) | ||
165 | return -ENODEV; | ||
166 | |||
167 | sprintf(name, "gpt%d_ick", gptimer_id); | ||
168 | timer->iclk = clk_get(NULL, name); | ||
169 | if (IS_ERR(timer->iclk)) { | ||
170 | clk_put(timer->fclk); | ||
171 | return -ENODEV; | ||
172 | } | ||
173 | |||
174 | omap_hwmod_enable(oh); | ||
175 | |||
176 | sys_timer_reserved |= (1 << (gptimer_id - 1)); | ||
177 | |||
178 | if (gptimer_id != 12) { | ||
179 | struct clk *src; | ||
180 | |||
181 | src = clk_get(NULL, fck_source); | ||
182 | if (IS_ERR(src)) { | ||
183 | res = -EINVAL; | ||
184 | } else { | ||
185 | res = __omap_dm_timer_set_source(timer->fclk, src); | ||
186 | if (IS_ERR_VALUE(res)) | ||
187 | pr_warning("%s: timer%i cannot set source\n", | ||
188 | __func__, gptimer_id); | ||
189 | clk_put(src); | ||
190 | } | ||
191 | } | ||
192 | __omap_dm_timer_reset(timer->io_base, 1, 1); | ||
193 | timer->posted = 1; | ||
194 | |||
195 | timer->rate = clk_get_rate(timer->fclk); | ||
196 | |||
197 | timer->reserved = 1; | ||
198 | |||
199 | return res; | ||
200 | } | ||
201 | |||
202 | static void __init omap2_gp_clockevent_init(int gptimer_id, | ||
203 | const char *fck_source) | ||
204 | { | ||
205 | int res; | ||
206 | |||
207 | res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source); | ||
208 | BUG_ON(res); | ||
209 | |||
210 | omap2_gp_timer_irq.dev_id = (void *)&clkev; | ||
211 | setup_irq(clkev.irq, &omap2_gp_timer_irq); | ||
212 | |||
213 | __omap_dm_timer_int_enable(clkev.io_base, OMAP_TIMER_INT_OVERFLOW); | ||
214 | |||
215 | clockevent_gpt.mult = div_sc(clkev.rate, NSEC_PER_SEC, | ||
216 | clockevent_gpt.shift); | ||
217 | clockevent_gpt.max_delta_ns = | ||
218 | clockevent_delta2ns(0xffffffff, &clockevent_gpt); | ||
219 | clockevent_gpt.min_delta_ns = | ||
220 | clockevent_delta2ns(3, &clockevent_gpt); | ||
221 | /* Timer internal resynch latency. */ | ||
222 | |||
223 | clockevent_gpt.cpumask = cpumask_of(0); | ||
224 | clockevents_register_device(&clockevent_gpt); | ||
225 | |||
226 | pr_info("OMAP clockevent source: GPTIMER%d at %lu Hz\n", | ||
227 | gptimer_id, clkev.rate); | ||
228 | } | ||
229 | |||
230 | /* Clocksource code */ | ||
231 | |||
232 | #ifdef CONFIG_OMAP_32K_TIMER | ||
233 | /* | ||
234 | * When 32k-timer is enabled, don't use GPTimer for clocksource | ||
235 | * instead, just leave default clocksource which uses the 32k | ||
236 | * sync counter. See clocksource setup in plat-omap/counter_32k.c | ||
237 | */ | ||
238 | |||
239 | static void __init omap2_gp_clocksource_init(int unused, const char *dummy) | ||
240 | { | ||
241 | omap_init_clocksource_32k(); | ||
242 | } | ||
243 | |||
244 | #else | ||
245 | |||
246 | static struct omap_dm_timer clksrc; | ||
247 | |||
248 | /* | ||
249 | * clocksource | ||
250 | */ | ||
251 | static DEFINE_CLOCK_DATA(cd); | ||
252 | static cycle_t clocksource_read_cycles(struct clocksource *cs) | ||
253 | { | ||
254 | return (cycle_t)__omap_dm_timer_read_counter(clksrc.io_base, 1); | ||
255 | } | ||
256 | |||
257 | static struct clocksource clocksource_gpt = { | ||
258 | .name = "gp timer", | ||
259 | .rating = 300, | ||
260 | .read = clocksource_read_cycles, | ||
261 | .mask = CLOCKSOURCE_MASK(32), | ||
262 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
263 | }; | ||
264 | |||
265 | static void notrace dmtimer_update_sched_clock(void) | ||
266 | { | ||
267 | u32 cyc; | ||
268 | |||
269 | cyc = __omap_dm_timer_read_counter(clksrc.io_base, 1); | ||
270 | |||
271 | update_sched_clock(&cd, cyc, (u32)~0); | ||
272 | } | ||
273 | |||
274 | unsigned long long notrace sched_clock(void) | ||
275 | { | ||
276 | u32 cyc = 0; | ||
277 | |||
278 | if (clksrc.reserved) | ||
279 | cyc = __omap_dm_timer_read_counter(clksrc.io_base, 1); | ||
280 | |||
281 | return cyc_to_sched_clock(&cd, cyc, (u32)~0); | ||
282 | } | ||
283 | |||
284 | /* Setup free-running counter for clocksource */ | ||
285 | static void __init omap2_gp_clocksource_init(int gptimer_id, | ||
286 | const char *fck_source) | ||
287 | { | ||
288 | int res; | ||
289 | |||
290 | res = omap_dm_timer_init_one(&clksrc, gptimer_id, fck_source); | ||
291 | BUG_ON(res); | ||
292 | |||
293 | pr_info("OMAP clocksource: GPTIMER%d at %lu Hz\n", | ||
294 | gptimer_id, clksrc.rate); | ||
295 | |||
296 | __omap_dm_timer_load_start(clksrc.io_base, OMAP_TIMER_CTRL_ST, 0, 1); | ||
297 | init_sched_clock(&cd, dmtimer_update_sched_clock, 32, clksrc.rate); | ||
298 | |||
299 | if (clocksource_register_hz(&clocksource_gpt, clksrc.rate)) | ||
300 | pr_err("Could not register clocksource %s\n", | ||
301 | clocksource_gpt.name); | ||
302 | } | ||
303 | #endif | ||
304 | |||
305 | #define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src, \ | ||
306 | clksrc_nr, clksrc_src) \ | ||
307 | static void __init omap##name##_timer_init(void) \ | ||
308 | { \ | ||
309 | omap2_gp_clockevent_init((clkev_nr), clkev_src); \ | ||
310 | omap2_gp_clocksource_init((clksrc_nr), clksrc_src); \ | ||
311 | } | ||
312 | |||
313 | #define OMAP_SYS_TIMER(name) \ | ||
314 | struct sys_timer omap##name##_timer = { \ | ||
315 | .init = omap##name##_timer_init, \ | ||
316 | }; | ||
317 | |||
318 | #ifdef CONFIG_ARCH_OMAP2 | ||
319 | OMAP_SYS_TIMER_INIT(2, 1, OMAP2_CLKEV_SOURCE, 2, OMAP2_MPU_SOURCE) | ||
320 | OMAP_SYS_TIMER(2) | ||
321 | #endif | ||
322 | |||
323 | #ifdef CONFIG_ARCH_OMAP3 | ||
324 | OMAP_SYS_TIMER_INIT(3, 1, OMAP3_CLKEV_SOURCE, 2, OMAP3_MPU_SOURCE) | ||
325 | OMAP_SYS_TIMER(3) | ||
326 | OMAP_SYS_TIMER_INIT(3_secure, OMAP3_SECURE_TIMER, OMAP3_CLKEV_SOURCE, | ||
327 | 2, OMAP3_MPU_SOURCE) | ||
328 | OMAP_SYS_TIMER(3_secure) | ||
329 | #endif | ||
330 | |||
331 | #ifdef CONFIG_ARCH_OMAP4 | ||
332 | static void __init omap4_timer_init(void) | ||
333 | { | ||
334 | #ifdef CONFIG_LOCAL_TIMERS | ||
335 | twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256); | ||
336 | BUG_ON(!twd_base); | ||
337 | #endif | ||
338 | omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE); | ||
339 | omap2_gp_clocksource_init(2, OMAP4_MPU_SOURCE); | ||
340 | } | ||
341 | OMAP_SYS_TIMER(4) | ||
342 | #endif | ||
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c new file mode 100644 index 000000000000..3aaa46f6cd12 --- /dev/null +++ b/arch/arm/mach-omap2/twl-common.c | |||
@@ -0,0 +1,304 @@ | |||
1 | /* | ||
2 | * twl-common.c | ||
3 | * | ||
4 | * Copyright (C) 2011 Texas Instruments, Inc.. | ||
5 | * Author: Peter Ujfalusi <peter.ujfalusi@ti.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * version 2 as published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
19 | * 02110-1301 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #include <linux/i2c.h> | ||
24 | #include <linux/i2c/twl.h> | ||
25 | #include <linux/gpio.h> | ||
26 | #include <linux/regulator/machine.h> | ||
27 | #include <linux/regulator/fixed.h> | ||
28 | |||
29 | #include <plat/i2c.h> | ||
30 | #include <plat/usb.h> | ||
31 | |||
32 | #include "twl-common.h" | ||
33 | |||
34 | static struct i2c_board_info __initdata pmic_i2c_board_info = { | ||
35 | .addr = 0x48, | ||
36 | .flags = I2C_CLIENT_WAKE, | ||
37 | }; | ||
38 | |||
39 | void __init omap_pmic_init(int bus, u32 clkrate, | ||
40 | const char *pmic_type, int pmic_irq, | ||
41 | struct twl4030_platform_data *pmic_data) | ||
42 | { | ||
43 | strncpy(pmic_i2c_board_info.type, pmic_type, | ||
44 | sizeof(pmic_i2c_board_info.type)); | ||
45 | pmic_i2c_board_info.irq = pmic_irq; | ||
46 | pmic_i2c_board_info.platform_data = pmic_data; | ||
47 | |||
48 | omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1); | ||
49 | } | ||
50 | |||
51 | static struct twl4030_usb_data omap4_usb_pdata = { | ||
52 | .phy_init = omap4430_phy_init, | ||
53 | .phy_exit = omap4430_phy_exit, | ||
54 | .phy_power = omap4430_phy_power, | ||
55 | .phy_set_clock = omap4430_phy_set_clk, | ||
56 | .phy_suspend = omap4430_phy_suspend, | ||
57 | }; | ||
58 | |||
59 | static struct twl4030_usb_data omap3_usb_pdata = { | ||
60 | .usb_mode = T2_USB_MODE_ULPI, | ||
61 | }; | ||
62 | |||
63 | static int omap3_batt_table[] = { | ||
64 | /* 0 C */ | ||
65 | 30800, 29500, 28300, 27100, | ||
66 | 26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900, | ||
67 | 17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100, | ||
68 | 11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310, | ||
69 | 8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830, | ||
70 | 5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170, | ||
71 | 4040, 3910, 3790, 3670, 3550 | ||
72 | }; | ||
73 | |||
74 | static struct twl4030_bci_platform_data omap3_bci_pdata = { | ||
75 | .battery_tmp_tbl = omap3_batt_table, | ||
76 | .tblsize = ARRAY_SIZE(omap3_batt_table), | ||
77 | }; | ||
78 | |||
79 | static struct twl4030_madc_platform_data omap3_madc_pdata = { | ||
80 | .irq_line = 1, | ||
81 | }; | ||
82 | |||
83 | static struct twl4030_codec_audio_data omap3_audio; | ||
84 | |||
85 | static struct twl4030_codec_data omap3_codec_pdata = { | ||
86 | .audio_mclk = 26000000, | ||
87 | .audio = &omap3_audio, | ||
88 | }; | ||
89 | |||
90 | static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = { | ||
91 | REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), | ||
92 | }; | ||
93 | |||
94 | static struct regulator_init_data omap3_vdac_idata = { | ||
95 | .constraints = { | ||
96 | .min_uV = 1800000, | ||
97 | .max_uV = 1800000, | ||
98 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
99 | | REGULATOR_MODE_STANDBY, | ||
100 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
101 | | REGULATOR_CHANGE_STATUS, | ||
102 | }, | ||
103 | .num_consumer_supplies = ARRAY_SIZE(omap3_vdda_dac_supplies), | ||
104 | .consumer_supplies = omap3_vdda_dac_supplies, | ||
105 | }; | ||
106 | |||
107 | static struct regulator_consumer_supply omap3_vpll2_supplies[] = { | ||
108 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
109 | REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), | ||
110 | }; | ||
111 | |||
112 | static struct regulator_init_data omap3_vpll2_idata = { | ||
113 | .constraints = { | ||
114 | .min_uV = 1800000, | ||
115 | .max_uV = 1800000, | ||
116 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
117 | | REGULATOR_MODE_STANDBY, | ||
118 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
119 | | REGULATOR_CHANGE_STATUS, | ||
120 | }, | ||
121 | .num_consumer_supplies = ARRAY_SIZE(omap3_vpll2_supplies), | ||
122 | .consumer_supplies = omap3_vpll2_supplies, | ||
123 | }; | ||
124 | |||
125 | static struct regulator_init_data omap4_vdac_idata = { | ||
126 | .constraints = { | ||
127 | .min_uV = 1800000, | ||
128 | .max_uV = 1800000, | ||
129 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
130 | | REGULATOR_MODE_STANDBY, | ||
131 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
132 | | REGULATOR_CHANGE_STATUS, | ||
133 | }, | ||
134 | }; | ||
135 | |||
136 | static struct regulator_init_data omap4_vaux2_idata = { | ||
137 | .constraints = { | ||
138 | .min_uV = 1200000, | ||
139 | .max_uV = 2800000, | ||
140 | .apply_uV = true, | ||
141 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
142 | | REGULATOR_MODE_STANDBY, | ||
143 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
144 | | REGULATOR_CHANGE_MODE | ||
145 | | REGULATOR_CHANGE_STATUS, | ||
146 | }, | ||
147 | }; | ||
148 | |||
149 | static struct regulator_init_data omap4_vaux3_idata = { | ||
150 | .constraints = { | ||
151 | .min_uV = 1000000, | ||
152 | .max_uV = 3000000, | ||
153 | .apply_uV = true, | ||
154 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
155 | | REGULATOR_MODE_STANDBY, | ||
156 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
157 | | REGULATOR_CHANGE_MODE | ||
158 | | REGULATOR_CHANGE_STATUS, | ||
159 | }, | ||
160 | }; | ||
161 | |||
162 | static struct regulator_consumer_supply omap4_vmmc_supply[] = { | ||
163 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), | ||
164 | }; | ||
165 | |||
166 | /* VMMC1 for MMC1 card */ | ||
167 | static struct regulator_init_data omap4_vmmc_idata = { | ||
168 | .constraints = { | ||
169 | .min_uV = 1200000, | ||
170 | .max_uV = 3000000, | ||
171 | .apply_uV = true, | ||
172 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
173 | | REGULATOR_MODE_STANDBY, | ||
174 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
175 | | REGULATOR_CHANGE_MODE | ||
176 | | REGULATOR_CHANGE_STATUS, | ||
177 | }, | ||
178 | .num_consumer_supplies = ARRAY_SIZE(omap4_vmmc_supply), | ||
179 | .consumer_supplies = omap4_vmmc_supply, | ||
180 | }; | ||
181 | |||
182 | static struct regulator_init_data omap4_vpp_idata = { | ||
183 | .constraints = { | ||
184 | .min_uV = 1800000, | ||
185 | .max_uV = 2500000, | ||
186 | .apply_uV = true, | ||
187 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
188 | | REGULATOR_MODE_STANDBY, | ||
189 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
190 | | REGULATOR_CHANGE_MODE | ||
191 | | REGULATOR_CHANGE_STATUS, | ||
192 | }, | ||
193 | }; | ||
194 | |||
195 | static struct regulator_init_data omap4_vana_idata = { | ||
196 | .constraints = { | ||
197 | .min_uV = 2100000, | ||
198 | .max_uV = 2100000, | ||
199 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
200 | | REGULATOR_MODE_STANDBY, | ||
201 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
202 | | REGULATOR_CHANGE_STATUS, | ||
203 | }, | ||
204 | }; | ||
205 | |||
206 | static struct regulator_init_data omap4_vcxio_idata = { | ||
207 | .constraints = { | ||
208 | .min_uV = 1800000, | ||
209 | .max_uV = 1800000, | ||
210 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
211 | | REGULATOR_MODE_STANDBY, | ||
212 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
213 | | REGULATOR_CHANGE_STATUS, | ||
214 | }, | ||
215 | }; | ||
216 | |||
217 | static struct regulator_init_data omap4_vusb_idata = { | ||
218 | .constraints = { | ||
219 | .min_uV = 3300000, | ||
220 | .max_uV = 3300000, | ||
221 | .apply_uV = true, | ||
222 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
223 | | REGULATOR_MODE_STANDBY, | ||
224 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
225 | | REGULATOR_CHANGE_STATUS, | ||
226 | }, | ||
227 | }; | ||
228 | |||
229 | static struct regulator_init_data omap4_clk32kg_idata = { | ||
230 | .constraints = { | ||
231 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
232 | }, | ||
233 | }; | ||
234 | |||
235 | void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, | ||
236 | u32 pdata_flags, u32 regulators_flags) | ||
237 | { | ||
238 | if (!pmic_data->irq_base) | ||
239 | pmic_data->irq_base = TWL6030_IRQ_BASE; | ||
240 | if (!pmic_data->irq_end) | ||
241 | pmic_data->irq_end = TWL6030_IRQ_END; | ||
242 | |||
243 | /* Common platform data configurations */ | ||
244 | if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb) | ||
245 | pmic_data->usb = &omap4_usb_pdata; | ||
246 | |||
247 | /* Common regulator configurations */ | ||
248 | if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac) | ||
249 | pmic_data->vdac = &omap4_vdac_idata; | ||
250 | |||
251 | if (regulators_flags & TWL_COMMON_REGULATOR_VAUX2 && !pmic_data->vaux2) | ||
252 | pmic_data->vaux2 = &omap4_vaux2_idata; | ||
253 | |||
254 | if (regulators_flags & TWL_COMMON_REGULATOR_VAUX3 && !pmic_data->vaux3) | ||
255 | pmic_data->vaux3 = &omap4_vaux3_idata; | ||
256 | |||
257 | if (regulators_flags & TWL_COMMON_REGULATOR_VMMC && !pmic_data->vmmc) | ||
258 | pmic_data->vmmc = &omap4_vmmc_idata; | ||
259 | |||
260 | if (regulators_flags & TWL_COMMON_REGULATOR_VPP && !pmic_data->vpp) | ||
261 | pmic_data->vpp = &omap4_vpp_idata; | ||
262 | |||
263 | if (regulators_flags & TWL_COMMON_REGULATOR_VANA && !pmic_data->vana) | ||
264 | pmic_data->vana = &omap4_vana_idata; | ||
265 | |||
266 | if (regulators_flags & TWL_COMMON_REGULATOR_VCXIO && !pmic_data->vcxio) | ||
267 | pmic_data->vcxio = &omap4_vcxio_idata; | ||
268 | |||
269 | if (regulators_flags & TWL_COMMON_REGULATOR_VUSB && !pmic_data->vusb) | ||
270 | pmic_data->vusb = &omap4_vusb_idata; | ||
271 | |||
272 | if (regulators_flags & TWL_COMMON_REGULATOR_CLK32KG && | ||
273 | !pmic_data->clk32kg) | ||
274 | pmic_data->clk32kg = &omap4_clk32kg_idata; | ||
275 | } | ||
276 | |||
277 | void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, | ||
278 | u32 pdata_flags, u32 regulators_flags) | ||
279 | { | ||
280 | if (!pmic_data->irq_base) | ||
281 | pmic_data->irq_base = TWL4030_IRQ_BASE; | ||
282 | if (!pmic_data->irq_end) | ||
283 | pmic_data->irq_end = TWL4030_IRQ_END; | ||
284 | |||
285 | /* Common platform data configurations */ | ||
286 | if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb) | ||
287 | pmic_data->usb = &omap3_usb_pdata; | ||
288 | |||
289 | if (pdata_flags & TWL_COMMON_PDATA_BCI && !pmic_data->bci) | ||
290 | pmic_data->bci = &omap3_bci_pdata; | ||
291 | |||
292 | if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc) | ||
293 | pmic_data->madc = &omap3_madc_pdata; | ||
294 | |||
295 | if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->codec) | ||
296 | pmic_data->codec = &omap3_codec_pdata; | ||
297 | |||
298 | /* Common regulator configurations */ | ||
299 | if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac) | ||
300 | pmic_data->vdac = &omap3_vdac_idata; | ||
301 | |||
302 | if (regulators_flags & TWL_COMMON_REGULATOR_VPLL2 && !pmic_data->vpll2) | ||
303 | pmic_data->vpll2 = &omap3_vpll2_idata; | ||
304 | } | ||
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h new file mode 100644 index 000000000000..5e83a5bd37fb --- /dev/null +++ b/arch/arm/mach-omap2/twl-common.h | |||
@@ -0,0 +1,59 @@ | |||
1 | #ifndef __OMAP_PMIC_COMMON__ | ||
2 | #define __OMAP_PMIC_COMMON__ | ||
3 | |||
4 | #define TWL_COMMON_PDATA_USB (1 << 0) | ||
5 | #define TWL_COMMON_PDATA_BCI (1 << 1) | ||
6 | #define TWL_COMMON_PDATA_MADC (1 << 2) | ||
7 | #define TWL_COMMON_PDATA_AUDIO (1 << 3) | ||
8 | |||
9 | /* Common LDO regulators for TWL4030/TWL6030 */ | ||
10 | #define TWL_COMMON_REGULATOR_VDAC (1 << 0) | ||
11 | #define TWL_COMMON_REGULATOR_VAUX1 (1 << 1) | ||
12 | #define TWL_COMMON_REGULATOR_VAUX2 (1 << 2) | ||
13 | #define TWL_COMMON_REGULATOR_VAUX3 (1 << 3) | ||
14 | |||
15 | /* TWL6030 LDO regulators */ | ||
16 | #define TWL_COMMON_REGULATOR_VMMC (1 << 4) | ||
17 | #define TWL_COMMON_REGULATOR_VPP (1 << 5) | ||
18 | #define TWL_COMMON_REGULATOR_VUSIM (1 << 6) | ||
19 | #define TWL_COMMON_REGULATOR_VANA (1 << 7) | ||
20 | #define TWL_COMMON_REGULATOR_VCXIO (1 << 8) | ||
21 | #define TWL_COMMON_REGULATOR_VUSB (1 << 9) | ||
22 | #define TWL_COMMON_REGULATOR_CLK32KG (1 << 10) | ||
23 | |||
24 | /* TWL4030 LDO regulators */ | ||
25 | #define TWL_COMMON_REGULATOR_VPLL1 (1 << 4) | ||
26 | #define TWL_COMMON_REGULATOR_VPLL2 (1 << 5) | ||
27 | |||
28 | |||
29 | struct twl4030_platform_data; | ||
30 | |||
31 | void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq, | ||
32 | struct twl4030_platform_data *pmic_data); | ||
33 | |||
34 | static inline void omap2_pmic_init(const char *pmic_type, | ||
35 | struct twl4030_platform_data *pmic_data) | ||
36 | { | ||
37 | omap_pmic_init(2, 2600, pmic_type, INT_24XX_SYS_NIRQ, pmic_data); | ||
38 | } | ||
39 | |||
40 | static inline void omap3_pmic_init(const char *pmic_type, | ||
41 | struct twl4030_platform_data *pmic_data) | ||
42 | { | ||
43 | omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data); | ||
44 | } | ||
45 | |||
46 | static inline void omap4_pmic_init(const char *pmic_type, | ||
47 | struct twl4030_platform_data *pmic_data) | ||
48 | { | ||
49 | /* Phoenix Audio IC needs I2C1 to start with 400 KHz or less */ | ||
50 | omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data); | ||
51 | } | ||
52 | |||
53 | void omap3_pmic_get_config(struct twl4030_platform_data *pmic_data, | ||
54 | u32 pdata_flags, u32 regulators_flags); | ||
55 | |||
56 | void omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, | ||
57 | u32 pdata_flags, u32 regulators_flags); | ||
58 | |||
59 | #endif /* __OMAP_PMIC_COMMON__ */ | ||
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index b2248e76ec8b..b199596f9c3d 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c | |||
@@ -12,6 +12,7 @@ | |||
12 | * it under the terms of the GNU General Public License version 2 as | 12 | * it under the terms of the GNU General Public License version 2 as |
13 | * published by the Free Software Foundation. | 13 | * published by the Free Software Foundation. |
14 | */ | 14 | */ |
15 | #define pr_fmt(fmt) "%s: " fmt, __func__ | ||
15 | 16 | ||
16 | #include <linux/module.h> | 17 | #include <linux/module.h> |
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
@@ -161,10 +162,10 @@ static mfp_cfg_t cm_x3xx_mfp_cfg[] __initdata = { | |||
161 | GPIO99_GPIO, /* Ethernet IRQ */ | 162 | GPIO99_GPIO, /* Ethernet IRQ */ |
162 | 163 | ||
163 | /* RTC GPIOs */ | 164 | /* RTC GPIOs */ |
164 | GPIO95_GPIO, /* RTC CS */ | 165 | GPIO95_GPIO | MFP_LPM_DRIVE_HIGH, /* RTC CS */ |
165 | GPIO96_GPIO, /* RTC WR */ | 166 | GPIO96_GPIO | MFP_LPM_DRIVE_HIGH, /* RTC WR */ |
166 | GPIO97_GPIO, /* RTC RD */ | 167 | GPIO97_GPIO | MFP_LPM_DRIVE_HIGH, /* RTC RD */ |
167 | GPIO98_GPIO, /* RTC IO */ | 168 | GPIO98_GPIO, /* RTC IO */ |
168 | 169 | ||
169 | /* Standard I2C */ | 170 | /* Standard I2C */ |
170 | GPIO21_I2C_SCL, | 171 | GPIO21_I2C_SCL, |
@@ -484,14 +485,13 @@ static int cm_x300_ulpi_phy_reset(void) | |||
484 | int err; | 485 | int err; |
485 | 486 | ||
486 | /* reset the PHY */ | 487 | /* reset the PHY */ |
487 | err = gpio_request(GPIO_ULPI_PHY_RST, "ulpi reset"); | 488 | err = gpio_request_one(GPIO_ULPI_PHY_RST, GPIOF_OUT_INIT_LOW, |
489 | "ulpi reset"); | ||
488 | if (err) { | 490 | if (err) { |
489 | pr_err("%s: failed to request ULPI reset GPIO: %d\n", | 491 | pr_err("failed to request ULPI reset GPIO: %d\n", err); |
490 | __func__, err); | ||
491 | return err; | 492 | return err; |
492 | } | 493 | } |
493 | 494 | ||
494 | gpio_direction_output(GPIO_ULPI_PHY_RST, 0); | ||
495 | msleep(10); | 495 | msleep(10); |
496 | gpio_set_value(GPIO_ULPI_PHY_RST, 1); | 496 | gpio_set_value(GPIO_ULPI_PHY_RST, 1); |
497 | msleep(10); | 497 | msleep(10); |
@@ -510,8 +510,7 @@ static inline int cm_x300_u2d_init(struct device *dev) | |||
510 | pout_clk = clk_get(NULL, "CLK_POUT"); | 510 | pout_clk = clk_get(NULL, "CLK_POUT"); |
511 | if (IS_ERR(pout_clk)) { | 511 | if (IS_ERR(pout_clk)) { |
512 | err = PTR_ERR(pout_clk); | 512 | err = PTR_ERR(pout_clk); |
513 | pr_err("%s: failed to get CLK_POUT: %d\n", | 513 | pr_err("failed to get CLK_POUT: %d\n", err); |
514 | __func__, err); | ||
515 | return err; | 514 | return err; |
516 | } | 515 | } |
517 | clk_enable(pout_clk); | 516 | clk_enable(pout_clk); |
@@ -768,39 +767,36 @@ static void __init cm_x300_init_da9030(void) | |||
768 | irq_set_irq_wake(IRQ_WAKEUP0, 1); | 767 | irq_set_irq_wake(IRQ_WAKEUP0, 1); |
769 | } | 768 | } |
770 | 769 | ||
770 | /* wi2wi gpio setting for system_rev >= 130 */ | ||
771 | static struct gpio cm_x300_wi2wi_gpios[] __initdata = { | ||
772 | { 71, GPIOF_OUT_INIT_HIGH, "wlan en" }, | ||
773 | { 70, GPIOF_OUT_INIT_HIGH, "bt reset" }, | ||
774 | }; | ||
775 | |||
771 | static void __init cm_x300_init_wi2wi(void) | 776 | static void __init cm_x300_init_wi2wi(void) |
772 | { | 777 | { |
773 | int bt_reset, wlan_en; | 778 | int bt_reset, wlan_en; |
774 | int err; | 779 | int err; |
775 | 780 | ||
776 | if (system_rev < 130) { | 781 | if (system_rev < 130) { |
777 | wlan_en = 77; | 782 | cm_x300_wi2wi_gpios[0].gpio = 77; /* wlan en */ |
778 | bt_reset = 78; | 783 | cm_x300_wi2wi_gpios[1].gpio = 78; /* bt reset */ |
779 | } else { | ||
780 | wlan_en = 71; | ||
781 | bt_reset = 70; | ||
782 | } | 784 | } |
783 | 785 | ||
784 | /* Libertas and CSR reset */ | 786 | /* Libertas and CSR reset */ |
785 | err = gpio_request(wlan_en, "wlan en"); | 787 | err = gpio_request_array(ARRAY_AND_SIZE(cm_x300_wi2wi_gpios)); |
786 | if (err) { | 788 | if (err) { |
787 | pr_err("CM-X300: failed to request wlan en gpio: %d\n", err); | 789 | pr_err("failed to request wifi/bt gpios: %d\n", err); |
788 | } else { | 790 | return; |
789 | gpio_direction_output(wlan_en, 1); | ||
790 | gpio_free(wlan_en); | ||
791 | } | 791 | } |
792 | 792 | ||
793 | err = gpio_request(bt_reset, "bt reset"); | 793 | udelay(10); |
794 | if (err) { | 794 | gpio_set_value(bt_reset, 0); |
795 | pr_err("CM-X300: failed to request bt reset gpio: %d\n", err); | 795 | udelay(10); |
796 | } else { | 796 | gpio_set_value(bt_reset, 1); |
797 | gpio_direction_output(bt_reset, 1); | 797 | |
798 | udelay(10); | 798 | gpio_free(wlan_en); |
799 | gpio_set_value(bt_reset, 0); | 799 | gpio_free(bt_reset); |
800 | udelay(10); | ||
801 | gpio_set_value(bt_reset, 1); | ||
802 | gpio_free(bt_reset); | ||
803 | } | ||
804 | } | 800 | } |
805 | 801 | ||
806 | /* MFP */ | 802 | /* MFP */ |
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index f941a495a4a8..99960a1814e0 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c | |||
@@ -135,42 +135,6 @@ static unsigned long hx4700_pin_config[] __initdata = { | |||
135 | GPIO66_GPIO, /* nSDIO_IRQ */ | 135 | GPIO66_GPIO, /* nSDIO_IRQ */ |
136 | }; | 136 | }; |
137 | 137 | ||
138 | #define HX4700_GPIO_IN(num, _desc) \ | ||
139 | { .gpio = (num), .dir = 0, .desc = (_desc) } | ||
140 | #define HX4700_GPIO_OUT(num, _init, _desc) \ | ||
141 | { .gpio = (num), .dir = 1, .init = (_init), .desc = (_desc) } | ||
142 | struct gpio_ress { | ||
143 | unsigned gpio : 8; | ||
144 | unsigned dir : 1; | ||
145 | unsigned init : 1; | ||
146 | char *desc; | ||
147 | }; | ||
148 | |||
149 | static int hx4700_gpio_request(struct gpio_ress *gpios, int size) | ||
150 | { | ||
151 | int i, rc = 0; | ||
152 | int gpio; | ||
153 | int dir; | ||
154 | |||
155 | for (i = 0; (!rc) && (i < size); i++) { | ||
156 | gpio = gpios[i].gpio; | ||
157 | dir = gpios[i].dir; | ||
158 | rc = gpio_request(gpio, gpios[i].desc); | ||
159 | if (rc) { | ||
160 | pr_err("Error requesting GPIO %d(%s) : %d\n", | ||
161 | gpio, gpios[i].desc, rc); | ||
162 | continue; | ||
163 | } | ||
164 | if (dir) | ||
165 | gpio_direction_output(gpio, gpios[i].init); | ||
166 | else | ||
167 | gpio_direction_input(gpio); | ||
168 | } | ||
169 | while ((rc) && (--i >= 0)) | ||
170 | gpio_free(gpios[i].gpio); | ||
171 | return rc; | ||
172 | } | ||
173 | |||
174 | /* | 138 | /* |
175 | * IRDA | 139 | * IRDA |
176 | */ | 140 | */ |
@@ -829,26 +793,30 @@ static struct platform_device *devices[] __initdata = { | |||
829 | &pcmcia, | 793 | &pcmcia, |
830 | }; | 794 | }; |
831 | 795 | ||
832 | static struct gpio_ress global_gpios[] = { | 796 | static struct gpio global_gpios[] = { |
833 | HX4700_GPIO_IN(GPIO12_HX4700_ASIC3_IRQ, "ASIC3_IRQ"), | 797 | { GPIO12_HX4700_ASIC3_IRQ, GPIOF_IN, "ASIC3_IRQ" }, |
834 | HX4700_GPIO_IN(GPIO13_HX4700_W3220_IRQ, "W3220_IRQ"), | 798 | { GPIO13_HX4700_W3220_IRQ, GPIOF_IN, "W3220_IRQ" }, |
835 | HX4700_GPIO_IN(GPIO14_HX4700_nWLAN_IRQ, "WLAN_IRQ"), | 799 | { GPIO14_HX4700_nWLAN_IRQ, GPIOF_IN, "WLAN_IRQ" }, |
836 | HX4700_GPIO_OUT(GPIO59_HX4700_LCD_PC1, 1, "LCD_PC1"), | 800 | { GPIO59_HX4700_LCD_PC1, GPIOF_OUT_INIT_HIGH, "LCD_PC1" }, |
837 | HX4700_GPIO_OUT(GPIO62_HX4700_LCD_nRESET, 1, "LCD_RESET"), | 801 | { GPIO62_HX4700_LCD_nRESET, GPIOF_OUT_INIT_HIGH, "LCD_RESET" }, |
838 | HX4700_GPIO_OUT(GPIO70_HX4700_LCD_SLIN1, 1, "LCD_SLIN1"), | 802 | { GPIO70_HX4700_LCD_SLIN1, GPIOF_OUT_INIT_HIGH, "LCD_SLIN1" }, |
839 | HX4700_GPIO_OUT(GPIO84_HX4700_LCD_SQN, 1, "LCD_SQN"), | 803 | { GPIO84_HX4700_LCD_SQN, GPIOF_OUT_INIT_HIGH, "LCD_SQN" }, |
840 | HX4700_GPIO_OUT(GPIO110_HX4700_LCD_LVDD_3V3_ON, 1, "LCD_LVDD"), | 804 | { GPIO110_HX4700_LCD_LVDD_3V3_ON, GPIOF_OUT_INIT_HIGH, "LCD_LVDD" }, |
841 | HX4700_GPIO_OUT(GPIO111_HX4700_LCD_AVDD_3V3_ON, 1, "LCD_AVDD"), | 805 | { GPIO111_HX4700_LCD_AVDD_3V3_ON, GPIOF_OUT_INIT_HIGH, "LCD_AVDD" }, |
842 | HX4700_GPIO_OUT(GPIO32_HX4700_RS232_ON, 1, "RS232_ON"), | 806 | { GPIO32_HX4700_RS232_ON, GPIOF_OUT_INIT_HIGH, "RS232_ON" }, |
843 | HX4700_GPIO_OUT(GPIO71_HX4700_ASIC3_nRESET, 1, "ASIC3_nRESET"), | 807 | { GPIO71_HX4700_ASIC3_nRESET, GPIOF_OUT_INIT_HIGH, "ASIC3_nRESET" }, |
844 | HX4700_GPIO_OUT(GPIO82_HX4700_EUART_RESET, 1, "EUART_RESET"), | 808 | { GPIO82_HX4700_EUART_RESET, GPIOF_OUT_INIT_HIGH, "EUART_RESET" }, |
845 | HX4700_GPIO_OUT(GPIO105_HX4700_nIR_ON, 1, "nIR_EN"), | 809 | { GPIO105_HX4700_nIR_ON, GPIOF_OUT_INIT_HIGH, "nIR_EN" }, |
846 | }; | 810 | }; |
847 | 811 | ||
848 | static void __init hx4700_init(void) | 812 | static void __init hx4700_init(void) |
849 | { | 813 | { |
814 | int ret; | ||
815 | |||
850 | pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config)); | 816 | pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config)); |
851 | hx4700_gpio_request(ARRAY_AND_SIZE(global_gpios)); | 817 | ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios)); |
818 | if (ret) | ||
819 | pr_err ("hx4700: Failed to request GPIOs.\n"); | ||
852 | 820 | ||
853 | pxa_set_ffuart_info(NULL); | 821 | pxa_set_ffuart_info(NULL); |
854 | pxa_set_btuart_info(NULL); | 822 | pxa_set_btuart_info(NULL); |
diff --git a/arch/arm/mach-pxa/include/mach/magician.h b/arch/arm/mach-pxa/include/mach/magician.h index 0a2efcf7947c..7cbfc5d3f9df 100644 --- a/arch/arm/mach-pxa/include/mach/magician.h +++ b/arch/arm/mach-pxa/include/mach/magician.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #ifndef _MAGICIAN_H_ | 12 | #ifndef _MAGICIAN_H_ |
13 | #define _MAGICIAN_H_ | 13 | #define _MAGICIAN_H_ |
14 | 14 | ||
15 | #include <linux/gpio.h> | ||
15 | #include <mach/irqs.h> | 16 | #include <mach/irqs.h> |
16 | 17 | ||
17 | /* | 18 | /* |
@@ -77,7 +78,7 @@ | |||
77 | * CPLD EGPIOs | 78 | * CPLD EGPIOs |
78 | */ | 79 | */ |
79 | 80 | ||
80 | #define MAGICIAN_EGPIO_BASE 0x80 /* GPIO_BOARD_START */ | 81 | #define MAGICIAN_EGPIO_BASE NR_BUILTIN_GPIO |
81 | #define MAGICIAN_EGPIO(reg,bit) \ | 82 | #define MAGICIAN_EGPIO(reg,bit) \ |
82 | (MAGICIAN_EGPIO_BASE + 8*reg + bit) | 83 | (MAGICIAN_EGPIO_BASE + 8*reg + bit) |
83 | 84 | ||
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index e1920572948a..0e42798942f7 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c | |||
@@ -344,22 +344,14 @@ static struct pxafb_mach_info samsung_info = { | |||
344 | * Backlight | 344 | * Backlight |
345 | */ | 345 | */ |
346 | 346 | ||
347 | static struct gpio magician_bl_gpios[] = { | ||
348 | { EGPIO_MAGICIAN_BL_POWER, GPIOF_DIR_OUT, "Backlight power" }, | ||
349 | { EGPIO_MAGICIAN_BL_POWER2, GPIOF_DIR_OUT, "Backlight power 2" }, | ||
350 | }; | ||
351 | |||
347 | static int magician_backlight_init(struct device *dev) | 352 | static int magician_backlight_init(struct device *dev) |
348 | { | 353 | { |
349 | int ret; | 354 | return gpio_request_array(ARRAY_AND_SIZE(magician_bl_gpios)); |
350 | |||
351 | ret = gpio_request(EGPIO_MAGICIAN_BL_POWER, "BL_POWER"); | ||
352 | if (ret) | ||
353 | goto err; | ||
354 | ret = gpio_request(EGPIO_MAGICIAN_BL_POWER2, "BL_POWER2"); | ||
355 | if (ret) | ||
356 | goto err2; | ||
357 | return 0; | ||
358 | |||
359 | err2: | ||
360 | gpio_free(EGPIO_MAGICIAN_BL_POWER); | ||
361 | err: | ||
362 | return ret; | ||
363 | } | 355 | } |
364 | 356 | ||
365 | static int magician_backlight_notify(struct device *dev, int brightness) | 357 | static int magician_backlight_notify(struct device *dev, int brightness) |
@@ -376,8 +368,7 @@ static int magician_backlight_notify(struct device *dev, int brightness) | |||
376 | 368 | ||
377 | static void magician_backlight_exit(struct device *dev) | 369 | static void magician_backlight_exit(struct device *dev) |
378 | { | 370 | { |
379 | gpio_free(EGPIO_MAGICIAN_BL_POWER); | 371 | gpio_free_array(ARRAY_AND_SIZE(magician_bl_gpios)); |
380 | gpio_free(EGPIO_MAGICIAN_BL_POWER2); | ||
381 | } | 372 | } |
382 | 373 | ||
383 | static struct platform_pwm_backlight_data backlight_data = { | 374 | static struct platform_pwm_backlight_data backlight_data = { |
@@ -712,16 +703,25 @@ static struct platform_device *devices[] __initdata = { | |||
712 | &leds_gpio, | 703 | &leds_gpio, |
713 | }; | 704 | }; |
714 | 705 | ||
706 | static struct gpio magician_global_gpios[] = { | ||
707 | { GPIO13_MAGICIAN_CPLD_IRQ, GPIOF_IN, "CPLD_IRQ" }, | ||
708 | { GPIO107_MAGICIAN_DS1WM_IRQ, GPIOF_IN, "DS1WM_IRQ" }, | ||
709 | { GPIO104_MAGICIAN_LCD_POWER_1, GPIOF_OUT_INIT_LOW, "LCD power 1" }, | ||
710 | { GPIO105_MAGICIAN_LCD_POWER_2, GPIOF_OUT_INIT_LOW, "LCD power 2" }, | ||
711 | { GPIO106_MAGICIAN_LCD_POWER_3, GPIOF_OUT_INIT_LOW, "LCD power 3" }, | ||
712 | { GPIO83_MAGICIAN_nIR_EN, GPIOF_OUT_INIT_HIGH, "nIR_EN" }, | ||
713 | }; | ||
714 | |||
715 | static void __init magician_init(void) | 715 | static void __init magician_init(void) |
716 | { | 716 | { |
717 | void __iomem *cpld; | 717 | void __iomem *cpld; |
718 | int lcd_select; | 718 | int lcd_select; |
719 | int err; | 719 | int err; |
720 | 720 | ||
721 | gpio_request(GPIO13_MAGICIAN_CPLD_IRQ, "CPLD_IRQ"); | ||
722 | gpio_request(GPIO107_MAGICIAN_DS1WM_IRQ, "DS1WM_IRQ"); | ||
723 | |||
724 | pxa2xx_mfp_config(ARRAY_AND_SIZE(magician_pin_config)); | 721 | pxa2xx_mfp_config(ARRAY_AND_SIZE(magician_pin_config)); |
722 | err = gpio_request_array(ARRAY_AND_SIZE(magician_global_gpios)); | ||
723 | if (err) | ||
724 | pr_err("magician: Failed to request GPIOs: %d\n", err); | ||
725 | 725 | ||
726 | pxa_set_ffuart_info(NULL); | 726 | pxa_set_ffuart_info(NULL); |
727 | pxa_set_btuart_info(NULL); | 727 | pxa_set_btuart_info(NULL); |
@@ -729,11 +729,7 @@ static void __init magician_init(void) | |||
729 | 729 | ||
730 | platform_add_devices(ARRAY_AND_SIZE(devices)); | 730 | platform_add_devices(ARRAY_AND_SIZE(devices)); |
731 | 731 | ||
732 | err = gpio_request(GPIO83_MAGICIAN_nIR_EN, "nIR_EN"); | 732 | pxa_set_ficp_info(&magician_ficp_info); |
733 | if (!err) { | ||
734 | gpio_direction_output(GPIO83_MAGICIAN_nIR_EN, 1); | ||
735 | pxa_set_ficp_info(&magician_ficp_info); | ||
736 | } | ||
737 | pxa27x_set_i2c_power_info(NULL); | 733 | pxa27x_set_i2c_power_info(NULL); |
738 | pxa_set_i2c_info(&i2c_info); | 734 | pxa_set_i2c_info(&i2c_info); |
739 | pxa_set_mci_info(&magician_mci_info); | 735 | pxa_set_mci_info(&magician_mci_info); |
@@ -747,16 +743,9 @@ static void __init magician_init(void) | |||
747 | system_rev = board_id & 0x7; | 743 | system_rev = board_id & 0x7; |
748 | lcd_select = board_id & 0x8; | 744 | lcd_select = board_id & 0x8; |
749 | pr_info("LCD type: %s\n", lcd_select ? "Samsung" : "Toppoly"); | 745 | pr_info("LCD type: %s\n", lcd_select ? "Samsung" : "Toppoly"); |
750 | if (lcd_select && (system_rev < 3)) { | 746 | if (lcd_select && (system_rev < 3)) |
751 | gpio_request(GPIO75_MAGICIAN_SAMSUNG_POWER, "SAMSUNG_POWER"); | 747 | gpio_request_one(GPIO75_MAGICIAN_SAMSUNG_POWER, |
752 | gpio_direction_output(GPIO75_MAGICIAN_SAMSUNG_POWER, 0); | 748 | GPIOF_OUT_INIT_LOW, "SAMSUNG_POWER"); |
753 | } | ||
754 | gpio_request(GPIO104_MAGICIAN_LCD_POWER_1, "LCD_POWER_1"); | ||
755 | gpio_request(GPIO105_MAGICIAN_LCD_POWER_2, "LCD_POWER_2"); | ||
756 | gpio_request(GPIO106_MAGICIAN_LCD_POWER_3, "LCD_POWER_3"); | ||
757 | gpio_direction_output(GPIO104_MAGICIAN_LCD_POWER_1, 0); | ||
758 | gpio_direction_output(GPIO105_MAGICIAN_LCD_POWER_2, 0); | ||
759 | gpio_direction_output(GPIO106_MAGICIAN_LCD_POWER_3, 0); | ||
760 | pxa_set_fb_info(NULL, lcd_select ? &samsung_info : &toppoly_info); | 749 | pxa_set_fb_info(NULL, lcd_select ? &samsung_info : &toppoly_info); |
761 | } else | 750 | } else |
762 | pr_err("LCD detection: CPLD mapping failed\n"); | 751 | pr_err("LCD detection: CPLD mapping failed\n"); |
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index e3470137c934..aa67637ae41d 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
@@ -177,50 +177,6 @@ static unsigned long mioa701_pin_config[] = { | |||
177 | MFP_CFG_OUT(GPIO116, AF0, DRIVE_HIGH), | 177 | MFP_CFG_OUT(GPIO116, AF0, DRIVE_HIGH), |
178 | }; | 178 | }; |
179 | 179 | ||
180 | #define MIO_GPIO_IN(num, _desc) \ | ||
181 | { .gpio = (num), .dir = 0, .desc = (_desc) } | ||
182 | #define MIO_GPIO_OUT(num, _init, _desc) \ | ||
183 | { .gpio = (num), .dir = 1, .init = (_init), .desc = (_desc) } | ||
184 | struct gpio_ress { | ||
185 | unsigned gpio : 8; | ||
186 | unsigned dir : 1; | ||
187 | unsigned init : 1; | ||
188 | char *desc; | ||
189 | }; | ||
190 | |||
191 | static int mio_gpio_request(struct gpio_ress *gpios, int size) | ||
192 | { | ||
193 | int i, rc = 0; | ||
194 | int gpio; | ||
195 | int dir; | ||
196 | |||
197 | for (i = 0; (!rc) && (i < size); i++) { | ||
198 | gpio = gpios[i].gpio; | ||
199 | dir = gpios[i].dir; | ||
200 | rc = gpio_request(gpio, gpios[i].desc); | ||
201 | if (rc) { | ||
202 | printk(KERN_ERR "Error requesting GPIO %d(%s) : %d\n", | ||
203 | gpio, gpios[i].desc, rc); | ||
204 | continue; | ||
205 | } | ||
206 | if (dir) | ||
207 | gpio_direction_output(gpio, gpios[i].init); | ||
208 | else | ||
209 | gpio_direction_input(gpio); | ||
210 | } | ||
211 | while ((rc) && (--i >= 0)) | ||
212 | gpio_free(gpios[i].gpio); | ||
213 | return rc; | ||
214 | } | ||
215 | |||
216 | static void mio_gpio_free(struct gpio_ress *gpios, int size) | ||
217 | { | ||
218 | int i; | ||
219 | |||
220 | for (i = 0; i < size; i++) | ||
221 | gpio_free(gpios[i].gpio); | ||
222 | } | ||
223 | |||
224 | /* LCD Screen and Backlight */ | 180 | /* LCD Screen and Backlight */ |
225 | static struct platform_pwm_backlight_data mioa701_backlight_data = { | 181 | static struct platform_pwm_backlight_data mioa701_backlight_data = { |
226 | .pwm_id = 0, | 182 | .pwm_id = 0, |
@@ -346,16 +302,16 @@ irqreturn_t gsm_on_irq(int irq, void *p) | |||
346 | return IRQ_HANDLED; | 302 | return IRQ_HANDLED; |
347 | } | 303 | } |
348 | 304 | ||
349 | struct gpio_ress gsm_gpios[] = { | 305 | static struct gpio gsm_gpios[] = { |
350 | MIO_GPIO_IN(GPIO25_GSM_MOD_ON_STATE, "GSM state"), | 306 | { GPIO25_GSM_MOD_ON_STATE, GPIOF_IN, "GSM state" }, |
351 | MIO_GPIO_IN(GPIO113_GSM_EVENT, "GSM event"), | 307 | { GPIO113_GSM_EVENT, GPIOF_IN, "GSM event" }, |
352 | }; | 308 | }; |
353 | 309 | ||
354 | static int __init gsm_init(void) | 310 | static int __init gsm_init(void) |
355 | { | 311 | { |
356 | int rc; | 312 | int rc; |
357 | 313 | ||
358 | rc = mio_gpio_request(ARRAY_AND_SIZE(gsm_gpios)); | 314 | rc = gpio_request_array(ARRAY_AND_SIZE(gsm_gpios)); |
359 | if (rc) | 315 | if (rc) |
360 | goto err_gpio; | 316 | goto err_gpio; |
361 | rc = request_irq(gpio_to_irq(GPIO25_GSM_MOD_ON_STATE), gsm_on_irq, | 317 | rc = request_irq(gpio_to_irq(GPIO25_GSM_MOD_ON_STATE), gsm_on_irq, |
@@ -369,7 +325,7 @@ static int __init gsm_init(void) | |||
369 | 325 | ||
370 | err_irq: | 326 | err_irq: |
371 | printk(KERN_ERR "Mioa701: Can't request GSM_ON irq\n"); | 327 | printk(KERN_ERR "Mioa701: Can't request GSM_ON irq\n"); |
372 | mio_gpio_free(ARRAY_AND_SIZE(gsm_gpios)); | 328 | gpio_free_array(ARRAY_AND_SIZE(gsm_gpios)); |
373 | err_gpio: | 329 | err_gpio: |
374 | printk(KERN_ERR "Mioa701: gsm not available\n"); | 330 | printk(KERN_ERR "Mioa701: gsm not available\n"); |
375 | return rc; | 331 | return rc; |
@@ -378,7 +334,7 @@ err_gpio: | |||
378 | static void gsm_exit(void) | 334 | static void gsm_exit(void) |
379 | { | 335 | { |
380 | free_irq(gpio_to_irq(GPIO25_GSM_MOD_ON_STATE), NULL); | 336 | free_irq(gpio_to_irq(GPIO25_GSM_MOD_ON_STATE), NULL); |
381 | mio_gpio_free(ARRAY_AND_SIZE(gsm_gpios)); | 337 | gpio_free_array(ARRAY_AND_SIZE(gsm_gpios)); |
382 | } | 338 | } |
383 | 339 | ||
384 | /* | 340 | /* |
@@ -749,14 +705,16 @@ static void mioa701_restart(char c, const char *cmd) | |||
749 | arm_machine_restart('s', cmd); | 705 | arm_machine_restart('s', cmd); |
750 | } | 706 | } |
751 | 707 | ||
752 | static struct gpio_ress global_gpios[] = { | 708 | static struct gpio global_gpios[] = { |
753 | MIO_GPIO_OUT(GPIO9_CHARGE_EN, 1, "Charger enable"), | 709 | { GPIO9_CHARGE_EN, GPIOF_OUT_INIT_HIGH, "Charger enable" }, |
754 | MIO_GPIO_OUT(GPIO18_POWEROFF, 0, "Power Off"), | 710 | { GPIO18_POWEROFF, GPIOF_OUT_INIT_LOW, "Power Off" }, |
755 | MIO_GPIO_OUT(GPIO87_LCD_POWER, 0, "LCD Power"), | 711 | { GPIO87_LCD_POWER, GPIOF_OUT_INIT_LOW, "LCD Power" }, |
756 | }; | 712 | }; |
757 | 713 | ||
758 | static void __init mioa701_machine_init(void) | 714 | static void __init mioa701_machine_init(void) |
759 | { | 715 | { |
716 | int rc; | ||
717 | |||
760 | PSLR = 0xff100000; /* SYSDEL=125ms, PWRDEL=125ms, PSLR_SL_ROD=1 */ | 718 | PSLR = 0xff100000; /* SYSDEL=125ms, PWRDEL=125ms, PSLR_SL_ROD=1 */ |
761 | PCFR = PCFR_DC_EN | PCFR_GPR_EN | PCFR_OPDE; | 719 | PCFR = PCFR_DC_EN | PCFR_GPR_EN | PCFR_OPDE; |
762 | RTTR = 32768 - 1; /* Reset crazy WinCE value */ | 720 | RTTR = 32768 - 1; /* Reset crazy WinCE value */ |
@@ -766,7 +724,9 @@ static void __init mioa701_machine_init(void) | |||
766 | pxa_set_ffuart_info(NULL); | 724 | pxa_set_ffuart_info(NULL); |
767 | pxa_set_btuart_info(NULL); | 725 | pxa_set_btuart_info(NULL); |
768 | pxa_set_stuart_info(NULL); | 726 | pxa_set_stuart_info(NULL); |
769 | mio_gpio_request(ARRAY_AND_SIZE(global_gpios)); | 727 | rc = gpio_request_array(ARRAY_AND_SIZE(global_gpios)); |
728 | if (rc) | ||
729 | pr_err("MioA701: Failed to request GPIOs: %d", rc); | ||
770 | bootstrap_init(); | 730 | bootstrap_init(); |
771 | pxa_set_fb_info(NULL, &mioa701_pxafb_info); | 731 | pxa_set_fb_info(NULL, &mioa701_pxafb_info); |
772 | pxa_set_mci_info(&mioa701_mci_info); | 732 | pxa_set_mci_info(&mioa701_mci_info); |
diff --git a/arch/arm/mach-pxa/saarb.c b/arch/arm/mach-pxa/saarb.c index 9322fe527c7f..e53a3334c944 100644 --- a/arch/arm/mach-pxa/saarb.c +++ b/arch/arm/mach-pxa/saarb.c | |||
@@ -104,7 +104,7 @@ static void __init saarb_init(void) | |||
104 | 104 | ||
105 | MACHINE_START(SAARB, "PXA955 Handheld Platform (aka SAARB)") | 105 | MACHINE_START(SAARB, "PXA955 Handheld Platform (aka SAARB)") |
106 | .boot_params = 0xa0000100, | 106 | .boot_params = 0xa0000100, |
107 | .map_io = pxa_map_io, | 107 | .map_io = pxa3xx_map_io, |
108 | .nr_irqs = SAARB_NR_IRQS, | 108 | .nr_irqs = SAARB_NR_IRQS, |
109 | .init_irq = pxa95x_init_irq, | 109 | .init_irq = pxa95x_init_irq, |
110 | .timer = &pxa_timer, | 110 | .timer = &pxa_timer, |
diff --git a/arch/arm/mach-s3c2412/clock.c b/arch/arm/mach-s3c2412/clock.c index 0c0505b025cb..140711db6c89 100644 --- a/arch/arm/mach-s3c2412/clock.c +++ b/arch/arm/mach-s3c2412/clock.c | |||
@@ -95,12 +95,10 @@ static int s3c2412_upll_enable(struct clk *clk, int enable) | |||
95 | 95 | ||
96 | static struct clk clk_erefclk = { | 96 | static struct clk clk_erefclk = { |
97 | .name = "erefclk", | 97 | .name = "erefclk", |
98 | .id = -1, | ||
99 | }; | 98 | }; |
100 | 99 | ||
101 | static struct clk clk_urefclk = { | 100 | static struct clk clk_urefclk = { |
102 | .name = "urefclk", | 101 | .name = "urefclk", |
103 | .id = -1, | ||
104 | }; | 102 | }; |
105 | 103 | ||
106 | static int s3c2412_setparent_usysclk(struct clk *clk, struct clk *parent) | 104 | static int s3c2412_setparent_usysclk(struct clk *clk, struct clk *parent) |
@@ -122,7 +120,6 @@ static int s3c2412_setparent_usysclk(struct clk *clk, struct clk *parent) | |||
122 | 120 | ||
123 | static struct clk clk_usysclk = { | 121 | static struct clk clk_usysclk = { |
124 | .name = "usysclk", | 122 | .name = "usysclk", |
125 | .id = -1, | ||
126 | .parent = &clk_xtal, | 123 | .parent = &clk_xtal, |
127 | .ops = &(struct clk_ops) { | 124 | .ops = &(struct clk_ops) { |
128 | .set_parent = s3c2412_setparent_usysclk, | 125 | .set_parent = s3c2412_setparent_usysclk, |
@@ -132,13 +129,11 @@ static struct clk clk_usysclk = { | |||
132 | static struct clk clk_mrefclk = { | 129 | static struct clk clk_mrefclk = { |
133 | .name = "mrefclk", | 130 | .name = "mrefclk", |
134 | .parent = &clk_xtal, | 131 | .parent = &clk_xtal, |
135 | .id = -1, | ||
136 | }; | 132 | }; |
137 | 133 | ||
138 | static struct clk clk_mdivclk = { | 134 | static struct clk clk_mdivclk = { |
139 | .name = "mdivclk", | 135 | .name = "mdivclk", |
140 | .parent = &clk_xtal, | 136 | .parent = &clk_xtal, |
141 | .id = -1, | ||
142 | }; | 137 | }; |
143 | 138 | ||
144 | static int s3c2412_setparent_usbsrc(struct clk *clk, struct clk *parent) | 139 | static int s3c2412_setparent_usbsrc(struct clk *clk, struct clk *parent) |
@@ -200,7 +195,6 @@ static int s3c2412_setrate_usbsrc(struct clk *clk, unsigned long rate) | |||
200 | 195 | ||
201 | static struct clk clk_usbsrc = { | 196 | static struct clk clk_usbsrc = { |
202 | .name = "usbsrc", | 197 | .name = "usbsrc", |
203 | .id = -1, | ||
204 | .ops = &(struct clk_ops) { | 198 | .ops = &(struct clk_ops) { |
205 | .get_rate = s3c2412_getrate_usbsrc, | 199 | .get_rate = s3c2412_getrate_usbsrc, |
206 | .set_rate = s3c2412_setrate_usbsrc, | 200 | .set_rate = s3c2412_setrate_usbsrc, |
@@ -228,7 +222,6 @@ static int s3c2412_setparent_msysclk(struct clk *clk, struct clk *parent) | |||
228 | 222 | ||
229 | static struct clk clk_msysclk = { | 223 | static struct clk clk_msysclk = { |
230 | .name = "msysclk", | 224 | .name = "msysclk", |
231 | .id = -1, | ||
232 | .ops = &(struct clk_ops) { | 225 | .ops = &(struct clk_ops) { |
233 | .set_parent = s3c2412_setparent_msysclk, | 226 | .set_parent = s3c2412_setparent_msysclk, |
234 | }, | 227 | }, |
@@ -268,7 +261,6 @@ static int s3c2412_setparent_armclk(struct clk *clk, struct clk *parent) | |||
268 | 261 | ||
269 | static struct clk clk_armclk = { | 262 | static struct clk clk_armclk = { |
270 | .name = "armclk", | 263 | .name = "armclk", |
271 | .id = -1, | ||
272 | .parent = &clk_msysclk, | 264 | .parent = &clk_msysclk, |
273 | .ops = &(struct clk_ops) { | 265 | .ops = &(struct clk_ops) { |
274 | .set_parent = s3c2412_setparent_armclk, | 266 | .set_parent = s3c2412_setparent_armclk, |
@@ -344,7 +336,6 @@ static int s3c2412_setrate_uart(struct clk *clk, unsigned long rate) | |||
344 | 336 | ||
345 | static struct clk clk_uart = { | 337 | static struct clk clk_uart = { |
346 | .name = "uartclk", | 338 | .name = "uartclk", |
347 | .id = -1, | ||
348 | .ops = &(struct clk_ops) { | 339 | .ops = &(struct clk_ops) { |
349 | .get_rate = s3c2412_getrate_uart, | 340 | .get_rate = s3c2412_getrate_uart, |
350 | .set_rate = s3c2412_setrate_uart, | 341 | .set_rate = s3c2412_setrate_uart, |
@@ -397,7 +388,6 @@ static int s3c2412_setrate_i2s(struct clk *clk, unsigned long rate) | |||
397 | 388 | ||
398 | static struct clk clk_i2s = { | 389 | static struct clk clk_i2s = { |
399 | .name = "i2sclk", | 390 | .name = "i2sclk", |
400 | .id = -1, | ||
401 | .ops = &(struct clk_ops) { | 391 | .ops = &(struct clk_ops) { |
402 | .get_rate = s3c2412_getrate_i2s, | 392 | .get_rate = s3c2412_getrate_i2s, |
403 | .set_rate = s3c2412_setrate_i2s, | 393 | .set_rate = s3c2412_setrate_i2s, |
@@ -449,7 +439,6 @@ static int s3c2412_setrate_cam(struct clk *clk, unsigned long rate) | |||
449 | 439 | ||
450 | static struct clk clk_cam = { | 440 | static struct clk clk_cam = { |
451 | .name = "camif-upll", /* same as 2440 name */ | 441 | .name = "camif-upll", /* same as 2440 name */ |
452 | .id = -1, | ||
453 | .ops = &(struct clk_ops) { | 442 | .ops = &(struct clk_ops) { |
454 | .get_rate = s3c2412_getrate_cam, | 443 | .get_rate = s3c2412_getrate_cam, |
455 | .set_rate = s3c2412_setrate_cam, | 444 | .set_rate = s3c2412_setrate_cam, |
@@ -463,37 +452,31 @@ static struct clk clk_cam = { | |||
463 | static struct clk init_clocks_disable[] = { | 452 | static struct clk init_clocks_disable[] = { |
464 | { | 453 | { |
465 | .name = "nand", | 454 | .name = "nand", |
466 | .id = -1, | ||
467 | .parent = &clk_h, | 455 | .parent = &clk_h, |
468 | .enable = s3c2412_clkcon_enable, | 456 | .enable = s3c2412_clkcon_enable, |
469 | .ctrlbit = S3C2412_CLKCON_NAND, | 457 | .ctrlbit = S3C2412_CLKCON_NAND, |
470 | }, { | 458 | }, { |
471 | .name = "sdi", | 459 | .name = "sdi", |
472 | .id = -1, | ||
473 | .parent = &clk_p, | 460 | .parent = &clk_p, |
474 | .enable = s3c2412_clkcon_enable, | 461 | .enable = s3c2412_clkcon_enable, |
475 | .ctrlbit = S3C2412_CLKCON_SDI, | 462 | .ctrlbit = S3C2412_CLKCON_SDI, |
476 | }, { | 463 | }, { |
477 | .name = "adc", | 464 | .name = "adc", |
478 | .id = -1, | ||
479 | .parent = &clk_p, | 465 | .parent = &clk_p, |
480 | .enable = s3c2412_clkcon_enable, | 466 | .enable = s3c2412_clkcon_enable, |
481 | .ctrlbit = S3C2412_CLKCON_ADC, | 467 | .ctrlbit = S3C2412_CLKCON_ADC, |
482 | }, { | 468 | }, { |
483 | .name = "i2c", | 469 | .name = "i2c", |
484 | .id = -1, | ||
485 | .parent = &clk_p, | 470 | .parent = &clk_p, |
486 | .enable = s3c2412_clkcon_enable, | 471 | .enable = s3c2412_clkcon_enable, |
487 | .ctrlbit = S3C2412_CLKCON_IIC, | 472 | .ctrlbit = S3C2412_CLKCON_IIC, |
488 | }, { | 473 | }, { |
489 | .name = "iis", | 474 | .name = "iis", |
490 | .id = -1, | ||
491 | .parent = &clk_p, | 475 | .parent = &clk_p, |
492 | .enable = s3c2412_clkcon_enable, | 476 | .enable = s3c2412_clkcon_enable, |
493 | .ctrlbit = S3C2412_CLKCON_IIS, | 477 | .ctrlbit = S3C2412_CLKCON_IIS, |
494 | }, { | 478 | }, { |
495 | .name = "spi", | 479 | .name = "spi", |
496 | .id = -1, | ||
497 | .parent = &clk_p, | 480 | .parent = &clk_p, |
498 | .enable = s3c2412_clkcon_enable, | 481 | .enable = s3c2412_clkcon_enable, |
499 | .ctrlbit = S3C2412_CLKCON_SPI, | 482 | .ctrlbit = S3C2412_CLKCON_SPI, |
@@ -503,96 +486,83 @@ static struct clk init_clocks_disable[] = { | |||
503 | static struct clk init_clocks[] = { | 486 | static struct clk init_clocks[] = { |
504 | { | 487 | { |
505 | .name = "dma", | 488 | .name = "dma", |
506 | .id = 0, | ||
507 | .parent = &clk_h, | 489 | .parent = &clk_h, |
508 | .enable = s3c2412_clkcon_enable, | 490 | .enable = s3c2412_clkcon_enable, |
509 | .ctrlbit = S3C2412_CLKCON_DMA0, | 491 | .ctrlbit = S3C2412_CLKCON_DMA0, |
510 | }, { | 492 | }, { |
511 | .name = "dma", | 493 | .name = "dma", |
512 | .id = 1, | ||
513 | .parent = &clk_h, | 494 | .parent = &clk_h, |
514 | .enable = s3c2412_clkcon_enable, | 495 | .enable = s3c2412_clkcon_enable, |
515 | .ctrlbit = S3C2412_CLKCON_DMA1, | 496 | .ctrlbit = S3C2412_CLKCON_DMA1, |
516 | }, { | 497 | }, { |
517 | .name = "dma", | 498 | .name = "dma", |
518 | .id = 2, | ||
519 | .parent = &clk_h, | 499 | .parent = &clk_h, |
520 | .enable = s3c2412_clkcon_enable, | 500 | .enable = s3c2412_clkcon_enable, |
521 | .ctrlbit = S3C2412_CLKCON_DMA2, | 501 | .ctrlbit = S3C2412_CLKCON_DMA2, |
522 | }, { | 502 | }, { |
523 | .name = "dma", | 503 | .name = "dma", |
524 | .id = 3, | ||
525 | .parent = &clk_h, | 504 | .parent = &clk_h, |
526 | .enable = s3c2412_clkcon_enable, | 505 | .enable = s3c2412_clkcon_enable, |
527 | .ctrlbit = S3C2412_CLKCON_DMA3, | 506 | .ctrlbit = S3C2412_CLKCON_DMA3, |
528 | }, { | 507 | }, { |
529 | .name = "lcd", | 508 | .name = "lcd", |
530 | .id = -1, | ||
531 | .parent = &clk_h, | 509 | .parent = &clk_h, |
532 | .enable = s3c2412_clkcon_enable, | 510 | .enable = s3c2412_clkcon_enable, |
533 | .ctrlbit = S3C2412_CLKCON_LCDC, | 511 | .ctrlbit = S3C2412_CLKCON_LCDC, |
534 | }, { | 512 | }, { |
535 | .name = "gpio", | 513 | .name = "gpio", |
536 | .id = -1, | ||
537 | .parent = &clk_p, | 514 | .parent = &clk_p, |
538 | .enable = s3c2412_clkcon_enable, | 515 | .enable = s3c2412_clkcon_enable, |
539 | .ctrlbit = S3C2412_CLKCON_GPIO, | 516 | .ctrlbit = S3C2412_CLKCON_GPIO, |
540 | }, { | 517 | }, { |
541 | .name = "usb-host", | 518 | .name = "usb-host", |
542 | .id = -1, | ||
543 | .parent = &clk_h, | 519 | .parent = &clk_h, |
544 | .enable = s3c2412_clkcon_enable, | 520 | .enable = s3c2412_clkcon_enable, |
545 | .ctrlbit = S3C2412_CLKCON_USBH, | 521 | .ctrlbit = S3C2412_CLKCON_USBH, |
546 | }, { | 522 | }, { |
547 | .name = "usb-device", | 523 | .name = "usb-device", |
548 | .id = -1, | ||
549 | .parent = &clk_h, | 524 | .parent = &clk_h, |
550 | .enable = s3c2412_clkcon_enable, | 525 | .enable = s3c2412_clkcon_enable, |
551 | .ctrlbit = S3C2412_CLKCON_USBD, | 526 | .ctrlbit = S3C2412_CLKCON_USBD, |
552 | }, { | 527 | }, { |
553 | .name = "timers", | 528 | .name = "timers", |
554 | .id = -1, | ||
555 | .parent = &clk_p, | 529 | .parent = &clk_p, |
556 | .enable = s3c2412_clkcon_enable, | 530 | .enable = s3c2412_clkcon_enable, |
557 | .ctrlbit = S3C2412_CLKCON_PWMT, | 531 | .ctrlbit = S3C2412_CLKCON_PWMT, |
558 | }, { | 532 | }, { |
559 | .name = "uart", | 533 | .name = "uart", |
560 | .id = 0, | 534 | .devname = "s3c2412-uart.0", |
561 | .parent = &clk_p, | 535 | .parent = &clk_p, |
562 | .enable = s3c2412_clkcon_enable, | 536 | .enable = s3c2412_clkcon_enable, |
563 | .ctrlbit = S3C2412_CLKCON_UART0, | 537 | .ctrlbit = S3C2412_CLKCON_UART0, |
564 | }, { | 538 | }, { |
565 | .name = "uart", | 539 | .name = "uart", |
566 | .id = 1, | 540 | .devname = "s3c2412-uart.1", |
567 | .parent = &clk_p, | 541 | .parent = &clk_p, |
568 | .enable = s3c2412_clkcon_enable, | 542 | .enable = s3c2412_clkcon_enable, |
569 | .ctrlbit = S3C2412_CLKCON_UART1, | 543 | .ctrlbit = S3C2412_CLKCON_UART1, |
570 | }, { | 544 | }, { |
571 | .name = "uart", | 545 | .name = "uart", |
572 | .id = 2, | 546 | .devname = "s3c2412-uart.2", |
573 | .parent = &clk_p, | 547 | .parent = &clk_p, |
574 | .enable = s3c2412_clkcon_enable, | 548 | .enable = s3c2412_clkcon_enable, |
575 | .ctrlbit = S3C2412_CLKCON_UART2, | 549 | .ctrlbit = S3C2412_CLKCON_UART2, |
576 | }, { | 550 | }, { |
577 | .name = "rtc", | 551 | .name = "rtc", |
578 | .id = -1, | ||
579 | .parent = &clk_p, | 552 | .parent = &clk_p, |
580 | .enable = s3c2412_clkcon_enable, | 553 | .enable = s3c2412_clkcon_enable, |
581 | .ctrlbit = S3C2412_CLKCON_RTC, | 554 | .ctrlbit = S3C2412_CLKCON_RTC, |
582 | }, { | 555 | }, { |
583 | .name = "watchdog", | 556 | .name = "watchdog", |
584 | .id = -1, | ||
585 | .parent = &clk_p, | 557 | .parent = &clk_p, |
586 | .ctrlbit = 0, | 558 | .ctrlbit = 0, |
587 | }, { | 559 | }, { |
588 | .name = "usb-bus-gadget", | 560 | .name = "usb-bus-gadget", |
589 | .id = -1, | ||
590 | .parent = &clk_usb_bus, | 561 | .parent = &clk_usb_bus, |
591 | .enable = s3c2412_clkcon_enable, | 562 | .enable = s3c2412_clkcon_enable, |
592 | .ctrlbit = S3C2412_CLKCON_USB_DEV48, | 563 | .ctrlbit = S3C2412_CLKCON_USB_DEV48, |
593 | }, { | 564 | }, { |
594 | .name = "usb-bus-host", | 565 | .name = "usb-bus-host", |
595 | .id = -1, | ||
596 | .parent = &clk_usb_bus, | 566 | .parent = &clk_usb_bus, |
597 | .enable = s3c2412_clkcon_enable, | 567 | .enable = s3c2412_clkcon_enable, |
598 | .ctrlbit = S3C2412_CLKCON_USB_HOST48, | 568 | .ctrlbit = S3C2412_CLKCON_USB_HOST48, |
diff --git a/arch/arm/mach-s3c2416/clock.c b/arch/arm/mach-s3c2416/clock.c index 3b02d8506e25..21a5e81f0ab5 100644 --- a/arch/arm/mach-s3c2416/clock.c +++ b/arch/arm/mach-s3c2416/clock.c | |||
@@ -42,7 +42,7 @@ static struct clksrc_clk hsmmc_div[] = { | |||
42 | [0] = { | 42 | [0] = { |
43 | .clk = { | 43 | .clk = { |
44 | .name = "hsmmc-div", | 44 | .name = "hsmmc-div", |
45 | .id = 0, | 45 | .devname = "s3c-sdhci.0", |
46 | .parent = &clk_esysclk.clk, | 46 | .parent = &clk_esysclk.clk, |
47 | }, | 47 | }, |
48 | .reg_div = { .reg = S3C2416_CLKDIV2, .size = 2, .shift = 6 }, | 48 | .reg_div = { .reg = S3C2416_CLKDIV2, .size = 2, .shift = 6 }, |
@@ -50,7 +50,7 @@ static struct clksrc_clk hsmmc_div[] = { | |||
50 | [1] = { | 50 | [1] = { |
51 | .clk = { | 51 | .clk = { |
52 | .name = "hsmmc-div", | 52 | .name = "hsmmc-div", |
53 | .id = 1, | 53 | .devname = "s3c-sdhci.1", |
54 | .parent = &clk_esysclk.clk, | 54 | .parent = &clk_esysclk.clk, |
55 | }, | 55 | }, |
56 | .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 }, | 56 | .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 }, |
@@ -60,8 +60,8 @@ static struct clksrc_clk hsmmc_div[] = { | |||
60 | static struct clksrc_clk hsmmc_mux[] = { | 60 | static struct clksrc_clk hsmmc_mux[] = { |
61 | [0] = { | 61 | [0] = { |
62 | .clk = { | 62 | .clk = { |
63 | .id = 0, | ||
64 | .name = "hsmmc-if", | 63 | .name = "hsmmc-if", |
64 | .devname = "s3c-sdhci.0", | ||
65 | .ctrlbit = (1 << 6), | 65 | .ctrlbit = (1 << 6), |
66 | .enable = s3c2443_clkcon_enable_s, | 66 | .enable = s3c2443_clkcon_enable_s, |
67 | }, | 67 | }, |
@@ -76,8 +76,8 @@ static struct clksrc_clk hsmmc_mux[] = { | |||
76 | }, | 76 | }, |
77 | [1] = { | 77 | [1] = { |
78 | .clk = { | 78 | .clk = { |
79 | .id = 1, | ||
80 | .name = "hsmmc-if", | 79 | .name = "hsmmc-if", |
80 | .devname = "s3c-sdhci.1", | ||
81 | .ctrlbit = (1 << 12), | 81 | .ctrlbit = (1 << 12), |
82 | .enable = s3c2443_clkcon_enable_s, | 82 | .enable = s3c2443_clkcon_enable_s, |
83 | }, | 83 | }, |
@@ -94,7 +94,7 @@ static struct clksrc_clk hsmmc_mux[] = { | |||
94 | 94 | ||
95 | static struct clk hsmmc0_clk = { | 95 | static struct clk hsmmc0_clk = { |
96 | .name = "hsmmc", | 96 | .name = "hsmmc", |
97 | .id = 0, | 97 | .devname = "s3c-sdhci.0", |
98 | .parent = &clk_h, | 98 | .parent = &clk_h, |
99 | .enable = s3c2443_clkcon_enable_h, | 99 | .enable = s3c2443_clkcon_enable_h, |
100 | .ctrlbit = S3C2416_HCLKCON_HSMMC0, | 100 | .ctrlbit = S3C2416_HCLKCON_HSMMC0, |
diff --git a/arch/arm/mach-s3c2440/clock.c b/arch/arm/mach-s3c2440/clock.c index 3dc2426e2345..554e0d3ec70b 100644 --- a/arch/arm/mach-s3c2440/clock.c +++ b/arch/arm/mach-s3c2440/clock.c | |||
@@ -90,14 +90,12 @@ static int s3c2440_camif_upll_setrate(struct clk *clk, unsigned long rate) | |||
90 | 90 | ||
91 | static struct clk s3c2440_clk_cam = { | 91 | static struct clk s3c2440_clk_cam = { |
92 | .name = "camif", | 92 | .name = "camif", |
93 | .id = -1, | ||
94 | .enable = s3c2410_clkcon_enable, | 93 | .enable = s3c2410_clkcon_enable, |
95 | .ctrlbit = S3C2440_CLKCON_CAMERA, | 94 | .ctrlbit = S3C2440_CLKCON_CAMERA, |
96 | }; | 95 | }; |
97 | 96 | ||
98 | static struct clk s3c2440_clk_cam_upll = { | 97 | static struct clk s3c2440_clk_cam_upll = { |
99 | .name = "camif-upll", | 98 | .name = "camif-upll", |
100 | .id = -1, | ||
101 | .ops = &(struct clk_ops) { | 99 | .ops = &(struct clk_ops) { |
102 | .set_rate = s3c2440_camif_upll_setrate, | 100 | .set_rate = s3c2440_camif_upll_setrate, |
103 | .round_rate = s3c2440_camif_upll_round, | 101 | .round_rate = s3c2440_camif_upll_round, |
@@ -106,7 +104,6 @@ static struct clk s3c2440_clk_cam_upll = { | |||
106 | 104 | ||
107 | static struct clk s3c2440_clk_ac97 = { | 105 | static struct clk s3c2440_clk_ac97 = { |
108 | .name = "ac97", | 106 | .name = "ac97", |
109 | .id = -1, | ||
110 | .enable = s3c2410_clkcon_enable, | 107 | .enable = s3c2410_clkcon_enable, |
111 | .ctrlbit = S3C2440_CLKCON_CAMERA, | 108 | .ctrlbit = S3C2440_CLKCON_CAMERA, |
112 | }; | 109 | }; |
diff --git a/arch/arm/mach-s3c2443/clock.c b/arch/arm/mach-s3c2443/clock.c index f4ec6d5715c8..a1a7176675b9 100644 --- a/arch/arm/mach-s3c2443/clock.c +++ b/arch/arm/mach-s3c2443/clock.c | |||
@@ -59,7 +59,6 @@ | |||
59 | 59 | ||
60 | static struct clk clk_i2s_ext = { | 60 | static struct clk clk_i2s_ext = { |
61 | .name = "i2s-ext", | 61 | .name = "i2s-ext", |
62 | .id = -1, | ||
63 | }; | 62 | }; |
64 | 63 | ||
65 | /* armdiv | 64 | /* armdiv |
@@ -139,7 +138,6 @@ static int s3c2443_armclk_setrate(struct clk *clk, unsigned long rate) | |||
139 | 138 | ||
140 | static struct clk clk_armdiv = { | 139 | static struct clk clk_armdiv = { |
141 | .name = "armdiv", | 140 | .name = "armdiv", |
142 | .id = -1, | ||
143 | .parent = &clk_msysclk.clk, | 141 | .parent = &clk_msysclk.clk, |
144 | .ops = &(struct clk_ops) { | 142 | .ops = &(struct clk_ops) { |
145 | .round_rate = s3c2443_armclk_roundrate, | 143 | .round_rate = s3c2443_armclk_roundrate, |
@@ -160,7 +158,6 @@ static struct clk *clk_arm_sources[] = { | |||
160 | static struct clksrc_clk clk_arm = { | 158 | static struct clksrc_clk clk_arm = { |
161 | .clk = { | 159 | .clk = { |
162 | .name = "armclk", | 160 | .name = "armclk", |
163 | .id = -1, | ||
164 | }, | 161 | }, |
165 | .sources = &(struct clksrc_sources) { | 162 | .sources = &(struct clksrc_sources) { |
166 | .sources = clk_arm_sources, | 163 | .sources = clk_arm_sources, |
@@ -177,7 +174,6 @@ static struct clksrc_clk clk_arm = { | |||
177 | static struct clksrc_clk clk_hsspi = { | 174 | static struct clksrc_clk clk_hsspi = { |
178 | .clk = { | 175 | .clk = { |
179 | .name = "hsspi", | 176 | .name = "hsspi", |
180 | .id = -1, | ||
181 | .parent = &clk_esysclk.clk, | 177 | .parent = &clk_esysclk.clk, |
182 | .ctrlbit = S3C2443_SCLKCON_HSSPICLK, | 178 | .ctrlbit = S3C2443_SCLKCON_HSSPICLK, |
183 | .enable = s3c2443_clkcon_enable_s, | 179 | .enable = s3c2443_clkcon_enable_s, |
@@ -196,7 +192,7 @@ static struct clksrc_clk clk_hsspi = { | |||
196 | static struct clksrc_clk clk_hsmmc_div = { | 192 | static struct clksrc_clk clk_hsmmc_div = { |
197 | .clk = { | 193 | .clk = { |
198 | .name = "hsmmc-div", | 194 | .name = "hsmmc-div", |
199 | .id = 1, | 195 | .devname = "s3c-sdhci.1", |
200 | .parent = &clk_esysclk.clk, | 196 | .parent = &clk_esysclk.clk, |
201 | }, | 197 | }, |
202 | .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 }, | 198 | .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 }, |
@@ -231,7 +227,7 @@ static int s3c2443_enable_hsmmc(struct clk *clk, int enable) | |||
231 | 227 | ||
232 | static struct clk clk_hsmmc = { | 228 | static struct clk clk_hsmmc = { |
233 | .name = "hsmmc-if", | 229 | .name = "hsmmc-if", |
234 | .id = 1, | 230 | .devname = "s3c-sdhci.1", |
235 | .parent = &clk_hsmmc_div.clk, | 231 | .parent = &clk_hsmmc_div.clk, |
236 | .enable = s3c2443_enable_hsmmc, | 232 | .enable = s3c2443_enable_hsmmc, |
237 | .ops = &(struct clk_ops) { | 233 | .ops = &(struct clk_ops) { |
@@ -248,7 +244,6 @@ static struct clk clk_hsmmc = { | |||
248 | static struct clksrc_clk clk_i2s_eplldiv = { | 244 | static struct clksrc_clk clk_i2s_eplldiv = { |
249 | .clk = { | 245 | .clk = { |
250 | .name = "i2s-eplldiv", | 246 | .name = "i2s-eplldiv", |
251 | .id = -1, | ||
252 | .parent = &clk_esysclk.clk, | 247 | .parent = &clk_esysclk.clk, |
253 | }, | 248 | }, |
254 | .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 12, }, | 249 | .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 12, }, |
@@ -271,7 +266,6 @@ struct clk *clk_i2s_srclist[] = { | |||
271 | static struct clksrc_clk clk_i2s = { | 266 | static struct clksrc_clk clk_i2s = { |
272 | .clk = { | 267 | .clk = { |
273 | .name = "i2s-if", | 268 | .name = "i2s-if", |
274 | .id = -1, | ||
275 | .ctrlbit = S3C2443_SCLKCON_I2SCLK, | 269 | .ctrlbit = S3C2443_SCLKCON_I2SCLK, |
276 | .enable = s3c2443_clkcon_enable_s, | 270 | .enable = s3c2443_clkcon_enable_s, |
277 | 271 | ||
@@ -288,25 +282,23 @@ static struct clksrc_clk clk_i2s = { | |||
288 | static struct clk init_clocks_off[] = { | 282 | static struct clk init_clocks_off[] = { |
289 | { | 283 | { |
290 | .name = "sdi", | 284 | .name = "sdi", |
291 | .id = -1, | ||
292 | .parent = &clk_p, | 285 | .parent = &clk_p, |
293 | .enable = s3c2443_clkcon_enable_p, | 286 | .enable = s3c2443_clkcon_enable_p, |
294 | .ctrlbit = S3C2443_PCLKCON_SDI, | 287 | .ctrlbit = S3C2443_PCLKCON_SDI, |
295 | }, { | 288 | }, { |
296 | .name = "iis", | 289 | .name = "iis", |
297 | .id = -1, | ||
298 | .parent = &clk_p, | 290 | .parent = &clk_p, |
299 | .enable = s3c2443_clkcon_enable_p, | 291 | .enable = s3c2443_clkcon_enable_p, |
300 | .ctrlbit = S3C2443_PCLKCON_IIS, | 292 | .ctrlbit = S3C2443_PCLKCON_IIS, |
301 | }, { | 293 | }, { |
302 | .name = "spi", | 294 | .name = "spi", |
303 | .id = 0, | 295 | .devname = "s3c2410-spi.0", |
304 | .parent = &clk_p, | 296 | .parent = &clk_p, |
305 | .enable = s3c2443_clkcon_enable_p, | 297 | .enable = s3c2443_clkcon_enable_p, |
306 | .ctrlbit = S3C2443_PCLKCON_SPI0, | 298 | .ctrlbit = S3C2443_PCLKCON_SPI0, |
307 | }, { | 299 | }, { |
308 | .name = "spi", | 300 | .name = "spi", |
309 | .id = 1, | 301 | .devname = "s3c2410-spi.1", |
310 | .parent = &clk_p, | 302 | .parent = &clk_p, |
311 | .enable = s3c2443_clkcon_enable_p, | 303 | .enable = s3c2443_clkcon_enable_p, |
312 | .ctrlbit = S3C2443_PCLKCON_SPI1, | 304 | .ctrlbit = S3C2443_PCLKCON_SPI1, |
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig index e4177e22557b..fdc89fc3b464 100644 --- a/arch/arm/mach-s3c64xx/Kconfig +++ b/arch/arm/mach-s3c64xx/Kconfig | |||
@@ -142,6 +142,7 @@ config MACH_SMDK6410 | |||
142 | select S3C_DEV_USB_HOST | 142 | select S3C_DEV_USB_HOST |
143 | select S3C_DEV_USB_HSOTG | 143 | select S3C_DEV_USB_HSOTG |
144 | select S3C_DEV_WDT | 144 | select S3C_DEV_WDT |
145 | select SAMSUNG_DEV_BACKLIGHT | ||
145 | select SAMSUNG_DEV_KEYPAD | 146 | select SAMSUNG_DEV_KEYPAD |
146 | select SAMSUNG_DEV_PWM | 147 | select SAMSUNG_DEV_PWM |
147 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 148 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c index fdfc4d5e37a1..8cf39e33579e 100644 --- a/arch/arm/mach-s3c64xx/clock.c +++ b/arch/arm/mach-s3c64xx/clock.c | |||
@@ -39,7 +39,6 @@ | |||
39 | 39 | ||
40 | static struct clk clk_ext_xtal_mux = { | 40 | static struct clk clk_ext_xtal_mux = { |
41 | .name = "ext_xtal", | 41 | .name = "ext_xtal", |
42 | .id = -1, | ||
43 | }; | 42 | }; |
44 | 43 | ||
45 | #define clk_fin_apll clk_ext_xtal_mux | 44 | #define clk_fin_apll clk_ext_xtal_mux |
@@ -51,13 +50,11 @@ static struct clk clk_ext_xtal_mux = { | |||
51 | 50 | ||
52 | struct clk clk_h2 = { | 51 | struct clk clk_h2 = { |
53 | .name = "hclk2", | 52 | .name = "hclk2", |
54 | .id = -1, | ||
55 | .rate = 0, | 53 | .rate = 0, |
56 | }; | 54 | }; |
57 | 55 | ||
58 | struct clk clk_27m = { | 56 | struct clk clk_27m = { |
59 | .name = "clk_27m", | 57 | .name = "clk_27m", |
60 | .id = -1, | ||
61 | .rate = 27000000, | 58 | .rate = 27000000, |
62 | }; | 59 | }; |
63 | 60 | ||
@@ -83,14 +80,12 @@ static int clk_48m_ctrl(struct clk *clk, int enable) | |||
83 | 80 | ||
84 | struct clk clk_48m = { | 81 | struct clk clk_48m = { |
85 | .name = "clk_48m", | 82 | .name = "clk_48m", |
86 | .id = -1, | ||
87 | .rate = 48000000, | 83 | .rate = 48000000, |
88 | .enable = clk_48m_ctrl, | 84 | .enable = clk_48m_ctrl, |
89 | }; | 85 | }; |
90 | 86 | ||
91 | struct clk clk_xusbxti = { | 87 | struct clk clk_xusbxti = { |
92 | .name = "xusbxti", | 88 | .name = "xusbxti", |
93 | .id = -1, | ||
94 | .rate = 48000000, | 89 | .rate = 48000000, |
95 | }; | 90 | }; |
96 | 91 | ||
@@ -130,109 +125,101 @@ int s3c64xx_sclk_ctrl(struct clk *clk, int enable) | |||
130 | static struct clk init_clocks_off[] = { | 125 | static struct clk init_clocks_off[] = { |
131 | { | 126 | { |
132 | .name = "nand", | 127 | .name = "nand", |
133 | .id = -1, | ||
134 | .parent = &clk_h, | 128 | .parent = &clk_h, |
135 | }, { | 129 | }, { |
136 | .name = "rtc", | 130 | .name = "rtc", |
137 | .id = -1, | ||
138 | .parent = &clk_p, | 131 | .parent = &clk_p, |
139 | .enable = s3c64xx_pclk_ctrl, | 132 | .enable = s3c64xx_pclk_ctrl, |
140 | .ctrlbit = S3C_CLKCON_PCLK_RTC, | 133 | .ctrlbit = S3C_CLKCON_PCLK_RTC, |
141 | }, { | 134 | }, { |
142 | .name = "adc", | 135 | .name = "adc", |
143 | .id = -1, | ||
144 | .parent = &clk_p, | 136 | .parent = &clk_p, |
145 | .enable = s3c64xx_pclk_ctrl, | 137 | .enable = s3c64xx_pclk_ctrl, |
146 | .ctrlbit = S3C_CLKCON_PCLK_TSADC, | 138 | .ctrlbit = S3C_CLKCON_PCLK_TSADC, |
147 | }, { | 139 | }, { |
148 | .name = "i2c", | 140 | .name = "i2c", |
149 | .id = -1, | ||
150 | .parent = &clk_p, | 141 | .parent = &clk_p, |
151 | .enable = s3c64xx_pclk_ctrl, | 142 | .enable = s3c64xx_pclk_ctrl, |
152 | .ctrlbit = S3C_CLKCON_PCLK_IIC, | 143 | .ctrlbit = S3C_CLKCON_PCLK_IIC, |
153 | }, { | 144 | }, { |
154 | .name = "i2c", | 145 | .name = "i2c", |
155 | .id = 1, | 146 | .devname = "s3c2440-i2c.1", |
156 | .parent = &clk_p, | 147 | .parent = &clk_p, |
157 | .enable = s3c64xx_pclk_ctrl, | 148 | .enable = s3c64xx_pclk_ctrl, |
158 | .ctrlbit = S3C6410_CLKCON_PCLK_I2C1, | 149 | .ctrlbit = S3C6410_CLKCON_PCLK_I2C1, |
159 | }, { | 150 | }, { |
160 | .name = "iis", | 151 | .name = "iis", |
161 | .id = 0, | 152 | .devname = "samsung-i2s.0", |
162 | .parent = &clk_p, | 153 | .parent = &clk_p, |
163 | .enable = s3c64xx_pclk_ctrl, | 154 | .enable = s3c64xx_pclk_ctrl, |
164 | .ctrlbit = S3C_CLKCON_PCLK_IIS0, | 155 | .ctrlbit = S3C_CLKCON_PCLK_IIS0, |
165 | }, { | 156 | }, { |
166 | .name = "iis", | 157 | .name = "iis", |
167 | .id = 1, | 158 | .devname = "samsung-i2s.1", |
168 | .parent = &clk_p, | 159 | .parent = &clk_p, |
169 | .enable = s3c64xx_pclk_ctrl, | 160 | .enable = s3c64xx_pclk_ctrl, |
170 | .ctrlbit = S3C_CLKCON_PCLK_IIS1, | 161 | .ctrlbit = S3C_CLKCON_PCLK_IIS1, |
171 | }, { | 162 | }, { |
172 | #ifdef CONFIG_CPU_S3C6410 | 163 | #ifdef CONFIG_CPU_S3C6410 |
173 | .name = "iis", | 164 | .name = "iis", |
174 | .id = -1, /* There's only one IISv4 port */ | ||
175 | .parent = &clk_p, | 165 | .parent = &clk_p, |
176 | .enable = s3c64xx_pclk_ctrl, | 166 | .enable = s3c64xx_pclk_ctrl, |
177 | .ctrlbit = S3C6410_CLKCON_PCLK_IIS2, | 167 | .ctrlbit = S3C6410_CLKCON_PCLK_IIS2, |
178 | }, { | 168 | }, { |
179 | #endif | 169 | #endif |
180 | .name = "keypad", | 170 | .name = "keypad", |
181 | .id = -1, | ||
182 | .parent = &clk_p, | 171 | .parent = &clk_p, |
183 | .enable = s3c64xx_pclk_ctrl, | 172 | .enable = s3c64xx_pclk_ctrl, |
184 | .ctrlbit = S3C_CLKCON_PCLK_KEYPAD, | 173 | .ctrlbit = S3C_CLKCON_PCLK_KEYPAD, |
185 | }, { | 174 | }, { |
186 | .name = "spi", | 175 | .name = "spi", |
187 | .id = 0, | 176 | .devname = "s3c64xx-spi.0", |
188 | .parent = &clk_p, | 177 | .parent = &clk_p, |
189 | .enable = s3c64xx_pclk_ctrl, | 178 | .enable = s3c64xx_pclk_ctrl, |
190 | .ctrlbit = S3C_CLKCON_PCLK_SPI0, | 179 | .ctrlbit = S3C_CLKCON_PCLK_SPI0, |
191 | }, { | 180 | }, { |
192 | .name = "spi", | 181 | .name = "spi", |
193 | .id = 1, | 182 | .devname = "s3c64xx-spi.1", |
194 | .parent = &clk_p, | 183 | .parent = &clk_p, |
195 | .enable = s3c64xx_pclk_ctrl, | 184 | .enable = s3c64xx_pclk_ctrl, |
196 | .ctrlbit = S3C_CLKCON_PCLK_SPI1, | 185 | .ctrlbit = S3C_CLKCON_PCLK_SPI1, |
197 | }, { | 186 | }, { |
198 | .name = "spi_48m", | 187 | .name = "spi_48m", |
199 | .id = 0, | 188 | .devname = "s3c64xx-spi.0", |
200 | .parent = &clk_48m, | 189 | .parent = &clk_48m, |
201 | .enable = s3c64xx_sclk_ctrl, | 190 | .enable = s3c64xx_sclk_ctrl, |
202 | .ctrlbit = S3C_CLKCON_SCLK_SPI0_48, | 191 | .ctrlbit = S3C_CLKCON_SCLK_SPI0_48, |
203 | }, { | 192 | }, { |
204 | .name = "spi_48m", | 193 | .name = "spi_48m", |
205 | .id = 1, | 194 | .devname = "s3c64xx-spi.1", |
206 | .parent = &clk_48m, | 195 | .parent = &clk_48m, |
207 | .enable = s3c64xx_sclk_ctrl, | 196 | .enable = s3c64xx_sclk_ctrl, |
208 | .ctrlbit = S3C_CLKCON_SCLK_SPI1_48, | 197 | .ctrlbit = S3C_CLKCON_SCLK_SPI1_48, |
209 | }, { | 198 | }, { |
210 | .name = "48m", | 199 | .name = "48m", |
211 | .id = 0, | 200 | .devname = "s3c-sdhci.0", |
212 | .parent = &clk_48m, | 201 | .parent = &clk_48m, |
213 | .enable = s3c64xx_sclk_ctrl, | 202 | .enable = s3c64xx_sclk_ctrl, |
214 | .ctrlbit = S3C_CLKCON_SCLK_MMC0_48, | 203 | .ctrlbit = S3C_CLKCON_SCLK_MMC0_48, |
215 | }, { | 204 | }, { |
216 | .name = "48m", | 205 | .name = "48m", |
217 | .id = 1, | 206 | .devname = "s3c-sdhci.1", |
218 | .parent = &clk_48m, | 207 | .parent = &clk_48m, |
219 | .enable = s3c64xx_sclk_ctrl, | 208 | .enable = s3c64xx_sclk_ctrl, |
220 | .ctrlbit = S3C_CLKCON_SCLK_MMC1_48, | 209 | .ctrlbit = S3C_CLKCON_SCLK_MMC1_48, |
221 | }, { | 210 | }, { |
222 | .name = "48m", | 211 | .name = "48m", |
223 | .id = 2, | 212 | .devname = "s3c-sdhci.2", |
224 | .parent = &clk_48m, | 213 | .parent = &clk_48m, |
225 | .enable = s3c64xx_sclk_ctrl, | 214 | .enable = s3c64xx_sclk_ctrl, |
226 | .ctrlbit = S3C_CLKCON_SCLK_MMC2_48, | 215 | .ctrlbit = S3C_CLKCON_SCLK_MMC2_48, |
227 | }, { | 216 | }, { |
228 | .name = "dma0", | 217 | .name = "dma0", |
229 | .id = -1, | ||
230 | .parent = &clk_h, | 218 | .parent = &clk_h, |
231 | .enable = s3c64xx_hclk_ctrl, | 219 | .enable = s3c64xx_hclk_ctrl, |
232 | .ctrlbit = S3C_CLKCON_HCLK_DMA0, | 220 | .ctrlbit = S3C_CLKCON_HCLK_DMA0, |
233 | }, { | 221 | }, { |
234 | .name = "dma1", | 222 | .name = "dma1", |
235 | .id = -1, | ||
236 | .parent = &clk_h, | 223 | .parent = &clk_h, |
237 | .enable = s3c64xx_hclk_ctrl, | 224 | .enable = s3c64xx_hclk_ctrl, |
238 | .ctrlbit = S3C_CLKCON_HCLK_DMA1, | 225 | .ctrlbit = S3C_CLKCON_HCLK_DMA1, |
@@ -242,89 +229,81 @@ static struct clk init_clocks_off[] = { | |||
242 | static struct clk init_clocks[] = { | 229 | static struct clk init_clocks[] = { |
243 | { | 230 | { |
244 | .name = "lcd", | 231 | .name = "lcd", |
245 | .id = -1, | ||
246 | .parent = &clk_h, | 232 | .parent = &clk_h, |
247 | .enable = s3c64xx_hclk_ctrl, | 233 | .enable = s3c64xx_hclk_ctrl, |
248 | .ctrlbit = S3C_CLKCON_HCLK_LCD, | 234 | .ctrlbit = S3C_CLKCON_HCLK_LCD, |
249 | }, { | 235 | }, { |
250 | .name = "gpio", | 236 | .name = "gpio", |
251 | .id = -1, | ||
252 | .parent = &clk_p, | 237 | .parent = &clk_p, |
253 | .enable = s3c64xx_pclk_ctrl, | 238 | .enable = s3c64xx_pclk_ctrl, |
254 | .ctrlbit = S3C_CLKCON_PCLK_GPIO, | 239 | .ctrlbit = S3C_CLKCON_PCLK_GPIO, |
255 | }, { | 240 | }, { |
256 | .name = "usb-host", | 241 | .name = "usb-host", |
257 | .id = -1, | ||
258 | .parent = &clk_h, | 242 | .parent = &clk_h, |
259 | .enable = s3c64xx_hclk_ctrl, | 243 | .enable = s3c64xx_hclk_ctrl, |
260 | .ctrlbit = S3C_CLKCON_HCLK_UHOST, | 244 | .ctrlbit = S3C_CLKCON_HCLK_UHOST, |
261 | }, { | 245 | }, { |
262 | .name = "hsmmc", | 246 | .name = "hsmmc", |
263 | .id = 0, | 247 | .devname = "s3c-sdhci.0", |
264 | .parent = &clk_h, | 248 | .parent = &clk_h, |
265 | .enable = s3c64xx_hclk_ctrl, | 249 | .enable = s3c64xx_hclk_ctrl, |
266 | .ctrlbit = S3C_CLKCON_HCLK_HSMMC0, | 250 | .ctrlbit = S3C_CLKCON_HCLK_HSMMC0, |
267 | }, { | 251 | }, { |
268 | .name = "hsmmc", | 252 | .name = "hsmmc", |
269 | .id = 1, | 253 | .devname = "s3c-sdhci.1", |
270 | .parent = &clk_h, | 254 | .parent = &clk_h, |
271 | .enable = s3c64xx_hclk_ctrl, | 255 | .enable = s3c64xx_hclk_ctrl, |
272 | .ctrlbit = S3C_CLKCON_HCLK_HSMMC1, | 256 | .ctrlbit = S3C_CLKCON_HCLK_HSMMC1, |
273 | }, { | 257 | }, { |
274 | .name = "hsmmc", | 258 | .name = "hsmmc", |
275 | .id = 2, | 259 | .devname = "s3c-sdhci.2", |
276 | .parent = &clk_h, | 260 | .parent = &clk_h, |
277 | .enable = s3c64xx_hclk_ctrl, | 261 | .enable = s3c64xx_hclk_ctrl, |
278 | .ctrlbit = S3C_CLKCON_HCLK_HSMMC2, | 262 | .ctrlbit = S3C_CLKCON_HCLK_HSMMC2, |
279 | }, { | 263 | }, { |
280 | .name = "otg", | 264 | .name = "otg", |
281 | .id = -1, | ||
282 | .parent = &clk_h, | 265 | .parent = &clk_h, |
283 | .enable = s3c64xx_hclk_ctrl, | 266 | .enable = s3c64xx_hclk_ctrl, |
284 | .ctrlbit = S3C_CLKCON_HCLK_USB, | 267 | .ctrlbit = S3C_CLKCON_HCLK_USB, |
285 | }, { | 268 | }, { |
286 | .name = "timers", | 269 | .name = "timers", |
287 | .id = -1, | ||
288 | .parent = &clk_p, | 270 | .parent = &clk_p, |
289 | .enable = s3c64xx_pclk_ctrl, | 271 | .enable = s3c64xx_pclk_ctrl, |
290 | .ctrlbit = S3C_CLKCON_PCLK_PWM, | 272 | .ctrlbit = S3C_CLKCON_PCLK_PWM, |
291 | }, { | 273 | }, { |
292 | .name = "uart", | 274 | .name = "uart", |
293 | .id = 0, | 275 | .devname = "s3c6400-uart.0", |
294 | .parent = &clk_p, | 276 | .parent = &clk_p, |
295 | .enable = s3c64xx_pclk_ctrl, | 277 | .enable = s3c64xx_pclk_ctrl, |
296 | .ctrlbit = S3C_CLKCON_PCLK_UART0, | 278 | .ctrlbit = S3C_CLKCON_PCLK_UART0, |
297 | }, { | 279 | }, { |
298 | .name = "uart", | 280 | .name = "uart", |
299 | .id = 1, | 281 | .devname = "s3c6400-uart.1", |
300 | .parent = &clk_p, | 282 | .parent = &clk_p, |
301 | .enable = s3c64xx_pclk_ctrl, | 283 | .enable = s3c64xx_pclk_ctrl, |
302 | .ctrlbit = S3C_CLKCON_PCLK_UART1, | 284 | .ctrlbit = S3C_CLKCON_PCLK_UART1, |
303 | }, { | 285 | }, { |
304 | .name = "uart", | 286 | .name = "uart", |
305 | .id = 2, | 287 | .devname = "s3c6400-uart.2", |
306 | .parent = &clk_p, | 288 | .parent = &clk_p, |
307 | .enable = s3c64xx_pclk_ctrl, | 289 | .enable = s3c64xx_pclk_ctrl, |
308 | .ctrlbit = S3C_CLKCON_PCLK_UART2, | 290 | .ctrlbit = S3C_CLKCON_PCLK_UART2, |
309 | }, { | 291 | }, { |
310 | .name = "uart", | 292 | .name = "uart", |
311 | .id = 3, | 293 | .devname = "s3c6400-uart.3", |
312 | .parent = &clk_p, | 294 | .parent = &clk_p, |
313 | .enable = s3c64xx_pclk_ctrl, | 295 | .enable = s3c64xx_pclk_ctrl, |
314 | .ctrlbit = S3C_CLKCON_PCLK_UART3, | 296 | .ctrlbit = S3C_CLKCON_PCLK_UART3, |
315 | }, { | 297 | }, { |
316 | .name = "watchdog", | 298 | .name = "watchdog", |
317 | .id = -1, | ||
318 | .parent = &clk_p, | 299 | .parent = &clk_p, |
319 | .ctrlbit = S3C_CLKCON_PCLK_WDT, | 300 | .ctrlbit = S3C_CLKCON_PCLK_WDT, |
320 | }, { | 301 | }, { |
321 | .name = "ac97", | 302 | .name = "ac97", |
322 | .id = -1, | ||
323 | .parent = &clk_p, | 303 | .parent = &clk_p, |
324 | .ctrlbit = S3C_CLKCON_PCLK_AC97, | 304 | .ctrlbit = S3C_CLKCON_PCLK_AC97, |
325 | }, { | 305 | }, { |
326 | .name = "cfcon", | 306 | .name = "cfcon", |
327 | .id = -1, | ||
328 | .parent = &clk_h, | 307 | .parent = &clk_h, |
329 | .enable = s3c64xx_hclk_ctrl, | 308 | .enable = s3c64xx_hclk_ctrl, |
330 | .ctrlbit = S3C_CLKCON_HCLK_IHOST, | 309 | .ctrlbit = S3C_CLKCON_HCLK_IHOST, |
@@ -334,7 +313,6 @@ static struct clk init_clocks[] = { | |||
334 | 313 | ||
335 | static struct clk clk_fout_apll = { | 314 | static struct clk clk_fout_apll = { |
336 | .name = "fout_apll", | 315 | .name = "fout_apll", |
337 | .id = -1, | ||
338 | }; | 316 | }; |
339 | 317 | ||
340 | static struct clk *clk_src_apll_list[] = { | 318 | static struct clk *clk_src_apll_list[] = { |
@@ -350,7 +328,6 @@ static struct clksrc_sources clk_src_apll = { | |||
350 | static struct clksrc_clk clk_mout_apll = { | 328 | static struct clksrc_clk clk_mout_apll = { |
351 | .clk = { | 329 | .clk = { |
352 | .name = "mout_apll", | 330 | .name = "mout_apll", |
353 | .id = -1, | ||
354 | }, | 331 | }, |
355 | .reg_src = { .reg = S3C_CLK_SRC, .shift = 0, .size = 1 }, | 332 | .reg_src = { .reg = S3C_CLK_SRC, .shift = 0, .size = 1 }, |
356 | .sources = &clk_src_apll, | 333 | .sources = &clk_src_apll, |
@@ -369,7 +346,6 @@ static struct clksrc_sources clk_src_epll = { | |||
369 | static struct clksrc_clk clk_mout_epll = { | 346 | static struct clksrc_clk clk_mout_epll = { |
370 | .clk = { | 347 | .clk = { |
371 | .name = "mout_epll", | 348 | .name = "mout_epll", |
372 | .id = -1, | ||
373 | }, | 349 | }, |
374 | .reg_src = { .reg = S3C_CLK_SRC, .shift = 2, .size = 1 }, | 350 | .reg_src = { .reg = S3C_CLK_SRC, .shift = 2, .size = 1 }, |
375 | .sources = &clk_src_epll, | 351 | .sources = &clk_src_epll, |
@@ -388,7 +364,6 @@ static struct clksrc_sources clk_src_mpll = { | |||
388 | static struct clksrc_clk clk_mout_mpll = { | 364 | static struct clksrc_clk clk_mout_mpll = { |
389 | .clk = { | 365 | .clk = { |
390 | .name = "mout_mpll", | 366 | .name = "mout_mpll", |
391 | .id = -1, | ||
392 | }, | 367 | }, |
393 | .reg_src = { .reg = S3C_CLK_SRC, .shift = 1, .size = 1 }, | 368 | .reg_src = { .reg = S3C_CLK_SRC, .shift = 1, .size = 1 }, |
394 | .sources = &clk_src_mpll, | 369 | .sources = &clk_src_mpll, |
@@ -446,7 +421,6 @@ static int s3c64xx_clk_arm_set_rate(struct clk *clk, unsigned long rate) | |||
446 | 421 | ||
447 | static struct clk clk_arm = { | 422 | static struct clk clk_arm = { |
448 | .name = "armclk", | 423 | .name = "armclk", |
449 | .id = -1, | ||
450 | .parent = &clk_mout_apll.clk, | 424 | .parent = &clk_mout_apll.clk, |
451 | .ops = &(struct clk_ops) { | 425 | .ops = &(struct clk_ops) { |
452 | .get_rate = s3c64xx_clk_arm_get_rate, | 426 | .get_rate = s3c64xx_clk_arm_get_rate, |
@@ -473,7 +447,6 @@ static struct clk_ops clk_dout_ops = { | |||
473 | 447 | ||
474 | static struct clk clk_dout_mpll = { | 448 | static struct clk clk_dout_mpll = { |
475 | .name = "dout_mpll", | 449 | .name = "dout_mpll", |
476 | .id = -1, | ||
477 | .parent = &clk_mout_mpll.clk, | 450 | .parent = &clk_mout_mpll.clk, |
478 | .ops = &clk_dout_ops, | 451 | .ops = &clk_dout_ops, |
479 | }; | 452 | }; |
@@ -540,22 +513,18 @@ static struct clksrc_sources clkset_uhost = { | |||
540 | 513 | ||
541 | static struct clk clk_iis_cd0 = { | 514 | static struct clk clk_iis_cd0 = { |
542 | .name = "iis_cdclk0", | 515 | .name = "iis_cdclk0", |
543 | .id = -1, | ||
544 | }; | 516 | }; |
545 | 517 | ||
546 | static struct clk clk_iis_cd1 = { | 518 | static struct clk clk_iis_cd1 = { |
547 | .name = "iis_cdclk1", | 519 | .name = "iis_cdclk1", |
548 | .id = -1, | ||
549 | }; | 520 | }; |
550 | 521 | ||
551 | static struct clk clk_iisv4_cd = { | 522 | static struct clk clk_iisv4_cd = { |
552 | .name = "iis_cdclk_v4", | 523 | .name = "iis_cdclk_v4", |
553 | .id = -1, | ||
554 | }; | 524 | }; |
555 | 525 | ||
556 | static struct clk clk_pcm_cd = { | 526 | static struct clk clk_pcm_cd = { |
557 | .name = "pcm_cdclk", | 527 | .name = "pcm_cdclk", |
558 | .id = -1, | ||
559 | }; | 528 | }; |
560 | 529 | ||
561 | static struct clk *clkset_audio0_list[] = { | 530 | static struct clk *clkset_audio0_list[] = { |
@@ -610,7 +579,7 @@ static struct clksrc_clk clksrcs[] = { | |||
610 | { | 579 | { |
611 | .clk = { | 580 | .clk = { |
612 | .name = "mmc_bus", | 581 | .name = "mmc_bus", |
613 | .id = 0, | 582 | .devname = "s3c-sdhci.0", |
614 | .ctrlbit = S3C_CLKCON_SCLK_MMC0, | 583 | .ctrlbit = S3C_CLKCON_SCLK_MMC0, |
615 | .enable = s3c64xx_sclk_ctrl, | 584 | .enable = s3c64xx_sclk_ctrl, |
616 | }, | 585 | }, |
@@ -620,7 +589,7 @@ static struct clksrc_clk clksrcs[] = { | |||
620 | }, { | 589 | }, { |
621 | .clk = { | 590 | .clk = { |
622 | .name = "mmc_bus", | 591 | .name = "mmc_bus", |
623 | .id = 1, | 592 | .devname = "s3c-sdhci.1", |
624 | .ctrlbit = S3C_CLKCON_SCLK_MMC1, | 593 | .ctrlbit = S3C_CLKCON_SCLK_MMC1, |
625 | .enable = s3c64xx_sclk_ctrl, | 594 | .enable = s3c64xx_sclk_ctrl, |
626 | }, | 595 | }, |
@@ -630,7 +599,7 @@ static struct clksrc_clk clksrcs[] = { | |||
630 | }, { | 599 | }, { |
631 | .clk = { | 600 | .clk = { |
632 | .name = "mmc_bus", | 601 | .name = "mmc_bus", |
633 | .id = 2, | 602 | .devname = "s3c-sdhci.2", |
634 | .ctrlbit = S3C_CLKCON_SCLK_MMC2, | 603 | .ctrlbit = S3C_CLKCON_SCLK_MMC2, |
635 | .enable = s3c64xx_sclk_ctrl, | 604 | .enable = s3c64xx_sclk_ctrl, |
636 | }, | 605 | }, |
@@ -640,7 +609,6 @@ static struct clksrc_clk clksrcs[] = { | |||
640 | }, { | 609 | }, { |
641 | .clk = { | 610 | .clk = { |
642 | .name = "usb-bus-host", | 611 | .name = "usb-bus-host", |
643 | .id = -1, | ||
644 | .ctrlbit = S3C_CLKCON_SCLK_UHOST, | 612 | .ctrlbit = S3C_CLKCON_SCLK_UHOST, |
645 | .enable = s3c64xx_sclk_ctrl, | 613 | .enable = s3c64xx_sclk_ctrl, |
646 | }, | 614 | }, |
@@ -650,7 +618,6 @@ static struct clksrc_clk clksrcs[] = { | |||
650 | }, { | 618 | }, { |
651 | .clk = { | 619 | .clk = { |
652 | .name = "uclk1", | 620 | .name = "uclk1", |
653 | .id = -1, | ||
654 | .ctrlbit = S3C_CLKCON_SCLK_UART, | 621 | .ctrlbit = S3C_CLKCON_SCLK_UART, |
655 | .enable = s3c64xx_sclk_ctrl, | 622 | .enable = s3c64xx_sclk_ctrl, |
656 | }, | 623 | }, |
@@ -661,7 +628,7 @@ static struct clksrc_clk clksrcs[] = { | |||
661 | /* Where does UCLK0 come from? */ | 628 | /* Where does UCLK0 come from? */ |
662 | .clk = { | 629 | .clk = { |
663 | .name = "spi-bus", | 630 | .name = "spi-bus", |
664 | .id = 0, | 631 | .devname = "s3c64xx-spi.0", |
665 | .ctrlbit = S3C_CLKCON_SCLK_SPI0, | 632 | .ctrlbit = S3C_CLKCON_SCLK_SPI0, |
666 | .enable = s3c64xx_sclk_ctrl, | 633 | .enable = s3c64xx_sclk_ctrl, |
667 | }, | 634 | }, |
@@ -671,8 +638,7 @@ static struct clksrc_clk clksrcs[] = { | |||
671 | }, { | 638 | }, { |
672 | .clk = { | 639 | .clk = { |
673 | .name = "spi-bus", | 640 | .name = "spi-bus", |
674 | .id = 1, | 641 | .devname = "s3c64xx-spi.1", |
675 | .ctrlbit = S3C_CLKCON_SCLK_SPI1, | ||
676 | .enable = s3c64xx_sclk_ctrl, | 642 | .enable = s3c64xx_sclk_ctrl, |
677 | }, | 643 | }, |
678 | .reg_src = { .reg = S3C_CLK_SRC, .shift = 16, .size = 2 }, | 644 | .reg_src = { .reg = S3C_CLK_SRC, .shift = 16, .size = 2 }, |
@@ -681,7 +647,7 @@ static struct clksrc_clk clksrcs[] = { | |||
681 | }, { | 647 | }, { |
682 | .clk = { | 648 | .clk = { |
683 | .name = "audio-bus", | 649 | .name = "audio-bus", |
684 | .id = 0, | 650 | .devname = "samsung-i2s.0", |
685 | .ctrlbit = S3C_CLKCON_SCLK_AUDIO0, | 651 | .ctrlbit = S3C_CLKCON_SCLK_AUDIO0, |
686 | .enable = s3c64xx_sclk_ctrl, | 652 | .enable = s3c64xx_sclk_ctrl, |
687 | }, | 653 | }, |
@@ -691,7 +657,7 @@ static struct clksrc_clk clksrcs[] = { | |||
691 | }, { | 657 | }, { |
692 | .clk = { | 658 | .clk = { |
693 | .name = "audio-bus", | 659 | .name = "audio-bus", |
694 | .id = 1, | 660 | .devname = "samsung-i2s.1", |
695 | .ctrlbit = S3C_CLKCON_SCLK_AUDIO1, | 661 | .ctrlbit = S3C_CLKCON_SCLK_AUDIO1, |
696 | .enable = s3c64xx_sclk_ctrl, | 662 | .enable = s3c64xx_sclk_ctrl, |
697 | }, | 663 | }, |
@@ -701,7 +667,7 @@ static struct clksrc_clk clksrcs[] = { | |||
701 | }, { | 667 | }, { |
702 | .clk = { | 668 | .clk = { |
703 | .name = "audio-bus", | 669 | .name = "audio-bus", |
704 | .id = 2, | 670 | .devname = "samsung-i2s.2", |
705 | .ctrlbit = S3C6410_CLKCON_SCLK_AUDIO2, | 671 | .ctrlbit = S3C6410_CLKCON_SCLK_AUDIO2, |
706 | .enable = s3c64xx_sclk_ctrl, | 672 | .enable = s3c64xx_sclk_ctrl, |
707 | }, | 673 | }, |
@@ -711,7 +677,6 @@ static struct clksrc_clk clksrcs[] = { | |||
711 | }, { | 677 | }, { |
712 | .clk = { | 678 | .clk = { |
713 | .name = "irda-bus", | 679 | .name = "irda-bus", |
714 | .id = 0, | ||
715 | .ctrlbit = S3C_CLKCON_SCLK_IRDA, | 680 | .ctrlbit = S3C_CLKCON_SCLK_IRDA, |
716 | .enable = s3c64xx_sclk_ctrl, | 681 | .enable = s3c64xx_sclk_ctrl, |
717 | }, | 682 | }, |
@@ -721,7 +686,6 @@ static struct clksrc_clk clksrcs[] = { | |||
721 | }, { | 686 | }, { |
722 | .clk = { | 687 | .clk = { |
723 | .name = "camera", | 688 | .name = "camera", |
724 | .id = -1, | ||
725 | .ctrlbit = S3C_CLKCON_SCLK_CAM, | 689 | .ctrlbit = S3C_CLKCON_SCLK_CAM, |
726 | .enable = s3c64xx_sclk_ctrl, | 690 | .enable = s3c64xx_sclk_ctrl, |
727 | }, | 691 | }, |
diff --git a/arch/arm/mach-s3c64xx/dev-onenand1.c b/arch/arm/mach-s3c64xx/dev-onenand1.c index 92ffd5bac104..999f9e17a1e4 100644 --- a/arch/arm/mach-s3c64xx/dev-onenand1.c +++ b/arch/arm/mach-s3c64xx/dev-onenand1.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <mach/irqs.h> | 19 | #include <mach/irqs.h> |
20 | #include <mach/map.h> | 20 | #include <mach/map.h> |
21 | 21 | ||
22 | #include <plat/devs.h> | ||
23 | |||
22 | static struct resource s3c64xx_onenand1_resources[] = { | 24 | static struct resource s3c64xx_onenand1_resources[] = { |
23 | [0] = { | 25 | [0] = { |
24 | .start = S3C64XX_PA_ONENAND1, | 26 | .start = S3C64XX_PA_ONENAND1, |
@@ -46,10 +48,6 @@ struct platform_device s3c64xx_device_onenand1 = { | |||
46 | 48 | ||
47 | void s3c64xx_onenand1_set_platdata(struct onenand_platform_data *pdata) | 49 | void s3c64xx_onenand1_set_platdata(struct onenand_platform_data *pdata) |
48 | { | 50 | { |
49 | struct onenand_platform_data *pd; | 51 | s3c_set_platdata(pdata, sizeof(struct onenand_platform_data), |
50 | 52 | &s3c64xx_device_onenand1); | |
51 | pd = kmemdup(pdata, sizeof(struct onenand_platform_data), GFP_KERNEL); | ||
52 | if (!pd) | ||
53 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
54 | s3c64xx_device_onenand1.dev.platform_data = pd; | ||
55 | } | 53 | } |
diff --git a/arch/arm/mach-s3c64xx/include/mach/clkdev.h b/arch/arm/mach-s3c64xx/include/mach/clkdev.h new file mode 100644 index 000000000000..7dffa83d23ff --- /dev/null +++ b/arch/arm/mach-s3c64xx/include/mach/clkdev.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __MACH_CLKDEV_H__ | ||
2 | #define __MACH_CLKDEV_H__ | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do {} while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-fb.h b/arch/arm/mach-s3c64xx/include/mach/regs-fb.h deleted file mode 100644 index a06ee0af9a4b..000000000000 --- a/arch/arm/mach-s3c64xx/include/mach/regs-fb.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2008 Openmoko, Inc. | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Copyright 2009 Samsung Electronics Co. | ||
5 | * | ||
6 | * Pawel Osciak <p.osciak@samsung.com> | ||
7 | * Based on plat-s3c/include/plat/regs-fb.h by Ben Dooks <ben@simtec.co.uk> | ||
8 | * | ||
9 | * Framebuffer register definitions for Samsung S3C64xx. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MACH_REGS_FB_H | ||
17 | #define __ASM_ARCH_MACH_REGS_FB_H __FILE__ | ||
18 | |||
19 | #include <plat/regs-fb-v4.h> | ||
20 | |||
21 | #endif /* __ASM_ARCH_MACH_REGS_FB_H */ | ||
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c index a53cf149476e..cb8864327ac4 100644 --- a/arch/arm/mach-s3c64xx/mach-anw6410.c +++ b/arch/arm/mach-s3c64xx/mach-anw6410.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <asm/mach/irq.h> | 35 | #include <asm/mach/irq.h> |
36 | 36 | ||
37 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
38 | #include <mach/regs-fb.h> | ||
39 | #include <mach/map.h> | 38 | #include <mach/map.h> |
40 | 39 | ||
41 | #include <asm/irq.h> | 40 | #include <asm/irq.h> |
@@ -44,6 +43,7 @@ | |||
44 | #include <plat/regs-serial.h> | 43 | #include <plat/regs-serial.h> |
45 | #include <plat/iic.h> | 44 | #include <plat/iic.h> |
46 | #include <plat/fb.h> | 45 | #include <plat/fb.h> |
46 | #include <plat/regs-fb-v4.h> | ||
47 | 47 | ||
48 | #include <mach/s3c6410.h> | 48 | #include <mach/s3c6410.h> |
49 | #include <plat/clock.h> | 49 | #include <plat/clock.h> |
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c index b2639582caca..b3d93cc8dde0 100644 --- a/arch/arm/mach-s3c64xx/mach-hmt.c +++ b/arch/arm/mach-s3c64xx/mach-hmt.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <asm/mach/irq.h> | 27 | #include <asm/mach/irq.h> |
28 | 28 | ||
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <mach/regs-fb.h> | ||
31 | #include <mach/map.h> | 30 | #include <mach/map.h> |
32 | 31 | ||
33 | #include <asm/irq.h> | 32 | #include <asm/irq.h> |
@@ -42,6 +41,7 @@ | |||
42 | #include <plat/clock.h> | 41 | #include <plat/clock.h> |
43 | #include <plat/devs.h> | 42 | #include <plat/devs.h> |
44 | #include <plat/cpu.h> | 43 | #include <plat/cpu.h> |
44 | #include <plat/regs-fb-v4.h> | ||
45 | 45 | ||
46 | #define UCON S3C2410_UCON_DEFAULT | 46 | #define UCON S3C2410_UCON_DEFAULT |
47 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE) | 47 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE) |
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c index 89f35e02e883..527f49bd1b57 100644 --- a/arch/arm/mach-s3c64xx/mach-mini6410.c +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
30 | 30 | ||
31 | #include <mach/map.h> | 31 | #include <mach/map.h> |
32 | #include <mach/regs-fb.h> | ||
33 | #include <mach/regs-gpio.h> | 32 | #include <mach/regs-gpio.h> |
34 | #include <mach/regs-modem.h> | 33 | #include <mach/regs-modem.h> |
35 | #include <mach/regs-srom.h> | 34 | #include <mach/regs-srom.h> |
@@ -42,6 +41,7 @@ | |||
42 | #include <plat/nand.h> | 41 | #include <plat/nand.h> |
43 | #include <plat/regs-serial.h> | 42 | #include <plat/regs-serial.h> |
44 | #include <plat/ts.h> | 43 | #include <plat/ts.h> |
44 | #include <plat/regs-fb-v4.h> | ||
45 | 45 | ||
46 | #include <video/platform_lcd.h> | 46 | #include <video/platform_lcd.h> |
47 | 47 | ||
diff --git a/arch/arm/mach-s3c64xx/mach-ncp.c b/arch/arm/mach-s3c64xx/mach-ncp.c index c4986498cd12..01c6857c5b63 100644 --- a/arch/arm/mach-s3c64xx/mach-ncp.c +++ b/arch/arm/mach-s3c64xx/mach-ncp.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <asm/mach/irq.h> | 30 | #include <asm/mach/irq.h> |
31 | 31 | ||
32 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
33 | #include <mach/regs-fb.h> | ||
34 | #include <mach/map.h> | 33 | #include <mach/map.h> |
35 | 34 | ||
36 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
@@ -44,6 +43,7 @@ | |||
44 | #include <plat/clock.h> | 43 | #include <plat/clock.h> |
45 | #include <plat/devs.h> | 44 | #include <plat/devs.h> |
46 | #include <plat/cpu.h> | 45 | #include <plat/cpu.h> |
46 | #include <plat/regs-fb-v4.h> | ||
47 | 47 | ||
48 | #define UCON S3C2410_UCON_DEFAULT | 48 | #define UCON S3C2410_UCON_DEFAULT |
49 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | 49 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE |
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c index 4957ab0a0d4a..95b04b1729e3 100644 --- a/arch/arm/mach-s3c64xx/mach-real6410.c +++ b/arch/arm/mach-s3c64xx/mach-real6410.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
31 | 31 | ||
32 | #include <mach/map.h> | 32 | #include <mach/map.h> |
33 | #include <mach/regs-fb.h> | ||
34 | #include <mach/regs-gpio.h> | 33 | #include <mach/regs-gpio.h> |
35 | #include <mach/regs-modem.h> | 34 | #include <mach/regs-modem.h> |
36 | #include <mach/regs-srom.h> | 35 | #include <mach/regs-srom.h> |
@@ -43,6 +42,7 @@ | |||
43 | #include <plat/nand.h> | 42 | #include <plat/nand.h> |
44 | #include <plat/regs-serial.h> | 43 | #include <plat/regs-serial.h> |
45 | #include <plat/ts.h> | 44 | #include <plat/ts.h> |
45 | #include <plat/regs-fb-v4.h> | ||
46 | 46 | ||
47 | #include <video/platform_lcd.h> | 47 | #include <video/platform_lcd.h> |
48 | 48 | ||
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c index 3a3e5acde523..342e8dfddf8b 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq5.c +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
22 | 22 | ||
23 | #include <mach/map.h> | 23 | #include <mach/map.h> |
24 | #include <mach/regs-fb.h> | ||
25 | #include <mach/regs-gpio.h> | 24 | #include <mach/regs-gpio.h> |
26 | #include <mach/s3c6410.h> | 25 | #include <mach/s3c6410.h> |
27 | 26 | ||
@@ -29,6 +28,7 @@ | |||
29 | #include <plat/devs.h> | 28 | #include <plat/devs.h> |
30 | #include <plat/fb.h> | 29 | #include <plat/fb.h> |
31 | #include <plat/gpio-cfg.h> | 30 | #include <plat/gpio-cfg.h> |
31 | #include <plat/regs-fb-v4.h> | ||
32 | 32 | ||
33 | #include "mach-smartq.h" | 33 | #include "mach-smartq.h" |
34 | 34 | ||
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c index e65375877d53..57963977da8e 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq7.c +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
22 | 22 | ||
23 | #include <mach/map.h> | 23 | #include <mach/map.h> |
24 | #include <mach/regs-fb.h> | ||
25 | #include <mach/regs-gpio.h> | 24 | #include <mach/regs-gpio.h> |
26 | #include <mach/s3c6410.h> | 25 | #include <mach/s3c6410.h> |
27 | 26 | ||
@@ -29,6 +28,7 @@ | |||
29 | #include <plat/devs.h> | 28 | #include <plat/devs.h> |
30 | #include <plat/fb.h> | 29 | #include <plat/fb.h> |
31 | #include <plat/gpio-cfg.h> | 30 | #include <plat/gpio-cfg.h> |
31 | #include <plat/regs-fb-v4.h> | ||
32 | 32 | ||
33 | #include "mach-smartq.h" | 33 | #include "mach-smartq.h" |
34 | 34 | ||
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index 2c0353a80906..ecbea92bf83b 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -48,7 +48,6 @@ | |||
48 | #include <asm/mach/irq.h> | 48 | #include <asm/mach/irq.h> |
49 | 49 | ||
50 | #include <mach/hardware.h> | 50 | #include <mach/hardware.h> |
51 | #include <mach/regs-fb.h> | ||
52 | #include <mach/map.h> | 51 | #include <mach/map.h> |
53 | 52 | ||
54 | #include <asm/irq.h> | 53 | #include <asm/irq.h> |
@@ -71,6 +70,8 @@ | |||
71 | #include <plat/adc.h> | 70 | #include <plat/adc.h> |
72 | #include <plat/ts.h> | 71 | #include <plat/ts.h> |
73 | #include <plat/keypad.h> | 72 | #include <plat/keypad.h> |
73 | #include <plat/backlight.h> | ||
74 | #include <plat/regs-fb-v4.h> | ||
74 | 75 | ||
75 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK | 76 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK |
76 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB | 77 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB |
@@ -209,17 +210,9 @@ static struct platform_device smdk6410_smsc911x = { | |||
209 | }; | 210 | }; |
210 | 211 | ||
211 | #ifdef CONFIG_REGULATOR | 212 | #ifdef CONFIG_REGULATOR |
212 | static struct regulator_consumer_supply smdk6410_b_pwr_5v_consumers[] = { | 213 | static struct regulator_consumer_supply smdk6410_b_pwr_5v_consumers[] __initdata = { |
213 | { | 214 | REGULATOR_SUPPLY("PVDD", "0-001b"), |
214 | /* WM8580 */ | 215 | REGULATOR_SUPPLY("AVDD", "0-001b"), |
215 | .supply = "PVDD", | ||
216 | .dev_name = "0-001b", | ||
217 | }, | ||
218 | { | ||
219 | /* WM8580 */ | ||
220 | .supply = "AVDD", | ||
221 | .dev_name = "0-001b", | ||
222 | }, | ||
223 | }; | 216 | }; |
224 | 217 | ||
225 | static struct regulator_init_data smdk6410_b_pwr_5v_data = { | 218 | static struct regulator_init_data smdk6410_b_pwr_5v_data = { |
@@ -337,16 +330,12 @@ static struct platform_device *smdk6410_devices[] __initdata = { | |||
337 | &s3c_device_rtc, | 330 | &s3c_device_rtc, |
338 | &s3c_device_ts, | 331 | &s3c_device_ts, |
339 | &s3c_device_wdt, | 332 | &s3c_device_wdt, |
340 | &s3c_device_timer[1], | ||
341 | &smdk6410_backlight_device, | ||
342 | }; | 333 | }; |
343 | 334 | ||
344 | #ifdef CONFIG_REGULATOR | 335 | #ifdef CONFIG_REGULATOR |
345 | /* ARM core */ | 336 | /* ARM core */ |
346 | static struct regulator_consumer_supply smdk6410_vddarm_consumers[] = { | 337 | static struct regulator_consumer_supply smdk6410_vddarm_consumers[] = { |
347 | { | 338 | REGULATOR_SUPPLY("vddarm", NULL), |
348 | .supply = "vddarm", | ||
349 | } | ||
350 | }; | 339 | }; |
351 | 340 | ||
352 | /* VDDARM, BUCK1 on J5 */ | 341 | /* VDDARM, BUCK1 on J5 */ |
@@ -484,11 +473,7 @@ static struct regulator_init_data wm8350_dcdc3_data = { | |||
484 | 473 | ||
485 | /* USB, EXT, PCM, ADC/DAC, USB, MMC */ | 474 | /* USB, EXT, PCM, ADC/DAC, USB, MMC */ |
486 | static struct regulator_consumer_supply wm8350_dcdc4_consumers[] = { | 475 | static struct regulator_consumer_supply wm8350_dcdc4_consumers[] = { |
487 | { | 476 | REGULATOR_SUPPLY("DVDD", "0-001b"), |
488 | /* WM8580 */ | ||
489 | .supply = "DVDD", | ||
490 | .dev_name = "0-001b", | ||
491 | }, | ||
492 | }; | 477 | }; |
493 | 478 | ||
494 | static struct regulator_init_data wm8350_dcdc4_data = { | 479 | static struct regulator_init_data wm8350_dcdc4_data = { |
@@ -599,7 +584,7 @@ static struct regulator_init_data wm1192_dcdc3 = { | |||
599 | }; | 584 | }; |
600 | 585 | ||
601 | static struct regulator_consumer_supply wm1192_ldo1_consumers[] = { | 586 | static struct regulator_consumer_supply wm1192_ldo1_consumers[] = { |
602 | { .supply = "DVDD", .dev_name = "0-001b", }, /* WM8580 */ | 587 | REGULATOR_SUPPLY("DVDD", "0-001b"), /* WM8580 */ |
603 | }; | 588 | }; |
604 | 589 | ||
605 | static struct regulator_init_data wm1192_ldo1 = { | 590 | static struct regulator_init_data wm1192_ldo1 = { |
@@ -679,6 +664,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { | |||
679 | .oversampling_shift = 2, | 664 | .oversampling_shift = 2, |
680 | }; | 665 | }; |
681 | 666 | ||
667 | /* LCD Backlight data */ | ||
668 | static struct samsung_bl_gpio_info smdk6410_bl_gpio_info = { | ||
669 | .no = S3C64XX_GPF(15), | ||
670 | .func = S3C_GPIO_SFN(2), | ||
671 | }; | ||
672 | |||
673 | static struct platform_pwm_backlight_data smdk6410_bl_data = { | ||
674 | .pwm_id = 1, | ||
675 | }; | ||
676 | |||
682 | static void __init smdk6410_map_io(void) | 677 | static void __init smdk6410_map_io(void) |
683 | { | 678 | { |
684 | u32 tmp; | 679 | u32 tmp; |
@@ -740,6 +735,8 @@ static void __init smdk6410_machine_init(void) | |||
740 | 735 | ||
741 | s3c_ide_set_platdata(&smdk6410_ide_pdata); | 736 | s3c_ide_set_platdata(&smdk6410_ide_pdata); |
742 | 737 | ||
738 | samsung_bl_set(&smdk6410_bl_gpio_info, &smdk6410_bl_data); | ||
739 | |||
743 | platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); | 740 | platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); |
744 | } | 741 | } |
745 | 742 | ||
diff --git a/arch/arm/mach-s3c64xx/setup-fb-24bpp.c b/arch/arm/mach-s3c64xx/setup-fb-24bpp.c index 8f3091182f9c..83d2afb79e9f 100644 --- a/arch/arm/mach-s3c64xx/setup-fb-24bpp.c +++ b/arch/arm/mach-s3c64xx/setup-fb-24bpp.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | 19 | ||
20 | #include <mach/regs-fb.h> | ||
21 | #include <plat/fb.h> | 20 | #include <plat/fb.h> |
22 | #include <plat/gpio-cfg.h> | 21 | #include <plat/gpio-cfg.h> |
23 | 22 | ||
diff --git a/arch/arm/mach-s5p64x0/Kconfig b/arch/arm/mach-s5p64x0/Kconfig index 017af4c4293c..65c7518dad7f 100644 --- a/arch/arm/mach-s5p64x0/Kconfig +++ b/arch/arm/mach-s5p64x0/Kconfig | |||
@@ -36,6 +36,7 @@ config MACH_SMDK6440 | |||
36 | select S3C_DEV_WDT | 36 | select S3C_DEV_WDT |
37 | select S3C64XX_DEV_SPI | 37 | select S3C64XX_DEV_SPI |
38 | select SAMSUNG_DEV_ADC | 38 | select SAMSUNG_DEV_ADC |
39 | select SAMSUNG_DEV_BACKLIGHT | ||
39 | select SAMSUNG_DEV_PWM | 40 | select SAMSUNG_DEV_PWM |
40 | select SAMSUNG_DEV_TS | 41 | select SAMSUNG_DEV_TS |
41 | select S5P64X0_SETUP_I2C1 | 42 | select S5P64X0_SETUP_I2C1 |
@@ -50,6 +51,7 @@ config MACH_SMDK6450 | |||
50 | select S3C_DEV_WDT | 51 | select S3C_DEV_WDT |
51 | select S3C64XX_DEV_SPI | 52 | select S3C64XX_DEV_SPI |
52 | select SAMSUNG_DEV_ADC | 53 | select SAMSUNG_DEV_ADC |
54 | select SAMSUNG_DEV_BACKLIGHT | ||
53 | select SAMSUNG_DEV_PWM | 55 | select SAMSUNG_DEV_PWM |
54 | select SAMSUNG_DEV_TS | 56 | select SAMSUNG_DEV_TS |
55 | select S5P64X0_SETUP_I2C1 | 57 | select S5P64X0_SETUP_I2C1 |
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6440.c b/arch/arm/mach-s5p64x0/clock-s5p6440.c index 9f12c2ebf416..0e9cd3092dd2 100644 --- a/arch/arm/mach-s5p64x0/clock-s5p6440.c +++ b/arch/arm/mach-s5p64x0/clock-s5p6440.c | |||
@@ -95,7 +95,6 @@ static struct clk_ops s5p6440_epll_ops = { | |||
95 | static struct clksrc_clk clk_hclk = { | 95 | static struct clksrc_clk clk_hclk = { |
96 | .clk = { | 96 | .clk = { |
97 | .name = "clk_hclk", | 97 | .name = "clk_hclk", |
98 | .id = -1, | ||
99 | .parent = &clk_armclk.clk, | 98 | .parent = &clk_armclk.clk, |
100 | }, | 99 | }, |
101 | .reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 8, .size = 4 }, | 100 | .reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 8, .size = 4 }, |
@@ -104,7 +103,6 @@ static struct clksrc_clk clk_hclk = { | |||
104 | static struct clksrc_clk clk_pclk = { | 103 | static struct clksrc_clk clk_pclk = { |
105 | .clk = { | 104 | .clk = { |
106 | .name = "clk_pclk", | 105 | .name = "clk_pclk", |
107 | .id = -1, | ||
108 | .parent = &clk_hclk.clk, | 106 | .parent = &clk_hclk.clk, |
109 | }, | 107 | }, |
110 | .reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 12, .size = 4 }, | 108 | .reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 12, .size = 4 }, |
@@ -112,7 +110,6 @@ static struct clksrc_clk clk_pclk = { | |||
112 | static struct clksrc_clk clk_hclk_low = { | 110 | static struct clksrc_clk clk_hclk_low = { |
113 | .clk = { | 111 | .clk = { |
114 | .name = "clk_hclk_low", | 112 | .name = "clk_hclk_low", |
115 | .id = -1, | ||
116 | }, | 113 | }, |
117 | .sources = &clkset_hclk_low, | 114 | .sources = &clkset_hclk_low, |
118 | .reg_src = { .reg = S5P64X0_SYS_OTHERS, .shift = 6, .size = 1 }, | 115 | .reg_src = { .reg = S5P64X0_SYS_OTHERS, .shift = 6, .size = 1 }, |
@@ -122,7 +119,6 @@ static struct clksrc_clk clk_hclk_low = { | |||
122 | static struct clksrc_clk clk_pclk_low = { | 119 | static struct clksrc_clk clk_pclk_low = { |
123 | .clk = { | 120 | .clk = { |
124 | .name = "clk_pclk_low", | 121 | .name = "clk_pclk_low", |
125 | .id = -1, | ||
126 | .parent = &clk_hclk_low.clk, | 122 | .parent = &clk_hclk_low.clk, |
127 | }, | 123 | }, |
128 | .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 12, .size = 4 }, | 124 | .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 12, .size = 4 }, |
@@ -136,187 +132,167 @@ static struct clksrc_clk clk_pclk_low = { | |||
136 | static struct clk init_clocks_off[] = { | 132 | static struct clk init_clocks_off[] = { |
137 | { | 133 | { |
138 | .name = "nand", | 134 | .name = "nand", |
139 | .id = -1, | ||
140 | .parent = &clk_hclk.clk, | 135 | .parent = &clk_hclk.clk, |
141 | .enable = s5p64x0_mem_ctrl, | 136 | .enable = s5p64x0_mem_ctrl, |
142 | .ctrlbit = (1 << 2), | 137 | .ctrlbit = (1 << 2), |
143 | }, { | 138 | }, { |
144 | .name = "post", | 139 | .name = "post", |
145 | .id = -1, | ||
146 | .parent = &clk_hclk_low.clk, | 140 | .parent = &clk_hclk_low.clk, |
147 | .enable = s5p64x0_hclk0_ctrl, | 141 | .enable = s5p64x0_hclk0_ctrl, |
148 | .ctrlbit = (1 << 5) | 142 | .ctrlbit = (1 << 5) |
149 | }, { | 143 | }, { |
150 | .name = "2d", | 144 | .name = "2d", |
151 | .id = -1, | ||
152 | .parent = &clk_hclk.clk, | 145 | .parent = &clk_hclk.clk, |
153 | .enable = s5p64x0_hclk0_ctrl, | 146 | .enable = s5p64x0_hclk0_ctrl, |
154 | .ctrlbit = (1 << 8), | 147 | .ctrlbit = (1 << 8), |
155 | }, { | 148 | }, { |
156 | .name = "pdma", | 149 | .name = "pdma", |
157 | .id = -1, | ||
158 | .parent = &clk_hclk_low.clk, | 150 | .parent = &clk_hclk_low.clk, |
159 | .enable = s5p64x0_hclk0_ctrl, | 151 | .enable = s5p64x0_hclk0_ctrl, |
160 | .ctrlbit = (1 << 12), | 152 | .ctrlbit = (1 << 12), |
161 | }, { | 153 | }, { |
162 | .name = "hsmmc", | 154 | .name = "hsmmc", |
163 | .id = 0, | 155 | .devname = "s3c-sdhci.0", |
164 | .parent = &clk_hclk_low.clk, | 156 | .parent = &clk_hclk_low.clk, |
165 | .enable = s5p64x0_hclk0_ctrl, | 157 | .enable = s5p64x0_hclk0_ctrl, |
166 | .ctrlbit = (1 << 17), | 158 | .ctrlbit = (1 << 17), |
167 | }, { | 159 | }, { |
168 | .name = "hsmmc", | 160 | .name = "hsmmc", |
169 | .id = 1, | 161 | .devname = "s3c-sdhci.1", |
170 | .parent = &clk_hclk_low.clk, | 162 | .parent = &clk_hclk_low.clk, |
171 | .enable = s5p64x0_hclk0_ctrl, | 163 | .enable = s5p64x0_hclk0_ctrl, |
172 | .ctrlbit = (1 << 18), | 164 | .ctrlbit = (1 << 18), |
173 | }, { | 165 | }, { |
174 | .name = "hsmmc", | 166 | .name = "hsmmc", |
175 | .id = 2, | 167 | .devname = "s3c-sdhci.2", |
176 | .parent = &clk_hclk_low.clk, | 168 | .parent = &clk_hclk_low.clk, |
177 | .enable = s5p64x0_hclk0_ctrl, | 169 | .enable = s5p64x0_hclk0_ctrl, |
178 | .ctrlbit = (1 << 19), | 170 | .ctrlbit = (1 << 19), |
179 | }, { | 171 | }, { |
180 | .name = "otg", | 172 | .name = "otg", |
181 | .id = -1, | ||
182 | .parent = &clk_hclk_low.clk, | 173 | .parent = &clk_hclk_low.clk, |
183 | .enable = s5p64x0_hclk0_ctrl, | 174 | .enable = s5p64x0_hclk0_ctrl, |
184 | .ctrlbit = (1 << 20) | 175 | .ctrlbit = (1 << 20) |
185 | }, { | 176 | }, { |
186 | .name = "irom", | 177 | .name = "irom", |
187 | .id = -1, | ||
188 | .parent = &clk_hclk.clk, | 178 | .parent = &clk_hclk.clk, |
189 | .enable = s5p64x0_hclk0_ctrl, | 179 | .enable = s5p64x0_hclk0_ctrl, |
190 | .ctrlbit = (1 << 25), | 180 | .ctrlbit = (1 << 25), |
191 | }, { | 181 | }, { |
192 | .name = "lcd", | 182 | .name = "lcd", |
193 | .id = -1, | ||
194 | .parent = &clk_hclk_low.clk, | 183 | .parent = &clk_hclk_low.clk, |
195 | .enable = s5p64x0_hclk1_ctrl, | 184 | .enable = s5p64x0_hclk1_ctrl, |
196 | .ctrlbit = (1 << 1), | 185 | .ctrlbit = (1 << 1), |
197 | }, { | 186 | }, { |
198 | .name = "hclk_fimgvg", | 187 | .name = "hclk_fimgvg", |
199 | .id = -1, | ||
200 | .parent = &clk_hclk.clk, | 188 | .parent = &clk_hclk.clk, |
201 | .enable = s5p64x0_hclk1_ctrl, | 189 | .enable = s5p64x0_hclk1_ctrl, |
202 | .ctrlbit = (1 << 2), | 190 | .ctrlbit = (1 << 2), |
203 | }, { | 191 | }, { |
204 | .name = "tsi", | 192 | .name = "tsi", |
205 | .id = -1, | ||
206 | .parent = &clk_hclk_low.clk, | 193 | .parent = &clk_hclk_low.clk, |
207 | .enable = s5p64x0_hclk1_ctrl, | 194 | .enable = s5p64x0_hclk1_ctrl, |
208 | .ctrlbit = (1 << 0), | 195 | .ctrlbit = (1 << 0), |
209 | }, { | 196 | }, { |
210 | .name = "watchdog", | 197 | .name = "watchdog", |
211 | .id = -1, | ||
212 | .parent = &clk_pclk_low.clk, | 198 | .parent = &clk_pclk_low.clk, |
213 | .enable = s5p64x0_pclk_ctrl, | 199 | .enable = s5p64x0_pclk_ctrl, |
214 | .ctrlbit = (1 << 5), | 200 | .ctrlbit = (1 << 5), |
215 | }, { | 201 | }, { |
216 | .name = "rtc", | 202 | .name = "rtc", |
217 | .id = -1, | ||
218 | .parent = &clk_pclk_low.clk, | 203 | .parent = &clk_pclk_low.clk, |
219 | .enable = s5p64x0_pclk_ctrl, | 204 | .enable = s5p64x0_pclk_ctrl, |
220 | .ctrlbit = (1 << 6), | 205 | .ctrlbit = (1 << 6), |
221 | }, { | 206 | }, { |
222 | .name = "timers", | 207 | .name = "timers", |
223 | .id = -1, | ||
224 | .parent = &clk_pclk_low.clk, | 208 | .parent = &clk_pclk_low.clk, |
225 | .enable = s5p64x0_pclk_ctrl, | 209 | .enable = s5p64x0_pclk_ctrl, |
226 | .ctrlbit = (1 << 7), | 210 | .ctrlbit = (1 << 7), |
227 | }, { | 211 | }, { |
228 | .name = "pcm", | 212 | .name = "pcm", |
229 | .id = -1, | ||
230 | .parent = &clk_pclk_low.clk, | 213 | .parent = &clk_pclk_low.clk, |
231 | .enable = s5p64x0_pclk_ctrl, | 214 | .enable = s5p64x0_pclk_ctrl, |
232 | .ctrlbit = (1 << 8), | 215 | .ctrlbit = (1 << 8), |
233 | }, { | 216 | }, { |
234 | .name = "adc", | 217 | .name = "adc", |
235 | .id = -1, | ||
236 | .parent = &clk_pclk_low.clk, | 218 | .parent = &clk_pclk_low.clk, |
237 | .enable = s5p64x0_pclk_ctrl, | 219 | .enable = s5p64x0_pclk_ctrl, |
238 | .ctrlbit = (1 << 12), | 220 | .ctrlbit = (1 << 12), |
239 | }, { | 221 | }, { |
240 | .name = "i2c", | 222 | .name = "i2c", |
241 | .id = -1, | ||
242 | .parent = &clk_pclk_low.clk, | 223 | .parent = &clk_pclk_low.clk, |
243 | .enable = s5p64x0_pclk_ctrl, | 224 | .enable = s5p64x0_pclk_ctrl, |
244 | .ctrlbit = (1 << 17), | 225 | .ctrlbit = (1 << 17), |
245 | }, { | 226 | }, { |
246 | .name = "spi", | 227 | .name = "spi", |
247 | .id = 0, | 228 | .devname = "s3c64xx-spi.0", |
248 | .parent = &clk_pclk_low.clk, | 229 | .parent = &clk_pclk_low.clk, |
249 | .enable = s5p64x0_pclk_ctrl, | 230 | .enable = s5p64x0_pclk_ctrl, |
250 | .ctrlbit = (1 << 21), | 231 | .ctrlbit = (1 << 21), |
251 | }, { | 232 | }, { |
252 | .name = "spi", | 233 | .name = "spi", |
253 | .id = 1, | 234 | .devname = "s3c64xx-spi.1", |
254 | .parent = &clk_pclk_low.clk, | 235 | .parent = &clk_pclk_low.clk, |
255 | .enable = s5p64x0_pclk_ctrl, | 236 | .enable = s5p64x0_pclk_ctrl, |
256 | .ctrlbit = (1 << 22), | 237 | .ctrlbit = (1 << 22), |
257 | }, { | 238 | }, { |
258 | .name = "gps", | 239 | .name = "gps", |
259 | .id = -1, | ||
260 | .parent = &clk_pclk_low.clk, | 240 | .parent = &clk_pclk_low.clk, |
261 | .enable = s5p64x0_pclk_ctrl, | 241 | .enable = s5p64x0_pclk_ctrl, |
262 | .ctrlbit = (1 << 25), | 242 | .ctrlbit = (1 << 25), |
263 | }, { | 243 | }, { |
264 | .name = "iis", | 244 | .name = "iis", |
265 | .id = 0, | 245 | .devname = "samsung-i2s.0", |
266 | .parent = &clk_pclk_low.clk, | 246 | .parent = &clk_pclk_low.clk, |
267 | .enable = s5p64x0_pclk_ctrl, | 247 | .enable = s5p64x0_pclk_ctrl, |
268 | .ctrlbit = (1 << 26), | 248 | .ctrlbit = (1 << 26), |
269 | }, { | 249 | }, { |
270 | .name = "dsim", | 250 | .name = "dsim", |
271 | .id = -1, | ||
272 | .parent = &clk_pclk_low.clk, | 251 | .parent = &clk_pclk_low.clk, |
273 | .enable = s5p64x0_pclk_ctrl, | 252 | .enable = s5p64x0_pclk_ctrl, |
274 | .ctrlbit = (1 << 28), | 253 | .ctrlbit = (1 << 28), |
275 | }, { | 254 | }, { |
276 | .name = "etm", | 255 | .name = "etm", |
277 | .id = -1, | ||
278 | .parent = &clk_pclk.clk, | 256 | .parent = &clk_pclk.clk, |
279 | .enable = s5p64x0_pclk_ctrl, | 257 | .enable = s5p64x0_pclk_ctrl, |
280 | .ctrlbit = (1 << 29), | 258 | .ctrlbit = (1 << 29), |
281 | }, { | 259 | }, { |
282 | .name = "dmc0", | 260 | .name = "dmc0", |
283 | .id = -1, | ||
284 | .parent = &clk_pclk.clk, | 261 | .parent = &clk_pclk.clk, |
285 | .enable = s5p64x0_pclk_ctrl, | 262 | .enable = s5p64x0_pclk_ctrl, |
286 | .ctrlbit = (1 << 30), | 263 | .ctrlbit = (1 << 30), |
287 | }, { | 264 | }, { |
288 | .name = "pclk_fimgvg", | 265 | .name = "pclk_fimgvg", |
289 | .id = -1, | ||
290 | .parent = &clk_pclk.clk, | 266 | .parent = &clk_pclk.clk, |
291 | .enable = s5p64x0_pclk_ctrl, | 267 | .enable = s5p64x0_pclk_ctrl, |
292 | .ctrlbit = (1 << 31), | 268 | .ctrlbit = (1 << 31), |
293 | }, { | 269 | }, { |
294 | .name = "sclk_spi_48", | 270 | .name = "sclk_spi_48", |
295 | .id = 0, | 271 | .devname = "s3c64xx-spi.0", |
296 | .parent = &clk_48m, | 272 | .parent = &clk_48m, |
297 | .enable = s5p64x0_sclk_ctrl, | 273 | .enable = s5p64x0_sclk_ctrl, |
298 | .ctrlbit = (1 << 22), | 274 | .ctrlbit = (1 << 22), |
299 | }, { | 275 | }, { |
300 | .name = "sclk_spi_48", | 276 | .name = "sclk_spi_48", |
301 | .id = 1, | 277 | .devname = "s3c64xx-spi.1", |
302 | .parent = &clk_48m, | 278 | .parent = &clk_48m, |
303 | .enable = s5p64x0_sclk_ctrl, | 279 | .enable = s5p64x0_sclk_ctrl, |
304 | .ctrlbit = (1 << 23), | 280 | .ctrlbit = (1 << 23), |
305 | }, { | 281 | }, { |
306 | .name = "mmc_48m", | 282 | .name = "mmc_48m", |
307 | .id = 0, | 283 | .devname = "s3c-sdhci.0", |
308 | .parent = &clk_48m, | 284 | .parent = &clk_48m, |
309 | .enable = s5p64x0_sclk_ctrl, | 285 | .enable = s5p64x0_sclk_ctrl, |
310 | .ctrlbit = (1 << 27), | 286 | .ctrlbit = (1 << 27), |
311 | }, { | 287 | }, { |
312 | .name = "mmc_48m", | 288 | .name = "mmc_48m", |
313 | .id = 1, | 289 | .devname = "s3c-sdhci.1", |
314 | .parent = &clk_48m, | 290 | .parent = &clk_48m, |
315 | .enable = s5p64x0_sclk_ctrl, | 291 | .enable = s5p64x0_sclk_ctrl, |
316 | .ctrlbit = (1 << 28), | 292 | .ctrlbit = (1 << 28), |
317 | }, { | 293 | }, { |
318 | .name = "mmc_48m", | 294 | .name = "mmc_48m", |
319 | .id = 2, | 295 | .devname = "s3c-sdhci.2", |
320 | .parent = &clk_48m, | 296 | .parent = &clk_48m, |
321 | .enable = s5p64x0_sclk_ctrl, | 297 | .enable = s5p64x0_sclk_ctrl, |
322 | .ctrlbit = (1 << 29), | 298 | .ctrlbit = (1 << 29), |
@@ -329,43 +305,40 @@ static struct clk init_clocks_off[] = { | |||
329 | static struct clk init_clocks[] = { | 305 | static struct clk init_clocks[] = { |
330 | { | 306 | { |
331 | .name = "intc", | 307 | .name = "intc", |
332 | .id = -1, | ||
333 | .parent = &clk_hclk.clk, | 308 | .parent = &clk_hclk.clk, |
334 | .enable = s5p64x0_hclk0_ctrl, | 309 | .enable = s5p64x0_hclk0_ctrl, |
335 | .ctrlbit = (1 << 1), | 310 | .ctrlbit = (1 << 1), |
336 | }, { | 311 | }, { |
337 | .name = "mem", | 312 | .name = "mem", |
338 | .id = -1, | ||
339 | .parent = &clk_hclk.clk, | 313 | .parent = &clk_hclk.clk, |
340 | .enable = s5p64x0_hclk0_ctrl, | 314 | .enable = s5p64x0_hclk0_ctrl, |
341 | .ctrlbit = (1 << 21), | 315 | .ctrlbit = (1 << 21), |
342 | }, { | 316 | }, { |
343 | .name = "uart", | 317 | .name = "uart", |
344 | .id = 0, | 318 | .devname = "s3c6400-uart.0", |
345 | .parent = &clk_pclk_low.clk, | 319 | .parent = &clk_pclk_low.clk, |
346 | .enable = s5p64x0_pclk_ctrl, | 320 | .enable = s5p64x0_pclk_ctrl, |
347 | .ctrlbit = (1 << 1), | 321 | .ctrlbit = (1 << 1), |
348 | }, { | 322 | }, { |
349 | .name = "uart", | 323 | .name = "uart", |
350 | .id = 1, | 324 | .devname = "s3c6400-uart.1", |
351 | .parent = &clk_pclk_low.clk, | 325 | .parent = &clk_pclk_low.clk, |
352 | .enable = s5p64x0_pclk_ctrl, | 326 | .enable = s5p64x0_pclk_ctrl, |
353 | .ctrlbit = (1 << 2), | 327 | .ctrlbit = (1 << 2), |
354 | }, { | 328 | }, { |
355 | .name = "uart", | 329 | .name = "uart", |
356 | .id = 2, | 330 | .devname = "s3c6400-uart.2", |
357 | .parent = &clk_pclk_low.clk, | 331 | .parent = &clk_pclk_low.clk, |
358 | .enable = s5p64x0_pclk_ctrl, | 332 | .enable = s5p64x0_pclk_ctrl, |
359 | .ctrlbit = (1 << 3), | 333 | .ctrlbit = (1 << 3), |
360 | }, { | 334 | }, { |
361 | .name = "uart", | 335 | .name = "uart", |
362 | .id = 3, | 336 | .devname = "s3c6400-uart.3", |
363 | .parent = &clk_pclk_low.clk, | 337 | .parent = &clk_pclk_low.clk, |
364 | .enable = s5p64x0_pclk_ctrl, | 338 | .enable = s5p64x0_pclk_ctrl, |
365 | .ctrlbit = (1 << 4), | 339 | .ctrlbit = (1 << 4), |
366 | }, { | 340 | }, { |
367 | .name = "gpio", | 341 | .name = "gpio", |
368 | .id = -1, | ||
369 | .parent = &clk_pclk_low.clk, | 342 | .parent = &clk_pclk_low.clk, |
370 | .enable = s5p64x0_pclk_ctrl, | 343 | .enable = s5p64x0_pclk_ctrl, |
371 | .ctrlbit = (1 << 18), | 344 | .ctrlbit = (1 << 18), |
@@ -374,12 +347,10 @@ static struct clk init_clocks[] = { | |||
374 | 347 | ||
375 | static struct clk clk_iis_cd_v40 = { | 348 | static struct clk clk_iis_cd_v40 = { |
376 | .name = "iis_cdclk_v40", | 349 | .name = "iis_cdclk_v40", |
377 | .id = -1, | ||
378 | }; | 350 | }; |
379 | 351 | ||
380 | static struct clk clk_pcm_cd = { | 352 | static struct clk clk_pcm_cd = { |
381 | .name = "pcm_cdclk", | 353 | .name = "pcm_cdclk", |
382 | .id = -1, | ||
383 | }; | 354 | }; |
384 | 355 | ||
385 | static struct clk *clkset_group1_list[] = { | 356 | static struct clk *clkset_group1_list[] = { |
@@ -420,7 +391,7 @@ static struct clksrc_clk clksrcs[] = { | |||
420 | { | 391 | { |
421 | .clk = { | 392 | .clk = { |
422 | .name = "sclk_mmc", | 393 | .name = "sclk_mmc", |
423 | .id = 0, | 394 | .devname = "s3c-sdhci.0", |
424 | .ctrlbit = (1 << 24), | 395 | .ctrlbit = (1 << 24), |
425 | .enable = s5p64x0_sclk_ctrl, | 396 | .enable = s5p64x0_sclk_ctrl, |
426 | }, | 397 | }, |
@@ -430,7 +401,7 @@ static struct clksrc_clk clksrcs[] = { | |||
430 | }, { | 401 | }, { |
431 | .clk = { | 402 | .clk = { |
432 | .name = "sclk_mmc", | 403 | .name = "sclk_mmc", |
433 | .id = 1, | 404 | .devname = "s3c-sdhci.1", |
434 | .ctrlbit = (1 << 25), | 405 | .ctrlbit = (1 << 25), |
435 | .enable = s5p64x0_sclk_ctrl, | 406 | .enable = s5p64x0_sclk_ctrl, |
436 | }, | 407 | }, |
@@ -440,7 +411,7 @@ static struct clksrc_clk clksrcs[] = { | |||
440 | }, { | 411 | }, { |
441 | .clk = { | 412 | .clk = { |
442 | .name = "sclk_mmc", | 413 | .name = "sclk_mmc", |
443 | .id = 2, | 414 | .devname = "s3c-sdhci.2", |
444 | .ctrlbit = (1 << 26), | 415 | .ctrlbit = (1 << 26), |
445 | .enable = s5p64x0_sclk_ctrl, | 416 | .enable = s5p64x0_sclk_ctrl, |
446 | }, | 417 | }, |
@@ -450,7 +421,6 @@ static struct clksrc_clk clksrcs[] = { | |||
450 | }, { | 421 | }, { |
451 | .clk = { | 422 | .clk = { |
452 | .name = "uclk1", | 423 | .name = "uclk1", |
453 | .id = -1, | ||
454 | .ctrlbit = (1 << 5), | 424 | .ctrlbit = (1 << 5), |
455 | .enable = s5p64x0_sclk_ctrl, | 425 | .enable = s5p64x0_sclk_ctrl, |
456 | }, | 426 | }, |
@@ -460,7 +430,7 @@ static struct clksrc_clk clksrcs[] = { | |||
460 | }, { | 430 | }, { |
461 | .clk = { | 431 | .clk = { |
462 | .name = "sclk_spi", | 432 | .name = "sclk_spi", |
463 | .id = 0, | 433 | .devname = "s3c64xx-spi.0", |
464 | .ctrlbit = (1 << 20), | 434 | .ctrlbit = (1 << 20), |
465 | .enable = s5p64x0_sclk_ctrl, | 435 | .enable = s5p64x0_sclk_ctrl, |
466 | }, | 436 | }, |
@@ -470,7 +440,7 @@ static struct clksrc_clk clksrcs[] = { | |||
470 | }, { | 440 | }, { |
471 | .clk = { | 441 | .clk = { |
472 | .name = "sclk_spi", | 442 | .name = "sclk_spi", |
473 | .id = 1, | 443 | .devname = "s3c64xx-spi.1", |
474 | .ctrlbit = (1 << 21), | 444 | .ctrlbit = (1 << 21), |
475 | .enable = s5p64x0_sclk_ctrl, | 445 | .enable = s5p64x0_sclk_ctrl, |
476 | }, | 446 | }, |
@@ -480,7 +450,6 @@ static struct clksrc_clk clksrcs[] = { | |||
480 | }, { | 450 | }, { |
481 | .clk = { | 451 | .clk = { |
482 | .name = "sclk_post", | 452 | .name = "sclk_post", |
483 | .id = -1, | ||
484 | .ctrlbit = (1 << 10), | 453 | .ctrlbit = (1 << 10), |
485 | .enable = s5p64x0_sclk_ctrl, | 454 | .enable = s5p64x0_sclk_ctrl, |
486 | }, | 455 | }, |
@@ -490,7 +459,6 @@ static struct clksrc_clk clksrcs[] = { | |||
490 | }, { | 459 | }, { |
491 | .clk = { | 460 | .clk = { |
492 | .name = "sclk_dispcon", | 461 | .name = "sclk_dispcon", |
493 | .id = -1, | ||
494 | .ctrlbit = (1 << 1), | 462 | .ctrlbit = (1 << 1), |
495 | .enable = s5p64x0_sclk1_ctrl, | 463 | .enable = s5p64x0_sclk1_ctrl, |
496 | }, | 464 | }, |
@@ -500,7 +468,6 @@ static struct clksrc_clk clksrcs[] = { | |||
500 | }, { | 468 | }, { |
501 | .clk = { | 469 | .clk = { |
502 | .name = "sclk_fimgvg", | 470 | .name = "sclk_fimgvg", |
503 | .id = -1, | ||
504 | .ctrlbit = (1 << 2), | 471 | .ctrlbit = (1 << 2), |
505 | .enable = s5p64x0_sclk1_ctrl, | 472 | .enable = s5p64x0_sclk1_ctrl, |
506 | }, | 473 | }, |
@@ -510,7 +477,6 @@ static struct clksrc_clk clksrcs[] = { | |||
510 | }, { | 477 | }, { |
511 | .clk = { | 478 | .clk = { |
512 | .name = "sclk_audio2", | 479 | .name = "sclk_audio2", |
513 | .id = -1, | ||
514 | .ctrlbit = (1 << 11), | 480 | .ctrlbit = (1 << 11), |
515 | .enable = s5p64x0_sclk_ctrl, | 481 | .enable = s5p64x0_sclk_ctrl, |
516 | }, | 482 | }, |
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6450.c b/arch/arm/mach-s5p64x0/clock-s5p6450.c index 4eec457ddccc..d9dc16cde109 100644 --- a/arch/arm/mach-s5p64x0/clock-s5p6450.c +++ b/arch/arm/mach-s5p64x0/clock-s5p6450.c | |||
@@ -36,7 +36,6 @@ | |||
36 | static struct clksrc_clk clk_mout_dpll = { | 36 | static struct clksrc_clk clk_mout_dpll = { |
37 | .clk = { | 37 | .clk = { |
38 | .name = "mout_dpll", | 38 | .name = "mout_dpll", |
39 | .id = -1, | ||
40 | }, | 39 | }, |
41 | .sources = &clk_src_dpll, | 40 | .sources = &clk_src_dpll, |
42 | .reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 5, .size = 1 }, | 41 | .reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 5, .size = 1 }, |
@@ -96,7 +95,6 @@ static struct clk_ops s5p6450_epll_ops = { | |||
96 | static struct clksrc_clk clk_dout_epll = { | 95 | static struct clksrc_clk clk_dout_epll = { |
97 | .clk = { | 96 | .clk = { |
98 | .name = "dout_epll", | 97 | .name = "dout_epll", |
99 | .id = -1, | ||
100 | .parent = &clk_mout_epll.clk, | 98 | .parent = &clk_mout_epll.clk, |
101 | }, | 99 | }, |
102 | .reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 24, .size = 4 }, | 100 | .reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 24, .size = 4 }, |
@@ -105,7 +103,6 @@ static struct clksrc_clk clk_dout_epll = { | |||
105 | static struct clksrc_clk clk_mout_hclk_sel = { | 103 | static struct clksrc_clk clk_mout_hclk_sel = { |
106 | .clk = { | 104 | .clk = { |
107 | .name = "mout_hclk_sel", | 105 | .name = "mout_hclk_sel", |
108 | .id = -1, | ||
109 | }, | 106 | }, |
110 | .sources = &clkset_hclk_low, | 107 | .sources = &clkset_hclk_low, |
111 | .reg_src = { .reg = S5P64X0_OTHERS, .shift = 15, .size = 1 }, | 108 | .reg_src = { .reg = S5P64X0_OTHERS, .shift = 15, .size = 1 }, |
@@ -124,7 +121,6 @@ static struct clksrc_sources clkset_hclk = { | |||
124 | static struct clksrc_clk clk_hclk = { | 121 | static struct clksrc_clk clk_hclk = { |
125 | .clk = { | 122 | .clk = { |
126 | .name = "clk_hclk", | 123 | .name = "clk_hclk", |
127 | .id = -1, | ||
128 | }, | 124 | }, |
129 | .sources = &clkset_hclk, | 125 | .sources = &clkset_hclk, |
130 | .reg_src = { .reg = S5P64X0_OTHERS, .shift = 14, .size = 1 }, | 126 | .reg_src = { .reg = S5P64X0_OTHERS, .shift = 14, .size = 1 }, |
@@ -134,7 +130,6 @@ static struct clksrc_clk clk_hclk = { | |||
134 | static struct clksrc_clk clk_pclk = { | 130 | static struct clksrc_clk clk_pclk = { |
135 | .clk = { | 131 | .clk = { |
136 | .name = "clk_pclk", | 132 | .name = "clk_pclk", |
137 | .id = -1, | ||
138 | .parent = &clk_hclk.clk, | 133 | .parent = &clk_hclk.clk, |
139 | }, | 134 | }, |
140 | .reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 12, .size = 4 }, | 135 | .reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 12, .size = 4 }, |
@@ -142,7 +137,6 @@ static struct clksrc_clk clk_pclk = { | |||
142 | static struct clksrc_clk clk_dout_pwm_ratio0 = { | 137 | static struct clksrc_clk clk_dout_pwm_ratio0 = { |
143 | .clk = { | 138 | .clk = { |
144 | .name = "clk_dout_pwm_ratio0", | 139 | .name = "clk_dout_pwm_ratio0", |
145 | .id = -1, | ||
146 | .parent = &clk_mout_hclk_sel.clk, | 140 | .parent = &clk_mout_hclk_sel.clk, |
147 | }, | 141 | }, |
148 | .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 16, .size = 4 }, | 142 | .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 16, .size = 4 }, |
@@ -151,7 +145,6 @@ static struct clksrc_clk clk_dout_pwm_ratio0 = { | |||
151 | static struct clksrc_clk clk_pclk_to_wdt_pwm = { | 145 | static struct clksrc_clk clk_pclk_to_wdt_pwm = { |
152 | .clk = { | 146 | .clk = { |
153 | .name = "clk_pclk_to_wdt_pwm", | 147 | .name = "clk_pclk_to_wdt_pwm", |
154 | .id = -1, | ||
155 | .parent = &clk_dout_pwm_ratio0.clk, | 148 | .parent = &clk_dout_pwm_ratio0.clk, |
156 | }, | 149 | }, |
157 | .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 20, .size = 4 }, | 150 | .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 20, .size = 4 }, |
@@ -160,7 +153,6 @@ static struct clksrc_clk clk_pclk_to_wdt_pwm = { | |||
160 | static struct clksrc_clk clk_hclk_low = { | 153 | static struct clksrc_clk clk_hclk_low = { |
161 | .clk = { | 154 | .clk = { |
162 | .name = "clk_hclk_low", | 155 | .name = "clk_hclk_low", |
163 | .id = -1, | ||
164 | }, | 156 | }, |
165 | .sources = &clkset_hclk_low, | 157 | .sources = &clkset_hclk_low, |
166 | .reg_src = { .reg = S5P64X0_OTHERS, .shift = 6, .size = 1 }, | 158 | .reg_src = { .reg = S5P64X0_OTHERS, .shift = 6, .size = 1 }, |
@@ -170,7 +162,6 @@ static struct clksrc_clk clk_hclk_low = { | |||
170 | static struct clksrc_clk clk_pclk_low = { | 162 | static struct clksrc_clk clk_pclk_low = { |
171 | .clk = { | 163 | .clk = { |
172 | .name = "clk_pclk_low", | 164 | .name = "clk_pclk_low", |
173 | .id = -1, | ||
174 | .parent = &clk_hclk_low.clk, | 165 | .parent = &clk_hclk_low.clk, |
175 | }, | 166 | }, |
176 | .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 12, .size = 4 }, | 167 | .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 12, .size = 4 }, |
@@ -184,109 +175,101 @@ static struct clksrc_clk clk_pclk_low = { | |||
184 | static struct clk init_clocks_off[] = { | 175 | static struct clk init_clocks_off[] = { |
185 | { | 176 | { |
186 | .name = "usbhost", | 177 | .name = "usbhost", |
187 | .id = -1, | ||
188 | .parent = &clk_hclk_low.clk, | 178 | .parent = &clk_hclk_low.clk, |
189 | .enable = s5p64x0_hclk0_ctrl, | 179 | .enable = s5p64x0_hclk0_ctrl, |
190 | .ctrlbit = (1 << 3), | 180 | .ctrlbit = (1 << 3), |
191 | }, { | 181 | }, { |
192 | .name = "pdma", | 182 | .name = "pdma", |
193 | .id = -1, | ||
194 | .parent = &clk_hclk_low.clk, | 183 | .parent = &clk_hclk_low.clk, |
195 | .enable = s5p64x0_hclk0_ctrl, | 184 | .enable = s5p64x0_hclk0_ctrl, |
196 | .ctrlbit = (1 << 12), | 185 | .ctrlbit = (1 << 12), |
197 | }, { | 186 | }, { |
198 | .name = "hsmmc", | 187 | .name = "hsmmc", |
199 | .id = 0, | 188 | .devname = "s3c-sdhci.0", |
200 | .parent = &clk_hclk_low.clk, | 189 | .parent = &clk_hclk_low.clk, |
201 | .enable = s5p64x0_hclk0_ctrl, | 190 | .enable = s5p64x0_hclk0_ctrl, |
202 | .ctrlbit = (1 << 17), | 191 | .ctrlbit = (1 << 17), |
203 | }, { | 192 | }, { |
204 | .name = "hsmmc", | 193 | .name = "hsmmc", |
205 | .id = 1, | 194 | .devname = "s3c-sdhci.1", |
206 | .parent = &clk_hclk_low.clk, | 195 | .parent = &clk_hclk_low.clk, |
207 | .enable = s5p64x0_hclk0_ctrl, | 196 | .enable = s5p64x0_hclk0_ctrl, |
208 | .ctrlbit = (1 << 18), | 197 | .ctrlbit = (1 << 18), |
209 | }, { | 198 | }, { |
210 | .name = "hsmmc", | 199 | .name = "hsmmc", |
211 | .id = 2, | 200 | .devname = "s3c-sdhci.2", |
212 | .parent = &clk_hclk_low.clk, | 201 | .parent = &clk_hclk_low.clk, |
213 | .enable = s5p64x0_hclk0_ctrl, | 202 | .enable = s5p64x0_hclk0_ctrl, |
214 | .ctrlbit = (1 << 19), | 203 | .ctrlbit = (1 << 19), |
215 | }, { | 204 | }, { |
216 | .name = "usbotg", | 205 | .name = "usbotg", |
217 | .id = -1, | ||
218 | .parent = &clk_hclk_low.clk, | 206 | .parent = &clk_hclk_low.clk, |
219 | .enable = s5p64x0_hclk0_ctrl, | 207 | .enable = s5p64x0_hclk0_ctrl, |
220 | .ctrlbit = (1 << 20), | 208 | .ctrlbit = (1 << 20), |
221 | }, { | 209 | }, { |
222 | .name = "lcd", | 210 | .name = "lcd", |
223 | .id = -1, | ||
224 | .parent = &clk_h, | 211 | .parent = &clk_h, |
225 | .enable = s5p64x0_hclk1_ctrl, | 212 | .enable = s5p64x0_hclk1_ctrl, |
226 | .ctrlbit = (1 << 1), | 213 | .ctrlbit = (1 << 1), |
227 | }, { | 214 | }, { |
228 | .name = "watchdog", | 215 | .name = "watchdog", |
229 | .id = -1, | ||
230 | .parent = &clk_pclk_low.clk, | 216 | .parent = &clk_pclk_low.clk, |
231 | .enable = s5p64x0_pclk_ctrl, | 217 | .enable = s5p64x0_pclk_ctrl, |
232 | .ctrlbit = (1 << 5), | 218 | .ctrlbit = (1 << 5), |
233 | }, { | 219 | }, { |
234 | .name = "rtc", | 220 | .name = "rtc", |
235 | .id = -1, | ||
236 | .parent = &clk_pclk_low.clk, | 221 | .parent = &clk_pclk_low.clk, |
237 | .enable = s5p64x0_pclk_ctrl, | 222 | .enable = s5p64x0_pclk_ctrl, |
238 | .ctrlbit = (1 << 6), | 223 | .ctrlbit = (1 << 6), |
239 | }, { | 224 | }, { |
240 | .name = "adc", | 225 | .name = "adc", |
241 | .id = -1, | ||
242 | .parent = &clk_pclk_low.clk, | 226 | .parent = &clk_pclk_low.clk, |
243 | .enable = s5p64x0_pclk_ctrl, | 227 | .enable = s5p64x0_pclk_ctrl, |
244 | .ctrlbit = (1 << 12), | 228 | .ctrlbit = (1 << 12), |
245 | }, { | 229 | }, { |
246 | .name = "i2c", | 230 | .name = "i2c", |
247 | .id = 0, | 231 | .devname = "s3c2440-i2c.0", |
248 | .parent = &clk_pclk_low.clk, | 232 | .parent = &clk_pclk_low.clk, |
249 | .enable = s5p64x0_pclk_ctrl, | 233 | .enable = s5p64x0_pclk_ctrl, |
250 | .ctrlbit = (1 << 17), | 234 | .ctrlbit = (1 << 17), |
251 | }, { | 235 | }, { |
252 | .name = "spi", | 236 | .name = "spi", |
253 | .id = 0, | 237 | .devname = "s3c64xx-spi.0", |
254 | .parent = &clk_pclk_low.clk, | 238 | .parent = &clk_pclk_low.clk, |
255 | .enable = s5p64x0_pclk_ctrl, | 239 | .enable = s5p64x0_pclk_ctrl, |
256 | .ctrlbit = (1 << 21), | 240 | .ctrlbit = (1 << 21), |
257 | }, { | 241 | }, { |
258 | .name = "spi", | 242 | .name = "spi", |
259 | .id = 1, | 243 | .devname = "s3c64xx-spi.1", |
260 | .parent = &clk_pclk_low.clk, | 244 | .parent = &clk_pclk_low.clk, |
261 | .enable = s5p64x0_pclk_ctrl, | 245 | .enable = s5p64x0_pclk_ctrl, |
262 | .ctrlbit = (1 << 22), | 246 | .ctrlbit = (1 << 22), |
263 | }, { | 247 | }, { |
264 | .name = "iis", | 248 | .name = "iis", |
265 | .id = 0, | 249 | .devname = "samsung-i2s.0", |
266 | .parent = &clk_pclk_low.clk, | 250 | .parent = &clk_pclk_low.clk, |
267 | .enable = s5p64x0_pclk_ctrl, | 251 | .enable = s5p64x0_pclk_ctrl, |
268 | .ctrlbit = (1 << 26), | 252 | .ctrlbit = (1 << 26), |
269 | }, { | 253 | }, { |
270 | .name = "iis", | 254 | .name = "iis", |
271 | .id = 1, | 255 | .devname = "samsung-i2s.1", |
272 | .parent = &clk_pclk_low.clk, | 256 | .parent = &clk_pclk_low.clk, |
273 | .enable = s5p64x0_pclk_ctrl, | 257 | .enable = s5p64x0_pclk_ctrl, |
274 | .ctrlbit = (1 << 15), | 258 | .ctrlbit = (1 << 15), |
275 | }, { | 259 | }, { |
276 | .name = "iis", | 260 | .name = "iis", |
277 | .id = 2, | 261 | .devname = "samsung-i2s.2", |
278 | .parent = &clk_pclk_low.clk, | 262 | .parent = &clk_pclk_low.clk, |
279 | .enable = s5p64x0_pclk_ctrl, | 263 | .enable = s5p64x0_pclk_ctrl, |
280 | .ctrlbit = (1 << 16), | 264 | .ctrlbit = (1 << 16), |
281 | }, { | 265 | }, { |
282 | .name = "i2c", | 266 | .name = "i2c", |
283 | .id = 1, | 267 | .devname = "s3c2440-i2c.1", |
284 | .parent = &clk_pclk_low.clk, | 268 | .parent = &clk_pclk_low.clk, |
285 | .enable = s5p64x0_pclk_ctrl, | 269 | .enable = s5p64x0_pclk_ctrl, |
286 | .ctrlbit = (1 << 27), | 270 | .ctrlbit = (1 << 27), |
287 | }, { | 271 | }, { |
288 | .name = "dmc0", | 272 | .name = "dmc0", |
289 | .id = -1, | ||
290 | .parent = &clk_pclk.clk, | 273 | .parent = &clk_pclk.clk, |
291 | .enable = s5p64x0_pclk_ctrl, | 274 | .enable = s5p64x0_pclk_ctrl, |
292 | .ctrlbit = (1 << 30), | 275 | .ctrlbit = (1 << 30), |
@@ -299,49 +282,45 @@ static struct clk init_clocks_off[] = { | |||
299 | static struct clk init_clocks[] = { | 282 | static struct clk init_clocks[] = { |
300 | { | 283 | { |
301 | .name = "intc", | 284 | .name = "intc", |
302 | .id = -1, | ||
303 | .parent = &clk_hclk.clk, | 285 | .parent = &clk_hclk.clk, |
304 | .enable = s5p64x0_hclk0_ctrl, | 286 | .enable = s5p64x0_hclk0_ctrl, |
305 | .ctrlbit = (1 << 1), | 287 | .ctrlbit = (1 << 1), |
306 | }, { | 288 | }, { |
307 | .name = "mem", | 289 | .name = "mem", |
308 | .id = -1, | ||
309 | .parent = &clk_hclk.clk, | 290 | .parent = &clk_hclk.clk, |
310 | .enable = s5p64x0_hclk0_ctrl, | 291 | .enable = s5p64x0_hclk0_ctrl, |
311 | .ctrlbit = (1 << 21), | 292 | .ctrlbit = (1 << 21), |
312 | }, { | 293 | }, { |
313 | .name = "uart", | 294 | .name = "uart", |
314 | .id = 0, | 295 | .devname = "s3c6400-uart.0", |
315 | .parent = &clk_pclk_low.clk, | 296 | .parent = &clk_pclk_low.clk, |
316 | .enable = s5p64x0_pclk_ctrl, | 297 | .enable = s5p64x0_pclk_ctrl, |
317 | .ctrlbit = (1 << 1), | 298 | .ctrlbit = (1 << 1), |
318 | }, { | 299 | }, { |
319 | .name = "uart", | 300 | .name = "uart", |
320 | .id = 1, | 301 | .devname = "s3c6400-uart.1", |
321 | .parent = &clk_pclk_low.clk, | 302 | .parent = &clk_pclk_low.clk, |
322 | .enable = s5p64x0_pclk_ctrl, | 303 | .enable = s5p64x0_pclk_ctrl, |
323 | .ctrlbit = (1 << 2), | 304 | .ctrlbit = (1 << 2), |
324 | }, { | 305 | }, { |
325 | .name = "uart", | 306 | .name = "uart", |
326 | .id = 2, | 307 | .devname = "s3c6400-uart.2", |
327 | .parent = &clk_pclk_low.clk, | 308 | .parent = &clk_pclk_low.clk, |
328 | .enable = s5p64x0_pclk_ctrl, | 309 | .enable = s5p64x0_pclk_ctrl, |
329 | .ctrlbit = (1 << 3), | 310 | .ctrlbit = (1 << 3), |
330 | }, { | 311 | }, { |
331 | .name = "uart", | 312 | .name = "uart", |
332 | .id = 3, | 313 | .devname = "s3c6400-uart.3", |
333 | .parent = &clk_pclk_low.clk, | 314 | .parent = &clk_pclk_low.clk, |
334 | .enable = s5p64x0_pclk_ctrl, | 315 | .enable = s5p64x0_pclk_ctrl, |
335 | .ctrlbit = (1 << 4), | 316 | .ctrlbit = (1 << 4), |
336 | }, { | 317 | }, { |
337 | .name = "timers", | 318 | .name = "timers", |
338 | .id = -1, | ||
339 | .parent = &clk_pclk_to_wdt_pwm.clk, | 319 | .parent = &clk_pclk_to_wdt_pwm.clk, |
340 | .enable = s5p64x0_pclk_ctrl, | 320 | .enable = s5p64x0_pclk_ctrl, |
341 | .ctrlbit = (1 << 7), | 321 | .ctrlbit = (1 << 7), |
342 | }, { | 322 | }, { |
343 | .name = "gpio", | 323 | .name = "gpio", |
344 | .id = -1, | ||
345 | .parent = &clk_pclk_low.clk, | 324 | .parent = &clk_pclk_low.clk, |
346 | .enable = s5p64x0_pclk_ctrl, | 325 | .enable = s5p64x0_pclk_ctrl, |
347 | .ctrlbit = (1 << 18), | 326 | .ctrlbit = (1 << 18), |
@@ -421,7 +400,6 @@ static struct clksrc_sources clkset_sclk_audio0 = { | |||
421 | static struct clksrc_clk clk_sclk_audio0 = { | 400 | static struct clksrc_clk clk_sclk_audio0 = { |
422 | .clk = { | 401 | .clk = { |
423 | .name = "audio-bus", | 402 | .name = "audio-bus", |
424 | .id = -1, | ||
425 | .enable = s5p64x0_sclk_ctrl, | 403 | .enable = s5p64x0_sclk_ctrl, |
426 | .ctrlbit = (1 << 8), | 404 | .ctrlbit = (1 << 8), |
427 | .parent = &clk_dout_epll.clk, | 405 | .parent = &clk_dout_epll.clk, |
@@ -435,7 +413,7 @@ static struct clksrc_clk clksrcs[] = { | |||
435 | { | 413 | { |
436 | .clk = { | 414 | .clk = { |
437 | .name = "sclk_mmc", | 415 | .name = "sclk_mmc", |
438 | .id = 0, | 416 | .devname = "s3c-sdhci.0", |
439 | .ctrlbit = (1 << 24), | 417 | .ctrlbit = (1 << 24), |
440 | .enable = s5p64x0_sclk_ctrl, | 418 | .enable = s5p64x0_sclk_ctrl, |
441 | }, | 419 | }, |
@@ -445,7 +423,7 @@ static struct clksrc_clk clksrcs[] = { | |||
445 | }, { | 423 | }, { |
446 | .clk = { | 424 | .clk = { |
447 | .name = "sclk_mmc", | 425 | .name = "sclk_mmc", |
448 | .id = 1, | 426 | .devname = "s3c-sdhci.1", |
449 | .ctrlbit = (1 << 25), | 427 | .ctrlbit = (1 << 25), |
450 | .enable = s5p64x0_sclk_ctrl, | 428 | .enable = s5p64x0_sclk_ctrl, |
451 | }, | 429 | }, |
@@ -455,7 +433,7 @@ static struct clksrc_clk clksrcs[] = { | |||
455 | }, { | 433 | }, { |
456 | .clk = { | 434 | .clk = { |
457 | .name = "sclk_mmc", | 435 | .name = "sclk_mmc", |
458 | .id = 2, | 436 | .devname = "s3c-sdhci.2", |
459 | .ctrlbit = (1 << 26), | 437 | .ctrlbit = (1 << 26), |
460 | .enable = s5p64x0_sclk_ctrl, | 438 | .enable = s5p64x0_sclk_ctrl, |
461 | }, | 439 | }, |
@@ -465,7 +443,6 @@ static struct clksrc_clk clksrcs[] = { | |||
465 | }, { | 443 | }, { |
466 | .clk = { | 444 | .clk = { |
467 | .name = "uclk1", | 445 | .name = "uclk1", |
468 | .id = -1, | ||
469 | .ctrlbit = (1 << 5), | 446 | .ctrlbit = (1 << 5), |
470 | .enable = s5p64x0_sclk_ctrl, | 447 | .enable = s5p64x0_sclk_ctrl, |
471 | }, | 448 | }, |
@@ -475,7 +452,7 @@ static struct clksrc_clk clksrcs[] = { | |||
475 | }, { | 452 | }, { |
476 | .clk = { | 453 | .clk = { |
477 | .name = "sclk_spi", | 454 | .name = "sclk_spi", |
478 | .id = 0, | 455 | .devname = "s3c64xx-spi.0", |
479 | .ctrlbit = (1 << 20), | 456 | .ctrlbit = (1 << 20), |
480 | .enable = s5p64x0_sclk_ctrl, | 457 | .enable = s5p64x0_sclk_ctrl, |
481 | }, | 458 | }, |
@@ -485,7 +462,7 @@ static struct clksrc_clk clksrcs[] = { | |||
485 | }, { | 462 | }, { |
486 | .clk = { | 463 | .clk = { |
487 | .name = "sclk_spi", | 464 | .name = "sclk_spi", |
488 | .id = 1, | 465 | .devname = "s3c64xx-spi.1", |
489 | .ctrlbit = (1 << 21), | 466 | .ctrlbit = (1 << 21), |
490 | .enable = s5p64x0_sclk_ctrl, | 467 | .enable = s5p64x0_sclk_ctrl, |
491 | }, | 468 | }, |
@@ -495,7 +472,6 @@ static struct clksrc_clk clksrcs[] = { | |||
495 | }, { | 472 | }, { |
496 | .clk = { | 473 | .clk = { |
497 | .name = "sclk_fimc", | 474 | .name = "sclk_fimc", |
498 | .id = -1, | ||
499 | .ctrlbit = (1 << 10), | 475 | .ctrlbit = (1 << 10), |
500 | .enable = s5p64x0_sclk_ctrl, | 476 | .enable = s5p64x0_sclk_ctrl, |
501 | }, | 477 | }, |
@@ -505,7 +481,6 @@ static struct clksrc_clk clksrcs[] = { | |||
505 | }, { | 481 | }, { |
506 | .clk = { | 482 | .clk = { |
507 | .name = "aclk_mali", | 483 | .name = "aclk_mali", |
508 | .id = -1, | ||
509 | .ctrlbit = (1 << 2), | 484 | .ctrlbit = (1 << 2), |
510 | .enable = s5p64x0_sclk1_ctrl, | 485 | .enable = s5p64x0_sclk1_ctrl, |
511 | }, | 486 | }, |
@@ -515,7 +490,6 @@ static struct clksrc_clk clksrcs[] = { | |||
515 | }, { | 490 | }, { |
516 | .clk = { | 491 | .clk = { |
517 | .name = "sclk_2d", | 492 | .name = "sclk_2d", |
518 | .id = -1, | ||
519 | .ctrlbit = (1 << 12), | 493 | .ctrlbit = (1 << 12), |
520 | .enable = s5p64x0_sclk_ctrl, | 494 | .enable = s5p64x0_sclk_ctrl, |
521 | }, | 495 | }, |
@@ -525,7 +499,6 @@ static struct clksrc_clk clksrcs[] = { | |||
525 | }, { | 499 | }, { |
526 | .clk = { | 500 | .clk = { |
527 | .name = "sclk_usi", | 501 | .name = "sclk_usi", |
528 | .id = -1, | ||
529 | .ctrlbit = (1 << 7), | 502 | .ctrlbit = (1 << 7), |
530 | .enable = s5p64x0_sclk_ctrl, | 503 | .enable = s5p64x0_sclk_ctrl, |
531 | }, | 504 | }, |
@@ -535,7 +508,6 @@ static struct clksrc_clk clksrcs[] = { | |||
535 | }, { | 508 | }, { |
536 | .clk = { | 509 | .clk = { |
537 | .name = "sclk_camif", | 510 | .name = "sclk_camif", |
538 | .id = -1, | ||
539 | .ctrlbit = (1 << 6), | 511 | .ctrlbit = (1 << 6), |
540 | .enable = s5p64x0_sclk_ctrl, | 512 | .enable = s5p64x0_sclk_ctrl, |
541 | }, | 513 | }, |
@@ -545,7 +517,6 @@ static struct clksrc_clk clksrcs[] = { | |||
545 | }, { | 517 | }, { |
546 | .clk = { | 518 | .clk = { |
547 | .name = "sclk_dispcon", | 519 | .name = "sclk_dispcon", |
548 | .id = -1, | ||
549 | .ctrlbit = (1 << 1), | 520 | .ctrlbit = (1 << 1), |
550 | .enable = s5p64x0_sclk1_ctrl, | 521 | .enable = s5p64x0_sclk1_ctrl, |
551 | }, | 522 | }, |
@@ -555,7 +526,6 @@ static struct clksrc_clk clksrcs[] = { | |||
555 | }, { | 526 | }, { |
556 | .clk = { | 527 | .clk = { |
557 | .name = "sclk_hsmmc44", | 528 | .name = "sclk_hsmmc44", |
558 | .id = -1, | ||
559 | .ctrlbit = (1 << 30), | 529 | .ctrlbit = (1 << 30), |
560 | .enable = s5p64x0_sclk_ctrl, | 530 | .enable = s5p64x0_sclk_ctrl, |
561 | }, | 531 | }, |
diff --git a/arch/arm/mach-s5p64x0/include/mach/clkdev.h b/arch/arm/mach-s5p64x0/include/mach/clkdev.h new file mode 100644 index 000000000000..7dffa83d23ff --- /dev/null +++ b/arch/arm/mach-s5p64x0/include/mach/clkdev.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __MACH_CLKDEV_H__ | ||
2 | #define __MACH_CLKDEV_H__ | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do {} while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c index 2d559f10fd47..346f8dfa6f35 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6440.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <plat/adc.h> | 46 | #include <plat/adc.h> |
47 | #include <plat/ts.h> | 47 | #include <plat/ts.h> |
48 | #include <plat/s5p-time.h> | 48 | #include <plat/s5p-time.h> |
49 | #include <plat/backlight.h> | ||
49 | 50 | ||
50 | #define SMDK6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 51 | #define SMDK6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
51 | S3C2410_UCON_RXILEVEL | \ | 52 | S3C2410_UCON_RXILEVEL | \ |
@@ -91,45 +92,6 @@ static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = { | |||
91 | }, | 92 | }, |
92 | }; | 93 | }; |
93 | 94 | ||
94 | static int smdk6440_backlight_init(struct device *dev) | ||
95 | { | ||
96 | int ret; | ||
97 | |||
98 | ret = gpio_request(S5P6440_GPF(15), "Backlight"); | ||
99 | if (ret) { | ||
100 | printk(KERN_ERR "failed to request GPF for PWM-OUT1\n"); | ||
101 | return ret; | ||
102 | } | ||
103 | |||
104 | /* Configure GPIO pin with S5P6440_GPF15_PWM_TOUT1 */ | ||
105 | s3c_gpio_cfgpin(S5P6440_GPF(15), S3C_GPIO_SFN(2)); | ||
106 | |||
107 | return 0; | ||
108 | } | ||
109 | |||
110 | static void smdk6440_backlight_exit(struct device *dev) | ||
111 | { | ||
112 | s3c_gpio_cfgpin(S5P6440_GPF(15), S3C_GPIO_OUTPUT); | ||
113 | gpio_free(S5P6440_GPF(15)); | ||
114 | } | ||
115 | |||
116 | static struct platform_pwm_backlight_data smdk6440_backlight_data = { | ||
117 | .pwm_id = 1, | ||
118 | .max_brightness = 255, | ||
119 | .dft_brightness = 255, | ||
120 | .pwm_period_ns = 78770, | ||
121 | .init = smdk6440_backlight_init, | ||
122 | .exit = smdk6440_backlight_exit, | ||
123 | }; | ||
124 | |||
125 | static struct platform_device smdk6440_backlight_device = { | ||
126 | .name = "pwm-backlight", | ||
127 | .dev = { | ||
128 | .parent = &s3c_device_timer[1].dev, | ||
129 | .platform_data = &smdk6440_backlight_data, | ||
130 | }, | ||
131 | }; | ||
132 | |||
133 | static struct platform_device *smdk6440_devices[] __initdata = { | 95 | static struct platform_device *smdk6440_devices[] __initdata = { |
134 | &s3c_device_adc, | 96 | &s3c_device_adc, |
135 | &s3c_device_rtc, | 97 | &s3c_device_rtc, |
@@ -139,8 +101,6 @@ static struct platform_device *smdk6440_devices[] __initdata = { | |||
139 | &s3c_device_wdt, | 101 | &s3c_device_wdt, |
140 | &samsung_asoc_dma, | 102 | &samsung_asoc_dma, |
141 | &s5p6440_device_iis, | 103 | &s5p6440_device_iis, |
142 | &s3c_device_timer[1], | ||
143 | &smdk6440_backlight_device, | ||
144 | }; | 104 | }; |
145 | 105 | ||
146 | static struct s3c2410_platform_i2c s5p6440_i2c0_data __initdata = { | 106 | static struct s3c2410_platform_i2c s5p6440_i2c0_data __initdata = { |
@@ -175,6 +135,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { | |||
175 | .oversampling_shift = 2, | 135 | .oversampling_shift = 2, |
176 | }; | 136 | }; |
177 | 137 | ||
138 | /* LCD Backlight data */ | ||
139 | static struct samsung_bl_gpio_info smdk6440_bl_gpio_info = { | ||
140 | .no = S5P6440_GPF(15), | ||
141 | .func = S3C_GPIO_SFN(2), | ||
142 | }; | ||
143 | |||
144 | static struct platform_pwm_backlight_data smdk6440_bl_data = { | ||
145 | .pwm_id = 1, | ||
146 | }; | ||
147 | |||
178 | static void __init smdk6440_map_io(void) | 148 | static void __init smdk6440_map_io(void) |
179 | { | 149 | { |
180 | s5p_init_io(NULL, 0, S5P64X0_SYS_ID); | 150 | s5p_init_io(NULL, 0, S5P64X0_SYS_ID); |
@@ -194,6 +164,8 @@ static void __init smdk6440_machine_init(void) | |||
194 | i2c_register_board_info(1, smdk6440_i2c_devs1, | 164 | i2c_register_board_info(1, smdk6440_i2c_devs1, |
195 | ARRAY_SIZE(smdk6440_i2c_devs1)); | 165 | ARRAY_SIZE(smdk6440_i2c_devs1)); |
196 | 166 | ||
167 | samsung_bl_set(&smdk6440_bl_gpio_info, &smdk6440_bl_data); | ||
168 | |||
197 | platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices)); | 169 | platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices)); |
198 | } | 170 | } |
199 | 171 | ||
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c index d19c4690ee97..33f2adf8f3fe 100644 --- a/arch/arm/mach-s5p64x0/mach-smdk6450.c +++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <plat/adc.h> | 46 | #include <plat/adc.h> |
47 | #include <plat/ts.h> | 47 | #include <plat/ts.h> |
48 | #include <plat/s5p-time.h> | 48 | #include <plat/s5p-time.h> |
49 | #include <plat/backlight.h> | ||
49 | 50 | ||
50 | #define SMDK6450_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 51 | #define SMDK6450_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
51 | S3C2410_UCON_RXILEVEL | \ | 52 | S3C2410_UCON_RXILEVEL | \ |
@@ -109,45 +110,6 @@ static struct s3c2410_uartcfg smdk6450_uartcfgs[] __initdata = { | |||
109 | #endif | 110 | #endif |
110 | }; | 111 | }; |
111 | 112 | ||
112 | static int smdk6450_backlight_init(struct device *dev) | ||
113 | { | ||
114 | int ret; | ||
115 | |||
116 | ret = gpio_request(S5P6450_GPF(15), "Backlight"); | ||
117 | if (ret) { | ||
118 | printk(KERN_ERR "failed to request GPF for PWM-OUT1\n"); | ||
119 | return ret; | ||
120 | } | ||
121 | |||
122 | /* Configure GPIO pin with S5P6450_GPF15_PWM_TOUT1 */ | ||
123 | s3c_gpio_cfgpin(S5P6450_GPF(15), S3C_GPIO_SFN(2)); | ||
124 | |||
125 | return 0; | ||
126 | } | ||
127 | |||
128 | static void smdk6450_backlight_exit(struct device *dev) | ||
129 | { | ||
130 | s3c_gpio_cfgpin(S5P6450_GPF(15), S3C_GPIO_OUTPUT); | ||
131 | gpio_free(S5P6450_GPF(15)); | ||
132 | } | ||
133 | |||
134 | static struct platform_pwm_backlight_data smdk6450_backlight_data = { | ||
135 | .pwm_id = 1, | ||
136 | .max_brightness = 255, | ||
137 | .dft_brightness = 255, | ||
138 | .pwm_period_ns = 78770, | ||
139 | .init = smdk6450_backlight_init, | ||
140 | .exit = smdk6450_backlight_exit, | ||
141 | }; | ||
142 | |||
143 | static struct platform_device smdk6450_backlight_device = { | ||
144 | .name = "pwm-backlight", | ||
145 | .dev = { | ||
146 | .parent = &s3c_device_timer[1].dev, | ||
147 | .platform_data = &smdk6450_backlight_data, | ||
148 | }, | ||
149 | }; | ||
150 | |||
151 | static struct platform_device *smdk6450_devices[] __initdata = { | 113 | static struct platform_device *smdk6450_devices[] __initdata = { |
152 | &s3c_device_adc, | 114 | &s3c_device_adc, |
153 | &s3c_device_rtc, | 115 | &s3c_device_rtc, |
@@ -157,8 +119,6 @@ static struct platform_device *smdk6450_devices[] __initdata = { | |||
157 | &s3c_device_wdt, | 119 | &s3c_device_wdt, |
158 | &samsung_asoc_dma, | 120 | &samsung_asoc_dma, |
159 | &s5p6450_device_iis0, | 121 | &s5p6450_device_iis0, |
160 | &s3c_device_timer[1], | ||
161 | &smdk6450_backlight_device, | ||
162 | /* s5p6450_device_spi0 will be added */ | 122 | /* s5p6450_device_spi0 will be added */ |
163 | }; | 123 | }; |
164 | 124 | ||
@@ -194,6 +154,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { | |||
194 | .oversampling_shift = 2, | 154 | .oversampling_shift = 2, |
195 | }; | 155 | }; |
196 | 156 | ||
157 | /* LCD Backlight data */ | ||
158 | static struct samsung_bl_gpio_info smdk6450_bl_gpio_info = { | ||
159 | .no = S5P6450_GPF(15), | ||
160 | .func = S3C_GPIO_SFN(2), | ||
161 | }; | ||
162 | |||
163 | static struct platform_pwm_backlight_data smdk6450_bl_data = { | ||
164 | .pwm_id = 1, | ||
165 | }; | ||
166 | |||
197 | static void __init smdk6450_map_io(void) | 167 | static void __init smdk6450_map_io(void) |
198 | { | 168 | { |
199 | s5p_init_io(NULL, 0, S5P64X0_SYS_ID); | 169 | s5p_init_io(NULL, 0, S5P64X0_SYS_ID); |
@@ -213,6 +183,8 @@ static void __init smdk6450_machine_init(void) | |||
213 | i2c_register_board_info(1, smdk6450_i2c_devs1, | 183 | i2c_register_board_info(1, smdk6450_i2c_devs1, |
214 | ARRAY_SIZE(smdk6450_i2c_devs1)); | 184 | ARRAY_SIZE(smdk6450_i2c_devs1)); |
215 | 185 | ||
186 | samsung_bl_set(&smdk6450_bl_gpio_info, &smdk6450_bl_data); | ||
187 | |||
216 | platform_add_devices(smdk6450_devices, ARRAY_SIZE(smdk6450_devices)); | 188 | platform_add_devices(smdk6450_devices, ARRAY_SIZE(smdk6450_devices)); |
217 | } | 189 | } |
218 | 190 | ||
diff --git a/arch/arm/mach-s5pc100/Kconfig b/arch/arm/mach-s5pc100/Kconfig index 608722ff4f28..e8a33c4b054c 100644 --- a/arch/arm/mach-s5pc100/Kconfig +++ b/arch/arm/mach-s5pc100/Kconfig | |||
@@ -56,6 +56,7 @@ config MACH_SMDKC100 | |||
56 | select S3C_DEV_RTC | 56 | select S3C_DEV_RTC |
57 | select S3C_DEV_WDT | 57 | select S3C_DEV_WDT |
58 | select SAMSUNG_DEV_ADC | 58 | select SAMSUNG_DEV_ADC |
59 | select SAMSUNG_DEV_BACKLIGHT | ||
59 | select SAMSUNG_DEV_IDE | 60 | select SAMSUNG_DEV_IDE |
60 | select SAMSUNG_DEV_KEYPAD | 61 | select SAMSUNG_DEV_KEYPAD |
61 | select SAMSUNG_DEV_PWM | 62 | select SAMSUNG_DEV_PWM |
diff --git a/arch/arm/mach-s5pc100/clock.c b/arch/arm/mach-s5pc100/clock.c index 0305e9b8282d..ff5cbb30de5b 100644 --- a/arch/arm/mach-s5pc100/clock.c +++ b/arch/arm/mach-s5pc100/clock.c | |||
@@ -31,7 +31,6 @@ | |||
31 | 31 | ||
32 | static struct clk s5p_clk_otgphy = { | 32 | static struct clk s5p_clk_otgphy = { |
33 | .name = "otg_phy", | 33 | .name = "otg_phy", |
34 | .id = -1, | ||
35 | }; | 34 | }; |
36 | 35 | ||
37 | static struct clk *clk_src_mout_href_list[] = { | 36 | static struct clk *clk_src_mout_href_list[] = { |
@@ -47,7 +46,6 @@ static struct clksrc_sources clk_src_mout_href = { | |||
47 | static struct clksrc_clk clk_mout_href = { | 46 | static struct clksrc_clk clk_mout_href = { |
48 | .clk = { | 47 | .clk = { |
49 | .name = "mout_href", | 48 | .name = "mout_href", |
50 | .id = -1, | ||
51 | }, | 49 | }, |
52 | .sources = &clk_src_mout_href, | 50 | .sources = &clk_src_mout_href, |
53 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 20, .size = 1 }, | 51 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 20, .size = 1 }, |
@@ -66,7 +64,6 @@ static struct clksrc_sources clk_src_mout_48m = { | |||
66 | static struct clksrc_clk clk_mout_48m = { | 64 | static struct clksrc_clk clk_mout_48m = { |
67 | .clk = { | 65 | .clk = { |
68 | .name = "mout_48m", | 66 | .name = "mout_48m", |
69 | .id = -1, | ||
70 | }, | 67 | }, |
71 | .sources = &clk_src_mout_48m, | 68 | .sources = &clk_src_mout_48m, |
72 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 24, .size = 1 }, | 69 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 24, .size = 1 }, |
@@ -75,7 +72,6 @@ static struct clksrc_clk clk_mout_48m = { | |||
75 | static struct clksrc_clk clk_mout_mpll = { | 72 | static struct clksrc_clk clk_mout_mpll = { |
76 | .clk = { | 73 | .clk = { |
77 | .name = "mout_mpll", | 74 | .name = "mout_mpll", |
78 | .id = -1, | ||
79 | }, | 75 | }, |
80 | .sources = &clk_src_mpll, | 76 | .sources = &clk_src_mpll, |
81 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 4, .size = 1 }, | 77 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 4, .size = 1 }, |
@@ -85,7 +81,6 @@ static struct clksrc_clk clk_mout_mpll = { | |||
85 | static struct clksrc_clk clk_mout_apll = { | 81 | static struct clksrc_clk clk_mout_apll = { |
86 | .clk = { | 82 | .clk = { |
87 | .name = "mout_apll", | 83 | .name = "mout_apll", |
88 | .id = -1, | ||
89 | }, | 84 | }, |
90 | .sources = &clk_src_apll, | 85 | .sources = &clk_src_apll, |
91 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 0, .size = 1 }, | 86 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 0, .size = 1 }, |
@@ -94,7 +89,6 @@ static struct clksrc_clk clk_mout_apll = { | |||
94 | static struct clksrc_clk clk_mout_epll = { | 89 | static struct clksrc_clk clk_mout_epll = { |
95 | .clk = { | 90 | .clk = { |
96 | .name = "mout_epll", | 91 | .name = "mout_epll", |
97 | .id = -1, | ||
98 | }, | 92 | }, |
99 | .sources = &clk_src_epll, | 93 | .sources = &clk_src_epll, |
100 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 8, .size = 1 }, | 94 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 8, .size = 1 }, |
@@ -112,7 +106,6 @@ static struct clksrc_sources clk_src_mout_hpll = { | |||
112 | static struct clksrc_clk clk_mout_hpll = { | 106 | static struct clksrc_clk clk_mout_hpll = { |
113 | .clk = { | 107 | .clk = { |
114 | .name = "mout_hpll", | 108 | .name = "mout_hpll", |
115 | .id = -1, | ||
116 | }, | 109 | }, |
117 | .sources = &clk_src_mout_hpll, | 110 | .sources = &clk_src_mout_hpll, |
118 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 12, .size = 1 }, | 111 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 12, .size = 1 }, |
@@ -121,7 +114,6 @@ static struct clksrc_clk clk_mout_hpll = { | |||
121 | static struct clksrc_clk clk_div_apll = { | 114 | static struct clksrc_clk clk_div_apll = { |
122 | .clk = { | 115 | .clk = { |
123 | .name = "div_apll", | 116 | .name = "div_apll", |
124 | .id = -1, | ||
125 | .parent = &clk_mout_apll.clk, | 117 | .parent = &clk_mout_apll.clk, |
126 | }, | 118 | }, |
127 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 0, .size = 1 }, | 119 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 0, .size = 1 }, |
@@ -130,7 +122,6 @@ static struct clksrc_clk clk_div_apll = { | |||
130 | static struct clksrc_clk clk_div_arm = { | 122 | static struct clksrc_clk clk_div_arm = { |
131 | .clk = { | 123 | .clk = { |
132 | .name = "div_arm", | 124 | .name = "div_arm", |
133 | .id = -1, | ||
134 | .parent = &clk_div_apll.clk, | 125 | .parent = &clk_div_apll.clk, |
135 | }, | 126 | }, |
136 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 4, .size = 3 }, | 127 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 4, .size = 3 }, |
@@ -139,7 +130,6 @@ static struct clksrc_clk clk_div_arm = { | |||
139 | static struct clksrc_clk clk_div_d0_bus = { | 130 | static struct clksrc_clk clk_div_d0_bus = { |
140 | .clk = { | 131 | .clk = { |
141 | .name = "div_d0_bus", | 132 | .name = "div_d0_bus", |
142 | .id = -1, | ||
143 | .parent = &clk_div_arm.clk, | 133 | .parent = &clk_div_arm.clk, |
144 | }, | 134 | }, |
145 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 8, .size = 3 }, | 135 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 8, .size = 3 }, |
@@ -148,7 +138,6 @@ static struct clksrc_clk clk_div_d0_bus = { | |||
148 | static struct clksrc_clk clk_div_pclkd0 = { | 138 | static struct clksrc_clk clk_div_pclkd0 = { |
149 | .clk = { | 139 | .clk = { |
150 | .name = "div_pclkd0", | 140 | .name = "div_pclkd0", |
151 | .id = -1, | ||
152 | .parent = &clk_div_d0_bus.clk, | 141 | .parent = &clk_div_d0_bus.clk, |
153 | }, | 142 | }, |
154 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 12, .size = 3 }, | 143 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 12, .size = 3 }, |
@@ -157,7 +146,6 @@ static struct clksrc_clk clk_div_pclkd0 = { | |||
157 | static struct clksrc_clk clk_div_secss = { | 146 | static struct clksrc_clk clk_div_secss = { |
158 | .clk = { | 147 | .clk = { |
159 | .name = "div_secss", | 148 | .name = "div_secss", |
160 | .id = -1, | ||
161 | .parent = &clk_div_d0_bus.clk, | 149 | .parent = &clk_div_d0_bus.clk, |
162 | }, | 150 | }, |
163 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 16, .size = 3 }, | 151 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 16, .size = 3 }, |
@@ -166,7 +154,6 @@ static struct clksrc_clk clk_div_secss = { | |||
166 | static struct clksrc_clk clk_div_apll2 = { | 154 | static struct clksrc_clk clk_div_apll2 = { |
167 | .clk = { | 155 | .clk = { |
168 | .name = "div_apll2", | 156 | .name = "div_apll2", |
169 | .id = -1, | ||
170 | .parent = &clk_mout_apll.clk, | 157 | .parent = &clk_mout_apll.clk, |
171 | }, | 158 | }, |
172 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 0, .size = 3 }, | 159 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 0, .size = 3 }, |
@@ -185,7 +172,6 @@ struct clksrc_sources clk_src_mout_am = { | |||
185 | static struct clksrc_clk clk_mout_am = { | 172 | static struct clksrc_clk clk_mout_am = { |
186 | .clk = { | 173 | .clk = { |
187 | .name = "mout_am", | 174 | .name = "mout_am", |
188 | .id = -1, | ||
189 | }, | 175 | }, |
190 | .sources = &clk_src_mout_am, | 176 | .sources = &clk_src_mout_am, |
191 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 16, .size = 1 }, | 177 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 16, .size = 1 }, |
@@ -194,7 +180,6 @@ static struct clksrc_clk clk_mout_am = { | |||
194 | static struct clksrc_clk clk_div_d1_bus = { | 180 | static struct clksrc_clk clk_div_d1_bus = { |
195 | .clk = { | 181 | .clk = { |
196 | .name = "div_d1_bus", | 182 | .name = "div_d1_bus", |
197 | .id = -1, | ||
198 | .parent = &clk_mout_am.clk, | 183 | .parent = &clk_mout_am.clk, |
199 | }, | 184 | }, |
200 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 12, .size = 3 }, | 185 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 12, .size = 3 }, |
@@ -203,7 +188,6 @@ static struct clksrc_clk clk_div_d1_bus = { | |||
203 | static struct clksrc_clk clk_div_mpll2 = { | 188 | static struct clksrc_clk clk_div_mpll2 = { |
204 | .clk = { | 189 | .clk = { |
205 | .name = "div_mpll2", | 190 | .name = "div_mpll2", |
206 | .id = -1, | ||
207 | .parent = &clk_mout_am.clk, | 191 | .parent = &clk_mout_am.clk, |
208 | }, | 192 | }, |
209 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 8, .size = 1 }, | 193 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 8, .size = 1 }, |
@@ -212,7 +196,6 @@ static struct clksrc_clk clk_div_mpll2 = { | |||
212 | static struct clksrc_clk clk_div_mpll = { | 196 | static struct clksrc_clk clk_div_mpll = { |
213 | .clk = { | 197 | .clk = { |
214 | .name = "div_mpll", | 198 | .name = "div_mpll", |
215 | .id = -1, | ||
216 | .parent = &clk_mout_am.clk, | 199 | .parent = &clk_mout_am.clk, |
217 | }, | 200 | }, |
218 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 4, .size = 2 }, | 201 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 4, .size = 2 }, |
@@ -231,7 +214,6 @@ struct clksrc_sources clk_src_mout_onenand = { | |||
231 | static struct clksrc_clk clk_mout_onenand = { | 214 | static struct clksrc_clk clk_mout_onenand = { |
232 | .clk = { | 215 | .clk = { |
233 | .name = "mout_onenand", | 216 | .name = "mout_onenand", |
234 | .id = -1, | ||
235 | }, | 217 | }, |
236 | .sources = &clk_src_mout_onenand, | 218 | .sources = &clk_src_mout_onenand, |
237 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 24, .size = 1 }, | 219 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 24, .size = 1 }, |
@@ -240,7 +222,6 @@ static struct clksrc_clk clk_mout_onenand = { | |||
240 | static struct clksrc_clk clk_div_onenand = { | 222 | static struct clksrc_clk clk_div_onenand = { |
241 | .clk = { | 223 | .clk = { |
242 | .name = "div_onenand", | 224 | .name = "div_onenand", |
243 | .id = -1, | ||
244 | .parent = &clk_mout_onenand.clk, | 225 | .parent = &clk_mout_onenand.clk, |
245 | }, | 226 | }, |
246 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 20, .size = 2 }, | 227 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 20, .size = 2 }, |
@@ -249,7 +230,6 @@ static struct clksrc_clk clk_div_onenand = { | |||
249 | static struct clksrc_clk clk_div_pclkd1 = { | 230 | static struct clksrc_clk clk_div_pclkd1 = { |
250 | .clk = { | 231 | .clk = { |
251 | .name = "div_pclkd1", | 232 | .name = "div_pclkd1", |
252 | .id = -1, | ||
253 | .parent = &clk_div_d1_bus.clk, | 233 | .parent = &clk_div_d1_bus.clk, |
254 | }, | 234 | }, |
255 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 16, .size = 3 }, | 235 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 16, .size = 3 }, |
@@ -258,7 +238,6 @@ static struct clksrc_clk clk_div_pclkd1 = { | |||
258 | static struct clksrc_clk clk_div_cam = { | 238 | static struct clksrc_clk clk_div_cam = { |
259 | .clk = { | 239 | .clk = { |
260 | .name = "div_cam", | 240 | .name = "div_cam", |
261 | .id = -1, | ||
262 | .parent = &clk_div_mpll2.clk, | 241 | .parent = &clk_div_mpll2.clk, |
263 | }, | 242 | }, |
264 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 24, .size = 5 }, | 243 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 24, .size = 5 }, |
@@ -267,7 +246,6 @@ static struct clksrc_clk clk_div_cam = { | |||
267 | static struct clksrc_clk clk_div_hdmi = { | 246 | static struct clksrc_clk clk_div_hdmi = { |
268 | .clk = { | 247 | .clk = { |
269 | .name = "div_hdmi", | 248 | .name = "div_hdmi", |
270 | .id = -1, | ||
271 | .parent = &clk_mout_hpll.clk, | 249 | .parent = &clk_mout_hpll.clk, |
272 | }, | 250 | }, |
273 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 28, .size = 4 }, | 251 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 28, .size = 4 }, |
@@ -399,367 +377,329 @@ static int s5pc100_sclk1_ctrl(struct clk *clk, int enable) | |||
399 | static struct clk init_clocks_off[] = { | 377 | static struct clk init_clocks_off[] = { |
400 | { | 378 | { |
401 | .name = "cssys", | 379 | .name = "cssys", |
402 | .id = -1, | ||
403 | .parent = &clk_div_d0_bus.clk, | 380 | .parent = &clk_div_d0_bus.clk, |
404 | .enable = s5pc100_d0_0_ctrl, | 381 | .enable = s5pc100_d0_0_ctrl, |
405 | .ctrlbit = (1 << 6), | 382 | .ctrlbit = (1 << 6), |
406 | }, { | 383 | }, { |
407 | .name = "secss", | 384 | .name = "secss", |
408 | .id = -1, | ||
409 | .parent = &clk_div_d0_bus.clk, | 385 | .parent = &clk_div_d0_bus.clk, |
410 | .enable = s5pc100_d0_0_ctrl, | 386 | .enable = s5pc100_d0_0_ctrl, |
411 | .ctrlbit = (1 << 5), | 387 | .ctrlbit = (1 << 5), |
412 | }, { | 388 | }, { |
413 | .name = "g2d", | 389 | .name = "g2d", |
414 | .id = -1, | ||
415 | .parent = &clk_div_d0_bus.clk, | 390 | .parent = &clk_div_d0_bus.clk, |
416 | .enable = s5pc100_d0_0_ctrl, | 391 | .enable = s5pc100_d0_0_ctrl, |
417 | .ctrlbit = (1 << 4), | 392 | .ctrlbit = (1 << 4), |
418 | }, { | 393 | }, { |
419 | .name = "mdma", | 394 | .name = "mdma", |
420 | .id = -1, | ||
421 | .parent = &clk_div_d0_bus.clk, | 395 | .parent = &clk_div_d0_bus.clk, |
422 | .enable = s5pc100_d0_0_ctrl, | 396 | .enable = s5pc100_d0_0_ctrl, |
423 | .ctrlbit = (1 << 3), | 397 | .ctrlbit = (1 << 3), |
424 | }, { | 398 | }, { |
425 | .name = "cfcon", | 399 | .name = "cfcon", |
426 | .id = -1, | ||
427 | .parent = &clk_div_d0_bus.clk, | 400 | .parent = &clk_div_d0_bus.clk, |
428 | .enable = s5pc100_d0_0_ctrl, | 401 | .enable = s5pc100_d0_0_ctrl, |
429 | .ctrlbit = (1 << 2), | 402 | .ctrlbit = (1 << 2), |
430 | }, { | 403 | }, { |
431 | .name = "nfcon", | 404 | .name = "nfcon", |
432 | .id = -1, | ||
433 | .parent = &clk_div_d0_bus.clk, | 405 | .parent = &clk_div_d0_bus.clk, |
434 | .enable = s5pc100_d0_1_ctrl, | 406 | .enable = s5pc100_d0_1_ctrl, |
435 | .ctrlbit = (1 << 3), | 407 | .ctrlbit = (1 << 3), |
436 | }, { | 408 | }, { |
437 | .name = "onenandc", | 409 | .name = "onenandc", |
438 | .id = -1, | ||
439 | .parent = &clk_div_d0_bus.clk, | 410 | .parent = &clk_div_d0_bus.clk, |
440 | .enable = s5pc100_d0_1_ctrl, | 411 | .enable = s5pc100_d0_1_ctrl, |
441 | .ctrlbit = (1 << 2), | 412 | .ctrlbit = (1 << 2), |
442 | }, { | 413 | }, { |
443 | .name = "sdm", | 414 | .name = "sdm", |
444 | .id = -1, | ||
445 | .parent = &clk_div_d0_bus.clk, | 415 | .parent = &clk_div_d0_bus.clk, |
446 | .enable = s5pc100_d0_2_ctrl, | 416 | .enable = s5pc100_d0_2_ctrl, |
447 | .ctrlbit = (1 << 2), | 417 | .ctrlbit = (1 << 2), |
448 | }, { | 418 | }, { |
449 | .name = "seckey", | 419 | .name = "seckey", |
450 | .id = -1, | ||
451 | .parent = &clk_div_d0_bus.clk, | 420 | .parent = &clk_div_d0_bus.clk, |
452 | .enable = s5pc100_d0_2_ctrl, | 421 | .enable = s5pc100_d0_2_ctrl, |
453 | .ctrlbit = (1 << 1), | 422 | .ctrlbit = (1 << 1), |
454 | }, { | 423 | }, { |
455 | .name = "hsmmc", | 424 | .name = "hsmmc", |
456 | .id = 2, | 425 | .devname = "s3c-sdhci.2", |
457 | .parent = &clk_div_d1_bus.clk, | 426 | .parent = &clk_div_d1_bus.clk, |
458 | .enable = s5pc100_d1_0_ctrl, | 427 | .enable = s5pc100_d1_0_ctrl, |
459 | .ctrlbit = (1 << 7), | 428 | .ctrlbit = (1 << 7), |
460 | }, { | 429 | }, { |
461 | .name = "hsmmc", | 430 | .name = "hsmmc", |
462 | .id = 1, | 431 | .devname = "s3c-sdhci.1", |
463 | .parent = &clk_div_d1_bus.clk, | 432 | .parent = &clk_div_d1_bus.clk, |
464 | .enable = s5pc100_d1_0_ctrl, | 433 | .enable = s5pc100_d1_0_ctrl, |
465 | .ctrlbit = (1 << 6), | 434 | .ctrlbit = (1 << 6), |
466 | }, { | 435 | }, { |
467 | .name = "hsmmc", | 436 | .name = "hsmmc", |
468 | .id = 0, | 437 | .devname = "s3c-sdhci.0", |
469 | .parent = &clk_div_d1_bus.clk, | 438 | .parent = &clk_div_d1_bus.clk, |
470 | .enable = s5pc100_d1_0_ctrl, | 439 | .enable = s5pc100_d1_0_ctrl, |
471 | .ctrlbit = (1 << 5), | 440 | .ctrlbit = (1 << 5), |
472 | }, { | 441 | }, { |
473 | .name = "modemif", | 442 | .name = "modemif", |
474 | .id = -1, | ||
475 | .parent = &clk_div_d1_bus.clk, | 443 | .parent = &clk_div_d1_bus.clk, |
476 | .enable = s5pc100_d1_0_ctrl, | 444 | .enable = s5pc100_d1_0_ctrl, |
477 | .ctrlbit = (1 << 4), | 445 | .ctrlbit = (1 << 4), |
478 | }, { | 446 | }, { |
479 | .name = "otg", | 447 | .name = "otg", |
480 | .id = -1, | ||
481 | .parent = &clk_div_d1_bus.clk, | 448 | .parent = &clk_div_d1_bus.clk, |
482 | .enable = s5pc100_d1_0_ctrl, | 449 | .enable = s5pc100_d1_0_ctrl, |
483 | .ctrlbit = (1 << 3), | 450 | .ctrlbit = (1 << 3), |
484 | }, { | 451 | }, { |
485 | .name = "usbhost", | 452 | .name = "usbhost", |
486 | .id = -1, | ||
487 | .parent = &clk_div_d1_bus.clk, | 453 | .parent = &clk_div_d1_bus.clk, |
488 | .enable = s5pc100_d1_0_ctrl, | 454 | .enable = s5pc100_d1_0_ctrl, |
489 | .ctrlbit = (1 << 2), | 455 | .ctrlbit = (1 << 2), |
490 | }, { | 456 | }, { |
491 | .name = "pdma", | 457 | .name = "pdma", |
492 | .id = 1, | 458 | .devname = "s3c-pl330.1", |
493 | .parent = &clk_div_d1_bus.clk, | 459 | .parent = &clk_div_d1_bus.clk, |
494 | .enable = s5pc100_d1_0_ctrl, | 460 | .enable = s5pc100_d1_0_ctrl, |
495 | .ctrlbit = (1 << 1), | 461 | .ctrlbit = (1 << 1), |
496 | }, { | 462 | }, { |
497 | .name = "pdma", | 463 | .name = "pdma", |
498 | .id = 0, | 464 | .devname = "s3c-pl330.0", |
499 | .parent = &clk_div_d1_bus.clk, | 465 | .parent = &clk_div_d1_bus.clk, |
500 | .enable = s5pc100_d1_0_ctrl, | 466 | .enable = s5pc100_d1_0_ctrl, |
501 | .ctrlbit = (1 << 0), | 467 | .ctrlbit = (1 << 0), |
502 | }, { | 468 | }, { |
503 | .name = "lcd", | 469 | .name = "lcd", |
504 | .id = -1, | ||
505 | .parent = &clk_div_d1_bus.clk, | 470 | .parent = &clk_div_d1_bus.clk, |
506 | .enable = s5pc100_d1_1_ctrl, | 471 | .enable = s5pc100_d1_1_ctrl, |
507 | .ctrlbit = (1 << 0), | 472 | .ctrlbit = (1 << 0), |
508 | }, { | 473 | }, { |
509 | .name = "rotator", | 474 | .name = "rotator", |
510 | .id = -1, | ||
511 | .parent = &clk_div_d1_bus.clk, | 475 | .parent = &clk_div_d1_bus.clk, |
512 | .enable = s5pc100_d1_1_ctrl, | 476 | .enable = s5pc100_d1_1_ctrl, |
513 | .ctrlbit = (1 << 1), | 477 | .ctrlbit = (1 << 1), |
514 | }, { | 478 | }, { |
515 | .name = "fimc", | 479 | .name = "fimc", |
516 | .id = 0, | 480 | .devname = "s5p-fimc.0", |
517 | .parent = &clk_div_d1_bus.clk, | 481 | .parent = &clk_div_d1_bus.clk, |
518 | .enable = s5pc100_d1_1_ctrl, | 482 | .enable = s5pc100_d1_1_ctrl, |
519 | .ctrlbit = (1 << 2), | 483 | .ctrlbit = (1 << 2), |
520 | }, { | 484 | }, { |
521 | .name = "fimc", | 485 | .name = "fimc", |
522 | .id = 1, | 486 | .devname = "s5p-fimc.1", |
523 | .parent = &clk_div_d1_bus.clk, | 487 | .parent = &clk_div_d1_bus.clk, |
524 | .enable = s5pc100_d1_1_ctrl, | 488 | .enable = s5pc100_d1_1_ctrl, |
525 | .ctrlbit = (1 << 3), | 489 | .ctrlbit = (1 << 3), |
526 | }, { | 490 | }, { |
527 | .name = "fimc", | 491 | .name = "fimc", |
528 | .id = 2, | 492 | .devname = "s5p-fimc.2", |
529 | .parent = &clk_div_d1_bus.clk, | ||
530 | .enable = s5pc100_d1_1_ctrl, | 493 | .enable = s5pc100_d1_1_ctrl, |
531 | .ctrlbit = (1 << 4), | 494 | .ctrlbit = (1 << 4), |
532 | }, { | 495 | }, { |
533 | .name = "jpeg", | 496 | .name = "jpeg", |
534 | .id = -1, | ||
535 | .parent = &clk_div_d1_bus.clk, | 497 | .parent = &clk_div_d1_bus.clk, |
536 | .enable = s5pc100_d1_1_ctrl, | 498 | .enable = s5pc100_d1_1_ctrl, |
537 | .ctrlbit = (1 << 5), | 499 | .ctrlbit = (1 << 5), |
538 | }, { | 500 | }, { |
539 | .name = "mipi-dsim", | 501 | .name = "mipi-dsim", |
540 | .id = -1, | ||
541 | .parent = &clk_div_d1_bus.clk, | 502 | .parent = &clk_div_d1_bus.clk, |
542 | .enable = s5pc100_d1_1_ctrl, | 503 | .enable = s5pc100_d1_1_ctrl, |
543 | .ctrlbit = (1 << 6), | 504 | .ctrlbit = (1 << 6), |
544 | }, { | 505 | }, { |
545 | .name = "mipi-csis", | 506 | .name = "mipi-csis", |
546 | .id = -1, | ||
547 | .parent = &clk_div_d1_bus.clk, | 507 | .parent = &clk_div_d1_bus.clk, |
548 | .enable = s5pc100_d1_1_ctrl, | 508 | .enable = s5pc100_d1_1_ctrl, |
549 | .ctrlbit = (1 << 7), | 509 | .ctrlbit = (1 << 7), |
550 | }, { | 510 | }, { |
551 | .name = "g3d", | 511 | .name = "g3d", |
552 | .id = 0, | ||
553 | .parent = &clk_div_d1_bus.clk, | 512 | .parent = &clk_div_d1_bus.clk, |
554 | .enable = s5pc100_d1_0_ctrl, | 513 | .enable = s5pc100_d1_0_ctrl, |
555 | .ctrlbit = (1 << 8), | 514 | .ctrlbit = (1 << 8), |
556 | }, { | 515 | }, { |
557 | .name = "tv", | 516 | .name = "tv", |
558 | .id = -1, | ||
559 | .parent = &clk_div_d1_bus.clk, | 517 | .parent = &clk_div_d1_bus.clk, |
560 | .enable = s5pc100_d1_2_ctrl, | 518 | .enable = s5pc100_d1_2_ctrl, |
561 | .ctrlbit = (1 << 0), | 519 | .ctrlbit = (1 << 0), |
562 | }, { | 520 | }, { |
563 | .name = "vp", | 521 | .name = "vp", |
564 | .id = -1, | ||
565 | .parent = &clk_div_d1_bus.clk, | 522 | .parent = &clk_div_d1_bus.clk, |
566 | .enable = s5pc100_d1_2_ctrl, | 523 | .enable = s5pc100_d1_2_ctrl, |
567 | .ctrlbit = (1 << 1), | 524 | .ctrlbit = (1 << 1), |
568 | }, { | 525 | }, { |
569 | .name = "mixer", | 526 | .name = "mixer", |
570 | .id = -1, | ||
571 | .parent = &clk_div_d1_bus.clk, | 527 | .parent = &clk_div_d1_bus.clk, |
572 | .enable = s5pc100_d1_2_ctrl, | 528 | .enable = s5pc100_d1_2_ctrl, |
573 | .ctrlbit = (1 << 2), | 529 | .ctrlbit = (1 << 2), |
574 | }, { | 530 | }, { |
575 | .name = "hdmi", | 531 | .name = "hdmi", |
576 | .id = -1, | ||
577 | .parent = &clk_div_d1_bus.clk, | 532 | .parent = &clk_div_d1_bus.clk, |
578 | .enable = s5pc100_d1_2_ctrl, | 533 | .enable = s5pc100_d1_2_ctrl, |
579 | .ctrlbit = (1 << 3), | 534 | .ctrlbit = (1 << 3), |
580 | }, { | 535 | }, { |
581 | .name = "mfc", | 536 | .name = "mfc", |
582 | .id = -1, | ||
583 | .parent = &clk_div_d1_bus.clk, | 537 | .parent = &clk_div_d1_bus.clk, |
584 | .enable = s5pc100_d1_2_ctrl, | 538 | .enable = s5pc100_d1_2_ctrl, |
585 | .ctrlbit = (1 << 4), | 539 | .ctrlbit = (1 << 4), |
586 | }, { | 540 | }, { |
587 | .name = "apc", | 541 | .name = "apc", |
588 | .id = -1, | ||
589 | .parent = &clk_div_d1_bus.clk, | 542 | .parent = &clk_div_d1_bus.clk, |
590 | .enable = s5pc100_d1_3_ctrl, | 543 | .enable = s5pc100_d1_3_ctrl, |
591 | .ctrlbit = (1 << 2), | 544 | .ctrlbit = (1 << 2), |
592 | }, { | 545 | }, { |
593 | .name = "iec", | 546 | .name = "iec", |
594 | .id = -1, | ||
595 | .parent = &clk_div_d1_bus.clk, | 547 | .parent = &clk_div_d1_bus.clk, |
596 | .enable = s5pc100_d1_3_ctrl, | 548 | .enable = s5pc100_d1_3_ctrl, |
597 | .ctrlbit = (1 << 3), | 549 | .ctrlbit = (1 << 3), |
598 | }, { | 550 | }, { |
599 | .name = "systimer", | 551 | .name = "systimer", |
600 | .id = -1, | ||
601 | .parent = &clk_div_d1_bus.clk, | 552 | .parent = &clk_div_d1_bus.clk, |
602 | .enable = s5pc100_d1_3_ctrl, | 553 | .enable = s5pc100_d1_3_ctrl, |
603 | .ctrlbit = (1 << 7), | 554 | .ctrlbit = (1 << 7), |
604 | }, { | 555 | }, { |
605 | .name = "watchdog", | 556 | .name = "watchdog", |
606 | .id = -1, | ||
607 | .parent = &clk_div_d1_bus.clk, | 557 | .parent = &clk_div_d1_bus.clk, |
608 | .enable = s5pc100_d1_3_ctrl, | 558 | .enable = s5pc100_d1_3_ctrl, |
609 | .ctrlbit = (1 << 8), | 559 | .ctrlbit = (1 << 8), |
610 | }, { | 560 | }, { |
611 | .name = "rtc", | 561 | .name = "rtc", |
612 | .id = -1, | ||
613 | .parent = &clk_div_d1_bus.clk, | 562 | .parent = &clk_div_d1_bus.clk, |
614 | .enable = s5pc100_d1_3_ctrl, | 563 | .enable = s5pc100_d1_3_ctrl, |
615 | .ctrlbit = (1 << 9), | 564 | .ctrlbit = (1 << 9), |
616 | }, { | 565 | }, { |
617 | .name = "i2c", | 566 | .name = "i2c", |
618 | .id = 0, | 567 | .devname = "s3c2440-i2c.0", |
619 | .parent = &clk_div_d1_bus.clk, | 568 | .parent = &clk_div_d1_bus.clk, |
620 | .enable = s5pc100_d1_4_ctrl, | 569 | .enable = s5pc100_d1_4_ctrl, |
621 | .ctrlbit = (1 << 4), | 570 | .ctrlbit = (1 << 4), |
622 | }, { | 571 | }, { |
623 | .name = "i2c", | 572 | .name = "i2c", |
624 | .id = 1, | 573 | .devname = "s3c2440-i2c.1", |
625 | .parent = &clk_div_d1_bus.clk, | 574 | .parent = &clk_div_d1_bus.clk, |
626 | .enable = s5pc100_d1_4_ctrl, | 575 | .enable = s5pc100_d1_4_ctrl, |
627 | .ctrlbit = (1 << 5), | 576 | .ctrlbit = (1 << 5), |
628 | }, { | 577 | }, { |
629 | .name = "spi", | 578 | .name = "spi", |
630 | .id = 0, | 579 | .devname = "s3c64xx-spi.0", |
631 | .parent = &clk_div_d1_bus.clk, | 580 | .parent = &clk_div_d1_bus.clk, |
632 | .enable = s5pc100_d1_4_ctrl, | 581 | .enable = s5pc100_d1_4_ctrl, |
633 | .ctrlbit = (1 << 6), | 582 | .ctrlbit = (1 << 6), |
634 | }, { | 583 | }, { |
635 | .name = "spi", | 584 | .name = "spi", |
636 | .id = 1, | 585 | .devname = "s3c64xx-spi.1", |
637 | .parent = &clk_div_d1_bus.clk, | 586 | .parent = &clk_div_d1_bus.clk, |
638 | .enable = s5pc100_d1_4_ctrl, | 587 | .enable = s5pc100_d1_4_ctrl, |
639 | .ctrlbit = (1 << 7), | 588 | .ctrlbit = (1 << 7), |
640 | }, { | 589 | }, { |
641 | .name = "spi", | 590 | .name = "spi", |
642 | .id = 2, | 591 | .devname = "s3c64xx-spi.2", |
643 | .parent = &clk_div_d1_bus.clk, | 592 | .parent = &clk_div_d1_bus.clk, |
644 | .enable = s5pc100_d1_4_ctrl, | 593 | .enable = s5pc100_d1_4_ctrl, |
645 | .ctrlbit = (1 << 8), | 594 | .ctrlbit = (1 << 8), |
646 | }, { | 595 | }, { |
647 | .name = "irda", | 596 | .name = "irda", |
648 | .id = -1, | ||
649 | .parent = &clk_div_d1_bus.clk, | 597 | .parent = &clk_div_d1_bus.clk, |
650 | .enable = s5pc100_d1_4_ctrl, | 598 | .enable = s5pc100_d1_4_ctrl, |
651 | .ctrlbit = (1 << 9), | 599 | .ctrlbit = (1 << 9), |
652 | }, { | 600 | }, { |
653 | .name = "ccan", | 601 | .name = "ccan", |
654 | .id = 0, | ||
655 | .parent = &clk_div_d1_bus.clk, | 602 | .parent = &clk_div_d1_bus.clk, |
656 | .enable = s5pc100_d1_4_ctrl, | 603 | .enable = s5pc100_d1_4_ctrl, |
657 | .ctrlbit = (1 << 10), | 604 | .ctrlbit = (1 << 10), |
658 | }, { | 605 | }, { |
659 | .name = "ccan", | 606 | .name = "ccan", |
660 | .id = 1, | ||
661 | .parent = &clk_div_d1_bus.clk, | 607 | .parent = &clk_div_d1_bus.clk, |
662 | .enable = s5pc100_d1_4_ctrl, | 608 | .enable = s5pc100_d1_4_ctrl, |
663 | .ctrlbit = (1 << 11), | 609 | .ctrlbit = (1 << 11), |
664 | }, { | 610 | }, { |
665 | .name = "hsitx", | 611 | .name = "hsitx", |
666 | .id = -1, | ||
667 | .parent = &clk_div_d1_bus.clk, | 612 | .parent = &clk_div_d1_bus.clk, |
668 | .enable = s5pc100_d1_4_ctrl, | 613 | .enable = s5pc100_d1_4_ctrl, |
669 | .ctrlbit = (1 << 12), | 614 | .ctrlbit = (1 << 12), |
670 | }, { | 615 | }, { |
671 | .name = "hsirx", | 616 | .name = "hsirx", |
672 | .id = -1, | ||
673 | .parent = &clk_div_d1_bus.clk, | 617 | .parent = &clk_div_d1_bus.clk, |
674 | .enable = s5pc100_d1_4_ctrl, | 618 | .enable = s5pc100_d1_4_ctrl, |
675 | .ctrlbit = (1 << 13), | 619 | .ctrlbit = (1 << 13), |
676 | }, { | 620 | }, { |
677 | .name = "iis", | 621 | .name = "iis", |
678 | .id = 0, | 622 | .devname = "samsung-i2s.0", |
679 | .parent = &clk_div_pclkd1.clk, | 623 | .parent = &clk_div_pclkd1.clk, |
680 | .enable = s5pc100_d1_5_ctrl, | 624 | .enable = s5pc100_d1_5_ctrl, |
681 | .ctrlbit = (1 << 0), | 625 | .ctrlbit = (1 << 0), |
682 | }, { | 626 | }, { |
683 | .name = "iis", | 627 | .name = "iis", |
684 | .id = 1, | 628 | .devname = "samsung-i2s.1", |
685 | .parent = &clk_div_pclkd1.clk, | 629 | .parent = &clk_div_pclkd1.clk, |
686 | .enable = s5pc100_d1_5_ctrl, | 630 | .enable = s5pc100_d1_5_ctrl, |
687 | .ctrlbit = (1 << 1), | 631 | .ctrlbit = (1 << 1), |
688 | }, { | 632 | }, { |
689 | .name = "iis", | 633 | .name = "iis", |
690 | .id = 2, | 634 | .devname = "samsung-i2s.2", |
691 | .parent = &clk_div_pclkd1.clk, | 635 | .parent = &clk_div_pclkd1.clk, |
692 | .enable = s5pc100_d1_5_ctrl, | 636 | .enable = s5pc100_d1_5_ctrl, |
693 | .ctrlbit = (1 << 2), | 637 | .ctrlbit = (1 << 2), |
694 | }, { | 638 | }, { |
695 | .name = "ac97", | 639 | .name = "ac97", |
696 | .id = -1, | ||
697 | .parent = &clk_div_pclkd1.clk, | 640 | .parent = &clk_div_pclkd1.clk, |
698 | .enable = s5pc100_d1_5_ctrl, | 641 | .enable = s5pc100_d1_5_ctrl, |
699 | .ctrlbit = (1 << 3), | 642 | .ctrlbit = (1 << 3), |
700 | }, { | 643 | }, { |
701 | .name = "pcm", | 644 | .name = "pcm", |
702 | .id = 0, | 645 | .devname = "samsung-pcm.0", |
703 | .parent = &clk_div_pclkd1.clk, | 646 | .parent = &clk_div_pclkd1.clk, |
704 | .enable = s5pc100_d1_5_ctrl, | 647 | .enable = s5pc100_d1_5_ctrl, |
705 | .ctrlbit = (1 << 4), | 648 | .ctrlbit = (1 << 4), |
706 | }, { | 649 | }, { |
707 | .name = "pcm", | 650 | .name = "pcm", |
708 | .id = 1, | 651 | .devname = "samsung-pcm.1", |
709 | .parent = &clk_div_pclkd1.clk, | 652 | .parent = &clk_div_pclkd1.clk, |
710 | .enable = s5pc100_d1_5_ctrl, | 653 | .enable = s5pc100_d1_5_ctrl, |
711 | .ctrlbit = (1 << 5), | 654 | .ctrlbit = (1 << 5), |
712 | }, { | 655 | }, { |
713 | .name = "spdif", | 656 | .name = "spdif", |
714 | .id = -1, | ||
715 | .parent = &clk_div_pclkd1.clk, | 657 | .parent = &clk_div_pclkd1.clk, |
716 | .enable = s5pc100_d1_5_ctrl, | 658 | .enable = s5pc100_d1_5_ctrl, |
717 | .ctrlbit = (1 << 6), | 659 | .ctrlbit = (1 << 6), |
718 | }, { | 660 | }, { |
719 | .name = "adc", | 661 | .name = "adc", |
720 | .id = -1, | ||
721 | .parent = &clk_div_pclkd1.clk, | 662 | .parent = &clk_div_pclkd1.clk, |
722 | .enable = s5pc100_d1_5_ctrl, | 663 | .enable = s5pc100_d1_5_ctrl, |
723 | .ctrlbit = (1 << 7), | 664 | .ctrlbit = (1 << 7), |
724 | }, { | 665 | }, { |
725 | .name = "keypad", | 666 | .name = "keypad", |
726 | .id = -1, | ||
727 | .parent = &clk_div_pclkd1.clk, | 667 | .parent = &clk_div_pclkd1.clk, |
728 | .enable = s5pc100_d1_5_ctrl, | 668 | .enable = s5pc100_d1_5_ctrl, |
729 | .ctrlbit = (1 << 8), | 669 | .ctrlbit = (1 << 8), |
730 | }, { | 670 | }, { |
731 | .name = "spi_48m", | 671 | .name = "spi_48m", |
732 | .id = 0, | 672 | .devname = "s3c64xx-spi.0", |
733 | .parent = &clk_mout_48m.clk, | 673 | .parent = &clk_mout_48m.clk, |
734 | .enable = s5pc100_sclk0_ctrl, | 674 | .enable = s5pc100_sclk0_ctrl, |
735 | .ctrlbit = (1 << 7), | 675 | .ctrlbit = (1 << 7), |
736 | }, { | 676 | }, { |
737 | .name = "spi_48m", | 677 | .name = "spi_48m", |
738 | .id = 1, | 678 | .devname = "s3c64xx-spi.1", |
739 | .parent = &clk_mout_48m.clk, | 679 | .parent = &clk_mout_48m.clk, |
740 | .enable = s5pc100_sclk0_ctrl, | 680 | .enable = s5pc100_sclk0_ctrl, |
741 | .ctrlbit = (1 << 8), | 681 | .ctrlbit = (1 << 8), |
742 | }, { | 682 | }, { |
743 | .name = "spi_48m", | 683 | .name = "spi_48m", |
744 | .id = 2, | 684 | .devname = "s3c64xx-spi.2", |
745 | .parent = &clk_mout_48m.clk, | 685 | .parent = &clk_mout_48m.clk, |
746 | .enable = s5pc100_sclk0_ctrl, | 686 | .enable = s5pc100_sclk0_ctrl, |
747 | .ctrlbit = (1 << 9), | 687 | .ctrlbit = (1 << 9), |
748 | }, { | 688 | }, { |
749 | .name = "mmc_48m", | 689 | .name = "mmc_48m", |
750 | .id = 0, | 690 | .devname = "s3c-sdhci.0", |
751 | .parent = &clk_mout_48m.clk, | 691 | .parent = &clk_mout_48m.clk, |
752 | .enable = s5pc100_sclk0_ctrl, | 692 | .enable = s5pc100_sclk0_ctrl, |
753 | .ctrlbit = (1 << 15), | 693 | .ctrlbit = (1 << 15), |
754 | }, { | 694 | }, { |
755 | .name = "mmc_48m", | 695 | .name = "mmc_48m", |
756 | .id = 1, | 696 | .devname = "s3c-sdhci.1", |
757 | .parent = &clk_mout_48m.clk, | 697 | .parent = &clk_mout_48m.clk, |
758 | .enable = s5pc100_sclk0_ctrl, | 698 | .enable = s5pc100_sclk0_ctrl, |
759 | .ctrlbit = (1 << 16), | 699 | .ctrlbit = (1 << 16), |
760 | }, { | 700 | }, { |
761 | .name = "mmc_48m", | 701 | .name = "mmc_48m", |
762 | .id = 2, | 702 | .devname = "s3c-sdhci.2", |
763 | .parent = &clk_mout_48m.clk, | 703 | .parent = &clk_mout_48m.clk, |
764 | .enable = s5pc100_sclk0_ctrl, | 704 | .enable = s5pc100_sclk0_ctrl, |
765 | .ctrlbit = (1 << 17), | 705 | .ctrlbit = (1 << 17), |
@@ -768,33 +708,27 @@ static struct clk init_clocks_off[] = { | |||
768 | 708 | ||
769 | static struct clk clk_vclk54m = { | 709 | static struct clk clk_vclk54m = { |
770 | .name = "vclk_54m", | 710 | .name = "vclk_54m", |
771 | .id = -1, | ||
772 | .rate = 54000000, | 711 | .rate = 54000000, |
773 | }; | 712 | }; |
774 | 713 | ||
775 | static struct clk clk_i2scdclk0 = { | 714 | static struct clk clk_i2scdclk0 = { |
776 | .name = "i2s_cdclk0", | 715 | .name = "i2s_cdclk0", |
777 | .id = -1, | ||
778 | }; | 716 | }; |
779 | 717 | ||
780 | static struct clk clk_i2scdclk1 = { | 718 | static struct clk clk_i2scdclk1 = { |
781 | .name = "i2s_cdclk1", | 719 | .name = "i2s_cdclk1", |
782 | .id = -1, | ||
783 | }; | 720 | }; |
784 | 721 | ||
785 | static struct clk clk_i2scdclk2 = { | 722 | static struct clk clk_i2scdclk2 = { |
786 | .name = "i2s_cdclk2", | 723 | .name = "i2s_cdclk2", |
787 | .id = -1, | ||
788 | }; | 724 | }; |
789 | 725 | ||
790 | static struct clk clk_pcmcdclk0 = { | 726 | static struct clk clk_pcmcdclk0 = { |
791 | .name = "pcm_cdclk0", | 727 | .name = "pcm_cdclk0", |
792 | .id = -1, | ||
793 | }; | 728 | }; |
794 | 729 | ||
795 | static struct clk clk_pcmcdclk1 = { | 730 | static struct clk clk_pcmcdclk1 = { |
796 | .name = "pcm_cdclk1", | 731 | .name = "pcm_cdclk1", |
797 | .id = -1, | ||
798 | }; | 732 | }; |
799 | 733 | ||
800 | static struct clk *clk_src_group1_list[] = { | 734 | static struct clk *clk_src_group1_list[] = { |
@@ -836,7 +770,7 @@ struct clksrc_sources clk_src_group3 = { | |||
836 | static struct clksrc_clk clk_sclk_audio0 = { | 770 | static struct clksrc_clk clk_sclk_audio0 = { |
837 | .clk = { | 771 | .clk = { |
838 | .name = "sclk_audio", | 772 | .name = "sclk_audio", |
839 | .id = 0, | 773 | .devname = "samsung-pcm.0", |
840 | .ctrlbit = (1 << 8), | 774 | .ctrlbit = (1 << 8), |
841 | .enable = s5pc100_sclk1_ctrl, | 775 | .enable = s5pc100_sclk1_ctrl, |
842 | }, | 776 | }, |
@@ -862,7 +796,7 @@ struct clksrc_sources clk_src_group4 = { | |||
862 | static struct clksrc_clk clk_sclk_audio1 = { | 796 | static struct clksrc_clk clk_sclk_audio1 = { |
863 | .clk = { | 797 | .clk = { |
864 | .name = "sclk_audio", | 798 | .name = "sclk_audio", |
865 | .id = 1, | 799 | .devname = "samsung-pcm.1", |
866 | .ctrlbit = (1 << 9), | 800 | .ctrlbit = (1 << 9), |
867 | .enable = s5pc100_sclk1_ctrl, | 801 | .enable = s5pc100_sclk1_ctrl, |
868 | }, | 802 | }, |
@@ -887,7 +821,7 @@ struct clksrc_sources clk_src_group5 = { | |||
887 | static struct clksrc_clk clk_sclk_audio2 = { | 821 | static struct clksrc_clk clk_sclk_audio2 = { |
888 | .clk = { | 822 | .clk = { |
889 | .name = "sclk_audio", | 823 | .name = "sclk_audio", |
890 | .id = 2, | 824 | .devname = "samsung-pcm.2", |
891 | .ctrlbit = (1 << 10), | 825 | .ctrlbit = (1 << 10), |
892 | .enable = s5pc100_sclk1_ctrl, | 826 | .enable = s5pc100_sclk1_ctrl, |
893 | }, | 827 | }, |
@@ -976,48 +910,12 @@ struct clksrc_sources clk_src_sclk_spdif = { | |||
976 | .nr_sources = ARRAY_SIZE(clk_sclk_spdif_list), | 910 | .nr_sources = ARRAY_SIZE(clk_sclk_spdif_list), |
977 | }; | 911 | }; |
978 | 912 | ||
979 | static int s5pc100_spdif_set_rate(struct clk *clk, unsigned long rate) | ||
980 | { | ||
981 | struct clk *pclk; | ||
982 | int ret; | ||
983 | |||
984 | pclk = clk_get_parent(clk); | ||
985 | if (IS_ERR(pclk)) | ||
986 | return -EINVAL; | ||
987 | |||
988 | ret = pclk->ops->set_rate(pclk, rate); | ||
989 | clk_put(pclk); | ||
990 | |||
991 | return ret; | ||
992 | } | ||
993 | |||
994 | static unsigned long s5pc100_spdif_get_rate(struct clk *clk) | ||
995 | { | ||
996 | struct clk *pclk; | ||
997 | int rate; | ||
998 | |||
999 | pclk = clk_get_parent(clk); | ||
1000 | if (IS_ERR(pclk)) | ||
1001 | return -EINVAL; | ||
1002 | |||
1003 | rate = pclk->ops->get_rate(clk); | ||
1004 | clk_put(pclk); | ||
1005 | |||
1006 | return rate; | ||
1007 | } | ||
1008 | |||
1009 | static struct clk_ops s5pc100_sclk_spdif_ops = { | ||
1010 | .set_rate = s5pc100_spdif_set_rate, | ||
1011 | .get_rate = s5pc100_spdif_get_rate, | ||
1012 | }; | ||
1013 | |||
1014 | static struct clksrc_clk clk_sclk_spdif = { | 913 | static struct clksrc_clk clk_sclk_spdif = { |
1015 | .clk = { | 914 | .clk = { |
1016 | .name = "sclk_spdif", | 915 | .name = "sclk_spdif", |
1017 | .id = -1, | ||
1018 | .ctrlbit = (1 << 11), | 916 | .ctrlbit = (1 << 11), |
1019 | .enable = s5pc100_sclk1_ctrl, | 917 | .enable = s5pc100_sclk1_ctrl, |
1020 | .ops = &s5pc100_sclk_spdif_ops, | 918 | .ops = &s5p_sclk_spdif_ops, |
1021 | }, | 919 | }, |
1022 | .sources = &clk_src_sclk_spdif, | 920 | .sources = &clk_src_sclk_spdif, |
1023 | .reg_src = { .reg = S5P_CLK_SRC3, .shift = 24, .size = 2 }, | 921 | .reg_src = { .reg = S5P_CLK_SRC3, .shift = 24, .size = 2 }, |
@@ -1027,7 +925,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1027 | { | 925 | { |
1028 | .clk = { | 926 | .clk = { |
1029 | .name = "sclk_spi", | 927 | .name = "sclk_spi", |
1030 | .id = 0, | 928 | .devname = "s3c64xx-spi.0", |
1031 | .ctrlbit = (1 << 4), | 929 | .ctrlbit = (1 << 4), |
1032 | .enable = s5pc100_sclk0_ctrl, | 930 | .enable = s5pc100_sclk0_ctrl, |
1033 | 931 | ||
@@ -1038,7 +936,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1038 | }, { | 936 | }, { |
1039 | .clk = { | 937 | .clk = { |
1040 | .name = "sclk_spi", | 938 | .name = "sclk_spi", |
1041 | .id = 1, | 939 | .devname = "s3c64xx-spi.1", |
1042 | .ctrlbit = (1 << 5), | 940 | .ctrlbit = (1 << 5), |
1043 | .enable = s5pc100_sclk0_ctrl, | 941 | .enable = s5pc100_sclk0_ctrl, |
1044 | 942 | ||
@@ -1049,7 +947,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1049 | }, { | 947 | }, { |
1050 | .clk = { | 948 | .clk = { |
1051 | .name = "sclk_spi", | 949 | .name = "sclk_spi", |
1052 | .id = 2, | 950 | .devname = "s3c64xx-spi.2", |
1053 | .ctrlbit = (1 << 6), | 951 | .ctrlbit = (1 << 6), |
1054 | .enable = s5pc100_sclk0_ctrl, | 952 | .enable = s5pc100_sclk0_ctrl, |
1055 | 953 | ||
@@ -1060,7 +958,6 @@ static struct clksrc_clk clksrcs[] = { | |||
1060 | }, { | 958 | }, { |
1061 | .clk = { | 959 | .clk = { |
1062 | .name = "uclk1", | 960 | .name = "uclk1", |
1063 | .id = -1, | ||
1064 | .ctrlbit = (1 << 3), | 961 | .ctrlbit = (1 << 3), |
1065 | .enable = s5pc100_sclk0_ctrl, | 962 | .enable = s5pc100_sclk0_ctrl, |
1066 | 963 | ||
@@ -1071,7 +968,6 @@ static struct clksrc_clk clksrcs[] = { | |||
1071 | }, { | 968 | }, { |
1072 | .clk = { | 969 | .clk = { |
1073 | .name = "sclk_mixer", | 970 | .name = "sclk_mixer", |
1074 | .id = -1, | ||
1075 | .ctrlbit = (1 << 6), | 971 | .ctrlbit = (1 << 6), |
1076 | .enable = s5pc100_sclk0_ctrl, | 972 | .enable = s5pc100_sclk0_ctrl, |
1077 | 973 | ||
@@ -1081,7 +977,6 @@ static struct clksrc_clk clksrcs[] = { | |||
1081 | }, { | 977 | }, { |
1082 | .clk = { | 978 | .clk = { |
1083 | .name = "sclk_lcd", | 979 | .name = "sclk_lcd", |
1084 | .id = -1, | ||
1085 | .ctrlbit = (1 << 0), | 980 | .ctrlbit = (1 << 0), |
1086 | .enable = s5pc100_sclk1_ctrl, | 981 | .enable = s5pc100_sclk1_ctrl, |
1087 | 982 | ||
@@ -1092,7 +987,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1092 | }, { | 987 | }, { |
1093 | .clk = { | 988 | .clk = { |
1094 | .name = "sclk_fimc", | 989 | .name = "sclk_fimc", |
1095 | .id = 0, | 990 | .devname = "s5p-fimc.0", |
1096 | .ctrlbit = (1 << 1), | 991 | .ctrlbit = (1 << 1), |
1097 | .enable = s5pc100_sclk1_ctrl, | 992 | .enable = s5pc100_sclk1_ctrl, |
1098 | 993 | ||
@@ -1103,7 +998,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1103 | }, { | 998 | }, { |
1104 | .clk = { | 999 | .clk = { |
1105 | .name = "sclk_fimc", | 1000 | .name = "sclk_fimc", |
1106 | .id = 1, | 1001 | .devname = "s5p-fimc.1", |
1107 | .ctrlbit = (1 << 2), | 1002 | .ctrlbit = (1 << 2), |
1108 | .enable = s5pc100_sclk1_ctrl, | 1003 | .enable = s5pc100_sclk1_ctrl, |
1109 | 1004 | ||
@@ -1114,7 +1009,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1114 | }, { | 1009 | }, { |
1115 | .clk = { | 1010 | .clk = { |
1116 | .name = "sclk_fimc", | 1011 | .name = "sclk_fimc", |
1117 | .id = 2, | 1012 | .devname = "s5p-fimc.2", |
1118 | .ctrlbit = (1 << 3), | 1013 | .ctrlbit = (1 << 3), |
1119 | .enable = s5pc100_sclk1_ctrl, | 1014 | .enable = s5pc100_sclk1_ctrl, |
1120 | 1015 | ||
@@ -1125,7 +1020,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1125 | }, { | 1020 | }, { |
1126 | .clk = { | 1021 | .clk = { |
1127 | .name = "sclk_mmc", | 1022 | .name = "sclk_mmc", |
1128 | .id = 0, | 1023 | .devname = "s3c-sdhci.0", |
1129 | .ctrlbit = (1 << 12), | 1024 | .ctrlbit = (1 << 12), |
1130 | .enable = s5pc100_sclk1_ctrl, | 1025 | .enable = s5pc100_sclk1_ctrl, |
1131 | 1026 | ||
@@ -1136,7 +1031,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1136 | }, { | 1031 | }, { |
1137 | .clk = { | 1032 | .clk = { |
1138 | .name = "sclk_mmc", | 1033 | .name = "sclk_mmc", |
1139 | .id = 1, | 1034 | .devname = "s3c-sdhci.1", |
1140 | .ctrlbit = (1 << 13), | 1035 | .ctrlbit = (1 << 13), |
1141 | .enable = s5pc100_sclk1_ctrl, | 1036 | .enable = s5pc100_sclk1_ctrl, |
1142 | 1037 | ||
@@ -1147,7 +1042,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1147 | }, { | 1042 | }, { |
1148 | .clk = { | 1043 | .clk = { |
1149 | .name = "sclk_mmc", | 1044 | .name = "sclk_mmc", |
1150 | .id = 2, | 1045 | .devname = "s3c-sdhci.2", |
1151 | .ctrlbit = (1 << 14), | 1046 | .ctrlbit = (1 << 14), |
1152 | .enable = s5pc100_sclk1_ctrl, | 1047 | .enable = s5pc100_sclk1_ctrl, |
1153 | 1048 | ||
@@ -1158,7 +1053,6 @@ static struct clksrc_clk clksrcs[] = { | |||
1158 | }, { | 1053 | }, { |
1159 | .clk = { | 1054 | .clk = { |
1160 | .name = "sclk_irda", | 1055 | .name = "sclk_irda", |
1161 | .id = 2, | ||
1162 | .ctrlbit = (1 << 10), | 1056 | .ctrlbit = (1 << 10), |
1163 | .enable = s5pc100_sclk0_ctrl, | 1057 | .enable = s5pc100_sclk0_ctrl, |
1164 | 1058 | ||
@@ -1169,7 +1063,6 @@ static struct clksrc_clk clksrcs[] = { | |||
1169 | }, { | 1063 | }, { |
1170 | .clk = { | 1064 | .clk = { |
1171 | .name = "sclk_irda", | 1065 | .name = "sclk_irda", |
1172 | .id = -1, | ||
1173 | .ctrlbit = (1 << 10), | 1066 | .ctrlbit = (1 << 10), |
1174 | .enable = s5pc100_sclk0_ctrl, | 1067 | .enable = s5pc100_sclk0_ctrl, |
1175 | 1068 | ||
@@ -1180,7 +1073,6 @@ static struct clksrc_clk clksrcs[] = { | |||
1180 | }, { | 1073 | }, { |
1181 | .clk = { | 1074 | .clk = { |
1182 | .name = "sclk_pwi", | 1075 | .name = "sclk_pwi", |
1183 | .id = -1, | ||
1184 | .ctrlbit = (1 << 1), | 1076 | .ctrlbit = (1 << 1), |
1185 | .enable = s5pc100_sclk0_ctrl, | 1077 | .enable = s5pc100_sclk0_ctrl, |
1186 | 1078 | ||
@@ -1191,7 +1083,6 @@ static struct clksrc_clk clksrcs[] = { | |||
1191 | }, { | 1083 | }, { |
1192 | .clk = { | 1084 | .clk = { |
1193 | .name = "sclk_uhost", | 1085 | .name = "sclk_uhost", |
1194 | .id = -1, | ||
1195 | .ctrlbit = (1 << 11), | 1086 | .ctrlbit = (1 << 11), |
1196 | .enable = s5pc100_sclk0_ctrl, | 1087 | .enable = s5pc100_sclk0_ctrl, |
1197 | 1088 | ||
@@ -1291,79 +1182,70 @@ void __init_or_cpufreq s5pc100_setup_clocks(void) | |||
1291 | static struct clk init_clocks[] = { | 1182 | static struct clk init_clocks[] = { |
1292 | { | 1183 | { |
1293 | .name = "tzic", | 1184 | .name = "tzic", |
1294 | .id = -1, | ||
1295 | .parent = &clk_div_d0_bus.clk, | 1185 | .parent = &clk_div_d0_bus.clk, |
1296 | .enable = s5pc100_d0_0_ctrl, | 1186 | .enable = s5pc100_d0_0_ctrl, |
1297 | .ctrlbit = (1 << 1), | 1187 | .ctrlbit = (1 << 1), |
1298 | }, { | 1188 | }, { |
1299 | .name = "intc", | 1189 | .name = "intc", |
1300 | .id = -1, | ||
1301 | .parent = &clk_div_d0_bus.clk, | 1190 | .parent = &clk_div_d0_bus.clk, |
1302 | .enable = s5pc100_d0_0_ctrl, | 1191 | .enable = s5pc100_d0_0_ctrl, |
1303 | .ctrlbit = (1 << 0), | 1192 | .ctrlbit = (1 << 0), |
1304 | }, { | 1193 | }, { |
1305 | .name = "ebi", | 1194 | .name = "ebi", |
1306 | .id = -1, | ||
1307 | .parent = &clk_div_d0_bus.clk, | 1195 | .parent = &clk_div_d0_bus.clk, |
1308 | .enable = s5pc100_d0_1_ctrl, | 1196 | .enable = s5pc100_d0_1_ctrl, |
1309 | .ctrlbit = (1 << 5), | 1197 | .ctrlbit = (1 << 5), |
1310 | }, { | 1198 | }, { |
1311 | .name = "intmem", | 1199 | .name = "intmem", |
1312 | .id = -1, | ||
1313 | .parent = &clk_div_d0_bus.clk, | 1200 | .parent = &clk_div_d0_bus.clk, |
1314 | .enable = s5pc100_d0_1_ctrl, | 1201 | .enable = s5pc100_d0_1_ctrl, |
1315 | .ctrlbit = (1 << 4), | 1202 | .ctrlbit = (1 << 4), |
1316 | }, { | 1203 | }, { |
1317 | .name = "sromc", | 1204 | .name = "sromc", |
1318 | .id = -1, | ||
1319 | .parent = &clk_div_d0_bus.clk, | 1205 | .parent = &clk_div_d0_bus.clk, |
1320 | .enable = s5pc100_d0_1_ctrl, | 1206 | .enable = s5pc100_d0_1_ctrl, |
1321 | .ctrlbit = (1 << 1), | 1207 | .ctrlbit = (1 << 1), |
1322 | }, { | 1208 | }, { |
1323 | .name = "dmc", | 1209 | .name = "dmc", |
1324 | .id = -1, | ||
1325 | .parent = &clk_div_d0_bus.clk, | 1210 | .parent = &clk_div_d0_bus.clk, |
1326 | .enable = s5pc100_d0_1_ctrl, | 1211 | .enable = s5pc100_d0_1_ctrl, |
1327 | .ctrlbit = (1 << 0), | 1212 | .ctrlbit = (1 << 0), |
1328 | }, { | 1213 | }, { |
1329 | .name = "chipid", | 1214 | .name = "chipid", |
1330 | .id = -1, | ||
1331 | .parent = &clk_div_d0_bus.clk, | 1215 | .parent = &clk_div_d0_bus.clk, |
1332 | .enable = s5pc100_d0_1_ctrl, | 1216 | .enable = s5pc100_d0_1_ctrl, |
1333 | .ctrlbit = (1 << 0), | 1217 | .ctrlbit = (1 << 0), |
1334 | }, { | 1218 | }, { |
1335 | .name = "gpio", | 1219 | .name = "gpio", |
1336 | .id = -1, | ||
1337 | .parent = &clk_div_d1_bus.clk, | 1220 | .parent = &clk_div_d1_bus.clk, |
1338 | .enable = s5pc100_d1_3_ctrl, | 1221 | .enable = s5pc100_d1_3_ctrl, |
1339 | .ctrlbit = (1 << 1), | 1222 | .ctrlbit = (1 << 1), |
1340 | }, { | 1223 | }, { |
1341 | .name = "uart", | 1224 | .name = "uart", |
1342 | .id = 0, | 1225 | .devname = "s3c6400-uart.0", |
1343 | .parent = &clk_div_d1_bus.clk, | 1226 | .parent = &clk_div_d1_bus.clk, |
1344 | .enable = s5pc100_d1_4_ctrl, | 1227 | .enable = s5pc100_d1_4_ctrl, |
1345 | .ctrlbit = (1 << 0), | 1228 | .ctrlbit = (1 << 0), |
1346 | }, { | 1229 | }, { |
1347 | .name = "uart", | 1230 | .name = "uart", |
1348 | .id = 1, | 1231 | .devname = "s3c6400-uart.1", |
1349 | .parent = &clk_div_d1_bus.clk, | 1232 | .parent = &clk_div_d1_bus.clk, |
1350 | .enable = s5pc100_d1_4_ctrl, | 1233 | .enable = s5pc100_d1_4_ctrl, |
1351 | .ctrlbit = (1 << 1), | 1234 | .ctrlbit = (1 << 1), |
1352 | }, { | 1235 | }, { |
1353 | .name = "uart", | 1236 | .name = "uart", |
1354 | .id = 2, | 1237 | .devname = "s3c6400-uart.2", |
1355 | .parent = &clk_div_d1_bus.clk, | 1238 | .parent = &clk_div_d1_bus.clk, |
1356 | .enable = s5pc100_d1_4_ctrl, | 1239 | .enable = s5pc100_d1_4_ctrl, |
1357 | .ctrlbit = (1 << 2), | 1240 | .ctrlbit = (1 << 2), |
1358 | }, { | 1241 | }, { |
1359 | .name = "uart", | 1242 | .name = "uart", |
1360 | .id = 3, | 1243 | .devname = "s3c6400-uart.3", |
1361 | .parent = &clk_div_d1_bus.clk, | 1244 | .parent = &clk_div_d1_bus.clk, |
1362 | .enable = s5pc100_d1_4_ctrl, | 1245 | .enable = s5pc100_d1_4_ctrl, |
1363 | .ctrlbit = (1 << 3), | 1246 | .ctrlbit = (1 << 3), |
1364 | }, { | 1247 | }, { |
1365 | .name = "timers", | 1248 | .name = "timers", |
1366 | .id = -1, | ||
1367 | .parent = &clk_div_d1_bus.clk, | 1249 | .parent = &clk_div_d1_bus.clk, |
1368 | .enable = s5pc100_d1_3_ctrl, | 1250 | .enable = s5pc100_d1_3_ctrl, |
1369 | .ctrlbit = (1 << 6), | 1251 | .ctrlbit = (1 << 6), |
diff --git a/arch/arm/mach-s5pc100/include/mach/clkdev.h b/arch/arm/mach-s5pc100/include/mach/clkdev.h new file mode 100644 index 000000000000..7dffa83d23ff --- /dev/null +++ b/arch/arm/mach-s5pc100/include/mach/clkdev.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __MACH_CLKDEV_H__ | ||
2 | #define __MACH_CLKDEV_H__ | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do {} while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mach-s5pc100/include/mach/regs-fb.h b/arch/arm/mach-s5pc100/include/mach/regs-fb.h deleted file mode 100644 index 07aa4d6054fe..000000000000 --- a/arch/arm/mach-s5pc100/include/mach/regs-fb.h +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | /* arch/arm/mach-s5pc100/include/mach/regs-fb.h | ||
2 | * | ||
3 | * Copyright 2009 Samsung Electronics Co. | ||
4 | * Pawel Osciak <p.osciak@samsung.com> | ||
5 | * | ||
6 | * Framebuffer register definitions for Samsung S5PC100. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_REGS_FB_H | ||
14 | #define __ASM_ARCH_REGS_FB_H __FILE__ | ||
15 | |||
16 | #include <plat/regs-fb-v4.h> | ||
17 | |||
18 | /* VP1 interface timing control */ | ||
19 | #define VP1CON0 (0x118) | ||
20 | #define VP1_RATECON_EN (1 << 31) | ||
21 | #define VP1_CLKRATE_MASK (0xff) | ||
22 | |||
23 | #define VP1CON1 (0x11c) | ||
24 | #define VP1_VTREGCON_EN (1 << 31) | ||
25 | #define VP1_VBPD_MASK (0xfff) | ||
26 | #define VP1_VBPD_SHIFT (16) | ||
27 | |||
28 | |||
29 | #define WPALCON_H (0x19c) | ||
30 | #define WPALCON_L (0x1a0) | ||
31 | |||
32 | /* Palette control for WPAL0 and WPAL1 is the same as in S3C64xx, but | ||
33 | * different for WPAL2-4 | ||
34 | */ | ||
35 | /* In WPALCON_L (aka WPALCON) */ | ||
36 | #define WPALCON_W1PAL_32BPP_A888 (0x7 << 3) | ||
37 | #define WPALCON_W0PAL_32BPP_A888 (0x7 << 0) | ||
38 | |||
39 | /* To set W2PAL-W4PAL consist of one bit from WPALCON_L and two from WPALCON_H, | ||
40 | * e.g. W2PAL[2..0] is made of (WPALCON_H[10..9], WPALCON_L[6]). | ||
41 | */ | ||
42 | #define WPALCON_L_WxPAL_L_MASK (0x1) | ||
43 | #define WPALCON_L_W2PAL_L_SHIFT (6) | ||
44 | #define WPALCON_L_W3PAL_L_SHIFT (7) | ||
45 | #define WPALCON_L_W4PAL_L_SHIFT (8) | ||
46 | |||
47 | #define WPALCON_L_WxPAL_H_MASK (0x3) | ||
48 | #define WPALCON_H_W2PAL_H_SHIFT (9) | ||
49 | #define WPALCON_H_W3PAL_H_SHIFT (13) | ||
50 | #define WPALCON_H_W4PAL_H_SHIFT (17) | ||
51 | |||
52 | /* Per-window alpha value registers */ | ||
53 | /* For window 0 8-bit alpha values are in VIDW0ALPHAx, | ||
54 | * for windows 1-4 alpha values consist of two parts, the 4 low bits are | ||
55 | * taken from VIDWxALPHAx and 4 high bits are from VIDOSDxC, | ||
56 | * e.g. WIN1_ALPHA0_B[7..0] = (VIDOSD1C[3..0], VIDW1ALPHA0[3..0]) | ||
57 | */ | ||
58 | #define VIDWxALPHA0(_win) (0x200 + (_win * 8)) | ||
59 | #define VIDWxALPHA1(_win) (0x204 + (_win * 8)) | ||
60 | |||
61 | /* Only for window 0 in VIDW0ALPHAx. */ | ||
62 | #define VIDW0ALPHAx_R(_x) ((_x) << 16) | ||
63 | #define VIDW0ALPHAx_R_MASK (0xff << 16) | ||
64 | #define VIDW0ALPHAx_R_SHIFT (16) | ||
65 | #define VIDW0ALPHAx_G(_x) ((_x) << 8) | ||
66 | #define VIDW0ALPHAx_G_MASK (0xff << 8) | ||
67 | #define VIDW0ALPHAx_G_SHIFT (8) | ||
68 | #define VIDW0ALPHAx_B(_x) ((_x) << 0) | ||
69 | #define VIDW0ALPHAx_B_MASK (0xff << 0) | ||
70 | #define VIDW0ALPHAx_B_SHIFT (0) | ||
71 | |||
72 | /* Low 4 bits of alpha0-1 for windows 1-4 */ | ||
73 | #define VIDW14ALPHAx_R_L(_x) ((_x) << 16) | ||
74 | #define VIDW14ALPHAx_R_L_MASK (0xf << 16) | ||
75 | #define VIDW14ALPHAx_R_L_SHIFT (16) | ||
76 | #define VIDW14ALPHAx_G_L(_x) ((_x) << 8) | ||
77 | #define VIDW14ALPHAx_G_L_MASK (0xf << 8) | ||
78 | #define VIDW14ALPHAx_G_L_SHIFT (8) | ||
79 | #define VIDW14ALPHAx_B_L(_x) ((_x) << 0) | ||
80 | #define VIDW14ALPHAx_B_L_MASK (0xf << 0) | ||
81 | #define VIDW14ALPHAx_B_L_SHIFT (0) | ||
82 | |||
83 | |||
84 | /* Per-window blending equation control registers */ | ||
85 | #define BLENDEQx(_win) (0x244 + ((_win) * 4)) | ||
86 | #define BLENDEQ1 (0x244) | ||
87 | #define BLENDEQ2 (0x248) | ||
88 | #define BLENDEQ3 (0x24c) | ||
89 | #define BLENDEQ4 (0x250) | ||
90 | |||
91 | #define BLENDEQx_Q_FUNC(_x) ((_x) << 18) | ||
92 | #define BLENDEQx_Q_FUNC_MASK (0xf << 18) | ||
93 | #define BLENDEQx_P_FUNC(_x) ((_x) << 12) | ||
94 | #define BLENDEQx_P_FUNC_MASK (0xf << 12) | ||
95 | #define BLENDEQx_B_FUNC(_x) ((_x) << 6) | ||
96 | #define BLENDEQx_B_FUNC_MASK (0xf << 6) | ||
97 | #define BLENDEQx_A_FUNC(_x) ((_x) << 0) | ||
98 | #define BLENDEQx_A_FUNC_MASK (0xf << 0) | ||
99 | |||
100 | #define BLENDCON (0x260) | ||
101 | #define BLENDCON_8BIT_ALPHA (1 << 0) | ||
102 | |||
103 | |||
104 | #endif /* __ASM_ARCH_REGS_FB_H */ | ||
105 | |||
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c index 0525cb3ef406..227d8908aab6 100644 --- a/arch/arm/mach-s5pc100/mach-smdkc100.c +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
30 | 30 | ||
31 | #include <mach/map.h> | 31 | #include <mach/map.h> |
32 | #include <mach/regs-fb.h> | ||
33 | #include <mach/regs-gpio.h> | 32 | #include <mach/regs-gpio.h> |
34 | 33 | ||
35 | #include <video/platform_lcd.h> | 34 | #include <video/platform_lcd.h> |
@@ -51,6 +50,8 @@ | |||
51 | #include <plat/keypad.h> | 50 | #include <plat/keypad.h> |
52 | #include <plat/ts.h> | 51 | #include <plat/ts.h> |
53 | #include <plat/audio.h> | 52 | #include <plat/audio.h> |
53 | #include <plat/backlight.h> | ||
54 | #include <plat/regs-fb-v4.h> | ||
54 | 55 | ||
55 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 56 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
56 | #define SMDKC100_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 57 | #define SMDKC100_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
@@ -179,45 +180,6 @@ static struct samsung_keypad_platdata smdkc100_keypad_data __initdata = { | |||
179 | .cols = 8, | 180 | .cols = 8, |
180 | }; | 181 | }; |
181 | 182 | ||
182 | static int smdkc100_backlight_init(struct device *dev) | ||
183 | { | ||
184 | int ret; | ||
185 | |||
186 | ret = gpio_request(S5PC100_GPD(0), "Backlight"); | ||
187 | if (ret) { | ||
188 | printk(KERN_ERR "failed to request GPF for PWM-OUT0\n"); | ||
189 | return ret; | ||
190 | } | ||
191 | |||
192 | /* Configure GPIO pin with S5PC100_GPD_TOUT_0 */ | ||
193 | s3c_gpio_cfgpin(S5PC100_GPD(0), S3C_GPIO_SFN(2)); | ||
194 | |||
195 | return 0; | ||
196 | } | ||
197 | |||
198 | static void smdkc100_backlight_exit(struct device *dev) | ||
199 | { | ||
200 | s3c_gpio_cfgpin(S5PC100_GPD(0), S3C_GPIO_OUTPUT); | ||
201 | gpio_free(S5PC100_GPD(0)); | ||
202 | } | ||
203 | |||
204 | static struct platform_pwm_backlight_data smdkc100_backlight_data = { | ||
205 | .pwm_id = 0, | ||
206 | .max_brightness = 255, | ||
207 | .dft_brightness = 255, | ||
208 | .pwm_period_ns = 78770, | ||
209 | .init = smdkc100_backlight_init, | ||
210 | .exit = smdkc100_backlight_exit, | ||
211 | }; | ||
212 | |||
213 | static struct platform_device smdkc100_backlight_device = { | ||
214 | .name = "pwm-backlight", | ||
215 | .dev = { | ||
216 | .parent = &s3c_device_timer[0].dev, | ||
217 | .platform_data = &smdkc100_backlight_data, | ||
218 | }, | ||
219 | }; | ||
220 | |||
221 | static struct platform_device *smdkc100_devices[] __initdata = { | 183 | static struct platform_device *smdkc100_devices[] __initdata = { |
222 | &s3c_device_adc, | 184 | &s3c_device_adc, |
223 | &s3c_device_cfcon, | 185 | &s3c_device_cfcon, |
@@ -239,8 +201,6 @@ static struct platform_device *smdkc100_devices[] __initdata = { | |||
239 | &s5p_device_fimc1, | 201 | &s5p_device_fimc1, |
240 | &s5p_device_fimc2, | 202 | &s5p_device_fimc2, |
241 | &s5pc100_device_spdif, | 203 | &s5pc100_device_spdif, |
242 | &s3c_device_timer[0], | ||
243 | &smdkc100_backlight_device, | ||
244 | }; | 204 | }; |
245 | 205 | ||
246 | static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { | 206 | static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { |
@@ -249,6 +209,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { | |||
249 | .oversampling_shift = 2, | 209 | .oversampling_shift = 2, |
250 | }; | 210 | }; |
251 | 211 | ||
212 | /* LCD Backlight data */ | ||
213 | static struct samsung_bl_gpio_info smdkc100_bl_gpio_info = { | ||
214 | .no = S5PC100_GPD(0), | ||
215 | .func = S3C_GPIO_SFN(2), | ||
216 | }; | ||
217 | |||
218 | static struct platform_pwm_backlight_data smdkc100_bl_data = { | ||
219 | .pwm_id = 0, | ||
220 | }; | ||
221 | |||
252 | static void __init smdkc100_map_io(void) | 222 | static void __init smdkc100_map_io(void) |
253 | { | 223 | { |
254 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | 224 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); |
@@ -276,6 +246,9 @@ static void __init smdkc100_machine_init(void) | |||
276 | /* LCD init */ | 246 | /* LCD init */ |
277 | gpio_request(S5PC100_GPH0(6), "GPH0"); | 247 | gpio_request(S5PC100_GPH0(6), "GPH0"); |
278 | smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0); | 248 | smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0); |
249 | |||
250 | samsung_bl_set(&smdkc100_bl_gpio_info, &smdkc100_bl_data); | ||
251 | |||
279 | platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices)); | 252 | platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices)); |
280 | } | 253 | } |
281 | 254 | ||
diff --git a/arch/arm/mach-s5pc100/setup-fb-24bpp.c b/arch/arm/mach-s5pc100/setup-fb-24bpp.c index d31c0f3fe222..8978e4cf9ed5 100644 --- a/arch/arm/mach-s5pc100/setup-fb-24bpp.c +++ b/arch/arm/mach-s5pc100/setup-fb-24bpp.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
16 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
17 | 17 | ||
18 | #include <mach/regs-fb.h> | ||
19 | #include <mach/map.h> | 18 | #include <mach/map.h> |
20 | #include <plat/fb.h> | 19 | #include <plat/fb.h> |
21 | #include <plat/gpio-cfg.h> | 20 | #include <plat/gpio-cfg.h> |
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig index 37b5a97594a5..79bb3a0314ef 100644 --- a/arch/arm/mach-s5pv210/Kconfig +++ b/arch/arm/mach-s5pv210/Kconfig | |||
@@ -134,6 +134,7 @@ config MACH_SMDKV210 | |||
134 | select S3C_DEV_RTC | 134 | select S3C_DEV_RTC |
135 | select S3C_DEV_WDT | 135 | select S3C_DEV_WDT |
136 | select SAMSUNG_DEV_ADC | 136 | select SAMSUNG_DEV_ADC |
137 | select SAMSUNG_DEV_BACKLIGHT | ||
137 | select SAMSUNG_DEV_IDE | 138 | select SAMSUNG_DEV_IDE |
138 | select SAMSUNG_DEV_KEYPAD | 139 | select SAMSUNG_DEV_KEYPAD |
139 | select SAMSUNG_DEV_PWM | 140 | select SAMSUNG_DEV_PWM |
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c index 2d599499cefe..ae72f87eab15 100644 --- a/arch/arm/mach-s5pv210/clock.c +++ b/arch/arm/mach-s5pv210/clock.c | |||
@@ -36,7 +36,6 @@ static unsigned long xtal; | |||
36 | static struct clksrc_clk clk_mout_apll = { | 36 | static struct clksrc_clk clk_mout_apll = { |
37 | .clk = { | 37 | .clk = { |
38 | .name = "mout_apll", | 38 | .name = "mout_apll", |
39 | .id = -1, | ||
40 | }, | 39 | }, |
41 | .sources = &clk_src_apll, | 40 | .sources = &clk_src_apll, |
42 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 0, .size = 1 }, | 41 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 0, .size = 1 }, |
@@ -45,7 +44,6 @@ static struct clksrc_clk clk_mout_apll = { | |||
45 | static struct clksrc_clk clk_mout_epll = { | 44 | static struct clksrc_clk clk_mout_epll = { |
46 | .clk = { | 45 | .clk = { |
47 | .name = "mout_epll", | 46 | .name = "mout_epll", |
48 | .id = -1, | ||
49 | }, | 47 | }, |
50 | .sources = &clk_src_epll, | 48 | .sources = &clk_src_epll, |
51 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 8, .size = 1 }, | 49 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 8, .size = 1 }, |
@@ -54,7 +52,6 @@ static struct clksrc_clk clk_mout_epll = { | |||
54 | static struct clksrc_clk clk_mout_mpll = { | 52 | static struct clksrc_clk clk_mout_mpll = { |
55 | .clk = { | 53 | .clk = { |
56 | .name = "mout_mpll", | 54 | .name = "mout_mpll", |
57 | .id = -1, | ||
58 | }, | 55 | }, |
59 | .sources = &clk_src_mpll, | 56 | .sources = &clk_src_mpll, |
60 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 4, .size = 1 }, | 57 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 4, .size = 1 }, |
@@ -73,7 +70,6 @@ static struct clksrc_sources clkset_armclk = { | |||
73 | static struct clksrc_clk clk_armclk = { | 70 | static struct clksrc_clk clk_armclk = { |
74 | .clk = { | 71 | .clk = { |
75 | .name = "armclk", | 72 | .name = "armclk", |
76 | .id = -1, | ||
77 | }, | 73 | }, |
78 | .sources = &clkset_armclk, | 74 | .sources = &clkset_armclk, |
79 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 16, .size = 1 }, | 75 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 16, .size = 1 }, |
@@ -83,7 +79,6 @@ static struct clksrc_clk clk_armclk = { | |||
83 | static struct clksrc_clk clk_hclk_msys = { | 79 | static struct clksrc_clk clk_hclk_msys = { |
84 | .clk = { | 80 | .clk = { |
85 | .name = "hclk_msys", | 81 | .name = "hclk_msys", |
86 | .id = -1, | ||
87 | .parent = &clk_armclk.clk, | 82 | .parent = &clk_armclk.clk, |
88 | }, | 83 | }, |
89 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 8, .size = 3 }, | 84 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 8, .size = 3 }, |
@@ -92,7 +87,6 @@ static struct clksrc_clk clk_hclk_msys = { | |||
92 | static struct clksrc_clk clk_pclk_msys = { | 87 | static struct clksrc_clk clk_pclk_msys = { |
93 | .clk = { | 88 | .clk = { |
94 | .name = "pclk_msys", | 89 | .name = "pclk_msys", |
95 | .id = -1, | ||
96 | .parent = &clk_hclk_msys.clk, | 90 | .parent = &clk_hclk_msys.clk, |
97 | }, | 91 | }, |
98 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 12, .size = 3 }, | 92 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 12, .size = 3 }, |
@@ -101,7 +95,6 @@ static struct clksrc_clk clk_pclk_msys = { | |||
101 | static struct clksrc_clk clk_sclk_a2m = { | 95 | static struct clksrc_clk clk_sclk_a2m = { |
102 | .clk = { | 96 | .clk = { |
103 | .name = "sclk_a2m", | 97 | .name = "sclk_a2m", |
104 | .id = -1, | ||
105 | .parent = &clk_mout_apll.clk, | 98 | .parent = &clk_mout_apll.clk, |
106 | }, | 99 | }, |
107 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 4, .size = 3 }, | 100 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 4, .size = 3 }, |
@@ -120,7 +113,6 @@ static struct clksrc_sources clkset_hclk_sys = { | |||
120 | static struct clksrc_clk clk_hclk_dsys = { | 113 | static struct clksrc_clk clk_hclk_dsys = { |
121 | .clk = { | 114 | .clk = { |
122 | .name = "hclk_dsys", | 115 | .name = "hclk_dsys", |
123 | .id = -1, | ||
124 | }, | 116 | }, |
125 | .sources = &clkset_hclk_sys, | 117 | .sources = &clkset_hclk_sys, |
126 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 20, .size = 1 }, | 118 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 20, .size = 1 }, |
@@ -130,7 +122,6 @@ static struct clksrc_clk clk_hclk_dsys = { | |||
130 | static struct clksrc_clk clk_pclk_dsys = { | 122 | static struct clksrc_clk clk_pclk_dsys = { |
131 | .clk = { | 123 | .clk = { |
132 | .name = "pclk_dsys", | 124 | .name = "pclk_dsys", |
133 | .id = -1, | ||
134 | .parent = &clk_hclk_dsys.clk, | 125 | .parent = &clk_hclk_dsys.clk, |
135 | }, | 126 | }, |
136 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 20, .size = 3 }, | 127 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 20, .size = 3 }, |
@@ -139,7 +130,6 @@ static struct clksrc_clk clk_pclk_dsys = { | |||
139 | static struct clksrc_clk clk_hclk_psys = { | 130 | static struct clksrc_clk clk_hclk_psys = { |
140 | .clk = { | 131 | .clk = { |
141 | .name = "hclk_psys", | 132 | .name = "hclk_psys", |
142 | .id = -1, | ||
143 | }, | 133 | }, |
144 | .sources = &clkset_hclk_sys, | 134 | .sources = &clkset_hclk_sys, |
145 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 24, .size = 1 }, | 135 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 24, .size = 1 }, |
@@ -149,7 +139,6 @@ static struct clksrc_clk clk_hclk_psys = { | |||
149 | static struct clksrc_clk clk_pclk_psys = { | 139 | static struct clksrc_clk clk_pclk_psys = { |
150 | .clk = { | 140 | .clk = { |
151 | .name = "pclk_psys", | 141 | .name = "pclk_psys", |
152 | .id = -1, | ||
153 | .parent = &clk_hclk_psys.clk, | 142 | .parent = &clk_hclk_psys.clk, |
154 | }, | 143 | }, |
155 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 28, .size = 3 }, | 144 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 28, .size = 3 }, |
@@ -187,38 +176,31 @@ static int s5pv210_clk_mask1_ctrl(struct clk *clk, int enable) | |||
187 | 176 | ||
188 | static struct clk clk_sclk_hdmi27m = { | 177 | static struct clk clk_sclk_hdmi27m = { |
189 | .name = "sclk_hdmi27m", | 178 | .name = "sclk_hdmi27m", |
190 | .id = -1, | ||
191 | .rate = 27000000, | 179 | .rate = 27000000, |
192 | }; | 180 | }; |
193 | 181 | ||
194 | static struct clk clk_sclk_hdmiphy = { | 182 | static struct clk clk_sclk_hdmiphy = { |
195 | .name = "sclk_hdmiphy", | 183 | .name = "sclk_hdmiphy", |
196 | .id = -1, | ||
197 | }; | 184 | }; |
198 | 185 | ||
199 | static struct clk clk_sclk_usbphy0 = { | 186 | static struct clk clk_sclk_usbphy0 = { |
200 | .name = "sclk_usbphy0", | 187 | .name = "sclk_usbphy0", |
201 | .id = -1, | ||
202 | }; | 188 | }; |
203 | 189 | ||
204 | static struct clk clk_sclk_usbphy1 = { | 190 | static struct clk clk_sclk_usbphy1 = { |
205 | .name = "sclk_usbphy1", | 191 | .name = "sclk_usbphy1", |
206 | .id = -1, | ||
207 | }; | 192 | }; |
208 | 193 | ||
209 | static struct clk clk_pcmcdclk0 = { | 194 | static struct clk clk_pcmcdclk0 = { |
210 | .name = "pcmcdclk", | 195 | .name = "pcmcdclk", |
211 | .id = -1, | ||
212 | }; | 196 | }; |
213 | 197 | ||
214 | static struct clk clk_pcmcdclk1 = { | 198 | static struct clk clk_pcmcdclk1 = { |
215 | .name = "pcmcdclk", | 199 | .name = "pcmcdclk", |
216 | .id = -1, | ||
217 | }; | 200 | }; |
218 | 201 | ||
219 | static struct clk clk_pcmcdclk2 = { | 202 | static struct clk clk_pcmcdclk2 = { |
220 | .name = "pcmcdclk", | 203 | .name = "pcmcdclk", |
221 | .id = -1, | ||
222 | }; | 204 | }; |
223 | 205 | ||
224 | static struct clk *clkset_vpllsrc_list[] = { | 206 | static struct clk *clkset_vpllsrc_list[] = { |
@@ -234,7 +216,6 @@ static struct clksrc_sources clkset_vpllsrc = { | |||
234 | static struct clksrc_clk clk_vpllsrc = { | 216 | static struct clksrc_clk clk_vpllsrc = { |
235 | .clk = { | 217 | .clk = { |
236 | .name = "vpll_src", | 218 | .name = "vpll_src", |
237 | .id = -1, | ||
238 | .enable = s5pv210_clk_mask0_ctrl, | 219 | .enable = s5pv210_clk_mask0_ctrl, |
239 | .ctrlbit = (1 << 7), | 220 | .ctrlbit = (1 << 7), |
240 | }, | 221 | }, |
@@ -255,7 +236,6 @@ static struct clksrc_sources clkset_sclk_vpll = { | |||
255 | static struct clksrc_clk clk_sclk_vpll = { | 236 | static struct clksrc_clk clk_sclk_vpll = { |
256 | .clk = { | 237 | .clk = { |
257 | .name = "sclk_vpll", | 238 | .name = "sclk_vpll", |
258 | .id = -1, | ||
259 | }, | 239 | }, |
260 | .sources = &clkset_sclk_vpll, | 240 | .sources = &clkset_sclk_vpll, |
261 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 12, .size = 1 }, | 241 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 12, .size = 1 }, |
@@ -276,7 +256,6 @@ static struct clksrc_sources clkset_moutdmc0src = { | |||
276 | static struct clksrc_clk clk_mout_dmc0 = { | 256 | static struct clksrc_clk clk_mout_dmc0 = { |
277 | .clk = { | 257 | .clk = { |
278 | .name = "mout_dmc0", | 258 | .name = "mout_dmc0", |
279 | .id = -1, | ||
280 | }, | 259 | }, |
281 | .sources = &clkset_moutdmc0src, | 260 | .sources = &clkset_moutdmc0src, |
282 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 24, .size = 2 }, | 261 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 24, .size = 2 }, |
@@ -285,7 +264,6 @@ static struct clksrc_clk clk_mout_dmc0 = { | |||
285 | static struct clksrc_clk clk_sclk_dmc0 = { | 264 | static struct clksrc_clk clk_sclk_dmc0 = { |
286 | .clk = { | 265 | .clk = { |
287 | .name = "sclk_dmc0", | 266 | .name = "sclk_dmc0", |
288 | .id = -1, | ||
289 | .parent = &clk_mout_dmc0.clk, | 267 | .parent = &clk_mout_dmc0.clk, |
290 | }, | 268 | }, |
291 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 28, .size = 4 }, | 269 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 28, .size = 4 }, |
@@ -312,181 +290,169 @@ static struct clk_ops clk_fout_apll_ops = { | |||
312 | static struct clk init_clocks_off[] = { | 290 | static struct clk init_clocks_off[] = { |
313 | { | 291 | { |
314 | .name = "pdma", | 292 | .name = "pdma", |
315 | .id = 0, | 293 | .devname = "s3c-pl330.0", |
316 | .parent = &clk_hclk_psys.clk, | 294 | .parent = &clk_hclk_psys.clk, |
317 | .enable = s5pv210_clk_ip0_ctrl, | 295 | .enable = s5pv210_clk_ip0_ctrl, |
318 | .ctrlbit = (1 << 3), | 296 | .ctrlbit = (1 << 3), |
319 | }, { | 297 | }, { |
320 | .name = "pdma", | 298 | .name = "pdma", |
321 | .id = 1, | 299 | .devname = "s3c-pl330.1", |
322 | .parent = &clk_hclk_psys.clk, | 300 | .parent = &clk_hclk_psys.clk, |
323 | .enable = s5pv210_clk_ip0_ctrl, | 301 | .enable = s5pv210_clk_ip0_ctrl, |
324 | .ctrlbit = (1 << 4), | 302 | .ctrlbit = (1 << 4), |
325 | }, { | 303 | }, { |
326 | .name = "rot", | 304 | .name = "rot", |
327 | .id = -1, | ||
328 | .parent = &clk_hclk_dsys.clk, | 305 | .parent = &clk_hclk_dsys.clk, |
329 | .enable = s5pv210_clk_ip0_ctrl, | 306 | .enable = s5pv210_clk_ip0_ctrl, |
330 | .ctrlbit = (1<<29), | 307 | .ctrlbit = (1<<29), |
331 | }, { | 308 | }, { |
332 | .name = "fimc", | 309 | .name = "fimc", |
333 | .id = 0, | 310 | .devname = "s5pv210-fimc.0", |
334 | .parent = &clk_hclk_dsys.clk, | 311 | .parent = &clk_hclk_dsys.clk, |
335 | .enable = s5pv210_clk_ip0_ctrl, | 312 | .enable = s5pv210_clk_ip0_ctrl, |
336 | .ctrlbit = (1 << 24), | 313 | .ctrlbit = (1 << 24), |
337 | }, { | 314 | }, { |
338 | .name = "fimc", | 315 | .name = "fimc", |
339 | .id = 1, | 316 | .devname = "s5pv210-fimc.1", |
340 | .parent = &clk_hclk_dsys.clk, | 317 | .parent = &clk_hclk_dsys.clk, |
341 | .enable = s5pv210_clk_ip0_ctrl, | 318 | .enable = s5pv210_clk_ip0_ctrl, |
342 | .ctrlbit = (1 << 25), | 319 | .ctrlbit = (1 << 25), |
343 | }, { | 320 | }, { |
344 | .name = "fimc", | 321 | .name = "fimc", |
345 | .id = 2, | 322 | .devname = "s5pv210-fimc.2", |
346 | .parent = &clk_hclk_dsys.clk, | 323 | .parent = &clk_hclk_dsys.clk, |
347 | .enable = s5pv210_clk_ip0_ctrl, | 324 | .enable = s5pv210_clk_ip0_ctrl, |
348 | .ctrlbit = (1 << 26), | 325 | .ctrlbit = (1 << 26), |
349 | }, { | 326 | }, { |
350 | .name = "otg", | 327 | .name = "otg", |
351 | .id = -1, | ||
352 | .parent = &clk_hclk_psys.clk, | 328 | .parent = &clk_hclk_psys.clk, |
353 | .enable = s5pv210_clk_ip1_ctrl, | 329 | .enable = s5pv210_clk_ip1_ctrl, |
354 | .ctrlbit = (1<<16), | 330 | .ctrlbit = (1<<16), |
355 | }, { | 331 | }, { |
356 | .name = "usb-host", | 332 | .name = "usb-host", |
357 | .id = -1, | ||
358 | .parent = &clk_hclk_psys.clk, | 333 | .parent = &clk_hclk_psys.clk, |
359 | .enable = s5pv210_clk_ip1_ctrl, | 334 | .enable = s5pv210_clk_ip1_ctrl, |
360 | .ctrlbit = (1<<17), | 335 | .ctrlbit = (1<<17), |
361 | }, { | 336 | }, { |
362 | .name = "lcd", | 337 | .name = "lcd", |
363 | .id = -1, | ||
364 | .parent = &clk_hclk_dsys.clk, | 338 | .parent = &clk_hclk_dsys.clk, |
365 | .enable = s5pv210_clk_ip1_ctrl, | 339 | .enable = s5pv210_clk_ip1_ctrl, |
366 | .ctrlbit = (1<<0), | 340 | .ctrlbit = (1<<0), |
367 | }, { | 341 | }, { |
368 | .name = "cfcon", | 342 | .name = "cfcon", |
369 | .id = 0, | ||
370 | .parent = &clk_hclk_psys.clk, | 343 | .parent = &clk_hclk_psys.clk, |
371 | .enable = s5pv210_clk_ip1_ctrl, | 344 | .enable = s5pv210_clk_ip1_ctrl, |
372 | .ctrlbit = (1<<25), | 345 | .ctrlbit = (1<<25), |
373 | }, { | 346 | }, { |
374 | .name = "hsmmc", | 347 | .name = "hsmmc", |
375 | .id = 0, | 348 | .devname = "s3c-sdhci.0", |
376 | .parent = &clk_hclk_psys.clk, | 349 | .parent = &clk_hclk_psys.clk, |
377 | .enable = s5pv210_clk_ip2_ctrl, | 350 | .enable = s5pv210_clk_ip2_ctrl, |
378 | .ctrlbit = (1<<16), | 351 | .ctrlbit = (1<<16), |
379 | }, { | 352 | }, { |
380 | .name = "hsmmc", | 353 | .name = "hsmmc", |
381 | .id = 1, | 354 | .devname = "s3c-sdhci.1", |
382 | .parent = &clk_hclk_psys.clk, | 355 | .parent = &clk_hclk_psys.clk, |
383 | .enable = s5pv210_clk_ip2_ctrl, | 356 | .enable = s5pv210_clk_ip2_ctrl, |
384 | .ctrlbit = (1<<17), | 357 | .ctrlbit = (1<<17), |
385 | }, { | 358 | }, { |
386 | .name = "hsmmc", | 359 | .name = "hsmmc", |
387 | .id = 2, | 360 | .devname = "s3c-sdhci.2", |
388 | .parent = &clk_hclk_psys.clk, | 361 | .parent = &clk_hclk_psys.clk, |
389 | .enable = s5pv210_clk_ip2_ctrl, | 362 | .enable = s5pv210_clk_ip2_ctrl, |
390 | .ctrlbit = (1<<18), | 363 | .ctrlbit = (1<<18), |
391 | }, { | 364 | }, { |
392 | .name = "hsmmc", | 365 | .name = "hsmmc", |
393 | .id = 3, | 366 | .devname = "s3c-sdhci.3", |
394 | .parent = &clk_hclk_psys.clk, | 367 | .parent = &clk_hclk_psys.clk, |
395 | .enable = s5pv210_clk_ip2_ctrl, | 368 | .enable = s5pv210_clk_ip2_ctrl, |
396 | .ctrlbit = (1<<19), | 369 | .ctrlbit = (1<<19), |
397 | }, { | 370 | }, { |
398 | .name = "systimer", | 371 | .name = "systimer", |
399 | .id = -1, | ||
400 | .parent = &clk_pclk_psys.clk, | 372 | .parent = &clk_pclk_psys.clk, |
401 | .enable = s5pv210_clk_ip3_ctrl, | 373 | .enable = s5pv210_clk_ip3_ctrl, |
402 | .ctrlbit = (1<<16), | 374 | .ctrlbit = (1<<16), |
403 | }, { | 375 | }, { |
404 | .name = "watchdog", | 376 | .name = "watchdog", |
405 | .id = -1, | ||
406 | .parent = &clk_pclk_psys.clk, | 377 | .parent = &clk_pclk_psys.clk, |
407 | .enable = s5pv210_clk_ip3_ctrl, | 378 | .enable = s5pv210_clk_ip3_ctrl, |
408 | .ctrlbit = (1<<22), | 379 | .ctrlbit = (1<<22), |
409 | }, { | 380 | }, { |
410 | .name = "rtc", | 381 | .name = "rtc", |
411 | .id = -1, | ||
412 | .parent = &clk_pclk_psys.clk, | 382 | .parent = &clk_pclk_psys.clk, |
413 | .enable = s5pv210_clk_ip3_ctrl, | 383 | .enable = s5pv210_clk_ip3_ctrl, |
414 | .ctrlbit = (1<<15), | 384 | .ctrlbit = (1<<15), |
415 | }, { | 385 | }, { |
416 | .name = "i2c", | 386 | .name = "i2c", |
417 | .id = 0, | 387 | .devname = "s3c2440-i2c.0", |
418 | .parent = &clk_pclk_psys.clk, | 388 | .parent = &clk_pclk_psys.clk, |
419 | .enable = s5pv210_clk_ip3_ctrl, | 389 | .enable = s5pv210_clk_ip3_ctrl, |
420 | .ctrlbit = (1<<7), | 390 | .ctrlbit = (1<<7), |
421 | }, { | 391 | }, { |
422 | .name = "i2c", | 392 | .name = "i2c", |
423 | .id = 1, | 393 | .devname = "s3c2440-i2c.1", |
424 | .parent = &clk_pclk_psys.clk, | 394 | .parent = &clk_pclk_psys.clk, |
425 | .enable = s5pv210_clk_ip3_ctrl, | 395 | .enable = s5pv210_clk_ip3_ctrl, |
426 | .ctrlbit = (1 << 10), | 396 | .ctrlbit = (1 << 10), |
427 | }, { | 397 | }, { |
428 | .name = "i2c", | 398 | .name = "i2c", |
429 | .id = 2, | 399 | .devname = "s3c2440-i2c.2", |
430 | .parent = &clk_pclk_psys.clk, | 400 | .parent = &clk_pclk_psys.clk, |
431 | .enable = s5pv210_clk_ip3_ctrl, | 401 | .enable = s5pv210_clk_ip3_ctrl, |
432 | .ctrlbit = (1<<9), | 402 | .ctrlbit = (1<<9), |
433 | }, { | 403 | }, { |
434 | .name = "spi", | 404 | .name = "spi", |
435 | .id = 0, | 405 | .devname = "s3c64xx-spi.0", |
436 | .parent = &clk_pclk_psys.clk, | 406 | .parent = &clk_pclk_psys.clk, |
437 | .enable = s5pv210_clk_ip3_ctrl, | 407 | .enable = s5pv210_clk_ip3_ctrl, |
438 | .ctrlbit = (1<<12), | 408 | .ctrlbit = (1<<12), |
439 | }, { | 409 | }, { |
440 | .name = "spi", | 410 | .name = "spi", |
441 | .id = 1, | 411 | .devname = "s3c64xx-spi.1", |
442 | .parent = &clk_pclk_psys.clk, | 412 | .parent = &clk_pclk_psys.clk, |
443 | .enable = s5pv210_clk_ip3_ctrl, | 413 | .enable = s5pv210_clk_ip3_ctrl, |
444 | .ctrlbit = (1<<13), | 414 | .ctrlbit = (1<<13), |
445 | }, { | 415 | }, { |
446 | .name = "spi", | 416 | .name = "spi", |
447 | .id = 2, | 417 | .devname = "s3c64xx-spi.2", |
448 | .parent = &clk_pclk_psys.clk, | 418 | .parent = &clk_pclk_psys.clk, |
449 | .enable = s5pv210_clk_ip3_ctrl, | 419 | .enable = s5pv210_clk_ip3_ctrl, |
450 | .ctrlbit = (1<<14), | 420 | .ctrlbit = (1<<14), |
451 | }, { | 421 | }, { |
452 | .name = "timers", | 422 | .name = "timers", |
453 | .id = -1, | ||
454 | .parent = &clk_pclk_psys.clk, | 423 | .parent = &clk_pclk_psys.clk, |
455 | .enable = s5pv210_clk_ip3_ctrl, | 424 | .enable = s5pv210_clk_ip3_ctrl, |
456 | .ctrlbit = (1<<23), | 425 | .ctrlbit = (1<<23), |
457 | }, { | 426 | }, { |
458 | .name = "adc", | 427 | .name = "adc", |
459 | .id = -1, | ||
460 | .parent = &clk_pclk_psys.clk, | 428 | .parent = &clk_pclk_psys.clk, |
461 | .enable = s5pv210_clk_ip3_ctrl, | 429 | .enable = s5pv210_clk_ip3_ctrl, |
462 | .ctrlbit = (1<<24), | 430 | .ctrlbit = (1<<24), |
463 | }, { | 431 | }, { |
464 | .name = "keypad", | 432 | .name = "keypad", |
465 | .id = -1, | ||
466 | .parent = &clk_pclk_psys.clk, | 433 | .parent = &clk_pclk_psys.clk, |
467 | .enable = s5pv210_clk_ip3_ctrl, | 434 | .enable = s5pv210_clk_ip3_ctrl, |
468 | .ctrlbit = (1<<21), | 435 | .ctrlbit = (1<<21), |
469 | }, { | 436 | }, { |
470 | .name = "iis", | 437 | .name = "iis", |
471 | .id = 0, | 438 | .devname = "samsung-i2s.0", |
472 | .parent = &clk_p, | 439 | .parent = &clk_p, |
473 | .enable = s5pv210_clk_ip3_ctrl, | 440 | .enable = s5pv210_clk_ip3_ctrl, |
474 | .ctrlbit = (1<<4), | 441 | .ctrlbit = (1<<4), |
475 | }, { | 442 | }, { |
476 | .name = "iis", | 443 | .name = "iis", |
477 | .id = 1, | 444 | .devname = "samsung-i2s.1", |
478 | .parent = &clk_p, | 445 | .parent = &clk_p, |
479 | .enable = s5pv210_clk_ip3_ctrl, | 446 | .enable = s5pv210_clk_ip3_ctrl, |
480 | .ctrlbit = (1 << 5), | 447 | .ctrlbit = (1 << 5), |
481 | }, { | 448 | }, { |
482 | .name = "iis", | 449 | .name = "iis", |
483 | .id = 2, | 450 | .devname = "samsung-i2s.2", |
484 | .parent = &clk_p, | 451 | .parent = &clk_p, |
485 | .enable = s5pv210_clk_ip3_ctrl, | 452 | .enable = s5pv210_clk_ip3_ctrl, |
486 | .ctrlbit = (1 << 6), | 453 | .ctrlbit = (1 << 6), |
487 | }, { | 454 | }, { |
488 | .name = "spdif", | 455 | .name = "spdif", |
489 | .id = -1, | ||
490 | .parent = &clk_p, | 456 | .parent = &clk_p, |
491 | .enable = s5pv210_clk_ip3_ctrl, | 457 | .enable = s5pv210_clk_ip3_ctrl, |
492 | .ctrlbit = (1 << 0), | 458 | .ctrlbit = (1 << 0), |
@@ -496,38 +462,36 @@ static struct clk init_clocks_off[] = { | |||
496 | static struct clk init_clocks[] = { | 462 | static struct clk init_clocks[] = { |
497 | { | 463 | { |
498 | .name = "hclk_imem", | 464 | .name = "hclk_imem", |
499 | .id = -1, | ||
500 | .parent = &clk_hclk_msys.clk, | 465 | .parent = &clk_hclk_msys.clk, |
501 | .ctrlbit = (1 << 5), | 466 | .ctrlbit = (1 << 5), |
502 | .enable = s5pv210_clk_ip0_ctrl, | 467 | .enable = s5pv210_clk_ip0_ctrl, |
503 | .ops = &clk_hclk_imem_ops, | 468 | .ops = &clk_hclk_imem_ops, |
504 | }, { | 469 | }, { |
505 | .name = "uart", | 470 | .name = "uart", |
506 | .id = 0, | 471 | .devname = "s5pv210-uart.0", |
507 | .parent = &clk_pclk_psys.clk, | 472 | .parent = &clk_pclk_psys.clk, |
508 | .enable = s5pv210_clk_ip3_ctrl, | 473 | .enable = s5pv210_clk_ip3_ctrl, |
509 | .ctrlbit = (1 << 17), | 474 | .ctrlbit = (1 << 17), |
510 | }, { | 475 | }, { |
511 | .name = "uart", | 476 | .name = "uart", |
512 | .id = 1, | 477 | .devname = "s5pv210-uart.1", |
513 | .parent = &clk_pclk_psys.clk, | 478 | .parent = &clk_pclk_psys.clk, |
514 | .enable = s5pv210_clk_ip3_ctrl, | 479 | .enable = s5pv210_clk_ip3_ctrl, |
515 | .ctrlbit = (1 << 18), | 480 | .ctrlbit = (1 << 18), |
516 | }, { | 481 | }, { |
517 | .name = "uart", | 482 | .name = "uart", |
518 | .id = 2, | 483 | .devname = "s5pv210-uart.2", |
519 | .parent = &clk_pclk_psys.clk, | 484 | .parent = &clk_pclk_psys.clk, |
520 | .enable = s5pv210_clk_ip3_ctrl, | 485 | .enable = s5pv210_clk_ip3_ctrl, |
521 | .ctrlbit = (1 << 19), | 486 | .ctrlbit = (1 << 19), |
522 | }, { | 487 | }, { |
523 | .name = "uart", | 488 | .name = "uart", |
524 | .id = 3, | 489 | .devname = "s5pv210-uart.3", |
525 | .parent = &clk_pclk_psys.clk, | 490 | .parent = &clk_pclk_psys.clk, |
526 | .enable = s5pv210_clk_ip3_ctrl, | 491 | .enable = s5pv210_clk_ip3_ctrl, |
527 | .ctrlbit = (1 << 20), | 492 | .ctrlbit = (1 << 20), |
528 | }, { | 493 | }, { |
529 | .name = "sromc", | 494 | .name = "sromc", |
530 | .id = -1, | ||
531 | .parent = &clk_hclk_psys.clk, | 495 | .parent = &clk_hclk_psys.clk, |
532 | .enable = s5pv210_clk_ip1_ctrl, | 496 | .enable = s5pv210_clk_ip1_ctrl, |
533 | .ctrlbit = (1 << 26), | 497 | .ctrlbit = (1 << 26), |
@@ -579,7 +543,6 @@ static struct clksrc_sources clkset_sclk_dac = { | |||
579 | static struct clksrc_clk clk_sclk_dac = { | 543 | static struct clksrc_clk clk_sclk_dac = { |
580 | .clk = { | 544 | .clk = { |
581 | .name = "sclk_dac", | 545 | .name = "sclk_dac", |
582 | .id = -1, | ||
583 | .enable = s5pv210_clk_mask0_ctrl, | 546 | .enable = s5pv210_clk_mask0_ctrl, |
584 | .ctrlbit = (1 << 2), | 547 | .ctrlbit = (1 << 2), |
585 | }, | 548 | }, |
@@ -590,7 +553,6 @@ static struct clksrc_clk clk_sclk_dac = { | |||
590 | static struct clksrc_clk clk_sclk_pixel = { | 553 | static struct clksrc_clk clk_sclk_pixel = { |
591 | .clk = { | 554 | .clk = { |
592 | .name = "sclk_pixel", | 555 | .name = "sclk_pixel", |
593 | .id = -1, | ||
594 | .parent = &clk_sclk_vpll.clk, | 556 | .parent = &clk_sclk_vpll.clk, |
595 | }, | 557 | }, |
596 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 0, .size = 4}, | 558 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 0, .size = 4}, |
@@ -609,7 +571,6 @@ static struct clksrc_sources clkset_sclk_hdmi = { | |||
609 | static struct clksrc_clk clk_sclk_hdmi = { | 571 | static struct clksrc_clk clk_sclk_hdmi = { |
610 | .clk = { | 572 | .clk = { |
611 | .name = "sclk_hdmi", | 573 | .name = "sclk_hdmi", |
612 | .id = -1, | ||
613 | .enable = s5pv210_clk_mask0_ctrl, | 574 | .enable = s5pv210_clk_mask0_ctrl, |
614 | .ctrlbit = (1 << 0), | 575 | .ctrlbit = (1 << 0), |
615 | }, | 576 | }, |
@@ -647,7 +608,7 @@ static struct clksrc_sources clkset_sclk_audio0 = { | |||
647 | static struct clksrc_clk clk_sclk_audio0 = { | 608 | static struct clksrc_clk clk_sclk_audio0 = { |
648 | .clk = { | 609 | .clk = { |
649 | .name = "sclk_audio", | 610 | .name = "sclk_audio", |
650 | .id = 0, | 611 | .devname = "soc-audio.0", |
651 | .enable = s5pv210_clk_mask0_ctrl, | 612 | .enable = s5pv210_clk_mask0_ctrl, |
652 | .ctrlbit = (1 << 24), | 613 | .ctrlbit = (1 << 24), |
653 | }, | 614 | }, |
@@ -676,7 +637,7 @@ static struct clksrc_sources clkset_sclk_audio1 = { | |||
676 | static struct clksrc_clk clk_sclk_audio1 = { | 637 | static struct clksrc_clk clk_sclk_audio1 = { |
677 | .clk = { | 638 | .clk = { |
678 | .name = "sclk_audio", | 639 | .name = "sclk_audio", |
679 | .id = 1, | 640 | .devname = "soc-audio.1", |
680 | .enable = s5pv210_clk_mask0_ctrl, | 641 | .enable = s5pv210_clk_mask0_ctrl, |
681 | .ctrlbit = (1 << 25), | 642 | .ctrlbit = (1 << 25), |
682 | }, | 643 | }, |
@@ -705,7 +666,7 @@ static struct clksrc_sources clkset_sclk_audio2 = { | |||
705 | static struct clksrc_clk clk_sclk_audio2 = { | 666 | static struct clksrc_clk clk_sclk_audio2 = { |
706 | .clk = { | 667 | .clk = { |
707 | .name = "sclk_audio", | 668 | .name = "sclk_audio", |
708 | .id = 2, | 669 | .devname = "soc-audio.2", |
709 | .enable = s5pv210_clk_mask0_ctrl, | 670 | .enable = s5pv210_clk_mask0_ctrl, |
710 | .ctrlbit = (1 << 26), | 671 | .ctrlbit = (1 << 26), |
711 | }, | 672 | }, |
@@ -725,48 +686,12 @@ static struct clksrc_sources clkset_sclk_spdif = { | |||
725 | .nr_sources = ARRAY_SIZE(clkset_sclk_spdif_list), | 686 | .nr_sources = ARRAY_SIZE(clkset_sclk_spdif_list), |
726 | }; | 687 | }; |
727 | 688 | ||
728 | static int s5pv210_spdif_set_rate(struct clk *clk, unsigned long rate) | ||
729 | { | ||
730 | struct clk *pclk; | ||
731 | int ret; | ||
732 | |||
733 | pclk = clk_get_parent(clk); | ||
734 | if (IS_ERR(pclk)) | ||
735 | return -EINVAL; | ||
736 | |||
737 | ret = pclk->ops->set_rate(pclk, rate); | ||
738 | clk_put(pclk); | ||
739 | |||
740 | return ret; | ||
741 | } | ||
742 | |||
743 | static unsigned long s5pv210_spdif_get_rate(struct clk *clk) | ||
744 | { | ||
745 | struct clk *pclk; | ||
746 | int rate; | ||
747 | |||
748 | pclk = clk_get_parent(clk); | ||
749 | if (IS_ERR(pclk)) | ||
750 | return -EINVAL; | ||
751 | |||
752 | rate = pclk->ops->get_rate(clk); | ||
753 | clk_put(pclk); | ||
754 | |||
755 | return rate; | ||
756 | } | ||
757 | |||
758 | static struct clk_ops s5pv210_sclk_spdif_ops = { | ||
759 | .set_rate = s5pv210_spdif_set_rate, | ||
760 | .get_rate = s5pv210_spdif_get_rate, | ||
761 | }; | ||
762 | |||
763 | static struct clksrc_clk clk_sclk_spdif = { | 689 | static struct clksrc_clk clk_sclk_spdif = { |
764 | .clk = { | 690 | .clk = { |
765 | .name = "sclk_spdif", | 691 | .name = "sclk_spdif", |
766 | .id = -1, | ||
767 | .enable = s5pv210_clk_mask0_ctrl, | 692 | .enable = s5pv210_clk_mask0_ctrl, |
768 | .ctrlbit = (1 << 27), | 693 | .ctrlbit = (1 << 27), |
769 | .ops = &s5pv210_sclk_spdif_ops, | 694 | .ops = &s5p_sclk_spdif_ops, |
770 | }, | 695 | }, |
771 | .sources = &clkset_sclk_spdif, | 696 | .sources = &clkset_sclk_spdif, |
772 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 12, .size = 2 }, | 697 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 12, .size = 2 }, |
@@ -793,7 +718,6 @@ static struct clksrc_clk clksrcs[] = { | |||
793 | { | 718 | { |
794 | .clk = { | 719 | .clk = { |
795 | .name = "sclk_dmc", | 720 | .name = "sclk_dmc", |
796 | .id = -1, | ||
797 | }, | 721 | }, |
798 | .sources = &clkset_group1, | 722 | .sources = &clkset_group1, |
799 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 24, .size = 2 }, | 723 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 24, .size = 2 }, |
@@ -801,7 +725,6 @@ static struct clksrc_clk clksrcs[] = { | |||
801 | }, { | 725 | }, { |
802 | .clk = { | 726 | .clk = { |
803 | .name = "sclk_onenand", | 727 | .name = "sclk_onenand", |
804 | .id = -1, | ||
805 | }, | 728 | }, |
806 | .sources = &clkset_sclk_onenand, | 729 | .sources = &clkset_sclk_onenand, |
807 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 28, .size = 1 }, | 730 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 28, .size = 1 }, |
@@ -809,7 +732,7 @@ static struct clksrc_clk clksrcs[] = { | |||
809 | }, { | 732 | }, { |
810 | .clk = { | 733 | .clk = { |
811 | .name = "uclk1", | 734 | .name = "uclk1", |
812 | .id = 0, | 735 | .devname = "s5pv210-uart.0", |
813 | .enable = s5pv210_clk_mask0_ctrl, | 736 | .enable = s5pv210_clk_mask0_ctrl, |
814 | .ctrlbit = (1 << 12), | 737 | .ctrlbit = (1 << 12), |
815 | }, | 738 | }, |
@@ -819,7 +742,7 @@ static struct clksrc_clk clksrcs[] = { | |||
819 | }, { | 742 | }, { |
820 | .clk = { | 743 | .clk = { |
821 | .name = "uclk1", | 744 | .name = "uclk1", |
822 | .id = 1, | 745 | .devname = "s5pv210-uart.1", |
823 | .enable = s5pv210_clk_mask0_ctrl, | 746 | .enable = s5pv210_clk_mask0_ctrl, |
824 | .ctrlbit = (1 << 13), | 747 | .ctrlbit = (1 << 13), |
825 | }, | 748 | }, |
@@ -829,7 +752,7 @@ static struct clksrc_clk clksrcs[] = { | |||
829 | }, { | 752 | }, { |
830 | .clk = { | 753 | .clk = { |
831 | .name = "uclk1", | 754 | .name = "uclk1", |
832 | .id = 2, | 755 | .devname = "s5pv210-uart.2", |
833 | .enable = s5pv210_clk_mask0_ctrl, | 756 | .enable = s5pv210_clk_mask0_ctrl, |
834 | .ctrlbit = (1 << 14), | 757 | .ctrlbit = (1 << 14), |
835 | }, | 758 | }, |
@@ -839,7 +762,7 @@ static struct clksrc_clk clksrcs[] = { | |||
839 | }, { | 762 | }, { |
840 | .clk = { | 763 | .clk = { |
841 | .name = "uclk1", | 764 | .name = "uclk1", |
842 | .id = 3, | 765 | .devname = "s5pv210-uart.3", |
843 | .enable = s5pv210_clk_mask0_ctrl, | 766 | .enable = s5pv210_clk_mask0_ctrl, |
844 | .ctrlbit = (1 << 15), | 767 | .ctrlbit = (1 << 15), |
845 | }, | 768 | }, |
@@ -849,7 +772,6 @@ static struct clksrc_clk clksrcs[] = { | |||
849 | }, { | 772 | }, { |
850 | .clk = { | 773 | .clk = { |
851 | .name = "sclk_mixer", | 774 | .name = "sclk_mixer", |
852 | .id = -1, | ||
853 | .enable = s5pv210_clk_mask0_ctrl, | 775 | .enable = s5pv210_clk_mask0_ctrl, |
854 | .ctrlbit = (1 << 1), | 776 | .ctrlbit = (1 << 1), |
855 | }, | 777 | }, |
@@ -858,7 +780,7 @@ static struct clksrc_clk clksrcs[] = { | |||
858 | }, { | 780 | }, { |
859 | .clk = { | 781 | .clk = { |
860 | .name = "sclk_fimc", | 782 | .name = "sclk_fimc", |
861 | .id = 0, | 783 | .devname = "s5pv210-fimc.0", |
862 | .enable = s5pv210_clk_mask1_ctrl, | 784 | .enable = s5pv210_clk_mask1_ctrl, |
863 | .ctrlbit = (1 << 2), | 785 | .ctrlbit = (1 << 2), |
864 | }, | 786 | }, |
@@ -868,7 +790,7 @@ static struct clksrc_clk clksrcs[] = { | |||
868 | }, { | 790 | }, { |
869 | .clk = { | 791 | .clk = { |
870 | .name = "sclk_fimc", | 792 | .name = "sclk_fimc", |
871 | .id = 1, | 793 | .devname = "s5pv210-fimc.1", |
872 | .enable = s5pv210_clk_mask1_ctrl, | 794 | .enable = s5pv210_clk_mask1_ctrl, |
873 | .ctrlbit = (1 << 3), | 795 | .ctrlbit = (1 << 3), |
874 | }, | 796 | }, |
@@ -878,7 +800,7 @@ static struct clksrc_clk clksrcs[] = { | |||
878 | }, { | 800 | }, { |
879 | .clk = { | 801 | .clk = { |
880 | .name = "sclk_fimc", | 802 | .name = "sclk_fimc", |
881 | .id = 2, | 803 | .devname = "s5pv210-fimc.2", |
882 | .enable = s5pv210_clk_mask1_ctrl, | 804 | .enable = s5pv210_clk_mask1_ctrl, |
883 | .ctrlbit = (1 << 4), | 805 | .ctrlbit = (1 << 4), |
884 | }, | 806 | }, |
@@ -888,7 +810,7 @@ static struct clksrc_clk clksrcs[] = { | |||
888 | }, { | 810 | }, { |
889 | .clk = { | 811 | .clk = { |
890 | .name = "sclk_cam", | 812 | .name = "sclk_cam", |
891 | .id = 0, | 813 | .devname = "s5pv210-fimc.0", |
892 | .enable = s5pv210_clk_mask0_ctrl, | 814 | .enable = s5pv210_clk_mask0_ctrl, |
893 | .ctrlbit = (1 << 3), | 815 | .ctrlbit = (1 << 3), |
894 | }, | 816 | }, |
@@ -898,7 +820,7 @@ static struct clksrc_clk clksrcs[] = { | |||
898 | }, { | 820 | }, { |
899 | .clk = { | 821 | .clk = { |
900 | .name = "sclk_cam", | 822 | .name = "sclk_cam", |
901 | .id = 1, | 823 | .devname = "s5pv210-fimc.1", |
902 | .enable = s5pv210_clk_mask0_ctrl, | 824 | .enable = s5pv210_clk_mask0_ctrl, |
903 | .ctrlbit = (1 << 4), | 825 | .ctrlbit = (1 << 4), |
904 | }, | 826 | }, |
@@ -908,7 +830,6 @@ static struct clksrc_clk clksrcs[] = { | |||
908 | }, { | 830 | }, { |
909 | .clk = { | 831 | .clk = { |
910 | .name = "sclk_fimd", | 832 | .name = "sclk_fimd", |
911 | .id = -1, | ||
912 | .enable = s5pv210_clk_mask0_ctrl, | 833 | .enable = s5pv210_clk_mask0_ctrl, |
913 | .ctrlbit = (1 << 5), | 834 | .ctrlbit = (1 << 5), |
914 | }, | 835 | }, |
@@ -918,7 +839,7 @@ static struct clksrc_clk clksrcs[] = { | |||
918 | }, { | 839 | }, { |
919 | .clk = { | 840 | .clk = { |
920 | .name = "sclk_mmc", | 841 | .name = "sclk_mmc", |
921 | .id = 0, | 842 | .devname = "s3c-sdhci.0", |
922 | .enable = s5pv210_clk_mask0_ctrl, | 843 | .enable = s5pv210_clk_mask0_ctrl, |
923 | .ctrlbit = (1 << 8), | 844 | .ctrlbit = (1 << 8), |
924 | }, | 845 | }, |
@@ -928,7 +849,7 @@ static struct clksrc_clk clksrcs[] = { | |||
928 | }, { | 849 | }, { |
929 | .clk = { | 850 | .clk = { |
930 | .name = "sclk_mmc", | 851 | .name = "sclk_mmc", |
931 | .id = 1, | 852 | .devname = "s3c-sdhci.1", |
932 | .enable = s5pv210_clk_mask0_ctrl, | 853 | .enable = s5pv210_clk_mask0_ctrl, |
933 | .ctrlbit = (1 << 9), | 854 | .ctrlbit = (1 << 9), |
934 | }, | 855 | }, |
@@ -938,7 +859,7 @@ static struct clksrc_clk clksrcs[] = { | |||
938 | }, { | 859 | }, { |
939 | .clk = { | 860 | .clk = { |
940 | .name = "sclk_mmc", | 861 | .name = "sclk_mmc", |
941 | .id = 2, | 862 | .devname = "s3c-sdhci.2", |
942 | .enable = s5pv210_clk_mask0_ctrl, | 863 | .enable = s5pv210_clk_mask0_ctrl, |
943 | .ctrlbit = (1 << 10), | 864 | .ctrlbit = (1 << 10), |
944 | }, | 865 | }, |
@@ -948,7 +869,7 @@ static struct clksrc_clk clksrcs[] = { | |||
948 | }, { | 869 | }, { |
949 | .clk = { | 870 | .clk = { |
950 | .name = "sclk_mmc", | 871 | .name = "sclk_mmc", |
951 | .id = 3, | 872 | .devname = "s3c-sdhci.3", |
952 | .enable = s5pv210_clk_mask0_ctrl, | 873 | .enable = s5pv210_clk_mask0_ctrl, |
953 | .ctrlbit = (1 << 11), | 874 | .ctrlbit = (1 << 11), |
954 | }, | 875 | }, |
@@ -958,7 +879,6 @@ static struct clksrc_clk clksrcs[] = { | |||
958 | }, { | 879 | }, { |
959 | .clk = { | 880 | .clk = { |
960 | .name = "sclk_mfc", | 881 | .name = "sclk_mfc", |
961 | .id = -1, | ||
962 | .enable = s5pv210_clk_ip0_ctrl, | 882 | .enable = s5pv210_clk_ip0_ctrl, |
963 | .ctrlbit = (1 << 16), | 883 | .ctrlbit = (1 << 16), |
964 | }, | 884 | }, |
@@ -968,7 +888,6 @@ static struct clksrc_clk clksrcs[] = { | |||
968 | }, { | 888 | }, { |
969 | .clk = { | 889 | .clk = { |
970 | .name = "sclk_g2d", | 890 | .name = "sclk_g2d", |
971 | .id = -1, | ||
972 | .enable = s5pv210_clk_ip0_ctrl, | 891 | .enable = s5pv210_clk_ip0_ctrl, |
973 | .ctrlbit = (1 << 12), | 892 | .ctrlbit = (1 << 12), |
974 | }, | 893 | }, |
@@ -978,7 +897,6 @@ static struct clksrc_clk clksrcs[] = { | |||
978 | }, { | 897 | }, { |
979 | .clk = { | 898 | .clk = { |
980 | .name = "sclk_g3d", | 899 | .name = "sclk_g3d", |
981 | .id = -1, | ||
982 | .enable = s5pv210_clk_ip0_ctrl, | 900 | .enable = s5pv210_clk_ip0_ctrl, |
983 | .ctrlbit = (1 << 8), | 901 | .ctrlbit = (1 << 8), |
984 | }, | 902 | }, |
@@ -988,7 +906,6 @@ static struct clksrc_clk clksrcs[] = { | |||
988 | }, { | 906 | }, { |
989 | .clk = { | 907 | .clk = { |
990 | .name = "sclk_csis", | 908 | .name = "sclk_csis", |
991 | .id = -1, | ||
992 | .enable = s5pv210_clk_mask0_ctrl, | 909 | .enable = s5pv210_clk_mask0_ctrl, |
993 | .ctrlbit = (1 << 6), | 910 | .ctrlbit = (1 << 6), |
994 | }, | 911 | }, |
@@ -998,7 +915,7 @@ static struct clksrc_clk clksrcs[] = { | |||
998 | }, { | 915 | }, { |
999 | .clk = { | 916 | .clk = { |
1000 | .name = "sclk_spi", | 917 | .name = "sclk_spi", |
1001 | .id = 0, | 918 | .devname = "s3c64xx-spi.0", |
1002 | .enable = s5pv210_clk_mask0_ctrl, | 919 | .enable = s5pv210_clk_mask0_ctrl, |
1003 | .ctrlbit = (1 << 16), | 920 | .ctrlbit = (1 << 16), |
1004 | }, | 921 | }, |
@@ -1008,7 +925,7 @@ static struct clksrc_clk clksrcs[] = { | |||
1008 | }, { | 925 | }, { |
1009 | .clk = { | 926 | .clk = { |
1010 | .name = "sclk_spi", | 927 | .name = "sclk_spi", |
1011 | .id = 1, | 928 | .devname = "s3c64xx-spi.1", |
1012 | .enable = s5pv210_clk_mask0_ctrl, | 929 | .enable = s5pv210_clk_mask0_ctrl, |
1013 | .ctrlbit = (1 << 17), | 930 | .ctrlbit = (1 << 17), |
1014 | }, | 931 | }, |
@@ -1018,7 +935,6 @@ static struct clksrc_clk clksrcs[] = { | |||
1018 | }, { | 935 | }, { |
1019 | .clk = { | 936 | .clk = { |
1020 | .name = "sclk_pwi", | 937 | .name = "sclk_pwi", |
1021 | .id = -1, | ||
1022 | .enable = s5pv210_clk_mask0_ctrl, | 938 | .enable = s5pv210_clk_mask0_ctrl, |
1023 | .ctrlbit = (1 << 29), | 939 | .ctrlbit = (1 << 29), |
1024 | }, | 940 | }, |
@@ -1028,7 +944,6 @@ static struct clksrc_clk clksrcs[] = { | |||
1028 | }, { | 944 | }, { |
1029 | .clk = { | 945 | .clk = { |
1030 | .name = "sclk_pwm", | 946 | .name = "sclk_pwm", |
1031 | .id = -1, | ||
1032 | .enable = s5pv210_clk_mask0_ctrl, | 947 | .enable = s5pv210_clk_mask0_ctrl, |
1033 | .ctrlbit = (1 << 19), | 948 | .ctrlbit = (1 << 19), |
1034 | }, | 949 | }, |
diff --git a/arch/arm/mach-s5pv210/include/mach/clkdev.h b/arch/arm/mach-s5pv210/include/mach/clkdev.h new file mode 100644 index 000000000000..7dffa83d23ff --- /dev/null +++ b/arch/arm/mach-s5pv210/include/mach/clkdev.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __MACH_CLKDEV_H__ | ||
2 | #define __MACH_CLKDEV_H__ | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do {} while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/regs-fb.h b/arch/arm/mach-s5pv210/include/mach/regs-fb.h deleted file mode 100644 index 60d992989bdc..000000000000 --- a/arch/arm/mach-s5pv210/include/mach/regs-fb.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Ben Dooks <ben-linux@fluff.org> | ||
3 | * | ||
4 | * Dummy framebuffer to allow build for the moment. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_MACH_REGS_FB_H | ||
12 | #define __ASM_ARCH_MACH_REGS_FB_H __FILE__ | ||
13 | |||
14 | #include <plat/regs-fb-v4.h> | ||
15 | |||
16 | static inline unsigned int s3c_fb_pal_reg(unsigned int window, int reg) | ||
17 | { | ||
18 | return 0x2400 + (window * 256 *4 ) + reg; | ||
19 | } | ||
20 | |||
21 | #endif /* __ASM_ARCH_MACH_REGS_FB_H */ | ||
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c index 4e1d8ff5ae59..509627f25111 100644 --- a/arch/arm/mach-s5pv210/mach-aquila.c +++ b/arch/arm/mach-s5pv210/mach-aquila.c | |||
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | #include <mach/map.h> | 30 | #include <mach/map.h> |
31 | #include <mach/regs-clock.h> | 31 | #include <mach/regs-clock.h> |
32 | #include <mach/regs-fb.h> | ||
33 | 32 | ||
34 | #include <plat/gpio-cfg.h> | 33 | #include <plat/gpio-cfg.h> |
35 | #include <plat/regs-serial.h> | 34 | #include <plat/regs-serial.h> |
@@ -40,6 +39,7 @@ | |||
40 | #include <plat/fimc-core.h> | 39 | #include <plat/fimc-core.h> |
41 | #include <plat/sdhci.h> | 40 | #include <plat/sdhci.h> |
42 | #include <plat/s5p-time.h> | 41 | #include <plat/s5p-time.h> |
42 | #include <plat/regs-fb-v4.h> | ||
43 | 43 | ||
44 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 44 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
45 | #define AQUILA_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 45 | #define AQUILA_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index 31d5aa769753..e0c4d06b9db6 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c | |||
@@ -34,7 +34,6 @@ | |||
34 | 34 | ||
35 | #include <mach/map.h> | 35 | #include <mach/map.h> |
36 | #include <mach/regs-clock.h> | 36 | #include <mach/regs-clock.h> |
37 | #include <mach/regs-fb.h> | ||
38 | 37 | ||
39 | #include <plat/gpio-cfg.h> | 38 | #include <plat/gpio-cfg.h> |
40 | #include <plat/regs-serial.h> | 39 | #include <plat/regs-serial.h> |
@@ -47,6 +46,7 @@ | |||
47 | #include <plat/sdhci.h> | 46 | #include <plat/sdhci.h> |
48 | #include <plat/clock.h> | 47 | #include <plat/clock.h> |
49 | #include <plat/s5p-time.h> | 48 | #include <plat/s5p-time.h> |
49 | #include <plat/regs-fb-v4.h> | ||
50 | 50 | ||
51 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 51 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
52 | #define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 52 | #define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index c6a9e86c2d5c..ef20f922249d 100644 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c | |||
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | #include <mach/map.h> | 30 | #include <mach/map.h> |
31 | #include <mach/regs-clock.h> | 31 | #include <mach/regs-clock.h> |
32 | #include <mach/regs-fb.h> | ||
33 | 32 | ||
34 | #include <plat/regs-serial.h> | 33 | #include <plat/regs-serial.h> |
35 | #include <plat/regs-srom.h> | 34 | #include <plat/regs-srom.h> |
@@ -45,6 +44,8 @@ | |||
45 | #include <plat/pm.h> | 44 | #include <plat/pm.h> |
46 | #include <plat/fb.h> | 45 | #include <plat/fb.h> |
47 | #include <plat/s5p-time.h> | 46 | #include <plat/s5p-time.h> |
47 | #include <plat/backlight.h> | ||
48 | #include <plat/regs-fb-v4.h> | ||
48 | 49 | ||
49 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 50 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
50 | #define SMDKV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 51 | #define SMDKV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
@@ -210,45 +211,6 @@ static struct s3c_fb_platdata smdkv210_lcd0_pdata __initdata = { | |||
210 | .setup_gpio = s5pv210_fb_gpio_setup_24bpp, | 211 | .setup_gpio = s5pv210_fb_gpio_setup_24bpp, |
211 | }; | 212 | }; |
212 | 213 | ||
213 | static int smdkv210_backlight_init(struct device *dev) | ||
214 | { | ||
215 | int ret; | ||
216 | |||
217 | ret = gpio_request(S5PV210_GPD0(3), "Backlight"); | ||
218 | if (ret) { | ||
219 | printk(KERN_ERR "failed to request GPD for PWM-OUT 3\n"); | ||
220 | return ret; | ||
221 | } | ||
222 | |||
223 | /* Configure GPIO pin with S5PV210_GPD_0_3_TOUT_3 */ | ||
224 | s3c_gpio_cfgpin(S5PV210_GPD0(3), S3C_GPIO_SFN(2)); | ||
225 | |||
226 | return 0; | ||
227 | } | ||
228 | |||
229 | static void smdkv210_backlight_exit(struct device *dev) | ||
230 | { | ||
231 | s3c_gpio_cfgpin(S5PV210_GPD0(3), S3C_GPIO_OUTPUT); | ||
232 | gpio_free(S5PV210_GPD0(3)); | ||
233 | } | ||
234 | |||
235 | static struct platform_pwm_backlight_data smdkv210_backlight_data = { | ||
236 | .pwm_id = 3, | ||
237 | .max_brightness = 255, | ||
238 | .dft_brightness = 255, | ||
239 | .pwm_period_ns = 78770, | ||
240 | .init = smdkv210_backlight_init, | ||
241 | .exit = smdkv210_backlight_exit, | ||
242 | }; | ||
243 | |||
244 | static struct platform_device smdkv210_backlight_device = { | ||
245 | .name = "pwm-backlight", | ||
246 | .dev = { | ||
247 | .parent = &s3c_device_timer[3].dev, | ||
248 | .platform_data = &smdkv210_backlight_data, | ||
249 | }, | ||
250 | }; | ||
251 | |||
252 | static struct platform_device *smdkv210_devices[] __initdata = { | 214 | static struct platform_device *smdkv210_devices[] __initdata = { |
253 | &s3c_device_adc, | 215 | &s3c_device_adc, |
254 | &s3c_device_cfcon, | 216 | &s3c_device_cfcon, |
@@ -270,8 +232,6 @@ static struct platform_device *smdkv210_devices[] __initdata = { | |||
270 | &samsung_device_keypad, | 232 | &samsung_device_keypad, |
271 | &smdkv210_dm9000, | 233 | &smdkv210_dm9000, |
272 | &smdkv210_lcd_lte480wv, | 234 | &smdkv210_lcd_lte480wv, |
273 | &s3c_device_timer[3], | ||
274 | &smdkv210_backlight_device, | ||
275 | }; | 235 | }; |
276 | 236 | ||
277 | static void __init smdkv210_dm9000_init(void) | 237 | static void __init smdkv210_dm9000_init(void) |
@@ -310,6 +270,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { | |||
310 | .oversampling_shift = 2, | 270 | .oversampling_shift = 2, |
311 | }; | 271 | }; |
312 | 272 | ||
273 | /* LCD Backlight data */ | ||
274 | static struct samsung_bl_gpio_info smdkv210_bl_gpio_info = { | ||
275 | .no = S5PV210_GPD0(3), | ||
276 | .func = S3C_GPIO_SFN(2), | ||
277 | }; | ||
278 | |||
279 | static struct platform_pwm_backlight_data smdkv210_bl_data = { | ||
280 | .pwm_id = 3, | ||
281 | }; | ||
282 | |||
313 | static void __init smdkv210_map_io(void) | 283 | static void __init smdkv210_map_io(void) |
314 | { | 284 | { |
315 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | 285 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); |
@@ -341,6 +311,8 @@ static void __init smdkv210_machine_init(void) | |||
341 | 311 | ||
342 | s3c_fb_set_platdata(&smdkv210_lcd0_pdata); | 312 | s3c_fb_set_platdata(&smdkv210_lcd0_pdata); |
343 | 313 | ||
314 | samsung_bl_set(&smdkv210_bl_gpio_info, &smdkv210_bl_data); | ||
315 | |||
344 | platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices)); | 316 | platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices)); |
345 | } | 317 | } |
346 | 318 | ||
diff --git a/arch/arm/mach-s5pv210/setup-fb-24bpp.c b/arch/arm/mach-s5pv210/setup-fb-24bpp.c index e932ebfac56d..55103c8220b3 100644 --- a/arch/arm/mach-s5pv210/setup-fb-24bpp.c +++ b/arch/arm/mach-s5pv210/setup-fb-24bpp.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/fb.h> | 15 | #include <linux/fb.h> |
16 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
17 | 17 | ||
18 | #include <mach/regs-fb.h> | ||
19 | #include <mach/map.h> | 18 | #include <mach/map.h> |
20 | #include <plat/fb.h> | 19 | #include <plat/fb.h> |
21 | #include <mach/regs-clock.h> | 20 | #include <mach/regs-clock.h> |
diff --git a/arch/arm/plat-mxc/avic.c b/arch/arm/plat-mxc/avic.c index 09e2bd0fcdca..55d2534ec727 100644 --- a/arch/arm/plat-mxc/avic.c +++ b/arch/arm/plat-mxc/avic.c | |||
@@ -46,6 +46,8 @@ | |||
46 | #define AVIC_FIPNDH 0x60 /* fast int pending high */ | 46 | #define AVIC_FIPNDH 0x60 /* fast int pending high */ |
47 | #define AVIC_FIPNDL 0x64 /* fast int pending low */ | 47 | #define AVIC_FIPNDL 0x64 /* fast int pending low */ |
48 | 48 | ||
49 | #define AVIC_NUM_IRQS 64 | ||
50 | |||
49 | void __iomem *avic_base; | 51 | void __iomem *avic_base; |
50 | 52 | ||
51 | #ifdef CONFIG_MXC_IRQ_PRIOR | 53 | #ifdef CONFIG_MXC_IRQ_PRIOR |
@@ -54,7 +56,7 @@ static int avic_irq_set_priority(unsigned char irq, unsigned char prio) | |||
54 | unsigned int temp; | 56 | unsigned int temp; |
55 | unsigned int mask = 0x0F << irq % 8 * 4; | 57 | unsigned int mask = 0x0F << irq % 8 * 4; |
56 | 58 | ||
57 | if (irq >= MXC_INTERNAL_IRQS) | 59 | if (irq >= AVIC_NUM_IRQS) |
58 | return -EINVAL;; | 60 | return -EINVAL;; |
59 | 61 | ||
60 | temp = __raw_readl(avic_base + AVIC_NIPRIORITY(irq / 8)); | 62 | temp = __raw_readl(avic_base + AVIC_NIPRIORITY(irq / 8)); |
@@ -72,14 +74,14 @@ static int avic_set_irq_fiq(unsigned int irq, unsigned int type) | |||
72 | { | 74 | { |
73 | unsigned int irqt; | 75 | unsigned int irqt; |
74 | 76 | ||
75 | if (irq >= MXC_INTERNAL_IRQS) | 77 | if (irq >= AVIC_NUM_IRQS) |
76 | return -EINVAL; | 78 | return -EINVAL; |
77 | 79 | ||
78 | if (irq < MXC_INTERNAL_IRQS / 2) { | 80 | if (irq < AVIC_NUM_IRQS / 2) { |
79 | irqt = __raw_readl(avic_base + AVIC_INTTYPEL) & ~(1 << irq); | 81 | irqt = __raw_readl(avic_base + AVIC_INTTYPEL) & ~(1 << irq); |
80 | __raw_writel(irqt | (!!type << irq), avic_base + AVIC_INTTYPEL); | 82 | __raw_writel(irqt | (!!type << irq), avic_base + AVIC_INTTYPEL); |
81 | } else { | 83 | } else { |
82 | irq -= MXC_INTERNAL_IRQS / 2; | 84 | irq -= AVIC_NUM_IRQS / 2; |
83 | irqt = __raw_readl(avic_base + AVIC_INTTYPEH) & ~(1 << irq); | 85 | irqt = __raw_readl(avic_base + AVIC_INTTYPEH) & ~(1 << irq); |
84 | __raw_writel(irqt | (!!type << irq), avic_base + AVIC_INTTYPEH); | 86 | __raw_writel(irqt | (!!type << irq), avic_base + AVIC_INTTYPEH); |
85 | } | 87 | } |
@@ -138,7 +140,7 @@ void __init mxc_init_irq(void __iomem *irqbase) | |||
138 | /* all IRQ no FIQ */ | 140 | /* all IRQ no FIQ */ |
139 | __raw_writel(0, avic_base + AVIC_INTTYPEH); | 141 | __raw_writel(0, avic_base + AVIC_INTTYPEH); |
140 | __raw_writel(0, avic_base + AVIC_INTTYPEL); | 142 | __raw_writel(0, avic_base + AVIC_INTTYPEL); |
141 | for (i = 0; i < MXC_INTERNAL_IRQS; i++) { | 143 | for (i = 0; i < AVIC_NUM_IRQS; i++) { |
142 | irq_set_chip_and_handler(i, &mxc_avic_chip.base, | 144 | irq_set_chip_and_handler(i, &mxc_avic_chip.base, |
143 | handle_level_irq); | 145 | handle_level_irq); |
144 | set_irq_flags(i, IRQF_VALID); | 146 | set_irq_flags(i, IRQF_VALID); |
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S index 8e8d175e5077..91fc7cdb5dc9 100644 --- a/arch/arm/plat-mxc/include/mach/debug-macro.S +++ b/arch/arm/plat-mxc/include/mach/debug-macro.S | |||
@@ -12,32 +12,32 @@ | |||
12 | */ | 12 | */ |
13 | #include <mach/hardware.h> | 13 | #include <mach/hardware.h> |
14 | 14 | ||
15 | #ifdef CONFIG_ARCH_MX1 | 15 | #ifdef CONFIG_SOC_IMX1 |
16 | #define UART_PADDR MX1_UART1_BASE_ADDR | 16 | #define UART_PADDR MX1_UART1_BASE_ADDR |
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | #ifdef CONFIG_ARCH_MX25 | 19 | #ifdef CONFIG_SOC_IMX25 |
20 | #ifdef UART_PADDR | 20 | #ifdef UART_PADDR |
21 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | 21 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" |
22 | #endif | 22 | #endif |
23 | #define UART_PADDR MX25_UART1_BASE_ADDR | 23 | #define UART_PADDR MX25_UART1_BASE_ADDR |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #ifdef CONFIG_ARCH_MX2 | 26 | #if defined(CONFIG_SOC_IMX21) || defined (CONFIG_SOC_IMX27) |
27 | #ifdef UART_PADDR | 27 | #ifdef UART_PADDR |
28 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | 28 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" |
29 | #endif | 29 | #endif |
30 | #define UART_PADDR MX2x_UART1_BASE_ADDR | 30 | #define UART_PADDR MX2x_UART1_BASE_ADDR |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | #ifdef CONFIG_ARCH_MX3 | 33 | #if defined(CONFIG_SOC_IMX31) || defined(CONFIG_SOC_IMX35) |
34 | #ifdef UART_PADDR | 34 | #ifdef UART_PADDR |
35 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | 35 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" |
36 | #endif | 36 | #endif |
37 | #define UART_PADDR MX3x_UART1_BASE_ADDR | 37 | #define UART_PADDR MX3x_UART1_BASE_ADDR |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #ifdef CONFIG_ARCH_MX5 | 40 | #ifdef CONFIG_SOC_IMX51 |
41 | #ifdef UART_PADDR | 41 | #ifdef UART_PADDR |
42 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | 42 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" |
43 | #endif | 43 | #endif |
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h index 67d3e2bed065..a8bfd565dcad 100644 --- a/arch/arm/plat-mxc/include/mach/hardware.h +++ b/arch/arm/plat-mxc/include/mach/hardware.h | |||
@@ -97,35 +97,17 @@ | |||
97 | 97 | ||
98 | #include <mach/mxc.h> | 98 | #include <mach/mxc.h> |
99 | 99 | ||
100 | #ifdef CONFIG_ARCH_MX5 | ||
101 | #include <mach/mx50.h> | 100 | #include <mach/mx50.h> |
102 | #include <mach/mx51.h> | 101 | #include <mach/mx51.h> |
103 | #include <mach/mx53.h> | 102 | #include <mach/mx53.h> |
104 | #endif | ||
105 | |||
106 | #ifdef CONFIG_ARCH_MX3 | ||
107 | #include <mach/mx3x.h> | 103 | #include <mach/mx3x.h> |
108 | #include <mach/mx31.h> | 104 | #include <mach/mx31.h> |
109 | #include <mach/mx35.h> | 105 | #include <mach/mx35.h> |
110 | #endif | 106 | #include <mach/mx2x.h> |
111 | 107 | #include <mach/mx21.h> | |
112 | #ifdef CONFIG_ARCH_MX2 | 108 | #include <mach/mx27.h> |
113 | # include <mach/mx2x.h> | 109 | #include <mach/mx1.h> |
114 | # ifdef CONFIG_MACH_MX21 | 110 | #include <mach/mx25.h> |
115 | # include <mach/mx21.h> | ||
116 | # endif | ||
117 | # ifdef CONFIG_MACH_MX27 | ||
118 | # include <mach/mx27.h> | ||
119 | # endif | ||
120 | #endif | ||
121 | |||
122 | #ifdef CONFIG_ARCH_MX1 | ||
123 | # include <mach/mx1.h> | ||
124 | #endif | ||
125 | |||
126 | #ifdef CONFIG_ARCH_MX25 | ||
127 | # include <mach/mx25.h> | ||
128 | #endif | ||
129 | 111 | ||
130 | #define imx_map_entry(soc, name, _type) { \ | 112 | #define imx_map_entry(soc, name, _type) { \ |
131 | .virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR), \ | 113 | .virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR), \ |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-v1.h b/arch/arm/plat-mxc/include/mach/iomux-v1.h index 253d64d686f8..6fa8a707b9a0 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-v1.h +++ b/arch/arm/plat-mxc/include/mach/iomux-v1.h | |||
@@ -85,9 +85,6 @@ | |||
85 | #define GPIO_BOUT_0 (2 << GPIO_BOUT_SHIFT) | 85 | #define GPIO_BOUT_0 (2 << GPIO_BOUT_SHIFT) |
86 | #define GPIO_BOUT_1 (3 << GPIO_BOUT_SHIFT) | 86 | #define GPIO_BOUT_1 (3 << GPIO_BOUT_SHIFT) |
87 | 87 | ||
88 | /* decode irq number to use with IMR(x), ISR(x) and friends */ | ||
89 | #define IRQ_TO_REG(irq) ((irq - MXC_INTERNAL_IRQS) >> 5) | ||
90 | |||
91 | #define IRQ_GPIOA(x) (MXC_GPIO_IRQ_START + x) | 88 | #define IRQ_GPIOA(x) (MXC_GPIO_IRQ_START + x) |
92 | #define IRQ_GPIOB(x) (IRQ_GPIOA(32) + x) | 89 | #define IRQ_GPIOB(x) (IRQ_GPIOA(32) + x) |
93 | #define IRQ_GPIOC(x) (IRQ_GPIOB(32) + x) | 90 | #define IRQ_GPIOC(x) (IRQ_GPIOB(32) + x) |
diff --git a/arch/arm/plat-mxc/include/mach/iomux.h b/arch/arm/plat-mxc/include/mach/iomux.h deleted file mode 100644 index 3d226d7e7be2..000000000000 --- a/arch/arm/plat-mxc/include/mach/iomux.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Uwe Kleine-Koenig, Pengutronix | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License version 2 as published by | ||
6 | * the Free Software Foundation. | ||
7 | */ | ||
8 | #ifndef __MACH_IOMUX_H__ | ||
9 | #define __MACH_IOMUX_H__ | ||
10 | |||
11 | /* This file will go away, please include mach/iomux-mx... directly */ | ||
12 | |||
13 | #ifdef CONFIG_ARCH_MX1 | ||
14 | #include <mach/iomux-mx1.h> | ||
15 | #endif | ||
16 | #ifdef CONFIG_ARCH_MX2 | ||
17 | #include <mach/iomux-mx2x.h> | ||
18 | #ifdef CONFIG_MACH_MX21 | ||
19 | #include <mach/iomux-mx21.h> | ||
20 | #endif | ||
21 | #ifdef CONFIG_MACH_MX27 | ||
22 | #include <mach/iomux-mx27.h> | ||
23 | #endif | ||
24 | #endif | ||
25 | |||
26 | #endif /* __MACH_IOMUX_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h index 4ac53ce97c24..09879235a9f5 100644 --- a/arch/arm/plat-mxc/include/mach/mxc.h +++ b/arch/arm/plat-mxc/include/mach/mxc.h | |||
@@ -68,7 +68,7 @@ | |||
68 | extern unsigned int __mxc_cpu_type; | 68 | extern unsigned int __mxc_cpu_type; |
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | #ifdef CONFIG_ARCH_MX1 | 71 | #ifdef CONFIG_SOC_IMX1 |
72 | # ifdef mxc_cpu_type | 72 | # ifdef mxc_cpu_type |
73 | # undef mxc_cpu_type | 73 | # undef mxc_cpu_type |
74 | # define mxc_cpu_type __mxc_cpu_type | 74 | # define mxc_cpu_type __mxc_cpu_type |
@@ -80,7 +80,7 @@ extern unsigned int __mxc_cpu_type; | |||
80 | # define cpu_is_mx1() (0) | 80 | # define cpu_is_mx1() (0) |
81 | #endif | 81 | #endif |
82 | 82 | ||
83 | #ifdef CONFIG_MACH_MX21 | 83 | #ifdef CONFIG_SOC_IMX21 |
84 | # ifdef mxc_cpu_type | 84 | # ifdef mxc_cpu_type |
85 | # undef mxc_cpu_type | 85 | # undef mxc_cpu_type |
86 | # define mxc_cpu_type __mxc_cpu_type | 86 | # define mxc_cpu_type __mxc_cpu_type |
@@ -92,7 +92,7 @@ extern unsigned int __mxc_cpu_type; | |||
92 | # define cpu_is_mx21() (0) | 92 | # define cpu_is_mx21() (0) |
93 | #endif | 93 | #endif |
94 | 94 | ||
95 | #ifdef CONFIG_ARCH_MX25 | 95 | #ifdef CONFIG_SOC_IMX25 |
96 | # ifdef mxc_cpu_type | 96 | # ifdef mxc_cpu_type |
97 | # undef mxc_cpu_type | 97 | # undef mxc_cpu_type |
98 | # define mxc_cpu_type __mxc_cpu_type | 98 | # define mxc_cpu_type __mxc_cpu_type |
@@ -104,7 +104,7 @@ extern unsigned int __mxc_cpu_type; | |||
104 | # define cpu_is_mx25() (0) | 104 | # define cpu_is_mx25() (0) |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | #ifdef CONFIG_MACH_MX27 | 107 | #ifdef CONFIG_SOC_IMX27 |
108 | # ifdef mxc_cpu_type | 108 | # ifdef mxc_cpu_type |
109 | # undef mxc_cpu_type | 109 | # undef mxc_cpu_type |
110 | # define mxc_cpu_type __mxc_cpu_type | 110 | # define mxc_cpu_type __mxc_cpu_type |
diff --git a/arch/arm/plat-mxc/include/mach/timex.h b/arch/arm/plat-mxc/include/mach/timex.h index d61d5c74817c..10343d1f87e1 100644 --- a/arch/arm/plat-mxc/include/mach/timex.h +++ b/arch/arm/plat-mxc/include/mach/timex.h | |||
@@ -16,16 +16,7 @@ | |||
16 | #ifndef __ASM_ARCH_MXC_TIMEX_H__ | 16 | #ifndef __ASM_ARCH_MXC_TIMEX_H__ |
17 | #define __ASM_ARCH_MXC_TIMEX_H__ | 17 | #define __ASM_ARCH_MXC_TIMEX_H__ |
18 | 18 | ||
19 | #if defined CONFIG_ARCH_MX1 | 19 | /* Bogus value */ |
20 | #define CLOCK_TICK_RATE 16000000 | 20 | #define CLOCK_TICK_RATE 12345678 |
21 | #elif defined CONFIG_ARCH_MX2 | ||
22 | #define CLOCK_TICK_RATE 13300000 | ||
23 | #elif defined CONFIG_ARCH_MX3 | ||
24 | #define CLOCK_TICK_RATE 16625000 | ||
25 | #elif defined CONFIG_ARCH_MX25 | ||
26 | #define CLOCK_TICK_RATE 16000000 | ||
27 | #elif defined CONFIG_ARCH_MX5 | ||
28 | #define CLOCK_TICK_RATE 8000000 | ||
29 | #endif | ||
30 | 21 | ||
31 | #endif /* __ASM_ARCH_MXC_TIMEX_H__ */ | 22 | #endif /* __ASM_ARCH_MXC_TIMEX_H__ */ |
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c index 7a61ef8f471a..761c3c940a68 100644 --- a/arch/arm/plat-mxc/pwm.c +++ b/arch/arm/plat-mxc/pwm.c | |||
@@ -214,14 +214,14 @@ static int __devinit mxc_pwm_probe(struct platform_device *pdev) | |||
214 | goto err_free_clk; | 214 | goto err_free_clk; |
215 | } | 215 | } |
216 | 216 | ||
217 | r = request_mem_region(r->start, r->end - r->start + 1, pdev->name); | 217 | r = request_mem_region(r->start, resource_size(r), pdev->name); |
218 | if (r == NULL) { | 218 | if (r == NULL) { |
219 | dev_err(&pdev->dev, "failed to request memory resource\n"); | 219 | dev_err(&pdev->dev, "failed to request memory resource\n"); |
220 | ret = -EBUSY; | 220 | ret = -EBUSY; |
221 | goto err_free_clk; | 221 | goto err_free_clk; |
222 | } | 222 | } |
223 | 223 | ||
224 | pwm->mmio_base = ioremap(r->start, r->end - r->start + 1); | 224 | pwm->mmio_base = ioremap(r->start, resource_size(r)); |
225 | if (pwm->mmio_base == NULL) { | 225 | if (pwm->mmio_base == NULL) { |
226 | dev_err(&pdev->dev, "failed to ioremap() registers\n"); | 226 | dev_err(&pdev->dev, "failed to ioremap() registers\n"); |
227 | ret = -ENODEV; | 227 | ret = -ENODEV; |
@@ -236,7 +236,7 @@ static int __devinit mxc_pwm_probe(struct platform_device *pdev) | |||
236 | return 0; | 236 | return 0; |
237 | 237 | ||
238 | err_free_mem: | 238 | err_free_mem: |
239 | release_mem_region(r->start, r->end - r->start + 1); | 239 | release_mem_region(r->start, resource_size(r)); |
240 | err_free_clk: | 240 | err_free_clk: |
241 | clk_put(pwm->clk); | 241 | clk_put(pwm->clk); |
242 | err_free: | 242 | err_free: |
@@ -260,7 +260,7 @@ static int __devexit mxc_pwm_remove(struct platform_device *pdev) | |||
260 | iounmap(pwm->mmio_base); | 260 | iounmap(pwm->mmio_base); |
261 | 261 | ||
262 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 262 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
263 | release_mem_region(r->start, r->end - r->start + 1); | 263 | release_mem_region(r->start, resource_size(r)); |
264 | 264 | ||
265 | clk_put(pwm->clk); | 265 | clk_put(pwm->clk); |
266 | 266 | ||
diff --git a/arch/arm/plat-mxc/tzic.c b/arch/arm/plat-mxc/tzic.c index 57f9395f87ce..710f2e7da4ce 100644 --- a/arch/arm/plat-mxc/tzic.c +++ b/arch/arm/plat-mxc/tzic.c | |||
@@ -49,6 +49,8 @@ | |||
49 | 49 | ||
50 | void __iomem *tzic_base; /* Used as irq controller base in entry-macro.S */ | 50 | void __iomem *tzic_base; /* Used as irq controller base in entry-macro.S */ |
51 | 51 | ||
52 | #define TZIC_NUM_IRQS 128 | ||
53 | |||
52 | #ifdef CONFIG_FIQ | 54 | #ifdef CONFIG_FIQ |
53 | static int tzic_set_irq_fiq(unsigned int irq, unsigned int type) | 55 | static int tzic_set_irq_fiq(unsigned int irq, unsigned int type) |
54 | { | 56 | { |
@@ -166,7 +168,7 @@ void __init tzic_init_irq(void __iomem *irqbase) | |||
166 | 168 | ||
167 | /* all IRQ no FIQ Warning :: No selection */ | 169 | /* all IRQ no FIQ Warning :: No selection */ |
168 | 170 | ||
169 | for (i = 0; i < MXC_INTERNAL_IRQS; i++) { | 171 | for (i = 0; i < TZIC_NUM_IRQS; i++) { |
170 | irq_set_chip_and_handler(i, &mxc_tzic_chip.base, | 172 | irq_set_chip_and_handler(i, &mxc_tzic_chip.base, |
171 | handle_level_irq); | 173 | handle_level_irq); |
172 | set_irq_flags(i, IRQF_VALID); | 174 | set_irq_flags(i, IRQF_VALID); |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index 49a4c75243fc..6e6735f04ee3 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -211,9 +211,6 @@ choice | |||
211 | depends on ARCH_OMAP | 211 | depends on ARCH_OMAP |
212 | default OMAP_PM_NOOP | 212 | default OMAP_PM_NOOP |
213 | 213 | ||
214 | config OMAP_PM_NONE | ||
215 | bool "No PM layer" | ||
216 | |||
217 | config OMAP_PM_NOOP | 214 | config OMAP_PM_NOOP |
218 | bool "No-op/debug PM layer" | 215 | bool "No-op/debug PM layer" |
219 | 216 | ||
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c index f7fed6080190..a6cbb712da51 100644 --- a/arch/arm/plat-omap/counter_32k.c +++ b/arch/arm/plat-omap/counter_32k.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/err.h> | 18 | #include <linux/err.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/clocksource.h> | ||
21 | 22 | ||
22 | #include <asm/sched_clock.h> | 23 | #include <asm/sched_clock.h> |
23 | 24 | ||
@@ -26,87 +27,16 @@ | |||
26 | 27 | ||
27 | #include <plat/clock.h> | 28 | #include <plat/clock.h> |
28 | 29 | ||
29 | |||
30 | /* | 30 | /* |
31 | * 32KHz clocksource ... always available, on pretty most chips except | 31 | * 32KHz clocksource ... always available, on pretty most chips except |
32 | * OMAP 730 and 1510. Other timers could be used as clocksources, with | 32 | * OMAP 730 and 1510. Other timers could be used as clocksources, with |
33 | * higher resolution in free-running counter modes (e.g. 12 MHz xtal), | 33 | * higher resolution in free-running counter modes (e.g. 12 MHz xtal), |
34 | * but systems won't necessarily want to spend resources that way. | 34 | * but systems won't necessarily want to spend resources that way. |
35 | */ | 35 | */ |
36 | static void __iomem *timer_32k_base; | ||
36 | 37 | ||
37 | #define OMAP16XX_TIMER_32K_SYNCHRONIZED 0xfffbc410 | 38 | #define OMAP16XX_TIMER_32K_SYNCHRONIZED 0xfffbc410 |
38 | 39 | ||
39 | #include <linux/clocksource.h> | ||
40 | |||
41 | /* | ||
42 | * offset_32k holds the init time counter value. It is then subtracted | ||
43 | * from every counter read to achieve a counter that counts time from the | ||
44 | * kernel boot (needed for sched_clock()). | ||
45 | */ | ||
46 | static u32 offset_32k __read_mostly; | ||
47 | |||
48 | #ifdef CONFIG_ARCH_OMAP16XX | ||
49 | static cycle_t notrace omap16xx_32k_read(struct clocksource *cs) | ||
50 | { | ||
51 | return omap_readl(OMAP16XX_TIMER_32K_SYNCHRONIZED) - offset_32k; | ||
52 | } | ||
53 | #else | ||
54 | #define omap16xx_32k_read NULL | ||
55 | #endif | ||
56 | |||
57 | #ifdef CONFIG_SOC_OMAP2420 | ||
58 | static cycle_t notrace omap2420_32k_read(struct clocksource *cs) | ||
59 | { | ||
60 | return omap_readl(OMAP2420_32KSYNCT_BASE + 0x10) - offset_32k; | ||
61 | } | ||
62 | #else | ||
63 | #define omap2420_32k_read NULL | ||
64 | #endif | ||
65 | |||
66 | #ifdef CONFIG_SOC_OMAP2430 | ||
67 | static cycle_t notrace omap2430_32k_read(struct clocksource *cs) | ||
68 | { | ||
69 | return omap_readl(OMAP2430_32KSYNCT_BASE + 0x10) - offset_32k; | ||
70 | } | ||
71 | #else | ||
72 | #define omap2430_32k_read NULL | ||
73 | #endif | ||
74 | |||
75 | #ifdef CONFIG_ARCH_OMAP3 | ||
76 | static cycle_t notrace omap34xx_32k_read(struct clocksource *cs) | ||
77 | { | ||
78 | return omap_readl(OMAP3430_32KSYNCT_BASE + 0x10) - offset_32k; | ||
79 | } | ||
80 | #else | ||
81 | #define omap34xx_32k_read NULL | ||
82 | #endif | ||
83 | |||
84 | #ifdef CONFIG_ARCH_OMAP4 | ||
85 | static cycle_t notrace omap44xx_32k_read(struct clocksource *cs) | ||
86 | { | ||
87 | return omap_readl(OMAP4430_32KSYNCT_BASE + 0x10) - offset_32k; | ||
88 | } | ||
89 | #else | ||
90 | #define omap44xx_32k_read NULL | ||
91 | #endif | ||
92 | |||
93 | /* | ||
94 | * Kernel assumes that sched_clock can be called early but may not have | ||
95 | * things ready yet. | ||
96 | */ | ||
97 | static cycle_t notrace omap_32k_read_dummy(struct clocksource *cs) | ||
98 | { | ||
99 | return 0; | ||
100 | } | ||
101 | |||
102 | static struct clocksource clocksource_32k = { | ||
103 | .name = "32k_counter", | ||
104 | .rating = 250, | ||
105 | .read = omap_32k_read_dummy, | ||
106 | .mask = CLOCKSOURCE_MASK(32), | ||
107 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
108 | }; | ||
109 | |||
110 | /* | 40 | /* |
111 | * Returns current time from boot in nsecs. It's OK for this to wrap | 41 | * Returns current time from boot in nsecs. It's OK for this to wrap |
112 | * around for now, as it's just a relative time stamp. | 42 | * around for now, as it's just a relative time stamp. |
@@ -122,11 +52,11 @@ static DEFINE_CLOCK_DATA(cd); | |||
122 | 52 | ||
123 | static inline unsigned long long notrace _omap_32k_sched_clock(void) | 53 | static inline unsigned long long notrace _omap_32k_sched_clock(void) |
124 | { | 54 | { |
125 | u32 cyc = clocksource_32k.read(&clocksource_32k); | 55 | u32 cyc = timer_32k_base ? __raw_readl(timer_32k_base) : 0; |
126 | return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, SC_MULT, SC_SHIFT); | 56 | return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, SC_MULT, SC_SHIFT); |
127 | } | 57 | } |
128 | 58 | ||
129 | #ifndef CONFIG_OMAP_MPU_TIMER | 59 | #if defined(CONFIG_OMAP_32K_TIMER) && !defined(CONFIG_OMAP_MPU_TIMER) |
130 | unsigned long long notrace sched_clock(void) | 60 | unsigned long long notrace sched_clock(void) |
131 | { | 61 | { |
132 | return _omap_32k_sched_clock(); | 62 | return _omap_32k_sched_clock(); |
@@ -140,7 +70,7 @@ unsigned long long notrace omap_32k_sched_clock(void) | |||
140 | 70 | ||
141 | static void notrace omap_update_sched_clock(void) | 71 | static void notrace omap_update_sched_clock(void) |
142 | { | 72 | { |
143 | u32 cyc = clocksource_32k.read(&clocksource_32k); | 73 | u32 cyc = timer_32k_base ? __raw_readl(timer_32k_base) : 0; |
144 | update_sched_clock(&cd, cyc, (u32)~0); | 74 | update_sched_clock(&cd, cyc, (u32)~0); |
145 | } | 75 | } |
146 | 76 | ||
@@ -153,6 +83,7 @@ static void notrace omap_update_sched_clock(void) | |||
153 | */ | 83 | */ |
154 | static struct timespec persistent_ts; | 84 | static struct timespec persistent_ts; |
155 | static cycles_t cycles, last_cycles; | 85 | static cycles_t cycles, last_cycles; |
86 | static unsigned int persistent_mult, persistent_shift; | ||
156 | void read_persistent_clock(struct timespec *ts) | 87 | void read_persistent_clock(struct timespec *ts) |
157 | { | 88 | { |
158 | unsigned long long nsecs; | 89 | unsigned long long nsecs; |
@@ -160,11 +91,10 @@ void read_persistent_clock(struct timespec *ts) | |||
160 | struct timespec *tsp = &persistent_ts; | 91 | struct timespec *tsp = &persistent_ts; |
161 | 92 | ||
162 | last_cycles = cycles; | 93 | last_cycles = cycles; |
163 | cycles = clocksource_32k.read(&clocksource_32k); | 94 | cycles = timer_32k_base ? __raw_readl(timer_32k_base) : 0; |
164 | delta = cycles - last_cycles; | 95 | delta = cycles - last_cycles; |
165 | 96 | ||
166 | nsecs = clocksource_cyc2ns(delta, | 97 | nsecs = clocksource_cyc2ns(delta, persistent_mult, persistent_shift); |
167 | clocksource_32k.mult, clocksource_32k.shift); | ||
168 | 98 | ||
169 | timespec_add_ns(tsp, nsecs); | 99 | timespec_add_ns(tsp, nsecs); |
170 | *ts = *tsp; | 100 | *ts = *tsp; |
@@ -176,29 +106,46 @@ int __init omap_init_clocksource_32k(void) | |||
176 | "%s: can't register clocksource!\n"; | 106 | "%s: can't register clocksource!\n"; |
177 | 107 | ||
178 | if (cpu_is_omap16xx() || cpu_class_is_omap2()) { | 108 | if (cpu_is_omap16xx() || cpu_class_is_omap2()) { |
109 | u32 pbase; | ||
110 | unsigned long size = SZ_4K; | ||
111 | void __iomem *base; | ||
179 | struct clk *sync_32k_ick; | 112 | struct clk *sync_32k_ick; |
180 | 113 | ||
181 | if (cpu_is_omap16xx()) | 114 | if (cpu_is_omap16xx()) { |
182 | clocksource_32k.read = omap16xx_32k_read; | 115 | pbase = OMAP16XX_TIMER_32K_SYNCHRONIZED; |
183 | else if (cpu_is_omap2420()) | 116 | size = SZ_1K; |
184 | clocksource_32k.read = omap2420_32k_read; | 117 | } else if (cpu_is_omap2420()) |
118 | pbase = OMAP2420_32KSYNCT_BASE + 0x10; | ||
185 | else if (cpu_is_omap2430()) | 119 | else if (cpu_is_omap2430()) |
186 | clocksource_32k.read = omap2430_32k_read; | 120 | pbase = OMAP2430_32KSYNCT_BASE + 0x10; |
187 | else if (cpu_is_omap34xx()) | 121 | else if (cpu_is_omap34xx()) |
188 | clocksource_32k.read = omap34xx_32k_read; | 122 | pbase = OMAP3430_32KSYNCT_BASE + 0x10; |
189 | else if (cpu_is_omap44xx()) | 123 | else if (cpu_is_omap44xx()) |
190 | clocksource_32k.read = omap44xx_32k_read; | 124 | pbase = OMAP4430_32KSYNCT_BASE + 0x10; |
191 | else | 125 | else |
192 | return -ENODEV; | 126 | return -ENODEV; |
193 | 127 | ||
128 | /* For this to work we must have a static mapping in io.c for this area */ | ||
129 | base = ioremap(pbase, size); | ||
130 | if (!base) | ||
131 | return -ENODEV; | ||
132 | |||
194 | sync_32k_ick = clk_get(NULL, "omap_32ksync_ick"); | 133 | sync_32k_ick = clk_get(NULL, "omap_32ksync_ick"); |
195 | if (!IS_ERR(sync_32k_ick)) | 134 | if (!IS_ERR(sync_32k_ick)) |
196 | clk_enable(sync_32k_ick); | 135 | clk_enable(sync_32k_ick); |
197 | 136 | ||
198 | offset_32k = clocksource_32k.read(&clocksource_32k); | 137 | timer_32k_base = base; |
138 | |||
139 | /* | ||
140 | * 120000 rough estimate from the calculations in | ||
141 | * __clocksource_updatefreq_scale. | ||
142 | */ | ||
143 | clocks_calc_mult_shift(&persistent_mult, &persistent_shift, | ||
144 | 32768, NSEC_PER_SEC, 120000); | ||
199 | 145 | ||
200 | if (clocksource_register_hz(&clocksource_32k, 32768)) | 146 | if (clocksource_mmio_init(base, "32k_counter", 32768, 250, 32, |
201 | printk(err, clocksource_32k.name); | 147 | clocksource_mmio_readl_up)) |
148 | printk(err, "32k_counter"); | ||
202 | 149 | ||
203 | init_fixed_sched_clock(&cd, omap_update_sched_clock, 32, | 150 | init_fixed_sched_clock(&cd, omap_update_sched_clock, 32, |
204 | 32768, SC_MULT, SC_SHIFT); | 151 | 32768, SC_MULT, SC_SHIFT); |
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index ee9f6ebba29b..8dfb8186b2c2 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -41,127 +41,6 @@ | |||
41 | #include <plat/dmtimer.h> | 41 | #include <plat/dmtimer.h> |
42 | #include <mach/irqs.h> | 42 | #include <mach/irqs.h> |
43 | 43 | ||
44 | /* register offsets */ | ||
45 | #define _OMAP_TIMER_ID_OFFSET 0x00 | ||
46 | #define _OMAP_TIMER_OCP_CFG_OFFSET 0x10 | ||
47 | #define _OMAP_TIMER_SYS_STAT_OFFSET 0x14 | ||
48 | #define _OMAP_TIMER_STAT_OFFSET 0x18 | ||
49 | #define _OMAP_TIMER_INT_EN_OFFSET 0x1c | ||
50 | #define _OMAP_TIMER_WAKEUP_EN_OFFSET 0x20 | ||
51 | #define _OMAP_TIMER_CTRL_OFFSET 0x24 | ||
52 | #define OMAP_TIMER_CTRL_GPOCFG (1 << 14) | ||
53 | #define OMAP_TIMER_CTRL_CAPTMODE (1 << 13) | ||
54 | #define OMAP_TIMER_CTRL_PT (1 << 12) | ||
55 | #define OMAP_TIMER_CTRL_TCM_LOWTOHIGH (0x1 << 8) | ||
56 | #define OMAP_TIMER_CTRL_TCM_HIGHTOLOW (0x2 << 8) | ||
57 | #define OMAP_TIMER_CTRL_TCM_BOTHEDGES (0x3 << 8) | ||
58 | #define OMAP_TIMER_CTRL_SCPWM (1 << 7) | ||
59 | #define OMAP_TIMER_CTRL_CE (1 << 6) /* compare enable */ | ||
60 | #define OMAP_TIMER_CTRL_PRE (1 << 5) /* prescaler enable */ | ||
61 | #define OMAP_TIMER_CTRL_PTV_SHIFT 2 /* prescaler value shift */ | ||
62 | #define OMAP_TIMER_CTRL_POSTED (1 << 2) | ||
63 | #define OMAP_TIMER_CTRL_AR (1 << 1) /* auto-reload enable */ | ||
64 | #define OMAP_TIMER_CTRL_ST (1 << 0) /* start timer */ | ||
65 | #define _OMAP_TIMER_COUNTER_OFFSET 0x28 | ||
66 | #define _OMAP_TIMER_LOAD_OFFSET 0x2c | ||
67 | #define _OMAP_TIMER_TRIGGER_OFFSET 0x30 | ||
68 | #define _OMAP_TIMER_WRITE_PEND_OFFSET 0x34 | ||
69 | #define WP_NONE 0 /* no write pending bit */ | ||
70 | #define WP_TCLR (1 << 0) | ||
71 | #define WP_TCRR (1 << 1) | ||
72 | #define WP_TLDR (1 << 2) | ||
73 | #define WP_TTGR (1 << 3) | ||
74 | #define WP_TMAR (1 << 4) | ||
75 | #define WP_TPIR (1 << 5) | ||
76 | #define WP_TNIR (1 << 6) | ||
77 | #define WP_TCVR (1 << 7) | ||
78 | #define WP_TOCR (1 << 8) | ||
79 | #define WP_TOWR (1 << 9) | ||
80 | #define _OMAP_TIMER_MATCH_OFFSET 0x38 | ||
81 | #define _OMAP_TIMER_CAPTURE_OFFSET 0x3c | ||
82 | #define _OMAP_TIMER_IF_CTRL_OFFSET 0x40 | ||
83 | #define _OMAP_TIMER_CAPTURE2_OFFSET 0x44 /* TCAR2, 34xx only */ | ||
84 | #define _OMAP_TIMER_TICK_POS_OFFSET 0x48 /* TPIR, 34xx only */ | ||
85 | #define _OMAP_TIMER_TICK_NEG_OFFSET 0x4c /* TNIR, 34xx only */ | ||
86 | #define _OMAP_TIMER_TICK_COUNT_OFFSET 0x50 /* TCVR, 34xx only */ | ||
87 | #define _OMAP_TIMER_TICK_INT_MASK_SET_OFFSET 0x54 /* TOCR, 34xx only */ | ||
88 | #define _OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET 0x58 /* TOWR, 34xx only */ | ||
89 | |||
90 | /* register offsets with the write pending bit encoded */ | ||
91 | #define WPSHIFT 16 | ||
92 | |||
93 | #define OMAP_TIMER_ID_REG (_OMAP_TIMER_ID_OFFSET \ | ||
94 | | (WP_NONE << WPSHIFT)) | ||
95 | |||
96 | #define OMAP_TIMER_OCP_CFG_REG (_OMAP_TIMER_OCP_CFG_OFFSET \ | ||
97 | | (WP_NONE << WPSHIFT)) | ||
98 | |||
99 | #define OMAP_TIMER_SYS_STAT_REG (_OMAP_TIMER_SYS_STAT_OFFSET \ | ||
100 | | (WP_NONE << WPSHIFT)) | ||
101 | |||
102 | #define OMAP_TIMER_STAT_REG (_OMAP_TIMER_STAT_OFFSET \ | ||
103 | | (WP_NONE << WPSHIFT)) | ||
104 | |||
105 | #define OMAP_TIMER_INT_EN_REG (_OMAP_TIMER_INT_EN_OFFSET \ | ||
106 | | (WP_NONE << WPSHIFT)) | ||
107 | |||
108 | #define OMAP_TIMER_WAKEUP_EN_REG (_OMAP_TIMER_WAKEUP_EN_OFFSET \ | ||
109 | | (WP_NONE << WPSHIFT)) | ||
110 | |||
111 | #define OMAP_TIMER_CTRL_REG (_OMAP_TIMER_CTRL_OFFSET \ | ||
112 | | (WP_TCLR << WPSHIFT)) | ||
113 | |||
114 | #define OMAP_TIMER_COUNTER_REG (_OMAP_TIMER_COUNTER_OFFSET \ | ||
115 | | (WP_TCRR << WPSHIFT)) | ||
116 | |||
117 | #define OMAP_TIMER_LOAD_REG (_OMAP_TIMER_LOAD_OFFSET \ | ||
118 | | (WP_TLDR << WPSHIFT)) | ||
119 | |||
120 | #define OMAP_TIMER_TRIGGER_REG (_OMAP_TIMER_TRIGGER_OFFSET \ | ||
121 | | (WP_TTGR << WPSHIFT)) | ||
122 | |||
123 | #define OMAP_TIMER_WRITE_PEND_REG (_OMAP_TIMER_WRITE_PEND_OFFSET \ | ||
124 | | (WP_NONE << WPSHIFT)) | ||
125 | |||
126 | #define OMAP_TIMER_MATCH_REG (_OMAP_TIMER_MATCH_OFFSET \ | ||
127 | | (WP_TMAR << WPSHIFT)) | ||
128 | |||
129 | #define OMAP_TIMER_CAPTURE_REG (_OMAP_TIMER_CAPTURE_OFFSET \ | ||
130 | | (WP_NONE << WPSHIFT)) | ||
131 | |||
132 | #define OMAP_TIMER_IF_CTRL_REG (_OMAP_TIMER_IF_CTRL_OFFSET \ | ||
133 | | (WP_NONE << WPSHIFT)) | ||
134 | |||
135 | #define OMAP_TIMER_CAPTURE2_REG (_OMAP_TIMER_CAPTURE2_OFFSET \ | ||
136 | | (WP_NONE << WPSHIFT)) | ||
137 | |||
138 | #define OMAP_TIMER_TICK_POS_REG (_OMAP_TIMER_TICK_POS_OFFSET \ | ||
139 | | (WP_TPIR << WPSHIFT)) | ||
140 | |||
141 | #define OMAP_TIMER_TICK_NEG_REG (_OMAP_TIMER_TICK_NEG_OFFSET \ | ||
142 | | (WP_TNIR << WPSHIFT)) | ||
143 | |||
144 | #define OMAP_TIMER_TICK_COUNT_REG (_OMAP_TIMER_TICK_COUNT_OFFSET \ | ||
145 | | (WP_TCVR << WPSHIFT)) | ||
146 | |||
147 | #define OMAP_TIMER_TICK_INT_MASK_SET_REG \ | ||
148 | (_OMAP_TIMER_TICK_INT_MASK_SET_OFFSET | (WP_TOCR << WPSHIFT)) | ||
149 | |||
150 | #define OMAP_TIMER_TICK_INT_MASK_COUNT_REG \ | ||
151 | (_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR << WPSHIFT)) | ||
152 | |||
153 | struct omap_dm_timer { | ||
154 | unsigned long phys_base; | ||
155 | int irq; | ||
156 | #ifdef CONFIG_ARCH_OMAP2PLUS | ||
157 | struct clk *iclk, *fclk; | ||
158 | #endif | ||
159 | void __iomem *io_base; | ||
160 | unsigned reserved:1; | ||
161 | unsigned enabled:1; | ||
162 | unsigned posted:1; | ||
163 | }; | ||
164 | |||
165 | static int dm_timer_count; | 44 | static int dm_timer_count; |
166 | 45 | ||
167 | #ifdef CONFIG_ARCH_OMAP1 | 46 | #ifdef CONFIG_ARCH_OMAP1 |
@@ -291,11 +170,7 @@ static spinlock_t dm_timer_lock; | |||
291 | */ | 170 | */ |
292 | static inline u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, u32 reg) | 171 | static inline u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, u32 reg) |
293 | { | 172 | { |
294 | if (timer->posted) | 173 | return __omap_dm_timer_read(timer->io_base, reg, timer->posted); |
295 | while (readl(timer->io_base + (OMAP_TIMER_WRITE_PEND_REG & 0xff)) | ||
296 | & (reg >> WPSHIFT)) | ||
297 | cpu_relax(); | ||
298 | return readl(timer->io_base + (reg & 0xff)); | ||
299 | } | 174 | } |
300 | 175 | ||
301 | /* | 176 | /* |
@@ -307,11 +182,7 @@ static inline u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, u32 reg) | |||
307 | static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg, | 182 | static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg, |
308 | u32 value) | 183 | u32 value) |
309 | { | 184 | { |
310 | if (timer->posted) | 185 | __omap_dm_timer_write(timer->io_base, reg, value, timer->posted); |
311 | while (readl(timer->io_base + (OMAP_TIMER_WRITE_PEND_REG & 0xff)) | ||
312 | & (reg >> WPSHIFT)) | ||
313 | cpu_relax(); | ||
314 | writel(value, timer->io_base + (reg & 0xff)); | ||
315 | } | 186 | } |
316 | 187 | ||
317 | static void omap_dm_timer_wait_for_reset(struct omap_dm_timer *timer) | 188 | static void omap_dm_timer_wait_for_reset(struct omap_dm_timer *timer) |
@@ -330,7 +201,7 @@ static void omap_dm_timer_wait_for_reset(struct omap_dm_timer *timer) | |||
330 | 201 | ||
331 | static void omap_dm_timer_reset(struct omap_dm_timer *timer) | 202 | static void omap_dm_timer_reset(struct omap_dm_timer *timer) |
332 | { | 203 | { |
333 | u32 l; | 204 | int autoidle = 0, wakeup = 0; |
334 | 205 | ||
335 | if (!cpu_class_is_omap2() || timer != &dm_timers[0]) { | 206 | if (!cpu_class_is_omap2() || timer != &dm_timers[0]) { |
336 | omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06); | 207 | omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06); |
@@ -338,28 +209,21 @@ static void omap_dm_timer_reset(struct omap_dm_timer *timer) | |||
338 | } | 209 | } |
339 | omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ); | 210 | omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ); |
340 | 211 | ||
341 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_OCP_CFG_REG); | ||
342 | l |= 0x02 << 3; /* Set to smart-idle mode */ | ||
343 | l |= 0x2 << 8; /* Set clock activity to perserve f-clock on idle */ | ||
344 | |||
345 | /* Enable autoidle on OMAP2 / OMAP3 */ | 212 | /* Enable autoidle on OMAP2 / OMAP3 */ |
346 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) | 213 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) |
347 | l |= 0x1 << 0; | 214 | autoidle = 1; |
348 | 215 | ||
349 | /* | 216 | /* |
350 | * Enable wake-up on OMAP2 CPUs. | 217 | * Enable wake-up on OMAP2 CPUs. |
351 | */ | 218 | */ |
352 | if (cpu_class_is_omap2()) | 219 | if (cpu_class_is_omap2()) |
353 | l |= 1 << 2; | 220 | wakeup = 1; |
354 | omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, l); | ||
355 | 221 | ||
356 | /* Match hardware reset default of posted mode */ | 222 | __omap_dm_timer_reset(timer->io_base, autoidle, wakeup); |
357 | omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, | ||
358 | OMAP_TIMER_CTRL_POSTED); | ||
359 | timer->posted = 1; | 223 | timer->posted = 1; |
360 | } | 224 | } |
361 | 225 | ||
362 | static void omap_dm_timer_prepare(struct omap_dm_timer *timer) | 226 | void omap_dm_timer_prepare(struct omap_dm_timer *timer) |
363 | { | 227 | { |
364 | omap_dm_timer_enable(timer); | 228 | omap_dm_timer_enable(timer); |
365 | omap_dm_timer_reset(timer); | 229 | omap_dm_timer_reset(timer); |
@@ -531,25 +395,13 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_start); | |||
531 | 395 | ||
532 | void omap_dm_timer_stop(struct omap_dm_timer *timer) | 396 | void omap_dm_timer_stop(struct omap_dm_timer *timer) |
533 | { | 397 | { |
534 | u32 l; | 398 | unsigned long rate = 0; |
535 | 399 | ||
536 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); | ||
537 | if (l & OMAP_TIMER_CTRL_ST) { | ||
538 | l &= ~0x1; | ||
539 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | ||
540 | #ifdef CONFIG_ARCH_OMAP2PLUS | 400 | #ifdef CONFIG_ARCH_OMAP2PLUS |
541 | /* Readback to make sure write has completed */ | 401 | rate = clk_get_rate(timer->fclk); |
542 | omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); | ||
543 | /* | ||
544 | * Wait for functional clock period x 3.5 to make sure that | ||
545 | * timer is stopped | ||
546 | */ | ||
547 | udelay(3500000 / clk_get_rate(timer->fclk) + 1); | ||
548 | #endif | 402 | #endif |
549 | } | 403 | |
550 | /* Ack possibly pending interrupt */ | 404 | __omap_dm_timer_stop(timer->io_base, timer->posted, rate); |
551 | omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, | ||
552 | OMAP_TIMER_INT_OVERFLOW); | ||
553 | } | 405 | } |
554 | EXPORT_SYMBOL_GPL(omap_dm_timer_stop); | 406 | EXPORT_SYMBOL_GPL(omap_dm_timer_stop); |
555 | 407 | ||
@@ -572,22 +424,11 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_set_source); | |||
572 | 424 | ||
573 | int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) | 425 | int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) |
574 | { | 426 | { |
575 | int ret = -EINVAL; | ||
576 | |||
577 | if (source < 0 || source >= 3) | 427 | if (source < 0 || source >= 3) |
578 | return -EINVAL; | 428 | return -EINVAL; |
579 | 429 | ||
580 | clk_disable(timer->fclk); | 430 | return __omap_dm_timer_set_source(timer->fclk, |
581 | ret = clk_set_parent(timer->fclk, dm_source_clocks[source]); | 431 | dm_source_clocks[source]); |
582 | clk_enable(timer->fclk); | ||
583 | |||
584 | /* | ||
585 | * When the functional clock disappears, too quick writes seem | ||
586 | * to cause an abort. XXX Is this still necessary? | ||
587 | */ | ||
588 | __delay(300000); | ||
589 | |||
590 | return ret; | ||
591 | } | 432 | } |
592 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_source); | 433 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_source); |
593 | 434 | ||
@@ -625,8 +466,7 @@ void omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload, | |||
625 | } | 466 | } |
626 | l |= OMAP_TIMER_CTRL_ST; | 467 | l |= OMAP_TIMER_CTRL_ST; |
627 | 468 | ||
628 | omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, load); | 469 | __omap_dm_timer_load_start(timer->io_base, l, load, timer->posted); |
629 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | ||
630 | } | 470 | } |
631 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_load_start); | 471 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_load_start); |
632 | 472 | ||
@@ -679,8 +519,7 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_set_prescaler); | |||
679 | void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, | 519 | void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, |
680 | unsigned int value) | 520 | unsigned int value) |
681 | { | 521 | { |
682 | omap_dm_timer_write_reg(timer, OMAP_TIMER_INT_EN_REG, value); | 522 | __omap_dm_timer_int_enable(timer->io_base, value); |
683 | omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, value); | ||
684 | } | 523 | } |
685 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_enable); | 524 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_enable); |
686 | 525 | ||
@@ -696,17 +535,13 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_read_status); | |||
696 | 535 | ||
697 | void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value) | 536 | void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value) |
698 | { | 537 | { |
699 | omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, value); | 538 | __omap_dm_timer_write_status(timer->io_base, value); |
700 | } | 539 | } |
701 | EXPORT_SYMBOL_GPL(omap_dm_timer_write_status); | 540 | EXPORT_SYMBOL_GPL(omap_dm_timer_write_status); |
702 | 541 | ||
703 | unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer) | 542 | unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer) |
704 | { | 543 | { |
705 | unsigned int l; | 544 | return __omap_dm_timer_read_counter(timer->io_base, timer->posted); |
706 | |||
707 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_COUNTER_REG); | ||
708 | |||
709 | return l; | ||
710 | } | 545 | } |
711 | EXPORT_SYMBOL_GPL(omap_dm_timer_read_counter); | 546 | EXPORT_SYMBOL_GPL(omap_dm_timer_read_counter); |
712 | 547 | ||
@@ -737,7 +572,7 @@ int omap_dm_timers_active(void) | |||
737 | } | 572 | } |
738 | EXPORT_SYMBOL_GPL(omap_dm_timers_active); | 573 | EXPORT_SYMBOL_GPL(omap_dm_timers_active); |
739 | 574 | ||
740 | int __init omap_dm_timer_init(void) | 575 | static int __init omap_dm_timer_init(void) |
741 | { | 576 | { |
742 | struct omap_dm_timer *timer; | 577 | struct omap_dm_timer *timer; |
743 | int i, map_size = SZ_8K; /* Module 4KB + L4 4KB except on omap1 */ | 578 | int i, map_size = SZ_8K; /* Module 4KB + L4 4KB except on omap1 */ |
@@ -790,8 +625,16 @@ int __init omap_dm_timer_init(void) | |||
790 | sprintf(clk_name, "gpt%d_fck", i + 1); | 625 | sprintf(clk_name, "gpt%d_fck", i + 1); |
791 | timer->fclk = clk_get(NULL, clk_name); | 626 | timer->fclk = clk_get(NULL, clk_name); |
792 | } | 627 | } |
628 | |||
629 | /* One or two timers may be set up early for sys_timer */ | ||
630 | if (sys_timer_reserved & (1 << i)) { | ||
631 | timer->reserved = 1; | ||
632 | timer->posted = 1; | ||
633 | } | ||
793 | #endif | 634 | #endif |
794 | } | 635 | } |
795 | 636 | ||
796 | return 0; | 637 | return 0; |
797 | } | 638 | } |
639 | |||
640 | arch_initcall(omap_dm_timer_init); | ||
diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h index 006e599c6613..f57e0649ab30 100644 --- a/arch/arm/plat-omap/include/plat/clock.h +++ b/arch/arm/plat-omap/include/plat/clock.h | |||
@@ -152,7 +152,7 @@ struct dpll_data { | |||
152 | u16 max_multiplier; | 152 | u16 max_multiplier; |
153 | u8 last_rounded_n; | 153 | u8 last_rounded_n; |
154 | u8 min_divider; | 154 | u8 min_divider; |
155 | u8 max_divider; | 155 | u16 max_divider; |
156 | u8 modes; | 156 | u8 modes; |
157 | #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) | 157 | #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) |
158 | void __iomem *autoidle_reg; | 158 | void __iomem *autoidle_reg; |
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h index 5288130be96e..4564cc697d7f 100644 --- a/arch/arm/plat-omap/include/plat/common.h +++ b/arch/arm/plat-omap/include/plat/common.h | |||
@@ -34,7 +34,11 @@ | |||
34 | struct sys_timer; | 34 | struct sys_timer; |
35 | 35 | ||
36 | extern void omap_map_common_io(void); | 36 | extern void omap_map_common_io(void); |
37 | extern struct sys_timer omap_timer; | 37 | extern struct sys_timer omap1_timer; |
38 | extern struct sys_timer omap2_timer; | ||
39 | extern struct sys_timer omap3_timer; | ||
40 | extern struct sys_timer omap3_secure_timer; | ||
41 | extern struct sys_timer omap4_timer; | ||
38 | extern bool omap_32k_timer_init(void); | 42 | extern bool omap_32k_timer_init(void); |
39 | extern int __init omap_init_clocksource_32k(void); | 43 | extern int __init omap_init_clocksource_32k(void); |
40 | extern unsigned long long notrace omap_32k_sched_clock(void); | 44 | extern unsigned long long notrace omap_32k_sched_clock(void); |
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h index d6c70d2f4030..eb5d16c60cd9 100644 --- a/arch/arm/plat-omap/include/plat/dmtimer.h +++ b/arch/arm/plat-omap/include/plat/dmtimer.h | |||
@@ -32,6 +32,10 @@ | |||
32 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 32 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/clk.h> | ||
36 | #include <linux/delay.h> | ||
37 | #include <linux/io.h> | ||
38 | |||
35 | #ifndef __ASM_ARCH_DMTIMER_H | 39 | #ifndef __ASM_ARCH_DMTIMER_H |
36 | #define __ASM_ARCH_DMTIMER_H | 40 | #define __ASM_ARCH_DMTIMER_H |
37 | 41 | ||
@@ -56,12 +60,8 @@ | |||
56 | */ | 60 | */ |
57 | #define OMAP_TIMER_IP_VERSION_1 0x1 | 61 | #define OMAP_TIMER_IP_VERSION_1 0x1 |
58 | struct omap_dm_timer; | 62 | struct omap_dm_timer; |
59 | extern struct omap_dm_timer *gptimer_wakeup; | ||
60 | extern struct sys_timer omap_timer; | ||
61 | struct clk; | 63 | struct clk; |
62 | 64 | ||
63 | int omap_dm_timer_init(void); | ||
64 | |||
65 | struct omap_dm_timer *omap_dm_timer_request(void); | 65 | struct omap_dm_timer *omap_dm_timer_request(void); |
66 | struct omap_dm_timer *omap_dm_timer_request_specific(int timer_id); | 66 | struct omap_dm_timer *omap_dm_timer_request_specific(int timer_id); |
67 | void omap_dm_timer_free(struct omap_dm_timer *timer); | 67 | void omap_dm_timer_free(struct omap_dm_timer *timer); |
@@ -93,5 +93,248 @@ void omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value | |||
93 | 93 | ||
94 | int omap_dm_timers_active(void); | 94 | int omap_dm_timers_active(void); |
95 | 95 | ||
96 | /* | ||
97 | * Do not use the defines below, they are not needed. They should be only | ||
98 | * used by dmtimer.c and sys_timer related code. | ||
99 | */ | ||
100 | |||
101 | /* register offsets */ | ||
102 | #define _OMAP_TIMER_ID_OFFSET 0x00 | ||
103 | #define _OMAP_TIMER_OCP_CFG_OFFSET 0x10 | ||
104 | #define _OMAP_TIMER_SYS_STAT_OFFSET 0x14 | ||
105 | #define _OMAP_TIMER_STAT_OFFSET 0x18 | ||
106 | #define _OMAP_TIMER_INT_EN_OFFSET 0x1c | ||
107 | #define _OMAP_TIMER_WAKEUP_EN_OFFSET 0x20 | ||
108 | #define _OMAP_TIMER_CTRL_OFFSET 0x24 | ||
109 | #define OMAP_TIMER_CTRL_GPOCFG (1 << 14) | ||
110 | #define OMAP_TIMER_CTRL_CAPTMODE (1 << 13) | ||
111 | #define OMAP_TIMER_CTRL_PT (1 << 12) | ||
112 | #define OMAP_TIMER_CTRL_TCM_LOWTOHIGH (0x1 << 8) | ||
113 | #define OMAP_TIMER_CTRL_TCM_HIGHTOLOW (0x2 << 8) | ||
114 | #define OMAP_TIMER_CTRL_TCM_BOTHEDGES (0x3 << 8) | ||
115 | #define OMAP_TIMER_CTRL_SCPWM (1 << 7) | ||
116 | #define OMAP_TIMER_CTRL_CE (1 << 6) /* compare enable */ | ||
117 | #define OMAP_TIMER_CTRL_PRE (1 << 5) /* prescaler enable */ | ||
118 | #define OMAP_TIMER_CTRL_PTV_SHIFT 2 /* prescaler value shift */ | ||
119 | #define OMAP_TIMER_CTRL_POSTED (1 << 2) | ||
120 | #define OMAP_TIMER_CTRL_AR (1 << 1) /* auto-reload enable */ | ||
121 | #define OMAP_TIMER_CTRL_ST (1 << 0) /* start timer */ | ||
122 | #define _OMAP_TIMER_COUNTER_OFFSET 0x28 | ||
123 | #define _OMAP_TIMER_LOAD_OFFSET 0x2c | ||
124 | #define _OMAP_TIMER_TRIGGER_OFFSET 0x30 | ||
125 | #define _OMAP_TIMER_WRITE_PEND_OFFSET 0x34 | ||
126 | #define WP_NONE 0 /* no write pending bit */ | ||
127 | #define WP_TCLR (1 << 0) | ||
128 | #define WP_TCRR (1 << 1) | ||
129 | #define WP_TLDR (1 << 2) | ||
130 | #define WP_TTGR (1 << 3) | ||
131 | #define WP_TMAR (1 << 4) | ||
132 | #define WP_TPIR (1 << 5) | ||
133 | #define WP_TNIR (1 << 6) | ||
134 | #define WP_TCVR (1 << 7) | ||
135 | #define WP_TOCR (1 << 8) | ||
136 | #define WP_TOWR (1 << 9) | ||
137 | #define _OMAP_TIMER_MATCH_OFFSET 0x38 | ||
138 | #define _OMAP_TIMER_CAPTURE_OFFSET 0x3c | ||
139 | #define _OMAP_TIMER_IF_CTRL_OFFSET 0x40 | ||
140 | #define _OMAP_TIMER_CAPTURE2_OFFSET 0x44 /* TCAR2, 34xx only */ | ||
141 | #define _OMAP_TIMER_TICK_POS_OFFSET 0x48 /* TPIR, 34xx only */ | ||
142 | #define _OMAP_TIMER_TICK_NEG_OFFSET 0x4c /* TNIR, 34xx only */ | ||
143 | #define _OMAP_TIMER_TICK_COUNT_OFFSET 0x50 /* TCVR, 34xx only */ | ||
144 | #define _OMAP_TIMER_TICK_INT_MASK_SET_OFFSET 0x54 /* TOCR, 34xx only */ | ||
145 | #define _OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET 0x58 /* TOWR, 34xx only */ | ||
146 | |||
147 | /* register offsets with the write pending bit encoded */ | ||
148 | #define WPSHIFT 16 | ||
149 | |||
150 | #define OMAP_TIMER_ID_REG (_OMAP_TIMER_ID_OFFSET \ | ||
151 | | (WP_NONE << WPSHIFT)) | ||
152 | |||
153 | #define OMAP_TIMER_OCP_CFG_REG (_OMAP_TIMER_OCP_CFG_OFFSET \ | ||
154 | | (WP_NONE << WPSHIFT)) | ||
155 | |||
156 | #define OMAP_TIMER_SYS_STAT_REG (_OMAP_TIMER_SYS_STAT_OFFSET \ | ||
157 | | (WP_NONE << WPSHIFT)) | ||
158 | |||
159 | #define OMAP_TIMER_STAT_REG (_OMAP_TIMER_STAT_OFFSET \ | ||
160 | | (WP_NONE << WPSHIFT)) | ||
161 | |||
162 | #define OMAP_TIMER_INT_EN_REG (_OMAP_TIMER_INT_EN_OFFSET \ | ||
163 | | (WP_NONE << WPSHIFT)) | ||
164 | |||
165 | #define OMAP_TIMER_WAKEUP_EN_REG (_OMAP_TIMER_WAKEUP_EN_OFFSET \ | ||
166 | | (WP_NONE << WPSHIFT)) | ||
167 | |||
168 | #define OMAP_TIMER_CTRL_REG (_OMAP_TIMER_CTRL_OFFSET \ | ||
169 | | (WP_TCLR << WPSHIFT)) | ||
170 | |||
171 | #define OMAP_TIMER_COUNTER_REG (_OMAP_TIMER_COUNTER_OFFSET \ | ||
172 | | (WP_TCRR << WPSHIFT)) | ||
173 | |||
174 | #define OMAP_TIMER_LOAD_REG (_OMAP_TIMER_LOAD_OFFSET \ | ||
175 | | (WP_TLDR << WPSHIFT)) | ||
176 | |||
177 | #define OMAP_TIMER_TRIGGER_REG (_OMAP_TIMER_TRIGGER_OFFSET \ | ||
178 | | (WP_TTGR << WPSHIFT)) | ||
179 | |||
180 | #define OMAP_TIMER_WRITE_PEND_REG (_OMAP_TIMER_WRITE_PEND_OFFSET \ | ||
181 | | (WP_NONE << WPSHIFT)) | ||
182 | |||
183 | #define OMAP_TIMER_MATCH_REG (_OMAP_TIMER_MATCH_OFFSET \ | ||
184 | | (WP_TMAR << WPSHIFT)) | ||
185 | |||
186 | #define OMAP_TIMER_CAPTURE_REG (_OMAP_TIMER_CAPTURE_OFFSET \ | ||
187 | | (WP_NONE << WPSHIFT)) | ||
188 | |||
189 | #define OMAP_TIMER_IF_CTRL_REG (_OMAP_TIMER_IF_CTRL_OFFSET \ | ||
190 | | (WP_NONE << WPSHIFT)) | ||
191 | |||
192 | #define OMAP_TIMER_CAPTURE2_REG (_OMAP_TIMER_CAPTURE2_OFFSET \ | ||
193 | | (WP_NONE << WPSHIFT)) | ||
194 | |||
195 | #define OMAP_TIMER_TICK_POS_REG (_OMAP_TIMER_TICK_POS_OFFSET \ | ||
196 | | (WP_TPIR << WPSHIFT)) | ||
197 | |||
198 | #define OMAP_TIMER_TICK_NEG_REG (_OMAP_TIMER_TICK_NEG_OFFSET \ | ||
199 | | (WP_TNIR << WPSHIFT)) | ||
200 | |||
201 | #define OMAP_TIMER_TICK_COUNT_REG (_OMAP_TIMER_TICK_COUNT_OFFSET \ | ||
202 | | (WP_TCVR << WPSHIFT)) | ||
203 | |||
204 | #define OMAP_TIMER_TICK_INT_MASK_SET_REG \ | ||
205 | (_OMAP_TIMER_TICK_INT_MASK_SET_OFFSET | (WP_TOCR << WPSHIFT)) | ||
206 | |||
207 | #define OMAP_TIMER_TICK_INT_MASK_COUNT_REG \ | ||
208 | (_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR << WPSHIFT)) | ||
209 | |||
210 | struct omap_dm_timer { | ||
211 | unsigned long phys_base; | ||
212 | int irq; | ||
213 | #ifdef CONFIG_ARCH_OMAP2PLUS | ||
214 | struct clk *iclk, *fclk; | ||
215 | #endif | ||
216 | void __iomem *io_base; | ||
217 | unsigned long rate; | ||
218 | unsigned reserved:1; | ||
219 | unsigned enabled:1; | ||
220 | unsigned posted:1; | ||
221 | }; | ||
222 | |||
223 | extern u32 sys_timer_reserved; | ||
224 | void omap_dm_timer_prepare(struct omap_dm_timer *timer); | ||
225 | |||
226 | static inline u32 __omap_dm_timer_read(void __iomem *base, u32 reg, | ||
227 | int posted) | ||
228 | { | ||
229 | if (posted) | ||
230 | while (__raw_readl(base + (OMAP_TIMER_WRITE_PEND_REG & 0xff)) | ||
231 | & (reg >> WPSHIFT)) | ||
232 | cpu_relax(); | ||
233 | |||
234 | return __raw_readl(base + (reg & 0xff)); | ||
235 | } | ||
236 | |||
237 | static inline void __omap_dm_timer_write(void __iomem *base, u32 reg, u32 val, | ||
238 | int posted) | ||
239 | { | ||
240 | if (posted) | ||
241 | while (__raw_readl(base + (OMAP_TIMER_WRITE_PEND_REG & 0xff)) | ||
242 | & (reg >> WPSHIFT)) | ||
243 | cpu_relax(); | ||
244 | |||
245 | __raw_writel(val, base + (reg & 0xff)); | ||
246 | } | ||
247 | |||
248 | /* Assumes the source clock has been set by caller */ | ||
249 | static inline void __omap_dm_timer_reset(void __iomem *base, int autoidle, | ||
250 | int wakeup) | ||
251 | { | ||
252 | u32 l; | ||
253 | |||
254 | l = __omap_dm_timer_read(base, OMAP_TIMER_OCP_CFG_REG, 0); | ||
255 | l |= 0x02 << 3; /* Set to smart-idle mode */ | ||
256 | l |= 0x2 << 8; /* Set clock activity to perserve f-clock on idle */ | ||
257 | |||
258 | if (autoidle) | ||
259 | l |= 0x1 << 0; | ||
260 | |||
261 | if (wakeup) | ||
262 | l |= 1 << 2; | ||
263 | |||
264 | __omap_dm_timer_write(base, OMAP_TIMER_OCP_CFG_REG, l, 0); | ||
265 | |||
266 | /* Match hardware reset default of posted mode */ | ||
267 | __omap_dm_timer_write(base, OMAP_TIMER_IF_CTRL_REG, | ||
268 | OMAP_TIMER_CTRL_POSTED, 0); | ||
269 | } | ||
270 | |||
271 | static inline int __omap_dm_timer_set_source(struct clk *timer_fck, | ||
272 | struct clk *parent) | ||
273 | { | ||
274 | int ret; | ||
275 | |||
276 | clk_disable(timer_fck); | ||
277 | ret = clk_set_parent(timer_fck, parent); | ||
278 | clk_enable(timer_fck); | ||
279 | |||
280 | /* | ||
281 | * When the functional clock disappears, too quick writes seem | ||
282 | * to cause an abort. XXX Is this still necessary? | ||
283 | */ | ||
284 | __delay(300000); | ||
285 | |||
286 | return ret; | ||
287 | } | ||
288 | |||
289 | static inline void __omap_dm_timer_stop(void __iomem *base, int posted, | ||
290 | unsigned long rate) | ||
291 | { | ||
292 | u32 l; | ||
293 | |||
294 | l = __omap_dm_timer_read(base, OMAP_TIMER_CTRL_REG, posted); | ||
295 | if (l & OMAP_TIMER_CTRL_ST) { | ||
296 | l &= ~0x1; | ||
297 | __omap_dm_timer_write(base, OMAP_TIMER_CTRL_REG, l, posted); | ||
298 | #ifdef CONFIG_ARCH_OMAP2PLUS | ||
299 | /* Readback to make sure write has completed */ | ||
300 | __omap_dm_timer_read(base, OMAP_TIMER_CTRL_REG, posted); | ||
301 | /* | ||
302 | * Wait for functional clock period x 3.5 to make sure that | ||
303 | * timer is stopped | ||
304 | */ | ||
305 | udelay(3500000 / rate + 1); | ||
306 | #endif | ||
307 | } | ||
308 | |||
309 | /* Ack possibly pending interrupt */ | ||
310 | __omap_dm_timer_write(base, OMAP_TIMER_STAT_REG, | ||
311 | OMAP_TIMER_INT_OVERFLOW, 0); | ||
312 | } | ||
313 | |||
314 | static inline void __omap_dm_timer_load_start(void __iomem *base, u32 ctrl, | ||
315 | unsigned int load, int posted) | ||
316 | { | ||
317 | __omap_dm_timer_write(base, OMAP_TIMER_COUNTER_REG, load, posted); | ||
318 | __omap_dm_timer_write(base, OMAP_TIMER_CTRL_REG, ctrl, posted); | ||
319 | } | ||
320 | |||
321 | static inline void __omap_dm_timer_int_enable(void __iomem *base, | ||
322 | unsigned int value) | ||
323 | { | ||
324 | __omap_dm_timer_write(base, OMAP_TIMER_INT_EN_REG, value, 0); | ||
325 | __omap_dm_timer_write(base, OMAP_TIMER_WAKEUP_EN_REG, value, 0); | ||
326 | } | ||
327 | |||
328 | static inline unsigned int __omap_dm_timer_read_counter(void __iomem *base, | ||
329 | int posted) | ||
330 | { | ||
331 | return __omap_dm_timer_read(base, OMAP_TIMER_COUNTER_REG, posted); | ||
332 | } | ||
333 | |||
334 | static inline void __omap_dm_timer_write_status(void __iomem *base, | ||
335 | unsigned int value) | ||
336 | { | ||
337 | __omap_dm_timer_write(base, OMAP_TIMER_STAT_REG, value, 0); | ||
338 | } | ||
96 | 339 | ||
97 | #endif /* __ASM_ARCH_DMTIMER_H */ | 340 | #endif /* __ASM_ARCH_DMTIMER_H */ |
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h index 5a25098ea7ea..c88432005665 100644 --- a/arch/arm/plat-omap/include/plat/irqs.h +++ b/arch/arm/plat-omap/include/plat/irqs.h | |||
@@ -428,7 +428,11 @@ | |||
428 | #define INTCPS_NR_IRQS 96 | 428 | #define INTCPS_NR_IRQS 96 |
429 | 429 | ||
430 | #ifndef __ASSEMBLY__ | 430 | #ifndef __ASSEMBLY__ |
431 | extern void omap_init_irq(void); | 431 | extern void __iomem *omap_irq_base; |
432 | void omap1_init_irq(void); | ||
433 | void omap2_init_irq(void); | ||
434 | void omap3_init_irq(void); | ||
435 | void ti816x_init_irq(void); | ||
432 | extern int omap_irq_pending(void); | 436 | extern int omap_irq_pending(void); |
433 | void omap_intc_save_context(void); | 437 | void omap_intc_save_context(void); |
434 | void omap_intc_restore_context(void); | 438 | void omap_intc_restore_context(void); |
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h index f8f690ab2997..9882c657b2d4 100644 --- a/arch/arm/plat-omap/include/plat/mcbsp.h +++ b/arch/arm/plat-omap/include/plat/mcbsp.h | |||
@@ -24,7 +24,6 @@ | |||
24 | #ifndef __ASM_ARCH_OMAP_MCBSP_H | 24 | #ifndef __ASM_ARCH_OMAP_MCBSP_H |
25 | #define __ASM_ARCH_OMAP_MCBSP_H | 25 | #define __ASM_ARCH_OMAP_MCBSP_H |
26 | 26 | ||
27 | #include <linux/completion.h> | ||
28 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
29 | 28 | ||
30 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
@@ -34,7 +33,7 @@ | |||
34 | #define OMAP_MCBSP_PLATFORM_DEVICE(port_nr) \ | 33 | #define OMAP_MCBSP_PLATFORM_DEVICE(port_nr) \ |
35 | static struct platform_device omap_mcbsp##port_nr = { \ | 34 | static struct platform_device omap_mcbsp##port_nr = { \ |
36 | .name = "omap-mcbsp-dai", \ | 35 | .name = "omap-mcbsp-dai", \ |
37 | .id = OMAP_MCBSP##port_nr, \ | 36 | .id = port_nr - 1, \ |
38 | } | 37 | } |
39 | 38 | ||
40 | #define MCBSP_CONFIG_TYPE2 0x2 | 39 | #define MCBSP_CONFIG_TYPE2 0x2 |
@@ -333,18 +332,6 @@ struct omap_mcbsp_reg_cfg { | |||
333 | }; | 332 | }; |
334 | 333 | ||
335 | typedef enum { | 334 | typedef enum { |
336 | OMAP_MCBSP1 = 0, | ||
337 | OMAP_MCBSP2, | ||
338 | OMAP_MCBSP3, | ||
339 | OMAP_MCBSP4, | ||
340 | OMAP_MCBSP5 | ||
341 | } omap_mcbsp_id; | ||
342 | |||
343 | typedef int __bitwise omap_mcbsp_io_type_t; | ||
344 | #define OMAP_MCBSP_IRQ_IO ((__force omap_mcbsp_io_type_t) 1) | ||
345 | #define OMAP_MCBSP_POLL_IO ((__force omap_mcbsp_io_type_t) 2) | ||
346 | |||
347 | typedef enum { | ||
348 | OMAP_MCBSP_WORD_8 = 0, | 335 | OMAP_MCBSP_WORD_8 = 0, |
349 | OMAP_MCBSP_WORD_12, | 336 | OMAP_MCBSP_WORD_12, |
350 | OMAP_MCBSP_WORD_16, | 337 | OMAP_MCBSP_WORD_16, |
@@ -353,38 +340,6 @@ typedef enum { | |||
353 | OMAP_MCBSP_WORD_32, | 340 | OMAP_MCBSP_WORD_32, |
354 | } omap_mcbsp_word_length; | 341 | } omap_mcbsp_word_length; |
355 | 342 | ||
356 | typedef enum { | ||
357 | OMAP_MCBSP_CLK_RISING = 0, | ||
358 | OMAP_MCBSP_CLK_FALLING, | ||
359 | } omap_mcbsp_clk_polarity; | ||
360 | |||
361 | typedef enum { | ||
362 | OMAP_MCBSP_FS_ACTIVE_HIGH = 0, | ||
363 | OMAP_MCBSP_FS_ACTIVE_LOW, | ||
364 | } omap_mcbsp_fs_polarity; | ||
365 | |||
366 | typedef enum { | ||
367 | OMAP_MCBSP_CLK_STP_MODE_NO_DELAY = 0, | ||
368 | OMAP_MCBSP_CLK_STP_MODE_DELAY, | ||
369 | } omap_mcbsp_clk_stp_mode; | ||
370 | |||
371 | |||
372 | /******* SPI specific mode **********/ | ||
373 | typedef enum { | ||
374 | OMAP_MCBSP_SPI_MASTER = 0, | ||
375 | OMAP_MCBSP_SPI_SLAVE, | ||
376 | } omap_mcbsp_spi_mode; | ||
377 | |||
378 | struct omap_mcbsp_spi_cfg { | ||
379 | omap_mcbsp_spi_mode spi_mode; | ||
380 | omap_mcbsp_clk_polarity rx_clock_polarity; | ||
381 | omap_mcbsp_clk_polarity tx_clock_polarity; | ||
382 | omap_mcbsp_fs_polarity fsx_polarity; | ||
383 | u8 clk_div; | ||
384 | omap_mcbsp_clk_stp_mode clk_stp_mode; | ||
385 | omap_mcbsp_word_length word_length; | ||
386 | }; | ||
387 | |||
388 | /* Platform specific configuration */ | 343 | /* Platform specific configuration */ |
389 | struct omap_mcbsp_ops { | 344 | struct omap_mcbsp_ops { |
390 | void (*request)(unsigned int); | 345 | void (*request)(unsigned int); |
@@ -422,25 +377,13 @@ struct omap_mcbsp { | |||
422 | void __iomem *io_base; | 377 | void __iomem *io_base; |
423 | u8 id; | 378 | u8 id; |
424 | u8 free; | 379 | u8 free; |
425 | omap_mcbsp_word_length rx_word_length; | ||
426 | omap_mcbsp_word_length tx_word_length; | ||
427 | 380 | ||
428 | omap_mcbsp_io_type_t io_type; /* IRQ or poll */ | ||
429 | /* IRQ based TX/RX */ | ||
430 | int rx_irq; | 381 | int rx_irq; |
431 | int tx_irq; | 382 | int tx_irq; |
432 | 383 | ||
433 | /* DMA stuff */ | 384 | /* DMA stuff */ |
434 | u8 dma_rx_sync; | 385 | u8 dma_rx_sync; |
435 | short dma_rx_lch; | ||
436 | u8 dma_tx_sync; | 386 | u8 dma_tx_sync; |
437 | short dma_tx_lch; | ||
438 | |||
439 | /* Completion queues */ | ||
440 | struct completion tx_irq_completion; | ||
441 | struct completion rx_irq_completion; | ||
442 | struct completion tx_dma_completion; | ||
443 | struct completion rx_dma_completion; | ||
444 | 387 | ||
445 | /* Protect the field .free, while checking if the mcbsp is in use */ | 388 | /* Protect the field .free, while checking if the mcbsp is in use */ |
446 | spinlock_t lock; | 389 | spinlock_t lock; |
@@ -499,24 +442,9 @@ int omap_mcbsp_request(unsigned int id); | |||
499 | void omap_mcbsp_free(unsigned int id); | 442 | void omap_mcbsp_free(unsigned int id); |
500 | void omap_mcbsp_start(unsigned int id, int tx, int rx); | 443 | void omap_mcbsp_start(unsigned int id, int tx, int rx); |
501 | void omap_mcbsp_stop(unsigned int id, int tx, int rx); | 444 | void omap_mcbsp_stop(unsigned int id, int tx, int rx); |
502 | void omap_mcbsp_xmit_word(unsigned int id, u32 word); | ||
503 | u32 omap_mcbsp_recv_word(unsigned int id); | ||
504 | |||
505 | int omap_mcbsp_xmit_buffer(unsigned int id, dma_addr_t buffer, unsigned int length); | ||
506 | int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer, unsigned int length); | ||
507 | int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word); | ||
508 | int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 * word); | ||
509 | |||
510 | 445 | ||
511 | /* McBSP functional clock source changing function */ | 446 | /* McBSP functional clock source changing function */ |
512 | extern int omap2_mcbsp_set_clks_src(u8 id, u8 fck_src_id); | 447 | extern int omap2_mcbsp_set_clks_src(u8 id, u8 fck_src_id); |
513 | /* SPI specific API */ | ||
514 | void omap_mcbsp_set_spi_mode(unsigned int id, const struct omap_mcbsp_spi_cfg * spi_cfg); | ||
515 | |||
516 | /* Polled read/write functions */ | ||
517 | int omap_mcbsp_pollread(unsigned int id, u16 * buf); | ||
518 | int omap_mcbsp_pollwrite(unsigned int id, u16 buf); | ||
519 | int omap_mcbsp_set_io_type(unsigned int id, omap_mcbsp_io_type_t io_type); | ||
520 | 448 | ||
521 | /* McBSP signal muxing API */ | 449 | /* McBSP signal muxing API */ |
522 | void omap2_mcbsp1_mux_clkr_src(u8 mux); | 450 | void omap2_mcbsp1_mux_clkr_src(u8 mux); |
diff --git a/arch/arm/plat-omap/include/plat/nand.h b/arch/arm/plat-omap/include/plat/nand.h index d86d1ecf0068..67fc5060183e 100644 --- a/arch/arm/plat-omap/include/plat/nand.h +++ b/arch/arm/plat-omap/include/plat/nand.h | |||
@@ -19,15 +19,11 @@ enum nand_io { | |||
19 | }; | 19 | }; |
20 | 20 | ||
21 | struct omap_nand_platform_data { | 21 | struct omap_nand_platform_data { |
22 | unsigned int options; | ||
23 | int cs; | 22 | int cs; |
24 | int gpio_irq; | ||
25 | struct mtd_partition *parts; | 23 | struct mtd_partition *parts; |
26 | struct gpmc_timings *gpmc_t; | 24 | struct gpmc_timings *gpmc_t; |
27 | int nr_parts; | 25 | int nr_parts; |
28 | int (*nand_setup)(void); | 26 | bool dev_ready; |
29 | int (*dev_ready)(struct omap_nand_platform_data *); | ||
30 | int dma_channel; | ||
31 | int gpmc_irq; | 27 | int gpmc_irq; |
32 | enum nand_io xfer_type; | 28 | enum nand_io xfer_type; |
33 | unsigned long phys_base; | 29 | unsigned long phys_base; |
diff --git a/arch/arm/plat-omap/include/plat/omap-pm.h b/arch/arm/plat-omap/include/plat/omap-pm.h index c0a752053039..0840df813f4f 100644 --- a/arch/arm/plat-omap/include/plat/omap-pm.h +++ b/arch/arm/plat-omap/include/plat/omap-pm.h | |||
@@ -40,11 +40,7 @@ | |||
40 | * framework starts. The "_if_" is to avoid name collisions with the | 40 | * framework starts. The "_if_" is to avoid name collisions with the |
41 | * PM idle-loop code. | 41 | * PM idle-loop code. |
42 | */ | 42 | */ |
43 | #ifdef CONFIG_OMAP_PM_NONE | ||
44 | #define omap_pm_if_early_init() 0 | ||
45 | #else | ||
46 | int __init omap_pm_if_early_init(void); | 43 | int __init omap_pm_if_early_init(void); |
47 | #endif | ||
48 | 44 | ||
49 | /** | 45 | /** |
50 | * omap_pm_if_init - OMAP PM init code called after clock fw init | 46 | * omap_pm_if_init - OMAP PM init code called after clock fw init |
@@ -52,11 +48,7 @@ int __init omap_pm_if_early_init(void); | |||
52 | * The main initialization code. OPP tables are passed in here. The | 48 | * The main initialization code. OPP tables are passed in here. The |
53 | * "_if_" is to avoid name collisions with the PM idle-loop code. | 49 | * "_if_" is to avoid name collisions with the PM idle-loop code. |
54 | */ | 50 | */ |
55 | #ifdef CONFIG_OMAP_PM_NONE | ||
56 | #define omap_pm_if_init() 0 | ||
57 | #else | ||
58 | int __init omap_pm_if_init(void); | 51 | int __init omap_pm_if_init(void); |
59 | #endif | ||
60 | 52 | ||
61 | /** | 53 | /** |
62 | * omap_pm_if_exit - OMAP PM exit code | 54 | * omap_pm_if_exit - OMAP PM exit code |
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 1adea9c62984..ce06ac6a9709 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -77,7 +77,6 @@ extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type2; | |||
77 | #define HWMOD_IDLEMODE_FORCE (1 << 0) | 77 | #define HWMOD_IDLEMODE_FORCE (1 << 0) |
78 | #define HWMOD_IDLEMODE_NO (1 << 1) | 78 | #define HWMOD_IDLEMODE_NO (1 << 1) |
79 | #define HWMOD_IDLEMODE_SMART (1 << 2) | 79 | #define HWMOD_IDLEMODE_SMART (1 << 2) |
80 | /* Slave idle mode flag only */ | ||
81 | #define HWMOD_IDLEMODE_SMART_WKUP (1 << 3) | 80 | #define HWMOD_IDLEMODE_SMART_WKUP (1 << 3) |
82 | 81 | ||
83 | /** | 82 | /** |
@@ -98,7 +97,7 @@ struct omap_hwmod_mux_info { | |||
98 | /** | 97 | /** |
99 | * struct omap_hwmod_irq_info - MPU IRQs used by the hwmod | 98 | * struct omap_hwmod_irq_info - MPU IRQs used by the hwmod |
100 | * @name: name of the IRQ channel (module local name) | 99 | * @name: name of the IRQ channel (module local name) |
101 | * @irq_ch: IRQ channel ID | 100 | * @irq: IRQ channel ID (should be non-negative except -1 = terminator) |
102 | * | 101 | * |
103 | * @name should be something short, e.g., "tx" or "rx". It is for use | 102 | * @name should be something short, e.g., "tx" or "rx". It is for use |
104 | * by platform_get_resource_byname(). It is defined locally to the | 103 | * by platform_get_resource_byname(). It is defined locally to the |
@@ -106,13 +105,13 @@ struct omap_hwmod_mux_info { | |||
106 | */ | 105 | */ |
107 | struct omap_hwmod_irq_info { | 106 | struct omap_hwmod_irq_info { |
108 | const char *name; | 107 | const char *name; |
109 | u16 irq; | 108 | s16 irq; |
110 | }; | 109 | }; |
111 | 110 | ||
112 | /** | 111 | /** |
113 | * struct omap_hwmod_dma_info - DMA channels used by the hwmod | 112 | * struct omap_hwmod_dma_info - DMA channels used by the hwmod |
114 | * @name: name of the DMA channel (module local name) | 113 | * @name: name of the DMA channel (module local name) |
115 | * @dma_req: DMA request ID | 114 | * @dma_req: DMA request ID (should be non-negative except -1 = terminator) |
116 | * | 115 | * |
117 | * @name should be something short, e.g., "tx" or "rx". It is for use | 116 | * @name should be something short, e.g., "tx" or "rx". It is for use |
118 | * by platform_get_resource_byname(). It is defined locally to the | 117 | * by platform_get_resource_byname(). It is defined locally to the |
@@ -120,7 +119,7 @@ struct omap_hwmod_irq_info { | |||
120 | */ | 119 | */ |
121 | struct omap_hwmod_dma_info { | 120 | struct omap_hwmod_dma_info { |
122 | const char *name; | 121 | const char *name; |
123 | u16 dma_req; | 122 | s16 dma_req; |
124 | }; | 123 | }; |
125 | 124 | ||
126 | /** | 125 | /** |
@@ -220,7 +219,6 @@ struct omap_hwmod_addr_space { | |||
220 | * @clk: interface clock: OMAP clock name | 219 | * @clk: interface clock: OMAP clock name |
221 | * @_clk: pointer to the interface struct clk (filled in at runtime) | 220 | * @_clk: pointer to the interface struct clk (filled in at runtime) |
222 | * @fw: interface firewall data | 221 | * @fw: interface firewall data |
223 | * @addr_cnt: ARRAY_SIZE(@addr) | ||
224 | * @width: OCP data width | 222 | * @width: OCP data width |
225 | * @user: initiators using this interface (see OCP_USER_* macros above) | 223 | * @user: initiators using this interface (see OCP_USER_* macros above) |
226 | * @flags: OCP interface flags (see OCPIF_* macros above) | 224 | * @flags: OCP interface flags (see OCPIF_* macros above) |
@@ -239,7 +237,6 @@ struct omap_hwmod_ocp_if { | |||
239 | union { | 237 | union { |
240 | struct omap_hwmod_omap2_firewall omap2; | 238 | struct omap_hwmod_omap2_firewall omap2; |
241 | } fw; | 239 | } fw; |
242 | u8 addr_cnt; | ||
243 | u8 width; | 240 | u8 width; |
244 | u8 user; | 241 | u8 user; |
245 | u8 flags; | 242 | u8 flags; |
@@ -258,6 +255,7 @@ struct omap_hwmod_ocp_if { | |||
258 | #define MSTANDBY_FORCE (HWMOD_IDLEMODE_FORCE << MASTER_STANDBY_SHIFT) | 255 | #define MSTANDBY_FORCE (HWMOD_IDLEMODE_FORCE << MASTER_STANDBY_SHIFT) |
259 | #define MSTANDBY_NO (HWMOD_IDLEMODE_NO << MASTER_STANDBY_SHIFT) | 256 | #define MSTANDBY_NO (HWMOD_IDLEMODE_NO << MASTER_STANDBY_SHIFT) |
260 | #define MSTANDBY_SMART (HWMOD_IDLEMODE_SMART << MASTER_STANDBY_SHIFT) | 257 | #define MSTANDBY_SMART (HWMOD_IDLEMODE_SMART << MASTER_STANDBY_SHIFT) |
258 | #define MSTANDBY_SMART_WKUP (HWMOD_IDLEMODE_SMART_WKUP << MASTER_STANDBY_SHIFT) | ||
261 | 259 | ||
262 | /* omap_hwmod_sysconfig.sysc_flags capability flags */ | 260 | /* omap_hwmod_sysconfig.sysc_flags capability flags */ |
263 | #define SYSC_HAS_AUTOIDLE (1 << 0) | 261 | #define SYSC_HAS_AUTOIDLE (1 << 0) |
@@ -468,8 +466,8 @@ struct omap_hwmod_class { | |||
468 | * @name: name of the hwmod | 466 | * @name: name of the hwmod |
469 | * @class: struct omap_hwmod_class * to the class of this hwmod | 467 | * @class: struct omap_hwmod_class * to the class of this hwmod |
470 | * @od: struct omap_device currently associated with this hwmod (internal use) | 468 | * @od: struct omap_device currently associated with this hwmod (internal use) |
471 | * @mpu_irqs: ptr to an array of MPU IRQs (see also mpu_irqs_cnt) | 469 | * @mpu_irqs: ptr to an array of MPU IRQs |
472 | * @sdma_reqs: ptr to an array of System DMA request IDs (see sdma_reqs_cnt) | 470 | * @sdma_reqs: ptr to an array of System DMA request IDs |
473 | * @prcm: PRCM data pertaining to this hwmod | 471 | * @prcm: PRCM data pertaining to this hwmod |
474 | * @main_clk: main clock: OMAP clock name | 472 | * @main_clk: main clock: OMAP clock name |
475 | * @_clk: pointer to the main struct clk (filled in at runtime) | 473 | * @_clk: pointer to the main struct clk (filled in at runtime) |
@@ -482,8 +480,6 @@ struct omap_hwmod_class { | |||
482 | * @_sysc_cache: internal-use hwmod flags | 480 | * @_sysc_cache: internal-use hwmod flags |
483 | * @_mpu_rt_va: cached register target start address (internal use) | 481 | * @_mpu_rt_va: cached register target start address (internal use) |
484 | * @_mpu_port_index: cached MPU register target slave ID (internal use) | 482 | * @_mpu_port_index: cached MPU register target slave ID (internal use) |
485 | * @mpu_irqs_cnt: number of @mpu_irqs | ||
486 | * @sdma_reqs_cnt: number of @sdma_reqs | ||
487 | * @opt_clks_cnt: number of @opt_clks | 483 | * @opt_clks_cnt: number of @opt_clks |
488 | * @master_cnt: number of @master entries | 484 | * @master_cnt: number of @master entries |
489 | * @slaves_cnt: number of @slave entries | 485 | * @slaves_cnt: number of @slave entries |
@@ -531,8 +527,6 @@ struct omap_hwmod { | |||
531 | u16 flags; | 527 | u16 flags; |
532 | u8 _mpu_port_index; | 528 | u8 _mpu_port_index; |
533 | u8 response_lat; | 529 | u8 response_lat; |
534 | u8 mpu_irqs_cnt; | ||
535 | u8 sdma_reqs_cnt; | ||
536 | u8 rst_lines_cnt; | 530 | u8 rst_lines_cnt; |
537 | u8 opt_clks_cnt; | 531 | u8 opt_clks_cnt; |
538 | u8 masters_cnt; | 532 | u8 masters_cnt; |
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index 5587acf0eb2c..3c1fbdc92468 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c | |||
@@ -16,8 +16,6 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/device.h> | 17 | #include <linux/device.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/wait.h> | ||
20 | #include <linux/completion.h> | ||
21 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
22 | #include <linux/err.h> | 20 | #include <linux/err.h> |
23 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
@@ -25,7 +23,6 @@ | |||
25 | #include <linux/io.h> | 23 | #include <linux/io.h> |
26 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
27 | 25 | ||
28 | #include <plat/dma.h> | ||
29 | #include <plat/mcbsp.h> | 26 | #include <plat/mcbsp.h> |
30 | #include <plat/omap_device.h> | 27 | #include <plat/omap_device.h> |
31 | #include <linux/pm_runtime.h> | 28 | #include <linux/pm_runtime.h> |
@@ -136,8 +133,6 @@ static irqreturn_t omap_mcbsp_tx_irq_handler(int irq, void *dev_id) | |||
136 | irqst_spcr2); | 133 | irqst_spcr2); |
137 | /* Writing zero to XSYNC_ERR clears the IRQ */ | 134 | /* Writing zero to XSYNC_ERR clears the IRQ */ |
138 | MCBSP_WRITE(mcbsp_tx, SPCR2, MCBSP_READ_CACHE(mcbsp_tx, SPCR2)); | 135 | MCBSP_WRITE(mcbsp_tx, SPCR2, MCBSP_READ_CACHE(mcbsp_tx, SPCR2)); |
139 | } else { | ||
140 | complete(&mcbsp_tx->tx_irq_completion); | ||
141 | } | 136 | } |
142 | 137 | ||
143 | return IRQ_HANDLED; | 138 | return IRQ_HANDLED; |
@@ -156,41 +151,11 @@ static irqreturn_t omap_mcbsp_rx_irq_handler(int irq, void *dev_id) | |||
156 | irqst_spcr1); | 151 | irqst_spcr1); |
157 | /* Writing zero to RSYNC_ERR clears the IRQ */ | 152 | /* Writing zero to RSYNC_ERR clears the IRQ */ |
158 | MCBSP_WRITE(mcbsp_rx, SPCR1, MCBSP_READ_CACHE(mcbsp_rx, SPCR1)); | 153 | MCBSP_WRITE(mcbsp_rx, SPCR1, MCBSP_READ_CACHE(mcbsp_rx, SPCR1)); |
159 | } else { | ||
160 | complete(&mcbsp_rx->rx_irq_completion); | ||
161 | } | 154 | } |
162 | 155 | ||
163 | return IRQ_HANDLED; | 156 | return IRQ_HANDLED; |
164 | } | 157 | } |
165 | 158 | ||
166 | static void omap_mcbsp_tx_dma_callback(int lch, u16 ch_status, void *data) | ||
167 | { | ||
168 | struct omap_mcbsp *mcbsp_dma_tx = data; | ||
169 | |||
170 | dev_dbg(mcbsp_dma_tx->dev, "TX DMA callback : 0x%x\n", | ||
171 | MCBSP_READ(mcbsp_dma_tx, SPCR2)); | ||
172 | |||
173 | /* We can free the channels */ | ||
174 | omap_free_dma(mcbsp_dma_tx->dma_tx_lch); | ||
175 | mcbsp_dma_tx->dma_tx_lch = -1; | ||
176 | |||
177 | complete(&mcbsp_dma_tx->tx_dma_completion); | ||
178 | } | ||
179 | |||
180 | static void omap_mcbsp_rx_dma_callback(int lch, u16 ch_status, void *data) | ||
181 | { | ||
182 | struct omap_mcbsp *mcbsp_dma_rx = data; | ||
183 | |||
184 | dev_dbg(mcbsp_dma_rx->dev, "RX DMA callback : 0x%x\n", | ||
185 | MCBSP_READ(mcbsp_dma_rx, SPCR2)); | ||
186 | |||
187 | /* We can free the channels */ | ||
188 | omap_free_dma(mcbsp_dma_rx->dma_rx_lch); | ||
189 | mcbsp_dma_rx->dma_rx_lch = -1; | ||
190 | |||
191 | complete(&mcbsp_dma_rx->rx_dma_completion); | ||
192 | } | ||
193 | |||
194 | /* | 159 | /* |
195 | * omap_mcbsp_config simply write a config to the | 160 | * omap_mcbsp_config simply write a config to the |
196 | * appropriate McBSP. | 161 | * appropriate McBSP. |
@@ -758,37 +723,6 @@ static inline void omap_st_start(struct omap_mcbsp *mcbsp) {} | |||
758 | static inline void omap_st_stop(struct omap_mcbsp *mcbsp) {} | 723 | static inline void omap_st_stop(struct omap_mcbsp *mcbsp) {} |
759 | #endif | 724 | #endif |
760 | 725 | ||
761 | /* | ||
762 | * We can choose between IRQ based or polled IO. | ||
763 | * This needs to be called before omap_mcbsp_request(). | ||
764 | */ | ||
765 | int omap_mcbsp_set_io_type(unsigned int id, omap_mcbsp_io_type_t io_type) | ||
766 | { | ||
767 | struct omap_mcbsp *mcbsp; | ||
768 | |||
769 | if (!omap_mcbsp_check_valid_id(id)) { | ||
770 | printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1); | ||
771 | return -ENODEV; | ||
772 | } | ||
773 | mcbsp = id_to_mcbsp_ptr(id); | ||
774 | |||
775 | spin_lock(&mcbsp->lock); | ||
776 | |||
777 | if (!mcbsp->free) { | ||
778 | dev_err(mcbsp->dev, "McBSP%d is currently in use\n", | ||
779 | mcbsp->id); | ||
780 | spin_unlock(&mcbsp->lock); | ||
781 | return -EINVAL; | ||
782 | } | ||
783 | |||
784 | mcbsp->io_type = io_type; | ||
785 | |||
786 | spin_unlock(&mcbsp->lock); | ||
787 | |||
788 | return 0; | ||
789 | } | ||
790 | EXPORT_SYMBOL(omap_mcbsp_set_io_type); | ||
791 | |||
792 | int omap_mcbsp_request(unsigned int id) | 726 | int omap_mcbsp_request(unsigned int id) |
793 | { | 727 | { |
794 | struct omap_mcbsp *mcbsp; | 728 | struct omap_mcbsp *mcbsp; |
@@ -833,29 +767,24 @@ int omap_mcbsp_request(unsigned int id) | |||
833 | MCBSP_WRITE(mcbsp, SPCR1, 0); | 767 | MCBSP_WRITE(mcbsp, SPCR1, 0); |
834 | MCBSP_WRITE(mcbsp, SPCR2, 0); | 768 | MCBSP_WRITE(mcbsp, SPCR2, 0); |
835 | 769 | ||
836 | if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) { | 770 | err = request_irq(mcbsp->tx_irq, omap_mcbsp_tx_irq_handler, |
837 | /* We need to get IRQs here */ | 771 | 0, "McBSP", (void *)mcbsp); |
838 | init_completion(&mcbsp->tx_irq_completion); | 772 | if (err != 0) { |
839 | err = request_irq(mcbsp->tx_irq, omap_mcbsp_tx_irq_handler, | 773 | dev_err(mcbsp->dev, "Unable to request TX IRQ %d " |
840 | 0, "McBSP", (void *)mcbsp); | 774 | "for McBSP%d\n", mcbsp->tx_irq, |
775 | mcbsp->id); | ||
776 | goto err_clk_disable; | ||
777 | } | ||
778 | |||
779 | if (mcbsp->rx_irq) { | ||
780 | err = request_irq(mcbsp->rx_irq, | ||
781 | omap_mcbsp_rx_irq_handler, | ||
782 | 0, "McBSP", (void *)mcbsp); | ||
841 | if (err != 0) { | 783 | if (err != 0) { |
842 | dev_err(mcbsp->dev, "Unable to request TX IRQ %d " | 784 | dev_err(mcbsp->dev, "Unable to request RX IRQ %d " |
843 | "for McBSP%d\n", mcbsp->tx_irq, | 785 | "for McBSP%d\n", mcbsp->rx_irq, |
844 | mcbsp->id); | 786 | mcbsp->id); |
845 | goto err_clk_disable; | 787 | goto err_free_irq; |
846 | } | ||
847 | |||
848 | if (mcbsp->rx_irq) { | ||
849 | init_completion(&mcbsp->rx_irq_completion); | ||
850 | err = request_irq(mcbsp->rx_irq, | ||
851 | omap_mcbsp_rx_irq_handler, | ||
852 | 0, "McBSP", (void *)mcbsp); | ||
853 | if (err != 0) { | ||
854 | dev_err(mcbsp->dev, "Unable to request RX IRQ %d " | ||
855 | "for McBSP%d\n", mcbsp->rx_irq, | ||
856 | mcbsp->id); | ||
857 | goto err_free_irq; | ||
858 | } | ||
859 | } | 788 | } |
860 | } | 789 | } |
861 | 790 | ||
@@ -901,12 +830,9 @@ void omap_mcbsp_free(unsigned int id) | |||
901 | 830 | ||
902 | pm_runtime_put_sync(mcbsp->dev); | 831 | pm_runtime_put_sync(mcbsp->dev); |
903 | 832 | ||
904 | if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) { | 833 | if (mcbsp->rx_irq) |
905 | /* Free IRQs */ | 834 | free_irq(mcbsp->rx_irq, (void *)mcbsp); |
906 | if (mcbsp->rx_irq) | 835 | free_irq(mcbsp->tx_irq, (void *)mcbsp); |
907 | free_irq(mcbsp->rx_irq, (void *)mcbsp); | ||
908 | free_irq(mcbsp->tx_irq, (void *)mcbsp); | ||
909 | } | ||
910 | 836 | ||
911 | reg_cache = mcbsp->reg_cache; | 837 | reg_cache = mcbsp->reg_cache; |
912 | 838 | ||
@@ -943,9 +869,6 @@ void omap_mcbsp_start(unsigned int id, int tx, int rx) | |||
943 | if (cpu_is_omap34xx()) | 869 | if (cpu_is_omap34xx()) |
944 | omap_st_start(mcbsp); | 870 | omap_st_start(mcbsp); |
945 | 871 | ||
946 | mcbsp->rx_word_length = (MCBSP_READ_CACHE(mcbsp, RCR1) >> 5) & 0x7; | ||
947 | mcbsp->tx_word_length = (MCBSP_READ_CACHE(mcbsp, XCR1) >> 5) & 0x7; | ||
948 | |||
949 | /* Only enable SRG, if McBSP is master */ | 872 | /* Only enable SRG, if McBSP is master */ |
950 | w = MCBSP_READ_CACHE(mcbsp, PCR0); | 873 | w = MCBSP_READ_CACHE(mcbsp, PCR0); |
951 | if (w & (FSXM | FSRM | CLKXM | CLKRM)) | 874 | if (w & (FSXM | FSRM | CLKXM | CLKRM)) |
@@ -1043,485 +966,6 @@ void omap_mcbsp_stop(unsigned int id, int tx, int rx) | |||
1043 | } | 966 | } |
1044 | EXPORT_SYMBOL(omap_mcbsp_stop); | 967 | EXPORT_SYMBOL(omap_mcbsp_stop); |
1045 | 968 | ||
1046 | /* polled mcbsp i/o operations */ | ||
1047 | int omap_mcbsp_pollwrite(unsigned int id, u16 buf) | ||
1048 | { | ||
1049 | struct omap_mcbsp *mcbsp; | ||
1050 | |||
1051 | if (!omap_mcbsp_check_valid_id(id)) { | ||
1052 | printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1); | ||
1053 | return -ENODEV; | ||
1054 | } | ||
1055 | |||
1056 | mcbsp = id_to_mcbsp_ptr(id); | ||
1057 | |||
1058 | MCBSP_WRITE(mcbsp, DXR1, buf); | ||
1059 | /* if frame sync error - clear the error */ | ||
1060 | if (MCBSP_READ(mcbsp, SPCR2) & XSYNC_ERR) { | ||
1061 | /* clear error */ | ||
1062 | MCBSP_WRITE(mcbsp, SPCR2, MCBSP_READ_CACHE(mcbsp, SPCR2)); | ||
1063 | /* resend */ | ||
1064 | return -1; | ||
1065 | } else { | ||
1066 | /* wait for transmit confirmation */ | ||
1067 | int attemps = 0; | ||
1068 | while (!(MCBSP_READ(mcbsp, SPCR2) & XRDY)) { | ||
1069 | if (attemps++ > 1000) { | ||
1070 | MCBSP_WRITE(mcbsp, SPCR2, | ||
1071 | MCBSP_READ_CACHE(mcbsp, SPCR2) & | ||
1072 | (~XRST)); | ||
1073 | udelay(10); | ||
1074 | MCBSP_WRITE(mcbsp, SPCR2, | ||
1075 | MCBSP_READ_CACHE(mcbsp, SPCR2) | | ||
1076 | (XRST)); | ||
1077 | udelay(10); | ||
1078 | dev_err(mcbsp->dev, "Could not write to" | ||
1079 | " McBSP%d Register\n", mcbsp->id); | ||
1080 | return -2; | ||
1081 | } | ||
1082 | } | ||
1083 | } | ||
1084 | |||
1085 | return 0; | ||
1086 | } | ||
1087 | EXPORT_SYMBOL(omap_mcbsp_pollwrite); | ||
1088 | |||
1089 | int omap_mcbsp_pollread(unsigned int id, u16 *buf) | ||
1090 | { | ||
1091 | struct omap_mcbsp *mcbsp; | ||
1092 | |||
1093 | if (!omap_mcbsp_check_valid_id(id)) { | ||
1094 | printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1); | ||
1095 | return -ENODEV; | ||
1096 | } | ||
1097 | mcbsp = id_to_mcbsp_ptr(id); | ||
1098 | |||
1099 | /* if frame sync error - clear the error */ | ||
1100 | if (MCBSP_READ(mcbsp, SPCR1) & RSYNC_ERR) { | ||
1101 | /* clear error */ | ||
1102 | MCBSP_WRITE(mcbsp, SPCR1, MCBSP_READ_CACHE(mcbsp, SPCR1)); | ||
1103 | /* resend */ | ||
1104 | return -1; | ||
1105 | } else { | ||
1106 | /* wait for receive confirmation */ | ||
1107 | int attemps = 0; | ||
1108 | while (!(MCBSP_READ(mcbsp, SPCR1) & RRDY)) { | ||
1109 | if (attemps++ > 1000) { | ||
1110 | MCBSP_WRITE(mcbsp, SPCR1, | ||
1111 | MCBSP_READ_CACHE(mcbsp, SPCR1) & | ||
1112 | (~RRST)); | ||
1113 | udelay(10); | ||
1114 | MCBSP_WRITE(mcbsp, SPCR1, | ||
1115 | MCBSP_READ_CACHE(mcbsp, SPCR1) | | ||
1116 | (RRST)); | ||
1117 | udelay(10); | ||
1118 | dev_err(mcbsp->dev, "Could not read from" | ||
1119 | " McBSP%d Register\n", mcbsp->id); | ||
1120 | return -2; | ||
1121 | } | ||
1122 | } | ||
1123 | } | ||
1124 | *buf = MCBSP_READ(mcbsp, DRR1); | ||
1125 | |||
1126 | return 0; | ||
1127 | } | ||
1128 | EXPORT_SYMBOL(omap_mcbsp_pollread); | ||
1129 | |||
1130 | /* | ||
1131 | * IRQ based word transmission. | ||
1132 | */ | ||
1133 | void omap_mcbsp_xmit_word(unsigned int id, u32 word) | ||
1134 | { | ||
1135 | struct omap_mcbsp *mcbsp; | ||
1136 | omap_mcbsp_word_length word_length; | ||
1137 | |||
1138 | if (!omap_mcbsp_check_valid_id(id)) { | ||
1139 | printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1); | ||
1140 | return; | ||
1141 | } | ||
1142 | |||
1143 | mcbsp = id_to_mcbsp_ptr(id); | ||
1144 | word_length = mcbsp->tx_word_length; | ||
1145 | |||
1146 | wait_for_completion(&mcbsp->tx_irq_completion); | ||
1147 | |||
1148 | if (word_length > OMAP_MCBSP_WORD_16) | ||
1149 | MCBSP_WRITE(mcbsp, DXR2, word >> 16); | ||
1150 | MCBSP_WRITE(mcbsp, DXR1, word & 0xffff); | ||
1151 | } | ||
1152 | EXPORT_SYMBOL(omap_mcbsp_xmit_word); | ||
1153 | |||
1154 | u32 omap_mcbsp_recv_word(unsigned int id) | ||
1155 | { | ||
1156 | struct omap_mcbsp *mcbsp; | ||
1157 | u16 word_lsb, word_msb = 0; | ||
1158 | omap_mcbsp_word_length word_length; | ||
1159 | |||
1160 | if (!omap_mcbsp_check_valid_id(id)) { | ||
1161 | printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1); | ||
1162 | return -ENODEV; | ||
1163 | } | ||
1164 | mcbsp = id_to_mcbsp_ptr(id); | ||
1165 | |||
1166 | word_length = mcbsp->rx_word_length; | ||
1167 | |||
1168 | wait_for_completion(&mcbsp->rx_irq_completion); | ||
1169 | |||
1170 | if (word_length > OMAP_MCBSP_WORD_16) | ||
1171 | word_msb = MCBSP_READ(mcbsp, DRR2); | ||
1172 | word_lsb = MCBSP_READ(mcbsp, DRR1); | ||
1173 | |||
1174 | return (word_lsb | (word_msb << 16)); | ||
1175 | } | ||
1176 | EXPORT_SYMBOL(omap_mcbsp_recv_word); | ||
1177 | |||
1178 | int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word) | ||
1179 | { | ||
1180 | struct omap_mcbsp *mcbsp; | ||
1181 | omap_mcbsp_word_length tx_word_length; | ||
1182 | omap_mcbsp_word_length rx_word_length; | ||
1183 | u16 spcr2, spcr1, attempts = 0, word_lsb, word_msb = 0; | ||
1184 | |||
1185 | if (!omap_mcbsp_check_valid_id(id)) { | ||
1186 | printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1); | ||
1187 | return -ENODEV; | ||
1188 | } | ||
1189 | mcbsp = id_to_mcbsp_ptr(id); | ||
1190 | tx_word_length = mcbsp->tx_word_length; | ||
1191 | rx_word_length = mcbsp->rx_word_length; | ||
1192 | |||
1193 | if (tx_word_length != rx_word_length) | ||
1194 | return -EINVAL; | ||
1195 | |||
1196 | /* First we wait for the transmitter to be ready */ | ||
1197 | spcr2 = MCBSP_READ(mcbsp, SPCR2); | ||
1198 | while (!(spcr2 & XRDY)) { | ||
1199 | spcr2 = MCBSP_READ(mcbsp, SPCR2); | ||
1200 | if (attempts++ > 1000) { | ||
1201 | /* We must reset the transmitter */ | ||
1202 | MCBSP_WRITE(mcbsp, SPCR2, | ||
1203 | MCBSP_READ_CACHE(mcbsp, SPCR2) & (~XRST)); | ||
1204 | udelay(10); | ||
1205 | MCBSP_WRITE(mcbsp, SPCR2, | ||
1206 | MCBSP_READ_CACHE(mcbsp, SPCR2) | XRST); | ||
1207 | udelay(10); | ||
1208 | dev_err(mcbsp->dev, "McBSP%d transmitter not " | ||
1209 | "ready\n", mcbsp->id); | ||
1210 | return -EAGAIN; | ||
1211 | } | ||
1212 | } | ||
1213 | |||
1214 | /* Now we can push the data */ | ||
1215 | if (tx_word_length > OMAP_MCBSP_WORD_16) | ||
1216 | MCBSP_WRITE(mcbsp, DXR2, word >> 16); | ||
1217 | MCBSP_WRITE(mcbsp, DXR1, word & 0xffff); | ||
1218 | |||
1219 | /* We wait for the receiver to be ready */ | ||
1220 | spcr1 = MCBSP_READ(mcbsp, SPCR1); | ||
1221 | while (!(spcr1 & RRDY)) { | ||
1222 | spcr1 = MCBSP_READ(mcbsp, SPCR1); | ||
1223 | if (attempts++ > 1000) { | ||
1224 | /* We must reset the receiver */ | ||
1225 | MCBSP_WRITE(mcbsp, SPCR1, | ||
1226 | MCBSP_READ_CACHE(mcbsp, SPCR1) & (~RRST)); | ||
1227 | udelay(10); | ||
1228 | MCBSP_WRITE(mcbsp, SPCR1, | ||
1229 | MCBSP_READ_CACHE(mcbsp, SPCR1) | RRST); | ||
1230 | udelay(10); | ||
1231 | dev_err(mcbsp->dev, "McBSP%d receiver not " | ||
1232 | "ready\n", mcbsp->id); | ||
1233 | return -EAGAIN; | ||
1234 | } | ||
1235 | } | ||
1236 | |||
1237 | /* Receiver is ready, let's read the dummy data */ | ||
1238 | if (rx_word_length > OMAP_MCBSP_WORD_16) | ||
1239 | word_msb = MCBSP_READ(mcbsp, DRR2); | ||
1240 | word_lsb = MCBSP_READ(mcbsp, DRR1); | ||
1241 | |||
1242 | return 0; | ||
1243 | } | ||
1244 | EXPORT_SYMBOL(omap_mcbsp_spi_master_xmit_word_poll); | ||
1245 | |||
1246 | int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 *word) | ||
1247 | { | ||
1248 | struct omap_mcbsp *mcbsp; | ||
1249 | u32 clock_word = 0; | ||
1250 | omap_mcbsp_word_length tx_word_length; | ||
1251 | omap_mcbsp_word_length rx_word_length; | ||
1252 | u16 spcr2, spcr1, attempts = 0, word_lsb, word_msb = 0; | ||
1253 | |||
1254 | if (!omap_mcbsp_check_valid_id(id)) { | ||
1255 | printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1); | ||
1256 | return -ENODEV; | ||
1257 | } | ||
1258 | |||
1259 | mcbsp = id_to_mcbsp_ptr(id); | ||
1260 | |||
1261 | tx_word_length = mcbsp->tx_word_length; | ||
1262 | rx_word_length = mcbsp->rx_word_length; | ||
1263 | |||
1264 | if (tx_word_length != rx_word_length) | ||
1265 | return -EINVAL; | ||
1266 | |||
1267 | /* First we wait for the transmitter to be ready */ | ||
1268 | spcr2 = MCBSP_READ(mcbsp, SPCR2); | ||
1269 | while (!(spcr2 & XRDY)) { | ||
1270 | spcr2 = MCBSP_READ(mcbsp, SPCR2); | ||
1271 | if (attempts++ > 1000) { | ||
1272 | /* We must reset the transmitter */ | ||
1273 | MCBSP_WRITE(mcbsp, SPCR2, | ||
1274 | MCBSP_READ_CACHE(mcbsp, SPCR2) & (~XRST)); | ||
1275 | udelay(10); | ||
1276 | MCBSP_WRITE(mcbsp, SPCR2, | ||
1277 | MCBSP_READ_CACHE(mcbsp, SPCR2) | XRST); | ||
1278 | udelay(10); | ||
1279 | dev_err(mcbsp->dev, "McBSP%d transmitter not " | ||
1280 | "ready\n", mcbsp->id); | ||
1281 | return -EAGAIN; | ||
1282 | } | ||
1283 | } | ||
1284 | |||
1285 | /* We first need to enable the bus clock */ | ||
1286 | if (tx_word_length > OMAP_MCBSP_WORD_16) | ||
1287 | MCBSP_WRITE(mcbsp, DXR2, clock_word >> 16); | ||
1288 | MCBSP_WRITE(mcbsp, DXR1, clock_word & 0xffff); | ||
1289 | |||
1290 | /* We wait for the receiver to be ready */ | ||
1291 | spcr1 = MCBSP_READ(mcbsp, SPCR1); | ||
1292 | while (!(spcr1 & RRDY)) { | ||
1293 | spcr1 = MCBSP_READ(mcbsp, SPCR1); | ||
1294 | if (attempts++ > 1000) { | ||
1295 | /* We must reset the receiver */ | ||
1296 | MCBSP_WRITE(mcbsp, SPCR1, | ||
1297 | MCBSP_READ_CACHE(mcbsp, SPCR1) & (~RRST)); | ||
1298 | udelay(10); | ||
1299 | MCBSP_WRITE(mcbsp, SPCR1, | ||
1300 | MCBSP_READ_CACHE(mcbsp, SPCR1) | RRST); | ||
1301 | udelay(10); | ||
1302 | dev_err(mcbsp->dev, "McBSP%d receiver not " | ||
1303 | "ready\n", mcbsp->id); | ||
1304 | return -EAGAIN; | ||
1305 | } | ||
1306 | } | ||
1307 | |||
1308 | /* Receiver is ready, there is something for us */ | ||
1309 | if (rx_word_length > OMAP_MCBSP_WORD_16) | ||
1310 | word_msb = MCBSP_READ(mcbsp, DRR2); | ||
1311 | word_lsb = MCBSP_READ(mcbsp, DRR1); | ||
1312 | |||
1313 | word[0] = (word_lsb | (word_msb << 16)); | ||
1314 | |||
1315 | return 0; | ||
1316 | } | ||
1317 | EXPORT_SYMBOL(omap_mcbsp_spi_master_recv_word_poll); | ||
1318 | |||
1319 | /* | ||
1320 | * Simple DMA based buffer rx/tx routines. | ||
1321 | * Nothing fancy, just a single buffer tx/rx through DMA. | ||
1322 | * The DMA resources are released once the transfer is done. | ||
1323 | * For anything fancier, you should use your own customized DMA | ||
1324 | * routines and callbacks. | ||
1325 | */ | ||
1326 | int omap_mcbsp_xmit_buffer(unsigned int id, dma_addr_t buffer, | ||
1327 | unsigned int length) | ||
1328 | { | ||
1329 | struct omap_mcbsp *mcbsp; | ||
1330 | int dma_tx_ch; | ||
1331 | int src_port = 0; | ||
1332 | int dest_port = 0; | ||
1333 | int sync_dev = 0; | ||
1334 | |||
1335 | if (!omap_mcbsp_check_valid_id(id)) { | ||
1336 | printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1); | ||
1337 | return -ENODEV; | ||
1338 | } | ||
1339 | mcbsp = id_to_mcbsp_ptr(id); | ||
1340 | |||
1341 | if (omap_request_dma(mcbsp->dma_tx_sync, "McBSP TX", | ||
1342 | omap_mcbsp_tx_dma_callback, | ||
1343 | mcbsp, | ||
1344 | &dma_tx_ch)) { | ||
1345 | dev_err(mcbsp->dev, " Unable to request DMA channel for " | ||
1346 | "McBSP%d TX. Trying IRQ based TX\n", | ||
1347 | mcbsp->id); | ||
1348 | return -EAGAIN; | ||
1349 | } | ||
1350 | mcbsp->dma_tx_lch = dma_tx_ch; | ||
1351 | |||
1352 | dev_err(mcbsp->dev, "McBSP%d TX DMA on channel %d\n", mcbsp->id, | ||
1353 | dma_tx_ch); | ||
1354 | |||
1355 | init_completion(&mcbsp->tx_dma_completion); | ||
1356 | |||
1357 | if (cpu_class_is_omap1()) { | ||
1358 | src_port = OMAP_DMA_PORT_TIPB; | ||
1359 | dest_port = OMAP_DMA_PORT_EMIFF; | ||
1360 | } | ||
1361 | if (cpu_class_is_omap2()) | ||
1362 | sync_dev = mcbsp->dma_tx_sync; | ||
1363 | |||
1364 | omap_set_dma_transfer_params(mcbsp->dma_tx_lch, | ||
1365 | OMAP_DMA_DATA_TYPE_S16, | ||
1366 | length >> 1, 1, | ||
1367 | OMAP_DMA_SYNC_ELEMENT, | ||
1368 | sync_dev, 0); | ||
1369 | |||
1370 | omap_set_dma_dest_params(mcbsp->dma_tx_lch, | ||
1371 | src_port, | ||
1372 | OMAP_DMA_AMODE_CONSTANT, | ||
1373 | mcbsp->phys_base + OMAP_MCBSP_REG_DXR1, | ||
1374 | 0, 0); | ||
1375 | |||
1376 | omap_set_dma_src_params(mcbsp->dma_tx_lch, | ||
1377 | dest_port, | ||
1378 | OMAP_DMA_AMODE_POST_INC, | ||
1379 | buffer, | ||
1380 | 0, 0); | ||
1381 | |||
1382 | omap_start_dma(mcbsp->dma_tx_lch); | ||
1383 | wait_for_completion(&mcbsp->tx_dma_completion); | ||
1384 | |||
1385 | return 0; | ||
1386 | } | ||
1387 | EXPORT_SYMBOL(omap_mcbsp_xmit_buffer); | ||
1388 | |||
1389 | int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer, | ||
1390 | unsigned int length) | ||
1391 | { | ||
1392 | struct omap_mcbsp *mcbsp; | ||
1393 | int dma_rx_ch; | ||
1394 | int src_port = 0; | ||
1395 | int dest_port = 0; | ||
1396 | int sync_dev = 0; | ||
1397 | |||
1398 | if (!omap_mcbsp_check_valid_id(id)) { | ||
1399 | printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1); | ||
1400 | return -ENODEV; | ||
1401 | } | ||
1402 | mcbsp = id_to_mcbsp_ptr(id); | ||
1403 | |||
1404 | if (omap_request_dma(mcbsp->dma_rx_sync, "McBSP RX", | ||
1405 | omap_mcbsp_rx_dma_callback, | ||
1406 | mcbsp, | ||
1407 | &dma_rx_ch)) { | ||
1408 | dev_err(mcbsp->dev, "Unable to request DMA channel for " | ||
1409 | "McBSP%d RX. Trying IRQ based RX\n", | ||
1410 | mcbsp->id); | ||
1411 | return -EAGAIN; | ||
1412 | } | ||
1413 | mcbsp->dma_rx_lch = dma_rx_ch; | ||
1414 | |||
1415 | dev_err(mcbsp->dev, "McBSP%d RX DMA on channel %d\n", mcbsp->id, | ||
1416 | dma_rx_ch); | ||
1417 | |||
1418 | init_completion(&mcbsp->rx_dma_completion); | ||
1419 | |||
1420 | if (cpu_class_is_omap1()) { | ||
1421 | src_port = OMAP_DMA_PORT_TIPB; | ||
1422 | dest_port = OMAP_DMA_PORT_EMIFF; | ||
1423 | } | ||
1424 | if (cpu_class_is_omap2()) | ||
1425 | sync_dev = mcbsp->dma_rx_sync; | ||
1426 | |||
1427 | omap_set_dma_transfer_params(mcbsp->dma_rx_lch, | ||
1428 | OMAP_DMA_DATA_TYPE_S16, | ||
1429 | length >> 1, 1, | ||
1430 | OMAP_DMA_SYNC_ELEMENT, | ||
1431 | sync_dev, 0); | ||
1432 | |||
1433 | omap_set_dma_src_params(mcbsp->dma_rx_lch, | ||
1434 | src_port, | ||
1435 | OMAP_DMA_AMODE_CONSTANT, | ||
1436 | mcbsp->phys_base + OMAP_MCBSP_REG_DRR1, | ||
1437 | 0, 0); | ||
1438 | |||
1439 | omap_set_dma_dest_params(mcbsp->dma_rx_lch, | ||
1440 | dest_port, | ||
1441 | OMAP_DMA_AMODE_POST_INC, | ||
1442 | buffer, | ||
1443 | 0, 0); | ||
1444 | |||
1445 | omap_start_dma(mcbsp->dma_rx_lch); | ||
1446 | wait_for_completion(&mcbsp->rx_dma_completion); | ||
1447 | |||
1448 | return 0; | ||
1449 | } | ||
1450 | EXPORT_SYMBOL(omap_mcbsp_recv_buffer); | ||
1451 | |||
1452 | /* | ||
1453 | * SPI wrapper. | ||
1454 | * Since SPI setup is much simpler than the generic McBSP one, | ||
1455 | * this wrapper just need an omap_mcbsp_spi_cfg structure as an input. | ||
1456 | * Once this is done, you can call omap_mcbsp_start(). | ||
1457 | */ | ||
1458 | void omap_mcbsp_set_spi_mode(unsigned int id, | ||
1459 | const struct omap_mcbsp_spi_cfg *spi_cfg) | ||
1460 | { | ||
1461 | struct omap_mcbsp *mcbsp; | ||
1462 | struct omap_mcbsp_reg_cfg mcbsp_cfg; | ||
1463 | |||
1464 | if (!omap_mcbsp_check_valid_id(id)) { | ||
1465 | printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1); | ||
1466 | return; | ||
1467 | } | ||
1468 | mcbsp = id_to_mcbsp_ptr(id); | ||
1469 | |||
1470 | memset(&mcbsp_cfg, 0, sizeof(struct omap_mcbsp_reg_cfg)); | ||
1471 | |||
1472 | /* SPI has only one frame */ | ||
1473 | mcbsp_cfg.rcr1 |= (RWDLEN1(spi_cfg->word_length) | RFRLEN1(0)); | ||
1474 | mcbsp_cfg.xcr1 |= (XWDLEN1(spi_cfg->word_length) | XFRLEN1(0)); | ||
1475 | |||
1476 | /* Clock stop mode */ | ||
1477 | if (spi_cfg->clk_stp_mode == OMAP_MCBSP_CLK_STP_MODE_NO_DELAY) | ||
1478 | mcbsp_cfg.spcr1 |= (1 << 12); | ||
1479 | else | ||
1480 | mcbsp_cfg.spcr1 |= (3 << 11); | ||
1481 | |||
1482 | /* Set clock parities */ | ||
1483 | if (spi_cfg->rx_clock_polarity == OMAP_MCBSP_CLK_RISING) | ||
1484 | mcbsp_cfg.pcr0 |= CLKRP; | ||
1485 | else | ||
1486 | mcbsp_cfg.pcr0 &= ~CLKRP; | ||
1487 | |||
1488 | if (spi_cfg->tx_clock_polarity == OMAP_MCBSP_CLK_RISING) | ||
1489 | mcbsp_cfg.pcr0 &= ~CLKXP; | ||
1490 | else | ||
1491 | mcbsp_cfg.pcr0 |= CLKXP; | ||
1492 | |||
1493 | /* Set SCLKME to 0 and CLKSM to 1 */ | ||
1494 | mcbsp_cfg.pcr0 &= ~SCLKME; | ||
1495 | mcbsp_cfg.srgr2 |= CLKSM; | ||
1496 | |||
1497 | /* Set FSXP */ | ||
1498 | if (spi_cfg->fsx_polarity == OMAP_MCBSP_FS_ACTIVE_HIGH) | ||
1499 | mcbsp_cfg.pcr0 &= ~FSXP; | ||
1500 | else | ||
1501 | mcbsp_cfg.pcr0 |= FSXP; | ||
1502 | |||
1503 | if (spi_cfg->spi_mode == OMAP_MCBSP_SPI_MASTER) { | ||
1504 | mcbsp_cfg.pcr0 |= CLKXM; | ||
1505 | mcbsp_cfg.srgr1 |= CLKGDV(spi_cfg->clk_div - 1); | ||
1506 | mcbsp_cfg.pcr0 |= FSXM; | ||
1507 | mcbsp_cfg.srgr2 &= ~FSGM; | ||
1508 | mcbsp_cfg.xcr2 |= XDATDLY(1); | ||
1509 | mcbsp_cfg.rcr2 |= RDATDLY(1); | ||
1510 | } else { | ||
1511 | mcbsp_cfg.pcr0 &= ~CLKXM; | ||
1512 | mcbsp_cfg.srgr1 |= CLKGDV(1); | ||
1513 | mcbsp_cfg.pcr0 &= ~FSXM; | ||
1514 | mcbsp_cfg.xcr2 &= ~XDATDLY(3); | ||
1515 | mcbsp_cfg.rcr2 &= ~RDATDLY(3); | ||
1516 | } | ||
1517 | |||
1518 | mcbsp_cfg.xcr2 &= ~XPHASE; | ||
1519 | mcbsp_cfg.rcr2 &= ~RPHASE; | ||
1520 | |||
1521 | omap_mcbsp_config(id, &mcbsp_cfg); | ||
1522 | } | ||
1523 | EXPORT_SYMBOL(omap_mcbsp_set_spi_mode); | ||
1524 | |||
1525 | #ifdef CONFIG_ARCH_OMAP3 | 969 | #ifdef CONFIG_ARCH_OMAP3 |
1526 | #define max_thres(m) (mcbsp->pdata->buffer_size) | 970 | #define max_thres(m) (mcbsp->pdata->buffer_size) |
1527 | #define valid_threshold(m, val) ((val) <= max_thres(m)) | 971 | #define valid_threshold(m, val) ((val) <= max_thres(m)) |
@@ -1833,8 +1277,6 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev) | |||
1833 | spin_lock_init(&mcbsp->lock); | 1277 | spin_lock_init(&mcbsp->lock); |
1834 | mcbsp->id = id + 1; | 1278 | mcbsp->id = id + 1; |
1835 | mcbsp->free = true; | 1279 | mcbsp->free = true; |
1836 | mcbsp->dma_tx_lch = -1; | ||
1837 | mcbsp->dma_rx_lch = -1; | ||
1838 | 1280 | ||
1839 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu"); | 1281 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu"); |
1840 | if (!res) { | 1282 | if (!res) { |
@@ -1860,9 +1302,6 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev) | |||
1860 | else | 1302 | else |
1861 | mcbsp->phys_dma_base = res->start; | 1303 | mcbsp->phys_dma_base = res->start; |
1862 | 1304 | ||
1863 | /* Default I/O is IRQ based */ | ||
1864 | mcbsp->io_type = OMAP_MCBSP_IRQ_IO; | ||
1865 | |||
1866 | mcbsp->tx_irq = platform_get_irq_byname(pdev, "tx"); | 1305 | mcbsp->tx_irq = platform_get_irq_byname(pdev, "tx"); |
1867 | mcbsp->rx_irq = platform_get_irq_byname(pdev, "rx"); | 1306 | mcbsp->rx_irq = platform_get_irq_byname(pdev, "rx"); |
1868 | 1307 | ||
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index 2526fa312b8a..3471c650743b 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -236,11 +236,6 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat) | |||
236 | return 0; | 236 | return 0; |
237 | } | 237 | } |
238 | 238 | ||
239 | static inline struct omap_device *_find_by_pdev(struct platform_device *pdev) | ||
240 | { | ||
241 | return container_of(pdev, struct omap_device, pdev); | ||
242 | } | ||
243 | |||
244 | /** | 239 | /** |
245 | * _add_optional_clock_clkdev - Add clkdev entry for hwmod optional clocks | 240 | * _add_optional_clock_clkdev - Add clkdev entry for hwmod optional clocks |
246 | * @od: struct omap_device *od | 241 | * @od: struct omap_device *od |
@@ -316,7 +311,7 @@ u32 omap_device_get_context_loss_count(struct platform_device *pdev) | |||
316 | struct omap_device *od; | 311 | struct omap_device *od; |
317 | u32 ret = 0; | 312 | u32 ret = 0; |
318 | 313 | ||
319 | od = _find_by_pdev(pdev); | 314 | od = to_omap_device(pdev); |
320 | 315 | ||
321 | if (od->hwmods_cnt) | 316 | if (od->hwmods_cnt) |
322 | ret = omap_hwmod_get_context_loss_count(od->hwmods[0]); | 317 | ret = omap_hwmod_get_context_loss_count(od->hwmods[0]); |
@@ -654,7 +649,7 @@ int omap_device_enable(struct platform_device *pdev) | |||
654 | int ret; | 649 | int ret; |
655 | struct omap_device *od; | 650 | struct omap_device *od; |
656 | 651 | ||
657 | od = _find_by_pdev(pdev); | 652 | od = to_omap_device(pdev); |
658 | 653 | ||
659 | if (od->_state == OMAP_DEVICE_STATE_ENABLED) { | 654 | if (od->_state == OMAP_DEVICE_STATE_ENABLED) { |
660 | WARN(1, "omap_device: %s.%d: %s() called from invalid state %d\n", | 655 | WARN(1, "omap_device: %s.%d: %s() called from invalid state %d\n", |
@@ -693,7 +688,7 @@ int omap_device_idle(struct platform_device *pdev) | |||
693 | int ret; | 688 | int ret; |
694 | struct omap_device *od; | 689 | struct omap_device *od; |
695 | 690 | ||
696 | od = _find_by_pdev(pdev); | 691 | od = to_omap_device(pdev); |
697 | 692 | ||
698 | if (od->_state != OMAP_DEVICE_STATE_ENABLED) { | 693 | if (od->_state != OMAP_DEVICE_STATE_ENABLED) { |
699 | WARN(1, "omap_device: %s.%d: %s() called from invalid state %d\n", | 694 | WARN(1, "omap_device: %s.%d: %s() called from invalid state %d\n", |
@@ -724,7 +719,7 @@ int omap_device_shutdown(struct platform_device *pdev) | |||
724 | int ret, i; | 719 | int ret, i; |
725 | struct omap_device *od; | 720 | struct omap_device *od; |
726 | 721 | ||
727 | od = _find_by_pdev(pdev); | 722 | od = to_omap_device(pdev); |
728 | 723 | ||
729 | if (od->_state != OMAP_DEVICE_STATE_ENABLED && | 724 | if (od->_state != OMAP_DEVICE_STATE_ENABLED && |
730 | od->_state != OMAP_DEVICE_STATE_IDLE) { | 725 | od->_state != OMAP_DEVICE_STATE_IDLE) { |
@@ -765,7 +760,7 @@ int omap_device_align_pm_lat(struct platform_device *pdev, | |||
765 | int ret = -EINVAL; | 760 | int ret = -EINVAL; |
766 | struct omap_device *od; | 761 | struct omap_device *od; |
767 | 762 | ||
768 | od = _find_by_pdev(pdev); | 763 | od = to_omap_device(pdev); |
769 | 764 | ||
770 | if (new_wakeup_lat_limit == od->dev_wakeup_lat) | 765 | if (new_wakeup_lat_limit == od->dev_wakeup_lat) |
771 | return 0; | 766 | return 0; |
diff --git a/arch/arm/plat-s3c24xx/clock-dclk.c b/arch/arm/plat-s3c24xx/clock-dclk.c index cf97caafe56b..f95d3268ae1f 100644 --- a/arch/arm/plat-s3c24xx/clock-dclk.c +++ b/arch/arm/plat-s3c24xx/clock-dclk.c | |||
@@ -169,7 +169,6 @@ static struct clk_ops dclk_ops = { | |||
169 | 169 | ||
170 | struct clk s3c24xx_dclk0 = { | 170 | struct clk s3c24xx_dclk0 = { |
171 | .name = "dclk0", | 171 | .name = "dclk0", |
172 | .id = -1, | ||
173 | .ctrlbit = S3C2410_DCLKCON_DCLK0EN, | 172 | .ctrlbit = S3C2410_DCLKCON_DCLK0EN, |
174 | .enable = s3c24xx_dclk_enable, | 173 | .enable = s3c24xx_dclk_enable, |
175 | .ops = &dclk_ops, | 174 | .ops = &dclk_ops, |
@@ -177,7 +176,6 @@ struct clk s3c24xx_dclk0 = { | |||
177 | 176 | ||
178 | struct clk s3c24xx_dclk1 = { | 177 | struct clk s3c24xx_dclk1 = { |
179 | .name = "dclk1", | 178 | .name = "dclk1", |
180 | .id = -1, | ||
181 | .ctrlbit = S3C2410_DCLKCON_DCLK1EN, | 179 | .ctrlbit = S3C2410_DCLKCON_DCLK1EN, |
182 | .enable = s3c24xx_dclk_enable, | 180 | .enable = s3c24xx_dclk_enable, |
183 | .ops = &dclk_ops, | 181 | .ops = &dclk_ops, |
@@ -189,12 +187,10 @@ static struct clk_ops clkout_ops = { | |||
189 | 187 | ||
190 | struct clk s3c24xx_clkout0 = { | 188 | struct clk s3c24xx_clkout0 = { |
191 | .name = "clkout0", | 189 | .name = "clkout0", |
192 | .id = -1, | ||
193 | .ops = &clkout_ops, | 190 | .ops = &clkout_ops, |
194 | }; | 191 | }; |
195 | 192 | ||
196 | struct clk s3c24xx_clkout1 = { | 193 | struct clk s3c24xx_clkout1 = { |
197 | .name = "clkout1", | 194 | .name = "clkout1", |
198 | .id = -1, | ||
199 | .ops = &clkout_ops, | 195 | .ops = &clkout_ops, |
200 | }; | 196 | }; |
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c index 73667994518a..a76bf2df3333 100644 --- a/arch/arm/plat-s3c24xx/devs.c +++ b/arch/arm/plat-s3c24xx/devs.c | |||
@@ -150,9 +150,8 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd) | |||
150 | { | 150 | { |
151 | struct s3c2410fb_mach_info *npd; | 151 | struct s3c2410fb_mach_info *npd; |
152 | 152 | ||
153 | npd = kmemdup(pd, sizeof(*npd), GFP_KERNEL); | 153 | npd = s3c_set_platdata(pd, sizeof(*npd), &s3c_device_lcd); |
154 | if (npd) { | 154 | if (npd) { |
155 | s3c_device_lcd.dev.platform_data = npd; | ||
156 | npd->displays = kmemdup(pd->displays, | 155 | npd->displays = kmemdup(pd->displays, |
157 | sizeof(struct s3c2410fb_display) * npd->num_displays, | 156 | sizeof(struct s3c2410fb_display) * npd->num_displays, |
158 | GFP_KERNEL); | 157 | GFP_KERNEL); |
@@ -188,12 +187,10 @@ struct platform_device s3c_device_ts = { | |||
188 | }; | 187 | }; |
189 | EXPORT_SYMBOL(s3c_device_ts); | 188 | EXPORT_SYMBOL(s3c_device_ts); |
190 | 189 | ||
191 | static struct s3c2410_ts_mach_info s3c2410ts_info; | ||
192 | |||
193 | void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *hard_s3c2410ts_info) | 190 | void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *hard_s3c2410ts_info) |
194 | { | 191 | { |
195 | memcpy(&s3c2410ts_info, hard_s3c2410ts_info, sizeof(struct s3c2410_ts_mach_info)); | 192 | s3c_set_platdata(hard_s3c2410ts_info, |
196 | s3c_device_ts.dev.platform_data = &s3c2410ts_info; | 193 | sizeof(struct s3c2410_ts_mach_info), &s3c_device_ts); |
197 | } | 194 | } |
198 | 195 | ||
199 | /* USB Device (Gadget)*/ | 196 | /* USB Device (Gadget)*/ |
@@ -223,15 +220,7 @@ EXPORT_SYMBOL(s3c_device_usbgadget); | |||
223 | 220 | ||
224 | void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *pd) | 221 | void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *pd) |
225 | { | 222 | { |
226 | struct s3c2410_udc_mach_info *npd; | 223 | s3c_set_platdata(pd, sizeof(*pd), &s3c_device_usbgadget); |
227 | |||
228 | npd = kmalloc(sizeof(*npd), GFP_KERNEL); | ||
229 | if (npd) { | ||
230 | memcpy(npd, pd, sizeof(*npd)); | ||
231 | s3c_device_usbgadget.dev.platform_data = npd; | ||
232 | } else { | ||
233 | printk(KERN_ERR "no memory for udc platform data\n"); | ||
234 | } | ||
235 | } | 224 | } |
236 | 225 | ||
237 | /* USB High Speed 2.0 Device (Gadget) */ | 226 | /* USB High Speed 2.0 Device (Gadget) */ |
@@ -263,15 +252,7 @@ struct platform_device s3c_device_usb_hsudc = { | |||
263 | 252 | ||
264 | void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd) | 253 | void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd) |
265 | { | 254 | { |
266 | struct s3c24xx_hsudc_platdata *npd; | 255 | s3c_set_platdata(pd, sizeof(*pd), &s3c_device_usb_hsudc); |
267 | |||
268 | npd = kmalloc(sizeof(*npd), GFP_KERNEL); | ||
269 | if (npd) { | ||
270 | memcpy(npd, pd, sizeof(*npd)); | ||
271 | s3c_device_usb_hsudc.dev.platform_data = npd; | ||
272 | } else { | ||
273 | printk(KERN_ERR "no memory for udc platform data\n"); | ||
274 | } | ||
275 | } | 256 | } |
276 | 257 | ||
277 | /* IIS */ | 258 | /* IIS */ |
@@ -383,13 +364,8 @@ EXPORT_SYMBOL(s3c_device_sdi); | |||
383 | 364 | ||
384 | void __init s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata) | 365 | void __init s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata) |
385 | { | 366 | { |
386 | struct s3c24xx_mci_pdata *npd; | 367 | s3c_set_platdata(pdata, sizeof(struct s3c24xx_mci_pdata), |
387 | 368 | &s3c_device_sdi); | |
388 | npd = kmemdup(pdata, sizeof(struct s3c24xx_mci_pdata), GFP_KERNEL); | ||
389 | if (!npd) | ||
390 | printk(KERN_ERR "%s: no memory to copy pdata", __func__); | ||
391 | |||
392 | s3c_device_sdi.dev.platform_data = npd; | ||
393 | } | 369 | } |
394 | 370 | ||
395 | 371 | ||
diff --git a/arch/arm/plat-s3c24xx/include/mach/clkdev.h b/arch/arm/plat-s3c24xx/include/mach/clkdev.h new file mode 100644 index 000000000000..7dffa83d23ff --- /dev/null +++ b/arch/arm/plat-s3c24xx/include/mach/clkdev.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __MACH_CLKDEV_H__ | ||
2 | #define __MACH_CLKDEV_H__ | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do {} while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/plat-s3c24xx/s3c2410-clock.c b/arch/arm/plat-s3c24xx/s3c2410-clock.c index 9ecc5d913679..def76aa3825a 100644 --- a/arch/arm/plat-s3c24xx/s3c2410-clock.c +++ b/arch/arm/plat-s3c24xx/s3c2410-clock.c | |||
@@ -90,37 +90,31 @@ static int s3c2410_upll_enable(struct clk *clk, int enable) | |||
90 | static struct clk init_clocks_off[] = { | 90 | static struct clk init_clocks_off[] = { |
91 | { | 91 | { |
92 | .name = "nand", | 92 | .name = "nand", |
93 | .id = -1, | ||
94 | .parent = &clk_h, | 93 | .parent = &clk_h, |
95 | .enable = s3c2410_clkcon_enable, | 94 | .enable = s3c2410_clkcon_enable, |
96 | .ctrlbit = S3C2410_CLKCON_NAND, | 95 | .ctrlbit = S3C2410_CLKCON_NAND, |
97 | }, { | 96 | }, { |
98 | .name = "sdi", | 97 | .name = "sdi", |
99 | .id = -1, | ||
100 | .parent = &clk_p, | 98 | .parent = &clk_p, |
101 | .enable = s3c2410_clkcon_enable, | 99 | .enable = s3c2410_clkcon_enable, |
102 | .ctrlbit = S3C2410_CLKCON_SDI, | 100 | .ctrlbit = S3C2410_CLKCON_SDI, |
103 | }, { | 101 | }, { |
104 | .name = "adc", | 102 | .name = "adc", |
105 | .id = -1, | ||
106 | .parent = &clk_p, | 103 | .parent = &clk_p, |
107 | .enable = s3c2410_clkcon_enable, | 104 | .enable = s3c2410_clkcon_enable, |
108 | .ctrlbit = S3C2410_CLKCON_ADC, | 105 | .ctrlbit = S3C2410_CLKCON_ADC, |
109 | }, { | 106 | }, { |
110 | .name = "i2c", | 107 | .name = "i2c", |
111 | .id = -1, | ||
112 | .parent = &clk_p, | 108 | .parent = &clk_p, |
113 | .enable = s3c2410_clkcon_enable, | 109 | .enable = s3c2410_clkcon_enable, |
114 | .ctrlbit = S3C2410_CLKCON_IIC, | 110 | .ctrlbit = S3C2410_CLKCON_IIC, |
115 | }, { | 111 | }, { |
116 | .name = "iis", | 112 | .name = "iis", |
117 | .id = -1, | ||
118 | .parent = &clk_p, | 113 | .parent = &clk_p, |
119 | .enable = s3c2410_clkcon_enable, | 114 | .enable = s3c2410_clkcon_enable, |
120 | .ctrlbit = S3C2410_CLKCON_IIS, | 115 | .ctrlbit = S3C2410_CLKCON_IIS, |
121 | }, { | 116 | }, { |
122 | .name = "spi", | 117 | .name = "spi", |
123 | .id = -1, | ||
124 | .parent = &clk_p, | 118 | .parent = &clk_p, |
125 | .enable = s3c2410_clkcon_enable, | 119 | .enable = s3c2410_clkcon_enable, |
126 | .ctrlbit = S3C2410_CLKCON_SPI, | 120 | .ctrlbit = S3C2410_CLKCON_SPI, |
@@ -130,70 +124,61 @@ static struct clk init_clocks_off[] = { | |||
130 | static struct clk init_clocks[] = { | 124 | static struct clk init_clocks[] = { |
131 | { | 125 | { |
132 | .name = "lcd", | 126 | .name = "lcd", |
133 | .id = -1, | ||
134 | .parent = &clk_h, | 127 | .parent = &clk_h, |
135 | .enable = s3c2410_clkcon_enable, | 128 | .enable = s3c2410_clkcon_enable, |
136 | .ctrlbit = S3C2410_CLKCON_LCDC, | 129 | .ctrlbit = S3C2410_CLKCON_LCDC, |
137 | }, { | 130 | }, { |
138 | .name = "gpio", | 131 | .name = "gpio", |
139 | .id = -1, | ||
140 | .parent = &clk_p, | 132 | .parent = &clk_p, |
141 | .enable = s3c2410_clkcon_enable, | 133 | .enable = s3c2410_clkcon_enable, |
142 | .ctrlbit = S3C2410_CLKCON_GPIO, | 134 | .ctrlbit = S3C2410_CLKCON_GPIO, |
143 | }, { | 135 | }, { |
144 | .name = "usb-host", | 136 | .name = "usb-host", |
145 | .id = -1, | ||
146 | .parent = &clk_h, | 137 | .parent = &clk_h, |
147 | .enable = s3c2410_clkcon_enable, | 138 | .enable = s3c2410_clkcon_enable, |
148 | .ctrlbit = S3C2410_CLKCON_USBH, | 139 | .ctrlbit = S3C2410_CLKCON_USBH, |
149 | }, { | 140 | }, { |
150 | .name = "usb-device", | 141 | .name = "usb-device", |
151 | .id = -1, | ||
152 | .parent = &clk_h, | 142 | .parent = &clk_h, |
153 | .enable = s3c2410_clkcon_enable, | 143 | .enable = s3c2410_clkcon_enable, |
154 | .ctrlbit = S3C2410_CLKCON_USBD, | 144 | .ctrlbit = S3C2410_CLKCON_USBD, |
155 | }, { | 145 | }, { |
156 | .name = "timers", | 146 | .name = "timers", |
157 | .id = -1, | ||
158 | .parent = &clk_p, | 147 | .parent = &clk_p, |
159 | .enable = s3c2410_clkcon_enable, | 148 | .enable = s3c2410_clkcon_enable, |
160 | .ctrlbit = S3C2410_CLKCON_PWMT, | 149 | .ctrlbit = S3C2410_CLKCON_PWMT, |
161 | }, { | 150 | }, { |
162 | .name = "uart", | 151 | .name = "uart", |
163 | .id = 0, | 152 | .devname = "s3c2410-uart.0", |
164 | .parent = &clk_p, | 153 | .parent = &clk_p, |
165 | .enable = s3c2410_clkcon_enable, | 154 | .enable = s3c2410_clkcon_enable, |
166 | .ctrlbit = S3C2410_CLKCON_UART0, | 155 | .ctrlbit = S3C2410_CLKCON_UART0, |
167 | }, { | 156 | }, { |
168 | .name = "uart", | 157 | .name = "uart", |
169 | .id = 1, | 158 | .devname = "s3c2410-uart.1", |
170 | .parent = &clk_p, | 159 | .parent = &clk_p, |
171 | .enable = s3c2410_clkcon_enable, | 160 | .enable = s3c2410_clkcon_enable, |
172 | .ctrlbit = S3C2410_CLKCON_UART1, | 161 | .ctrlbit = S3C2410_CLKCON_UART1, |
173 | }, { | 162 | }, { |
174 | .name = "uart", | 163 | .name = "uart", |
175 | .id = 2, | 164 | .devname = "s3c2410-uart.2", |
176 | .parent = &clk_p, | 165 | .parent = &clk_p, |
177 | .enable = s3c2410_clkcon_enable, | 166 | .enable = s3c2410_clkcon_enable, |
178 | .ctrlbit = S3C2410_CLKCON_UART2, | 167 | .ctrlbit = S3C2410_CLKCON_UART2, |
179 | }, { | 168 | }, { |
180 | .name = "rtc", | 169 | .name = "rtc", |
181 | .id = -1, | ||
182 | .parent = &clk_p, | 170 | .parent = &clk_p, |
183 | .enable = s3c2410_clkcon_enable, | 171 | .enable = s3c2410_clkcon_enable, |
184 | .ctrlbit = S3C2410_CLKCON_RTC, | 172 | .ctrlbit = S3C2410_CLKCON_RTC, |
185 | }, { | 173 | }, { |
186 | .name = "watchdog", | 174 | .name = "watchdog", |
187 | .id = -1, | ||
188 | .parent = &clk_p, | 175 | .parent = &clk_p, |
189 | .ctrlbit = 0, | 176 | .ctrlbit = 0, |
190 | }, { | 177 | }, { |
191 | .name = "usb-bus-host", | 178 | .name = "usb-bus-host", |
192 | .id = -1, | ||
193 | .parent = &clk_usb_bus, | 179 | .parent = &clk_usb_bus, |
194 | }, { | 180 | }, { |
195 | .name = "usb-bus-gadget", | 181 | .name = "usb-bus-gadget", |
196 | .id = -1, | ||
197 | .parent = &clk_usb_bus, | 182 | .parent = &clk_usb_bus, |
198 | }, | 183 | }, |
199 | }; | 184 | }; |
diff --git a/arch/arm/plat-s3c24xx/s3c2443-clock.c b/arch/arm/plat-s3c24xx/s3c2443-clock.c index 82f2d4a39291..59552c0ea5fb 100644 --- a/arch/arm/plat-s3c24xx/s3c2443-clock.c +++ b/arch/arm/plat-s3c24xx/s3c2443-clock.c | |||
@@ -56,7 +56,6 @@ int s3c2443_clkcon_enable_s(struct clk *clk, int enable) | |||
56 | struct clk clk_mpllref = { | 56 | struct clk clk_mpllref = { |
57 | .name = "mpllref", | 57 | .name = "mpllref", |
58 | .parent = &clk_xtal, | 58 | .parent = &clk_xtal, |
59 | .id = -1, | ||
60 | }; | 59 | }; |
61 | 60 | ||
62 | static struct clk *clk_epllref_sources[] = { | 61 | static struct clk *clk_epllref_sources[] = { |
@@ -69,7 +68,6 @@ static struct clk *clk_epllref_sources[] = { | |||
69 | struct clksrc_clk clk_epllref = { | 68 | struct clksrc_clk clk_epllref = { |
70 | .clk = { | 69 | .clk = { |
71 | .name = "epllref", | 70 | .name = "epllref", |
72 | .id = -1, | ||
73 | }, | 71 | }, |
74 | .sources = &(struct clksrc_sources) { | 72 | .sources = &(struct clksrc_sources) { |
75 | .sources = clk_epllref_sources, | 73 | .sources = clk_epllref_sources, |
@@ -92,7 +90,6 @@ struct clksrc_clk clk_esysclk = { | |||
92 | .clk = { | 90 | .clk = { |
93 | .name = "esysclk", | 91 | .name = "esysclk", |
94 | .parent = &clk_epll, | 92 | .parent = &clk_epll, |
95 | .id = -1, | ||
96 | }, | 93 | }, |
97 | .sources = &(struct clksrc_sources) { | 94 | .sources = &(struct clksrc_sources) { |
98 | .sources = clk_sysclk_sources, | 95 | .sources = clk_sysclk_sources, |
@@ -115,7 +112,6 @@ static unsigned long s3c2443_getrate_mdivclk(struct clk *clk) | |||
115 | static struct clk clk_mdivclk = { | 112 | static struct clk clk_mdivclk = { |
116 | .name = "mdivclk", | 113 | .name = "mdivclk", |
117 | .parent = &clk_mpllref, | 114 | .parent = &clk_mpllref, |
118 | .id = -1, | ||
119 | .ops = &(struct clk_ops) { | 115 | .ops = &(struct clk_ops) { |
120 | .get_rate = s3c2443_getrate_mdivclk, | 116 | .get_rate = s3c2443_getrate_mdivclk, |
121 | }, | 117 | }, |
@@ -132,7 +128,6 @@ struct clksrc_clk clk_msysclk = { | |||
132 | .clk = { | 128 | .clk = { |
133 | .name = "msysclk", | 129 | .name = "msysclk", |
134 | .parent = &clk_xtal, | 130 | .parent = &clk_xtal, |
135 | .id = -1, | ||
136 | }, | 131 | }, |
137 | .sources = &(struct clksrc_sources) { | 132 | .sources = &(struct clksrc_sources) { |
138 | .sources = clk_msysclk_sources, | 133 | .sources = clk_msysclk_sources, |
@@ -159,7 +154,6 @@ static unsigned long s3c2443_prediv_getrate(struct clk *clk) | |||
159 | 154 | ||
160 | static struct clk clk_prediv = { | 155 | static struct clk clk_prediv = { |
161 | .name = "prediv", | 156 | .name = "prediv", |
162 | .id = -1, | ||
163 | .parent = &clk_msysclk.clk, | 157 | .parent = &clk_msysclk.clk, |
164 | .ops = &(struct clk_ops) { | 158 | .ops = &(struct clk_ops) { |
165 | .get_rate = s3c2443_prediv_getrate, | 159 | .get_rate = s3c2443_prediv_getrate, |
@@ -174,7 +168,6 @@ static struct clk clk_prediv = { | |||
174 | static struct clksrc_clk clk_usb_bus_host = { | 168 | static struct clksrc_clk clk_usb_bus_host = { |
175 | .clk = { | 169 | .clk = { |
176 | .name = "usb-bus-host-parent", | 170 | .name = "usb-bus-host-parent", |
177 | .id = -1, | ||
178 | .parent = &clk_esysclk.clk, | 171 | .parent = &clk_esysclk.clk, |
179 | .ctrlbit = S3C2443_SCLKCON_USBHOST, | 172 | .ctrlbit = S3C2443_SCLKCON_USBHOST, |
180 | .enable = s3c2443_clkcon_enable_s, | 173 | .enable = s3c2443_clkcon_enable_s, |
@@ -189,7 +182,6 @@ static struct clksrc_clk clksrc_clks[] = { | |||
189 | /* ART baud-rate clock sourced from esysclk via a divisor */ | 182 | /* ART baud-rate clock sourced from esysclk via a divisor */ |
190 | .clk = { | 183 | .clk = { |
191 | .name = "uartclk", | 184 | .name = "uartclk", |
192 | .id = -1, | ||
193 | .parent = &clk_esysclk.clk, | 185 | .parent = &clk_esysclk.clk, |
194 | }, | 186 | }, |
195 | .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 8 }, | 187 | .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 8 }, |
@@ -197,7 +189,6 @@ static struct clksrc_clk clksrc_clks[] = { | |||
197 | /* camera interface bus-clock, divided down from esysclk */ | 189 | /* camera interface bus-clock, divided down from esysclk */ |
198 | .clk = { | 190 | .clk = { |
199 | .name = "camif-upll", /* same as 2440 name */ | 191 | .name = "camif-upll", /* same as 2440 name */ |
200 | .id = -1, | ||
201 | .parent = &clk_esysclk.clk, | 192 | .parent = &clk_esysclk.clk, |
202 | .ctrlbit = S3C2443_SCLKCON_CAMCLK, | 193 | .ctrlbit = S3C2443_SCLKCON_CAMCLK, |
203 | .enable = s3c2443_clkcon_enable_s, | 194 | .enable = s3c2443_clkcon_enable_s, |
@@ -206,7 +197,6 @@ static struct clksrc_clk clksrc_clks[] = { | |||
206 | }, { | 197 | }, { |
207 | .clk = { | 198 | .clk = { |
208 | .name = "display-if", | 199 | .name = "display-if", |
209 | .id = -1, | ||
210 | .parent = &clk_esysclk.clk, | 200 | .parent = &clk_esysclk.clk, |
211 | .ctrlbit = S3C2443_SCLKCON_DISPCLK, | 201 | .ctrlbit = S3C2443_SCLKCON_DISPCLK, |
212 | .enable = s3c2443_clkcon_enable_s, | 202 | .enable = s3c2443_clkcon_enable_s, |
@@ -219,13 +209,11 @@ static struct clksrc_clk clksrc_clks[] = { | |||
219 | static struct clk init_clocks_off[] = { | 209 | static struct clk init_clocks_off[] = { |
220 | { | 210 | { |
221 | .name = "adc", | 211 | .name = "adc", |
222 | .id = -1, | ||
223 | .parent = &clk_p, | 212 | .parent = &clk_p, |
224 | .enable = s3c2443_clkcon_enable_p, | 213 | .enable = s3c2443_clkcon_enable_p, |
225 | .ctrlbit = S3C2443_PCLKCON_ADC, | 214 | .ctrlbit = S3C2443_PCLKCON_ADC, |
226 | }, { | 215 | }, { |
227 | .name = "i2c", | 216 | .name = "i2c", |
228 | .id = -1, | ||
229 | .parent = &clk_p, | 217 | .parent = &clk_p, |
230 | .enable = s3c2443_clkcon_enable_p, | 218 | .enable = s3c2443_clkcon_enable_p, |
231 | .ctrlbit = S3C2443_PCLKCON_IIC, | 219 | .ctrlbit = S3C2443_PCLKCON_IIC, |
@@ -235,136 +223,117 @@ static struct clk init_clocks_off[] = { | |||
235 | static struct clk init_clocks[] = { | 223 | static struct clk init_clocks[] = { |
236 | { | 224 | { |
237 | .name = "dma", | 225 | .name = "dma", |
238 | .id = 0, | ||
239 | .parent = &clk_h, | 226 | .parent = &clk_h, |
240 | .enable = s3c2443_clkcon_enable_h, | 227 | .enable = s3c2443_clkcon_enable_h, |
241 | .ctrlbit = S3C2443_HCLKCON_DMA0, | 228 | .ctrlbit = S3C2443_HCLKCON_DMA0, |
242 | }, { | 229 | }, { |
243 | .name = "dma", | 230 | .name = "dma", |
244 | .id = 1, | ||
245 | .parent = &clk_h, | 231 | .parent = &clk_h, |
246 | .enable = s3c2443_clkcon_enable_h, | 232 | .enable = s3c2443_clkcon_enable_h, |
247 | .ctrlbit = S3C2443_HCLKCON_DMA1, | 233 | .ctrlbit = S3C2443_HCLKCON_DMA1, |
248 | }, { | 234 | }, { |
249 | .name = "dma", | 235 | .name = "dma", |
250 | .id = 2, | ||
251 | .parent = &clk_h, | 236 | .parent = &clk_h, |
252 | .enable = s3c2443_clkcon_enable_h, | 237 | .enable = s3c2443_clkcon_enable_h, |
253 | .ctrlbit = S3C2443_HCLKCON_DMA2, | 238 | .ctrlbit = S3C2443_HCLKCON_DMA2, |
254 | }, { | 239 | }, { |
255 | .name = "dma", | 240 | .name = "dma", |
256 | .id = 3, | ||
257 | .parent = &clk_h, | 241 | .parent = &clk_h, |
258 | .enable = s3c2443_clkcon_enable_h, | 242 | .enable = s3c2443_clkcon_enable_h, |
259 | .ctrlbit = S3C2443_HCLKCON_DMA3, | 243 | .ctrlbit = S3C2443_HCLKCON_DMA3, |
260 | }, { | 244 | }, { |
261 | .name = "dma", | 245 | .name = "dma", |
262 | .id = 4, | ||
263 | .parent = &clk_h, | 246 | .parent = &clk_h, |
264 | .enable = s3c2443_clkcon_enable_h, | 247 | .enable = s3c2443_clkcon_enable_h, |
265 | .ctrlbit = S3C2443_HCLKCON_DMA4, | 248 | .ctrlbit = S3C2443_HCLKCON_DMA4, |
266 | }, { | 249 | }, { |
267 | .name = "dma", | 250 | .name = "dma", |
268 | .id = 5, | ||
269 | .parent = &clk_h, | 251 | .parent = &clk_h, |
270 | .enable = s3c2443_clkcon_enable_h, | 252 | .enable = s3c2443_clkcon_enable_h, |
271 | .ctrlbit = S3C2443_HCLKCON_DMA5, | 253 | .ctrlbit = S3C2443_HCLKCON_DMA5, |
272 | }, { | 254 | }, { |
273 | .name = "hsmmc", | 255 | .name = "hsmmc", |
274 | .id = 1, | ||
275 | .parent = &clk_h, | 256 | .parent = &clk_h, |
276 | .enable = s3c2443_clkcon_enable_h, | 257 | .enable = s3c2443_clkcon_enable_h, |
277 | .ctrlbit = S3C2443_HCLKCON_HSMMC, | 258 | .ctrlbit = S3C2443_HCLKCON_HSMMC, |
278 | }, { | 259 | }, { |
279 | .name = "gpio", | 260 | .name = "gpio", |
280 | .id = -1, | ||
281 | .parent = &clk_p, | 261 | .parent = &clk_p, |
282 | .enable = s3c2443_clkcon_enable_p, | 262 | .enable = s3c2443_clkcon_enable_p, |
283 | .ctrlbit = S3C2443_PCLKCON_GPIO, | 263 | .ctrlbit = S3C2443_PCLKCON_GPIO, |
284 | }, { | 264 | }, { |
285 | .name = "usb-host", | 265 | .name = "usb-host", |
286 | .id = -1, | ||
287 | .parent = &clk_h, | 266 | .parent = &clk_h, |
288 | .enable = s3c2443_clkcon_enable_h, | 267 | .enable = s3c2443_clkcon_enable_h, |
289 | .ctrlbit = S3C2443_HCLKCON_USBH, | 268 | .ctrlbit = S3C2443_HCLKCON_USBH, |
290 | }, { | 269 | }, { |
291 | .name = "usb-device", | 270 | .name = "usb-device", |
292 | .id = -1, | ||
293 | .parent = &clk_h, | 271 | .parent = &clk_h, |
294 | .enable = s3c2443_clkcon_enable_h, | 272 | .enable = s3c2443_clkcon_enable_h, |
295 | .ctrlbit = S3C2443_HCLKCON_USBD, | 273 | .ctrlbit = S3C2443_HCLKCON_USBD, |
296 | }, { | 274 | }, { |
297 | .name = "lcd", | 275 | .name = "lcd", |
298 | .id = -1, | ||
299 | .parent = &clk_h, | 276 | .parent = &clk_h, |
300 | .enable = s3c2443_clkcon_enable_h, | 277 | .enable = s3c2443_clkcon_enable_h, |
301 | .ctrlbit = S3C2443_HCLKCON_LCDC, | 278 | .ctrlbit = S3C2443_HCLKCON_LCDC, |
302 | 279 | ||
303 | }, { | 280 | }, { |
304 | .name = "timers", | 281 | .name = "timers", |
305 | .id = -1, | ||
306 | .parent = &clk_p, | 282 | .parent = &clk_p, |
307 | .enable = s3c2443_clkcon_enable_p, | 283 | .enable = s3c2443_clkcon_enable_p, |
308 | .ctrlbit = S3C2443_PCLKCON_PWMT, | 284 | .ctrlbit = S3C2443_PCLKCON_PWMT, |
309 | }, { | 285 | }, { |
310 | .name = "cfc", | 286 | .name = "cfc", |
311 | .id = -1, | ||
312 | .parent = &clk_h, | 287 | .parent = &clk_h, |
313 | .enable = s3c2443_clkcon_enable_h, | 288 | .enable = s3c2443_clkcon_enable_h, |
314 | .ctrlbit = S3C2443_HCLKCON_CFC, | 289 | .ctrlbit = S3C2443_HCLKCON_CFC, |
315 | }, { | 290 | }, { |
316 | .name = "ssmc", | 291 | .name = "ssmc", |
317 | .id = -1, | ||
318 | .parent = &clk_h, | 292 | .parent = &clk_h, |
319 | .enable = s3c2443_clkcon_enable_h, | 293 | .enable = s3c2443_clkcon_enable_h, |
320 | .ctrlbit = S3C2443_HCLKCON_SSMC, | 294 | .ctrlbit = S3C2443_HCLKCON_SSMC, |
321 | }, { | 295 | }, { |
322 | .name = "uart", | 296 | .name = "uart", |
323 | .id = 0, | 297 | .devname = "s3c2440-uart.0", |
324 | .parent = &clk_p, | 298 | .parent = &clk_p, |
325 | .enable = s3c2443_clkcon_enable_p, | 299 | .enable = s3c2443_clkcon_enable_p, |
326 | .ctrlbit = S3C2443_PCLKCON_UART0, | 300 | .ctrlbit = S3C2443_PCLKCON_UART0, |
327 | }, { | 301 | }, { |
328 | .name = "uart", | 302 | .name = "uart", |
329 | .id = 1, | 303 | .devname = "s3c2440-uart.1", |
330 | .parent = &clk_p, | 304 | .parent = &clk_p, |
331 | .enable = s3c2443_clkcon_enable_p, | 305 | .enable = s3c2443_clkcon_enable_p, |
332 | .ctrlbit = S3C2443_PCLKCON_UART1, | 306 | .ctrlbit = S3C2443_PCLKCON_UART1, |
333 | }, { | 307 | }, { |
334 | .name = "uart", | 308 | .name = "uart", |
335 | .id = 2, | 309 | .devname = "s3c2440-uart.2", |
336 | .parent = &clk_p, | 310 | .parent = &clk_p, |
337 | .enable = s3c2443_clkcon_enable_p, | 311 | .enable = s3c2443_clkcon_enable_p, |
338 | .ctrlbit = S3C2443_PCLKCON_UART2, | 312 | .ctrlbit = S3C2443_PCLKCON_UART2, |
339 | }, { | 313 | }, { |
340 | .name = "uart", | 314 | .name = "uart", |
341 | .id = 3, | 315 | .devname = "s3c2440-uart.3", |
342 | .parent = &clk_p, | 316 | .parent = &clk_p, |
343 | .enable = s3c2443_clkcon_enable_p, | 317 | .enable = s3c2443_clkcon_enable_p, |
344 | .ctrlbit = S3C2443_PCLKCON_UART3, | 318 | .ctrlbit = S3C2443_PCLKCON_UART3, |
345 | }, { | 319 | }, { |
346 | .name = "rtc", | 320 | .name = "rtc", |
347 | .id = -1, | ||
348 | .parent = &clk_p, | 321 | .parent = &clk_p, |
349 | .enable = s3c2443_clkcon_enable_p, | 322 | .enable = s3c2443_clkcon_enable_p, |
350 | .ctrlbit = S3C2443_PCLKCON_RTC, | 323 | .ctrlbit = S3C2443_PCLKCON_RTC, |
351 | }, { | 324 | }, { |
352 | .name = "watchdog", | 325 | .name = "watchdog", |
353 | .id = -1, | ||
354 | .parent = &clk_p, | 326 | .parent = &clk_p, |
355 | .ctrlbit = S3C2443_PCLKCON_WDT, | 327 | .ctrlbit = S3C2443_PCLKCON_WDT, |
356 | }, { | 328 | }, { |
357 | .name = "ac97", | 329 | .name = "ac97", |
358 | .id = -1, | ||
359 | .parent = &clk_p, | 330 | .parent = &clk_p, |
360 | .ctrlbit = S3C2443_PCLKCON_AC97, | 331 | .ctrlbit = S3C2443_PCLKCON_AC97, |
361 | }, { | 332 | }, { |
362 | .name = "nand", | 333 | .name = "nand", |
363 | .id = -1, | ||
364 | .parent = &clk_h, | 334 | .parent = &clk_h, |
365 | }, { | 335 | }, { |
366 | .name = "usb-bus-host", | 336 | .name = "usb-bus-host", |
367 | .id = -1, | ||
368 | .parent = &clk_usb_bus_host.clk, | 337 | .parent = &clk_usb_bus_host.clk, |
369 | } | 338 | } |
370 | }; | 339 | }; |
diff --git a/arch/arm/plat-s5p/clock.c b/arch/arm/plat-s5p/clock.c index 8d081d968c58..02af235298e2 100644 --- a/arch/arm/plat-s5p/clock.c +++ b/arch/arm/plat-s5p/clock.c | |||
@@ -168,6 +168,41 @@ unsigned long s5p_epll_get_rate(struct clk *clk) | |||
168 | return clk->rate; | 168 | return clk->rate; |
169 | } | 169 | } |
170 | 170 | ||
171 | int s5p_spdif_set_rate(struct clk *clk, unsigned long rate) | ||
172 | { | ||
173 | struct clk *pclk; | ||
174 | int ret; | ||
175 | |||
176 | pclk = clk_get_parent(clk); | ||
177 | if (IS_ERR(pclk)) | ||
178 | return -EINVAL; | ||
179 | |||
180 | ret = pclk->ops->set_rate(pclk, rate); | ||
181 | clk_put(pclk); | ||
182 | |||
183 | return ret; | ||
184 | } | ||
185 | |||
186 | unsigned long s5p_spdif_get_rate(struct clk *clk) | ||
187 | { | ||
188 | struct clk *pclk; | ||
189 | int rate; | ||
190 | |||
191 | pclk = clk_get_parent(clk); | ||
192 | if (IS_ERR(pclk)) | ||
193 | return -EINVAL; | ||
194 | |||
195 | rate = pclk->ops->get_rate(clk); | ||
196 | clk_put(pclk); | ||
197 | |||
198 | return rate; | ||
199 | } | ||
200 | |||
201 | struct clk_ops s5p_sclk_spdif_ops = { | ||
202 | .set_rate = s5p_spdif_set_rate, | ||
203 | .get_rate = s5p_spdif_get_rate, | ||
204 | }; | ||
205 | |||
171 | static struct clk *s5p_clks[] __initdata = { | 206 | static struct clk *s5p_clks[] __initdata = { |
172 | &clk_ext_xtal_mux, | 207 | &clk_ext_xtal_mux, |
173 | &clk_48m, | 208 | &clk_48m, |
diff --git a/arch/arm/plat-s5p/include/plat/s5p-clock.h b/arch/arm/plat-s5p/include/plat/s5p-clock.h index 2b6dcff8ab2b..769b5bdfb046 100644 --- a/arch/arm/plat-s5p/include/plat/s5p-clock.h +++ b/arch/arm/plat-s5p/include/plat/s5p-clock.h | |||
@@ -47,4 +47,9 @@ extern int s5p_gatectrl(void __iomem *reg, struct clk *clk, int enable); | |||
47 | extern int s5p_epll_enable(struct clk *clk, int enable); | 47 | extern int s5p_epll_enable(struct clk *clk, int enable); |
48 | extern unsigned long s5p_epll_get_rate(struct clk *clk); | 48 | extern unsigned long s5p_epll_get_rate(struct clk *clk); |
49 | 49 | ||
50 | /* SPDIF clk operations common for S5PC100/V210/C110 and Exynos4 */ | ||
51 | extern int s5p_spdif_set_rate(struct clk *clk, unsigned long rate); | ||
52 | extern unsigned long s5p_spdif_get_rate(struct clk *clk); | ||
53 | |||
54 | extern struct clk_ops s5p_sclk_spdif_ops; | ||
50 | #endif /* __ASM_PLAT_S5P_CLOCK_H */ | 55 | #endif /* __ASM_PLAT_S5P_CLOCK_H */ |
diff --git a/arch/arm/plat-s5p/s5p-time.c b/arch/arm/plat-s5p/s5p-time.c index 612934c48b0d..c833e7b57599 100644 --- a/arch/arm/plat-s5p/s5p-time.c +++ b/arch/arm/plat-s5p/s5p-time.c | |||
@@ -314,13 +314,6 @@ static void __iomem *s5p_timer_reg(void) | |||
314 | return S3C_TIMERREG(offset); | 314 | return S3C_TIMERREG(offset); |
315 | } | 315 | } |
316 | 316 | ||
317 | static cycle_t s5p_timer_read(struct clocksource *cs) | ||
318 | { | ||
319 | void __iomem *reg = s5p_timer_reg(); | ||
320 | |||
321 | return (cycle_t) (reg ? ~__raw_readl(reg) : 0); | ||
322 | } | ||
323 | |||
324 | /* | 317 | /* |
325 | * Override the global weak sched_clock symbol with this | 318 | * Override the global weak sched_clock symbol with this |
326 | * local implementation which uses the clocksource to get some | 319 | * local implementation which uses the clocksource to get some |
@@ -350,14 +343,6 @@ static void notrace s5p_update_sched_clock(void) | |||
350 | update_sched_clock(&cd, ~__raw_readl(reg), (u32)~0); | 343 | update_sched_clock(&cd, ~__raw_readl(reg), (u32)~0); |
351 | } | 344 | } |
352 | 345 | ||
353 | struct clocksource time_clocksource = { | ||
354 | .name = "s5p_clocksource_timer", | ||
355 | .rating = 250, | ||
356 | .read = s5p_timer_read, | ||
357 | .mask = CLOCKSOURCE_MASK(32), | ||
358 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
359 | }; | ||
360 | |||
361 | static void __init s5p_clocksource_init(void) | 346 | static void __init s5p_clocksource_init(void) |
362 | { | 347 | { |
363 | unsigned long pclk; | 348 | unsigned long pclk; |
@@ -375,8 +360,9 @@ static void __init s5p_clocksource_init(void) | |||
375 | 360 | ||
376 | init_sched_clock(&cd, s5p_update_sched_clock, 32, clock_rate); | 361 | init_sched_clock(&cd, s5p_update_sched_clock, 32, clock_rate); |
377 | 362 | ||
378 | if (clocksource_register_hz(&time_clocksource, clock_rate)) | 363 | if (clocksource_mmio_init(s5p_timer_reg(), "s5p_clocksource_timer", |
379 | panic("%s: can't register clocksource\n", time_clocksource.name); | 364 | clock_rate, 250, 32, clocksource_mmio_readl_down)) |
365 | panic("s5p_clocksource_timer: can't register clocksource\n"); | ||
380 | } | 366 | } |
381 | 367 | ||
382 | static void __init s5p_timer_resources(void) | 368 | static void __init s5p_timer_resources(void) |
@@ -384,6 +370,7 @@ static void __init s5p_timer_resources(void) | |||
384 | 370 | ||
385 | unsigned long event_id = timer_source.event_id; | 371 | unsigned long event_id = timer_source.event_id; |
386 | unsigned long source_id = timer_source.source_id; | 372 | unsigned long source_id = timer_source.source_id; |
373 | char devname[15]; | ||
387 | 374 | ||
388 | timerclk = clk_get(NULL, "timers"); | 375 | timerclk = clk_get(NULL, "timers"); |
389 | if (IS_ERR(timerclk)) | 376 | if (IS_ERR(timerclk)) |
@@ -391,6 +378,10 @@ static void __init s5p_timer_resources(void) | |||
391 | 378 | ||
392 | clk_enable(timerclk); | 379 | clk_enable(timerclk); |
393 | 380 | ||
381 | sprintf(devname, "s3c24xx-pwm.%lu", event_id); | ||
382 | s3c_device_timer[event_id].id = event_id; | ||
383 | s3c_device_timer[event_id].dev.init_name = devname; | ||
384 | |||
394 | tin_event = clk_get(&s3c_device_timer[event_id].dev, "pwm-tin"); | 385 | tin_event = clk_get(&s3c_device_timer[event_id].dev, "pwm-tin"); |
395 | if (IS_ERR(tin_event)) | 386 | if (IS_ERR(tin_event)) |
396 | panic("failed to get pwm-tin clock for event timer"); | 387 | panic("failed to get pwm-tin clock for event timer"); |
@@ -401,6 +392,10 @@ static void __init s5p_timer_resources(void) | |||
401 | 392 | ||
402 | clk_enable(tin_event); | 393 | clk_enable(tin_event); |
403 | 394 | ||
395 | sprintf(devname, "s3c24xx-pwm.%lu", source_id); | ||
396 | s3c_device_timer[source_id].id = source_id; | ||
397 | s3c_device_timer[source_id].dev.init_name = devname; | ||
398 | |||
404 | tin_source = clk_get(&s3c_device_timer[source_id].dev, "pwm-tin"); | 399 | tin_source = clk_get(&s3c_device_timer[source_id].dev, "pwm-tin"); |
405 | if (IS_ERR(tin_source)) | 400 | if (IS_ERR(tin_source)) |
406 | panic("failed to get pwm-tin clock for source timer"); | 401 | panic("failed to get pwm-tin clock for source timer"); |
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index 4d79519d19a4..b3e10659e4b8 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
@@ -280,6 +280,12 @@ config SAMSUNG_DEV_PWM | |||
280 | help | 280 | help |
281 | Compile in platform device definition for PWM Timer | 281 | Compile in platform device definition for PWM Timer |
282 | 282 | ||
283 | config SAMSUNG_DEV_BACKLIGHT | ||
284 | bool | ||
285 | depends on SAMSUNG_DEV_PWM | ||
286 | help | ||
287 | Compile in platform device definition LCD backlight with PWM Timer | ||
288 | |||
283 | config S3C24XX_PWM | 289 | config S3C24XX_PWM |
284 | bool "PWM device support" | 290 | bool "PWM device support" |
285 | select HAVE_PWM | 291 | select HAVE_PWM |
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index 53eb15b0a07d..853764ba8cc5 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile | |||
@@ -59,6 +59,7 @@ obj-$(CONFIG_SAMSUNG_DEV_IDE) += dev-ide.o | |||
59 | obj-$(CONFIG_SAMSUNG_DEV_TS) += dev-ts.o | 59 | obj-$(CONFIG_SAMSUNG_DEV_TS) += dev-ts.o |
60 | obj-$(CONFIG_SAMSUNG_DEV_KEYPAD) += dev-keypad.o | 60 | obj-$(CONFIG_SAMSUNG_DEV_KEYPAD) += dev-keypad.o |
61 | obj-$(CONFIG_SAMSUNG_DEV_PWM) += dev-pwm.o | 61 | obj-$(CONFIG_SAMSUNG_DEV_PWM) += dev-pwm.o |
62 | obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT) += dev-backlight.o | ||
62 | 63 | ||
63 | # DMA support | 64 | # DMA support |
64 | 65 | ||
diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c index 0c9f95d98561..302c42670bd1 100644 --- a/arch/arm/plat-samsung/clock.c +++ b/arch/arm/plat-samsung/clock.c | |||
@@ -71,74 +71,6 @@ static int clk_null_enable(struct clk *clk, int enable) | |||
71 | return 0; | 71 | return 0; |
72 | } | 72 | } |
73 | 73 | ||
74 | static int dev_is_s3c_uart(struct device *dev) | ||
75 | { | ||
76 | struct platform_device **pdev = s3c24xx_uart_devs; | ||
77 | int i; | ||
78 | for (i = 0; i < ARRAY_SIZE(s3c24xx_uart_devs); i++, pdev++) | ||
79 | if (*pdev && dev == &(*pdev)->dev) | ||
80 | return 1; | ||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | /* | ||
85 | * Serial drivers call get_clock() very early, before platform bus | ||
86 | * has been set up, this requires a special check to let them get | ||
87 | * a proper clock | ||
88 | */ | ||
89 | |||
90 | static int dev_is_platform_device(struct device *dev) | ||
91 | { | ||
92 | return dev->bus == &platform_bus_type || | ||
93 | (dev->bus == NULL && dev_is_s3c_uart(dev)); | ||
94 | } | ||
95 | |||
96 | /* Clock API calls */ | ||
97 | |||
98 | struct clk *clk_get(struct device *dev, const char *id) | ||
99 | { | ||
100 | struct clk *p; | ||
101 | struct clk *clk = ERR_PTR(-ENOENT); | ||
102 | int idno; | ||
103 | |||
104 | if (dev == NULL || !dev_is_platform_device(dev)) | ||
105 | idno = -1; | ||
106 | else | ||
107 | idno = to_platform_device(dev)->id; | ||
108 | |||
109 | spin_lock(&clocks_lock); | ||
110 | |||
111 | list_for_each_entry(p, &clocks, list) { | ||
112 | if (p->id == idno && | ||
113 | strcmp(id, p->name) == 0 && | ||
114 | try_module_get(p->owner)) { | ||
115 | clk = p; | ||
116 | break; | ||
117 | } | ||
118 | } | ||
119 | |||
120 | /* check for the case where a device was supplied, but the | ||
121 | * clock that was being searched for is not device specific */ | ||
122 | |||
123 | if (IS_ERR(clk)) { | ||
124 | list_for_each_entry(p, &clocks, list) { | ||
125 | if (p->id == -1 && strcmp(id, p->name) == 0 && | ||
126 | try_module_get(p->owner)) { | ||
127 | clk = p; | ||
128 | break; | ||
129 | } | ||
130 | } | ||
131 | } | ||
132 | |||
133 | spin_unlock(&clocks_lock); | ||
134 | return clk; | ||
135 | } | ||
136 | |||
137 | void clk_put(struct clk *clk) | ||
138 | { | ||
139 | module_put(clk->owner); | ||
140 | } | ||
141 | |||
142 | int clk_enable(struct clk *clk) | 74 | int clk_enable(struct clk *clk) |
143 | { | 75 | { |
144 | if (IS_ERR(clk) || clk == NULL) | 76 | if (IS_ERR(clk) || clk == NULL) |
@@ -241,8 +173,6 @@ int clk_set_parent(struct clk *clk, struct clk *parent) | |||
241 | return ret; | 173 | return ret; |
242 | } | 174 | } |
243 | 175 | ||
244 | EXPORT_SYMBOL(clk_get); | ||
245 | EXPORT_SYMBOL(clk_put); | ||
246 | EXPORT_SYMBOL(clk_enable); | 176 | EXPORT_SYMBOL(clk_enable); |
247 | EXPORT_SYMBOL(clk_disable); | 177 | EXPORT_SYMBOL(clk_disable); |
248 | EXPORT_SYMBOL(clk_get_rate); | 178 | EXPORT_SYMBOL(clk_get_rate); |
@@ -265,7 +195,6 @@ struct clk_ops clk_ops_def_setrate = { | |||
265 | 195 | ||
266 | struct clk clk_xtal = { | 196 | struct clk clk_xtal = { |
267 | .name = "xtal", | 197 | .name = "xtal", |
268 | .id = -1, | ||
269 | .rate = 0, | 198 | .rate = 0, |
270 | .parent = NULL, | 199 | .parent = NULL, |
271 | .ctrlbit = 0, | 200 | .ctrlbit = 0, |
@@ -273,30 +202,25 @@ struct clk clk_xtal = { | |||
273 | 202 | ||
274 | struct clk clk_ext = { | 203 | struct clk clk_ext = { |
275 | .name = "ext", | 204 | .name = "ext", |
276 | .id = -1, | ||
277 | }; | 205 | }; |
278 | 206 | ||
279 | struct clk clk_epll = { | 207 | struct clk clk_epll = { |
280 | .name = "epll", | 208 | .name = "epll", |
281 | .id = -1, | ||
282 | }; | 209 | }; |
283 | 210 | ||
284 | struct clk clk_mpll = { | 211 | struct clk clk_mpll = { |
285 | .name = "mpll", | 212 | .name = "mpll", |
286 | .id = -1, | ||
287 | .ops = &clk_ops_def_setrate, | 213 | .ops = &clk_ops_def_setrate, |
288 | }; | 214 | }; |
289 | 215 | ||
290 | struct clk clk_upll = { | 216 | struct clk clk_upll = { |
291 | .name = "upll", | 217 | .name = "upll", |
292 | .id = -1, | ||
293 | .parent = NULL, | 218 | .parent = NULL, |
294 | .ctrlbit = 0, | 219 | .ctrlbit = 0, |
295 | }; | 220 | }; |
296 | 221 | ||
297 | struct clk clk_f = { | 222 | struct clk clk_f = { |
298 | .name = "fclk", | 223 | .name = "fclk", |
299 | .id = -1, | ||
300 | .rate = 0, | 224 | .rate = 0, |
301 | .parent = &clk_mpll, | 225 | .parent = &clk_mpll, |
302 | .ctrlbit = 0, | 226 | .ctrlbit = 0, |
@@ -304,7 +228,6 @@ struct clk clk_f = { | |||
304 | 228 | ||
305 | struct clk clk_h = { | 229 | struct clk clk_h = { |
306 | .name = "hclk", | 230 | .name = "hclk", |
307 | .id = -1, | ||
308 | .rate = 0, | 231 | .rate = 0, |
309 | .parent = NULL, | 232 | .parent = NULL, |
310 | .ctrlbit = 0, | 233 | .ctrlbit = 0, |
@@ -313,7 +236,6 @@ struct clk clk_h = { | |||
313 | 236 | ||
314 | struct clk clk_p = { | 237 | struct clk clk_p = { |
315 | .name = "pclk", | 238 | .name = "pclk", |
316 | .id = -1, | ||
317 | .rate = 0, | 239 | .rate = 0, |
318 | .parent = NULL, | 240 | .parent = NULL, |
319 | .ctrlbit = 0, | 241 | .ctrlbit = 0, |
@@ -322,7 +244,6 @@ struct clk clk_p = { | |||
322 | 244 | ||
323 | struct clk clk_usb_bus = { | 245 | struct clk clk_usb_bus = { |
324 | .name = "usb-bus", | 246 | .name = "usb-bus", |
325 | .id = -1, | ||
326 | .rate = 0, | 247 | .rate = 0, |
327 | .parent = &clk_upll, | 248 | .parent = &clk_upll, |
328 | }; | 249 | }; |
@@ -330,7 +251,6 @@ struct clk clk_usb_bus = { | |||
330 | 251 | ||
331 | struct clk s3c24xx_uclk = { | 252 | struct clk s3c24xx_uclk = { |
332 | .name = "uclk", | 253 | .name = "uclk", |
333 | .id = -1, | ||
334 | }; | 254 | }; |
335 | 255 | ||
336 | /* initialise the clock system */ | 256 | /* initialise the clock system */ |
@@ -346,14 +266,11 @@ int s3c24xx_register_clock(struct clk *clk) | |||
346 | if (clk->enable == NULL) | 266 | if (clk->enable == NULL) |
347 | clk->enable = clk_null_enable; | 267 | clk->enable = clk_null_enable; |
348 | 268 | ||
349 | /* add to the list of available clocks */ | 269 | /* fill up the clk_lookup structure and register it*/ |
350 | 270 | clk->lookup.dev_id = clk->devname; | |
351 | /* Quick check to see if this clock has already been registered. */ | 271 | clk->lookup.con_id = clk->name; |
352 | BUG_ON(clk->list.prev != clk->list.next); | 272 | clk->lookup.clk = clk; |
353 | 273 | clkdev_add(&clk->lookup); | |
354 | spin_lock(&clocks_lock); | ||
355 | list_add(&clk->list, &clocks); | ||
356 | spin_unlock(&clocks_lock); | ||
357 | 274 | ||
358 | return 0; | 275 | return 0; |
359 | } | 276 | } |
@@ -463,10 +380,7 @@ static int clk_debugfs_register_one(struct clk *c) | |||
463 | char s[255]; | 380 | char s[255]; |
464 | char *p = s; | 381 | char *p = s; |
465 | 382 | ||
466 | p += sprintf(p, "%s", c->name); | 383 | p += sprintf(p, "%s", c->devname); |
467 | |||
468 | if (c->id >= 0) | ||
469 | sprintf(p, ":%d", c->id); | ||
470 | 384 | ||
471 | d = debugfs_create_dir(s, pa ? pa->dent : clk_debugfs_root); | 385 | d = debugfs_create_dir(s, pa ? pa->dent : clk_debugfs_root); |
472 | if (!d) | 386 | if (!d) |
diff --git a/arch/arm/plat-samsung/dev-backlight.c b/arch/arm/plat-samsung/dev-backlight.c new file mode 100644 index 000000000000..3cedd4c407af --- /dev/null +++ b/arch/arm/plat-samsung/dev-backlight.c | |||
@@ -0,0 +1,149 @@ | |||
1 | /* linux/arch/arm/plat-samsung/dev-backlight.c | ||
2 | * | ||
3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * Common infrastructure for PWM Backlight for Samsung boards | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/gpio.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/pwm_backlight.h> | ||
17 | |||
18 | #include <plat/devs.h> | ||
19 | #include <plat/gpio-cfg.h> | ||
20 | #include <plat/backlight.h> | ||
21 | |||
22 | static int samsung_bl_init(struct device *dev) | ||
23 | { | ||
24 | int ret = 0; | ||
25 | struct platform_device *timer_dev = | ||
26 | container_of(dev->parent, struct platform_device, dev); | ||
27 | struct samsung_bl_gpio_info *bl_gpio_info = | ||
28 | timer_dev->dev.platform_data; | ||
29 | |||
30 | ret = gpio_request(bl_gpio_info->no, "Backlight"); | ||
31 | if (ret) { | ||
32 | printk(KERN_ERR "failed to request GPIO for LCD Backlight\n"); | ||
33 | return ret; | ||
34 | } | ||
35 | |||
36 | /* Configure GPIO pin with specific GPIO function for PWM timer */ | ||
37 | s3c_gpio_cfgpin(bl_gpio_info->no, bl_gpio_info->func); | ||
38 | |||
39 | return 0; | ||
40 | } | ||
41 | |||
42 | static void samsung_bl_exit(struct device *dev) | ||
43 | { | ||
44 | struct platform_device *timer_dev = | ||
45 | container_of(dev->parent, struct platform_device, dev); | ||
46 | struct samsung_bl_gpio_info *bl_gpio_info = | ||
47 | timer_dev->dev.platform_data; | ||
48 | |||
49 | s3c_gpio_cfgpin(bl_gpio_info->no, S3C_GPIO_OUTPUT); | ||
50 | gpio_free(bl_gpio_info->no); | ||
51 | } | ||
52 | |||
53 | /* Initialize few important fields of platform_pwm_backlight_data | ||
54 | * structure with default values. These fields can be overridden by | ||
55 | * board-specific values sent from machine file. | ||
56 | * For ease of operation, these fields are initialized with values | ||
57 | * used by most samsung boards. | ||
58 | * Users has the option of sending info about other parameters | ||
59 | * for their specific boards | ||
60 | */ | ||
61 | |||
62 | static struct platform_pwm_backlight_data samsung_dfl_bl_data __initdata = { | ||
63 | .max_brightness = 255, | ||
64 | .dft_brightness = 255, | ||
65 | .pwm_period_ns = 78770, | ||
66 | .init = samsung_bl_init, | ||
67 | .exit = samsung_bl_exit, | ||
68 | }; | ||
69 | |||
70 | static struct platform_device samsung_dfl_bl_device __initdata = { | ||
71 | .name = "pwm-backlight", | ||
72 | }; | ||
73 | |||
74 | /* samsung_bl_set - Set board specific data (if any) provided by user for | ||
75 | * PWM Backlight control and register specific PWM and backlight device. | ||
76 | * @gpio_info: structure containing GPIO info for PWM timer | ||
77 | * @bl_data: structure containing Backlight control data | ||
78 | */ | ||
79 | void samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, | ||
80 | struct platform_pwm_backlight_data *bl_data) | ||
81 | { | ||
82 | int ret = 0; | ||
83 | struct platform_device *samsung_bl_device; | ||
84 | struct platform_pwm_backlight_data *samsung_bl_data; | ||
85 | |||
86 | samsung_bl_device = kmemdup(&samsung_dfl_bl_device, | ||
87 | sizeof(struct platform_device), GFP_KERNEL); | ||
88 | if (!samsung_bl_device) { | ||
89 | printk(KERN_ERR "%s: no memory for platform dev\n", __func__); | ||
90 | return; | ||
91 | } | ||
92 | |||
93 | samsung_bl_data = s3c_set_platdata(&samsung_dfl_bl_data, | ||
94 | sizeof(struct platform_pwm_backlight_data), samsung_bl_device); | ||
95 | if (!samsung_bl_data) { | ||
96 | printk(KERN_ERR "%s: no memory for platform dev\n", __func__); | ||
97 | goto err_data; | ||
98 | } | ||
99 | |||
100 | /* Copy board specific data provided by user */ | ||
101 | samsung_bl_data->pwm_id = bl_data->pwm_id; | ||
102 | samsung_bl_device->dev.parent = | ||
103 | &s3c_device_timer[samsung_bl_data->pwm_id].dev; | ||
104 | |||
105 | if (bl_data->max_brightness) | ||
106 | samsung_bl_data->max_brightness = bl_data->max_brightness; | ||
107 | if (bl_data->dft_brightness) | ||
108 | samsung_bl_data->dft_brightness = bl_data->dft_brightness; | ||
109 | if (bl_data->lth_brightness) | ||
110 | samsung_bl_data->lth_brightness = bl_data->lth_brightness; | ||
111 | if (bl_data->pwm_period_ns) | ||
112 | samsung_bl_data->pwm_period_ns = bl_data->pwm_period_ns; | ||
113 | if (bl_data->init) | ||
114 | samsung_bl_data->init = bl_data->init; | ||
115 | if (bl_data->notify) | ||
116 | samsung_bl_data->notify = bl_data->notify; | ||
117 | if (bl_data->exit) | ||
118 | samsung_bl_data->exit = bl_data->exit; | ||
119 | if (bl_data->check_fb) | ||
120 | samsung_bl_data->check_fb = bl_data->check_fb; | ||
121 | |||
122 | /* Keep the GPIO info for future use */ | ||
123 | s3c_device_timer[samsung_bl_data->pwm_id].dev.platform_data = gpio_info; | ||
124 | |||
125 | /* Register the specific PWM timer dev for Backlight control */ | ||
126 | ret = platform_device_register( | ||
127 | &s3c_device_timer[samsung_bl_data->pwm_id]); | ||
128 | if (ret) { | ||
129 | printk(KERN_ERR "failed to register pwm timer for backlight: %d\n", ret); | ||
130 | goto err_plat_reg1; | ||
131 | } | ||
132 | |||
133 | /* Register the Backlight dev */ | ||
134 | ret = platform_device_register(samsung_bl_device); | ||
135 | if (ret) { | ||
136 | printk(KERN_ERR "failed to register backlight device: %d\n", ret); | ||
137 | goto err_plat_reg2; | ||
138 | } | ||
139 | |||
140 | return; | ||
141 | |||
142 | err_plat_reg2: | ||
143 | platform_device_unregister(&s3c_device_timer[samsung_bl_data->pwm_id]); | ||
144 | err_plat_reg1: | ||
145 | kfree(samsung_bl_data); | ||
146 | err_data: | ||
147 | kfree(samsung_bl_device); | ||
148 | return; | ||
149 | } | ||
diff --git a/arch/arm/plat-samsung/dev-fb.c b/arch/arm/plat-samsung/dev-fb.c index bf60204c6297..49a1362fd25b 100644 --- a/arch/arm/plat-samsung/dev-fb.c +++ b/arch/arm/plat-samsung/dev-fb.c | |||
@@ -58,16 +58,6 @@ struct platform_device s3c_device_fb = { | |||
58 | 58 | ||
59 | void __init s3c_fb_set_platdata(struct s3c_fb_platdata *pd) | 59 | void __init s3c_fb_set_platdata(struct s3c_fb_platdata *pd) |
60 | { | 60 | { |
61 | struct s3c_fb_platdata *npd; | 61 | s3c_set_platdata(pd, sizeof(struct s3c_fb_platdata), |
62 | 62 | &s3c_device_fb); | |
63 | if (!pd) { | ||
64 | printk(KERN_ERR "%s: no platform data\n", __func__); | ||
65 | return; | ||
66 | } | ||
67 | |||
68 | npd = kmemdup(pd, sizeof(struct s3c_fb_platdata), GFP_KERNEL); | ||
69 | if (!npd) | ||
70 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
71 | |||
72 | s3c_device_fb.dev.platform_data = npd; | ||
73 | } | 63 | } |
diff --git a/arch/arm/plat-samsung/dev-hwmon.c b/arch/arm/plat-samsung/dev-hwmon.c index b3ffb9587250..c91a79ce8f39 100644 --- a/arch/arm/plat-samsung/dev-hwmon.c +++ b/arch/arm/plat-samsung/dev-hwmon.c | |||
@@ -27,16 +27,6 @@ struct platform_device s3c_device_hwmon = { | |||
27 | 27 | ||
28 | void __init s3c_hwmon_set_platdata(struct s3c_hwmon_pdata *pd) | 28 | void __init s3c_hwmon_set_platdata(struct s3c_hwmon_pdata *pd) |
29 | { | 29 | { |
30 | struct s3c_hwmon_pdata *npd; | 30 | s3c_set_platdata(pd, sizeof(struct s3c_hwmon_pdata), |
31 | 31 | &s3c_device_hwmon); | |
32 | if (!pd) { | ||
33 | printk(KERN_ERR "%s: no platform data\n", __func__); | ||
34 | return; | ||
35 | } | ||
36 | |||
37 | npd = kmemdup(pd, sizeof(struct s3c_hwmon_pdata), GFP_KERNEL); | ||
38 | if (!npd) | ||
39 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
40 | |||
41 | s3c_device_hwmon.dev.platform_data = npd; | ||
42 | } | 32 | } |
diff --git a/arch/arm/plat-samsung/dev-i2c0.c b/arch/arm/plat-samsung/dev-i2c0.c index 3a601c16f03c..f8251f5098bd 100644 --- a/arch/arm/plat-samsung/dev-i2c0.c +++ b/arch/arm/plat-samsung/dev-i2c0.c | |||
@@ -48,7 +48,7 @@ struct platform_device s3c_device_i2c0 = { | |||
48 | .resource = s3c_i2c_resource, | 48 | .resource = s3c_i2c_resource, |
49 | }; | 49 | }; |
50 | 50 | ||
51 | static struct s3c2410_platform_i2c default_i2c_data0 __initdata = { | 51 | struct s3c2410_platform_i2c default_i2c_data __initdata = { |
52 | .flags = 0, | 52 | .flags = 0, |
53 | .slave_addr = 0x10, | 53 | .slave_addr = 0x10, |
54 | .frequency = 100*1000, | 54 | .frequency = 100*1000, |
@@ -60,13 +60,11 @@ void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd) | |||
60 | struct s3c2410_platform_i2c *npd; | 60 | struct s3c2410_platform_i2c *npd; |
61 | 61 | ||
62 | if (!pd) | 62 | if (!pd) |
63 | pd = &default_i2c_data0; | 63 | pd = &default_i2c_data; |
64 | 64 | ||
65 | npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); | 65 | npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), |
66 | if (!npd) | 66 | &s3c_device_i2c0); |
67 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
68 | else if (!npd->cfg_gpio) | ||
69 | npd->cfg_gpio = s3c_i2c0_cfg_gpio; | ||
70 | 67 | ||
71 | s3c_device_i2c0.dev.platform_data = npd; | 68 | if (!npd->cfg_gpio) |
69 | npd->cfg_gpio = s3c_i2c0_cfg_gpio; | ||
72 | } | 70 | } |
diff --git a/arch/arm/plat-samsung/dev-i2c1.c b/arch/arm/plat-samsung/dev-i2c1.c index 858ee2a0414c..3b7c7bec1cf9 100644 --- a/arch/arm/plat-samsung/dev-i2c1.c +++ b/arch/arm/plat-samsung/dev-i2c1.c | |||
@@ -44,26 +44,18 @@ struct platform_device s3c_device_i2c1 = { | |||
44 | .resource = s3c_i2c_resource, | 44 | .resource = s3c_i2c_resource, |
45 | }; | 45 | }; |
46 | 46 | ||
47 | static struct s3c2410_platform_i2c default_i2c_data1 __initdata = { | ||
48 | .flags = 0, | ||
49 | .bus_num = 1, | ||
50 | .slave_addr = 0x10, | ||
51 | .frequency = 100*1000, | ||
52 | .sda_delay = 100, | ||
53 | }; | ||
54 | |||
55 | void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd) | 47 | void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd) |
56 | { | 48 | { |
57 | struct s3c2410_platform_i2c *npd; | 49 | struct s3c2410_platform_i2c *npd; |
58 | 50 | ||
59 | if (!pd) | 51 | if (!pd) { |
60 | pd = &default_i2c_data1; | 52 | pd = &default_i2c_data; |
53 | pd->bus_num = 1; | ||
54 | } | ||
61 | 55 | ||
62 | npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); | 56 | npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), |
63 | if (!npd) | 57 | &s3c_device_i2c1); |
64 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
65 | else if (!npd->cfg_gpio) | ||
66 | npd->cfg_gpio = s3c_i2c1_cfg_gpio; | ||
67 | 58 | ||
68 | s3c_device_i2c1.dev.platform_data = npd; | 59 | if (!npd->cfg_gpio) |
60 | npd->cfg_gpio = s3c_i2c1_cfg_gpio; | ||
69 | } | 61 | } |
diff --git a/arch/arm/plat-samsung/dev-i2c2.c b/arch/arm/plat-samsung/dev-i2c2.c index ff4ba69b6830..07e9fd0b1b8b 100644 --- a/arch/arm/plat-samsung/dev-i2c2.c +++ b/arch/arm/plat-samsung/dev-i2c2.c | |||
@@ -45,26 +45,18 @@ struct platform_device s3c_device_i2c2 = { | |||
45 | .resource = s3c_i2c_resource, | 45 | .resource = s3c_i2c_resource, |
46 | }; | 46 | }; |
47 | 47 | ||
48 | static struct s3c2410_platform_i2c default_i2c_data2 __initdata = { | ||
49 | .flags = 0, | ||
50 | .bus_num = 2, | ||
51 | .slave_addr = 0x10, | ||
52 | .frequency = 100*1000, | ||
53 | .sda_delay = 100, | ||
54 | }; | ||
55 | |||
56 | void __init s3c_i2c2_set_platdata(struct s3c2410_platform_i2c *pd) | 48 | void __init s3c_i2c2_set_platdata(struct s3c2410_platform_i2c *pd) |
57 | { | 49 | { |
58 | struct s3c2410_platform_i2c *npd; | 50 | struct s3c2410_platform_i2c *npd; |
59 | 51 | ||
60 | if (!pd) | 52 | if (!pd) { |
61 | pd = &default_i2c_data2; | 53 | pd = &default_i2c_data; |
54 | pd->bus_num = 2; | ||
55 | } | ||
62 | 56 | ||
63 | npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); | 57 | npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), |
64 | if (!npd) | 58 | &s3c_device_i2c2); |
65 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
66 | else if (!npd->cfg_gpio) | ||
67 | npd->cfg_gpio = s3c_i2c2_cfg_gpio; | ||
68 | 59 | ||
69 | s3c_device_i2c2.dev.platform_data = npd; | 60 | if (!npd->cfg_gpio) |
61 | npd->cfg_gpio = s3c_i2c2_cfg_gpio; | ||
70 | } | 62 | } |
diff --git a/arch/arm/plat-samsung/dev-i2c3.c b/arch/arm/plat-samsung/dev-i2c3.c index 8586a10014b7..d48efa93c6e7 100644 --- a/arch/arm/plat-samsung/dev-i2c3.c +++ b/arch/arm/plat-samsung/dev-i2c3.c | |||
@@ -43,26 +43,18 @@ struct platform_device s3c_device_i2c3 = { | |||
43 | .resource = s3c_i2c_resource, | 43 | .resource = s3c_i2c_resource, |
44 | }; | 44 | }; |
45 | 45 | ||
46 | static struct s3c2410_platform_i2c default_i2c_data3 __initdata = { | ||
47 | .flags = 0, | ||
48 | .bus_num = 3, | ||
49 | .slave_addr = 0x10, | ||
50 | .frequency = 100*1000, | ||
51 | .sda_delay = 100, | ||
52 | }; | ||
53 | |||
54 | void __init s3c_i2c3_set_platdata(struct s3c2410_platform_i2c *pd) | 46 | void __init s3c_i2c3_set_platdata(struct s3c2410_platform_i2c *pd) |
55 | { | 47 | { |
56 | struct s3c2410_platform_i2c *npd; | 48 | struct s3c2410_platform_i2c *npd; |
57 | 49 | ||
58 | if (!pd) | 50 | if (!pd) { |
59 | pd = &default_i2c_data3; | 51 | pd = &default_i2c_data; |
52 | pd->bus_num = 3; | ||
53 | } | ||
60 | 54 | ||
61 | npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); | 55 | npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), |
62 | if (!npd) | 56 | &s3c_device_i2c3); |
63 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
64 | else if (!npd->cfg_gpio) | ||
65 | npd->cfg_gpio = s3c_i2c3_cfg_gpio; | ||
66 | 57 | ||
67 | s3c_device_i2c3.dev.platform_data = npd; | 58 | if (!npd->cfg_gpio) |
59 | npd->cfg_gpio = s3c_i2c3_cfg_gpio; | ||
68 | } | 60 | } |
diff --git a/arch/arm/plat-samsung/dev-i2c4.c b/arch/arm/plat-samsung/dev-i2c4.c index df2159e2daa6..07e26444efe6 100644 --- a/arch/arm/plat-samsung/dev-i2c4.c +++ b/arch/arm/plat-samsung/dev-i2c4.c | |||
@@ -43,26 +43,18 @@ struct platform_device s3c_device_i2c4 = { | |||
43 | .resource = s3c_i2c_resource, | 43 | .resource = s3c_i2c_resource, |
44 | }; | 44 | }; |
45 | 45 | ||
46 | static struct s3c2410_platform_i2c default_i2c_data4 __initdata = { | ||
47 | .flags = 0, | ||
48 | .bus_num = 4, | ||
49 | .slave_addr = 0x10, | ||
50 | .frequency = 100*1000, | ||
51 | .sda_delay = 100, | ||
52 | }; | ||
53 | |||
54 | void __init s3c_i2c4_set_platdata(struct s3c2410_platform_i2c *pd) | 46 | void __init s3c_i2c4_set_platdata(struct s3c2410_platform_i2c *pd) |
55 | { | 47 | { |
56 | struct s3c2410_platform_i2c *npd; | 48 | struct s3c2410_platform_i2c *npd; |
57 | 49 | ||
58 | if (!pd) | 50 | if (!pd) { |
59 | pd = &default_i2c_data4; | 51 | pd = &default_i2c_data; |
52 | pd->bus_num = 4; | ||
53 | } | ||
60 | 54 | ||
61 | npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); | 55 | npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), |
62 | if (!npd) | 56 | &s3c_device_i2c4); |
63 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
64 | else if (!npd->cfg_gpio) | ||
65 | npd->cfg_gpio = s3c_i2c4_cfg_gpio; | ||
66 | 57 | ||
67 | s3c_device_i2c4.dev.platform_data = npd; | 58 | if (!npd->cfg_gpio) |
59 | npd->cfg_gpio = s3c_i2c4_cfg_gpio; | ||
68 | } | 60 | } |
diff --git a/arch/arm/plat-samsung/dev-i2c5.c b/arch/arm/plat-samsung/dev-i2c5.c index 0499c2c3877b..f49655784563 100644 --- a/arch/arm/plat-samsung/dev-i2c5.c +++ b/arch/arm/plat-samsung/dev-i2c5.c | |||
@@ -43,26 +43,18 @@ struct platform_device s3c_device_i2c5 = { | |||
43 | .resource = s3c_i2c_resource, | 43 | .resource = s3c_i2c_resource, |
44 | }; | 44 | }; |
45 | 45 | ||
46 | static struct s3c2410_platform_i2c default_i2c_data5 __initdata = { | ||
47 | .flags = 0, | ||
48 | .bus_num = 5, | ||
49 | .slave_addr = 0x10, | ||
50 | .frequency = 100*1000, | ||
51 | .sda_delay = 100, | ||
52 | }; | ||
53 | |||
54 | void __init s3c_i2c5_set_platdata(struct s3c2410_platform_i2c *pd) | 46 | void __init s3c_i2c5_set_platdata(struct s3c2410_platform_i2c *pd) |
55 | { | 47 | { |
56 | struct s3c2410_platform_i2c *npd; | 48 | struct s3c2410_platform_i2c *npd; |
57 | 49 | ||
58 | if (!pd) | 50 | if (!pd) { |
59 | pd = &default_i2c_data5; | 51 | pd = &default_i2c_data; |
52 | pd->bus_num = 5; | ||
53 | } | ||
60 | 54 | ||
61 | npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); | 55 | npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), |
62 | if (!npd) | 56 | &s3c_device_i2c5); |
63 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
64 | else if (!npd->cfg_gpio) | ||
65 | npd->cfg_gpio = s3c_i2c5_cfg_gpio; | ||
66 | 57 | ||
67 | s3c_device_i2c5.dev.platform_data = npd; | 58 | if (!npd->cfg_gpio) |
59 | npd->cfg_gpio = s3c_i2c5_cfg_gpio; | ||
68 | } | 60 | } |
diff --git a/arch/arm/plat-samsung/dev-i2c6.c b/arch/arm/plat-samsung/dev-i2c6.c index 4083108908a8..141d799944e2 100644 --- a/arch/arm/plat-samsung/dev-i2c6.c +++ b/arch/arm/plat-samsung/dev-i2c6.c | |||
@@ -43,26 +43,18 @@ struct platform_device s3c_device_i2c6 = { | |||
43 | .resource = s3c_i2c_resource, | 43 | .resource = s3c_i2c_resource, |
44 | }; | 44 | }; |
45 | 45 | ||
46 | static struct s3c2410_platform_i2c default_i2c_data6 __initdata = { | ||
47 | .flags = 0, | ||
48 | .bus_num = 6, | ||
49 | .slave_addr = 0x10, | ||
50 | .frequency = 100*1000, | ||
51 | .sda_delay = 100, | ||
52 | }; | ||
53 | |||
54 | void __init s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *pd) | 46 | void __init s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *pd) |
55 | { | 47 | { |
56 | struct s3c2410_platform_i2c *npd; | 48 | struct s3c2410_platform_i2c *npd; |
57 | 49 | ||
58 | if (!pd) | 50 | if (!pd) { |
59 | pd = &default_i2c_data6; | 51 | pd = &default_i2c_data; |
52 | pd->bus_num = 6; | ||
53 | } | ||
60 | 54 | ||
61 | npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); | 55 | npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), |
62 | if (!npd) | 56 | &s3c_device_i2c6); |
63 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
64 | else if (!npd->cfg_gpio) | ||
65 | npd->cfg_gpio = s3c_i2c6_cfg_gpio; | ||
66 | 57 | ||
67 | s3c_device_i2c6.dev.platform_data = npd; | 58 | if (!npd->cfg_gpio) |
59 | npd->cfg_gpio = s3c_i2c6_cfg_gpio; | ||
68 | } | 60 | } |
diff --git a/arch/arm/plat-samsung/dev-i2c7.c b/arch/arm/plat-samsung/dev-i2c7.c index 1182451d7dce..9dddcd1665b5 100644 --- a/arch/arm/plat-samsung/dev-i2c7.c +++ b/arch/arm/plat-samsung/dev-i2c7.c | |||
@@ -43,26 +43,18 @@ struct platform_device s3c_device_i2c7 = { | |||
43 | .resource = s3c_i2c_resource, | 43 | .resource = s3c_i2c_resource, |
44 | }; | 44 | }; |
45 | 45 | ||
46 | static struct s3c2410_platform_i2c default_i2c_data7 __initdata = { | ||
47 | .flags = 0, | ||
48 | .bus_num = 7, | ||
49 | .slave_addr = 0x10, | ||
50 | .frequency = 100*1000, | ||
51 | .sda_delay = 100, | ||
52 | }; | ||
53 | |||
54 | void __init s3c_i2c7_set_platdata(struct s3c2410_platform_i2c *pd) | 46 | void __init s3c_i2c7_set_platdata(struct s3c2410_platform_i2c *pd) |
55 | { | 47 | { |
56 | struct s3c2410_platform_i2c *npd; | 48 | struct s3c2410_platform_i2c *npd; |
57 | 49 | ||
58 | if (!pd) | 50 | if (!pd) { |
59 | pd = &default_i2c_data7; | 51 | pd = &default_i2c_data; |
52 | pd->bus_num = 7; | ||
53 | } | ||
60 | 54 | ||
61 | npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); | 55 | npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), |
62 | if (!npd) | 56 | &s3c_device_i2c7); |
63 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
64 | else if (!npd->cfg_gpio) | ||
65 | npd->cfg_gpio = s3c_i2c7_cfg_gpio; | ||
66 | 57 | ||
67 | s3c_device_i2c7.dev.platform_data = npd; | 58 | if (!npd->cfg_gpio) |
59 | npd->cfg_gpio = s3c_i2c7_cfg_gpio; | ||
68 | } | 60 | } |
diff --git a/arch/arm/plat-samsung/dev-nand.c b/arch/arm/plat-samsung/dev-nand.c index 6927ae8fd118..b8e30ec6ac26 100644 --- a/arch/arm/plat-samsung/dev-nand.c +++ b/arch/arm/plat-samsung/dev-nand.c | |||
@@ -91,11 +91,10 @@ void __init s3c_nand_set_platdata(struct s3c2410_platform_nand *nand) | |||
91 | * time then there is little chance the system is going to run. | 91 | * time then there is little chance the system is going to run. |
92 | */ | 92 | */ |
93 | 93 | ||
94 | npd = kmemdup(nand, sizeof(struct s3c2410_platform_nand), GFP_KERNEL); | 94 | npd = s3c_set_platdata(nand, sizeof(struct s3c2410_platform_nand), |
95 | if (!npd) { | 95 | &s3c_device_nand); |
96 | printk(KERN_ERR "%s: failed copying platform data\n", __func__); | 96 | if (!npd) |
97 | return; | 97 | return; |
98 | } | ||
99 | 98 | ||
100 | /* now see if we need to copy any of the nand set data */ | 99 | /* now see if we need to copy any of the nand set data */ |
101 | 100 | ||
@@ -123,6 +122,4 @@ void __init s3c_nand_set_platdata(struct s3c2410_platform_nand *nand) | |||
123 | to++; | 122 | to++; |
124 | } | 123 | } |
125 | } | 124 | } |
126 | |||
127 | s3c_device_nand.dev.platform_data = npd; | ||
128 | } | 125 | } |
diff --git a/arch/arm/plat-samsung/dev-ts.c b/arch/arm/plat-samsung/dev-ts.c index 3e4bd8147bf4..82543f0248ac 100644 --- a/arch/arm/plat-samsung/dev-ts.c +++ b/arch/arm/plat-samsung/dev-ts.c | |||
@@ -45,16 +45,6 @@ struct platform_device s3c_device_ts = { | |||
45 | 45 | ||
46 | void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *pd) | 46 | void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *pd) |
47 | { | 47 | { |
48 | struct s3c2410_ts_mach_info *npd; | 48 | s3c_set_platdata(pd, sizeof(struct s3c2410_ts_mach_info), |
49 | 49 | &s3c_device_ts); | |
50 | if (!pd) { | ||
51 | printk(KERN_ERR "%s: no platform data\n", __func__); | ||
52 | return; | ||
53 | } | ||
54 | |||
55 | npd = kmemdup(pd, sizeof(struct s3c2410_ts_mach_info), GFP_KERNEL); | ||
56 | if (!npd) | ||
57 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
58 | |||
59 | s3c_device_ts.dev.platform_data = npd; | ||
60 | } | 50 | } |
diff --git a/arch/arm/plat-samsung/dev-usb.c b/arch/arm/plat-samsung/dev-usb.c index 0e0a3bf5c982..33fbaa967700 100644 --- a/arch/arm/plat-samsung/dev-usb.c +++ b/arch/arm/plat-samsung/dev-usb.c | |||
@@ -60,11 +60,6 @@ EXPORT_SYMBOL(s3c_device_ohci); | |||
60 | */ | 60 | */ |
61 | void __init s3c_ohci_set_platdata(struct s3c2410_hcd_info *info) | 61 | void __init s3c_ohci_set_platdata(struct s3c2410_hcd_info *info) |
62 | { | 62 | { |
63 | struct s3c2410_hcd_info *npd; | 63 | s3c_set_platdata(info, sizeof(struct s3c2410_hcd_info), |
64 | 64 | &s3c_device_ohci); | |
65 | npd = kmemdup(info, sizeof(struct s3c2410_hcd_info), GFP_KERNEL); | ||
66 | if (!npd) | ||
67 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
68 | |||
69 | s3c_device_ohci.dev.platform_data = npd; | ||
70 | } | 65 | } |
diff --git a/arch/arm/plat-samsung/include/plat/backlight.h b/arch/arm/plat-samsung/include/plat/backlight.h new file mode 100644 index 000000000000..51d8da846a62 --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/backlight.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* linux/arch/arm/plat-samsung/include/plat/backlight.h | ||
2 | * | ||
3 | * Copyright (c) 2011 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_PLAT_BACKLIGHT_H | ||
12 | #define __ASM_PLAT_BACKLIGHT_H __FILE__ | ||
13 | |||
14 | /* samsung_bl_gpio_info - GPIO info for PWM Backlight control | ||
15 | * @no: GPIO number for PWM timer out | ||
16 | * @func: Special function of GPIO line for PWM timer | ||
17 | */ | ||
18 | struct samsung_bl_gpio_info { | ||
19 | int no; | ||
20 | int func; | ||
21 | }; | ||
22 | |||
23 | extern void samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, | ||
24 | struct platform_pwm_backlight_data *bl_data); | ||
25 | |||
26 | #endif /* __ASM_PLAT_BACKLIGHT_H */ | ||
diff --git a/arch/arm/plat-samsung/include/plat/clock.h b/arch/arm/plat-samsung/include/plat/clock.h index 983c578b8276..87d5b38a86fb 100644 --- a/arch/arm/plat-samsung/include/plat/clock.h +++ b/arch/arm/plat-samsung/include/plat/clock.h | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
13 | #include <linux/clkdev.h> | ||
13 | 14 | ||
14 | struct clk; | 15 | struct clk; |
15 | 16 | ||
@@ -40,6 +41,7 @@ struct clk { | |||
40 | struct module *owner; | 41 | struct module *owner; |
41 | struct clk *parent; | 42 | struct clk *parent; |
42 | const char *name; | 43 | const char *name; |
44 | const char *devname; | ||
43 | int id; | 45 | int id; |
44 | int usage; | 46 | int usage; |
45 | unsigned long rate; | 47 | unsigned long rate; |
@@ -47,6 +49,7 @@ struct clk { | |||
47 | 49 | ||
48 | struct clk_ops *ops; | 50 | struct clk_ops *ops; |
49 | int (*enable)(struct clk *, int enable); | 51 | int (*enable)(struct clk *, int enable); |
52 | struct clk_lookup lookup; | ||
50 | #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) | 53 | #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) |
51 | struct dentry *dent; /* For visible tree hierarchy */ | 54 | struct dentry *dent; /* For visible tree hierarchy */ |
52 | #endif | 55 | #endif |
diff --git a/arch/arm/plat-samsung/include/plat/iic.h b/arch/arm/plat-samsung/include/plat/iic.h index 1543da8f85c1..56b0059439e1 100644 --- a/arch/arm/plat-samsung/include/plat/iic.h +++ b/arch/arm/plat-samsung/include/plat/iic.h | |||
@@ -71,4 +71,6 @@ extern void s3c_i2c5_cfg_gpio(struct platform_device *dev); | |||
71 | extern void s3c_i2c6_cfg_gpio(struct platform_device *dev); | 71 | extern void s3c_i2c6_cfg_gpio(struct platform_device *dev); |
72 | extern void s3c_i2c7_cfg_gpio(struct platform_device *dev); | 72 | extern void s3c_i2c7_cfg_gpio(struct platform_device *dev); |
73 | 73 | ||
74 | extern struct s3c2410_platform_i2c default_i2c_data; | ||
75 | |||
74 | #endif /* __ASM_ARCH_IIC_H */ | 76 | #endif /* __ASM_ARCH_IIC_H */ |
diff --git a/arch/arm/plat-samsung/pwm-clock.c b/arch/arm/plat-samsung/pwm-clock.c index 46c9381e083b..f1bba88ed2f5 100644 --- a/arch/arm/plat-samsung/pwm-clock.c +++ b/arch/arm/plat-samsung/pwm-clock.c | |||
@@ -268,6 +268,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = { | |||
268 | [0] = { | 268 | [0] = { |
269 | .clk = { | 269 | .clk = { |
270 | .name = "pwm-tdiv", | 270 | .name = "pwm-tdiv", |
271 | .devname = "s3c24xx-pwm.0", | ||
271 | .ops = &clk_tdiv_ops, | 272 | .ops = &clk_tdiv_ops, |
272 | .parent = &clk_timer_scaler[0], | 273 | .parent = &clk_timer_scaler[0], |
273 | }, | 274 | }, |
@@ -275,6 +276,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = { | |||
275 | [1] = { | 276 | [1] = { |
276 | .clk = { | 277 | .clk = { |
277 | .name = "pwm-tdiv", | 278 | .name = "pwm-tdiv", |
279 | .devname = "s3c24xx-pwm.1", | ||
278 | .ops = &clk_tdiv_ops, | 280 | .ops = &clk_tdiv_ops, |
279 | .parent = &clk_timer_scaler[0], | 281 | .parent = &clk_timer_scaler[0], |
280 | } | 282 | } |
@@ -282,6 +284,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = { | |||
282 | [2] = { | 284 | [2] = { |
283 | .clk = { | 285 | .clk = { |
284 | .name = "pwm-tdiv", | 286 | .name = "pwm-tdiv", |
287 | .devname = "s3c24xx-pwm.2", | ||
285 | .ops = &clk_tdiv_ops, | 288 | .ops = &clk_tdiv_ops, |
286 | .parent = &clk_timer_scaler[1], | 289 | .parent = &clk_timer_scaler[1], |
287 | }, | 290 | }, |
@@ -289,6 +292,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = { | |||
289 | [3] = { | 292 | [3] = { |
290 | .clk = { | 293 | .clk = { |
291 | .name = "pwm-tdiv", | 294 | .name = "pwm-tdiv", |
295 | .devname = "s3c24xx-pwm.3", | ||
292 | .ops = &clk_tdiv_ops, | 296 | .ops = &clk_tdiv_ops, |
293 | .parent = &clk_timer_scaler[1], | 297 | .parent = &clk_timer_scaler[1], |
294 | }, | 298 | }, |
@@ -296,6 +300,7 @@ static struct pwm_tdiv_clk clk_timer_tdiv[] = { | |||
296 | [4] = { | 300 | [4] = { |
297 | .clk = { | 301 | .clk = { |
298 | .name = "pwm-tdiv", | 302 | .name = "pwm-tdiv", |
303 | .devname = "s3c24xx-pwm.4", | ||
299 | .ops = &clk_tdiv_ops, | 304 | .ops = &clk_tdiv_ops, |
300 | .parent = &clk_timer_scaler[1], | 305 | .parent = &clk_timer_scaler[1], |
301 | }, | 306 | }, |
@@ -361,26 +366,31 @@ static struct clk_ops clk_tin_ops = { | |||
361 | static struct clk clk_tin[] = { | 366 | static struct clk clk_tin[] = { |
362 | [0] = { | 367 | [0] = { |
363 | .name = "pwm-tin", | 368 | .name = "pwm-tin", |
369 | .devname = "s3c24xx-pwm.0", | ||
364 | .id = 0, | 370 | .id = 0, |
365 | .ops = &clk_tin_ops, | 371 | .ops = &clk_tin_ops, |
366 | }, | 372 | }, |
367 | [1] = { | 373 | [1] = { |
368 | .name = "pwm-tin", | 374 | .name = "pwm-tin", |
375 | .devname = "s3c24xx-pwm.1", | ||
369 | .id = 1, | 376 | .id = 1, |
370 | .ops = &clk_tin_ops, | 377 | .ops = &clk_tin_ops, |
371 | }, | 378 | }, |
372 | [2] = { | 379 | [2] = { |
373 | .name = "pwm-tin", | 380 | .name = "pwm-tin", |
381 | .devname = "s3c24xx-pwm.2", | ||
374 | .id = 2, | 382 | .id = 2, |
375 | .ops = &clk_tin_ops, | 383 | .ops = &clk_tin_ops, |
376 | }, | 384 | }, |
377 | [3] = { | 385 | [3] = { |
378 | .name = "pwm-tin", | 386 | .name = "pwm-tin", |
387 | .devname = "s3c24xx-pwm.3", | ||
379 | .id = 3, | 388 | .id = 3, |
380 | .ops = &clk_tin_ops, | 389 | .ops = &clk_tin_ops, |
381 | }, | 390 | }, |
382 | [4] = { | 391 | [4] = { |
383 | .name = "pwm-tin", | 392 | .name = "pwm-tin", |
393 | .devname = "s3c24xx-pwm.4", | ||
384 | .id = 4, | 394 | .id = 4, |
385 | .ops = &clk_tin_ops, | 395 | .ops = &clk_tin_ops, |
386 | }, | 396 | }, |
diff --git a/arch/arm/plat-samsung/time.c b/arch/arm/plat-samsung/time.c index 2231d80ad817..e3bb806bbafe 100644 --- a/arch/arm/plat-samsung/time.c +++ b/arch/arm/plat-samsung/time.c | |||
@@ -259,6 +259,8 @@ static void __init s3c2410_timer_resources(void) | |||
259 | clk_enable(timerclk); | 259 | clk_enable(timerclk); |
260 | 260 | ||
261 | if (!use_tclk1_12()) { | 261 | if (!use_tclk1_12()) { |
262 | tmpdev.id = 4; | ||
263 | tmpdev.dev.init_name = "s3c24xx-pwm.4"; | ||
262 | tin = clk_get(&tmpdev.dev, "pwm-tin"); | 264 | tin = clk_get(&tmpdev.dev, "pwm-tin"); |
263 | if (IS_ERR(tin)) | 265 | if (IS_ERR(tin)) |
264 | panic("failed to get pwm-tin clock for system timer"); | 266 | panic("failed to get pwm-tin clock for system timer"); |