Skip to contentSkip to conversation

linux-am335x-3.2.0-psp04.06.00.08: Add SDK released version of the Linux kernel

PATCH Superseded Franklin S. Cooper Jr 4 participants 6 messages Sep 21, 2012 – Oct 1, 2012

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-am335x-3.2.0-psp04.06.00.08: Add SDK released version of the Linux kernel

* Add the PSP release version of the Linux kernel for the am335x-evm
* Include a variable called PATCHES_OVER_PSP which can be used to add patches ontop of the PSP release of the Linux kernel. Currently used to apply various patches that add functionality, fixes bugs or disable features. This variable can be used to add patches on top of the sdk patches or to override them.
* Set the default preference for now to -1 until Sitara SDK oe-classic to oe-core migration is completed and has been tested.

---
 ...odified-WLAN-enable-and-irq-to-match-boar.patch |   63 +
 ...x-Add-crypto-driver-settings-to-defconfig.patch |  131 +
 ...m335x-Add-pm_runtime-API-to-crypto-driver.patch |  406 ++
 ...x-enable-pullup-on-the-WLAN-enable-pin-fo.patch |   58 +
 ...01-am335x_evm_defconfig-turn-off-MUSB-DMA.patch |   36 +
 ...-using-edge-triggered-interrupts-for-WLAN.patch |   36 +
 ...x-Add-memory-addresses-for-crypto-modules.patch |   42 +
 .../0001-am33xx-Add-SmartReflex-support.patch      | 2015 ++++++
 .../0001-mach-omap2-pm33xx-Disable-VT-switch.patch |   72 +
 ...date-PIO-mode-help-information-in-Kconfig.patch |   46 +
 ...1-omap-serial-add-delay-before-suspending.patch |   42 +
 .../0002-AM335x-OCF-Driver-for-Linux-3.patch       | 7229 ++++++++++++++++++++
 ...-suspend-resume-routines-to-crypto-driver.patch |  148 +
 ...Add-crypto-device-and-resource-structures.patch |  112 +
 ...2-am33xx-Enable-CONFIG_AM33XX_SMARTREFLEX.patch |   27 +
 ...rypto-device-and-resource-structure-for-T.patch |   61 +
 ...d-crypto-drivers-to-Kconfig-and-Makefiles.patch |  125 +
 ...eate-header-file-for-OMAP4-crypto-modules.patch |  214 +
 ...m33x-Create-driver-for-TRNG-crypto-module.patch |  325 +
 ...am33x-Create-driver-for-AES-crypto-module.patch |  972 +++
 ...x-Create-driver-for-SHA-MD5-crypto-module.patch | 1445 ++++
 .../linux-am335x-3.2.0-psp04.06.00.08/defconfig    |    1 +
 .../linux/linux-am335x_3.2.0-psp04.06.00.08.bb     |   81 +
 recipes-kernel/linux/setup-defconfig.inc           |   26 +
 24 files changed, 13713 insertions(+), 0 deletions(-)
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am3358-sk-modified-WLAN-enable-and-irq-to-match-boar.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335x-Add-crypto-driver-settings-to-defconfig.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335x-Add-pm_runtime-API-to-crypto-driver.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335x-enable-pullup-on-the-WLAN-enable-pin-fo.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335x_evm_defconfig-turn-off-MUSB-DMA.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335xevm-using-edge-triggered-interrupts-for-WLAN.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am33x-Add-memory-addresses-for-crypto-modules.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am33xx-Add-SmartReflex-support.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-mach-omap2-pm33xx-Disable-VT-switch.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-musb-update-PIO-mode-help-information-in-Kconfig.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-omap-serial-add-delay-before-suspending.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0002-AM335x-OCF-Driver-for-Linux-3.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0002-am335x-Add-suspend-resume-routines-to-crypto-driver.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0002-am33x-Add-crypto-device-and-resource-structures.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0002-am33xx-Enable-CONFIG_AM33XX_SMARTREFLEX.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0003-am33x-Add-crypto-device-and-resource-structure-for-T.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0004-am33x-Add-crypto-drivers-to-Kconfig-and-Makefiles.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0005-am33x-Create-header-file-for-OMAP4-crypto-modules.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0006-am33x-Create-driver-for-TRNG-crypto-module.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0007-am33x-Create-driver-for-AES-crypto-module.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0008-am33x-Create-driver-for-SHA-MD5-crypto-module.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/defconfig
 create mode 100644 recipes-kernel/linux/linux-am335x_3.2.0-psp04.06.00.08.bb
 create mode 100644 recipes-kernel/linux/setup-defconfig.inc
recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am3358-sk-modified-WLAN-enable-and-irq-to-match-boar.patch new file +63 -0
new file mode 100644
index 0000000..94581c5
@@ -0,0 +1,63 @@
+From 69c82f68876d24e798388fc053c8d6766236ac65 Mon Sep 17 00:00:00 2001
+From: Vita Preskovsky <[email protected]>
+Date: Thu, 28 Jun 2012 14:53:12 +0300
+Subject: [PATCH] am3358-sk: modified WLAN enable and irq to match board revision 1.2
+ 	* 1. WLAN enable and irq are modified to match board revision 1.2
+ 	  2. support suspend/resume for SK board
+
+Upstream-Status: Pending
+
+Signed-off-by: Vita Preskovsky <[email protected]>
+---
+ arch/arm/mach-omap2/board-am335xevm.c |   11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
+index 64f7547..6ae4e68 100755
+--- a/arch/arm/mach-omap2/board-am335xevm.c
++++ b/arch/arm/mach-omap2/board-am335xevm.c
+@@ -905,7 +905,7 @@ static struct pinmux_config ecap2_pin_mux[] = {
+ 
+ #define AM335XEVM_WLAN_PMENA_GPIO	GPIO_TO_PIN(1, 30)
+ #define AM335XEVM_WLAN_IRQ_GPIO		GPIO_TO_PIN(3, 17)
+-#define AM335XEVM_SK_WLAN_IRQ_GPIO      GPIO_TO_PIN(1, 29)
++#define AM335XEVM_SK_WLAN_IRQ_GPIO      GPIO_TO_PIN(0, 31)
+ 
+ struct wl12xx_platform_data am335xevm_wlan_data = {
+ 	.irq = OMAP_GPIO_IRQ(AM335XEVM_WLAN_IRQ_GPIO),
+@@ -941,8 +941,8 @@ static struct pinmux_config wl12xx_pin_mux[] = {
+  };
+ 
+ static struct pinmux_config wl12xx_pin_mux_sk[] = {
+-	{"gpmc_wpn.gpio0_31", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},
+-	{"gpmc_csn0.gpio1_29", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
++	{"gpmc_wpn.gpio0_31", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
++	{"gpmc_csn0.gpio1_29", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT_PULLUP},
+ 	{"mcasp0_ahclkx.gpio3_21", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},
+ 	{NULL, 0},
+ };
+@@ -1618,6 +1618,7 @@ static void mmc1_wl12xx_init(int evm_id, int profile)
+ 	am335x_mmc[1].name = "wl1271";
+ 	am335x_mmc[1].caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD;
+ 	am335x_mmc[1].nonremovable = true;
++	am335x_mmc[1].pm_caps = MMC_PM_KEEP_POWER;
+ 	am335x_mmc[1].gpio_cd = -EINVAL;
+ 	am335x_mmc[1].gpio_wp = -EINVAL;
+ 	am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */
+@@ -1674,10 +1675,12 @@ static void wl12xx_init(int evm_id, int profile)
+ 	int ret;
+ 
+ 	if (evm_id == EVM_SK) {
+-		am335xevm_wlan_data.wlan_enable_gpio = GPIO_TO_PIN(0, 31);
++		am335xevm_wlan_data.wlan_enable_gpio = GPIO_TO_PIN(1, 29);
+ 		am335xevm_wlan_data.bt_enable_gpio = GPIO_TO_PIN(3, 21);
+ 		am335xevm_wlan_data.irq =
+ 				OMAP_GPIO_IRQ(AM335XEVM_SK_WLAN_IRQ_GPIO);
++		am335xevm_wlan_data.platform_quirks = 
++				WL12XX_PLATFORM_QUIRK_EDGE_IRQ;
+ 		setup_pin_mux(wl12xx_pin_mux_sk);
+ 	} else {
+ 		setup_pin_mux(wl12xx_pin_mux);
+-- 
+1.7.0.4
+
recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335x-Add-crypto-driver-settings-to-defconfig.patch new file +131 -0

131 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335x-Add-pm_runtime-API-to-crypto-driver.patch new file +406 -0

406 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335x-enable-pullup-on-the-WLAN-enable-pin-fo.patch new file +58 -0

58 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335x_evm_defconfig-turn-off-MUSB-DMA.patch new file +36 -0
new file mode 100644
index 0000000..77a3b1d
@@ -0,0 +1,36 @@
+From 95eca5a896c96d0af7188c97825a3b3ef5313ed3 Mon Sep 17 00:00:00 2001
+From: Chase Maupin <[email protected]>
+Date: Thu, 2 Feb 2012 16:38:51 -0600
+Subject: [PATCH] am335x_evm_defconfig: turn off MUSB DMA
+
+* Turn off the MUSB DMA in the am335x_evm_defconfig.  This way
+  we can pull the default defconfig without enabling the
+  faulty USB DMA.
+
+Signed-off-by: Chase Maupin <[email protected]>
+---
+ arch/arm/configs/am335x_evm_defconfig |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/arch/arm/configs/am335x_evm_defconfig b/arch/arm/configs/am335x_evm_defconfig
+index d105c61..121dc7f 100644
+--- a/arch/arm/configs/am335x_evm_defconfig
++++ b/arch/arm/configs/am335x_evm_defconfig
+@@ -1982,11 +1982,11 @@ CONFIG_USB_MUSB_TI81XX_GLUE=y
+ CONFIG_USB_MUSB_TI81XX=y
+ # CONFIG_USB_MUSB_BLACKFIN is not set
+ # CONFIG_USB_MUSB_UX500 is not set
+-CONFIG_USB_TI_CPPI41_DMA_HW=y
+-# CONFIG_MUSB_PIO_ONLY is not set
++# CONFIG_USB_TI_CPPI41_DMA_HW is not set
++CONFIG_MUSB_PIO_ONLY=y
+ # CONFIG_USB_INVENTRA_DMA is not set
+ # CONFIG_USB_TI_CPPI_DMA is not set
+-CONFIG_USB_TI_CPPI41_DMA=y
++# CONFIG_USB_TI_CPPI41_DMA is not set
+ # CONFIG_USB_TUSB_OMAP_DMA is not set
+ # CONFIG_USB_UX500_DMA is not set
+ # CONFIG_USB_RENESAS_USBHS is not set
+-- 
+1.7.0.4
+
recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335xevm-using-edge-triggered-interrupts-for-WLAN.patch new file +36 -0
new file mode 100644
index 0000000..c835439
@@ -0,0 +1,36 @@
+From be52bac69dfe6a56276b16ccd234970c4f7b1255 Mon Sep 17 00:00:00 2001
+From: Vita Preskovsky <[email protected]>
+Date: Wed, 18 Jul 2012 16:20:36 +0300
+Subject: [PATCH] am335xevm: using edge triggered interrupts for WLAN
+
+  *using edge triggered interrupts instead of default level triggered in
+   all platforms supporting WLAN. This reduces CPU cycles and possibility
+   for missed interrupts.
+
+
+Signed-off-by: Vita Preskovsky <[email protected]>
+---
+ arch/arm/mach-omap2/board-am335xevm.c |    3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
+index 6ae4e68..ac005c8 100644
+--- a/arch/arm/mach-omap2/board-am335xevm.c
++++ b/arch/arm/mach-omap2/board-am335xevm.c
+@@ -1679,12 +1679,11 @@ static void wl12xx_init(int evm_id, int profile)
+ 		am335xevm_wlan_data.bt_enable_gpio = GPIO_TO_PIN(3, 21);
+ 		am335xevm_wlan_data.irq =
+ 				OMAP_GPIO_IRQ(AM335XEVM_SK_WLAN_IRQ_GPIO);
+-		am335xevm_wlan_data.platform_quirks = 
+-				WL12XX_PLATFORM_QUIRK_EDGE_IRQ;
+ 		setup_pin_mux(wl12xx_pin_mux_sk);
+ 	} else {
+ 		setup_pin_mux(wl12xx_pin_mux);
+ 	}
++	am335xevm_wlan_data.platform_quirks = WL12XX_PLATFORM_QUIRK_EDGE_IRQ;
+ 	wl12xx_bluetooth_enable();
+ 
+ 	if (wl12xx_set_platform_data(&am335xevm_wlan_data))
+-- 
+1.7.0.4
+
recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am33x-Add-memory-addresses-for-crypto-modules.patch new file +42 -0

42 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am33xx-Add-SmartReflex-support.patch new file +2015 -0

2,015 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-mach-omap2-pm33xx-Disable-VT-switch.patch new file +72 -0

72 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-musb-update-PIO-mode-help-information-in-Kconfig.patch new file +46 -0

46 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-omap-serial-add-delay-before-suspending.patch new file +42 -0

42 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0002-AM335x-OCF-Driver-for-Linux-3.patch new file +7229 -0

53 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0002-am335x-Add-suspend-resume-routines-to-crypto-driver.patch new file +148 -0

148 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0002-am33x-Add-crypto-device-and-resource-structures.patch new file +112 -0

112 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0002-am33xx-Enable-CONFIG_AM33XX_SMARTREFLEX.patch new file +27 -0
new file mode 100644
index 0000000..4e5d68c

Lines of this file are not shown. View the raw message.

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0003-am33x-Add-crypto-device-and-resource-structure-for-T.patch new file +61 -0

61 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0004-am33x-Add-crypto-drivers-to-Kconfig-and-Makefiles.patch new file +125 -0

125 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0005-am33x-Create-header-file-for-OMAP4-crypto-modules.patch new file +214 -0

214 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0006-am33x-Create-driver-for-TRNG-crypto-module.patch new file +325 -0

325 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0007-am33x-Create-driver-for-AES-crypto-module.patch new file +972 -0

972 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0008-am33x-Create-driver-for-SHA-MD5-crypto-module.patch new file +1445 -0

1,445 lines not on this page · raw message

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/defconfig new file +1 -0
new file mode 100644
index 0000000..f8cbc03

Lines of this file are not shown. View the raw message.

recipes-kernel/linux/linux-am335x_3.2.0-psp04.06.00.08.bb new file +81 -0

81 lines not on this page · raw message

recipes-kernel/linux/setup-defconfig.inc new file +26 -0
new file mode 100644
index 0000000..fc5e18e

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.0.4

Part of the diff is not shown here. View the raw message.

#1 lore raw

PATCH 1/1 u-boot_2011.09-psp04.06.00.08: Add the SDK released version of u-boot

* Add the official version of u-boot that is used by the Sitara SDK.

---
 .../u-boot/u-boot_2011.09-psp04.06.00.08.bb        |   29 ++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb
recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb new file +29 -0
new file mode 100644
index 0000000..cbaff76
@@ -0,0 +1,29 @@
+# Use the version of u-boot.inc in oe-core not the meta-ti version
+require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc
+
+DESCRIPTION = "u-boot bootloader for ARM MPU devices"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
+
+COMPATIBLE_MACHINE = "ti33x|am37x-evm|am3517-evm|beagleboard"
+
+DEFAULT_PREFERENCE = "-1"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+PR = "r0+gitr${SRCPV}"
+
+SRC_URI = "git://arago-project.org/git/projects/u-boot-am33x.git;protocol=git;branch=${BRANCH}"
+
+BRANCH = "AM335XPSP_04.06.00.08"
+
+# Lock to the commit corresponding to TAG:
+# v2011.09_AM335xPSP_04.06.00.08
+SRCREV = "1e4626f0d5f3bb04ec974e76a5d9029875269d31"
+
+S = "${WORKDIR}/git"
+
+UBOOT_SUFFIX = "img"
+
+# Set the name of the SPL that will built so that it is also packaged with u-boot.
+SPL_BINARY = "MLO"
Signature · 1 line
1.7.0.4
#2 lore raw

Re: [PATCH] u-boot_2011.09-psp04.06.00.08: Add the SDK released version of u-boot

Quoted 14 lines · Franklin S. Cooper Jr

* Add the official version of u-boot that is used by the Sitara SDK.

---
 .../u-boot/u-boot_2011.09-psp04.06.00.08.bb        |   29 ++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb
recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb new file +0 -0
new file mode 100644
index 0000000..cbaff76

recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb line 8

Quoted 8 lines
recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb new file +8 -0
@@ -0,0 +1,29 @@
+# Use the version of u-boot.inc in oe-core not the meta-ti version
+require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc
+
+DESCRIPTION = "u-boot bootloader for ARM MPU devices"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
+
+COMPATIBLE_MACHINE = "ti33x|am37x-evm|am3517-evm|beagleboard"

Are you sure this is the right set of machines for the URL below?

Quoted 27 lines
recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb new file +20 -0
+DEFAULT_PREFERENCE = "-1"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+PR = "r0+gitr${SRCPV}"
+
+SRC_URI = "git://arago-project.org/git/projects/u-boot-am33x.git;protocol=git;branch=${BRANCH}"
+
+BRANCH = "AM335XPSP_04.06.00.08"
+
+# Lock to the commit corresponding to TAG:
+# v2011.09_AM335xPSP_04.06.00.08
+SRCREV = "1e4626f0d5f3bb04ec974e76a5d9029875269d31"
+
+S = "${WORKDIR}/git"
+
+UBOOT_SUFFIX = "img"
+
+# Set the name of the SPL that will built so that it is also packaged with u-boot.
+SPL_BINARY = "MLO"
Signature · 6 lines
1.7.0.4

_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#5 lore raw
In reply to Franklin S. Cooper Jr

See below.

recipes-kernel/linux/linux-am335x_3.2.0-psp04.06.00.08.bb

Quoted 13,838 lines · Franklin S. Cooper Jr

* Add the PSP release version of the Linux kernel for the am335x-evm
* Include a variable called PATCHES_OVER_PSP which can be used to add patches ontop of the PSP release of the Linux kernel. Currently used to apply various patches that add functionality, fixes bugs or disable features. This variable can be used to add patches on top of the sdk patches or to override them.
* Set the default preference for now to -1 until Sitara SDK oe-classic to oe-core migration is completed and has been tested.

---
 ...odified-WLAN-enable-and-irq-to-match-boar.patch |   63 +
 ...x-Add-crypto-driver-settings-to-defconfig.patch |  131 +
 ...m335x-Add-pm_runtime-API-to-crypto-driver.patch |  406 ++
 ...x-enable-pullup-on-the-WLAN-enable-pin-fo.patch |   58 +
 ...01-am335x_evm_defconfig-turn-off-MUSB-DMA.patch |   36 +
 ...-using-edge-triggered-interrupts-for-WLAN.patch |   36 +
 ...x-Add-memory-addresses-for-crypto-modules.patch |   42 +
 .../0001-am33xx-Add-SmartReflex-support.patch      | 2015 ++++++
 .../0001-mach-omap2-pm33xx-Disable-VT-switch.patch |   72 +
 ...date-PIO-mode-help-information-in-Kconfig.patch |   46 +
 ...1-omap-serial-add-delay-before-suspending.patch |   42 +
 .../0002-AM335x-OCF-Driver-for-Linux-3.patch       | 7229 ++++++++++++++++++++
 ...-suspend-resume-routines-to-crypto-driver.patch |  148 +
 ...Add-crypto-device-and-resource-structures.patch |  112 +
 ...2-am33xx-Enable-CONFIG_AM33XX_SMARTREFLEX.patch |   27 +
 ...rypto-device-and-resource-structure-for-T.patch |   61 +
 ...d-crypto-drivers-to-Kconfig-and-Makefiles.patch |  125 +
 ...eate-header-file-for-OMAP4-crypto-modules.patch |  214 +
 ...m33x-Create-driver-for-TRNG-crypto-module.patch |  325 +
 ...am33x-Create-driver-for-AES-crypto-module.patch |  972 +++
 ...x-Create-driver-for-SHA-MD5-crypto-module.patch | 1445 ++++
 .../linux-am335x-3.2.0-psp04.06.00.08/defconfig    |    1 +
 .../linux/linux-am335x_3.2.0-psp04.06.00.08.bb     |   81 +
 recipes-kernel/linux/setup-defconfig.inc           |   26 +
 24 files changed, 13713 insertions(+), 0 deletions(-)
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am3358-sk-modified-WLAN-enable-and-irq-to-match-boar.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335x-Add-crypto-driver-settings-to-defconfig.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335x-Add-pm_runtime-API-to-crypto-driver.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335x-enable-pullup-on-the-WLAN-enable-pin-fo.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335x_evm_defconfig-turn-off-MUSB-DMA.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335xevm-using-edge-triggered-interrupts-for-WLAN.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am33x-Add-memory-addresses-for-crypto-modules.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am33xx-Add-SmartReflex-support.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-mach-omap2-pm33xx-Disable-VT-switch.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-musb-update-PIO-mode-help-information-in-Kconfig.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-omap-serial-add-delay-before-suspending.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0002-AM335x-OCF-Driver-for-Linux-3.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0002-am335x-Add-suspend-resume-routines-to-crypto-driver.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0002-am33x-Add-crypto-device-and-resource-structures.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0002-am33xx-Enable-CONFIG_AM33XX_SMARTREFLEX.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0003-am33x-Add-crypto-device-and-resource-structure-for-T.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0004-am33x-Add-crypto-drivers-to-Kconfig-and-Makefiles.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0005-am33x-Create-header-file-for-OMAP4-crypto-modules.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0006-am33x-Create-driver-for-TRNG-crypto-module.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0007-am33x-Create-driver-for-AES-crypto-module.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0008-am33x-Create-driver-for-SHA-MD5-crypto-module.patch
 create mode 100644 recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/defconfig
 create mode 100644 recipes-kernel/linux/linux-am335x_3.2.0-psp04.06.00.08.bb
 create mode 100644 recipes-kernel/linux/setup-defconfig.inc
recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am3358-sk-modified-WLAN-enable-and-irq-to-match-boar.patch new file +63 -0
new file mode 100644
index 0000000..94581c5
@@ -0,0 +1,63 @@
+From 69c82f68876d24e798388fc053c8d6766236ac65 Mon Sep 17 00:00:00 2001
+From: Vita Preskovsky <[email protected]>
+Date: Thu, 28 Jun 2012 14:53:12 +0300
+Subject: [PATCH] am3358-sk: modified WLAN enable and irq to match board revision 1.2
+ 	* 1. WLAN enable and irq are modified to match board revision 1.2
+ 	  2. support suspend/resume for SK board
+
+Upstream-Status: Pending
+
+Signed-off-by: Vita Preskovsky <[email protected]>
+---
+ arch/arm/mach-omap2/board-am335xevm.c |   11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
+index 64f7547..6ae4e68 100755
+--- a/arch/arm/mach-omap2/board-am335xevm.c
++++ b/arch/arm/mach-omap2/board-am335xevm.c
+@@ -905,7 +905,7 @@ static struct pinmux_config ecap2_pin_mux[] = {
+ 
+ #define AM335XEVM_WLAN_PMENA_GPIO	GPIO_TO_PIN(1, 30)
+ #define AM335XEVM_WLAN_IRQ_GPIO		GPIO_TO_PIN(3, 17)
+-#define AM335XEVM_SK_WLAN_IRQ_GPIO      GPIO_TO_PIN(1, 29)
++#define AM335XEVM_SK_WLAN_IRQ_GPIO      GPIO_TO_PIN(0, 31)
+ 
+ struct wl12xx_platform_data am335xevm_wlan_data = {
+ 	.irq = OMAP_GPIO_IRQ(AM335XEVM_WLAN_IRQ_GPIO),
+@@ -941,8 +941,8 @@ static struct pinmux_config wl12xx_pin_mux[] = {
+  };
+ 
+ static struct pinmux_config wl12xx_pin_mux_sk[] = {
+-	{"gpmc_wpn.gpio0_31", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},
+-	{"gpmc_csn0.gpio1_29", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
++	{"gpmc_wpn.gpio0_31", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
++	{"gpmc_csn0.gpio1_29", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT_PULLUP},
+ 	{"mcasp0_ahclkx.gpio3_21", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},
+ 	{NULL, 0},
+ };
+@@ -1618,6 +1618,7 @@ static void mmc1_wl12xx_init(int evm_id, int profile)
+ 	am335x_mmc[1].name = "wl1271";
+ 	am335x_mmc[1].caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD;
+ 	am335x_mmc[1].nonremovable = true;
++	am335x_mmc[1].pm_caps = MMC_PM_KEEP_POWER;
+ 	am335x_mmc[1].gpio_cd = -EINVAL;
+ 	am335x_mmc[1].gpio_wp = -EINVAL;
+ 	am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */
+@@ -1674,10 +1675,12 @@ static void wl12xx_init(int evm_id, int profile)
+ 	int ret;
+ 
+ 	if (evm_id == EVM_SK) {
+-		am335xevm_wlan_data.wlan_enable_gpio = GPIO_TO_PIN(0, 31);
++		am335xevm_wlan_data.wlan_enable_gpio = GPIO_TO_PIN(1, 29);
+ 		am335xevm_wlan_data.bt_enable_gpio = GPIO_TO_PIN(3, 21);
+ 		am335xevm_wlan_data.irq =
+ 				OMAP_GPIO_IRQ(AM335XEVM_SK_WLAN_IRQ_GPIO);
++		am335xevm_wlan_data.platform_quirks = 
++				WL12XX_PLATFORM_QUIRK_EDGE_IRQ;
+ 		setup_pin_mux(wl12xx_pin_mux_sk);
+ 	} else {
+ 		setup_pin_mux(wl12xx_pin_mux);
+-- 
+1.7.0.4
+
recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335x-Add-crypto-driver-settings-to-defconfig.patch new file +131 -0
new file mode 100644
index 0000000..cd00f69
@@ -0,0 +1,131 @@
+From 1edc97015f69fac420c32df514e1d1d546041d42 Mon Sep 17 00:00:00 2001
+From: Greg Turner <[email protected]>
+Date: Fri, 8 Jun 2012 13:54:13 -0500
+Subject: [PATCH] [am335x]: Add crypto driver settings to defconfig
+
+* Add Crypto Driver and configuration to defconfig
+---
+ arch/arm/configs/am335x_evm_defconfig |   39 +++++++++++++++++++++++---------
+ 1 files changed, 28 insertions(+), 11 deletions(-)
+ mode change 100644 => 100755 arch/arm/configs/am335x_evm_defconfig
+
+diff --git a/arch/arm/configs/am335x_evm_defconfig b/arch/arm/configs/am335x_evm_defconfig
+old mode 100644
+new mode 100755
+index de1eaad..0bf7efd
+--- a/arch/arm/configs/am335x_evm_defconfig
++++ b/arch/arm/configs/am335x_evm_defconfig
+@@ -1277,6 +1277,9 @@ CONFIG_SERIAL_OMAP_CONSOLE=y
+ # CONFIG_SERIAL_XILINX_PS_UART is not set
+ # CONFIG_HVC_DCC is not set
+ # CONFIG_IPMI_HANDLER is not set
++CONFIG_HW_RANDOM=y
++# CONFIG_HW_RANDOM_TIMERIOMEM is not set
++CONFIG_HW_RANDOM_OMAP4=y
+ # CONFIG_HW_RANDOM is not set
+ # CONFIG_R3964 is not set
+ # CONFIG_RAW_DRIVER is not set
+@@ -2472,36 +2475,38 @@ CONFIG_CRYPTO=y
+ #
+ CONFIG_CRYPTO_ALGAPI=y
+ CONFIG_CRYPTO_ALGAPI2=y
++CONFIG_CRYPTO_AEAD=y
+ CONFIG_CRYPTO_AEAD2=y
+ CONFIG_CRYPTO_BLKCIPHER=y
+ CONFIG_CRYPTO_BLKCIPHER2=y
+ CONFIG_CRYPTO_HASH=y
+ CONFIG_CRYPTO_HASH2=y
++CONFIG_CRYPTO_RNG=y
+ CONFIG_CRYPTO_RNG2=y
+ CONFIG_CRYPTO_PCOMP2=y
+ CONFIG_CRYPTO_MANAGER=y
+ CONFIG_CRYPTO_MANAGER2=y
+ # CONFIG_CRYPTO_USER is not set
+-CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
++# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
+ # CONFIG_CRYPTO_GF128MUL is not set
+ # CONFIG_CRYPTO_NULL is not set
+ CONFIG_CRYPTO_WORKQUEUE=y
+ # CONFIG_CRYPTO_CRYPTD is not set
+ # CONFIG_CRYPTO_AUTHENC is not set
+-# CONFIG_CRYPTO_TEST is not set
++CONFIG_CRYPTO_TEST=m
+ 
+ #
+ # Authenticated Encryption with Associated Data
+ #
+ # CONFIG_CRYPTO_CCM is not set
+ # CONFIG_CRYPTO_GCM is not set
+-# CONFIG_CRYPTO_SEQIV is not set
++CONFIG_CRYPTO_SEQIV=y
+ 
+ #
+ # Block modes
+ #
+-# CONFIG_CRYPTO_CBC is not set
+-# CONFIG_CRYPTO_CTR is not set
++CONFIG_CRYPTO_CBC=y
++CONFIG_CRYPTO_CTR=y
+ # CONFIG_CRYPTO_CTS is not set
+ CONFIG_CRYPTO_ECB=y
+ # CONFIG_CRYPTO_LRW is not set
+@@ -2511,7 +2516,7 @@ CONFIG_CRYPTO_ECB=y
+ #
+ # Hash modes
+ #
+-# CONFIG_CRYPTO_HMAC is not set
++CONFIG_CRYPTO_HMAC=y
+ # CONFIG_CRYPTO_XCBC is not set
+ # CONFIG_CRYPTO_VMAC is not set
+ 
+@@ -2521,14 +2526,14 @@ CONFIG_CRYPTO_ECB=y
+ CONFIG_CRYPTO_CRC32C=y
+ # CONFIG_CRYPTO_GHASH is not set
+ # CONFIG_CRYPTO_MD4 is not set
+-# CONFIG_CRYPTO_MD5 is not set
++CONFIG_CRYPTO_MD5=y
+ CONFIG_CRYPTO_MICHAEL_MIC=y
+ # CONFIG_CRYPTO_RMD128 is not set
+ # CONFIG_CRYPTO_RMD160 is not set
+ # CONFIG_CRYPTO_RMD256 is not set
+ # CONFIG_CRYPTO_RMD320 is not set
+-# CONFIG_CRYPTO_SHA1 is not set
+-# CONFIG_CRYPTO_SHA256 is not set
++CONFIG_CRYPTO_SHA1=y
++CONFIG_CRYPTO_SHA256=y
+ # CONFIG_CRYPTO_SHA512 is not set
+ # CONFIG_CRYPTO_TGR192 is not set
+ # CONFIG_CRYPTO_WP512 is not set
+@@ -2543,7 +2548,7 @@ CONFIG_CRYPTO_ARC4=y
+ # CONFIG_CRYPTO_CAMELLIA is not set
+ # CONFIG_CRYPTO_CAST5 is not set
+ # CONFIG_CRYPTO_CAST6 is not set
+-# CONFIG_CRYPTO_DES is not set
++CONFIG_CRYPTO_DES=y
+ # CONFIG_CRYPTO_FCRYPT is not set
+ # CONFIG_CRYPTO_KHAZAD is not set
+ # CONFIG_CRYPTO_SALSA20 is not set
+@@ -2565,7 +2570,19 @@ CONFIG_CRYPTO_LZO=y
+ # CONFIG_CRYPTO_ANSI_CPRNG is not set
+ # CONFIG_CRYPTO_USER_API_HASH is not set
+ # CONFIG_CRYPTO_USER_API_SKCIPHER is not set
+-# CONFIG_CRYPTO_HW is not set
++CONFIG_CRYPTO_HW=y
++CONFIG_CRYPTO_DEV_OMAP4_AES=y
++CONFIG_CRYPTO_DEV_OMAP4_SHAM=y
++
++#
++# OCF Configuration
++#
++CONFIG_OCF_OCF=y
++# CONFIG_OCF_RANDOMHARVEST is not set
++CONFIG_OCF_CRYPTODEV=y
++CONFIG_OCF_CRYPTOSOFT=y
++# CONFIG_OCF_OCFNULL is not set
++# CONFIG_OCF_BENCH is not set
+ # CONFIG_BINARY_PRINTF is not set
+ 
+ #
+-- 
+1.7.0.4
+
recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335x-Add-pm_runtime-API-to-crypto-driver.patch new file +406 -0
new file mode 100644
index 0000000..e9ae420
@@ -0,0 +1,406 @@
+From 7cb6dbae57e2bb5d237bb88f6eb40971cf8fc3b5 Mon Sep 17 00:00:00 2001
+From: Greg Turner <[email protected]>
+Date: Wed, 18 Jul 2012 09:15:18 -0500
+Subject: [PATCH] [am335x]: Add pm_runtime API to crypto driver
+
+* Add pm_runtime API to crypto driver AES and SHA
+* Mod devices.c file to add pm_runtime for crypto
+* Mod omap_hwmod_33xx_data.c to add resources structures
+* Crypto module clocks are enabled in probe function
+  and disabled only on remove or other error.
+---
+ arch/arm/mach-omap2/devices.c              |   66 ++++++++++++++++++++++++++++
+ arch/arm/mach-omap2/omap_hwmod_33xx_data.c |   15 ++++++-
+ drivers/crypto/omap4-aes.c                 |   52 +++++++++++----------
+ drivers/crypto/omap4-sham.c                |   45 ++++++++++---------
+ 4 files changed, 131 insertions(+), 47 deletions(-)
+ mode change 100644 => 100755 arch/arm/mach-omap2/devices.c
+ mode change 100644 => 100755 arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+ mode change 100644 => 100755 drivers/crypto/omap4-aes.c
+ mode change 100644 => 100755 drivers/crypto/omap4-sham.c
+
+diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
+old mode 100644
+new mode 100755
+index ebf0d9e..156e363
+--- a/arch/arm/mach-omap2/devices.c
++++ b/arch/arm/mach-omap2/devices.c
+@@ -751,6 +751,7 @@ static struct platform_device sham_device = {
+ 	.id		= -1,
+ };
+ 
++#if 0
+ static void omap_init_sham(void)
+ {
+ 	sham_device.resource = omap4_sham_resources;
+@@ -758,6 +759,38 @@ static void omap_init_sham(void)
+ 
+ 	platform_device_register(&sham_device);
+ }
++#endif
++
++int __init omap_init_sham(void)
++{
++	int id = -1;
++	struct platform_device *pdev;
++	struct omap_hwmod *oh;
++	char *oh_name = "sha0";
++	char *name = "omap4-sham";
++
++	oh = omap_hwmod_lookup(oh_name);
++	if (!oh) {
++		pr_err("Could not look up %s\n", oh_name);
++		return -ENODEV;
++	}
++
++	pdev = omap_device_build(name, id, oh, NULL, 0, NULL, 0, 0);
++	//pdev.resource = omap4_sham_resources;
++	//pdev.num_resources = omap4_sham_resources_sz;
++
++	if (IS_ERR(pdev)) {
++		WARN(1, "Can't build omap_device for %s:%s.\n",
++						name, oh->name);
++		return PTR_ERR(pdev);
++	}
++
++	return 0;
++}
++
++
++
++
+ 
+ #else
+ static inline void omap_init_sham(void) { }
+@@ -853,12 +886,45 @@ static struct platform_device aes_device = {
+ 	.id		= -1,
+ };
+ 
++#if 0
+ static void omap_init_aes(void)
+ {
+ 	aes_device.resource = omap4_aes_resources;
+ 	aes_device.num_resources = omap4_aes_resources_sz;
+ 	platform_device_register(&aes_device);
+ }
++#endif
++
++int __init omap_init_aes(void)
++{
++	int id = -1;
++	struct platform_device *pdev;
++	struct omap_hwmod *oh;
++	char *oh_name = "aes0";
++	char *name = "omap4-aes";
++
++	oh = omap_hwmod_lookup(oh_name);
++	if (!oh) {
++		pr_err("Could not look up %s\n", oh_name);
++		return -ENODEV;
++	}
++
++	pdev = omap_device_build(name, id, oh, NULL, 0, NULL, 0, 0);
++	//pdev.resource = omap4_sham_resources;
++	//pdev.num_resources = omap4_sham_resources_sz;
++
++	if (IS_ERR(pdev)) {
++		WARN(1, "Can't build omap_device for %s:%s.\n",
++						name, oh->name);
++		return PTR_ERR(pdev);
++	}
++
++	return 0;
++}
++
++
++
++
+ 
+ #else
+ static inline void omap_init_aes(void) { }
+diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+old mode 100644
+new mode 100755
+index 995b73f..2f9982c
+--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
++++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+@@ -434,11 +434,18 @@ static struct omap_hwmod_irq_info am33xx_aes0_irqs[] = {
+ 	{ .irq = -1 }
+ };
+ 
++static struct omap_hwmod_dma_info am33xx_aes0_dma[] = {
++	{ .dma_req = AM33XX_DMA_AESEIP36T0_DOUT },
++	{ .dma_req = AM33XX_DMA_AESEIP36T0_DIN },
++	{ .dma_req = -1 }
++};
++
+ static struct omap_hwmod am33xx_aes0_hwmod = {
+ 	.name		= "aes0",
+ 	.class		= &am33xx_aes_hwmod_class,
+ 	.clkdm_name	= "l3_clkdm",
+ 	.mpu_irqs	= am33xx_aes0_irqs,
++	.sdma_reqs	= am33xx_aes0_dma,
+ 	.main_clk	= "aes0_fck",
+ 	.prcm		= {
+ 		.omap4	= {
+@@ -2165,15 +2172,21 @@ static struct omap_hwmod_class am33xx_sha0_hwmod_class = {
+ };
+ 
+ static struct omap_hwmod_irq_info am33xx_sha0_irqs[] = {
+-	{ .irq = 108 },
++	{ .irq = AM33XX_IRQ_SHAEIP57t0_P },
+ 	{ .irq = -1 }
+ };
+ 
++static struct omap_hwmod_dma_info am33xx_sha0_dma[] = {
++	{ .dma_req = AM33XX_DMA_SHAEIP57T0_DIN },
++	{ .dma_req = -1 }
++};
++
+ static struct omap_hwmod am33xx_sha0_hwmod = {
+ 	.name		= "sha0",
+ 	.class		= &am33xx_sha0_hwmod_class,
+ 	.clkdm_name	= "l3_clkdm",
+ 	.mpu_irqs	= am33xx_sha0_irqs,
++	.sdma_reqs	= am33xx_sha0_dma,
+ 	.main_clk	= "sha0_fck",
+ 	.prcm		= {
+ 		.omap4	= {
+diff --git a/drivers/crypto/omap4-aes.c b/drivers/crypto/omap4-aes.c
+old mode 100644
+new mode 100755
+index f0b3fe2..76f988a
+--- a/drivers/crypto/omap4-aes.c
++++ b/drivers/crypto/omap4-aes.c
+@@ -32,13 +32,14 @@
+ #include <linux/init.h>
+ #include <linux/errno.h>
+ #include <linux/kernel.h>
+-#include <linux/clk.h>
+ #include <linux/platform_device.h>
+ #include <linux/scatterlist.h>
+ #include <linux/dma-mapping.h>
+ #include <linux/io.h>
+ #include <linux/crypto.h>
++#include <linux/pm_runtime.h>
+ #include <linux/interrupt.h>
++#include <linux/delay.h>
+ #include <crypto/scatterwalk.h>
+ #include <crypto/aes.h>
+ 
+@@ -145,12 +146,6 @@ static void omap4_aes_write_n(struct omap4_aes_dev *dd, u32 offset,
+ 
+ static int omap4_aes_hw_init(struct omap4_aes_dev *dd)
+ {
+-	/*
+-	 * clocks are enabled when request starts and disabled when finished.
+-	 * It may be long delays between requests.
+-	 * Device might go to off mode to save power.
+-	 */
+-	clk_enable(dd->iclk);
+ 	omap4_aes_write(dd, AES_REG_SYSCFG, 0);
+ 
+ 	if (!(dd->flags & FLAGS_INIT)) {
+@@ -494,7 +489,6 @@ static void omap4_aes_finish_req(struct omap4_aes_dev *dd, int err)
+ 
+ 	pr_debug("err: %d\n", err);
+ 
+-	clk_disable(dd->iclk);
+ 	dd->flags &= ~FLAGS_BUSY;
+ 
+ 	req->base.complete(&req->base, err);
+@@ -801,13 +795,15 @@ static int omap4_aes_probe(struct platform_device *pdev)
+ 	crypto_init_queue(&dd->queue, AM33X_AES_QUEUE_LENGTH);
+ 
+ 	/* Get the base address */
+-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+-	if (!res) {
+-		dev_err(dev, "invalid resource type\n");
+-		err = -ENODEV;
+-		goto err_res;
+-	}
+-	dd->phys_base = res->start;
++	//res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++	//if (!res) {
++	//	dev_err(dev, "invalid resource type\n");
++	//	err = -ENODEV;
++	//	goto err_res;
++	//}
++
++	//dd->phys_base = res->start;
++	dd->phys_base = AM33XX_AES0_P_BASE;
+ 
+ 	/* Get the DMA */
+ 	res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
+@@ -823,13 +819,10 @@ static int omap4_aes_probe(struct platform_device *pdev)
+ 	else
+ 		dd->dma_in = res->start;
+ 
+-	/* Initializing the clock */
+-	dd->iclk = clk_get(dev, "aes0_fck");
+-	if (IS_ERR(dd->iclk)) {
+-		dev_err(dev, "clock initialization failed.\n");
+-		err = PTR_ERR(dd->iclk);
+-		goto err_res;
+-	}
++	pm_runtime_enable(dev);
++	udelay(1);
++	pm_runtime_get_sync(dev);
++	udelay(1);
+ 
+ 	dd->io_base = ioremap(dd->phys_base, SZ_4K);
+ 	if (!dd->io_base) {
+@@ -840,7 +833,7 @@ static int omap4_aes_probe(struct platform_device *pdev)
+ 
+ 	omap4_aes_hw_init(dd);
+ 	reg = omap4_aes_read(dd, AES_REG_REV);
+-	clk_disable(dd->iclk);
++	
+ 	dev_info(dev, "AM33X AES hw accel rev: %u.%02u\n",
+ 		 ((reg & AES_REG_REV_X_MAJOR_MASK) >> 8),
+ 		 (reg & AES_REG_REV_Y_MINOR_MASK));
+@@ -879,7 +872,12 @@ err_dma:
+ 	iounmap(dd->io_base);
+ 
+ err_io:
+-	clk_put(dd->iclk);
++	pm_runtime_put_sync(dev);
++	udelay(1);
++	pm_runtime_disable(dev);
++	udelay(1);
++
++
+ err_res:
+ 	kfree(dd);
+ 	dd = NULL;
+@@ -907,7 +905,11 @@ static int omap4_aes_remove(struct platform_device *pdev)
+ 	tasklet_kill(&dd->queue_task);
+ 	omap4_aes_dma_cleanup(dd);
+ 	iounmap(dd->io_base);
+-	clk_put(dd->iclk);
++	pm_runtime_put_sync(&pdev->dev);
++	udelay(1);
++	pm_runtime_disable(&pdev->dev);
++	udelay(1);
++
+ 	kfree(dd);
+ 	dd = NULL;
+ 
+diff --git a/drivers/crypto/omap4-sham.c b/drivers/crypto/omap4-sham.c
+old mode 100644
+new mode 100755
+index 79f6be9..21f1b48
+--- a/drivers/crypto/omap4-sham.c
++++ b/drivers/crypto/omap4-sham.c
+@@ -31,7 +31,6 @@
+ #include <linux/errno.h>
+ #include <linux/interrupt.h>
+ #include <linux/kernel.h>
+-#include <linux/clk.h>
+ #include <linux/irq.h>
+ #include <linux/io.h>
+ #include <linux/platform_device.h>
+@@ -40,6 +39,7 @@
+ #include <linux/delay.h>
+ #include <linux/crypto.h>
+ #include <linux/cryptohash.h>
++#include <linux/pm_runtime.h>
+ #include <crypto/scatterwalk.h>
+ #include <crypto/algapi.h>
+ #include <crypto/sha.h>
+@@ -700,7 +700,6 @@ static void omap4_sham_finish_req(struct ahash_request *req, int err)
+ 	/* atomic operation is not needed here */
+ 	dd->dflags &= ~(BIT(FLAGS_BUSY) | BIT(FLAGS_FINAL) | BIT(FLAGS_CPU) |
+ 			BIT(FLAGS_DMA_READY) | BIT(FLAGS_OUTPUT_READY));
+-	clk_disable(dd->iclk);
+ 
+ 	if (req->base.complete)
+ 		req->base.complete(&req->base, err);
+@@ -743,7 +742,6 @@ static int omap4_sham_handle_queue(struct omap4_sham_dev *dd,
+ 	dev_dbg(dd->dev, "handling new req, op: %lu, nbytes: %d\n",
+ 						ctx->op, req->nbytes);
+ 
+-	clk_enable(dd->iclk);
+ 	if (!test_bit(FLAGS_INIT, &dd->dflags)) {
+ 		set_bit(FLAGS_INIT, &dd->dflags);
+ 		dd->err = 0;
+@@ -1272,13 +1270,15 @@ static int __devinit omap4_sham_probe(struct platform_device *pdev)
+ 	dd->irq = -1;
+ 
+ 	/* Get the base address */
+-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+-	if (!res) {
+-		dev_err(dev, "no MEM resource info\n");
+-		err = -ENODEV;
+-		goto res_err;
+-	}
+-	dd->phys_base = res->start;
++	//res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++	//if (!res) {
++	//	dev_err(dev, "no MEM resource info\n");
++	//	err = -ENODEV;
++	//	goto res_err;
++	//}
++
++	//dd->phys_base = res->start;
++	dd->phys_base = AM33XX_SHA1MD5_P_BASE;
+ 
+ 	/* Get the DMA */
+ 	res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
+@@ -1308,13 +1308,10 @@ static int __devinit omap4_sham_probe(struct platform_device *pdev)
+ 	if (err)
+ 		goto dma_err;
+ 
+-	/* Initializing the clock */
+-	dd->iclk = clk_get(dev, "sha0_fck");
+-	if (IS_ERR(dd->iclk)) {
+-		dev_err(dev, "clock initialization failed.\n");
+-		err = PTR_ERR(dd->iclk);
+-		goto clk_err;
+-	}
++	pm_runtime_enable(dev);
++	udelay(1);
++	pm_runtime_get_sync(dev);
++	udelay(1);
+ 
+ 	dd->io_base = ioremap(dd->phys_base, SZ_4K);
+ 	if (!dd->io_base) {
+@@ -1323,9 +1320,7 @@ static int __devinit omap4_sham_probe(struct platform_device *pdev)
+ 		goto io_err;
+ 	}
+ 
+-	clk_enable(dd->iclk);
+ 	reg = omap4_sham_read(dd, SHA_REG_REV);
+-	clk_disable(dd->iclk);
+ 
+ 	dev_info(dev, "AM33X SHA/MD5 hw accel rev: %u.%02u\n",
+ 		 (reg & SHA_REG_REV_X_MAJOR_MASK) >> 8, reg & SHA_REG_REV_Y_MINOR_MASK);
+@@ -1349,7 +1344,11 @@ err_algs:
+ 		crypto_unregister_ahash(&algs[j]);
+ 	iounmap(dd->io_base);
+ io_err:
+-	clk_put(dd->iclk);
++	pm_runtime_put_sync(dev);
++	udelay(1);
++	pm_runtime_disable(dev);
++	udelay(1);
++
+ clk_err:
+ 	omap4_sham_dma_cleanup(dd);
+ dma_err:
+@@ -1379,7 +1378,11 @@ static int __devexit omap4_sham_remove(struct platform_device *pdev)
+ 		crypto_unregister_ahash(&algs[i]);
+ 	tasklet_kill(&dd->done_task);
+ 	iounmap(dd->io_base);
+-	clk_put(dd->iclk);
++	pm_runtime_put_sync(&pdev->dev);
++	udelay(1);
++	pm_runtime_disable(&pdev->dev);
++	udelay(1);
++
+ 	omap4_sham_dma_cleanup(dd);
+ 	if (dd->irq >= 0)
+ 		free_irq(dd->irq, dd);
+-- 
+1.7.0.4
+
recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335x-enable-pullup-on-the-WLAN-enable-pin-fo.patch new file +58 -0
new file mode 100644
index 0000000..fa0e042
@@ -0,0 +1,58 @@
+From f69ffbef6793b7238a8518481735fd53326e0cdf Mon Sep 17 00:00:00 2001
+From: Vita Preskovsky <[email protected]>
+Date: Tue, 24 Jul 2012 20:02:28 +0300
+Subject: [PATCH] am335x: enable pullup on the WLAN enable pin for keeping wlan
+
+  * Enable pullup on the WLAN enable pin for keeping wlan active
+    during suspend in wowlan mode. The fix is relevant only in the case
+    of am335x-SK board.
+
+
+Signed-off-by: Vita Preskovsky <[email protected]>
+---
+ arch/arm/mach-omap2/board-am335xevm.c |   22 ++++++++++++++++++++++
+ 1 files changed, 22 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
+index f68710c..f263f84 100644
+--- a/arch/arm/mach-omap2/board-am335xevm.c
++++ b/arch/arm/mach-omap2/board-am335xevm.c
+@@ -1673,13 +1673,35 @@ static void wl12xx_bluetooth_enable(void)
+ 	gpio_direction_output(am335xevm_wlan_data.bt_enable_gpio, 0);
+ }
+ 
++#define AM33XX_CTRL_REGADDR(reg)					\
++		AM33XX_L4_WK_IO_ADDRESS(AM33XX_SCM_BASE + (reg))
++
++/* wlan enable pin */
++#define AM33XX_CONTROL_PADCONF_GPMC_CSN0_OFFSET		0x087C
+ static int wl12xx_set_power(struct device *dev, int slot, int on, int vdd)
+ {
++	int pad_mux_value;
++
+ 	if (on) {
+ 		gpio_direction_output(am335xevm_wlan_data.wlan_enable_gpio, 1);
++
++		/* Enable pullup on the WLAN enable pin for keeping wlan active during suspend
++		   in wowlan mode */
++		if ( am335x_evm_get_id() == EVM_SK ) {
++			pad_mux_value = readl(AM33XX_CTRL_REGADDR(AM33XX_CONTROL_PADCONF_GPMC_CSN0_OFFSET));
++			pad_mux_value &= (~AM33XX_PULL_DISA);
++			writel(pad_mux_value, AM33XX_CTRL_REGADDR(AM33XX_CONTROL_PADCONF_GPMC_CSN0_OFFSET));
++		}
++
+ 		mdelay(70);
+ 	} else {
+ 		gpio_direction_output(am335xevm_wlan_data.wlan_enable_gpio, 0);
++		/* Disable pullup on the WLAN enable when WLAN is off */
++		if ( am335x_evm_get_id() == EVM_SK ) {
++			pad_mux_value = readl(AM33XX_CTRL_REGADDR(AM33XX_CONTROL_PADCONF_GPMC_CSN0_OFFSET));
++			pad_mux_value |= AM33XX_PULL_DISA;
++			writel(pad_mux_value, AM33XX_CTRL_REGADDR(AM33XX_CONTROL_PADCONF_GPMC_CSN0_OFFSET));
++		}
+ 	}
+ 
+ 	return 0;
+-- 
+1.7.0.4
+
recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335x_evm_defconfig-turn-off-MUSB-DMA.patch new file +36 -0
new file mode 100644
index 0000000..77a3b1d
@@ -0,0 +1,36 @@
+From 95eca5a896c96d0af7188c97825a3b3ef5313ed3 Mon Sep 17 00:00:00 2001
+From: Chase Maupin <[email protected]>
+Date: Thu, 2 Feb 2012 16:38:51 -0600
+Subject: [PATCH] am335x_evm_defconfig: turn off MUSB DMA
+
+* Turn off the MUSB DMA in the am335x_evm_defconfig.  This way
+  we can pull the default defconfig without enabling the
+  faulty USB DMA.
+
+Signed-off-by: Chase Maupin <[email protected]>
+---
+ arch/arm/configs/am335x_evm_defconfig |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/arch/arm/configs/am335x_evm_defconfig b/arch/arm/configs/am335x_evm_defconfig
+index d105c61..121dc7f 100644
+--- a/arch/arm/configs/am335x_evm_defconfig
++++ b/arch/arm/configs/am335x_evm_defconfig
+@@ -1982,11 +1982,11 @@ CONFIG_USB_MUSB_TI81XX_GLUE=y
+ CONFIG_USB_MUSB_TI81XX=y
+ # CONFIG_USB_MUSB_BLACKFIN is not set
+ # CONFIG_USB_MUSB_UX500 is not set
+-CONFIG_USB_TI_CPPI41_DMA_HW=y
+-# CONFIG_MUSB_PIO_ONLY is not set
++# CONFIG_USB_TI_CPPI41_DMA_HW is not set
++CONFIG_MUSB_PIO_ONLY=y
+ # CONFIG_USB_INVENTRA_DMA is not set
+ # CONFIG_USB_TI_CPPI_DMA is not set
+-CONFIG_USB_TI_CPPI41_DMA=y
++# CONFIG_USB_TI_CPPI41_DMA is not set
+ # CONFIG_USB_TUSB_OMAP_DMA is not set
+ # CONFIG_USB_UX500_DMA is not set
+ # CONFIG_USB_RENESAS_USBHS is not set
+-- 
+1.7.0.4
+
recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am335xevm-using-edge-triggered-interrupts-for-WLAN.patch new file +36 -0
new file mode 100644
index 0000000..c835439
@@ -0,0 +1,36 @@
+From be52bac69dfe6a56276b16ccd234970c4f7b1255 Mon Sep 17 00:00:00 2001
+From: Vita Preskovsky <[email protected]>
+Date: Wed, 18 Jul 2012 16:20:36 +0300
+Subject: [PATCH] am335xevm: using edge triggered interrupts for WLAN
+
+  *using edge triggered interrupts instead of default level triggered in
+   all platforms supporting WLAN. This reduces CPU cycles and possibility
+   for missed interrupts.
+
+
+Signed-off-by: Vita Preskovsky <[email protected]>
+---
+ arch/arm/mach-omap2/board-am335xevm.c |    3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
+index 6ae4e68..ac005c8 100644
+--- a/arch/arm/mach-omap2/board-am335xevm.c
++++ b/arch/arm/mach-omap2/board-am335xevm.c
+@@ -1679,12 +1679,11 @@ static void wl12xx_init(int evm_id, int profile)
+ 		am335xevm_wlan_data.bt_enable_gpio = GPIO_TO_PIN(3, 21);
+ 		am335xevm_wlan_data.irq =
+ 				OMAP_GPIO_IRQ(AM335XEVM_SK_WLAN_IRQ_GPIO);
+-		am335xevm_wlan_data.platform_quirks = 
+-				WL12XX_PLATFORM_QUIRK_EDGE_IRQ;
+ 		setup_pin_mux(wl12xx_pin_mux_sk);
+ 	} else {
+ 		setup_pin_mux(wl12xx_pin_mux);
+ 	}
++	am335xevm_wlan_data.platform_quirks = WL12XX_PLATFORM_QUIRK_EDGE_IRQ;
+ 	wl12xx_bluetooth_enable();
+ 
+ 	if (wl12xx_set_platform_data(&am335xevm_wlan_data))
+-- 
+1.7.0.4
+
recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am33x-Add-memory-addresses-for-crypto-modules.patch new file +42 -0
new file mode 100644
index 0000000..0efd85c
@@ -0,0 +1,42 @@
+From 5f2f17a488aba4319b537aed040ea13607af128b Mon Sep 17 00:00:00 2001
+From: Greg Turner <[email protected]>
+Date: Thu, 17 May 2012 14:25:40 -0500
+Subject: [PATCH 1/8] am33x: Add memory addresses for crypto modules
+
+* Add base memory addresses to the am33xx.h header file
+
+These addresses are for the HW crypto modules including TRNG, AES, and SHA/MD5
+
+Signed-off-by: Greg Turner <[email protected]>
+---
+ arch/arm/plat-omap/include/plat/am33xx.h |   11 +++++++++++
+ 1 files changed, 11 insertions(+), 0 deletions(-)
+ mode change 100644 => 100755 arch/arm/plat-omap/include/plat/am33xx.h
+
+diff --git a/arch/arm/plat-omap/include/plat/am33xx.h b/arch/arm/plat-omap/include/plat/am33xx.h
+old mode 100644
+new mode 100755
+index a16e72c..96ab1c3
+--- a/arch/arm/plat-omap/include/plat/am33xx.h
++++ b/arch/arm/plat-omap/include/plat/am33xx.h
+@@ -65,6 +65,17 @@
+ 
+ #define AM33XX_ELM_BASE		0x48080000
+ 
++/* Base address for crypto modules */
++#define AM33XX_SHA1MD5_S_BASE	0x53000000
++#define AM33XX_SHA1MD5_P_BASE	0x53100000
++
++#define	AM33XX_AES0_S_BASE	0x53400000
++#define	AM33XX_AES0_P_BASE	0x53500000
++#define	AM33XX_AES1_S_BASE	0x53600000
++#define	AM33XX_AES1_P_BASE	0x53700000
++
++#define	AM33XX_RNG_BASE		0x48310000
++
+ #define AM33XX_ASP0_BASE	0x48038000
+ #define AM33XX_ASP1_BASE	0x4803C000
+ 
+-- 
+1.7.0.4
+
recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-am33xx-Add-SmartReflex-support.patch new file +2015 -0
new file mode 100644
index 0000000..da0d212
@@ -0,0 +1,2015 @@
+From 35ae6b61d349e5b4efd1c6337a0d1e23b6e86899 Mon Sep 17 00:00:00 2001
+From: Greg Guyotte <[email protected]>
+Date: Thu, 7 Jun 2012 18:05:31 -0500
+Subject: [PATCH] am33xx: Add SmartReflex support.
+
+This patch introduces SmartReflex support to AM33XX devices.  The
+purpose of SmartReflex is to optimize (lower) voltage based upon
+silicon process and temperature.
+
+The SmartReflex driver requires the silicon to be programmed with
+"nTarget" EFUSE values.  If the values are not present (as with
+pre-RTP samples), the driver will simply fail to load and kernel
+boot will continue normally.
+
+The SR driver logs several items in the debugfs at /debug/smartreflex.
+To disable SmartReflex, use the command 'echo 0 > /debug/smartreflex/autocomp'.
+The node /debug/smartreflex/smartreflex0 gives information about
+the CORE voltage domain, and /smartreflex1 is related to the MPU voltage
+domain.
+
+To determine the effectiveness of SmartReflex, you can compare the
+initial voltage with the current voltage for a given OPP.  For example,
+'cat /debug/smartreflex/smartreflex1/current_voltage' gives the current
+MPU voltage.  Comparing that with 'cat /debug/smartreflex/smartreflex1/
+initial_voltage' will show you the voltage drop associated with SR
+operation.
+
+Signed-off-by: Greg Guyotte <[email protected]>
+---
+ arch/arm/mach-omap2/Makefile                       |    1 +
+ arch/arm/mach-omap2/am33xx-smartreflex-class2.c    | 1055 ++++++++++++++++++++
+ arch/arm/mach-omap2/board-am335xevm.c              |    7 +
+ arch/arm/mach-omap2/devices.c                      |  269 +++++
+ arch/arm/mach-omap2/include/mach/board-am335xevm.h |    1 +
+ arch/arm/plat-omap/Kconfig                         |   21 +
+ arch/arm/plat-omap/include/plat/am33xx.h           |    3 +
+ arch/arm/plat-omap/include/plat/smartreflex.h      |  431 ++++++++
+ drivers/regulator/core.c                           |    4 +
+ include/linux/regulator/driver.h                   |    2 +-
+ include/linux/regulator/machine.h                  |    3 +-
+ 11 files changed, 1795 insertions(+), 2 deletions(-)
+ create mode 100644 arch/arm/mach-omap2/am33xx-smartreflex-class2.c
+ create mode 100644 arch/arm/plat-omap/include/plat/smartreflex.h
+
+diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
+index f275e74..c01b62d 100644
+--- a/arch/arm/mach-omap2/Makefile
++++ b/arch/arm/mach-omap2/Makefile
+@@ -73,6 +73,7 @@ obj-$(CONFIG_SOC_OMAPAM33XX)		+= cpuidle33xx.o pm33xx.o \
+ obj-$(CONFIG_PM_DEBUG)			+= pm-debug.o
+ obj-$(CONFIG_OMAP_SMARTREFLEX)          += sr_device.o smartreflex.o
+ obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3)	+= smartreflex-class3.o
++obj-$(CONFIG_AM33XX_SMARTREFLEX)        += am33xx-smartreflex-class2.o
+ 
+ AFLAGS_sleep24xx.o			:=-Wa,-march=armv6
+ AFLAGS_sleep34xx.o			:=-Wa,-march=armv7-a$(plus_sec)
+diff --git a/arch/arm/mach-omap2/am33xx-smartreflex-class2.c b/arch/arm/mach-omap2/am33xx-smartreflex-class2.c
+new file mode 100644
+index 0000000..66f98b7
+--- /dev/null
++++ b/arch/arm/mach-omap2/am33xx-smartreflex-class2.c
+@@ -0,0 +1,1055 @@
++/*
++ * SmartReflex Voltage Control driver
++ *
++ * Copyright (C) 2012 Texas Instruments, Inc. - http://www.ti.com/
++ * Author: Greg Guyotte <[email protected]> (modified for AM33xx)
++ *
++ * Copyright (C) 2011 Texas Instruments, Inc. - http://www.ti.com/
++ * Author: AnilKumar Ch <[email protected]>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation version 2.
++ *
++ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
++ * kind, whether express or implied; without even the implied warranty
++ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/module.h>
++#include <linux/interrupt.h>
++#include <linux/clk.h>
++#include <linux/io.h>
++#include <linux/debugfs.h>
++#include <linux/slab.h>
++#include <linux/regulator/consumer.h>
++#include <linux/cpufreq.h>
++#include <linux/opp.h>
++
++#include <plat/common.h>
++#include <plat/smartreflex.h>
++
++#include "control.h"
++#include "voltage.h"
++
++#define CLK_NAME_LEN		40
++
++static inline void sr_write_reg(struct am33xx_sr *sr, int offset, u32 value,
++					u32 srid)
++{
++	writel(value, sr->sen[srid].base + offset);
++}
++
++static inline void sr_modify_reg(struct am33xx_sr *sr, int offset, u32 mask,
++				u32 value, u32 srid)
++{
++	u32 reg_val;
++
++	reg_val = readl(sr->sen[srid].base + offset);
++	reg_val &= ~mask;
++	reg_val |= (value&mask);
++
++	writel(reg_val, sr->sen[srid].base + offset);
++}
++
++static inline u32 sr_read_reg(struct am33xx_sr *sr, int offset, u32 srid)
++{
++	return readl(sr->sen[srid].base + offset);
++}
++
++static void cal_reciprocal(u32 sensor, u32 *sengain, u32 *rnsen) {
++         u32 gn, rn, mul;
++ 
++         for (gn = 0; gn < GAIN_MAXLIMIT; gn++) {
++                 mul = 1 << (gn + 8);
++                 rn = mul / sensor;
++                 if (rn < R_MAXLIMIT) {
++                         *sengain = gn;
++                         *rnsen = rn;
++                 }
++         }
++}
++ 
++static u32 cal_test_nvalue(u32 sennval, u32 senpval) {
++         u32 senpgain=0, senngain=0;
++         u32 rnsenp=0, rnsenn=0;
++ 
++         /* Calculating the gain and reciprocal of the SenN and SenP values */
++         cal_reciprocal(senpval, &senpgain, &rnsenp);
++         cal_reciprocal(sennval, &senngain, &rnsenn);
++ 
++         return (senpgain << NVALUERECIPROCAL_SENPGAIN_SHIFT) |
++                 (senngain << NVALUERECIPROCAL_SENNGAIN_SHIFT) |
++                 (rnsenp << NVALUERECIPROCAL_RNSENP_SHIFT) |
++                 (rnsenn << NVALUERECIPROCAL_RNSENN_SHIFT);
++}
++
++static unsigned int sr_adjust_efuse_nvalue(unsigned int opp_no,
++                                                 unsigned int orig_opp_nvalue,
++                                                 unsigned int mv_delta) {
++         unsigned int new_opp_nvalue;
++         unsigned int senp_gain, senn_gain, rnsenp, rnsenn, pnt_delta, nnt_delta;
++         unsigned int new_senn, new_senp, senn, senp;
++ 
++         /* calculate SenN and SenP from the efuse value */
++         senp_gain = ((orig_opp_nvalue >> 20) & 0xf);
++         senn_gain = ((orig_opp_nvalue >> 16) & 0xf);
++         rnsenp = ((orig_opp_nvalue >> 8) & 0xff);
++         rnsenn = (orig_opp_nvalue & 0xff);
++ 
++         senp = ((1<<(senp_gain+8))/(rnsenp));
++         senn = ((1<<(senn_gain+8))/(rnsenn));
++ 
++         /* calculate the voltage delta */
++         pnt_delta = (26 * mv_delta)/10;
++         nnt_delta = (3 * mv_delta);
++ 
++         /* now lets add the voltage delta to the sensor values */
++         new_senn = senn + nnt_delta;
++         new_senp = senp + pnt_delta;
++ 
++         new_opp_nvalue = cal_test_nvalue(new_senn, new_senp);
++ 
++         printk("Compensating OPP%d for %dmV Orig nvalue:0x%x New nvalue:0x%x \n",
++                         opp_no, mv_delta, orig_opp_nvalue, new_opp_nvalue);
++ 
++         return new_opp_nvalue;
++}
++
++/* irq_sr_reenable - Re-enable SR interrupts (triggered by delayed work queue)
++ * @work:	pointer to work_struct embedded in am33xx_sr_sensor struct
++ *
++ * While servicing the IRQ, this function is added to the delayed work queue.
++ * This gives time for the voltage change to settle before we re-enable 
++ * the interrupt.
++ */
++static void irq_sr_reenable(struct work_struct *work)
++{
++        u32 srid;
++	struct am33xx_sr_sensor *sens;
++        struct am33xx_sr *sr;
++
++        sens = container_of((void *)work, struct am33xx_sr_sensor, 
++                work_reenable);
++
++        srid = sens->sr_id;
++
++        sr = container_of((void *)sens, struct am33xx_sr, sen[srid]);
++
++        dev_dbg(&sr->pdev->dev, "%s: SR %d\n", __func__, srid);
++
++        /* Must clear IRQ status */
++        sens->irq_status = 0;
++
++        /* Re-enable the interrupt */
++	sr_modify_reg(sr, IRQENABLE_SET, IRQENABLE_MCUBOUNDSINT,
++		IRQENABLE_MCUBOUNDSINT, srid);
++
++	/* Restart the module after voltage set */
++	sr_modify_reg(sr, SRCONFIG, SRCONFIG_SRENABLE,
++		SRCONFIG_SRENABLE, srid);
++}
++
++/* get_errvolt - get error voltage from SR error register
++ * @sr:		contains SR driver data
++ * @srid:	contains the srid, indicates which SR moduel lswe are using
++ *
++ * Read the error from SENSOR error register and then convert
++ * to voltage delta, return value is the voltage delta in micro
++ * volt.
++ */
++static int get_errvolt(struct am33xx_sr *sr, s32 srid)
++{
++        struct am33xx_sr_sensor *sens;
++	int senerror_reg;
++	s32 uvoltage;
++	s8 terror;
++
++        sens = &sr->sen[srid];
++
++	senerror_reg = sr_read_reg(sr, SENERROR_V2, srid);
++	senerror_reg = (senerror_reg & 0x0000FF00);
++	terror = (s8)(senerror_reg >> 8);
++
++        /* math defined in SR functional spec */
++	uvoltage = ((terror) * sr->uvoltage_step_size) >> 7;
++	uvoltage = uvoltage * sens->opp_data[sens->curr_opp].e2v_gain;
++
++	return uvoltage;
++}
++
++/* set_voltage - Schedule task for setting the voltage
++ * @work:	pointer to the work structure
++ *
++ * Voltage is set based on previous voltage and calculated
++ * voltage error.
++ *
++ * Generic voltage regulator set voltage is used for changing
++ * the voltage to new value.  Could potentially use voltdm_scale
++ * but at time of testing voltdm was not populated with volt_data.
++ *
++ * Disabling the module before changing the voltage, this is
++ * needed for not generating interrupt during voltage change,
++ * enabling after voltage change. This will also take care of
++ * resetting the SR registers.
++ */
++static void set_voltage(struct work_struct *work)
++{
++	struct am33xx_sr *sr;
++	int prev_volt, new_volt, i, ret;
++	s32 delta_v;
++
++	sr = container_of((void *)work, struct am33xx_sr, work);
++
++        for (i = 0; i < sr->no_of_sens; i++) {
++                if (sr->sen[i].irq_status != 1)
++                        continue;
++
++                /* Get the current voltage from PMIC */
++                prev_volt = regulator_get_voltage(sr->sen[i].reg);
++
++                if (prev_volt < 0) {
++                        dev_err(&sr->pdev->dev, 
++                                "%s: SR %d: regulator_get_voltage error %d\n",
++                                __func__, i, prev_volt);
++
++                        goto reenable;
++                }
++
++        	delta_v = get_errvolt(sr, i);
++                new_volt = prev_volt + delta_v;
++
++                /* this is the primary output for debugging SR activity */
++                dev_dbg(&sr->pdev->dev, 
++                        "%s: SR %d: prev volt=%d, delta_v=%d, req_volt=%d\n",
++                         __func__, i, prev_volt, delta_v, new_volt);
++         
++	        /* Clear the counter, SR module disable */
++	        sr_modify_reg(sr, SRCONFIG, SRCONFIG_SRENABLE,
++			~SRCONFIG_SRENABLE, i);
++
++                if (delta_v != 0) {
++	                ret = regulator_set_voltage(sr->sen[i].reg, new_volt, 
++                                new_volt + sr->uvoltage_step_size);
++
++                        if (ret < 0)
++                                dev_err(&sr->pdev->dev, 
++                                "%s: regulator_set_voltage failed! (err %d)\n", 
++                                __func__, ret);
++                }
++reenable:
++                /* allow time for voltage to settle before re-enabling SR 
++                   module and interrupt */        
++                schedule_delayed_work(&sr->sen[i].work_reenable, 
++                        msecs_to_jiffies(sr->irq_delay));
++        }
++}
++
++/* sr_class2_irq - sr irq handling
++ * @irq:	Number of the irq serviced
++ * @data:	data contains the SR driver structure
++ *
++ * Smartreflex IRQ handling for class2 IP, once the IRQ handler
++ * is here then disable the interrupt and re-enable after some
++ * time. This is the work around for handling both interrupts,
++ * while one got satisfied with the voltage change but not the
++ * other. The same logic helps the case where PMIC cannot set
++ * the exact voltage requested by SR IP
++ *
++ * Schedule work only if both interrupts are serviced
++ *
++ * Note that same irq handler is used for both the interrupts,
++ * needed for decision making for voltage change
++ */
++static irqreturn_t sr_class2_irq(int irq, void *data)
++{
++	u32 srid;
++        struct am33xx_sr *sr;
++        struct am33xx_sr_sensor *sr_sensor = (struct am33xx_sr_sensor *)data;
++
++        srid = sr_sensor->sr_id;
++
++        sr = container_of(data, struct am33xx_sr, sen[srid]);
++
++	sr->sen[srid].irq_status = 1;
++
++	/* Clear MCUBounds Interrupt */
++	sr_modify_reg(sr, IRQSTATUS, IRQSTATUS_MCBOUNDSINT,
++			IRQSTATUS_MCBOUNDSINT, srid);
++
++	/* Disable the interrupt and re-enable in set_voltage() */
++	sr_modify_reg(sr, IRQENABLE_CLR, IRQENABLE_MCUBOUNDSINT,
++			IRQENABLE_MCUBOUNDSINT, srid);
++
++        /* Causes set_voltage() to get called at a later time.  Set_voltage()
++           will check the irq_status flags to determine which SR needs to
++           be serviced.  This was previously done with schedule_work, but
++           I observed a crash in set_voltage() when changing OPPs on weak
++           silicon, which may have been related to insufficient voltage
++           settling time for OPP change.  This additional delay avoids the
++           crash. */
++        schedule_delayed_work(&sr->work, 
++                        msecs_to_jiffies(250));
++
++	return IRQ_HANDLED;
++}
++
++static int sr_clk_enable(struct am33xx_sr *sr, u32 srid)
++{
++	if (clk_enable(sr->sen[srid].fck) != 0) {
++		dev_err(&sr->pdev->dev, "%s: Could not enable sr_fck\n",
++					__func__);
++		return -EINVAL;
++	}
++
++	return 0;
++}
++
++static int sr_clk_disable(struct am33xx_sr *sr, u32 srid)
++{
++	clk_disable(sr->sen[srid].fck);
++
++	return 0;
++}
++
++static inline int sr_set_nvalues(struct am33xx_sr *sr, u32 srid)
++{
++        int i;
++        struct am33xx_sr_sensor *sens = &sr->sen[srid];
++
++        for (i = 0; i < sens->no_of_opps; i++) {
++        	/* Read nTarget value form EFUSE register*/
++	        sens->opp_data[i].nvalue = readl(AM33XX_CTRL_REGADDR
++			(sens->opp_data[i].efuse_offs)) & 0xFFFFFF;
++
++                /* validate nTarget value */
++                if (sens->opp_data[i].nvalue == 0)
++                        return -EINVAL;
++
++                /* adjust nTarget based on margin in mv */
++                sens->opp_data[i].adj_nvalue = sr_adjust_efuse_nvalue(i, 
++                        sens->opp_data[i].nvalue, 
++                        sens->opp_data[i].margin);
++
++                dev_dbg(&sr->pdev->dev, 
++                        "NValueReciprocal value (from efuse) = %08x\n", 
++                        sens->opp_data[i].nvalue);
++
++                dev_dbg(&sr->pdev->dev, 
++                        "Adjusted NValueReciprocal value = %08x\n", 
++                        sens->opp_data[i].adj_nvalue);
++        }
++	return 0;
++}
++
++/* sr_configure - Configure SR module to work in Error generator mode
++ * @sr:		contains SR driver data
++ * @srid:	contains the srid, specify whether it is CORE or MPU
++ *
++ * Configure the corresponding values to SR module registers for
++ * operating SR module in Error Generator mode.
++ */
++static void sr_configure(struct am33xx_sr *sr, u32 srid)
++{
++        struct am33xx_sr_sensor *sens = &sr->sen[srid];
++
++	/* Configuring the SR module with clock length, enabling the
++	 * error generator, enable SR module, enable individual N and P
++	 * sensors
++	 */
++	sr_write_reg(sr, SRCONFIG, (SRCLKLENGTH_125MHZ_SYSCLK |
++		SRCONFIG_SENENABLE | SRCONFIG_ERRGEN_EN |
++		(sens->senn_en << SRCONFIG_SENNENABLE_V2_SHIFT) |
++		(sens->senp_en << SRCONFIG_SENPENABLE_V2_SHIFT)),
++		srid);
++
++	/* Configuring the Error Generator */
++	sr_modify_reg(sr, ERRCONFIG_V2, (SR_ERRWEIGHT_MASK |
++		SR_ERRMAXLIMIT_MASK | SR_ERRMINLIMIT_MASK),
++		((sens->opp_data[sens->curr_opp].err_weight << 
++                        ERRCONFIG_ERRWEIGHT_SHIFT) |
++		(sens->opp_data[sens->curr_opp].err_maxlimit << 
++                        ERRCONFIG_ERRMAXLIMIT_SHIFT) |
++		(sens->opp_data[sens->curr_opp].err_minlimit <<          
++                        ERRCONFIG_ERRMINLIMIT_SHIFT)),
++		srid);
++}
++
++/* sr_enable - Enable SR module
++ * @sr:		contains SR driver data
++ * @srid:	contains the srid, specify whether it is CORE or MPU
++ *
++ * Enable SR module by writing nTarget values to corresponding SR
++ * NVALUERECIPROCAL register, enable the interrupt and enable SR
++ */
++static void sr_enable(struct am33xx_sr *sr, u32 srid)
++{
++        struct am33xx_sr_sensor *sens;
++
++        sens = &sr->sen[srid];
++
++	/* Check if SR is already enabled. If yes do nothing */
++	if (sr_read_reg(sr, SRCONFIG, srid) & SRCONFIG_SRENABLE)
++		return;
++
++	if (sens->opp_data[sens->curr_opp].nvalue == 0)
++		dev_err(&sr->pdev->dev, 
++                        "%s: OPP doesn't support SmartReflex\n", __func__);
++
++	/* Writing the nReciprocal value to the register */
++	sr_write_reg(sr, NVALUERECIPROCAL, 
++                sens->opp_data[sens->curr_opp].adj_nvalue, srid);
++
++	/* Enable the interrupt */
++	sr_modify_reg(sr, IRQENABLE_SET, IRQENABLE_MCUBOUNDSINT,
++				IRQENABLE_MCUBOUNDSINT, srid);
++
++	/* SRCONFIG - enable SR */
++	sr_modify_reg(sr, SRCONFIG, SRCONFIG_SRENABLE,
++				SRCONFIG_SRENABLE, srid);
++}
++
++/* sr_disable - Disable SR module
++ * @sr:		contains SR driver data
++ * @srid:	contains the srid, specify whether it is CORE or MPU
++ *
++ * Disable SR module by disabling the interrupt and Smartreflex module
++ */
++static void sr_disable(struct am33xx_sr *sr, u32 srid)
++{
++	/* Disable the interrupt */
++	sr_modify_reg(sr, IRQENABLE_CLR, IRQENABLE_MCUBOUNDSINT,
++				IRQENABLE_MCUBOUNDSINT, srid);
++
++	/* SRCONFIG - disable SR */
++	sr_modify_reg(sr, SRCONFIG, SRCONFIG_SRENABLE,
++				~SRCONFIG_SRENABLE, srid);
++}
++
++/* sr_start_vddautocomp - Start VDD auto compensation
++ * @sr:		contains SR driver data
++ *
++ * This is the starting point for AVS enable from user space.
++ * Also used to re-enable SR after OPP change.
++ */
++static void sr_start_vddautocomp(struct am33xx_sr *sr)
++{
++	int i;
++
++	if ((sr->sen[SR_CORE].opp_data[0].nvalue == 0) || 
++                (sr->sen[SR_MPU].opp_data[0].nvalue == 0)) {
++		dev_err(&sr->pdev->dev, "SR module not enabled, nTarget"
++					" values are not found\n");
++		return;
++	}
++
++	if (sr->autocomp_active == 1) {
++		dev_warn(&sr->pdev->dev, "SR VDD autocomp already active\n");
++		return;
++	}
++
++	for (i = 0; i < sr->no_of_sens; i++) {
++               	/* Read current regulator value and voltage */
++	        sr->sen[i].init_volt_mv = regulator_get_voltage(sr->sen[i].reg);
++
++                dev_dbg(&sr->pdev->dev, "%s: regulator %d, init_volt = %d\n", 
++                        __func__, i, sr->sen[i].init_volt_mv);
++
++		if (sr_clk_enable(sr, i))
++                        return;
++		sr_configure(sr, i);
++		sr_enable(sr, i);
++	}
++
++	sr->autocomp_active = 1;
++}
++
++/* sr_stop_vddautocomp - Stop VDD auto compensation
++ * @sr:		contains SR driver data
++ *
++ * This is the ending point during SR disable from user space.
++ * Also used to disable SR after OPP change.
++ */
++static void sr_stop_vddautocomp(struct am33xx_sr *sr)
++{
++	int i;
++
++	if (sr->autocomp_active == 0) {
++		dev_warn(&sr->pdev->dev, "SR VDD autocomp is not active\n");
++		return;
++	}
++
++        /* cancel bottom half interrupt handlers that haven't run yet */
++	cancel_delayed_work_sync(&sr->work);
++	
++	for (i = 0; i < sr->no_of_sens; i++) {
++                /* cancel any outstanding SR IRQ re-enables on work queue */
++                cancel_delayed_work_sync(&sr->sen[i].work_reenable);
++		sr_disable(sr, i);
++		sr_clk_disable(sr, i);
++	}
++	
++	sr->autocomp_active = 0;
++}
++
++/* am33xx_sr_autocomp_show - Store user input value and stop SR
++ * @data:		contains SR driver data
++ * @val:		pointer to store autocomp_active status
++ *
++ * This is the Debug Fs enteries to show whether SR is enabled
++ * or disabled
++ */
++static int am33xx_sr_autocomp_show(void *data, u64 *val)
++{
++	struct am33xx_sr *sr_info = (struct am33xx_sr *) data;
++
++	*val = (u64) sr_info->autocomp_active;
++
++	return 0;
++}
++
++static int am33xx_sr_margin_show(void *data, u64 *val)
++{
++        struct am33xx_sr_opp_data *sr_opp_data = (struct am33xx_sr_opp_data *)data;
++
++	*val = (u64) sr_opp_data->margin;
++
++	return 0;
++}
++
++static int am33xx_sr_margin_update(void *data, u64 val)
++{
++        struct am33xx_sr_opp_data *sr_opp_data = 
++                (struct am33xx_sr_opp_data *)data;
++        struct am33xx_sr_sensor *sr_sensor;
++        struct am33xx_sr *sr_info;
++
++        /* work back to the sr_info pointer */
++        sr_sensor = container_of((void *)sr_opp_data, struct am33xx_sr_sensor, 
++                opp_data[sr_opp_data->opp_id]); 
++
++        sr_info = container_of((void *)sr_sensor, struct am33xx_sr, 
++                sen[sr_sensor->sr_id]);
++
++        /* store the value of margin */
++        sr_opp_data->margin = (s32)val;
++
++        dev_warn(&sr_info->pdev->dev, "%s: new margin=%d, srid=%d, opp=%d\n",
++                __func__, sr_opp_data->margin, sr_sensor->sr_id, 
++                sr_opp_data->opp_id);
++
++        /* updata ntarget values based upon new margin */
++        if (sr_set_nvalues(sr_info, sr_sensor->sr_id) == -EINVAL)
++                dev_err(&sr_info->pdev->dev,
++                        "%s: Zero NValue read from EFUSE\n", __func__);
++
++        /* restart SmartReflex to adapt to new values */
++        sr_stop_vddautocomp(sr_info);
++        sr_start_vddautocomp(sr_info);
++
++        return 0;
++}
++
++/* am33xx_sr_autocomp_store - Store user input and start SR
++ * @data:		contains SR driver data
++ * @val:		contains the value pased by user
++ *
++ * This is the Debug Fs enteries to store user input and
++ * enable smartreflex.
++ */
++static int am33xx_sr_autocomp_store(void *data, u64 val)
++{
++	struct am33xx_sr *sr_info = (struct am33xx_sr *) data;
++
++	/* Sanity check */
++	if (val && (val != 1)) {
++		dev_warn(&sr_info->pdev->dev, "%s: Invalid argument %llu\n",
++		        __func__, val);
++		return -EINVAL;
++	}
++
++	if (!val) {
++                sr_info->disabled_by_user = 1;
++		sr_stop_vddautocomp(sr_info);
++        }
++	else {
++                sr_info->disabled_by_user = 0;
++		sr_start_vddautocomp(sr_info);
++        }
++
++	return 0;
++}
++
++DEFINE_SIMPLE_ATTRIBUTE(sr_fops, am33xx_sr_autocomp_show,
++		am33xx_sr_autocomp_store, "%llu\n");
++
++/* sr_curr_volt_show - Show current voltage value
++ * @data:		contains SR driver data
++ * @val:		pointer to store current voltage value
++ *
++ * Read the current voltage value and display the same on console
++ * This is used in debugfs entries
++ */
++static int am33xx_sr_curr_volt_show(void *data, u64 *val)
++{
++	struct am33xx_sr_sensor *sr_sensor = (struct am33xx_sr_sensor *) data;
++
++	*val = (u64) regulator_get_voltage(sr_sensor->reg);
++
++	return 0;
++}
++
++DEFINE_SIMPLE_ATTRIBUTE(curr_volt_fops, am33xx_sr_curr_volt_show,
++		NULL, "%llu\n");
++
++DEFINE_SIMPLE_ATTRIBUTE(margin_fops, am33xx_sr_margin_show,
++		am33xx_sr_margin_update, "%llu\n");
++
++#ifdef CONFIG_DEBUG_FS
++/* sr_debugfs_entries - Create debugfs entries
++ * @sr_info:		contains SR driver data
++ *
++ * Create debugfs entries, which is exposed to user for knowing
++ * the current status. Some of the parameters can change during
++ * run time
++ */
++static int sr_debugfs_entries(struct am33xx_sr *sr_info)
++{
++        struct am33xx_sr_sensor *sens;
++	struct dentry *dbg_dir, *sen_dir, *opp_dir;
++	int i, j;
++
++	dbg_dir = debugfs_create_dir("smartreflex", NULL);
++	if (IS_ERR(dbg_dir)) {
++		dev_err(&sr_info->pdev->dev, "%s: Unable to create debugfs"
++				" directory\n", __func__);
++		return PTR_ERR(dbg_dir);
++	}
++
++	(void) debugfs_create_file("autocomp", S_IRUGO | S_IWUGO, dbg_dir,
++				(void *)sr_info, &sr_fops);
++        (void) debugfs_create_u32("interrupt_delay", S_IRUGO | S_IWUGO,
++				dbg_dir, &sr_info->irq_delay);
++
++	for (i = 0; i < sr_info->no_of_sens; i++) {
++                sens = &sr_info->sen[i];
++		sen_dir = debugfs_create_dir(sens->name, dbg_dir);
++		if (IS_ERR(sen_dir)) {
++			dev_err(&sr_info->pdev->dev, "%s: Unable to create"
++				" debugfs directory\n", __func__);
++			return PTR_ERR(sen_dir);
++		}
++
++                (void)debugfs_create_u32("initial_voltage", S_IRUGO, sen_dir,
++				&sens->init_volt_mv);
++	        (void)debugfs_create_file("current_voltage", S_IRUGO, sen_dir,
++				(void *)sens, &curr_volt_fops);
++		
++                for (j = 0; j < sr_info->sen[i].no_of_opps; j++) {
++                        char tmp[20];
++
++                        sprintf(&tmp[0], "opp%d", j);
++                        opp_dir = debugfs_create_dir(tmp, sen_dir);
++                        if (IS_ERR(opp_dir)) {
++        			dev_err(&sr_info->pdev->dev, 
++                                        "%s: Unable to create debugfs directory\n", 
++                                        __func__);
++        			return PTR_ERR(opp_dir);
++        		}
++
++                        (void)debugfs_create_file("margin", S_IRUGO | S_IWUGO,
++	        	       opp_dir, (void *)&sens->opp_data[j], 
++                               &margin_fops);
++                        (void)debugfs_create_x32("err2voltgain", 
++                               S_IRUGO | S_IWUGO,
++        		       opp_dir, 
++                               &sens->opp_data[j].e2v_gain);
++        		(void)debugfs_create_x32("nvalue", S_IRUGO,
++        		       opp_dir, 
++                               &sens->opp_data[j].nvalue);
++                        (void)debugfs_create_x32("adj_nvalue", S_IRUGO,
++        		       opp_dir, 
++                               &sens->opp_data[j].adj_nvalue);
++                }
++	}
++	return 0;
++}
++#else
++static int sr_debugfs_entries(struct am33xx_sr *sr_info)
++{
++	return 0;
++}
++#endif
++
++#ifdef CONFIG_CPU_FREQ
++
++/* Find and return current OPP.  This should change to use system APIs,
++   but voltdm is not currently populated, and opp APIs are also not working. */
++static int get_current_opp(struct am33xx_sr *sr, u32 srid, u32 freq)  {
++        int i;
++
++        for (i = 0; i < sr->sen[srid].no_of_opps; i++) {
++                if (sr->sen[srid].opp_data[i].frequency == freq)
++                        return i;
++        }
++
++        return -EINVAL;
++}
++
++static int am33xx_sr_cpufreq_transition(struct notifier_block *nb,
++					  unsigned long val, void *data)
++{
++        struct am33xx_sr *sr;
++        struct cpufreq_freqs *cpu;
++
++	sr = container_of(nb, struct am33xx_sr, freq_transition);
++
++        /* We are required to disable SR while OPP change is occurring */
++	if (val == CPUFREQ_PRECHANGE) {
++                dev_dbg(&sr->pdev->dev, "%s: prechange\n", __func__);
++                sr_stop_vddautocomp(sr);
++	} else if (val == CPUFREQ_POSTCHANGE) {
++                cpu = (struct cpufreq_freqs *)data;
++                dev_dbg(&sr->pdev->dev, 
++                        "%s: postchange, cpu=%d, old=%d, new=%d\n", 
++                        __func__, cpu->cpu, cpu->old, cpu->new);
++
++                /* update current OPP */
++                sr->sen[SR_MPU].curr_opp = get_current_opp(sr, SR_MPU, 
++                        cpu->new*1000);
++                if (sr->sen[SR_MPU].curr_opp == -EINVAL) {
++                        dev_err(&sr->pdev->dev, "%s: cannot determine opp\n",
++                                __func__);
++                        return -EINVAL;
++                }
++
++                dev_dbg(&sr->pdev->dev, "%s: postchange, new opp=%d\n", 
++                        __func__, sr->sen[SR_MPU].curr_opp);
++
++                /* this handles the case when the user has disabled SR via 
++                   debugfs, therefore we do not want to enable SR */
++                if (sr->disabled_by_user == 0)
++                        sr_start_vddautocomp(sr);
++	}
++
++	return 0;
++}
++
++static inline int am33xx_sr_cpufreq_register(struct am33xx_sr *sr)
++{
++        sr->freq_transition.notifier_call = am33xx_sr_cpufreq_transition;
++
++	return cpufreq_register_notifier(&sr->freq_transition,
++					 CPUFREQ_TRANSITION_NOTIFIER);
++}
++
++static inline void am33xx_sr_cpufreq_deregister(struct am33xx_sr *sr)
++{
++	cpufreq_unregister_notifier(&sr->freq_transition,
++				    CPUFREQ_TRANSITION_NOTIFIER);
++}
++
++#endif
++
++static int __init am33xx_sr_probe(struct platform_device *pdev)
++{
++	struct am33xx_sr *sr_info;
++	struct am33xx_sr_platform_data *pdata;
++	struct resource *res[MAX_SENSORS];
++	int irq;
++	int ret;
++	int i,j;
++
++	sr_info = kzalloc(sizeof(struct am33xx_sr), GFP_KERNEL);
++	if (!sr_info) {
++		dev_err(&pdev->dev, "%s: unable to allocate sr_info\n",
++					__func__);
++		return -ENOMEM;
++	}
++
++	pdata = pdev->dev.platform_data;
++	if (!pdata) {
++		dev_err(&pdev->dev, "%s: platform data missing\n", __func__);
++		ret = -EINVAL;
++		goto err_free_sr_info;
++	}
++
++	sr_info->pdev = pdev;
++	sr_info->sen[SR_CORE].name = "smartreflex0";
++	sr_info->sen[SR_MPU].name = "smartreflex1";
++	sr_info->ip_type = pdata->ip_type;
++        sr_info->irq_delay = pdata->irq_delay;
++        sr_info->no_of_sens = pdata->no_of_sens;
++        sr_info->no_of_vds = pdata->no_of_vds;
++	sr_info->uvoltage_step_size = pdata->vstep_size_uv;
++	sr_info->autocomp_active = false;
++        sr_info->disabled_by_user = false;
++        	
++	for (i = 0; i < sr_info->no_of_sens; i++) {
++                u32 curr_freq=0;
++
++                sr_info->sen[i].reg_name = pdata->vd_name[i];
++
++                /* this should be determined from voltdm or opp layer, but
++                   those approaches are not working */
++                sr_info->sen[i].no_of_opps = pdata->sr_sdata[i].no_of_opps;  
++                sr_info->sen[i].sr_id = i;
++
++                /* Reading per OPP Values */
++                for (j = 0; j < sr_info->sen[i].no_of_opps; j++) {
++        		sr_info->sen[i].opp_data[j].efuse_offs = 
++                                pdata->sr_sdata[i].sr_opp_data[j].efuse_offs;
++                        sr_info->sen[i].opp_data[j].e2v_gain = 
++                                pdata->sr_sdata[i].sr_opp_data[j].e2v_gain;
++        		sr_info->sen[i].opp_data[j].err_weight = 
++                                pdata->sr_sdata[i].sr_opp_data[j].err_weight;
++        		sr_info->sen[i].opp_data[j].err_minlimit = 
++                                pdata->sr_sdata[i].sr_opp_data[j].err_minlimit;
++        		sr_info->sen[i].opp_data[j].err_maxlimit = 
++                                pdata->sr_sdata[i].sr_opp_data[j].err_maxlimit;	  
++                        sr_info->sen[i].opp_data[j].margin = 
++                                pdata->sr_sdata[i].sr_opp_data[j].margin; 
++                        sr_info->sen[i].opp_data[j].nominal_volt = 
++                                pdata->sr_sdata[i].sr_opp_data[j].nominal_volt; 
++                        sr_info->sen[i].opp_data[j].frequency = 
++                                pdata->sr_sdata[i].sr_opp_data[j].frequency;  
++                        sr_info->sen[i].opp_data[j].opp_id = j;  	
++                }
++
++                if (i == SR_MPU) {
++                        /* hardcoded CPU NR */
++                        curr_freq = cpufreq_get(0); 
++                                
++                        /* update current OPP */
++                        sr_info->sen[i].curr_opp = get_current_opp(sr_info, i, 
++                                        curr_freq*1000);
++                        if (sr_info->sen[i].curr_opp == -EINVAL) {
++                                dev_err(&sr_info->pdev->dev, 
++                                        "%s: cannot determine opp\n",__func__);
++                                ret = -EINVAL;
++                                goto err_free_sr_info;
++                        }
++                } else {
++                        sr_info->sen[i].curr_opp = 
++                                pdata->sr_sdata[i].default_opp;
++                }   
++
++                dev_dbg(&pdev->dev, 
++                        "%s: SR%d, curr_opp=%d, no_of_opps=%d, step_size=%d\n",
++                        __func__, i, sr_info->sen[i].curr_opp, 
++                        sr_info->sen[i].no_of_opps, 
++                        sr_info->uvoltage_step_size);
++
++                ret = sr_set_nvalues(sr_info, i);
++                if (ret == -EINVAL) {
++                        dev_err(&sr_info->pdev->dev,
++                                "%s: Zero NValue read from EFUSE\n", __func__);
++                        goto err_free_sr_info;
++                }
++
++                INIT_DELAYED_WORK(&sr_info->sen[i].work_reenable, 
++                        irq_sr_reenable);
++
++		sr_info->res_name[i] = kzalloc(CLK_NAME_LEN + 1, GFP_KERNEL);
++
++		/* resources */
++		res[i] = platform_get_resource_byname(pdev, IORESOURCE_MEM,
++					sr_info->sen[i].name);
++		if (!res[i]) {
++			dev_err(&pdev->dev, "%s: no mem resource\n", __func__);
++			ret = -ENOENT;
++			goto err_free_mem;
++		}
++
++		irq = platform_get_irq_byname(pdev, sr_info->sen[i].name);
++		if (irq < 0) {
++			dev_err(&pdev->dev, "Can't get interrupt resource\n");
++			ret = irq;
++			goto err_free_mem;
++		}
++		sr_info->sen[i].irq = irq;
++
++		res[i] = request_mem_region(res[i]->start,
++				resource_size(res[i]), pdev->name);
++		if (!res[i]) {
++			dev_err(&pdev->dev, "can't request mem region\n");
++			ret = -EBUSY;
++			goto err_free_mem;
++		}
++
++		sr_info->sen[i].base = ioremap(res[i]->start,
++				resource_size(res[i]));
++		if (!sr_info->sen[i].base) {
++			dev_err(&pdev->dev, "%s: ioremap fail\n", __func__);
++			ret = -ENOMEM;
++			goto err_release_mem;
++		}
++
++		strcat(sr_info->res_name[i], sr_info->sen[i].name);
++		strcat(sr_info->res_name[i], "_fck");
++
++		sr_info->sen[i].fck = clk_get(NULL, sr_info->res_name[i]);
++		if (IS_ERR(sr_info->sen[i].fck)) {
++			dev_err(&pdev->dev, "%s: Could not get sr fck\n",
++						__func__);
++			ret = PTR_ERR(sr_info->sen[i].fck);
++			goto err_unmap;
++		}
++
++		ret = request_irq(sr_info->sen[i].irq, sr_class2_irq,
++			IRQF_DISABLED, sr_info->sen[i].name, 
++                        (void *)&sr_info->sen[i]);
++		if (ret) {
++			dev_err(&pdev->dev, "%s: Could not install SR ISR\n",
++						__func__);
++			goto err_put_clock;
++		}
++
++		sr_info->sen[i].senn_en = pdata->sr_sdata[i].senn_mod;
++		sr_info->sen[i].senp_en = pdata->sr_sdata[i].senp_mod;
++
++                sr_info->sen[i].reg = 
++                        regulator_get(NULL, sr_info->sen[i].reg_name);
++               	if (IS_ERR(sr_info->sen[i].reg)) {
++                        ret = -EINVAL;
++	                goto err_free_irq;
++                }
++
++               	/* Read current regulator value and voltage */
++	        sr_info->sen[i].init_volt_mv = 
++                        regulator_get_voltage(sr_info->sen[i].reg);
++
++                dev_dbg(&pdev->dev, "%s: regulator %d, init_volt = %d\n", 
++                        __func__, i, sr_info->sen[i].init_volt_mv);
++	} /* for() */
++
++        /* set_voltage() will be used as the bottom half IRQ handler */
++	INIT_DELAYED_WORK(&sr_info->work, set_voltage);
++
++#ifdef CONFIG_CPU_FREQ
++	ret = am33xx_sr_cpufreq_register(sr_info);
++	if (ret) {
++		dev_err(&pdev->dev, "failed to register cpufreq\n");
++		goto err_reg_put;
++	}
++#endif
++
++	/* debugfs entries */
++	ret = sr_debugfs_entries(sr_info);
++	if (ret)
++		dev_warn(&pdev->dev, "%s: Debugfs entries are not created\n",
++						__func__);
++
++	platform_set_drvdata(pdev, sr_info);
++
++	dev_info(&pdev->dev, "%s: Driver initialized\n", __func__);
++
++        /* disabled_by_user used to ensure SR doesn't come on via CPUFREQ
++           scaling if user has disabled SR via debugfs on enable_on_init */
++	if (pdata->enable_on_init)
++		sr_start_vddautocomp(sr_info);
++        else
++                sr_info->disabled_by_user = 1;
++
++	return ret;
++
++#ifdef CONFIG_CPU_FREQ
++	am33xx_sr_cpufreq_deregister(sr_info);
++#endif
++
++err_reg_put:
++        i--; /* back up i by one to walk back through the for loop */
++        regulator_put(sr_info->sen[i].reg);
++err_free_irq:
++	free_irq(sr_info->sen[i].irq, (void *)sr_info);
++err_put_clock:
++	clk_put(sr_info->sen[i].fck);
++err_unmap:
++	iounmap(sr_info->sen[i].base);
++err_release_mem:
++	release_mem_region(res[i]->start, resource_size(res[i]));
++err_free_mem:
++        kfree(sr_info->res_name[i]);
++        /* unwind back through the for loop */
++        if (i != 0) {
++                goto err_reg_put;
++        }
++        
++err_free_sr_info:
++	kfree(sr_info);
++	return ret;
++}
++
++static int __devexit am33xx_sr_remove(struct platform_device *pdev)
++{
++	struct am33xx_sr *sr_info;
++	struct resource *res[MAX_SENSORS];
++	int irq;
++	int i;
++
++	sr_info = dev_get_drvdata(&pdev->dev);
++	if (!sr_info) {
++		dev_err(&pdev->dev, "%s: sr_info missing\n", __func__);
++		return -EINVAL;
++	}
++
++	if (sr_info->autocomp_active)
++		sr_stop_vddautocomp(sr_info);
++
++#ifdef CONFIG_CPU_FREQ
++	am33xx_sr_cpufreq_deregister(sr_info);
++#endif
++
++	for (i = 0; i < sr_info->no_of_sens; i++) {
++                regulator_put(sr_info->sen[i].reg);
++                irq = platform_get_irq_byname(pdev, sr_info->sen[i].name);
++		free_irq(irq, (void *)sr_info);
++		clk_put(sr_info->sen[i].fck);
++		iounmap(sr_info->sen[i].base);
++		res[i] = platform_get_resource_byname(pdev,
++				IORESOURCE_MEM, sr_info->sen[i].name);
++		release_mem_region(res[i]->start, resource_size(res[i]));
++                kfree(sr_info->res_name[i]);
++	}
++
++	kfree(sr_info);
++
++        dev_info(&pdev->dev, "%s: SR has been removed\n", __func__);
++	return 0;
++}
++
++static struct platform_driver smartreflex_driver = {
++	.driver		= {
++		.name	= "smartreflex",
++		.owner	= THIS_MODULE,
++	},
++	.remove		= am33xx_sr_remove,
++};
++
++static int __init sr_init(void)
++{
++	int ret;
++
++	ret = platform_driver_probe(&smartreflex_driver, am33xx_sr_probe);
++	if (ret) {
++		pr_err("%s: platform driver register failed\n", __func__);
++		return ret;
++	}
++
++	return 0;
++}
++
++static void __exit sr_exit(void)
++{
++	platform_driver_unregister(&smartreflex_driver);
++}
++late_initcall(sr_init);
++module_exit(sr_exit);
++
++MODULE_DESCRIPTION("AM33XX Smartreflex Class2 Driver");
++MODULE_LICENSE("GPL");
++MODULE_ALIAS("platform:" DRIVER_NAME);
++MODULE_AUTHOR("Texas Instruments Inc");
+diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
+index 0bcadd7..6e1c026 100644
+--- a/arch/arm/mach-omap2/board-am335xevm.c
++++ b/arch/arm/mach-omap2/board-am335xevm.c
+@@ -1410,6 +1410,7 @@ static struct regulator_init_data tps65217_regulator_data[] = {
+ 		.num_consumer_supplies = ARRAY_SIZE(tps65217_dcdc2_consumers),
+ 		.consumer_supplies = tps65217_dcdc2_consumers,
+ 		.driver_data = &dcdc2_ramp_delay,
++		.ignore_check_consumers = 1,
+ 	},
+ 
+ 	/* dcdc3 */
+@@ -1424,6 +1425,7 @@ static struct regulator_init_data tps65217_regulator_data[] = {
+ 		},
+ 		.num_consumer_supplies = ARRAY_SIZE(tps65217_dcdc3_consumers),
+ 		.consumer_supplies = tps65217_dcdc3_consumers,
++		.ignore_check_consumers = 1,
+ 	},
+ 
+ 	/* ldo1 */
+@@ -2214,6 +2216,9 @@ static void am335x_evm_setup(struct memory_accessor *mem_acc, void *context)
+ 			goto out;
+ 	}
+ 
++	/* SmartReflex also requires board information. */
++	am33xx_sr_init();
++
+ 	return;
+ 
+ out:
+@@ -2265,6 +2270,7 @@ static struct regulator_init_data am335x_vdd1 = {
+ 	},
+ 	.num_consumer_supplies	= ARRAY_SIZE(am335x_vdd1_supply),
+ 	.consumer_supplies	= am335x_vdd1_supply,
++	.ignore_check_consumers = 1,
+ };
+ 
+ static struct regulator_consumer_supply am335x_vdd2_supply[] = {
+@@ -2281,6 +2287,7 @@ static struct regulator_init_data am335x_vdd2 = {
+ 	},
+ 	.num_consumer_supplies	= ARRAY_SIZE(am335x_vdd2_supply),
+ 	.consumer_supplies	= am335x_vdd2_supply,
++	.ignore_check_consumers = 1,
+ };
+ 
+ static struct tps65910_board am335x_tps65910_info = {
+diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
+index 6113654..ebf0d9e 100644
+--- a/arch/arm/mach-omap2/devices.c
++++ b/arch/arm/mach-omap2/devices.c
+@@ -52,6 +52,7 @@
+ #include <plat/config_pwm.h>
+ #include <plat/cpu.h>
+ #include <plat/gpmc.h>
++#include <plat/smartreflex.h>
+ #include <plat/am33xx.h>
+ 
+ /* LCD controller similar DA8xx */
+@@ -60,10 +61,28 @@
+ #include "mux.h"
+ #include "control.h"
+ #include "devices.h"
++#include "omap_opp_data.h"
+ 
+ #define L3_MODULES_MAX_LEN 12
+ #define L3_MODULES 3
+ 
++static unsigned int   am33xx_evmid;
++
++/*
++ * am33xx_evmid_fillup - set up board evmid
++ * @evmid - evm id which needs to be configured
++ *
++ * This function is called to configure board evm id.
++ * IA Motor Control EVM needs special setting of MAC PHY Id.
++ * This function is called when IA Motor Control EVM is detected
++ * during boot-up.
++ */
++void am33xx_evmid_fillup(unsigned int evmid)
++{
++       am33xx_evmid = evmid;
++       return;
++}
++
+ static int __init omap3_l3_init(void)
+ {
+ 	int l;
+@@ -1226,6 +1245,256 @@ static struct platform_device am335x_sgx = {
+ 
+ #endif
+ 
++#ifdef CONFIG_AM33XX_SMARTREFLEX
++
++/* smartreflex platform data */
++
++/* The values below are based upon silicon characterization data.  
++ * Each OPP and sensor combination potentially has different values.
++ * The values of ERR2VOLT_GAIN and ERR_MIN_LIMIT also change based on
++ * the PMIC step size.  Values have been given to cover the AM335 EVM
++ * (12.5mV step) and the Beaglebone (25mV step).  If the step
++ * size changes, you should update these values, and don't forget to
++ * change the step size in the platform data structure, am33xx_sr_pdata.
++ */
++
++#define AM33XX_SR0_OPP50_CNTRL_OFFSET          0x07B8
++#define AM33XX_SR0_OPP50_EVM_ERR2VOLT_GAIN     0xC
++#define AM33XX_SR0_OPP50_EVM_ERR_MIN_LIMIT     0xF5
++#define AM33XX_SR0_OPP50_BB_ERR2VOLT_GAIN      0x6
++#define AM33XX_SR0_OPP50_BB_ERR_MIN_LIMIT      0xEA
++#define AM33XX_SR0_OPP50_ERR_MAX_LIMIT         0x2
++#define AM33XX_SR0_OPP50_ERR_WEIGHT             0x4
++#define AM33XX_SR0_OPP50_MARGIN                 0
++
++#define AM33XX_SR0_OPP100_CNTRL_OFFSET         0x07BC
++#define AM33XX_SR0_OPP100_EVM_ERR2VOLT_GAIN     0x12
++#define AM33XX_SR0_OPP100_EVM_ERR_MIN_LIMIT    0xF8
++#define AM33XX_SR0_OPP100_BB_ERR2VOLT_GAIN      0x9
++#define AM33XX_SR0_OPP100_BB_ERR_MIN_LIMIT     0xF1
++#define AM33XX_SR0_OPP100_ERR_MAX_LIMIT                0x2
++#define AM33XX_SR0_OPP100_ERR_WEIGHT            0x4
++#define AM33XX_SR0_OPP100_MARGIN                0
++
++#define AM33XX_SR1_OPP50_CNTRL_OFFSET          0x0770
++#define AM33XX_SR1_OPP50_EVM_ERR2VOLT_GAIN     0x5
++#define AM33XX_SR1_OPP50_EVM_ERR_MIN_LIMIT     0xE6
++#define AM33XX_SR1_OPP50_BB_ERR2VOLT_GAIN      0x2
++#define AM33XX_SR1_OPP50_BB_ERR_MIN_LIMIT      0xC0
++#define AM33XX_SR1_OPP50_ERR_MAX_LIMIT         0x2
++#define AM33XX_SR1_OPP50_ERR_WEIGHT             0x4
++#define AM33XX_SR1_OPP50_MARGIN                 0
++
++#define AM33XX_SR1_OPP100_CNTRL_OFFSET         0x0774
++#define AM33XX_SR1_OPP100_EVM_ERR2VOLT_GAIN    0x8
++#define AM33XX_SR1_OPP100_EVM_ERR_MIN_LIMIT    0xF0
++#define AM33XX_SR1_OPP100_BB_ERR2VOLT_GAIN     0x4
++#define AM33XX_SR1_OPP100_BB_ERR_MIN_LIMIT     0xDF
++#define AM33XX_SR1_OPP100_ERR_MAX_LIMIT                0x2
++#define AM33XX_SR1_OPP100_ERR_WEIGHT            0x4
++#define AM33XX_SR1_OPP100_MARGIN                0
++
++#define AM33XX_SR1_OPP120_CNTRL_OFFSET         0x0778
++#define AM33XX_SR1_OPP120_EVM_ERR2VOLT_GAIN    0xB
++#define AM33XX_SR1_OPP120_EVM_ERR_MIN_LIMIT    0xF4
++#define AM33XX_SR1_OPP120_BB_ERR2VOLT_GAIN     0x5
++#define AM33XX_SR1_OPP120_BB_ERR_MIN_LIMIT     0xE6
++#define AM33XX_SR1_OPP120_ERR_MAX_LIMIT                0x2
++#define AM33XX_SR1_OPP120_ERR_WEIGHT            0x4
++#define AM33XX_SR1_OPP120_MARGIN                0
++
++#define AM33XX_SR1_OPPTURBO_CNTRL_OFFSET        0x077C
++#define AM33XX_SR1_OPPTURBO_EVM_ERR2VOLT_GAIN  0xC
++#define AM33XX_SR1_OPPTURBO_EVM_ERR_MIN_LIMIT  0xF5
++#define AM33XX_SR1_OPPTURBO_BB_ERR2VOLT_GAIN   0x6
++#define AM33XX_SR1_OPPTURBO_BB_ERR_MIN_LIMIT   0xEA
++#define AM33XX_SR1_OPPTURBO_ERR_MAX_LIMIT      0x2
++#define AM33XX_SR1_OPPTURBO_ERR_WEIGHT          0x4
++#define AM33XX_SR1_OPPTURBO_MARGIN              0
++
++/* the voltages and frequencies should probably be defined in opp3xxx_data.c.
++   Once SR is integrated to the mainline driver, and voltdm is working
++   correctly in AM335x, these can be removed.  */
++#define AM33XX_VDD_MPU_OPP50_UV                950000
++#define AM33XX_VDD_MPU_OPP100_UV       1100000
++#define AM33XX_VDD_MPU_OPP120_UV       1200000
++#define AM33XX_VDD_MPU_OPPTURBO_UV     1260000
++#define AM33XX_VDD_CORE_OPP50_UV        950000
++#define AM33XX_VDD_CORE_OPP100_UV       1100000
++
++#define AM33XX_VDD_MPU_OPP50_FREQ      275000000
++#define AM33XX_VDD_MPU_OPP100_FREQ     500000000
++#define AM33XX_VDD_MPU_OPP120_FREQ     600000000
++#define AM33XX_VDD_MPU_OPPTURBO_FREQ   720000000
++
++static struct am33xx_sr_opp_data sr1_opp_data[] = {
++        {
++                .efuse_offs    = AM33XX_SR1_OPP50_CNTRL_OFFSET,
++               .e2v_gain       = AM33XX_SR1_OPP50_EVM_ERR2VOLT_GAIN,
++               .err_minlimit   = AM33XX_SR1_OPP50_EVM_ERR_MIN_LIMIT,
++               .err_maxlimit   = AM33XX_SR1_OPP50_ERR_MAX_LIMIT,
++               .err_weight     = AM33XX_SR1_OPP50_ERR_WEIGHT,
++                .margin         = AM33XX_SR1_OPP50_MARGIN,
++                .nominal_volt   = AM33XX_VDD_MPU_OPP50_UV,
++                .frequency      = AM33XX_VDD_MPU_OPP50_FREQ,
++        },
++        {
++                .efuse_offs    = AM33XX_SR1_OPP100_CNTRL_OFFSET,
++               .e2v_gain       = AM33XX_SR1_OPP100_EVM_ERR2VOLT_GAIN,
++               .err_minlimit   = AM33XX_SR1_OPP100_EVM_ERR_MIN_LIMIT,
++               .err_maxlimit   = AM33XX_SR1_OPP100_ERR_MAX_LIMIT,
++               .err_weight     = AM33XX_SR1_OPP100_ERR_WEIGHT,
++                .margin         = AM33XX_SR1_OPP100_MARGIN,
++                .nominal_volt   = AM33XX_VDD_MPU_OPP100_UV,
++                .frequency      = AM33XX_VDD_MPU_OPP100_FREQ,
++        },
++        {
++                .efuse_offs    = AM33XX_SR1_OPP120_CNTRL_OFFSET,
++               .e2v_gain       = AM33XX_SR1_OPP120_EVM_ERR2VOLT_GAIN,
++               .err_minlimit   = AM33XX_SR1_OPP120_EVM_ERR_MIN_LIMIT,
++               .err_maxlimit   = AM33XX_SR1_OPP120_ERR_MAX_LIMIT,
++               .err_weight     = AM33XX_SR1_OPP120_ERR_WEIGHT,
++                .margin         = AM33XX_SR1_OPP120_MARGIN,
++                .nominal_volt   = AM33XX_VDD_MPU_OPP120_UV,
++                .frequency      = AM33XX_VDD_MPU_OPP120_FREQ,
++        },
++        {
++                .efuse_offs    = AM33XX_SR1_OPPTURBO_CNTRL_OFFSET,
++               .e2v_gain       = AM33XX_SR1_OPPTURBO_EVM_ERR2VOLT_GAIN,
++               .err_minlimit   = AM33XX_SR1_OPPTURBO_EVM_ERR_MIN_LIMIT,
++               .err_maxlimit   = AM33XX_SR1_OPPTURBO_ERR_MAX_LIMIT,
++               .err_weight     = AM33XX_SR1_OPPTURBO_ERR_WEIGHT,
++                .margin         = AM33XX_SR1_OPPTURBO_MARGIN,
++                .nominal_volt   = AM33XX_VDD_MPU_OPPTURBO_UV,
++                .frequency      = AM33XX_VDD_MPU_OPPTURBO_FREQ,
++        },
++};
++
++static struct am33xx_sr_opp_data sr0_opp_data[] = {
++        {
++                .efuse_offs    = AM33XX_SR0_OPP50_CNTRL_OFFSET,
++               .e2v_gain       = AM33XX_SR0_OPP50_EVM_ERR2VOLT_GAIN,
++               .err_minlimit   = AM33XX_SR0_OPP50_EVM_ERR_MIN_LIMIT,
++               .err_maxlimit   = AM33XX_SR0_OPP50_ERR_MAX_LIMIT,
++               .err_weight     = AM33XX_SR0_OPP50_ERR_WEIGHT,
++                .margin         = AM33XX_SR0_OPP50_MARGIN,
++                .nominal_volt   = AM33XX_VDD_CORE_OPP50_UV,
++        },
++        {
++                .efuse_offs    = AM33XX_SR0_OPP100_CNTRL_OFFSET,
++               .e2v_gain       = AM33XX_SR0_OPP100_EVM_ERR2VOLT_GAIN,
++               .err_minlimit   = AM33XX_SR0_OPP100_EVM_ERR_MIN_LIMIT,
++               .err_maxlimit   = AM33XX_SR0_OPP100_ERR_MAX_LIMIT,
++               .err_weight     = AM33XX_SR0_OPP100_ERR_WEIGHT,
++                .margin         = AM33XX_SR0_OPP100_MARGIN,
++                .nominal_volt   = AM33XX_VDD_CORE_OPP100_UV,
++        },
++};
++
++static struct am33xx_sr_sdata sr_sensor_data[] = {
++       {
++                .sr_opp_data    = sr0_opp_data,
++                /* note that OPP50 is NOT used in Linux kernel for AM335x */
++                .no_of_opps     = 0x2,
++                .default_opp    = 0x1,
++               .senn_mod       = 0x1,
++               .senp_mod       = 0x1,
++       },
++       {
++               .sr_opp_data    = sr1_opp_data,
++                /* the opp data below should be determined 
++                   dynamically during SR probe */
++                .no_of_opps     = 0x4,
++                .default_opp    = 0x3,
++               .senn_mod       = 0x1,
++               .senp_mod       = 0x1,
++       },
++};
++
++static struct am33xx_sr_platform_data am33xx_sr_pdata = {
++       .vd_name[0]             = "vdd_core",
++        .vd_name[1]             = "vdd_mpu",
++       .ip_type                = 2,
++        .irq_delay              = 1000,
++       .no_of_vds              = 2,
++       .no_of_sens             = ARRAY_SIZE(sr_sensor_data),
++       .vstep_size_uv          = 12500,
++       .enable_on_init         = true,
++       .sr_sdata               = sr_sensor_data,
++};
++
++static struct resource am33xx_sr_resources[] = {
++       {
++               .name   =       "smartreflex0",
++               .start  =       AM33XX_SR0_BASE,
++               .end    =       AM33XX_SR0_BASE + SZ_4K - 1,
++               .flags  =       IORESOURCE_MEM,
++       },
++       {
++               .name   =       "smartreflex0",
++               .start  =       AM33XX_IRQ_SMARTREFLEX0,
++               .end    =       AM33XX_IRQ_SMARTREFLEX0,
++               .flags  =       IORESOURCE_IRQ,
++       },
++       {
++               .name   =       "smartreflex1",
++               .start  =       AM33XX_SR1_BASE,
++               .end    =       AM33XX_SR1_BASE + SZ_4K - 1,
++               .flags  =       IORESOURCE_MEM,
++       },
++       {
++               .name   =       "smartreflex1",
++               .start  =       AM33XX_IRQ_SMARTREFLEX1,
++               .end    =       AM33XX_IRQ_SMARTREFLEX1,
++               .flags  =       IORESOURCE_IRQ,
++       },
++};
++
++/* VCORE for SR regulator init */
++static struct platform_device am33xx_sr_device = {
++       .name           = "smartreflex",
++       .id             = -1,
++       .num_resources  = ARRAY_SIZE(am33xx_sr_resources),
++       .resource       = am33xx_sr_resources,
++       .dev = {
++               .platform_data = &am33xx_sr_pdata,
++       },
++};
++
++void __init am33xx_sr_init(void)
++{
++        /* For beaglebone, update voltage step size and related parameters 
++           appropriately.  All other AM33XX platforms are good with the 
++           structure defaults as initialized above. */
++        if ((am33xx_evmid == BEAGLE_BONE_OLD) || 
++                        (am33xx_evmid == BEAGLE_BONE_A3)) {
++                printk(KERN_ERR "address of pdata = %08x\n", (u32)&am33xx_sr_pdata);
++                am33xx_sr_pdata.vstep_size_uv = 25000;
++                /* CORE */
++                sr0_opp_data[0].e2v_gain     = AM33XX_SR0_OPP50_BB_ERR2VOLT_GAIN;
++                sr0_opp_data[0].err_minlimit = AM33XX_SR0_OPP50_BB_ERR_MIN_LIMIT;
++                sr0_opp_data[1].e2v_gain     = AM33XX_SR0_OPP100_BB_ERR2VOLT_GAIN;
++                sr0_opp_data[1].err_minlimit = AM33XX_SR0_OPP100_BB_ERR_MIN_LIMIT;
++                /* MPU */
++                sr1_opp_data[0].e2v_gain     = AM33XX_SR1_OPP50_BB_ERR2VOLT_GAIN;
++                sr1_opp_data[0].err_minlimit = AM33XX_SR1_OPP50_BB_ERR_MIN_LIMIT;
++                sr1_opp_data[1].e2v_gain     = AM33XX_SR1_OPP100_BB_ERR2VOLT_GAIN;
++                sr1_opp_data[1].err_minlimit = AM33XX_SR1_OPP100_BB_ERR_MIN_LIMIT;
++                sr1_opp_data[2].e2v_gain     = AM33XX_SR1_OPP120_BB_ERR2VOLT_GAIN;
++                sr1_opp_data[2].err_minlimit = AM33XX_SR1_OPP120_BB_ERR_MIN_LIMIT;
++                sr1_opp_data[3].e2v_gain     = AM33XX_SR1_OPPTURBO_BB_ERR2VOLT_GAIN;
++                sr1_opp_data[3].err_minlimit = AM33XX_SR1_OPPTURBO_BB_ERR_MIN_LIMIT;
++        }
++
++       if (platform_device_register(&am33xx_sr_device))
++               printk(KERN_ERR "failed to register am33xx_sr device\n");
++       else
++               printk(KERN_INFO "registered am33xx_sr device\n");
++}
++#else
++inline void am33xx_sr_init(void) {}
++#endif
++
+ /*-------------------------------------------------------------------------*/
+ 
+ static int __init omap2_init_devices(void)
+diff --git a/arch/arm/mach-omap2/include/mach/board-am335xevm.h b/arch/arm/mach-omap2/include/mach/board-am335xevm.h
+index 1d24495..85a8df0 100644
+--- a/arch/arm/mach-omap2/include/mach/board-am335xevm.h
++++ b/arch/arm/mach-omap2/include/mach/board-am335xevm.h
+@@ -41,6 +41,7 @@
+ void am335x_evm_set_id(unsigned int evmid);
+ int am335x_evm_get_id(void);
+ void am33xx_cpsw_macidfillup(char *eeprommacid0, char *eeprommacid1);
++void am33xx_sr_init(void);
+ void am33xx_d_can_init(unsigned int instance);
+ 
+ #endif
+diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
+index 734009a..33f17f2 100644
+--- a/arch/arm/plat-omap/Kconfig
++++ b/arch/arm/plat-omap/Kconfig
+@@ -43,6 +43,27 @@ config OMAP_DEBUG_LEDS
+ 	depends on OMAP_DEBUG_DEVICES
+ 	default y if LEDS_CLASS
+ 
++config AM33XX_SMARTREFLEX
++	bool "AM33XX SmartReflex support"
++	depends on (SOC_OMAPAM33XX) && PM
++	help
++	  Say Y if you want to enable SmartReflex.
++
++	  SmartReflex can perform continuous dynamic voltage
++	  scaling around the nominal operating point voltage
++	  according to silicon characteristics and operating
++	  conditions. Enabling SmartReflex reduces active power
++	  consumption.
++
++	  Please note, that by default SmartReflex is enabled.
++          To disable the automatic voltage compensation for 
++          vdd mpu and vdd core from user space, user must 
++          write 1 to /debug/smartreflex/autocomp.
++
++	  Optionally autocompensation can be disabled in the kernel
++	  by default during system init via the enable_on_init flag
++	  which an be passed as platform data to the smartreflex driver.
++
+ config OMAP_SMARTREFLEX
+ 	bool "SmartReflex support"
+ 	depends on (ARCH_OMAP3 || ARCH_OMAP4) && PM
+diff --git a/arch/arm/plat-omap/include/plat/am33xx.h b/arch/arm/plat-omap/include/plat/am33xx.h
+index 32522df..a628b1f 100644
+--- a/arch/arm/plat-omap/include/plat/am33xx.h
++++ b/arch/arm/plat-omap/include/plat/am33xx.h
+@@ -43,6 +43,9 @@
+ #define AM33XX_TSC_BASE		0x44E0D000
+ #define AM33XX_RTC_BASE		0x44E3E000
+ 
++#define AM33XX_SR0_BASE         0x44E37000
++#define AM33XX_SR1_BASE         0x44E39000
++
+ #define AM33XX_ASP0_BASE	0x48038000
+ #define AM33XX_ASP1_BASE	0x4803C000
+ 
+diff --git a/arch/arm/plat-omap/include/plat/smartreflex.h b/arch/arm/plat-omap/include/plat/smartreflex.h
+new file mode 100644
+index 0000000..36338f7
+--- /dev/null
++++ b/arch/arm/plat-omap/include/plat/smartreflex.h
+@@ -0,0 +1,431 @@
++/*
++ * OMAP Smartreflex Defines and Routines
++ *
++ * Author: Thara Gopinath	<[email protected]>
++ *
++ * Copyright (C) 2010 Texas Instruments, Inc.
++ * Thara Gopinath <[email protected]>
++ *
++ * Copyright (C) 2008 Nokia Corporation
++ * Kalle Jokiniemi
++ *
++ * Copyright (C) 2007 Texas Instruments, Inc.
++ * Lesly A M <[email protected]>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++#ifndef __ASM_ARM_OMAP_SMARTREFLEX_H
++#define __ASM_ARM_OMAP_SMARTREFLEX_H
++
++#include <linux/platform_device.h>
++#include <plat/voltage.h>
++
++/*
++ * Different Smartreflex IPs version. The v1 is the 65nm version used in
++ * OMAP3430. The v2 is the update for the 45nm version of the IP
++ * used in OMAP3630 and OMAP4430
++ */
++#define SR_TYPE_V1	1
++#define SR_TYPE_V2	2
++
++/* SMART REFLEX REG ADDRESS OFFSET */
++#define SRCONFIG		0x00
++#define SRSTATUS		0x04
++#define SENVAL			0x08
++#define SENMIN			0x0C
++#define SENMAX			0x10
++#define SENAVG			0x14
++#define AVGWEIGHT		0x18
++#define NVALUERECIPROCAL	0x1c
++#define SENERROR_V1		0x20
++#define ERRCONFIG_V1		0x24
++#define IRQ_EOI			0x20
++#define IRQSTATUS_RAW		0x24
++#define IRQSTATUS		0x28
++#define IRQENABLE_SET		0x2C
++#define IRQENABLE_CLR		0x30
++#define SENERROR_V2		0x34
++#define ERRCONFIG_V2		0x38
++
++/* Bit/Shift Positions */
++
++/* SRCONFIG */
++#define SRCONFIG_ACCUMDATA_SHIFT	22
++#define SRCONFIG_SRCLKLENGTH_SHIFT	12
++#define SRCONFIG_SENNENABLE_V1_SHIFT	5
++#define SRCONFIG_SENPENABLE_V1_SHIFT	3
++#define SRCONFIG_SENNENABLE_V2_SHIFT	1
++#define SRCONFIG_SENPENABLE_V2_SHIFT	0
++#define SRCONFIG_CLKCTRL_SHIFT		0
++
++#define SRCONFIG_ACCUMDATA_MASK		(0x3ff << 22)
++
++#define SRCONFIG_SRENABLE		BIT(11)
++#define SRCONFIG_SENENABLE		BIT(10)
++#define SRCONFIG_ERRGEN_EN		BIT(9)
++#define SRCONFIG_MINMAXAVG_EN		BIT(8)
++#define SRCONFIG_DELAYCTRL		BIT(2)
++
++/* AVGWEIGHT */
++#define AVGWEIGHT_SENPAVGWEIGHT_SHIFT	2
++#define AVGWEIGHT_SENNAVGWEIGHT_SHIFT	0
++
++/* NVALUERECIPROCAL */
++#define NVALUERECIPROCAL_SENPGAIN_SHIFT	20
++#define NVALUERECIPROCAL_SENNGAIN_SHIFT	16
++#define NVALUERECIPROCAL_RNSENP_SHIFT	8
++#define NVALUERECIPROCAL_RNSENN_SHIFT	0
++
++/* ERRCONFIG */
++#define ERRCONFIG_ERRWEIGHT_SHIFT	16
++#define ERRCONFIG_ERRMAXLIMIT_SHIFT	8
++#define ERRCONFIG_ERRMINLIMIT_SHIFT	0
++
++#define SR_ERRWEIGHT_MASK		(0x07 << 16)
++#define SR_ERRMAXLIMIT_MASK		(0xff << 8)
++#define SR_ERRMINLIMIT_MASK		(0xff << 0)
++
++#define ERRCONFIG_VPBOUNDINTEN_V1	BIT(31)
++#define ERRCONFIG_VPBOUNDINTST_V1	BIT(30)
++#define	ERRCONFIG_MCUACCUMINTEN		BIT(29)
++#define ERRCONFIG_MCUACCUMINTST		BIT(28)
++#define	ERRCONFIG_MCUVALIDINTEN		BIT(27)
++#define ERRCONFIG_MCUVALIDINTST		BIT(26)
++#define ERRCONFIG_MCUBOUNDINTEN		BIT(25)
++#define	ERRCONFIG_MCUBOUNDINTST		BIT(24)
++#define	ERRCONFIG_MCUDISACKINTEN	BIT(23)
++#define ERRCONFIG_VPBOUNDINTST_V2	BIT(23)
++#define ERRCONFIG_MCUDISACKINTST	BIT(22)
++#define ERRCONFIG_VPBOUNDINTEN_V2	BIT(22)
++
++#define ERRCONFIG_STATUS_V1_MASK	(ERRCONFIG_VPBOUNDINTST_V1 | \
++					ERRCONFIG_MCUACCUMINTST | \
++					ERRCONFIG_MCUVALIDINTST | \
++					ERRCONFIG_MCUBOUNDINTST | \
++					ERRCONFIG_MCUDISACKINTST)
++/* IRQSTATUS */
++#define IRQSTATUS_MCUACCUMINT		BIT(3)
++#define IRQSTATUS_MCVALIDINT		BIT(2)
++#define IRQSTATUS_MCBOUNDSINT		BIT(1)
++#define IRQSTATUS_MCUDISABLEACKINT	BIT(0)
++
++/* IRQENABLE_SET and IRQENABLE_CLEAR */
++#define IRQENABLE_MCUACCUMINT		BIT(3)
++#define IRQENABLE_MCUVALIDINT		BIT(2)
++#define IRQENABLE_MCUBOUNDSINT		BIT(1)
++#define IRQENABLE_MCUDISABLEACKINT	BIT(0)
++
++/* Common Bit values */
++
++#define SRCLKLENGTH_12MHZ_SYSCLK	0x3c
++#define SRCLKLENGTH_13MHZ_SYSCLK	0x41
++#define SRCLKLENGTH_19MHZ_SYSCLK	0x60
++#define SRCLKLENGTH_26MHZ_SYSCLK	0x82
++#define SRCLKLENGTH_38MHZ_SYSCLK	0xC0
++
++/*
++ * 3430 specific values. Maybe these should be passed from board file or
++ * pmic structures.
++ */
++#define OMAP3430_SR_ACCUMDATA		0x1f4
++
++#define OMAP3430_SR1_SENPAVGWEIGHT	0x03
++#define OMAP3430_SR1_SENNAVGWEIGHT	0x03
++
++#define OMAP3430_SR2_SENPAVGWEIGHT	0x01
++#define OMAP3430_SR2_SENNAVGWEIGHT	0x01
++
++#define OMAP3430_SR_ERRWEIGHT		0x04
++#define OMAP3430_SR_ERRMAXLIMIT		0x02
++
++/**
++ * struct omap_sr_pmic_data - Strucutre to be populated by pmic code to pass
++ *				pmic specific info to smartreflex driver
++ *
++ * @sr_pmic_init:	API to initialize smartreflex on the PMIC side.
++ */
++struct omap_sr_pmic_data {
++	void (*sr_pmic_init) (void);
++};
++
++#ifdef CONFIG_OMAP_SMARTREFLEX
++/*
++ * The smart reflex driver supports CLASS1 CLASS2 and CLASS3 SR.
++ * The smartreflex class driver should pass the class type.
++ * Should be used to populate the class_type field of the
++ * omap_smartreflex_class_data structure.
++ */
++#define SR_CLASS1	0x1
++#define SR_CLASS2	0x2
++#define SR_CLASS3	0x3
++
++/**
++ * struct omap_sr_class_data - Smartreflex class driver info
++ *
++ * @enable:		API to enable a particular class smaartreflex.
++ * @disable:		API to disable a particular class smartreflex.
++ * @configure:		API to configure a particular class smartreflex.
++ * @notify:		API to notify the class driver about an event in SR.
++ *			Not needed for class3.
++ * @notify_flags:	specify the events to be notified to the class driver
++ * @class_type:		specify which smartreflex class.
++ *			Can be used by the SR driver to take any class
++ *			based decisions.
++ */
++struct omap_sr_class_data {
++	int (*enable)(struct voltagedomain *voltdm);
++	int (*disable)(struct voltagedomain *voltdm, int is_volt_reset);
++	int (*configure)(struct voltagedomain *voltdm);
++	int (*notify)(struct voltagedomain *voltdm, u32 status);
++	u8 notify_flags;
++	u8 class_type;
++};
++
++/**
++ * struct omap_sr_nvalue_table	- Smartreflex n-target value info
++ *
++ * @efuse_offs:	The offset of the efuse where n-target values are stored.
++ * @nvalue:	The n-target value.
++ */
++struct omap_sr_nvalue_table {
++	u32 efuse_offs;
++	u32 nvalue;
++};
++
++/**
++ * struct omap_sr_data - Smartreflex platform data.
++ *
++ * @ip_type:		Smartreflex IP type.
++ * @senp_mod:		SENPENABLE value for the sr
++ * @senn_mod:		SENNENABLE value for sr
++ * @nvalue_count:	Number of distinct nvalues in the nvalue table
++ * @enable_on_init:	whether this sr module needs to enabled at
++ *			boot up or not.
++ * @nvalue_table:	table containing the  efuse offsets and nvalues
++ *			corresponding to them.
++ * @voltdm:		Pointer to the voltage domain associated with the SR
++ */
++struct omap_sr_data {
++	int				ip_type;
++	u32				senp_mod;
++	u32				senn_mod;
++	int				nvalue_count;
++	bool				enable_on_init;
++	struct omap_sr_nvalue_table	*nvalue_table;
++	struct voltagedomain		*voltdm;
++};
++
++/* Smartreflex module enable/disable interface */
++void omap_sr_enable(struct voltagedomain *voltdm);
++void omap_sr_disable(struct voltagedomain *voltdm);
++void omap_sr_disable_reset_volt(struct voltagedomain *voltdm);
++
++/* API to register the pmic specific data with the smartreflex driver. */
++void omap_sr_register_pmic(struct omap_sr_pmic_data *pmic_data);
++
++/* Smartreflex driver hooks to be called from Smartreflex class driver */
++int sr_enable(struct voltagedomain *voltdm, unsigned long volt);
++void sr_disable(struct voltagedomain *voltdm);
++int sr_configure_errgen(struct voltagedomain *voltdm);
++int sr_configure_minmax(struct voltagedomain *voltdm);
++
++/* API to register the smartreflex class driver with the smartreflex driver */
++int sr_register_class(struct omap_sr_class_data *class_data);
++#else
++
++#ifdef CONFIG_AM33XX_SMARTREFLEX
++
++#define SR_CORE                         (0)
++#define SR_MPU                          (1)
++#define SRCLKLENGTH_125MHZ_SYSCLK	(0x78 << 12)
++#define GAIN_MAXLIMIT                   (16)
++#define R_MAXLIMIT                      (256)
++#define MAX_SENSORS                     2
++/* GG: eventually this should be determined at runtime */
++#define AM33XX_OPP_COUNT                4 
++
++/**
++ * struct am33xx_sr_opp_data	- Smartreflex data per OPP
++ * @efuse_offs:		The offset of the efuse where n-target values are
++ *			stored.
++ * @nvalue:             NTarget as stored in EFUSE.
++ * @adj_nvalue:         Adjusted NTarget (adjusted by margin)
++ * @e2v_gain:		Error to voltage gain for changing the percentage
++ *			error into voltage delta
++ * @err_weight:		Average sensor error weight
++ * @err_minlimit:	Minimum error limit of the sensor
++ * @err_maxlimit:	Maximum error limit of the sensor
++ * @margin:             Voltage margin to apply
++ * @nominal_volt:       Nominal voltage for this OPP
++ * @frequency:          Defined frequency for this OPP (in KHz)
++ */
++struct am33xx_sr_opp_data {
++	u32	efuse_offs;
++        u32     nvalue;
++        u32     adj_nvalue;
++	s32	e2v_gain;
++	u32	err_weight;
++	u32	err_minlimit;
++	u32	err_maxlimit;
++        s32     margin;
++        u32     nominal_volt; /* nominal_volt and frequency may be removed
++                                 once am33xx voltdm layer works */
++        u32     frequency;
++        u32     opp_id;
++};
++
++/**
++ * struct am33xx_sr_sdata	- Smartreflex sensors data
++ * @sr_opp_data:	Pointer to data structure containing per OPP data
++ *                      for this SR module.
++ * @no_of_opps:         Number of OPP's supported for this sensor - 
++ *                       determined dynamically when possible.
++ * @default_opp:        Defines the opp to use on startup if OPP is fixed
++ *                       or cannot be determined dynamically.
++ * @senn_mod:		Enable bit for N sensor
++ * @senp_mod:		Enable bit for P sensor
++ */
++struct am33xx_sr_sdata {
++	struct am33xx_sr_opp_data *sr_opp_data;
++        u32     no_of_opps;
++        u32     default_opp;
++	u32	senn_mod;
++	u32	senp_mod;
++};
++
++struct am33xx_sr_sensor {
++        u32                             sr_id;
++	u32			        irq;
++	u32			        irq_status;
++	u32			        senn_en;
++	u32			        senp_en;
++	char			        *name;
++        char                            *reg_name;
++	void __iomem		        *base;
++        int				init_volt_mv;
++        int                             curr_opp;
++        u32                             no_of_opps;
++        struct delayed_work             work_reenable;
++        struct regulator		*reg;
++        struct am33xx_sr_opp_data       opp_data[AM33XX_OPP_COUNT];
++	struct clk		        *fck;
++        struct voltagedomain		*voltdm;
++        struct omap_volt_data           *volt_data;
++};
++
++struct am33xx_sr {
++	u32				autocomp_active;
++	u32				sens_per_vd;
++        u32                             no_of_sens;
++        u32                             no_of_vds;
++	u32				ip_type;
++        u32				irq_delay;
++        u32                             disabled_by_user;
++	int				uvoltage_step_size;
++        char                            *res_name[MAX_SENSORS];
++#ifdef CONFIG_CPU_FREQ
++	struct notifier_block	        freq_transition;
++#endif
++	/*struct work_struct		work;*/
++        struct delayed_work             work;
++	struct sr_platform_data		*sr_data;
++	struct am33xx_sr_sensor		sen[MAX_SENSORS];
++	struct platform_device		*pdev;
++};
++
++/**
++ * struct am33xx_sr_platform_data - Smartreflex platform data.
++ * @sr_sdata:		SR per sensor details, contains the efuse off-sets,
++ *			error to voltage gain factor, minimum error limits
++ * @vd_name:		Name of the voltage domain.
++ * @ip_type:		Smartreflex IP type, class1 or class2 or class3.
++ * @irq_delay:          Amount of time required for changed voltage to settle.
++ * @no_of_vds:		Number of voltage domains to which SR applicable
++ * @no_of_sens:		Number of SR sensors used to monitor the device
++ *			performance, temp etc...
++ * @vstep_size_uv:	PMIC voltage step size in micro volts
++ * @enable_on_init:	whether this sr module needs to enabled at
++ *			boot up or not.
++ */
++struct am33xx_sr_platform_data {
++	struct am33xx_sr_sdata	*sr_sdata;
++	char			*vd_name[2];
++	u32			ip_type;
++        u32                     irq_delay;
++	u32			no_of_vds;
++	u32			no_of_sens;
++	u32			vstep_size_uv;
++	bool			enable_on_init;
++};
++
++#endif /*CONFIG_AM33XX_SMARTREFLEX*/
++
++#ifdef CONFIG_TI816X_SMARTREFLEX
++
++#define SRHVT				0
++#define SRSVT				1
++
++/* SRClk = 100KHz */
++#define SRCLKLENGTH_125MHZ_SYSCLK	(0x271 << 12)
++
++/**
++ * struct ti816x_sr_sdata	- Smartreflex sensors data
++ * @efuse_offs:		The offset of the efuse where n-target values are
++ *			stored.
++ * @e2v_gain:		Error to voltage gain for changing the percentage
++ *			error into voltage delta
++ * @err_weight:		Average sensor error weight
++ * @err_minlimit:	Minimum error limit of the sensor
++ * @err_maxlimit:	Maximum error limit of the sensor
++ * @senn_mod:		Enable bit for N sensor
++ * @senp_mod:		Enable bit for P sensor
++ */
++struct ti816x_sr_sdata {
++	u32	efuse_offs;
++	u32	e2v_gain;
++	u32	err_weight;
++	u32	err_minlimit;
++	u32	err_maxlimit;
++	u32	senn_mod;
++	u32	senp_mod;
++};
++
++/**
++ * struct ti816x_sr_platform_data - Smartreflex platform data.
++ * @sr_sdata:		SR per sensor details, contains the efuse off-sets,
++ *			error to voltage gain factor, minimum error limits
++ * @vd_name:		Name of the voltage domain.
++ * @ip_type:		Smartreflex IP type, class1 or class2 or class3.
++ * @irq_delay:		Time delay between disable and re-enable the
++ *			interrupts, in msec
++ * @no_of_vds:		Number of voltage domains to which SR applicable
++ * @no_of_sens:		Number of SR sensors used to monitor the device
++ *			performance, temp etc...
++ * @vstep_size_uv:	PMIC voltage step size in micro volts
++ * @enable_on_init:	whether this sr module needs to enabled at
++ *			boot up or not.
++ */
++struct ti816x_sr_platform_data {
++	struct ti816x_sr_sdata	*sr_sdata;
++	char			*vd_name;
++	u32			ip_type;
++	u32			irq_delay;
++	u32			no_of_vds;
++	u32			no_of_sens;
++	u32			vstep_size_uv;
++	bool			enable_on_init;
++};
++
++#endif /* CONFIG_TI816X_SMARTREFLEX */
++
++static inline void omap_sr_enable(struct voltagedomain *voltdm) {}
++static inline void omap_sr_disable(struct voltagedomain *voltdm) {}
++static inline void omap_sr_disable_reset_volt(
++		struct voltagedomain *voltdm) {}
++static inline void omap_sr_register_pmic(
++		struct omap_sr_pmic_data *pmic_data) {}
++#endif
++#endif
+diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
+index 00706c6..382ce2d 100644
+--- a/drivers/regulator/core.c
++++ b/drivers/regulator/core.c
+@@ -169,6 +169,9 @@ static int regulator_check_consumers(struct regulator_dev *rdev,
+ {
+ 	struct regulator *regulator;
+ 
++        if (rdev->ignore_check_consumers)
++                return 0;
++
+ 	list_for_each_entry(regulator, &rdev->consumer_list, list) {
+ 		/*
+ 		 * Assume consumers that didn't say anything are OK
+@@ -2688,6 +2691,7 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
+ 	rdev->reg_data = driver_data;
+ 	rdev->owner = regulator_desc->owner;
+ 	rdev->desc = regulator_desc;
++        rdev->ignore_check_consumers = init_data->ignore_check_consumers;
+ 	INIT_LIST_HEAD(&rdev->consumer_list);
+ 	INIT_LIST_HEAD(&rdev->list);
+ 	BLOCKING_INIT_NOTIFIER_HEAD(&rdev->notifier);
+diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
+index 52c89ae..6176167 100644
+--- a/include/linux/regulator/driver.h
++++ b/include/linux/regulator/driver.h
+@@ -204,7 +204,7 @@ struct regulator_dev {
+ 	int deferred_disables;
+ 
+ 	void *reg_data;		/* regulator_dev data */
+-
++        int ignore_check_consumers; 
+ #ifdef CONFIG_DEBUG_FS
+ 	struct dentry *debugfs;
+ #endif
+diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h
+index f3f13fd..0de52a3 100644
+--- a/include/linux/regulator/machine.h
++++ b/include/linux/regulator/machine.h
+@@ -169,7 +169,7 @@ struct regulator_consumer_supply {
+  *               be usable.
+  * @num_consumer_supplies: Number of consumer device supplies.
+  * @consumer_supplies: Consumer device supply configuration.
+- *
++ * @ignore_check_consumers: If != 0, regulator_check_consumers() is disabled.
+  * @regulator_init: Callback invoked when the regulator has been registered.
+  * @driver_data: Data passed to regulator_init.
+  */
+@@ -181,6 +181,7 @@ struct regulator_init_data {
+ 	int num_consumer_supplies;
+ 	struct regulator_consumer_supply *consumer_supplies;
+ 
++        int ignore_check_consumers;
+ 	/* optional regulator machine specific init */
+ 	int (*regulator_init)(void *driver_data);
+ 	void *driver_data;	/* core does not touch this */
+-- 
+1.7.0.4
+
recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-mach-omap2-pm33xx-Disable-VT-switch.patch new file +72 -0
new file mode 100644
index 0000000..59cdfdf
@@ -0,0 +1,72 @@
+From 31ec2850e89414efb30accb9d8b5228257e507b1 Mon Sep 17 00:00:00 2001
+From: Chase Maupin <[email protected]>
+Date: Wed, 21 Mar 2012 10:18:03 -0500
+Subject: [PATCH 1/1] mach-omap2: pm33xx: Disable VT switch
+
+* Added a new config option TI_PM_DISABLE_VT_SWITCH which
+  disables the VT console switch which normally occurs during
+  suspend.  This console switch can cause a hange when performed
+  with applications like Matrix running.  The VT switch is
+  considered unnecessary.
+* Modified the am335x_evm_defconfig file to default the
+  TI_PM_DISABLE_VT_SWITCH to "y".
+* Based on a patch for the linux-omap3 kernel by Greg Guyotte
+
+Signed-off-by: Chase Maupin <[email protected]>
+---
+ arch/arm/configs/am335x_evm_defconfig |    1 +
+ arch/arm/mach-omap2/Kconfig           |    9 +++++++++
+ arch/arm/mach-omap2/pm33xx.c          |    5 +++++
+ 3 files changed, 15 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/configs/am335x_evm_defconfig b/arch/arm/configs/am335x_evm_defconfig
+index 53d1b6a..7a5e7ad 100644
+--- a/arch/arm/configs/am335x_evm_defconfig
++++ b/arch/arm/configs/am335x_evm_defconfig
+@@ -325,6 +325,7 @@ CONFIG_MACH_TI8148EVM=y
+ CONFIG_MACH_AM335XEVM=y
+ CONFIG_MACH_AM335XIAEVM=y
+ # CONFIG_OMAP3_EMU is not set
++CONFIG_TI_PM_DISABLE_VT_SWITCH=y
+ # CONFIG_OMAP3_SDRC_AC_TIMING is not set
+ CONFIG_OMAP3_EDMA=y
+ 
+diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
+index e44e942..f13e9dc 100644
+--- a/arch/arm/mach-omap2/Kconfig
++++ b/arch/arm/mach-omap2/Kconfig
+@@ -372,6 +372,15 @@ config OMAP3_EMU
+ 	help
+ 	  Say Y here to enable debugging hardware of omap3
+ 
++config TI_PM_DISABLE_VT_SWITCH
++	bool "TI Disable PM Console Switch"
++	depends on ARCH_OMAP3
++	default y
++	help
++	  This option disables the default PM VT switch behavior for TI devices.
++	  Some platforms hang during suspend due to a failed attempt to
++	  perform the VT switch.  The VT switch is unnecessary on many platforms.
++
+ config OMAP3_SDRC_AC_TIMING
+ 	bool "Enable SDRC AC timing register changes"
+ 	depends on ARCH_OMAP3
+diff --git a/arch/arm/mach-omap2/pm33xx.c b/arch/arm/mach-omap2/pm33xx.c
+index 70bcb42..019ae46 100644
+--- a/arch/arm/mach-omap2/pm33xx.c
++++ b/arch/arm/mach-omap2/pm33xx.c
+@@ -502,6 +502,11 @@ static int __init am33xx_pm_init(void)
+ 	pr_info("Power Management for AM33XX family\n");
+ 
+ #ifdef CONFIG_SUSPEND
++
++#ifdef CONFIG_TI_PM_DISABLE_VT_SWITCH
++	pm_set_vt_switch(0);
++#endif
++
+ /* Read SDRAM_CONFIG register to determine Memory Type */
+	base = am33xx_get_ram_base();
+	reg = readl(base + EMIF4_0_SDRAM_CONFIG);
+-- 
+1.7.0.4
+
recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-musb-update-PIO-mode-help-information-in-Kconfig.patch new file +46 -0
new file mode 100644
index 0000000..dd65108
@@ -0,0 +1,46 @@
+From 214f6b2fee005dba5e01b3b434f184adf4386a25 Mon Sep 17 00:00:00 2001
+From: Chase Maupin <[email protected]>
+Date: Thu, 2 Feb 2012 15:52:10 -0600
+Subject: [PATCH] musb: update PIO mode help information in Kconfig
+
+* Updated the Kconfig help information for the PIO mode for MUSB
+  to make it more clear to the customer when to select this option
+  and which devices currently have issues with this option.
+* This is in accordance with the findings for CPPI4.1 DMA usage
+  for MUSB
+
+Upstream-Status: Submitted
+    * Submitted to the PSP team using the lpr list
+
+Signed-off-by: Matt Porter <[email protected]>
+Signed-off-by: Chase Maupin <[email protected]>
+---
+ drivers/usb/musb/Kconfig |   12 ++++++++----
+ 1 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
+index a06335f..3576afe 100644
+--- a/drivers/usb/musb/Kconfig
++++ b/drivers/usb/musb/Kconfig
+@@ -159,10 +159,14 @@ config MUSB_PIO_ONLY
+ 	  All data is copied between memory and FIFO by the CPU.
+ 	  DMA controllers are ignored.
+ 
+-	  Do not choose this unless DMA support for your SOC or board
+-	  is unavailable (or unstable).  When DMA is enabled at compile time,
+-	  you can still disable it at run time using the "use_dma=n" module
+-	  parameter.
++	  Select 'y' here if DMA support for your SOC or board
++	  is unavailable (or unstable). On CPPI 4.1 DMA based
++	  systems (AM335x, AM35x, and AM180x) DMA support is
++	  considered unstable and this option should be enabled
++	  in production systems so that DMA is disabled, unless DMA
++	  has been validated for all use cases. When DMA is enabled at
++	  compile time, you can still disable it at run time using the
++	  "use_dma=n" module parameter.
+ 
+ endchoice
+ 
+-- 
+1.7.0.4
+
recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0001-omap-serial-add-delay-before-suspending.patch new file +42 -0
new file mode 100644
index 0000000..7780786
@@ -0,0 +1,42 @@
+From 0f62d1f4d4543a315815b8eb15ea9cdad25d16c8 Mon Sep 17 00:00:00 2001
+From: Eyal Reizer <[email protected]>
+Date: Wed, 27 Jun 2012 16:08:53 +0300
+Subject: [PATCH] omap-serial: add delay before suspending
+
+In case suspending during Bluetooth traffic, after resume the bluetooth is
+stuck.
+It was identified that suspend is happening before the UART buffer was
+fully drained which caused this hang after resume.
+The folliwng delay is a temporary workaround until the issue is resolved
+properly.
+
+Upstream Status: Pending
+
+Signed-off-by: Eyal Reizer <[email protected]>
+---
+ drivers/tty/serial/omap-serial.c |   10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
+index ca24ab3..108ea2b 100755
+--- a/drivers/tty/serial/omap-serial.c
++++ b/drivers/tty/serial/omap-serial.c
+@@ -1166,6 +1166,16 @@ static int serial_omap_suspend(struct device *dev)
+	struct uart_omap_port *up = dev_get_drvdata(dev);
+
+	if (up) {
++                /*
++                  In case suspending during Bluetooth traffic, after resume
++                  the bluetooth is stuck.
++                  It was identified that suspend is happening before the
++                  UART buffer was fully drained which caused this hang after
++                  resume. The following delay is a temporary workaround until
++                  the issue is resolved properly.
++                */
++                msleep(10);
++
+		uart_suspend_port(&serial_omap_reg, &up->port);
+		flush_work_sync(&up->qos_work);
+	}
+--
+1.7.0.4
recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0002-AM335x-OCF-Driver-for-Linux-3.patch new file +7229 -0
new file mode 100644
index 0000000..2285e7f
@@ -0,0 +1,7229 @@
+From a97aac248717d62bdbf322c1d6d422ddfde87de0 Mon Sep 17 00:00:00 2001
+From: Greg Turner <[email protected]>
+Date: Thu, 3 May 2012 10:33:13 -0500
+Subject: [PATCH 2/2] AM335x OCF Driver for Linux 3
+
+---
+ crypto/Kconfig               |    3 +
+ crypto/Makefile              |    2 +
+ crypto/ocf/Config.in         |   20 +
+ crypto/ocf/Kconfig           |   48 ++
+ crypto/ocf/Makefile          |  138 ++++
+ crypto/ocf/criov.c           |  215 +++++
+ crypto/ocf/crypto.c          | 1766 ++++++++++++++++++++++++++++++++++++++++++
+ crypto/ocf/cryptodev.c       | 1069 +++++++++++++++++++++++++
+ crypto/ocf/cryptodev.h       |  480 ++++++++++++
+ crypto/ocf/cryptosoft.c      | 1322 +++++++++++++++++++++++++++++++
+ crypto/ocf/ocf-bench.c       |  514 ++++++++++++
+ crypto/ocf/ocf-compat.h      |  372 +++++++++
+ crypto/ocf/ocfnull/Makefile  |   12 +
+ crypto/ocf/ocfnull/ocfnull.c |  204 +++++
+ crypto/ocf/random.c          |  317 ++++++++
+ crypto/ocf/rndtest.c         |  300 +++++++
+ crypto/ocf/rndtest.h         |   54 ++
+ crypto/ocf/uio.h             |   54 ++
+ drivers/char/random.c        |   67 ++
+ fs/fcntl.c                   |    1 +
+ include/linux/miscdevice.h   |    1 +
+ include/linux/random.h       |   28 +
+ kernel/pid.c                 |    1 +
+ 23 files changed, 6988 insertions(+), 0 deletions(-)
+ create mode 100755 crypto/ocf/Config.in
+ create mode 100755 crypto/ocf/Kconfig
+ create mode 100755 crypto/ocf/Makefile
+ create mode 100644 crypto/ocf/criov.c
+ create mode 100644 crypto/ocf/crypto.c
+ create mode 100644 crypto/ocf/cryptodev.c
+ create mode 100644 crypto/ocf/cryptodev.h
+ create mode 100644 crypto/ocf/cryptosoft.c
+ create mode 100644 crypto/ocf/ocf-bench.c
+ create mode 100644 crypto/ocf/ocf-compat.h
+ create mode 100644 crypto/ocf/ocfnull/Makefile
+ create mode 100644 crypto/ocf/ocfnull/ocfnull.c
+ create mode 100644 crypto/ocf/random.c
+ create mode 100644 crypto/ocf/rndtest.c
+ create mode 100644 crypto/ocf/rndtest.h
+ create mode 100644 crypto/ocf/uio.h
+
+diff --git a/crypto/Kconfig b/crypto/Kconfig
+index 527a857..8871f10 100644
+--- a/crypto/Kconfig
++++ b/crypto/Kconfig
+@@ -923,3 +923,6 @@ config CRYPTO_USER_API_SKCIPHER
+ source "drivers/crypto/Kconfig"
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0002-am335x-Add-suspend-resume-routines-to-crypto-driver.patch new file +148 -0
new file mode 100644
index 0000000..33e27df

Lines of this file are not shown. View the raw message.

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0002-am33x-Add-crypto-device-and-resource-structures.patch new file +112 -0
new file mode 100644
index 0000000..1da9edb

Lines of this file are not shown. View the raw message.

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0002-am33xx-Enable-CONFIG_AM33XX_SMARTREFLEX.patch new file +27 -0
new file mode 100644
index 0000000..4e5d68c

Lines of this file are not shown. View the raw message.

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0003-am33x-Add-crypto-device-and-resource-structure-for-T.patch new file +61 -0
new file mode 100644
index 0000000..9c88215

Lines of this file are not shown. View the raw message.

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0004-am33x-Add-crypto-drivers-to-Kconfig-and-Makefiles.patch new file +125 -0
new file mode 100644
index 0000000..dad0236

Lines of this file are not shown. View the raw message.

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0005-am33x-Create-header-file-for-OMAP4-crypto-modules.patch new file +214 -0
new file mode 100644
index 0000000..ad18c3c

Lines of this file are not shown. View the raw message.

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0006-am33x-Create-driver-for-TRNG-crypto-module.patch new file +325 -0
new file mode 100644
index 0000000..5bca8d3

Lines of this file are not shown. View the raw message.

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0007-am33x-Create-driver-for-AES-crypto-module.patch new file +972 -0
new file mode 100644
index 0000000..250a979

Lines of this file are not shown. View the raw message.

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/0008-am33x-Create-driver-for-SHA-MD5-crypto-module.patch new file +1445 -0
new file mode 100644
index 0000000..dca457c

Lines of this file are not shown. View the raw message.

recipes-kernel/linux/linux-am335x-3.2.0-psp04.06.00.08/defconfig new file +1 -0
new file mode 100644
index 0000000..f8cbc03

Lines of this file are not shown. View the raw message.

recipes-kernel/linux/linux-am335x_3.2.0-psp04.06.00.08.bb new file +33 -0
new file mode 100644
index 0000000..0f1b3b2

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Variable PATCHES_OVER_PSP may be confused with the one used by tipspkernel feature. Moreover, while tipspkernel is not currently used in this recipe, if it gets enabled in the future for some other reason, it will override you use of it here and you'll end up with empty list of patches here, due to conditional assignment above...

recipes-kernel/linux/setup-defconfig.inc

Quoted 55 lines
recipes-kernel/linux/linux-am335x_3.2.0-psp04.06.00.08.bb new file +47 -0

Lines of this file are not shown. View the raw message.

recipes-kernel/linux/setup-defconfig.inc new file +2 -0
new file mode 100644
index 0000000..fc5e18e

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

This feature is mostly useful with AUTOREV-ed kernel recipes. I'd say there should never be AUTOREV-ed recipes in meta-ti. So, I don't see much value in this...

Quoted 31 lines
recipes-kernel/linux/setup-defconfig.inc new file +23 -0

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 7 lines
1.7.0.4


_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti

Part of the diff is not shown here. View the raw message.

#3 lore raw

Re: [PATCH] u-boot_2011.09-psp04.06.00.08: Add the SDK released version of u-boot

In reply to Denys Dmytriyenko

Those are valid machines even though the git repo name is misleading:) Beagleboard and am37x-evm now uses u-boot mainline so most people will likely use u-boot 2012.04.01+ instead of using this recipe. Am3517-evm currently uses this version of u-boot in the latest Sitara SDK.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dmytriyenko, Denys
Sent: Thursday, September 20, 2012 11:18 PM
To: Franklin S. Cooper Jr
Cc: [email protected]
Subject: Re: [meta-ti] [PATCH] u-boot_2011.09-psp04.06.00.08: Add the SDK released version of u-boot

Quoted 15 lines · Franklin S. Cooper Jr

* Add the official version of u-boot that is used by the Sitara SDK.

---
 .../u-boot/u-boot_2011.09-psp04.06.00.08.bb        |   29 ++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)  create mode 100644 

recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb

recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb new file +0 -0
new file mode 100644
index 0000000..cbaff76

recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb line 8

Quoted 8 lines
recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb new file +8 -0
@@ -0,0 +1,29 @@
+# Use the version of u-boot.inc in oe-core not the meta-ti version 
+require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc
+
+DESCRIPTION = "u-boot bootloader for ARM MPU devices"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
+
+COMPATIBLE_MACHINE = "ti33x|am37x-evm|am3517-evm|beagleboard"

Are you sure this is the right set of machines for the URL below?

Quoted 23 lines
recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb new file +20 -1
+DEFAULT_PREFERENCE = "-1"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+PR = "r0+gitr${SRCPV}"
+
+SRC_URI = "git://arago-project.org/git/projects/u-boot-am33x.git;protocol=git;branch=${BRANCH}"
+
+BRANCH = "AM335XPSP_04.06.00.08"
+
+# Lock to the commit corresponding to TAG:
+# v2011.09_AM335xPSP_04.06.00.08
+SRCREV = "1e4626f0d5f3bb04ec974e76a5d9029875269d31"
+
+S = "${WORKDIR}/git"
+
+UBOOT_SUFFIX = "img"
+
+# Set the name of the SPL that will built so that it is also packaged with u-boot.
+SPL_BINARY = "MLO"
--

1.7.0.4

Quoted 4 lines

_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti

_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti

Acked-by
#4 lore raw

Re: [PATCH] u-boot_2011.09-psp04.06.00.08: Add the SDK released version of u-boot

In reply to Denys Dmytriyenko

Sincerely,
Chase Maupin
Software Applications
ARM MPU
e-mail: [email protected]
phone: (214) 567-2950

For support:
Forums - http://community.ti.com/forums/
Wiki - http://wiki.davincidsp.com/

Quoted 77 lines

-----Original Message-----
From: [email protected] [mailto:meta-ti- [email protected]] On Behalf Of Dmytriyenko, Denys
Sent: Thursday, September 20, 2012 11:18 PM
To: Franklin S. Cooper Jr
Cc: [email protected]
Subject: Re: [meta-ti] [PATCH] u-boot_2011.09-psp04.06.00.08: Add the SDK released version of u-boot

Quoted 1 line · Franklin S. Cooper Jr

* Add the official version of u-boot that is used by the Sitara

SDK.

Quoted 4 lines
---
 .../u-boot/u-boot_2011.09-psp04.06.00.08.bb        |   29

++++++++++++++++++++

Quoted 2 lines
 1 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 recipes-bsp/u-boot/u-boot_2011.09-

psp04.06.00.08.bb

Review

Quoted 2 lines
(quoted diff) +0 -0

psp04.06.00.08.bb b/recipes-bsp/u-boot/u-boot_2011.09- psp04.06.00.08.bb

recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb line 1

Quoted 6 lines

new file mode 100644
index 0000000..cbaff76

recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb new file +1 -0
@@ -0,0 +1,29 @@
+# Use the version of u-boot.inc in oe-core not the meta-ti

version

recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb

Quoted 5 lines
recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb new file +5 -0
+require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc
+
+DESCRIPTION = "u-boot bootloader for ARM MPU devices"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM =

"file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"

recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb line 8

Quoted 2 lines
recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb new file +2 -0
+
+COMPATIBLE_MACHINE = "ti33x|am37x-evm|am3517-evm|beagleboard"

Are you sure this is the right set of machines for the URL below?

recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb

Quoted 7 lines
recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb new file +7 -0
+DEFAULT_PREFERENCE = "-1"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+PR = "r0+gitr${SRCPV}"
+
+SRC_URI = "git://arago-project.org/git/projects/u-boot-

am33x.git;protocol=git;branch=${BRANCH}"

recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb

Quoted 12 lines
recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb new file +12 -0
+
+BRANCH = "AM335XPSP_04.06.00.08"
+
+# Lock to the commit corresponding to TAG:
+# v2011.09_AM335xPSP_04.06.00.08
+SRCREV = "1e4626f0d5f3bb04ec974e76a5d9029875269d31"
+
+S = "${WORKDIR}/git"
+
+UBOOT_SUFFIX = "img"
+
+# Set the name of the SPL that will built so that it is also

packaged with u-boot.

Quoted 8 lines
recipes-bsp/u-boot/u-boot_2011.09-psp04.06.00.08.bb new file +1 -1
+SPL_BINARY = "MLO"
--

1.7.0.4

_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti

_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti